1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3106],{13259:function(t,e,n){"use strict";n.d(e,{$G:function(){return h},D3:function(){return w},Dk:function(){return c},Gy:function(){return y},PQ:function(){return s},ST:function(){return p},T5:function(){return b},Uz:function(){return S},XI:function(){return m},YJ:function(){return o},br:function(){return g},ej:function(){return f},gG:function(){return l},i4:function(){return M},is:function(){return E},jW:function(){return a},ob:function(){return T},rz:function(){return k},uU:function(){return d},vi:function(){return i},wd:function(){return v},yM:function(){return _},zA:function(){return u}});var r=n(20357);let o="https://purchase6.blockdag.network",i="https://blockdag.com",a="0.00000017",u="/how-to-buy",c="https://ai.blockdag.network/",s="https://apps.apple.com/us/app/blockdag-x1/id6503609082",l="https://apk.blockdagnetwork.io/BlockDAGv1.6.apk",d="https://api.bdagapiserver.com/api/v2/barong/public/users/metrics",f="pk.eyJ1IjoiYmxvY2tkYWduZXR3b3JrIiwiYSI6ImNtN3Z4YjFpMjAxYjEycXNuOW54ZGMwN3MifQ.QNDH25sl5Hwt_OCo1wwT6A",v="https://bdagscan.com/",p="https://staking.blockdag.works/",w="https://ide.bdagscan.com/",h="rpc.bdagscan.com/",g="https://wizard.bdagscan.com/",k="https://wiki.blockdag.network/blockdag-wiki",b="https://presaleapi.blockdag.network",m="https://leadapi.blockdag.network",_="https://blockdag.network/";r.env.NEXTAUTH_URL,r.env.NEXT_LOCAL;let S="https://preapi.blockdag.network/",y="".concat(S,"root/v2");function E(t){return 23716e4+(Number.isFinite(t)?t:0)}let M="/mainnet",T={headers:{project:_}}},16609:function(t,e,n){"use strict";n.d(e,{BaseProvider:function(){return g},Z:function(){return k}});var r=n(57437),o=n(13259),i=n(38472);let a=async t=>{try{return await i.Z.get("".concat(o.Uz).concat(t))}catch(t){throw console.error("Failed to fetch data:",t),t}};var u=n(762),c=n(2265),s=n(49582),l=n(60019),d=n(66098),f=n.n(d),v=n(78002),p=n(16463),w=n(44630);s.ZP.registerPlugin(l.V,f());let h=(0,c.createContext)(void 0),g=t=>{let{children:e}=t,[n,s]=(0,c.useState)(!1),[d,f]=(0,c.useState)(!0),[g,k]=(0,c.useState)(!1),b=(0,v.Z)(),m=(0,w.Z)(),_=(0,p.usePathname)(),[S,y]=(0,c.useState)(!1),[E,M]=(0,c.useState)(void 0);(0,c.useEffect)(()=>{(null==b?void 0:b.width)&&(document.body.classList.add("sizeChanged"),setTimeout(()=>{document.body.classList.remove("sizeChanged")},50))},[null==b?void 0:b.width]);let[T,Z]=(0,c.useState)(void 0),[j,N]=(0,c.useState)(void 0),[L,U]=(0,c.useState)(void 0);(0,c.useEffect)(()=>{j&&U(Math.max(0,Number(j.stageTokens||0)-Number(j.stageSoldTokens||0)))},[j]),(0,c.useEffect)(()=>{d||"/"!=_||f(!0)},[d,_]),(0,c.useEffect)(()=>{i.Z.get("".concat(o.T5,"/user-country"),o.ob).then(t=>{200==t.status?Z(t.data.userCountry):Z("US")}).catch(t=>{console.log(t),Z("US")})},[]),(0,c.useEffect)(()=>{"/"!==_&&y(!1)},[_,m]);let x=async()=>{try{var t;let e=await i.Z.get(o.Gy);if(null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.coin){N(e.data.coin);return}}catch(t){}try{let t=await a("root");if(t&&t.data){let e=null==t?void 0:t.data;N(null==e?void 0:e.coin)}else i.Z.get("".concat(o.T5,"/blockdag?project=").concat(o.yM),{headers:{project:o.yM}}).then(t=>{if(200===t.status){var e;N(null===(e=t.data)||void 0===e?void 0:e.coin)}})}catch(t){i.Z.get("".concat(o.T5,"/blockdag?project=").concat(o.yM),{headers:{project:o.yM}}).then(t=>{if(200===t.status){var e;N(null===(e=t.data)||void 0===e?void 0:e.coin)}})}},C=async()=>{try{let t=await fetch("https://api.blockdagnetwork.io/api/v2/base/public/current_price");if(!t.ok)return;let e=await t.json(),n=parseFloat(null==e?void 0:e.price);if(n>0){let t=(Math.floor(1e3*n)/1e3).toFixed(3).replace(/0+$/,"").replace(/\.$/,"");M(t)}}catch(t){}};return(0,c.useEffect)(()=>{x(),C();let t=setInterval(()=>{s(t=>!t)},6e5);return()=>clearInterval(t)},[n]),(0,c.useEffect)(()=>{(()=>{{var t,e,n,r;let o=new URLSearchParams(window.location.search),i=o.get("utm_source"),a=o.get("source"),c=o.get("utm_medium"),s=o.get("utm_campaign"),l=(null===(r=window)||void 0===r?void 0:null===(n=r.location)||void 0===n?void 0:null===(e=n.href)||void 0===e?void 0:null===(t=e.split("?"))||void 0===t?void 0:t[1])||"";i&&"Trust_iOS_Browser"!==i&&(0,u.MS)("blockdag.utm_source",i,1),c&&(0,u.MS)("blockdag.utm_medium",c,1),a&&(0,u.MS)("blockdag.source",a,1),s&&(0,u.MS)("blockdag.utm_campaign",s,1),l&&(0,u.MS)("blockdag.all_params","?".concat(l),1)}})()},[]),(0,c.useEffect)(()=>{(()=>{{let t=new URLSearchParams(window.location.search).get("earnusdt");t&&"Trust_iOS_Browser"!==t&&(0,u.MS)("blockdag.earnusdt",t,20)}})()},[]),(0,r.jsx)(h.Provider,{value:{tokenData:j,heroActive:g,setHeroActive:k,country:T,useGSAP:l.V,activatedGsap:d,crActive:S,setCrActive:y,remainingCoins:L,bdagMarketPrice:E},children:e})};var k=()=>{let t=(0,c.useContext)(h);if(!t)throw Error("useBase must be used within a WalletProvider");return t}},44630:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(2265);function o(){let[t,e]=(0,r.useState)(0);return(0,r.useEffect)(()=>{{let t=()=>{e(window.scrollY)};return window.addEventListener("scroll",t),()=>{window.removeEventListener("scroll",t)}}},[]),t}},78002:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(2265);function o(){function t(){var t,e;return{width:null===(t=window)||void 0===t?void 0:t.innerWidth,height:null===(e=window)||void 0===e?void 0:e.innerHe
1ight}}let[e,n]=(0,r.useState)(t);return(0,r.useEffect)(()=>{var e;function r(){n(t())}return null===(e=window)||void 0===e||e.addEventListener("resize",r),()=>{var t;return null===(t=window)||void 0===t?void 0:t.removeEventListener("resize",r)}},[]),e}},762:function(t,e,n){"use strict";n.d(e,{Eh:function(){return c},HN:function(){return u},MS:function(){return i},bb:function(){return o},ie:function(){return a}});var r=n(13259);function o(){window.open(r.vi,"_blank","noopener,noreferrer")}function i(t,e,n){let r=new Date;r.setTime(r.getTime()+6e4*n);let o="expires="+r.toUTCString();document.cookie=t+"="+e+";"+o+";domain=.blockdag.network;path=/",document.cookie=t+"="+e+";"+o+";path=/"}let a=t=>t?new Date(t).toLocaleString("en-US",{year:"numeric",month:"long",day:"numeric"}):null,u=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,c=(t,e)=>"John Doe"!=t&&t?e.find(e=>e.attributes.title===t):e.find(t=>"Jake Morrison"===t.attributes.title)},58538:function(t){t.exports={container:"style_container__O7qie",lg:"style_lg__uab1X",sm:"style_sm__gJ0_G",classic:"style_classic___AOOd"}}}]);
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.