PageSourceSearch

https://www.roomdeco.ai/_next/static/chunks/4133-8e8e7b1ede06367f.js

js roomdeco.ai collected 2026-10-04 06:50:03 UTC 54,922 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4133],{73947:function(e,t,r){"use strict";r.d(t,{K:function(){return n}});var i=r(85893),l=r(39343),a=r(67294);let n=e=>{let[t,r]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(t){let e=setTimeout(()=>r(!1),2e3);return()=>clearTimeout(e)}},[t]),(0,i.jsx)(l.u,{openDelay:1e3,...e,isOpen:t,onOpen:()=>r(!0),onClose:()=>r(!1)})}},62178:function(e,t,r){"use strict";var i=r(85893),l=r(93194),a=r(12498),n=r(23100),s=r(28129),o=r(96272),c=r(37518),d=r(25675),u=r.n(d),h=r(67294),m=r(85093);let p=e=>{let{image:t,open:r,onClose:d,onSave:p}=e,[x,g]=(0,h.useState)(""),f=(0,h.useRef)(null),j=(0,h.useRef)(!1),b=(0,l.p)(),w=(0,a.ff)("primary.800","primary.800"),v=(0,m.Uploader)({apiKey:"public_kW15bEo7CvEboycVKqTLNFw5u7KP"}),y=async e=>{try{b({title:"Saving...",description:"Uploading your edited mask.",status:"info",duration:null,isClosable:!1,id:"saving-toast"});let t=await (await fetch(e)).blob(),{fileUrl:r}=await v.uploadFile(t);return b.close("saving-toast"),b({title:"Save Successful",description:"Your mask has been uploaded.",status:"success",duration:3e3,isClosable:!0}),r}catch(e){throw console.error("Upload failed:",e),b.close("saving-toast"),b({title:"Error",description:"Mask upload failed. Please try again.",status:"error",duration:3e3,isClosable:!0}),e}},C=async()=>{if(f.current){let e=document.createElement("canvas");e.width=f.current.width,e.height=f.current.height;let t=e.getContext("2d"),r=f.current.getContext("2d");t&&r&&(t.fillStyle="black",t.fillRect(0,0,e.width,e.height),t.globalCompositeOperation="source-over",t.drawImage(f.current,0,0));let i=e.toDataURL("image/png");try{let e=await y(i);p(x,e),d()}catch(e){}}},S=e=>{j.current=!0,I(e)},k=()=>{j.current=!1},I=e=>{if(!j.current||!f.current)return;let t=f.current.getContext("2d");if(t){let r=f.current.getBoundingClientRect(),i=e.clientX-r.left,l=e.clientY-r.top;t.lineWidth=30,t.lineCap="round",t.strokeStyle="white",t.lineTo(i,l),t.stroke(),t.beginPath(),t.moveTo(i,l)}},N=()=>{if(f.current){let e=f.current.getContext("2d");e&&e.clearRect(0,0,f.current.width,f.current.height)}g(""),d()};return(0,i.jsx)("div",{children:(0,i.jsx)(c.V,{open:r,onClose:d,children:(0,i.jsx)(c.V.Overlay,{className:"fixed inset-0 bg-black bg-opacity-85 flex items-center justify-center z-[1000]",children:(0,i.jsxs)(n.xu,{position:"relative",width:"90%",maxW:"600px",bg:w,borderRadius:"lg",p:4,boxShadow:"xl",zIndex:"1050",children:[(0,i.jsxs)(n.xu,{position:"relative",children:[(0,i.jsx)(u(),{alt:"Generated room",src:t,layout:"responsive",width:1920,height:1080,className:"rounded-lg object-cover w-full h-auto"}),(0,i.jsx)("canvas",{ref:f,width:1920,height:1080,className:"absolute inset-0 rounded-lg",style:{background:"rgba(0, 0, 0, 0.5)"},onMouseDown:S,onMouseUp:k,onMouseMove:I})]}),(0,i.jsx)(n.xu,{mt:4,children:(0,i.jsx)(s.I,{placeholder:"Add a description (max 140 chars)",value:x,onChange:e=>g(e.target.value.slice(0,140)),maxLength:140})}),(0,i.jsxs)(n.xu,{display:"flex",justifyContent:"space-between",mt:4,children:[(0,i.jsx)(o.z,{colorScheme:"red",onClick:N,children:"Cancel"}),(0,i.jsx)(o.z,{colorScheme:"green",onClick:C,children:"Save"})]})]})})})})};t.Z=p},45732:function(e,t,r){"use strict";var i=r(85893),l=r(23100),a=r(37518),n=r(25675),s=r.n(n);let o=e=>{let{image:t,open:r,onClose:n,watermarkUrl:o}=e;return(0,i.jsx)("div",{children:(0,i.jsx)(a.V,{open:r,onClose:n,children:(0,i.jsx)(a.V.Overlay,{className:"absolute inset-0 bg-red flex flex-col items-center justify-center min-h-screen w-full",children:(0,i.jsx)(l.xu,{position:"fixed",top:0,left:0,width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",backdropFilter:"blur(10px)",zIndex:"9999",inset:0,children:(0,i.jsxs)("div",{className:"relative m-4 sm:m-0 m-auto min-w-[376px]",children:[(0,i.jsx)(s(),{alt:"Generated room",src:t,layout:"responsive",width:1920,height:1080,className:"rounded-2xl object-contain border-1 mx-1 w-full relative flex justify-center max-h-[95vh]"}),(0,i.jsx)("div",{className:"absolute top-3 right-3",children:(0,i.jsx)("button",{className:"relative bg-red-500 rounded-full text-white p-1 flex items-center justify-center w-8 h-8",onClick:()=>n(),children:"X"})}),(0,i.jsx)("div",{className:"absolute bottom-3 right-3",children:""==o?null:(0,i.jsx)(s(),{src:o||"/roomdeco.png",alt:"Logo",width:80,height:80,className:"w-12 h-12 sm:w-16 sm:h-16"})})]})})})})})};t.Z=o},74566:function(e,t,r){"use strict";var i=r(85893),l=r(59419),a=r.n(l);let n=e=>{let{color:t="#000",style:r="small"}=e;return(0,i.jsxs)("span",{className:"small"==r?a().loading2:a().loading,children:[(0,i.jsx)("span",{style:{backgroundColor:t}}),(0,i.jsx)("span",{style:{backgroundColor:t}}),(0,i.jsx)("span",{style:{backgroundColor:t}})]})};t.Z=n,n.defaultProps={style:"small"}},30928:function(e,t,r){"use strict";var i=r(85893),l=r(23100),a=r(14418),n=r(1004),s=r(56005),o=r(49394),c=r(88911),d=r(96272),u=r(37518),h=r(75760),m=r(11163),p=r(67294),x=r(76820),g=r(9044),f=r(17554),j=r(87406);let b=e=>{let{content:t,neededTier:r,open:b,onClose:w,isFirstLogin:v=!1,forceSubscription:y=!1}=e,{t:C}=(0,h.$G)("common"),S=(0,m.useRouter)(),[k,I]=(0,p.useState)(t);(0,p.useEffect)(()=>{I(t)},[t,r,b]),(0,p.useEffect)(()=>
1{if(b)S.push({query:{...S.query,shop:"open",tab:k}},void 0,{shallow:!0});else if("open"===S.query.shop){let{shop:e,tab:t,...r}=S.query;S.push({query:r},void 0,{shallow:!0})}},[b,k]);let N=new Date("2026-03-22"),A=new Date,z=Math.floor((A.getTime()-N.getTime())/864e5),R=()=>{w(),S.push("/#pricing-comparison")};return(0,i.jsx)("div",{children:(0,i.jsx)(u.V,{open:b,onClose:y?()=>void 0:w,children:(0,i.jsx)(l.xu,{position:"fixed",top:0,left:0,width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",backdropFilter:"blur(10px)",zIndex:"9999",children:(0,i.jsxs)(u.V.Overlay,{className:"fixed inset-0 bg-black h-screen overflow-scroll z-10 bg-opacity-80 px-4 sm:px-20 pt-1 mb-20",children:[y?(0,i.jsx)(a.X,{fontSize:"4xl",lineHeight:"shorter",textAlign:"center",mb:"4",mt:"2",color:"white",children:"Choose a plan to start generating"}):r?(0,i.jsxs)(a.X,{fontSize:"4xl",lineHeight:"shorter",textAlign:"center",mb:"4",mt:"2",color:"white",children:["Upgrade to ",r," to use this feature"]}):null,!y&&(0,i.jsx)(l.xu,{maxWidth:"300px",mx:"auto",children:(0,i.jsx)(n.m,{index:"subscription"===k?0:"credits"===k?1:"pack"===k?2:3,onChange:e=>{I(0===e?"subscription":1===e?"credits":2===e?"pack":"seatSubscription")},variant:"solid-rounded",colorScheme:"primary",bg:"",p:1,mx:"auto",rounded:"full",mb:4,children:(0,i.jsxs)(s.t,{justifyContent:"center",children:[(0,i.jsx)(o.O,{children:C("subscriptions")}),(0,i.jsx)(o.O,{children:C("credits")}),(0,i.jsx)(o.O,{children:C("packstitle")}),(0,i.jsx)(o.O,{children:"Seats"})]})})}),(0,i.jsx)(c.x,{textAlign:"center",fontSize:"xl",color:"gray.400",fontWeight:"bold",mb:10,children:y?"Pick a plan and complete checkout to unlock the generator.":"Join ".concat(327+(z>0?z:0)," happy subscribers!")}),!y&&(0,i.jsx)("button",{className:"absolute top-1 sm:top-5 right-2 sm:right-6 bg-red-500 rounded-full text-white p-1 flex items-center justify-center w-6 sm:w-12 h-6 sm:h-12",onClick:w,children:"X"}),"subscription"===k?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(j.Z,{}),(0,i.jsx)(l.xu,{textAlign:"center",mt:5,children:(0,i.jsx)(d.z,{variant:"link",colorScheme:"primary",color:"primary.200",onClick:R,children:"Compare all features"})}),v&&!y&&(0,i.jsx)("div",{className:"w-full flex justify-center sm:justify-end my-12",children:(0,i.jsx)(d.z,{colorScheme:"primary",w:"sm",size:"lg",onClick:w,children:C("continuefree")})})]}):"credits"===k?(0,i.jsx)(g.Z,{}):"pack"===k?(0,i.jsx)(x.Z,{}):(0,i.jsx)(f.Z,{})]})})})})};t.Z=b},76223:function(e,t,r){"use strict";r.d(t,{Z:function(){return I}});var i=r(85893),l=r(93194),a=r(7335),n=r(23100),s=r(204),o=r(54641),c=r(88911),d=r(41689),u=r(96272),h=r(18691),m=r(92752),p=r(8954),x=r(31948),g=r(44504),f=r(55819),j=r(73793),b=r(70654),w=r(96177),v=r(28129),y=r(47018),C=r(84053),S=r(67294),k=r(89583);function I(e){let{userId:t,selectedProjectId:r,onProjectChange:I,mode:N="assign",locked:A=!1,onRequirePro:z}=e,R=(0,C.useSupabaseClient)(),E=(0,l.p)(),_=(0,a.q)(),[P,O]=(0,S.useState)([]),[D,L]=(0,S.useState)(!0),[T,U]=(0,S.useState)(!1),[F,M]=(0,S.useState)(""),[q,W]=(0,S.useState)("property"),[G,V]=(0,S.useState)(""),[Z,B]=(0,S.useState)(""),J=(0,S.useMemo)(()=>P.find(e=>e.id===r),[P,r]);async function H(){if(A){null==z||z();return}if(!t||!F.trim())return;U(!0);let{data:e,error:r}=await R.from("room_projects").insert({user_id:t,name:F.trim(),segment:q,address:G.trim()||null,client_name:Z.trim()||null}).select("*").single();if(U(!1),r){E({title:"Project workspace unavailable",description:"Apply supabase-room-workflows.sql in Supabase to enable projects.",status:"warning",duration:3500,isClosable:!0}),L(!1);return}O(t=>[e,...t]),I(e.id),M(""),V(""),B(""),_.onClose()}function K(e){if(A&&e){null==z||z();return}I(e)}return((0,S.useEffect)(()=>{if(!t||A)return;let e=!1;return async function(){let{data:r,error:i}=await R.from("room_projects").select("*").eq("user_id",t).order("created_at",{ascending:!1}).limit(50);if(!e){if(i){L(!1);return}L(!0),O(r||[])}}(),()=>{e=!0}},[R,t,A]),D&&t)?(0,i.jsxs)(n.xu,{w:"100%",maxW:"sm",border:"1px solid",borderColor:"whiteAlpha.300",bg:"blackAlpha.200",borderRadius:"lg",p:3,children:[(0,i.jsxs)(s.k,{align:"center",justify:"space-between",gap:3,mb:2,children:[(0,i.jsxs)(o.U,{spacing:2,children:[(0,i.jsx)(k.MDs,{}),(0,i.jsx)(c.x,{fontWeight:"semibold",children:"filter"===N?"Project filter":"Project"})]}),J?(0,i.jsxs)(o.U,{spacing:2,children:[(0,i.jsx)(d.C,{colorScheme:"blue",children:J.segment}),(0,i.jsx)(u.z,{size:"xs",variant:"outline",colorScheme:"blue",onClick:()=>K(""),children:"Exit project"})]}):(0,i.jsx)(d.C,{colorScheme:"purple",children:"Pro"})]}),(0,i.jsxs)(s.k,{gap:2,direction:{base:"column",sm:"row"},children:[(0,i.jsxs)(h.P,{size:"sm",value:r,onChange:e=>K(e.target.value),bg:"whiteAlpha.100",children:[(0,i.jsx)("option",{value:"",children:"filter"===N?"All projects":"No project"}),P.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))]}),(0,i.jsx)(u.z,{size:"sm",leftIcon:(0,i.jsx)(k.wEH,{}),onClick:function(){if(A){null==z||z();return}_.onOpen()},flexShrink:0,children:"New"})]}),(null==J?void 0:J.address)?(0,i.jsx)(c.x,{mt:2,fontSize:"xs",color:"gray.300",noOfLines:1,children:J.address}):null,(0,i.jsxs)(m.u_,{isOpen:_.isOpen,onClose:_.onClose,isCentered:!0,children:[(0,i.jsx)(p.Z,{}),(0,i.jsxs)(x.h,{children:[(0,i.jsx)(g.x,{children:"Create project"}),(0,i.jsx)(f.o,{}),(0,i.jsxs)(j.f,{children:[(0,i.jsxs)(b.NI,{mb:3,isRequired:!0,children:[(0,i.jsx)(w.l,{children:"Name"}),(0,i.jsx)(v.I,{placeholder:"123 Main Street or Client Smith kitchen",value:F,onChange:e=>M(e.target.value)})]}),(0,i.jsxs)(b.NI,{mb:3,children:[(0,i.jsx)(w.l,{children:"Type"}),(0,i.jsxs)(h.P,{value:q,onChange:e=>W(e.target.value),children:[(0,i.jsx)("option",{value:"property",children:"Property"}),(0,i.jsx)("option",{value:"listing",children:"Listing"}),(0,i.jsx)("option",{value:"client",children:"Client"}),(0,i.jsx)("option",{value:"personal",children:"Personal"})]})]}),(0,i.jsxs)(b.NI,{mb:3,children:[(0,i.jsx)(w.l,{children:"Address"}),(0,i.jsx)(v.I,{value:G,onChange:e=>V(e.target.value)})]}),(0,i.jsxs)(b.NI,{children:[(0,i.jsx)(w.l,{children:"Client"}),(0,i.jsx)(v.I,{value:Z,onChange:e=>B(e.target.value)})]})]}),(0,i.jsxs)(y.m,{children:[(0,i.jsx)(u.z,{variant:"ghost",mr:3,onClick:_.onClose,children:"Cancel"}),(0,i.jsx)(u.z,{colorScheme:"blue",onClick:H,isLoading:T,isDisabled:!F.trim(),children:"Create"})]})]})]})]}):null}},61308:function(e,t,r){"use strict";r.d(t,{Z:function(){return eP}});
1var i=r(85893),l=r(93194),a=r(12498),n=r(96177),s=r(204),o=r(88911),c=r(76060),d=r(96272),u=r(84053),h=r(75760),m=r(11163),p=r(67294),x=r(89583),g=r(59734),f=r(16220),j=r(57542);r(83454);let b=(0,j.createBrowserSupabaseClient)();var w=r(26590);let v=w.Z.getInstance();async function y(e,t){console.log("New favOnly value:",t);let{error:r}=await v.from("usersettings").update({favOnly:t}).eq("user_id",e);r?console.error("Error updating user settings:",r):console.log("User settings updated successfully")}var C=r(64113),S=r(73947),k=r(25675),I=r.n(k),N=r(5434),A=r(23100),z=r(92752),R=r(8954),E=r(31948),_=r(44504),P=r(55819),O=r(73793),D=r(81941),L=r(30333),T=r(39849),U=r(70654),F=r(28129),M=r(18691),q=r(41753),W=r(56877),G=r(91669),V=r(91819),Z=r(18159),B=r.n(Z),J=r(40011),H=r(58215);let K=w.Z.getInstance();async function Y(e,t,r){try{let t=e,{data:i,error:l}=await K.from("teams").select("team_owner_id, pool").eq("member_id",e).maybeSingle();if(l)throw Error("Error retrieving team information");(null==i?void 0:i.pool)&&i.team_owner_id&&(t=i.team_owner_id);let{data:a,error:n}=await K.from("usermetadata").select("credits").eq("user_id",t).single();if(n||!a)throw Error("Error retrieving user metadata");let s=Number(a.credits),o=s-r;if(o<0)throw Error("Insufficient credits");let{error:c}=await K.from("usermetadata").update({credits:o}).eq("user_id",t).eq("credits",s);if(c)throw Error("Failed to update user credits balance");return{success:!0,newBalance:o}}catch(e){return console.error("Credit processing error:",e),{success:!1,error:e.message}}}var X=r(90539),$=r(74566),Q=r(53492);let ee=e=>{let{isOpen:t,onClose:r,isOriginal:s,original:c,generated:f,id:j,watermarkUrl:b}=e,w=(0,m.useRouter)(),v=(0,l.p)(),y=(0,u.useSupabaseClient)(),{t:C}=(0,h.$G)("common"),S=(0,a.ff)("red.500","red.500"),k=(0,a.ff)("white","gray.100"),I=(0,a.ff)("red.600","red.800"),N=(0,a.ff)("primary.400","primary.500"),[Z,K]=(0,p.useState)(""),[ee,et]=(0,p.useState)(!1),[er,ei]=(0,p.useState)(""),el=(0,p.useRef)(null),ea=(0,p.useRef)(null),[en,es]=(0,p.useState)(!1),[eo,ec]=(0,p.useState)(""),[ed,eu]=(0,p.useState)(""),[eh,em]=(0,p.useState)(""),[ep,ex]=(0,p.useState)(""),[eg,ef]=(0,p.useState)(""),[ej,eb]=(0,p.useState)("m\xb2"),[ew,ev]=(0,p.useState)(""),[ey,eC]=(0,p.useState)(""),[eS,ek]=(0,p.useState)(""),{isUserSubscribed:eI,subscriptionPlanName:eN,loading:eA}=(0,H.Q)(),ez=e=>{let t=e.target.value;t.length<=500?K(t):v({title:"".concat(500," Characters is maximum!"),status:"error",duration:2e3,isClosable:!0})},eR=()=>{"Premium"===eN||"Pro"===eN?es(!en):(v({title:"Upgrade your subscription to Premium or Pro to use this feature.",status:"warning",duration:2500,isClosable:!0}),setTimeout(()=>{w.push({query:{...w.query,shop:"open",tab:"subscription",tier:"Premium"}},void 0,{shallow:!0})},2500))},eE=async(e,t)=>{try{let{data:r,error:i}=await y.from("room").select("ai").eq("id",j).single();if(i)throw i;let l=(null==r?void 0:r.ai)||[],a=l.findIndex(t=>t.command===e);-1!==a?l[a].answers.push(t):l.push({command:e,answers:[t]});let{error:n}=await y.from("room").update({ai:l}).eq("id",j);if(n)throw n}catch(e){console.error("Error saving AI answer:",e.message||e)}},e_=()=>{let e=[];return Z&&e.push(Z),eo&&e.push("Country: ".concat(eo)),ed&&e.push("City: ".concat(ed)),eh&&e.push("Neighborhood: ".concat(eh)),ep&&e.push("Zip/Postal Code: ".concat(ep)),eg&&e.push("Area: ".concat(eg," ").concat(ej)),ew&&e.push("Number of rooms: ".concat(ew)),ey&&e.push("Number of bathrooms: ".concat(ey)),eS&&e.push("Property type: ".concat(eS)),e.join("\n")},eP=async(e,t)=>{if("string"==typeof j&&j.includes("-")){v({title:"Still saving to database, please wait a second!",status:"warning",duration:2e3,isClosable:!0});return}if("1"==j){v({title:"Cannot run AI on the sample image.",status:"error",duration:2e3,isClosable:!0});return}let r=e_(),i=!1,l=null;try{let{data:{user:a}}=await y.auth.getUser();if(!a)throw Error("User not logged in");l=a;let n=await Y(a.id,"askAI",1);if(!n.success){v({status:"error",title:C("Insufficient credits"),description:"Please purchase more credits to use this feature.",duration:3e3,isClosable:!0});return}i=!0,(0,g.JG)(e=>"string"==typeof e&&e.includes("/api/credits")),et(!0);let s=10,o=0,c=v({status:"info",title:C("Generating response"),description:"Estimated time remaining: ".concat(s,"s."),duration:null,isClosable:!0});el.current=c;let d=setInterval(()=>{s--,el.current&&(s>=0?v.update(el.current,{description:"Estimated time remaining: ".concat(s,"s.")}):(o++,v.update(el.current,{status:"warning",title:C("Response taking longer than expected"),description:"Time over estimate: ".concat(o,"s.")})))},1e3),u=await (0,X.Sh)(e,t,r);if(clearInterval(d),el.current&&v.close(el.current),u&&u.message)ei(u.message.content),v({status:"success",title:C("Response generated"),duration:1e3,isClosable:!0}),eE(e,u.message.content),setTimeout(()=>{ea.current&&ea.current.scrollIntoView({behavior:"smooth",block:"start"})},150);else throw Error("Invalid response format")}catch(e){console.error("Error fetching response:",e.message||e),ei("Error fetching response."),v({status:"error",title:C("Error"),description:"Error fetching response.",duration:1e3,isClosable:!0}),i&&l&&(await Y(l.id,"askAI_refund",-1),(0,g.JG)(e=>"string"==typeof e&&e.includes("/api/credits")))}finally{et(!1)}},eO=async()=>
1{if("Pro"!==eN){v({title:"Upgrade your subscription to Pro to download PDF Reports.",status:"warning",duration:2500,isClosable:!0}),setTimeout(()=>{w.push({query:{...w.query,shop:"open",tab:"subscription",tier:"Pro"}},void 0,{shallow:!0})},2500);return}if(!er){v({title:"Please generate a response first!",status:"warning",duration:3e3,isClosable:!0});return}let e=new V.default,t=new Date,r="AnalysisReport_".concat(t.getFullYear(),"_").concat((t.getMonth()+1).toString().padStart(2,"0"),".pdf"),i=async(t,r,i,l,a,n)=>{let s=await eD(t);if(!s)return;let o=new window.Image;o.src=s,await new Promise(e=>{o.onload=e});let c=Math.min(a/o.width,n/o.height);e.addImage(s,r,i,l,o.width*c,o.height*c)};await i(b||"/roomdeco.png","PNG",15,10,45,18),await i(s?c:f,"JPEG",15,35,180,100),e.setFont("helvetica","bold"),e.setFontSize(22),e.setTextColor(44,57,125),e.text("Interior Analysis Report",15,145);let l=er.split("\n").filter(e=>""!==e.trim()),a=l.map(e=>{let t="p",r=e.trim();return r.startsWith("### ")?(t="h3",r=r.replace("### ","")):r.startsWith("## ")?(t="h2",r=r.replace("## ","")):r.startsWith("# ")?(t="h1",r=r.replace("# ","")):(r.startsWith("* ")||r.startsWith("- "))&&(t="li",r="• "+r.substring(2)),{content:r=r.replace(/\*\*/g,""),type:t}});B()(e,{startY:155,margin:{left:15,right:15},body:a.map(e=>[e.content]),theme:"plain",styles:{fontSize:11,cellPadding:2,overflow:"linebreak",textColor:[60,60,60]},didParseCell:e=>{let t=a[e.row.index];t.type.startsWith("h")&&(e.cell.styles.fontStyle="bold",e.cell.styles.fontSize="h1"===t.type?16:"h2"===t.type?14:12,e.cell.styles.textColor=[44,57,125]),"li"===t.type&&(e.cell.styles.cellPadding={left:10,top:1,bottom:1,right:2})}});let n=e.internal.getNumberOfPages(),o=e.internal.pageSize.width,d=e.internal.pageSize.height;for(let t=1;t<=n;t++)e.setPage(t),e.setFontSize(10),e.setTextColor(150),e.text("Page ".concat(t," of ").concat(n),o-20,d-8,{align:"right"}),e.text("Generated by RoomDeco AI",20,d-8);e.save(r)},eD=async e=>new Promise(t=>{let r=new window.Image;r.crossOrigin="anonymous";let i=e.startsWith("http")?e:"".concat(window.location.origin).concat(e);r.onload=()=>{let e=document.createElement("canvas");e.width=r.width,e.height=r.height;let i=e.getContext("2d");if(!i){t(null);return}i.drawImage(r,0,0);try{t(e.toDataURL("image/png"))}catch(e){console.error("Canvas toDataURL error:",e),t(null)}},r.onerror=()=>{console.error("Failed to load image:",i),t(null)},r.src=i}),eL=[{label:"Get Style Advice",command:"advice",icon:x.iih},{label:"Analyze Style",command:"analyze",icon:x.U41},{label:"Estimate Costs",command:"estimatecosts",icon:x.RcD},{label:"Raise Property Value",command:"maximizevalue",icon:x.Op},{label:"Rental Advice",command:"rentalpotential",icon:x.Eoi},{label:"Estimate Value",command:"estimatevalue",icon:x.SzE}];return(0,i.jsxs)(z.u_,{isOpen:t,onClose:r,size:"2xl",children:[(0,i.jsx)(R.Z,{backdropFilter:"blur(10px)"}),(0,i.jsxs)(E.h,{bg:"rgba(45, 55, 72, 0.8)",maxW:{base:"90%",md:"80%",lg:"70%",xl:"60%"},children:[(0,i.jsx)(_.x,{textAlign:"center",children:"Ask A.I."}),(0,i.jsx)(A.xu,{display:"flex",justifyContent:"center",children:(0,i.jsxs)(d.z,{width:"45%",variant:"outline",minW:175,colorScheme:"blue",onClick:()=>w.push("account/#pricing"),leftIcon:(0,i.jsx)(x.vAr,{}),children:[(0,i.jsx)("span",{children:"Credits:\xa0"}),(0,i.jsx)(Q.Z,{})]})}),(0,i.jsxs)(o.x,{textAlign:"center",mt:2,children:["You are on the ",(0,i.jsx)("strong",{children:eN||"Free"})," plan"]}),(0,i.jsx)(P.o,{borderRadius:"50%",bg:S,color:k,_hover:{bg:I}}),(0,i.jsx)(A.xu,{p:4,children:(0,i.jsxs)(O.f,{maxW:"100%",children:[(0,i.jsx)(D.E,{src:s?c:f,alt:"room design image",borderRadius:"md",maxHeight:400,mx:"auto"}),(0,i.jsx)(A.xu,{display:"flex",justifyContent:"center",mt:4,children:(0,i.jsx)(d.z,{onClick:eR,children:en?"Hide Advanced Options":"Show Advanced Options"})}),(0,i.jsx)(L.U,{in:en,animateOpacity:!0,children:(0,i.jsxs)(A.xu,{mt:4,children:[(0,i.jsxs)(T.M,{columns:{base:1,md:2},spacing:4,children:[(0,i.jsxs)(U.NI,{children:[(0,i.jsx)(n.l,{children:"Country"}),(0,i.jsx)(F.I,{placeholder:"Enter country",value:eo,onChange:e=>ec(e.target.value)})]}),(0,i.jsxs)(U.NI,{children:[(0,i.jsx)(n.l,{children:"City"}),(0,i.jsx)(F.I,{placeholder:"Enter city",value:ed,onChange:e=>eu(e.target.value)})]}),(0,i.jsxs)(U.NI,{children:[(0,i.jsx)(n.l,{children:"Neighborhood"}),(0,i.jsx)(F.I,{placeholder:"Enter neighborhood",value:eh,onChange:e=>em(e.target.value)})]}),(0,i.jsxs)(U.NI,{children:[(0,i.jsx)(n.l,{children:"Zip/Postal Code"}),(0,i.jsx)(F.I,{placeholder:"Enter zip/postal code",value:ep,onChange:e=>ex(e.target.value)})]}),(0,i.jsxs)(U.NI,{children:[(0,i.jsx)(n.l,{children:"Area"}),(0,i.jsx)(F.I,{placeholder:"Enter area",value:eg,onChange:e=>ef(e.target.value)})]}),(0,i.jsxs)(U.NI,{children:[(0,i.jsx)(n.l,{children:"Area Unit"}),(0,i.jsxs)(M.P,{value:ej,onChange:e=>eb(e.target.value),children:[(0,i.jsx)("option",{value:"m\xb2",children:"m\xb2"}),(0,i.jsx)("option",{value:"sq ft",children:"sq ft"})]})]}),(0,i.jsxs)(U.NI,{children:[(0,i.jsx)(n.l,{children:"Number of Rooms"}),(0,i.jsx)(M.P,{placeholder:"Select number of rooms",value:ew,onChange:e=>ev(e.target.value),children:Array.from({length:99},(e,t)=>t+1).map(e=>(0,i.jsx)("option",{value:e,children:e},e))})]}),(0,i.jsxs)(U.NI,{children:[(0,i.jsx)(n.l,{children:"Number of Bathrooms"}),(0,i.jsx)(M.P,{placeholder:"Select number of bathrooms",value:ey,onChange:e=>eC(e.target.value),children:Array.from({length:99},(e,t)=>t+1).map(e=>(0,i.jsx)("option",{value:e,children:e},e))})]}),(0,i.jsxs)(U.NI,{children:[(0,i.jsx)(n.l,{children:"Property Type"}
1),(0,i.jsxs)(M.P,{placeholder:"Select property type",value:eS,onChange:e=>ek(e.target.value),children:[(0,i.jsx)("option",{value:"Apartment",children:"Apartment"}),(0,i.jsx)("option",{value:"Townhouse",children:"Townhouse"}),(0,i.jsx)("option",{value:"Detached House",children:"Detached House"}),(0,i.jsx)("option",{value:"Semi-Detached House",children:"Semi-Detached House"}),(0,i.jsx)("option",{value:"Condo",children:"Condo"}),(0,i.jsx)("option",{value:"Loft",children:"Loft"}),(0,i.jsx)("option",{value:"Penthouse",children:"Penthouse"}),(0,i.jsx)("option",{value:"Studio",children:"Studio"}),(0,i.jsx)("option",{value:"Bungalow",children:"Bungalow"}),(0,i.jsx)("option",{value:"Villa",children:"Villa"})]})]})]}),(0,i.jsxs)(U.NI,{mt:4,position:"relative",children:[(0,i.jsx)(n.l,{children:"Additional Request"}),(0,i.jsx)(q.g,{placeholder:"Add your own additional request for the AI.",maxLength:500,resize:"none",pr:"50px",value:Z,onChange:ez}),(0,i.jsxs)(o.x,{position:"absolute",top:"8px",right:"10px",fontSize:"sm",color:"gray.500",children:[Z.length,"/",500]})]})]})}),(0,i.jsx)(A.xu,{marginTop:4,display:"flex",flexWrap:"wrap",justifyContent:"center",children:eL.map(e=>(0,i.jsx)(d.z,{"aria-label":e.label,leftIcon:(0,i.jsx)(W.J,{as:e.icon}),onClick:()=>eP(e.command,s?c:f),size:"lg",variant:"outline",colorScheme:"blue",m:1,width:{base:"100%",md:"30%"},children:e.label},e.command))}),(0,i.jsxs)(A.xu,{marginTop:4,border:"2px",borderRadius:"md",width:"100%",p:3,borderColor:N,ref:ea,children:[" ",ee?(0,i.jsx)(A.xu,{display:"flex",justifyContent:"center",children:(0,i.jsx)($.Z,{color:"white",style:"small"})}):(0,i.jsx)(G.g,{align:"stretch",spacing:4,children:(0,i.jsx)(J.U,{components:{h1:e=>{let{node:t,...r}=e;return(0,i.jsx)(o.x,{as:"h1",fontSize:"2xl",fontWeight:"bold",...r})},h2:e=>{let{node:t,...r}=e;return(0,i.jsx)(o.x,{as:"h2",fontSize:"xl",fontWeight:"bold",...r})},h3:e=>{let{node:t,...r}=e;return(0,i.jsx)(o.x,{as:"h3",fontSize:"lg",fontWeight:"bold",...r})},p:e=>{let{node:t,...r}=e;return(0,i.jsx)(o.x,{marginY:2,...r})},ul:e=>{let{node:t,...r}=e;return(0,i.jsx)(A.xu,{as:"ul",paddingLeft:4,...r})},ol:e=>{let{node:t,...r}=e;return(0,i.jsx)(A.xu,{as:"ol",paddingLeft:4,...r})},li:e=>{let{node:t,...r}=e;return(0,i.jsx)(A.xu,{as:"li",marginY:1,...r})}},children:er})})]}),(0,i.jsx)(A.xu,{mt:4,textAlign:"right",children:(0,i.jsx)(d.z,{onClick:eO,colorScheme:"blue",variant:"solid",children:"Download as PDF"})})]})})]})]})};var et=r(31708),er=r(89154),ei=r(47018),el=r(37518);function ea(e,t){let r=document.createElement("a");r.download=t,r.href=e,document.body.appendChild(r),r.click(),r.remove()}var en=r(77557);let es=e=>{let{original:t,restored:r,setSideBySide:l,watermarkUrl:a,isPortrait:n}=e,[s,o]=(0,p.useState)(),[c,d]=(0,p.useState)();return((0,p.useEffect)(()=>{let e=async()=>{let e=await i(t),n=.9*window.innerHeight,s=.9*window.innerWidth,c=n/e.height,u=s/e.width,h=Math.min(c,u),m=e.width*h,p=e.height*h;o({width:m,height:p});let x=Math.max(20,Math.min(.12*m,50)),g=await l(r,a||"/roomdeco.png",m,p,{width:x,height:x});d(g)},i=async e=>{let t=new Image;return t.crossOrigin="Anonymous",t.src=e,await t.decode(),{width:t.width,height:t.height}},l=async(e,t,r,i,l)=>{let a=document.createElement("canvas"),s=window.devicePixelRatio||1;a.width=r*s,a.height=i*s;let o=a.getContext("2d");o.scale(s,s);let c=await n(e),d=await n(t);o.drawImage(c,0,0,r,i);let u=l.width,h=l.height;return o.drawImage(d,r-u-10,i-h-10,u,h),a.toDataURL()},n=e=>new Promise((t,r)=>{let i=new Image;i.crossOrigin="Anonymous",i.onload=()=>t(i),i.onerror=e=>r(e),i.src=e}),s=()=>{e()};return window.addEventListener("resize",s),s(),()=>{window.removeEventListener("resize",s)}},[t,r,a]),s&&c)?(0,i.jsx)("div",{className:"slider-container flex flex-col items-center justify-center",children:(0,i.jsx)("div",{className:"flex justify-center",children:(0,i.jsx)(A.xu,{position:"fixed",top:0,left:0,width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",backdropFilter:"blur(10px)",zIndex:"9999",children:(0,i.jsxs)("div",{className:"my-12 relative",children:[(0,i.jsx)("button",{className:"absolute top-0 right-0 bg-red-500 rounded-full text-white p-1 flex items-center justify-center w-8 h-8 sm:w-10 sm:h-10 z-10 m-2",onClick:()=>l(!1),children:"X"}),(0,i.jsx)("div",{className:"relative flex justify-center",children:(0,i.jsxs)(en.ImgComparisonSlider,{children:[(0,i.jsx)(I(),{slot:"first",alt:"Original interior",src:t,className:"rounded-2xl object-contain md:max-w-full",width:s.width,height:s.height,unoptimized:!0}),(0,i.jsx)(I(),{slot:"second",alt:"Restored interior",src:c,className:"rounded-2xl object-contain md:max-w-full",width:s.width,height:s.height,unoptimized:!0})]})})]})})})}):null};r(62178);var eo=r(45732),ec=r(30928);function ed(e){let{isOpen:t,onClose:r,roomId:a,room:s,prompt:c}=e,h=(0,u.useSupabaseClient)(),m=(0,u.useUser)(),x=(0,l.p)(),[g,f]=(0,p.useState)("".concat(s||"Room"," concept approval")),[j,b]=(0,p.useState)(!1),[w,v]=(0,p.useState)(""),y=String(a||""),C=(0,p.useMemo)(()=>(null==m?void 0:m.id)&&y&&!y.includes("-"),[y,null==m?void 0:m.id]);async function S(){var e;if(!(null==m?void 0:m.id)||!C){x({title:"Wait until this generation is saved first.",status:"warning",duration:2500});return}b(!0);let t=crypto.randomUUID().replace(/-/g,""),{data:r,error:i}=await h.from("room_project_shares").insert({user_id:m.id,token:t,title:g.trim()||"".concat(s||"Room"," concept approval")}).select("id, token").single();
1if(i||!r){b(!1),x({title:"Approval links unavailable",description:"Apply supabase-room-workflows.sql in Supabase to enable client approval links.",status:"warning",duration:3500});return}let{error:l}=await h.from("room_project_share_items").insert({share_id:r.id,room_id:Number(y),sort_order:0});if(b(!1),l){x({title:"Could not attach this room to the share.",status:"error",duration:3e3});return}let a="".concat(window.location.origin,"/share/").concat(r.token);v(a),await (null===(e=navigator.clipboard)||void 0===e?void 0:e.writeText(a)),x({title:"Approval link copied",status:"success",duration:2500})}return(0,i.jsxs)(z.u_,{isOpen:t,onClose:r,isCentered:!0,children:[(0,i.jsx)(R.Z,{}),(0,i.jsxs)(E.h,{children:[(0,i.jsx)(_.x,{children:"Client approval link"}),(0,i.jsx)(P.o,{}),(0,i.jsxs)(O.f,{children:[(0,i.jsx)(o.x,{mb:3,color:"gray.500",children:"Package this result into a client-facing page with approve/reject feedback."}),(0,i.jsxs)(U.NI,{children:[(0,i.jsx)(n.l,{children:"Share title"}),(0,i.jsx)(F.I,{value:g,onChange:e=>f(e.target.value)})]}),(0,i.jsx)(o.x,{mt:3,fontSize:"sm",color:"gray.500",children:c}),w?(0,i.jsx)(F.I,{mt:4,value:w,isReadOnly:!0,onFocus:e=>e.currentTarget.select()}):null]}),(0,i.jsxs)(ei.m,{children:[(0,i.jsx)(d.z,{variant:"ghost",mr:3,onClick:r,children:"Close"}),(0,i.jsx)(d.z,{colorScheme:"blue",onClick:S,isLoading:j,isDisabled:!C,children:"Create link"})]})]})]})}var eu=r(41052),eh=r(76684),em=r(78133);let ep="VIRTUALLY STAGED - furniture/decor visualization only. Verify MLS/local rules before publication.";function ex(e,t,r){return["".concat(e||"room",": ").concat(t||"virtual staging concept","."),ep,r?"Prepared for ".concat(r," with RoomDeco AI."):"Prepared with RoomDeco AI."].join(" ")}async function eg(e){let{original:t,generated:r,room:i,prompt:l,preset:a="mls",brokerageName:n}=e,[s,o]=await Promise.all([ef(t),ef(r)]),c="RoomDeco_".concat(a,"_").concat(i||"room","_").concat(l||"staged").toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"").slice(0,90);if("mls"===a){eS(function(e){let t=ej(e),r=t.getContext("2d");return function(e,t,r,i,l){e.font="700 ".concat(l,"px Arial, sans-serif");let a=Math.round(.65*l),n=Math.round(.45*l),s=e.measureText(t),o=s.width+2*a;e.fillStyle="rgba(0, 0, 0, 0.72)",e.fillRect(r,i,o,l+2*n),e.fillStyle="#ffffff",e.fillText(t,r+a,i+n+.78*l)}(r,"VIRTUALLY STAGED",24,24,Math.max(22,Math.round(.026*t.width))),function(e,t,r){let i=Math.max(18,Math.round(.018*t)),l=Math.max(52,Math.round(2.7*i));e.fillStyle="rgba(0, 0, 0, 0.72)",e.fillRect(0,r-l,t,l),e.fillStyle="#ffffff",e.font="600 ".concat(i,"px Arial, sans-serif"),e.fillText(ep,Math.round(.9*i),r-Math.round(.38*l))}(r,t.width,t.height),t}(o),"".concat(c,"_virtually_staged_disclosure.jpg")),eS(eb(s,o),"".concat(c,"_original_and_staged_comparison.jpg"));return}eS(eb(s,o),"".concat(c,"_comparison.jpg")),await ey({originalImage:s,stagedImage:o,room:i,prompt:l,filename:"".concat(c,"_report.pdf"),title:"buyer"===a?"Buyer Follow-up Visual":"brokerage"===a?"Branded Listing Visual":"Seller Prep Visual",caption:ex(i,l,n)})}function ef(e){return new Promise((t,r)=>{let i=new window.Image;i.crossOrigin="anonymous",i.onload=()=>t(i),i.onerror=()=>r(Error("Could not load image for MLS export")),i.src=e})}function ej(e){let t=document.createElement("canvas");t.width=e.naturalWidth||e.width,t.height=e.naturalHeight||e.height;let r=t.getContext("2d");return r.drawImage(e,0,0,t.width,t.height),t}function eb(e,t){var r,i,l;let a=e.naturalWidth||e.width,n=e.naturalHeight||e.height,s=t.naturalWidth||t.width,o=t.naturalHeight||t.height,c=Math.max(a,s),d=Math.max(n,o),u=Math.max(70,Math.round(.08*d)),h=Math.max(80,Math.round(.08*d)),m=document.createElement("canvas");m.width=2*c,m.height=d+u+h;let p=m.getContext("2d");return p.fillStyle="#111827",p.fillRect(0,0,m.width,m.height),ev(p,"ORIGINAL",0,0,c,u),ev(p,"VIRTUALLY STAGED",c,0,c,u),ew(p,e,0,u,c,d),ew(p,t,c,u,c,d),r=p,i=m.width,l=m.height,r.fillStyle="#111827",r.fillRect(0,l-h,i,h),r.fillStyle="#ffffff",r.font="600 ".concat(Math.max(22,Math.round(.26*h)),"px Arial, sans-serif"),r.textAlign="center",r.textBaseline="middle",r.fillText(ep,i/2,l-h/2),r.textAlign="start",r.textBaseline="alphabetic",m}
1function ew(e,t,r,i,l,a){let n=t.naturalWidth||t.width,s=t.naturalHeight||t.height,o=Math.min(l/n,a/s),c=n*o,d=s*o;e.fillStyle="#000000",e.fillRect(r,i,l,a),e.drawImage(t,r+(l-c)/2,i+(a-d)/2,c,d)}function ev(e,t,r,i,l,a){e.fillStyle="#111827",e.fillRect(r,i,l,a),e.fillStyle="#ffffff",e.font="700 ".concat(Math.max(28,Math.round(.42*a)),"px Arial, sans-serif"),e.textAlign="center",e.textBaseline="middle",e.fillText(t,r+l/2,i+a/2),e.textAlign="start",e.textBaseline="alphabetic"}async function ey(e){let{originalImage:t,stagedImage:i,room:l,prompt:a,filename:n,title:s,caption:o}=e,{default:c}=await Promise.resolve().then(r.bind(r,91819)),d=new c({orientation:"landscape"}),u=d.internal.pageSize.getWidth(),h=d.internal.pageSize.getHeight(),m=(u-42)/2;d.setFont("helvetica","bold"),d.setFontSize(20),d.text(s,14,18),d.setFont("helvetica","normal"),d.setFontSize(10),d.text("Room: ".concat(l||"interior"," | Style: ").concat(a||"virtual staging"),14,28),d.addImage(eC(t),"JPEG",14,42,m,100),d.addImage(eC(i),"JPEG",28+m,42,m,100),d.setFont("helvetica","bold"),d.text("ORIGINAL",14,37),d.text("VIRTUALLY STAGED",28+m,37),d.setFont("helvetica","normal"),d.setFontSize(10);let p=d.splitTextToSize(o,u-28);d.text(p,14,158),d.setFontSize(9),d.setTextColor(120),d.text("Generated by RoomDeco AI",14,h-10),d.text("Verify MLS/local rules before publication.",u-14,h-10,{align:"right"}),d.save(n)}function eC(e){let t=ej(e);return t.toDataURL("image/jpeg",.9)}function eS(e,t){e.toBlob(e=>{if(!e)return;let r=window.URL.createObjectURL(e),i=document.createElement("a");i.download=t,i.href=r,document.body.appendChild(i),i.click(),i.remove(),window.URL.revokeObjectURL(r)},"image/jpeg",.92)}let ek={mls:{title:"MLS disclosure pack",description:"Downloads disclosure-labeled staged image plus original/staged comparison JPG."},seller:{title:"Seller prep PDF",description:"Downloads a comparison sheet for seller consults and listing-prep conversations."},buyer:{title:"Buyer follow-up PDF",description:"Downloads a lightweight follow-up visual after a showing or buyer objection."},brokerage:{title:"Brokerage branded PDF",description:"Downloads a branded visual handoff for teams and offices."}};function eI(e){let{isOpen:t,onClose:r,original:a,generated:s,room:c,prompt:u}=e,h=(0,l.p)(),[m,x]=(0,p.useState)("mls"),[g,f]=(0,p.useState)(""),[j,b]=(0,p.useState)(!1),w=(0,p.useMemo)(()=>ex(c,u,g),[g,u,c]);async function v(){b(!0);try{await eg({original:a,generated:s,room:c,prompt:u,preset:m,brokerageName:g}),h({title:"Export prepared",status:"success",duration:2500})}catch(e){h({title:"Export failed",description:e instanceof Error?e.message:"Could not prepare export.",status:"error",duration:3500})}finally{b(!1)}}async function y(){var e;await (null===(e=navigator.clipboard)||void 0===e?void 0:e.writeText(w)),h({title:"Caption copied",status:"success",duration:1800})}return(0,i.jsxs)(z.u_,{isOpen:t,onClose:r,size:"xl",isCentered:!0,children:[(0,i.jsx)(R.Z,{}),(0,i.jsxs)(E.h,{children:[(0,i.jsx)(_.x,{children:"Export for listing"}),(0,i.jsx)(P.o,{}),(0,i.jsxs)(O.f,{children:[(0,i.jsx)(eu.E,{value:m,onChange:e=>x(e),children:(0,i.jsx)(eh.K,{spacing:3,children:Object.keys(ek).map(e=>(0,i.jsx)(A.xu,{border:"1px solid",borderColor:"gray.200",borderRadius:"md",p:3,children:(0,i.jsxs)(em.Y,{value:e,children:[(0,i.jsx)(o.x,{fontWeight:"semibold",children:ek[e].title}),(0,i.jsx)(o.x,{fontSize:"sm",color:"gray.500",children:ek[e].description})]})},e))})}),(0,i.jsxs)(U.NI,{mt:4,children:[(0,i.jsx)(n.l,{children:"Brokerage / brand name"}),(0,i.jsx)(F.I,{value:g,onChange:e=>f(e.target.value)})]}),(0,i.jsxs)(U.NI,{mt:4,children:[(0,i.jsx)(n.l,{children:"Caption / disclosure text"}),(0,i.jsx)(q.g,{value:w,isReadOnly:!0,minH:"110px"})]})]}),(0,i.jsxs)(ei.m,{gap:3,flexWrap:"wrap",children:[(0,i.jsx)(d.z,{variant:"outline",onClick:y,children:"Copy caption"}),(0,i.jsx)(d.z,{colorScheme:"blue",onClick:v,isLoading:j,children:"Download export"})]})]})]})}function eN(e){let{id:t,original:r,generated:l,room:a,prompt:n,showLabel:s}=e,[o,c]=(0,p.useState)(!1),[d,u]=(0,p.useState)(!1),[h,m]=(0,p.useState)(!1),{currentlySubscribedPlan:g}=(0,f.qN)(),j=(null==g?void 0:g.name)==="Premium"||(null==g?void 0:g.name)==="Pro";return(0,i.jsxs)(i.Fragment,{children:[r?(0,i.jsx)(A.xu,{className:"flex justify-end pb-2 mr-5 absolute top-[156px] w-full mr-3",children:(0,i.jsxs)(et.r,{templateColumns:"auto",alignItems:"center",justifyItems:"center",gap:"2",children:[(0,i.jsx)(S.K,{label:"Export for listing","aria-label":"Export for listing",placement:"top",children:(0,i.jsx)(er.h,{color:"white",bg:"blackAlpha.600",_hover:{bg:"blackAlpha.800"},borderRadius:"xl","aria-label":"Export for listing",icon:(0,i.jsx)(x.H5T,{size:24}),onClick:()=>c(!0),size:"lg",className:"cursor-pointer shadow-md"})}),s?(0,i.jsx)(eA,{children:"Export"}):null]})}):null,(0,i.jsx)(A.xu,{className:"flex justify-end pb-2 mr-5 absolute top-[212px] w-full mr-3",children:(0,i.jsxs)(et.r,{templateColumns:"auto",alignItems:"center",justifyItems:"center",gap:"2",children:[(0,i.jsx)(S.K,{label:"Client approval link","aria-label":"Client approval link",placement:"top",children:(0,i.jsx)(er.h,{color:"white",bg:"blackAlpha.600",_hover:{bg:"blackAlpha.800"},borderRadius:"xl","aria-label":"Client approval link",icon:(0,i.jsx)(x.PPi,{size:22}),onClick:function(){if(!j){m(!0);return}u(!0)},size:"lg",className:"cursor-pointer shadow-md"})}),s?(0,i.jsx)(eA,{children:"Client Link"}):null]})}),r?(0,i.jsx)(eI,{isOpen:o,onClose:()=>c(!1),original:r,generated:l,room:a,prompt:n}):null,(0,i.jsx)(ed,{isOpen:d,onClose:()=>u(!1),roomId:t,room:a,prompt:n}),(0,i.jsx)(ec.Z,{content:"subscription",neededTier:C.n.Premium,open:h,onClose:()=>m(!1)})]})}function eA(e){let{children:t}=e;return(0,i.jsx)(o.x,{display:{base:"none",md:"block"},fontSize:10,as:"b",mt:-2,color:"white",textShadow:"0px 1px 4px rgba(0,0,0,0.9)",children:t})}let ez=e=>{let{generated:t,original:r,prompt:n,caller:s,watermarkUrl:c,id:f,room:j,isOriginal:b,isFav:w,onDelete:v}=e,[y,C]=(0,p.useState)(w),k=(0,p.useRef)(null),I=(0,p.useRef)(w),P="RoomDeco_AI_".concat(n.toString().toLowerCase(),".jpg");j&&j.toLowerCase();let[D,L]=(0,p.useState)(""),[T,U]=(0,p.useState)(""),[F,M]=(0,p.useState)(!1),[q,W]=(0,p.useState)(!1);(0,a.ff)("red.500","red.500"),(0,a.ff)("white","gray.100"),(0,a.ff)("red.600","red.800"),(0,a.ff)("primary.400","primary.500");let G=(0,u.useSupabaseClient)(),V=(0,l.p)();(0,p.useRef)(null);let{t:Z}=(0,h.$G)("common"),[B,J]=(0,p.useState)(!1),[H,K]=(0,p.useState)(!1),[Y,X]=(0,p.useState)(""),[$,Q]=(0,p.useState)(!1),[en,ec]=(0,p.useState)(!1),[ed,eu]=(0,p.useState)(!1),eh=()=>{(0,g.JG)(e=>"string"==typeof e&&e.startsWith("/api/gallery"))},em=(0,m.useRouter)(),ep=(e,t)=>{if(!e)return;let r="/generate"===em.pathname;t?em.push({pathname:"/generate",query:{from:"edit",imageUrl:e}},"/generate",{shallow:r}):em.push({pathname:"/generate",query:{from:"reuse",imageUrl:e}},"/generate",{shallow:r})};(0,p.useEffect)(()=>
1{if(!r)return;let e=new window.Image;e.crossOrigin="anonymous",e.src=r,e.onload=()=>{e.height>e.width&&Q(!0)}},[r]);let ex={generated:t,updatedPhotoName:P,watermarkUrl:c};async function eg(e){var t;let r=Object.entries(null!==(t=e.querystring)&&void 0!==t?t:{}).filter(e=>{let[,t]=e;return(null!=t?t:null)!==null}).flatMap(e=>{let[t,r]=e;return Array.isArray(r)?r.map(e=>[t,e]):[[t,r]]}).map(e=>e.join("=")).join("&"),i=await fetch("".concat("https://api.upload.io").concat("/v2/accounts/kW15bEo/files").concat(r.length>0?"?":"").concat(r),{method:"DELETE",headers:{Authorization:"Bearer ".concat("secret_kW15bEo6gPVse4GJNAFYp8UiRwiU")}});if(2!==Math.floor(i.status/100)){let e=await i.json();throw Error("Upload API Error: ".concat(JSON.stringify(e)))}}async function ef(){if("string"==typeof f&&f.includes("-")){V({title:"Still saving to database, please wait a second!",status:"warning",duration:2e3});return}if("1"==f){V({title:Z("cant delete sample"),status:"error",duration:2e3,isClosable:!0});return}if(V({title:Z("Image deleted"),status:"error",duration:2e3,isClosable:!0}),t&&!r)await G.from("room").delete().eq("id",f);else if(r.includes("thumbnail")){let e=r.split("thumbnail")[1];try{await eg({accountId:"kW15bEo",apiKey:"secret_kW15bEo6gPVse4GJNAFYp8UiRwiU",querystring:{filePath:e}})}catch(e){console.error("Error deleting file:",e)}await G.from("room").delete().eq("id",f)}else await G.from("room").delete().eq("id",f);eh(),v&&v()}return x.Am9,x.fWC,x.oIN,x.xpo,(0,i.jsxs)("div",{className:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter(Boolean).join(" ")}("h-full w-full absolute top-0 flex flex-col justify-center items-center rounded-2xl"),children:[!1,(0,i.jsx)("div",{className:"absolute bottom-0 left-0 md:bottom-0",children:(0,i.jsxs)(et.r,{templateColumns:"auto",alignItems:"center",justifyItems:"center",gap:"0",children:[(0,i.jsx)(S.K,{label:"Reuse image","aria-label":"Reuse",placement:"top",children:(0,i.jsx)(er.h,{color:"white",bg:"blackAlpha.600",_hover:{bg:"blackAlpha.800"},borderRadius:"xl","aria-label":"reuse",icon:(0,i.jsx)(x.ceS,{size:22}),onClick:()=>ep(b?r:t),size:"lg",className:"ml-2 mb-3 cursor-pointer z-[99] shadow-md"})}),q&&(0,i.jsx)(o.x,{display:{base:"none",md:"block"},fontSize:10,as:"b",mt:-1,className:"ml-5",color:"white",textShadow:"0px 1px 4px rgba(0,0,0,0.9)",children:"Reuse"})]})}),(0,i.jsxs)("div",{className:"flex justify-center space-x-4 items-center absolute bottom-3 z-10",children:[(0,i.jsx)(A.xu,{textAlign:"center",children:(0,i.jsxs)(et.r,{templateColumns:"auto",alignItems:"center",justifyItems:"center",gap:"2",children:[(0,i.jsx)(S.K,{label:"View","aria-label":"View",placement:"top",children:(0,i.jsx)(er.h,{color:"white",bg:"blackAlpha.600",_hover:{bg:"blackAlpha.800"},borderRadius:"xl","aria-label":"view",icon:(0,i.jsx)(x.U41,{size:23}),onClick:()=>L(b?r:t),size:"lg",className:"cursor-pointer shadow-md"})}),q&&(0,i.jsx)(o.x,{display:{base:"none",md:"block"},fontSize:10,as:"b",mt:-2,color:"white",textShadow:"0px 1px 4px rgba(0,0,0,0.9)",children:"View"})]})}),r&&(0,i.jsx)(A.xu,{textAlign:"center",children:(0,i.jsxs)(et.r,{templateColumns:"auto",alignItems:"center",justifyItems:"center",gap:"2",children:[(0,i.jsx)(S.K,{label:"Compare","aria-label":"Compare",placement:"top",children:(0,i.jsx)(er.h,{color:"white",bg:"blackAlpha.600",_hover:{bg:"blackAlpha.800"},borderRadius:"xl","aria-label":"compare",icon:(0,i.jsx)(N.QA0,{size:24}),onClick:()=>M(!0),size:"lg",className:"cursor-pointer shadow-md"})}),q&&(0,i.jsx)(o.x,{display:{base:"none",md:"block"},fontSize:10,as:"b",mt:-2,color:"white",textShadow:"0px 1px 4px rgba(0,0,0,0.9)",children:"Compare"})]})}),(0,i.jsxs)(A.xu,{textAlign:"center",children:[(0,i.jsx)(et.r,{templateColumns:"auto",alignItems:"center",justifyItems:"center",gap:"2",children:(0,i.jsx)(S.K,{label:"Ask AI","aria-label":"Ask AI",placement:"top",children:(0,i.jsx)(er.h,{color:"white",bg:"blackAlpha.600",_hover:{bg:"blackAlpha.800"},borderRadius:"xl","aria-label":"Ask AI",icon:(0,i.jsx)(x.iNY,{size:24}),onClick:()=>ec(!0),size:"lg",className:"cursor-pointer shadow-md mb-0"})})}),(0,i.jsxs)("div",{suppressHydrationWarning:!0,children:[(0,i.jsx)(ee,{isOpen:en,onClose:()=>ec(!1),isOriginal:b,original:r,generated:t,id:f,watermarkUrl:c}),q&&(0,i.jsx)(o.x,{display:{base:"none",md:"block"},fontSize:10,as:"b",mt:0,color:"white",textShadow:"0px 1px 4px rgba(0,0,0,0.9)",children:"Ask AI"})]})]})]}),!b&&(0,i.jsx)("div",{className:"flex justify-end pb-4 mr-6 mb-4 absolute top-[36px] w-full",children:(0,i.jsxs)(et.r,{templateColumns:"auto",alignItems:"center",justifyItems:"center",gap:"2",children:[(0,i.jsx)(S.K,{label:"Favorite","aria-label":"Favorite",placement:"top",children:(0,i.jsx)(er.h,{color:y?"lightcoral":"white",bg:"blackAlpha.600",_hover:{bg:"blackAlpha.800"},borderRadius:"xl","aria-label":"favorite",icon:(0,i.jsx)(x.$0H,{size:22}),onClick:function(){if("string"==typeof f&&f.includes("-")){V({title:"Still saving to database, please wait a second!",status:"warning",duration:2e3});return}let e=!I.current;I.current=e,C(e),V({title:e?Z("Added to favorites"):Z("Removed from favorites"),status:e?"success":"error",duration:1e3,isClosable:!0}),k.current&&clearTimeout(k.current),k.current=setTimeout(async()=>{let{error:t}=await G.from("room").update({isFav:e}).eq("id",f);if(t){I.current=!e,C(!e);return}eh()},500)},size:"lg",className:"cursor-pointer shadow-md"})}),q&&(0,i.jsx)(o.x,{display:{base:"none",md:"block"},fontSize:10,as:"b",mt:-2,color:"white",textShadow:"0px 1px 4px rgba(0,0,0,0.9)",children:"Favorite"})]})}),!b&&(0,i.jsx)("div",{className:"flex justify-end pb-2 mr-5 absolute top-[96px] w-full mr-3",children:(0,i.jsxs)(et.r,{templateColumns:"auto",alignItems:"center",justifyItems:"center",gap:"2",children:[(0,i.jsx)(S.K,{label:"Download","aria-label":"Download",placement:"top",children:(0,i.jsx)(er.h,{color:"white",bg:"blackAlpha.600",_hover:{bg:"blackAlpha.800"},borderRadius:"xl","aria-label":"download",icon:(0,i.jsx)(x.veA,{size:30}),onClick:()=>(function(e){let t=new window.Image;t.crossOrigin="anonymous",t.src=e.generated;let r=""!==e.watermarkUrl;t.onload=()=>{let i=document.createElement("canvas");i.width=1.5*t.width,i.height=1.5*t.height;let l=i.getContext("2d");if(l.drawImage(t,0,0,i.width,i.height),r){let t=new window.Image;t.crossOrigin="anonymous",t.src=e.watermarkUrl||"/roomdeco.png",t.onload=()=>{l.drawImage(t,i.width-90-20,i.height-90-20,90,90),i.toBlob(t=>{t&&ea(window.URL.createObjectURL(t),e.updatedPhotoName)},"image/jpeg")}}else i.toBlob(t=>{t&&ea(window.URL.createObjectURL(t),e.updatedPhotoName)},"image/jpeg")}})(ex),size:"lg",className:"cursor-pointer shadow-md"})}),q&&(0,i.jsx)(o.x,{display:{base:"none",md:"block"},fontSize:10,as:"b",mt:-2,color:"white",textShadow:"0px 1px 4px rgba(0,0,0,0.9)",children:"Download"})]})}),!b&&(0,i.jsx)(eN,{id:f,original:r,generated:t,room:j,prompt:n,showLabel:q}),(0,i.jsx)("div",{className:"flex justify-start pb-3 ml-5 absolute top-[36px] w-full",children:(0,i.jsxs)(et.r,{templateColumns:"auto",alignItems:"center",justifyItems:"center",gap:"2",children:[(0,i.jsx)(S.K,{label:"Delete","aria-label":"Delete",placement:"top",children:(0,i.jsx)(er.h,{color:"white",bg:"blackAlpha.600",_hover:{bg:"blackAlpha.800"},borderRadius:"xl","aria-label":"delete",icon:(0,i.jsx)(x.Xm5,{size:20}),onClick:()=>eu(!0),size:"lg",className:q?"cursor-pointer mb-0 shadow-md":"mb-0 shadow-md"})}),q&&(0,i.jsx)(o.x,{display:{base:"none",md:"block"},fontSize:10,as:"b",mt:-2,color:"white",textShadow:"0px 1px 4px rgba(0,0,0,0.9)",children:"Delete"})]})}),(0,i.jsx)(eo.Z,{watermarkUrl:c,image:D,open:D.length>0,onClose:()=>L("")}),!1,(0,i.jsx)(el.V,{open:F,onClose:()=>M(!1),children:(0,i.jsx)(el.V.Overlay,{className:"fixed inset-0 bg-black h-screen overflow-scroll z-[100] bg-opacity-80 px-20 pt-1 mb-2
10",children:(0,i.jsx)("div",{className:"visible",children:(0,i.jsx)("div",{className:"w-full flex items-center justify-center",children:F&&(0,i.jsx)(es,{original:r,restored:t,watermarkUrl:c,setSideBySide:M,isPortrait:$})})})})}),(0,i.jsxs)(z.u_,{isOpen:ed,onClose:()=>eu(!1),isCentered:!0,children:[(0,i.jsx)(R.Z,{}),(0,i.jsxs)(E.h,{bg:(0,a.ff)("white","gray.800"),children:[(0,i.jsx)(_.x,{children:"Confirm Delete"}),(0,i.jsx)(O.f,{children:"Are you sure you want to delete this image? This action cannot be undone."}),(0,i.jsxs)(ei.m,{children:[(0,i.jsx)(d.z,{variant:"ghost",onClick:()=>eu(!1),children:"Cancel"}),(0,i.jsx)(d.z,{colorScheme:"red",ml:3,onClick:()=>{eu(!1),ef()},children:"Delete"})]})]})]})]})};function eR(e){let{original:t,generated:r,prompt:l,room:a,watermark:n,verticalLayout:s,id:o,hideOriginal:c,isFav:d,onDeleteSuccess:u}=e;(0,m.useRouter)();let[h,x]=(0,p.useState)(!0),[g,f]=(0,p.useState)(!1);function j(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter(Boolean).join(" ")}return g?null:(0,i.jsxs)("div",{className:j("".concat(s?"flex-col":"md:flex-row"),"flex flex-col px-4  w-full  md:w-full md:max-w-full justify-center md:justify-around  gap-4 md:gap-10 mb-10"),children:[!c&&t&&(0,i.jsxs)("div",{className:"relative h-full ",children:[(0,i.jsx)("h5",{className:"mb-1 font-medium text-lg absolute z-10 text-white md:text-md text-xs  bg-black bg-opacity-20 py-1 px-2 left-0 rounded-br-2xl rounded-tl-2xl",children:a?"Original ".concat(a.toLowerCase()):"Original interior"}),(0,i.jsx)(I(),{alt:"Original interior",src:t,className:"rounded-2xl object-fill md:max-w-full",width:660,height:660,unoptimized:!0}),(0,i.jsx)(ez,{id:o,watermarkUrl:n,original:t,generated:r,prompt:l,room:a,isOriginal:!0,isFav:d,onDelete:()=>{f(!0),u&&u()}})]}),(0,i.jsxs)("div",{className:j("".concat(s?"":"md:mx-auto")," mr-auto relative h-full"),children:[(0,i.jsx)("h5",{className:"mb-1 font-medium text-lg absolute z-10 text-white md:text-md text-xs  bg-black bg-opacity-20 px-2 4 py-1 right-0 rounded-bl-2xl rounded-tr-2xl",children:l}),(0,i.jsxs)("div",{className:"relative contents  bg-gray-700 group",children:[(0,i.jsx)(I(),{alt:"Generated Interior",width:t?660:1024,height:660,src:r,className:"rounded-2xl object-fill  md:max-w-full",unoptimized:!0}),(0,i.jsx)(ez,{id:o,watermarkUrl:n,original:t,generated:r,prompt:l,room:a,isOriginal:!1,isFav:d,onDelete:()=>{f(!0),u&&u()}})]})]})]})}function eE(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter(Boolean).join(" ")}let e_=e=>{let{rooms:t,userSettings:r,setOriginalPhoto:j,caller:w,refreshPageData:v}=e,[k,I]=(0,p.useState)(null),[N,A]=(0,p.useState)(!1),[z,R]=(0,p.useState)(!1),{t:E}=(0,h.$G)("common"),[_,P]=(0,p.useState)(!1);(0,m.useRouter)();let O=(0,l.p)(),[D,L]=(0,p.useState)(!1),T=()=>{v&&v()},U=(0,u.useUser)(),F=async()=>{if(!(null==U?void 0:U.email))return null;let{data:e}=await b.from("teams").select("team_owner_id, pool").eq("email",U.email).maybeSingle();return e},{data:M}=(0,g.ZP)((null==U?void 0:U.email)?"team-".concat(U.email):null,F,{revalidateOnFocus:!1,dedupingInterval:6e4}),q=M&&M.team_owner_id!==(null==U?void 0:U.id),{currentlySubscribedPlan:W,loading:G}=(0,f.qN)(),V=()=>!0,Z=(0,a.ff)("gray.600","gray.200"),B=W&&C.n.Pro.includes((null==W?void 0:W.name)||"")||q,J=async()=>{let{data:e}=await b.storage.from("watermarks").list((null==U?void 0:U.id)+"/",{limit:1,offset:0});return e&&e.length>0?"".concat("https://pvobgbizvtxksbgwptpw.supabase.co","/storage/v1/object/public/watermarks/").concat(null==U?void 0:U.id,"/").concat(e[0].name):""},{data:H}=(0,g.ZP)(B&&(null==U?void 0:U.id)?"watermarks-".concat(U.id):null,J,{revalidateOnFocus:!1,dedupingInterval:6e4});(0,p.useEffect)(()=>{H?I(H):""===H?(null==r?void 0:r.custom_watermark)?I(""):I(null):B||I(null)},[H,B,null==r?void 0:r.custom_watermark]),(0,p.useEffect)(()=>{r&&P(r.favOnly)},[r]);let K=()=>{A(!N)},Y=async()=>{if(!D)try{L(!0);let e=!_;P(e),await y(null==r?void 0:r.user_id,e),O({title:E("favorites_switch"),status:"success",duration:2e3,isClosable:!0}),v&&v()}catch(e){console.error(e),P(_)}finally{L(!1)}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"w-full mb-4 flex justify-end items-baseline px-2",children:[(0,i.jsxs)("div",{className:"flex",children:[(0,i.jsx)(S.K,{label:"Show only favorite images","aria-label":"history",placement:"top",children:(0,i.jsx)(n.l,{htmlFor:"isChecked",children:(0,i.jsxs)(s.k,{align:"center",children:[(0,i.jsxs)(o.x,{color:Z,children:[E("favorites_only"),":"]}),(0,i.jsx)(c.r,{marginLeft:2,onChange:Y,size:"md",id:"isChecked",isChecked:_})]})})}),(0,i.jsx)(S.K,{label:"Show only generated images","aria-label":"history",placement:"top",children:(0,i.jsx)(n.l,{htmlFor:"isChecked",children:(0,i.jsxs)(s.k,{align:"center",children:[(0,i.jsxs)(o.x,{color:Z,children:[E("generated_only"),":"]}),(0,i.jsx)(c.r,{marginLeft:2,onChange:()=>R(!z),size:"md",id:"isChecked",isChecked:z,isDisabled:D})]})})})]}),(0,i.jsx)("div",{className:"hidden md:flex",children:(0,i.jsx)(S.K,{label:N?"Two Columns":"One Column","aria-label":"history",placement:"top",children:(0,i.jsx)(d.z,{className:eE("".concat("mr-5"),"ml-8"),colorScheme:"blue",onClick:K,variant:"outline",children:N?(0,i.jsx)(x.xyo,{}):(0,i.jsx)(x.EAB,{})})})})]}),(0,i.jsxs)("div",{id:"sample",className:eE("grid max-w-[1024px]","".concat(z&&!N?"md:grid-cols-2":"")),children:[t&&0!=t.length&&t.map(e=>(0,i.jsx)(eR,{setOriginalPhoto:w&&"GENERATIONS"===w?e=>{V()&&window.scrollTo({top:0,behavior:"smooth"}),j(e)}:void 0,watermark:k,id:e.id,original:e.inputImage,generated:e.outputImage,prompt:e.prompt,room:e.room,verticalLayout:N,hideOriginal:z,isFav:e.isFav,onDeleteSuccess:T},e.id)),t&&0==t.length&&"GENERATIONS"===w?r&&r.favOnly?(0,i.jsx)("div",{className:"m-auto  w-[1024px] mt-32 translate-x-1/2",children:(0,i.jsx)(o.x,{children:E("favoritesNotFound")})}):(0,i.jsx)(eR,{id:"1",setOriginalPhoto:w&&"GENERATIONS"===w?e=>{V()&&window.scrollTo({top:0,behavior:"smooth"}),j(e)}:void 0,watermark:k,original:"images/defaultgenerations/before.webp",generated:"images/defaultgenerations/after.webp",prompt:"Generated Interior",room:"interior",verticalLayout:N,hideOriginal:z,isFav:!1},1):r&&r.favOnly&&(0,i.jsx)("div",{className:"m-auto mt-32"})]})]})};var eP=e_},26590:function(e,t,r){"use strict";var i=r(96490);class l{static getInstance(){return this.instance||(this.instance=(0,i.eI)("https://pvobgbizvtxksbgwptpw.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InB2b2JnYml6dnR4a3NiZ3dwdHB3Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2ODEzOTgwMTUsImV4cCI6MTk5Njk3NDAxNX0.a1QIRRtw-ipY6ci-rc2j1oDL43nk3WO0Ai56XMsJaUM")),this.instance}constructor(){}}l.instance=null,t.Z=l},90539:function(e,t,r){"use strict";async function i(e,t,r){{let i=await fetch("/api/openai",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({kind:"image",commandName:e,imageUrl:t,userComment:r})}),l=await i.json();if(!i.ok)throw Error((null==l?void 0:l.error)||"Request failed");return l.data}}async function l(e,t){{let r=await fetch("/api/openai",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({kind:"text",commandName:e,text:t})}),i=await r.json();if(!r.ok)throw Error((null==i?void 0:i.error)||"Request failed");return i.data}}r.d(t,{SO:function(){return l},Sh:function(){return i}}),r(83454)},64113:function(e,t,r){"use strict";var i,l;r.d(t,{n:function(){return i}}),(l=i||(i={})).Free="Free Plan",l.Basic="Basic Plan",l.Premium="Premium Plan",l.Pro="Pro Plan"},59419:function(e){e.exports={loading:"loading-dots_loading__oKtDb",spacer:"loading-dots_spacer__DeE4L",blink:"loading-dots_blink__DG7wu",loading2:"loading-dots_loading2__Q0xTL"}}}]);

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.