PageSourceSearch

https://www.alba.art/_next/static/chunks/pages/projects/[slug]-bf5ab4306a3482c3.js

js alba.art collected 2026-10-03 21:26:17 UTC 12,262 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7445],{62013:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/projects/[slug]",function(){return s(37040)}])},46228:function(e,t,s){"use strict";s.d(t,{D:function(){return m}});var a=s(85893),r=s(67294),n=s(71667),l=s(96146),i=s(66403),c=s(24879);let o=(0,l.v)({chain:i.R,transport:(0,c.b)()}),d=e=>/^0x[0-9a-fA-F]{40}$/.test(e),m=e=>{let{contractAddress:t,tokenId:s,label:l,className:i="h-full w-full"}=e,[c,m]=(0,r.useState)(),[x,h]=(0,r.useState)();return((0,r.useEffect)(()=>{if(m(void 0),h(void 0),!d(t)||!Number.isSafeInteger(s)||s<0){h("This token does not have a valid Ethereum contract reference.");return}let e=!0;return o.readContract({address:t,abi:n.c,functionName:"tokenHTML",args:[BigInt(s)]}).then(t=>{e&&m(t)}).catch(t=>{e&&h(t instanceof Error?t.message:"Unable to load tokenHTML from Ethereum.")}),()=>{e=!1}},[t,s]),x)?(0,a.jsx)("div",{className:"flex items-center justify-center bg-gray-950 p-8 text-center text-sm text-red-300 ".concat(i),children:x}):c?(0,a.jsx)("iframe",{title:"".concat(l," on-chain render"),srcDoc:c,sandbox:"allow-scripts",className:"border-0 ".concat(i)}):(0,a.jsxs)("div",{className:"flex items-center justify-center bg-gray-950 p-8 text-center text-sm text-gray-300 ".concat(i),children:["Reconstructing ",l," from Ethereum…"]})}},13095:function(e,t,s){"use strict";s.d(t,{X:function(){return a}});let a=e=>{let t=new URL(e);return"https:"===t.protocol&&"alba.mypinata.cloud"===t.hostname&&t.pathname.startsWith("/ipfs/")?(t.searchParams.set("img-width","512"),t.searchParams.set("img-quality","76"),t.searchParams.set("img-format","webp"),t.searchParams.set("img-fit","scale-down"),t.searchParams.set("img-anim","false"),t.searchParams.set("img-onerror","redirect"),t.toString()):e}},37040:function(e,t,s){"use strict";s.r(t),s.d(t,{__N_SSG:function(){return b},default:function(){return j}});var a=s(85893),r=s(9008),n=s.n(r),l=s(25675),i=s.n(l),c=s(41664),o=s.n(c),d=s(11163),m=s(74740),x=s(38329),h=s(67294),u=s(46228);let g=e=>{let{collectionName:t,collectionSlug:s,contractAddress:r,token:n,hasPrevious:l,hasNext:c,onClose:o,onPrevious:d,onNext:m}=e,[g,p]=(0,h.useState)(),[b,j]=(0,h.useState)(),[v,N]=(0,h.useState)("image");(0,h.useEffect)(()=>{let e=new AbortController;return p(void 0),j(void 0),N("image"),fetch(n.metadataPath,{headers:{accept:"application/json"},signal:e.signal}).then(async e=>{if(!e.ok)throw Error("Metadata request failed with HTTP ".concat(e.status,"."));return await e.json()}).then(p).catch(t=>{e.signal.aborted||j(t instanceof Error?t.message:"Unable to load archived metadata.")}),()=>e.abort()},[n.metadataPath]),(0,h.useEffect)(()=>{let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[]);let y=(null==g?void 0:g.attributes)?Object.entries(g.attributes):[],k=(0,h.useMemo)(()=>{if(!r)return;let e=new URLSearchParams({address:r,tokenId:String(n.tokenId),collection:s});return"/render?".concat(e.toString())},[s,r,n.tokenId]),w=(null==g?void 0:g.name)||"".concat(t," #").concat(n.tokenId);return(0,a.jsxs)(x.V,{open:!0,onClose:o,className:"relative z-50",children:[(0,a.jsx)("div",{className:"fixed inset-0 bg-black/80","aria-hidden":"true"}),(0,a.jsx)("div",{className:"fixed inset-0 overflow-y-auto",children:(0,a.jsx)("div",{className:"flex min-h-full items-center justify-center p-3 sm:p-6",children:(0,a.jsxs)(x.V.Panel,{className:"relative w-full max-w-7xl overflow-hidden bg-white shadow-2xl",children:[(0,a.jsx)(x.V.Title,{className:"sr-only",children:w}),(0,a.jsx)("button",{type:"button",onClick:o,className:"absolute right-3 top-3 z-20 flex h-10 w-10 items-center justify-center rounded-full bg-white/90 text-xl shadow hover:bg-white","aria-label":"Close edition details",children:"\xd7"}),(0,a.jsxs)("div",{className:"grid min-h-[75vh] grid-cols-1 lg:grid-cols-[minmax(0,2fr)_minmax(320px,1fr)]",children:[(0,a.jsxs)("div",{className:"flex min-h-[55vh] flex-col bg-gray-50",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 border-b border-gray-200 bg-white p-3 text-xs font-semibold uppercase tracking-wide",children:[(0,a.jsx)("button",{type:"button",onClick:()=>N("image"),className:"px-3 py-2 ".concat("image"===v?"bg-black text-white":"hover:bg-gray-100"),children:"Archived image"}),r&&(0,a.jsx)("button",{type:"button",onClick:()=>N("on-chain"),className:"px-3 py-2 ".concat("on-chain"===v?"bg-black text-white":"hover:bg-gray-100"),children:"On-chain render"})]}),(0,a.jsx)("div",{className:"relative flex-1",children:"on-chain"===v&&r?(0,a.jsx)(u.D,{contractAddress:r,tokenId:n.tokenId,label:w,className:"absolute inset-0 h-full w-full"}):(null==g?void 0:g.image)||n.image?(0,a.jsx)(i(),{src:(null==g?void 0:g.image)||n.image,fill:!0,priority:!0,className:"object-contain p-5 sm:p-8",alt:w}):(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-sm text-gray-500",children:"No archived image is available."})})]}),(0,a.jsxs)("aside",{className:"flex flex-col p-6 sm:p-8",children:[(0,a.jsx)("p",{className:"mb-2 text-xs font-semibold uppercase tracking-[0.2em] text-gray-500",children:"Preserved edition"}),(0,a.jsx)("h2",{className:"font-serif text-4xl",children:w}),b&&(0,a.jsx)("p",{className:"mt-5 text-sm text-red-700",children:b}),!g&&!b&&(0,a.jsx)("p",{className:"mt-5 text-sm text-gray-500",children:"Loading archived metadata…"}),(null==g?void 0:g.description)&&(0,a.jsx)("p",{className:"mt-5 text-sm leading-6 text-gray-600",children:g.description}),(0,a.jsxs)("dl",{className:"mt-8 space-y-4 border-y border-gray-100 py-6 text-sm",children:[(0,a.jsx)(f,{label:"Token ID",value:String(n.tokenId)}),(0,a.jsx)(f,{label:"Seed",value:(null==g?void 0:g.seed)||n.seed||"Not present in exported row",breakAll:!0}),(null==g?void 0:g.collectionId)&&(0,a.jsx)(f,{label:"Collection ID",value:g.collectionId,breakAll:!0})]}),y.length>0&&(0,a.jsxs)("div",{className:"mt-7",children:[(0,a.jsx)("h3",{className:"text-xs font-semibold uppercase tracking-[0.2em] text-gray-500",children:"Attributes"}),(0,a.jsx)("dl",{className:"mt-3 grid grid-cols-2 gap-2",children:y.map(e=>{let[t,s]=e;return(0,a.jsxs)("div",{className:"bg-gray-50 p-3 text-xs",children:[(0,a.jsx)("dt",{className:"text-gray-500",children:t}),(0,a.jsx)("dd",{className:"mt-1 font-semibold",children:String(s)})]},t)})})]}),(0,a.jsxs)("div",{className:"mt-8 flex flex-wrap gap-x-5 gap-y-3 text-sm font-semibold",children:[(0,a.jsx)("a",{href:n.metadataPath,target:"_blank",rel:"noreferrer",className:"underline",children:"Metadata JSON"}),r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("a",{href:"https://etherscan.io/token/".concat(r,"?a=").concat(n.tokenId),target:"_blank",rel:"noreferrer",className:"underline",children:"Etherscan"}),(0,a.jsx)("a",{href:"https://opensea.io/assets/ethereum/".concat(r,"/").concat(n.tokenId),target:"_blank",rel:"noreferrer",className:"underline",children:"OpenSea"}),k&&(0,a.jsx)("a",{href:k,target:"_blank",rel:"noreferrer",className:"underline",children:"Open render"})]})]}),(0,a.jsxs)("div",{className:"mt-auto flex items-center justify-between gap-3 border-t border-gray-100 pt-8",children:[(0,a.jsx)("button",{type:"button",onClick:d,disabled:!l,className:"text-sm font-semibold underline disabled:text-gray-300 disabled:no-underline",children:"← Previous"}),(0,a.jsx)("button",{type:"button",onClick:m,disabled:!c,className:"text-sm font-semibold underline disabled:text-gray-300 disabled:no-underline",children:"Next →"})]})]})]})]})})})]})},f=e=>{let{label:t,value:s,breakAll:r=!1}=e;return(0,a.jsxs)("div",{children:[(0,a.jsx)("dt",{className:"text-xs uppercase tracking-wide text-gray-500",children:t}),(0,a.jsx)("dd",{className:"mt-1 ".concat(r?"break-all font-mono text-xs":""),children:s})]})};var p=s(13095),b=!0;function j(e){let{item:t,tokens:s,manifest:r}=e,l=(0,d.useRouter)(),{collection:c,deployment:x,artist:h,coverImage:u}=t,f=c.SaleConfig?c.SaleConfig.MaxSalePieces+c.SaleConfig.NumRetained+1:void 0,b=Array.isArray(l.query.edition)?l.query.edition[0]:l.query.edition,j=void 0===b?void 0:Number(b),y=void 0===j?-1:s.tokens.findIndex(e=>e.tokenId===j),k=y>=0?s.tokens[y]:void 0,w=e=>{let t=void 0===e?"/projects/".concat(c.Slug):"/projects/".concat(c.Slug,"?edition=").concat(e);l.replace(t,void 0,{shallow:!0,scroll:!1})};return(0,a.jsxs)("main",{className:"py-10 md:py-16",children:[(0,a.jsxs)(n(),{children:[(0,a.jsxs)("title",{children:[c.Name," \xb7 Alba archive"]}),(0,a.jsx)("meta",{name:"description",content:c.MarketplaceDescription})]}),(0,a.jsxs)("div",{className:"mb-12 flex flex-wrap items-center justify-between gap-3 border-b border-gray-100 pb-5 text-xs",children:[(0,a.jsx)("span",{className:"rounded-full bg-gray-100 px-3 py-1 font-semibold uppercase tracking-wide",children:"Archived project"}),(null==x?void 0:x.Address)&&(0,a.jsxs)("a",{href:"https://etherscan.io/address/".concat(x.Address),target:"_blank",rel:"noreferrer",className:"underline",children:["Contract ",N(x.Address)]})]}),(0,a.jsxs)("section",{className:"grid grid-cols-1 gap-12 md:grid-cols-2 md:gap-16",children:[(0,a.jsx)("div",{className:"relative aspect-square bg-gray-50",children:u?(0,a.jsx)(i(),{src:(0,p.X)(u),fill:!0,className:"object-contain p-6",alt:"Artwork from ".concat(c.Name),priority:!0}):(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-sm text-gray-400",children:"No archived preview image"})}),(0,a.jsxs)("div",{className:"flex flex-col justify-center",children:[(0,a.jsx)("p",{className:"mb-2 text-xs font-semibold uppercase tracking-[0.2em] text-gray-500",children:"Alba collection"}),(0,a.jsx)("h1",{className:"font-serif text-5xl md:text-6xl",children:c.Name}),h&&(0,a.jsx)(o(),{href:"/profiles/".concat(h.Address),className:"mt-4 text-lg underline",children:h.Name}),(0,a.jsx)(m.D,{className:"mt-8 text-sm leading-7 text-gray-700",children:c.Description})]})]}),(0,a.jsxs)("section",{className:"mt-16 grid grid-cols-2 gap-4 border-y border-gray-100 py-8 text-sm md:grid-cols-4",children:[(0,a.jsx)(v,{label:"Chain",value:"Ethereum mainnet"}),(0,a.jsx)(v,{label:"Rendered editions",value:String(s.tokens.length)}),(0,a.jsx)(v,{label:"Configured supply",value:void 0===f?"Unknown":String(f)}),(0,a.jsx)(v,{label:"Contract version",value:c.ContractVersion||"Legacy"})]}),(0,a.jsxs)("section",{className:"mt-16",children:[(0,a.jsxs)("div",{className:"mb-8 flex items-end justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"mb-2 text-xs font-semibold uppercase tracking-[0.2em] text-gray-500",children:"Token archive"}),(0,a.jsx)("h2",{className:"font-serif text-4xl",children:"Editions"})]}),r.metadataBaseURL&&(0,a.jsx)("span",{className:"text-xs text-gray-500",children:"Static metadata enabled"})]}),s.tokens.length>0?(0,a.jsx)("div",{className:"grid grid-cols-2 gap-5 sm:grid-cols-3 lg:grid-cols-4",children:s.tokens.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>w(e.tokenId),className:"group text-left",children:[(0,a.jsx)("div",{className:"relative aspect-square bg-gray-50",children:e.image&&(0,a.jsx)(i(),{src:(0,p.X)(e.image),fill:!0,sizes:"(max-width: 639px) 50vw, (max-width: 1023px) 33vw, 25vw",className:"object-contain p-3 group-hover:opacity-80",alt:"".concat(c.Name," #").concat(e.tokenId)})}),(0,a.jsxs)("p",{className:"mt-2 text-sm font-semibold",children:["Edition #",e.tokenId]})]},e.tokenId))}):(0,a.jsx)("p",{className:"text-sm text-gray-500",children:"No rendered token rows were included in the current snapshot."})]}
1),k&&(0,a.jsx)(g,{collectionName:c.Name,collectionSlug:c.Slug,contractAddress:null==x?void 0:x.Address,token:k,hasPrevious:y>0,hasNext:y<s.tokens.length-1,onClose:()=>w(),onPrevious:()=>{var e;return w(null===(e=s.tokens[y-1])||void 0===e?void 0:e.tokenId)},onNext:()=>{var e;return w(null===(e=s.tokens[y+1])||void 0===e?void 0:e.tokenId)}})]})}let v=e=>{let{label:t,value:s}=e;return(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"mb-1 text-xs uppercase tracking-wide text-gray-500",children:t}),(0,a.jsx)("p",{className:"mb-0 font-semibold",children:s})]})},N=e=>"".concat(e.slice(0,6),"…").concat(e.slice(-4))}},function(e){e.O(0,[5824,7835,6375,6146,1905,569,9774,2888,179],function(){return e(e.s=62013)}),_N_E=e.O()}]);

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.