PageSourceSearch

https://slugish.ai/build/assets/offer500-YvvU7AeH.js

js slugish.ai collected 2026-10-05 12:40:13 UTC 32,115 bytes, 16 lines download raw bytes

1import{u as Oe,r as s,b as F,j as e,H as We,L as Fe}from"./app-DP13319Q.js";import{D as Ve}from"./DraggableMenu-Bk7Spryo.js";import{F as y,a as Q,f as ce,k as O,j as Ke,bh as Xe,bi as Ge,bj as Je}from"./index-CtyZ6W6U.js";import{l as Qe}from"./index.module-D1uRunsO.js";import{E as Ze,l as et,u as tt,a as st,P as at}from"./react-stripe.esm-D6Ettci4.js";import{M as de}from"./react-tooltip.min-DW3XhwOj.js";/* empty css            */import"./index-DQkUn08L.js";const rt=et("pk_live_51IyCo8Dpr0bpQPac24tix9UpShzoMw1uWsW3JvzcMrKVFnvUsXAnvBknJSPYucZCYSLT4Z0UVBeKx49jlYakdjIw00coa3YVdn"),nt=(m,g,x=0)=>{if(!m||!m[g])return"";try{const n=m[g];if(typeof n=="string"){if(n.trim().startsWith("[")&&n.trim().endsWith("]"))try{const A=JSON.parse(n);return Array.isArray(A)?A[x]||A[0]||"":n}catch{return n}return n}return(Array.isArray(n)||typeof n=="object"&&n!==null)&&(n[x]||n[0])||""}catch(n){return console.error("Error parsing tooltip:",n),""}},lt=({price:m,email:g,clientSecret:x,onSuccess:n,onBack:A,onError:be,tooltips:Z})=>{const _=tt(),v=st(),[P,U]=s.useState(!1),[ee,k]=s.useState(""),[me,ve]=s.useState(!1),ue=async xe=>{if(xe.preventDefault(),k(""),!_||!v){k("Payment system not ready. Please try again.");return}U(!0);try{const{error:D}=await v.submit();if(D){console.error("Payment form validation failed:",D),k(D.message||"Payment form validation failed");return}const{error:L,paymentIntent:te}=await _.confirmPayment({elements:v,confirmParams:{return_url:`${window.location.origin}/payment-success`,receipt_email:g,payment_method_data:{billing_details:{email:g}}},clientSecret:x,redirect:"if_required"});if(L){console.error("Stripe payment error:",L),k(L.message||"Payment failed");return}if(!te){console.error("No payment intent returned"),k("Payment processing failed. No payment intent received.");return}switch(te.status){case"succeeded":n();break;case"requires_action":k("Payment requires additional authentication. Please complete the verification.");break;case"processing":k("Payment is processing. Please wait for confirmation.");break;default:k(`Payment failed. Status: ${te.status}`)}}catch(D){console.error("Unexpected error during payment processing:",D);const L=D instanceof Error?D.message:"Payment processing failed. Please try again.";k(L)}finally{U(!1)}};return e.jsxs("form",{onSubmit:ue,children:[ee&&e.jsxs("div",{className:"mb-4 p-3 bg-red-500/90 text-white rounded-lg flex items-center gap-2",children:[e.jsx(y,{icon:Q}),ee]}),e.jsxs("div",{className:"mt-4 text-sm text-gray-300",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{children:"Email:"}),e.jsx("span",{className:"text-yellow-400",children:g})]}),e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{children:"Amount:"}),e.jsxs("span",{className:"text-yellow-400",children:["US$",typeof m=="number"?m.toFixed(2):"0.00"]})]})]}),e.jsx("div",{className:"mt-6 space-y-4",children:e.jsx(at,{options:{layout:"tabs",fields:{billingDetails:{email:"auto"}}},onReady:()=>ve(!0)})}),e.jsx("div",{className:"mt-6",children:e.jsx("button",{type:"submit",disabled:P||!_||!me,className:`w-full bg-yellow-500 text-black font-bold py-3 px-4 rounded-lg hover:bg-yellow-600 transition-colors ${P||!_||!me?"opacity-70 cursor-not-allowed":""}`,children:P?e.jsxs(e.Fragment,{children:[e.jsx(y,{icon:O,className:"animate-spin mr-2"}),"Processing..."]}):`Pay US$${typeof m=="number"?m.toFixed(2):"0.00"}`})}),e.jsxs("div",{className:"mt-4 text-center",children:[e.jsx("button",{type:"button",onClick:A,className:"text-sm text-yellow-400 hover:underline",children:"Back to email"}),e.jsx("p",{className:"mt-2 text-xs text-gray-500",children:"Payment secured by STRIPE. You'll be redirected after payment."})]})]})},Ee=m=>{const g=document.createElement("div");return g.innerHTML=m,g.textContent||g.innerText||""},j=m=>{const g=Number(m);return isNaN(g)?0:g};function yt(){var $e;const{auth:m,initialFunnels:g,domains:x,subdomain:n,checkDomainUrl:A,checkStandardDomainUrl:be,tooltips:Z,promotionmessage:_,defaultCouponCode:v="",clean_domain:P="",codepage:U=""}=Oe().props;s.useEffect(()=>{console.log("clean_domain from server:",P),console.log("domains available:",x),console.log("codepage available:",!!U)},[P,x,U]);const ee=(_==null?void 0:_.message)||"Get Your Brand Domain",[k,me]=s.useState(!0),[ve,ue]=s.useState([]),[xe,D]=s.useState(""),[L,te]=s.useState("fuzzy"),[it,ot]=s.useState(1),[ct,Te]=s.useState(!0),[M,se]=s.useState(!1),[ae,l]=s.useState(""),[je,we]=s.useState(""),[f,_e]=s.useState("domain"),[c,W]=s.useState(""),[d,pe]=s.useState(""),[r,I]=s.useState({checking:!1,available:null,message:""}),[z,he]=s.useState({show:!1,price:0,promoPrice:0,couponCode:"",buyingPrice:0}),[Ne,q]=s.useState(!1),[De,re]=s.useState(1),[fe,Pe]=s.useState(""),[Ie,ke]=s.useState(""),[S,Ae]=s.useState((($e=m.user)==null?void 0:$e.email)||""),[E,ne]=s.useState(""),[B,le]=s.useState(""),[V,Y]=s.useState(!1),[$,ge]=s.useState(null),[Ue,Se]=s.useState(!1),[Me,Be]=s.useState(""),[H,K]=s.useState(null),[p,R]=s.useState(""),[b,T]=s.useState({valid:null,message:"",discount:0}),[X,ye]=s.useState({success:!1,message:"",url:""}),[ie,G]=s.useState(!1);Qe(xe,500),s.useCallback((t,a=0)=>nt(Z,t,a),[Z]),s.useEffect(()=>{v&&!p&&R(v)},[v]),s.useEffect(()=>{g&&(ue(g.data),Te(g.next_page_url!==null)),x&&x.length>0&&(P&&P.trim()&&x.some(t=>t.domain===P)?(console.log("Setting selected domain to clean_domain:",P),pe(P)):(console.log("Falling back to first domain:",x[0].domain),pe(x[0].domain)),n&&n.trim()&&(W(n.trim()),setTimeout(()=>{J()},500)))},[g,x,n,P]),s.useEffect(()=>{if(n&&n.trim()&&x&&x.length>0&&d){const t=setTimeout(()=>{n.trim()&&d&&!r.checking&&(console.log("Auto-checking availability for:",n.trim(),d),J())},1e3);return()=>clearTimeout(t)}},[n,x,d]),s.useEffect(()=>{const t=async()=>{var i;if(S&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(S))try{const o=await F.post("/check-user-exists",{email:S},{headers:{"X-CSRF-TOKEN":((i=document.querySelector('meta[name="csrf-token"]'))==null?void 0:i.getAttribute("content"))||""}});ge(o.data.exists)}catch(o){console.error("Error checking user existence:",o),ge(null)}else ge(null)},a=setTimeout(()=>{t()},500);return()=>clearTimeout(a)},[S]),s.useEffect(()=>{if(v&&c.trim()&&p===v){const t=setTimeout(()=>{Ce()},500);return()=>clearTimeout(t)}},[c,v,p]);const Ce=async()=>
1{if(!p.trim()||!c.trim()){T({valid:!1,message:"Please enter a coupon code and brand name",discount:0});return}try{T({valid:null,message:"Validating coupon...",discount:0});const t=await F.post("/couponcodecustomdomain",{couponcode:p.trim(),domainurl:c.trim(),type:f});if(t.data.valid){let a=j(t.data.offprice);a>0&&a<1&&(a=1);const i=Ee(t.data.title||"Coupon applied successfully!");T({valid:!0,message:i,discount:a}),he(o=>({...o,buyingPrice:a,couponCode:p.trim()}))}else{const a=Ee(t.data.title||"Invalid coupon code");T({valid:!1,message:a,discount:0})}}catch(t){console.error("Coupon validation error:",t),T({valid:!1,message:"Error validating coupon. Please try again.",discount:0})}};s.useEffect(()=>{if(p.trim()&&c.trim()){const t=setTimeout(()=>{Ce()},800);return()=>clearTimeout(t)}},[p,c]);const Le=t=>{_e(t),I({checking:!1,available:null,message:""}),G(!1)},J=async()=>{var i,o;const t=c.trim()||(n?n.trim():"");if(!t||!d){I({checking:!1,available:!1,message:"Please enter a brand name and select a domain"});return}const a=`${t}-${d}-${f}`;Be(a),se(!0),I({checking:!0,available:null,message:"Checking availability..."});try{const w=f==="handle"?A:be,u=await F.post(w,{handle:t,domain:d});ye({success:!1,message:"",url:""});const C=j(u.data.price),h=j(u.data.promoPrice),N=u.data.charCount||0;if(I({checking:!1,available:u.data.available,message:u.data.message,price:C,promoPrice:h,charCount:N}),u.data.available){let oe=h>0?h:C;oe>0&&oe<1&&(oe=1),he(Re=>({...Re,price:C,promoPrice:h,buyingPrice:oe}))}}catch(w){console.error("Error checking domain availability:",w),I({checking:!1,available:!1,message:((o=(i=w.response)==null?void 0:i.data)==null?void 0:o.message)||"Error checking availability",price:0,promoPrice:0,charCount:0})}finally{se(!1)}};s.useEffect(()=>{if(c.trim()&&d){const t=setTimeout(()=>{J()},800);return()=>clearTimeout(t)}},[c,d,f]);const ze=async()=>{var a,i,o,w,u,C;if(!S){l("Please enter your email address");return}if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(S)){l("Please enter a valid email address");return}if($===null){l("Checking user account...");return}if(!m.user&&!$){if(!E){l("Please enter a password");return}if(E.length<8){l("Password must be at least 8 characters long");return}if(!B){l("Please confirm your password");return}if(E!==B){l("Passwords do not match");return}}let t=j(z.buyingPrice);if(t>0&&t<1&&(t=1),t===0){l(""),Y(!0);try{const h=await F.post("/free-purchase",{email:S,password:!m.user&&!$?E:void 0,custom_handle:c.trim(),domain:d,type:f,coupon_code:p},{headers:{"X-CSRF-TOKEN":((a=document.querySelector('meta[name="csrf-token"]'))==null?void 0:a.getAttribute("content"))||""}});if(h.data.success){const N=f==="handle"?`https://${d}/${c.trim()}`:`https://${c.trim()}.${d}`;ye({success:!0,message:"Purchase successful! Your new URL: ",url:N}),q(!1),K(null),l(""),setTimeout(()=>{W(""),I({checking:!1,available:null,message:""}),R(""),T({valid:null,message:"",discount:0}),G(!1),ne(""),le("")},5e3)}else l(h.data.error||"Free purchase failed")}catch(h){F.isAxiosError(h)?l(((o=(i=h.response)==null?void 0:i.data)==null?void 0:o.error)||"Failed to process free purchase"):l("Failed to connect to purchase service")}finally{Y(!1)}return}if(t<1&&t!==0){l("Minimum payment amount is $1");return}l(""),Y(!0);try{const h=f==="handle"?"/initiate-handle-homepayment":"/initiate-domain-homepayment",N=await F.post(h,{price:j(z.price),email:S,password:!m.user&&!$?E:void 0,custom_handle:c.trim(),domain:d,promo_price:j(z.promoPrice),coupon_code:p,selling_price:0,payment_method:"usd",funnelId:0},{headers:{"X-CSRF-TOKEN":((w=document.querySelector('meta[name="csrf-token"]'))==null?void 0:w.getAttribute("content"))||""}});Pe(N.data.clientSecret),ke(N.data.payment_intent_id),re(2)}catch(h){F.isAxiosError(h)?l(((C=(u=h.response)==null?void 0:u.data)==null?void 0:C.error)||"Failed to initialize payment"):l("Failed to connect to payment service")}finally{Y(!1)}},qe=async()=>{var t,a,i;Y(!0),l("");try{const o=f==="handle"?"/home-handle-success":"/home-domain-handle-success",w=await F.post(o,{payment_intent_id:Ie},{headers:{"X-CSRF-TOKEN":((t=document.querySelector('meta[name="csrf-token"]'))==null?void 0:t.getAttribute("content"))||""}});if(w.data.success){const u=f==="handle"?`https://${d}
1/${c.trim()}`:`https://${c.trim()}.${d}`;ye({success:!0,message:"Purchase successful! Your new URL: ",url:u}),q(!1),K(null),re(1),Pe(""),ke(""),l(""),setTimeout(()=>{W(""),I({checking:!1,available:null,message:""}),R(""),T({valid:null,message:"",discount:0}),G(!1),ne(""),le("")},5e3)}else l(w.data.error||"Payment verification failed")}catch(o){console.error("Payment verification error:",o),F.isAxiosError(o)?l(((i=(a=o.response)==null?void 0:a.data)==null?void 0:i.error)||"Payment verification failed"):l("Failed to verify payment. Please contact support.")}finally{Y(!1)}},Ye=()=>{const t=`${c.trim()}-${d}-${f}`;if(!c.trim()||!d||r.available===!1||Me!==t){l("Please check availability first"),setTimeout(()=>l(""),3e3);return}if(!ie){l("Please agree to the terms and conditions"),setTimeout(()=>l(""),3e3);return}K(f);const a=j(r.price),i=j(r.promoPrice);let o=b.valid?j(b.discount):i>0?i:a;o>0&&o<1&&(o=1),he({show:!0,price:a,promoPrice:i,couponCode:p,buyingPrice:o}),q(!0)},He=async()=>{var t,a;se(!0),Se(!1);try{const i=await F.post("/api/purchase",{brand:c.trim(),domain:d,type:f});we(`Success! Your ${f==="handle"?"brand handle":"domain"} has been reserved.`),setTimeout(()=>we(""),5e3),W(""),I({checking:!1,available:null,message:""}),R(""),T({valid:null,message:"",discount:0}),G(!1),ne(""),le("")}catch(i){l(((a=(t=i.response)==null?void 0:t.data)==null?void 0:a.message)||"Purchase failed. Please try again."),setTimeout(()=>l(""),5e3)}finally{se(!1)}};return e.jsxs(e.Fragment,{children:[e.jsxs(We,{children:[e.jsx("title",{children:"EZ.wiki - Get Your Brand Domain"}),e.jsx("meta",{name:"description",content:"Get your unique brand domain and establish your Web3 presence"}),e.jsx("style",{children:`
2                    .react-tooltip {
3                        z-index: 99999 !important;
4                        opacity: 1 !important;
5                        font-size: 12px;
6                        padding: 4px 8px;
7                    }
8                    .input-no-spinner::-webkit-outer-spin-button,
9                    .input-no-spinner::-webkit-inner-spin-button {
10                        -webkit-appearance: none;
11                        margin: 0;
12                    }
13                    .input-no-spinner {
14                        -moz-appearance: textfield;
15                    }
16                `})]}),e.jsx(de,{id:"nav-tooltip"}),e.jsx(de,{id:"action-tooltip"}),e.jsx(de,{id:"form-tooltip"}),e.jsx(de,{id:"modal-tooltip"}),e.jsx(Ve,{auth:m}),e.jsxs("main",{className:"relative flex justify-center items-center p-4 min-h-screen overflow-hidden",children:[ae&&e.jsxs("div",{className:"fixed top-20 right-4 bg-red-600 text-white px-4 py-2 rounded-md shadow-lg z-500",children:[e.jsx(y,{icon:Q,className:"mr-2"}),ae]}),je&&e.jsxs("div",{className:"fixed top-20 right-4 bg-green-600 text-white px-4 py-2 rounded-md shadow-lg z-500",children:[e.jsx(y,{icon:ce,className:"mr-2"}),je]}),Ne&&H&&(()=>{let a=b.valid?j(b.discount):j(z.buyingPrice);return a>0&&a<1&&(a=1),e.jsx("div",{className:"fixed inset-0 bg-black/70 min-h-screen flex items-center justify-center z-[100] p-4 overflow-y-auto",children:e.jsxs("div",{className:"bg-gray-800 border border-gray-700 text-white p-8 rounded-xl shadow-2xl max-w-md w-full relative max-h-[90vh] overflow-y-auto",children:[e.jsx("button",{onClick:()=>{q(!1),K(null),l("")},className:"absolute top-4 right-4 text-white/70 hover:text-white transition-colors z-10",disabled:V,children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-14 h-14 rounded-full backdrop-blur-md flex items-center justify-center overflow-hidden border border-white/20 bg-gradient-to-br from-white/15 to-transparent shadow-lg mx-auto",children:e.jsx("img",{src:"https://ez.wiki/logo.gif",className:"w-10 h-10 rounded-full object-cover",alt:"ez.wiki Logo"})}),e.jsx("h2",{className:"text-xl font-bold mt-4 text-white",children:H==="handle"?"Handle Purchase":"Domain Purchase"}),e.jsx("p",{className:"text-gray-300 mt-2",children:H==="handle"?`${d}/${c.trim()}`:`${c.trim()}.${d}`}),e.jsxs("p",{className:"text-gray-300",children:[H==="handle"?`${c.trim().length} letters – US$${a.toFixed(2)}`:`US$${a.toFixed(2)}`,b.valid&&e.jsx("span",{className:"text-green-400 ml-2",children:"(Coupon applied!)"})]})]}),e.jsxs("div",{className:"bg-gray-700/50 p-4 rounded-xl",children:[!m.user&&!$&&e.jsx("div",{className:"mb-4",children:e.jsx("h3",{className:"text-lg font-semibold text-white border-b border-gray-600 pb-2",children:"Create Account"})}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-yellow-400 font-medium mb-1",children:m.user?"Email Address":"Email Address *"}),e.jsx("input",{type:"email",value:S,onChange:i=>Ae(i.target.value),placeholder:"Enter your email address",className:"w-full bg-gray-700 text-white py-3 px-4 roun
16ded-xl border border-gray-600 focus:outline-none focus:ring-2 focus:ring-yellow-400",required:!0}),$!==null&&!m.user&&e.jsx("p",{className:`text-xs mt-1 ${$?"text-green-400":"text-yellow-400"}`,children:$?"✓ Account exists - no password needed":"New account - password required"})]}),!m.user&&!$&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-yellow-400 font-medium mb-1",children:"Password *"}),e.jsx("input",{type:"password",value:E,onChange:i=>ne(i.target.value),placeholder:"Create your password",className:"w-full bg-gray-700 text-white py-3 px-4 rounded-xl border border-gray-600 focus:outline-none focus:ring-2 focus:ring-yellow-400",required:!0})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-yellow-400 font-medium mb-1",children:"Confirm Password *"}),e.jsx("input",{type:"password",value:B,onChange:i=>le(i.target.value),placeholder:"Confirm your password",className:"w-full bg-gray-700 text-white py-3 px-4 rounded-xl border border-gray-600 focus:outline-none focus:ring-2 focus:ring-yellow-400",required:!0}),E!==B&&B&&e.jsx("p",{className:"text-red-400 text-xs mt-1",children:"Passwords do not match"})]})]})]}),e.jsx("button",{onClick:ze,disabled:V||!S||!m.user&&!$&&(!E||!B||E!==B),className:"w-full bg-yellow-500 text-gray-900 font-bold py-3 px-4 rounded-lg hover:bg-yellow-600 transition-colors disabled:opacity-70 disabled:cursor-not-allowed",children:V?e.jsxs(e.Fragment,{children:[e.jsx(y,{icon:O,className:"animate-spin mr-2"}),"Processing..."]}):a===0?`Claim Free ${H==="handle"?"Handle":"Domain"}`:`Buy ${H==="handle"?"Handle":"Domain"} for US$${a.toFixed(2)}`}),e.jsxs("div",{className:"text-center text-xs text-gray-400",children:[e.jsx("p",{children:"Payment secured by STRIPE. You'll be taken to a thank you page after the payment."}),e.jsxs("p",{className:"mt-1",children:[e.jsx(Fe,{href:"/terms",className:"hover:underline text-yellow-400",children:"Terms"})," and"," ",e.jsx(Fe,{href:"/privacy",className:"hover:underline text-yellow-400",children:"Privacy"}),"."]})]})]})]})})})(),Ne&&De===2&&(()=>{let t=j(z.buyingPrice);return t>0&&t<1&&(t=1),e.jsx("div",{className:"fixed inset-0 bg-black/70 min-h-screen flex items-center justify-center z-[100] p-4 overflow-y-auto",children:e.jsxs("div",{className:"bg-gray-800 border border-gray-700 text-white p-8 rounded-xl shadow-2xl max-w-sm w-full relative max-h-[90vh] overflow-y-auto",children:[e.jsx("button",{onClick:()=>{q(!1),re(1),l("")},className:"sticky top-0 right-0 ml-auto text-white/70 hover:text-white transition-colors z-10",disabled:V,children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})}),e.jsxs("div",{className:"space-y-6",children:[ae&&e.jsxs("div",{className:"bg-red-500/90 text-white p-3 rounded-xl flex items-center gap-2",children:[e.jsx(y,{icon:Q}),ae]}),V&&e.jsx("div",{className:"absolute inset-0 bg-black/50 flex items-center justify-center rounded-xl",children:e.jsx(y,{icon:O,className:"animate-spin text-4xl text-white"})}),e.jsx(Ze,{stripe:rt,options:{clientSecret:fe,appearance:{theme:"night",variables:{colorPrimary:"#FFD700",colorBackground:"#1f2937",colorText:"white",colorDanger:"#ff6b6b",fontFamily:"Inter, system-ui, sans-serif"}}},children:fe?e.jsx(lt,{price:t,email:S,clientSecret:fe,onSuccess:qe,onBack:()=>re(1),onError:l,tooltips:Z}):e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(y,{icon:O,className:"animate-spin text-2xl"})})})]})]})})})(),Ue&&e.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-1000",children:e.jsxs("div",{className:"bg-gray-800 rounded-xl p-6 max-w-md w-full mx-4 border border-green-400",children:[e.jsx("h3",{className:"text-xl font-bold text-white mb-4",children:"Confirm Purchase"}),e.jsxs("p",{className:"text-gray-300 mb-2",children:["You're about to purchase:",e.jsx("span",{className:"text-green-400 font-medium ml-1",children:f==="handle"?`@${c.trim()}.${d}`:`${c.trim()}.${d}`})]}),e.jsx("p",{className:"text-gray-400 text-sm mb-6",children:"This action cannot be undone. Please confirm to proceed."}),e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx("button",{onClick:()=>Se(!1),className:"px-4 py-2 bg-gray-600 text-white rounded-lg hover:bg-gray-500 transition-colors",disabled:M,children:"Cancel"}),e.jsxs("button",{onClick:He,className:"px-4 py-2 bg-green-500 text-white rounded-lg hover:bg-green-600 transition-colors flex items-center",disabled:M,children:[M&&e.jsx(y,{icon:O,className:"animate-spin mr-2"}),"Confirm Purchase"]})]})]})}),k&&e.jsxs("div",{className:"relative mx-auto bottom-4 z-50 backdrop-blur-sm p-4 rounded-xl border border-white-700 overflow-y-auto shadow-2xl w-full max-w-4xl mt-4",children:[e.jsxs("div",{className:"bg-gray-800/80 backdrop-blur-sm border border-gray-700 rounded-xl p-6 space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h3",{className:"text-2xl font-bold text-white mb-4",children:ee}),e.jsx("p",{className:"text-gray-300",children:"Choose your preferred option below"})]}),e.jsx("div",{className:"flex justify-center items-center gap-4",children:e.jsxs("button",{onClick:()=>Le("domain"),className:`flex items-center justify-center py-3 px-8 rounded-xl font-bold transition-all ${f==="domain"?"bg-yellow-500 text-black border-2 border-yellow-400":"bg-gray-700 text-gray-300 border-2 border-gray-600 hover:bg-gray-600"}`,children:[e.jsx(y,{icon:Ke,className:"mr-2"})," Brand Domain"]})}),e.jsxs("div",{className:"flex flex-col md:flex-row justify-center items-center gap-4 max-w-2xl mx-auto",children:[e.jsx("div",{className:"relative w-full md:w-2/5",children:e.jsx("input",{type:"text",placeholder:"Enter your brand domain",className:"w-full bg-gray-700 border border-gray-600 text-white py-4 px-6 rounded-xl focus:outline-none focus:ring-2 focus:ring-yellow-400",value:c,onChange:t=>{W(t.target.value),p===v&&(R(""),T({valid:null,message:"",discount:0}))},onKeyPress:t=>{t.key==="Enter"&&J()}})}),e.jsxs("div",{className:"relative w-full md:w-2/5",children:[e.jsx("select",{className:"w-full bg-gray-700 text-white py-4 px-6 pr-10 rounded-xl border border-gray-600 focus:outline-none focus:ring-2 focus:ring-yellow-400 focus:border-transparent appearance-none",value:d,onChange:t=>pe(t.target.value),children:x==null?void 0:x.map(t=>e.jsxs("option",{value:t.domain,children:[".",t.domain]},t.id))}),e.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-3 text-gray-400",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})})]}),e.jsxs("button",{onClick:J,className:`w-full md:w-1/5 text-white font-bold py-4 px-6 rounded-xl shadow-md flex items-center justify-center transition-all ${r.checking?"bg-gray-600 text-gray-300":r.available!==null?r.available?"bg-green-600 text-white":"bg-red-600 text-white":"bg-yellow-500 text-black"}`,disabled:M||!c||r.checking,children:[e.jsx("span",{children:r.checking?"Checking...":r.available!==null?r.available?"Available":"Unavailable":"Check"}),!r.checking&&r.available!==null&&e.jsx(y,{icon:r.available?ce:Q,className:"ml-2"})]})]}),X.success&&e.jsxs("div",{className:"p-4 bg-green-900/30 border border-green-500/50 rounded-xl backdrop-blur-sm",children:[e.jsxs("div",{className:"flex items-center justify-center gap-3 text-green-400 mb-2",children:[e.jsx(y,{icon:ce,className:"text-2xl"}),e.jsx("span",{className:"text-lg font-semibold",children:"Purchase Successful!"})]}),e.jsxs("div",{className:"text-center text-white mb-3",children:[X.message,e.jsx("a",{href:X.url,target:"_blank",rel:"noopener noreferrer",className:"text-yellow-400 hover:underline font-medium ml-1",children:X.url})]})]}),!X.success&&r.message&&e.jsxs("div",{className:`text-center transition-all duration-300 ${r.checking?"opacity-70":"opacity-100"}`,children:[e.jsx("div",{className:`flex items-center justify-center gap-2 text-sm font-medium mb-2 ${r.available?"text-green-400":r.available===!1?"text-red-400":"text-yellow-400"}`,children:r.checking?e.jsxs(e.Fragment,{children:[e.jsx(y,{icon:O,className:"animate-spin"}),"Checking availability..."]}):e.jsxs(e.Fragment,{children:[r.available?e.jsx(y,{icon:ce,className:"text-green-400"}):e.jsx(y,{icon:Q,className:"text-red-400"}),r.message]})}),r.available&&U&&e.jsx("div",{className:"relative mb-8 overflow-hidden rounded-2xl",children:e.jsx("div",{dangerouslySetInnerHTML:{__html:U},className:"w-full [&_*]:max-w-full [&_img]:w-full [&_img]:h-auto [&_img]:object-contain [&_iframe]:w-full [&_iframe]:h-auto [&_iframe]:aspect-video"})}),r.available&&r.price!==void 0&&(()=>{let a=b.valid?j(b.discount):j(z.buyingPrice);a>0&&a<1&&(a=1);const i=r.promoPrice>0?r.promoPrice??0:r.price??0;let o=b.valid?j(b.discount):i;o>0&&o<1&&(o=1);let w=r.promoPrice??0;return w>0&&w<1&&(w=1),e.jsxs("div",{className:"mt-6 bg-gray-700/50 p-4 rounded-xl border border-gray-600",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2 text-sm",children:[e.jsx("div",{className:"bg-gray-700 p-3 rounded-xl border border-gray-600 flex items-center justify-center",children:e.jsxs("p",{className:"text-white font-mono",children:[e.jsx("span",{className:"text-yellow-400",children:c.trim()}),".",d]})}),e.jsxs("div",{className:"bg-gray-700 p-3 rounded-xl border border-gray-600 flex items-center justify-center gap-4",children:[e.jsxs("span",{className:"text-gray-300",children:[r.charCount," letters"]}),e.jsxs("span",{className:"text-yellow-400 font-semibold",children:["US$",o.toFixed(2)]})]}),e.jsx("div",{className:"bg-gray-700 p-3 rounded-xl border border-gray-600 flex items-center justify-center",children:e.jsxs("p",{className:"text-yellow-400 font-mono",children:["coupon code ",p,p===v&&e.jsx("span",{className:"ml-2 text-xs text-yellow-300 bg-yellow-400/20 px-2 py-0.5 rounded-full",children:"Default"})]})})]}),b.valid&&e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 mt-4 items-stretch mb-4",children:[e.jsx("div",{className:"flex-1 bg-blue-900/50 p-3 rounded-xl text-center flex flex-col justify-center",children:e.jsx("p",{className:"text-yellow-300 text-sm font-semibold",children:(()=>{const u=r.promoPrice||r.price||0,C=j(b.discount),h=u-C;let N=u;return N>0&&N<1&&(N=1),p===v?h>0?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"line-through text-gray-400 mr-2",children:["US$",N.toFixed(2)]}),e.jsxs("span",{className:"text-green-400",children:["Save US$",h.toFixed(2)," with default coupon!"]})]}):u===0?"✨ Free domain with default coupon! ✨":"Default promotion applied!":h>0?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"line-through text-gray-400 mr-2",children:["US$",N.toFixed(2)]}),e.jsxs("span",{className:"text-green-400",children:["Save US$",h.toFixed(2),"!"]})]}):C>
160&&C<u?`Special price: US$${N.toFixed(2)} → US$${C.toFixed(2)}`:"Coupon applied!"})()})}),e.jsxs("div",{className:"flex-1 bg-green-900/50 p-3 rounded-xl text-center flex flex-col justify-center",children:[e.jsxs("p",{className:"text-yellow-300 font-semibold",children:["You pay : US$",o.toFixed(2)]}),p===v&&b.valid&&e.jsx("p",{className:"text-green-300 text-sm mt-1",children:"✓ Default promotion coupon applied"})]})]}),!b.valid&&r.promoPrice>0&&e.jsx("div",{className:"bg-blue-900/30 p-3 rounded-xl my-4",children:e.jsxs("p",{className:"text-green-400 font-semibold",children:["Pre-launch Price: US$",w.toFixed(2)]})}),e.jsxs("div",{className:"flex flex-col md:flex-row gap-3 mt-4",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("label",{className:"text-gray-300 text-sm",children:["Coupon Code",p===v&&e.jsx("span",{className:"ml-2 text-xs text-yellow-400 bg-yellow-400/20 px-2 py-0.5 rounded-full",children:"Default"})]}),e.jsx("input",{type:"text",className:"w-full bg-gray-700 text-white px-4 py-3 rounded-xl border border-gray-600 focus:outline-none focus:ring-2 focus:ring-yellow-400",placeholder:"Enter coupon code",value:p,onChange:u=>R(u.target.value)}),p&&e.jsxs("div",{className:`mt-1 text-xs ${b.valid?"text-green-400":b.valid===!1?"text-red-400":"text-yellow-400"}`,children:[b.message||"Validating coupon...",p===v&&b.valid&&e.jsx("span",{className:"ml-2 text-green-300",children:"✓ Default promotion coupon"})]})]}),e.jsxs("div",{className:"flex-1",children:[e.jsx("label",{className:"text-gray-300 text-sm",children:"NYP (optional)"}),e.jsx("input",{type:"number",className:"input-no-spinner w-full bg-gray-700 text-white px-4 py-3 rounded-xl border border-gray-600 focus:outline-none focus:ring-2 focus:ring-yellow-400",min:"0",step:"1",placeholder:"Set price for marketplace",onChange:u=>{console.log("NYP value:",u.target.value)}})]})]}),e.jsx("div",{className:"mt-4 text-xs text-gray-400",children:e.jsxs("div",{className:"flex items-start",children:[e.jsx("input",{type:"checkbox",id:"terms-checkbox",required:!0,className:"mt-1 mr-2",checked:ie,onChange:u=>G(u.target.checked)}),e.jsxs("label",{htmlFor:"terms-checkbox",className:"text-sm leading-normal text-gray-300 ml-1",children:["By claiming your ",f==="handle"?"handle":"domain"," you agree to the current user"," ",e.jsx("button",{type:"button",onClick:()=>window.open("/terms-and-conditions","_blank"),className:"text-yellow-400 hover:underline focus:outline-none focus:underline",children:"Terms and Conditions"})," ","and"," ",e.jsx("button",{type:"button",onClick:()=>window.open("/privacy-policy","_blank"),className:"text-yellow-400 hover:underline focus:outline-none focus:underline",children:"Privacy Policy"})]})]})}),e.jsxs("button",{onClick:()=>{a===0?(K(f),q(!0)):Ye()},className:"w-full mt-4 bg-yellow-500 hover:bg-yellow-600 text-black font-bold py-3 px-4 rounded-xl transition-colors disabled:opacity-50 disabled:cursor-not-allowed",disabled:M||!ie,children:[M?"Processing...":a===0?`Claim Free ${f==="handle"?"Handle":"Domain"}`:`Buy ${f==="handle"?"Handle":"Domain"} for US$${a.toFixed(2)}`,!ie&&!M&&e.jsx("span",{className:"block text-xs mt-1 text-yellow-300",children:"Please agree to terms & conditions"})]})]})})()]}),e.jsx("div",{className:"text-center text-sm text-gray-400",children:e.jsx("p",{children:"Secure your unique identity in the Web3 space today"})})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mt-8",children:[e.jsxs("div",{className:"bg-gray-700/50 backdrop-blur-sm rounded-xl p-6 shadow-lg border border-gray-600 transition-all duration-700 hover:border-yellow-400/30 hover:translate-y-[-5px]",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-yellow-500/10 flex items-center justify-center text-yellow-400 text-xl mb-4",children:e.jsx(y,{icon:Xe})}),e.jsx("h3",{className:"text-xl font-bold text-white mb-3",children:"Digital Identity"}),e.jsx("p",{className:"text-gray-300",children:"Establish your unique presence in the decentralized web with a verifiable identity."})]}),e.jsxs("div",{className:"bg-gray-700/50 backdrop-blur-sm rounded-xl p-6 shadow-lg border border-gray-600 transition-all duration-700 hover:border-yellow-400/30 hover:translate-y-[-5px]",style:{transitionDelay:"0.1s"},children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-yellow-500/10 flex items-center justify-center text-yellow-400 text-xl mb-4",children:e.jsx(y,{icon:Ge})}),e.jsx("h3",{className:"text-xl font-bold text-white mb-3",children:"Co-Branding"}),e.jsx("p",{className:"text-gray-300",children:"Leverage partnerships and collaborative opportunities through our promotional services."})]}),e.jsxs("div",{className:"bg-gray-700/50 backdrop-blur-sm rounded-xl p-6 shadow-lg border border-gray-600 transition-all duration-700 hover:border-yellow-400/30 hover:translate-y-[-5px]",style:{transitionDelay:"0.2s"},children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-yellow-500/10 flex items-center justify-center text-yellow-400 text-xl mb-4",children:e.jsx(y,{icon:Je})}),e.jsx("h3",{className:"text-xl font-bold text-white mb-3",children:"Brand Advocacy"}),e.jsx("p",{className:"text-gray-300",children:"Turn your audience into brand advocates with integrated Web3 solutions."})]})]})]})]})]})}export{yt as default};

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.