"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1391],{11475:function(e,t,n){n.d(t,{Z:function(){return r}});var s=n(97460),i=n(67294),l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},a=n(96110),r=i.forwardRef(function(e,t){return i.createElement(a.Z,(0,s.Z)({},e,{ref:t,icon:l}))})},22063:function(e,t,n){n.r(t),n.d(t,{blockAddress:function(){return Z},default:function(){return w}});var s=n(85893),i=n(67294),l=n(11163),a=n(48054),r=n(4393),c=n(55241),d=n(26412),o=n(92783),h=n(11980),m=n(62625),x=n(21911),u=n(27791),p=n(41664),j=n.n(p),f=n(53187),b=n(71211),g=n(42085),v=n(48764),N=n(26725),y=n(65904);let k=["Holders","Transfers"],S=["all","inscribe-mint","inscribe-transfer","transfer"],Z=["bc1qhuv3dhpnm0wktasd3v0kt6e4aqfqsd0uhfdu7d"];function w(){let e=(0,l.useRouter)(),t=e.query.tick||"",[n,p]=(0,i.useState)(null),[w,I]=(0,i.useState)("Holders"),[C,T]=(0,i.useState)(null),[B,E]=(0,i.useState)(1),[H,M]=(0,i.useState)(0),[R,z]=(0,i.useState)("all"),[D,O]=(0,i.useState)(null),[q,G]=(0,i.useState)(1),[L,P]=(0,i.useState)(0),[U,_]=(0,i.useState)(!1),F=(0,i.useRef)(null),V=0===((null==n?void 0:n.deployBlocktime)||0);function A(n){let{address:s}=n;e.push("/brc20?q=".concat(s,"&tick=").concat(encodeURIComponent(t)))}if((0,i.useMemo)(()=>v.Buffer.from(t).length,[t]),(0,i.useEffect)(()=>{t&&(N.GD?e.push((0,y.ei)(t)):x.CG.info(t).then(e=>{p(e)}).catch(x.S3))},[e,t]),(0,i.useEffect)(()=>{_((null==n?void 0:n.max)==="18446744073709551615")},[n]),(0,i.useEffect)(()=>{t&&(T(null),x.CG.listHolder(t,(B-1)*20,20).then(e=>{M(e.total),T(e.detail)}).catch(x.S3))},[w,B,t]),(0,i.useEffect)(()=>{"Transfers"===w&&t&&(O(null),x.CG.listTransfer(t,"all"===R?"":R,(q-1)*20,20).then(e=>{O(e.detail||[]),P(e.total)}).catch(x.S3))},[w,R,q,t]),!n)return(0,s.jsx)("div",{className:"main-container brc-20-item-page",children:(0,s.jsxs)("div",{className:"container",children:[(0,s.jsx)("div",{className:"top",children:(0,s.jsx)("div",{className:"flex-row-between",children:(0,s.jsx)("div",{className:"title display-domain",children:t})})}),(0,s.jsx)(a.Z,{active:!0})]})});let J=n.totalMinted===n.max;return(0,s.jsx)("div",{className:"main-container brc-20 brc-20-item-page",children:(0,s.jsxs)("div",{className:"container",children:[(0,s.jsxs)("div",{className:"top",children:[(0,s.jsxs)("div",{className:"flex-row-between",children:[(0,s.jsx)("div",{className:"title display-domain",children:(0,s.jsx)(g.h,{tick:t})}),J?(0,s.jsx)("div",{style:{color:"#8a8a8a"},children:"Completed"}):(0,s.jsx)("div",{className:"button",onClick:()=>{e.push("/inscribe?tick=".concat(t))},children:"Mint Directly"})]}),(0,s.jsx)(f.W,{data:n})]}),(0,s.jsx)(r.Z,{title:"Overview",extra:N.GD?(0,s.jsx)(s.Fragment,{}):(0,s.jsxs)("div",{className:"flex-row-v-center gap-16",children:[(0,s.jsx)(c.Z,{trigger:"click",placement:"bottomRight",content:(0,s.jsx)(j(),{className:"",style:{padding:"8px 16px"},href:"https://www.okx.com/web3/explorer/btc/token/brc20/".concat(n.inscriptionNumber,"?channelId=unisat"),target:"_blank",children:(0,s.jsx)("span",{style:{marginTop:0,lineHeight:"1.25"},children:"View on OKLink"})}),children:(0,s.jsx)("div",{className:"button border-btn",style:{padding:"8px 16px"},children:(0,s.jsx)("span",{style:{marginTop:0,lineHeight:"1.25"},children:"View"})})}),(0,s.jsx)(j(),{className:"button border-btn",style:{padding:"8px 16px"},href:"/market/brc20?tick=".concat(encodeURIComponent(t)),children:(0,s.jsx)("span",{style:{marginTop:0,lineHeight:"1.25"},children:"Trade"})})]}),children:(0,s.jsxs)(d.Z,{layout:"vertical",column:1,size:"small",children:[n.inscriptionId&&(0,s.jsx)(d.Z.Item,{label:"inscription",children:(0,s.jsx)(j(),{className:"address main",href:"/inscription/".concat(n.inscriptionId),children:n.inscriptionId})}),(0,s.jsx)(d.Z.Item,{label:"Supply",children:(0,m.xO)(n.max)}),(0,s.jsx)(d.Z.Item,{label:"Minted",children:(0,m.xO)(n.totalMinted)}),(0,s.jsx)(d.Z.Item,{label:"Limit per mint",children:(0,m.xO)(n.limit)}),(0,s.jsx)(d.Z.Item,{label:"Decimal",children:n.decimal}),(0,s.jsx)(d.Z.Item,{label:"Self-issuance",children:n.selfMint.toString()}),(0,s.jsx)(d.Z.Item,{label:"Deploy By",children:(0,s.jsx)("div",{className:"address main",onClick:()=>{A({address:n.creator})},children:n.creator})}),(0,s.jsx)(d.Z.Item,{label:"Deploy Time",children:V?"Unconfirmed":new Date(1e3*n.deployBlocktime).toLocaleString()}),n.completeBlocktime>0&&(0,s.jsx)(d.Z.Item,{label:"Completed Time",children:new Date(1e3*n.completeBlocktime).toLocaleString()}),n.inscriptionNumberStart&&(0,s.jsx)(d.Z.Item,{label:"Inscription Number Start",children:V?"Unconfirmed":"#".concat(n.inscriptionNumberStart)}),!U&&J&&n.inscriptionNumberEnd&&(0,s.jsx)(d.Z.Item,{label:"Inscription Number End",children:V?"Unconfirmed":"#".concat(n.inscriptionNumberEnd)}),(0,s.jsx)(d.Z.Item,{label:"Holders",children:(0,m.xO)(n.holdersCount)}),(0,s.jsx)(d.Z.Item,{label:"Total Transactions",children:(0,m.xO)(n.historyCount)})]})}),(0,s.jsxs)(r.Z,{style:{marginTop:32},title:(0,s.jsx)(o.Z,{options:k,value:w,onChange:I}),children:["Holders"===w&&(C?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("table",{cellPadding:8,children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"Rank"}),(0,s.jsx)("th",{children:"Address"}),(0,s.jsx)("th",{children:"Percentage"}),(0,s.jsx)("th",{children:"Value"})]})}),(0,s.jsx)("tbody",{children:C.map((e,t)=>{let i=(e.overallBalance/Number(U?n.totalMinted:n.max)*100).toFixed(2),l=e.overallBalance/C[0].overallBalance,a=Z.includes(e.address);return(0,s.jsxs)("tr",{children:[(0,s.jsxs)("td",{children:[" ",(B-1)*20+t+1]}),(0,s.jsx)("td",{className:"address",onClick:()=>{a||A(e)},children:(0,s.jsxs)("span",{className:"link  ".concat(a?"disable-link":""),children:["  ",(0,m.Pu)(e.address,10)]})}),(0,s.jsxs)("td",{className:"percent-container",children:[i,"%",(0,s.jsx)("div",{className:"percent",children:(0,s.jsx)("div",{className:"percent-bar",style:{width:"".concat(100*l,"%")}})})]}),(0,s.jsx)("td",{style:{paddingRight:0},children:(0,m.xO)(e.overallBalance)})]},t)})})]}),(0,s.jsx)("div",{className:"flex-row-center",style:{marginTop:16},children:(0,s.jsx)(h.Z,{showQuickJumper:H/20>50,total:H,pageSize:20,current:B,onChange:E,showSizeChanger:!1})})]}):(0,s.jsx)(a.Z,{active:!0})),"Transfers"===w&&(0,s.jsx)(u.R,{tick:t,transferHistory:D,setHistoryType:z,historyType:R,page:q,setPage:G,pageSize:20,total:L,historyTypeConfig:S})]}),(0,s.jsx)(b.ZP,{onlyBrc20:!0,tempFileList:{list:[]},ref:F})]})})}}}]);