(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1315],{52257:function(e,t,n){"use strict";var r,i=n(67294);function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}t.Z=function(e){return i.createElement("svg",_extends({width:18,height:18,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=i.createElement("path",{d:"M15.19 8.617c-1.826 1.606-3.83 2.908-5.906 4.123 2.518-2.329 4.816-4.817 6.333-8.014.206-.449-.368-.999-.751-.565-2.136 2.43-4.772 4.774-7.555 6.814 2.356-2.199 4.55-4.586 5.684-7.392.207-.463-.456-.738-.78-.449-2.091 1.895-4.168 3.82-6.392 5.57.413-.42.825-.839 1.223-1.288 1-1.142 1.796-2.444 2.636-3.717.31-.463-.354-.897-.751-.565a44.023 44.023 0 0 1-4.654 3.429c.707-.926 1.414-1.852 1.988-2.864.236-.406-.236-.869-.648-.637-.913.52-1.84.897-2.887 1.1-.603.115-.338 1.012.25.896a9.012 9.012 0 0 0 1.577-.463c-.81 1.129-1.694 2.2-2.474 3.342-.266.405.25.868.648.637a45.105 45.105 0 0 0 4.418-2.879A17.818 17.818 0 0 1 5.396 7.75c-1.163 1.158-2.312 2.315-3.313 3.632-.295.376.265.868.648.636 2.871-1.765 5.405-3.95 7.893-6.192C9.652 7.113 8.49 8.27 7.43 9.428c-1.62 1.764-3.506 3.283-5.273 4.918-.398.362.118.998.575.738 1.944-1.1 3.74-2.546 5.508-3.891 1.56-1.172 3.122-2.373 4.595-3.675-2.092 2.821-4.787 5.092-7.467 7.48-.398.361.118.998.574.737 2.445-1.403 4.904-2.734 7.187-4.34-1.178 1.302-2.504 2.517-3.593 3.79-.265.319-.03.97.456.781 1.458-.55 2.813-1.374 4.227-2.04-.177.42-.368.825-.56 1.23-.265.536.56 1.013.825.478.383-.781.707-1.606 1.09-2.387.162-.319-.118-.854-.53-.68-1.12.448-2.165 1.027-3.24 1.577 1.516-1.563 3.122-3.096 4.138-4.962.25-.478-.353-.926-.751-.565Z",fill:"#000",fillOpacity:.85})))}},69123:function(e,t,n){"use strict";var r,i=n(67294);function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}t.Z=function(e){return i.createElement("svg",_extends({viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=i.createElement("path",{d:"M14.965 9.332c0-.07.035-.174.035-.28v-.104c0-.105-.035-.21-.035-.28l-.035-.035v-.07h-.034v-.07h-.035c0-.035-.035-.07-.035-.105h-.035v-.035l-.035-.035v-.035h-.034l-4.94-4.968a1.045 1.045 0 0 0-1.495 0c-.383.385-.383 1.05 0 1.47l3.165 3.148H4.044A1.05 1.05 0 0 0 3 8.983c0 .594.452 1.084 1.044 1.084h7.408l-3.165 3.149c-.383.42-.383 1.084 0 1.47.417.419 1.078.419 1.496 0l4.939-4.969h.034v-.035l.035-.035v-.035h.035c0-.035.035-.07.035-.105h.035v-.07h.034v-.07l.035-.035Z",fill:"#000"})))}},66485:function(e){function makeError(){return new DOMException("The request is not allowed","NotAllowedError")}async function copyClipboardApi(e){if(!navigator.clipboard)throw makeError();return navigator.clipboard.writeText(e)}async function copyExecCommand(e){let t=document.createElement("span");t.textContent=e,t.style.whiteSpace="pre",t.style.webkitUserSelect="auto",t.style.userSelect="all",document.body.appendChild(t);let n=window.getSelection(),r=window.document.createRange();n.removeAllRanges(),r.selectNode(t),n.addRange(r);let i=!1;try{i=window.document.execCommand("copy")}finally{n.removeAllRanges(),window.document.body.removeChild(t)}if(!i)throw makeError()}async function clipboardCopy(e){try{await copyClipboardApi(e)}catch(t){try{await copyExecCommand(e)}catch(e){throw e||t||makeError()}}}/*! clipboard-copy. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */e.exports=clipboardCopy},20367:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/address/[address]/runes",function(){return n(54143)}])},5645:function(e,t,n){"use strict";n.d(t,{q:function(){return CopyButton}});var r,i=n(85893),a=n(66485),s=n.n(a),l=n(86010),c=n(67294),o=n(32993),d=n(69638),u=n(41998);function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var copy=function(e){return c.createElement("svg",_extends({width:18,height:18,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=c.createElement("path",{d:"M15.545 13.091h-2.454v2.454A2.454 2.454 0 0 1 10.637 18H2.454A2.454 2.454 0 0 1 0 15.545V7.364a2.455 2.455 0 0 1 2.455-2.455h2.454V2.455A2.454 2.454 0 0 1 7.364 0h8.181A2.454 2.454 0 0 1 18 2.455v8.181a2.454 2.454 0 0 1-2.455 2.455ZM1.636 7.364v8.181a.817.817 0 0 0 .819.819h8.181a.818.818 0 0 0 .819-.819V7.364a.818.818 0 0 0-.819-.819H2.456a.818.818 0 0 0-.819.819Zm14.727-4.91a.818.818 0 0 0-.818-.818H7.363a.818.818 0 0 0-.818.819v2.454h4.091a2.455 2.455 0 0 1 2.455 2.455v4.09h2.454a.817.817 0 0 0 .818-.818V2.455Z",fill:"#000"})))};let CopyButton=e=>{let{id:t,value:n,children:r,className:a,iconClassName:f}=e,[h,m]=(0,c.useState)(!1);return((0,c.useEffect)(()=>{h&&setTimeout(()=>{m(!1)},1e3)},[h]),n)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("button",{"data-tooltip-id":t,onClick:()=>{s()(n.toString()),m(!0)},className:(0,l.Z)("bg-none [&_path]:fill-current inline-flex gap-2 items-center",a),children:[r,h?(0,i.jsx)(u.Z,{className:(0,d.cn)("h-[18px] w-[18px] shrink-0",f)}):(0,i.jsx)(copy,{className:(0,d.cn)("shrink-0",f)})]}),(0,i.jsx)(o.u,{id:t,className:"dark:bg-black",content:h?"Copied":"Copy"})]}):null}},13267:function(e,t,n){"use strict";n.d(t,{Z:function(){return Grid}});var r=n(85893),i=n(86010);function Grid(e){let{children:t,className:n}=e;return(0,r.jsx)("div",{className:(0,i.Z)("grid grid-cols-card gap-5 sm:grid-cols-cardSmall sm:gap-4",n),children:t})}},86622:function(e,t,n){"use strict";n.d(t,{X:function(){return Heading}});var r=n(85893),i=n(69638);let Heading=e=>{let{children:t,className:n}=e;return(0,r.jsx)("h3",{className:(0,i.cn)("mt-11 mb-3 text-[18px] font-bold text-textPrimary",n),children:t})}},54779:function(e,t,n){"use strict";n.d(t,{O:function(){return Tab},Z:function(){return TabContainer}});var r=n(85893),i=n(69638);function TabContainer(e){let{className:t,children:n}=e;return(0,r.jsx)("div",{className:(0,i.cn)("mt-12 flex justify-center gap-9 border-b border-b-divider",t),children:n})}function Tab(e){let{isActive:t,children:n}=e;return(0,r.jsx)("div",{className:(0,i.cn)("flex h-[36px] border-b-[3px] font-semibold transition-all whitespace-nowrap",{"border-b-textLink text-textPrimary dark:border-b-bgButtonPrimary":t,"border-b-0 border-b-transparent text-textSecondary hover:border-b-[3px] hover:border-b-divider hover:text-textPrimary":!t}),children:n})}},1202:function(e,t,n){"use strict";n.d(t,{Z:function(){return Tabs}});var r=n(85893),i=n(41664),a=n.n(i),s=n(54779),l=n(96550),c=n(87293);function Tabs(e){let{address:t,currentTab:n}=e,{ordinalsAddress:i}=(0,c.O)();return(0,r.jsxs)(s.Z,{className:"sm:gap-5 overflow-auto sm:justify-start sm:-mx-5 sm:px-5",children:[(0,r.jsx)(a(),{href:"/address/".concat(t),className:"hover:no-underline",children:(0,r.jsx)(s.O,{isActive:"inscriptions"===n,children:"Inscriptions"})}),(0,r.jsx)(a(),{href:"/address/".concat(t,"/runes"),className:"hover:no-underline",children:(0,r.jsx)(s.O,{isActive:"runes"===n,children:"Runes"})}),(0,r.jsx)(a(),{href:"/address/".concat(t,"/rare-sats"),className:"hover:no-underline",children:(0,r.jsx)(s.O,{isActive:"rare-sats"===n,children:"Rare sats"})}),(0,r.jsx)(a(),{href:"/address/".concat(t,"/brc20"),className:"hover:no-underline",children:(0,r.jsx)(s.O,{isActive:"brc20"===n,children:"BRC-20"})}),(0,r.jsx)(a(),{href:"/address/".concat(t,"/activity"),className:"hover:no-underline",children:(0,r.jsx)(s.O,{isActive:"activity"===n,children:"Activity"})}),i===t&&(0,r.jsx)(l.Z,{children:(0,r.jsx)(a(),{href:"/address/".concat(t,"/orders"),className:"hover:no-underline",children:(0,r.jsx)(s.O,{isActive:"orders"===n,children:"Orders"})})})]})}},63934:function(e,t,n){"use strict";n.d(t,{Z:function(){return AddressTop}});var r,i,a,s=n(85893),l=n(67294);function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var bitcoin_logo_alt=function(e){return l.createElement("svg",_extends({width:24,height:25,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l.createElement("g",{clipPath:"url(#bitcoin-logo-alt_svg__a)"},l.createElement("mask",{id:"bitcoin-logo-alt_svg__b",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:0,y:0,width:24,height:25},r||(r=l.createElement("path",{d:"M24 .5H0v24h24V.5Z",fill:"#fff"}))),i||(i=l.createElement("g",{mask:"url(#bitcoin-logo-alt_svg__b)"},l.createElement("path",{d:"M23.65 15.403c-1.602 6.428-8.113 10.34-14.542 8.738C2.68 22.538-1.232 16.027.372 9.598 1.974 3.17 8.485-.744 14.912.86c6.43 1.603 10.341 8.115 8.739 14.544Z",fill:"#3A1AFB"}),l.createElement("path",{d:"M17.303 10.79c.238-1.596-.977-2.455-2.64-3.027l.54-2.163-1.317-.328-.525 2.105a55.265 55.265 0 0 0-1.055-.248l.529-2.12-1.316-.328-.54 2.162a44.09 44.09 0 0 1-.84-.197l.001-.007-1.815-.453-.35 1.406s.976.224.956.238c.533.133.63.486.613.765L8.93 11.06c.037.009.084.022.137.043l-.14-.034-.86 3.452c-.066.162-.231.405-.604.313.013.019-.957-.24-.957-.24l-.653 1.508 1.713.427c.319.08.631.163.939.242L7.96 18.96l1.315.328.54-2.164c.359.097.707.187 1.049.272l-.538 2.154 1.316.328.545-2.183c2.245.425 3.934.253 4.644-1.777.573-1.635-.028-2.579-1.21-3.194.86-.198 1.509-.764 1.682-1.933Zm-3.009 4.219c-.406 1.635-3.16.75-4.052.53l.723-2.9c.893.224 3.755.665 3.33 2.37Zm.408-4.242c-.372 1.487-2.663.731-3.406.546l.655-2.629c.744.186 3.137.531 2.75 2.083Z",fill:"#fff"})))),a||(a=l.createElement("defs",null,l.createElement("clipPath",{id:"bitcoin-logo-alt_svg__a"},l.createElement("path",{fill:"#fff",transform:"translate(0 .5)",d:"M0 0h24v24H0z"})))))},c=n(5645),o=n(43058);function AddressTop(e){let{address:t}=e;return(0,s.jsxs)("div",{className:"flex flex-col items-center",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(bitcoin_logo_alt,{className:"[&_path[fill='#3A1AFB']]:dark:fill-bgButtonPrimary"}),(0,s.jsx)("h2",{className:"text-center text-24 font-bold text-textPrimary",children:"Address"})]}),(0,s.jsx)(c.q,{id:"copy-address",value:t,className:"max-w-[calc(100%-20px)] mt-2 ml-[-20px] text-textSecondary text-15 font-semibold",iconClassName:"text-iconColor",children:(0,s.jsx)(o.gT,{className:"max-w-full",children:t})})]})}},68004:function(e,t,n){"use strict";n.d(t,{Dh:function(){return SmallCardContainer},Fu:function(){return SmallCardTitle},Jn:function(){return SmallCard},ZP:function(){return Trait},s0:function(){return SmallCardValue}});var r=n(85893),i=n(69638);function Trait(e){let{name:t,value:n,rarity:i}=e;return(0,r.jsxs)(SmallCardContainer,{children:[(0,r.jsx)(SmallCardTitle,{className:"overflow-ellipsis whitespace-nowrap",children:t}),(0,r.jsx)(SmallCardValue,{children:n}),!!i&&(0,r.jsxs)("p",{className:"text-12 font-medium text-textSecondary",children:[i,"% have this trait"]})]})}let SmallCardContainer=e=>{let{children:t,className:n}=e;return(0,r.jsx)("div",{className:(0,i.cn)("flex flex-col gap-1 rounded-xl bg-bgSecondary p-3",n),children:t})},SmallCardTitle=e=>{let{children:t,className:n}=e;return(0,r.jsx)("h6",{className:(0,i.cn)("text-[12px] font-medium text-textAccent",n),children:t})},SmallCardValue=e=>{let{children:t,className:n}=e;return(0,r.jsx)("div",{className:(0,i.cn)("text-[15px] font-semibold text-textPrimary break-words",n),children:t})},SmallCard=e=>{let{title:t,value:n,valueClass:i}=e;return(0,r.jsxs)(SmallCardContainer,{children:[(0,r.jsx)(SmallCardTitle,{children:t}),(0,r.jsx)(SmallCardValue,{className:i,children:n})]})}},32284:function(e,t,n){"use strict";n.d(t,{$_:function(){return LoadingContentPreviewTiny},K9:function(){return FrameTiny},ZP:function(){return ContentPreviewTiny}});var r=n(85893),i=n(86010),a=n(80537),s=n(69638),l=n(7745),c=n(79091),o=n(1489),d=n(12907),u=n(27627),f=n(22593),h=n(62653),m=n(36093),x=n(77187),p=n(80364);function ContentPreviewTiny(e){let{inscription:t,className:n,style:i}=e,{inscription_id:a,Delegate:s,dataUri:c}=t,u=(null==s?void 0:s.inscription_id)||a,f=(null==s?void 0:s.content_type)||t.content_type,h=!!f&&"SVG"===(0,l.yj)(f),m=(0,l.fB)(f)||h,x=(0,o.y)(u,m),p=(0,d.X)(t),g=!!p&&p.length<20;return(0,r.jsx)(FrameTiny,{isImage:m,imgUrl:x,showContent:g,className:n,style:i,children:(0,r.jsx)(Preview,{inscription:t,dataUri:c,showContent:g})})}let Preview=e=>{let{inscription:t,dataUri:n,showContent:a}=e,{uploaded_to_cdn:o,content_type:g,inscription_id:b,satsName:v}=t,j=!!g&&"SVG"===(0,l.yj)(g),w=(0,l.fB)(g)||j,y=(0,l.Fd)(g),N=(0,l.i8)(g),C=((0,l.my)(g),(0,l.Ec)(g)),S=!!g&&"HTML"===(0,l.yj)(g),_=(0,d.X)(t);return(0,c.FQ)({...t,content:_}),n?(0,r.jsx)(h.Z,{dataUri:n,contentType:g||"",inscriptionId:b,className:"pointer-events-none"}):v?(0,r.jsx)("p",{className:(0,i.Z)("break-all text-center text-xs font-bold text-textTertiary",x.O),children:".sats"}):y?(0,r.jsx)(u.Z,{className:"h-[24px]"}):N?(0,r.jsx)("div",{className:"absolute top-[0] right-[0]",children:(0,r.jsx)(p.Z,{inscription_id:b,content_type:g,showControls:!1,muted:!0})}):C?(0,r.jsx)("div",{className:"pointer-events-none w-full",children:(0,r.jsx)(f.Z,{inscription_id:b,controls:!1})}):j||S?(0,r.jsx)(m.ZP,{inscription_id:b,useCdn:o,content_type:g,style:{pointerEvents:"none"}}):w?null:(0,r.jsx)("p",{className:(0,s.cn)("text-xs font-bold text-textTertiary",{"break-words font-medium leading-none text-textPrimary":a}),style:{wordBreak:"break-word"},children:a?(0,r.jsx)(r.Fragment,{children:_}):(0,l.yj)(g||"")})},FrameTiny=e=>{let{className:t,imgUrl:n,isImage:i,showContent:a,style:l,children:c}=e;return(0,r.jsx)("div",{className:(0,s.cn)("flex h-[52px] w-[52px] flex-shrink-0 items-center justify-center rounded-md bg-bgPrimary bg-cover bg-center overflow-hidden relative",t),style:{backgroundImage:i&&n?"url(".concat(n,")"):"none",imageRendering:"pixelated",...a&&{overflow:"hidden"},...l},children:c})},LoadingContentPreviewTiny=()=>(0,r.jsx)("div",{className:"relative flex h-[52px] w-[52px] flex-shrink-0 rounded-md bg-bgPrimary bg-cover bg-center p-2 overflow-hidden",children:(0,r.jsx)(a.Z,{})})},22695:function(e,t,n){"use strict";n.d(t,{p:function(){return RuneLogo}});var r=n(85893),i=n(32284),a=n(69638),s=n(7745);let l=["11b9c94843240d65cd91ed34402017316722d3500914e68bd825d39f5eace81fi0","63383c76d0308cef130667081d0dbd4f1e3161af97c1eea691bdb41baac395cfi0","37f35b6580d2a482040305282570b00605dd70f2c87b0839b4561651db6ddbfbi0","1542fbbbb9234c05a24b035e8a378cbda0144a5c663ecd4e465c1bca5723f624i0","e7c6518f90775d67f1e5dc12f90c67de2dd299bb5d78d9ec759226b7a2055a71i0","a58b4fe7bd215935ab07c54d014ffcd9fe7172734b5993634e259613d8b433b0i0"],c={e7c6518f90775d67f1e5dc12f90c67de2dd299bb5d78d9ec759226b7a2055a71i0:"PUPSWORLDPEACE.jpeg","152b928e97bb9e874da1bd4abdf766ae0cdc7a2f260dad5542967cb414c58489i0":"DECENTRALIZED.avif","7d0a2dd897222913d58fc957b0429526117a0a61c964642fe93b077f328ccec1i0":"EPICEPICEPICEPIC.jpeg","7b66f3ca78ae7a5f7d787f8ede379f8d1cd380bda75363c1f5c9dcfcceec31f5i0":"RSIC.png","6b833e4d85f39691cc3eeaca634619a58436dbfdb25e35f2641d70cc63fef8b4i0":"MIKEHALSAILOR.jpg"},RuneLogo=e=>{var t;let{symbol:n,size:o,inscription:d,className:u}=e,f=(null==d?void 0:null===(t=d.Delegate)||void 0===t?void 0:t.content_type)||(null==d?void 0:d.content_type),h=!!f&&(0,s.my)(f),{inscription_id:m}=d||{},x=!!m&&l.includes(m),p=m?c[m]:null;return p?(0,r.jsx)("div",{className:(0,a.cn)("flex flex-shrink-0 h-[32px] w-[32px] items-center justify-center rounded-full bg-cover bg-[#2B2626] dark:bg-white/5",u),style:{...o&&{height:o,width:o},backgroundImage:"url(/runes/".concat(p,")")}}):!d||h||x?(0,r.jsx)("div",{className:(0,a.cn)("flex flex-shrink-0 h-[32px] w-[32px] items-center justify-center rounded-full bg-cover bg-[#2B2626] dark:bg-white/5 text-[13px]",u),style:{...o&&{height:o,width:o}},children:(0,r.jsx)("p",{className:"text-white",children:n})}):(0,r.jsx)(i.ZP,{inscription:d,className:"w-[32px] h-[32px] rounded-full pointer-events-none",style:{...o&&{height:o,width:o},imageRendering:void 0}})}},40008:function(e,t,n){"use strict";n.d(t,{Z:function(){return HugeNumber}});var r=n(85893);let i=["","K","M","B","T","Q","E","Z","Y","X","W","V","U"];function formatHugeNumberCommas(e){return e.replace(/\B(?=(\d{3})+(?!\d))/g,",")}function HugeNumber(e){let{number:t,pretty:n=!0}=e,a=function(e){let t=0;if(1>parseInt(e))return e;if("0"===e||0===parseFloat(e))return"0";if(e.includes(".")){let t=parseFloat(e);return Math.floor(t)===t?t.toString():t.toFixed(2).replace(/\.00$/,"")}let n=e.replace(/^0+/,""),r=n.length;if(r<=6)return formatHugeNumberCommas(e);for(;r>3&&t<i.length-1;)t++,r-=3;let a=Math.pow(10,3*t),s=n.length<=15?(parseInt(n)/a).toFixed(1):(BigInt(n)/BigInt(a)).toString();return s.endsWith(".0")&&(s=s.substring(0,s.length-2)),"".concat(s).concat(i[t]||"")}(t),{leadingNumber:s,exponent:l}=function(e){let t=e.replace(/^0+/,""),[n="0",r]=t.split("."),i=null==n?void 0:n.length,a=i-1;if(r&&i<=3)return{leadingNumber:e.split(".")[0],exponent:0};let s=n;if(a>=3){let e=a%3+1;(s=(null==n?void 0:n.substring(0,e))+"."+(null==n?void 0:n.substring(e,3))).length>4&&(s=s.substring(0,4)),s.endsWith(".")&&(s=s.substring(0,s.length-1))}return a=i>3?a-a%3:0,{leadingNumber:s.split(".")[0],exponent:a}}(t);return 1>parseInt(t)||n&&l<=9?(0,r.jsx)(r.Fragment,{children:a}):l<=9?(0,r.jsx)(r.Fragment,{children:formatHugeNumberCommas(t)}):(0,r.jsxs)(r.Fragment,{children:[s,"x10",(0,r.jsx)("sup",{children:l})]})}},54143:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return _},default:function(){return runes}});var r=n(85893),i=n(41664),a=n.n(i),s=n(21064),l=n(13267),c=n(86622),o=n(51046),d=n(64154),u=n(1202),f=n(31454),h=n(80537),m=n(68004),x=n(22695),p=n(40008),g=n(52673),b=n(74552),v=n(58105);let getRuneAmountInSats=e=>{let{decimals:t,floorPriceInSats:n,amount:r}=e,i=BigInt(parseInt((1e3*n).toString())),a=BigInt(10**(t||0))||1n,s=(r||0n)*i/(BigInt(1e3)*a);return s},getRuneUsdBalance=e=>{var t;let{runeBalance:n,runeDecimals:r,runePriceInSats:i,bitcoinPriceInUsd:a}=e;if(!i||!a)return null;let s=(null===(t=n.split("."))||void 0===t?void 0:t[0])||"0",l=getRuneAmountInSats({amount:BigInt(s),decimals:r,floorPriceInSats:null!=i?i:0}),c=(0,g.KB)(Number(l));return c*(a||0)},getRuneBalanceInSats=e=>{var t;let{runeBalance:n,rune:r}=e;if(!r)return 0n;let{decimals:i,floor_price_in_sats:a}=r,s=BigInt((null===(t=n.split("."))||void 0===t?void 0:t[0])||"0"),l=getRuneAmountInSats({amount:s,decimals:i||0,floorPriceInSats:null!=a?a:0});return l};function RuneBalance(e){let{rune:t,balance:n,bitcoinPriceInUsd:i}=e;if(!t)return null;let{name:s,spacers:l,decimals:c,floor_price_in_sats:o}=t,d=l?(0,v.zA)(s,l):s,u=(0,b.W5)(n,c||0),f=getRuneUsdBalance({runeBalance:n,runeDecimals:c||0,runePriceInSats:null!=o?o:0,bitcoinPriceInUsd:null!=i?i:0});return(0,r.jsxs)(m.Dh,{className:"gap-3",children:[(0,r.jsxs)(a(),{href:"/rune/".concat(s),className:"flex items-center gap-2 text-textAccent",children:[(0,r.jsx)(x.p,{symbol:t.symbol,size:22,inscription:t.inscription}),(0,r.jsx)(m.Fu,{className:"overflow-hidden overflow-ellipsis",children:d})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)(m.s0,{children:(0,r.jsx)(p.Z,{number:u})}),!i&&(0,r.jsx)(h.N,{className:"mt-[6px] h-[8px] w-[40px]"}),null!==f&&(0,r.jsxs)("p",{className:"text-13 text-textSecondary",children:["~ $",(0,g.FR)(Math.round(f))]})]})]})}let LoadingTokenBalance=()=>(0,r.jsx)(f.Z,{className:"translate-z-0 relative min-h-[72px] overflow-hidden bg-bgTertiary",children:(0,r.jsx)(h.Z,{})});var j=n(63934),w=n(36363),y=n(75465),N=n(59892),C=n(90681),S=n(69123),_=!0,runes=e=>{let{address:t}=e,n="Runes for ".concat(t," | Ordiscan"),{data:i,isLoading:f,isError:h}=N.h.rune.getRuneBalancesForAddress.useQuery({address:t},{...C.G,...C.B}),{data:m}=N.h.price.getBitcoinprice.useQuery(void 0,{...C.B}),x=!!(null==i?void 0:i.length);return(0,r.jsxs)(w.Z,{children:[(0,r.jsx)(o.Z,{title:n}),(0,r.jsx)("main",{children:(0,r.jsxs)(s.Z,{className:"mt-12",children:[(0,r.jsx)(j.Z,{address:t}),(0,r.jsx)(u.Z,{address:t,currentTab:"runes"}),h?(0,r.jsx)(y.Z,{children:(0,r.jsxs)("div",{className:"w-[500px] max-w-full flex flex-col gap-3 items-center",children:[(0,r.jsx)("p",{className:"text-textSecondaryNonTransparent text-18 text-center",children:"Hmm, something went wrong. \uD83E\uDD15"}),(0,r.jsx)("p",{className:"text-center",children:"We couldn't fetch the rune balances for this address. It might be because it has too many UTXOs."})]})}):f||x?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.X,{children:"Rune Balances"}),(0,r.jsxs)(l.Z,{className:"grid-cols-runeCard sm:grid-cols-runeCard",children:[null==i?void 0:i.sort((e,t)=>{let n=getRuneBalanceInSats({runeBalance:e.balance,rune:e.rune}),r=getRuneBalanceInSats({runeBalance:t.balance,rune:t.rune});return Number(r-n)}).map(e=>{let{rune:t,balance:n}=e;return(0,r.jsx)(RuneBalance,{rune:t,balance:n,bitcoinPriceInUsd:m},null==t?void 0:t.name)}),f&&(0,r.jsx)(LoadingTokenBalance,{})]})]}):(0,r.jsxs)(y.Z,{children:[(0,r.jsx)("p",{children:"No Rune balances found"}),(0,r.jsx)("p",{className:"text-center mt-4",children:(0,r.jsxs)(a(),{href:"/runes",className:"text-textLink inline-flex gap-1 items-center",children:[(0,r.jsx)("span",{children:"Find a rune to mint!"}),(0,r.jsx)(S.Z,{className:"[&_path]:fill-current h-[18px]"})]})})]}),(0,r.jsx)(d.l,{address:t})]})})]})}},13837:function(e,t,n){"use strict";n.d(t,{Io:function(){return getFirstDayOfNextMonth},lP:function(){return unixToDateTime},mn:function(){return formatDateShort},p6:function(){return formatDate},zg:function(){return formatRelativeDate}});var r=n(11640),i=n(87344),a=n(4314),s=n(43703),l=n(30120);let unixToDateTime=e=>new Date(1e3*e),formatRelativeDate=(e,t,n)=>{let r=l.ou.fromJSDate(e),i=r.toJSDate(),s="",c="";i>new Date&&(n?c=" from now":s="in "),i<new Date&&(c=" ago");let o=s+((0,a.Z)(i,{includeSeconds:!0})+c);return t&&(o=(o=(o=(o=o.replace("about ","")).replace("over ","")).replace("almost ","")).replace("less than ","")),(["less than a minute ago","half a minute ago"].includes(o)||o.includes("seconds ago"))&&(o="Just now"),o},formatDate=e=>{let t=l.ou.fromJSDate(e);return t.setLocale("en").toLocaleString(l.ou.DATETIME_MED)},formatDateShort=e=>{let t=new Date().getFullYear();return e.getFullYear()===t?(0,i.Z)(e,"MMM do"):(0,i.Z)(e,"MMM do, YYY")};function getFirstDayOfNextMonth(){let e=new Date,t=(0,r.Z)(e,1),n=(0,s.Z)(t);return n}},90681:function(e,t,n){"use strict";n.d(t,{B:function(){return r},G:function(){return i}});let r={trpc:{context:{skipBatch:!0}}},i={refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchIntervalInBackground:!1}},97650:function(e,t,n){"use strict";let r;n.d(t,{YD:function(){return useInView}});var i=n(67294);let a=new Map,s=new WeakMap,l=0;function useInView({threshold:e,delay:t,trackVisibility:n,rootMargin:c,root:o,triggerOnce:d,skip:u,initialInView:f,fallbackInView:h,onChange:m}={}){var x;let[p,g]=i.useState(null),b=i.useRef(),[v,j]=i.useState({inView:!!f,entry:void 0});b.current=m,i.useEffect(()=>{let i;if(!u&&p)return i=function(e,t,n={},i=r){if(void 0===window.IntersectionObserver&&void 0!==i){let r=e.getBoundingClientRect();return t(i,{isIntersecting:i,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:r,intersectionRect:r,rootBounds:r}),()=>{}}let{id:c,observer:o,elements:d}=function(e){let t=Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{var n;return`${t}_${"root"===t?(n=e.root)?(s.has(n)||(l+=1,s.set(n,l.toString())),s.get(n)):"0":e[t]}`}).toString(),n=a.get(t);if(!n){let r;let i=new Map,s=new IntersectionObserver(t=>{t.forEach(t=>{var n;let a=t.isIntersecting&&r.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=a),null==(n=i.get(t.target))||n.forEach(e=>{e(a,t)})})},e);r=s.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:s,elements:i},a.set(t,n)}return n}(n),u=d.get(e)||[];return d.has(e)||d.set(e,u),u.push(t),o.observe(e),function(){u.splice(u.indexOf(t),1),0===u.length&&(d.delete(e),o.unobserve(e)),0===d.size&&(o.disconnect(),a.delete(c))}}(p,(e,t)=>{j({inView:e,entry:t}),b.current&&b.current(e,t),t.isIntersecting&&d&&i&&(i(),i=void 0)},{root:o,rootMargin:c,threshold:e,trackVisibility:n,delay:t},h),()=>{i&&i()}},[Array.isArray(e)?e.toString():e,p,o,c,d,u,n,h,t]);let w=null==(x=v.entry)?void 0:x.target,y=i.useRef();p||!w||d||u||y.current===w||(y.current=w,j({inView:!!f,entry:void 0}));let N=[g,v.inView,v.entry];return N.ref=N[0],N.inView=N[1],N.entry=N[2],N}}},function(e){e.O(0,[3310,8388,6888,9866,5745,6796,3670,8862,788,6363,9674,2500,9774,2888,179],function(){return e(e.s=20367)}),_N_E=e.O()}]);