PageSourceSearch

https://konst24.se/_next/static/chunks/7672-12c5e77d92321175.js

js konst24.se collected 2026-10-03 21:37:22 UTC 27,062 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7672],{7672:(e,r,t)=>{Promise.resolve().then(t.t.bind(t,98500,23)),Promise.resolve().then(t.bind(t,35041)),Promise.resolve().then(t.bind(t,85955))},24806:(e,r,t)=>{"use strict";function a(e){let r=e?.trim()??"";return r?/\b(absolute|fixed|sticky)\b/.test(r)?r:`relative ${r}`:"relative"}t.d(r,{o:()=>a})},35041:(e,r,t)=>{"use strict";t.d(r,{default:()=>A});var a=t(95155),l=t(89623),s=t(12115),n=t(73321),i=t(98500),o=t.n(i),c=t(84347),d=t(73446),u=t(52798),g=t(55382),m=t(21490),h=t(90772),x=t(12787),p=t(97612),b=t(86556),y=t(45236),f=t(70569),v=t(84276),k=t(37882);function j({locale:e,criteria:r}){let{data:t,status:l}=(0,k.useSession)(),i=(0,n.useRouter)(),o=(0,d.QC)(e),[c,u]=(0,s.useState)(!1),[g,m]=(0,s.useState)(""),[h,x]=(0,s.useState)(!1),[p,b]=(0,s.useState)(null);if("authenticated"!==l||!t?.user||!Object.values(r).some(e=>null!=e&&""!==e&&!1!==e))return null;async function y(){if(g.trim()){x(!0),b(null);try{let e=await fetch("/api/collector/saved-searches",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:g.trim(),locale:o,criteria:r})});if(401===e.status)return void i.push(`/${o}/signin`);if(!e.ok){let r=await e.json().catch(()=>({}));b(r.error||(0,f.U)(o,"collectorEngine.savedSearch.error"));return}(0,v.trackEvent)("filter_used",{action:"save_search"}),u(!1),m(""),i.push(`/${o}/saved-searches`)}catch{b((0,f.U)(o,"collectorEngine.savedSearch.error"))}finally{x(!1)}}}return(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>!e),className:"px-3 py-1.5 text-sm rounded-lg border border-neutral-300 dark:border-neutral-600 hover:bg-neutral-100 dark:hover:bg-neutral-800",children:(0,f.U)(o,"collectorEngine.savedSearch.save")}),c?(0,a.jsxs)("div",{className:"absolute z-20 mt-2 right-0 w-72 p-3 rounded-lg border border-neutral-200 dark:border-neutral-700 bg-white dark:bg-neutral-900 shadow-lg",children:[(0,a.jsx)("label",{className:"block text-sm font-medium mb-1",children:(0,f.U)(o,"collectorEngine.savedSearch.nameLabel")}),(0,a.jsx)("input",{type:"text",value:g,onChange:e=>m(e.target.value),maxLength:120,className:"w-full px-2 py-1.5 text-sm border rounded-md dark:bg-neutral-800 dark:border-neutral-600",placeholder:(0,f.U)(o,"collectorEngine.savedSearch.namePlaceholder")}),p?(0,a.jsx)("p",{className:"text-xs text-red-600 mt-2",children:p}):null,(0,a.jsxs)("div",{className:"flex gap-2 mt-3 justify-end",children:[(0,a.jsx)("button",{type:"button",onClick:()=>u(!1),className:"px-2 py-1 text-sm",children:(0,f.U)(o,"common.cancel")}),(0,a.jsx)("button",{type:"button",disabled:h||!g.trim(),onClick:y,className:"px-3 py-1 text-sm rounded-md bg-neutral-900 text-white dark:bg-white dark:text-neutral-900 disabled:opacity-50",children:h?(0,f.U)(o,"collectorEngine.savedSearch.saving"):(0,f.U)(o,"collectorEngine.savedSearch.confirm")})]})]}):null]})}let w={items:[],totalCount:0};async function N(e,r=fetch){let t=await r(e,{cache:"no-store"});if(t.ok)try{var a=await t.json();if(!a||"object"!=typeof a)return w;let e=Array.isArray(a.items)?a.items:[],r="number"==typeof a.totalCount&&Number.isFinite(a.totalCount)?Math.max(0,Math.floor(a.totalCount)):e.length;return{items:e,totalCount:r,artists:Array.isArray(a.artists)?a.artists:void 0,eligibleCount:"number"==typeof a.eligibleCount?a.eligibleCount:void 0,pageSize:"number"==typeof a.pageSize?a.pageSize:void 0,skip:"number"==typeof a.skip?a.skip:void 0,catalogPreviewSv:!0===a.catalogPreviewSv,showSwedishCatalogFallback:!0===a.showSwedishCatalogFallback}}catch{return w}if(function(e){try{let r=e.startsWith("http")?new URL(e):new URL(e,"http://gallery.local");return"/api/artworks"===r.pathname||r.pathname.endsWith("/api/artworks")}catch{return!1}}(e)&&(404===t.status||204===t.status))return w;throw Error("gallery_fetch_failed")}let S=e=>N(e),C=(0,s.memo)(function({hideHubStrip:e=!1,topicStripSlot:r,translations:t={},initialArtworks:i,initialTotalCount:k,initialSearchParams:w={},catalogPreviewSv:N=!1,compactFilters:C=!1,marketplaceBrowse:P=!1,marketplacePageSize:M}){let A,T=t??{},U=e=>{if(!T||"object"!=typeof T)return e;try{return(0,c.n)(T,e)}catch{return e}},E=(0,n.useRouter)(),$=(0,n.usePathname)()||(0,b.getGalleryPath)("sv"),F=$.split("/").filter(
1Boolean),L=(0,d.QC)(F[0]??"sv"),R=w.q||"",W=w.sort||"",[O,_]=(0,s.useState)(R),[D,B]=(0,s.useState)(R),z=(0,s.useRef)(R);(0,s.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get("q")||"";e!==z.current&&(z.current=e,_(e),B(e))},[$]),(0,s.useEffect)(()=>{let e=setTimeout(()=>{B(O);let e=new URLSearchParams(window.location.search);O.trim()?e.set("q",O.trim()):e.delete("q");let r=e.toString(),t=r?`${$}?${r}`:$;window.location.pathname+(window.location.search||"")!==t&&E.replace(t,{scroll:!1}),O.trim().length>0&&(0,v.trackSearch)(O.trim(),0)},300);return()=>clearTimeout(e)},[O,$,E]);let H=W&&["newest","price-asc","price-desc","featured-desc"].includes(W)?W:"newest",[q,I]=(0,s.useState)(H),[G,Q]=(0,s.useState)(w.medium||""),J=(0,s.useRef)(G);(0,s.useEffect)(()=>{J.current!==G&&(J.current=G,G&&(0,v.trackFilter)("medium",G.slice(0,64)))},[G]);let K=(0,s.useRef)(q);(0,s.useEffect)(()=>{K.current!==q&&(K.current=q,q&&"newest"!==q&&(0,v.trackFilter)("sort",q))},[q]),(0,s.useEffect)(()=>{let e=new URLSearchParams(window.location.search),r=e.get("sort")||"";Q(e.get("medium")||""),I(["newest","price-asc","price-desc","featured-desc"].includes(r)?r:"newest")},[$]);let[V,X]=(0,s.useState)(""),[Y,Z]=(0,s.useState)(""),[ee,er]=(0,s.useState)(""),[et,ea]=(0,s.useState)(""),[el,es]=(0,s.useState)(""),[en,ei]=(0,s.useState)(""),[eo,ec]=(0,s.useState)(""),[ed,eu]=(0,s.useState)(!1),[eg,em]=(0,s.useState)(!1),eh=M&&M>0?M:P&&C?250:24,ex=Math.max(1,Number.parseInt(w.page||"1",10)||1),[ep,eb]=(0,s.useState)(ex);(0,s.useEffect)(()=>{eb(Math.max(1,Number.parseInt(w.page||"1",10)||1))},[w.page]);let ey=(0,s.useMemo)(()=>{let e=new URLSearchParams;return P?(e.set("take",String(eh)),e.set("marketplace","1"),e.set("skip",String(Math.max(0,(ep-1)*eh)))):(e.set("take",String(eh)),e.set("diverse","1")),D&&e.set("q",D),G&&e.set("medium",G),V&&e.set("category",V),Y&&e.set("minPrice",Y),ee&&e.set("maxPrice",ee),et&&e.set("minWidth",et),el&&e.set("maxWidth",el),en&&e.set("minHeight",en),eo&&e.set("maxHeight",eo),ed&&e.set("available","true"),q&&e.set("sort",q),e.set("locale",L),`/api/artworks?${e.toString()}`},[L,D,G,V,Y,ee,et,el,en,eo,ed,q,P,eh,ep]),ef=(0,s.useMemo)(()=>{let e={};return D&&(e.q=D),G&&(e.medium=G),V&&(e.category=V),Y&&(e.minPrice=Y),ee&&(e.maxPrice=ee),et&&(e.minWidth=et),el&&(e.maxWidth=el),en&&(e.minHeight=en),eo&&(e.maxHeight=eo),ed&&(e.available=!0),q&&"featured-desc"!==q&&(e.sort=q),e},[D,G,V,Y,ee,et,el,en,eo,ed,q]),ev=Array.isArray(i)?i:[],ek=ev.length>0&&!D&&!G&&!V&&!Y&&!ee&&!ed&&ep===ex&&("newest"===q||"featured-desc"===q||!q),{data:ej,error:ew,isLoading:eN,isValidating:eS,mutate:eC}=(0,l.Ay)(ey,S,{revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,dedupingInterval:6e4*!!ek,errorRetryCount:2,errorRetryInterval:1e3,fallbackData:ek?{items:ev,totalCount:"number"==typeof k&&k>=0?k:void 0,pageSize:eh,skip:Math.max(0,(ep-1)*eh)}:void 0,revalidateOnMount:!ek,keepPreviousData:!0,revalidateIfStale:!1});(0,s.useEffect)(()=>{ek||eC()},[ey,ek,eC]);let eP=Array.isArray(ej?.items)?ej.items:[],eM=Array.isArray(ej?.artists)?ej.artists:[],eA=N||!!ej?.catalogPreviewSv,eT=eP.length>0?eP:ek?ev:[],eU=eN||eS&&null==ej,eE=ek&&ev.length>0,e$=(0,s.useMemo)(()=>{let e=(eT||[]).filter(e=>!!e&&(!!(Array.isArray(e.images)&&e.images.some(e=>!!e?.url))||!!e.imageUrl||!!e.imageKey));return eA?e:(0,h.MB)(e,L)},[eT,L,eA]),eF=eA?"sv":L,eL=null!=(A="number"==typeof ej?.totalCount&&Number.isFinite(ej.totalCount)?Math.floor(ej.totalCount):null)&&A>=0?A:"number"==typeof k&&Number.isFinite(k)&&k>=0?Math.floor(k):e$.length,eR=0===eL?0:Math.max(0,(ep-1)*eh)+1,eW=Math.min(ep*eh,eL),eO=eL>0&&eh>0?Math.ceil(eL/eh):0,e_=(0,s.useCallback)(e=>{let r=new URLSearchParams;return D.trim()&&r.set("q",D.trim()),G&&r.set("medium",G),V&&r.set("category",V),Y&&r.set("minPrice",Y),ee&&r.set("maxPrice",ee),et&&r.set("minWidth",et),el&&r.set("maxWidth",el),en&&r.set("minHeight",en),eo&&r.set("maxHeight",eo),ed&&r.set("available","true"),q&&"newest"!==q&&r.set("sort",q),e>1&&r.set("page",String(e)),P?(0,b.getGalleryHref)(L,r.toString()):r.toString()?`${$}?${r.toString()}`:$},[D,G,V,Y,ee,et,el,en,eo,ed,q,$,L,P]),eD=e=>{let r=Math.max(1,Math.min(e,Math.max(1,eO)));eb(r),E.replace(e_(r),{scroll:!0})},eB=[D,G,V,Y,ee,et,el,en,eo,ed?"1":"0",q].join("|"),ez=(0,s.useRef)(eB);(0,s.useEffect)(()=>{ez.current===eB||(ez.current=eB,P&&1!==ep&&(eb(1),E.replace(e_(1),{scroll:!1})))},[eB,P,ep,E,e_]);let eH=eU&&0===e$.length&&!eE,eq=!!ew&&0===e$.length,eI=C?"block text-sm font-medium text-stone-700 dark:text-stone-300 mb-2 h-6 flex items-center":"block text-sm font-medium text-slate-700 dark:text-darkText mb-2 uppercase tracking-wide h-6 flex items-center";return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)("div",{className:C?"mb-8 rounded-2xl border border-stone-200/90 bg-white px-4 py-5 shadow-[0_8px_30px_rgba(15,23,42,0.06)] dark:border-stone-700/80 dark:bg-stone-900/50 sm:px-6 sm:py-6":"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 pb-6 mb-12",children:(0,a.jsx)("div",{className:C?"w-full":"w-full px-3 sm:px-4 lg:px-5 xl:px-6",children:(0,a.jsxs)("div",{className:"space-y-6",children:[r,e||r?null:(0,a.jsx)(x.A,{locale:L,variant:"embedded"}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 items-end",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("label",{className:eI,children:(0,f.U)(L,"gallery.search")}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("div",{className:"absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none",children:(0,a.jsx)("svg",{className:"h-5 w-5 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),(0,a.jsx)("input",{"data-testid":"gallery-search",placeholder:U("gallery.searchPlaceholder")||(0,p.l$)("searchPlaceholder",L),value:O,onChange:e=>_(e.target.value),className:`w-full pl-12 pr-4 py-3 h-[48px] border border-gray-300 dark:border-gray-600 focus:ring-2 focus:ring-slate-900 dark:focus:ring-slate-400 focus:border-slate-900 dark:focus:border-slate-400 transition-all duration-200 bg-white dark:bg-gray-700 text-gray-900 dark:text-darkText ${C?"rounded-xl":"rounded-md"}`})]})]}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("label",{className:eI,children:U("gallery.paintingMedium")||(0,p.l$)("category",L)}),(0,a.jsxs)("select",{value:G,onChange:e=>Q(e.target.value),className:`w-full px-4 py-3 h-[48px] border border-gray-300 dark:border-gray-600 focus:ring-2 focus:ring-slate-900 dark:focus:ring-slate-400 focus:border-slate-900 dark:focus:border-slate-400 bg-white dark:bg-gray-700 text-gray-900 dark:text-darkText ${C?"rounded-xl":"rounded-md"}`,children:[(0,a.jsx)("option",{value:"",children:U("gallery.allMediums")||(0,p.l$)("allMediums",L)}),(0,a.jsx)("option",{value:"Oil",children:U("gallery.oilOnCanvas")||(0,g.translateCanonicalTaxonomy)("Oil",L,"medium")}),(0,a.jsx)("option",{value:"Acrylic",children:U("gallery.acrylicOnCanvas")||(0,g.translateCanonicalTaxonomy)("Acrylic",L,"medium")}),(0,a.jsx)("option",{value:"Watercolor",children:U("gallery.watercolorOnPaper")||(0,g.translateCanonicalTaxonomy)("Watercolor",L,"medium")}),(0,a.jsx)("option",{value:"Mixed Media",children:U("gallery.mi
1xedMediaOnCanvas")||(0,g.translateCanonicalTaxonomy)("Mixed Media",L,"medium")}),(0,a.jsx)("option",{value:"Digital Art",children:U("gallery.digitalArt")||(0,u.g8)("Digital Art",L)}),(0,a.jsx)("option",{value:"Sculpture",children:U("gallery.sculpture")||(0,u.g8)("Sculpture",L)}),(0,a.jsx)("option",{value:"Drawing",children:U("gallery.drawing")||(0,u.g8)("Drawing",L)}),(0,a.jsx)("option",{value:"Print",children:(0,g.translateCanonicalTaxonomy)("Print",L,"medium")})]})]}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("label",{htmlFor:"gallery-sort-select",className:eI,children:U("gallery.sort")||(0,p.l$)("sort",L)}),(0,a.jsxs)("select",{id:"gallery-sort-select",value:q,onChange:e=>{let r=e.target.value;I(r);let t=new URLSearchParams(window.location.search);r&&"newest"!==r?t.set("sort",r):t.delete("sort");let a=t.toString();E.replace(a?`${$}?${a}`:$,{scroll:!1})},className:`w-full px-4 py-3 h-[48px] border border-gray-300 dark:border-gray-600 focus:ring-2 focus:ring-slate-900 dark:focus:ring-slate-400 focus:border-slate-900 dark:focus:border-slate-400 bg-white dark:bg-gray-700 text-gray-900 dark:text-darkText ${C?"rounded-xl":"rounded-md"}`,children:[(0,a.jsx)("option",{value:"newest",children:U("gallery.newest")||(0,p.l$)("newest",L)}),(0,a.jsx)("option",{value:"price-asc",children:U("gallery.priceAsc")||(0,p.l$)("priceAsc",L)}),(0,a.jsx)("option",{value:"price-desc",children:U("gallery.priceDesc")||(0,p.l$)("priceDesc",L)})]})]})]}),(0,a.jsx)("div",{className:"flex justify-center pt-2",children:(0,a.jsxs)("button",{onClick:()=>em(!eg),className:"flex items-center gap-2 px-4 py-2 text-sm text-slate-700 dark:text-darkText hover:text-slate-900 dark:hover:text-darkText font-medium border border-slate-300 dark:border-gray-600 rounded-md hover:bg-slate-50 dark:hover:bg-gray-700 transition-colors",children:[(0,a.jsx)("svg",{className:`w-4 h-4 transition-transform ${eg?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),eg?U("gallery.hideAdvancedFilters")||(0,p.l$)("hideAdvancedFilters",L):U("gallery.showAdvancedFilters")||(0,p.l$)("showAdvancedFilters",L)]})}),eg&&(0,a.jsxs)("div",{className:"space-y-4 border-t border-gray-200 dark:border-gray-700 pt-4",children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 dark:text-darkText mb-1",children:U("gallery.priceRange")}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{placeholder:"Min",value:Y,onChange:e=>Z(e.target.value),className:"flex-1 px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 text-gray-900 dark:text-darkText"}),(0,a.jsx)("input",{placeholder:"Max",value:ee,onChange:e=>er(e.target.value),className:"flex-1 px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 text-gray-900 dark:text-darkText"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:U("gallery.size")}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{placeholder:"W min",value:et,onChange:e=>ea(e.target.value),className:"flex-1 px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 text-gray-900 dark:text-darkText"}),(0,a.jsx)("input",{placeholder:"W max",value:el,onChange:e=>es(e.target.value),className:"flex-1 px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 text-gray-900 dark:text-darkText"})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[(0,a.jsx)("div",{className:"flex items-center gap-4",children:(0,a.jsxs)("label",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"checkbox",checked:ed,onChange:e=>eu(e.target.checked),className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}),(0,a.jsx)("span",{className:"text-sm text-gray-700",children:U("gallery.availableOnly")})]})}),(0,a.jsx)("button",{onClick:()=>{_(""),Q(""),X(""),Z(""),er(""),ea(""),es(""),ei(""),ec(""),eu(!1),E.replace($,{scroll:!1})},className:"text-sm text-blue-600 hover:text-blue-800 font-medium",children:U("gallery.clearFilters")})]})]})]})})}),(0,a.jsxs)("div",{className:"space-y-4 w-full",children:[!eU&&!ew&&(0,a.jsx)("div",{className:"flex flex-col gap-4 mb-8 pb-4 border-b border-gray-200 dark:border-gray-700",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("div",{className:"text-sm text-slate-600 font-medium",children:eL>0||eM.length>0?(0,a.jsx)("span",{children:P?(0,a.jsxs)(a.Fragment,{children:[eL," ",(0,f.U)(L,"gallery.artworksFound"),eO>1?(0,a.jsx)("span",{className:"ml-2 text-slate-500 font-normal",children:(0,f.U)(L,"gallery.showingRange",{from:eR,to:eW,total:eL})}):null]}):(0,a.jsx)(a.Fragment,{children:(0,f.U)(L,"gallery.selectedArtworksShown",{count:e$.length>0?e$.length:eL})})}):(0,a.jsx)("span",{children:(0,f.U)(L,"gallery.noResults")})}),e$.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-sm text-slate-500",children:[(0,a.jsxs)("span",{"data-testid":"gallery-sort-label",children:[(0,f.U)(L,"gallery.sortedBy")," ","newest"===q?(0,f.U)(L,"gallery.newest"):"price-asc"===q?(0,f.U)(L,"gallery.priceAsc"):"price-desc"===q?(0,f.U)(L,"gallery.priceDesc"):q]}),(0,a.jsx)(j,{locale:L,criteria:ef})]})]})}),eM.length>0&&!eH?(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)("h3",{className:"text-sm font-bold text-gray-900 dark:text-darkText uppercase tracking-wide mb-3",children:(0,f.U)(L,"search.matchingArtists")}
1),(0,a.jsx)("ul",{className:"flex flex-wrap gap-3",children:eM.map(e=>{let r=e.slug||(0,y.Fd)(e),t=(0,y.xq)(e,L);return(0,a.jsx)("li",{children:(0,a.jsxs)(o(),{href:(0,b.getArtistProfilePath)(L,r),className:"flex items-center gap-2 rounded-full border border-gray-200 dark:border-gray-600 bg-white dark:bg-gray-800 pr-4 pl-1 py-1 hover:border-blue-400",children:[e.image?(0,a.jsx)("img",{src:e.image,alt:"",className:"h-9 w-9 rounded-full object-cover"}):(0,a.jsx)("span",{className:"h-9 w-9 rounded-full bg-stone-200 dark:bg-gray-600"}),(0,a.jsx)("span",{className:"text-sm font-medium text-gray-900 dark:text-darkText",children:t})]})},e.id)})})]}):null,eH&&(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4",children:[...Array(6)].map((e,r)=>(0,a.jsxs)("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden animate-pulse",children:[(0,a.jsx)("div",{className:"aspect-[4/3] bg-gray-200"}),(0,a.jsxs)("div",{className:"p-6 space-y-3",children:[(0,a.jsx)("div",{className:"h-4 bg-gray-200 rounded w-3/4"}),(0,a.jsx)("div",{className:"h-3 bg-gray-200 rounded w-1/2"}),(0,a.jsx)("div",{className:"h-3 bg-gray-200 rounded w-1/4"})]})]},r))}),eq&&(0,a.jsxs)("div",{className:"bg-red-50 border border-red-200 rounded-lg p-6 text-center",children:[(0,a.jsx)("div",{className:"text-red-600 mb-2",children:(0,a.jsx)("svg",{className:"mx-auto h-12 w-12",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})})}),(0,a.jsx)("h3",{className:"text-lg font-medium text-red-800 mb-2",children:U("gallery.errorTitle")}),(0,a.jsx)("p",{className:"text-red-600 mb-4",children:U("gallery.errorMessage")}),(0,a.jsx)("button",{onClick:()=>window.location.reload(),className:"px-4 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700 transition-colors",children:U("gallery.retry")})]}),!eH&&e$.length>0&&(0,a.jsx)("div",{className:"artwork-grid",children:e$.map(e=>(0,a.jsx)(m.default,{a:e,locale:eF},e.id))}),P&&eO>1&&!eH&&eL>0?(0,a.jsxs)("nav",{className:"mt-10 flex flex-wrap items-center justify-center gap-3","aria-label":(0,f.U)(L,"gallery.paginationAria"),"data-gallery-pagination":"1",children:[ep>1?(0,a.jsx)("a",{href:e_(ep-1),className:"px-4 py-2 text-sm font-medium text-slate-700 underline underline-offset-2 hover:text-slate-900 dark:text-slate-200",onClick:e=>{e.preventDefault(),eD(ep-1)},children:(0,f.U)(L,"gallery.prevPage")}):null,(0,a.jsx)("span",{className:"text-sm text-slate-600 dark:text-slate-300",children:(0,f.U)(L,"gallery.pageOf",{page:ep,pages:eO})}),ep<eO?(0,a.jsx)("a",{href:e_(ep+1),className:"px-4 py-2 text-sm font-medium text-slate-700 underline underline-offset-2 hover:text-slate-900 dark:text-slate-200",onClick:e=>{e.preventDefault(),eD(ep+1)},children:(0,f.U)(L,"gallery.nextPage")}):null,(0,a.jsx)("ol",{className:"mt-2 flex w-full flex-wrap justify-center gap-2 list-none p-0",children:Array.from({length:Math.min(eO,40)},(e,r)=>r+1).map(e=>(0,a.jsx)("li",{children:(0,a.jsx)("a",{href:e_(e),className:e===ep?"px-2 py-1 text-sm font-semibold text-slate-900 dark:text-white":"px-2 py-1 text-sm text-blue-700 underline underline-offset-2 dark:text-blue-400","aria-current":e===ep?"page":void 0,onClick:r=>{r.preventDefault(),eD(e)},children:e})},e))})]}):null,!eH&&!eq&&0===e$.length&&0===eM.length&&(0,a.jsxs)("div",{className:"bg-gray-50 dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-12 text-center",children:[(0,a.jsx)("div",{className:"text-gray-400 mb-4",children:(0,a.jsx)("svg",{className:"mx-auto h-16 w-16",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.172 16.172a4 4 0 015.656 0M9 12h6m-6-4h6m2 5.291A7.962 7.962 0 0112 15c-2.34 0-4.29-1.009-5.824-2.709M15 12a3 3 0 11-6 0 3 3 0 016 0z"})})}),(0,a.jsx)("h3",{className:"text-lg font-medium text-gray-800 mb
1-2",children:U("gallery.noResultsTitle")}),(0,a.jsx)("p",{className:"text-gray-600 mb-4",children:U("gallery.noResultsMessage")}),(0,a.jsx)("button",{onClick:()=>{_(""),Q(""),X(""),Z(""),er(""),ea(""),es(""),ei(""),ec(""),eu(!1),E.replace($,{scroll:!1})},className:"px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 active:scale-[0.99] transition-all duration-150",children:U("gallery.clearFilters")})]})]})]})},(e,r)=>e.hideHubStrip===r.hideHubStrip&&e.topicStripSlot===r.topicStripSlot&&e.initialArtworks===r.initialArtworks&&e.initialTotalCount===r.initialTotalCount&&e.initialSearchParams===r.initialSearchParams&&e.catalogPreviewSv===r.catalogPreviewSv&&e.compactFilters===r.compactFilters&&e.marketplacePageSize===r.marketplacePageSize&&e.marketplaceBrowse===r.marketplaceBrowse),P=function(e){return(0,a.jsx)(C,{...e})};class M extends s.Component{constructor(e){super(e),this.resetError=()=>{this.setState({hasError:!1,error:void 0})},this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,r){console.error("ErrorBoundary caught an error:",e,r);try{fetch("/api/analytics/event",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event:"error_boundary_caught",parameters:{error_message:e.message,error_stack:void 0,component_stack:void 0},timestamp:new Date().toISOString(),path:window.location.pathname})}).catch(e=>{console.error("Failed to log error to analytics:",e)})}catch(e){console.error("Failed to send error analytics:",e)}}render(){if(this.state.hasError){if(this.props.fallback){let e=this.props.fallback;return(0,a.jsx)(e,{error:this.state.error,resetError:this.resetError})}return(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900",children:(0,a.jsxs)("div",{className:"max-w-md w-full bg-white rounded-lg shadow-lg p-8 text-center",children:[(0,a.jsx)("div",{className:"text-red-500 mb-4",children:(0,a.jsx)("svg",{className:"mx-auto h-16 w-16",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})})}),(0,a.jsx)("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Something went wrong"}),(0,a.jsx)("p",{className:"text-gray-600 mb-6",children:"We're sorry, but something unexpected happened. Please try refreshing the page."}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("button",{onClick:this.resetError,className:"w-full bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Try Again"}),(0,a.jsx)("button",{onClick:()=>window.location.reload(),className:"w-full bg-gray-200 text-gray-800 px-4 py-2 rounded-lg hover:bg-gray-300 transition-colors",children:"Refresh Page"})]}),!1]})})}return this.props.children}}function A({translations:e,initialArtworks:r,initialTotalCount:t,initialSearchParams:l,catalogPreviewSv:s=!1,hideHubStrip:n=!1,topicStripSlot:i,compactFilters:o=!1,marketplaceBrowse:c=!1,marketplacePageSize:d}){let u=Array.isArray(r)?r:[];return(0,a.jsx)(M,{fallback:({resetError:e})=>(0,a.jsxs)("div",{className:"py-12 text-center text-slate-600 dark:text-slate-400",children:[(0,a.jsx)("p",{className:"mb-4",children:"Gallery could not be loaded. Please try again."}),(0,a.jsx)("button",{type:"button",onClick:e,className:"px-4 py-2 bg-slate-200 dark:bg-slate-700 rounded-lg hover:bg-slate-300 dark:hover:bg-slate-600 mr-2",children:"Try again"}),(0,a.jsx)("button",{type:"button",onClick:()=>window.location.reload(),className:"px-4 py-2 bg-slate-200 dark:bg-slate-700 rounded-lg hover:bg-slate-300 dark:hover:bg-slate-600",children:"Reload page"})]}),children:(0,a.jsx)(P,{translations:e??{},initialArtworks:u,initialTotalCount:t,initialSearchParams:l,catalogPreviewSv:s,hideHubStrip:n,topicStripSlot:i,compactFilters:o,marketplaceBrowse:c,marketplacePageSize:d})})}},85955:(e,r,t)=>{"use strict";t.d(r,{default:()=>n});var a=t(95155),l=t(46829),s=t(24806);function n({wrapperClassName:e,wrapperStyle:r,className:t,style:i,draggable:o,onClick:c,onContextMenu:d,...u}){return(0,a.jsx)("div",{...l.Wi,[l.p$]:"",className:(0,s.o)(e),style:{WebkitUserSelect:"none",userSelect:"none",...r},children:(0,a.jsx)("img",{...u,draggable:o??!1,className:t,onContextMenu:e=>{e.preventDefault(),d?.(e)},onClick:c,style:{WebkitTouchCallout:"none",...i}})})}},90772:(e,r,t)=>{"use strict";t.d(r,{B$:()=>n,MB:()=>i});var a=t(73446),l=t(45236);t(81788);var s=t(27920);function n(e){if(!e?.length)return[];let r=new Set,t=[];for(let a of e){if(!a)continue;let e=null!=a.id&&String(a.id).length>0?String(a.id):"";if(e){if(r.has(e))continue;r.add(e)}t.push(a)}return t}function i(e,r){let t=function(e,r){if(!e?.length)return[];let t=(0,a.QC)(r),s=new Set,n=[];for(let r of e){if(!r)continue;let e=r.artist;if(!e){n.push(r);continue}try{let a=(0,l.I_)(t,e,r).toLowerCase().replace(/\/+$/,"");if(s.has(a))continue;s.add(a)}catch{}n.push(r)}return n}(n(e),r);return(0,s.lu)(t,r)}}}]);

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.