PageSourceSearch

https://www.melee.markets/_next/static/chunks/7168-a15dc9b53f609813.js?dpl=dpl_uqa5xoRhqbjiCRQ2tEhUPowopKy9

js melee.markets collected 2026-10-04 15:44:17 UTC 57,874 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7168],{3027:(e,t,n)=>{n.d(t,{T:()=>a,t:()=>r});let a="cmta9uy3n00mx0cjstw6pxwg4",r="client-WY6d4N4yvhBgWFETCoYQztxCuAe6fkcEg8MSfHQC1P1sK"},15774:(e,t,n)=>{n.d(t,{Ny:()=>u,OY:()=>d,R1:()=>o,TL:()=>l,_x:()=>a._x,bW:()=>c,sk:()=>s});var a=n(58795),r=n(49397);let i=["create-profile","connect-x"],o=a._x.map(e=>e.id).filter(e=>!i.includes(e));function s(e){var t,n;if(!(null==e?void 0:e.signedIn))return"sign-in";let a=null!=(n=null==(t=e.me)?void 0:t.questStatus)?n:null;return(null==a?void 0:a.badgeEarned)?"done":(null==a?void 0:a.profileCreated)?a.xConnected?a&&o.every(e=>l(e,a))?"claim-badge":"x-tasks":"connect-x":"create-profile"}function l(e,t){if(!t)return!1;switch(e){case"create-profile":return t.profileCreated;case"connect-x":return t.xConnected;case"follow-x":return t.followsMelee;case"like-score-post":return t.likedScorePost;case"retweet-score-post":return t.retweetedScorePost;default:return!1}}function c(e,t){return"create-profile"!==e&&("connect-x"===e?!(null==t?void 0:t.profileCreated):!(null==t?void 0:t.xConnected))}function d(e,t){let n=null==t?void 0:t.me;if(!n)return null;switch(e){case"create-profile":{var a;let e=null!=(a=n.username)?a:n.displayName;if(!e)return null;return{avatar:n.profilePictureUrl,strong:"@".concat(e),text:"is live on Melee"}}case"connect-x":return n.twitterHandle?{strong:"@".concat(n.twitterHandle),text:"is connected"}:null;case"follow-x":return{text:"Following @MeleeMarkets"};case"like-score-post":return{text:"Like confirmed"};case"retweet-score-post":return{text:"Retweet confirmed"};default:return null}}function u(e){var t,n,a,i;let o=null==e||null==(t=e.me)?void 0:t.questStatus;return(null==o?void 0:o.badgeEarned)&&null!=(i=null==e||null==(a=e.me)||null==(n=a.badges)?void 0:n.find(e=>e.grantSource===r.l1.Quest))?i:null}},17790:(e,t,n)=>{n.d(t,{TE:()=>x,hH:()=>g,qc:()=>h});var a=n(78473),r=n(53775),i=n(94266),o=n(6443),s=n(82365),l=n(52859),c=n(3027),d=n(39755),u=n(22021);let h=!!(c.T&&l.Yp),p=(0,o.default)(()=>Promise.all([n.e(5909),n.e(6799),n.e(5673),n.e(8874),n.e(5499)]).then(n.bind(n,25499)),{loadableGenerated:{webpack:()=>[25499]},ssr:!1}),m=(0,s.createContext)({booting:!1,hasSession:!1,busy:!1,error:null,setError:()=>void 0,signIn:()=>void 0,signOut:()=>void 0,earnedBadge:null,consumeEarnedBadge:()=>void 0,enabled:!1});function g(){return(0,s.useContext)(m)}function b(){return new r.E({defaultOptions:{queries:{retry:!1,staleTime:3e4,refetchOnWindowFocus:!0,refetchOnReconnect:!0},mutations:{retry:!1}}})}function f(e){for(let t of[["HubMe"],["HubUsernameAvailability"]])e.removeQueries({queryKey:t})}function x(e){let{children:t,eager:n=!1}=e,[r]=(0,s.useState)(b),[o,l]=(0,s.useState)(!0),[c,g]=(0,s.useState)(!1),[x,v]=(0,s.useState)(!1),[w,y]=(0,s.useState)(null),[k,N]=(0,s.useState)(null),[j,S]=(0,s.useState)(!1),[C,I]=(0,s.useState)(0),[A,E]=(0,s.useState)(!1),[T,U]=(0,s.useState)(0);(0,s.useEffect)(()=>{if(!h)return void l(!1);if((0,d._)()){E(!0),v(!0),S(!0);return}if((0,u.Vu)()){(0,u.hd)(),f(r),g(!1),l(!1),S(!0),U(e=>e+1);return}if((0,u.lx)()){g(!0),l(!1);return}if(n||(0,u.j5)())return void S(!0);l(!1)},[n,r]);let _=(0,s.useCallback)(()=>{if(!h)return void y("Sign-in isn’t configured on this deployment.");y(null),S(!0),I(e=>e+1)},[]),O=(0,s.useCallback)(()=>{(0,u.hd)(),g(!1),y(null),N(null),f(r),S(!0),v(!0),U(e=>e+1)},[r]),P=(0,s.useMemo)(()=>({booting:o,hasSession:c,busy:x,error:w,setError:y,signIn:_,signOut:O,earnedBadge:k,consumeEarnedBadge:()=>N(null),enabled:h}),[o,c,x,w,_,O,k]);return(0,a.jsx)(i.Ht,{client:r,children:(0,a.jsxs)(m.Provider,{value:P,children:[j&&(0,a.jsx)(p,{resumingLogin:A,signInNonce:C,signOutNonce:T,onBooted:()=>l(!1),onBusy:v,onError:y,onSession:g,onEarnedBadge:N}),t]})})}},18760:(e,t,n)=>{n.d(t,{MO:()=>o,Rg:()=>l,TX:()=>c});var a=n(22021);let r=async()=>null,i=r;function o(e){i=null!=e?e:r}let s=null;function l(){return s||(s=i().then(e=>(e&&(0,a.Ko)(e),e)).catch(()=>null).finally(()=>{s=null}))}async function c(){let e=(0,a.lx)();return e||l()}},22021:(e,t,n)=>{n.d(t,{q7:()=>l,hd:()=>d,j5:()=>c,Vu:()=>u,lx:()=>o,Ko:()=>s});let a="melee_quest_auth",r="melee_account_seen",i="melee_auth_epoch";function o(){try{let e=window.localStorage.getItem(a);if(!e)return null;let t=JSON.parse(e);if(!(null==t?void 0:t.token)||!(null==t?void 0:t.expiry))return null;if(new Date(t.expiry).getTime()<=Date.now())return window.localStorage.removeItem(a),null;return t}catch(e){return null}}function s(e){try{window.localStorage.setItem(a,JSON.stringify(e)),window.localStorage.setItem(r,"1"),window.localStorage.setItem(i,"1")}catch(e){}}function l(){try{window.localStorage.removeItem(a)}catch(e){}}function c(){try{return null!==window.localStorage.getItem(a)||"1"===window.localStorage.getItem(r)}catch(e){return!1}}function d(){l();try{window.localStorage.removeItem(r),window.localStorage.removeItem(i)}catch(e){}}function u(){if(!c())return!1;try{return"1"!==window.localStorage.getItem(i)}catch(e){return!1}}},22713:(e,t,n)=>{n.d(t,{KB:()=>o,Mf:()=>c,Nr:()=>d,SW:()=>u,Vq:()=>s,Yt:()=>l,bk:()=>h,cx:()=>a,tB:()=>i,ug:()=>p});let a=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")},r="inline-flex h-control items-center justify-center gap-2 rounded-pill px-6 text-md font-semibold leading-none duration-200 ease-out transition-[background-color,background-image,border-color,color,box-shadow,transform] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-lo focus-visible:ring-offset-2 focus-visible:ring-offset-surface-base disabled:cursor-default disabled:opacity-45",i=a(r,"bg-transparent bg-[image:var(--brand-grad)] text-white","shadow-[shadow:var(--brand-btn-ring)]","hover:bg-[image:var(--brand-grad-hi)]","hover:shadow-[shadow:var(--brand-btn-ring-hi)]","hover:-translate-y-
1px active:translate-y-0"),o=a(r,"border border-white/10 bg-white/[0.04] text-ink hover:border-white/20 hover:bg-white/[0.07]"),s=a("inline-flex h-control-sm shrink-0 items-center justify-center gap-1.5 rounded-pill px-4","text-sm font-semibold leading-none transition-colors duration-200 ease-out","border border-white/10 bg-white/[0.05] text-ink hover:border-white/20 hover:bg-white/[0.09]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-lo","focus-visible:ring-offset-2 focus-visible:ring-offset-surface-base","disabled:cursor-default disabled:opacity-45"),l=a("h-control w-full rounded-pill border border-white/[0.14] bg-white/[0.05] px-5","text-md font-medium text-ink placeholder:text-ink-mute","transition-colors duration-200 ease-out","hover:border-white/25 focus:border-brand-lo focus:bg-white/[0.07]","focus:outline-none focus:ring-4 focus:ring-brand/20","disabled:opacity-60"),c=a("min-h-[92px] w-full resize-none rounded-md border border-white/[0.14] bg-white/[0.05] px-4 py-3","text-sm leading-relaxed text-ink placeholder:text-ink-mute","transition-colors duration-200 ease-out","hover:border-white/25 focus:border-brand-lo focus:bg-white/[0.07]","focus:outline-none focus:ring-4 focus:ring-brand/20"),d="rounded-lg border border-white/[0.07] bg-surface-card shadow-card-sm",u="text-2xs font-semibold uppercase tracking-kick text-ink-mute",h="text-xs font-semibold text-ink-dim",p={mute:"text-xs leading-snug text-ink-mute",ok:"text-xs leading-snug text-gain",bad:"text-xs leading-snug text-loss"}},33043:(e,t,n)=>{n.d(t,{y:()=>a});let a="\n/* ---------------------------------------------------------------- overlay --\n   Portalled to <body> (see BadgeClaimOverlay), so nothing on the page can trap\n   it in a stacking context. z-index sits above the hub's own layers (max 3) and\n   well below Privy's modal, which has to open ON TOP of this one. */\n.v2-bc-root{position:fixed;inset:0;z-index:60;\n  display:grid;place-items:center;padding:clamp(16px,4vw,40px);\n  background:transparent;overflow:auto;overscroll-behavior:contain}\n/* THE SCRIM LEADS, THE CARD FOLLOWS, and the two together are what makes this\n   read as OPENING rather than appearing. It used to be a .28s opacity fade\n   under a .42s card, both starting on the same frame, which lands closer to a\n   hard cut than to a transition — the ground and the thing on it arriving at\n   once gives the eye nothing to follow.\n   Now the ground darkens and blurs first, the card rises into it 90ms later,\n   and both run on the system's own entrance curve. */\n.v2-bc-scrim{position:absolute;inset:0;border:0;padding:0;cursor:pointer;\n  background:rgba(0,0,0,.62);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);\n  animation:v2-bc-scrim-in .34s var(--e-enter) both}\n\n/* The card. Same object as the app's celebration: sheet radius, a cta bloom\n   from the top-left, and a hairline catching the same light. */\n.v2-bc-card{position:relative;width:min(420px,100%);\n  padding:clamp(28px,4vw,38px) clamp(22px,3.4vw,32px);\n  border-radius:var(--r-lg);background:var(--card);border:1px solid var(--hair);\n  box-shadow:0 24px 70px -20px rgba(0,0,0,.75);overflow:hidden;\n  animation:v2-bc-in .46s var(--e-out) 90ms both}\n.v2-bc-card::before{content:'';position:absolute;left:-64px;top:-80px;\n  width:208px;height:208px;pointer-events:none;\n  background:radial-gradient(circle,rgba(128,97,253,.16),transparent 70%)}\n.v2-bc-card::after{content:'';position:absolute;inset:0 0 auto 0;height:1px;\n  pointer-events:none;\n  background:linear-gradient(90deg,rgba(128,97,253,.75),rgba(255,255,255,.10) 45%,transparent)}\n/* THE LAYOUT LIVES HERE, not on the card, and that is not a preference: the\n   card's children go through <PrivyProvider>, and a provider is free to render\n   a wrapper element. If the column were on .v2-bc-card, one such wrapper would\n   silently become its only flex item and take the whole layout with it. This\n   element is ours, inside the provider, whatever the provider renders.\n   position:relative also lifts the content above the bloom, which is\n   absolutely positioned and would otherwise paint over it. */\n.v2-bc-body{position:relative;display:flex;flex-direction:column;\n  align-items:center;text-align:center}\n\n.v2-bc-close{position:absolute;top:12px;right:12px;z-index:2;\n  display:grid;place-items:center;width:32px;height:32px;padding:0;\n  border:1px solid var(--hair);border-radius:50%;cursor:pointer;\n  background:rgba(255,255,255,.04);color:var(--ink-dim);\n  transition:color .2s var(--e-out),border-color .2s var(--e-out)}\n.v2-bc-close:hover{color:var(--ink);border-color:var(--hair-strong,rgba(255,255,255,.2))}\n.v2-bc-close:disabled{opacity:.4;cursor:default}\n\n/* ------------------------------------------------------------- the badge --\n   The medallion, as an object: a brand-tinted edge that FADES around the disc\n   (a flat 1px ring is one value all the way round, which is exactly what makes\n   a circle on a dark card read as cheap), a specular sweep from the upper left,\n   and an inset contact shadow seating the art inside the frame. */\n.v2-bc-artwrap{position:relative;display:grid;place-items:center;margin-bottom:18px}\n.v2-bc-art{position:relative;display:block;width:112px;height:112px;\n  border-radius:50%;overflow:hidden;background:rgba(128,97,253,.14)}\n.v2-bc-art img{display:block;width:100%;height:100%;object-fit:cover}\n.v2-bc-mono{display:grid;place-items:center;width:100%;height:100%;\n  font-size:40px;font-weight:600;color:var(--brand-lo)}\n/* The fading ring, drawn as a masked gradient border rather than a solid one. */\n.v2-bc-art::before{content:'';position:absolute;inset:0;border-radius:50%;\n  padding:2px;pointer-events:none;\n  background:linear-gradient(160deg,rgba(128,97,253,.9),rgba(128,97,253,.22) 46%,rgba(255,255,255,.06));\n  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);\n  mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);\n  -webkit-mask-composite:xor;mask-composite:exclude}\n.v2-bc-art::after{content:'';position:absolute;inset:0;border-radius:50%;\n  pointer-events:none;\n  background:linear-gradient(145deg,rgba(255,255,255,.24) 0%,rgba(255,255,255,.05) 30%,transparent 50%);\n  box-shadow:inset 0 -7px 14px -9px rgba(0,0,0,.85),inset 0 1px 1px rgba(255,255,255,.14)}\n\n/* The sweep behind the disc. Not a halo around the card — those are the\n   deprecated neon glows; this is the ceremony's one flourish. */\n.v2-bc-sweep{position:absolute;width:176px;height:176px;border-radius:50%;\n  pointer-events:none;filter:blur(18px);opacity:.9;
1\n  background:conic-gradient(from 0deg,rgba(128,97,253,.40),transparent 30%,rgba(128,97,253,.28) 55%,transparent 80%,rgba(128,97,253,.40))}\n\n/* ----------------------------------------------------------------- copy ---- */\n.v2-bc-kick{font-size:var(--t-2xs);font-weight:600;text-transform:uppercase;\n  letter-spacing:var(--tr-kick);color:var(--ink-mute)}\n.v2-bc-pill{padding:5px 12px;border-radius:var(--r-pill);\n  background:rgba(255,255,255,.06);font-size:var(--t-xs);font-weight:600;\n  color:var(--ink-dim)}\n.v2-bc-h{margin:10px 0 0;font-family:var(--f-ui);font-weight:700;\n  font-size:var(--t-xl);line-height:var(--lh-head);letter-spacing:var(--tr-tight);\n  color:var(--ink);text-wrap:balance}\n.v2-bc-p{margin:10px 0 0;max-width:34ch;font-size:var(--t-sm);\n  line-height:var(--lh-read);color:var(--ink-dim);text-wrap:balance}\n/* Not redeemable is not an error — it is news about the code. Gold, the one\n   accent outside the brand, rather than the failure red. */\n.v2-bc-warn{margin:14px 0 0;font-size:var(--t-sm);font-weight:500;\n  line-height:var(--lh-copy);color:var(--gold);text-wrap:balance}\n.v2-bc-err{margin:14px 0 0;font-size:var(--t-sm);font-weight:500;\n  line-height:var(--lh-copy);color:#FF7A7A;text-wrap:balance}\n.v2-bc-note{margin:12px 0 0;max-width:32ch;font-size:var(--t-xs);\n  line-height:var(--lh-copy);color:var(--ink-mute);text-wrap:balance}\n\n/* ---------------------------------------------------------------- form ----\n   Stacked, not the hero's side-by-side row: inside a 420px card a field and a\n   button on one line leave the field too short to read a code back in. */\n.v2-bc-form{display:flex;flex-direction:column;gap:10px;width:100%;\n  margin-top:20px}\n.v2-bc-input{width:100%;height:52px;text-align:center;letter-spacing:.04em}\n.v2-bc-input:disabled{opacity:.6}\n.v2-bc-cta{justify-content:center;width:100%;height:52px;font-size:var(--t-md)}\n.v2-bc-cta:disabled{opacity:.45;cursor:default}\n.v2-bc-after{display:flex;flex-direction:column;align-items:center;width:100%;\n  margin-top:20px;animation:v2-bc-rise .42s var(--e-out) both}\n\n/* ------------------------------------------------------- the earned card -- */\n.v2-bc-cele{display:flex;flex-direction:column;align-items:center;width:100%}\n\n/* --------------------------------------------------------- claimed chip ---\n   What is left on the page after the overlay closes, in the row's own slot, so\n   the hero can still answer \"did that work?\" on the next scroll past. */\n.v2-bc-chip{display:inline-flex;align-items:center;gap:10px;margin:0;\n  padding:8px 18px 8px 8px;border-radius:var(--r-pill);\n  border:1px solid rgba(128,97,253,.34);background:rgba(128,97,253,.10);\n  font-size:var(--t-sm);font-weight:600;color:var(--ink)}\n.v2-bc-chipart{display:grid;place-items:center;width:28px;height:28px;\n  border-radius:50%;overflow:hidden;background:rgba(128,97,253,.18)}\n/* The fallback when partner art is missing or its host is dead. Without it the\n   chip rendered a broken-image glyph in the hero. */\n.v2-bc-chipmono{font-size:13px;font-weight:700;color:var(--brand-lo)}\n.v2-bc-chipart img{display:block;width:100%;height:100%;object-fit:cover}\n\n/* --------------------------------------------------- the claim button -----\n   INSIDE THE FIELD, not beside it. As a sibling it was a flex item in a row\n   that wraps below ~46ch, so while hidden it still claimed a whole line and\n   opened ~68px of dead space under the input. In here it cannot wrap, cannot\n   change the row's height, and cannot move anything when it appears.\n\n   The field reserves its width permanently via padding-right, so the caret\n   never jumps either.\n\n   TWO CLASSES DEEP, AND THAT IS LOAD-BEARING. A lone .v2-bc-claimbtn rule did\n   not work and looked like it should: the button is DISABLED while hidden, and\n   v2Css's .v2-btn:disabled (opacity .8) is a class plus a pseudo-class — more\n   specific than a lone class, so it won regardless of which sheet came later,\n   and the button sat there at 80% all the time. Being appended after V2_CSS\n   only settles ties; it does nothing against higher specificity. This is\n   CLAUDE.md's \"go two classes deep rather than relying on source order\". */\n.v2-bc-field{position:relative;display:flex;align-items:center}\n.v2-bc-codeinput{padding-right:96px}\n.v2-access-row .v2-btn.v2-bc-claimbtn{position:absolute;right:6px;\n  height:44px;padding:0 18px;font-size:var(--t-sm);\n  opacity:0;transform:translateX(6px);pointer-events:none;\n  transition:opacity .28s var(--e-out),transform .28s var(--e-out)}\n/* Beats .v2-btn:disabled (0,2,0) at (0,4,0). */\n.v2-access-row .v2-btn.v2-bc-claimbtn:disabled{opacity:0;box-shadow:none}\n.v2-access-row .v2-btn.v2-bc-claimbtn[data-ready]{opacity:1;transform:none;\n  pointer-events:auto}\n@media(prefers-reduced-motion:reduce){\n  .v2-access-row .v2-btn.v2-bc-claimbtn{transition:none;transform:none}\n}\n\n/* ------------------------------------------------- the two hero paths -----\n   A hairline with the word sitting in it, so the two rows read as alternatives\n   rather than as a form followed by an unrelated button. Narrow on purpose: it\n   spans the field, not the hero. */\n.v2-bc-or{display:flex;align-items:center;gap:12px;\n  width:min(340px,72vw);margin:16px auto 14px;\n  font-size:var(--t-xs);font-weight:600;color:var(--ink-mute)}\n.v2-bc-or::before,.v2-bc-or::after{content:'';flex:1;height:1px;\n  background:var(--hair)}\n/* SIDE BY SIDE, and smaller (Max, 2026-08-26). It was a stacked pair at 420px\n   wide, which on the hero read as a form rather than as a choice — two full-\n   bleed bars with the sign-in one sitting under the offer like a second step.\n   Measured off fomo's hero, which is the reference Max gave: two buttons on one\n   row, 54px tall, 12px apart, sized to their labels rather than to the column.\n   Ours keep INTRINSIC widths instead of fomo's matched 200px — our two labels\n   are \"Claim your first badge\" and \"Sign in\", so forcing them equal would leave\n   the sign-in mostly empty. The\n   hierarchy that the stack used to carry is now carried by fill and size, which\n   is what it should have been doing anyway.\n   Wraps back to a column when the pair no longer fits, so a narrow phone gets\n   the old stacked layout without a breakpoint. */\n.v2-bc-ctacol{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;\n  gap:12px}\n.v2-bc-ctacol .v2-btn{height:48px;padding:0 22px;font-size:var(--t-sm);\n  justify-content:center;white-space:nowrap}\n/* SIGN IN NEEDS A SURFACE. v2Css's .v2-btn-ghost is transparent with a 10%\n   white hairline and --ink-dim text, which on the hero's pure-black ground is\n   very nearly nothing at all: no button visible, and the label sitting at the\n   dim end of the ink scale on top of it. Ghost works on the nav, where it sits\n   in a row of chrome; as one of two stacked CTAs it has to read as a control.\n   A real fill, a border you can see, and full ink. (0,3,0) so it beats\n   .v2-btn-ghost's (0,1,0) whichever way the sheets are ordered. */\n.v2-bc-ctacol .v2-btn.v2-bc-signin{height:48px;font-size:var(--t-sm);\n  background:rgba(255,255,255,.07);color:var(--ink);\n  box-shadow:inset 0 0 0 1px rgba(255,255,255,.14)}\n.v2-bc-ctacol .v2-btn.v2-bc-signin:hover{background:rgba(255,255,255,.12);\n  box-shadow:inset 0 0 0 1px rgba(255,255,255,.28)}\n\n/* THE OFFER IS TWO LINES, and both belong to the button. The promise used to\n   be small print underneath, which is the weakest place for the sentence that\n   makes the offer worth taking — it read as a caption about the page rather\n   than as part of what was being handed over. Height goes auto and the text\n   goes left so the two lines have a shared edge; the arrow keeps the right. */\n/* ONE LINE now that the promise line under it is parked — height goes back to\n   the row's, and the label centres over the arrow instead of being pushed to\n   the far edge of a 420px bar. */\n.v2-bc-ctacol .v2-btn.v2-bc-questcta{height:48px;padding:0 22px;\n  justify-content:center;gap:9px;text-align:center}\n.v2-bc-ctatext{display:flex;flex-direction:column;gap:3px;min-width:0}\n/* Title takes the button's own type on the one-line CTA, and steps up only when\n   the promise line is actually rendered under it. Driven by :has() rather than\n   a second\n   class so the two states cannot drift: uncomment .v2-bc-ctasub in the markup\n   and the title, the height and the alignment all restore themselves. */\n.v2-bc-ctatitle{font:inherit;line-height:1.2;letter-spacing:var(--tr-tight)}\n.v2-bc-ctatext:has(.v2-bc-ctasub) .v2-bc-ctatitle{font-size:var(--t-lg);\n  font-weight:700}\n.v2-bc-ctacol .v2-btn.v2-bc-questcta:has(.v2-bc-ctasub){height:auto;\n  padding:14px 22px;justify-content:space-between;gap:16px;text-align:left}\n/* READABLE, not decorative. This was 12px at 74% white on the brand purple —\n   about 3:1, which is under the bar for text this small, and it is the line\n   carrying the actual promise. 14px at 90% clears it comfortably and still sits\n   clearly below the title, which took the step up to 18/700 to keep the\n   hierarchy. Kept on white rather than a grey: a muted ink on a brand fill\n   reads as a disabled button. */\n.v2-bc-ctasub{font-size:var(--t-sm);font-weight:500;line-height:1.35;\n  color:rgba(255,255,255,.9)}\n\n/* The badge, where the CTA was. A chip rather than a button shape: it is a\n   statement of fact that happens to be pressable, not another call to act. */\n.v2-bc-earned{display:inline-flex;align-items:center;gap:10px;\n  width:min(420px,88vw);justify-content:center;\n  padding:12px 20px;border-radius:var(--r-pill);cursor:pointer;\n  border:1px solid rgba(128,97,253,.34);background:rgba(128,97,253,.10);\n  font:inherit;font-size:var(--t-sm);font-weight:600;color:var(--ink);\n  transition:border-color .2s var(--e-out),background .2s var(--e-out)}\n.v2-bc-earned:hover{border-color:rgba(128,97,253,.6);\n  background:rgba(128,97,253,.16)}\n.v2-bc-earned b{font-weight:700}\n\n/* ---------------------------------------------------------------- motion -- */\n@keyframes v2-bc-fade{from{opacity:0}
1to{opacity:1}}\n/* Opacity AND the blur, so the page behind recedes rather than being stamped\n   out. Backdrop-filter is not animatable on its own here, so the fade carries\n   it: at opacity 0 the blur is invisible regardless. */\n@keyframes v2-bc-scrim-in{from{opacity:0}to{opacity:1}}\n/* A shorter rise and a gentler scale than the old .86: a card that grows 14%\n   on entry reads as a pop, and this is a reveal. */\n@keyframes v2-bc-in{\n  from{opacity:0;transform:translateY(14px) scale(.965)}\n  to{opacity:1;transform:none}}\n@keyframes v2-bc-rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}\n@keyframes v2-bc-pop{\n  0%{opacity:0;transform:scale(.6) rotate(-8deg)}\n  60%{transform:scale(1.04) rotate(0deg)}\n  100%{opacity:1;transform:scale(1) rotate(0deg)}}\n@keyframes v2-bc-turn{from{transform:rotate(0)}to{transform:rotate(360deg)}}\n@media(prefers-reduced-motion:no-preference){\n  .v2-bc-art{animation:v2-bc-pop .62s cubic-bezier(.2,.8,.28,1) .1s both}\n  .v2-bc-sweep{animation:v2-bc-turn 14s linear infinite}\n}\n/* Reduced motion keeps every layout identical and simply stops moving: the\n   sweep still lights the disc, it just doesn't turn. */\n@media(prefers-reduced-motion:reduce){\n  .v2-bc-card,.v2-bc-scrim,.v2-bc-after{animation:none}\n}\n\n@media(max-width:520px){\n  .v2-bc-root{place-items:end center;padding:0}\n  /* Full-bleed sheet on a phone: a centred card with 16px of scrim either side\n     wastes the width a code has to be read back in. */\n  .v2-bc-card{width:100%;border-radius:var(--r-lg) var(--r-lg) 0 0;\n    border-bottom:0;padding-bottom:calc(28px + env(safe-area-inset-bottom))}\n}\n"},39755:(e,t,n)=>{n.d(t,{_:()=>r});let a=["privy_oauth_code","privy_oauth_state","privy_oauth_provider","privy_oauth_error"];function r(){try{let e=new URLSearchParams(window.location.search);return a.some(t=>e.has(t))}catch(e){return!1}}},49397:(e,t,n)=>{n.d(t,{Hd:()=>d,Yt:()=>s,ZH:()=>k,cd:()=>w,eA:()=>A,eN:()=>b,l1:()=>o,ld:()=>h,r0:()=>x,ro:()=>m,vk:()=>j,w5:()=>C});var a=n(14441),r=n(63589),i=n(79255),o=function(e){return e.Admin="ADMIN",e.Quest="QUEST",e.RedemptionCode="REDEMPTION_CODE",e}({}),s=function(e){return e.Badge="BADGE",e.Invite="INVITE",e.None="NONE",e}({});let l="\n    fragment QuestStatusFields on QuestStatus {\n  profileCreated\n  xConnected\n  followsMelee\n  likedScorePost\n  retweetedScorePost\n  badgeEarned\n  accessGranted\n  completedCount\n  totalCount\n  lastCheckedAt\n  verificationAvailable\n  xAccountClaimedElsewhere\n}\n    ",c="\n    mutation HubConnectTwitter($input: ConnectTwitterOAuth2Input!) {\n  connectTwitterOAuth2(input: $input) {\n    authorization {\n      token\n      expiry\n    }\n    errors {\n      __typename\n      message\n    }\n  }\n}\n    ",d=e=>(0,a.n)({mutationKey:["HubConnectTwitter"],mutationFn:e=>(0,i.I)(c,e)(),...e});d.getKey=()=>["HubConnectTwitter"],d.fetcher=(e,t)=>(0,i.I)(c,e,t);let u="\n    mutation HubCreateAvatarUploadUrl {\n  createAvatarUploadUrl {\n    uploadUrl\n    imageId\n  }\n}\n    ",h=e=>(0,a.n)({mutationKey:["HubCreateAvatarUploadUrl"],mutationFn:e=>(0,i.I)(u,e)(),...e});h.getKey=()=>["HubCreateAvatarUploadUrl"],h.fetcher=(e,t)=>(0,i.I)(u,e,t);
1let p="\n    mutation HubLogInWithPrivy($input: LogInWithPrivyInput!) {\n  logInWithPrivy(input: $input) {\n    authorization {\n      token\n      expiry\n    }\n    roles\n    errors {\n      message\n    }\n    earnedBadge {\n      key\n      name\n      description\n      imageUrl\n    }\n  }\n}\n    ",m=e=>(0,a.n)({mutationKey:["HubLogInWithPrivy"],mutationFn:e=>(0,i.I)(p,e)(),...e});m.getKey=()=>["HubLogInWithPrivy"],m.fetcher=(e,t)=>(0,i.I)(p,e,t);let g="\n    mutation HubRecheckQuests {\n  recheckQuests {\n    questStatus {\n      ...QuestStatusFields\n    }\n    error\n    nextAllowedAt\n  }\n}\n    ".concat(l),b=e=>(0,a.n)({mutationKey:["HubRecheckQuests"],mutationFn:e=>(0,i.I)(g,e)(),...e});b.getKey=()=>["HubRecheckQuests"],b.fetcher=(e,t)=>(0,i.I)(g,e,t);let f="\n    mutation HubSubmitEntryCode($input: SubmitEntryCodeInput!) {\n  submitEntryCode(input: $input) {\n    kind\n    admitted\n    error\n    authorization {\n      token\n      expiry\n    }\n    badge {\n      key\n      name\n      description\n      imageUrl\n    }\n  }\n}\n    ",x=e=>(0,a.n)({mutationKey:["HubSubmitEntryCode"],mutationFn:e=>(0,i.I)(f,e)(),...e});x.getKey=()=>["HubSubmitEntryCode"],x.fetcher=(e,t)=>(0,i.I)(f,e,t);let v="\n    mutation HubUpdateProfile($input: UpdateProfileInput!) {\n  updateProfile(input: $input) {\n    me {\n      username\n      displayName\n      profilePictureUrl\n      twitterHandle\n      profileSetupPending\n      badges {\n        grantedAt\n        badge {\n          key\n          name\n          description\n          imageUrl\n        }\n      }\n      questStatus {\n        ...QuestStatusFields\n      }\n    }\n    errors {\n      code\n      message\n      path\n    }\n  }\n}\n    ".concat(l),w=e=>(0,a.n)({mutationKey:["HubUpdateProfile"],mutationFn:e=>(0,i.I)(v,e)(),...e});w.getKey=()=>["HubUpdateProfile"],w.fetcher=(e,t)=>(0,i.I)(v,e,t);let y="\n    query CheckEntryCode($input: CheckEntryCodeInput!) {\n  checkEntryCode(input: $input) {\n    kind\n    valid\n    reason\n    grantsUserRole\n    badge {\n      key\n      name\n      description\n      imageUrl\n    }\n  }\n}\n    ",k=(e,t)=>(0,r.I)({queryKey:["CheckEntryCode",e],queryFn:(0,i.I)(y,e),...t});k.getKey=e=>["CheckEntryCode",e],k.fetcher=(e,t)=>(0,i.I)(y,e,t);let N="\n    query HubMe {\n  me {\n    username\n    displayName\n    profilePictureUrl\n    twitterHandle\n    profileSetupPending\n    badges {\n      grantedAt\n      grantSource\n      badge {\n        key\n        name\n        description\n        imageUrl\n      }\n    }\n    questStatus {\n      ...QuestStatusFields\n    }\n  }\n}\n    ".concat(l),j=(e,t)=>(0,r.I)({queryKey:void 0===e?["HubMe"]:["HubMe",e],queryFn:(0,i.I)(N,e),...t});j.getKey=e=>void 0===e?["HubMe"]:["HubMe",e],j.fetcher=(e,t)=>(0,i.I)(N,e,t);let S="\n    query QuestConfig {\n  questConfig {\n    enabled\n    scorePostId\n    meleeHandle\n    meleeXUserId\n    trustXActions\n  }\n}\n    ",C=(e,t)=>(0,r.I)({queryKey:void 0===e?["QuestConfig"]:["QuestConfig",e],queryFn:(0,i.I)(S,e),...t});C.getKey=e=>void 0===e?["QuestConfig"]:["QuestConfig",e],C.fetcher=(e,t)=>(0,i.I)(S,e,t);let I="\n    query HubUsernameAvailability($username: String!) {\n  usernameAvailability(username: $username) {\n    available\n    reason\n  }\n}\n    ",A=(e,t)=>(0,r.I)({queryKey:["HubUsernameAvailability",e],queryFn:(0,i.I)(I,e),...t});A.getKey=e=>["HubUsernameAvailability",e],A.fetcher=(e,t)=>(0,i.I)(I,e,t)},52859:(e,t,n)=>{n.d(t,{XX:()=>i,Yp:()=>a,wB:()=>r});let a="https://api.stg.melee.markets/graphql/",r=!1;class i extends Error{constructor(e,t=null){super(e),this.name="MeleeApiError",this.code=t}}},58795:(e,t,n)=>{n.d(t,{I1:()=>i,MG:()=>a,_x:()=>r});let a="https://beta.melee.markets".trim()||"https://beta.melee.markets",r=[{id:"create-profile",title:"Create your profile",blurb:"Pick a display name, profile picture, and write your bio. Your Melee Score tracks to this profile.",actionLabel:"Enter"}
1,{id:"connect-x",title:"Connect your X",blurb:"The next 3 steps require an X account to be connected.",actionLabel:"Connect"},{id:"follow-x",title:"Follow the Melee account",blurb:"This is where we’ll release product & Melee Score updates.",actionLabel:"Follow"},{id:"like-score-post",title:"Like the Melee Beta post",blurb:"The launch post for Melee Beta. Give it some love.",actionLabel:"Like"}];function i(e,t){switch(e){case"create-profile":case"connect-x":return a;case"follow-x":return(null==t?void 0:t.meleeHandle)?"https://x.com/intent/follow?screen_name=".concat(encodeURIComponent(t.meleeHandle)):null;case"like-score-post":return(null==t?void 0:t.scorePostId)?"https://x.com/intent/like?tweet_id=".concat(encodeURIComponent(t.scorePostId)):null;case"retweet-score-post":return(null==t?void 0:t.scorePostId)?"https://x.com/intent/retweet?tweet_id=".concat(encodeURIComponent(t.scorePostId)):null;default:return null}}},69100:(e,t,n)=>{n.d(t,{Y:()=>o.qc,X:()=>f});var a,r=n(94266),i=n(82365),o=n(17790),s=n(99353),l=n(79255),c=n(22021);let d="melee.xConnectStates",u="melee_quest_x_state";function h(){try{let e=window.localStorage.getItem(d);if(!e)return[];let t=JSON.parse(e);if(!Array.isArray(t))return[];let n=Date.now();return t.filter(e=>"object"==typeof e&&null!==e&&"string"==typeof e.v&&"number"==typeof e.t&&n-e.t<9e5)}catch(e){return[]}}function p(e){try{return window.localStorage.setItem(d,JSON.stringify(e)),!0}catch(e){return!1}}var m=n(49397);let g=null!==(a="T2QzcFZRMGpOdUdiWnRvdjNpeHE6MTpjaQ".trim())&&void 0!==a?a:"",b=()=>"".concat(window.location.origin).concat(window.location.pathname);function f(){var e,t,n,a;let d=(0,o.hH)(),f=(0,r.jE)(),[x,v]=(0,i.useState)(null),[w,y]=(0,i.useState)(null),[k,N]=(0,i.useState)(0),[j,S]=(0,i.useState)(!1),[C,I]=(0,i.useState)(!1),A=(0,m.w5)({},{staleTime:3e5,retry:1}),E=(0,m.vk)({},{enabled:d.hasSession}),T=(0,m.cd)(),U=(0,m.ld)(),_=(0,m.Hd)(),O=(0,m.eN)(),P=null!=(n=null==(e=E.data)?void 0:e.me)?n:null,H=(0,i.useCallback)(e=>{f.setQueryData(m.vk.getKey({}),{me:e})},[f]),q=(0,i.useRef)(_.mutateAsync);q.current=_.mutateAsync;let L=(0,i.useRef)(!1);(0,i.useEffect)(()=>{if(L.current||d.booting)return;let e=new URLSearchParams(window.location.search),t=e.get("code"),n=e.get("state");if(!t){L.current=!0,I(!0);return}L.current=!0;let a=window.location.pathname;if(window.history.replaceState(null,"","".concat(a)),!(0,c.lx)()){v("Sign in first, then connect your X again."),I(!0);return}let r=function(e){let t=null;try{t=window.sessionStorage.getItem(u),window.sessionStorage.removeItem(u)}catch(e){}let n=h();if(e){let a=n.findIndex(t=>t.v===e);if(a>=0)return n.splice(a,1),p(n),"ok";if(t&&t===e)return"ok"}return 0!==n.length||t?"mismatch":"missing"}(n);if("ok"!==r){v("missing"===r?"That connection started in a different browser or tab, so we couldn’t match it here. Press Connect X again on this page.":"That X connection didn’t come back cleanly. Try again."),I(!0);return}S(!0),q.current({input:{twitterToken:t,redirectUri:b()}}).then(async e=>{var t,n,a;let r=e.connectTwitterOAuth2;if(null==(t=r.errors)?void 0:t.length)return void v(null!=(a=null==(n=r.errors[0])?void 0:n.message)?a:"X connect failed.");r.authorization&&(0,c.Ko)({token:r.authorization.token,expiry:r.authorization.expiry}),v(null),await f.invalidateQueries({queryKey:m.vk.getKey({})})}).catch(e=>v(e instanceof l.L&&e.message?e.message:"X connect failed. Try again.")).finally(()=>{S(!1),I(!0)})},[d.booting,f]);let R=(0,i.useCallback)(async e=>{if(!(0,c.lx)())return{ok:!1,error:"Sign in first."};try{var t,n,a;let r=(await T.mutateAsync({input:e})).updateProfile;if((null==(t=r.errors)?void 0:t.length)||!r.me){let e=r.errors[0],t=null!=(n=null==e?void 0:e.path)?n:null;return{ok:!1,error:null!=(a=null==e?void 0:e.message)?a:"That profile couldn’t be saved.",path:"username"===t||"bio"===t||"avatarImageId"===t?t:null}}return H(r.me),v(null),{ok:!0}}catch(e){return{ok:!1,error:"Save failed. Retry.",path:null}}},[H,T]),M=(0,i.useCallback)(async e=>(0,c.lx)()?(0,s.F4)(e,async()=>(await U.mutateAsync({})).createAvatarUploadUrl):{ok:!1,error:"Sign in first."},[U]),F=(0,i.useCallback)(()=>
1{if(!g)return void v("X connect isn’t configured on this deployment. NEXT_PUBLIC_X_CLIENT_ID is unset.");let e=Math.random().toString(36).slice(2);if(!p([...h(),{v:e,t:Date.now()}].slice(-3)))return void v("Your browser is blocking storage for this site, so an X connection can’t be completed safely. Allow site data (or open the board in your normal browser) and try again.");let t=encodeURIComponent(b());window.location.href="https://x.com/i/oauth2/authorize?response_type=code&client_id=".concat(g,"&redirect_uri=").concat(t,"&state=").concat(e,"&code_challenge=challenge&code_challenge_method=plain&scope=tweet.read%20users.read%20follows.read%20like.read%20offline.access")},[]),z=(0,i.useCallback)(async()=>{if((0,c.lx)()){y(null),N(e=>e+1);try{var e,t,n,a;let r=(await O.mutateAsync({})).recheckQuests,i=null!=(a=null==(t=E.data)||null==(e=t.me)?void 0:e.questStatus)?a:null,o=r.questStatus,s=null==(n=E.data)?void 0:n.me;s&&H({...s,questStatus:o});let l=o.badgeEarned&&!(null==i?void 0:i.badgeEarned);l&&f.invalidateQueries({queryKey:m.vk.getKey({})});let c=i?o.completedCount-i.completedCount:o.completedCount;r.error?y(r.error):l||c>0?y(null):y("Nothing new found. X can take a few seconds to catch up — if you’ve just done them, try again.")}catch(e){y("Could not check right now.")}}},[E.data,H,f,O]);return{booting:d.booting||!C||d.hasSession&&E.isPending,signedIn:d.hasSession&&null!==P,busy:d.busy||j,saving:T.isPending||U.isPending,me:P,error:null!=x?x:d.error,checking:O.isPending,checkNote:w,verifyCount:k,questConfig:null!=(a=null==(t=A.data)?void 0:t.questConfig)?a:null,configLoading:A.isPending,signIn:d.signIn,signOut:d.signOut,saveProfile:R,uploadAvatar:M,startConnectX:F,verify:()=>void z()}}},79255:(e,t,n)=>{n.d(t,{I:()=>d,L:()=>o});var a=n(52859),r=n(22021),i=n(18760);class o extends Error{constructor(e){var t,n,a;super(e.message),this.name="GraphqlRequestError",this.operationName=e.operationName,this.status=e.status,this.errors=e.errors,this.code=null!=(a=null==(n=e.errors[0])||null==(t=n.extensions)?void 0:t.code)?a:null}}let s=new Set(["CheckEntryCode","QuestConfig","HubLogInWithPrivy"]),l=new Set(["AUTH_NOT_AUTHENTICATED","AUTH_NOT_AUTHORIZED"]);async function c(e,t,n,r){var i,s,l;let c=await fetch(a.Yp,{method:"POST",headers:{"content-type":"application/json",...n?{authorization:"Bearer ".concat(n)}:{}},body:JSON.stringify({query:e,variables:t})}),d=null;try{d=await c.json()}catch(e){}return(null==d||null==(i=d.errors)?void 0:i.length)?{ok:!1,error:new o({message:null!=(l=null==(s=d.errors[0])?void 0:s.message)?l:"Request failed.",operationName:r,status:c.status,errors:d.errors})}:c.ok?d&&void 0!==d.data&&null!==d.data?{ok:!0,data:d.data}:{ok:!1,error:new o({message:"Empty response.",operationName:r,status:c.status,errors:[]})}:{ok:!1,error:new o({message:"API responded ".concat(c.status),operationName:r,status:c.status,errors:[]})}}function d(e,t,n){return async()=>{var n,a,o,d,u;let h=null!=(u=null==(d=/\b(?:query|mutation)\s+([_A-Za-z][_0-9A-Za-z]*)/.exec(e))?void 0:d[1])?u:"AnonymousOperation",p=s.has(h),m=p?null:await (0,i.TX)(),g=await c(e,t,null!=(n=null==m?void 0:m.token)?n:null,h);if(g.ok)return g.data;if(p||!l.has(null!=(a=g.error.code)?a:""))throw g.error;let b=await (0,i.Rg)();if(!b)throw(0,r.q7)(),g.error;let f=await c(e,t,b.token,h);if(f.ok)return f.data;throw l.has(null!=(o=f.error.code)?o:"")&&(0,r.q7)(),f.error}}},80903:(e,t,n)=>{n.d(t,{QD:()=>j,DW:()=>y,po:()=>w});var a=n(78473),r=n(4317),i=n(36981),o=n(44979),s=n(39885),l=n(82365),c=n(1840),d=n(56096),u=n(22713),h=n(49397);let p={TAKEN:"That username is taken.",TOO_SHORT:"At least ".concat(3," characters."),TOO_LONG:"At most ".concat(20," characters."),INVALID_CHARACTERS:"Letters, numbers and underscores only.",RESERVED:"That username is reserved.",PROFANE:"Please pick a different username.",WALLET_LOOKALIKE:"That looks like a wallet address."};var m=n(99353);function g(e){var t;let{account:n,onSaved:r}=e,[i,s]=(0,l.useState)(""),[c,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(null),[x,v]=(0,l.useState)(!1),[w,y]=(0,l.useState)({}),[k,N]=(0,l.useState)(!1),j=(0,l.useRef)(null),S=function(e){let t=e.trim(),[n,a]=(0,l.useState)({status:"idle",message:null}),r=(0,l.useRef)(0);return(0,l.useEffect)(()=>
1{if(!t)return void a({status:"idle",message:null});if(t.length<3)return void a({status:"unavailable",message:p.TOO_SHORT});let e=++r.current;a({status:"checking",message:null});let n=setTimeout(async()=>{try{let{available:n,reason:i}=(await h.eA.fetcher({username:t})()).usernameAvailability;if(e!==r.current)return;a(n?{status:"available",message:"Available."}:{status:"unavailable",message:i?p[i]:"That username can’t be used."})}catch(t){if(e!==r.current)return;a({status:"idle",message:null})}},350);return()=>clearTimeout(n)},[t]),n}(i),C=i.trim(),I=c.trim(),A="unavailable"===S.status,E=I.length>200;(0,l.useEffect)(()=>()=>{(null==b?void 0:b.previewUrl)&&URL.revokeObjectURL(b.previewUrl)},[null==b?void 0:b.previewUrl]);let T=async e=>{if(e){v(!0),y(e=>({...e,avatarImageId:""}));try{let t=await n.uploadAvatar(e);if(!t.ok)return void y(e=>({...e,avatarImageId:t.error}));f(e=>((null==e?void 0:e.previewUrl)&&URL.revokeObjectURL(e.previewUrl),{imageId:t.imageId,previewUrl:t.previewUrl}))}finally{v(!1),j.current&&(j.current.value="")}}},U=k||n.saving||n.busy||x||A||E||!C,_=async e=>{if(e.preventDefault(),!U){N(!0),y({});try{let e=await n.saveProfile({username:C,...I?{bio:I}:{},...b?{avatarImageId:b.imageId}:{}});if(!e.ok){var t,a;y({[null!=(t=e.path)?t:"username"]:null!=(a=e.error)?a:"Save failed."});return}null==r||r()}finally{N(!1)}}},O=null!=(t=w.username)?t:S.message,P=w.username||A?"bad":"available"===S.status?"ok":"mute";return(0,a.jsxs)("form",{onSubmit:_,noValidate:!0,className:"flex flex-col gap-5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 roun
1ded-md border border-white/[0.07] bg-white/[0.03] p-3.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>{var e;return null==(e=j.current)?void 0:e.click()},disabled:x,"aria-label":"Choose a profile picture",className:"relative grid h-[72px] w-[72px] shrink-0 place-items-center overflow-hidden rounded-pill border border-dashed border-white/20 bg-white/[0.04] text-ink-mute transition-colors hover:border-brand-lo hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-lo",children:(null==b?void 0:b.previewUrl)?(0,a.jsx)("img",{src:b.previewUrl,alt:"",className:"h-full w-full object-cover"}):x?(0,a.jsx)(o.A,{className:"h-5 w-5 animate-spin"}):(0,a.jsx)(d.A,{className:"h-5 w-5"})}),(0,a.jsx)("input",{ref:j,type:"file",accept:m.tS.join(","),className:"sr-only",onChange:e=>{var t;T(null==(t=e.target.files)?void 0:t[0])}}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"truncate text-md font-bold tracking-tight text-ink",children:C?"@".concat(C):(0,a.jsx)("span",{className:"text-ink-mute",children:"@yourname"})}),(0,a.jsx)("p",{className:"mt-1 line-clamp-2 text-xs leading-snug text-ink-dim",children:I||(0,a.jsx)("span",{className:"text-ink-mute",children:b?"Picture added.":"Add a picture and a short bio."})})]})]}),w.avatarImageId&&(0,a.jsx)("p",{className:u.ug.bad,children:w.avatarImageId}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{htmlFor:"quest-username",className:u.bk,children:"Username"}),(0,a.jsx)("input",{id:"quest-username",className:u.Yt,value:i,onChange:e=>s(e.target.value),maxLength:20,autoComplete:"off",spellCheck:!1,"aria-invalid":"bad"===P}),(0,a.jsx)("p",{className:u.ug[P],"aria-live":"polite",children:"checking"===S.status?"Checking…":null!=O?O:"\xa0"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("label",{htmlFor:"quest-bio",className:u.bk,children:["Bio ",(0,a.jsx)("span",{className:"font-normal text-ink-mute",children:"(optional)"})]}),(0,a.jsx)("textarea",{id:"quest-bio",className:u.Mf,value:c,onChange:e=>g(e.target.value),rows:3}),(0,a.jsxs)("p",{className:(0,u.cx)(E?u.ug.bad:u.ug.mute,"text-right"),children:[I.length,"/",200]})]}),(0,a.jsx)("button",{type:"submit",className:u.tB,disabled:U,children:k||n.saving?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.A,{className:"h-4 w-4 animate-spin"}),"Saving…"]}):"Create my profile"})]})}var b=n(15774),f=n(58795);let x=["No","One","Two","Three","Four","Five"],v=e=>String(e).padStart(2,"0");function w(e){let{account:t,onClose:n}=e,i=(0,b.sk)(t),[o,s]=(0,l.useState)(null);(0,l.useEffect)(()=>s(document.body),[]);let d=t.saving||t.checking,h=(0,l.useRef)(d);h.current=d;let p=()=>{h.current||n()};return((0,l.useEffect)(()=>{let e=e=>{"Escape"!==e.key||h.current||n()};window.addEventListener("keydown",e);let t=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",e),document.body.style.overflow=t}},[n]),o)?(0,c.createPortal)((0,a.jsxs)("div",{className:"fixed inset-0 z-[70] grid place-items-center overflow-y-auto p-4 sm:p-8",role:"dialog","aria-modal":"true","aria-label":"Quest",children:[(0,a.jsx)("button",{type:"button","aria-label":"Close",tabIndex:-1,onClick:p,className:"absolute inset-0 cursor-pointer bg-black/70 backdrop-blur-sm"}),(0,a.jsxs)("div",{className:(0,u.cx)(u.Nr,"relative w-full max-w-[440px] p-6 shadow-card sm:p-8"),children:[(0,a.jsx)("button",{type:"button",onClick:p,disabled:d,"aria-label":"Close",className:"absolute right-4 top-4 grid h-8 w-8 place-items-center rounded-pill border border-white/10 text-ink-dim transition-colors hover:border-white/25 hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-lo disabled:opacity-40",children:(0,a.jsx)(r.A,{className:"h-4 w-4"})}),(0,a.jsx)(y,{account:t,step:i,onDone:n})]})]}),o):null}function y(e){var t,n,r,s,l,c,d,h;let{account:p,step:m,onDone:w}=e,y=null!=(s=null==(t=p.me)?void 0:t.questStatus)?s:null,S=null!=(l=null==(n=p.questConfig)?void 0:n.trustXActions)&&l;if("done"===m){let e=(0,b.Ny)(p);return e?(0,a.jsx)(j,{name:e.badge.name,imageUrl:e.badge.imageUrl,description:e.badge.description,accessGranted:null!=(c=null==y?void 0:y.accessGranted)&&c,appSite:f.MG,bare:!0}):(0,a.jsx)(N,{eyebrow:"Done",title:"Badge earned",lead:"It’s on your Melee profile.",children:(0,a.jsx)("button",{type:"button",className:u.tB,onClick:w,children:"Close"})})}if("sign-in"===m)return null;if("create-profile"===m)return(0,a.jsx)(N,{eyebrow:"Task 01",title:"Your Melee identity",lead:"The name is required. Your picture and bio you can change any time.",children:(0,a.jsx)(g,{account:p,onSaved:w})});if("connect-x"===m)return(0,a.jsxs)(N,{eyebrow:"Task 02",title:"Connect your X",lead:"This is what lets us verify the next three. Signing in with X is not the same thing — without the connect there is no token to check with.",children:[(0,a.jsxs)("button",{type:"button",className:u.tB,onClick:p.startConnectX,disabled:p.busy,children:["Connect X",(0,a.jsx)(i.A,{className:"h-4 w-4"})]}),p.error&&(0,a.jsx)("p",{className:u.ug.bad,children:p.error})]});if("claim-badge"===m)return(0,a.jsx)(k,{account:p});let C=null==(r=p.questConfig)?void 0:r.meleeHandle,I=b.R1.filter(e=>!(0,b.TL)(e,y)).map(e=>{var t,n;let a=f._x.find(t=>
1t.id===e);return{id:e,label:"follow-x"===e?C?"Follow @".concat(C):"Follow Melee":"".concat(null!=(t=null==a?void 0:a.actionLabel)?t:"Open"," the post"),href:(0,f.I1)(e,p.questConfig),title:null!=(n=null==a?void 0:a.title)?n:e}}),A=null!=(d=p.checkNote)?d:S?null:(null==y?void 0:y.verificationAvailable)?"X can take a few seconds to catch up. If you just did them, give it a moment.":"Checks are paused right now — do the steps anyway and verify in a bit.";return(0,a.jsxs)(N,{eyebrow:b.R1.length>1?"Tasks ".concat(v(f._x.length-b.R1.length+1),"–").concat(v(f._x.length)):"Task ".concat(v(f._x.length)),title:1===I.length?"One more on X":"".concat(null!=(h=x[I.length])?h:I.length," things on X"),lead:"Already done these? Just verify. If not, open the ones you need and come back — we only check when you ask.",children:[(null==y?void 0:y.xAccountClaimedElsewhere)&&(0,a.jsx)("p",{className:(0,u.cx)(u.ug.bad,"font-semibold"),role:"status",children:"This X account already earned the badge on another Melee account — one badge per X account. Connect a different X account to earn it here."}),(0,a.jsx)("button",{type:"button",className:u.tB,onClick:p.verify,disabled:p.checking,children:p.checking?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.A,{className:"h-4 w-4 animate-spin"}),S?"Claiming…":"Checking with X…"]}):"I’ve done these — verify"}),(0,a.jsx)("p",{className:(0,u.cx)(u.ug.mute,"empty:hidden"),"aria-live":"polite",children:A}),(0,a.jsx)("p",{className:(0,u.cx)(u.ug.mute,"pt-1"),children:"Haven’t done them yet?"}),(0,a.jsx)("div",{className:"flex flex-col gap-2",children:I.map(e=>{let{id:t,label:n,href:r}=e;return r?(0,a.jsxs)("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:(0,u.cx)(u.Vq,"h-control w-full justify-between px-5"),children:[n,(0,a.jsx)(i.A,{className:"h-4 w-4 shrink-0"})]},t):(0,a.jsx)("span",{"aria-disabled":"true",className:(0,u.cx)(u.Vq,"h-control w-full justify-between px-5 opacity-45",p.configLoading&&"animate-pulse"),children:n},t)})})]})}function k(e){var t,n,r;let{account:i}=e,s=null!=(n=null==(t=i.me)?void 0:t.questStatus)?n:null,c=null!=(r=null==s?void 0:s.verificationAvailable)&&r,d=(0,l.useRef)(!1);(0,l.useEffect)(()=>{!d.current&&c&&!i.checking&&(d.current=!0,i.verifyCount>0||i.verify())},[c,i]);let h=d.current&&!i.checking;return(0,a.jsxs)(N,{eyebrow:"Almost there",title:i.checking?"Claiming your badge…":"All five are done",lead:i.checking?"Every task is confirmed. Getting the badge onto your profile now.":h?"Your tasks are recorded. The badge hasn’t landed yet — X can lag a few seconds behind, and this is safe to try again.":"Every task is confirmed. Badge grants are paused right now; it will land once they resume.",children:[i.checking?(0,a.jsx)("div",{className:"flex items-center justify-center py-2",children:(0,a.jsx)(o.A,{className:"h-6 w-6 animate-spin text-brand-lo"})}):(0,a.jsx)("button",{type:"button",className:u.tB,onClick:i.verify,disabled:!c,children:"Try again"}),i.checkNote&&!i.checking&&(0,a.jsx)("p",{className:u.ug.mute,"aria-live":"polite",children:i.checkNote})]})}function N(e){let{eyebrow:t,title:n,lead:r,children:i}=e;return(0,a.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,a.jsxs)("header",{className:"flex flex-col gap-2 pr-8",children:[(0,a.jsx)("span",{className:u.SW,children:t}),(0,a.jsx)("h3",{className:"text-xl font-bold tracking-tight text-ink",children:n}),(0,a.jsx)("p",{className:"text-sm leading-relaxed text-ink-dim",children:r})]}),(0,a.jsx)("div",{className:"flex flex-col gap-3",children:i})]})}function j(e){let{name:t,imageUrl:n,description:r,accessGranted:o,appSite:c,bare:d=!1}=e,[h,p]=(0,l.useState)(!1),m=t.trim().charAt(0).toUpperCase()||"★";return(0,a.jsxs)("div",{className:(0,u.cx)("flex flex-col items-center gap-4 text-center",d?"pt-2":(0,u.cx)(u.Nr,"p-6")),role:"group","aria-label":"Badge earned: ".concat(t),children:[(0,a.jsx)("span",{className:"relative grid h-24 w-24 place-items-center overflow-hidden rounded-pill",children:n&&!h?(0,a.jsx)("img",{src:n,alt:"",className:"h-full w-full object-cover",onError:()=>p(!0)}):(0,a.jsx)("span",{className:"text-4xl font-semibold text-brand-lo",children:m})}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsxs)("span",{className:"inline-flex items-center justify-center gap-1.5 text-2xs font-semibold uppercase tracking-kick text-gain",children:[(0,a.jsx)(s.A,{className:"h-3 w-3",strokeWidth:3}),"Badge earned"]}),(0,a.jsx)("p",{className:"text-lg font-semibold text-ink",children:t}),(0,a.jsx)("p",{className:"text-xs leading-relaxed text-ink-mute",children:null!=r?r:"On your Melee profile from now on."})]}),(0,a.jsxs)("a",{className:(0,u.cx)(u.KB,"w-full"),href:c,children:["Go to Melee",(0,a.jsx)(i.A,{className:"h-4 w-4"})]}),(0,a.jsx)("p",{className:u.ug.mute,children:o?"You’re on the list — see you inside.":"Access is still gated, so you may land on the waitlist. The badge is yours either way."})]})}},87025:(e,t,n)=>{n.d(t,{tv:()=>g,Yp:()=>b});var a=n(78473),r=n(39885),i=n(21388),o=n(44979),s=n(82365),l=n(22713),c=n(15774),d=n(80903),u=n(36981);let h=[{handle:"itsmaximilian"},{handle:"kaitrias"},{handle:"zen_llama"},{handle:"NickPreszler"}];function p(){return(0,a.jsxs)("aside",{className:"flex flex-col gap-4 roun
1ded-lg border border-white/[0.06] bg-white/[0.02] p-5 sm:px-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("span",{className:l.SW,children:"Optional"}),(0,a.jsx)("h3",{className:"text-md font-semibold leading-tight text-ink",children:"Follow the people building Melee"})]}),(0,a.jsx)("ul",{className:"flex flex-wrap gap-2",children:h.map(e=>{let{handle:t}=e;return(0,a.jsx)("li",{children:(0,a.jsxs)("a",{href:"https://x.com/intent/follow?screen_name=".concat(encodeURIComponent(t)),target:"_blank",rel:"noopener noreferrer",className:(0,l.cx)(l.Vq,"font-medium"),children:["@",t,(0,a.jsx)(u.A,{className:"h-3.5 w-3.5 shrink-0 text-ink-mute"})]})},t)})})]})}var m=n(58795);function g(e){var t,n,r,i,o;let{account:s,onAct:u}=e,h=null!=(n=null==(t=s.me)?void 0:t.questStatus)?n:null,g=(0,c.sk)(s),b=c._x.filter(e=>(0,c.TL)(e.id,h)).length,w=c._x.length,y=(0,c.Ny)(s),k="done"===g;return(0,a.jsxs)("div",{className:"mx-auto flex w-full max-w-[880px] flex-col gap-8",children:[(0,a.jsx)(f,{account:s,done:b,total:w}),s.signedIn&&s.me&&(0,a.jsxs)("div",{className:"-mt-4 flex items-center gap-3 text-sm",children:[s.me.profilePictureUrl&&(0,a.jsx)("img",{src:s.me.profilePictureUrl,alt:"",className:"h-7 w-7 rounded-pill object-cover"}),(0,a.jsxs)("span",{className:"text-ink-dim",children:["Signed in as"," ",(0,a.jsxs)("b",{className:"font-semibold text-ink",children:["@",null!=(i=null!=(r=s.me.username)?r:s.me.displayName)?i:"you"]})]}),(0,a.jsx)("button",{type:"button",onClick:s.signOut,disabled:s.busy,className:"text-xs font-medium text-ink-mute underline underline-offset-4 transition-colors hover:text-ink-dim disabled:opacity-50",children:s.busy?"Signing out…":"Sign out"})]}),k&&y?(0,a.jsx)(d.QD,{name:y.badge.name,imageUrl:y.badge.imageUrl,description:y.badge.description,accessGranted:null!=(o=null==h?void 0:h.accessGranted)&&o,appSite:m.MG}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("ol",{className:(0,l.cx)(l.Nr,"flex flex-col divide-y divide-white/[0.06]"),children:c._x.map((e,t)=>(0,a.jsx)(x,{index:t,title:e.title,blurb:e.blurb,done:(0,c.TL)(e.id,h),blocked:(0,c.bW)(e.id,h),result:(0,c.OY)(e.id,s),active:s.signedIn&&!(0,c.TL)(e.id,h)&&!(0,c.bW)(e.id,h),onAct:u},e.id))}),(0,a.jsx)(v,{account:s,step:g,onOpen:u})]}),(0,a.jsx)(p,{})]})}function b(e){let{account:t,id:n="quests"}=e,[r,i]=(0,s.useState)(!1),o=(0,c.sk)(t);return(0,a.jsxs)("section",{id:n,className:"relative scroll-mt-24 px-[clamp(20px,4.4vw,112px)] py-[clamp(48px,6vw,88px)]",children:[(0,a.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 -z-10 bg-[radial-gradient(60%_60%_at_25%_30%,rgba(128,97,253,0.14),transparent_70%)]"}),(0,a.jsx)(g,{account:t,onAct:()=>{if("sign-in"===o)return void t.signIn();i(!0)}}),r&&(0,a.jsx)(d.po,{account:t,onClose:()=>i(!1)})]})}function f(e){let{account:t,done:n,total:r}=e,i=r>0?Math.round(n/r*100):0;return(0,a.jsxs)("header",{className:"flex flex-col gap-6 sm:flex-row sm:items-end sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("h2",{className:"text-d-sm font-bold tracking-tight text-ink sm:text-d-md",children:"Your Melee badge"}),(0,a.jsxs)("p",{className:"max-w-[46ch] text-md leading-relaxed text-ink-dim",children:["Complete ",r," tasks to claim a badge that proves you were here early. Badges are visible on your Melee profile and may unlock future benefits."]})]}),t.signedIn&&(0,a.jsxs)("div",{className:"flex shrink-0 flex-col gap-2 sm:items-end",children:[(0,a.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,a.jsx)("span",{className:"font-num text-d-sm font-bold tabular-nums leading-none text-ink",children:n}),(0,a.jsxs)("span",{className:"text-sm font-medium text-ink-mute",children:["of ",r," done"]})]}),(0,a.jsx)("div",{className:"h-1.5 w-full min-w-[180px] overflow-hidden rounded-pill bg-white/[0.08]",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":r,children:(0,a.jsx)("div",{className:"h-full rounded-pill bg-gradient-to-r from-brand to-brand-lo transition-[width] duration-700 ease-out",style:{width:"".concat(i,"%")}})})]})]})}function x(e){let{index:t,title:n,blurb:o,done:s,blocked:c,active:d,result:u,onAct:h}=e;return(0,a.jsxs)("li",{className:"flex items-center gap-4 p-4 sm:gap-5 sm:px-6",children:[(0,a.jsx)("span",{"aria-hidden":!0,
1className:(0,l.cx)("grid h-9 w-9 shrink-0 place-items-center rounded-pill border font-num text-xs font-bold tabular-nums transition-colors",s&&"border-gain/40 bg-gain/15 text-gain",!s&&d&&"border-brand-lo bg-brand/20 text-ink",!s&&!d&&"border-white/10 bg-white/[0.04] text-ink-mute"),children:s?(0,a.jsx)(r.A,{className:"h-4 w-4",strokeWidth:3}):c?(0,a.jsx)(i.A,{className:"h-3.5 w-3.5"}):String(t+1).padStart(2,"0")}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,a.jsx)("p",{className:(0,l.cx)("text-md font-semibold leading-tight",s?"text-ink-dim":"text-ink"),children:n}),s&&u?(0,a.jsxs)("p",{className:"flex items-center gap-1.5 text-xs text-ink-mute",children:[u.avatar&&(0,a.jsx)("img",{src:u.avatar,alt:"",className:"h-4 w-4 rounded-pill object-cover"}),u.strong&&(0,a.jsx)("b",{className:"font-semibold text-ink-dim",children:u.strong}),u.text]}):(0,a.jsx)("p",{className:"line-clamp-2 text-xs leading-snug text-ink-mute",children:o})]}),d&&(0,a.jsx)("button",{type:"button",className:l.Vq,onClick:h,children:"Do it"})]})}function v(e){var t,n;let{account:r,step:i,onOpen:s}=e;return r.booting?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,a.jsx)("div",{className:"h-control w-full max-w-[320px] animate-pulse rounded-pill bg-white/[0.06]","aria-hidden":!0}),(0,a.jsx)("span",{className:"sr-only",children:"Loading your progress…"})]}):(0,a.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,a.jsx)("button",{type:"button",className:(0,l.cx)(l.tB,"w-full max-w-[320px]"),onClick:s,disabled:r.busy,children:r.busy?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.A,{className:"h-4 w-4 animate-spin"}),"Signing in…"]}):"sign-in"===i?"Sign in to start":"create-profile"===i?"Create your profile":"connect-x"===i?"Connect your X":"claim-badge"===i?"Claim your badge":"Finish on X"}),r.error&&(0,a.jsx)("p",{className:l.ug.bad,children:r.error}),(null==(n=r.me)||null==(t=n.questStatus)?void 0:t.xAccountClaimedElsewhere)&&(0,a.jsx)("p",{className:l.ug.bad,role:"status",children:"This X account already earned the badge on another Melee account. Connect a different one to earn it here."}),!r.signedIn&&(0,a.jsx)("p",{className:l.ug.mute,children:"Already have a Melee account? Signing in picks up where you left off."})]})}},99353:(e,t,n)=>{n.d(t,{F4:()=>i,tS:()=>a});let a=["image/png","image/jpeg","image/webp","image/gif","image/heic","image/heif"],r=/\.(heic|heif)$/i;async function i(e,t){if(!(a.includes(e.type)||""===e.type&&r.test(e.name)))return{ok:!1,error:"Use a PNG, JPEG, WEBP, GIF or HEIC image."};if(e.size>5242880)return{ok:!1,error:"That image is larger than 5MB."};try{let{uploadUrl:n,imageId:a}=await t(),i=new FormData;if(i.append("file",e),!(await fetch(n,{method:"POST",body:i})).ok)return{ok:!1,error:"Upload failed. Please try again."};return{ok:!0,imageId:a,previewUrl:r.test(e.name)||e.type.startsWith("image/hei")?null:URL.createObjectURL(e)}}catch(e){return{ok:!1,error:"Couldn’t upload that right now. Try again in a few minutes."}}}}}]);

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.