1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[58943,88124],{13203:(e,t,r)=>{let o,a,n;r.d(t,{B3:()=>m,C0:()=>y,LE:()=>g,Ly:()=>v,O5:()=>x,Tp:()=>f,c4:()=>p,yy:()=>b});var i=r(72378);let l="auth_token",s="auth_user_id",c="medley_access_token",d={expires:30,sameSite:"Lax",path:"/"};function u(){return"undefined"==typeof document?null:i.A.get(l)||null}function h(){if("undefined"==typeof document)return null;let e=i.A.get(s);if(!e)return null;let t=parseInt(e,10);return Number.isFinite(t)?t:e}function p(){return void 0===o&&(o=u()),o}function m(){return o=u(),a=h(),o}function x(e){o=e||null,"undefined"!=typeof document&&(e?i.A.set(l,e,d):i.A.remove(l,{path:"/"}))}function f(){o=null,a=null,"undefined"!=typeof document&&(i.A.remove(l,{path:"/"}),i.A.remove(s,{path:"/"}))}function g(){return void 0===a&&(a=h()),a}function v(e){a=null!=e?e:null,"undefined"!=typeof document&&(null!=e?i.A.set(s,String(e),d):i.A.remove(s,{path:"/"}))}function y(){return void 0===n&&(n="undefined"==typeof document?null:i.A.get(c)||null),n}function b(e){n=e||null,"undefined"!=typeof document&&(e?i.A.set(c,e,d):i.A.remove(c,{path:"/"}))}},15316:(e,t,r)=>{r.d(t,{U:()=>l,g:()=>s});var o=r(95155),a=r(12115);let n={width:1200,height:800,isMobile:!1,isTablet:!1,isDesktop:!0,hasBottomNav:!1,mounted:!1},i=(0,a.createContext)(n);function l(e){let{children:t}=e,[r,l]=(0,a.useState)(n),s=(0,a.useRef)(null),c=(0,a.useCallback)(()=>{let e=window.innerWidth;l({width:e,height:window.innerHeight,isMobile:e<768,isTablet:e>=768&&e<1024,isDesktop:e>=1024,hasBottomNav:e<768,mounted:!0})},[]),d=(0,a.useCallback)(()=>{s.current||(s.current=requestAnimationFrame(()=>{c(),s.current=null}))},[c]);return(0,a.useEffect)(()=>(c(),window.addEventListener("resize",d),()=>{window.removeEventListener("resize",d),s.current&&cancelAnimationFrame(s.current)}),[c,d]),(0,o.jsx)(i.Provider,{value:r,children:t})}function s(){return(0,a.useContext)(i)}},50655:(e,t,r)=>{r.d(t,{Z:()=>a,l:()=>n});let o=new Map;function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e5,r=o.get(e);return r?Date.now()-r.timestamp>t?(o.delete(e),null):r.data:null}function n(e,t){o.set(e,{data:t,timestamp:Date.now()})}},58943:(e,t,r)=>{r.d(t,{Q:()=>a});var o=r(85452);function a(e){if(!e||1!==Number(e.owner_id))return null;let t=Number(e.id);return Number.isInteger(t)&&t>0?(0,o.s)(t):null}},76480:(e,t,r)=>{r.d(t,{e:()=>l});let o=/\.(jpe?g|png|gif|webp|heic|heif|tiff?|bmp|avif|svg)$/i,a=/^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$/i,n=/^(IMG|DSC|DCIM|PXL|MVIMG|Screenshot|Screen\s?Shot|Photo|image|pic|picture|scan|scanned)[-_\s]?\d+/i,i=/^(\d{6,}|[0-9a-f]{16,})$/i;function l(e,t){var r,l,s;let c=null==e?"":String(e).trim();return c?"untitled"===c.toLowerCase()?t&&"fallback"in(t||{})&&null!=(l=t.fallback)?l:null:!function(e){if(null==e)return!1;let t=String(e).trim();if(!t)return!1;let r=t.replace(/\s*\(\d{4}\)\s*$/,"").trim()||t;if(o.test(r))return!0;let l=r.replace(o,"").trim();return!!(!l||a.test(l)||n.test(l)||i.test(l)||/\.[a-z0-9]{2,5}$/i.test(l)&&o.test(".".concat(l.split(".").pop())))}(c)?c:t&&"fallback"in(t||{})&&null!=(s=t.fallback)?s:null:t&&"fallback"in(t||{})&&null!=(r=t.fallback)?r:null}},85452:(e,t,r)=>{r.d(t,{s:()=>i});let o="/media/art-concept",a="AI imagined: the next few seconds",n={1566:{src:"".concat(o,"/1566-cat-and-mouse.mp4"),seconds:6,model:"Kling v3 Pro; picture from one take, sound from a second",caption:a},1574:{src:"".concat(o,"/1574-jupiter-and-io.mp4"),seconds:5,model:"Kling v3 Pro with sound, starting and ending on the painting",caption:a},1572:{src:"".concat(o,"/1572-girl-with-dog.mp4"),seconds:7,model:"Kling v3 Pro with sound",caption:a},1410:{src:"".concat(o,"/1410-coming-storm.mp4"),seconds:7,model:"Kling v3 Pro with sound",caption:a},1565:{src:"".concat(o,"/1565-cows-in-shade.mp4"),seconds:7,model:"Kling v3 Pro with sound",caption:a},3330:{src:"".concat(o,"/3330-kittens-red-rose.mp4"),seconds:7,model:"Kling v3 Pro with sound",caption:a},1440:{src:"".concat(o,"/1440-lute-player.mp4"),seconds:7,model:"Kling v3 Pro with sound, ending on a photographic render of the same moment",caption:a},1555:{src:"".concat(o,"/1555-giron-couple.mp4"),seconds:7,model:"Kling v3 Pro with sound",caption:a},1466:{src:"".concat(o,"/1466-young-man.mp4"),seconds:7,model:"Kling v3 Pro with sound",caption:a},1539:{src:"".concat(o,"/1539-elopement.mp4"),seconds:7,model:"Kling v3 Pro with sound",caption:a},1554:{src:"".concat(o,"/1554-girl-on-swing.mp4"),seconds:7,model:"Kling v3 Pro with sound",caption:a},1571:{src:"".concat(o,"/1571-knitting-lady.mp4"),seconds:5,model:"Kling v3 Pro with sound, trimmed before the dog changes shape",caption:a},1426:{src:"".concat(o,"/1426-top-hat.mp4"),seconds:7,model:"Kling v3 Pro with sound",caption:a},1556:{src:"".concat(o,"/1556-sleeping-beauty.mp4"),seconds:6,model:"Kling v3 Pro with sound, starting and ending on the painting",caption:a},1544:{src:"".concat(o,"/1544-janine-with-dolls.mp4"),seconds:7,model:"Kling v3 Pro with sound, made from the canvas and set back in the photo's white surround",caption:a}};function i(e){return n[e]||null}}
1,88124:(e,t,r)=>{r.r(t),r.d(t,{default:()=>U});var o=r(95155),a=r(13203),n=r(12115),i=r(52619),l=r.n(i),s=r(20063),c=r(11742),d=r(5098),u=r(95022),h=r(62783),p=r(92664),m=r(67909),x=r(15316),f=r(50655),g=r(73086),v=r(47886),y=r(90075),b=r(76480);let w=e=>{let{isOpen:t,onClose:r,children:a}=e;return((0,n.useEffect)(()=>(t?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[t]),t)?(0,o.jsx)("div",{className:"fixed inset-0 flex items-center justify-center p-4",onClick:e=>{e.target===e.currentTarget&&r()},style:{zIndex:300,backgroundColor:"rgba(0, 0, 0, 0.4)"},children:(0,o.jsxs)("div",{className:"bg-white rounded-lg max-w-4xl w-full max-h-[90vh] flex flex-col overflow-hidden relative",children:[(0,o.jsx)("button",{onClick:r,"aria-label":"Close",className:"absolute top-3 right-3 z-10 w-9 h-9 text-gray-500 hover:text-gray-900 hover:cursor-pointer text-2xl font-bold focus:outline-none",style:{lineHeight:1},children:"\xd7"}),(0,o.jsx)("div",{className:"p-6 flex flex-col h-full overflow-y-auto",children:a})]})}):null};var k=r(15239),_=r(58943);function j(e){let{className:t="absolute right-1 top-1"}=e;return(0,o.jsxs)("span",{className:"".concat(t," inline-flex items-center gap-1 rounded-full bg-[#f3b63f] px-1.5 py-0.5 text-[10px] font-semibold leading-none text-black shadow"),title:"See it move, with sound",children:[(0,o.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8","aria-hidden":!0,children:(0,o.jsx)("path",{d:"M1.5 1 L7 4 L1.5 7 Z",fill:"currentColor"})}),"Video"]})}let S=(e,t)=>{let r="string"==typeof e?Number(e.trim()):Number(e),o="string"==typeof t?Number(t.trim()):Number(t);return Number.isFinite(r)&&r>0&&Number.isFinite(o)&&o>0?r>=o?{width:1600,height:Math.max(1,Math.round(o/r*1600))}:{width:Math.max(1,Math.round(r/o*1600)),height:1600}:{width:1600,height:1600}},A=e=>{let{artwork:t,salon:r,cardSize:a,favorites:n,justFaved:i,user:l,observeCard:s,handleImageLoad:c,handleOpenModal:d,toggleFavorite:u,setSimilar:h,saveBrowseState:p,getArtistHref:m,revealedCards:x,router:f,showPrices:v}=e,y=(0,g.VG)(t.main_photo_url,t.thumbnail_url);return(0,o.jsx)("div",{ref:s,"data-artwork-id":t.id,style:{transition:"opacity 0.6s ease-out"},className:"artwork-card ".concat(t.isSource?"source-artwork":"artwork-card-no-border"," ").concat(x.has(t.id)?"opacity-100":"opacity-0"),children:(0,o.jsx)("div",{className:"transition-transform duration-300 ease-out md:hover:-translate-y-[3px]",children:r?(0,o.jsx)(C,{artwork:t,cardSize:a,theme:!0,imgSrc:y,handleImageLoad:c,handleOpenModal:d,setSimilar:h,getArtistHref:m,router:f,showPrices:v}):(0,o.jsx)(N,{artwork:t,cardSize:a,favorites:n,justFaved:i,user:l,imgSrc:y,handleImageLoad:c,toggleFavorite:u,setSimilar:h,saveBrowseState:p,getArtistHref:m,router:f})})},t.id)};function C(e){var t,r,a,n,i,s;let{artwork:c,cardSize:d,imgSrc:u,handleImageLoad:h,handleOpenModal:p,setSimilar:m,getArtistHref:x,router:f,showPrices:v}=e,y=(null==(t=c.artist)?void 0:t.url_identifier)||(null==(r=c.artist)?void 0:r.id),w=!!y,{width:A,height:C}=S(c.width,c.height);return(0,o.jsxs)("div",{onClick:()=>p(c.id.toString()),style:{cursor:"pointer",borderRadius:"8px",overflow:"hidden"},children:[(0,o.jsxs)("div",{className:"artwork-image-container relative !h-auto",children:[!!c.has_keywords&&!c.isSource&&(0,o.jsx)("button",{className:"btn btn-similar hidden absolute z-[1] right-11 top-[7px] cursor-pointer text-xs px-2 py-1 bg-black/60 text-white border-none rounded",onClick:e=>{e.stopPropagation(),m({id:c.id,name:c.title,artistName:c.artist.name,artwork:c,url_identifier:c.artist.url_identifier||c.artist.id})},children:"Similar"}),(0,o.jsx)("div",{"aria-hidden":!0,className:"artwork-image-fallback absolute inset-0 flex items-center justify-center pointer-events-none p-3 text-center text-[11px] font-semibold uppercase tracking-[0.06em]",style:{background:"linear-gradient(135deg, color-mix(in srgb, var(--primary-color, #b08d57) 12%, #f5f0e4), color-mix(in srgb, var(--primary-color, #b08d57) 4%, #fafaf7))",color:"var(--primary-color, #b08d57)"},children:(null==(a=c.artist)?void 0:a.name)||"ArtLove Salon"}),(0,_.Q)(c)?(0,o.jsx)(j,{className:"absolute left-2 top-2 z-[2] pointer-events-none"}):null,(0,o.jsx)(k.default,{src:u,alt:(0,b.e)(c.title)||(null==(n=c.artist)?void 0:n.name)||"Artwork",width:A,height:C,className:"artwork-image-item relative z-[1] m-0 p-0 w-full h-auto object-cover",loading:"lazy",onLoad:e=>{h(c.id),e.currentTarget.dataset.loaded="1"},onError:e=>{let t=e.currentTarget;"1"!==t.dataset.fallback&&(t.dataset.fallback="1",t.style.opacity="0")}}),v&&(0,o.jsx)("div",{className:"status-overlay",style:{backgroundColor:"#4a5568",fontSize:"100%"},children:(0,g.zx)(c)})]}),(0,o.jsx)("div",{className:"artwork-info",children:(0,o.jsxs)("div",{onClick:w?e=>{e.stopPropagation(),f.push(x(y))}:void 0,style:w?void 0:{cursor:"default"},children:[(()=>{let e=(0,b.e)(c.title);return e?(0,o.jsx)("h3",{className:"artwork-title",children:(0,o.jsxs)("span",{children:[(0,g.Gz)(e),c.updated&&" (".concat(c.updated.split("-")[0],")")]})}):null})(),w?(0,o.jsx)(l(),{href:x(y),className:"artist-name",style:{display:"block"},onClick:e=>{e.stopPropagation()},children:(null==(i=c.artist)?void 0:i.name)||"Unknown Artist"}):(0,o.jsx)("span",{className:"artist-name",style:{display:"block"},children:(null==(s=c.artist)?void 0:s.name)||"Unknown Artist"}),void 0!==c.level_name&&(0,o.jsx)("span",{style:{display:"inline-block",fontSize:10,fontWeight:600,color:c.level_name?"var(--text-secondary-color)":"#2e7d32",marginTop:4,letterSpacing:"0.02em",textTransform:"uppercase"},children:c.level_name||"Available"}),("medium"===d||"large"===d)&&c.description&&(0,o.jsx)("p",{className:"artwork-description",children:c.description})]})})]})}function N(e){var t,r,a,n,i;let{artwork:s,cardSize:c,favorites:d,justFaved:u,user:h,imgSrc:p,handleImageLoad:m,toggleFavorite:x,setSimilar:f,saveBrowseState:v,getArtistHref:y,router:w}=e,_=(null==(t=s.artist)?void 0:t.url_identifier)||(null==(r=s.artist)?void 0:r.id),j=!!_,{width:A,height:C}=S(s.width,s.height),N=j?()=>{v(),w.push("".concat(y(_),"?highlight=").concat(s.id))}:void 0;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"artwork-image-container relative !h-auto rounded-lg overflow-hidden ".concat(j?"cursor-pointer":"cursor-default"),onClick:N,children:[h&&(0,o.jsx)("button",{className:"heart-btn btn-favorite-card",onClick:async e=>{e.preventDefault(),e.stopPropagation(),await x(s.id)},style:{position:"absolute",top:"8px",right:"8px",background:"transparent",border:"none",width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:10}
1,"aria-label":d.includes(s.id)?"Remove from favorites":"Add to favorites",children:(0,o.jsx)("svg",{width:22,height:22,viewBox:"0 0 24 24",fill:d.includes(s.id)?"#ed1c24":"transparent",stroke:"white",strokeWidth:d.includes(s.id)?1.5:2,strokeLinecap:"round",strokeLinejoin:"round",className:"heart-svg".concat(d.includes(s.id)?" is-fav":"").concat(u.has(s.id)?" heart-pop":""),style:{filter:"drop-shadow(0px 1px 2px rgba(0,0,0,0.5))"},children:(0,o.jsx)("path",{d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})})}),!!s.has_keywords&&!s.isSource&&(0,o.jsx)("button",{className:"btn btn-similar hidden absolute z-[1] right-11 top-[7px] cursor-pointer text-xs px-2 py-1 bg-black/60 text-white border-none rounded",onClick:e=>{e.stopPropagation(),f({id:s.id,name:s.title,artistName:s.artist.name,artwork:s,url_identifier:s.artist.url_identifier||s.artist.id})},children:"Similar"}),(0,o.jsx)(k.default,{src:p,alt:(0,b.e)(s.title)||(null==(a=s.artist)?void 0:a.name)||"Artwork",width:A,height:C,className:"artwork-image-item m-0 p-0 w-full h-auto object-cover",loading:"lazy",onLoad:()=>m(s.id)})]}),(0,o.jsxs)("div",{className:"artwork-info",children:[(()=>{let e=(0,b.e)(s.title),t=(()=>{var e;if(s.sold_at)return null;let t=Number(String(null!=(e=s.price)?e:"").replace(/,/g,""));return!Number.isFinite(t)||t<=0?null:(0,o.jsx)("span",{style:{background:"#ffd700",color:"#333",borderRadius:4,padding:"1px 6px",fontSize:13,fontWeight:600,marginLeft:6,display:"flex",alignItems:"center"},children:(0,o.jsxs)("span",{style:{fontWeight:700},children:["$",Math.round(t).toLocaleString("en-US")]})})})();return e||t?(0,o.jsxs)("h3",{className:"artwork-title",onClick:N,style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,cursor:j?"pointer":"default"},children:[(0,o.jsx)("span",{children:e?(0,o.jsxs)(o.Fragment,{children:[(0,g.Gz)(e),s.updated&&" (".concat(s.updated.split("-")[0],")")]}):null}),t]}):null})(),j?(0,o.jsx)(l(),{href:y(_),className:"artist-name",children:(null==(n=s.artist)?void 0:n.name)||"Unknown Artist"}):(0,o.jsx)("span",{className:"artist-name",children:(null==(i=s.artist)?void 0:i.name)||"Unknown Artist"}),("medium"===c||"large"===c)&&s.description&&(0,o.jsx)("p",{className:"artwork-description",children:s.description})]})]})}let L=e=>{let{salon:t,query:r,handleSearch:a,handleKeyDown:n,isMobileSearchVisible:i,setIsMobileSearchVisible:l,setQuery:s,setDebouncedQuery:c,isForSaleActive:d,setIsForSaleActive:u,isNFSActive:h,setIsNFSActive:p,isSoldActive:m,setIsSoldActive:x,is19thCenturyActive:f,setIs19thCenturyActive:g,isFavoritesActive:v,showSeattleOnly:y,setShowSeattleOnly:b,showOnlyFavorites:w,resetToAllArtworks:k,remove19thCenturyParam:_,user:j,favoritesCount:S,sortBy:A,onSortChange:C,quizVotesCount:N,cardSize:L,handleCardSizeChange:z}=e,P=()=>(0,o.jsx)("button",{className:"mobile-size-button ".concat("medium"===L?"active":""),onClick:()=>z("medium"===L?"large":"medium"),"aria-label":"Toggle grid size",style:{display:"flex",alignItems:"center",justifyContent:"center"},children:"medium"===L?(0,o.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:[(0,o.jsx)("rect",{x:"1",y:"1",width:"6",height:"6",rx:"1"}),(0,o.jsx)("rect",{x:"9",y:"1",width:"6",height:"6",rx:"1"}),(0,o.jsx)("rect",{x:"1",y:"9",width:"6",height:"6",rx:"1"}),(0,o.jsx)("rect",{x:"9",y:"9",width:"6",height:"6",rx:"1"})]}):(0,o.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:(0,o.jsx)("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1"})})}),R=e=>{let{color:t}=e;return(0,o.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:t||"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,o.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,o.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})};return(0,o.jsx)("div",{className:"mobile-controls-row md:hidden",children:t?(0,o.jsx)(I,{query:r,handleSearch:a,handleKeyDown:n,isMobileSearchVisible:i,setIsMobileSearchVisible:l,theme:!0,is19thCenturyActive:f,setIs19thCenturyActive:g,isSoldActive:m,setIsSoldActive:x,isNFSActive:h,setIsNFSActive:p,isForSaleActive:d,setIsForSaleActive:u,remove19thCenturyParam:_,sortBy:A,onSortChange:C,GridToggleButton:P,SearchIcon:R}):(0,o.jsx)(E,{query:r,handleSearch:a,handleKeyDown:n,isMobileSearchVisible:i,setIsMobileSearchVisible:l,setQuery:s,setDebouncedQuery:c,isForSaleActive:d,setIsForSaleActive:u,isFavoritesActive:v,showSeattleOnly:y,setShowSeattleOnly:b,showOnlyFavorites:w,resetToAllArtworks:k,user:j,favoritesCount:S,sortBy:A,onSortChange:C,quizVotesCount:N,GridToggleButton:P,SearchIcon:R})})};function E(e){let{query:t,handleSearch:r,handleKeyDown:a,isMobileSearchVisible:n,setIsMobileSearchVisible:i,setQuery:l,setDebouncedQuery:s,isForSaleActive:c,setIsForSaleActive:d,isFavoritesActive:u,showSeattleOnly:h,setShowSeattleOnly:p,showOnlyFavorites:m,resetToAllArtworks:x,user:f,favoritesCount:g,sortBy:v,onSortChange:y,quizVotesCount:b,GridToggleButton:w,SearchIcon:k}=e;return(0,o.jsxs)(o.Fragment,{children:[n?(0,o.jsxs)("div",{className:"search-container",style:{flexGrow:1},children:[(0,o.jsx)("input",{type:"text",placeholder:"Search artwork...",className:"search-input",value:t,onChange:r,onKeyDown:a,autoFocus:!0}),(0,o.jsx)("button",{className:"clear-search",onClick:()=>{i(!1),t||l("")},"aria-label":"Close search",children:"\xd7"})]}):t?(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",width:"100%",marginBottom:"4px"},children:[(0,o.jsxs)("div",{onClick:()=>i(!0),style:{flex:1,padding:"8px 12px",backgroundColor:"#f0f0f0",borderRadius:"8px",fontSize:"14px",color:"#333",cursor:"pointer",display:"flex",alignItems:"center",gap:"8px"},children:[(0,o.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#999",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,o.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,o.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}),(0,o.jsx)("span",{style:{fontWeight:600},children:t})]}),(0,o.jsx)("button",{onClick:()=>{l(""),s("")},style:{background:"none",border:"none",fontSize:"18px",color:"#999",curs
1or:"pointer",padding:"4px"},"aria-label":"Clear search",children:"\xd7"})]}):null,(0,o.jsxs)("div",{className:"mobile-buttons",style:{display:"flex",gap:"4px",alignItems:"center",width:"100%",justifyContent:"space-between"},children:[!n&&!t&&(0,o.jsx)("button",{className:"mobile-search-button",onClick:()=>i(!0),"aria-label":"Open search",children:(0,o.jsx)(k,{})}),(0,o.jsxs)("div",{style:{display:"flex",gap:"8px",alignItems:"center",marginLeft:n||t?0:void 0},children:[(0,o.jsx)("div",{className:"mobile-filter-dropdown",children:(0,o.jsxs)("select",{value:u?"favorites":h?"seattle":c?"forsale":"all",onChange:e=>{let t=e.target.value;d("forsale"===t),p("seattle"===t),"favorites"===t?m():u&&x()},style:{padding:"6px 8px",fontSize:"13px",borderRadius:"4px",minWidth:"85px",height:"32px"},children:[(0,o.jsx)("option",{value:"all",children:"All"}),(0,o.jsx)("option",{value:"forsale",children:"For Sale"}),(0,o.jsx)("option",{value:"seattle",children:"Seattle"}),f&&g>0&&(0,o.jsxs)("option",{value:"favorites",children:["Favorites (",g,")"]})]})}),(0,o.jsx)("div",{className:"mobile-sort-dropdown",children:(0,o.jsxs)("select",{className:"sort-select",value:(null==v?void 0:v.toLowerCase())||"newest",onChange:y,style:{padding:"6px 8px",fontSize:"13px",borderRadius:"4px",minWidth:"85px",height:"32px"},children:[(0,o.jsx)("option",{value:"newest",children:"Newest"}),(0,o.jsx)("option",{value:"oldest",children:"Oldest"}),(0,o.jsx)("option",{value:"favorited",children:"Favorited"}),(0,o.jsx)("option",{value:"popular",children:"Popular"}),b>=10&&(0,o.jsx)("option",{value:"quiz_recommendations",children:"Quiz Recs"})]})}),(0,o.jsx)(w,{})]})]})]})}function I(e){let{query:t,handleSearch:r,handleKeyDown:a,isMobileSearchVisible:n,setIsMobileSearchVisible:i,theme:l,is19thCenturyActive:s,setIs19thCenturyActive:c,isSoldActive:d,setIsSoldActive:u,isNFSActive:h,setIsNFSActive:p,isForSaleActive:m,setIsForSaleActive:x,remove19thCenturyParam:f,sortBy:g,onSortChange:v,GridToggleButton:y,SearchIcon:b}=e;return(0,o.jsx)(o.Fragment,{children:n?(0,o.jsxs)("div",{className:"search-container",style:{flexGrow:1},children:[(0,o.jsx)("input",{type:"text",placeholder:"Search artwork",className:"search-input",value:t,onChange:r,onKeyDown:a,autoFocus:!0,style:{backgroundColor:l?"var(--background-secondary-color)":void 0,color:l?"var(--text-color)":void 0,borderColor:l?"var(--separation-line)":void 0}}),(0,o.jsx)("button",{className:"clear-search",onClick:()=>i(!1),"aria-label":"Close search",style:{color:l?"var(--text-secondary-color)":void 0},children:"\xd7"})]}):(0,o.jsxs)("div",{className:"mobile-buttons",style:{display:"flex",gap:"4px",alignItems:"center",width:"100%",justifyContent:"space-between"},children:[(0,o.jsx)("button",{className:"mobile-search-button",onClick:()=>i(!0),"aria-label":"Open search",style:{color:l?"var(--text-color)":void 0},children:(0,o.jsx)(b,{})}),(0,o.jsxs)("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[(0,o.jsx)("div",{className:"mobile-filter-dropdown",children:(0,o.jsxs)("select",{value:s?"19thc":d?"sold":h?"nfs":m?"forsale":"all",onChange:e=>{let t=e.target.value;x("forsale"===t),p("nfs"===t),u("sold"===t),c("19thc"===t),"19thc"!==t&&f()},style:{padding:"6px 8px",fontSize:"13px",borderRadius:"4px",border:l?"1px solid var(--separation-line)":"1px solid #ddd",backgroundColor:l?"var(--background-secondary-color)":"white",color:l?"var(--text-color)":void 0,minWidth:"85px",height:"32px"},children:[(0,o.jsx)("option",{value:"all",children:"All"}),(0,o.jsx)("option",{value:"forsale",children:"For Sale"}),(0,o.jsx)("option",{value:"nfs",children:"NFS"}),(0,o.jsx)("option",{value:"sold",children:"Sold"}),(0,o.jsx)("option",{value:"19thc",children:"19th C"})]})}),(0,o.jsx)("div",{className:"mobile-sort-dropdown",children:(0,o.jsxs)("select",{className:"sort-select",value:(null==g?void 0:g.toLowerCase())||"newest",onChange:v,style:{padding:"6px 8px",fontSize:"13px",borderRadius:"4px",border:l?"1px solid var(--separation-line)":"1px solid #ddd",backgroundColor:l?"var(--background-secondary-color)":"white",color:l?"var(--text-color)":void 0,minWidth:"85px",height:"32px"},children:[(0,o.jsx)("option",{value:"activity",children:"Activity"}),(0,o.jsx)("option",{value:"newest",children:"Newest"}),(0,o.jsx)("option",{value:"oldest",children:"Oldest"}),(0,o.jsx)("option",{value:"favorited",children:"Favorited"})]})}),(0,o.jsx)(y,{})]})]})})}let z=e=>{let{salon:t,query:r,handleSearch:a,handleKeyDown:n,clearSearch:i,searchInputRef:l,isForSaleActive:s,setIsForSaleActive:c,isNFSActive:d,isSoldActive:u,is19thCenturyActive:h,isFavoritesActive:p,showSeattleOnly:m,setShowSeattleOnly:x,showOnlyFavorites:f,resetToAllArtworks:g,toggleForSale:v,toggleNFS:y,toggleSold:b,toggle19thCentury:w,user:k,favoritesCount:_,sortBy:j,onSortChange:S,quizVotesCount:A,cardSize:C,handleCardSizeChange:N}=e;return(0,o.jsx)("div",{className:"search-controls-row hidden md:flex md:items-center md:w-full",style:{gap:t?"8px":"10px",marginBottom:t?"8px":"20px"},children:t?(0,o.jsx)(R,{query:r,handleSearch:a,handleKeyDown:n,clearSearch:i,searchInputRef:l,theme:!0,isForSaleActive:s,isNFSActive:d,isSoldActive:u,is19thCenturyActive:h,toggleForSale:v,toggleNFS:y,toggleSold:b,toggle19thCentury:w,resetToAllArtworks:g,sortBy:j,onSortChange:S,cardSize:C,handleCardSizeChange:N,showPrices:e.showPrices,setShowPrices:e.setShowPrices}):(0,o.jsx)(P,{query:r,handleSearch:a,handleKeyDown:n,clearSearch:i,searchInputRef:l,isForSaleActive:s,setIsForSaleActive:c,isFavoritesActive:p,showSeattleOnly:m,setShowSeattleOnly:x,showOnlyFavorites:f,resetToAllArtworks:g,user:k,favoritesCount:_,sortBy:j,onSortChange:S,quizVotesCount:A,cardSize:C,handleCardSizeChange:N})})};function P(e){let{query:t,handleSearch:r,handleKeyDown:a,clearSearch:n,searchInputRef:i,isForSaleActive:l,setIsForSaleActive:s,isFavoritesActive:c,_showSeattleOnly:d,setShowSeattleOnly:u,showOnlyFavorites:h,resetToAllArtworks:p,user:m,favoritesCount:x,sortBy:f,onSortChange:g,quizVotesCount:v,cardSize:y,handleCardSizeChange:b}=e;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"search-container",style:{flexShrink:0,width:"320px",margin:0},children:[(0,o.jsx)("input",{type:"text",placeholder:"Search artwork...",className:"search-input",value:t,onChange:r,onKeyDown:a,ref:i,style:{width:"100%",height:"38px",fontSize:"14px",padding:"0 36px 0 12px",border:"1px solid var(--separation-line)",borderRadius:"4px"}}),t&&(0,o.jsx)("button",{className:"clear-search",onClick:n,"aria-label":"Clear search",children:"\xd7"})]}),(0,o.jsxs)("div",{className:"filter-buttons",style:{display:"flex",gap:"6px",flexShrink:0,height:"38px",alignItems:"center"},children:[(0,o.jsx)("button",{className:"filter-button ".concat(l?"active":""),onClick:()=>{s(!l),u(!1)},children:"For Sale"}),m&&(0,o.jsxs)("button",{className:"filter-button ".concat(c?"active":""),onClick:()=>{c?p():h(),s(!1),u(!1)},children:["Favorites (",x,")"]})]}),(0,o.jsxs)("div",{style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:"10px",height:"38px"},children:[(0,o.jsxs)("div",{className:"size-selector",children:[(0,o.jsx)("button",{className:"size-button small ".concat("small"===y?"active":""),onClick:()=>b("small"),"aria-label":"Set card size to small"}),(0,o.jsx)("button",{className:"size-button medium ".concat("medium"===y?"active":""),onClick:()=>b("medium"),"aria-label":"Set card size to medium"}),(0,o.jsx)("button",{className:"size-button large ".concat("large"===y?"active":""),onClick:()=>b("large"),"aria-label":"Set card size to large"})]}),(0,o.jsx)("div",{className:"sort-dropdown",children:(0,o.jsxs)("select",{className:"sort-select",value:(null==f?void 0:f.toLowerCase())||"newest",onChange:g,style:{height:"38px",border:"1px solid var(--separation-line)",borderRadius:"4px"},children:[(0,o.jsx)("option",{value:"newest",children:"Newest"}),(0,o.jsx)("option",{value:"oldest",children:"Oldest"}),(0,o.jsx)("option",{value:"favorited",children:"Most Liked"}),(0,o.jsx)("option",{value:"popular",children:"Popular"}),v>=10&&(0,o.jsx)("option",{value:"quiz_recommendations",children:"Qu
1iz Recommendations"})]})})]})]})}function R(e){let{query:t,handleSearch:r,handleKeyDown:a,clearSearch:i,searchInputRef:l,_theme:s,isForSaleActive:c,isNFSActive:d,isSoldActive:u,is19thCenturyActive:h,toggleForSale:p,toggleNFS:m,toggleSold:x,toggle19thCentury:f,resetToAllArtworks:g,sortBy:v,onSortChange:y,cardSize:b,handleCardSizeChange:w,showPrices:k,setShowPrices:_}=e,[j,S]=n.useState(!1),[A,C]=n.useState(!1),[N,L]=n.useState(!1),E=n.useRef(null),I=n.useRef(null),z=n.useRef(null),P=(e,t)=>{t.current&&(clearTimeout(t.current),t.current=null),e(!0)},R=(e,t)=>{t.current=setTimeout(()=>e(!1),250)},T=c?"for_sale":u?"sold":h?"19th_century":d?"nfs":"all",F="all"===T?"Collections":"for_sale"===T?"For Sale":"sold"===T?"Sold":"19th_century"===T?"19th Century":"nfs"===T?"Gallery Collection":"Collections",M="var(--separation-line)",B="var(--background-secondary-color)",U="var(--text-secondary-color)";return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"search-container",style:{flexGrow:1,height:34},children:[(0,o.jsx)("input",{type:"text",placeholder:"Search artwork...",className:"search-input",value:t,onChange:r,onKeyDown:a,ref:l,style:{height:34,fontSize:13}}),t&&(0,o.jsx)("button",{className:"clear-search",onClick:i,"aria-label":"Clear search",children:"\xd7"})]}),(0,o.jsxs)("div",{style:{position:"relative",flexShrink:0},onMouseEnter:()=>P(S,E),onMouseLeave:()=>R(S,E),children:[(0,o.jsxs)("button",{style:{display:"flex",alignItems:"center",gap:5,height:34,padding:"0 12px",borderRadius:6,border:"1px solid ".concat(M),background:"all"!==T?"var(--primary-color)":B,color:"all"!==T?"#fff":"var(--text-color)",fontSize:13,fontWeight:600,cursor:"pointer",transition:"all 0.15s",whiteSpace:"nowrap"},children:[F,(0,o.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,o.jsx)("path",{d:"M3 5l3 3 3-3"})})]}),j&&(0,o.jsx)("div",{style:{position:"absolute",top:"100%",left:0,marginTop:6,width:280,background:B,border:"1px solid ".concat(M),borderRadius:10,boxShadow:"0 8px 24px rgba(0,0,0,0.12)",zIndex:100,padding:6},children:[{id:"all",label:"All Art on Display",desc:"Everything currently on the walls",action:()=>null==g?void 0:g()},{id:"for_sale",label:"Available for Purchase",desc:"Artists keep 100% of sales",action:p},{id:"nfs",label:"Gallery Collection",desc:"Not for sale â foundation & private works",action:m},{id:"19th_century",label:"19th Century Masters",desc:"Historical European collection",action:f},{id:"sold",label:"Recently Sold",desc:"Works that found new homes",action:x},{id:"mechanical",label:"Mechanical Marvels",desc:"Antique mechanical music machines",href:"/salon/mechanical"}].map(e=>{let t=e.id===T;return e.href?(0,o.jsxs)("a",{href:e.href,style:{display:"block",padding:"8px 10px",borderRadius:7,textDecoration:"none",color:"var(--text-color)",transition:"background 0.15s"},onMouseEnter:e=>e.currentTarget.style.background="var(--background-color)",onMouseLeave:e=>e.currentTarget.style.background="transparent",children:[(0,o.jsx)("div",{style:{fontSize:13,fontWeight:600},children:e.label}),(0,o.jsx)("div",{style:{fontSize:11,color:U,marginTop:1},children:e.desc})]},e.id):(0,o.jsxs)("button",{onClick:()=>{e.action(),S(!1)},style:{display:"block",width:"100%",padding:"8px 10px",borderRadius:7,textAlign:"left",border:"none",cursor:"pointer",transition:"background 0.15s",background:t?"var(--background-color)":"transparent",color:"var(--text-color)"},onMouseEnter:e=>{t||(e.currentTarget.style.background="var(--background-color)")},onMouseLeave:e=>{t||(e.currentTarget.style.background="transparent")},children:[(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,o.jsx)("div",{style:{fontSize:13,fontWeight:t?700:500},children:e.label}),t&&(0,o.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--primary-color)",strokeWidth:"2.5",children:(0,o.jsx)("path",{d:"M5 13l4 4L19 7"})})]}),(0,o.jsx)("div",{style:{fontSize:11,color:U,marginTop:1},children:e.desc})]},e.id)})})]}),(0,o.jsxs)("div",{style:{position:"relative",flexShrink:0},onMouseEnter:()=>P(C,I),onMouseLeave:()=>R(C,I),children:[(0,o.jsx)("button",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:34,he
1ight:34,borderRadius:6,border:"1px solid ".concat(M),background:B,color:U,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:e=>e.currentTarget.style.color="var(--text-color)",onMouseLeave:e=>e.currentTarget.style.color=U,"aria-label":"Display settings",children:(0,o.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,o.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,o.jsx)("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]})}),A&&(0,o.jsxs)("div",{style:{position:"absolute",top:"100%",right:0,marginTop:6,width:200,background:B,border:"1px solid ".concat(M),borderRadius:10,boxShadow:"0 8px 24px rgba(0,0,0,0.12)",zIndex:100,padding:10},children:[(0,o.jsx)("div",{style:{fontSize:11,fontWeight:700,color:U,textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:8,padding:"0 4px"},children:"Display"}),(0,o.jsx)("div",{style:{display:"flex",gap:4,marginBottom:10},children:["small","medium","large"].map(e=>(0,o.jsx)("button",{onClick:()=>w(e),style:{flex:1,padding:"5px 0",borderRadius:5,fontSize:12,fontWeight:600,cursor:"pointer",border:"1px solid ".concat(b===e?"var(--primary-color)":M),background:b===e?"var(--primary-color)":"transparent",color:b===e?"#fff":"var(--text-color)",transition:"all 0.15s"},children:e.charAt(0).toUpperCase()+e.slice(1)},e))}),(0,o.jsxs)("button",{onClick:()=>null==_?void 0:_(e=>!e),style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",padding:"6px 8px",borderRadius:6,border:"none",background:"transparent",color:"var(--text-color)",fontSize:13,cursor:"pointer",transition:"background 0.15s"},onMouseEnter:e=>e.currentTarget.style.background="var(--background-color)",onMouseLeave:e=>e.currentTarget.style.background="transparent",children:[(0,o.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,o.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,o.jsx)("line",{x1:"12",y1:"1",x2:"12",y2:"23"}),(0,o.jsx)("path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"})]}),"Show Prices"]}),(0,o.jsx)("div",{style:{width:32,height:18,borderRadius:9,position:"relative",transition:"background 0.2s",background:k?"var(--primary-color)":"var(--separation-line)"},children:(0,o.jsx)("div",{style:{width:14,height:14,borderRadius:7,background:"#fff",position:"absolute",top:2,transition:"transform 0.2s",boxShadow:"0 1px 3px rgba(0,0,0,0.2)",transform:k?"translateX(16px)":"translateX(2px)"}})})]})]})]}),(0,o.jsxs)("div",{style:{position:"relative",flexShrink:0},onMouseEnter:()=>P(L,z),onMouseLeave:()=>R(L,z),children:[(0,o.jsx)("button",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:34,height:34,borderRadius:6,border:"1px solid ".concat(M),background:B,color:U,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:e=>e.currentTarget.style.color="var(--text-color)",onMouseLeave:e=>e.currentTarget.style.color=U,"aria-label":"Sort artwork",children:(0,o.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,o.jsx)("line",{x1:"4",y1:"6",x2:"16",y2:"6"}),(0,o.jsx)("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),(0,o.jsx)("line",{x1:"4",y1:"18",x2:"8",y2:"18"}),(0,o.jsx)("polyline",{points:"18 14 21 17 18 20"}),(0,o.jsx)("line",{x1:"21",y1:"17",x2:"21",y2:"9"})]})}),N&&(0,o.jsx)("div",{style:{position:"absolute",top:"100%",right:0,marginTop:6,width:160,background:B,border:"1px solid ".concat(M),borderRadius:10,boxShadow:"0 8px 24px rgba(0,0,0,0.12)",zIndex:100,padding:6},children:[{value:"activity",label:"Popular"},{value:"newest",label:"Newest"},{value:"oldest",label:"Oldest"},{value:"favorited",label:"Favorited"}].map(e=>{let t=((null==v?void 0:v.toLowerCase())||"activity")===e.value;return(0,o.jsxs)("button",{onClick:()=>{y({target:{value:e.value}}),L(!1)},style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",padding:"7px 10px",borderRadius:6,border:"none",cursor:"pointer",background:t?"var(--background-color)":"transparent",color:"var(--text-color)",fontSize:13,fontWeight:t?700:500,transition:"background 0.15s"},onMouseEnter:e=>{t||(e.currentTarget.style.background="var(--background-color)")},onMouseLeave:e=>{t||(e.currentTarget.style.background="transparent")},children:[e.label,t&&(0,o.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--primary-color)",strokeWidth:"2.5",children:(0,o.jsx)("path",{d:"M5 13l4 4L19 7"})})]},e.value)})})]})]})}let T=e=>{let{visible:t,salon:r}=e;return t?(0,o.jsx)("button",{onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},style:{position:"fixed",bottom:"20px",right:"20px",width:"48px",height:"48px",borderRadius:"50%",background:r?"var(--background-secondary-color)":"rgba(0, 0, 0, 0.8)",color:r?"var(--text-color)":"white",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",zIndex:100,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.3)",transition:"all 0.3s ease",fontSize:"24px"},onMouseEnter:e=>{e.currentTarget.style.transform="scale(1.1)",e.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.4)"},onMouseLeave:e=>{e.currentTarget.style.transform="scale(1)",e.currentTarget.style.boxShadow="0 2px 8px rgba(0, 0, 0, 0.3)"},"aria-label":"Scroll to top",children:"â"}):null}
1,F=e=>{let t,{isModalOpen:r,onClose:a,selectedArtwork:n,artistDetails:i,salon:s}=e;if(!r)return null;if(!n)return(0,o.jsxs)("div",{className:"flex items-center justify-center h-64",children:[(0,o.jsx)("div",{className:"spinner"}),(0,o.jsx)("p",{className:"ml-3",children:"Loading artwork details..."})]});let c=(0,b.e)(n.title);return(0,o.jsx)("div",{className:"artwork-modal-content",children:(0,o.jsxs)("div",{className:"flex flex-col md:flex-row gap-6",children:[(0,o.jsx)("div",{className:"md:w-1/2",children:(0,o.jsx)("img",{src:(0,g.m_)(n.main_photo_url,n.thumbnail_url),alt:c||"Artwork",className:"w-full h-auto rounded-lg shadow-lg"})}),(0,o.jsxs)("div",{className:"md:w-1/2",children:[c&&(0,o.jsx)("h2",{className:"text-2xl font-bold mb-2",children:c}),n.artist&&(0,o.jsx)(l(),{href:(t=i?i.url_identifier||i.person_id:n.artist.url_identifier||n.artist.id,(0,g.jH)(s,t)),className:"text-lg text-blue-600 hover:text-blue-800 mb-4 inline-block",onClick:e=>{e.stopPropagation(),a()},children:n.artist.first_name&&n.artist.last_name?"".concat(n.artist.first_name," ").concat(n.artist.last_name):n.artist.name||"Unknown Artist"}),n.description&&(0,o.jsx)("p",{className:"text-gray-700 mb-4 mt-4",children:n.description}),n.art_type&&(0,o.jsxs)("p",{className:"text-gray-600 mb-2",children:[(0,o.jsx)("span",{className:"font-medium",children:"Type:"})," ",n.art_type]}),n.updated&&(0,o.jsxs)("p",{className:"text-gray-600 mb-2",children:[(0,o.jsx)("span",{className:"font-medium",children:"Year:"})," ",n.updated.split("-")[0]]}),n.price&&(0,o.jsxs)("p",{className:"text-2xl font-bold text-green-600 mt-4",children:["$",Math.round(Number(n.price)).toLocaleString()]}),n.price&&!n.sold_at&&(0,o.jsxs)("p",{className:"text-2xl font-bold text-green-600 mt-4",children:["$",Math.round(Number(n.price.toString().replace(/,/g,""))).toLocaleString("en-US")]}),n.sold_at&&(0,o.jsx)("p",{className:"text-xl font-medium text-red-600 mt-4",children:"Sold"}),n.for_sale&&!n.price&&(0,o.jsx)("p",{className:"text-xl font-medium text-green-600 mt-4",children:"For Sale"})]})]})})};var M=r(14839);let B=(0,m.default)(()=>Promise.all([r.e(90844),r.e(6446),r.e(66711),r.e(16144),r.e(56724)]).then(r.bind(r,16144)),{loadableGenerated:{webpack:()=>[16144]},ssr:!1}),U=e=>{let{salon:t=!1,isModal:i=!1,onClose:m,initialIs19thCentury:k=!1}=e,_=(0,s.useRouter)(),j=(0,s.useSearchParams)(),S=(0,s.usePathname)(),C=(0,n.useRef)(null),N=(0,n.useRef)(null),E=(0,n.useRef)(!1),{user:I}=(0,h.As)(),{isMobile:P,isTablet:R}=(0,x.g)(),U=(0,n.useRef)(null),O=e=>(0,g.jH)(t,e),{revealedCards:D,handleImageLoad:W,observeCard:G}=function(){let[e,t]=(0,n.useState)(new Set),r=(0,n.useRef)({loaded:new Set,inView:new Set,revealed:new Set,batch:[],timer:null}).current,o=(0,n.useRef)(null),a=(0,n.useCallback)(()=>{r.timer=null;let e=r.batch.splice(0);e.length&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{e.forEach((e,r)=>{setTimeout(()=>t(t=>new Set(t).add(e)),50*r)})})})},[r]),i=(0,n.useCallback)(e=>{!r.revealed.has(e)&&r.loaded.has(e)&&r.inView.has(e)&&(r.revealed.add(e),r.batch.push(e),r.timer||(r.timer=setTimeout(a,16)))},[r,a]),l=(0,n.useCallback)(e=>{r.loaded.add(e),i(e)},[r,i]);return(0,n.useEffect)(()=>(o.current=new IntersectionObserver(e=>{e.forEach(e=>{if(!e.isIntersecting)return;let t=Number(e.target.getAttribute("data-artwork-id"));t&&(r.inView.add(t),i(t))})},{threshold:.1,rootMargin:"50px 0px"}),()=>{var e;return null==(e=o.current)?void 0:e.disconnect()}),[r,i]),{revealedCards:e,handleImageLoad:l,observeCard:(0,n.useCallback)(e=>{var t;e&&(null==(t=o.current)||t.observe(e))},[])}}(),{favorites:K,favoritesCount:H,justFaved:q,fetchFavorites:V,toggleFavorite:J,fetchFavoriteArtworks:Q}=function(e,t){let[r,o]=(0,n.useState)([]),[a,i]=(0,n.useState)(new Set),[l,s]=(0,n.useState)(0),c=(0,n.useCallback)(async()=>{var t,r;if(!e||!e.id)return;let a=await (0,y.fetchJsonSafe)("".concat(u.A.API_BASE_URL,"/art/art.php?action=get_person_favorite_photos&person_id=").concat(e.id,"&limit=100"),{headers:(0,v.getAuthHeaders)()});if(!a.ok||!(null==(t=a.data)?void 0:t.success)||!Array.isArray(a.data.photos)){a.status>=500&&console.warn("favorites unavailable on this backend (HTTP ".concat(a.status,")")),o([]),s(0);return}let n=a.data.photos;o(n.map(e=>e.id));let i=await (0,y.fetchJsonSafe)("".concat(u.A.API_BASE_URL,"/art/art.php?action=get_person_favorite_photo_count&person_id=").concat(e.id,"&limit=100"),{headers:(0,v.getAuthHeaders)()});i.ok&&(null==(r=i.data)?void 0:r.success)?s(i.data.count||0):s(n.length)},[e]),d=(0,n.useCallback)(async a=>{var n;if(!e||!e.id)return void t.push("/login");
1let l=r.includes(a),{ok:c,data:d}=await (0,y.fetchJsonSafe)("".concat(u.A.API_BASE_URL,"/art/art.php?action=").concat(l?"remove_person_favorite_photo":"add_person_favorite_photo","&person_id=").concat(e.id,"&photo_id=").concat(a),{headers:(0,v.getAuthHeaders)()});if(!c||!(null==d?void 0:d.success))return;l?o(e=>e.filter(e=>e!==a)):(o(e=>[...e,a]),i(e=>new Set(e).add(a)),setTimeout(()=>i(e=>{let t=new Set(e);return t.delete(a),t}),500));let h=await (0,y.fetchJsonSafe)("".concat(u.A.API_BASE_URL,"/art/art.php?action=get_person_favorite_photo_count&person_id=").concat(e.id,"&limit=100"),{headers:(0,v.getAuthHeaders)()});h.ok&&(null==(n=h.data)?void 0:n.success)?s(h.data.count||0):s(e=>Math.max(0,e+(l?-1:1)))},[e,r,t]);return{favorites:r,favoritesCount:l,justFaved:a,fetchFavorites:c,toggleFavorite:d,fetchFavoriteArtworks:(0,n.useCallback)(async()=>{if(!e||!e.id)return null;let{ok:t,data:r}=await (0,y.fetchJsonSafe)("".concat(u.A.API_BASE_URL,"/art/art.php?action=get_person_favorite_photos&person_id=").concat(e.id,"&limit=100"),{headers:(0,v.getAuthHeaders)()});return t&&(null==r?void 0:r.success)&&Array.isArray(r.photos)?r.photos.map(e=>{var t,r,o,a,n,i,l,s;let c=null!=(s=null!=(l=null==(t=e.portfolio)?void 0:t.id)?l:null==(r=e.artist)?void 0:r.id)?s:"person_art_portfolios"===e.type?e.data_id:null,d=(null==(o=e.artist)?void 0:o.url_identifier)||(null==(a=e.portfolio)?void 0:a.url_identifier)||(null==(n=e.artist)?void 0:n.username)||null;return{id:e.id,title:(0,b.e)(e.title)||"",art_type:"Artwork",main_photo_url:e.big||e.small||e.thumbnail,thumbnail_url:e.thumbnail||e.small,updated:e.date,artist:{id:c,url_identifier:d,name:(null==(i=e.artist)?void 0:i.name)||e.artist_name||""},isSource:e.is_source,for_sale:!0===e.for_sale||"true"===e.for_sale||1===e.for_sale||"1"===e.for_sale,width:e.width,height:e.height,price:e.price}}):null},[e])}}(I,_),[Y,$]=(0,n.useState)(()=>{let e=t?"artwork:salon:v4":"artwork:pda:v3";return(0,f.Z)(e)||[]}),[X,Z]=(0,n.useState)(t?"activity":"newest"),[ee,et]=(0,n.useState)(()=>{let e=t?"artwork:salon:v4":"artwork:pda:v3";return!(0,f.Z)(e)}),[er,eo]=(0,n.useState)(!0),[ea,en]=(0,n.useState)(1),[ei,el]=(0,n.use
1State)(""),[es,ec]=(0,n.useState)(""),ed=""!==es,[eu,eh]=(0,n.useState)("All"),[ep,em]=(0,n.useState)(0),[ex,ef]=(0,n.useState)("medium"),[eg,ev]=(0,n.useState)(!1),[ey,eb]=(0,n.useState)(t&&!k),[ew,ek]=(0,n.useState)(!1),[e_,ej]=(0,n.useState)(k),[eS,eA]=(0,n.useState)(!1),[eC,eN]=(0,n.useState)(null),[eL,eE]=(0,n.useState)(!1),[eI,ez]=(0,n.useState)(!1),[eP,eR]=(0,n.useState)(!1),[eT,eF]=(0,n.useState)(!1),[eM,eB]=(0,n.useState)(0),[eU,eO]=(0,n.useState)(!1),[eD,eW]=(0,n.useState)(null),[eG,eK]=(0,n.useState)(!1),[eH,eq]=(0,n.useState)(null),eV=(0,n.useRef)(!1),eJ=(0,n.useCallback)(()=>{if(t)return},[t,X,ei,eu,ey,eg,eL,ew,e_,eS,ex]),eQ=async e=>{try{let t=await fetch("".concat(u.A.API_BASE_URL,"/art/art.php?action=get_portfolio_details&id=").concat(e)),r=await t.json();r.portfolio&&eq(r.portfolio)}catch(e){console.error("Error fetching artist details:",e)}},eY=async function(e){let r=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(eW(null),eq(null),eK(!0),r&&t){let t="".concat(S,"?artwork=").concat(e);window.history.pushState({artworkModal:e},"",t),eV.current=!0}else eV.current=!1;try{let t=await fetch("".concat(u.A.API_BASE_URL,"/art/art.php?action=get_artwork&artwork_id=").concat(e)),r=await t.json();eW(r),r.artist&&r.artist.id&&eQ(r.artist.id)}catch(e){console.error("Error fetching artwork details:",e)}},e$=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];eK(!1),eW(null),eq(null),e&&t&&eV.current?(eV.current=!1,window.history.back()):t&&(null==j?void 0:j.get("artwork"))&&window.history.replaceState({},"",S)},eX=async()=>{if(!I||!I.id)return;let{shouldUseNewBackend:e}=await Promise.resolve().then(r.bind(r,14839)),t=e("vote")?"".concat(u.A.API_BASE_URL,"/api/v2/votes/battle-info"):"".concat(u.A.API_BASE_URL,"/art/vote.php?action=check_art_battle_info"),{fetchJsonSafe:o}=await Promise.resolve().then(r.bind(r,90075)),{ok:n,data:i}=await o(t,{headers:{Authorization:"Bearer ".concat((0,a.c4)())}});n&&(null==i?void 0:i.success)&&eB(i.votes_count||0)},eZ=async()=>{try{if(!I||!I.id)return;let{shouldUseNewBackend:e}=await Promise.resolve().then(r.bind(r,14839)),t=e("vote")?"".concat(u.A.API_BASE_URL,"/api/v2/votes/recommendations"):"".concat(u.A.API_BASE_URL,"/art/vote.php?action=art_battle_recommendations"),o=await fetch(t,{headers:{Authorization:"Bearer ".concat((0,a.c4)())}}),n=await o.json();if(n.success&&n.best){let e=n.best.map(e=>({id:e.id,title:e.title||"Untitled",art_type:"Artwork",main_photo_url:e.main_photo_url,thumbnail_url:e.main_photo_url,updated:e.year_created,artist:{id:e.artist_id,name:e.artist_name||"Unknown Artist"},isSource:!1,for_sale:!1,width:null,height:null,price:null}));$(e),em(e.length),eo(!1)}}catch(e){console.error("Error fetching quiz recommendations:",e)}finally{et(!1)}};(0,n.useEffect)(()=>{P&&ef("medium"),I&&(V(),eX())},[I,P]),(0,n.useEffect)(()=>{if(t)return;let e=null==j?void 0:j.get("query");e&&(el(e),ec(e))},[t]),(0,n.useEffect)(()=>{eJ()},[eJ]),(0,n.useEffect)(()=>{if(t||!Y.length||null===U.current)return;let e=U.current;U.current=null,setTimeout(()=>window.scrollTo({top:e,behavior:"auto"}),0)},[Y.length,t]);let e0=(0,n.useRef)(eG);(0,n.useEffect)(()=>{e0.current=eG},[eG]),(0,n.useEffect)(()=>{if(!t)return;let e=()=>{e0.current&&(eV.current=!1,eK(!1),eW(null),eq(null))};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[t]),(0,n.useEffect)(()=>{if(!t)return;let e=null==j?void 0:j.get("artwork");e&&eY(e,!1)},[t]),(0,n.useEffect)(()=>{let e=setTimeout(()=>ec(ei),500);return()=>clearTimeout(e)},[ei]),(0,n.useEffect)(()=>{let e=()=>{eF((window.pageYOffset||document.documentElement.scrollTop)>300)};return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)},[]),function(e){let{salon:t,artworks:r,favorites:o,cardSize:a,toggleFavorite:i,setSimilar:l}=e;(0,n.useEffect)(()=>(!t&&window.Fancybox&&(window.Fancybox.destroy(),window.Fancybox.bind('[data-fancybox="artwork"]',{groupAttr:"data-fancybox",defaultType:"image",Toolbar:{display:{right:["close"]}},Carousel:{Navigation:!1},Thumbs:!1,caption:(e,t)=>{var r;let o=JSON.parse(t.options).artworkData;if(!o)return"";let a=(null==(r=o.artist)?void 0:r.name)||"Unknown Artist",n=o.updated?o.updated.split("-")[0]:"",i=n?"".concat(a,", ").concat(n):a,l=(0,b.e)(o.title);return'\n <div class="custom-fancybox-caption">\n <div class="custom-fancybox-title-line">\n <button class="f-button fancybox-button--custom-prev" data-fancybox-prev aria-label="Previous">\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M15 3l-9 9 9 9"></path></svg>\n </button>\n <div>\n '.concat(l?'<h3 class="custom-fancybox-title">'.concat(l,"</h3>"):"",'\n <p class="custom-fancybox-subtitle">').concat(i,'</p>\n </div>\n <button class="f-button fancybox-button--custom-next" data-fancybox-next aria-label="Next">\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M9 3l9 9-9 9"></path></svg>\n </button>\n </div>\n </div>\n ')},on:{ready:e=>{e.container.addEventListener("click",async t=>{let a=t.target;if(a.closest(".btn-fancybox-similar")){let t=a.closest(".btn-fancybox-similar"),o=null==t?void 0:t.dataset.artworkId,n=r.find(e=>e.id.toString()===String(o));n&&(e.close(),l({id:n.id,name:n.title,artistName:n.artist.name,artwork:n,url_identifier:n.artist.url_identifier||n.artist.id}))}else if(a.closest(".btn-fancybox-favorite")){let e=a.closest(".btn-fancybox-favorite");if(!e)return;let t=parseInt(e.dataset.artworkId||"0",10);await i(t);let r=o.includes(t);e.innerHTML=r?"â¤ï¸ Favorited":"â¡ Favorite",e.classList.toggle("favorited",r)}else a.closest("[data-fancybox-prev]")?(t.stopPropagation(),e.prev()):a.closest("[data-fancybox-next]")&&(t.stopPropagation(),e.next())})}},click:"close",backdropClick:"close"})),()=>{!t&&window.Fancybox&&window.Fancybox.destroy()}),[r,o,a,i,t,l])}({salon:t,artworks:Y,favorites:K,cardSize:ex,toggleFavorite:J,setSimilar:eN});let e1=async()=>
1{if(!t)try{let e={action:"count_portfolio_photos"};es&&(e.caption=es,e.query=es),"All"!==eu&&(e.type=eu.toLowerCase()),eS?e.show_sold=1:ey&&!ew?e.for_sale=1:ew&&!ey&&(e.for_sale=0),eL&&(e.in_seattle=1);let t=Object.keys(e).map(t=>"".concat(t,"=").concat(encodeURIComponent(e[t]))).join("&"),r=await fetch("".concat(u.A.API_BASE_URL,"/art/art.php?").concat(t)),o=await r.json();"success"===o.status&&null!=o.total&&em(Number(o.total))}catch(e){}};(0,n.useEffect)(()=>{$([]),en(1),eo(!0),e2(1),e1()},[es,eu,X,eC,ey,eL,ew,e_,eS]);let e2=async e=>{try{if(et(1===e),"quiz_recommendations"===X&&I)return void await eZ();let o={order_dir:"DESC",per_artist:5};t?(o.n=32,o.page_num=e,o.sort=(null==X?void 0:X.toLowerCase())||"activity"):(o.limit=32,o.offset=(e-1)*32,o.order_by=(null==X?void 0:X.toLowerCase())||"newest");let a="search_portfolio_photos";t?(a="search_artwork",o.on_wall=1,o.salon_public=1,o.include_location=1,o.collection=e_?"19th-century-at-salon":"art-love-salon"):o.action=a,eL&&(o.is_artlove_salon=1),eC&&eC.id&&(o.similar=eC.id),es&&(o.query=es,o.caption=es),"All"!==eu&&(o.type=eu.toLowerCase(),o.photo_type=eu.toLowerCase()),eS?o.show_sold=1:ey&&!ew?o.for_sale=1:ew&&!ey&&(o.for_sale=0),e_&&(o.nineteenth_century=1);let{shouldUseNewBackend:n}=await Promise.resolve().then(r.bind(r,14839)),i=t&&n("artwork"),l=Object.keys(o).map(e=>"".concat(e,"=").concat(encodeURIComponent(o[e]))).join("&"),s=i?"".concat(u.A.API_BASE_URL,"/api/v2/artwork/search?").concat(l):t?"".concat(u.A.API_BASE_URL,"/art/art.php?action=").concat(a,"&").concat(l):"".concat(u.A.API_BASE_URL,"/art/art.php?").concat(l),c=await fetch(s),d=await c.json();if("success"===d.status||d.success){let r=d.photos||d.artwork||d.artworks||[],o=r.map(e=>{var r,o,a,n,i,l,s,c,d,u;return{id:e.id,title:e.title,art_type:e.photo_type||"All"!==eu?eu:"Artwork",main_photo_url:e.large_main_photo_url||e.full||e.main_photo_url||e.big||e.medium_url||e.small||e.thumbnail_url,thumbnail_url:e.thumbnail_url||e.thumbnail||e.small_url||e.small,updated:e.updated||e.date,artist:{id:null!=(d=null==(r=e.artist)?void 0:r.id)?d:e.artist_id,url_identifier:(null==(o=e.portfolio)?void 0:o.url_identifier)||(null==(a=e.artist)?void 0:a.url_identifier)||(null==(i=e.artist)||null==(n=i.person)?void 0:n.username),name:(null==(l=e.artist)?void 0:l.name)||e.artist_name||[null==(s=e.artist)?void 0:s.first_name,null==(c=e.artist)?void 0:c.last_name].filter(e=>"string"==typeof e&&""!==e.trim()).join(" ")||""},has_keywords:!!e.has_keywords,isSource:e.is_source,for_sale:!0===e.for_sale||"true"===e.for_sale||1===e.for_sale||"1"===e.for_sale,width:e.width,height:e.height,price:e.price,...t&&{acquisition_status:e.acquisition_status||null,price:e.price||null,sold_at:e.sold_at||null,not_for_sale:e.not_for_sale||!1,owner_id:null!=(u=e.owner_id)?u:null,..."level_name"in e&&{level_name:e.level_name||null}}}});if(1===e){eC&&eC.artwork&&o.length>0?$([{...eC.artwork,isSource:!0},...o]):$(o);let e=t?"artwork:salon:v4":"artwork:pda:v3";(0,f.l)(e,(null==eC?void 0:eC.artwork)?[{...eC.artwork,isSource:!0},...o]:o)}else $(e=>[...e,...o]);eo(r.length>0),en(e+1)}else console.error("Error fetching artworks:",d.message),eo(!1)}catch(e){console.error("Error fetching artworks:",e),eo(!1)}finally{et(!1)}},e5=e=>el(e.target.value),e4=e=>{"Enter"===e.key&&(e.preventDefault(),ec(ei))},e6=(0,n.useCallback)(()=>{if(!ee&&er&&!N.current&&!E.current){let e=ea+1;E.current=!0;let r=(e=>{let r=(e-1)*32,o={order_dir:"DESC"};return t?(o.n=32,o.page_num=e,o.sort=(null==X?void 0:X.toLowerCase())||"activity",o.action="search_artwork",o.on_wall=1,o.salon_public=1,o.include_location=1,o.collection=e_?"19th-century-at-salon":"art-love-salon"):(o.limit=32,o.offset=r,o.order_by=(null==X?void 0:X.toLowerCase())||"newest",o.action="search_portfolio_photos"),eL&&(o.is_artlove_salon=1),eC&&eC.id&&(o.similar=eC.id),es&&(o.query=es,o.caption=es),"All"!==eu&&(o.type=eu.toLowerCase(),o.photo_type=eu.toLowerCase()),eS?o.show_sold=1:ey&&!ew?o.for_sale=1:ew&&!ey&&(o.for_sale=0),e_&&(o.nineteenth_century=1),o})(e),o=t&&(0,M.shouldUseNewBackend)("artwork");fetch(o?"".concat(u.A.API_BASE_URL,"/api/v2/artwork/search?").concat(new
1URLSearchParams(r).toString()):t?"".concat(u.A.API_BASE_URL,"/art/pda.php"):"".concat(u.A.API_BASE_URL,"/art/art.php?").concat(new URLSearchParams(r).toString()),{method:o?"GET":t?"POST":"GET",headers:t&&!o?{"Content-Type":"application/x-www-form-urlencoded"}:void 0,body:t&&!o?new URLSearchParams(r).toString():void 0}).then(e=>e.json()).then(t=>{("success"===t.status||t.photos)&&(N.current={data:t.photos||[],page:e},(t.photos||[]).forEach(e=>{(e.thumbnail||e.small)&&(new Image().src=e.thumbnail||e.small)}))}).catch(e=>console.error("Error preloading:",e)).finally(()=>{E.current=!1})}},[ea,er,ee,t]),e3=e=>{ef(e)},e8=async()=>{if(!I)return void _.push("/login");if(0===H)return void ev(!1);ev(!0),et(!0);try{let e=await Q();e&&($(e),em(e.length),eo(!1))}catch(e){console.error("Error fetching favorites:",e)}finally{et(!1)}},e9=()=>{if(t&&(null==j?void 0:j.get("19thCentury"))){let e=new URL(window.location.href);e.searchParams.delete("19thCentury"),window.history.replaceState({},"",e.pathname+(e.search||""))}},e7=()=>{$([]),en(1),eo(!0),ev(!1),eb(!1),ek(!1),ej(!1),e9(),eA(!1),eE(!1),null!==eC?eN(null):e2(1)},te=e=>Z(e.target.value),tt=(e=>{switch(e){case"small":return{default:8,1600:7,1400:6,1100:5,800:4,600:3,480:3,320:2};case"large":return{default:3,1200:2,800:1,500:1};default:return{default:5,1400:4,1100:3,800:2,600:2,480:2}}})(ex);return(0,o.jsx)(p.vd,{children:(0,o.jsxs)("div",{className:"wrap content animated fadeIn ".concat(t?"salon-artwork":""),children:[!t&&(0,o.jsxs)(p.mg,{children:[(0,o.jsxs)("title",{children:[t?"ArtLove Salon - Zero-Commission Gallery":"Explore Art"," - ",u.A.PROJECT_NAME]}),(0,o.jsx)("meta",{name:"description",content:t?"Discover exceptional artworks at Seattle's only zero-commission gallery. 100% of sales go to artists. Located across from Seattle Art Museum.":"Discover and explore artwork from Seattle artists on ".concat(u.A.PROJECT_NAME)})]}),!t&&(0,o.jsxs)("div",{className:"art-search-header",style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",paddingBottom:"0"},children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h1",{onClick:e7,style:{cursor:"pointer",marginBottom:"8px"},children:"Explore Artwork"}),(0,o.jsxs)("p",{className:"hidden md:block",style:{marginTop:0,color:"var(--text-secondary-color)",marginBottom:0},children:[ep>0?"".concat(ep.toLocaleString()," works"):"Works"," by Seattle artists."]})]}),(0,o.jsx)("div",{className:"hidden md:block",style:{textAlign:"center",flexShrink:0,marginLeft:"24px"},children:I?eM>=10?(0,o.jsx)("button",{className:"btn btn-sm",onClick:()=>_.push("/artwork/vote"),style:{backgroundColor:"var(--color-danger)",color:"white",border:"none",padding:"8px 16px",borderRadius:"6px",fontSize:"14px",fontWeight:"500",cursor:"pointer"},children:"Update Quiz"}):null:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("p",{style:{margin:"0 0 8px 0",fontSize:"14px",color:"var(--text-secondary-color)"},children:[(0,o.jsx)(l(),{href:"/register?source=artwork_gallery_join",style:{fontWeight:"bold"},children:"Join"})," to save your favorites."]}),(0,o.jsx)("button",{className:"btn btn-sm",onClick:()=>_.push("/register?source=get_listed_artwork"),children:"List Your Work"})]})})]}),!I&&(0,o.jsxs)("div",{className:"md:hidden",style:{padding:"12px",backgroundColor:"var(--background-secondary-color)",border:"1px solid var(--separation-line)",borderRadius:"8px",margin:"0 0 16px",textAlign:"center"},children:[(0,o.jsxs)("p",{style:{margin:"0 0 8px 0",fontSize:"14px",color:"var(--text-secondary-color)"},children:[(0,o.jsx)(l(),{href:"/register?source=artwork_gallery_join",style:{fontWeight:"bold",color:"var(--primary-color)"},children:"Create a free account"})," to save your favorite artworks."]}),(0,o.jsx)(l(),{href:"/register?source=get_listed_artwork",style:{fontSize:"14px",color:"var(--text-teritary-color)"},children:"Are you an artist? Get listed."})]}),t&&(0,o.jsx)("div",{className:"md:hidden",style:{display:"flex",justifyContent:"flex-end",padding:"0 4px 8px"},children:(0,o.jsxs)("button",{onClick:()=>eO(e=>!e),style:{display:"flex",alignItems:"center",gap:4,padding:"3px 10px",borderRadius:16,fontSize:11,fontWeight:600,cursor:"pointer",border:"1px solid var(--separation-line)",background:eU?"var(--primary-color)":"var(--background-secondary-color)",color:eU?"#fff":"var(--text-secondary-color)",transition:"all 0.2s"},children:[(0,o.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,o.jsx)("line",{x1:"12",y1:"1",x2:"12",y2:"23"}),(0,o.jsx)("path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"})]}),eU?"Prices On":"Show Prices"]}
1)}),!t&&(0,o.jsx)("div",{className:"search-filters-container desktop-only",style:{display:"none"}}),(0,o.jsx)(L,{salon:t,query:ei,handleSearch:e5,handleKeyDown:e4,isMobileSearchVisible:eP,setIsMobileSearchVisible:eR,setQuery:el,setDebouncedQuery:ec,isForSaleActive:ey,setIsForSaleActive:eb,isNFSActive:ew,setIsNFSActive:ek,isSoldActive:eS,setIsSoldActive:eA,is19thCenturyActive:e_,setIs19thCenturyActive:ej,isFavoritesActive:eg,showSeattleOnly:eL,setShowSeattleOnly:eE,showOnlyFavorites:e8,resetToAllArtworks:e7,remove19thCenturyParam:e9,user:I,favoritesCount:H,sortBy:X,onSortChange:te,quizVotesCount:eM,cardSize:ex,handleCardSizeChange:e3}),(0,o.jsx)(z,{salon:t,query:ei,handleSearch:e5,handleKeyDown:e4,clearSearch:()=>{var e;el(""),null==(e=C.current)||e.focus()},searchInputRef:C,isForSaleActive:ey,setIsForSaleActive:eb,isNFSActive:ew,isSoldActive:eS,is19thCenturyActive:e_,isFavoritesActive:eg,showSeattleOnly:eL,setShowSeattleOnly:eE,showOnlyFavorites:e8,resetToAllArtworks:e7,toggleForSale:()=>{eb(e=>{let t=!e;return t&&(ek(!1),ej(!1),e9(),eA(!1)),t})},toggleNFS:()=>{ek(e=>{let t=!e;return t&&(eb(!1),ej(!1),e9(),eA(!1)),t})},toggleSold:()=>{eA(e=>{let t=!e;return t&&(eb(!1),ek(!1),ej(!1),e9()),t})},toggle19thCentury:()=>{ej(e=>{let t=!e;return t?(eb(!1),ek(!1),eA(!1)):e9(),t})},user:I,favoritesCount:H,sortBy:X,onSortChange:te,quizVotesCount:eM,cardSize:ex,handleCardSizeChange:e3,showPrices:eU,setShowPrices:eO}),(0,o.jsx)("div",{className:"results-row hidden ".concat(t?"md:flex":"md:block"),style:t?{flexDirection:"row",justifyContent:"space-between",alignItems:"center",flexWrap:"nowrap",gap:"0px",marginBottom:"8px",overflow:"hidden"}:{},children:(0,o.jsx)("div",{className:"results-count",style:t?{flexShrink:0,whiteSpace:"nowrap",minWidth:"auto"}:{},children:eC&&eC.name&&(0,o.jsxs)(o.Fragment,{children:["Showing artworks similar to ",(0,o.jsxs)("strong",{children:['"',eC.name,'"']})," by"," ",eC.url_identifier?(0,o.jsx)(l(),{href:O(eC.url_identifier),children:eC.artistName}):eC.artistName,(0,o.jsx)("button",{className:"btn",onClick:e7,style:{marginLeft:"10px"},children:"Clear similar"})]})})}),t&&e_&&(0,o.jsxs)("div",{style:{backgroundColor:t?"var(--background-secondary-color)":"#f8f4e6",padding:"30px",marginBottom:"30px",borderRadius:"8px",textAlign:"left",width:"100%",margin:"20px 0 30px 0"},children:[(0,o.jsx)("h2",{style:{color:t?"var(--text-color)":"#5a4a3a",marginBottom:"15px",fontFamily:"Georgia, serif"},children:"Journey Through Time with 19th Century Masterpieces"}),(0,o.jsx)("p",{style:{fontSize:"16px",lineHeight:"1.8",color:t?"var(--text-secondary-color)":"#6a5a4a",fontStyle:"italic"},children:"These exceptional 19th century masterpieces from our collection represent a golden age when art was deeply cherished and celebrated by society. From the romanticism of the early 1800s to the impressionist revolution of the late century, these works capture the spirit of an era when artists pursued beauty, truth, and emotional depth. While these treasured pieces are not available for purchase, they serve as inspiration and cultural touchstones, reminding us of the enduring power of artistic excellence."})]}),ee&&0===Y.length?(0,o.jsxs)("div",{className:"loading-container",style:{minHeight:"400px",display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,o.jsx)("div",{className:"spinner"}),(0,o.jsx)("p",{style:{marginLeft:"15px"},children:"Loading artworks..."})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.A,{dataLength:Y.length,next:()=>{if(!ee&&er)if(N.current&&N.current.page===ea+1){let e=N.current.data,r=t?e.map(e=>{var t;return{id:e.id,title:(0,g.Gz)(e.title||"Untitled"),art_type:e.art_type||"Artwork",main_photo_url:e.large_main_photo_url||e.full||e.big||e.small||e.thumbnail,thumbnail_url:e.thumbnail||e.small,updated:e.date,artist:{id:e.person_id,name:(0,g.Gz)(e.artist_name||"Artist")},isSource:e.is_source,for_sale:!0===e.for_sale||"true"===e.for_sale||1===e.for_sale||"1"===e.for_sale,width:e.width,height:e.height,price:e.price,not_for_sale:e.not_for_sale,artist_id:e.artist_id,person_id:e.person_id,score:e.score,owner_id:null!=(t=e.owner_id)?t:null,..."level_name"in e&&{level_name:e.level_name||null}}}):e;$(e=>[...e,...r]),en(N.current.page),eo(r.length>0),N.current=null}else e2(ea)},hasMore:er,endMessage:Y.length>0&&(0,o.jsx)("p",{className:"end-message",children:ed?"All matching artwork dis
1played":"You've seen all the artwork!"}),scrollThreshold:.8,loader:(0,o.jsxs)("div",{style:{textAlign:"center",padding:"20px"},children:[(0,o.jsx)("div",{className:"spinner"}),(0,o.jsx)("p",{style:{marginTop:"10px"},children:"Loading more artwork..."})]}),onScroll:()=>{let e=window.pageYOffset||document.documentElement.scrollTop,t=document.documentElement.scrollHeight;!((e+window.innerHeight)/t>.5)||N.current||E.current||e6()},children:(0,o.jsx)(d.A,{breakpointCols:P?"large"===ex?1:2:tt,className:"art-masonry-grid card-size-".concat(ex),columnClassName:"art-masonry-column",children:Y.map(e=>(0,o.jsx)(A,{artwork:e,salon:t,cardSize:ex,favorites:K,justFaved:q,user:I,observeCard:G,handleImageLoad:W,handleOpenModal:e=>eY(e),toggleFavorite:J,setSimilar:eN,saveBrowseState:eJ,getArtistHref:O,revealedCards:D,router:_,showPrices:eU},e.id))})}),0===Y.length&&!ee&&(0,o.jsxs)("div",{className:"no-results",children:[(0,o.jsx)("h2",{children:"No artwork found"}),(0,o.jsx)("p",{children:"Try adjusting your search terms or filters"})]})]}),t&&(0,o.jsxs)("div",{className:"artwork-submit-cta",style:{backgroundColor:"var(--background-secondary-color)",padding:"20px",marginTop:"30px",borderRadius:"8px",textAlign:"center",border:"1px solid var(--separation-line)"},children:[(0,o.jsx)("p",{style:{fontSize:"15px",color:"var(--text-secondary-color)",marginBottom:"12px"},children:"Artists: Submit your work to ArtLove Salon through PublicDisplay.ART"}),(0,o.jsx)(l(),{href:"/register?source=artlove_salon",style:{display:"inline-block",padding:"10px 24px",backgroundColor:"var(--primary-color)",color:"#fff",textDecoration:"none",borderRadius:"6px",fontSize:"14px",fontWeight:"500"},children:"Get Listed"})]}),t&&eG&&eD&&(0,o.jsx)(B,{artwork:eD,artworkLabel:(0,g.zx)(eD),isModal:!0,onClose:e$}),!t&&(0,o.jsx)(w,{isOpen:eG,onClose:e$,children:(0,o.jsx)(F,{isModalOpen:eG,onClose:e$,selectedArtwork:eD,artistDetails:eH,salon:t})}),(0,o.jsx)(T,{visible:eT,salon:t})]})})}},90075:(e,t,r)=>{async function o(e){try{let t=await e.text();if(!t)return null;try{return JSON.parse(t)}catch(e){return null}}catch(e){return null}}async function a(e,t){try{let r=await fetch(e,t),a=await o(r);return{ok:r.ok,status:r.status,data:a}}catch(e){return{ok:!1,status:0,data:null}}}r.d(t,{fetchJsonSafe:()=>a})},95022:(e,t,r)=>{r.d(t,{A:()=>n});var o=r(13203),a=r(95704);let n=(()=>{var e;let t=null==(e=a.env.NEXT_PUBLIC_BASE_URL)?void 0:e.trim(),r=e=>e?e.replace(/\/art\/pda\/api\/?$/,"").replace(/\/$/,""):"",n=r(t||"https://artlove.org"),i=r(t&&!t.includes("localhost")?t:"https://artlove.org");return{PROJECT_NAME:"PublicDisplay.ART",GOOGLE_MAPS_API_KEY:"AIzaSyBFLTrDlQY3RQl0DK0k7cl0fRjUzYFzlc0",GOOGLE_MAPS_MAP_ID_GENERIC:"100704e43f4a423",GOOGLE_AUTH_CLIENT_ID:"949747515912-71e071mpbh0fhvig3o1pbliaslh5jl39.apps.googleusercontent.com",GOOGLE_RECAPTCHA_SITE_KEY:a.env.NEXT_PUBLIC_RECAPTCHA_SITE_KEY||"",isDevelopment:!1,DEFAULT_API_BASE_URL:n,API_BASE_URL:n,LIVE_API_BASE_URL:i,DEFAULT_USER_ID:"default_user",endpoints:{login:"/api/auth/login",register:"/api/auth/register",logout:"/api/auth/logout",profile:"/api/users/profile"},features:{enableAuth:!0,enableNotifications:!0},settings:{itemsPerPage:10,maxFileSize:5242880,supportedFileTypes:["image/jpeg","image/png","image/gif"]},getCurrentUserId:()=>{let e=(0,o.LE)();if(null==e)return"default_user";let t="number"==typeof e?e:parseInt(String(e),10);return Number.isFinite(t)?t:"default_user"},isUserLoggedIn:()=>!!(0,o.c4)(),init:()=>{}}})()}}]);
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.