1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8277],{13207:e=>{e.exports={linkButton:"link_button_linkButton__aMSi_",linkButtonPrimary:"link_button_linkButtonPrimary__qw4w2",linkButtonSecondary:"link_button_linkButtonSecondary__TBTIT",linkButtonTertiary:"link_button_linkButtonTertiary__zyF9R",sizeSmall:"link_button_sizeSmall__sXD3f"}},31187:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>l});var i=r(37876),n=r(17471),o=r(36929),a=r(34467);r(14232);let l=()=>(0,i.jsxs)(n.A,{sx:{height:"100vh",width:"100%"},children:[(0,i.jsx)(a.Y,{}),(0,i.jsx)(o.A,{children:(0,i.jsx)("h1",{children:"404 - Page Not Found"})})]})},37837:(e,t,r)=>{"use strict";r.d(t,{q:()=>er});var i=r(37876),n=r(93231),o=r(54142),a=r(17471),l=r(53968),s=r(27011),c=r(14161),d=r(87054),h=r(66101),u=r(14232),p=r(14664),x=r(54287),m=r(32470),g=r.n(m),j=r(30236),y=r(62079),b=r(6995),f=r(36345);let w={"&:hover":{backgroundColor:"transparent",borderColor:"currentColor"},borderColor:"neutralGray.700",borderRadius:999,color:"neutralGray.700",flexShrink:0,whiteSpace:"nowrap"},A=({label:e,icon:t,disabled:r,onClick:n})=>(0,i.jsxs)(a.A,{className:r?"disabled":void 0,onClick:r?void 0:n,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",px:.5,py:.5,flex:"0 0 auto",sx:{"&.disabled":{cursor:"default",opacity:.4,pointerEvents:"none"},cursor:"pointer",userSelect:"none"},children:[(0,i.jsx)(a.A,{display:"flex",alignItems:"center",justifyContent:"center",height:24,children:t}),(0,i.jsx)(o.A,{variant:"label.medium",color:"neutralGray.900",children:e})]}),v=({isCover:e,onMakeCover:t,onReplace:r,onCrop:o,onRotateRight:s,onRemove:h})=>{let p=(0,y.A)(),x=(0,b.A)(p.breakpoints.down("md")),[m,g]=(0,u.useState)(!1);return x?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(a.A,{display:"flex",gap:2,justifyContent:"space-around",px:2,py:1,width:1,border:"1px solid",borderColor:"neutralGray.100",borderRadius:999,children:[(0,i.jsx)(A,{label:e?"Cover photo":"Make cover photo",icon:(0,i.jsx)(c.dd,{size:"medium"}),disabled:e,onClick:t}),(0,i.jsx)(A,{label:"Crop",icon:(0,i.jsx)(c.hK,{size:"medium"}),onClick:o}),(0,i.jsx)(A,{label:"Rotate",icon:(0,i.jsx)(c.iG,{size:"medium"}),onClick:s}),(0,i.jsx)(A,{label:"More",icon:(0,i.jsx)(c.z_,{size:"medium"}),onClick:()=>g(!0)})]}),(0,i.jsx)(d.A,{open:m,onClose:()=>g(!1),title:"More options",children:(0,i.jsx)(l.A,{children:(0,i.jsxs)(n.A,{gap:2,pb:2,children:[(0,i.jsx)(f.$,{decoration:"text",label:"Replace",startIcon:(0,i.jsx)(c.NA,{size:"large"}),onClick:()=>{g(!1),r()},sx:{borderColor:"transparent",borderRadius:1}}),(0,i.jsx)(f.$,{decoration:"text",label:"Remove",startIcon:(0,i.jsx)(c.b4,{size:"large"}),onClick:()=>{g(!1),h()},sx:{borderColor:"transparent",borderRadius:1}})]})})})]}):(0,i.jsxs)(a.A,{display:"flex",flexWrap:"wrap",gap:1,justifyContent:"center",width:1,children:[(0,i.jsx)(f.$,{label:e?"Cover photo":"Make cover photo",size:"small",decoration:"outlined",startIcon:(0,i.jsx)(c.dd,{size:"medium"}),disabled:e,onClick:t,sx:w}),(0,i.jsx)(f.$,{label:"Replace",size:"small",decoration:"outlined",startIcon:(0,i.jsx)(c.NA,{size:"medium"}),onClick:r,sx:w}),(0,i.jsx)(f.$,{label:"Crop",size:"small",decoration:"outlined",startIcon:(0,i.jsx)(c.hK,{size:"medium"}),onClick:o,sx:w}),(0,i.jsx)(f.$,{label:"Rotate right",size:"small",decoration:"outlined",startIcon:(0,i.jsx)(c.iG,{size:"medium"}),onClick:s,sx:w}),(0,i.jsx)(f.$,{label:"Remove",size:"small",decoration:"outlined",startIcon:(0,i.jsx)(c.b4,{size:"medium"}),onClick:h,sx:w})]})};r(94585);var C=r(2469),S=r(15736),k=r(76753),R=r(24228);let I=4/3,G=e=>!!e&&e.width>0&&e.height>0,_=({originalUrl:e,initialCrop:t,isOpen:r,onApply:o,onClose:a})=>{let c=(0,u.useRef)(null),[d,h]=(0,u.useState)(),[p,x]=(0,u.useState)(),{setToastMessage:m}=(0,s.d)(),g=async()=>{let e=c.current;if(e&&p&&G(p))try{let t=(0,R.$P)(p,e.width,e.height),r=Math.max(e.naturalWidth,e.naturalHeight)-e.naturalWidth,i=Math.max(e.naturalWidth,e.naturalHeight)-e.naturalHeight,n=(e.naturalWidth+r)/e.width,l=(e.naturalHeight+i)/e.height,s=Math.round(t.width*n),c=Math.round(t.height*l);if(!s||!c||!Number.isFinite(s)||!Number.isFinite(c))throw Error(`Crop area is too small: ${s}x${c}`);let d=new OffscreenCanvas(s,c),h=d.getContext("2d");
1if(!h)throw Error("Could not get canvas context");h.imageSmoothingQuality="high",h.translate(r/2-t.x*n,i/2-t.y*l),h.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight);let u=await d.convertToBlob();o(new File([u],"image.png"),p),a()}catch{m("Failed to crop image")}};return(0,i.jsxs)(C.A,{open:r,onClose:a,children:[(0,i.jsx)(k.A,{onClose:a,sx:{"& .MuiIconButton-root":{right:28,top:12},px:4.5},children:"Crop"}),(0,i.jsx)(l.A,{sx:{px:4.5,py:6},children:(0,i.jsx)(n.A,{gap:1,justifyContent:"center",alignItems:"center",children:(0,i.jsx)(R.Ay,{aspect:I,minHeight:30,minWidth:40,crop:d,onChange:(e,t)=>h(t),onComplete:(e,t)=>x(t),children:(0,i.jsx)("img",{ref:c,style:{aspectRatio:1,backgroundColor:"black",objectFit:"scale-down",width:"100%"},crossOrigin:"anonymous",src:e,onLoad:()=>{if(G(t)){h(t),x(t);return}(()=>{let e=c.current;if(!e||!e.width||!e.height)return;let t=(0,R.ge)((0,R.dS)({unit:"%",width:100},I,e.width,e.height),e.width,e.height);h(t),x(t)})()}})})})}),(0,i.jsx)(S.A,{sx:{px:2,py:3},children:(0,i.jsx)(f.$,{fullWidth:!0,size:"large",onClick:g,disabled:!p,label:"Apply",sx:{fontWeight:700,px:3,py:1.5}})})]})},z=(e,t="image.jpeg",r=90)=>new Promise((i,n)=>{let o=new Image;o.crossOrigin="anonymous",o.onload=()=>{let e=(r%360+360)%360,a=90===e||270===e,l=document.createElement("canvas");l.width=a?o.naturalHeight:o.naturalWidth,l.height=a?o.naturalWidth:o.naturalHeight;let s=l.getContext("2d");s?(s.translate(l.width/2,l.height/2),s.rotate(e*Math.PI/180),s.drawImage(o,-o.naturalWidth/2,-o.naturalHeight/2),l.toBlob(e=>{e?i(new File([e],t,{lastModified:Date.now(),type:"image/jpeg"})):n(Error("Failed to rotate image"))},"image/jpeg")):n(Error("Could not get canvas context"))},o.onerror=()=>n(Error("Failed to load image for rotation")),o.src=e}),P=e=>{let[t,r]=(0,u.useState)(null);return(0,u.useEffect)(()=>{if(!e)return void r(null);let t=URL.createObjectURL(e);return r(t),()=>URL.revokeObjectURL(t)},[e]),t},M=(e,t=!1)=>{let r=P(e?.file);return r||(t&&e?.urlThumb?e.urlThumb:e?.url||null)},F={"image/jpeg":[".jpg",".jpeg"],"image/png":[".png"]},$=({getRootProps:e,getInputProps:t,testId:r="photo-upload-input"})=>(0,i.jsxs)(n.A,{...e(),alignItems:"center",justifyContent:"center",width:1,px:2,py:{md:6,xs:4},minHeight:{md:320,xs:240},border:"1px dashed",borderColor:"neutralGray.900",borderRadius:2,sx:{cursor:"pointer",userSelect:"none"},children:[(0,i.jsx)("input",{...t(),"data-testid":r}),(0,i.jsx)(c.AX,{size:"extraLarge"}),(0,i.jsx)(o.A,{variant:"title.small",color:"neutralGray.900",mt:1.5,textAlign:"center",children:"Drag & drop files here"}),(0,i.jsx)(o.A,{variant:"body.small",color:"neutralGray.900",mt:1,children:"or"}),(0,i.jsx)(a.A,{component:"span",mt:1.5,bgcolor:"neutralGray.900",borderRadius:999,color:"neutralGray.0",display:"inline-flex",fontWeight:700,minHeight:36,px:{md:4,xs:3},py:1,textAlign:"center",typography:"body.medium",children:"Choose from your device"}),(0,i.jsxs)(o.A,{variant:"body.small",color:"neutralGray.600",mt:4,px:1,textAlign:"center",children:["Acceptable formats are JPEG and PNG. Up to ",10,"MB"]})]});var E=r(68794),T=r(93405),W=r(39011),B=r(97658),D=r(69155),N=r(52655);let H=["Sell a car","Buy a car","News & Reviews","Help"],U=()=>void 0,L=({width:e,height:t=12})=>(0,i.jsx)(a.A,{bgcolor:"neutralGray.100",borderRadius:1,height:t,width:e}),O=()=>(0,i.jsx)(a.A,{p:1.5,bgcolor:"neutralGray.0",children:(0,i.jsxs)(n.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:2,children:[(0,i.jsx)(a.A,{display:"flex",justifyContent:"flex-start",sx:{"& svg":{height:"auto",width:144}},children:(0,i.jsx)(B.A,{})}),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.A,{direction:"row",alignItems:"center",gap:3,children:H.map(e=>(0,i.jsxs)(n.A,{direction:"row",alignItems:"center",gap:.5,children:[(0,i.jsx)(o.A,{variant:"body.small",color:"neutralGray.900",fontWeight:700,whiteSpace:"nowrap",children:e}),(0,i.jsx)(c.D3,{size:"small"})]},e))}),(0,i.jsxs)(n.A,{direction:"row",alignItems:"center",gap:2,children:[(0,i.jsxs)(n.A,{direction:"row",alignItems:"center",gap:.5,children:[(0,i.jsx)(c.Ip,{size:"small"}),(0,i.jsx)(o.A,{variant:"body.small",color:"neutralGray.900",fontWeight:700,whiteSpace:"nowrap",children:"Watchlist"})]}),(0,i.jsx)(c.n_,{size:"large"})]})]})]})}),K=()=>(0,i.jsxs)(n.A,{gap:1,children:[(0,i.jsx)(L,{width:"60%",height:24}),(0,i.jsx)(L,{width:"45%",height:10}),(0,i.jsx)(L,{width:"35%",height:10})]}),Y=({isMobile:e})=>(0,i.jsxs)(n.A,{gap:2,height:"100%",children:[(0,i.jsxs)(n.A,{gap:1,p:1.5,borderRadius:2,bgcolor:"neutralGray.0",children:[(0,i.jsx)(L,{width:"55%",height:20}),(0,i.jsx)(L,{width:"40%",height:10}),(0,i.jsx)(L,{width:"70%",height:10}),!e&&(0,i.jsx)(a.A,{bgcolor:"primary.main",borderRadius:999,height:28,width:1})]}),(0,i.jsxs)(n.A,{gap:1,p:1.5,borderRadius:2,bgcolor:"neutralGray.0",flexGrow:1,children:[(0,i.jsx)(L,{width:"55%",height:20}),(0,i.jsx)(L,{width:"40%",height:10}),(0,i.jsx)(L,{width:"70%",height:10})]})]}),V=({photos:e,isMobile:t})=>{let r,a=(0,y.A)(),l=(0,b.A)(a.breakpoints.up(2e3)),{width:s}=(0,N.l)(),d=(e=>{let[t,r]=(0,u.useState)({});return(0,u.useEffect)(()=>{let t={};
1return e.forEach(e=>{e.file&&(t[e.clientId]=URL.createObjectURL(e.file))}),r(t),()=>Object.values(t).forEach(e=>URL.revokeObjectURL(e))},[e]),(0,u.useMemo)(()=>e.map(e=>{let r=t[e.clientId]||e.url||e.urlThumb||"";return{urlFull:r,urlThumb:r}}),[e,t])})(e),h=d.length>2,p=(r=a.breakpoints.values[l?"xl":"lg"]-48,h?r:(r+24)*8/12-24),x=t?(0,i.jsx)(T.g,{images:d,aspectRatio:`${s} / ${T.v}`,onImageClick:U,onViewAllClick:U}):(0,i.jsx)(W.Kl,{images:d,aspectRatio:`${p} / ${W.vn}`,onImageClick:U,onViewAllClick:U});return(0,i.jsxs)(i.Fragment,{children:[!t&&(0,i.jsx)(O,{}),(0,i.jsxs)(n.A,{gap:1.5,p:1.5,bgcolor:"neutralGray.20",children:[(0,i.jsxs)(n.A,{direction:"row",alignItems:"center",gap:1,children:[(0,i.jsx)(o.A,{variant:"label.medium",color:"neutralGray.700",whiteSpace:"nowrap",children:"Home / Search results /"}),(0,i.jsx)(L,{width:140,height:10})]}),(0,i.jsxs)(n.A,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:2,children:[(0,i.jsx)(L,{width:70,height:10}),!t&&(0,i.jsxs)(n.A,{direction:"row",alignItems:"center",gap:2,children:[(0,i.jsxs)(n.A,{direction:"row",alignItems:"center",gap:.5,children:[(0,i.jsx)(c.EF,{size:"small"}),(0,i.jsx)(o.A,{variant:"body.small",color:"neutralGray.900",fontWeight:700,children:"Share"})]}),(0,i.jsxs)(n.A,{direction:"row",alignItems:"center",gap:.5,children:[(0,i.jsx)(c.Mr,{size:"small"}),(0,i.jsx)(o.A,{variant:"body.small",color:"neutralGray.900",fontWeight:700,whiteSpace:"nowrap",children:"Add to watchlist"})]})]})]}),(0,i.jsx)(E.Ay,{container:!0,rowSpacing:2,columnSpacing:1,children:h?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(E.Ay,{item:!0,xs:12,children:x}),(0,i.jsx)(E.Ay,{item:!0,xs:12,lg:8,children:(0,i.jsx)(K,{})}),(0,i.jsx)(E.Ay,{item:!0,xs:12,lg:4,children:(0,i.jsx)(Y,{isMobile:t})})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(E.Ay,{item:!0,xs:12,lg:8,children:(0,i.jsxs)(n.A,{spacing:2,children:[x,(0,i.jsx)(K,{})]})}),(0,i.jsx)(E.Ay,{item:!0,xs:12,lg:4,children:(0,i.jsx)(Y,{isMobile:t})})]})})]})]})},q=({open:e,photos:t,onClose:r})=>{let n=!!(0,D.a)();return(0,i.jsxs)(C.A,{open:e,onClose:r,maxWidth:"md",fullWidth:!0,PaperProps:{sx:{maxHeight:"calc(100% - 128px)"}},children:[(0,i.jsx)(k.A,{onClose:r,children:(0,i.jsx)(o.A,{variant:"title.large",color:"neutralGray.900",children:"Photo grid preview"})}),(0,i.jsx)(l.A,{sx:{borderBottom:"none",overflow:"hidden",p:{md:4,xs:2}},children:(0,i.jsx)(a.A,{border:"1.5px solid",borderColor:"neutralGray.100",sx:{pointerEvents:"none",userSelect:"none"},children:(0,i.jsx)(V,{photos:t,isMobile:n})})}),(0,i.jsx)(S.A,{children:(0,i.jsx)(a.A,{display:"flex",justifyContent:"center",width:1,pb:2,children:(0,i.jsx)(f.$,{label:"Close",variant:"primary",onClick:r,sx:{borderRadius:999,minWidth:140,px:6,py:1.5}})})})]})};var J=r(63727);let X=({photo:e,index:t,isCover:r,isSelected:n,onSelect:l})=>{let s=M(e,!0),{attributes:d,listeners:h,setNodeRef:u,transform:p,transition:m,isDragging:g}=(0,x.gl)({id:e.clientId});return(0,i.jsxs)(a.A,{ref:u,...d,...h,onClick:l,position:"relative",overflow:"hidden",borderRadius:.5,border:"2px solid",borderColor:n?"primaryRed.400":"transparent",height:{md:106,xs:"auto"},width:{md:106,xs:"100%"},zIndex:+!!g,sx:{WebkitTouchCallout:"none",aspectRatio:"1",cursor:g?"grabbing":"grab",opacity:g?.5:1,touchAction:"manipulation",transform:J.Ks.Transform.toString(p),transition:m,userSelect:"none"},children:[s?(0,i.jsx)(a.A,{component:"img",alt:r?"Cover photo":`Photo ${t+1}`,crossOrigin:"anonymous",src:s,bgcolor:"neutralGray.900",height:1,width:1,sx:{objectFit:"cover",pointerEvents:"none"}}):null,(0,i.jsx)(a.A,{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:6,left:6,width:24,height:24,bgcolor:"neutralGray.0",border:"1px solid",borderColor:"neutralGray.900",borderRadius:"50%",color:"neutralGray.900",sx:{pointerEvents:"none"},children:r?(0,i.jsx)(c.dd,{size:"small"}):(0,i.jsx)(o.A,{variant:"body.small",color:"neutralGray.900",fontWeight:700,lineHeight:1.1,children:t+1})})]})},Q=(e,t)=>{let r=new Set;return e.forEach(e=>{e.errors.forEach(e=>{switch(e.code){case"too-many-files":t<=0?r.add("You have reached the maximum photo limit for your plan."):r.add(`You can only add ${t} more photo${1===t?"":"s"}.`);break;case"file-too-large":r.add("File is too large. Maximum size is 10MB per image.");break;case"file-invalid-type":r.add("Invalid file type. Please upload JPG, JPEG, or PNG images only.");break;default:r.add(e.message)}})}),[...r].join(" ")},Z=({photos:e,maxPhotos:t,onError:r,onAddFiles:l,onUpdatePhoto:s,onDelete:d,onMakeCover:h,onReorder:m})=>{let[y,b]=(0,u.useState)(0),[f,w]=(0,u.useState)(!1),[A,C]=(0,u.useState)(!1),[S,k]=(0,u.useState)(null),R=Math.max(0,t-e.length),I=e[y],G=M(I),E=P(I?.originalFile)??I?.url??null,T=0===y,W=I?.rotation??0,B=P(S),D=W?B:E,N=(0,u.useMemo)(()=>e.map(e=>e.clientId),[e]),H=(0,p.FR)((0,p.MS)(p.cA,{activationConstraint:{distance:8}}),(0,p.MS)(p.IG,{activationConstraint:{delay:200,tolerance:8}}),(0,p.MS)(p.uN,{coordinateGetter:x.JR})),U=(0,u.useCallback)((t,i)=>{if(t.length>0){let r=e.length;l(t),b(r)}i.length&&r(Q(i,R))},[l,r,e.length,R]),L=(0,u.useCallback)((e,t)=>{e.length>0&&s(y,{crop:void 0,file:e[0],originalFile:e[0]}),t.length&&r(Q(t,R))},[r,s,R,y]),O=(0,j.VB)({accept:F,disabled:R<=0,maxFiles:Math.max(1,R),maxSize:0xa00000,multiple:!0,noClick:e.length>0,noKeyboard:e.length>0,onDrop:U}),K=(0,j.VB)({accept:F,maxFiles:1,maxSize:0xa00000,multiple:!1,noClick:!0,noDrag:!0,noKeyboard:!0,onDrop:L}),Y=()=>I?.file?.name||"image.jpeg",V=async()=>
1{if(G)try{let e=await z(G,Y());s(y,{file:e,rotation:(W+90)%360})}catch{r("Unable to rotate this photo. Please try again.")}},J=async()=>{if(E){if(!W)return void w(!0);try{k(await z(E,Y(),W)),w(!0)}catch{r("Unable to open this photo. Please try again.")}}};return e.length?(0,i.jsxs)(n.A,{gap:{md:2.5,xs:2},children:[G?(0,i.jsx)(a.A,{component:"img",alt:T?"Cover photo":`Photo ${y+1}`,crossOrigin:"anonymous",src:G,display:"block",width:1,bgcolor:"neutralGray.900",borderRadius:{md:2,xs:1.5},sx:{aspectRatio:"4 / 3",objectFit:"contain"}}):null,(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(v,{isCover:T,onMakeCover:()=>{h(y),b(0)},onReplace:()=>K.open(),onCrop:J,onRotateRight:V,onRemove:()=>{let t=Math.max(0,Math.min(y,e.length-2));d(y),b(t)}}),(0,i.jsx)("input",{...O.getInputProps(),"data-testid":"photo-upload-input",style:{display:"none"}}),(0,i.jsx)("input",{...K.getInputProps(),"data-testid":"photo-replace-input",style:{display:"none"}})]}),(0,i.jsxs)(o.A,{variant:"body.medium",color:"neutralGray.900",children:["Not sure how your photos will look on your listing?"," ",(0,i.jsx)(a.A,{component:"span",onClick:()=>C(!0),fontWeight:700,sx:{cursor:"pointer",textDecoration:"underline"},children:"Use Preview mode."})]}),(0,i.jsxs)(o.A,{variant:"title.small",color:"neutralGray.700",children:["All uploaded photos (",e.length,"/",t,")"]}),(0,i.jsx)(p.Mp,{sensors:H,collisionDetection:p.fp,onDragEnd:t=>{let{active:r,over:i}=t;if(!i||r.id===i.id)return;let n=e.findIndex(e=>e.clientId===r.id),o=e.findIndex(e=>e.clientId===i.id);n<0||o<0||(m(n,o),b(o))},children:(0,i.jsx)(x.gB,{items:N,strategy:x.kL,children:(0,i.jsxs)(a.A,{display:"grid",gap:{md:1.5,xs:1},width:1,gridTemplateColumns:{md:"repeat(auto-fill, 106px)",xs:"repeat(3, 1fr)"},children:[e.map((e,t)=>(0,i.jsx)(X,{photo:e,index:t,isCover:0===t,isSelected:t===y,onSelect:()=>b(t)},e.clientId)),(0,i.jsxs)(a.A,{onClick:()=>{R<=0?r("You have reached the maximum photo limit for your plan."):O.open()},display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:.5,bgcolor:R<=0?"neutralGray.400":"neutralGray.900",borderRadius:.5,color:"neutralGray.0",height:{md:106,xs:"auto"},width:{md:106,xs:"100%"},sx:{aspectRatio:"1",cursor:R<=0?"not-allowed":"pointer"},children:[(0,i.jsx)(c.c1,{size:"small",className:g().iconNeutralGray0}),(0,i.jsx)(o.A,{variant:"body.small",color:"neutralGray.0",fontWeight:700,children:"Add more"})]})]})})}),(0,i.jsx)(q,{open:A,photos:e,onClose:()=>C(!1)}),D?(0,i.jsx)(_,{originalUrl:D,initialCrop:I?.crop,isOpen:f,onClose:()=>w(!1),onApply:(e,t)=>{s(y,{crop:t,file:e})}},`${I?.clientId}-${W}`):null]}):(0,i.jsx)($,{getRootProps:O.getRootProps,getInputProps:O.getInputProps})},ee=["Choose the Right Spot: Shoot your car in a nice location that matches its personality, with plenty of space around it for side-on shots.","Timing is Key: Wait for good weather, and aim for the golden hour when the light is softer for fewer harsh shadows.","Get Creative: Have fun with your shotsâinclude your dog in the driverâs seat or get in there yourself!","Use landscape, not portrait â this presents the car better."],et=e=>({...e,clientId:e.clientId||("u">typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():`photo-${Date.now()}-${Math.random().toString(36).slice(2)}`)}),er=({advert:e,onChange:t,onSetValidator:r})=>{let{setToastMessage:p}=(0,s.d)(),[x,m]=(0,u.useState)(!1),[g,j]=(0,u.useState)(!1),[y,b]=(0,u.useState)(!1),[f,w]=(0,u.useState)(()=>(e.uploadImages||e.images.map(e=>({imageId:e.advertImageId,url:e.urlFull,urlThumb:e.urlThumb}))).map(e=>et(e))),{getMaxPhotos:A}=(0,h.A)(),v=A(e.advertListingType,e.advertType),C=()=>{if(!f.length)return j(!0),Promise.resolve(!1);if(f.length>v){let e=f.length-v;return p(`You can upload up to ${v} photos. Please remove ${e} photo${e>1?"s":""} to continue.`),Promise.resolve(!1)}return Promise.resolve(!0)};(0,u.useEffect)(()=>{r(C)},[f,v]);let S=(0,u.useMemo)(()=>f.map((e,t)=>({...e,sequence:t})),[f]);return(0,u.useEffect)(()=>{y&&t({uploadImages:S.map(({clientId:e,...t})=>t)})},[S,y]),(0,i.jsxs)(n.A,{gap:{md:3,xs:2},pb:2,children:[(0,i.jsxs)(n.A,{gap:2,children:[(0,i.jsx)(o.A,{variant:"display.medium",color:"neutralGray.900",component:"h1",children:"Upload some photos"}),(0,i.jsxs)(o.A,{variant:"body.medium",color:"neutralGray.900",children:["You can upload up to"," ",(0,i.jsx)(a.A,{component:"span",fontWeight:700,children:v})," ","photos."]}),(0,i.jsxs)(o.A,{variant:"body.medium",color:"neutralGray.900",children:["Ensure the car is facing to the right, side on."," ",(0,i.jsx)(a.A,{component:"span",onClick:()=>m(!0),fontWeight:700,sx:{cursor:"pointer",textDecoration:"underline"},children:"See tips for taking a perfect cover photo."})]})]}),g&&(0,i.jsx)(o.A,{variant:"body.medium",color:"primaryRed.500",children:"At least one photo is required"}),(0,i.jsx)(Z,{photos:S,maxPhotos:v,onError:p,onAddFiles:e=>{j(!1),w(t=>{let r=Math.max(0,v-t.length);return r<=0?t:[...t,...e.slice(0,r).map(e=>et({file:e,originalFile:e}))]}),b(!0)},onUpdatePhoto:(e,t)=>{j(!1),w(r=>{if(e<0||e>=r.length)return r;let i=[...r];return i[e]={...r[e],...t},i}),b(!0)},onDelete:e=>{w(t=>{if(e<0||e>=t.length)return t;let r=[...t];return r.splice(e,1),r}),b(!0)},onMakeCover:e=>{e<=0||(w(t=>{if(e>=t.length)return t;let r=[...t],[i]=r.splice(e,1);return r.unshift(i),r}),b(!0))},onReorder:(e,t)=>{e===t||e<0||t<0||(w(r=>{if(e>=r.length||t>=r.length)return r;let i=[...r],[n]=i.splice(e,1);return i.splice(t,0,n),i}),b(!0))}}),(0,i.jsx)(d.A,{open:x,onClose:()=>m(!1),title:"Tips for taking a perfect cover photo",children:(0,i.jsxs)(l.A,{children:[(0,i.jsxs)(n.A,{spacing:2,pb:4,px:4,pt:1.5,children:[(0,i.jsx)(a.A,{component:"img",alt:"upload_photo_example",src:"/_next/static/media/upload_photo_tip_example.6fddd839.jpg",borderRadius:3,width:1}),(0,i.jsx)(o.A,{variant:"body.medium",color:"neutralGray.900",children:"A great photo and setting will showcase your car in all its glory and help it sell."})]}),(0,i.jsxs)(n.A,{spacing:2,pb:4,px:4,pt:1.5,children:[(0,i.jsx)(o.A,{variant:"title.small",color:"neutralGray.900",children:"Tips"}),ee.map(e=>(0,i.jsxs)(n.A,{direction:"row",spacing:1,alignItems:"center",children:[(0,i.jsx)(c.Ri,{size:"small"}),(0,i.jsx)(o.A,{variant:"body.medium",color:"neutralGray.900",children:e})]},e))]})]})})]})}},39011:(e,t,r)=>{"use strict";r.d(t,{Kl:()=>c,vn:()=>l});var i=r(37876),n=r(17471),o=r(4089),a=r(46623);let l=489,s=({image:e,alt:t,onClick:r,children:a})=>(0,i.jsxs)(n.A,{height:"100%",width:"100%",overflow:"hidden",position:"relative",borderRadius:2,onClick:r,sx:{aspectRatio:4/3,cursor:"pointer"},bgcolor:"neutralGray.960",children:[(0,i.jsx)(o._,{src:e?.urlFull||e?.urlThumb||"",alt:t,fit:"
1cover",aspectRatio:3/4,fill:!0,sizes:e?.sizes,srcSet:e?.srcSet}),a]}),c=({images:e,onImageClick:t,onViewAllClick:r,aspectRatio:o})=>{let c=e.length;if(!c)return null;let d=c<=2?e.slice(0,1):e.slice(0,Math.min(c,5)),h=c<=2?0:Math.min(c-1,4);return(0,i.jsx)(n.A,{width:"100%",height:o?"auto":`${l}px`,sx:{aspectRatio:o,minHeight:o?0:void 0},display:"grid",gridTemplateColumns:"repeat(10, minmax(0, 1fr))",gridTemplateRows:"repeat(2, 1fr)",gap:1,children:d.map((e,o)=>{let l=function(e,t){if(0===e)return{colSpan:t>=3?6:10,colStart:1,rowSpan:2,rowStart:1};switch(t){case 3:return 1===e?{colSpan:4,colStart:7,rowSpan:1,rowStart:1}:{colSpan:4,colStart:7,rowSpan:1,rowStart:2};case 4:if(1===e)return{colSpan:4,colStart:7,rowSpan:1,rowStart:1};if(2===e)return{colSpan:2,colStart:7,rowSpan:1,rowStart:2};return{colSpan:2,colStart:9,rowSpan:1,rowStart:2};default:if(1===e)return{colSpan:2,colStart:7,rowSpan:1,rowStart:1};if(2===e)return{colSpan:2,colStart:9,rowSpan:1,rowStart:1};if(3===e)return{colSpan:2,colStart:7,rowSpan:1,rowStart:2};return{colSpan:2,colStart:9,rowSpan:1,rowStart:2}}}(o,c);return(0,i.jsx)(n.A,{gridColumn:`${l.colStart} / span ${l.colSpan}`,gridRow:`${l.rowStart} / span ${l.rowSpan}`,minWidth:0,minHeight:0,children:(0,i.jsx)(s,{image:e,alt:e.alt||`Vehicle image ${o+1}`,onClick:()=>t(o),children:o===h&&(0,i.jsx)(a.d,{count:c,onClick:r})})},o)})})}},46623:(e,t,r)=>{"use strict";r.d(t,{d:()=>s});var i=r(37876),n=r(93231),o=r(14161),a=r(72547),l=r(69155);let s=({label:e="View all",count:t,onClick:r})=>{let s=t&&t>=4,c=(0,l.a)();return(0,i.jsxs)(n.A,{direction:s?"column":"row",justifyContent:"center",alignItems:"center",spacing:.5,position:"absolute",color:"var(--neutral-gray-0, #fff)",zIndex:3,borderRadius:2,sx:s?{inset:0,backgroundColor:"rgba(10, 10, 10, 0.5)"}:{right:{xs:8,md:24},bottom:{xs:14,md:24},left:"auto",top:"auto",pl:{xs:.5,md:2},pr:{xs:1,md:3},py:.5,backgroundColor:"rgba(10, 10, 10, 0.5)"},onClick:e=>{e.stopPropagation(),r?.()},children:[(0,i.jsx)(o.vt,{size:c?"medium":"extraLarge"}),(0,i.jsx)(a.P,{size:c?"tiny":"regular",style:c?"regular":"bold",children:e}),t&&t>5&&(0,i.jsxs)(a.P,{size:"tiny",children:[t-5," more image",t-5==1?"":"s"]})]})}},52655:(e,t,r)=>{"use strict";r.d(t,{l:()=>n});var i=r(14232);let n=()=>{let[e,t]=(0,i.useState)({height:void 0,width:void 0});return(0,i.useEffect)(()=>{let e=()=>{t({height:window.innerHeight,width:window.innerWidth})};return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)},[]),e}},58209:(e,t,r)=>{"use strict";r.d(t,{M:()=>s});var i=r(37876),n=r(68794),o=r(61902),a=r(5671);r(14232);let l=({onChange:e,onReady:t,children:r})=>{let a=(0,o.useStripe)(),l=(0,o.useElements)();return r?(0,i.jsx)(i.Fragment,{children:r({elements:l,stripe:a})}):(0,i.jsx)(n.Ay,{container:!0,flexDirection:"column",spacing:1,children:(0,i.jsx)(n.Ay,{item:!0,children:(0,i.jsx)(o.PaymentElement,{onChange:e,onReady:t})})})},s=({stripePromise:e,clientSecret:t,onChange:r,onReady:n,loading:s=(0,i.jsx)(a.O,{}),children:c})=>e&&t?(0,i.jsx)(o.Elements,{stripe:e,options:{clientSecret:t},children:(0,i.jsx)(l,{onChange:r,onReady:n,children:c})}):(0,i.jsx)(i.Fragment,{children:s})},66101:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var i=r(24393),n=r(17725),o=r(81256),a=r(14232);function l(){let{settingsService:e}=(0,n.L0)(),{data:t,isLoading:r,error:l}=(0,o.A)("publicSettings",()=>e.getPublicSettings()),s=(0,a.useCallback)(e=>t?.[e],[t]),c={classified:{standard:10,premium:20},auction:{standard:10,premium:20}};return{getMaxPhotos:(0,a.useCallback)((e,r)=>{let n=e===i.cL.Auction?"auction":"classified",o=r===i.qO.Premium?"premium":"standard",a=c;if(t?.max_photos)try{a=JSON.parse(t.max_photos)}catch(e){a=c}return a[n][o]},[t]),isLoading:r,error:l,getSetting:s}}},68758:(e,t,r)=>{"use strict";r.d(t,{H:()=>m});var i=r(37876),n=r(53994),o=r(68794),a=r(93231),l=r(17471),s=r(73507),c=r(14161),d=r(72547);r(14232);var h=r(73865),u=r.n(h);let p=({checked:e,sx:t,disabled:r,inputProps:o})=>(0,i.jsx)(n.A,{disabled:r,checked:e,inputProps:o,sx:{...t,"& .MuiSvgIcon-root":{fontSize:28}}}),x=({title:e,price:t,discount:r,hint:n,pros:s,cons:h,isSelected:x,onClick:m,disabled:g})=>(0,i.jsxs)(o.Ay,{container:!0,flexDirection:"column",onClick:m,gap:1.5,sx:{backgroundColor:x?"#FFDBFF4D":"transparent",border:1,borderColor:x?"primary.main":"grey.400",borderRadius:5,cursor:"pointer",padding:3,userSelect:"none"},children:[(0,i.jsx)(o.Ay,{item:!0,gap:1.5,children:(0,i.jsxs)(a.A,{direction:"column",gap:1,children:[(0,i.jsxs)(a.A,{direction:"row",justifyContent:"space-between",children:[(0,i.jsx)(d.H5,{fontStyle:"strong",children:e}),(0,i.jsx)(p,{disabled:g,checked:x,inputProps:{"aria-label":e},sx:{marginBottom:"-9px",marginRight:"-11px"}})]}),(0,i.jsxs)(a.A,{direction:"row",gap:1.5,children:[t&&(0,i.jsx)(d.P,{size:"big",children:t}),r&&(0,i.jsx)(a.A,{width:"fit-content",justifyContent:"center",py:.5,px:1,borderRadius:2,sx:{bgcolor:"var(--positive-green-100, #d7f4e2)",color:"var(--positive-green-600-main, #39a865)"},children:(0,i.jsxs)(d.P,{size:"tiny",style:"bold",children:["Save ",r]})}),n&&(0,i.jsx)(d.P,{color:"secondary",size:"tiny",children:n})]})]})}),(0,i.jsx)(o.Ay,{item:!0,children:(0,i.jsx)(l.A,{borderBottom:1,borderColor:"grey.400",width:1})}),(0,i.jsxs)(o.Ay,{item:!0,container:!0,spacing:1,children:[s.map((e,t)=>(0,i.jsxs)(o.Ay,{item:!0,container:!0,flexDirection:"row",justifyContent:"space-between",children:[(0,i.jsx)(d.P,{size:"big",className:u().featureText,children:e}),(0,i.jsx)(c.Ri,{className:u().checkboxCorrection})]},t)),h.map((e,t)=>(0,i.jsxs)(o.Ay,{item:!0,container:!0,flexDirection:"row",justifyContent:"space-between",children:[(0,i.jsx)(d.P,{size:"big",className:u().featureText,children:e}),(0,i.jsx)(c.uv,{size:"large"})]},t))]})]}),m=({disabled:e,...t})=>e?(0,i.jsx)(s.A,{title:"Coming soon",placement:"top",arrow:!0,sx:{"& .MuiTooltip-arrow":{color:"grey.400"}},children:(0,i.jsx)(l.A,{sx:{opacity:.5},children:(0,i.jsx)(x,{disabled:!0,...t})})}):(0,i.jsx)(x,{...t})},71110:e=>{e.exports={container:"image_carousel_container__UZByv",placeholder:"image_carousel_placeholder__jp0TC"}},73865:e=>{e.exports={checkboxCorrection:"price_option_checkboxCorrection__K21xb",featureText:"price_option_featureText__oL6sY"}},82835:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var i=r(37876),n=r(58103),o=r.n(n),a=r(72547);r(14232);var l=r(13207),s=r.n(l);let c=({children:e,className:t,onClick:r,variant:n="primary",...l})=>(0,i.jsx)("div",{className:s().linkButton,onClick:r,...l,children:(0,i.jsx)(a.L9,{className:o()(s().linkButton,t,{[s().linkButtonSecondary]:"secondary"===n,[s().linkButtonPrimary]:"primary"===n,[s().linkButtonTertiary]:"tertiary"===n}),style:"strong",children:e})})},93405:(e,t,r)=>{"use strict";r.d(t,{g:()=>u,v:()=>h});var i=r(37876);r(25262);var n=r(17471),o=r(71110),a=r.n(o),l=r(14232),s=r(34550),c=r.n(s),d=r(46623);let h=260,u=({images:e,disableKeyDown:t,onImageClick:r,onViewAllClick:o,aspectRatio:s})=>{let u=(0,l.useRef)(null),p=(0,l.useMemo)(()=>e?.map(e=>({fullscreen:e.urlFull||"",original:e.urlFull||"",thumbnail:e.urlThumb||""}))||[],[e]);return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(n.A,{className:a().container,sx:{"& .image-gallery-slide":{aspectRatio:s,height:s?"auto":`${h}px`}},children:p.length?(0,i.jsxs)(n.A,{width:"100%",position:"relative",children:[(0,i.jsx)(c(),{ref:u,disableKeyDown:t,items:p,showNav:!1,showFullscreenButton:!1,showIndex:!0,showPlayButton:!1,showThumbnails:!1,onClick:()=>
1{if(e&&u.current){let e=u.current.getCurrentIndex();r?.(e)}}}),(0,i.jsx)(d.d,{label:"Gallery view",onClick:o})]}):(0,i.jsx)("div",{className:a().placeholder})})})}}}]);
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.