"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7488],{20727:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(61263),s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let a=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),i=(e,t)=>{let n=(0,r.forwardRef)(({color:n="currentColor",size:i=24,strokeWidth:o=2,absoluteStrokeWidth:l,children:c,...d},m)=>(0,r.createElement)("svg",{ref:m,...s,width:i,height:i,stroke:n,strokeWidth:l?24*Number(o)/Number(i):o,className:`lucide lucide-${a(e)}`,...d},[...t.map(([e,t])=>(0,r.createElement)(e,t)),...(Array.isArray(c)?c:[c])||[]]));return n.displayName=`${e}`,n}},85832:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(20727);let s=(0,r.Z)("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},61878:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(20727);let s=(0,r.Z)("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},37488:function(e,t,n){n.r(t),n.d(t,{InlineSnippet:function(){return d},default:function(){return m}});var r=n(38766),s=n(61263),a=n(6975);n(16682);let i=(e,t)=>e===t?null:e.slice(0,e.length-t.length-1);var o=n(85832),l=n(61878),c=n(55408);let d=e=>{let{className:t,children:n}=e;return(0,r.jsx)("span",{className:(0,c.cn)("inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900 dark:bg-blue-900 dark:text-blue-100",t),children:n})};function m(e){let{domain:t}=e,[n,c]=(0,s.useState)("A"),{status:m,domainJson:x}=(0,a.$)({domain:t});if(!m||"Valid Configuration"===m||!x)return null;let h=i(x.name,x.apexName),u="Pending Verification"===m&&x.verification.find(e=>"TXT"===e.type)||null;return(0,r.jsxs)("div",{className:"border-t border-stone-200 px-10 pb-5 pt-7 dark:border-stone-700",children:[(0,r.jsxs)("div",{className:"mb-4 flex items-center space-x-2",children:["Pending Verification"===m?(0,r.jsx)(o.Z,{fill:"#FBBF24",stroke:"currentColor",className:"text-white dark:text-black"}):(0,r.jsx)(l.Z,{fill:"#DC2626",stroke:"currentColor",className:"text-white dark:text-black"}),(0,r.jsx)("p",{className:"text-lg font-semibold dark:text-white",children:m})]}),u?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("p",{className:"text-sm dark:text-white",children:["Please set the following TXT record on"," ",(0,r.jsx)(d,{children:x.apexName})," to prove ownership of ",(0,r.jsx)(d,{children:x.name}),":"]}),(0,r.jsxs)("div",{className:"my-5 flex items-start justify-start space-x-10 rounded-md bg-stone-50 p-2 dark:bg-stone-800 dark:text-white",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-bold",children:"Type"}),(0,r.jsx)("p",{className:"mt-2 font-mono text-sm",children:u.type})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-bold",children:"Name"}),(0,r.jsx)("p",{className:"mt-2 font-mono text-sm",children:u.domain.slice(0,u.domain.length-x.apexName.length-1)})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-bold",children:"Value"}),(0,r.jsx)("p",{className:"mt-2 font-mono text-sm",children:(0,r.jsx)("span",{className:"text-ellipsis",children:u.value})})]})]}),(0,r.jsx)("p",{className:"text-sm dark:text-stone-400",children:"Warning: if you are using this domain for another site, setting this TXT record will transfer domain ownership away from that site and break it. Please exercise caution when setting this record."})]}):"Unknown Error"===m?(0,r.jsx)("p",{className:"mb-5 text-sm dark:text-white",children:x.error.message}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex justify-start space-x-4",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>c("A"),className:"".concat("A"==n?"border-black text-black dark:border-white dark:text-white":"border-white text-stone-400 dark:border-black dark:text-stone-600"," ease border-b-2 pb-1 text-sm transition-all duration-150"),children:["A Record",!h&&" (recommended)"]}),(0,r.jsxs)("button",{type:"button",onClick:()=>c("CNAME"),className:"".concat("CNAME"==n?"border-black text-black dark:border-white dark:text-white":"border-white text-stone-400 dark:border-black dark:text-stone-600"," ease border-b-2 pb-1 text-sm transition-all duration-150"),children:["CNAME Record",h&&" (recommended)"]})]}),(0,r.jsxs)("div",{className:"my-3 text-left",children:[(0,r.jsxs)("p",{className:"my-5 text-sm dark:text-white",children:["To configure your"," ","A"===n?"apex domain":"subdomain"," (",(0,r.jsx)(d,{children:"A"===n?x.apexName:x.name}),"), set the following ",n," record on your DNS provider to continue:"]}),(0,r.jsxs)("div",{className:"flex items-center justify-start space-x-10 rounded-md bg-stone-50 p-2 dark:bg-stone-800 dark:text-white",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-bold",children:"Type"}),(0,r.jsx)("p",{className:"mt-2 font-mono text-sm",children:n})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-bold",children:"Name"}),(0,r.jsx)("p",{className:"mt-2 font-mono text-sm",children:"A"===n?"@":null!=h?h:"www"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-bold",children:"Value"}),(0,r.jsx)("p",{className:"mt-2 font-mono text-sm",children:"A"===n?"76.76.21.21":"cname.".concat("nerdsnipe.app")})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-bold",children:"TTL"}),(0,r.jsx)("p",{className:"mt-2 font-mono text-sm",children:"86400"})]})]}),(0,r.jsxs)("p",{className:"mt-5 text-sm dark:text-white",children:["Note: for TTL, if ",(0,r.jsx)(d,{children:"86400"})," is not available, set the highest value possible. Also, domain propagation can take up to an hour."]})]})]})]})}},6975:function(e,t,n){n.d(t,{$:function(){return a}});var r=n(897),s=n(55408);function a(e){let{domain:t}=e,{data:n,isValidating:a}=(0,r.ZP)("/api/domain/".concat(t,"/verify"),s._i,{revalidateOnMount:!0,refreshInterval:5e3,keepPreviousData:!0});return{status:null==n?void 0:n.status,domainJson:null==n?void 0:n.domainJson,loading:a}}},55408:function(e,t,n){n.d(t,{MX:function(){return o},_i:function(){return i},cn:function(){return a}});var r=n(33501),s=n(24600);function a(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.m6)((0,r.W)(t))}async function i(e,t){let n=await fetch(e,{...t,cache:"no-store"});return n.json()}n(79638).lW;let o=(e,t)=>Math.floor(Math.random()*(t-e+1)+e)}}]);