1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4695],{44695:function(e,n,t){t.d(n,{Z:function(){return K}});var r,s=t(67294),i=t(76895),a=t(51802),d=t(17543),l=t(50391),o=t(84849),c=t(80318),x=t(74855),h=t(27036),u=t(41899),m=t(85893),v=function(e){var n=e.nodeId,t=e.address,r=e.label,i=s.useRef(null),a=s.useState("copy"),d=(0,c.Z)(a,2),l=d[0],o=d[1],v=s.useState(0),p=(0,c.Z)(v,2),g=p[0],j=p[1];s.useEffect((function(){var e,n=null===i||void 0===i||null===(e=i.current)||void 0===e?void 0:e.offsetWidth;n>0&&"copy"===l&&j(n)}),[r,i.current]);var f=g>0?{width:"".concat(g+3,"px")}:{},y="copy"===l?"hover:bg-gray-50 hover:border-black cursor-pointer":"";return(0,m.jsx)("div",{className:"inline-block text-sm",ref:i,style:f,children:(0,m.jsx)(x.CopyToClipboard,{text:n+"@"+t,onCopy:function(){o("check"),setTimeout((function(){o("copy")}),2e3)},children:(0,m.jsx)("div",{children:(0,m.jsxs)("div",{className:"rounded-md border bg-white border-gray-300 text-center flex justify-center items-center h-7 px-2 "+y,children:["copy"===l&&(0,m.jsxs)("div",{className:"flex items-center",children:[(0,m.jsx)(u.Z,{fontSize:"inherit",color:"inherit",className:"mr-1"}),(0,m.jsx)("span",{className:"mr-1",children:r})]}),"check"===l&&(0,m.jsxs)("div",{children:[(0,m.jsx)(h.Z,{fontSize:"inherit",color:"inherit",className:" text-viking-700 text-base mr-1",style:{marginBottom:"3px"}}),"Copied"]})]})})})})},p=t(30266),g=t(52209),j=t(809),f=t.n(j),y=t(57501),N=t(14957),b=t(69430),Z=t(84382),w=(0,b.Ps)(r||(r=(0,g.Z)(["\nquery ($nodeId: String!) {\n NodeLikeCount(nodeId: $nodeId) {\n count,\n id,\n userLiked\n }\n}\n"])));var k,I=t(50319),C=t(42695),S=function(e){var n=e.nodeId,t=function(e){var n,t=(0,Z.aM)(w,{variables:{nodeId:e}});return{loading:t.loading,error:t.error,data:null===(n=t.data)||void 0===n?void 0:n.NodeLikeCount,refetch:t.refetch}}(n),r=s.useState(!1),i=(0,c.Z)(r,2),a=i[0],d=i[1],l=(0,C.F)(),o=(0,I.D)((0,b.Ps)(k||(k=(0,g.Z)(["\n mutation ($nodeId: String!) {\n LikeNode(nodeId: $nodeId)\n }\n "]))),{fetchPolicy:"no-cache"}),x=(0,c.Z)(o,2),h=x[0],u=x[1];u.data,u.error;function v(){return(v=(0,p.Z)(f().mark((function e(){var r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(r=l.data)&&void 0!==r&&r.uid){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,h({variables:{nodeId:n}});case 4:return e.next=6,t.refetch();case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return t.loading||t.error?(0,m.jsx)(s.Fragment,{}):(0,m.jsx)("div",{className:"inline-block text-sm",children:(0,m.jsx)("div",{onMouseEnter:function(){return l.data&&d(!0)},onMouseLeave:function(){return d(!1)},onClick:function(){return function(){return v.apply(this,arguments)}()},className:"rounded-md border bg-white border-gray-300 text-center \n flex justify-center items-center h-7 px-2 \n ".concat(l.data&&"cursor-pointer hover:bg-gray-50 hover:border-black"," \n "),children:(0,m.jsxs)("div",{className:"flex",children:[(0,m.jsxs)("div",{className:"flex items-center ",children:[(t.data.userLiked||a)&&(0,m.jsx)(N.Z,{fontSize:"inherit",color:"inherit",className:"mr-1 text-orange-400 text-base"}),!t.data.userLiked&&!a&&(0,m.jsx)(y.Z,{fontSize:"inherit",color:"inherit",className:"mr-1 text-base"}),(0,m.jsxs)("span",{className:"mr-1",children:[t.data.userLiked&&"Starred",!t.data.userLiked&&"Star"]})]}),t.data.count>0&&(0,m.jsx)("div",{className:"border-l border-gray-300 ml-1 pl-2 pr-1",style:{minWidth:"24px"},children:t.data.count})]})})})},M=t(65523),F=t(49185);function L(){return Math.round(1e3*Math.random()).toString()}var D=function(e){(0,M.Z)(e);var n=s.useState("copy"),t=(0,c.Z)(n,2),r=t[0],i=t[1],a=s.useState(L()),d=(0,c.Z)(a,2),l=d[0],o=d[1];var u="copy"===r?"hover:bg-gray-50 hover:border-black cursor-pointer":"";return(0,m.jsx)("div",{className:"inline-block text-sm",children:(0,m.jsx)(x.CopyToClipboard,{text:window.location.href+"?n="+l,onCopy:function(){i("check"),o(L()),setTimeout((function(){i("copy")}),2e3)},children:(0,m.jsx)("div",{children:(0,m.jsxs)("div",{className:"rounded-md border bg-white border-gray-300 text-center flex justify-center items-center h-7 px-2 mr-1 "+u,children:["copy"===r&&(0,m.jsxs)("div",{className:"flex items-center",children:[(0,m.jsx)(F.Z,{fontSize:"inherit",color:"inherit",className:"mr-1"}),(0,m.jsx)("span",{className:"mr-1",children:"Share"})]}),"check"===r&&(0,m.jsxs)("div",{children:[(0,m.jsx)(h.Z,{fontSize:"inherit",color:"inherit",className:" text-viking-700 text-base mr-1",style:{marginBottom:"3px"}}),"Copied"]})]})})})})},T=function(e){var n=e.node;return(0,m.jsxs)("div",{className:"flex flex-wrap gap-1",children:[n.ipAddress&&(0,m.jsx)(v,{nodeId:n.id,label:"IP address",address:n.ipAddress}),n.torAddress&&(0,m.jsx)(v,{nodeId:n.id,label:"TOR address",address:n.torAddress}),(0,m.jsx)(S,{nodeId:n.id}),(0,m.jsx)(D,{})]})},H=t(77406),V=t(14563),z=function(e){return(0,M.Z)(e),(0,m.jsx)(V.Z,{enterTouchDelay:0,leaveTouchDelay:5e3,placement:"bottom",title:(0,m.jsx)("div",{className:" p-2 text-sm font-normal",children:"Your node shares a channel with this node."}),children:(0,m.jsxs)("div",{className:"text-sm flex items-center px-2 rounded-full bg-[#FFE0D6] text-[#4A1505]",children:[(0,m.jsx)("span",{className:"py-1",children:"Channel"}),(0,m.jsx)("span",{className:"ml-1",children:(0,m.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,m.jsx)("path",{d:"M6.5 11.25V12H7.5V4H6.5V4.75H3.75V7H0V9H3.75V11.25H6.5Z",fill:"currentColor"}),(0,m.jsx)("path",{d:"M9.5 4.75V4H8.5V12H9.5V11.25H12.25V9H16V7H12.25V4.75H9.5Z",fill:"currentColor"})]})})]})})},A=function(e){return(0,M.Z)(e),(0,m.jsxs)("div",{className:"text-sm flex items-center px-2 rounded-full bg-[#F1ECFF] text-[#37295F]",children:[(0,m.jsx)("span",{className:"py-1",children:"Liquidity Ad"}),(0,m.jsx)("span",{className:"ml-1",children:(0,m.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"8",he
1ight:"11.5",viewBox:"0 0 8 12",fill:"currentColor",children:[(0,m.jsx)("path",{d:"M8 8C8 10.2091 6.20914 12 4 12C1.79086 12 0 10.2091 0 8C0 5.79086 4 1.33333 4 0C4 1.33333 8 5.79086 8 8Z",fill:"currentColor"}),(0,m.jsx)("path",{d:"M6.66667 8C6.66667 9.10457 5.10457 10.6667 4 10.6667",stroke:"white","stroke-width":"0.3"})]})})]})},P=t(18037),E=function(e){return(0,M.Z)(e),(0,m.jsxs)("div",{className:"text-sm flex items-center px-2 rounded-full bg-viking-200 text-viking-1000",children:[(0,m.jsx)("span",{className:"py-1",children:"Liquidity Scan"}),(0,m.jsx)("span",{className:"ml-1",children:(0,m.jsx)(P.Z,{fontSize:"inherit",color:"inherit"})})]})},q=t(5175),B=t(9944),$=function(e){var n=e.nodeId,t=(0,l.m)(n);if(t.loading&&!t.data)return(0,m.jsx)(s.Fragment,{});var r=t.data,i=null===r||void 0===r?void 0:r.inactiveIncomingChannelsPercentage,a=new Date(null===r||void 0===r?void 0:r.lastUpdate),d=((new Date).getTime()-a.getTime())/864e5;return i>.25&&d>1?(0,m.jsx)(q.Z,{nodeId:n,children:(0,m.jsxs)("div",{className:"text-sm py-1 flex items-center text-red-50 bg-red-700 px-2 rounded-full",children:["Inactive ",Math.round(100*i),"%",(0,m.jsx)(B.Z,{color:"inherit",fontSize:"inherit",className:"ml-1"})]})}):i>.25?(0,m.jsx)(q.Z,{nodeId:n,children:(0,m.jsxs)("div",{className:"text-sm py-1 flex items-center bg-yellow-200 text-yellow-700 px-2 rounded-full",children:["Unstable ",Math.round(100*i),"%",(0,m.jsx)(B.Z,{color:"inherit",fontSize:"inherit",className:"ml-1"})]})}):(0,m.jsx)(q.Z,{nodeId:n,children:(0,m.jsx)("div",{className:"text-sm py-1 flex items-center bg-gray-200 px-2 rounded-full",children:"Active"})})},_=function(e){return(0,M.Z)(e),(0,m.jsx)("div",{className:"text-sm flex items-center px-2 rounded-full bg-[#FFE5F8] text-[#5A0E45]",children:(0,m.jsx)("span",{className:"py-1",children:"#zeroBaseFee"})})},O=function(e){var n=e.node;return(0,m.jsxs)("div",{className:"flex gap-1",children:[n&&(0,m.jsx)($,{nodeId:null===n||void 0===n?void 0:n.id}),n.liquidityAd&&(0,m.jsx)(A,{}),n.features.zeroBaseFee&&(0,m.jsx)("a",{href:"https://basefee.ln.rene-pickhardt.de/",target:"_blank",children:(0,m.jsx)(_,{})}),n.features.liquidityScan&&(0,m.jsx)(E,{}),(0,m.jsx)(H.Z,{peerId:n.id,children:(0,m.jsx)(z,{})})]})};function U(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,t=Math.floor(Math.log10(e))+1,r=Math.pow(10,t-n);return Math.round(e/r)*r}var K=function(e){var n=e.nodeId,t=(0,l.m)(n),r=t.data,c=t.loading&&!t.data;return(0,m.jsxs)("div",{className:"lnrouter-container",children:[(0,m.jsxs)("div",{className:"flex justify-between flex-wrap",children:[(0,m.jsxs)("div",{children:[(0,m.jsxs)("div",{className:"text-gray-400 text-xs",children:[c&&(0,m.jsx)(o.Z,{width:"100px"}),(null===r||void 0===r?void 0:r.geolocation)&&(0,m.jsxs)("div",{children:[r.geolocation.city,", ",r.geolocation.country]}),!(null!==r&&void 0!==r&&r.geolocation)&&!c&&(0,m.jsx)("div",{className:"pb-4"})]}),(0,m.jsxs)("div",{className:"font-bold md:text-5xl text-gray-800 break-all text-3xl",children:[c&&(0,m.jsx)(o.Z,{width:"200px"}),!c&&(null===r||void 0===r?void 0:r.label)]}),(0,m.jsxs)("div",{className:"text-gray-600 text-sm break-all pt-1",children:[c&&(0,m.jsx)(o.Z,{width:"200px"}),!c&&(0,m.jsx)(d.Z,{nodeId:(null===r||void 0===r?void 0:r.id)||"",ambossLink:!1,allowCopy:!0,maxCharacters:20})]}),r&&(0,m.jsx)("div",{className:"pt-4",children:(0,m.jsx)(O,{node:r})})]}),(0,m.jsxs)("div",{children:[(0,m.jsx)("div",{className:"pb-4"}),r&&(0,m.jsx)(T,{node:r})]})]}),(0,m.jsxs)("div",{className:"mt-12 grid grid-cols-2 lg:grid-cols-8 xl:grid-cols-10 gap-y-4 gap-x-4 ",children:[(0,m.jsxs)("div",{className:"col-span-2 py-2 px-4 rounded bg-white ring-1 ring-gray-100",children:[(0,m.jsx)("div",{className:"text-gray-500 text-xs font-light",children:"Node capacity"}),(0,m.jsxs)("div",{className:"text-xl font-bold text-gray-800 pt-4",children:[c&&(0,m.jsx)(o.Z,{width:"100px"}),!c&&(0,m.jsxs)(s.Fragment,{children:[(0,m.jsx)("span",{className:"font-normal",children:"\u20bf"}),(0,m.jsx)(a.Z,{satoshi:(null===r||void 0===r?void 0:r.capacitySat)||0})]})]})]}
1),(0,m.jsxs)("div",{className:" bg-white py-2 px-4 rounded ring-1 ring-gray-100",children:[(0,m.jsx)("div",{className:"text-gray-500 text-xs font-light",children:"Channels"}),(0,m.jsxs)("div",{className:"text-xl font-bold text-gray-800 pt-4",children:[c&&(0,m.jsx)(o.Z,{width:"100px"}),!c&&(0,m.jsx)(i.Z,{value:(null===r||void 0===r?void 0:r.channelCount)||0})]})]}),(0,m.jsxs)("div",{className:"bg-white py-2 px-4 rounded col-span-2 ring-1 ring-gray-100",children:[(0,m.jsx)("div",{className:"text-gray-500 text-xs font-light",children:"Median fee"}),(0,m.jsxs)("div",{className:"text-xl font-bold text-gray-800 pt-4",children:[c&&(0,m.jsx)(o.Z,{width:"100px"}),!c&&(0,m.jsxs)(s.Fragment,{children:[(0,m.jsx)(i.Z,{value:(null===r||void 0===r?void 0:r.medianPpm)||0}),"ppm"]})]})]}),(0,m.jsxs)("div",{className:" col-span-2 bg-white py-2 px-4 rounded ring-1 ring-gray-100",children:[(0,m.jsx)("div",{className:"text-gray-500 text-xs font-light",children:"Average channel capacity"}),(0,m.jsxs)("div",{className:"text-xl font-bold text-gray-800 pt-4",children:[c&&(0,m.jsx)(o.Z,{width:"100px"}),!c&&r&&(0,m.jsxs)(s.Fragment,{children:[(0,m.jsx)(i.Z,{value:U(r.avgChannelCapacitySat)}),"sat"]})]})]}),((null===r||void 0===r?void 0:r.avgChannelDistanceKm)||c)&&(0,m.jsxs)("div",{className:"col-span-2 bg-white py-2 px-4 rounded ring-1 ring-gray-100",children:[(0,m.jsx)("div",{className:"text-gray-500 text-xs font-light",children:"Average channel distance"}),(0,m.jsxs)("div",{className:"text-xl font-bold text-gray-800 pt-4 ",children:[c&&(0,m.jsx)(o.Z,{width:"100px"}),!c&&(0,m.jsx)(s.Fragment,{children:(0,m.jsxs)("div",{children:[(0,m.jsx)(i.Z,{value:null===r||void 0===r?void 0:r.avgChannelDistanceKm}),"km",(0,m.jsxs)("span",{className:"text-gray-400 pl-1 font-normal text-base",children:["/ ",(0,m.jsx)(i.Z,{value:Math.round((null===r||void 0===r?void 0:r.avgChannelDistanceKm)/1.609)}),"mi"]})]})})]})]})]})]})}},5175:function(e,n,t){var r=t(67294),s=t(50391),i=t(14563),a=t(69695),d=t.n(a),l=t(85893);n.Z=function(e){var n=e.nodeId,t=e.nodeInfo,a=e.children,o=(0,s.m)(n,{skip:!!t});if(o.loading&&!o.data&&!t)return(0,l.jsx)(r.Fragment,{});var c=(null===o||void 0===o?void 0:o.data)||t;return(0,l.jsx)(i.Z,{enterTouchDelay:0,leaveTouchDelay:5e3,placement:"bottom",title:(0,l.jsxs)("div",{className:"flex items-center gap-4 p-2",children:[(0,l.jsxs)("div",{className:" text-sm font-normal",children:[(0,l.jsxs)("div",{children:[Math.round(100*c.inactiveIncomingChannelsPercentage),"% of inbound channels inactive."]}),c.lastUpdate&&(0,l.jsxs)("div",{children:["Last update ",d()((new Date).getTime()-new Date(c.lastUpdate).getTime(),{round:!0,largest:1})," ago."]})]}),(0,l.jsx)("div",{children:(0,l.jsx)("a",{href:"https://blog.lnrouter.app/inactive-status",target:"_blank",className:"underline font-normal hover:text-viking-800",children:"More info"})})]}),children:(0,l.jsx)("div",{children:a})})}},77406:function(e,n,t){t.d(n,{Z:function(){return x}});var r,s=t(67294),i=t(52209),a=t(69430),d=t(84382),l=t(38800),o=(0,a.Ps)(r||(r=(0,i.Z)(["\nquery IsPeerOf($peerId: String!) {\n IsPeerOfMe(peerId: $peerId) \n}"])));var c=t(85893),x=function(e){var n=e.peerId,t=e.children;return!0===function(e){var n,t=(0,l.F)();t.loading;var r=(0,d.aM)(o,{variables:{peerId:e},skip:!t.isLoggedIn}),s=null===(n=r.data)||void 0===n?void 0:n.IsPeerOfMe;return{loading:r.loading,error:r.error,data:s,refetch:r.refetch}}(n).data?t:(0,c.jsx)(s.Fragment,{})}}}]); 2//# sourceMappingURL=4695-65c755adefc345c03900.js.map
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.