PageSourceSearch

https://kunstverein.de/assets/EditionsView-65ecf79e.js

js kunstverein.de collected 2026-09-24 22:21:33 UTC 6,878 bytes, 52 lines download raw bytes

1import{_ as se,u as re,y as r,z as o,w as oe,T as u,c as E,C as le,D as J,o as l,a as m,b as h,d as a,H as ie,f as ce,h as p,K as de,n as P,F as g,r as F,g as I,k as ue,l as me,Z as d,N as fe,G as b,O as _,M as ye,p as j,m as B,e as w,S as D,X as $,v as ve,Y as he}from"./index-eba7dab5.js";import{P as H}from"./Product-265fd880.js";import"./currency-bd860670.js";const pe={class:"pad"},ge=["innerHTML"],be={__name:"EditionsView",async setup(_e){let f,N;const{getURL:R}=ue(),{getAttr:Y,getStatic:y,getFormat:W}=ve(),T=he,v=re();v.query.year&&(r.value=v.query.year),v.query.artist&&(o.value=v.query.artist);const z=R("texts","Jahresgaben Information"),{isFetching:we,error:Se,data:V}=([f,N]=oe(()=>me(z,{refetch:!0}).json()),f=await f,N(),f),c=u(),G=u();u([]);const S=u([]),C=u([]),k=E(()=>{switch(d.value){case"":return"";case"current":return y("Aktuell");case"past":return y("Archiv");default:return""}});le(()=>{J(),window.addEventListener("resize",J)});const L={graph:`
2        id
3        title
4        products(first: 200, sortKey: TITLE, reverse: true) { 
5            edges {
6                node {
7                    id
8                    title
9                    vendor
10                    handle
11                    availableForSale
12                    persons: metafield(key: "person", namespace: "custom") {
13                        name: value
14                    }
15                    year: metafield(key: "year", namespace: "custom") {
16                        value
17                    }
18                    images(first: 1) {
19                        edges {
20                            node {
21                                id
22                                url
23                                width
24                                height
25                                altText
26                            }
27                        }
28                    }
29                    priceRange {
30                        minVariantPrice {
31                            amount
32                            currencyCode
33                        }
34                        maxVariantPrice {
35                            amount
36                            currencyCode
37                        }
38                    }
39                }
40            }
41        }
42    `};(async()=>{try{const s=`
43        query getProductsInCollection($handle: String!) @inContext(language: DE){
44            collection(handle: $handle) {
45                ${L.graph}
46            }
47        }`,n=`
48        query getProductsInCollection($handle: String!) @inContext(language: EN){
49            collection(handle: $handle) {
50                ${L.graph}
51            }
52        }`,e=await fetch("https://kunstvereininhamburg.myshopify.com/api/2024-01/graphql.json",{method:"POST",headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":"e7ed9dd1c633b73814de26449cc2ef38"},body:JSON.stringify({query:n,variables:{handle:"editions"}})}),A=await(await fetch("https://kunstvereininhamburg.myshopify.com/api/2024-01/graphql.json",{method:"POST",headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":"e7ed9dd1c633b73814de26449cc2ef38"},body:JSON.stringify({query:s,variables:{handle:"jahresgaben"}})})).json(),Z=await e.json(),{data:x,errors:ke,extensions:Ae}=A,{data:ee,errors:xe,extensions:Ee}=Z;c.value=x,G.value=ee;const q=new Set;for(const t of x.collection.products.edges)if(t.node.persons){const i=t.node.persons.name,ne=JSON.parse(i);q.add(JSON.stringify(ne))}const ae=Array.from(q).map(t=>JSON.parse(t)).flatMap(t=>t).sort((t,i)=>t.localeCompare(i));S.value=ae;const M=new Set;for(const t of x.collection.products.edges)if(t.node.year){const i=W("fullyear",t.node.year.value);M.add(i)}const te=Array.from(M).map(t=>parseInt(t)).sort((t,i)=>i-t);C.value=te}catch(s){console.error("Error:",s)}})();const Q=s=>{r.value=s,o.value="",d.value="",document.getElementById("top").scrollIntoView({behavior:"smooth",block:"start"})},X=s=>{o.value=s,r.value="",d.value="",document.getElementById("top").scrollIntoView({behavior:"smooth",block:"start"})},K=()=>{fe.value&&(b.value=!1,_.value=!1)},O=E(()=>
52{if(!c.value||!c.value.collection||!c.value.collection.products||!c.value.collection.products.edges)return[];const s=c.value.collection.products.edges;let n;return!o.value&&!r.value?n=s:n=s.filter(e=>r.value&&e.node.year?e.node.year.value===r.value.toString():o.value&&e.node.persons?JSON.parse(e.node.persons.name).some(A=>A.trim().toLowerCase()===o.value.trim().toLowerCase()):!1),d.value==="current"?n=n.filter(e=>e.node.year&&e.node.year.value==="2025"):d.value==="past"?n=n.filter(e=>e.node.year&&e.node.year.value!="2025"):d.value,n});return E(()=>b.value||_.value),(s,n)=>(l(),m(g,null,[h(ie,{infotext:a(V).text,filter:k.value,filter2:a(o),filter3:a(r),Pagetitle1:a(y)("Jahresgaben"),Pagelink1:"#top",years:C.value,purenames:S.value},null,8,["infotext","filter","filter2","filter3","Pagetitle1","years","purenames"]),h(ce,{filter:k.value,title:a(y)("Jahresgaben"),filter2:a(o),filter3:a(r)},null,8,["filter","title","filter2","filter3"]),h(ye),p("div",{class:P(["BigWrapper TopMobileMargin",{Effect1:a(j)}])},[h(de,{years:C.value,names:S.value,"show-years":a(b),"show-list-names":a(_),blackbg:!1,onSelectYear:Q,onSelectArtist:X,onHideFilter:K},null,8,["years","names","show-years","show-list-names"]),p("main",{class:P(["EditionsContainer",{Effect2:a(j),FilterView:a(b)||a(_)}]),onClick:n[0]||(n[0]=(...e)=>a(B)&&a(B)(...e))},[p("section",pe,[!a(o)&&!a(r)?(l(!0),m(g,{key:0},F(a(V).text.text_blocks,e=>(l(),m("p",{class:"fs-0 lh-1 mar-b-1 width-1",innerHTML:e[a(Y)("text")]},null,8,ge))),256)):I("",!0),p("div",{class:P(["Editions",{bottomgap:a(r)||a(o)||k.value}])},[a(T)==="en"?(l(!0),m(g,{key:0},F(O.value,e=>(l(),w(a($),{class:"c0-0",to:{name:"Product",params:{slug:e.node.handle}}},{default:D(()=>[(l(),w(H,{key:e.node.id,title:e.node.title,vendor:e.node.vendor,price:e.node.priceRange.minVariantPrice.amount,handle:e.node.handle,images:e.node.images.edges,names:e.node.persons,year:e.node.year!==null?e.node.year.value:"",Availability:e.node.availableForSale,AddOption:!1,FullImgWidth:"true"},null,8,["title","vendor","price","handle","images","names","year","Availability"]))]),_:2},1032,["to"]))),256)):I("",!0),a(T)==="de"?(l(!0),m(g,{key:1},F(O.value,e=>(l(),w(a($),{class:"c0-0",to:{name:"Product",params:{slug:e.node.handle}}},{default:D(()=>[(l(),w(H,{key:e.node.id,title:e.node.title,vendor:e.node.vendor,price:e.node.priceRange.minVariantPrice.amount,handle:e.node.handle,images:e.node.images.edges,names:e.node.persons,year:e.node.year!==null?e.node.year.value:"",Availability:e.node.availableForSale,AddOption:!1,FullImgWidth:"true"},null,8,["title","vendor","price","handle","images","names","year","Availability"]))]),_:2},1032,["to"]))),256)):I("",!0)],2)])],2)],2)],64))}},Ve=se(be,[["__scopeId","data-v-c6e635f2"]]);export{Ve as default};

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.