1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{48312:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return s(70826)}])},28045:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(6495).Z,r=s(92648).Z,n=s(91598).Z,l=s(17273).Z,i=n(s(67294)),c=r(s(5443)),o=s(42730),d=s(99309),u=s(59977);s(35086);var x=r(s(61479));let h={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function m(e){return void 0!==e.default}function g(e){return"number"==typeof e||void 0===e?e:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function f(e,t,s,r,n,l,i){if(!e||e["data-loaded-src"]===t)return;e["data-loaded-src"]=t;let c="decode"in e?e.decode():Promise.resolve();c.catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("blur"===s&&l(!0),null==r?void 0:r.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let s=!1,n=!1;r.current(a({},t,{nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>s,isPropagationStopped:()=>n,persist:()=>{},preventDefault:()=>{s=!0,t.preventDefault()},stopPropagation:()=>{n=!0,t.stopPropagation()}}))}(null==n?void 0:n.current)&&n.current(e)}})}let p=i.forwardRef((e,t)=>{var{imgAttributes:s,heightInt:r,widthInt:n,qualityInt:c,className:o,imgStyle:d,blurStyle:u,isLazy:x,fill:h,placeholder:m,loading:g,srcString:p,config:j,unoptimized:b,loader:v,onLoadRef:w,onLoadingCompleteRef:y,setBlurComplete:N,setShowAltText:C,onLoad:k,onError:E}=e,S=l(e,["imgAttributes","heightInt","widthInt","qualityInt","className","imgStyle","blurStyle","isLazy","fill","placeholder","loading","srcString","config","unoptimized","loader","onLoadRef","onLoadingCompleteRef","setBlurComplete","setShowAltText","onLoad","onError"]);return g=x?"lazy":g,i.default.createElement(i.default.Fragment,null,i.default.createElement("img",Object.assign({},S,{loading:g,width:n,height:r,decoding:"async","data-nimg":h?"fill":"1",className:o,style:a({},d,u)},s,{ref:i.useCallback(e=>{t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e)),e&&(E&&(e.src=e.src),e.complete&&f(e,p,m,w,y,N,b))},[p,m,w,y,N,E,b,t]),onLoad:e=>{let t=e.currentTarget;f(t,p,m,w,y,N,b)},onError:e=>{C(!0),"blur"===m&&N(!0),E&&E(e)}})))}),j=i.forwardRef((e,t)=>{let s,r;var n,{src:f,sizes:j,unoptimized:b=!1,priority:v=!1,loading:w,className:y,quality:N,width:C,height:k,fill:E,style:S,onLoad:_,onLoadingComplete:A,placeholder:D="empty",blurDataURL:z,layout:B,objectFit:F,objectPosition:L,lazyBoundary:O,lazyRoot:M}=e,R=l(e,["src","sizes","unoptimized","priority","loading","className","quality","width","height","fill","style","onLoad","onLoadingComplete","placeholder","blurDataURL","layout","objectFit","objectPosition","lazyBoundary","lazyRoot"]);let I=i.useContext(u.ImageConfigContext),P=i.useMemo(()=>{let e=h||I||d.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),s=e.deviceSizes.sort((e,t)=>e-t);return a({},e,{allSizes:t,deviceSizes:s})},[I]),T=R,W=T.loader||x.default;delete T.loader;let Z="__next_img_default"in W;if(Z){if("custom"===P.loader)throw Error('Image with src "'.concat(f,'" is missing "loader" prop.')+"\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader")}else{let e=W;W=t=>{let{config:s}=t,a=l(t,["config"]);return e(a)}}if(B){"fill"===B&&(E=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[B];e&&(S=a({},S,e));let t={responsive:"100vw",fill:"100vw"}[B];t&&!j&&(j=t)}let q="",G=g(C),U=g(k);if("object"==typeof(n=f)&&(m(n)||void 0!==n.src)){let e=m(f)?f.default:f;if(!e.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ".concat(JSON.stringify(e)));if(!e.height||!e.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ".concat(JSON.stringify(e)));if(s=e.blurWidth,r=e.blurHeight,z=z||e.blurDataURL,q=e.src,!E){if(G||U){if(G&&!U){let t=G/e.width;U=Math.round(e.height*t)}else if(!G&&U){let t=U/e.height;G=Math.round(e.width*t)}}else G=e.width,U=e.height}}let H=!v&&("lazy"===w||void 0===w);((f="string"==typeof f?f:q).startsWith("data:")||f.startsWith("blob:"))&&(b=!0,H=!1),P.unoptimized&&(b=!0),Z&&f.endsWith(".svg")&&!P.dangerouslyAllowSVG&&(b=!0);let[K,Y]=i.useState(!1),[X,V]=i.useState(!1),J=g(N),$=Object.assign(E?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:F,objectPosition:L}:{},X?{}:{color:"transparent"},S),Q="blur"===D&&z&&!K?{backgroundSize:$.objectFit||"cover",backgroundPosition:$.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:'url("data:image/svg+xml;charset=utf-8,'.concat(o.getImageBlurSvg({widthInt:G,heightInt:U,blurWidth:s,blurHeight:r,blurDataURL:z,objectFit:$.objectFit}),'")')}:{}
1,ee=function(e){let{config:t,src:s,unoptimized:a,width:r,quality:n,sizes:l,loader:i}=e;if(a)return{src:s,srcSet:void 0,sizes:void 0};let{widths:c,kind:o}=function(e,t,s){let{deviceSizes:a,allSizes:r}=e;if(s){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let a;a=e.exec(s);a)t.push(parseInt(a[2]));if(t.length){let e=.01*Math.min(...t);return{widths:r.filter(t=>t>=a[0]*e),kind:"w"}}return{widths:r,kind:"w"}}if("number"!=typeof t)return{widths:a,kind:"w"};let n=[...new Set([t,2*t].map(e=>r.find(t=>t>=e)||r[r.length-1]))];return{widths:n,kind:"x"}}(t,r,l),d=c.length-1;return{sizes:l||"w"!==o?l:"100vw",srcSet:c.map((e,a)=>"".concat(i({config:t,src:s,quality:n,width:e})," ").concat("w"===o?e:a+1).concat(o)).join(", "),src:i({config:t,src:s,quality:n,width:c[d]})}}({config:P,src:f,unoptimized:b,width:G,quality:J,sizes:j,loader:W}),et=f,es={imageSrcSet:ee.srcSet,imageSizes:ee.sizes,crossOrigin:T.crossOrigin},ea=i.useRef(_);i.useEffect(()=>{ea.current=_},[_]);let er=i.useRef(A);i.useEffect(()=>{er.current=A},[A]);let en=a({isLazy:H,imgAttributes:ee,heightInt:U,widthInt:G,qualityInt:J,className:y,imgStyle:$,blurStyle:Q,loading:w,config:P,fill:E,unoptimized:b,placeholder:D,loader:W,srcString:et,onLoadRef:ea,onLoadingCompleteRef:er,setBlurComplete:Y,setShowAltText:V},T);return i.default.createElement(i.default.Fragment,null,i.default.createElement(p,Object.assign({},en,{ref:t})),v?i.default.createElement(c.default,null,i.default.createElement("link",Object.assign({key:"__nimg-"+ee.src+ee.srcSet+ee.sizes,rel:"preload",as:"image",href:ee.srcSet?void 0:ee.src},es))):null)});t.default=j,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},42730:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getImageBlurSvg=function(e){let{widthInt:t,heightInt:s,blurWidth:a,blurHeight:r,blurDataURL:n,objectFit:l}=e,i=a||t,c=r||s,o=n.startsWith("data:image/jpeg")?"%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='1 1'/%3E%3C/feComponentTransfer%3E%":"";return i&&c?"%3Csvg xmlns='http%3A//www.w3.org/2000/svg' viewBox='0 0 ".concat(i," ").concat(c,"'%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='").concat(a&&r?"1":"20","'/%3E").concat(o,"%3C/filter%3E%3Cimage preserveAspectRatio='none' filter='url(%23b)' x='0' y='0' height='100%25' width='100%25' href='").concat(n,"'/%3E%3C/svg%3E"):"%3Csvg xmlns='http%3A//www.w3.org/2000/svg'%3E%3Cimage style='filter:blur(20px)' preserveAspectRatio='".concat("contain"===l?"xMidYMid":"cover"===l?"xMidYMid slice":"none","' x='0' y='0' height='100%25' width='100%25' href='").concat(n,"'/%3E%3C/svg%3E")}},61479:function(e,t){"use strict";function s(e){let{config:t,src:s,width:a,quality:r}=e;return"".concat(t.path,"?url=").concat(encodeURIComponent(s),"&w=").concat(a,"&q=").concat(r||75)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,s.__next_img_default=!0,t.default=s},70826:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return L}});var a=s(85893),r=s(30700),n=s(67294),l=s(25675),i=s.n(l);let c=e=>{let{color:t,pos:s,size:r}=e;return(0,a.jsx)("div",{style:{pointerEvents:"none",width:r.width,height:r.height,position:"absolute",top:s.top,left:s.left,transform:"translate(-50%, -50%)",backgroundImage:"radial-gradient(ellipse at center, ".concat(t,", transparent 60%)"),zIndex:-1}})},o=()=>(0,a.jsxs)("header",{className:"w-full p-4 mb-12",children:[(0,a.jsx)(c,{size:{width:"1800px",height:"700px"},pos:{top:"0%",left:"50%"},color:"hsl(277deg 59% 39% / 20%)"}),(0,a.jsxs)("div",{className:"max-w-5xl mx-auto flex justify-between items-center ",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(i(),{className:"md:hidden",width:48,height:48,src:"/thirdweb.svg",alt:"thirdweb"}),(0,a.jsx)(i(),{className:"hidden md:block",width:194,height:28,src:"/logo.png",alt:"thirdweb"})]}),(0,a.jsx)("div",{className:"max-w-xs",children:(0,a.jsx)(r.RZ,{})})]})]}),d=(0,n.createContext)({events:[],isLoading:!0});function u(e,t){let{type:s,data:a}=e;return"LevelUp"===s&&a.account===t||"Miaowed"===s&&(a.victim===t||a.attacker===t)}let x=(0,n.createContext)({targetAddress:"",setTargetAddress:()=>{},refetch:()=>{},nfts:[],playerScore:0}),h=e=>{let{address:t}=e,s=(0,r.SF)(),{setTargetAddress:l}=(0,n.useContext)(x);return(0,a.jsx)("span",{className:"cursor-pointer ".concat(s===t?"text-green-700":""),onClick:()=>l(t),children:s===t?"You":t.substring(0,6)+"..."+t.substring(t.length-4)})},m=e=>{let{level:t}=e;switch(t){case 1:return(0,a.jsx)("span",{children:"\uD83D\uDC31 Small Kitten"});case 2:return(0,a.jsx)("span",{children:"\uD83D\uDE3E Grumpy Cat"});case 3:return(0,a.jsx)("span",{children:"\uD83E\uDD77 Ninja Cat"})}},g=e=>{let{type:t,data:s}=e,n=s.level.toNumber(),l=(0,r.SF)();return(0,a.jsxs)("div",{className:"border ".concat(u({type:t,data:s},l)?"border-green-700":"border-neutral-700"," rounded-lg flex items-center w-full leading-none"),children:[(0,a.jsx)("div",{className:"shrink-0 h-16",children:(0,a.jsx)(i(),{className:"rounded-l-lg",width:64,height:64,alt:"",src:"/events/".concat(t).concat("LevelUp"===t?"_".concat(n):"",".png")})}),(0,a.jsxs)("div",{className:"space-y-2 font-semibold overflow-hidden px-4",children:["LevelUp"===t&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"text-gray-500 truncate",children:(0,a.jsx)(h,{address:s.account})}),(0,a.jsxs)("p",{className:"truncate",children:[1===n?"claimed a":"leveled up to"," ",(0,a.jsx)(m,{level:n})]})]}),"Miaowed"===t&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"text-gray-500 truncate",children:(0,a.jsx)(h,{address:s.attacker})}),(0,a.jsxs)("p",{className:"truncate",children:["destroyed"," ",(0,a.jsx)("span",{className:"text-sm text-gray-500",children:(0,a.jsx)(h,{address:s.victim})})," ",(0,a.jsx)(m,{level:n})]})]})]})]})},f=[...Array(20)].map((e,t)=>(0,a.jsx)(j,{},t)),p=()=>{let{events:e,isLoading:t}=(0,n.useContext)(d);return(0,a.jsxs)("div",{className:"my-20 flex flex-col items-center max-w-sm w-full",children:[(0,a.jsx)("h2",{className:"font-bold text-3xl leading-none !bg-clip-text text-transparent",style:{background:"linear-gradient(73.59deg, #C339AC 42.64%, #CD4CB5 54%, #E173C7 77.46%)"},children:"Game events"}),(0,a.jsx)("div",{className:"space-y-3 mt-6 w-full",children:t?f:(null==e?void 0:e.length)>0?null==e?void 0:e.map(e=>(0,a.jsx)(g,{type:e.eventName,data:e.data},"".concat(e.transaction.transactionHash,"_").concat(e.transaction.logIndex))):(0,a.jsx)("p",{children:" No Events "})})]})};function j(){return(0,a.jsxs)("div",{className:"animate-pulse flex border border-neutral-600 justify-start rounded-lg w-full overflow-hidden gap-4",style:{height:"68px"},children:[(0,a.jsx)("div",{className:"bg-neutral-500 dark:bg-neutral-600",
1style:{width:"64px"}}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"h-2.5 bg-neutral-500 dark:bg-neutral-600 w-36 mt-3 rounded-lg"}),(0,a.jsx)("div",{className:"h-2.5 bg-neutral-500 dark:bg-neutral-600 w-48 mt-4 rounded-lg"})]})]})}let b=()=>(0,a.jsxs)("div",{className:"flex flex-col items-center w-full space-y-12",children:[(0,a.jsxs)("h1",{className:"font-bold sm:text-6xl text-4xl leading-none text-center tracking-tight",children:["Welcome to\xa0",(0,a.jsx)("span",{className:"!bg-clip-text text-transparent",style:{background:"linear-gradient(73.59deg, #C339AC 42.64%, #CD4CB5 54%, #E173C7 77.46%)"},children:"Cat Attack"})]}),(0,a.jsx)("div",{className:"mx-auto",children:(0,a.jsx)(i(),{src:"/cat-attack.png",width:400,height:320,alt:"Cat Attack"})}),(0,a.jsx)("div",{className:"max-w-xs",children:(0,a.jsx)(r.RZ,{dropdownPosition:{side:"bottom",align:"center"}})}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("p",{className:"font-semibold",children:"Share the game"}),(0,a.jsxs)("div",{className:"flex gap-2 mt-3",children:[(0,a.jsx)("a",{className:"border border-[#9D2889] rounded-xl leading-none h-12 w-12 flex items-center justify-center cursor-pointer",children:(0,a.jsx)(i(),{src:"/socials/twitter.svg",width:24,height:24,alt:"Twitter"})}),(0,a.jsx)("a",{className:"border border-[#9D2889] rounded-xl leading-none h-12 w-12 flex items-center justify-center cursor-pointer",children:(0,a.jsx)(i(),{src:"/socials/facebook.svg",width:24,height:24,alt:"Facebook"})}),(0,a.jsx)("a",{className:"border border-[#9D2889] rounded-xl leading-none h-12 w-12 flex items-center justify-center cursor-pointer",children:(0,a.jsx)(i(),{src:"/socials/instagram.svg",width:24,height:24,alt:"Instagram"})})]})]})]}),v="0xDDB6DcCE6B794415145Eb5cAa6CD335AEdA9C272",w=()=>{let{refetch:e}=(0,n.useContext)(x),[t,s]=(0,n.useState)(null);return(0,a.jsxs)("div",{className:"flex flex-col items-center w-full",children:[(0,a.jsx)(r.tn,{className:"mt-6 !bg-white !text-black !border-0 !py-2.5",contractAddress:v,action:e=>e.call("claimKitten"),onError:e=>s(e),onSubmit:()=>s(null),onSuccess:()=>e(),children:"Claim Kitten"}),t&&(0,a.jsx)("p",{className:"mt-2 text-xs first-letter:capitalize text-red-400 max-w-xs text-center",children:t.reason})]})},y=()=>{let{refetch:e}=(0,n.useContext)(x),[t,s]=(0,n.useState)(null);return(0,a.jsxs)("div",{className:"flex flex-col items-center w-full space-y-12",children:[(0,a.jsxs)("h1",{className:"font-bold sm:text-6xl text-4xl leading-none text-center tracking-tight",children:[(0,a.jsx)("span",{className:"!bg-clip-text text-transparent",style:{background:"linear-gradient(73.59deg, #C339AC 42.64%, #CD4CB5 54%, #E173C7 77.46%)"},children:"Claim your kitten"})," ","to get started"]}),(0,a.jsx)("div",{className:"mx-auto",children:(0,a.jsx)(i(),{src:"/cat-attack.png",width:400,height:320,alt:"Cat Attack"})}),(0,a.jsx)(w,{})]})},N={1:{title:"Send your cat to someone",description:(0,a.jsxs)(a.Fragment,{children:["Enter their wallet address or select a current player to transfer your"," ",(0,a.jsx)("span",{className:"font-bold text-white",children:"Kitten"})," to."]}),button:"Send Kitten"},2:{title:"Burn your cat!",description:(0,a.jsxs)(a.Fragment,{children:["Burn your ",(0,a.jsx)("span",{className:"font-bold text-white",children:"Grumpy Cat"}),"."]}),button:"Burn Cat"},3:{title:"Attack another cat!",description:"Enter their wallet address or select a current player to attack.",button:"Attack Cat"}},C=()=>{let e=(0,r.SF)(),t=(0,n.useContext)(d).events.filter(t=>!u({type:t.eventName,data:t.data},e));return(0,a.jsx)("div",{className:"space-y-2 mt-3 w-full max-h-48 overflow-auto",children:t&&(null==t?void 0:t.length)>0?null==t?void 0:t.map(e=>(0,a.jsx)(g,{type:e.eventName,data:e.data},"".concat(e.transaction.transactionHash,"_").concat(e.transaction.logIndex))):(0,a.jsx)("p",{children:"No events found"})})},k=e=>{let{isOpen:t,close:s,level:l}=e,{refetch:c,targetAddress:o,setTargetAddress:d}=(0,n.useContext)(x),[u,h]=(0,n.useState)(null);if((0,n.useEffect)(()=>{let e=e=>{"Escape"===e.key&&s()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[s]),!t)return null;let m=N[l];return(0,a.jsx)("div",{className:"fixed top-0 left-0 w-full h-full bg-black/50 flex items-center justify-center z-10 px-4",children:(0,a.jsxs)("div",{className:"rounded-lg p-8 bg-neutral-900 w-full max-w-lg",children:[(0,a.jsxs)("div",{className:"flex items-start",children:[(0,a.jsxs)("div",{className:"max-w-sm",children:[(0,a.jsx)("h1",{className:"text-2xl font-bold leading-none",children:m.title}),(0,a.jsx)("p",{className:"text-gray-500 mt-4",children:null==m?void 0:m.description})]}),(0,a.jsx)("button",{className:"ml-auto",onClick:s,children:(0,a.jsx)(i(),{src:"/icons/close.svg",width:24,height:24,alt:"Close"})})]}),2!==l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"mt-8",children:[(0,a.jsx)("label",{className:"font-bold text-neutral-300",htmlFor:"wallet-address",children:"Enter Wallet address"}),(0,a.jsx)("input",{className:"w-full mt-3 border border-gray-500 bg-transparent roun
1ded-xl p-4 font-medium placeholder:text-gray-500",id:"wallet-address",placeholder:"0x0...",value:o,onChange:e=>d(e.target.value)})]}),(0,a.jsxs)("div",{className:"mt-8",children:[(0,a.jsx)("p",{className:"font-bold text-neutral-300",children:"Or select a current player"}),(0,a.jsx)("p",{className:"text-xs text-gray-500",children:"Click on an address to set it as your target."}),(0,a.jsx)(C,{})]})]}),(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsxs)(r.tn,{className:"!ml-auto !bg-white !text-black !border-0 !py-2 !h-auto !font-sans !min-w-0 !w-full",contractAddress:v,action:e=>1===l?e.erc1155.transfer(o,0,1):2===l?e.erc1155.burn(1,1):3===l?e.call("attack",o):void 0,onError:e=>h(e),onSubmit:()=>h(null),onSuccess:()=>{s(),c()},children:[1===l&&"Transfer",2===l&&"Burn",3===l&&"Attack"]})}),u&&(0,a.jsx)("p",{className:"mt-2 text-xs first-letter:capitalize text-red-400 max-w-xs text-center",children:u.reason})]})})},E=["#B74AA4","#4830A4","#BFA3DA"],S=e=>{let{cat:t}=e,[s,l]=(0,n.useState)(!1),i=Number(t.metadata.id)+1,c=E[i-1],o=t.quantityOwned,d=(0,n.useCallback)(()=>{l(!0),document.body.classList.add("overflow-hidden")},[l]),u=(0,n.useCallback)(()=>{l(!1),document.body.classList.remove("overflow-hidden")},[l]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(k,{isOpen:s,close:u,level:i}),(0,a.jsxs)("div",{className:"flex flex-col items-center rounded-lg w-80 relative",children:[o&&(0,a.jsxs)("span",{className:"absolute top-2 right-2 bg-black text-xs font-bold text-white px-2 py-1 rounded-md",children:["x",o]}),(0,a.jsx)("div",{className:"border rounded-t-lg w-80 h-80",style:{borderColor:c},children:(0,a.jsx)(r.CH,{width:"240",height:"240",metadata:t.metadata})}),(0,a.jsxs)("div",{className:"border border-t-0 rounded-b-lg border-gray-700 w-full py-4 px-8 flex flex-col items-center text-center",children:[(0,a.jsxs)("p",{className:"font-bold text-xs leading-tight",style:{color:c},children:["Level ",i]}),(0,a.jsx)("p",{className:"font-bold text-xl mt-2 mb-4 leading-tight",children:t.metadata.name}),(0,a.jsx)("p",{className:"text-xs font-semibold mb-6 text-gray-500",children:t.metadata.description}),(0,a.jsxs)("button",{type:"button",className:"!bg-white !text-black !border-0 !py-2.5 px-5 rounded-lg w-full font-semibold leading-6",style:{minWidth:200,height:50},onClick:d,children:[1===i&&"Transfer",2===i&&"Burn it",3===i&&"Attack"]})]})]})]})},_=()=>{let{nfts:e,playerScore:t}=(0,n.useContext)(x),{cats:s,badges:l}=(0,n.useMemo)(()=>({cats:e.filter(e=>3>Number(e.metadata.id)),badges:e.filter(e=>Number(e.metadata.id)>2)}),[e]);return(0,a.jsxs)("div",{className:"flex flex-col items-center w-full",children:[(0,a.jsx)("h1",{className:"font-bold sm:text-6xl text-4xl leading-none text-center tracking-tight",children:"Your cats"}),(0,a.jsxs)("p",{className:"my-4 text-gray-500",children:[(0,a.jsx)("span",{className:"tracking-wide mr-2",children:"Total Points:"}),(0,a.jsx)("span",{className:"text-white",children:t})]}),l.length>0&&(0,a.jsxs)("div",{className:"flex flex-col items-center w-full",children:[(0,a.jsxs)("p",{className:"mt-4 text-gray-500",children:[(0,a.jsx)("span",{className:"tracking-wide mr-2",children:"Cats Destroyed:"}),(0,a.jsx)("span",{className:"text-white",children:l[0].quantityOwned})]}),(0,a.jsx)("div",{className:"flex flex-wrap max-w-xs gap-2 my-4 items-center justify-center",children:Array.apply(null,Array(Math.min(parseInt(l[0].quantityOwned||"0"),8))).map(e=>(0,a.jsx)("div",{children:(0,a.jsx)(r.CH,{metadata:l[0].metadata,style:{width:30,height:30}})},l[0].metadata.id))})]}),(0,a.jsx)("div",{className:"gap-2 mt-12 w-full flex flex-wrap items-center justify-center",children:s.length>0?null==s?void 0:s.map(e=>(0,a.jsx)(S,{cat:e},e.metadata.id)):(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"my-4 text-gray-500",children:[(0,a.jsx)("span",{className:"text-white",children:"All your cats have been destroyed!"}),(0,a.jsx)("br",{}),(0,a.jsx)("span",{className:"tracking-wide",children:"Claim a new kitten to keep playing"})]}),(0,a.jsx)("p",{className:"text-gray-500"}),(0,a.jsx)(w,{})]})})]})},A=()=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex flex-col space-y-2 w-full max-w-xs justify-center",children:[(0,a.jsxs)("a",{href:"https://bridge.base.org/",target:"_blank",className:"p-3 text-xs font-semibold border border-white/20 rounded flex items-center justify-center space-x-1 hover:bg-white/10 transition",rel:"noreferrer",children:[(0,a.jsx)(i(),{src:"/icons/zap.svg",width:12,height:12,alt:"Zap"}),(0,a.jsx)("span",{children:"Bridge to Base Goerli"})]}),(0,a.jsxs)("a",{href:"https://www.coinbase.com/faucets/base-ethereum-goerli-faucet",className:"p-3 text-xs font-semibold border border-white/20 rounded flex items-center justify-center space-x-1 hover:bg-white/10 transition",children:[(0,a.jsx)(i(),{src:"/icons/zap.svg",width:12,height:12,alt:"Zap"}),(0,a.jsx)("span",{children:"Get Base Goerli funds"})]}),(0,a.jsxs)("a",{href:"https://thirdweb.com/joenrv.eth/CatAttackNFT",target:"_blank",className:"p-3 text-xs font-semibold border border-white/20 rounded flex items-center justify-center space-x-1 hover:bg-white/10 transition",rel:"noreferrer",children:[(0,a.jsx)(i(),{src:"/icons/rocket.svg",width:12,height:12,alt:"Zap"}),(0,a.jsx)("span",{children:"Deploy your own CatAttack contract"})]}),(0,a.jsxs)("a",{href:"https://github.com/joaquim-verges/catattacknft",target:"_blank",className:"p-3 text-xs font-semibold border border-white/20 rounded flex items-center justify-center space-x-1 hover:bg-white/10 transition",rel:"noreferrer",children:[(0,a.jsx)(i(),{src:"/icons/github.svg",width:12,height:12,alt:"Zap"}),(0,a.jsx)("span",{children:"Check out the code on github"})]})]}),(0,a.jsxs)("h4",{className:"font-semibold mt-12 mb-6",children:["Created by \uD83D\uDC31"," ",(0,a.jsx)("a",{href:"https://twitter.com/joenrv",target:"_blank",className:"text-blue-500 hover:no-underline",rel:"noreferrer",children:"joenrv.eth"})]}),(0,a.jsx)("p",{className:"font-semibold",children:"No animals were hurt building this game."})]});var D=s(12620),z=s.n(D);let B=e=>(0,a.jsx)("svg",{className:z().svg,style:{width:e.size||"32px",height:e.size||"32px"},viewBox:"0 0 50 50",children:(0,a.jsx)("circle",{className:z().circle,cx:"25",cy:"25",r:"20",fill:"none",stroke:e.color||"white",strokeWidth:"4"})}),F=()=>{var e;let t=(0,r.SF)(),s=(0,r.pX)(),{contract:l}=(0,r.cq)(v),{data:i,refetch:c,isLoading:u}=(0,r.YZ)(l,t),{data:h}=(0,r.do)(l,"getScore",t),m=(0,r.pc)(l,void 0,{queryFilter:{fromBlock:-500}}),g=null===(e=m.data)||void 0===e?void 0:e.filter(e=>["LevelUp","Miaowed"].includes(e.eventName)).slice(0,20),[f,j]=(0,n.use
1State)(""),w={refetch:c,targetAddress:f,setTargetAddress:j,nfts:i||[],playerScore:null==h?void 0:h.toNumber()};return(0,a.jsx)(x.Provider,{value:w,children:(0,a.jsxs)(d.Provider,{value:{events:g||[],isLoading:m.isLoading},children:[(0,a.jsx)(o,{}),(0,a.jsxs)("div",{className:"max-w-3xl flex flex-col items-center mx-auto py-8 px-4",children:["disconnected"===s&&(0,a.jsx)(b,{}),("connecting"===s||"unknown"===s)&&(0,a.jsx)(O,{}),"connected"===s&&(0,a.jsx)(a.Fragment,{children:u?(0,a.jsx)(O,{}):(0,a.jsxs)(a.Fragment,{children:[" ",(null==i?void 0:i.length)?(0,a.jsx)(_,{}):(0,a.jsx)(y,{})]})}),(0,a.jsx)(p,{}),(0,a.jsx)(A,{})]})]})})};var L=F;let O=()=>(0,a.jsx)("div",{className:"flex justify-center items-center",style:{height:"700px"},children:(0,a.jsx)(B,{size:"50px"})})},12620:function(e){e.exports={svg:"Spinner_svg__WWby6",rotate:"Spinner_rotate__m6B5v",circle:"Spinner_circle__XTRMn",dash:"Spinner_dash__OMfCb"}},25675:function(e,t,s){e.exports=s(28045)}},function(e){e.O(0,[774,888,179],function(){return e(e.s=48312)}),_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.