1"use strict";(self.webpackChunkallyourbasedotgg=self.webpackChunkallyourbasedotgg||[]).push([[2076,5187,5676,7683,9268,9404],{71643(e,t,n){n.d(t,{F4:()=>a,Mm:()=>i,My:()=>v,NU:()=>h,WV:()=>m,Yx:()=>l,Z6:()=>y,ke:()=>x,og:()=>f,p_:()=>g,pm:()=>s});var r=n(4738),o=n(55612);async function i(e){return o.A.post("/do.php?cmd=edituser",e,{url:"https://api.dotgg.gg/do.php?cmd=edituser",headers:(0,r.z5)()})}async function a(e){const t=await o.A.post("/do.php?cmd=avapreview",e,{url:"https://api.dotgg.gg/do.php?cmd=avapreview",headers:(0,r.z5)()});if("object"==typeof t&&t.error_text)throw new Error(t.error_text);const n=String(t).trim();if(!/^[0-9a-f]{10}\.webp$/.test(n))throw new Error("The server did not accept that picture.");return n}async function l(e){return(await o.A.post("/do.php?cmd=checknickunique",{nick:e,check:"nick"},{url:"https://api.dotgg.gg/do.php?cmd=checknickunique",headers:(0,r.z5)()})).result}async function s(e){return o.A.post("/auth/v2/premium_view",{view:e},{url:"https://api.dotgg.gg/auth/v2/premium_view",headers:(0,r.z5)()})}const d="/auth/v2/discord_link",c={url:"https://api.dotgg.gg/auth/v2/discord_link"};function p(e){if(e.error)throw new Error(e.error_text||"Discord link request failed");return e}async function h(){return p(await o.A.get(d,void 0,{...c,headers:(0,r.z5)()})).state}async function u(e){return p(await o.A.post(d,e,{...c,headers:(0,r.z5)()}))}async function g(e){const t=(await u({action:"start",returl:e})).url;if(!t)throw new Error("Discord link request failed");return t}async function m(e,t){return(await u({action:"complete",code:e,state:t})).state}async function f(){return(await u({action:"sync"})).state}async function x(){return(await u({action:"unlink"})).state}class v extends Error{constructor(e,t){super(e),this.code=t}}async function y(e){const t=await o.A.post("/auth/v2/account_email",{email:e},{url:"https://api.dotgg.gg/auth/v2/account_email",headers:(0,r.z5)()});if(t.error)throw new v(t.error_text||"Couldn't save that email.",t.code??"")}},60220(e,t,n){n.d(t,{q:()=>a,s:()=>l});var r=n(4738),o=n(55612);function i(e){return{url:`https://api.dotgg.gg${e}`,headers:(0,r.z5)()}}async function a(e){const t=`/cgfw/getalerts?game=${encodeURIComponent(e)}`,n=await o.A.get(t,void 0,i(t));if(n.error)throw new Error(n.error_text||"Failed to load alerts");return n}async function l(e,t){const n=`/cgfw/seenalerts?game=${encodeURIComponent(e)}&id=${t}`,r=await o.A.post(n,{},i(n));if(r.error)throw new Error("Failed to mark alerts seen");return r.seen_id??t}},60084(e,t,n){n.d(t,{Lb:()=>y,SX:()=>k,bi:()=>$,f6:()=>m,g4:()=>f,gu:()=>g,mB:()=>p,mJ:()=>w,pw:()=>h,rS:()=>u,rp:()=>d,tA:()=>x,wQ:()=>v,we:()=>Y,xl:()=>b});var r=n(74079),o=n(4738),i=n(55612),a=n(12434);const l=()=>encodeURIComponent(a.Ay.TheGame);function s(e){return{url:`https://api.dotgg.gg${e}`,headers:(0,o.z5)()}}function d(e){const t=Number(e);return null!=e&&Number.isFinite(t)&&t>0?t:null}function c(e){return{id:Number(e.id),name:e.name,slug:e.slug??void 0,type:e.type,sort:Number(e.sort??0),created:null!=e.created?Number(e.created):void 0,public:Number(e.public??0)||0,count:null!=e.count?Number(e.count):void 0,color:(0,r.xf)(e.color),parent_id:d(e.parent_id)}}async function p(){const e=`/cgfw/listbinders?game=${l()}`,t=await i.A.get(e,void 0,s(e));if(t.error)throw new Error(t.error_text||"Failed to load binders");return(t.binders||[]).map(c)}async function h(e,t,n=0){const o=`/cgfw/createbinder?game=${l()}`,a={name:e,color:(0,r.xf)(t)??"",parent_id:n},c=await i.A.post(o,a,s(o));if(c.error||null==c.id)throw new Error(c.error_text||"Failed to create binder");return{id:Number(c.id),name:c.name??e,slug:c.slug??void 0,type:"custom",sort:Number(c.sort??0),public:0,color:(0,r.xf)(c.color??t),parent_id:d(c.parent_id)}}async function u(e,t){const n=`/cgfw/setbinderparent?game=${l()}`,r={binder_id:e,parent_id:t},o=await i.A.post(n,r,s(n));if(o.error)throw new Error(o.error_text||"Could not move the binder")}async function g(e,t){const n=`/cgfw/setbindercolor?game=${l()}`,o={binder_id:e,color:(0,r.xf)(t)??""},a=await i.A.post(n,o,s(n));if(a.error)throw new Error(a.error_text||"Failed to update color")}
1async function m(e,t){const n=`/cgfw/renamebinder?game=${l()}`,r=await i.A.post(n,{binder_id:e,name:t},s(n));if(r.error)throw new Error(r.error_text||"Failed to rename binder")}async function f(e){const t=`/cgfw/deletebinder?game=${l()}`,n=await i.A.post(t,{binder_id:e},s(t));if(n.error)throw new Error(n.error_text||"Failed to delete binder")}async function x(e){const t=`/cgfw/reorderbinder?game=${l()}`,n=await i.A.post(t,{order:e},s(t));if(n.error)throw new Error(n.error_text||"Failed to reorder binders")}async function v(e){const t=`/cgfw/getbindercards?game=${l()}&binder_id=${e}`,n=await i.A.get(t,void 0,s(t));if(n.error)throw new Error(n.error_text||"Failed to load binder cards");return n.collection||[]}async function y(e){const t=e?`&parent=${e}`:"",n=`/cgfw/getbindercards?game=${l()}&binder_id=all${t}`,r=await i.A.get(n,void 0,s(n));if(r.error)throw new Error(r.error_text||"Failed to load your binders");return r.collection||[]}async function w(e){const{binder_id:t,card:n,type:r,count:o,extra:a,source:d,label:c}=e,p=`/cgfw/savebindercard?game=${l()}`,h={card:n,type:r,count:o,binder_id:t,extra:a,...d?{source:d}:{},...c?{label:c}:{}},u=await i.A.post(p,h,s(p));if(u.error)throw new Error(u.error_text||"Failed to save to binder");return u}async function b(e,t,n={}){const r=`/cgfw/savebatchbindercard?game=${l()}`,o={binder_id:e,cards:t,...n.source?{source:n.source}:{},...n.label?{label:n.label}:{}};return i.A.post(r,o,s(r))}async function $(e,t,n){const r=`/cgfw/movecards?game=${l()}`,o={from_binder:e,to_binder:t,cards:n};return i.A.post(r,o,s(r))}async function k(e,t){const n=`/cgfw/setbinderpublic?game=${l()}`,r={binder_id:e,public:t?1:0},o=await i.A.post(n,r,s(n));if(o.error)throw new Error(o.error_text||"Failed to update sharing")}async function Y(e,t){const n=`/cgfw/getpublicbinder?game=${l()}&user=${e}&slug=${encodeURIComponent(t)}`,r=await i.A.get(n,void 0,s(n));if(r.error||!r.collection)throw new Error(r.error_text||"Binder not available");return{name:r.name||"Binder",slug:r.slug||t,user:r.user||0,collection:r.collection}}},55115(e,t,n){n.d(t,{B:()=>x,ED:()=>m,Tu:()=>h,Un:()=>f,eT:()=>c,fg:()=>s,uf:()=>v,uz:()=>p,wb:()=>g,yN:()=>d});var r=n(4738),o=n(55612),i=n(76052);const a=(e,t)=>t<2&&("network"===e||"timeout"===e||"server"===e);function l(e){return{url:`https://api.dotgg.gg${e}`,headers:(0,r.z5)()}}async function s({game:e,objectType:t,objectId:n,sort:i="top",presence:s=!1,edgeCache:d=!1}){const c=`/cgfw/commentslist?game=${encodeURIComponent(e)}&object_type=${encodeURIComponent(t)}&object_id=${encodeURIComponent(n)}&sort=${i}`+(d?`&cache=${(0,r.W2)(5)}`:s?"&presence=1":""),p=await o.A.get(c,void 0,{...l(c),retry:a});if(p.error)throw new Error(p.error_text||"Failed to load comments");return{comments:Array.isArray(p.comments)?p.comments:[],present:"number"==typeof p.present?p.present:null}}async function d(e,t,n){const r=`/cgfw/commentspresence?game=${encodeURIComponent(e)}`;try{const e=await o.A.post(r,{object_type:t,object_id:n},{...l(r),retry:!1});return e.error?null:"number"==typeof e.present?e.present:null}catch{return null}}async function c(e,t){const n=`/cgfw/commentscreate?game=${encodeURIComponent(e)}`,r=await o.A.post(n,t,l(n));if(r.error||!r.comment)throw new Error(r.error_text||"Failed to post comment");return r.comment}async function p(e,t,n){const r=`/cgfw/commentsvote?game=${encodeURIComponent(e)}`,i=await o.A.post(r,{comment_id:t,value:n},l(r));if(i.error)throw new Error(i.error_text||"Vote failed");return i}async function h(e,t){const n=`/cgfw/commentsdelete?game=${encodeURIComponent(e)}`,r=await o.A.post(n,{comment_id:t},l(n));if(r.error)throw new Error(r.error_text||"Delete failed")}const u=e=>`notifs:${e}`;async function g(e,t){const n=t?.fresh?null:(0,i.le)(u(e));if(null!==n)return n;const r=`/cgfw/commentsnotifications?game=${encodeURIComponent(e)}`,a=await o.A.get(r,void 0,l(r));if(a.error)throw new Error(a.error_text||"Failed to load notifications");return(0,i.Mu)(u(e),a,2e4),a}async function m(e){const t=`/cgfw/commentsnotifications?game=${encodeURIComponent(e)}&check=1`,n=await o.A.get(t,void 0,l(t));if(n.error)throw new Error(n.error_text||"Failed to check notifications");return{unseen:n.unseen,max_id:n.max_id,trade_unread:n.trade_unread??0,trade_matches:n.trade_matches??0,elsewhere_unseen:n.elsewhere_unseen??0,sig:n.sig??0}}async function f(e,t){const n=t&&t.length?`&ids=${t.join(",")}`:"",r=`/cgfw/commentsnotifications?game=${encodeURIComponent(e)}${n}`;await o.A.post(r,{},l(r)),(0,i.YA)(u(e))}async function x(e){const t=`/cgfw/commentsnotifications?game=${encodeURIComponent(e)}&action=clear`,n=await o.A.post(t,{},l(t));if(n.error)throw new Error(n.error_text||"Failed to clear notifications");(0,i.YA)(u(e))}async function v(e,t,n=0,r=30){const i=`/cgfw/commentsuser?game=${encodeURIComponent(e)}&user_id=${t}&page=${n}&limit=${r}`,a=await o.A.get(i,void 0,l(i));if(a.error)throw new Error(a.error_text||"Failed to load user comments");return a}},51700(e,t,n){n.d(t,{Dn:()=>s,UH:()=>l});var r=n(86031),o=n(55612),i=n(12434);async function a(e){if(""===i.Ay.TheGame)return 1;const t=`https://butterfly.dotgg.gg/?game=${i.Ay.TheGame}${e?`_${e}`:""}`,n=await o.A.get(t,void 0,{url:t,withCredentials:!1});return parseInt(n)}async function l(){const e=await a();(0,r.fZ)({core:{cardDataVersion:e}})}async function s(){const e=await a("meta");(0,r.fZ)({core:{metaDataVersion:e}})}},33560(e,t,n){n.d(t,{ZC:()=>s,ef:()=>l,f6:()=>a});var r=n(4738),o=n(55612);function i(e){return{url:`https://api.dotgg.gg${e}`,headers:(0,r.z5)()}}async function a(){const e="/cgfw/follow",t=await o.A.get(e,void 0,i(e));if(t.error)throw new Error(t.error_text||"Failed to load follows");return t.follows}async function l(e,t,n="",r=""){const a="/cgfw/follow",l=await o.A.post(a,{action:t?"follow":"unfollow",topic_type:e.type,game:e.game,topic_key:e.key,label:n,url:r},i(a));if(l.error)throw new Error(l.error_text||"Failed to update follow")}function s(e){return`${e.type??e.topic_type}|${e.game}
1|${e.key??e.topic_key}`}},97525(e,t,n){n.d(t,{M:()=>d,PA:()=>h,ek:()=>c,vb:()=>p});var r=n(51700),o=n(86031),i=n(70165),a=n(4738),l=n(55612),s=(n(85972),n(81616),n(12434));async function d(e,t,n){const r=`${e}${t?"":`${e.includes("?")?"&":"?"}cache=${0===o.SA.core.cardDataVersion||void 0===o.SA.core.cardDataVersion?(0,a.W2)(15):o.SA.core.cardDataVersion}`}`,i=await l.A.get(r,void 0,{url:r});return n&&n.updateState(i),i}async function c(e){0!==o.SA.core.metaDataVersion&&void 0!==o.SA.core.metaDataVersion||await(0,r.Dn)();const t=`${e}${e.includes("?")?"&":"?"}cache=${o.SA.core.metaDataVersion||(0,a.W2)(15)}`;return await l.A.get(t,void 0,{url:t})}async function p(e,t,n){const r=`https://api.dotgg.gg/cgfw/${e}?game=${s.Ay.TheGame}${n?`&${n}`:""}`+("dev"===s.Ay.mode?"":`&cache=${0===o.SA.core.cardDataVersion||void 0===o.SA.core.cardDataVersion?(0,a.W2)(15):o.SA.core.cardDataVersion}`),d=await l.A.get(r,void 0,{url:r});t.updateState(function(e,t,n){const r=t?t.replace("type=",""):e;try{return i.yD.processApiData(r,n)}catch(e){return console.error(`processApiData failed for "${r}"; using raw data`,e),n}}(e,n,d))}async function h(e,t,n=15){const r=`https://api.dotgg.gg/cgfw/${e}?game=${s.Ay.TheGame}${t?`&${t}`:""}`+("dev"===s.Ay.mode?"":`&cache=${(0,a.W2)(n)}`);return await l.A.get(r,void 0,{url:r})}},33530(e,t,n){n.d(t,{$s:()=>k,Dn:()=>b,Eg:()=>C,Ev:()=>w,ew:()=>Y,rQ:()=>$});var r=n(86031),o=n(4738),i=n(55612),a=n(91181),l=n(12434);const s=1440;let d=new Set,c=new Set,p=[],h=null,u=!1;const g=new Map;function m(e){const t=g.get(e);t&&(g.delete(e),t.forEach(e=>e()))}function f(){h&&clearTimeout(h),h=setTimeout(()=>{h=null,async function(){if(!u){u=!0;try{const e=Array.from(d),t=Array.from(c),n=[...p];d.clear(),c.clear(),p=[],e.length>0&&await x(e),t.length>0&&await v(t);for(const e of n)try{await A({rq:e,mode:"indexed",cacheTimer:s})}finally{m(e)}}finally{u=!1,(d.size>0||c.size>0||p.length>0)&&f()}}}()},150)}async function x(e){const t=[];for(let n=0;n<e.length;n+=80)t.push(e.slice(n,n+80));await y(t,async e=>{await A({ids:e.join(","),mode:"indexed",cacheTimer:s})},3)}async function v(e){const t=[];for(let n=0;n<e.length;n+=80)t.push(e.slice(n,n+80));await y(t,async e=>{await A({names:e.join("|"),mode:"indexed",cacheTimer:s})},3)}async function y(e,t,n){const r=[];for(const o of e){const e=t(o).then(()=>{r.splice(r.indexOf(e),1)});r.push(e),r.length>=n&&await Promise.race(r)}await Promise.all(r)}async function w(e,t="post",n){const r=a.jb.getMap(),o=e.filter(e=>!r.has(e));0!==o.length&&function(e){const t=a.jb.getMap();for(const n of e)t.has(n)||d.has(n)||d.add(n);f()}(o)}async function b(e){const t=a.jb.getMap(),n=e.filter(e=>!t.has(e));0!==n.length&&await x(n)}async function $(e){const t=Array.from(new Set(e.filter(e=>""!==e)));0!==t.length&&await v(t)}async function k(e){const t=a.jb.getMap(),n=e.filter(e=>!t.has(e));0!==n.length&&function(e){const t=a.jb.getMap();for(const n of e)t.has(n)||c.has(n)||c.add(n);f()}(n)}async function Y(e){await function(e){p.includes(e)||p.push(e);const t=new Promise(t=>{const n=g.get(e)??[];n.push(t),g.set(e,n)});return f(),t}(e)}async function A(e){const t=function(e){let t=`/cgfw/${void 0!==e.rq?"getcardsfiltered":"getcards"}?game=${l.Ay.TheGame}`;return e.conf&&(t+="&conf="+e.conf),e.mode&&(t+="&mode="+e.mode),e.ids&&(t+="&ids="+e.ids),e.names&&(t+="&names="+encodeURIComponent(e.names)),e.rq&&(t+="&rq="+encodeURIComponent(e.rq)),t}(e);try{const n=await i.A.get(t,void 0,{url:`https://api.dotgg.gg${t}&cache=${0===r.SA.core.cardDataVersion?(0,o.W2)(e.cacheTimer||1e5):r.SA.core.cardDataVersion}`});let l;return l="indexed"===e.mode&&n&&"names"in n&&"data"in n?n.data.map(t=>{const r={};return n.names.forEach((e,n)=>{r[e]=t[n]}),e.conf&&"default"!==e.conf&&(r.dataMode=e.conf),r}):n,function(e,t){let n=[];a.jb.mapState(e=>{n=e});const o=a.jb.getMap(),i=t?[]:[...n];let l=0;for(const t of function(e){const t=Object.keys(r.SA.core.gameColors),n=function(e){try{return r.SA.cards.processCardsData(e)}catch(t){console.error("processCardsData threw on a batch; isolating bad cards",t);const n=[];for(const t of e)try{n.push(...r.SA.cards.processCardsData([t]))}catch(e){console.warn("Dropping malformed card",t?.id,e)}return n}}(e);return 0===t.length?n:n.filter(e=>e.colorsList&&e.colorsList.length>0?e.colorsList.every(e=>""===e||t.includes(e)):!(!e.color||""===e.color)&&t.includes(e.color))}(e))o.has(t.id)||(i.push(t),l++);
1return o.clear(),i.forEach((e,t)=>{o.set(e.id,t)}),a.jb.updateMap(o),a.jb.updateState(i),l}(l,e.anew)}catch(e){return console.error("Error loading cards:",e),0}}async function C(e,t){return e?(e.idsPost&&(e.ids=e.idsPost,delete e.idsPost),A(e)):0}},17083(e,t,n){n.d(t,{Br:()=>g,Rr:()=>u,_e:()=>h,k2:()=>m});var r=n(87109),o=n(86031),i=n(4738),a=n(55612),l=n(76052),s=n(81616),d=n(12434);const c="dotgg:recentDeckEdits";function p(){const e=l.Ar.getItem(c);if(!e)return{};try{const n=JSON.parse(e);if("object"!=typeof(t=n)||null===t||Array.isArray(t))return{};const r={};return Object.entries(n).forEach(([e,t])=>{"number"==typeof t&&Number.isFinite(t)&&(r[e]=t)}),r}catch{return{}}var t}function h(e){if(!e)return;const t=p();t[e]=Date.now();const n=Object.entries(t).sort((e,t)=>t[1]-e[1]).slice(0,50);l.Ar.setItem(c,JSON.stringify(Object.fromEntries(n)))}class u extends Error{constructor(e){super(`deck not found: ${e}`),this.name="DeckNotFoundError"}}async function g(e,t,n,l){const c=1===e.my||1===e.myarchive||"missingCount"===e.srt,p=o.SA.cards?.priceProviders,h=!!(p&&p.length>0),u=void 0!==window.DotGGUser&&window.DotGGUser>0&&(e.getdecks.collection>0||e.my>0),g="missingCount"===e.srt&&void 0!==window.DotGGUser&&window.DotGGUser>0;if(h||u||g){if(e={...e,getdecks:{...e.getdecks}},h){const t=p[0].cookieName,n=(0,i.Ri)(t)||o.SA.cards?.defaultPriceProvider||"tcgplayer";e.getdecks.priceCurrency="cardmarket"===n?"eur":"usd"}u&&(1===e.getdecks.collection&&(e.getdecks.collection=window.DotGGUser),1===e.my&&(e.my=window.DotGGUser)),g&&(e.binder_id=(0,r.ZG)())}const m=`/cgfw/getdecks?game=${d.Ay.TheGame}&rq=${encodeURIComponent(JSON.stringify(e))}`,f=await a.A.get(m,void 0,{url:`https://api.dotgg.gg${m}${n?`&cache=${(0,i.W2)(n)}`:""}`,headers:c?(0,i.z5)():void 0});Array.isArray(f)&&f.forEach(e=>{"string"==typeof e.humanname&&(e.humanname=e.humanname.replaceAll("\\",""))}),void 0!==o.SA&&o.SA.decks?.boards&&f.forEach(e=>{e.deck&&!e.boards&&(e.boards={0:{...e.deck}},e.sideboard&&Object.keys(e.sideboard).length>0&&(e.boards[1]={...e.sideboard}))});let x=f;return t&&(x=t.concat(x)),l||s.iX.updateState(x),x}async function m(e,t={}){const{cached:n,noStoreUpdate:r,forceNoCache:l,mode:c}=t,h=`/cgfw/getdeck?game=${d.Ay.TheGame}&slug=${e}${c?`&mode=${c}`:""}`,g=void 0!==n&&function(e,t){const n=p()[e];return void 0!==n&&Date.now()-n<60*(t+1)*1e3}(e,n),m=n&&!g?`&cache=${(0,i.W2)(n)}`:l||g?`&rand=${Math.random()}`:"",f=await a.A.get(h,void 0,{url:`https://api.dotgg.gg${h}${m}`,headers:(0,i.z5)()});if("object"!=typeof(x=f)||null===x||"string"!=typeof x.humanname)throw new u(e);var x;const v=f;return v.humanname=v.humanname.replaceAll("\\",""),v.deck_extra&&!Array.isArray(v.deck_extra)||(v.deck_extra={}),v.deck&&!Array.isArray(v.deck)||(v.deck={}
1),v.boards&&Object.values(v.boards).forEach(e=>{Object.keys(e).forEach(t=>{e[t]=Number(e[t])||0})}),void 0!==o.SA&&void 0!==o.SA.decks.boards?(v.deck={},o.SA.decks.boardsToMerge?.forEach(e=>{v.boards?.[e]&&Object.keys(v.boards[e]).forEach(t=>{v.boards&&(v.deck[t]=(v.deck[t]??0)+parseInt(v.boards[e][t]))})})):Object.keys(v.deck).forEach(e=>{v.deck[e]=parseInt(v.deck[e])}),void 0!==r&&r||s.S9.updateState(v),v}},57532(e,t,n){n.d(t,{U:()=>s});var r=n(86031),o=n(4738),i=n(55612),a=n(81616),l=n(12434);async function s(){const e=`/cgfw/getsets?game=${l.Ay.TheGame}&cache=${0===r.SA.core.cardDataVersion?(0,o.W2)(5):r.SA.core.cardDataVersion}`,t=await i.A.get(e,void 0,{url:`https://api.dotgg.gg${e}`});return""===t?[]:(t.forEach((e,n)=>{t[n].title="["+(e.displayId?e.displayId:e.id.toString().toUpperCase())+"] "+e.name,t[n].cardsCount=+e.cardsCount}),a.F_.updateState(t),t)}},14330(e,t,n){n.d(t,{QL:()=>c,Zn:()=>s,_z:()=>g,hG:()=>p,hY:()=>h});var r=n(4738),o=n(55612);const i="/cgfw/messages";function a(e){return{url:`https://api.dotgg.gg${e}`,headers:(0,r.z5)()}}function l(e,t){if(e.error)throw new Error(e.error_text||t);return e}async function s(e){const t=`${i}?view=${e}`;return l(await o.A.get(t,void 0,a(t)),"Failed to load messages")}const d=e=>e?`&about=1&game=${encodeURIComponent(e)}`:"";async function c(e,t){const n=`${i}?c=${e}${d(t)}`;return l(await o.A.get(n,void 0,a(n)),"Failed to load the conversation")}async function p(e,t){const n=`${i}?to=${e}${d(t)}`;return l(await o.A.get(n,void 0,a(n)),"Failed to open the conversation")}async function h(){const e=`${i}?settings=1`;return l(await o.A.get(e,void 0,a(e)),"Failed to load message settings").allow}async function u(e,t){return l(await o.A.post(i,e,a(i)),t)}async function g(e){const t={action:"send",c:e.conversationId??0,to:e.to??0,body:e.body,game:e.game};return e.origin&&(t.origin_kind=e.origin.kind,t.origin_id=e.origin.id),u(t,"Failed to send")}n.d(t,["Qx",0,e=>u({action:"ignore",c:e},"Failed to ignore"),"Ym",0,e=>u({action:"accept",c:e},"Failed to accept"),"ds",0,e=>u({action:"settings",allow:e},"Failed to save"),"sN",0,(e,t,n)=>u({action:"report",c:e,reason:t,note:n},"Failed to report"),"vs",0,e=>u({action:"read",c:e},"Failed to mark read")])},80649(e,t,n){n.d(t,{d:()=>x,y:()=>v});var r=n(60084),o=n(4738),i=n(55612),a=n(76052),l=n(12434),s=n(64833),d=n(87109),c=n(74079),p=n(91995),h=n(52464),u=n(85972),g=n(81616),m=n(62530);function f(e){const t=e&&"object"==typeof e?e:{},n=t.user&&"object"==typeof t.user?t.user:{};return(0,h.Gl)(t.twins),{...t,user:{...n,user_id:n.user_id??0,capabilities:n.capabilities??{},nickname:n.nickname??"",usermeta:n.usermeta??{}},collection:Array.isArray(t.collection)?t.collection:[],notifications:Array.isArray(t.notifications)?t.notifications:[],binders:Array.isArray(t.binders)?t.binders.map(e=>({id:Number(e.id),name:e.name,slug:e.slug??void 0,type:e.type,sort:Number(e.sort),public:Number(e.public??0)||0,count:null!=e.count?Number(e.count):void 0,color:(0,c.xf)(e.color),parent_id:(0,r.rp)(e.parent_id)})):[],activeBinderId:Number(t.activeBinderId)||0,binderCards:Array.isArray(t.binderCards)?t.binderCards:[],defaultBinderName:"string"==typeof t.defaultBinderName?t.defaultBinderName:null,defaultBinderColor:(0,c.xf)(t.defaultBinderColor)}}async function x(e){if(await(0,s.ZN)(),!window.DotGGUser){const e={user:{user_id:0,capabilities:{},nickname:"",user_registered:"",twitchID:"",accountCreated:"",usermeta:{}},collection:[],usercapabilities:{},notificationsts:[],notifications:[]};return u.Ab.updateState(e),g.Ab.updateState(e),e}if(function(){const e=a.Ar.getItem(`${l.Ay.TheGame}-collection`);if(!e)return!1;try{const t=JSON.parse(e);return Array.isArray(t)&&t.length>0}catch{return!1}}())try{const{didSync:e,syncedCount:t}=await async function(){const e=`${l.Ay.TheGame}-collection`,t=a.Ar.getItem(e);if(!t)return{didSync:!1,syncedCount:0};let n;try{n=JSON.parse(t)}catch{return a.Ar.removeItem(e),{didSync:!1,syncedCount:0}}if(!Array.isArray(n)||0===n.length)return a.Ar.removeItem(e),{didSync:!1,syncedCount:0};const r=n.map(e=>({card:e.card,standard:e.standard||"0",foil:e.foil||"0",trade:e.trade||"0",wish:e.wish||"0",trade_foil:e.trade_foil||"0",wish_foil:e.wish_foil||"0"})),s=`/cgfw/synclocalcollection?game=${l.Ay.TheGame.toLowerCase()}`;try{const t=await i.A.post(s,{items:r},{url:`https://api.dotgg.gg${s}`,headers:(0,o.z5)(),retry:!1});return t.error?(console.error("Sync failed:",t.error_text),{didSync:!1,syncedCount:0}):(a.Ar.removeItem(e),{didSync:!0,syncedCount:t.synced||0})}catch(e){return console.error("Failed to sync local collection:",e),{didSync:!1,syncedCount:0}}}();e&&t>0?(0,p.GF)(`Synced ${t} items from browser to your account!`,5e3):e&&(0,p.$S)("Browser data synced to your account",3e3)}catch(e){console.error("Failed to sync local collection:",e)}const t=l.Ay.TheGame,n=e?.commentsOnly?"&commentsOnly=1":"",r=`&source=${encodeURIComponent(function(){if("undefined"==typeof window)return"";const e=window.location.pathname;
1return/settings|\/edit/i.test(e)?e:`/${e.split("/").filter(Boolean)[0]??""}${"/"===e?"":"/"}`}())}`,c=`&binder_id=${(0,d.KJ)()}`,h=`/cgfw/getuserdata?game=${t.toLowerCase()}${n}${r}${c}${"dev"===l.Ay.mode?"&DebugSobakabarabaka=20":""}`,x=f(await i.A.get(h,void 0,{url:`https://api.dotgg.gg${h}`,headers:(0,o.z5)()}));return x.user&&+x.user.user_id>0?document.cookie="userHasCollection=1; max-age=86400":document.cookie="userHasCollection=0; max-age=86400",u.Ab.updateState(x),g.Ab.updateState(x),(0,m.WX)(x.user)&&function(){const e=window.adthrive;e?.cmd&&e.cmd.push(function(){e.disableAds?.(),e.disablePlaylistPlayers?.()}),document.body.classList.add("adthrive-disable-all");document.querySelectorAll(["[data-ad-unit]",".adthrive-ad",".adthrive-header",".adthrive-video-player",'[id^="adthrive"]'].join(",")).forEach(e=>e.remove())}(),x}async function v(e,t){const n=l.Ay.TheGame,r=t?.commentsOnly?"&commentsOnly=1":"",a=`/cgfw/getuserdata?game=${n.toLowerCase()}${r}`;return f(await i.A.post(a,{username:e},{url:`https://api.dotgg.gg${a}`,headers:(0,o.z5)()}))}},29155(e,t,n){n.d(t,{Ce:()=>d,K5:()=>l,Ky:()=>s});var r=n(4738),o=n(55612),i=n(76990),a=n(12434);async function l(e,t,n,l){const s="dev"===a.Ay.mode?(0,r.W2)(1):(0,r.W2)(10),d=`?page=${e}${n?`&source=${encodeURIComponent(n)}`:""}${void 0!==l?`&limit=${l}`:""}&cache=${s}`,c=await o.A.get(`/cgfw/getposts${d}`,void 0,{url:`https://api.dotgg.gg/cgfw/getposts${d}`});let p=Array.isArray(c)?c:[];return t&&(p=t.concat(p)),i._.updateState(p),p}async function s(e,t){const n=t?`&postTypes=${encodeURIComponent(t)}`:"",l=await o.A.get(`/do.php?cache=${(0,r.W2)(10)}&cmd=getboundposts&binding=${encodeURIComponent(e)}${n}&blogID=${a.Ay.BlogID}`,void 0,{url:`https://api.dotgg.gg/do.php?cmd=getboundposts&binding=${encodeURIComponent(e)}${n}&blogID=${a.Ay.BlogID}${"dev"===a.Ay.mode?"":`&cache=${(0,r.W2)(10)}`}`});return i._.updateState(l),l}async function d(){const e=await o.A.get(`/do.php?cmd=gettimedposts&blogID=${a.Ay.BlogID}&cache=${(0,r.W2)(10)}`,void 0,{url:`https://api.dotgg.gg/do.php?cmd=gettimedposts&blogID=${a.Ay.BlogID}&cache=${(0,r.W2)(10)}`});return i._.updateState(e),e}},93346(e,t,n){n.d(t,{v:()=>a});var r=n(4738),o=n(55612),i=n(12434);async function a(e,t={}){const n=`/cgfw/savebatchcollection?game=${i.Ay.TheGame.toLowerCase()}`,a={cards:e,...t.source?{source:t.source}:{},...t.label?{label:t.label}:{}};return await o.A.post(n,a,{url:`https://api.dotgg.gg${n}`,headers:(0,r.z5)(),keepalive:l(a),retry:!1})}function l(e){return new Blob([JSON.stringify(e)]).size<=48e3}n.d(t,["O",0,e=>!e.error&&((e.errors?.length??0)>0||void 0!==e.processed&&void 0!==e.total&&e.processed<e.total)])},51533(e,t,n){n.d(t,{s:()=>F});var r=n(60084),o=n(93346),i=n(91995);const a=new Set;function l(){a.forEach(e=>{try{e()}catch{}})}"undefined"!=typeof window&&(window.addEventListener("pagehide",l),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&l()}));var s=n(76052),d=n(12434);const c=[2e3,5e3,15e3,3e4],p=`${d.Ay.TheGame}-pending-saves`,h=new Map;let u=null,g=null,m=Promise.resolve();function f(e){return`${e.card}|${e.type}`}function x(){null!==u&&clearTimeout(u),u=setTimeout(k,800),null===g&&(g=setTimeout(k,2e3))}function v(){if("undefined"!=typeof localStorage)try{if(0===h.size)return void s.Ar.removeItem(p);const e=Array.from(h.values()).map(e=>({...e.args,ts:e.ts}));s.Ar.setItem(p,JSON.stringify(e))}catch{}}const y=["count","extra","trade","wish","source"];function w(e,t){const n={...e};return y.forEach(e=>{void 0!==t[e]&&Object.assign(n,{[e]:t[e]})}),n}async function b(e){return new Promise(t=>setTimeout(t,e))}function $(e){return Math.round(e*(.7+.6*Math.random()))}function k(){null!==u&&(clearTimeout(u),u=null),null!==g&&(clearTimeout(g),g=null),0!==h.size&&("undefined"!=typeof navigator&&!1===navigator.onLine||(m=m.then(async()=>{if(0===h.size)return;if("undefined"!=typeof navigator&&!1===navigator.onLine)return;const e=Array.from(h.values());h.clear(),v(),await async function(e){const t=function(e){return e.map(e=>{const t={card:e.args.card,type:e.args.type,...void 0!==e.args.count?{count:e.args.count}:{}};return void 0!==e.args.extra&&(t.extra="string"==typeof e.args.extra?e.args.extra:JSON.stringify(e.args.extra)),void 0!==e.args.trade&&(t.trade=e.args.trade),void 0!==e.args.wish&&(t.wish=e.args.wish),t})}(e);let n=null;for(let r=0;r<=c.length;r++){if("undefined"!=typeof navigator&&!1===navigator.onLine){n=new Error("offline");break}try{const n=e.every(e=>"scan"===e.args.source),r=await(0,o.v)(t,n?{source:"scan",label:"Camera scan"}:{source:"manual"});if(r.error)throw new Error(r.error_text||"Batch save failed");const a={error:!1,message:"OK"};
1e.forEach(e=>e.resolvers.forEach(e=>e(a)));const l=r.processed??t.length;return void(e.some(e=>e.resolvers.length>0)&&(0,i.GF)(1===l?"Collection synced":`Synced ${l} updates`))}catch(e){n=e,r<c.length&&await b($(c[r]))}}!function(e){e.forEach(e=>{const t=f(e.args),n=h.get(t);n?(n.args=w(e.args,n.args),n.ts=Math.min(n.ts,e.ts)):h.set(t,{args:e.args,resolvers:[],rejecters:[],ts:e.ts})}),v()}(e),e.forEach(e=>e.rejecters.forEach(e=>e(n))),(0,i.Ni)("Couldn't sync collection right now. We'll keep trying â your changes are saved locally.")}(e)})))}var Y;Y=k,a.add(Y),"undefined"!=typeof window&&window.addEventListener("online",()=>{h.size>0&&k()}),function(){if("undefined"!=typeof localStorage)try{const e=s.Ar.getItem(p);if(!e)return;const t=JSON.parse(e);if(!Array.isArray(t))return void s.Ar.removeItem(p);const n=Date.now()-6e5;t.forEach(({ts:e,...t})=>{if("number"!=typeof e||e<n)return;const r=f(t);h.has(r)||h.set(r,{args:t,resolvers:[],rejecters:[],ts:e})}),v(),h.size>0&&x()}catch{s.Ar.removeItem(p)}}();var A=n(87109),C=n(65562);async function F(e,t,n,o={}){const{extra:a,trade:l,wish:c,source:p}=o,u=window.DotGGUser&&!o.forceMainCollection&&void 0!==n?(0,A.KJ)():0;return 0!==u&&void 0!==n?(0,r.mJ)({binder_id:u,card:e,type:t,count:n,extra:a,source:p}).then(()=>((0,i.GF)("Binder synced"),{error:!1,message:"OK"})).catch(e=>((0,i.rQ)("Could not save to binder. Please try again.",3500),{error:!0,error_text:String(e)})):window.DotGGUser?(g={card:e,type:t,count:n,extra:a,trade:l,wish:c,source:p},new Promise((e,t)=>{const n=f(g),r=h.get(n);r?(r.args=w(r.args,g),r.ts=Date.now(),r.resolvers.push(e),r.rejecters.push(t)):h.set(n,{args:g,resolvers:[e],rejecters:[t],ts:Date.now()}),v(),x()})):function(e,t,n,r={}){const{extra:o,trade:a,wish:l}=r,c=`${d.Ay.TheGame}-collection`,p=s.Ar.getItem(c),h=p?JSON.parse(p):[],u=(0,C.GB)(h,{card:e,type:t,count:n,trade:a,wish:l}),g=void 0===o?u:u.map(t=>t.card===e?{...t,extra_data:o}:t);return s.Ar.setItem(c,JSON.stringify(g)),(0,i.rQ)("Collection saved locally. Log in to sync across devices.",4e3),{error:!1,message:"OK"}}(e,t,n,{extra:a,trade:l,wish:c});var g}},14510(e,t,n){n.d(t,{Y:()=>l,u:()=>s});var r=n(4738),o=n(55612),i=n(81616),a=n(12434);async function l(){const e=`/cgfw/gettrading?game=${a.Ay.TheGame.toLowerCase()}&cache=${(0,r.W2)(5)}`;let t=await o.A.get(e,void 0,{url:`https://api.dotgg.gg${e}`});return i.fm.updateState(t),t}async function s(e){const t=`/cgfw/gettradingcard?game=${a.Ay.TheGame.toLowerCase()}&cardID=${e}&cache=${(0,r.W2)(5)}`;return await o.A.get(t,void 0,{url:`https://api.dotgg.gg${t}`})}},64833(e,t,n){n.d(t,{MC:()=>p,Vd:()=>h,ZN:()=>c});var r=n(42823),o=n(55612),i=n(76052);const a="dotgg_user",l="dotgg_token",s="dotgg_relogin_at";let d=null;function c(){return d??=async function(){if("undefined"!=typeof window)if(void 0===window.DotGGUser||void 0===window.DotGGUserToken){if(!0===window.DotGGLoggedIn){const e=i.Ar.getItem(a),t=i.Ar.getItem(l),n=void 0===window.DotGGUser||String(window.DotGGUser)===e;return e&&t&&n?(window.DotGGUser??=Number(e),void(window.DotGGUserToken=t)):void await async function(){const e="/wp-admin/admin-ajax.php?action=dotgg_token_exchange",t=await o.A.post(e,void 0,{url:`${window.location.origin}${e}`,timeoutMs:1e4});t.user&&t.token&&(window.DotGGUser=Number(t.user),window.DotGGUserToken=String(t.token),p(t.user,t.token),window.dispatchEvent(new CustomEvent("dotgg:auth",{detail:{authed:!0,user_id:Number(t.user)}})))}()}if(!1===window.DotGGLoggedIn){const e=null!==i.Ar.getItem(a);h(),e&&function(){const e=Number(i.Ar.getItem(s)??0);return!Number.isFinite(e)||Date.now()-e>216e5}()&&(i.Ar.setItem(s,String(Date.now())),window.location.replace(`${(0,r.u)(window.location.href)}&silent=1`))}}else p(window.DotGGUser,window.DotGGUserToken)}().catch(()=>{}),d}function p(e,t){i.Ar.setItem(a,String(e)),i.Ar.setItem(l,t)}function h(){i.Ar.removeItem(a),i.Ar.removeItem(l)}},44260(e,t,n){n.d(t,{CQ:()=>m,Dp:()=>g,Ge:()=>s,PR:()=>p,e5:()=>h,eu:()=>c,go:()=>a,hm:()=>d,kg:()=>u,mh:()=>l});var r=n(4738),o=n(55612);const i="https://api.dotgg.gg";async function a(e,t,n=!1){return o.A.post("/do.php?cmd=twofa_login",{challenge:e,code:t,trust:n?"1":""},{url:`${i}/do.php?cmd=twofa_login`})}async function l(){return o.A.post("/do.php?cmd=twofa_status",{},{url:`${i}/do.php?cmd=twofa_status`,headers:(0,r.z5)()})}async function s(e){return o.A.post("/do.php?cmd=twofa_begin",{password:e},{url:`${i}/do.php?cmd=twofa_begin`,headers:(0,r.z5)()})}async function d(e){return o.A.post("/do.php?cmd=twofa_confirm",{code:e},{url:`${i}/do.php?cmd=twofa_confirm`,headers:(0,r.z5)()})}async function c(e,t){return o.A.post("/do.php?cmd=twofa_disable",{password:e,code:t},{url:`${i}/do.php?cmd=twofa_disable`,headers:(0,r.z5)()})}async function p(e,t){return o.A.post("/do.php?cmd=twofa_rotate_begin",{password:e,code:t},{url:`${i}/do.php?cmd=twofa_rotate_begin`,headers:(0,r.z5)()})}async function h(e){return o.A.post("/do.php?cmd=twofa_rotate_confirm",{code:e},{url:`${i}/do.php?cmd=twofa_rotate_confirm`,headers:(0,r.z5)()})}
1async function u(){return o.A.post("/do.php?cmd=twofa_rotate_cancel",{},{url:`${i}/do.php?cmd=twofa_rotate_cancel`,headers:(0,r.z5)()})}async function g(){return o.A.post("/do.php?cmd=twofa_devices",{},{url:`${i}/do.php?cmd=twofa_devices`,headers:(0,r.z5)()})}async function m(e){return o.A.post("/do.php?cmd=twofa_device_revoke",{id:e??"0"},{url:`${i}/do.php?cmd=twofa_device_revoke`,headers:(0,r.z5)()})}},37017(e,t,n){n.d(t,{A2:()=>s,Gq:()=>l,RW:()=>p,X7:()=>d,o$:()=>h,tb:()=>c});var r=n(4738),o=n(55612),i=n(76052);function a(e){return{url:`https://api.dotgg.gg${e}`,headers:(0,r.z5)()}}async function l(e){const t=await o.A.post("/auth/v2/register",e,a("/auth/v2/register"));if(t.error)throw new Error(t.error_text||"Registration failed");return t}async function s(e){const t=await o.A.post("/auth/v2/login",e,a("/auth/v2/login"));if(t.error)throw new Error(t.error_text||"Login failed");return t}async function d(e){const t=await o.A.post("/auth/v2/handoff",e,a("/auth/v2/handoff"));if(t.error)throw new Error(t.error_text||"Handoff failed");return t}async function c(e){const t=`/auth/v2/me?site=${encodeURIComponent(e)}`,n=await o.A.get(t,void 0,a(t));return n.error?null:n}function p(e){try{i.Ar.setItem("dotgg_user",String(e.user_id)),i.Ar.setItem("dotgg_token",e.token),i.Ar.setItem("dotgg_nick",e.nick),e.avatar&&i.Ar.setItem("dotgg_avatar",e.avatar),i.Ar.setItem("dotgg_site",e.site)}catch{}window.DotGGUser=e.user_id,window.DotGGUserToken=e.token,window.dispatchEvent(new CustomEvent("dotgg:auth",{detail:{authed:!0,user_id:e.user_id}}))}function h(){try{i.Ar.removeItem("dotgg_user"),i.Ar.removeItem("dotgg_token"),i.Ar.removeItem("dotgg_nick"),i.Ar.removeItem("dotgg_avatar"),i.Ar.removeItem("dotgg_site")}catch{}delete window.DotGGUser,delete window.DotGGUserToken,window.dispatchEvent(new CustomEvent("dotgg:auth",{detail:{authed:!1}}))}},87250(e,t,n){n.d(t,{r:()=>M});var r=n(10201),o=n(17402),i=n(63679),a=n(67390),l=n(54780),s=n(4738),d=n(12434);const c="dotgg:build-checked",p="dotgg:build-beaconed",h="dotgg:build-reloads";let u=!1;function g(e,t){try{return e?.getItem(t)??""}catch{return""}}function m(e,t,n){try{e?.setItem(t,n)}catch{}}function f(){return"undefined"==typeof window?void 0:window.localStorage}function x(){return"undefined"==typeof window?void 0:window.sessionStorage}function v(){const e=()=>{(async function(){if(""===d.jt)return;if("undefined"==typeof fetch)return;if("undefined"!=typeof navigator&&!1===navigator.onLine)return;const e=Date.now();if(e-(Number(g(f(),c))||0)<9e5)return;m(f(),c,String(e));const t=`https://api.dotgg.gg/buildver?cache=${(0,s.W2)(5)}`,n=await fetch(t,{credentials:"omit"});if(!n.ok)return;const r=await n.json();if(null===r||"object"!=typeof r)return;const o=r,i="string"==typeof o.b?o.b:"";if(""===i)return;const a="number"==typeof o.t?o.t:0,l=d.ff>0&&a>d.ff;l&&(u=!0),function(e,t,n){const r=(new Date).toISOString().slice(0,10),o=`${d.jt}|${e}|${r}|${t?1:0}`;if(g(f(),p)===o)return;if(m(f(),p,o),!t){if(n<=0)return;if(100*Math.random()>=n)return}const i=JSON.stringify({b:d.jt,d:e,g:d.Ay.TheGame,s:t?1:0,r:t?100:n});try{navigator.sendBeacon("https://api.dotgg.gg/buildbeacon",new Blob([i],{type:"text/plain"}))}catch{}}(i,l,"number"==typeof o.s?o.s:0)})().catch(()=>{})},t=window.requestIdleCallback;"function"==typeof t?t(e):window.setTimeout(e,3e3)}const y=({toast:e,onClose:t})=>{const[n,i]=(0,o.J0)(null),[a,l]=(0,o.J0)(!1),s=(0,o.li)(null),d=(0,o.li)(null);return(0,o.vJ)(()=>{if(s.current&&clearTimeout(s.current),d.current&&clearTimeout(d.current),e&&e.id!==n?.id){i(e),l(!0);const n=e.duration||3e3;s.current=setTimeout(()=>{l(!1),d.current=setTimeout(()=>{i(null),t()},300)},n)}return()=>{s.current&&clearTimeout(s.current),d.current&&clearTimeout(d.current)}},[e?.id]),n?(0,r.FD)(k,{$visible:a,$type:n.type,children:[(0,r.Y)(Y,{$type:n.type,children:w(n.type)}),(0,r.Y)(A,{children:n.message}),(0,r.Y)(C,{onClick:()=>{l(!1),setTimeout(()=>{i(null),t()},300)},children:"Ã"})]}):null};function w(e){switch(e){case"success":return"â";case"error":return"â";case"warning":return"â ";case"info":return"â¹"}}const b=i.i7` 2 from { 3 transform: translateY(-100%); 4 opacity: 0; 5 } 6 to { 7 transform: translateY(0); 8 opacity: 1; 9 } 10`,$=i.i7` 11 from { 12 transform: translateY(0); 13 opacity: 1; 14 } 15 to { 16 transform: translateY(-100%); 17 opacity: 0; 18 } 19`,k=i.Ay.div` 20 position: fixed; 21 top: 20px; 22 right: 20px; 23 z-index: 10000; 24 display: flex; 25 align-items: center; 26 gap: 12px; 27 padding: 12px 16px; 28 border-radius: 8px; 29 box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); 30 min-width: 280px; 31 max-width: 400px; 32 animation: ${e=>e.$visible?b:$} 0.3s ease-in-out; 33 background: ${e=>{switch(e.$type){case"success":return"linear-gradient(135deg, #28a745 0%, #20c997 100%)";case"error":return"linear-gradient(135deg, #dc3545 0%, #c82333 100%)";case"warning":return"linear-gradient(135deg, #ffc107 0%, #e0a800 100%)";case"info":return"linear-gradient(135deg, #17a2b8 0%, #138496 100%)"}}}; 34 color: ${e=>"warning"===e.$type?"#000":"#fff"}; 35 36 @media (max-width: 600px) { 37 left: 20px; 38 right: 20px; 39 min-width: auto; 40 } 41`,Y=i.Ay.div` 42 font-size: 20px; 43 font-weight: bold; 44 width: 24px; 45 height: 24px; 46 display: flex; 47 align-items: center; 48 justify-content: center; 49 border-radius: 50%; 50 background: ${e=>"warning"===e.$type?"rgba(0, 0, 0, 0.1)":"rgba(255, 255, 255, 0.2)"}; 51 flex-shrink: 0; 52`,A=i.Ay.div` 53 flex: 1; 54 font-size: 14px; 55 line-height: 1.4; 56 font-weight: 500; 57`,C=i.Ay.button` 58 background: transparent; 59 border: none; 60 color: inherit; 61 font-size: 24px; 62 line-height: 1; 63 cursor: pointer; 64 padding: 0; 65 width: 24px; 66 height: 24px; 67 display: flex; 68 align-items: center; 69 justify-content: center; 70 opacity: 0.7; 71 transition: opacity 0.2s; 72 flex-shrink: 0; 73 74 &:hover { 75 opacity: 1; 76 } 77`;var F=n(91995),D=n(4150),S=n(28297);const I=()=>{const e=(0,F.v4)();return o.Ay.useEffect(()=>{(0,F.RM)(e)},[e]),(0,r.Y)(y,{toast:e.toast,onClose:e.hideToast})},z=()=>(o.Ay.useEffect(()=>function(){if("undefined"==typeof window||""===d.jt)return()=>{};v();const e=()=>{"visible"===document.visibilityState&&v()};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)}(),[]),null),T=()=>(o.Ay.useEffect(()=>(0,l.k4)(),[]),null),E=i.DU` 78 :root { 79 ${l.h7}: calc(8px + var(${l.d0}, 0px)); 80 } 81 @media only screen and ${S.E0} { 82 [id^="rootOfProContent"] { 83 padding-bottom: var(${l.h7}); 84 } 85 } 86`;function L(e){return"/"===d.Ay.BASE_FOLDER?e:o.Ay.Children.map(e,e=>function(e){if(null===e||"object"!=typeof e||!("props"in e))return!1;const t=e.props;return"object"==typeof t&&null!==t&&"path"in t&&"string"==typeof t.path}(e)&&e.props.path.startsWith("/")?o.Ay.cloneElement(e,{path:`${d.Ay.BASE_FOLDER}${e.props.path.slice(1)}`}):e)}const M=({children:e})=>{const t=function(){const e=o.Ay.useRef(!0);return o.Ay.useCallback(()=>{e.current?e.current=!1:function(){if(!u)return!1;if("undefined"==typeof window)return!1;const e=Number(g(x(),h))||0;e>=1||(m(x(),h,String(e+1)),window.location.reload())}()},[])}();return(0,r.Y)(i.ID,{children:(0,r.FD)(F.Z0,{children:[(0,r.Y)(I,{}),(0,r.Y)(z,{}),(0,r.Y)(T,{}),(0,r.Y)(E,{}),(0,r.Y)(a.Ay,{onChange:t,children:L(e)}),(0,r.Y)(D.Vy,{})]})})}},23328(e,t,n){n.d(t,{To:()=>f,g_:()=>m,tB:()=>x});var r=n(10201),o=n(14730),i=n(24567);let a=null;const l=()=>{a?.(),a=null},s=e=>{if(l(),null===document.body)return;let t=0,n=0;const r=()=>{n=0;const r=document.getElementById(e);null!==r&&((e=>{const t=e.getBoundingClientRect().top+window.scrollY-(e=>{const t=Number.parseFloat(getComputedStyle(e).scrollMarginTop);return Number.isFinite(t)&&t>0?t:Math.max((()=>{const e=Math.round(window.innerWidth/2);let t=0;for(const n of[1,3])for(const r of document.elementsFromPoint(e,n)){const e=getComputedStyle(r).position;if("fixed"!==e&&"sticky"!==e)continue;const n=r.getBoundingClientRect();n.top<=2&&n.bottom>t&&n.bottom<window.innerHeight/2&&(t=n.bottom)}return t})(),56)+16})(e);window.scrollTo({top:Math.max(0,t),behavior:"auto"})})(r),0===t?t=Date.now():Date.now()-t>1200&&l())},o=new MutationObserver(()=>{0===n&&(n=window.requestAnimationFrame(r))}),i=window.setTimeout(l,1e4),s={passive:!0};window.addEventListener("wheel",l,s),window.addEventListener("touchstart",l,s),window.addEventListener("keydown",l,s),a=()=>{o.disconnect(),window.clearTimeout(i),0!==n&&window.cancelAnimationFrame(n),window.removeEventListener("wheel",l),window.removeEventListener("touchstart",l),window.removeEventListener("keydown",l)},o.observe(document.body,{childList:!0,subtree:!0}),r()};var d=n(69036),c=n(75835),p=n(9299),h=n(4738);function u(e,t){const n=e.dataset.game;if(!n||n===t)return!1;const r=window.DOTGG_GAMES;return null!=r&&Object.prototype.hasOwnProperty.call(r,n)}var g=n(89629);const m=e=>"1"===e,f=(e,t)=>{if(void 0===e||""===e)return t;const n=Number(e);return Number.isFinite(n)?n:t};function x(e){(0,i.K)("entry"),document.addEventListener("DOMContentLoaded",()=>{(0,g.k0)(),(0,i.K)("dom"),(()=>{if("undefined"==typeof window)return;const e=e=>{const t=(e=>{if(!e.startsWith("#")||e.length<2)return"";const t=e.slice(1);let n=t;try{n=decodeURIComponent(t)}catch{}return/[=&/?]/.test(n)?"":n})(window.location.hash);""!==t?null===document.getElementById(t)&&(e&&window.scrollY>10||s(t)):l()};e(!0),window.addEventListener("hashchange",()=>e(!1))})(),(async()=>{await(e.load?.()),(0,i.K)("loaded"),(0,d.pc)(e.gameKey);const t=(0,c.L)(e.gameKey,e.router);!function({gameKey:e,embeddings:t,alwaysMount:n,renderEmbed:i}){if(void 0===t||void 0===i)return;const a=new Set(n??[]);for(const n of t)for(const t of v(e,n)){if(u(t,e))continue;const l=t.dataset[y(n)],s=t.dataset.atts;(l||s||a.has(n))&&(0,o.Hr)(t).render((0,r.Y)(p.t,{justhide:!0,children:i({embedding:n,embedData:l,embedAtts:s,parsedAtts:w(s)})}))}}(e),t?(0,i.K)("router"):(0,i.K)("embeds")})().catch(t=>{(0,g.N7)(t,`boot:${e.gameKey}`)})})}function v(e,t){let n=document.getElementsByClassName(`RootOfEmbedded${t}`);return 0===n.length&&(n=document.getElementsByClassName(`RootOfEmbedded${(0,h.g3)(e)}-${t.toLowerCase()}`)),[...n].filter(e=>e instanceof HTMLElement)}function y(e){return e.toLowerCase().replace(/-([a-z0-9])/g,(e,t)=>t.toUpperCase())}function w(e){if(void 0===e||""===e)return{};let t;try{t=JSON.parse(e)}catch{return{}}if("object"!=typeof t||null===t)return{};const n={};for(const[e,r]of Object.entries(t))"string"==typeof r?n[e]=r:"number"!=typeof r&&"boolean"!=typeof r||(n[e]=String(r));return n}},24567(e,t,n){function r(e){"undefined"!=typeof document&&(window.__dotggBoot=e,document.documentElement.dataset.dotggBoot=e)}n.d(t,{K:()=>r})}
86,54780(e,t,n){n.d(t,{k4:()=>l});const r="--dotgg-bottom-obstruction",o=".adthrive-sticky.adthrive-footer, [id^='AdThrive_Footer']";let i=!1,a=-1;function l(){if(i||"undefined"==typeof window||"undefined"==typeof document)return;i=!0;let e=!1;const t=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1,function(){const e=function(){const e=window.innerHeight;let t=0;return document.querySelectorAll(o).forEach(n=>{const r=getComputedStyle(n);if("none"===r.display||"hidden"===r.visibility||"fixed"!==r.position)return;const o=n.getBoundingClientRect();o.height<=0||o.width<=0||o.bottom<e-2||(t=Math.max(t,Math.min(o.height,e-o.top)))}),Math.round(t)}();e!==a&&(a=e,document.documentElement.style.setProperty(r,`${e}px`))}()}))},n="undefined"!=typeof ResizeObserver?new ResizeObserver(t):null,l=new WeakSet,s=()=>{document.querySelectorAll(o).forEach(e=>{l.has(e)||(l.add(e),n?.observe(e))}),t()};new MutationObserver(e=>{let t=!1;for(const n of e)if(n.removedNodes.length>0&&(t=!0),n.addedNodes.forEach(e=>{e instanceof Element&&(e.matches(o)||e.querySelector(o))&&(t=!0)}),t)break;t&&s()}).observe(document.body,{childList:!0,subtree:!0}),window.addEventListener("resize",t),window.visualViewport?.addEventListener("resize",t),s()}n.d(t,["d0",0,r,"h7",0,"--dotgg-page-reserve"])},40131(e,t,n){n.d(t,{F$:()=>s,Yn:()=>l,aG:()=>d});var r=n(97525),o=n(52536),i=n(81616);const a=new Map;function l(e){return i.fS[e]?.getState().nonEmpty()??!1}async function s(e){const t=i.fS[e];if(void 0===t||t.getState().nonEmpty())return;const n=a.get(e);if(n)return await n;const l=(0,o.u)(`gacha:${e}`,()=>(0,r.vb)("getgacha",t,`type=${e}`)).finally(()=>a.delete(e));a.set(e,l),await l}async function d(e){for(const t of e)await s(t)}},85724(e,t,n){n.d(t,{Q:()=>l});var r=n(97525),o=n(52536),i=n(70165),a=n(81616);async function l(){for(const e of i.yD.gachaApiToLoad){const t=a.fS[e];void 0!==t&&await(0,o.u)(`gacha:${e}`,()=>(0,r.vb)("getgacha",t,`type=${e}`))}}},52536(e,t,n){n.d(t,{u:()=>o});var r=n(89629);async function o(e,t,n={}){const o=n.timeoutMs??2e4;try{return await(i=t(),a=o,new Promise((e,t)=>{const n="undefined"!=typeof document;let r=n&&"hidden"===document.visibilityState;const o=()=>{"hidden"===document.visibilityState&&(r=!0)};n&&document.addEventListener("visibilitychange",o);const l=()=>{n&&document.removeEventListener("visibilitychange",o)},s=setTimeout(()=>{l(),t(new Error(function(e,t){return`timeout after ${e}ms (${["bg="+(t?1:0),"online="+("undefined"!=typeof navigator&&!1===navigator.onLine?0:1),"prerender="+("undefined"!=typeof document&&!0===document.prerendering?1:0)].join(" ")})`}(a,r)))},a);i.then(t=>{clearTimeout(s),l(),e(t)},e=>{clearTimeout(s),l(),t(e)})}))}catch(t){return(0,r.N7)(t,`boot:${e}`),console.warn(`[boot] step "${e}" failed; continuing without it`,t),n.fallback}var i,a}},69036(e,t,n){n.d(t,{pc:()=>a});var r=n(12434);function o(e){const t=r.Ay.BASE_FOLDER;return(e.startsWith(t)?e.slice(t.length):e.replace(/^\/+/,"")).split("/")[0]??""}let i=!1;function a(e){!function(e){const t=document.getElementById(e);t&&document.querySelectorAll("a[href]").forEach(e=>{if(t.contains(e))return;if(e.hasAttribute("data-native"))return;const n=e.getAttribute("href");!n||n.startsWith("http")||n.startsWith("//")||n.startsWith("#")||n.startsWith("mailto:")||n.startsWith("tel:")||e.setAttribute("data-native","")})}(`rootOfProContent${e}`),i||(i=!0,window.addEventListener("click",e=>{if(0!==e.button||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)return;const t=e.target instanceof Element?e.target.closest("a[href]"):null;if(!t||t.hasAttribute("data-native")||t.hasAttribute("native"))return;const n=t.getAttribute("href")??"";n.startsWith("/")&&!n.startsWith("//")&&o(new URL(n,window.location.href).pathname)!==o(window.location.pathname)&&t.setAttribute("data-native","")},!0))}},75835(e,t,n){n.d(t,{L:()=>o});var r=n(14730);function o(e,t){const n=window.DOTGG_GAME?.TheGame;if(n!==e)return!1;const o=document.getElementById(`rootOfProContent${e}`);return!!o&&((0,r.Hr)(o).render(t),!0)}},23732(e,t,n){n.d(t,{g:()=>I});var r=n(10201),o=n(23328),i=n(35791),a=n(84668);const l=(0,a.A)({loader:async()=>await Promise.all([n.e(5434),n.e(7449),n.e(5730),n.e(8879),n.e(9268)]).then(n.bind(n,71721)),loading:()=>(0,r.Y)(i.W,{}),render(e,t){const n=e.AutomaticTierList;return(0,r.Y)(n,{format:t.format,embed:!0})}});var s=n(17402),d=n(63679),c=n(623);const p=({height:e="40px"})=>(0,r.Y)(h,{"data-skeleton-type":"card-embed",$height:e,children:(0,r.Y)(u,{})}),h=d.I4.span` 87 display: inline-flex; 88 align-items: center; 89 gap: 6px; 90 height: ${e=>e.$height}; 91 ${c.aE} 92 ${c.Xj} 9350% { 94 opacity: 0.7; 95 } 96 }
97`,u=d.I4.span` 98 display: inline-block; 99 width: 120px; 100 height: 20px; 101 background: var(--theme-palette-color-6, #2a2a2a); 102 border-radius: 4px; 103 position: relative; 104 overflow: hidden; 105 106 &::after { 107 content: ""; 108 position: absolute; 109 top: 0; 110 left: -100%; 111 width: 100%; 112 height: 100%; 113 background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent); 114 animation: skeletonShimmer 2s infinite; 115 } 116100% { 117 left: 100%; 118 } 119 } 120`,g=(0,a.A)({loader:async()=>await n.e(9404).then(n.bind(n,69404)),loading:()=>(0,r.Y)(p,{}),render(e,t){const n=e.CardEmbed;return(0,r.Y)(n,{...t})}});var m=n(17705);const f=(0,a.A)({loader:async()=>await n.e(9459).then(n.bind(n,79459)),loading:()=>(0,r.Y)(m.k,{}),render(e,t){const n=e.CardPriceChartEmbed;return(0,r.Y)(n,{...t})}}),x=({height:e="400px",cardCount:t=8})=>(0,r.Y)(v,{"data-skeleton-type":"cards-grid-embed",$height:e,children:(0,r.Y)(y,{children:Array.from({length:t}).map((e,t)=>(0,r.Y)(w,{},t))})}),v=d.I4.div` 121 width: 100%; 122 min-height: ${e=>e.$height}; 123 ${c.aE} 124 ${c.Xj} 12550% { 126 opacity: 0.7; 127 } 128 } 129`,y=d.I4.div` 130 display: grid; 131 grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); 132 gap: 10px; 133 width: 100%; 134 135 @media only screen and (max-width: 700px) { 136 grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); 137 gap: 8px; 138 } 139`,w=d.I4.div` 140 aspect-ratio: 0.72; 141 background: var(--theme-palette-color-6, #2a2a2a); 142 border-radius: 8px; 143 position: relative; 144 overflow: hidden; 145 146 &::after { 147 content: ""; 148 position: absolute; 149 top: 0; 150 left: -100%; 151 width: 100%; 152 height: 100%; 153 background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent); 154 animation: skeletonShimmer 2s infinite; 155 } 156100% { 157 left: 100%; 158 } 159 } 160`,b=(0,a.A)({loader:async()=>await Promise.all([n.e(53),n.e(116),n.e(3202),n.e(3195)]).then(n.bind(n,28153)),loading:()=>(0,r.Y)(x,{}),render(e,t){const n=e.CardsEmbed;return(0,r.Y)(n,{...t})}});var $=n(55367),k=n(59543);const Y=(0,a.A)({loader:async()=>await Promise.all([n.e(53),n.e(9315),n.e(1546),n.e(8957),n.e(920)]).then(n.bind(n,60920)),loading:()=>(0,r.Y)(k.C,{}),render(e,t){const n=e.DeckEmbed;return(0,r.Y)(n,{...t})}}),A=e=>{const[t,n]=(0,s.J0)(!1);return t?(0,r.Y)(Y,{...e}):(0,r.Y)($.A,{wide:!0,rootMargin:$.d,onChange:e=>e&&n(!0),children:(0,r.Y)(k.C,{})})};
160var C=n(64546);const F=(0,a.A)({loader:async()=>await Promise.all([n.e(9315),n.e(4114),n.e(5341),n.e(8098)]).then(n.bind(n,78098)),loading:()=>(0,r.Y)(C.l,{}),render(e,t){const n=e.DecksContentEmbed;return(0,r.Y)(n,{...t})}}),D=(0,a.A)({loader:async()=>await Promise.all([n.e(53),n.e(9315),n.e(1546),n.e(8957),n.e(5434),n.e(7449),n.e(471),n.e(1803),n.e(8879),n.e(3595)]).then(n.bind(n,11803)),loading:()=>(0,r.Y)(i.W,{}),render(e,t){const n=e.AutomaticMeta;return(0,r.Y)(n,{...t})}}),S=(0,a.A)({loader:async()=>await Promise.all([n.e(8879),n.e(9321)]).then(n.bind(n,99321)),loading:()=>(0,r.Y)(m.k,{height:"200px"}),render(e,t){const n=e.PriceCarousel;return(0,r.Y)(n,{...t})}});function I({embedding:e,embedData:t,embedAtts:n,parsedAtts:i},{findCard:a}={}){switch(e){case"Card":return(0,r.Y)(g,{cardEmbedAtts:n,cardDirectId:t,findCardCallback:a});case"Cards":return(0,r.Y)(b,{filter:t});case"Cardsfilter":return(0,r.Y)(b,{filter:t,mode:"filter",showfilter:n?(0,o.g_)(i.showfilter):void 0});case"Deck":return(0,r.Y)(A,{slug:t??""});case"Cardprice":return(0,r.Y)(f,{CardID:t??"",showCards:(0,o.g_)(i.showcards),limitdate:i.limitdate,findCardCallback:a});case"Homedecks":return(0,r.Y)(F,{count:t?(0,o.To)(t,8):(0,o.To)(i.count,8),requestOverride:i.filter??""});case"Homeprices":return(0,r.Y)(S,{});case"Homemeta":return(0,r.Y)(D,{embed:!0,format:t,count:(0,o.To)(i.count,4)});case"Tierlist":return(0,r.Y)(l,{format:t});default:return(0,r.Y)(r.FK,{})}}},95205(e,t,n){n.d(t,{w:()=>T});var r=n(10201),o=(n(23328),n(21591)),i=(n(17402),n(63679)),a=n(12434),l=n(623);const s={endfield:"200px",zenless:"200px",wuthering:"200px"},d=({height:e,count:t=6})=>{const n=e??(()=>{const e=a.Ay.TheGame?.toLowerCase()||"";return s[e]||"300px"})();return(0,r.Y)(c,{"data-skeleton-type":"character-grid-embed",$height:n,children:(0,r.Y)(p,{children:Array.from({length:t}).map((e,t)=>(0,r.FD)(h,{children:[(0,r.Y)(u,{}),(0,r.Y)(g,{})]},t))})})},c=i.I4.div` 161 width: 100%; 162 min-height: ${e=>e.$height}; 163 ${l.aE} 164 ${l.Xj} 16550% { 166 opacity: 0.7; 167 } 168 } 169`,p=i.I4.div` 170 display: grid; 171 grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); 172 gap: 12px; 173 width: 100%; 174 175 @media only screen and (max-width: 700px) { 176 grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); 177 gap: 8px; 178 } 179`,h=i.I4.div` 180 display: flex; 181 flex-direction: column; 182 align-items: center; 183 gap: 8px; 184`,u=i.I4.div` 185 width: 80px; 186 height: 80px; 187 background: var(--theme-palette-color-6, #2a2a2a); 188 border-radius: 50%; 189 position: relative; 190 overflow: hidden; 191 192 &::after { 193 content: ""; 194 position: absolute; 195 top: 0; 196 left: -100%; 197 width: 100%; 198 height: 100%; 199 background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent); 200 animation: skeletonShimmer 2s infinite; 201 } 202100% { 203 left: 100%; 204 } 205 } 206 207 @media only screen and (max-width: 700px) { 208 width: 60px; 209 height: 60px; 210 } 211`,g=i.I4.div` 212 width: 70px; 213 height: 14px; 214 background: var(--theme-palette-color-6, #2a2a2a); 215 border-radius: 4px; 216`;var m=n(84668);const f=(0,m.A)({loader:async()=>await n.e(1075).then(n.bind(n,71075)),loading:()=>(0,r.Y)(d,{}),render(e,t){const n=e.CharacterGridEmbed;return(0,r.Y)(n,{elType:t.elType??"characters"})}}),x=({count:e})=>(0,r.FD)(r.FK,{children:[(0,r.Y)(v,{"data-skeleton-type":"gacha-grid-embed",children:Array.from({length:e}).map((e,t)=>(0,r.Y)(y,{},t))}),(0,r.Y)(w,{})]}),v=i.I4.div` 217 display: grid; 218 grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); 219 gap: 12px; 220 padding-top: 20px; 221 width: 100%; 222 ${l.aE} 223 ${l.Xj} 224 225 @media only screen and (max-width: 700px) { 226 grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); 227 padding-top: 10px; 228 } 229`,y=i.I4.div` 230 height: 115px; 231 background: var(--theme-palette-color-6, #2a2a2a); 232 border-radius: 8px; 233 ${l.Rs} 234`,w=i.I4.div` 235 height: 20px; 236`,b=(0,m.A)({loader:async()=>await n.e(8337).then(n.bind(n,8337)),loading:e=>{const t=void 0===(n=e.filter)?0:n.split(",").filter(e=>""!==e.trim()).length;var n;return t>0?(0,r.Y)(x,{count:t}):(0,r.Y)(d,{})},render(e,t){const n=e.GridEmbed;return(0,r.Y)(n,{...t})}}),$=(0,m.A)({loader:async()=>await n.e(7782).then(n.bind(n,37782)),loading:()=>(0,r.Y)(d,{count:1,height:"120px"}),render(e,t){const n=e.ItemEmbed;return(0,r.Y)(n,{...t})}}),k=({height:e="400px"})=>(0,r.FD)(Y,{"data-skeleton-type":"team-embed",$height:e,children:[(0,r.FD)(A,{children:[(0,r.Y)(C,{}),(0,r.Y)(F,{})]}),(0,r.Y)(D,{children:Array.from({length:6}).map((e,t)=>(0,r.Y)(S,{},t))}),(0,r.Y)(I,{})]}),Y=i.I4.div` 237 width: 100%; 238 min-height: ${e=>e.$height}; 239 display: flex; 240 flex-direction: column; 241 gap: 15px; 242 padding: 15px; 243 background: var(--theme-palette-color-6, #1a1a1a); 244 border-radius: 8px; 245 ${l.aE} 246 ${l.Xj} 24750% { 248 opacity: 0.7; 249 } 250 } 251`,A=i.I4.div` 252 display: flex; 253 justify-content: space-between; 254 align-items: center; 255`,C=i.I4.div` 256 width: 200px; 257 height: 28px; 258 background: var(--theme-palette-color-7, #252525); 259 border-radius: 4px; 260`,F=i.I4.div` 261 width: 60px; 262 height: 24px; 263 background: var(--theme-palette-color-7, #252525); 264 border-radius: 4px; 265`,D=i.I4.div` 266 display: flex; 267 gap: 15px; 268 flex-wrap: wrap; 269 justify-content: center; 270`,S=i.I4.div` 271 width: 80px; 272 height: 100px; 273 background: var(--theme-palette-color-7, #252525); 274 border-radius: 8px; 275 position: relative; 276 overflow: hidden; 277 278 &::after { 279 content: ""; 280 position: absolute; 281 top: 0; 282 left: -100%; 283 width: 100%; 284 height: 100%; 285 background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent); 286 animation: skeletonShimmer 2s infinite; 287 } 288100% { 289 left: 100%; 290 } 291 } 292`,I=i.I4.div` 293 width: 100%; 294 height: 60px; 295 background: var(--theme-palette-color-7, #252525); 296 border-radius: 4px; 297`,z=(0,m.A)({loader:async()=>await Promise.all([n.e(1704),n.e(4578)]).then(n.bind(n,14578)),loading:()=>(0,r.Y)(k,{}),render(e,t){const n=e.TeamEmbed;return(0,r.Y)(n,{...t})}});function T({embedding:e,embedData:t,embedAtts:n,parsedAtts:i},{defaultElementType:a="characters"}={}){switch(e){case"Grid":return(0,r.Y)(b,{filter:t});case"Item":return(0,r.Y)($,{itemEmbedAtts:n,itemDirectId:t});case"Team":return(0,r.Y)(z,{slug:t??""});case"Homecharacters":return(0,r.Y)(f,{elType:(0,o.r)(i.type)??a});default:return(0,r.Y)(r.FK,{})}}},32613(e,t,n){n.d(t,{Z:()=>d});var r=n(10201),o=(n(17402),n(63679)),i=n(623);const a=()=>(0,r.Y)(l,{"data-skeleton-type":"qrcode",children:(0,r.Y)(s,{})}),l=(0,o.I4)(i.ls)` 298 min-height: 300px; 299 align-items: center; 300 justify-content: center; 301`,s=o.I4.div` 302 width: 256px; 303 height: 256px; 304 background: var(--theme-palette-color-6, #2a2a2a); 305 border-radius: 8px; 306 ${i.Rs} 307`,d=(0,n(84668).A)({loader:async()=>await n.e(2451).then(n.bind(n,32451)),loading:()=>(0,r.Y)(a,{}),render(e,t){const n=e.default;return(0,r.Y)(n,{...t})}})},74944(e,t,n){var r=n(10201),o=n(17402),i=n(63679),a=n(37017),l=n(70526),s=n(64083),d=n(97205),c=n(9019);const p=()=>({email:"",password:"",nick:"",acceptedTerms:!1}),h=i.I4.div` 308 display: flex; 309 flex-direction: column; 310 gap: 16px; 311 ${({$card:e})=>e?"\n max-width: 480px;\n margin: 0 auto;\n padding: 24px;\n background: var(--theme-palette-color-8, #fff);\n border: 1px solid var(--theme-palette-color-6, rgba(0, 0, 0, 0.08));\n border-radius: 8px;\n box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);\n ":""} 312`,u=i.I4.div` 313 display: flex; 314 border-bottom: 1px solid var(--theme-palette-color-5, rgba(0, 0, 0, 0.1)); 315`,g=i.I4.button` 316 background: transparent; 317 border: 0; 318 padding: 12px 16px; 319 font-size: 14px; 320 font-weight: 600; 321 cursor: pointer;
322 color: var(--theme-palette-color-2, inherit); 323 opacity: ${e=>e.$active?1:.5}; 324 border-bottom: 2px solid ${e=>e.$active?"var(--paletteColor1, #2563eb)":"transparent"}; 325`,m=i.I4.div` 326 min-height: 65px; 327 display: flex; 328 justify-content: center; 329`,f=i.I4.div` 330 display: flex; 331 justify-content: center; 332 padding-top: 8px; 333`,x=i.I4.button` 334 background: var(--paletteColor1, #2563eb); 335 color: var(--theme-palette-color-4, #fff); 336 border: 0; 337 border-radius: 6px; 338 padding: 10px 20px; 339 font-size: 14px; 340 font-weight: 600; 341 cursor: pointer; 342 &:disabled { opacity: 0.6; cursor: not-allowed; } 343 &:hover:not(:disabled) { background: var(--paletteColor2, #1d4ed8); } 344`;n.d(t,["v",0,({site:e,turnstileSiteKey:t,onSuccess:n,mode:i="both",bare:v=!1})=>{const y="register"===i?"register":"login",[w,b]=(0,o.J0)(y),$="both"===i,[k,Y]=(0,o.J0)(""),[A,C]=(0,o.J0)(""),[F,D]=(0,o.J0)(p),[S,I]=(0,o.J0)(null),z=(e,t="error")=>I({text:e,kind:t}),T=e=>{b(e),I(null)},E=(0,o.li)(null),L=(0,o.li)(null),M=(0,o.li)(""),[N,P]=(0,o.J0)(!1);(0,o.vJ)(()=>{if("register"!==w||!t||!E.current)return;let e=!1;const n=E.current;return(0,l.n)().then(()=>{!e&&window.turnstile&&n&&(L.current=window.turnstile.render(n,{sitekey:t,callback:e=>{M.current=e},"expired-callback":()=>
344{M.current=""},"error-callback":()=>{M.current=""},theme:"auto"}))}).catch(()=>z("Captcha failed to load.")),()=>{e=!0,L.current&&window.turnstile&&(window.turnstile.remove(L.current),L.current=null),M.current=""}},[w,t]);const O=async()=>{if(!N)if(k&&A){z("Logging you in...","info"),P(!0);try{const t=await(0,a.A2)({site:e,email:k.trim(),password:A});(0,a.RW)(t),n()}catch(e){z(e instanceof Error?e.message:"Login failed.")}finally{P(!1)}}else z("Email and password required.")},_="login"===w?"Log in":"Create account",R="login"===w?O:async()=>{if(!N)if(F.password.length<8)z("Password must be at least 8 characters.");else if(F.acceptedTerms)if(!t||M.current){z("Creating your account...","info"),P(!0);try{const t=await(0,a.Gq)({site:e,email:F.email.trim(),password:F.password,nick:F.nick.trim(),captcha_token:M.current});(0,a.RW)(t),n()}catch(e){z(e instanceof Error?e.message:"Registration failed."),L.current&&window.turnstile&&(window.turnstile.reset(L.current),M.current="")}finally{P(!1)}}else z("Please complete the captcha.");else z("Please accept the terms before registering.")};return(0,r.FD)(h,{$card:!v,children:[$&&(0,r.FD)(u,{children:[(0,r.Y)(g,{$active:"login"===w,onClick:()=>T("login"),type:"button",children:"Log in"}),(0,r.Y)(g,{$active:"register"===w,onClick:()=>T("register"),type:"button",children:"Register"})]}),"login"===w?(0,r.Y)(d.Q,{login:k,password:A,onLoginChange:Y,onPasswordChange:C,onEnterKey:()=>{O()}}):(0,r.FD)(r.FK,{children:[(0,r.Y)(c.s,{formData:F,onFormChange:D}),t&&(0,r.Y)(m,{ref:E})]}),(0,r.Y)(s.C,{message:S}),(0,r.Y)(f,{children:(0,r.Y)(x,{type:"button",onClick:R,disabled:N,children:_})})]})}])},34139(e,t,n){n.d(t,{rX:()=>s});var r=n(10201),o=(n(17402),n(98626)),i=n(54155);const a="notifications";function l(e){const t=e.split(/\s+/).filter(Boolean);return(t.length>1?`${t[0]?.[0]??""}${t[1]?.[0]??""}`:e.slice(0,2)).toUpperCase()}function s(){return null!==(0,o.Z)(a)}n.d(t,["GZ",0,({items:e,phone:t})=>0===e.length?null:(0,r.FD)(i.C4,{$phone:t,children:[!t&&(0,r.Y)("em",{children:"Elsewhere"}),e.map(e=>(0,r.FD)(i.vu,{href:`${e.url}${e.url.includes("?")?"&":"?"}${a}=1`,"data-native":"","aria-label":`${e.label}: ${e.unseen} new`,$phone:t,children:[e.icon?(0,r.Y)("img",{src:e.icon,alt:"",width:20,height:20,loading:"lazy"}):(0,r.Y)("i",{"aria-hidden":"true",children:l(e.label)}),e.label,(0,r.Y)("b",{children:e.unseen>99?"99+":e.unseen})]},e.game))]})])},62637(e,t,n){n.d(t,{H:()=>Ye});var r=n(10201),o=n(17402),i=n(63679),a=n(66096),l=n(9299),s=n(623),d=n(52199),c=n(74944);const p=({site:e,turnstileSiteKey:t,onClose:n})=>(0,r.Y)(h,{onClick:n,children:(0,r.FD)(u,{onClick:e=>e.stopPropagation(),children:[(0,r.FD)(g,{children:[(0,r.Y)("span",{children:"Account"}),(0,r.Y)(m,{type:"button",onClick:n,"aria-label":"Close",children:"Ã"})]}),(0,r.Y)(f,{children:(0,r.Y)(c.v,{site:e,turnstileSiteKey:t,onSuccess:n,bare:!0})})]})}),h=i.I4.div` 345 position: fixed; 346 inset: 0; 347 background: rgba(0, 0, 0, 0.6); 348 display: flex; 349 align-items: center; 350 justify-content: center; 351 z-index: 10000; 352 /* Keep the sheet clear of the sticky footer ad (boot/bottomObstruction.ts). */ 353 padding: 16px 16px calc(16px + var(--dotgg-bottom-obstruction, 0px)); 354`,u=i.I4.div` 355 background: var(--theme-palette-color-8, #fff); 356 color: var(--theme-palette-color-2, #111); 357 border-radius: 8px; 358 width: 100%; 359 max-width: 480px; 360 max-height: 90vh; 361 max-height: calc(100dvh - 32px - var(--dotgg-bottom-obstruction, 0px)); 362 overflow: auto; 363 box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); 364`,g=i.I4.div` 365 display: flex; 366 align-items: center; 367 justify-content: space-between; 368 padding: 12px 16px; 369 border-bottom: 1px solid var(--theme-palette-color-5, rgba(0, 0, 0, 0.1)); 370 font-weight: 600; 371`,m=i.I4.button` 372 background: transparent; 373 border: 0; 374 font-size: 24px; 375 line-height: 1; 376 cursor: pointer; 377 color: inherit; 378`,f=i.I4.div` 379 padding: 16px; 380`;var x=n(59408),v=n(42823),y=n(53887),w=n(4738),b=n(76052),$=n(81616);const k=({attach:e,disabled:t})=>{const n=(0,o.li)(null);return(0,r.FD)(r.FK,{children:[(0,r.Y)(A,{type:"file",accept:"image/*",ref:n,onChange:t=>{const n=t.currentTarget.files?.[0];t.currentTarget.value="",e.pick(n)},"aria-hidden":"true",tabIndex:-1}),(0,r.Y)(C,{type:"button",onClick:()=>n.current?.click(),disabled:t||e.busy,children:e.busy?"Readingâ¦":e.image?"Change image":"Add image"})]})},Y=({attach:e,disabled:t})=>e.image?(0,r.FD)(F,{children:[(0,r.Y)(D,{src:e.image,alt:"Attached image preview"}),(0,r.Y)(S,{type:"button",onClick:e.clear,disabled:t,"aria-label":"Remove attached image",title:"Remove image",children:"Ã"})]}):null,A=i.I4.input` 381 display: none; 382`,C=i.I4.button` 383 background: transparent; 384 border: 1px solid var(--theme-palette-color-6, #2a2f36); 385 color: inherit; 386 padding: 5px 10px; 387 border-radius: 6px; 388 cursor: pointer; 389 font-size: 12px; 390 opacity: 0.8; 391 &:hover { 392 opacity: 1; 393 } 394 &:disabled { 395 opacity: 0.4;
396 cursor: not-allowed; 397 } 398`,F=i.I4.div` 399 position: relative; 400 align-self: flex-start; 401 line-height: 0; 402`,D=i.I4.img` 403 max-width: 100%; 404 max-height: 140px; 405 border-radius: 6px; 406 border: 1px solid var(--theme-palette-color-6, #2a2f36); 407 display: block; 408`,S=i.I4.button` 409 position: absolute; 410 top: -8px; 411 right: -8px; 412 width: 22px; 413 height: 22px; 414 border-radius: 50%; 415 border: none; 416 background: var(--theme-palette-color-6, #2a2f36); 417 color: inherit; 418 cursor: pointer; 419 font-size: 14px; 420 line-height: 1; 421 &:hover { 422 background: var(--theme-palette-color-1, #2a72d8); 423 color: var(--dotgg-on-accent, var(--theme-palette-color-8)); 424 } 425`;var I=n(70526);const z="dotgg_guest_name";function T(){try{return b.Ar?.getItem(z)||""}catch{return""}}const E=({onSubmit:e,onCancel:t,placeholder:n,turnstileSiteKey:i,autoFocus:a,site:l})=>{const[s,c]=(0,o.J0)(!1),[h,u]=(0,o.J0)(""),[g,m]=(0,o.J0)(!1),[f,A]=(0,o.J0)(null),[C,F]=(0,o.J0)(!1),[D,S]=(0,o.J0)(!1),[E,U]=(0,o.J0)(T),Q=(0,o.li)(E);Q.current=E;const G=(0,o.li)(null),H=(0,o.li)(null),q=(0,o.li)(""),V=(0,o.li)(h);V.current=h;const X=function(e){const[t,n]=(0,o.J0)(null),[r,i]=(0,o.J0)(!1),a=(0,o.li)(null);return a.current=t,{image:t,imageRef:a,busy:r,pick:async t=>{if(t){i(!0),e(null);try{n(await async function(e){if(!e.type.startsWith("image/"))throw new Error("That file is not an image.");if(e.size>15728640)throw new Error("Image is too large (15MB max).");const t=URL.createObjectURL(e);try{const e=await new Promise((e,n)=>{const r=new Image;r.onload=()=>e(r),r.onerror=()=>n(new Error("Couldn't read that image.")),r.src=t}),n=Math.min(1,1024/Math.max(e.naturalWidth,e.naturalHeight)),r=Math.max(1,Math.round(e.naturalWidth*n)),o=Math.max(1,Math.round(e.naturalHeight*n)),i=document.createElement("canvas");i.width=r,i.height=o;const a=i.getContext("2d");if(!a)throw new Error("Couldn't process that image.");a.drawImage(e,0,0,r,o);const l=i.toDataURL("image/webp",.85);return l.startsWith("data:image/")?l:i.toDataURL()}finally{URL.revokeObjectURL(t)}}(t))}catch(t){e(t instanceof Error?t.message:"Couldn't attach that image.")}finally{i(!1)}}},clear:()=>n(null)}}(A),Z=(0,w.x3)(),ee=(0,$.h3)(),te=function(){try{return{nick:b.Ar?.getItem("dotgg_nick")||"",avatar:b.Ar?.getItem("dotgg_avatar")||""}}catch{return{nick:"",avatar:""}}}(),ne=te.nick||ee?.user.nickname||"",re=te.avatar||ee?.user.usermeta?.avatar||"",oe=async(n,r)=>{m(!0),A(null);try{const o=Z?void 0:Q.current.trim()||void 0;if(await e(n,{turnstileToken:Z?void 0:r,guestName:o,image:X.imageRef.current??void 0}),o)try{b.Ar?.setItem(z,o)}catch{}u(""),X.clear(),!Z&&H.current&&window.turnstile&&(window.turnstile.reset(H.current),q.current=""),t?.()}catch(e){A(e instanceof Error?e.message:"Failed to post.")}finally{m(!1)}};return(0,o.vJ)(()=>{if(Z||!i||!C||!G.current)return;let e=!1;const t=G.current;return(0,I.n)().then(()=>{!e&&window.turnstile&&t&&(H.current=window.turnstile.render(t,{sitekey:i,callback:e=>{q.current=e,S(t=>{if(!t)return t;const n=V.current.trim();return n&&oe(n,e),!1})},"expired-callback":()=>{q.current=""},"error-callback":()=>{q.current=""},theme:"dark",size:"flexible"}))}).catch(()=>A("Captcha failed to load")),()=>{e=!0,H.current&&window.turnstile&&(window.turnstile.remove(H.current),H.current=null)}},[Z,i,C]),(0,r.FD)(L,{children:[!Z&&(0,r.FD)(J,{children:[(0,r.Y)("span",{children:"Posting as guest."}),(0,r.Y)(B,{type:"button",onClick:()=>{l?c(!0):window.location.assign((0,v.u)(window.location.href))},children:"Log in or register"}),(0,r.Y)("span",{children:"to keep your comments under your account."})]}),Z&&(0,r.FD)(J,{children:[(0,r.Y)(K,{src:(0,x.T)(re),alt:""}),(0,r.Y)("span",{children:"Posting as"}),ne?(0,r.Y)(W,{href:(0,y.Lp)(ne),children:ne}):(0,r.Y)("strong",{children:"your account"}),(0,r.Y)("span",{children:"."})]}),s&&l&&(0,r.Y)(p,{site:l,turnstileSiteKey:i,onClose:()=>c(!1)}),!Z&&(0,r.Y)(N,{type:"text",value:E,onChange:e=>U(e.currentTarget.value),placeholder:"Your name (optional)",maxLength:32,disabled:g,"aria-label":"Display name to post under"}),(0,r.Y)(M,{autoFocus:a,placeholder:n??(Z?"Share your thoughtsâ¦":`Comment as ${E.trim()||"Anonymous"}â¦`),value:h,onChange:e=>u(e.currentTarget.value),maxLength:1e4,disabled:g}),(0,r.Y)(Y,{attach:X,disabled:g}),!Z&&!i&&(0,r.Y)(d.Kw,{children:"Commenting as guest is unavailable: site owner hasn't configured captcha."}),f&&(0,r.Y)(d.Kw,{children:f}),!Z&&C&&i&&(0,r.FD)(_,{children:[(0,r.Y)(P,{ref:G}),(0,r.Y)(O,{children:"Complete the captcha to post your comment."})]}),(0,r.FD)(_,{children:[t&&(0,r.Y)(d.Zb,{type:"button",onClick:t,disabled:g,children:"Cancel"}),(0,r.Y)(k,{attach:X,disabled:g}),(0,r.Y)(R,{}),(0,r.Y)(j,{type:"button",onClick:async()=>{const e=h.trim();""===e||g||D||(Z?await oe(e):i&&(q.current?await oe(e,q.current):(S(!0),F(!0),A(null))))},disabled:g||D||""===h.trim()||!Z&&!i,children:g?"Postingâ¦":D?"Waiting for captchaâ¦":"Post"})]})]})},L=i.I4.div` 426 display: flex; 427 flex-direction: column; 428 gap: 10px; 429 width: 100%; 430 padding: 12px; 431 background: var(--theme-palette-color-8, #15191e); 432 border: 1px solid var(--theme-palette-color-6, #2a2f36); 433 border-radius: 8px; 434`,M=i.I4.textarea` 435 width: 100%; 436 min-height: 80px; 437 padding: 10px 12px; 438 border-radius: 6px; 439 border: 1px solid var(--theme-palette-color-6, #2a2f36); 440 background: var(--theme-palette-color-7, #0f1216); 441 color: inherit; 442 font: inherit; 443 resize: vertical; 444 box-sizing: border-box; 445 transition: border-color 0.15s; 446 &:focus { 447 outline: none; 448 border-color: var(--theme-palette-color-1, #2a72d8); 449 } 450`,N=i.I4.input` 451 width: 100%; 452 max-width: 260px; 453 padding: 7px 10px; 454 border-radius: 6px; 455 border: 1px solid var(--theme-palette-color-6, #2a2f36); 456 background: var(--theme-palette-color-7, #0f1216); 457 color: inherit; 458 font: inherit; 459 font-size: 13px; 460 box-sizing: border-box; 461 transition: border-color 0.15s; 462 &:focus { 463 outline: none; 464 border-color: var(--theme-palette-color-1, #2a72d8); 465 } 466`,P=i.I4.div` 467 width: 100%; 468 min-height: 65px; 469 display: flex; 470 align-items: center; 471`,O=i.I4.div` 472 font-size: 12px; 473 color: var(--theme-palette-color-3, #888); 474 opacity: 0.7; 475`,_=i.I4.div` 476 display: flex; 477 align-items: center; 478 gap: 10px; 479 flex-wrap: wrap; 480`,R=i.I4.div` 481 flex: 1; 482`,j=i.I4.button` 483 background: var(--theme-palette-color-1, #2a72d8); 484 color: var(--dotgg-on-accent, var(--theme-palette-color-8)); 485 border: none; 486 padding: 6px 14px; 487 border-radius: 6px; 488 cursor: pointer; 489 font-weight: 600; 490 &:disabled { 491 opacity: 0.5;
492 cursor: not-allowed; 493 } 494`,J=i.I4.div` 495 display: flex; 496 flex-wrap: wrap; 497 align-items: center; 498 gap: 6px; 499 font-size: 13px; 500 color: var(--theme-palette-color-3, inherit); 501 opacity: 0.85; 502`,B=i.I4.button` 503 background: transparent; 504 border: none; 505 padding: 0; 506 cursor: pointer; 507 font: inherit; 508 font-weight: 600; 509 color: var(--theme-palette-color-1, #2a72d8); 510 text-decoration: underline; 511 &:hover { 512 opacity: 0.85; 513 } 514`,K=i.I4.img` 515 width: 22px; 516 height: 22px; 517 border-radius: 50%; 518 object-fit: cover; 519`,W=i.I4.a` 520 font-weight: 600; 521 color: var(--theme-palette-color-1, #2a72d8); 522 text-decoration: none; 523 &:hover { 524 text-decoration: underline; 525 } 526`;var U=n(61204),Q=n(78058);const G=({score:e,viewerVote:t,onVote:n,disabled:o})=>(0,r.FD)(H,{children:[(0,r.Y)(q,{type:"button","data-active":1===t,"data-direction":"up",onClick:()=>n(1===t?0:1),disabled:o,"aria-label":"Upvote",children:"â²"}),(0,r.Y)(V,{"data-direction":1===t?"up":-1===t?"down":"",children:e}),(0,r.Y)(q,{type:"button","data-active":-1===t,"data-direction":"down",onClick:()=>n(-1===t?0:-1),disabled:o,"aria-label":"Downvote",children:"â¼"})]}),H=i.I4.div` 527 display: flex; 528 flex-direction: column; 529 align-items: center; 530 gap: 2px; 531 min-width: 28px; 532`,q=i.I4.button` 533 background: transparent; 534 border: none; 535 padding: 2px 4px; 536 cursor: pointer; 537 color: var(--theme-palette-color-3, #888); 538 opacity: 0.6; 539 font-size: 12px; 540 line-height: 1; 541 &:hover:not(:disabled) { 542 opacity: 1; 543 color: var(--theme-palette-color-1, #2a2); 544 } 545 &[data-direction="down"]:hover:not(:disabled) { 546 color: var(--theme-palette-color-2, #c33); 547 } 548 &[data-active="true"][data-direction="up"] { 549 color: var(--theme-palette-color-1, #2a2); 550 } 551 &[data-active="true"][data-direction="down"] { 552 color: var(--theme-palette-color-2, #c33); 553 } 554 &:disabled { 555 opacity: 0.5; 556 cursor: not-allowed; 557 } 558`,V=i.I4.div` 559 font-size: 12px; 560 font-weight: 600; 561 &[data-direction="up"] { 562 color: var(--theme-palette-color-1, #2a2); 563 } 564 &[data-direction="down"] { 565 color: var(--theme-palette-color-2, #c33); 566 } 567`;function X(e){const t=Date.now()/1e3,n=Math.max(0,t-e);return n<60?"just now":n<3600?`${Math.floor(n/60)}m ago`:n<86400?`${Math.floor(n/3600)}h ago`:n<2592e3?`${Math.floor(n/86400)}d ago`:new Date(1e3*e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}const Z=({node:e,currentUserId:t,turnstileSiteKey:n,onVote:i,onReply:a,onDelete:l,renderChildren:s,childRows:d})=>{const[c,p]=(0,o.J0)(!1),[h,u]=(0,o.J0)(!1),g=(0,w.x3)(),m=e.author_id>0&&e.author_id===t,f=0===e.author_id,v="deleted"===e.status,b=v?"[removed]":f?e.guest_name||"Anonymous":e.author_nickname||e.author_name||`user${e.author_id}`,$=f&&!v&&!!e.guest_name,k=f||v?void 0:(0,y.Lp)(b);return(0,r.Y)(ee,{"data-depth":e.depth,children:(0,r.FD)(te,{children:[(0,r.Y)(G,{score:e.score,viewerVote:e.viewer_vote,onVote:t=>{g&&(m||i(e.id,t).catch(()=>{}))},disabled:!g||m||v}),(0,r.FD)(ne,{children:[(0,r.FD)(re,{children:[f?(0,r.Y)(ie,{src:(0,x.T)(null),alt:"","data-guest":"true"}):(0,r.Y)(oe,{href:k,children:(0,r.Y)(ie,{src:(0,x.T)(e.author_avatar),alt:""})}),k?(0,r.Y)(ae,{href:k,children:b}):(0,r.Y)(ae,{as:"span",children:b}),e.author_premium&&!f&&!v&&(0,r.Y)(le,{title:"DotGG Premium","aria-label":"DotGG Premium",children:(0,r.Y)(U.g,{icon:Q.z})}),$&&(0,r.Y)(se,{title:"Not a registered account",children:"guest"}),(0,r.Y)(de,{children:"·"}),(0,r.Y)(ce,{title:new Date(1e3*e.created_at).toLocaleString(),children:X(e.created_at)}),!v&&(0,r.Y)(pe,{type:"button",onClick:()=>u(e=>!e),children:h?"[+]":"[â]"})]}),!h&&(0,r.FD)(r.FK,{children:[(0,r.Y)(he,{"data-deleted":v,children:e.body}),!v&&e.image_url&&(0,r.Y)(ue,{href:e.image_url,target:"_blank",rel:"noopener noreferrer",children:(0,r.Y)(ge,{src:e.image_url,alt:"",loading:"lazy"})}),!v&&(0,r.FD)(me,{children:[(0,r.Y)(fe,{type:"button",onClick:()=>p(e=>!e),children:c?"Cancel":"Reply"}),m&&(0,r.Y)(fe,{type:"button",onClick:()=>{l(e.id).catch(()=>{})},children:"Delete"})]}),c&&(0,r.Y)(xe,{children:(0,r.Y)(E,{autoFocus:!0,placeholder:`Reply to ${b}â¦`,turnstileSiteKey:n,onCancel:()=>p(!1),onSubmit:async(t,n)=>{await a(e.id,t,n),p(!1)}})}),!h&&d.length>0&&(0,r.Y)(ve,{children:s(d)})]})]})]})})},ee=i.I4.div` 568 display: flex; 569 flex-direction: column; 570 gap: 4px; 571`,te=i.I4.div` 572 display: flex; 573 gap: 8px; 574 align-items: flex-start; 575`,ne=i.I4.div` 576 flex: 1; 577 min-width: 0; 578`,re=i.I4.div` 579 display: flex; 580 align-items: center; 581 gap: 6px; 582 font-size: 12px; 583 color: var(--theme-palette-color-3, #888); 584 opacity: 0.7; 585 line-height: 1; 586`,oe=i.I4.a` 587 display: inline-flex; 588 line-height: 0; 589`,ie=i.I4.img` 590 width: 22px; 591 height: 22px; 592 border-radius: 50%; 593 object-fit: cover; 594 display: block; 595 &[data-guest="true"] { 596 opacity: 0.5; 597 } 598`,ae=i.I4.a` 599 color: inherit; 600 font-weight: 600; 601 font-size: 13px; 602 text-decoration: none; 603 &:hover { 604 text-decoration: underline; 605 } 606`,le=i.I4.span` 607 display: inline-flex; 608 align-items: center; 609 font-size: 11px; 610 line-height: 1; 611 color: var(--theme-palette-color-1); 612 cursor: help; 613`,se=i.I4.span` 614 font-size: 10px; 615 line-height: 1; 616 padding: 2px 5px; 617 border-radius: 3px; 618 text-transform: uppercase; 619 letter-spacing: 0.03em; 620 opacity: 0.65; 621 border: 1px solid currentColor; 622 cursor: help; 623`,de=i.I4.span` 624 opacity: 0.5; 625`,ce=i.I4.span` 626 opacity: 0.8; 627 white-space: nowrap; 628`,pe=i.I4.button` 629 margin-left: auto; 630 background: transparent; 631 border: none; 632 color: inherit; 633 cursor: pointer; 634 padding: 0 4px; 635 opacity: 0.6; 636 font-family: inherit; 637 font-size: 12px; 638 line-height: 1; 639 &:hover { 640 opacity: 1; 641 } 642`,he=i.I4.div` 643 white-space: pre-wrap; 644 word-break: break-word; 645 margin: 4px 0; 646 &[data-deleted="true"] { 647 opacity: 0.5; 648 font-style: italic; 649 } 650`,ue=i.I4.a` 651 display: inline-block; 652 line-height: 0; 653 margin: 2px 0 4px; 654`,ge=i.I4.img` 655 max-width: 100%; 656 max-height: 240px; 657 border-radius: 6px; 658 display: block; 659`,me=i.I4.div` 660 display: flex; 661 gap: 10px; 662`,fe=i.I4.button` 663 background: transparent; 664 border: none; 665 color: var(--theme-palette-color-3, #888); 666 opacity: 0.7; 667 cursor: pointer; 668 padding: 2px 0; 669 font-size: 12px; 670 &:hover { 671 opacity: 1; 672 color: inherit; 673 } 674`,xe=i.I4.div` 675 margin: 8px 0; 676`,ve=i.I4.div` 677 margin-top: 6px; 678 padding-left: 12px; 679 border-left: 2px solid var(--theme-palette-color-6, #333); 680 display: flex; 681 flex-direction: column; 682 gap: 10px; 683`,ye=({comments:e,currentUserId:t,turnstileSiteKey:n,onVote:i,onReply:a,onDelete:l})=>{const s=(0,o.Kr)(()=>function(e){const t=new Map;
683e.forEach(e=>t.set(e.id,{row:e,children:[]}));const n=[];return e.forEach(e=>{const r=t.get(e.id);if(null==e.parent_id)return void n.push(r);const o=t.get(e.parent_id);o?o.children.push(r):n.push(r)}),n}(e),[e]),d=e=>e.map(e=>(0,r.Y)(Z,{node:e.row,currentUserId:t,turnstileSiteKey:n,onVote:i,onReply:a,onDelete:l,renderChildren:e=>d(e.map(e=>({row:e,children:[]})).map(e=>we(s,e.row.id)??e)),childRows:e.children.map(e=>e.row)},e.row.id));return(0,r.Y)(r.FK,{children:d(s)})};function we(e,t){for(const n of e){if(n.row.id===t)return n;const e=we(n.children,t);if(e)return e}return null}var be=n(55115),$e=n(12434);const ke=1/0;const Ye=({game:e,objectType:t,objectId:n,pageUrl:i,turnstileSiteKey:s,site:c})=>{const p=o.Ay.useRef(null),h=o.Ay.useRef(!0);o.Ay.useEffect(()=>{const e=p.current;if(!e||"undefined"==typeof IntersectionObserver)return;const t=new IntersectionObserver(e=>{h.current=e.some(e=>e.isIntersecting)},{rootMargin:"200px 0px"});return t.observe(e),()=>t.disconnect()},[]);const{comments:u,loading:g,refreshing:m,error:f,sort:x,present:v,setSort:y,post:b,vote:$,remove:k,reload:Y}=function(e,t,n,r){const i=r?.pageUrl,a=r?.inViewRef,[l,s]=(0,o.J0)([]),[d,c]=(0,o.J0)(!0),[p,h]=(0,o.J0)(!1),[u,g]=(0,o.J0)(null),[m,f]=(0,o.J0)("top"),[x,v]=(0,o.J0)(null),[y,b]=(0,o.J0)("top"),$=(0,o.li)(!0),k=(0,o.hb)(async(r,o)=>{const i=!0===o?.background;i?h(!0):c(!0),i||g(null);try{if(o?.fresh||(0,w.x3)()||"dev"===$e.Ay.mode){const o=await(0,be.fg)({game:e,objectType:t,objectId:n,sort:r,presence:!0});s(o.comments),b(r),null!==o.present&&v(o.present)}else{const[o,i]=await Promise.all([(0,be.fg)({game:e,objectType:t,objectId:n,sort:r,edgeCache:!0}),(0,be.yN)(e,t,n)]);s(o.comments),b(r),null!==i&&v(i)}}catch(e){i||g(e instanceof Error?e.message:"Failed to load")}finally{i?h(!1):c(!1)}},[e,t,n]);(0,o.vJ)(()=>{k("top"),$.current=!1},[k]);const Y=(0,o.hb)(()=>k(y,{background:!$.current,fresh:!0}),[k,y]);(0,o.vJ)(()=>{const e=()=>{"visible"===document.visibilityState&&(a&&!1===a.current||k(y,{background:!0}))},t=setInterval(e,12e4),n=()=>{"visible"===document.visibilityState&&e()};return document.addEventListener("visibilitychange",n),()=>{clearInterval(t),document.removeEventListener("visibilitychange",n)}},[k,y,a]);const A=(0,o.hb)(e=>{f(e),e!==y&&l.length>=ke&&k(e)},[y,l.length,k]),C=(0,o.Kr)(()=>{if(l.length>=ke)return l;const e=new Map,t=[];for(const n of l)if(n.parent_id){const t=n.root_id||n.parent_id,r=e.get(t)??[];r.push(n),e.set(t,r)}else t.push(n),e.has(n.id)||e.set(n.id,[]);t.sort((e,t)=>"new"===m?t.created_at-e.created_at:t.score-e.score||t.created_at-e.created_at);const n=[];for(const r of t){n.push(r);const t=e.get(r.id);t&&n.push(...t)}return n},[l,m]),F=(0,o.hb)(async(r,o,a)=>{const l=await(0,be.eT)(e,{object_type:t,object_id:n,parent_id:o??void 0,body:r,turnstile_token:a?.turnstileToken,page_url:i,guest_name:a?.guestName,image:a?.image,page_title:document.title});s(e=>[...e,l])},[e,t,n,i]),D=(0,o.hb)(async(t,n)=>{s(e=>e.map(e=>{if(e.id!==t)return e;const r=n-e.viewer_vote;return{...e,viewer_vote:n,score:e.score+r,upvotes:e.upvotes+(1===n?1:0)-(1===e.viewer_vote?1:0),downvotes:e.downvotes+(-1===n?1:0)-(-1===e.viewer_vote?1:0)}}));try{const r=await(0,be.uz)(e,t,n);s(e=>e.map(e=>e.id===t?{...e,viewer_vote:r.viewer_vote,score:r.score,upvotes:r.upvotes,downvotes:r.downvotes}:e))}catch(e){throw g(e instanceof Error&&e.message?e.message:"Could not register your vote. Please try again."),await Y(),e}},[e,Y]),S=(0,o.hb)(async t=>{try{await(0,be.Tu)(e,t)}catch(e){throw g(e instanceof Error&&e.message?e.message:"Could not delete the comment. Please try again."),e}s(e=>e.map(e=>e.id===t?{...e,status:"deleted",body:"[removed]"}:e))},[e]);return(0,o.Kr)(()=>({comments:C,loading:d,refreshing:p,error:u,sort:m,present:x,setSort:A,post:F,vote:D,remove:S,reload:Y}),[C,d,p,u,m,x,A,F,D,S,Y])}(e,t,n,{pageUrl:i,inViewRef:h}),A=Number(window.DotGGUser??0)||0,C=`${t}:${n}`;return(0,r.Y)(l.t,{justhide:!0,children:(0,r.FD)(Ae,{ref:p,children:[(0,r.FD)(Ce,{children:[(0,r.FD)(De,{children:[(0,r.FD)(Fe,{children:["Comments ",!g&&`(${u.length})`]}),null!==v&&v>0&&(0,r.FD)(Se,{title:`${v} ${1===v?"person":"people"} viewing this page right now`,children:[(0,r.Y)(Ie,{}),v," viewing"]}),!c&&C.length<=120&&(0,r.Y)(a.W,{topic:{type:"thread",game:e,key:C},label:document.title||n,url:i,text:"Follow thread",hint:"Get notified when someone comments here",variant:"inline",followingHint:"new comments go to your bell"})]}),(0,r.FD)(ze,{children:[(0,r.Y)(Le,{"data-active":"top"===x,onClick:()=>y("top"),children:"Top"}),(0,r.Y)(Le,{"data-active":"new"===x,onClick:()=>y("new"),children:"New"}),(0,r.Y)(Te,{type:"button",onClick:()=>{Y()},disabled:g||m,"aria-label":"Refresh comments",title:"Refresh comments",children:(0,r.Y)(Ee,{"data-spinning":m?"1":"0",children:"â»"})})]})]}),(0,r.Y)(E,{turnstileSiteKey:s,site:c,onSubmit:(e,t)=>
683b(e,null,t)}),f&&(0,r.Y)(d.Kw,{children:f}),g?(0,r.Y)(Pe,{}):0===u.length?(0,r.Y)(Ne,{children:"Be the first to comment."}):(0,r.Y)(Me,{children:(0,r.Y)(ye,{comments:u,currentUserId:A,turnstileSiteKey:s,onVote:$,onReply:(e,t,n)=>b(t,e,n),onDelete:k})})]})})},Ae=i.I4.div` 684 display: flex; 685 flex-direction: column; 686 gap: 16px; 687 width: 100%; 688 padding: 12px 0; 689`,Ce=i.I4.div` 690 display: flex; 691 align-items: center; 692 justify-content: space-between; 693`,Fe=i.I4.h3` 694 margin: 0; 695 font-size: 18px; 696`,De=i.I4.div` 697 display: flex; 698 align-items: center; 699 gap: 10px; 700 flex-wrap: wrap; 701`,Se=i.I4.span` 702 display: inline-flex; 703 align-items: center; 704 gap: 5px; 705 font-size: 12px; 706 opacity: 0.75; 707 color: var(--theme-palette-color-3, inherit); 708`,Ie=i.I4.span` 709 width: 7px; 710 height: 7px; 711 border-radius: 50%; 712 background: #4ade80; 713 box-shadow: 0 0 6px rgba(74, 222, 128, 0.7); 714 animation: dotgg-presence-pulse 2s ease-in-out infinite; 715 @keyframes dotgg-presence-pulse { 716 0%, 100% { opacity: 1; } 717 50% { opacity: 0.45; } 718 } 719`,ze=i.I4.div` 720 display: flex; 721 gap: 4px; 722 align-items: center; 723`,Te=i.I4.button` 724 background: transparent; 725 border: 1px solid var(--theme-palette-color-6, #444); 726 color: inherit; 727 padding: 4px 8px; 728 border-radius: 4px; 729 cursor: pointer; 730 font-size: 13px; 731 line-height: 1; 732 &:disabled { opacity: 0.5; cursor: not-allowed; } 733`,Ee=i.I4.span` 734 display: inline-block; 735 &[data-spinning="1"] { 736 animation: dotgg-refresh-spin 0.8s linear infinite; 737 } 738 @keyframes dotgg-refresh-spin { 739 from { transform: rotate(0deg); } 740 to { transform: rotate(360deg); } 741 } 742`,Le=i.I4.button` 743 background: transparent; 744 border: 1px solid var(--theme-palette-color-6, #444); 745 color: inherit; 746 padding: 4px 10px; 747 border-radius: 4px; 748 cursor: pointer; 749 font-size: 12px; 750 &[data-active="true"] { 751 background: var(--theme-palette-color-6, #444); 752 } 753`,Me=i.I4.div` 754 display: flex; 755 flex-direction: column; 756 gap: 14px; 757`,Ne=i.I4.div` 758 opacity: 0.6; 759 font-size: 14px; 760`,Pe=()=>(0,r.Y)(Oe,{"aria-busy":"true","aria-label":"Loading comments",children:[0,1,2].map(e=>(0,r.FD)(s.te,{$gap:"8px",$align:"flex-start",children:[(0,r.Y)(s.Z1,{$width:"22px",$height:"54px",$shimmer:!0}),(0,r.FD)(s.te,{$direction:"column",$gap:"6px",style:{flex:1,minWidth:0},children:[(0,r.FD)(s.te,{$gap:"8px",$align:"center",children:[(0,r.Y)(s.NH,{$size:"22px"}),(0,r.Y)(s.Z1,{$width:"30%",$height:"10px",$shimmer:!0}),(0,r.Y)(s.Z1,{$width:"15%",$height:"10px",$shimmer:!0})]}),(0,r.Y)(s.Z1,{$width:"92%",$height:"10px",$shimmer:!0}),(0,r.Y)(s.Z1,{$width:"78%",$height:"10px",$shimmer:!0}),(0,r.Y)(s.Z1,{$width:"55%",$height:"10px",$shimmer:!0})]})]},e))}),Oe=i.I4.div` 761 display: flex; 762 flex-direction: column; 763 gap: 18px; 764 ${s.Xj} 765`}
765,54155(e,t,n){var r=n(63679),o=n(30821),i=n(26675);const a=r.Ay.div` 766 display: flex; 767 flex-direction: column; 768 gap: ${e=>e.$phone?"8px":"10px"}; 769 padding: ${e=>e.$phone?"10px 12px":"10px 12px 12px"}; 770 border-top: 1px solid ${o.Q.rowRule}; 771 background: ${o.Q.threadBg}; 772`,l=r.Ay.div` 773 display: flex; 774 align-items: center; 775 gap: 6px; 776 ${e=>e.$phone?r.AH` 777 overflow-x: auto; 778 scrollbar-width: none; 779 &::-webkit-scrollbar { 780 display: none; 781 } 782 `:"flex-wrap: wrap;"} 783 > em { 784 margin-right: 2px; 785 font-style: normal; 786 font-size: 11.5px; 787 color: ${o.Q.muted}; 788 } 789`,s=r.Ay.a` 790 flex: none; 791 display: inline-flex; 792 align-items: center; 793 gap: 6px; 794 height: ${e=>e.$phone?36:28}px; 795 padding: ${e=>e.$phone?"0 10px 0 6px":"0 8px 0 4px"}; 796 border-radius: 6px; 797 background: var(--theme-palette-color-7); 798 box-shadow: inset 0 0 0 1px var(--theme-palette-color-5); 799 color: var(--theme-palette-color-4); 800 font-size: ${e=>e.$phone?"13px":"12px"}; 801 font-weight: 600; 802 text-decoration: none; 803 &:hover { 804 color: var(--theme-palette-color-4); 805 box-shadow: inset 0 0 0 1px var(--theme-palette-color-3); 806 } 807 &:focus-visible { 808 ${o.I} 809 } 810 img, 811 i { 812 flex: none; 813 width: ${e=>e.$phone?22:20}px; 814 height: ${e=>e.$phone?22:20}px; 815 border-radius: 4px; 816 background: ${i.A}; 817 object-fit: contain; 818 } 819 /* The site's initials when the registry sends no icon. */ 820 i { 821 display: inline-flex; 822 align-items: center; 823 justify-content: center; 824 font-style: normal; 825 font-size: 9px; 826 font-weight: 800; 827 color: var(--theme-palette-color-4); 828 } 829 b { 830 font-size: ${e=>e.$phone?"12px":"11px"}; 831 font-weight: 700; 832 color: ${o.Q.unread}; 833 } 834`,d=r.Ay.a` 835 display: flex; 836 align-items: center; 837 gap: 10px; 838 height: ${e=>e.$phone?48:40}px; 839 padding: 0 ${e=>e.$phone?14:12}px; 840 border-radius: 6px; 841 background: var(--theme-palette-color-7); 842 box-shadow: inset 0 0 0 1px var(--theme-palette-color-5); 843 color: var(--theme-palette-color-3); 844 text-decoration: none; 845 &:hover { 846 color: var(--theme-palette-color-3); 847 box-shadow: inset 0 0 0 1px var(--theme-palette-color-3); 848 } 849 &:focus-visible { 850 ${o.I} 851 } 852 strong { 853 font-size: ${e=>e.$phone?"14px":"13px"}; 854 font-weight: 700; 855 color: var(--theme-palette-color-4); 856 } 857 span { 858 min-width: 0; 859 overflow: hidden; 860 text-overflow: ellipsis; 861 white-space: nowrap; 862 font-size: ${e=>e.$phone?"13px":"12px"}; 863 } 864 svg { 865 flex: none; 866 } 867 > svg:last-child { 868 margin-left: auto; 869 } 870`;n.d(t,["C4",0,l,"NM",0,a,"hg",0,d,"vu",0,s])},26675(e,t,n){var r=n(63679),o=n(30821);const i=o.Q.hoverFill,a=r.Ay.div` 871 display: flex; 872 align-items: baseline; 873 gap: 8px; 874 padding: ${e=>e.$phone?"14px 16px 4px":"12px 10px 4px"}; 875 &:first-child { 876 padding-top: ${e=>e.$phone?"12px":"10px"}; 877 } 878 h3 { 879 margin: 0; 880 font-size: ${e=>e.$phone?"11px":"10.5px"}; 881 font-weight: 800; 882 line-height: 1.3; 883 letter-spacing: 0.08em; 884 text-transform: uppercase; 885 color: ${e=>e.$accent?"var(--theme-palette-color-1)":o.Q.muted}; 886 } 887 span { 888 font-size: 11px; 889 color: ${o.Q.muted}; 890 } 891`,l=r.Ay.div` 892 position: relative; 893 display: grid; 894 grid-template-columns: ${e=>e.$phone?"36px":"32px"} minmax(0, 1fr) auto; 895 gap: ${e=>e.$phone?"12px":"10px"}; 896 padding: ${e=>e.$phone?"12px 16px":"9px 10px"}; 897 border-radius: ${e=>e.$phone?"0":"6px"}; 898 ${e=>e.$phone&&r.AH` 899 min-height: 72px; 900 box-sizing: border-box; 901 border-bottom: 1px solid ${o.Q.rowRule}; 902 `} 903 &:hover { 904 background: ${i}; 905 } 906`,s=r.AH` 907 width: ${e=>e.$phone?"36px":"32px"}; 908 height: ${e=>e.$phone?"36px":"32px"}; 909 flex: none; 910`,d=r.Ay.img` 911 ${s} 912 display: block; 913 border-radius: 50%; 914 object-fit: cover; 915 background: ${i}; 916`,c=r.Ay.span` 917 ${s} 918 display: inline-flex; 919 align-items: center; 920 justify-content: center; 921 border-radius: 8px; 922 background: ${e=>e.$crown?"var(--theme-palette-color-1)":e.$trade?"color-mix(in srgb, var(--theme-palette-color-1) 14%, transparent)":i}; 923 color: ${e=>e.$crown?o.Q.onAccent:e.$trade?"var(--theme-palette-color-1)":"var(--theme-palette-color-3)"}; 924 svg { 925 display: block; 926 } 927`,p=r.Ay.div` 928 min-width: 0; 929 display: flex; 930 flex-direction: column; 931 gap: ${e=>e.$phone?"3px":"2px"}; 932`,h=r.Ay.a` 933 font-size: ${e=>e.$phone?"14.5px":"13.5px"}; 934 line-height: ${e=>e.$phone?1.3:1.35}; 935 font-weight: 700; 936 color: ${e=>e.$unread?"var(--theme-palette-color-4)":"color-mix(in srgb, var(--theme-palette-color-4) 32%, var(--theme-palette-color-3))"}; 937 text-decoration: none; 938 text-wrap: pretty;
939 overflow-wrap: anywhere; 940 &:hover { 941 color: var(--theme-palette-color-4); 942 } 943 &::after { 944 content: ""; 945 position: absolute; 946 inset: 0; 947 border-radius: inherit; 948 } 949 &:focus-visible { 950 outline: none; 951 } 952 &:focus-visible::after { 953 outline: 2px solid var(--theme-palette-color-4); 954 outline-offset: -2px; 955 } 956`,u=r.Ay.div` 957 font-size: ${e=>e.$phone?"13px":"12px"}; 958 line-height: ${e=>e.$phone?1.35:1.4}; 959 color: var(--theme-palette-color-3); 960 ${e=>e.$wrap?"":"overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"} 961`,g=r.Ay.div` 962 position: relative; 963 z-index: 1; 964 display: flex; 965 margin-top: ${e=>e.$phone?"6px":"4px"}; 966`,m=r.Ay.div` 967 display: flex; 968 flex-direction: column; 969 align-items: flex-end; 970 gap: ${e=>e.$phone?"8px":"7px"}; 971 padding-top: 2px; 972 time { 973 font-size: ${e=>e.$phone?"12px":"11.5px"}; 974 color: ${o.Q.muted}; 975 white-space: nowrap; 976 } 977`,f=r.Ay.span` 978 width: 8px; 979 height: 8px; 980 border-radius: 50%; 981 background: ${o.Q.unread}; 982`,x=r.Ay.div` 983 display: grid; 984 grid-template-columns: ${e=>e.$phone?"36px":"32px"} minmax(0, 1fr); 985 gap: 10px; 986 padding: ${e=>e.$phone?"12px 16px":"10px"}; 987 > span { 988 ${s} 989 border-radius: 8px; 990 background: ${i}; 991 } 992 > div { 993 display: flex; 994 flex-direction: column; 995 gap: 6px; 996 padding-top: 3px; 997 } 998 i { 999 display: block; 1000 height: 11px; 1001 width: 80%; 1002 border-radius: 3px; 1003 background: ${i}; 1004 } 1005 i + i { 1006 height: 9px; 1007 width: 55%; 1008 } 1009`;n.d(t,["A",0,i,"A6",0,x,"EQ",0,a,"NJ",0,p,"Pr",0,u,"XV",0,f,"Yx",0,c,"cW",0,m,"dC",0,d,"dS",0,g,"pJ",0,h,"y6",0,l])},66556(e,t,n){n.d(t,{zi:()=>T,nX:()=>E,XI:()=>L,NL:()=>M,jx:()=>I,WP:()=>S,$:()=>z,LN:()=>w,Dl:()=>F});var r=n(17402),o=n(55115),i=n(34139),a=n(64900),l=n(95117),s=n(29747),d=n(74908),c=n(12434),p=n(76052);const h=e=>`dotgg_bell_else:${e}`;function u(e){try{const t=JSON.parse(p.Ar.getItem(h(e))??"{}");return"object"!=typeof t||null===t?{}:Object.fromEntries(Object.entries(t).filter(e=>"number"==typeof e[1]))}catch{return{}}}function g(e,t){const n=Object.fromEntries(t.map(e=>[e.game,e.unseen]));return p.Ar.setItem(h(e),JSON.stringify(n)),n}function m(e,t,n){const r=new Map(n.map(e=>[e.game,e.unseen])),o={};let i=!1;for(const[e,n]of Object.entries(t)){const t=r.get(e)??0;t<n&&(i=!0),t>0&&(o[e]=Math.min(n,t))}return i?(p.Ar.setItem(h(e),JSON.stringify(o)),o):t}let f=null,x="",v=!1,y=!1;function w(){const e=y;return y=!1,e}const b=new Set,$={maxId:0,unseen:0,trade:0,elsewhere:0,sig:0};function k(){return f??={loaded:!1,items:[],unseen:0,trade:[],tradeUnread:0,tradeMatches:0,matchCards:[],intro:null,introSeen:(0,s.aB)()||(0,s.p0)("bell-intro"),introThisVisit:!1,elsewhere:[],elsewhereUnseen:0,follows:[],dmRequests:0,dmRequestRows:[],dmUnread:0,clearing:"idle",elseSeen:{}},f}function Y(e){f={...k(),...e},b.forEach(e=>e())}async function A(e=!1){try{const t=await(0,o.wb)(x,{fresh:e});Y({loaded:!0,items:t.notifications,unseen:t.unseen,trade:t.trade??[],tradeUnread:t.trade_unread??0,tradeMatches:t.trade_matches??0,matchCards:t.trade_match_cards??[],intro:t.trade_intro??null,elsewhere:t.elsewhere??[],elsewhereUnseen:t.elsewhere_unseen??0,elseSeen:m(x,k().elseSeen,t.elsewhere??[]),follows:t.follows??[],dmRequests:t.dm_requests??0,dmRequestRows:t.dm_request_rows??[],dmUnread:t.dm_unread??0}),$.maxId=t.max_id,$.unseen=t.unseen,$.trade=1e5*(t.trade_unread??0)+(t.trade_matches??0),$.elsewhere=t.elsewhere_unseen??0,$.sig=t.sig??0}catch{}}async function C(){if("visible"===document.visibilityState)try{const e=await(0,o.ED)(x);e.max_id===$.maxId&&e.unseen===$.unseen&&1e5*e.trade_unread+e.trade_matches===$.trade&&e.elsewhere_unseen===$.elsewhere&&e.sig===$.sig||await A()}catch{}}function F(e=""){const[t,n]=(0,r.J0)(k);return(0,r.vJ)(()=>{const t=()=>n(k());return b.add(t),function(e=""){if(v||!window.DotGGUser)return;v=!0,x=(0,d.v)(e||c.Ay.TheGame.toLowerCase()),y=(0,i.rX)(),Y({elseSeen:u(x)});let t=!1;A(),setInterval(()=>{C()},3e5),document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&(t?(t=!1,A(!0)):C())});const n=()=>{A(!0)};window.addEventListener(l.e9,n),window.addEventListener(a.fQ,n),window.addEventListener("storage",e=>{e.key===a.lj&&("visible"===document.visibilityState?n():t=!0)})}(e),t(),()=>{b.delete(t)}},[e]),t}function D(e){return null!==e.intro&&0===e.tradeUnread&&0===e.tradeMatches&&0===e.trade.length}function S(e){return D(e)&&(!e.introSeen||e.introThisVisit)}function I(e){return D(e)&&!e.introSeen}function z(e){return e.unseen+e.tradeUnread+(e.tradeMatches>0?1:0)+(I(e)?1:0)}function T(e){return z(e)+(t=e.elseSeen,e.elsewhere.reduce((e,n)=>e+Math.max(0,n.unseen-(t[n.game]??0)),0));var t}async function E(){const e=k();if(D(e)&&!e.introSeen&&((0,s.Y_)("bell-intro",3650),Y({introSeen:!0,introThisVisit:!0})),Y({elseSeen:g(x,e.elsewhere)}),!(e.unseen<=0))try{await(0,o.Un)(x),$.unseen=0,Y({unseen:0,items:k().items.map(e=>({...e,unseen:!1}))})}catch{}}async function L(){Y({clearing:"busy"});try{await(0,o.B)(x),$.unseen=0,Y({items:[],follows:[],unseen:0,introThisVisit:!1,clearing:"idle"})}catch{Y({clearing:"failed"})}}function M(e){Y({follows:k().follows.filter(t=>t.id!==e)})}},64900(e,t,n){n.d(t,{jP:()=>a});var r=n(76052);const o="dotgg:bell-refresh",i="dotgg_bell_dirty";
1009function a(){r.Ar.setItem(i,String(Date.now())),window.dispatchEvent(new Event(o))}n.d(t,["fQ",0,o,"lj",0,i])},70526(e,t,n){n.d(t,{n:()=>i});const r="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit";let o=null;function i(){return"undefined"==typeof window?Promise.reject(new Error("No window")):window.turnstile?Promise.resolve():o||(o=new Promise((e,t)=>{const n=document.querySelector(`script[src^="${r.split("?")[0]}"]`);if(n)return n.addEventListener("load",()=>e()),void n.addEventListener("error",()=>t(new Error("Turnstile load failed")));const o=document.createElement("script");o.src=r,o.async=!0,o.defer=!0,o.onload=()=>e(),o.onerror=()=>t(new Error("Turnstile load failed")),document.head.appendChild(o)}),o)}},72134(e,t,n){n.d(t,{N:()=>o});var r=n(66556);function o(){const e=(0,r.Dl)();return{dmUnread:e.dmUnread,dmRequests:e.dmRequests,tradeUnread:e.tradeUnread,tradeNeedsAnswer:e.trade.filter(e=>"pending"===e.status&&"incoming"===e.direction).length,loaded:e.loaded}}},20347(e,t,n){n.d(t,{$:()=>s,e:()=>d});var r=n(35661),o=n(86031),i=n(12434),a=n(7204),l=n(2347);function s(e,t=""){if("hub"===(0,a.ai)())return function(e,t){const n=(0,l.l)();switch(e){case"profile":return t?(0,a.at)(`@${encodeURIComponent(t.toLowerCase())}/`):(0,a.at)("settings/");case"messages":return n?`${n.url}u/me/messages/`:null;case"requests":return n?`${n.url}u/me/messages/?view=requests`:null;case"trades":case"collection":return null;case"settings":return(0,r.aY)();case"notifications":return(0,r.aY)("notifications");case"following":return(0,r.aY)("following")}}(e,t);switch(e){case"profile":return(0,a.at)("u/me/");case"messages":return(0,a.at)("u/me/messages/");case"requests":return(0,a.at)("u/me/messages/?view=requests");case"trades":return o.SA.collection.collectionCanTrade?(0,a.at)("trade/inbox/"):null;case"collection":return function(){if("game"!==(0,a.ai)())return!1;const e=o.SA.core.userProfileTabs;return!e||e.includes("collection")}()?(0,a.at)("collection/"):null;case"settings":return(0,r.aY)();case"notifications":return(0,r.aY)("notifications");case"following":return(0,r.aY)("following")}}function d(e){const t=new URL(e.replace(/^\//,""),"https://dotgg.gg/");return"hub"!==(0,a.ai)()&&t.searchParams.set("from",`${window.location.host}${"/"===i.Ay.BASE_FOLDER?"":i.Ay.BASE_FOLDER.replace(/\/$/,"")}`),t.toString()}},7204(e,t,n){n.d(t,{ai:()=>o,l2:()=>a,vf:()=>i});var r=n(12434);function o(){const e=r.Ay.TheGame.toLowerCase();return"dotgg"===e?"hub":e?"game":"comments"}function i(){const e=document.querySelector("[data-id='logo'] a[href], a.site-logo-container[href]"),t=r.Ay.BASE_URL||e?.href||`${window.location.origin}/`;return t.endsWith("/")?t:`${t}/`}function a(){return"undefined"==typeof document?"/":new URL(i()).pathname}n.d(t,["at",0,e=>new URL(e,i()).toString()])},2347(e,t,n){n.d(t,{l:()=>l});var r=n(76052);const o="dotgg_hub_from",i=/^([a-z0-9-]+\.)+[a-z]{2,}(\/[a-z0-9-]+)?$/i;let a;function l(){if(void 0!==a)return a;const e=function(){const e=new URLSearchParams(window.location.search),t=e.get("from");if(t&&i.test(t))return t.toLowerCase();const n=e.get("returl");if(!n)return null;try{const e=new URL(n).host.toLowerCase();return e!==window.location.host&&i.test(e)?e:null}catch{return null}}();e&&r.Ar.setItem(o,JSON.stringify({from:e,at:Date.now()}));const t=(e??function(){try{const e=r.Ar.getItem(o);if(!e)return null;const t=JSON.parse(e);if("object"!=typeof t||null===t||!("from"in t)||!("at"in t))return null;const{from:n,at:a}=t;return"string"==typeof n&&"number"==typeof a&&Date.now()-a<864e5&&i.test(n)?n:null}catch{return null}}())?.replace(/^www\./,"")??null;return a=t?{host:t.split("/")[0]??t,label:t,url:`https://${t}/`}:null,a}},7225(e,t,n){var r=n(10201),o=(n(17402),n(79407)),i=n(86031),a=n(98597);const l=["sortby","sortorder","clear","textSearch"];n.d(t,["F",0,({filterKey:e,theFilters:t,request:n,filterchange:s,prefixLabel:d,labeled:c,inQuery:p})=>{const h=!l.includes(e),u=n[e]?.toString()||"",g=h&&u?u.split(",").map(e=>e.trim()).filter(e=>""!==e):[],m=h?t?.filter(e=>g.some(t=>e.value.toString().toLowerCase()===t.toLowerCase()))??[]:t?.find(e=>e.value.toString().toLowerCase()===u.toLowerCase()),f=t?.find(e=>""===e.value),x=p?"in query":d||c?"Any":f?.displayLabel||f?.label||"Select...";return(0,r.Y)(o.R,{prefixLabel:d,value:m,onChange:t=>{if(h&&Array.isArray(t)){const n=t.map(e=>e.value).join(",");s(n,e)}else Array.isArray(t)||s(t.value,e)},options:t??[],isMulti:h,placeholder:x,searchPlaceholder:`Search ${(0,a.v)(e,t)}â¦`,highlight:!0===p||h&&g.length>0||!h&&-1!==(t?.findIndex(e=>e.value.toString()===u)??-1)&&""!==u,doubleWidth:!0===i.SA.cards.filterExtraConfig?.[e]?.doubleWidth,elementsFlexBasis:"50%"===i.SA.cards.filterExtraConfig?.[e]?.elementsFlexBasis?"50%":void 0,isSearchable:!0,formatOptionLabel:e=>e.labelElement||(0,r.Y)(r.FK,{children:e.label})})},"S",0,l])},11116(e,t,n){var r=n(10201),o=n(17402),i=n(36110);const a=(0,o.q6)(null);n.d(t,["C",0,()=>(0,o.NT)(a)||{navigationState:{cards:[],currentIndex:-1,isNavigating:!1},setNavigationCards:()=>{},setCurrentCardIndex:()=>{},navigateToCard:()=>null,getCurrentCard:()=>null,getNavigationInfo:()=>({current:0,total:0,hasNext:!1,hasPrev:!1}),clearNavigation:()=>{}},"W",0,({children:e})=>{const[t,n]=(0,o.J0)({cards:[],currentIndex:-1,isNavigating:!1}),l=(0,o.hb)((e,t)=>{n(n=>{const r=t??(n.currentIndex>
1009=0?n.cards[n.currentIndex]?.id:void 0);let o=r?e.findIndex(e=>e.id===r):-1;if(o<0&&r){const t=(0,i._x)([...n.cards,...e]),a=t(r),l=new Set(n.cards.map(e=>e.id)),s=e.flatMap((e,n)=>t(e.id)===a?[n]:[]);o=s.find(t=>!l.has(e[t].id))??s[0]??-1}return o<0&&n.currentIndex>=0&&(o=Math.min(n.currentIndex,e.length-1)),{cards:e,currentIndex:Math.max(0,o),isNavigating:e.length>1}})},[]),s=(0,o.hb)(e=>{if(!t.isNavigating||0===t.cards.length)return null;let r=t.currentIndex;if("next"===e&&t.currentIndex<t.cards.length-1)r=t.currentIndex+1;else{if(!("prev"===e&&t.currentIndex>0))return null;r=t.currentIndex-1}return n(e=>({...e,currentIndex:r})),t.cards[r]?.id||null},[t]),d=(0,o.hb)(()=>t.currentIndex>=0&&t.currentIndex<t.cards.length?t.cards[t.currentIndex]:null,[t]),c=(0,o.hb)(e=>{n(t=>{const n=t.cards.findIndex(t=>t.id===e);return n>=0?{...t,currentIndex:n}:t})},[]),p=(0,o.hb)(()=>({current:t.currentIndex+1,total:t.cards.length,hasNext:t.currentIndex<t.cards.length-1,hasPrev:t.currentIndex>0}),[t]),h=(0,o.hb)(()=>{n({cards:[],currentIndex:-1,isNavigating:!1})},[]),u=(0,o.Kr)(()=>({navigationState:t,setNavigationCards:l,setCurrentCardIndex:c,navigateToCard:s,getCurrentCard:d,getNavigationInfo:p,clearNavigation:h}),[t,l,c,s,d,p,h]);return(0,r.Y)(a.Provider,{value:u,children:e})}])},4941(e,t,n){n.d(t,{X:()=>Y});var r=n(10201),o=n(17402),i=n(63679),a=n(70213),l=n(86031);const s=({card:e})=>{const t=l.SA.cards.rarityIcons?.[e.rarity];if(t)return(0,r.Y)(d,{src:t,alt:e.rarity});const n=e.colorsList?.[0]??e.color,o=n?l.SA.core.gameColors[n]?.icon:void 0;return o?(0,r.Y)(d,{src:o,alt:n}):l.SA.cards.cardDetailsIcon?l.SA.cards.cardDetailsIcon:(0,r.Y)(a.sm,{})},d=i.Ay.img` 1010 display: block; 1011 width: 20px; 1012 height: 20px; 1013 object-fit: contain; 1014`;var c=n(40664);const p=e=>(0,r.Y)(c.i,{...e,itemType:"card"}),h=e=>(0,r.Y)(c.Z,{...e});var u=n(11116),g=n(55622),m=n(51900),f=n(21204),x=n(30174),v=n(84668);const y=()=>Promise.all([n.e(53),n.e(9315),n.e(1546),n.e(116),n.e(3202),n.e(4114),n.e(5341),n.e(7635),n.e(2238),n.e(6800)]).then(n.bind(n,12238)),w=(0,v.A)({loader:y,loading:()=>(0,r.Y)(x.l,{}),render(e,t){const n=e.CardDetail;return(0,r.Y)(n,{...t})}});let b=!1;var $=n(91181),k=n(12434);const Y=({cardId:e,show:t})=>{const[n,i]=(0,o.J0)(!1),[a,d]=(0,o.J0)(e),[c,x]=(0,o.J0)(0),v=(0,$.Yx)(),Y=(0,u.C)(),S=$.jb.getMap().get(a),I=(void 0!==S&&v?.[S]?.id===a?v[S]:void 0)??v?.find(e=>e.id===a),z=Y.getNavigationInfo(),T=n;(0,o.vJ)(()=>{if(!n)return;const e=e=>{if("ArrowLeft"===e.key||"ArrowRight"===e.key){e.preventDefault();const t="ArrowLeft"===e.key?"prev":"next",n=Y.navigateToCard(t);n&&d(n)}else"Escape"===e.key&&i(!1)};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[n,Y]),(0,o.vJ)(()=>{t>0&&t!==c&&(x(t),d(e),i(!0),Y.navigationState.isNavigating&&Y.setCurrentCardIndex(e))},[t,e,Y,c]),(0,o.vJ)(()=>{if(Y.navigationState.isNavigating&&n){const e=Y.navigationState.cards[Y.navigationState.currentIndex]?.id;e&&e!==a&&d(e)}},[Y.navigationState.currentIndex,Y.navigationState.isNavigating,a,n]);const E=e=>{const t=Y.navigateToCard(e);t&&d(t)};if((0,o.vJ)(()=>{!function(){if(b||"undefined"==typeof window)return;b=!0;const e=()=>{y().catch(()=>{b=!1})},t=window.requestIdleCallback;t?t(e):setTimeout(e,1200)}()},[]),(0,o.vJ)(()=>()=>{i(!1)},[]),!I)return null;const L=Y.navigationState.isNavigating,M=l.SA.cards.getCardDetailConf(),N=M.detailTitle?.(I)??l.SA.cards.getCardName(I),P=M.detailSubtitle?.(I)??void 0;return(0,r.Y)(m.qp,{header:N,subtitle:P,width:M.detailV2?1120:void 0,show:T,onClose:e=>{switch(e){case"details":window.open(`${k.Ay.BASE_URL}${l.SA.cards.cardLinkBase.replace(/^\//,"")}${I.slug}`);break;case"close":case"cancel":i(!1)}},promptbuttons:[{label:"More Details",id:"details",icon:f.Y}],headerIcon:(0,r.Y)(s,{card:I}),footerCenter:L&&z.total>1?(0,r.FD)(F,{children:[(0,r.Y)(D,{children:(0,r.Y)(p,{direction:"left",onClick:()=>E("prev"),disabled:!z.hasPrev})}),(0,r.Y)(h,{inline:!0,current:z.current,total:z.total}),(0,r.Y)(D,{children:(0,r.Y)(p,{direction:"right",onClick:()=>E("next"),disabled:!z.hasNext})})]}):void 0,children:(0,r.FD)(A,{children:[L&&(0,r.FD)(C,{children:[(0,r.Y)(p,{direction:"left",onClick:()=>E("prev"),disabled:!z.hasPrev}),(0,r.Y)(p,{direction:"right",onClick:()=>E("next"),disabled:!z.hasNext})]}),(0,r.Y)(g.o,{width:"100%",height:"100%",children:(0,r.Y)(w,{cardId:a,onlyKeyFacts:!0})})]})})},A=i.Ay.div` 1015 position: relative; 1016 width: 100%; 1017 height: 100%; 1018 1019 /* Ensure navigation arrows can extend outside the container */ 1020 overflow: visible; 1021`,C=i.Ay.div` 1022 @media only screen and (max-width: 768px) { 1023 display: none; 1024 } 1025`,F=i.Ay.div` 1026 display: inline-flex; 1027 align-items: center; 1028 gap: 10px; 1029`,D=i.Ay.span` 1030 display: none; 1031 @media only screen and (max-width: 768px) { 1032 display: inline-flex; 1033 } 1034`},95697(e,t,n){var r=n(10201),o=n(17402),i=n(1070),a=n(54958),l=(n(39583),n(98597)),s=n(8609),d=n(7225),c=n(24811);const p=({label:e,value:t,title:n,onRemove:o})=>(0,r.FD)(s.tK,{onClick:o,title:n,children:[(0,r.Y)(s.Nu,{children:e}),t,i.q8]}),h=({hidden:e,expanded:t,onToggle:n})=>(0,r.Y)(s.tK,{onClick:n,title:t?"Collapse this filter's values":"Show every selected value",children:t?"Show less":`+${e} more`});n.d(t,["n",0,({filters:e,activeFilters:t,invertFilters:n,deckbuilder:i,filterLogicAnd:u,dynamicFilters:g,labeledFilters:m,filterchange:f,queryChips:x,extraChips:v=[]})=>{const[y,w]=(0,o.J0)({});if(0===t.length&&0===v.length&&!x?.length)return null;const b=(e,t)=>{const n=g[e]?.find(e=>e.value.toString().toLowerCase()===t.toLowerCase());return n?.label??t};return(0,r.FD)(c.v2,{children:[n&&!i&&(0,r.Y)(s.gs,{children:"Inverse filter mode"}),Object.keys(e).map(t=>{const n=e[t];if("invertFilters"===t||"textSearch"===t&&x||"filterLogicAnd"===t||""===n||void 0===n)return null;const i=n.toString(),a=m[t]?m[t].replace(":","").trim():(0,l.v)(t,g[t]),s="color"===t&&u?`${a} (all)`:a,c=d.S.includes(t),v=c?[i]:i.split(",").map(e=>e.trim()).filter(e=>""!==e),$=!0===y[t],k=v.length>6,Y=k&&!$?v.slice(0,6):v;return(0,r.FD)(o.Ay.Fragment,{children:[Y.map(e=>{const n="sortby"===t&&e.includes(",")?e.split(",").map(e=>b(t,e.trim())).join(" â "):b(t,e);return(0,r.Y)(p,{label:s,value:n,title:`Remove ${a}: ${n}`,onRemove:()=>
1034{f(c?"":v.filter(t=>t!==e).join(","),t)}},`${t}-${e}`)}),k&&(0,r.FD)(r.FK,{children:[(0,r.Y)(h,{hidden:v.length-6,expanded:$,onToggle:()=>w(e=>({...e,[t]:!$}))}),(0,r.Y)(p,{label:s,value:`Clear all ${v.length}`,title:`Remove every ${a} value`,onRemove:()=>f("",t)})]})]},t)}),(0,r.Y)(a.T,{chips:x}),v.map(e=>(0,r.Y)(p,{label:e.label,value:e.value,title:`Remove ${e.label}: ${e.value}`,onRemove:e.onRemove},`${e.label}-${e.value}`)),(0,r.FD)(s.x4,{children:[t.length+v.length+(x?.length??0)," active"]}),(0,r.Y)(s.n3,{onClick:()=>{f(void 0,"clear")},title:"Clear all filters",children:"Clear all"})]})}])},29026(e,t,n){var r=n(10201),o=n(17402),i=n(24811),a=n(79407),l=n(86031),s=n(4738),d=n(8609),c=n(472);n.d(t,["I",0,({onProviderChange:e,labelOnTop:t})=>{const n=l.SA.cards.priceProviders,p=l.SA.cards.defaultPriceProvider||"tcgplayer",h=n?.[0]?.cookieName||"price-provider",[u,g]=(0,o.J0)((0,s.Ri)(h)||p);if(!n||0===n.length)return null;const m=n.map(e=>({value:e.id,label:`${e.name} (${e.currency})`})),f=m.find(e=>e.value===u),x=(0,r.Y)(a.R,{value:f,onChange:t=>{const n=t.value;g(n),(0,s.TV)(h,n,365),e?e(n):window.location.reload()},options:m,isSearchable:!1,placeholder:"Select Provider",highlight:!1});return t?(0,r.FD)(i.id,{children:[(0,r.Y)(i.dh,{children:"Price Source"}),x]}):(0,r.FD)(c.l,{children:[(0,r.Y)(d.ph,{children:"Price:"}),x]})}])},75279(e,t,n){n.d(t,{M6:()=>d,NL:()=>s,fe:()=>l});var r=n(10201),o=n(17402),i=n(63679),a=n(73734);function l({word:e}){return e.icon?(0,r.Y)(c,{src:e.icon,alt:e.label,title:e.label}):(0,r.Y)(r.FK,{children:e.label})}function s({values:e}){return(0,r.Y)(r.FK,{children:(t=e.map(e=>(0,r.Y)(l,{word:(0,a.wg)(e)},e)),t.map((e,n)=>(0,r.FD)(o.FK,{children:[n>0&&(n===t.length-1?" or ":", "),e]},n)))});var t}function d({scope:e,filtered:t,plural:n,lead:o,withOwned:i}){const l=e.set.map(a.x5);return(0,r.FD)(r.FK,{children:[o,t&&"filtered ",e.rarity.length>0&&(0,r.FD)(r.FK,{children:[(0,r.Y)(s,{values:e.rarity})," "]}),n?"cards":"card",l.length>0&&` in ${l.join(", ")}`,i&&e.owned&&`, ${(0,a.RX)(e.owned)}`]})}const c=i.Ay.img` 1035 display: inline-block; 1036 height: 1.05em; 1037 width: auto; 1038 vertical-align: -0.16em; 1039`},55063(e,t,n){var r=n(63679),o=n(63099),i=n(28297),a=n(43626);const l=r.Ay.ul` 1040 display: flex; 1041 flex-direction: column; 1042 gap: 6px; 1043 margin: 0; 1044 padding: 0; 1045 list-style: none; 1046`,s=r.Ay.li` 1047 display: grid; 1048 grid-template-columns: 14px minmax(0, 1fr); 1049 column-gap: 9px; 1050 font-size: 12.5px; 1051 line-height: 1.45; 1052 color: var(--theme-palette-color-3); 1053 svg { 1054 margin-top: 2px; 1055 color: ${o.nX.good}; 1056 } 1057 b { 1058 color: var(--theme-palette-color-4); 1059 font-weight: 600; 1060 } 1061`,d=r.Ay.div` 1062 display: flex; 1063 flex-direction: column; 1064 border-radius: 6px; 1065 overflow: hidden; 1066 ${e=>{return t=e.$tone,r.AH` 1067 border: 1px solid 1068 ${"warn"===t?`color-mix(in srgb, ${o.nX.warn} 45%, transparent)`:"var(--theme-palette-color-5)"}; 1069 background: ${"warn"===t?`color-mix(in srgb, ${o.nX.warn} 7%, var(--theme-palette-color-7))`:"var(--theme-palette-color-7)"}; 1070`;var t}} 1071`,c=r.Ay.div` 1072 display: flex; 1073 align-items: flex-start; 1074 gap: 12px; 1075 padding: 12px; 1076 /* The switch is drawn for a color-8 surface; on this color-7 box its off 1077 track would vanish, so it takes the surface color here (Claude Design 1g). */ 1078 ${a.wL} { 1079 background-color: var(--theme-palette-color-8); 1080 } 1081`,p=r.Ay.div` 1082 flex: 1; 1083 display: flex; 1084 flex-direction: column; 1085 gap: 3px; 1086 min-width: 0; 1087 font-size: 12px; 1088 line-height: 1.45; 1089 text-wrap: pretty; 1090 color: ${e=>e.$warn?o.nX.warn:"var(--theme-palette-color-3)"}; 1091 > strong { 1092 font-size: 13px; 1093 font-weight: 600; 1094 color: var(--theme-palette-color-4); 1095 } 1096 b { 1097 color: var(--theme-palette-color-4); 1098 font-weight: 600; 1099 } 1100`,h=r.Ay.div` 1101 display: flex; 1102 flex-wrap: wrap; 1103 gap: 8px; 1104 margin-top: 6px; 1105`,u=r.Ay.button` 1106 display: inline-flex; 1107 align-items: center; 1108 gap: 6px; 1109 height: 30px; 1110 padding: 0 12px; 1111 border-radius: 6px; 1112 background: none; 1113 font-family: inherit; 1114 font-size: 12.5px; 1115 font-weight: 700; 1116 white-space: nowrap; 1117 cursor: pointer; 1118 border: 1px solid 1119 ${e=>"warn"===e.$tone?`color-mix(in srgb, ${o.nX.warn} 60%, transparent)`:"var(--theme-palette-color-1)"}; 1120 color: ${e=>"warn"===e.$tone?o.nX.warn:"var(--theme-palette-color-1)"}; 1121 &:hover { 1122 background: color-mix(in srgb, currentColor 10%, transparent); 1123 } 1124 @media only screen and ${i.E0} { 1125 height: ${44}px; 1126 } 1127`,g=r.Ay.div` 1128 padding: 6px 14px 4px; 1129 border-top: 1px solid color-mix(in srgb, var(--theme-palette-color-5) 55%, transparent); 1130 background: var(--theme-palette-color-8); 1131 font-size: 10.5px; 1132 font-weight: 700; 1133 letter-spacing: 0.07em; 1134 text-transform: uppercase; 1135 color: var(--theme-palette-color-3); 1136`,m=r.Ay.div` 1137 display: flex; 1138 align-items: flex-start; 1139 gap: 9px; 1140 padding: 10px 12px; 1141 border-radius: 6px; 1142 border: 1px solid color-mix(in srgb, ${o.nX.error} 45%, transparent); 1143 background: color-mix(in srgb, ${o.nX.error} 10%, transparent); 1144 font-size: 12.5px; 1145 line-height: 1.45; 1146 color: ${o.nX.error}; 1147 svg { 1148 flex: none;
1149 margin-top: 1px; 1150 } 1151 button { 1152 padding: 0; 1153 border: none; 1154 background: none; 1155 color: inherit; 1156 font: inherit; 1157 text-decoration: underline; 1158 cursor: pointer; 1159 } 1160`,f=r.Ay.div` 1161 display: flex; 1162 flex-direction: column; 1163 align-items: flex-start; 1164 gap: 16px; 1165 padding: 10px 0 6px; 1166`,x=r.Ay.span` 1167 display: inline-flex; 1168 align-items: center; 1169 justify-content: center; 1170 width: 44px; 1171 height: 44px; 1172 border-radius: 6px; 1173 color: ${o.nX.good}; 1174 background: ${o.nX.goodBg}; 1175 border: 1px solid color-mix(in srgb, ${o.nX.good} 34%, transparent); 1176`,v=r.Ay.div` 1177 display: flex; 1178 flex-direction: column; 1179 gap: 8px; 1180 max-width: 600px; 1181 font-size: 13px; 1182 line-height: 1.5; 1183 color: var(--theme-palette-color-3); 1184 text-wrap: pretty; 1185 b { 1186 color: var(--theme-palette-color-4); 1187 font-weight: 600; 1188 } 1189 > p { 1190 margin: 0; 1191 } 1192 > p:first-child { 1193 font-size: 17px; 1194 line-height: 1.35; 1195 color: var(--theme-palette-color-4); 1196 b { 1197 font-weight: 700; 1198 } 1199 } 1200 > small { 1201 font-size: 12px; 1202 } 1203`,y=r.Ay.div` 1204 display: flex; 1205 flex-wrap: wrap; 1206 gap: 8px; 1207`,w=r.Ay.span` 1208 flex: none; 1209 width: 13px; 1210 height: 13px; 1211 border-radius: 50%; 1212 border: 2px solid color-mix(in srgb, currentColor 30%, transparent); 1213 border-top-color: currentColor; 1214 box-sizing: border-box; 1215 animation: rule-spin 0.8s linear infinite; 1216 @keyframes rule-spin { 1217 to { 1218 transform: rotate(360deg); 1219 } 1220 } 1221 @media (prefers-reduced-motion: reduce) { 1222 animation: none; 1223 } 1224`,b=r.Ay.span` 1225 display: inline-flex; 1226 align-items: center; 1227 gap: 8px; 1228 color: var(--theme-palette-color-3); 1229`;n.d(t,["Aj",0,d,"Co",0,f,"H7",0,u,"Jl",0,s,"MO",0,g,"N5",0,y,"_2",0,p,"aQ",0,b,"aV",0,m,"ed",0,h,"h4",0,c,"ji",0,v,"rQ",0,x,"sR",0,l,"tK",0,w])},15096(e,t,n){var r=n(63679),o=n(28297);const i=r.Ay.div` 1230 display: flex; 1231 flex-direction: column; 1232 gap: 18px; 1233 transition: opacity 150ms ease; 1234 ${e=>e.$busy?"opacity: 0.45; pointer-events: none;":""} 1235`,a=r.Ay.div` 1236 display: flex; 1237 flex-direction: column; 1238 gap: 8px; 1239`,l=r.Ay.div` 1240 display: flex; 1241 flex-wrap: wrap; 1242 align-items: center; 1243 gap: 8px 10px; 1244 font-size: 18px; 1245 line-height: 1.3; 1246 font-weight: 500; 1247 color: var(--theme-palette-color-4); 1248 b { 1249 font-weight: 700; 1250 } 1251 @media only screen and ${o.E0} { 1252 font-size: 16px; 1253 } 1254`,s=r.Ay.span` 1255 color: var(--theme-palette-color-3); 1256`,d=r.Ay.button` 1257 display: inline-flex; 1258 align-items: center; 1259 gap: 8px; 1260 min-height: 38px; 1261 padding: 4px 12px; 1262 box-sizing: border-box; 1263 border: 1px solid var(--theme-palette-color-5); 1264 border-radius: 6px; 1265 background: var(--theme-palette-color-7); 1266 color: var(--theme-palette-color-4); 1267 font-family: inherit; 1268 font-size: 15px; 1269 font-weight: 700; 1270 line-height: 1.25; 1271 text-align: left; 1272 cursor: pointer; 1273 transition: border-color 150ms ease; 1274 svg { 1275 flex: none; 1276 } 1277 &:hover { 1278 border-color: var(--theme-palette-color-1); 1279 } 1280 &:focus-visible { 1281 outline: 2px solid var(--theme-palette-color-4); 1282 outline-offset: 1px; 1283 } 1284 @media only screen and ${o.E0} { 1285 min-height: ${44}px; 1286 font-size: 14px; 1287 } 1288`,c=r.Ay.div` 1289 display: flex; 1290 flex-wrap: wrap; 1291 align-items: center; 1292 gap: 4px 8px; 1293 font-size: 12px; 1294 color: var(--theme-palette-color-3); 1295 b { 1296 color: var(--theme-palette-color-4); 1297 font-weight: 600; 1298 } 1299 > span { 1300 white-space: nowrap; 1301 } 1302`,p=r.Ay.span` 1303 margin-left: auto; 1304 @media only screen and ${o.E0} { 1305 display: none; 1306 } 1307`,h=r.Ay.button` 1308 padding: 0; 1309 border: none; 1310 background: none; 1311 color: var(--theme-palette-color-1); 1312 font-family: inherit; 1313 font-size: inherit; 1314 font-weight: 600; 1315 white-space: nowrap; 1316 cursor: pointer; 1317 &:hover { 1318 color: var(--theme-palette-color-2); 1319 text-decoration: underline; 1320 text-underline-offset: 2px; 1321 } 1322 /* A 44px target on touch without making its line 44px tall. */ 1323 @media only screen and ${o.E0} { 1324 padding: 15px 0; 1325 margin: -15px 0; 1326 } 1327`,u=r.Ay.div` 1328 display: flex; 1329 flex-direction: column; 1330 border: 1px solid var(--theme-palette-color-5); 1331 border-radius: 6px; 1332 background: var(--theme-palette-color-7); 1333 overflow: hidden; 1334`,g=r.Ay.div` 1335 display: flex; 1336 flex-direction: column; 1337 gap: 10px; 1338 padding: 14px; 1339`,m=r.Ay.div` 1340 display: flex; 1341 align-items: center; 1342 flex-wrap: wrap; 1343 gap: 12px; 1344`,f=r.Ay.div` 1345 flex: 1; 1346 min-width: 220px; 1347 font-size: 15px; 1348 line-height: 1.35; 1349 color: var(--theme-palette-color-4); 1350`,x=r.Ay.b` 1351 font-size: 20px; 1352 font-weight: 800; 1353 font-variant-numeric: tabular-nums; 1354`,v=r.Ay.button` 1355 display: inline-flex; 1356 align-items: center; 1357 gap: 6px; 1358 height: 30px; 1359 padding: 0 10px; 1360 border: 1px solid var(--theme-palette-color-5); 1361 border-radius: 6px; 1362 background: none; 1363 color: var(--theme-palette-color-3); 1364 font-family: inherit; 1365 font-size: 12.5px; 1366 font-weight: 600; 1367 white-space: nowrap; 1368 cursor: pointer; 1369 transition: all 150ms ease; 1370 &:hover:not(:disabled) { 1371 color: var(--theme-palette-color-4); 1372 border-color: var(--theme-palette-color-3); 1373 } 1374 &:disabled { 1375 opacity: 0.45; 1376 cursor: default; 1377 } 1378 @media only screen and ${o.E0} { 1379 height: ${44}px; 1380 } 1381`,y=r.Ay.div` 1382 display: flex; 1383 gap: 2px; 1384 height: 8px; 1385 border-radius: 4px; 1386 overflow: hidden; 1387`,w=r.Ay.span` 1388 flex: ${e=>e.$share}; 1389 background: ${e=>e.$tone}; 1390`,b=r.Ay.div` 1391 display: flex; 1392 flex-wrap: wrap; 1393 align-items: center; 1394 gap: 6px 16px; 1395 font-size: 12px; 1396 color: var(--theme-palette-color-3); 1397 b { 1398 color: var(--theme-palette-color-4); 1399 font-weight: 600; 1400 } 1401`,$=r.Ay.span` 1402 display: inline-flex; 1403 align-items: center; 1404 gap: 6px; 1405 white-space: nowrap; 1406`,k=r.Ay.span` 1407 width: 8px; 1408 height: 8px; 1409 border-radius: 2px; 1410 background: ${e=>e.$tone}; 1411`,Y=r.Ay.span` 1412 margin-left: auto; 1413`,A=r.Ay.div` 1414 display: flex; 1415 flex-direction: column; 1416 align-items: flex-start; 1417 gap: 10px; 1418 padding: 16px 14px; 1419 font-size: 12.5px; 1420 line-height: 1.45; 1421 color: var(--theme-palette-color-3); 1422 strong { 1423 font-size: 15px; 1424 font-weight: 600; 1425 color: var(--theme-palette-color-4); 1426 } 1427`;n.d(t,["HP",0,p,"Hv",0,u,"Jv",0,$,"LV",0,v,"OL",0,h,"Pd",0,f,"Qt",0,l,"RY",0,i,"S1",0,y,"VY",0,m,"W2",0,a,"XP",0,g,"XR",0,c,"YK",0,A,"f1",0,d,"k2",0,w,"kK",0,s,"m_",0,Y,"rp",0,k,"s$",0,b,"tR",0,x])},77758(e,t,n){var r=n(63679),o=n(28297);const i=r.Ay.h2` 1428 color: ${e=>e.$color?e.$color:"var(--theme-headings-color)"}; 1429 ${e=>"background-color: "+(e.$bgcolor?e.$bgcolor:"var(--theme-palette-color-5)")+";"} 1430 display: flex; 1431 width: 100%; 1432 padding-left: 10px; 1433 border-radius: 10px 10px 0 0; 1434 justify-content: space-between; 1435 height: 60px; 1436 font-weight: bold; 1437 line-height: 1.3; 1438 font-size: 16px !important; 1439 align-items: center; 1440 ${e=>e.$gradient?"background-image: linear-gradient(90deg, "+e.$gradient[0]+", "+e.$gradient[1]+");":""} 1441 @media only screen and (max-width: 480px) { 1442 font-size: 0.9em; 1443 } 1444`,a=r.Ay.div` 1445 display: flex; 1446 flex-direction: column; 1447 width: 100%; 1448 @media only screen and ${o.E0} { 1449 flex-direction: row; 1450 align-items: ${e=>e.$wide?"flex-start":"center"}; 1451 flex-wrap: ${e=>e.$wide?"wrap":"nowrap"}; 1452 gap: 8px; 1453 min-width: 0; 1454 padding: 8px 10px; 1455 background: var(--theme-palette-color-8); 1456 ${e=>e.$wide?"grid-column: 1 / -1;":""} 1457 } 1458`,l=r.Ay.div` 1459 color: var(--theme-palette-color-4); 1460 border-radius: 6px; 1461 border: 1px solid var(--theme-palette-color-5); 1462 background-color: var(--theme-palette-color-8); 1463 font-weight: ${e=>e.$fontWeight?e.$fontWeight:"bold"}; 1464 display: flex; 1465 gap: 5px; 1466 justify-content: flex-start; 1467 align-items: center; 1468 padding: 6px 9px; 1469 flex-wrap: wrap; 1470 font-size: 0.85em; 1471 max-width: ${e=>e.$fixedWidth?e.$fixedWidth:"100%"}; 1472 @media only screen and ${o.E0} { 1473 flex: 1; 1474 min-width: 0; 1475 border: none; 1476 background: none; 1477 padding: 0; 1478 font-size: ${e=>e.$wide?"13.5px":"12.5px"}; 1479 font-weight: ${e=>e.$wide?"400":e.$fontWeight??"600"}; 1480 line-height: ${e=>e.$wide?"1.5":"1.3"}; 1481 } 1482`,s=r.Ay.div` 1483 display: flex; 1484 align-items: center; 1485 font-size: 0.75em; 1486 color: var(--theme-palette-color-3); 1487 @media only screen and ${o.E0} { 1488 flex: none; 1489 min-width: 52px; 1490 padding-top: 1px; 1491 font-size: 10px; 1492 font-weight: 700; 1493 text-transform: uppercase; 1494 letter-spacing: 0.04em; 1495 } 1496`,d=r.Ay.div` 1497 ${e=>e.$iconName?"background-image: url("+e.$iconName+");":""} 1498 background-size: contain; 1499 background-repeat: no-repeat; 1500 background-position: center; 1501 width: ${e=>e.$width?e.$width:"20"}px; 1502 height: ${e=>e.$width?e.$width:"20"}px; 1503 1504 text-align: center; 1505 line-height: ${e=>e.$width?+e.$width-(e.$verticalCorrection?+e.$verticalCorrection:0):20-(e.$verticalCorrection?+e.$verticalCorrection:0)}px; 1506 color: var(--theme-palette-color-4) !important; 1507 font-size: 1rem; 1508 text-shadow: 1px 1px 1px #000; 1509 ${e=>e.$addFilter?"filter: "+e.$addFilter+";":""} 1510`,c=r.Ay.div` 1511 ${e=>e.$iconName?"background-image: url("+e.$iconName+");":""} 1512 background-size: contain; 1513 background-repeat: no-repeat; 1514 background-position: center;
1515 width: 20px; 1516 height: 20px; 1517 text-align: center; 1518 line-height: 20px; 1519 color: var(--theme-palette-color-4) !important; 1520 font-size: 0.8em; 1521 text-shadow: 1px 1px 1px #000; 1522 ${e=>e.$addFilter?"filter: "+e.$addFilter+";":""} 1523`,p=r.Ay.div` 1524 ${e=>e.$icoUrl?"background-image: url("+e.$icoUrl+");":""} 1525 background-size: 20px; 1526 background-repeat: no-repeat; 1527 background-position: left; 1528 padding-left: 25px; 1529`,h=r.Ay.a` 1530 display: flex; 1531 flex-wrap: wrap; 1532 gap: 5px; 1533`,u=r.Ay.a` 1534 display: flex; 1535 gap: 5px; 1536 align-content: center; 1537 align-items: center; 1538`,g=r.Ay.div` 1539 display: flex; 1540 gap: 10px; 1541 background-color: var(--theme-palette-color-8); 1542 width: 100%; 1543 @media only screen and (max-width: 480px) { 1544 flex-direction: column; 1545 } 1546`,m=r.Ay.div` 1547 display: flex; 1548 gap: 5px; 1549 align-items: center; 1550 height: 22px; 1551`,f=r.Ay.div` 1552 display: grid; 1553 grid-template-columns: repeat(auto-fill, 135px); 1554 font-size: 0.65em; 1555 font-weight: 200; 1556 width: 100%; 1557`,x=r.Ay.div` 1558 padding: 0; 1559 font-size: 0.85em; 1560`,v=r.Ay.div` 1561 color: ${e=>"Foil"===e.$priceType?"#aa1cbd":"jp"===e.$priceType?"#b13038":"#2cd042"}; 1562 font-weight: bold; 1563 cursor: pointer; 1564 display: flex; 1565 align-items: center; 1566 padding: 6px 14px; 1567 border-radius: 6px; 1568 border: 1px solid var(--theme-palette-color-5); 1569 background-color: var(--theme-palette-color-7); 1570 &:hover { 1571 background-color: var(--theme-palette-color-6); 1572 } 1573`,y=r.Ay.span` 1574 background-color: var(--theme-palette-color-5); 1575 border: 1px solid var(--theme-palette-color-7); 1576 padding: 0px 6px; 1577 border-radius: 6px; 1578 color: var(--theme-palette-color-4); 1579 font-size: 0.9em; 1580 &:hover { 1581 border: 1px solid var(--theme-palette-color-4); 1582 } 1583`,w=r.Ay.div` 1584 width: 100%; 1585 margin-right: auto; 1586 margin-left: auto; 1587 display: flex; 1588 flex-wrap: wrap; 1589 gap: 10px; 1590 justify-content: center; 1591 @media only screen and (max-width: 800px) { 1592 max-width: unset; 1593 } 1594`,b=r.Ay.div` 1595 display: flex; 1596 width: 430px; 1597 min-height: 585px; /*lorcana: 600px*/ 1598 flex-direction: column; 1599 gap: 10px; 1600 @media only screen and ${o.E0} { 1601 align-items: center; 1602 } 1603 @media only screen and (max-width: 1000px) { 1604 width: 170px; 1605 min-height: unset; 1606 } 1607 @media only screen and (max-width: 500px) { 1608 width: 100%; 1609 min-height: unset; 1610 } 1611`,$=r.Ay.div` 1612 display: flex; 1613 gap: 10px; 1614 width: calc(100% - 440px); 1615 @media only screen and (max-width: 1000px) { 1616 width: calc(100% - 180px); 1617 } 1618 @media only screen and (max-width: 500px) { 1619 flex-wrap: wrap; 1620 width: 100%; 1621 } 1622`,k=r.Ay.div` 1623 display: flex; 1624 flex-direction: column; 1625 gap: 10px; 1626 height: 100%; 1627 width: 100%; 1628`,Y=r.Ay.div` 1629 flex-basis: ${e=>e.$basis?e.$basis:"auto"}; 1630 display: flex; 1631 flex-direction: column; 1632 justify-content: flex-start; 1633 align-items: flex-start; 1634 1635 background-color: var(--theme-palette-color-7); 1636 border-radius: 6px; 1637 padding: 0; 1638 flex-wrap: nowrap; 1639 width: 100%; 1640 color: var(--theme-palette-color-4); 1641 min-height: 585px; /*lorcana: 600px*/ 1642 border-radius: 6px; 1643 @media only screen and (max-width: 800px) { 1644 width: 100%; 1645 } 1646 /* A full empty screen per section on a phone â no. */ 1647 @media only screen and ${o.E0} { 1648 min-height: unset; 1649 } 1650`,A=r.Ay.div` 1651 display: flex; 1652 width: 100%; 1653 flex-wrap: wrap; 1654 padding: 10px; 1655 justify-content: center; 1656 flex-direction: row; 1657 gap: 10px; 1658 @media only screen and (max-width: 1300px) { 1659 flex-direction: column; 1660 } 1661 /* Phone summary card: one border, hairline grid between the facts. */ 1662 @media only screen and ${o.E0} { 1663 ${e=>e.$summary?"\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 1px;\n padding: 0;\n margin: 0 10px 10px;\n width: auto;\n background: var(--theme-palette-color-5);\n border: 1px solid var(--theme-palette-color-5);\n border-radius: 8px;\n overflow: hidden;\n ":""} 1664 } 1665`,C=r.Ay.section` 1666 display: grid; 1667 grid-template-columns: 1fr 1fr; 1668 gap: 10px; 1669 width: 100%; 1670 @media only screen and (max-width: 1300px) { 1671 grid-template-columns: 1fr; 1672 } 1673 /* Phone: the facts flow straight into the summary card's own grid. */ 1674 @media only screen and ${o.E0} { 1675 display: contents; 1676 } 1677`,F=r.Ay.div` 1678 width: 100%; 1679 padding: 10px; 1680`,D=r.Ay.div` 1681 padding: 20px; 1682 text-align: center; 1683 width: 100%; 1684`,S=r.Ay.div` 1685 display: flex; 1686 flex-direction: column; 1687 gap: 4px; 1688 width: 100%; 1689 padding: 10px; 1690 border-top: 1px solid var(--theme-palette-color-5); 1691 margin-top: auto; 1692`,I=r.Ay.div` 1693 font-size: 0.75em; 1694 font-weight: bold; 1695 text-transform: uppercase; 1696 color: var(--theme-palette-color-3); 1697 margin-bottom: 2px; 1698`,z=r.Ay.div` 1699 display: flex; 1700 align-items: center; 1701 justify-content: space-between; 1702 gap: 8px; 1703 flex-wrap: wrap; 1704 margin-bottom: 4px; 1705`;n.d(t,["Aq",0,m,"De",0,u,"Gm",0,D,"K4",0,C,"LX",0,d,"QL",0,v,"_X",0,i,"_t",0,b,"d4",0,A,"dN",0,a,"dY",0,h,"dd",0,p,"ds",0,Y,"eS",0,l,"el",0,x,"f4",0,f,"g9",0,y,"ij",0,z,"n5",0,w,"nm",0,F,"ot",0,c,"pB",0,I,"ro",0,s,"t1",0,k,"uw",0,$,"we",0,S,"yu",0,g])},31774(e,t,n){n.d(t,{Ib:()=>l,Mc:()=>a});var r=n(10201),o=n(9135),i=n(77758);function a(e,t){const n=e.map(o.Qm).filter(e=>void 0!==e),r=n[0];if(void 0===r)return{};const i=n[1]??r;switch(t){case"colorPair":return{$gradient:[r.color,r.colorDark]};
1705case"gradient":return{$gradient:[r.gradient?.[0]??r.color,i.gradient?.[1]??i.colorDark]};default:return n.length>1?{$gradient:[r.colorDark,i.colorDark]}:{$bgcolor:r.colorDark}}}function l(e){const{mode:t,colors:n,heading:o,textColor:l}=e;return function(e){const s=n?.(e)??e.colorsOverride??[e.card.color];return(0,r.Y)(i._X,{$color:l,...a(s,t),children:o(e)})}}n.d(t,["Dt",0,"var(--theme-palette-color-4)"])},76836(e,t,n){var r=n(12434);n.d(t,["k",0,(e,t)=>{if(void 0===e||""===e)return"";const n=e.replace("{field}",encodeURIComponent(t)).replace(/^\//,"");return`${r.Ay.BASE_FOLDER}${n}`}])},69404(e,t,n){n.r(t);var r=n(10201),o=n(17402),i=n(63679),a=n(33530),l=n(4941),s=n(22197),d=n(9299),c=n(2992),p=n(86031),h=n(91181),u=n(12434);const g=i.Ay.a` 1706 display: inline !important; 1707 color: ${e=>e.$color} !important; 1708 margin-bottom: 2px !important; 1709 border-bottom: dotted 1px !important; 1710 cursor: default !important; 1711 font-weight: bold !important; 1712 cursor: pointer !important; 1713`;n.d(t,["CardEmbed",0,({cardEmbedAtts:e,cardDirectId:t,findCardCallback:n})=>
1713{const i=(0,h.Yx)(),[m,f]=o.Ay.useState({showprompt:0});(0,o.vJ)(()=>{p.SA.decks.serverSideCardsLibrary&&t&&(0,a.$s)([t])},[t]);const x=(0,o.Kr)(()=>{if(!e&&!t)return null;const r=e?JSON.parse(e):void 0;if(!r?.name&&!t)return null;if(n&&i)return n(i,r?.name?r?.name:t);const o=p.SA.cards.filterConfig.find(e=>"listOverride"===e.type)?.field;return i?.find(e=>{let n=!1;return o.forEach(o=>{r?.name!==e[o]&&t!==e[o]||(n=!0)}),n})},[e,t,i]);return null==x?(0,r.Y)(r.FK,{children:t}):(0,r.FD)(d.t,{justhide:!0,children:[(0,r.Y)(c.C,{place:"bottom",mobileDisable:!0,content:(0,r.Y)(s.Uc,{cardSlug:x.slug,width:300,clickable:!1,withBackside:p.SA.cards.cardsHasBackside}),children:(0,r.Y)(g,{href:`${u.Ay.BASE_URL}cards/${x.slug}`,"data-native":!0,$color:p.SA.cards.getCardColor(x),onClick:e=>{e.preventDefault(),f({showprompt:m.showprompt+1})},children:p.SA.cards.getCardName(x)})}),(0,r.Y)(l.X,{cardId:x.id,show:m.showprompt})]})}])},35304(e,t,n){var r=n(63679),o=n(42715),i=n(28297);const a=r.Ay.div` 1714 display: grid; 1715 grid-template-columns: ${e=>e.$columns}; 1716 gap: 4px; 1717 align-items: center; 1718 padding: 4px 10px; 1719 border-radius: 4px; 1720 min-height: 30px; 1721 transition: background 0.15s ease; 1722 @media only screen and ${i.E0} { 1723 min-height: 44px; 1724 padding: 0 10px 0 0; 1725 border-radius: 0; 1726 border-bottom: 1px solid #20252b; 1727 } 1728 1729 &:hover { 1730 background: linear-gradient( 1731 160deg, 1732 rgba(255, 255, 255, 0.1) 0%, 1733 rgba(255, 255, 255, 0.03) 80%, 1734 rgba(237, 232, 244, 0.3) 100% 1735 ); 1736 } 1737`,l=r.Ay.div` 1738 position: fixed; 1739 top: ${e=>e.$top}px; 1740 left: ${e=>e.$left}px; 1741 z-index: 9999; 1742 pointer-events: none; 1743 1744 @media only screen and (max-width: 768px) { 1745 display: none; 1746 } 1747`,s=r.Ay.div` 1748 display: flex; 1749 align-items: center; 1750 gap: 6px; 1751 overflow: hidden; 1752 cursor: pointer; 1753 color: ${e=>e.$color||"var(--theme-palette-color-4)"}; 1754 min-width: 0; 1755 1756 &:hover { 1757 text-decoration: underline; 1758 } 1759 @media only screen and ${i.E0} { 1760 position: sticky; 1761 left: 0; 1762 z-index: 10; 1763 align-self: stretch; 1764 min-height: ${44}px; 1765 padding: 0 8px; 1766 background: var(--theme-palette-color-8); 1767 border-right: 1px solid var(--theme-palette-color-5); 1768 /* At rest a 1px rule and nothing else; the shadow arrives with the 1769 scroll, because a permanent one reads as a broken layout. */ 1770 [${o.P7}] & { 1771 box-shadow: 6px 0 8px rgba(0, 0, 0, 0.35); 1772 } 1773 } 1774 @media only screen and ${i.Ab} { 1775 padding: 0 6px; 1776 } 1777`,d=r.Ay.span` 1778 font-weight: 500; 1779 white-space: nowrap; 1780 overflow: hidden; 1781 text-overflow: ellipsis; 1782 font-size: 0.9em; 1783`,c=r.Ay.span` 1784 color: var(--theme-palette-color-3); 1785 font-size: 0.8em; 1786 white-space: nowrap; 1787 overflow: hidden; 1788 text-overflow: ellipsis; 1789 flex-shrink: 0; 1790`,p=r.Ay.div` 1791 display: flex; 1792 align-items: center; 1793 justify-content: ${e=>
1793"left"===e.$align?"flex-start":"right"===e.$align?"flex-end":"center"}; 1794 font-size: 0.85em; 1795 color: var(--theme-palette-color-3); 1796 min-width: 0; 1797`,h=r.Ay.span` 1798 display: flex; 1799 align-items: center; 1800 justify-content: center; 1801 min-width: 20px; 1802 height: 20px; 1803 border-radius: 50%; 1804 background-color: ${e=>e.$color||"var(--theme-palette-color-5)"}; 1805 color: var(--theme-palette-color-4); 1806 font-size: 0.7em; 1807 font-weight: 600; 1808 flex-shrink: 0; 1809`,u=r.Ay.div` 1810 display: flex; 1811 align-items: center; 1812 justify-content: center; 1813 width: 20px; 1814 height: 20px; 1815 1816 img { 1817 max-width: 100%; 1818 max-height: 100%; 1819 object-fit: contain; 1820 } 1821`,g=r.Ay.span` 1822 font-size: 0.7em; 1823 color: var(--theme-palette-color-3); 1824 font-family: monospace; 1825 white-space: nowrap; 1826`,m=r.Ay.span` 1827 font-weight: 500; 1828 font-size: 0.85em; 1829 color: var(--theme-palette-color-4); 1830 white-space: nowrap; 1831 /* Tabular is what makes a number column scannable at 12.5px; proportional 1832 digits make a price column look ragged and wrong. Phone only â it changes 1833 glyph widths, and desktop stays byte-identical this round. */ 1834 @media only screen and ${i.E0} { 1835 font-variant-numeric: tabular-nums; 1836 } 1837`,f=r.Ay.span` 1838 font-weight: 500; 1839 font-size: 0.8em; 1840 white-space: nowrap; 1841 color: ${e=>e.$positive?"#4caf50":e.$negative?"#f44336":"var(--theme-palette-color-3)"}; 1842 @media only screen and ${i.E0} { 1843 font-variant-numeric: tabular-nums; 1844 } 1845`,x=r.Ay.div` 1846 display: flex; 1847 flex-direction: column; 1848 border-radius: 6px; 1849 overflow: hidden; 1850 background-color: var(--theme-palette-color-8); 1851 padding: 4px; 1852 width: 100%; 1853 1854 @media only screen and (max-width: 768px) { 1855 overflow-x: auto; 1856 -webkit-overflow-scrolling: touch; 1857 } 1858 @media only screen and ${i.E0} { 1859 padding: 0; 1860 height: ${i.SW}; 1861 min-height: 320px; 1862 overflow: auto; 1863 /* The only gesture line needed: it stops a horizontal fling becoming a 1864 back-navigation and a vertical one becoming pull-to-refresh. Do NOT set 1865 touch-action â the browser picks the dominant axis better than we can. */ 1866 overscroll-behavior: contain; 1867 /* 320 sheds the pinned column's width; the row height and the numbers do 1868 not move, because shrinking those is how a table stops being readable 1869 and starts being a screenshot. */ 1870 --dotgg-phone-name-col: 132px; 1871 } 1872 @media only screen and ${i.Ab} { 1873 --dotgg-phone-name-col: 108px; 1874 } 1875`,v=r.Ay.div` 1876 display: none; 1877 @media only screen and ${i.E0} { 1878 display: flex; 1879 align-items: center; 1880 justify-content: center; 1881 gap: 5px; 1882 margin: 6px 0; 1883 font-size: 10px; 1884 font-weight: 600; 1885 color: var(--theme-palette-color-3); 1886 &::before { 1887 content: "â"; 1888 font-size: 12px; 1889 } 1890 } 1891`,y=r.Ay.div` 1892 display: grid; 1893 grid-template-columns: ${e=>e.$columns}; 1894 gap: 4px; 1895 align-items: center; 1896 padding: 6px 10px; 1897 border-bottom: 1px solid var(--theme-palette-color-5); 1898 font-weight: 600; 1899 font-size: 0.65em; 1900 text-transform: uppercase; 1901 letter-spacing: 0.5px; 1902 color: var(--theme-palette-color-3); 1903 @media only screen and ${i.E0} { 1904 /* 44, not 34: a header cell is a sort target, and 44 is why. */ 1905 min-height: ${44}px; 1906 padding: 0 10px 0 0; 1907 /* Sticky at the PANE's top, not the viewport's â the 50px theme-header 1908 offset lives once, in the pane's height. */ 1909 position: sticky; 1910 top: 0; 1911 z-index: 20; 1912 background: var(--theme-palette-color-8); 1913 > :first-child { 1914 position: sticky; 1915 left: 0; 1916 /* The one element sticky on both axes, so it must out-stack both. */ 1917 z-index: 30; 1918 align-self: stretch; 1919 display: flex; 1920 align-items: center; 1921 padding: 0 8px; 1922 /* A sticky cell needs its OWN opaque background â the row's shows the 1923 scrolled columns straight through it. */ 1924 background: var(--theme-palette-color-8); 1925 border-right: 1px solid var(--theme-palette-color-5); 1926 } 1927 &[${o.P7}] > :first-child, 1928 [${o.P7}] & > :first-child { 1929 box-shadow: 6px 0 8px rgba(0, 0, 0, 0.35); 1930 } 1931 } 1932 @media only screen and ${i.Ab} { 1933 > :first-child { 1934 padding: 0 6px; 1935 } 1936 } 1937`,w=r.Ay.div` 1938 text-align: ${e=>e.$align||"center"}; 1939 white-space: nowrap; 1940 cursor: ${e=>e.$sortable?"pointer":"default"}; 1941 color: ${e=>e.$active?"var(--theme-palette-color-1)":"var(--theme-palette-color-3)"}; 1942 transition: color 0.15s ease; 1943 display: flex; 1944 align-items: center; 1945 justify-content: ${e=>
1945"left"===e.$align?"flex-start":"right"===e.$align?"flex-end":"center"}; 1946 gap: 3px; 1947 1948 &:hover { 1949 color: ${e=>e.$sortable?"var(--theme-palette-color-1)":"var(--theme-palette-color-3)"}; 1950 } 1951`,b=r.Ay.span` 1952 font-size: 0.85em; 1953 margin-right: 3px; 1954`;n.d(t,["A3",0,w,"AJ",0,l,"JG",0,m,"MS",0,y,"QC",0,h,"Um",0,g,"_I",0,a,"eA",0,s,"fh",0,p,"g2",0,v,"hh",0,u,"jq",0,c,"tw",0,f,"uO",0,d,"wm",0,b,"yA",0,x])},88769(e,t,n){var r=n(63679),o=n(54930),i=n(28297);const a=r.I4.div` 1955 height: 20px; 1956`,l=r.I4.div` 1957 display: flex; 1958 flex-direction: column; 1959 gap: 12px; 1960 min-width: 0; 1961 && > * { 1962 margin-top: 0; 1963 margin-bottom: 0; 1964 } 1965 @media only screen and ${i.E0} { 1966 gap: 10px; 1967 } 1968`,s=r.I4.div` 1969 width: 100%; 1970 left: 0; 1971 top: 20vh; 1972 height: 60vh; 1973 margin-top: 10px; 1974 display: flex; 1975 font-size: 1.5em; 1976 align-content: flex-start; 1977 justify-content: center; 1978 align-items: center; 1979 background-color: rgba(12, 12, 12, 0.8); 1980 position: sticky; 1981 z-index: 1000; 1982 color: var(--theme-palette-color-4); 1983 border-radius: 0.5rem; 1984 box-sizing: border-box; 1985 overflow: hidden; 1986 z-index: 10000; 1987`,d=(r.I4.div` 1988 display: flex; 1989 align-items: center; 1990 color: ${e=>e.$active?"var(--theme-palette-color-2)":""}; 1991 ${e=>e.$active?"text-shadow:1px 1px 1px var(--theme-palette-color-2);":""} 1992 cursor: pointer; 1993`,r.I4.div` 1994 margin-top: 20px; 1995 color: var(--theme-palette-color-2); 1996 font-weight: bold; 1997`,r.I4.div` 1998 display: flex; 1999 width: 100%; 2000 justify-content: flex-end; 2001 align-items: center; 2002`,r.I4.section` 2003 display: grid; 2004 grid-template-columns: ${e=>e.$perRow?`repeat(${e.$perRow}, minmax(0, 1fr))`:`repeat(auto-fill, minmax(${e.$childWidth}px, 1fr))`}; 2005 /* Fixed columns are a desktop affordance â fall back to auto-fill on phones. */ 2006 @media only screen and (max-width: 900px) { 2007 ${e=>e.$perRow?"grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));":""} 2008 } 2009 gap: ${e=>"string"==typeof e.$childWidth?`12px ${(0,o.TP)(e.$childWidth)}`:"12px"}; 2010 padding: 10px; 2011 ${e=>e.$border?"border: solid 1px var(--theme-palette-color-2);":""} 2012 border-radius: 6px; 2013 justify-content: ${e=>"string"==typeof e.$childWidth?"start":"space-evenly"}; 2014 width: 100%; 2015 box-sizing: border-box; 2016 overflow: hidden; 2017 ${e=>e.$otherCards?"justify-content: start;":""} 2018 /* A rotated phone has ~325px of usable height under the ad, so the image 2019 grid trades card size for rows you can SEE: six ~108px columns at 812, 2020 which is two rows inside the 325px, where the desktop fallback's 250px 2021 columns give two cards and half a row (Claude Design round 4, 4e). */ 2022 @media only screen and ${i.MZ} and (max-width: 1100px) and (pointer: coarse) { 2023 ${e=>e.$isText?"":"grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));"} 2024 } 2025 @media only screen and (max-width: 700px) { 2026 ${e=>e.$otherCards?"justify-content: space-between;":""} 2027 ${e=>e.$cardcontainer?"padding: 10px 0px;":""} 2028 ${e=>e.$IsCollectionStats?"display: block;":""} 2029 } 2030`),c=r.I4.section` 2031 display: grid; 2032 grid-template-columns: repeat(2, minmax(0, 1fr)); 2033 gap: 10px; 2034 width: 100%; 2035 @media only screen and (max-width: 980px) { 2036 grid-template-columns: 1fr; 2037 } 2038`,p=r.I4.div` 2039 display: flex; 2040 align-items: center; 2041 gap: 6px; 2042 flex-wrap: wrap; 2043 font-size: 0.75em; 2044 color: var(--theme-palette-color-3); 2045`,h=r.I4.button` 2046 background: none; 2047 border: none; 2048 padding: 0; 2049 font: inherit; 2050 color: var(--theme-palette-color-2); 2051 cursor: pointer; 2052 text-decoration: underline; 2053 &:hover { 2054 text-decoration: none; 2055 } 2056`,u=r.I4.div` 2057 cursor: pointer; 2058 font-size: 0.75em; 2059 color: var(--theme-palette-color-3); 2060 padding: 0; 2061 &:hover { 2062 text-decoration: underline; 2063 } 2064`,g=r.I4.div` 2065 display: flex; 2066 gap: 10px; 2067 @media only screen and (max-width: 700px) { 2068 gap: 3px; 2069 flex-wrap: wrap; 2070 justify-content: space-between; 2071 } 2072`,m=r.I4.div` 2073 display: flex; 2074 justify-content: space-between; 2075 align-items: center; 2076 gap: 10px; 2077 width: 100%; 2078 padding-top: 5px; 2079 min-height: 42px; 2080 background-color: var(--theme-palette-color-7); 2081 /*z-index: 100;*/ 2082 @media only screen and (max-width: 700px) { 2083 flex-direction: column; 2084 } 2085`,f=r.I4.div` 2086 display: flex; 2087 flex-direction: column; 2088 justify-content: flex-end; 2089`;n.d(t,["$H",0,h,"BI",0,f,"BU",0,g,"P7",0,a,"QM",0,d,"bk",0,u,"bq",0,c,"ic",0,m,"mC",0,l,"mu",0,p,"pL",0,s])},54930(e,t,n){n.d(t,{N4:()=>d,QO:()=>s,TP:()=>h,_Q:()=>l});var r=n(86031),o=n(4738),i=n(28297);const a="collection-hide-stats";function l(){const e=(0,o.Ri)(a);return"true"===e||"false"===e?"true"===e:"undefined"!=typeof window&&window.matchMedia(i.E0).matches}function s(e,t){e(e=>({...e,hideStats:t})),(0,o.TV)(a,t?"true":"false",365)}function d(e,t){(0,o.TV)("collectionfilter",JSON.stringify(t),30),e(e=>({...e,collectionFilter:t}))}const c=e=>!e||Number.isNaN(e)?6:Math.min(9,Math.max(5,Math.round(e)));function p(e){return"condtext"===e||"text"===e}function h(e){const t=parseFloat(e),n=Math.floor(100/t);return`${(n>1?(100-n*t)/(n-1):0).toFixed(3)}%`}const u=new Set(["sortby","sortorder","clear","invertFilters","filterLogicAnd"]),g=e=>{if(!e)return!1;const t=e;return r.SA.cards.cardsFilterParams.some(e=>!u.has(e)&&""!==(t[e]??""))};n.d(t,["aW",0,(e,t)=>{const n=p(t);return e.deckbuilder||window.innerWidth<=900?n?"100%":130:e.big?265:e.isCollection?n?400:window.innerWidth<=1350?130:190:n?400:window.innerWidth<=1250?130:190},"bd",0,(e,t,n)=>{if(!(e.embed||e.deckbuilder||e.otherCards||p(t)||"undefined"!=typeof window&&window.innerWidth<=900))return c(n)},"lM",0,(e,t)=>!0===r.SA.decks.serverSideCardsLibrary&&!0!==e.noFetch&&(!0!==e.isCollection||g(t)),"nP",0,"collection-dim-unowned","rh",0,(e,t,n)=>{if(!0===r.SA.decks.serverSideCardsLibrary&&e.isCollection&&void 0===e.listOverride&&!g(n))return t.map(e=>e.card)}
2089,"rx",0,c,"s4",0,"cards-per-row","su",0,"cards-show-prices"])},79984(e,t,n){n.d(t,{Q:()=>X});var r=n(10201),o=n(17402),i=(n(95697),n(79407)),a=n(4229),l=n(69092),s=n(4738),d=n(54270),c=n(70213),p=n(98973),h=n(51718),u=n(63679);const g="#6e7783",m=u.Ay.div` 2090 position: relative; 2091 width: 100%; 2092 min-width: 0; 2093`,f=u.Ay.div` 2094 display: flex; 2095 align-items: center; 2096 gap: 5px; 2097 width: 100%; 2098 min-width: 0; 2099 height: 30px; 2100 padding: 0 8px; 2101 font-size: 13px; 2102 border-radius: 6px; 2103 box-sizing: border-box; 2104 background: ${e=>e.$active?"#384759":"var(--theme-palette-color-7)"}; 2105 border: 1px solid transparent; 2106 box-shadow: 0 0 0 1px ${e=>e.$open?"var(--theme-palette-color-1)":"transparent"}; 2107 cursor: pointer; 2108 transition: 2109 border-color 150ms ease, 2110 box-shadow 150ms ease, 2111 background-color 150ms ease; 2112 &:hover { 2113 border-color: var(--theme-palette-color-5); 2114 } 2115`,x=u.Ay.span` 2116 font-size: 10.5px; 2117 font-weight: 700; 2118 letter-spacing: 0.07em; 2119 text-transform: uppercase; 2120 white-space: nowrap; 2121 flex-shrink: 0; 2122 color: ${e=>e.$active?"var(--theme-palette-color-1)":"var(--theme-palette-color-3)"}; 2123`,v=u.Ay.span` 2124 width: 5px; 2125 height: 5px; 2126 border-radius: 50%; 2127 flex-shrink: 0; 2128 background: var(--theme-palette-color-1); 2129 opacity: ${e=>e.$show?1:0}; 2130 transition: opacity 150ms ease; 2131`,y=u.Ay.span` 2132 flex: 1; 2133 min-width: 0; 2134 overflow: hidden; 2135 text-overflow: ellipsis; 2136 white-space: nowrap; 2137 line-height: 28px; 2138 font-variant-numeric: tabular-nums; 2139 color: ${e=>e.$active?"var(--theme-palette-color-4)":"var(--theme-palette-color-3)"}; 2140`,w=u.Ay.button` 2141 display: inline-flex; 2142 align-items: center; 2143 justify-content: center; 2144 width: 16px; 2145 height: 16px; 2146 flex-shrink: 0; 2147 padding: 0; 2148 border: none; 2149 border-radius: 3px; 2150 background: none; 2151 color: var(--theme-palette-color-3); 2152 cursor: pointer; 2153 svg { 2154 display: block; 2155 } 2156 &:hover { 2157 background: rgba(255, 255, 255, 0.1); 2158 color: var(--theme-palette-color-4); 2159 } 2160`,b=u.Ay.span` 2161 display: inline-flex; 2162 flex-shrink: 0; 2163 color: #ccc; 2164 transform: rotate(${e=>e.$open?180:0}deg); 2165 transition: transform 150ms ease; 2166 svg { 2167 display: block; 2168 fill: currentcolor; 2169 stroke: currentcolor; 2170 stroke-width: 0; 2171 } 2172`,$=(0,u.Ay)(p.up)` 2173 padding: 10px 12px 12px; 2174 @media only screen and (min-width: 701px) { 2175 left: 0; 2176 right: auto; 2177 min-width: 262px; 2178 } 2179`,k=u.Ay.div` 2180 display: flex; 2181 align-items: baseline; 2182 justify-content: space-between; 2183 gap: 10px; 2184 padding: 2px 0 8px; 2185 font-size: 10.5px; 2186 font-weight: 600; 2187 text-transform: uppercase; 2188 letter-spacing: 0.025em; 2189 color: var(--theme-palette-color-3); 2190`,Y=u.Ay.span` 2191 font-size: 11.5px; 2192 font-weight: 700; 2193 text-transform: none; 2194 letter-spacing: 0; 2195 white-space: nowrap; 2196 font-variant-numeric: tabular-nums; 2197 color: ${e=>e.$empty?"var(--theme-palette-color-9)":"var(--theme-palette-color-1)"}; 2198`,A=u.Ay.div` 2199 display: flex; 2200 flex-wrap: wrap; 2201 gap: ${e=>e.$touch?"6px":"5px"}; 2202`,C=u.Ay.button` 2203 display: inline-flex; 2204 align-items: center; 2205 gap: ${e=>e.$touch?"6px":"5px"}; 2206 height: ${e=>e.$touch?"34px":"26px"}; 2207 padding: ${e=>e.$touch?"0 8px 0 12px":"0 6px 0 9px"}; 2208 border-radius: ${e=>e.$touch?"17px":"4px"}; 2209 font-family: inherit; 2210 font-size: ${e=>e.$touch?"12.5px":"11.5px"}; 2211 font-weight: 600; 2212 white-space: nowrap; 2213 cursor: pointer; 2214 transition: all 150ms ease; 2215 background: ${e=>e.$on?"rgba(255, 211, 102, 0.1)":"transparent"}; 2216 border: 1px solid ${e=>e.$on?"rgba(255, 211, 102, 0.45)":"var(--theme-palette-color-5)"}; 2217 color: ${e=>e.$on?"var(--theme-palette-color-1)":"var(--theme-palette-color-3)"}; 2218 &:hover { 2219 border-color: var(--theme-palette-color-1); 2220 } 2221`,F=u.Ay.span` 2222 font-size: ${e=>e.$touch?"10px":"9.5px"}; 2223 font-weight: 500; 2224 padding: ${e=>e.$touch?"2px 6px":"1px 5px"}; 2225 border-radius: 9px; 2226 min-width: 18px; 2227 text-align: center; 2228 font-variant-numeric: tabular-nums; 2229 color: var(--theme-palette-color-3); 2230 background: ${e=>e.$on?"rgba(255, 211, 102, 0.14)":"var(--theme-palette-color-6)"}; 2231`,D=u.Ay.div` 2232 display: flex; 2233 align-items: center; 2234 gap: 7px; 2235 margin-top: 11px; 2236 padding-top: 10px; 2237 border-top: 1px solid var(--theme-palette-color-5); 2238 font-size: 12px; 2239 color: var(--theme-palette-color-3); 2240`,S=u.Ay.div` 2241 display: flex; 2242 align-items: center; 2243 gap: 6px; 2244 font-size: 12.5px; 2245 color: var(--theme-palette-color-3); 2246`,I=u.Ay.span` 2247 flex: none; 2248 white-space: nowrap; 2249 color: ${e=>e.$dim?g:"var(--theme-palette-color-3)"}; 2250`,z=u.Ay.div` 2251 display: flex; 2252 align-items: center; 2253`,T=u.Ay.input` 2254 ${e=>e.$touch?"flex: 1; min-width: 0;":"width: 44px;"} 2255 height: ${e=>e.$touch?"44px":"26px"}; 2256 box-sizing: border-box; 2257 padding: 0 ${e=>e.$touch?"6px":"4px"}; 2258 border: 1px solid var(--theme-palette-color-5); 2259 ${e=>e.$touch?"border-radius: 6px;
2259":"border-right: none; border-radius: 4px 0 0 4px;"} 2260 background: var(--theme-palette-color-7); 2261 color: var(--theme-palette-color-4); 2262 font-family: inherit; 2263 /* 16px on touch or iOS zooms the whole page on focus. */ 2264 font-size: ${e=>e.$touch?"16px":"12px"}; 2265 font-weight: 700; 2266 text-align: center; 2267 font-variant-numeric: tabular-nums; 2268 outline: none; 2269 &::placeholder { 2270 color: ${g}; 2271 opacity: 1; 2272 } 2273 &:focus { 2274 border-color: var(--theme-palette-color-1); 2275 } 2276`,E=u.Ay.span` 2277 display: flex; 2278 flex-direction: column; 2279 width: 15px; 2280 height: 26px; 2281 border: 1px solid var(--theme-palette-color-5); 2282 border-radius: 0 4px 4px 0; 2283 overflow: hidden; 2284`,L=u.Ay.button` 2285 flex: 1; 2286 display: flex; 2287 align-items: center; 2288 justify-content: center; 2289 padding: 0; 2290 border: none; 2291 background: var(--theme-palette-color-6); 2292 color: var(--theme-palette-color-3); 2293 cursor: pointer; 2294 & + & { 2295 border-top: 1px solid var(--theme-palette-color-5); 2296 } 2297 svg { 2298 display: block; 2299 ${e=>e.$up?"transform: rotate(180deg);":""} 2300 } 2301 &:hover { 2302 color: var(--theme-palette-color-1); 2303 } 2304`,M=u.Ay.button` 2305 display: inline-flex; 2306 align-items: center; 2307 justify-content: center; 2308 width: 44px; 2309 height: 44px; 2310 flex: none; 2311 border: 1px solid var(--theme-palette-color-5); 2312 border-radius: 6px; 2313 background: none; 2314 color: var(--theme-palette-color-3); 2315 cursor: pointer; 2316 svg { 2317 display: block; 2318 } 2319`,N=u.Ay.div` 2320 display: flex; 2321 align-items: baseline; 2322 justify-content: space-between; 2323 gap: 10px; 2324 margin-top: 9px; 2325 font-size: 11px; 2326 color: ${g}; 2327 em { 2328 font-style: normal; 2329 color: var(--theme-palette-color-3); 2330 } 2331`,P=u.Ay.div` 2332 display: flex; 2333 align-items: center; 2334 justify-content: space-between; 2335 gap: 10px; 2336`,O=u.Ay.span` 2337 font-size: 11px; 2338 color: ${g}; 2339`,_=()=>(0,r.Y)("svg",{height:"12",width:"12",viewBox:"0 0 20 20","aria-hidden":"true",children:(0,r.Y)("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"})}),R={min:"Minimum copies owned",max:"Maximum copies owned â leave empty for and above"},j=({presets:e,current:t,histogram:n,onPick:o,touch:i})=>(0,r.Y)(A,{$touch:i,children:e.map(e=>{const a=(0,d.nn)(t,e.range);return(0,r.FD)(C,{type:"button",$on:a,$touch:i,title:e.title,"aria-pressed":a,onClick:()=>o(e.range),children:[e.label,n.length>0&&(0,r.Y)(F,{$on:a,$touch:i,children:(0,d.XV)(n,e.range)})]},e.key)})}),J=({which:e,value:t,onType:n,onStep:o,onKeyDown:i})=>(0,r.FD)(z,{children:[(0,r.Y)(T,{type:"text",inputMode:"numeric",autoComplete:"off","aria-label":R[e],placeholder:"min"===e?"0":"â",value:t,onInput:t=>n(e,t.currentTarget.value),onKeyDown:i}),(0,r.FD)(E,{children:[(0,r.Y)(L,{type:"button",$up:!0,tabIndex:-1,"aria-label":"Increase "+("min"===e?"minimum":"maximum"),onClick:()=>o(e,1),children:(0,r.Y)(c.Vh,{size:9})}),(0,r.Y)(L,{type:"button",tabIndex:-1,"aria-label":"Decrease "+("min"===e?"minimum":"maximum"),onClick:()=>o(e,-1),children:(0,r.Y)(c.Vh,{size:9})})]})]}),B=({state:e,setState:t,maxCardsInCollection:n,prefixLabel:i="Owned",alien:a,ownedHistogram:l,inSheet:u})=>{const{open:g,setOpen:A,ref:C}=(0,h.G)(),F=function(e,t,n,r){const i=(0,o.Kr)(()=>(0,d.tN)(e.currentCollection,n),[e.currentCollection,n]),a=(0,o.Kr)(()=>{const t=(0,d.fN)(e.collectionFilter);if(!t)return(0,d.Kx)(i);const n=e=>Math.max(0,Math.min(e,i));return{min:n(t.min),max:n(t.max),open:t.open||t.max>=i}},[e.collectionFilter,i]),[l,c]=(0,o.J0)(()=>(0,d.et)(a)),[p,h]=(0,o.J0)(!1),u=(0,o.li)(!1),g=(0,o.li)(),m=(0,o.li)(l),f=(0,o.hb)(e=>{m.current=e,c(e)},[]);(0,o.vJ)(()=>()=>clearTimeout(g.current),[]),(0,o.vJ)(()=>{u.current||f((0,d.et)(a))},[a,f]);const x=(0,o.hb)(e=>{clearTimeout(g.current),u.current=!1,h(!1),f((0,d.et)(e)),t(t=>{const n=(0,d.A1)(t.collectionFilter,e);return(0,s.TV)("collectionfilter",JSON.stringify(n),30),{...t,collectionFilter:n}})},[t,f]),v=(0,o.hb)(e=>{f(e),u.current=!0,h(!0),clearTimeout(g.current),g.current=setTimeout(()=>x((0,d.A4)(e.min,e.max,i)),350)},[x,i,f]),y=(0,o.hb)(()=>{u.current&&x((0,d.A4)(m.current.min,m.current.max,i))},[x,i]),w=(0,o.Kr)(()=>(0,d.A4)(l.min,l.max,i),[l,i]),b=(e,t)=>{const n=m.current,r=(0,d.A4)(n.min,n.max,i),o="min"===e?r.min:r.open?i:r.max,a=Math.max(0,Math.min(o+t,i));v("min"===e?{...n,min:String(a)}:{...n,max:a>=i?"":String(a)})};return{cap:i,committed:a,draft:w,fields:l,pending:p,apply:x,flush:y,type:(e,t)=>v({...m.current,[e]:t.replace(/\D/g,"")}),step:b,onKeyDown:e=>t=>{"Enter"===t.key?(t.preventDefault(),y(),r()):"Escape"===t.key?(t.preventDefault(),clearTimeout(g.current),u.current=!1,h(!1),f((0,d.et)(a)),r()):"ArrowUp"!==t.key&&"ArrowDown"!==t.key||(t.preventDefault(),b(e,"ArrowUp"===t.key?1:-1))}}}(e,t,n,(0,o.hb)(()=>A(!1),[A])),{cap:z,committed:E,draft:L,fields:B}=F,K=(0,o.li)(g);(0,o.vJ)(()=>{K.current&&!g&&F.flush(),K.current=g},[g,F]);const W=g||u?L:E,U=!(0,d.oG)(W),Q=Math.max(1,Number.isFinite(n)?n:1),G=(0,o.Kr)(()=>(0,d.x_)(z,Q,a),[z,Q,a]),H=(0,o.Kr)(()=>l??[],[l]),q=(0,o.Kr)(()=>H.reduce((e,t)=>
2339e+t,0),[H]),V=H.length>0?(0,d.XV)(H,L):0,X=H.length>0&&(0,r.Y)(Y,{$empty:0===V,children:0===V?"no cards match":`${V.toLocaleString()} of ${q.toLocaleString()} cards`}),Z=(0,r.Y)(j,{presets:G,current:W,histogram:H,onPick:F.apply,touch:u});if(!Number.isFinite(z)||z<1)return null;if(u)return(0,r.FD)(r.FK,{children:[(0,r.FD)(P,{children:[(0,r.Y)(x,{$active:U,children:i}),X]}),Z,(0,r.FD)(S,{children:[(0,r.Y)(M,{type:"button","aria-label":"Decrease minimum copies",onClick:()=>F.step("min",-1),children:(0,r.Y)(c.YP,{size:16})}),(0,r.Y)(T,{$touch:!0,type:"text",inputMode:"numeric",autoComplete:"off","aria-label":R.min,placeholder:"0",value:B.min,onInput:e=>F.type("min",e.currentTarget.value),onKeyDown:F.onKeyDown("min")}),(0,r.Y)(I,{$dim:!0,children:"to"}),(0,r.Y)(T,{$touch:!0,type:"text",inputMode:"numeric",autoComplete:"off","aria-label":R.max,placeholder:"â",value:B.max,onInput:e=>F.type("max",e.currentTarget.value),onKeyDown:F.onKeyDown("max")}),(0,r.Y)(M,{type:"button","aria-label":"Increase maximum copies",onClick:()=>F.step("max",1),children:(0,r.Y)(c.uI,{size:16})})]}),(0,r.Y)(O,{children:"Empty âtoâ = and above"})]});const ee=()=>{g&&F.flush(),A(e=>!e)};return(0,r.FD)(m,{ref:C,children:[(0,r.FD)(f,{role:"button",tabIndex:0,"aria-haspopup":"dialog","aria-expanded":g,$active:U,$open:g,title:"Filter cards by how many copies you own",onClick:ee,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),ee())},children:[(0,r.Y)(p.Pp,{$active:U,children:i}),(0,r.Y)(y,{$active:U,children:(0,d.Jx)(W)}),(0,r.Y)(v,{$show:F.pending,title:"Applyingâ¦"}),U&&(0,r.Y)(w,{type:"button",title:"Clear quantity filter","aria-label":"Clear quantity filter",onClick:e=>{e.stopPropagation(),F.apply((0,d.Kx)(z))},children:(0,r.Y)(c.MR,{size:11})}),(0,r.Y)(b,{$open:g,children:(0,r.Y)(_,{})})]}),g&&(0,r.FD)($,{role:"dialog","aria-label":"Copies owned",children:[(0,r.FD)(k,{children:[(0,r.Y)("span",{children:"Copies owned"}),X]}),Z,(0,r.FD)(D,{children:[(0,r.Y)(I,{children:"Exactly"}),(0,r.Y)(J,{which:"min",value:B.min,onType:F.type,onStep:F.step,onKeyDown:F.onKeyDown("min")}),(0,r.Y)(I,{$dim:!0,children:"to"}),(0,r.Y)(J,{which:"max",value:B.max,onType:F.type,onStep:F.step,onKeyDown:F.onKeyDown("max")}),(0,r.Y)(I,{children:"copies"})]}),(0,r.Y)(N,{children:(0,r.FD)("span",{children:["Empty âtoâ = ",(0,r.Y)("em",{children:"and above"})]})})]})]})},K="Owned",W="They own",U="Status",Q="My collection";function G(e,t){e(e=>{const n=t(e.collectionFilter);return(0,s.TV)("collectionfilter",JSON.stringify(n),30),{...e,collectionFilter:n}})}function H(e,t){return n=>{const r=Array.isArray(n)?n.map(e=>e.value):[],o=new Set(t.map(e=>e.value));G(e,e=>[...e.filter(e=>!o.has(e)),...r])}}function q(e,t){return e.filter(e=>t.includes(e.value))}function V(e){const{collectionFilter:t,setState:n,alien:r}=e,o=[],i=(0,d.fN)(t);i&&!(0,d.oG)(i)&&o.push({label:r?W:K,value:(0,d.Jx)(i),onRemove:()=>G(n,e=>e.filter(e=>!e.startsWith("qty:")))});const a=(e,r)=>q(r,t).map(t=>({label:e,value:t.label,onRemove:()=>G(n,e=>e.filter(e=>e!==t.value))}));return o.push(...a(U,e.collectionFilterOptions)),r&&o.push(...a(Q,e.viewerCollectionFilterOptions)),o}function X(e){const{isCollection:t,collectionFilter:n,currentCollection:a,setState:l,collectionFilterOptions:s,viewerCollectionFilterOptions:d,maxCardsInCollection:c,ownedHistogram:p,alien:h}=e;return(0,o.Kr)(()=>{if(!t)return;const e={collectionFilter:n,currentCollection:a,setState:l,collectionFilterOptions:s,viewerCollectionFilterOptions:d,maxCardsInCollection:c,ownedHistogram:p,alien:h},o=[{key:"owned",control:(0,r.Y)(B,{state:{collectionFilter:n,currentCollection:a},setState:l,maxCardsInCollection:c,prefixLabel:h?W:K,alien:h,ownedHistogram:p})}],u=q(s,n);s.length>0&&o.push({key:"status",control:(0,r.Y)(i.R,{placeholder:"Any",prefixLabel:U,value:u,onChange:H(l,s),options:s,isMulti:!0,highlight:u.length>0})});const g=q(d,n);return h&&window.DotGGUser&&d.length>0&&o.push({key:"viewer",control:(0,r.Y)(i.R,{placeholder:"Any",prefixLabel:Q,value:g,onChange:H(l,d),options:d,isMulti:!0,highlight:g.length>0})}),{controls:o,chips:V(e),sheet:(0,r.Y)(Z,{...e})}},[t,n,a,l,s,d,c,p,h])}const Z=e=>{const{collectionFilter:t,setState:n,collectionFilterOptions:o,viewerCollectionFilterOptions:i,alien:s}=e;return(0,r.FD)(r.FK,{children:[(0,r.Y)(a.rh,{children:(0,r.Y)(B,{state:{collectionFilter:t,currentCollection:e.currentCollection},setState:n,maxCardsInCollection:e.maxCardsInCollection,prefixLabel:s?W:K,alien:s,ownedHistogram:e.ownedHistogram,inSheet:!0})}),o.length>0&&(0,r.Y)(l.j,{label:U,options:o,value:q(o,t),onChange:H(n,o),placeholder:"Any"}),s&&window.DotGGUser&&i.length>0&&(0,r.Y)(l.j,{label:Q,options:i,value:q(i,t),onChange:H(n,i),placeholder:"Any"})]})}},23835(e,t,n){var r=n(10201),o=n(17402),i=n(63679),a=n(38811),l=n(76162),s=n(65562);const d=i.Ay.div` 2340 display: flex; 2341 justify-content: space-between; 2342 align-items: center; 2343 margin-bottom: 5px; 2344 min-height: 20px; 2345`,c=i.Ay.div` 2346 display: flex; 2347 gap: 4px; 2348 flex-wrap: wrap; 2349`;n.d(t,["_",0,({card:e,collectionElement:t,alien:n,onUpdate:i,ownershipReadOnly:p=!0,customBinderActive:h=!1})=>{const u=(0,o.Kr)(()=>(0,s.jN)(t),[t]);return(0,r.Y)(d,{children:(0,r.FD)(c,{children:[!n&&(0,r.Y)(a.m,{cardId:e.id,isOwned:"owned"===u.ownership,onUp
2349date:i,readOnly:p,card:e,countsElement:h?t:void 0}),(0,r.Y)(l.S,{cardId:e.id,currentTag:u.secondary,customTags:u.customTags,onUpdate:i,alienMode:n,customBinderActive:h,binderElement:t,tradeCount:u.tradeCount,wishCount:u.wishCount,card:e})]})})}])},56828(e,t,n){var r=n(10201),o=(n(17402),n(63679)),i=(n(54930),n(51718)),a=n(12964),l=n(60001),s=n(7718),d=n(98973);const c=o.Ay.div` 2350 position: relative; 2351`,p=(0,o.Ay)(d.up)` 2352 padding: 10px 12px; 2353`,h=o.Ay.span` 2354 display: inline-flex; 2355 color: var(--theme-palette-color-2); 2356`;n.d(t,["r",0,({perRow:e,onPerRowChange:t,foilEffect:n,onFoilEffectChange:o,foilAvailable:u,showPrices:g,onShowPricesChange:m,pricesAvailable:f,dimUnowned:x,onDimUnownedChange:v,dimAvailable:y,inSheet:w,min:b=5,max:$=9})=>{const{open:k,setOpen:Y,ref:A}=(0,i.G)(),C="undefined"!=typeof window&&window.innerWidth>900;if(!(C||u||f||y))return null;const F=(0,r.FD)(r.FK,{children:[C&&(0,r.Y)(l.mA,{label:"Cards in row",value:e,min:b,max:$,onChange:t}),u&&(0,r.Y)(l.T_,{label:"Foil effect",hint:"Holographic sheen on foil cards.",icon:(0,r.Y)(h,{children:(0,r.Y)(a.RE,{size:12})}),on:n,onToggle:o}),f&&(0,r.Y)(l.T_,{label:"Show prices",hint:"Price chip under each card.",on:g,onToggle:m}),y&&(0,r.Y)(l.T_,{label:"Dim unowned",hint:"Fade cards you don't own.",on:x,onToggle:v})]});return w?(0,r.Y)(s.Dp,{label:"Gallery settings",children:(0,r.Y)(l.$Z,{children:F})}):(0,r.FD)(c,{ref:A,children:[(0,r.Y)(d.fl,{$open:k,onClick:()=>Y(e=>!e),title:"Gallery settings","aria-label":"Gallery settings",children:l.Qf}),k&&(0,r.FD)(p,{children:[(0,r.Y)(l.eO,{children:"Gallery settings"}),F]})]})}])},4969(e,t,n){var r=n(10201),o=(n(17402),n(74079)),i=n(31063);n.d(t,["U",0,({selected:e,onPick:t})=>(0,r.FD)(i.Ly,{children:[(0,r.Y)(i.Hd,{$active:!e,title:"No color",onClick:e=>{e.stopPropagation(),t(null)}}),o.gO.map(n=>(0,r.Y)(i.rp,{$color:n.value,$active:e===n.value,title:n.label,onClick:e=>{e.stopPropagation(),t(n.value)}},n.value))]})])},68217(e,t,n){var r=n(10201);const o={width:13,height:13,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},i=(0,r.Y)("svg",{...o,children:(0,r.Y)("path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2z"})}),a=(0,r.FD)("svg",{...o,children:[(0,r.Y)("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),(0,r.Y)("path",{d:"M9 22V12h6v10"})]}),l=(0,r.Y)("svg",{...o,children:(0,r.Y)("path",{d:"M20 6L9 17l-5-5"})}),s=(0,r.Y)("svg",{...o,children:(0,r.Y)("path",{d:"M12 5v14M5 12h14"})}),d=(0,r.FD)("svg",{...o,children:[(0,r.Y)("path",{d:"M12 20h9"}),(0,r.Y)("path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4z"})]}),c=(0,r.Y)("svg",{...o,children:(0,r.Y)("path",{d:"M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})}),p=(0,r.FD)("svg",{...o,children:[(0,r.Y)("circle",{cx:"18",cy:"5",r:"3"}),(0,r.Y)("circle",{cx:"6",cy:"12",r:"3"}),(0,r.Y)("circle",{cx:"18",cy:"19",r:"3"}),(0,r.Y)("path",{d:"M8.6 13.5l6.8 4M15.4 6.5l-6.8 4"})]}),h=(0,r.FD)("svg",{...o,children:[(0,r.Y)("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),(0,r.Y)("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]}),u=(0,r.FD)("svg",{...o,children:[(0,r.Y)("path",{d:"M9 17H7A5 5 0 0 1 7 7h2"}),(0,r.Y)("path",{d:"M15 7h2a5 5 0 0 1 4 8"}),(0,r.Y)("path",{d:"M8 12h4"}),(0,r.Y)("path",{d:"M2 2l20 20"})]}),g=(0,r.Y)("svg",{...o,children:(0,r.Y)("path",{d:"M18 6L6 18M6 6l12 12"})}),m=(0,r.FD)("svg",{...o,children:[(0,r.Y)("circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor"}),(0,r.Y)("circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor"}),(0,r.Y)("circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor"}),(0,r.Y)("circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor"}),(0,r.Y)("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996C20.418 16.273 22 14.69 22 12c0-5.5-4.5-10-10-10z"})]}),f=(0,r.FD)("svg",{...o,strokeWidth:0,fill:"currentColor",children:[(0,r.Y)("circle",{cx:"9",cy:"6",r:"1.4"}),(0,r.Y)("circle",{cx:"15",cy:"6",r:"1.4"}),(0,r.Y)("circle",{cx:"9",cy:"12",r:"1.4"}),(0,r.Y)("circle",{cx:"15",cy:"12",r:"1.4"}),(0,r.Y)("circle",{cx:"9",cy:"18",r:"1.4"}),(0,r.Y)("circle",{cx:"15",cy:"18",r:"1.4"})]}),x=(0,r.Y)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,r.Y)("path",{d:"M6 9l6 6 6-6"})}),v=(0,r.FD)("svg",{...o,children:[(0,r.Y)("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),(0,r.Y)("path",{d:"M2 17l10 5 10-5"}),(0,r.Y)("path",{d:"M2 12l10 5 10-5"})]}),y=(0,r.FD)("svg",{...o,children:[(0,r.Y)("path",{d:"M15 10l5 5-5 5"}),(0,r.Y)("path",{d:"M4 4v7a4 4 0 0 0 4 4h12"})]});n.d(t,["R2",0,d,"Sr",0,l,"Wf",0,y,"b",0,u,"c1",0,s,"fA",0,a,"li",0,p,"mL",0,v,"qY",0,h,"sX",0,f,"sj",0,i,"uc",0,c,"uv",0,g,"v1",0,m,"zp",0,x])},31063(e,t,n){var r=n(63679),o=n(28297),i=n(98973);const a=r.Ay.div` 2357 position: relative; 2358`,l=r.Ay.span` 2359 max-width: 140px; 2360 overflow: hidden; 2361 text-overflow: ellipsis; 2362 white-space: nowrap; 2363 ${e=>e.$accent&&`color: ${e.$accentColor||"var(--theme-palette-color-1)"}; font-weight: 600;`} 2364`,s=r.Ay.span` 2365 display: inline-flex; 2366 flex-shrink: 0; 2367 ${e=>e.$color&&`&& svg { color: ${e.$color}; }`} 2368`,d=r.Ay.div` 2369 display: flex; 2370 flex-wrap: wrap; 2371 align-items: center; 2372 gap: 6px; 2373 padding: 6px 8px 4px; 2374 /* All ten BINDER_COLORS reachable without a second menu: one scroll row 2375 rather than a wrap that pushes the rest of the popover off-screen. */ 2376 @media ${o.h3} { 2377 flex-wrap: nowrap; 2378 overflow-x: auto; 2379 scrollbar-width: none; 2380 padding: 8px; 2381 &::-webkit-scrollbar {
2382 display: none; 2383 } 2384 } 2385`,c=r.Ay.button` 2386 width: 18px; 2387 height: 18px; 2388 @media ${o.h3} { 2389 width: 26px; 2390 height: 26px; 2391 } 2392 flex-shrink: 0; 2393 padding: 0; 2394 border-radius: 50%; 2395 cursor: pointer; 2396 background: ${e=>e.$color}; 2397 border: 2px solid ${e=>e.$active?"var(--theme-palette-color-4)":"transparent"}; 2398 box-shadow: 0 0 0 1px var(--theme-palette-color-5); 2399 transition: transform 100ms ease; 2400 &:hover { 2401 transform: scale(1.15); 2402 } 2403`,p=(0,r.Ay)(c).attrs({$color:"transparent"})` 2404 position: relative; 2405 background: var(--theme-palette-color-8); 2406 &::after { 2407 content: ""; 2408 position: absolute; 2409 inset: 3px; 2410 border-top: 1.5px solid var(--theme-palette-color-2, #ef4444); 2411 transform: rotate(45deg); 2412 transform-origin: center; 2413 } 2414`,h=(0,r.Ay)(i.up).attrs({$minWidth:"260px"})` 2415 padding: 8px; 2416 /* Rows are draggable to reorder â stop drags from selecting their text. */ 2417 user-select: none; 2418`,u=r.Ay.div` 2419 font-size: 10.5px; 2420 font-weight: 600; 2421 text-transform: uppercase; 2422 letter-spacing: 0.025em; 2423 color: var(--theme-palette-color-3); 2424 padding: 2px 6px 8px; 2425`,g=r.Ay.span` 2426 display: inline-flex; 2427 flex-shrink: 0; 2428 margin: -2px -3px -2px -2px; 2429 cursor: grab; 2430 color: var(--theme-palette-color-3); 2431 opacity: 0.55; 2432 &:active { 2433 cursor: grabbing; 2434 } 2435 svg { 2436 width: 13px; 2437 height: 13px; 2438 } 2439`,m=r.Ay.div` 2440 display: flex; 2441 align-items: center; 2442 gap: 9px; 2443 padding: 7px 8px; 2444 @media ${o.h3} { 2445 gap: 6px; 2446 min-height: ${44}px; 2447 padding: 2px 4px 2px 8px; 2448 } 2449 border-radius: 5px; 2450 cursor: pointer; 2451 opacity: ${e=>e.$dragging?.45:1}; 2452 color: ${e=>e.$danger?"var(--theme-palette-color-2, #ef4444)":"var(--theme-palette-color-4)"}; 2453 background: ${e=>e.$active?"var(--theme-palette-color-8)":"transparent"}; 2454 transition: background 120ms ease; 2455 &:hover { 2456 background: var(--theme-palette-color-8); 2457 } 2458 &:hover .binder-row-actions { 2459 opacity: 1; 2460 } 2461 svg { 2462 flex-shrink: 0; 2463 color: ${e=>e.$active?"var(--theme-palette-color-1)":"var(--theme-palette-color-3)"}; 2464 } 2465`,f=r.Ay.div` 2466 display: flex; 2467 align-items: center; 2468 gap: 8px; 2469 padding: 5px 8px; 2470 svg { 2471 flex-shrink: 0; 2472 color: var(--theme-palette-color-3); 2473 } 2474`,x=r.Ay.span` 2475 flex: 1; 2476 min-width: 0; 2477 font-size: 12.5px; 2478 font-weight: 500; 2479 overflow: hidden; 2480 text-overflow: ellipsis; 2481 white-space: nowrap; 2482`,v=r.Ay.span` 2483 display: inline-flex; 2484 color: var(--theme-palette-color-1); 2485`,y=r.Ay.button` 2486 display: inline-flex; 2487 align-items: center; 2488 gap: 4px; 2489 flex-shrink: 0; 2490 padding: 2px 8px 2px 6px; 2491 @media ${o.h3} { 2492 min-height: 30px; 2493 padding: 0 10px 0 8px; 2494 } 2495 border: 1px solid var(--theme-palette-color-1); 2496 border-radius: 50px; 2497 background: transparent; 2498 font-family: inherit; 2499 font-size: 9.5px; 2500 font-weight: 700; 2501 text-transform: uppercase; 2502 letter-spacing: 0.03em; 2503 color: var(--theme-palette-color-1); 2504 cursor: pointer; 2505 transition: background 120ms ease; 2506 && svg { 2507 width: 11px; 2508 height: 11px; 2509 color: var(--theme-palette-color-1); 2510 } 2511 &:hover { 2512 background: var(--theme-palette-color-8); 2513 } 2514`,w=r.Ay.div` 2515 display: inline-flex; 2516 align-items: center; 2517 gap: 2px; 2518 opacity: 0; 2519 transition: opacity 120ms ease; 2520 /* There is no hover on a touchscreen, so hover-to-reveal is hide-forever. 2521 They are always visible here â and 44px, since they are now the tap 2522 targets they always pretended to be. */ 2523 @media ${o.h3} { 2524 opacity: 1; 2525 gap: 0; 2526 } 2527`,b=r.Ay.button` 2528 display: inline-flex; 2529 align-items: center; 2530 justify-content: center; 2531 padding: 4px; 2532 @media ${o.h3} { 2533 width: ${44}px; 2534 height: ${44}px; 2535 padding: 0; 2536 } 2537 border: none; 2538 border-radius: 4px; 2539 background: transparent; 2540 color: ${e=>e.$danger?"var(--theme-palette-color-2, #ef4444)":e.$accent?"var(--theme-palette-color-1)":"var(--theme-palette-color-3)"}; 2541 cursor: pointer; 2542 &:hover { 2543 background: var(--theme-palette-color-6, var(--theme-palette-color-8)); 2544 color: ${e=>e.$danger?"var(--theme-palette-color-2, #ef4444)":"var(--theme-palette-color-1)"}; 2545 } 2546`,$=r.Ay.input` 2547 flex: 1; 2548 min-width: 0; 2549 background: var(--theme-palette-color-8); 2550 border: 1px solid var(--theme-palette-color-5); 2551 border-radius: 4px; 2552 padding: 5px 8px; 2553 font-family: inherit; 2554 font-size: 12.5px; 2555 /* 16px or iOS zooms the viewport the moment the rename field takes focus. */ 2556 @media ${o.h3} { 2557 height: ${44}px; 2558 font-size: ${16}px; 2559 } 2560 color: var(--theme-palette-color-4); 2561 &:focus { 2562 outline: none; 2563 border-color: var(--theme-palette-color-1); 2564 } 2565`,k=r.Ay.div` 2566 height: 1px; 2567 background: var(--theme-palette-color-5); 2568 margin: 6px 4px; 2569`,Y=r.Ay.button` 2570 display: flex; 2571 align-items: center; 2572 gap: 9px; 2573 width: 100%; 2574 padding: 7px 8px; 2575 border: none; 2576 border-radius: 5px; 2577 background: transparent; 2578 font-family: inherit; 2579 font-size: 12.5px; 2580 font-weight: 600; 2581 color: var(--theme-palette-color-3); 2582 cursor: pointer; 2583 &:hover { 2584 background: var(--theme-palette-color-8); 2585 color: var(--theme-palette-color-1); 2586 } 2587 svg { 2588 color: inherit; 2589 } 2590`,A=r.Ay.div` 2591 padding: 6px 8px 2px; 2592 font-size: 11px; 2593 color: var(--theme-palette-color-2, #ef4444); 2594`,C=r.Ay.div` 2595 padding: 8px 8px 4px; 2596 font-size: 10.5px; 2597 line-height: 1.45; 2598 color: var(--theme-palette-color-3); 2599`;n.d(t,["AD",0,l,"Ck",0,C,"En",0,w,"Hd",0,p,"Ly",0,d,"Oi",0,b,"RZ",0,v,"SX",0,x,"Ti",0,y,"W1",0,h,"Z3",0,f,"cG",0,k,"fI",0,m,"hE",0,u,"hY",0,s,"ly",0,Y,"mO",0,a,"pd",0,$,"rp",0,c,"s8",0,A,"tk",0,g])},19424(e,t,n){n.d(t,{i:()=>j});var r=n(10201),o=n(17402),i=n(60084),a=n(51718),l=n(70213),s=n(52754),d=n(60001),c=n(7718),p=n(87109),h=n(74079),u=n(91995),g=n(4738),m=n(81616),f=n(98973),x=n(90033),v=n(12434),y=n(90748),w=n(49889),b=n(4969),$=n(68217),k=n(31063);const Y=({creating:e,name:t,color:n,onName:o,onColor:i,onStart:a,onSubmit:l,onCancel:s,cap:d})=>{const c=(0,w.G)("binders");return!e&&"number"==typeof c.cap&&c.capMoment(d.count)?(0,r.Y)(y.B,{allowance:"binders",cap:c.cap,onOpen:d.onOpen}):e?(0,r.FD)(r.FK,{children:[(0,r.FD)(k.Z3,{children:[$.c1,(0,r.Y)(k.pd,{autoFocus:!0,placeholder:"Binder nameâ¦",value:t,maxLength:190,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"===e.key&&l(),"Escape"===e.key&&s()}}),(0,r.Y)(k.Oi,{title:"Create",onClick:l,children:$.Sr}),(0,r.Y)(k.Oi,{title:"Cancel",onClick:s,children:$.uv})]}),(0,r.Y)(b.U,{selected:n,onPick:i})]}):(0,r.FD)(k.ly,{onClick:a,children:[$.c1,(0,r.Y)("span",{children:"New binder"})]})};var A=n(63679),C=n(22560);const F="All binders",D=e=>`All in ${e}`,S=({label:e,title:t,active:n,onSwitch:o})=>(0,r.FD)(k.fI,{$active:n,onClick:o,title:t,children:[(0,r.Y)(k.hY,{$color:null,children:$.mL}),(0,r.Y)(k.SX,{children:e}),n&&(0,r.Y)(k.RZ,{children:$.Sr})]}),I=({offer:e})=>(0,r.Y)(S,{label:F,title:"Every binder added together, read-only",active:0===e.scope,onSwitch:()=>e.show(0)}),z=({offer:e,parent:t})=>(0,r.Y)(S,{label:D(t.name),title:`${t.name} and the binders inside it, added together, read-only`,active:e.scope===t.id,onSwitch:()=>e.show(t.id)});function T(e,t){return!e.parent_id||!t.has(e.parent_id)}function E(e){const t=new Set(e.map(e=>e.id)),n=[];for(const r of e){if(!T(r,t))continue;const o=e.filter(e=>!T(e,t)&&e.parent_id===r.id);n.push({binder:r,depth:0,children:o.length});for(const e of o)n.push({binder:e,depth:1,children:0})}return n}const L=A.Ay.div` 2600 padding-left: ${e=>e.$depth?"16px":"0"}; 2601`,M=({binder:e,targets:t,onPick:n,onCancel:o})=>{const i=e.parent_id??0,a=e=>{e!==i&&n(e),o()};return(0,r.FD)(r.FK,{children:[(0,r.FD)(k.Z3,{children:[$.Wf,(0,r.FD)(k.SX,{children:["Put â",e.name,"â inside"]}),(0,r.Y)(k.Oi,{title:"Cancel",onClick:o,children:$.uv})]}),(0,r.FD)(L,{$depth:1,children:[(0,r.FD)(k.fI,{$active:0===i,onClick:()=>a(0),children:[(0,r.Y)(k.SX,{children:"No binder (top level)"}),0===i&&(0,r.Y)(k.RZ,{children:$.Sr})]}),t.map(e=>(0,r.FD)(k.fI,{$active:i===e.id,onClick:()=>a(e.id),children:[(0,r.Y)(k.hY,{$color:e.color,children:$.sj}
2601),(0,r.Y)(k.SX,{children:e.name}),i===e.id&&(0,r.Y)(k.RZ,{children:$.Sr})]},e.id))]})]})},N=({active:e,name:t,color:n,editing:o,coloring:i,editName:a,onEditName:l,onSwitch:s,onStartRename:d,onSubmit:c,onStartColor:p,onPickColor:h,onCancel:u})=>i?(0,r.FD)(k.Z3,{style:{flexWrap:"wrap"},children:[(0,r.Y)(k.hY,{$color:n,children:$.fA}),(0,r.Y)(k.SX,{children:t}),(0,r.Y)(k.Oi,{title:"Done",onClick:u,children:$.Sr}),(0,r.Y)(b.U,{selected:n,onPick:h})]}):o?(0,r.FD)(k.Z3,{children:[$.fA,(0,r.Y)(k.pd,{autoFocus:!0,value:a,maxLength:190,onChange:e=>l(e.target.value),onKeyDown:e=>{"Enter"===e.key&&c(),"Escape"===e.key&&u()}}),(0,r.Y)(k.Oi,{title:"Save",onClick:c,children:$.Sr}),(0,r.Y)(k.Oi,{title:"Cancel",onClick:u,children:$.uv})]}):(0,r.FD)(k.fI,{$active:e,onClick:s,children:[(0,r.Y)(k.hY,{$color:n,children:$.fA}),(0,r.Y)(k.SX,{children:t}),e&&(0,r.Y)(k.RZ,{children:$.Sr}),(0,r.FD)(k.En,{className:"binder-row-actions",children:[(0,r.Y)(k.Oi,{$accent:!!n,title:"Color",onClick:e=>{e.stopPropagation(),p()},children:$.v1}),(0,r.Y)(k.Oi,{title:"Rename",onClick:e=>{e.stopPropagation(),d()},children:$.R2})]})]}),P=({binder:e,active:t,editing:n,confirming:o,coloring:i,dragging:a,editName:l,onEditName:s,onSwitch:d,onToggleShare:c,onCopyLink:p,onStartRename:h,onSubmit:u,onStartDelete:g,onStartColor:m,onStartNest:f,onPickColor:x,onConfirmDelete:v,onCancelEdit:y,onCancelDelete:w,onDragStart:Y,onDragEnter:A,onDragEnd:C})=>i?(0,r.FD)(k.Z3,{style:{flexWrap:"wrap"},children:[(0,r.Y)(k.hY,{$color:e.color,children:$.sj}),(0,r.Y)(k.SX,{children:e.name}),(0,r.Y)(k.Oi,{title:"Done",onClick:y,children:$.Sr}),(0,r.Y)(b.U,{selected:e.color,onPick:x})]}):n?(0,r.FD)(k.Z3,{children:[$.sj,(0,r.Y)(k.pd,{autoFocus:!0,value:l,maxLength:190,onChange:e=>s(e.target.value),onKeyDown:e=>{"Enter"===e.key&&u(),"Escape"===e.key&&y()}}),(0,r.Y)(k.Oi,{title:"Save",onClick:u,children:$.Sr}),(0,r.Y)(k.Oi,{title:"Cancel",onClick:y,children:$.uv})]}):o?(0,r.FD)(k.fI,{$danger:!0,children:[$.uc,(0,r.FD)(k.SX,{children:["Delete â",e.name,"â?"]}),(0,r.Y)(k.Oi,{$danger:!0,title:"Confirm delete",onClick:v,children:$.Sr}),(0,r.Y)(k.Oi,{title:"Cancel",onClick:w,children:$.uv})]}):(0,r.FD)(k.fI,{$active:t,$dragging:a,onClick:d,draggable:!0,onDragStart:Y,onDragEnter:A,onDragOver:e=>e.preventDefault(),onDragEnd:C,onDrop:e=>e.preventDefault(),children:[(0,r.Y)(k.tk,{title:"Drag to reorder",onClick:e=>e.stopPropagation(),children:$.sX}),(0,r.Y)(k.hY,{$color:e.color,children:$.sj}),(0,r.Y)(k.SX,{children:e.name}),!!e.public&&(0,r.FD)(k.Ti,{title:"Copy share link",onClick:e=>{e.stopPropagation(),p()},children:[$.qY,"Shared"]}),t&&(0,r.Y)(k.RZ,{children:$.Sr}),(0,r.FD)(k.En,{className:"binder-row-actions",children:[(0,r.Y)(k.Oi,{$accent:!!e.public,title:e.public?"Stop sharing":"Share this binder",onClick:e=>{e.stopPropagation(),c()},children:e.public?$.b:$.li}),(0,r.Y)(k.Oi,{$accent:!!e.color,title:"Color",onClick:e=>{e.stopPropagation(),m()},children:$.v1}),f&&(0,r.Y)(k.Oi,{$accent:!!e.parent_id,title:e.parent_id?"Move to another binder, or the top level":"Put inside another binder",onClick:e=>{e.stopPropagation(),f()},children:$.Wf}),(0,r.Y)(k.Oi,{title:"Rename",onClick:e=>{e.stopPropagation(),h()},children:$.R2}),(0,r.Y)(k.Oi,{title:"Delete",onClick:e=>{e.stopPropagation(),g()},children:$.uc})]})]}),O=({binders:e,activeId:t,sums:n,defaultName:i,defaultColor:a,ui:l,actions:s})=>{const[d,c]=(0,o.J0)(null),p=null!==(n?.scope??null);return(0,r.FD)(r.FK,{children:[n&&(0,r.Y)(I,{offer:n}),(0,r.Y)(N,{active:!p&&0===t,name:i,color:a,editing:0===l.editingId,coloring:0===l.coloringId,editName:l.editName,onEditName:s.onEditName,onSwitch:()=>s.switchTo(0),onStartRename:()=>s.startRename(0,i),onSubmit:()=>s.submitRename(0),onStartColor:()=>s.startColor(0),onPickColor:e=>s.pickColor(0,e),onCancel:s.cancelEdit}),E(e).map(({binder:i,depth:a,children:h})=>{const u=0===h?function(e,t){const n=new Set(e.map(e=>e.id));return e.filter(e=>e.id!==t&&T(e,n))}(e,i.id):[];return(0,r.FD)(o.Ay.Fragment,{children:[(0,r.Y)(L,{$depth:a,children:d===i.id?(0,r.Y)(M,{binder:i,targets:u,onPick:e=>s.nest(i.id,e),onCancel:()=>c(null)}):(0,r.Y)(P,{binder:i,active:!p&&t===i.id,editing:l.editingId===i.id,c
2601onfirming:l.confirmId===i.id,coloring:l.coloringId===i.id,dragging:l.dragId===i.id,editName:l.editName,onEditName:s.onEditName,onSwitch:()=>s.switchTo(i.id),onDragStart:()=>s.dragStart(i.id),onDragEnter:()=>s.dragEnter(i.id),onDragEnd:s.dragEnd,onToggleShare:()=>s.toggleShare(i),onCopyLink:()=>s.copyLink(i),onStartRename:()=>s.startRename(i.id,i.name),onSubmit:()=>s.submitRename(i.id),onStartDelete:()=>s.startDelete(i.id),onStartColor:()=>s.startColor(i.id),onStartNest:u.length>0?()=>c(i.id):void 0,onPickColor:e=>s.pickColor(i.id,e),onConfirmDelete:()=>s.confirmDelete(i.id),onCancelEdit:s.cancelEdit,onCancelDelete:s.cancelDelete})}),h>0&&n&&(0,r.Y)(L,{$depth:1,children:(0,r.Y)(z,{offer:n,parent:i})})]},i.id)})]})};var _=n(92248);function R({onMove:e,close:t}){return(0,r.FD)(r.FK,{children:[(0,r.Y)(k.cG,{}),(0,r.Y)(s.vj,{as:"menu",icon:(0,r.Y)(l.hR,{size:14}),label:"Move cards",hint:"Move the filtered cards you own to another binder",onClick:()=>{t(),e()}})]})}const j=({inSheet:e,onMove:t,allowAll:n})=>{const l=(0,m.h3)(),s=l?.binders,y=l?.defaultBinderName||"Default Binder",w=l?.defaultBinderColor??null,{open:b,setOpen:A,ref:S,align:I}=(0,a.G)(260),[z,T]=(0,o.J0)(()=>s??[]),[E,L]=(0,o.J0)(p.KJ),[M,N]=(0,o.J0)(!1),[P,j]=(0,o.J0)(null),[J,B]=(0,o.J0)(!1),[K,W]=(0,o.J0)(""),[U,Q]=(0,o.J0)(null),[G,H]=(0,o.J0)(null),[q,V]=(0,o.J0)(""),[X,Z]=(0,o.J0)(null),[ee,te]=(0,o.J0)(null),[ne,re]=(0,o.J0)(null),[oe,ie]=(0,o.J0)(void 0),{dragId:ae,dragStart:le,dragEnter:se,dragEnd:de}=(0,_.L)(z,T),ce=function(e,t){const n=(0,C.S)(),r=e?n:null;return{scope:r,offer:e&&t>0?{scope:r,show:e=>{(0,p.jg)(e),A(!1)}}:void 0}}(!0===n,z.length),pe=function(e,t,n){return(0,o.hb)(async(r,o)=>{const a=e.find(e=>e.id===r)?.parent_id??null,l=e=>t(t=>t.map(t=>t.id===r?{...t,parent_id:e}:t));n(null),l(o||null);try{await(0,i.rS)(r,o)}catch(e){l(a),n(e instanceof Error?e.message:"Could not move the binder")}},[e,t,n])}(z,T,j),he=(0,x.y)(),ue=(0,o.hb)(e=>{const t=(0,p.KJ)();0===t||e.some(e=>e.id===t)||((0,p.Yx)(0),L(0))},[]);if((0,o.vJ)(()=>{if(s)return T(s),void ue(s);let e=!0;return(0,i.mB)().then(t=>{e&&(T(t),ue(t))}).catch(()=>{}),()=>{e=!1}},[s,ue]),(0,o.vJ)(()=>{const e=e=>{const t=e.detail?.binderId??0;L(t)};return window.addEventListener(p.C0,e),()=>window.removeEventListener(p.C0,e)},[]),!window.DotGGUser)return null;const ge=ne??y,me=void 0!==oe?oe:w,fe=function(e){if(null!==e.scope){const t=0===e.scope?void 0:e.binders.find(t=>t.id===e.scope);return{name:t?D(t.name):F,color:null,accent:!0,glyph:$.mL}}const t=0===e.activeId,n=t?void 0:e.binders.find(t=>t.id===e.activeId),r=t?e.defaultColor:n?.color??null;return{name:n?.name??e.defaultName,color:r,accent:!!r||!t,glyph:$.sj}}({scope:ce.scope,activeId:E,binders:z,defaultName:ge,defaultColor:me}),xe=e=>{(0,p.Yx)(e),L(e),A(!1)},ve=l?.user?.nickname||"",ye=e=>((e,t)=>{const n=t.slug?`u/${encodeURIComponent(e)}/binder/${encodeURIComponent(t.slug)}`:`u/${encodeURIComponent(e)}/collection?binder=${t.id}`;return`${v.Ay.BASE_URL}${n}`})(ve,e),we=(e,t)=>{0===e?ie(t):T(n=>n.map(n=>n.id===e?{...n,color:t??null}:n))},be={...($e={setEditName:V,setEditingId:H,setConfirmId:Z,setColoringId:te,handlers:{switchTo:xe,submitRename:async e=>{const t=q.trim();if(t&&!M){N(!0),j(null);try{await(0,i.f6)(e,t),0===e?re(t):T(n=>n.map(n=>n.id===e?{...n,name:t}:n)),H(null)}catch(e){j(e instanceof Error?e.message:"Could not rename binder")}finally{N(!1)}}},confirmDelete:async e=>{if(!M){N(!0),j(null);try{await(0,i.g4)(e),T(t=>t.filter(t=>t.id!==e)),Z(null),E===e?xe(0):(0,p.XY)()}catch(e){j(e instanceof Error?e.message:"Could not delete binder")}finally{N(!1)}}},pickColor:(e,t)=>{(async(e,t)=>{if(M)return;const n=0===e?oe:z.find(t=>t.id===e)?.color??null;we(e,t),N(!0),j(null);try{await(0,i.gu)(e,t)}catch(t){we(e,n),j(t instanceof Error?t.message:"Could not update color")}finally{N(!1)}})(e,t)},toggleShare:e=>{(async e=>{if(!M){N(!0),j(null);try{const t=!e.public;await(0,i.SX)(e.id,t),T(n=>n.map(n=>n.id===e.id?{...n,public:t?1:0}:n)),t?((0,g.GD)(ye(e)),(0,u.GF)("Binder shared â link copied")):(0,u.$S)("Sharing turned off")}catch(e){j(e instanceof Error?e.message:"Could not update sharing")}finally{N(!1)}}})(e)},copyLink:e=>{(0,g.GD)(ye(e)),(0,u.GF)("Link copied")},nest:(e,t)=>
2601{pe(e,t)},dragStart:le,dragEnter:se,dragEnd:de}}).handlers,onEditName:$e.setEditName,startRename:(e,t)=>{$e.setEditName(t),$e.setEditingId(e),$e.setConfirmId(null),$e.setColoringId(null)},startDelete:e=>{$e.setConfirmId(e),$e.setEditingId(null),$e.setColoringId(null)},startColor:e=>{$e.setColoringId(e),$e.setEditingId(null),$e.setConfirmId(null)},cancelEdit:()=>{$e.setEditingId(null),$e.setColoringId(null)},cancelDelete:()=>$e.setConfirmId(null)};var $e;const ke=(0,r.FD)(r.FK,{children:[(0,r.Y)(O,{binders:z,activeId:E,sums:ce.offer,defaultName:ge,defaultColor:me,ui:{editingId:G,confirmId:X,coloringId:ee,editName:q,dragId:ae},actions:be}),(0,r.Y)(k.cG,{}),(0,r.Y)(Y,{creating:J,name:K,color:U,onName:W,onColor:Q,onStart:()=>{B(!0),j(null)},onSubmit:async()=>{const e=K.trim();if(e&&!M){N(!0),j(null);try{const t=await(0,i.pw)(e,U);T(e=>[...e,t]),W(""),Q(null),B(!1)}catch(e){j(e instanceof Error?e.message:"Could not create binder")}finally{N(!1)}}},onCancel:()=>{B(!1),W(""),Q(null)},cap:{count:z.length,onOpen:()=>{A(!1),he.open("cap.binders")}}}),P&&(0,r.Y)(k.s8,{children:P}),(0,r.Y)(k.Ck,{children:"Each binder is a separate collection â e.g. a kid's cards â tracked apart from your main collection."})]});return e?(0,r.FD)(c.Dp,{label:"Binder",summary:fe.name,children:[(0,r.Y)(d.$Z,{children:ke}),he.sheet]}):(0,r.FD)(k.mO,{ref:S,children:[(0,r.FD)(f.ST,{$open:b,onClick:()=>A(e=>!e),title:"Switch or manage your binders",children:[(0,r.Y)(k.hY,{$color:fe.color,children:fe.glyph}),(0,r.Y)(k.AD,{$accent:fe.accent,$accentColor:(0,h.Zr)(fe.color),children:fe.name}),$.zp]}),b&&(0,r.FD)(k.W1,{$align:I,children:[(0,r.Y)(k.hE,{children:"Binders"}),ke,t&&z.length>0&&(0,r.Y)(R,{onMove:t,close:()=>A(!1)})]}),he.sheet]})}},92248(e,t,n){n.d(t,{H:()=>a,L:()=>l});var r=n(17402),o=n(60084),i=n(91995);function a(e,t,n,o){const[a,l]=(0,r.J0)(null),s=(0,r.li)(e);return s.current=e,{dragId:a,dragStart:e=>l(e),dragEnter:e=>{l(n=>(null===n||n===e||t(t=>{const r=t.findIndex(e=>e.id===n),o=t.findIndex(t=>t.id===e);if(r<0||o<0||r===o)return t;const i=[...t],[a]=i.splice(r,1);return a?(i.splice(o,0,a),i):t}),n))},dragEnd:()=>{l(null),n(s.current.map(e=>e.id)).catch(()=>{(0,i.Ni)(o)})}}}function l(e,t){return a(e,t,e=>(0,o.tA)(e),"Could not save the binder order. Please try again.")}},74052(e,t,n){n.d(t,{A:()=>i,C:()=>o});var r=n(17402);function o(e){const[t,n]=(0,r.J0)(e);return(0,r.vJ)(()=>{n(e)},[e]),t}function i(e){const t=(0,r.Kr)(()=>({collectionFilter:e.collectionFilter,collectionEdition:e.collectionEdition,collectionDisplayMode:e.collectionDisplayMode,collectionUnrestricted:e.collectionUnrestricted,mode:e.mode,filters:e.filters,virtualTextSearchString:e.virtualTextSearchString,deltaMode:e.deltaMode,foilEffect:e.foilEffect,showPrices:e.showPrices,dimUnowned:e.dimUnowned}),[e.collectionFilter,e.collectionEdition,e.collectionDisplayMode,e.collectionUnrestricted,e.mode,e.filters,e.virtualTextSearchString,e.deltaMode,e.foilEffect,e.showPrices,e.dimUnowned]),n=o(t);return{gridState:(0,r.Kr)(()=>({...e,...n}),[e,n]),gridPending:n!==t}}},51718(e,t,n){n.d(t,{G:()=>o});var r=n(17402);function o(e){const[t,n]=(0,r.J0)(!1),[o,i]=(0,r.J0)("right"),a=(0,r.li)(null);return(0,r.Nf)(()=>{t&&e&&i(function(e,t){if(!e||"undefined"==typeof window)return"left";const n=e.getBoundingClientRect();return n.left+t<=window.innerWidth-12?"left":n.right-t>=12?"right":"left"}(a.current,e))},[t,e]),(0,r.vJ)(()=>{if(!t)return;const e=e=>{a.current&&!a.current.contains(e.target)&&n(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[t]),{open:t,setOpen:n,ref:a,align:o}}},539(e,t,n){n.d(t,{cw:()=>c,p3:()=>d,sm:()=>u});var r=n(16133),o=n(54807),i=n(86031),a=n(4738);const l=()=>"cardmarket"===function(){const e=i.SA.cards.priceProviders?.[0];return e&&((0,a.Ri)(e.cookieName)||i.SA.cards.defaultPriceProvider)||"tcgplayer"}(),s=e=>e?(0,o.qg)(e,"yyyy-MM-dd",new Date).getTime()+43200:0;function d(e,t){const n=s(t),o=l()&&e.lines_cm?e.lines_cm:e.lines,i=new Map,a=new Map;for(const e of o){const t=parseInt(`${e.date}000`,10);if(0!==n&&t>n)continue;const o=(0,r.GP)(t,"yyyy-MM-dd");i.set(o,{time:o,value:parseFloat(e.Normal?e.Normal:"0")});const l=e.Foil&&"0"!==e.Foil?e.Foil:e.ColdFoil&&"0"!==e.ColdFoil?e.ColdFoil:e.Holofoil&&"0"!==e.Holofoil?e.Holofoil:"0";a.set(o,{time:o,value:parseFloat(l)})}return{normal:Array.from(i.values()),foil:Array.from(a.values()),totalLength:o.length}}function c(e,t){const n=s(t),o=new Map;for(const t of e){const e=parseInt(`${t.date}000`,10);if(0!==n&&e>n)continue;const i=(0,r.GP)(e,"yyyy-MM-dd");o.set(i,{time:i,value:parseFloat(t.closePrice?t.closePrice:"0")})}return{normal:Array.from(o.values()),totalLength:e.length}}const p=e=>null!=e&&parseFloat(String(e))||0,h=e=>parseFloat(String(e||"0"))||0;function u(e){const t=l();return{useCardmarket:t,cardPrice:p(t?e.cmPrice:e.price),cardPriceFoil:p(t?e.cmFoilPrice:e.foilPrice),priceChange:h(t?e.cmDeltaPrice:e.deltaPrice),priceChangeFoil:h(t?e.cmDeltaFoilPrice:e.deltaFoilPrice),priceChange7d:h(t?e.cmDelta7dPrice:e.delta7dPrice),priceChangeFoil7d:h(t?e.cmDelta7dPriceFoil:e.delta7dPriceFoil),currencySymbol:e.currencySymbol||"$"}}n.d(t,["Gs",0,(e,t,n)=>[{key:"normal",label:"Normal",color:e.lineSeriesLineColor,fill:[e.lineSeriesTopColor,e.lineSeriesBottomColor],points:t},{key:"foil",label:"Foil",color:e.lineSeriesFoilColor,points:n}].filter(e=>e.points.some(e=>e.value>0)),"Xv",0,[{value:"7",label:"7d"},{value:"30",label:"30d"},{value:"all",label:"All"}],"dQ",0,l,"qb",0,e=>i.SA.cards.priceChartTheme[e?"Light":"Dark"]])},58582(e,t,n){n.d(t,{RU:()=>p,ft:()=>u,Qy:()=>g,oD:()=>h});var r=n(17402),o=n(4738),i=n(55612),a=n(81616),l=n(89629),s=n(12434),d=n(539);const c={normal:[],foil:[],loaded:!1};function p(e,t){const[n,p]=(0,r.J0)(c);return(0,r.vJ)(()=>{let n=!0;return p(c),async function(e){const t=`/cgfw/getcardprices?game=${s.Ay.TheGame}&cardid=${e}&cache=${(0,o.W2)(5)}`,n=await i.A.get(t,void 0,{url:`https://api.dotgg.gg${t}`}),r="object"==typeof n&&null!==n?n:void 0;void 0===r&&(0,l.yb)("getcardprices",`expected object, got ${typeof n}: ${String(n).slice(0,60)}`);const d={cardid:r?.cardid??e,fromdate:r?.fromdate??0,todate:r?.todate??0,fromdate_ymd:r?.fromdate_ymd??"",todate_ymd:r?.todate_ymd??"",lines:Array.isArray(r?.lines)?r.lines:[],lines_cm:Array.isArray(r?.lines_cm)?r.lines_cm:null};return a.hw.updateState(d),d}(e).then(e=>{if(!n)return;const{normal:r,foil:o}=(0,d.p3)(e,t);p({normal:r,foil:o,loaded:!0})}).catch(e=>(0,l.N7)(e,"useCardPriceHistory")),()=>{n=!1}},[e,t]),n}function h(e,t){const[n,p]=(0,r.J0)(c);return(0,r.vJ)(()=>{let n=!0;return p(c),async function(e){const t=`/cgfw/getproductprices?game=${s.Ay.TheGame}&productid=${e}&cache=${(0,o.W2)(5)}`,n=await i.A.get(t,void 0,{url:`https://api.dotgg.gg${t}`});return a.cg.updateState(n),n}(e).then(e=>{if(!n)return;const{normal:r}=(0,d.cw)(e.lines,t);p({normal:r,foil:[],loaded:!0})}).catch(e=>(0,l.N7)(e,"useProductPriceHistory")),()=>{n=!1}},[e,t]),n}function u(){const[e,t]=(0,r.J0)(!1);return(0,r.vJ)(()=>function(e){const t="undefined"!=typeof cookieStore?cookieStore:void 0;if(!t)return()=>{};const n=({changed:t})=>{for(const{name:n,value:r}of t)"blocksy_current_theme"===n&&("light"===r?e(!0):"dark"===r&&e(!1))};
2601return t.addEventListener("change",n),()=>t.removeEventListener("change",n)}(t),[]),e}function g(e="all"){return(0,r.J0)(e)}},22197(e,t,n){n.d(t,{Uc:()=>$});var r=n(10201),o=n(17402),i=n(4941),a=n(8647),l=n(83708),s=n(9299),d=n(55622),c=n(21398);const p=({size:e=12,className:t})=>(0,r.FD)("svg",{width:e,height:e,viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,r.Y)("circle",{cx:"256",cy:"256",r:"256",fill:"currentColor"}),(0,r.Y)("g",{transform:"translate(256, 256) scale(1.6) translate(-256, -256)",children:(0,r.Y)("path",{d:"M285.59 257.43l-5.38 22.41h-37.35c4.83 15.28 15.36 22.92 31.48 22.92 17.71 0 34.29-5.71 49.69-17.12v45.83c-12.8 8.73-28.25 13.09-46.33 13.09-29.26 0-50.92-6.67-64.93-20.02-13.98-13.34-22.54-28.25-25.69-44.7h-22.24l5.83-22.41h13.6c-.17-1.22-.25-3.4-.25-6.51 0-3.27.08-5.62.25-7.09h-16.41l5.83-22.41h13.39c10.66-42.14 39.96-63.2 87.84-63.2 15.66 0 31.52 4.19 47.6 12.58l-11.08 44.58c-11.17-10.25-22.83-15.36-34.96-15.36-15.91 0-26.7 7.13-32.28 21.4h44.41l-5.38 22.41h-43.31c-.16 1.64-.25 3.99-.25 7.09v6.51h45.92z",fill:"#b0bac5"})})]}),h=({size:e=12,className:t})=>(0,r.Y)("svg",{width:e,height:e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,r.Y)("path",{d:"M0.142578 6.99997C0.142578 3.21282 3.21258 0.142822 6.99972 0.142822C10.7869 0.142822 13.8569 3.21282 13.8569 6.99997C13.8569 10.7871 10.7869 13.8571 6.99972 13.8571C3.21258 13.8571 0.142578 10.7871 0.142578 6.99997ZM7.16344 7.49825C8.01315 7.70739 8.26772 7.98454 8.26772 8.45254C8.26772 8.93882 7.94058 9.30682 7.16344 9.36596V7.49825ZM6.65001 6.44882C5.92315 6.26682 5.65029 5.96254 5.65029 5.54882C5.65029 5.13511 5.99572 4.75825 6.65029 4.67654L6.65001 6.44882ZM7.16344 6.57139V4.67654C7.74515 4.74911 8.15401 5.08082 8.21315 5.65368H9.15829C9.12201 4.62225 8.29944 3.94054 7.16344 3.84939V3.08168H6.65001V3.84939C5.50486 3.93597 4.68715 4.60825 4.68715 5.62625C4.68715 6.54854 5.30972 7.06682 6.46372 7.33482L6.65001 7.38025V9.36139C5.91858 9.28425 5.57315 8.89339 5.49144 8.36168H4.55086C4.58229 9.45225 5.49601 10.102 6.65001 10.1885V10.9517H7.16344V10.1885C8.32229 10.1065 9.23115 9.47511 9.23115 8.36168C9.23115 7.39397 8.57686 6.90311 7.38172 6.62597L7.16344 6.57139Z",fill:"currentColor"})});var u=n(78688),g=n(86031),m=n(4738),f=n(91181),x=n(65986),v=n(12434),y=n(69143);const w=({props:e,cardData:t,ratio:n,ratioBackside:o,showingBack:i,setShowingBack:a,activeImageSrc:l,missingCardImage:s,onImageMissing:d})=>(0,r.FD)(r.FK,{children:[e.quantity&&!e.withTitle?(0,r.FD)(y.Am,{$small:e.smallPrice,$screenShot:e.forScreenShot,children:["x",e.quantity]}):(0,r.Y)(r.FK,{}),!0===e.withBackside&&!0===t.hasback?(0,r.Y)(y.m8,{onClick:e=>{e.stopPropagation(),e.preventDefault(),a(!i)},children:i?g.SA.cards.backSidesNames[0]:g.SA.cards.backSidesNames[1]}):(0,r.Y)(r.FK,{}),e.condensed?(0,r.Y)(y.M0,{$src:t.image,$turned:t.rotate90,className:"frontside"}):e.withBackside&&t.hasback?(0,r.FD)(y.F7,{style:{transform:i?"rotateY(180deg)":"rotateY(0deg)"},children:[(0,r.Y)(y.Jw,{$src:t.image,$backgroundMode:g.SA.decks.cardImageMode,$ratio:n,className:"frontside",$hidden:i,$position:e.position,$rotate90:t.rotate90}),(0,r.Y)(y.up,{$src:t.image_back,$backgroundMode:g.SA.decks.cardImageMode,$ratio:o,$hidden:!i,className:"backside",$rotate90:t.rotate90_back})]}):(0,r.Y)(y.Jw,{$ratio:n,$backgroundMode:g.SA.decks.cardImageMode,$src:s?g.SA.cards.cardImagePlaceholder:l,className:"frontside",$position:e.position,$rotate90:e.backside?t.rotate90_back:t.rotate90,children:""!==l?(0,r.Y)(c.A,{src:l,isMissing:d},l):(0,r.Y)(r.FK,{})})]}),b=({props:e,cardData:t,subtitle:n,subtitleExtra:o,showLegality:i,effectivePrice:l,titleIsNotAMiddleRow:s})=>(0,r.FD)(y.Nw,{$maxWidth:e.width,$rounded:s,children:[(0,r.FD)(y.Tj,{children:[(0,r.Y)(y.Mo,{$width:e.width,children:t.displayName}),e.quantity?(0,r.FD)(y.nc,{$small:e.smallPrice,children:["x",e.quantity]}):(0,r.Y)(r.FK,{})]}),e.showCollectionStatus&&e.quantity&&(0,r.Y)(u.h,{cardId:t.id,deckQuantity:e.quantity,mode:"image",fullDeck:e.fullDeck,currentBoard:e.currentBoard,claimedOffset:e.collectionClaimedOffset}),e.showChanges&&e.cardChange&&(0,r.FD)(y.gp,{$isNew:e.cardChange.
2601isNew,$isRemoved:e.cardChange.isRemoved,children:[e.cardChange.isNew&&"NEW",e.cardChange.isRemoved&&"REMOVED",!e.cardChange.isNew&&!e.cardChange.isRemoved&&(0,r.FD)(r.FK,{children:[e.cardChange.delta>0&&`Added ${e.cardChange.delta}`,e.cardChange.delta<0&&`Removed ${Math.abs(e.cardChange.delta)}`]})]}),"string"==typeof n?(0,r.Y)(y.Mz,{$rounded:s,children:void 0!==e.usedInDecks?(0,r.FD)(y.H8,{$rounded:!0,children:["Used in ",(0,r.FD)("strong",{children:[Math.round(1e4*+e.usedInDecks)/100,"%"]})," of decks."]}):(0,r.FD)(r.FK,{children:[(0,r.FD)(y.H8,{$rounded:s,children:[n,o,i?"banned"===i?(0,r.FD)(r.FK,{children:[" ",": ",(0,r.FD)("span",{style:{color:"red"},children:["banned (",e.legality,")"]})]}):"restricted"===i?(0,r.FD)(r.FK,{children:[" : restricted (",e.legality,")"]}):(0,r.Y)(r.FK,{}):(0,r.Y)(r.FK,{})]}),g.SA.cards.showPrices&&!e.hidePrice&&l?(0,r.FD)(y.Ds,{$small:void 0!==e.quantity,$rounded:s,children:["â¬"===t.currencySymbol?(0,r.Y)(p,{size:12}):(0,r.Y)(h,{size:12}),l.toFixed(2)]}):(0,r.Y)(r.FK,{})]})}):n,void 0!==e.collectionElementInsertion&&(0,r.Y)(a.T,{...e.collectionElementInsertion})]}),$=e=>{const[t,n]=(0,o.J0)(!1),[a,c]=(0,o.J0)(null),[p,h]=(0,o.J0)(0),u=(0,l.O)(),$=(0,f.Yx)(),k=(0,o.Kr)(()=>{if("object"==typeof e.cardId)return e.cardId;if(void 0!==$){const t="string"==typeof e.cardId?f.jb.getMap().get(e.cardId):void 0,n=(void 0!==e.cardSlug?$.find(t=>t.slug===e.cardSlug):void 0)??(void 0!==t&&$[t]?.id===e.cardId?$[t]:void 0)??$.find(t=>t.id===e.cardId);if(n)return n}return x.Sg},[e.cardId,e.cardSlug,$]),Y=e.backside?k.image_back:k.image,A=null!==a&&a===Y,C=(0,o.Kr)(()=>{if(e.legality){if(-1!==(k.legalitiesBanned?.indexOf(e.legality)??-1))return"banned";if(-1!==(k.legalitiesRestricted?.indexOf(e.legality)??-1))return"restricted"}return!1},[e.legality,k]),{ratio:F,ratioBackside:D}=(0,o.Kr)(()=>{const e=g.SA.cards.cardImageRatio.split("/");return{ratio:"1"===k.horizontal?`${e[1]}/${e[0]}`:g.SA.cards.cardImageRatio,ratioBackside:"1"===k.horizontal_back?`${e[1]}/${e[0]}`:g.SA.cards.cardImageRatio}},[k.horizontal,k.horizontal_back]),S=k!==x.Sg,I=(0,o.Kr)(()=>S?g.SA.cards.getCardDrawerSubtitle(k):"",[k,S]),z=(0,o.Kr)(()=>S?g.SA.cards.getCardDrawerSubtitleExtra?.(k)??null:null,[k,S]),T=(0,o.Kr)(()=>{const t=e.collectionElementInsertion,n=t?.collectionElement;if(!n)return k.comparativePrice;const r=parseInt(String(n.standard??"0"))||0,o=parseInt(String(n.foil??"0"))||0;return("foil"===t?.edition||o>0&&0===r)&&k.comparativeFoilPrice>0?k.comparativeFoilPrice:k.comparativePrice},[k.comparativePrice,k.comparativeFoilPrice,e.collectionElementInsertion]),E=void 0===e.collectionElementInsertion;return(0,r.FD)(s.t,{justhide:!0,children:[e.cardType?(0,r.Y)(y.uX,{children:(0,m.g3)(e.cardType)}):"",(0,r.Y)(d.o,{width:e.width?`${e.width}px`:"100%",height:"auto",aspectRatio:e.condensed?"auto 7/6":`auto ${F}`,unloadOffscreen:!0,children:(0,r.FD)(y.QH,{href:e.clickable?`${v.Ay.BASE_URL}cards/${k.slug}`:"","data-native":!!e.clickable||void 0,$ratio:t?D:F,$pointer:void 0!==e.onClick||void 0!==e.clickable,$dimmed:e.dimmed,$condensed:e.condensed,onClick:t=>{e.clickable?void 0!==e.onClick?(t.preventDefault(),e.onClick(k.id),t.stopPropagation()):(t.preventDefault(),u?u(k.id):h(p+1),t.stopPropagation()):t.preventDefault()},$width:e.width,$cardDetail:e.cardDetail,$deckBuilder:e.deckBuilder,$noHoverLight:e.noHoverLight,children:[(0,r.Y)(w,{props:e,cardData:k,ratio:F,ratioBackside:D,showingBack:t,setShowingBack:n,activeImageSrc:Y,missingCardImage:A,onImageMissing:()=>c(Y)}),e.foil&&!t&&(0,r.Y)(y.Zo,{className:"foil-sheen","aria-hidden":"true"})]})}),e.belowImage,e.withTitle?(0,r.Y)(b,{props:e,cardData:k,subtitle:I,subtitleExtra:z,showLegality:C,effectivePrice:T,titleIsNotAMiddleRow:E}):"",null===u&&(0,r.Y)(i.X,{cardId:k.id,show:p})]})}},69143(e,t,n){var r=n(63679);const o=e=>`url("${String(e??"").replace(/["\\\n]/g,e=>"\n"===e?"":`\\${e}`)}")`,i=r.Ay.div` 2602 display: flex; 2603 padding: 5px; 2604 justify-content: center; 2605 font-size: 1.3em; 2606 color: var(--theme-palette-color-4); 2607`,a=r.Ay.div` 2608 position: absolute; 2609 left: 1%; 2610 top: 1%; 2611 background-color: var(--theme-palette-color-1); 2612 padding: 2px 5px; 2613 border-radius: 6px; 2614 color: var(--dotgg-on-accent, var(--theme-palette-color-8)); 2615 font-weight: bold; 2616 font-size: 0.8em; 2617 opacity: 0.75; 2618 z-index: 10; 2619 background-image: url(https://static.dotgg.gg/dragonball/genegic/arrows.png); 2620 background-size: 16px; 2621 background-repeat: no-repeat; 2622 background-position: 4px center; 2623 padding-left: 25px; 2624`,l=r.Ay.div` 2625 display: flex; 2626 background-color: var(--theme-palette-color-1); 2627 color: var(--dotgg-on-accent, var(--theme-palette-color-8)); 2628 font-size: 0.65em; 2629 font-weight: 700; 2630 justify-content: center; 2631 align-items: center; 2632 padding: 1px 6px; 2633 border-radius: 50px; 2634 flex-shrink: 0; 2635 margin-left: 4px; 2636`,s=r.Ay.div` 2637 display: flex; 2638 gap: 3px; 2639 align-items: center; 2640 color: var(--theme-palette-color-4); 2641 font-weight: 600; 2642 padding: 2px; 2643 font-size: 0.75em; 2644 height: 22px; 2645 white-space: nowrap; 2646 @media only screen and (max-width: 800px) { 2647 font-size: 0.65em; 2648 svg { 2649 width: 10px; 2650 height: 10px; 2651 } 2652 } 2653`,d=r.Ay.div` 2654 display: flex; 2655 flex-direction: column; 2656 padding: 0; 2657 width: 100%; 2658 margin-top: 5px; 2659 margin-bottom: 5px; 2660 ${e=>e.$maxWidth?`max-width: ${e.$maxWidth}px !important;`:""} 2661`,c=r.Ay.div` 2662 display: flex; 2663 align-items: center; 2664 font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; 2665 font-size: 0.7em; 2666 letter-spacing: -0.02em; 2667 color: var(--theme-palette-color-3); 2668 padding: 2px; 2669 height: 22px; 2670 gap: 2px; 2671 white-space: nowrap; 2672 overflow: hidden; 2673 text-overflow: ellipsis; 2674 min-width: 0; 2675 @media only screen and (max-width: 800px) { 2676 font-size: 0.6em; 2677 } 2678`,p=r.Ay.div` 2679 display: flex; 2680 justify-content: space-between; 2681 align-items: center; 2682 min-height: 22px; 2683`,h=r.Ay.div` 2684 display: flex; 2685 justify-content: space-between; 2686 align-items: center; 2687 height: 22px; 2688`,u=r.Ay.div` 2689 display: flex; 2690 align-items: center; 2691 padding: 2px; 2692 font-size: 0.85em; 2693 font-weight: 600; 2694 line-height: 1.2em; 2695 color: var(--theme-palette-color-4); 2696 max-width: ${e=>e.$width?.8*e.$width+"px":"185px"}; 2697 white-space: nowrap; 2698 overflow: hidden; 2699 text-overflow: ellipsis; 2700`,g=r.Ay.div` 2701 position: absolute; 2702 right: ${e=>e.$small?"0px":"10px"}; 2703 top: ${e=>e.$small?"0px":"10px"}; 2704 background-color: var(--theme-palette-color-1); 2705 padding: 2px 5px; 2706 border: 1px solid grey; 2707 border-radius: 0 6px 0 6px; 2708 color: var(--dotgg-on-accent, var(--theme-palette-color-8)); 2709 font-weight: bold; 2710 font-size: ${e=>e.$screenShot?"2.5em":e.$small?"1.1em":"1.2em"}; 2711 z-index: 10; 2712 ${e=>e.$screenShot?"display: flex;
2712\n align-items: center;\n align-content: center;\n justify-content: center;\n line-height: 1.2em;\n padding:10px;\n opacity: 0.8;":""} 2713`,m=r.Ay.div` 2714 display: flex; 2715 align-items: center; 2716 justify-content: center; 2717 font-size: 0.7em; 2718 border-right: solid 1px var(--theme-palette-color-5); 2719 border-left: solid 1px var(--theme-palette-color-5); 2720 color: var(--theme-palette-color-8); 2721 font-weight: bold; 2722 background-color: ${e=>e.$isNew?"#64ac67ff":e.$isRemoved?"#db6363ff":"#64ac67ff"}; 2723`,f=r.Ay.a` 2724 width: ${e=>e.$width?`${e.$width}px !important;`:" 100%;"}; 2725 height: fit-content; 2726 aspect-ratio: ${e=>e.$condensed?"7/6":e.$ratio}; 2727 display: flex; 2728 flex-direction: column; 2729 justify-content: ${e=>e.$condensed?"flex-end":"center"}; 2730 align-items: center; 2731 border-radius: 3.7%; 2732 position: relative; 2733 transition: 2734 transform 200ms ease-out, 2735 opacity 200ms ease-out, 2736 filter 200ms ease-out; 2737 ${e=>e.$pointer?"cursor: pointer;":""} 2738 ${e=>e.$dimmed?"opacity: 0.55; filter: grayscale(0.45);":""} 2739 &:hover { 2740 ${e=>e.$noHoverLight?"":"transform: translateY(-2px);"} 2741 ${e=>e.$dimmed?"opacity: 1; filter: none;":""} 2742 } 2743 &:hover .frontside, 2744 &:hover .backside { 2745 ${e=>e.$noHoverLight?"":"box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);"} 2746 } 2747 @media only screen and (max-width: 800px) { 2748 display: flex; 2749 ${e=>e.$width&&!e.$deckBuilder?"width: 100%":""}; 2750 ${e=>e.$cardDetail?"aspect-ratio: auto;":""} 2751 } 2752 @media (prefers-reduced-motion: reduce) { 2753 transition: none; 2754 &:hover { 2755 transform: none; 2756 } 2757 } 2758`,x=r.i7` 2759 0%, 100% { background-position: 0% 50%; } 2760 50% { background-position: 100% 50%; } 2761`,v=r.Ay.div` 2762 position: absolute; 2763 inset: 0; 2764 z-index: 3; 2765 pointer-events: none; 2766 border-radius: 3.6%; 2767 opacity: 0.5; 2768 mix-blend-mode: color-dodge; 2769 background-image: linear-gradient( 2770 115deg, 2771 rgba(0, 0, 0, 0) 0%, 2772 rgba(255, 0, 150, 0.22) 18%, 2773 rgba(255, 220, 0, 0.22) 30%, 2774 rgba(0, 255, 170, 0.22) 42%, 2775 rgba(0, 180, 255, 0.22) 54%, 2776 rgba(150, 80, 255, 0.22) 66%, 2777 rgba(255, 0, 150, 0.22) 78%, 2778 rgba(0, 0, 0, 0) 100% 2779 ); 2780 background-size: 300% 300%; 2781 animation: ${x} 7s ease-in-out infinite; 2782 transition: opacity 200ms ease; 2783 2784 ${f}:hover & { 2785 opacity: 0.78; 2786 } 2787 2788 @media (prefers-reduced-motion: reduce) { 2789 animation: none; 2790 background-position: 50% 50%; 2791 } 2792`,y=r.Ay.div.attrs(e=>({style:"1"===e.$turned?{}:{backgroundImage:o(e.$src)}}))` 2793 position: relative; 2794 border-radius: 3.6%; 2795 width: 100%; 2796 aspect-ratio: 7/6; 2797 overflow: hidden; 2798 background: var(--theme-palette-color-8) center top / cover no-repeat; 2799 ${e=>"1"===e.$turned?`\n &::before {\n content: "";\n position: absolute;\n top: 50%;\n left: 50%;\n width: calc(100% * 6 / 7);\n height: calc(100% * 7 / 6);\n background: center / cover no-repeat ${o(e.$src)};\n transform: translate(-50%, -50%) rotate(90deg);\n }\n `:""} 2800`,w=e=>{if("1"!==e.$rotate90)return"";const t="contain"===e.$backgroundMode;return`\n &::before {\n content: "";\n position: absolute;\n top: 50%;\n left: 50%;\n ${t?`width: calc(100% * (${e.$ratio})); aspect-ratio: ${e.$ratio};`:"height: 140%; aspect-ratio: 63 / 88;"}\n background: center / ${t?"contain":"cover"} no-repeat ${o(e.$src)} var(--theme-palette-color-8);\n transform: translate(-50%, -50%) rotate(90deg);\n }\n `},b=r.Ay.div.attrs(e=>({style:{background:"1"===e.$rotate90?"var(--theme-palette-color-8)":`center / ${e.$backgroundMode?e.$backgroundMode:"cover"} no-repeat ${o(e.$src)} var(--theme-palette-color-8)`,position:e.$position?e.$position:"relative",aspectRatio:`auto ${e.$ratio}`}}))` 2801 border-radius: 3.6%; 2802 max-height: 100%; 2803 max-width: 100%; 2804 width: 100%; 2805 left: 0; 2806 top: 0; 2807 ${e=>e.$hidden?"visibility: hidden;":""} 2808 overflow: hidden; 2809 object-fit: contain; 2810 2811 ${w} 2812`,$=r.Ay.div.attrs(e=>({style:{background:"1"===e.$rotate90?"var(--theme-palette-color-8)":`center / ${e.$backgroundMode?e.$backgroundMode:"cover"} no-repeat ${o(e.$src)} var(--theme-palette-color-8)`}}))` 2813 border-radius: 3.6%; 2814 height: auto; 2815 max-height: 100%; 2816 max-width: 100%; 2817 width: 100%; 2818 position: absolute; 2819 left: 0; 2820 top: 0; 2821 border: solid 1px rgba(0, 0, 0, 0); 2822 transform: rotateY(-180deg); 2823 ${e=>e.$hidden?"visibility: hidden;":""} 2824 background: var(--theme-palette-color-8); 2825 overflow: hidden; 2826 object-fit: contain; 2827 aspect-ratio: auto ${e=>e.$ratio}; 2828 2829 ${w} 2830`,k=r.Ay.div` 2831 position: relative; 2832 width: 100%; 2833 height: 100%; 2834 transition: 0.3s; 2835 transform: rotateY(0deg); 2836`;r.Ay.div` 2837 color: #eee; 2838 text-align: center; 2839 line-height: 1em; 2840 display: flex; 2841 height: 20%; 2842 align-items: center; 2843 justify-content: center; 2844 width: 85%; 2845 text-shadow: 2846 0 3px 6px rgba(19, 25, 43, 0.2), 2847 0 3px 6px rgba(19, 25, 43, 0.12); 2848 font-weight: bold; 2849`,r.Ay.div` 2850 position: absolute; 2851 display: flex; 2852 align-items: center; 2853 gap: 5px; 2854 right: ${e=>e.$small?"5px":"10px"}; 2855 top: ${e=>e.$hasQuanitiy?"40px":e.$small?"5px":"10px"}; 2856 background-color: var(--theme-palette-color-1); 2857 padding: 2px 5px; 2858 border: 1px solid grey; 2859 border-radius: 6px; 2860 color: var(--dotgg-on-accent, var(--theme-palette-color-8)); 2861 font-weight: bold; 2862 font-size: ${e=>e.$small?"0.7em":"1em"}; 2863 opacity: 0.85;
2864 z-index: 1; 2865 @media only screen and (max-width: 800px) { 2866 right: 2px !important; 2867 top: 2px !important; 2868 font-size: 0.7em !important; 2869 } 2870`,n.d(t,["Am",0,g,"Ds",0,s,"F7",0,k,"H8",0,c,"Jw",0,b,"M0",0,y,"Mo",0,u,"Mz",0,h,"Nw",0,d,"QH",0,f,"Tj",0,p,"Zo",0,v,"gp",0,m,"m8",0,a,"nc",0,l,"uX",0,i,"up",0,$])},45298(e,t,n){n.d(t,{d:()=>X});var r=n(10201),o=n(17402),i=n(7225),a=(n(79984),n(74052)),l=n(99907),s=n(86031),d=n(672),c=n(13810),p=n(91181),h=n(81616);function u({loadedFilters:e,request:t,isCollection:n,collectionFilter:r,currentCollection:i,maxCardsInCollection:u,alien:g}){const m=(0,p.Yx)(),f=(0,h.h3)(),x=(0,a.C)((0,o.Kr)(()=>({loadedFilters:e,request:t,collectionFilter:r,currentCollection:i}),[e,t,r,i])),{loadedFilters:v,request:y,collectionFilter:w,currentCollection:b}=x;return(0,o.Kr)(()=>{if(!m||0===m.length)return v;if(!1===s.SA.cards.dynamicFiltersEnabled)return v;if(!0===s.SA.decks.serverSideCardsLibrary)return v;const e=n&&(g||w&&w.length>0)?(0,l.X3)(m,{collectionFilter:w??[],currentCollection:b??[],viewerCollection:f?.collection,deckCardCounts:f?.deckCardCounts,maxCardsInCollection:u??1/0,alien:g}):m,t=e=>(0,d.lD)({cards:e,currentFilters:y,baseFilterOptions:v,config:{showCounts:!0,disableEmpty:!0,hideEmpty:!1},andMode:"1"===y.filterLogicAnd,queryFor:(0,c.gj)(y.textSearch,e)}),r=t(e);if(e===m)return r;const o=t(m);return Object.fromEntries(Object.entries(r).map(([e,t])=>{const n=new Set((o[e]??[]).filter(e=>!0===e.isDisabled).map(e=>e.value));return[e,t.map(e=>({...e,isDisabled:n.has(e.value)}))]}))},[m,y,v,n,w,b,u,g,f?.collection,f?.deckCardCounts])}var g=n(63679),m=n(28943),f=n(23764),x=n(7718),v=n(98597);function y({filterKey:e,options:t,request:n,filterchange:a}){const l=!i.S.includes(e),s=(n[e]??"").split(",").map(e=>e.trim().toLowerCase()).filter(e=>""!==e),d=(0,x.DQ)(),[c,p]=(0,o.J0)(!1),h=(0,o.Kr)(()=>t.filter(e=>""!==e.value&&!e.hideWhenEmpty&&!0!==e.isSubHeading),[t]);if(0===h.length)return null;const u=(0,v.v)(e,t),g=e=>s.includes(e.value.toString().toLowerCase()),y=t=>{const n=t.value.toString();if(!l)return void a(g(t)?"":n,e);const r=n.toLowerCase(),o=(s.includes(r)?s.filter(e=>e!==r):[...s,r]).map(e=>h.find(t=>t.value.toString().toLowerCase()===e)?.value.toString()??e);a(o.join(","),e)};if(c||h.length>12){const o=!c,v=o?[...h.filter(g),...h.filter(e=>!g(e)).slice(0,4)]:[],b=`All ${h.length} â`,$=h.map(e=>({id:e.value.toString().toLowerCase(),label:"string"==typeof e.label?e.label:e.value.toString(),count:"number"==typeof e.cardsCount?e.cardsCount:void 0,disabled:!0===e.isDisabled})),k=t=>{if(null===t)return void a("",e);const n=h.find(e=>e.value.toString().toLowerCase()===t);n&&y(n)};return(0,r.Y)(f.Iy,{label:u,leading:o?d?(0,r.Y)(x.Dp,{label:u,trigger:(e,t)=>(0,r.Y)(f.Aw,{type:"button",onClick:e,...t,children:b}),children:(0,r.Y)(m.n,{options:$,selected:s,multi:l,anyLabel:"Any",allowAny:!0,onPick:k})}):(0,r.Y)(f.Aw,{type:"button",onClick:()=>p(!0),children:b}):void 0,children:o?v.map(e=>(0,r.Y)(w,{option:e,active:g(e),onToggle:()=>y(e)},e.value)):(0,r.Y)(Y,{children:(0,r.Y)(i.F,{filterKey:e,theFilters:t,request:n,filterchange:a,labeled:!0})})})}const b=[...h.filter(g),...h.filter(e=>!g(e))];return(0,r.Y)(f.Iy,{label:u,children:b.map(e=>(0,r.Y)(w,{option:e,active:g(e),onToggle:()=>y(e)},e.value))})}function w({option:e,active:t,onToggle:n}){return(0,r.Y)(f.$7,{type:"button",$active:t,"aria-pressed":t,disabled:!0===e.isDisabled&&!t,title:"string"==typeof e.label?e.label:void 0,onClick:n,children:(o=e.labelElement,"object"==typeof o&&null!==o?e.labelElement:(0,r.Y)(f.RN,{children:e.label}))});var o}function b({dynamicFilters:e,filterKeys:t,request:n,filterchange:i,collapseAfter:a,leadKeys:l=[]}){const[s,d]=(0,o.J0)(!1),c=t.filter(t=>void 0!==e[t]),p=[...l.filter(e=>c.includes(e)),...c.filter(e=>!l.includes(e))],h=void 0===a||s?p:p.slice(0,a),u=p.slice(h.length),g=u.filter(e=>""!==(n[e]??"")).length;return(0,r.FD)(r.FK,{children:[h.map(t=>(0,r.Y)(y,{filterKey:t,options:e[t]??[],request:n,filterchange:i},t)),u.length>0&&(0,r.FD)($,{type:"button","aria-expanded":!1,onClick:()=>d(!0),children:[(0,r.Y)("span",{children:"More filters"}),(0,r.FD)(k,{children:[u.length,g>0?` · ${g} active`:""]}),(0,r.Y)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round","aria-hidden":"true",children:(0,r.Y)("path",{d:"M6 9l6 6 6-6"})})]})]})}const $=g.Ay.button` 2871 display: flex; 2872 align-items: center; 2873 gap: 8px; 2874 width: 100%; 2875 height: 44px; 2876 padding: 0 16px; 2877 border: none; 2878 border-bottom: 1px solid var(--theme-palette-color-5); 2879 background: none; 2880 color: var(--theme-palette-color-4); 2881 font-family: inherit; 2882 font-size: 12.5px; 2883 font-weight: 600; 2884 text-align: left; 2885 cursor: pointer; 2886 svg { 2887 margin-left: auto; 2888 color: var(--theme-palette-color-3); 2889 } 2890`,k=g.Ay.span` 2891 color: var(--theme-palette-color-1); 2892 font-weight: 700; 2893`,Y=g.Ay.div` 2894 flex: 1 1 auto; 2895 min-width: 0; 2896`;var A=n(18041),C=n(1057);function F({search:e,dynamicFilters:t,filterKeys:n,request:o,filterchange:i,collectionTag:a,picker:l,afterQuick:s}){const d=!0===l;return(0,r.FD)(r.FK,{children:[d&&(0,r.Y)(D,{children:(0,r.Y)(C.b,{...e,phone:!0,placeholder:"Search cards by name, ID, set, typeâ¦"})}),a&&(0,r.Y)(f.Kw,{label:"My collection",children:(0,r.Y)(A.M,{label:"My collection",options:a.options.filter(e=>"all"!==e.value).map(e=>({id:e.value,label:e.label.replace(/^Tag: /,"#")})),value:"all"===a.value?"":a.value,onChange:e=>a.onChange(""===e?"all":e)})}),s?(0,r.FD)(r.FK,{children:[(0,r.Y)(b,{dynamicFilters:t,filterKeys:n.slice(0,s.count),request:o,filterchange:i}),s.node,(0,r.Y)(b,{dynamicFilters:t,filterKeys:n.slice(s.count),request:o,filterchange:i})]}):(0,r.Y)(b,{dynamicFilters:t,filterKeys:n,request:o,filterchange:i,collapseAfter:l?2:void 0,leadKeys:l?["color","cost"]:void 0})]})}const D=g.Ay.div` 2897 padding: 10px 16px; 2898 border-bottom: 1px solid var(--theme-palette-color-5); 2899`;var S=n(29026),I=n(9299),z=n(89970),T=n(39583),E=n(4738),L=n(4428),M=n(8609),N=n(472),P=n(95697),O=n(50086),_=n(1221),R=n(98973);const j=(0,g.Ay)(R.ST)` 2900 background: var(--theme-palette-color-7); 2901 &:hover { 2902 background: var(--theme-palette-color-7); 2903 } 2904`,J=(0,r.FD)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,r.Y)("path",{d:"M4 21v-7"}),(0,r.Y)("path",{d:"M4 10V3"}),(0,r.Y)("path",{d:"M12 21v-9"}),(0,r.Y)("path",{d:"M12 8V3"}),(0,r.Y)("path",{d:"M20 21v-5"}),(0,r.Y)("path",{d:"M20 12V3"}),(0,r.Y)("path",{d:"M1 14h6"}),(0,r.Y)("path",{d:"M9 8h6"}),(0,r.Y)("path",{d:"M17 16h6"})]}),B=({open:e})=>(0,r.Y)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",style:{transform:e?"rotate(180deg)":"none",transition:"transform 200ms ease"},children:(0,r.Y)("path",{d:"M6 9l6 6 6-6"})}),K=({isCollection:e,deckbuilder:t,allFilters:n,setAllFilters:o,invertFilters:i,setInvertFilters:a,filterchange:l,searchString:d,advancedActiveCount:c=0})=>{const p=()=>{(0,E.TV)(t?"builder-allfilters":"cards-allfilters",n?"0":"1",30),o(!n)};return(0,r.FD)(r.FK,{children:[e&&s.SA.collection.allowScanningToCollection&&(0,r.Y)(_.C,{variant:"icon"}),t?(0,r.Y)(M.Ly,{$active:n,onClick:p,title:"More filters",children:J}):(0,r.FD)(j,{$open:n,onClick:p,children:[J,(0,r.Y)("span",{children:"More filters"}),c>0&&(0,r.Y)(R.V3,{children:c}),(0,r.Y)(B,{open:n})]}),!t&&(0,r.Y)(M.Ly,{$active:i,onClick:()=>{const e=!i;(0,E.TV)("cards-invertfilters",e?"1":"0",30),a(e),l(e?"1":"0","invertFilters")},title:"Invert filters: Hide cards that match the selected filters",children:(0,r.FD)("svg",{width:"14",height:"18",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.Y)("path",{d:"M1.375 2.125V15.3037L11.9284 1.5H2C1.65482 1.5 1.375 1.77982 1.375 2.125Z",fill:"currentColor"}),(0,r.Y)("rect",{x:"0.75",y:"0.875",width:"12.5",height:"16.25",rx:"1.375",stroke:"currentColor",strokeWidth:"1.25",fill:"none"}),(0,r.Y)("line",{x1:"1.375",y1:"15.3037",x2:"11.9284",y2:"1.5",stroke:"currentColor",strokeWidth:"1.25"})]})}),!t&&d&&(0,r.Y)(O.L,{shareTitleLable:"Share direct link to this set of filters",stringToCopy:d,withButton:!0,square:!0})]})};var W=n(79407),U=n(65562);const Q=(0,g.Ay)(M.Ly)` 2905 min-width: 36px; 2906 height: auto; 2907 font-size: 11px; 2908 font-weight: 600; 2909`,G=({filterLogicAnd:e,deckbuilder:t,onToggle:n})=>(0,r.Y)(Q,{$active:e,onClick:n,title:e?t?"AND mode: Show only dual-colored cards (click for OR to see all deck colors)":"AND mode: Show only dual-colored cards with ALL selected colors (click for OR)":t?"OR mode: Show cards of ANY deck color (click for AND to find dual-colored)":"OR mode: Show cards with ANY selected color (click for AND to find dual-colored)",children:e?"AND":"OR"}),H=({options:e,value:t,onChange:n})=>(0,r.Y)(N.l,{children:(0,r.Y)(W.R,{options:e,value:e.find(e=>e.value===t)||e[0],onChange:e=>{const t=Array.isArray(e)?e[0]?.value:e.value;t&&n(t)},isMulti:!1,placeholder:"Tags Filter"})});var q=n(24811);const V={sortby:"Sort By:",sortorder:"Order By:",ex:"Format:"},X=o.Ay.memo(({filters:e,filterchange:t,searchString:n,deckbuilder:a,colorRestriction:l,isCollection:d,sortInToolbar:c,collectionFilter:p,currentCollection:g,maxCardsInCollection:m,alien:f,compact:x,phoneChips:y,collectionTag:w,facets:b})=>{const[$,k]=(0,o.J0)(a?"1"===(0,E.Ri)("builder-allfilters"):"1"===(0,E.Ri)("cards-allfilters")),[Y,A]=(0,o.J0)((0,E.Ri)("builder-collection-tag")||"all"),D=w??Y,[O,_]=(0,o.J0)("1"===(0,E.Ri)("cards-invertfilters")),R=a?"builder-filterlogicand":"cards-filterlogicand",[j,J]=(0,o.J0)("1"===(0,E.Ri)(R)),B=(0,h.h3)();(0,o.vJ)(()=>{const n=(0,E.Ri)(R),r=e.filterLogicAnd;"1"===n&&"1"!==r&&t("1","filterLogicAnd")},[]);const W=(0,o.Kr)(()=>function(e,t){if(!e||!t)return[];const n=[{value:"all",label:"Tags Filter"},{value:"owned",label:"Owned"},{value:"not-owned",label:"Not Owned"},{value:"wishlist",label:"In Wishlist"}];return s.SA.collection?.collectionCanTrade&&n.push({value:"trade",label:"For Trade"}),n.push({value:"in-deck",label:"Used in Deck"}),n.push({value:"not-in-deck",label:"Not Used in Deck"}
2909),(0,U.RX)(e).forEach(e=>{n.push({value:`tag:${e.name}`,label:`Tag: ${e.name}`})}),n}(B?.collection,a),[B?.collection,a]),Q=(0,o.Kr)(()=>e,[e]),X=(0,T.y)({request:Q,filterchange:t,vocab:(0,z.N)(Q),colorAnd:j,delayMs:1e3}),{request:Z,fieldProps:ee,chips:te}=X,ne=u({loadedFilters:(0,o.Kr)(()=>s.SA.cards.cardFilterDrawerOptions(Z.legalities,l??Z.color),[Z.legalities,l,Z.color]),request:Q,isCollection:d,collectionFilter:p,currentCollection:g,maxCardsInCollection:m,alien:f}),re=e=>{A(e),t(e,"collectionTag")},oe=()=>{const e=!j;(0,E.TV)(R,e?"1":"0",30),J(e),X.filterchange(e?"1":"0","filterLogicAnd")},ie=Object.keys(ne).filter(e=>void 0===V[e]),ae=ie.slice(0,a?1:3),le=ie.slice(a?1:3),se=Object.keys(ne).filter(e=>c?"ex"===e:void 0!==V[e]),de=[...le,...se].filter(e=>!["sortby","sortorder"].includes(e)&&""!==(Z[e]?.toString()||"")).length,ce=(e,t)=>(0,r.Y)(I.t,{justhide:!0,children:(0,r.FD)(q.Fu,{children:[(0,r.Y)(i.F,{filterKey:e,theFilters:ne[e],request:Z,filterchange:X.filterchange,inQuery:X.inQuery.has(e),prefixLabel:t?(0,v.v)(e,ne[e]):void 0,labeled:!t}),"color"===e&&void 0!==s.SA.cards.duoColorMode&&(a||String(Z.color??"").split(",").filter(Boolean).length>=2)&&(0,r.Y)(G,{filterLogicAnd:j,deckbuilder:a,onToggle:oe})]})},e),pe=(0,r.Y)(K,{isCollection:d,deckbuilder:a,allFilters:$,setAllFilters:k,invertFilters:O,setInvertFilters:_,filterchange:t,searchString:n,advancedActiveCount:de});if(y)return(0,r.Y)(F,{search:ee,dynamicFilters:ne,filterKeys:[...ae,...le,...se],request:Z,filterchange:X.filterchange,picker:a,afterQuick:b&&{count:ae.length,node:b.sheet},collectionTag:(he=W,ue=D,ge=re,he.length>0?{options:he,value:ue,onChange:ge}:void 0)});var he,ue,ge;const me=Object.keys(e).filter(t=>"invertFilters"!==t&&!("textSearch"===t&&te)&&"filterLogicAnd"!==t&&""!==e[t]&&void 0!==e[t]),fe=!x||$?ae:[],xe=(0,r.FD)(r.FK,{children:[(0,r.FD)(N.l,{"data-cell":"search",$column:a?"1/3":void 0,$mobileWrap:!0,children:[(0,r.Y)(C.b,{...ee,placeholder:"Search Cards by Name, ID, set, type etc"}),(0,r.Y)(M.PL,{children:pe})]}),a&&W.length>0&&(!x||$)&&(0,r.Y)(H,{options:W,value:D,onChange:re}),fe.map(e=>(0,r.Y)(N.l,{children:ce(e,!0)},e)),b?.controls.map(({key:e,control:t})=>(0,r.Y)(N.l,{children:t},e)),(0,r.Y)(M.D2,{"data-cell":"buttons",children:pe})]}),ve=function(e,t,n,r){if(e&&"all"!==n)return{label:"Collection",value:t.find(e=>e.value===n)?.label??n,onRemove:()=>r("all")}}(!!a,W,D,re);return(0,r.FD)(q.mW,{"data-card-filters":!0,children:[a?(0,r.Y)(L.ro,{$twoLines:!0,children:xe}):(0,r.Y)(q.tk,{$cells:fe.length+(b?.controls.length??0),$scan:Boolean(d&&s.SA.collection.allowScanningToCollection),children:xe}),$&&(0,r.FD)(q.RB,{children:[le.map(e=>(0,r.FD)(q.id,{children:[(0,r.Y)(q.dh,{children:(0,v.v)(e,ne[e])}),ce(e)]},e)),se.map(e=>(0,r.FD)(q.id,{children:[(0,r.Y)(q.dh,{children:V[e].replace(":","")}),ce(e)]},e)),(0,r.Y)(S.I,{labelOnTop:!0})]}),(0,r.Y)(P.n,{filters:e,activeFilters:me,invertFilters:O,deckbuilder:a,filterLogicAnd:j,dynamicFilters:ne,labeledFilters:V,filterchange:(e,t)=>
2909{"clear"===t&&A("all"),X.filterchange(e,t)},queryChips:te,extraChips:[...ve?[ve]:[],...b?.chips??[]]})]})})},24811(e,t,n){var r=n(63679),o=n(79822),i=n(4428),a=n(84473);const l=(0,r.Ay)(a.OB)` 2910 /* FilterLine breaks on the panel's own width, not the window's: the rail, 2911 the page and the game decide how much of the window it gets. */ 2912 container: cardsfilters / inline-size; 2913 @media only screen and (max-width: 560px) { 2914 ${i.iB} { 2915 height: 36px !important; 2916 } 2917 ${o.KA} { 2918 min-height: 36px; 2919 align-items: center; 2920 } 2921 } 2922`,s=r.Ay.div` 2923 display: grid; 2924 width: 100%; 2925 gap: ${8}px; 2926 align-items: center; 2927 grid-template-columns: ${e=>e.$cells>0?`minmax(0, 3fr) repeat(${e.$cells}, minmax(0, 1fr)) auto`:"minmax(0, 1fr) auto"}; 2928 2929 @container cardsfilters (max-width: ${e=>360+133*e.$cells+206+(Boolean(e.$scan)?38:0)+8}px) { 2930 grid-template-columns: ${e=>e.$cells>0?`repeat(${e.$cells}, minmax(0, 1fr)) auto`:"minmax(0, 1fr) auto"}; 2931 & > [data-cell="search"] { 2932 grid-column: 1 / -1; 2933 } 2934 } 2935 @media only screen and (max-width: 800px) { 2936 display: flex; 2937 flex-direction: column; 2938 } 2939`,d=r.Ay.div` 2940 display: grid; 2941 grid-template-columns: repeat(5, 1fr); 2942 gap: 10px; 2943 width: 100%; 2944 border-top: 1px solid var(--theme-palette-color-5); 2945 padding-top: 10px; 2946 margin-top: 10px; 2947 2948 @media only screen and (max-width: 1100px) { 2949 grid-template-columns: repeat(3, 1fr); 2950 } 2951 @media only screen and (max-width: 760px) { 2952 grid-template-columns: repeat(2, 1fr); 2953 } 2954 @media only screen and (max-width: 560px) { 2955 grid-template-columns: 1fr; 2956 } 2957`,c=r.Ay.div` 2958 display: flex; 2959 flex-direction: column; 2960 gap: 4px; 2961 min-width: 0; 2962`,p=r.Ay.span` 2963 font-size: 10.5px; 2964 font-weight: 600; 2965 text-transform: uppercase; 2966 letter-spacing: 0.025em; 2967 color: var(--theme-palette-color-3); 2968 white-space: nowrap; 2969 overflow: hidden; 2970 text-overflow: ellipsis; 2971`,h=r.Ay.div` 2972 display: flex; 2973 align-items: center; 2974 gap: 3px; 2975 min-width: 0; 2976 flex: 1; 2977 width: 100%; 2978`,u=r.Ay.div` 2979 display: flex; 2980 align-items: center; 2981 gap: 8px; 2982 flex-wrap: wrap; 2983 width: 100%; 2984 border-top: 1px solid var(--theme-palette-color-5); 2985 padding-top: 10px; 2986 margin-top: 10px; 2987`;n.d(t,["Fu",0,h,"RB",0,d,"dh",0,p,"id",0,c,"mW",0,l,"tk",0,s,"v2",0,u])},92223(e,t,n){var r=n(10201),o=n(17402),i=n(63679),a=n(28297);const l="dotgg:enable-unrestricted",s=()=>(0,r.FD)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,r.Y)("path",{d:"M6 10V7a6 6 0 0 1 12 0v3"}),(0,r.Y)("rect",{x:"5",y:"10",width:"14",height:"10",rx:"1"})]}),d=i.Ay.div` 2988 position: relative; 2989`,c=i.Ay.button` 2990 display: flex; 2991 align-items: center; 2992 gap: 6px; 2993 width: 100%; 2994 /* Match a stepper Row's height so a locked edition keeps the tile aligned. */ 2995 min-height: 28px; 2996 box-sizing: border-box; 2997 padding: 4px 10px; 2998 background: var(--theme-palette-color-8); 2999 border: 1px solid ${e=>e.$warn?"#c08a2e":"transparent"}; 3000 border-radius: 4px; 3001 color: ${e=>e.$warn?"#e0a94a":"var(--theme-palette-color-3)"}; 3002 font-family: inherit; 3003 font-size: 11px; 3004 line-height: 1.2; 3005 white-space: nowrap; 3006 overflow: hidden; 3007 cursor: pointer; 3008 transition: border-color 0.15s ease, color 0.15s ease; 3009 /* Touch: tracks the 44px stepper row so a locked edition keeps the tile level. */ 3010 @media ${a.h3} { 3011 min-height: 44px; 3012 border-radius: 6px; 3013 } 3014 3015 span { 3016 overflow: hidden; 3017 text-overflow: ellipsis; 3018 } 3019 svg { 3020 flex-shrink: 0; 3021 color: ${e=>e.$warn?"#e0a94a":"var(--theme-palette-color-3)"}; 3022 } 3023 &:hover { 3024 color: var(--theme-palette-color-4); 3025 border-color: var(--theme-palette-color-5); 3026 } 3027`,p=i.Ay.div` 3028 position: absolute; 3029 top: 100%; 3030 left: 0; 3031 right: 0; 3032 margin-top: 4px; 3033 z-index: 1000; 3034 display: flex; 3035 flex-direction: column; 3036 gap: 8px; 3037 padding: 10px; 3038 background: var(--theme-palette-color-7); 3039 border: 1px solid var(--theme-palette-color-5); 3040 border-radius: 6px; 3041 box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); 3042`,h=i.Ay.div` 3043 font-size: 11.5px; 3044 line-height: 1.4; 3045 color: var(--theme-palette-color-3); 3046 white-space: normal; 3047 3048 b { 3049 color: var(--theme-palette-color-4); 3050 font-weight: 600; 3051 } 3052`,u=i.Ay.button` 3053 border: none; 3054 border-radius: 4px; 3055 padding: 6px 10px; 3056 background: var(--theme-palette-color-1); 3057 color: var(--dotgg-on-accent, var(--theme-palette-color-8)); 3058 font-family: inherit; 3059 font-size: 11.5px; 3060 font-weight: 700; 3061 cursor: pointer; 3062 transition: filter 0.15s ease; 3063 @media ${a.h3} { 3064 min-height: 44px; 3065 border-radius: 6px; 3066 } 3067 3068 &:hover { 3069 filter: brightness(1.1); 3070 } 3071`,g=i.Ay.button` 3072 border: none; 3073 border-radius: 4px; 3074 padding: 6px 10px; 3075 background: #c08a2e; 3076 color: #1a1205; 3077 font-family: inherit; 3078 font-size: 11.5px; 3079 font-weight: 700; 3080 cursor: pointer; 3081 transition: filter 0.15s ease; 3082 @media ${a.h3} { 3083 min-height: 44px; 3084 border-radius: 6px; 3085 } 3086 3087 &:hover { 3088 filter: brightness(1.1); 3089 } 3090`;n.d(t,["I",0,({foiling:e,strayLabel:t,onClear:n})=>{const[i,a]=(0,o.J0)(!1),m=(0,o.li)(null);(0,o.vJ)(()=>
3090{if(!i)return;const e=e=>{m.current&&!m.current.contains(e.target)&&a(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[i]);const f=e?"Normal":"Foil",x=e?"foil":"non-foil",v=!!t&&!!n;return(0,r.FD)(d,{ref:m,children:[(0,r.FD)(c,{type:"button",$warn:v,onClick:()=>a(e=>!e),title:v?"Orphaned data on a non-existent printing":"Why is this locked?",children:[(0,r.Y)(s,{}),(0,r.FD)("span",{children:["Only ",f," Printing",v?` · ${t} here`:""]})]}),i&&(0,r.FD)(p,{children:[(0,r.FD)(h,{children:["This card has only a ",(0,r.Y)("b",{children:f.toLowerCase()})," printing, so its"," ",(0,r.Y)("b",{children:x})," edition isn't tracked in ",(0,r.Y)("b",{children:"Restricted"})," mode.",v&&(0,r.FD)(r.FK,{children:[" ","It still has ",(0,r.Y)("b",{children:t})," stored here from before the normal/foil split."]})]}),v&&(0,r.Y)(g,{type:"button",onClick:()=>{n?.(),a(!1)},children:"Clear this data"}),(0,r.Y)(u,{type:"button",onClick:()=>{try{window.dispatchEvent(new CustomEvent(l))}catch(e){}a(!1)},children:"Enable Unrestricted mode"})]})]})},"S",0,l])},45112(e,t,n){var r=n(10201),o=n(17402),i=n(63679),a=n(75654),l=n(28297);const s=({label:e,value:t,onChange:n})=>{const[i,a]=(0,o.J0)(String(t));return(0,o.vJ)(()=>{a(String(t))},[t]),(0,r.FD)(h,{children:[(0,r.Y)(u,{type:"button","aria-label":`Decrease ${e}`,"aria-disabled":t<=0,$inactive:t<=0,onClick:()=>n?.(Math.max(0,t-1)),children:(0,r.Y)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round","aria-hidden":"true",children:(0,r.Y)("path",{d:"M5 12h14"})})}),(0,r.Y)(g,{type:"number",min:0,max:999,inputMode:"numeric",$has:t>0,value:i,"aria-label":`${e} count`,title:"Click to type a number directly",onChange:e=>(e=>{a(e);const t=parseInt(e,10);!isNaN(t)&&t>=0&&n?.(Math.min(t,999))})(e.currentTarget.value),onFocus:e=>e.currentTarget.select(),onBlur:()=>a(String(t)),onWheel:e=>e.currentTarget.blur()}),(0,r.Y)(u,{type:"button","aria-label":`Increase ${e}`,onClick:()=>n?.(Math.min(999,t+1)),children:(0,r.FD)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round","aria-hidden":"true",children:[(0,r.Y)("path",{d:"M12 5v14"}),(0,r.Y)("path",{d:"M5 12h14"})]})})]})},d=i.Ay.div` 3091 display: grid; 3092 grid-template-columns: 1fr 1fr; 3093 gap: 4px; 3094 width: 100%; 3095 margin-top: 2px; 3096`,c=i.Ay.div` 3097 display: flex; 3098 flex-direction: column; 3099 align-items: stretch; 3100 gap: 2px; 3101 background: ${e=>e.$foil?`${a.bC}, var(--theme-palette-color-8)`:"var(--theme-palette-color-8)"}; 3102 border-radius: 4px; 3103 padding: 4px 5px; 3104 min-width: 0; 3105 3106 ${e=>e.$has?"\n > span { color: var(--theme-palette-color-3); }\n ":""} 3107 3108 /* Touch: radius 4 â 6 so the pill's corners sit inside the cell; the value 3109 reads at the left, the pill at the right. Foil cells tint the pill. */ 3110 @media ${l.h3} { 3111 border-radius: 6px; 3112 input { 3113 text-align: left !important; 3114 } 3115 ${e=>e.$foil?`\n button { border-color: ${a.AG}; }\n button:last-child { color: ${a.qA}; }\n `:""} 3116 } 3117`,p=i.Ay.span` 3118 font-size: 9.5px; 3119 font-weight: 600; 3120 text-transform: uppercase; 3121 letter-spacing: 0.025em; 3122 color: var(--theme-palette-color-14, var(--theme-palette-color-3)); 3123 white-space: nowrap; 3124 padding-left: 2px; 3125 text-align: left; 3126`,h=i.Ay.div` 3127 display: flex; 3128 align-items: center; 3129 justify-content: space-between; 3130 gap: 2px; 3131 width: 100%; 3132 min-width: 0; 3133 @media ${l.h3} { 3134 gap: 0; 3135 height: 44px; 3136 } 3137`,u=i.Ay.button` 3138 display: flex; 3139 align-items: center; 3140 justify-content: center; 3141 width: 18px; 3142 height: 18px; 3143 flex-shrink: 0; 3144 background: none; 3145 border: none; 3146 border-radius: 3px; 3147 padding: 0; 3148 color: var(--theme-palette-color-3); 3149 cursor: pointer; 3150 transition: all 150ms ease; 3151 3152 &:hover { 3153 color: var(--theme-palette-color-4); 3154 background: #384759; 3155 } 3156 3157 /* Touch: the two halves of a joined 38+38 pill, 44px tall. The â half is 3158 first in DOM and gets order 1, the + half order 2; the input takes 0. */ 3159 @media ${l.h3} { 3160 /* 38px wide when the row allows, down to 28px on narrow tiles â the row 3161 shrinks the pill before it lets the + overflow the tile. */ 3162 flex: 1 1 38px; 3163 width: auto; 3164 min-width: 28px; 3165 max-width: 38px; 3166 height: 44px; 3167 border: 1px solid var(--theme-palette-color-5); 3168 border-radius: 0 6px 6px 0; 3169 order: 2; 3170 &:first-child { 3171 order: 1;
3172 border-right: none; 3173 border-radius: 6px 0 0 6px; 3174 } 3175 &:hover { 3176 background: none; 3177 } 3178 svg { 3179 width: 15px; 3180 height: 15px; 3181 } 3182 ${e=>e.$inactive?"\n color: var(--theme-palette-color-5);\n cursor: default;\n ":""} 3183 } 3184`,g=i.Ay.input` 3185 flex: 1; 3186 min-width: 0 !important; 3187 width: auto !important; 3188 height: 20px !important; 3189 min-height: 0 !important; 3190 max-height: 20px !important; 3191 text-align: center !important; 3192 background: none !important; 3193 border: none !important; 3194 outline: none !important; 3195 border-radius: 3px !important; 3196 padding: 0 !important; 3197 margin: 0 !important; 3198 font-family: inherit !important; 3199 font-size: 13px !important; 3200 font-weight: 600 !important; 3201 line-height: 20px !important; 3202 color: ${e=>e.$has?"var(--theme-palette-color-4)":"var(--theme-palette-color-3)"} !important; 3203 appearance: textfield; 3204 -moz-appearance: textfield; 3205 transition: background 150ms ease; 3206 3207 &::-webkit-outer-spin-button, 3208 &::-webkit-inner-spin-button { 3209 -webkit-appearance: none; 3210 margin: 0; 3211 } 3212 3213 &:hover { 3214 background: var(--theme-palette-color-7) !important; 3215 } 3216 3217 &:focus { 3218 background: var(--theme-palette-color-7) !important; 3219 color: var(--theme-palette-color-4) !important; 3220 box-shadow: 0 0 0 1px var(--theme-palette-color-1) !important; 3221 } 3222 3223 @media ${l.h3} { 3224 order: 0; 3225 flex: 0 1 34px; 3226 min-width: 22px !important; 3227 width: 34px !important; 3228 height: 44px !important; 3229 max-height: 44px !important; 3230 line-height: 44px !important; 3231 margin-right: 2px !important; 3232 padding: 0 2px !important; 3233 font-size: 16px !important; 3234 font-weight: 700 !important; 3235 text-align: right !important; 3236 &:hover { 3237 background: none !important; 3238 } 3239 } 3240`,m=i.Ay.div` 3241 display: flex; 3242 align-items: center; 3243 justify-content: center; 3244 height: 20px; 3245 font-size: 0.75em; 3246 color: var(--theme-palette-color-5); 3247 @media ${l.h3} { 3248 height: 44px; 3249 font-size: 12px; 3250 } 3251`,f=i.Ay.div` 3252 display: flex; 3253 align-items: center; 3254 justify-content: center; 3255 height: 20px; 3256 font-size: 13px; 3257 font-weight: 600; 3258 color: var(--theme-palette-color-4); 3259 @media ${l.h3} { 3260 height: 44px; 3261 font-size: 16px; 3262 font-weight: 700; 3263 } 3264`;n.d(t,["EL",0,s,"Nf",0,d,"lJ",0,({label:e,value:t,onChange:n,disabled:o,disabledText:i,foil:a,readOnly:l,title:d})=>o?(0,r.FD)(c,{title:d??i??"N/A",children:[(0,r.Y)(p,{children:e}),(0,r.Y)(m,{children:i||"N/A"})]}):l?(0,r.FD)(c,{$has:t>0,$foil:a,title:d,children:[(0,r.Y)(p,{children:e}),(0,r.Y)(f,{children:t})]}):(0,r.FD)(c,{$has:t>0,$foil:a,title:d,children:[(0,r.Y)(p,{children:e}),(0,r.Y)(s,{label:e,value:t,onChange:n})]})])},74216(e,t,n){var r=n(10201),o=n(17402),i=n(63679),a=n(51533),l=n(75654),s=n(56411),d=n(41396),c=n(15701),p=n(86031),h=n(70165),u=n(32013);const g=i.Ay.div` 3265 text-align: center; 3266 font-size: 0.6em; 3267 line-height: 0.8em; 3268 width: 100%; 3269`,m=i.Ay.div` 3270 display: flex; 3271 flex-direction: column; 3272 gap: 5px; 3273 width: 100%; 3274`,f=i.Ay.div` 3275 display: flex; 3276 justify-content: center; 3277 width: 100%; 3278`,x=i.Ay.div` 3279 display: flex; 3280 gap: 10px; 3281 padding: 5px; 3282 justify-content: center; 3283 border-top: solid 1px var(--theme-palette-color-5); 3284 margin-top: 5px; 3285`,v=(0,i.Ay)(u.p)` 3286 height: 25px !important; 3287 text-align: center !important; 3288 font-size: 0.7em !important; 3289 ${e=>e.$foil?l.jt:""} 3290 @media only screen and (max-width: 700px) { 3291 padding-left: 10px !important; 3292 } 3293`,y=(0,i.Ay)(u.p)` 3294 height: 25px !important; 3295 text-align: center !important; 3296 padding-left: 5px !important; 3297 padding-right: 0 !important; 3298 color: var(--theme-palette-color-4) !important; 3299 font-weight: bold !important; 3300 font-size: 1.1em !important; 3301 ${e=>e.$foil?l.jt:""} 3302 @media only screen and (max-width: 700px) { 3303 padding-left: 10px !important; 3304 } 3305`,w=(0,i.Ay)(u.p)` 3306 text-align: center !important; 3307 font-size: 0.8em !important; 3308 color: var(--theme-palette-color-4) !important; 3309 font-weight: bold !important; 3310 height: 30px !important; 3311 width: 100%; 3312 padding: 0 0 0 15px !important; 3313`;n.d(t,["Z",0,({collectionUpdateCallback:e,collectionElement:t,cardId:n,canBeTraded:i,gacha:l,elementType:u,customOwnedString:b,alien:$,unrestricted:k=!1,compact:Y=!1})=>{const[A,C]=(0,o.J0)(t?.standard||0),[F,D]=(0,o.J0)(t?.foil||0),[S,I]=(0,o.J0)(t?.trade||0),[z,T]=(0,o.J0)(t?.wish||0);(0,o.vJ)(()=>{C(t?.standard||0),D(t?.foil||0),I(t?.trade||0),T(t?.wish||0)},[t]);const E=(r,o)=>{const i="foil"===r?+F:+A;
3313e(n,r,o.count??i,{trade:o.trade,wish:o.wish});const{trade:l,wish:s}=o,d=void 0!==l||void 0!==s?{extra:(0,c.e)(t,l??+S,s??+z),trade:l,wish:s}:{};(0,a.s)(`${n.toString()}${h.yD?.multipleComponentCollection?`-${u}`:""}`,r,o.count,d).catch(e=>{console.error(e)})},L=e=>{C(e),E("standard",{count:e})},M=l?h.yD.collectionComponents.findIndex(e=>e===u):-1,N=l?h.yD.collectionComponentTypes[M]??"owned":"";return(0,r.Y)(x,{children:$?(0,r.FD)(d.y,{children:[(0,r.FD)(d.hZ,{children:[(0,r.FD)(d.x4,{children:["Total",(0,r.Y)("br",{}),"owned"]}),(0,r.Y)(d.R4,{children:t?t.standard:0})]}),p.SA.collection.collectionCanTrade&&(0,r.FD)(d.hZ,{children:[(0,r.FD)(d.x4,{children:["Listed",(0,r.Y)("br",{}),"for trade"]}),(0,r.Y)(d.R4,{children:t?t.trade:0})]})]}):l?"owned"===N?(0,r.Y)(f,{children:(0,r.Y)(s.A,{initialChecked:Number(A)>0,onChange:e=>{L(e?1:0)},compact:Y,checkedStrings:[b||"Owned",b||"Owned"]})}):"number"===N?(0,r.Y)(w,{type:"number",min:0,onWheel:e=>e.currentTarget.blur(),value:A,onChange:e=>{L(+e.currentTarget.value)}}):(0,r.Y)(r.FK,{}):(0,r.FD)(r.FK,{children:[(0,r.FD)(m,{children:[(0,r.Y)(y,{type:"number",min:0,onWheel:e=>e.currentTarget.blur(),value:A,onChange:e=>{L(+e.currentTarget.value)}}),(0,r.Y)(g,{children:"Owned"})]}),p.SA.collection.collectionFoil&&(0,r.FD)(m,{children:[(0,r.Y)(y,{$foil:!0,type:"number",min:0,onWheel:e=>e.currentTarget.blur(),value:F,onChange:e=>{var t;t=+e.currentTarget.value,D(t),E("foil",{count:t})}}),(0,r.Y)(g,{children:"Owned Foil"})]}),p.SA.collection.collectionCanTrade&&(i||k?(0,r.FD)(r.FK,{children:[(0,r.FD)(m,{children:[(0,r.Y)(y,{$foil:!1,type:"number",min:0,onWheel:e=>e.currentTarget.blur(),value:S,onChange:e=>{(e=>{I(e);const t=+e>+A;t&&C(e),E("standard",{trade:e,...t?{count:e}:{}})})(+e.currentTarget.value)}}),(0,r.Y)(g,{children:"For Trade"})]}),(0,r.FD)(m,{children:[(0,r.Y)(y,{$foil:!1,type:"number",min:0,onWheel:e=>e.currentTarget.blur(),value:z,onChange:e=>{var t;t=+e.currentTarget.value,T(t),E("standard",{wish:t})}}),(0,r.Y)(g,{children:"Wishlist"})]})]}):(0,r.FD)(r.FK,{children:[(0,r.FD)(m,{children:[(0,r.Y)(v,{type:"text",value:"N/A",disabled:!0,style:{fontSize:"0.8em"}}),(0,r.Y)(g,{children:"For Trade"})]}),(0,r.FD)(m,{children:[(0,r.Y)(v,{type:"text",value:"N/A",disabled:!0,style:{fontSize:"0.8em"}}),(0,r.Y)(g,{children:"Wishlist"})]})]}))]})})}])},8647(e,t,n){n.d(t,{T:()=>U,X:()=>J});var r=n(10201),o=n(17402),i=n(63679),a=n(12964),l=n(75654),s=n(92223),d=n(45112),c=n(28297);const p=({foiling:e,locked:t,scope:n,canTrade:o,hasFoil:i,owned:l,trade:d,wish:c,onOwned:p,onTrade:y,onWish:w,onClear:b})=>{const $="trading"!==n,k=o&&"collection"!==n,Y="trading"===n&&!o,D=[];l>0&&D.push(`${l} owned`),d>0&&D.push(`${d} for trade`),c>0&&D.push(`${c} wishlisted`);const S=D.join(", ");return(0,r.FD)(g,{$foiling:e,children:[(0,r.FD)(m,{children:[i&&(e?(0,r.FD)(v,{children:[(0,r.Y)(a.RE,{size:9}),(0,r.Y)("span",{children:"Foil"})]}):(0,r.Y)(f,{children:"Normal"})),(0,r.Y)(x,{children:"copies"})]}),t?(0,r.Y)(s.I,{foiling:e,strayLabel:S,onClear:b}):Y?(0,r.FD)(A,{children:[(0,r.FD)(C,{"aria-hidden":"true",children:[(0,r.Y)(u,{kind:"trade",label:"For Trade",value:0,onChange:h}),(0,r.Y)(u,{kind:"wish",label:"Wishlist",value:0,onChange:h})]}),(0,r.Y)(F,{title:"This card isn't available for trade.",children:(0,r.Y)("span",{children:"Not tradable"})})]}):(0,r.FD)(r.FK,{children:[$&&(0,r.Y)(u,{kind:"owned",foiling:e,label:"Owned",value:l,onChange:p}),k&&(0,r.FD)(r.FK,{children:[(0,r.Y)(u,{kind:"trade",label:"For Trade",shortLabel:"Trade",value:d,onChange:y}),(0,r.Y)(u,{kind:"wish",label:"Wishlist",shortLabel:"Wish",value:c,onChange:w})]})]})]})},h=()=>{},u=({kind:e,foiling:t,label:n,shortLabel:o,value:i,onChange:a})=>(0,r.FD)(w,{$kind:e,$foiling:t,children:[(0,r.Y)(k,{children:o?(0,r.FD)(r.FK,{children:[(0,r.Y)(b,{children:n}),(0,r.Y)($,{children:o})]}):n}),(0,r.Y)(Y,{children:(0,r.Y)(d.EL,{label:n,value:i,onChange:a})})]}),g=i.Ay.div` 3314 display: flex; 3315 flex-direction: column; 3316 gap: 4px; 3317 width: 100%; 3318`,m=i.Ay.div` 3319 display: flex; 3320 align-items: center; 3321 gap: 6px; 3322 padding: 0 2px 1px; 3323 font-size: 9.5px; 3324 font-weight: 600; 3325 text-transform: uppercase; 3326 letter-spacing: 0.04em; 3327`,f=i.Ay.span` 3328 color: var(--theme-palette-color-4); 3329`,x=i.Ay.span` 3330 color: var(--theme-palette-color-3); 3331`,v=i.Ay.span` 3332 display: inline-flex; 3333 align-items: center; 3334 gap: 3px; 3335 padding: 1px 5px; 3336 border-radius: 3px; 3337 background: rgba(150, 190, 230, 0.12); 3338 border: 1px solid rgba(150, 190, 230, 0.25); 3339 line-height: 1.3; 3340 3341 span { 3342 ${a.Fj} 3343 } 3344 svg { 3345 color: ${a.qA}; 3346 } 3347`,y={trade:{surface:"rgba(255, 152, 0, 0.10)",ring:"rgba(255, 152, 0, 0.28)"},wish:{surface:"rgba(33, 150, 243, 0.10)",ring:"rgba(33, 150, 243, 0.28)"}},w=i.Ay.div` 3348 display: flex; 3349 align-items: center; 3350 justify-content: space-between; 3351 gap: 8px; 3352 padding: 4px 6px 4px 10px; 3353 border-radius: 4px; 3354 min-width: 0; 3355 ${({$kind:e,$foiling:t})=>{if("owned"===e)return t?`background: ${l.bC}, var(--theme-palette-color-8);\n box-shadow: inset 0 0 0 1px ${l.AG};`:"background: var(--theme-palette-color-8);";const n=y[e];return`background: linear-gradient(${n.surface}, ${n.surface}), var(--theme-palette-color-8);\n box-shadow: inset 0 0 0 1px ${n.ring};`}} 3356 3357 /* Touch: 44px row, pill flush at the right edge; the foil edition tints 3358 the pill's outline and + like the foil qty cells. */ 3359 @media ${c.h3} { 3360 height: 44px; 3361 gap: 4px; 3362 padding: 0 0 0 10px; 3363 border-radius: 6px; 3364 ${e=>"owned"===e.$kind&&e.$foiling?`\n button { border-color: ${l.AG}; }\n button:last-child { color: ${a.qA}; }\n `:""} 3365 } 3366`,b=i.Ay.span` 3367 @media ${c.h3} { 3368 display: none; 3369 } 3370`,$=i.Ay.span` 3371 display: none; 3372 @media ${c.h3} { 3373 display: inline; 3374 } 3375`,k=i.Ay.span` 3376 font-size: 10px; 3377 font-weight: 600; 3378 text-transform: uppercase; 3379 letter-spacing: 0.04em; 3380 color: var(--theme-palette-color-3); 3381 white-space: nowrap; 3382 /* Narrow tiles (9-per-row desktop, 5-up foldables): the label gives way 3383 before the stepper does â an ellipsised "OWNâ¦" beats a + pushed off the 3384 tile (site-feedback 2026-08-28). */ 3385 flex: 0 1 auto; 3386 min-width: 0; 3387 overflow: hidden; 3388 text-overflow: ellipsis; 3389`,Y=i.Ay.div` 3390 /* Preferred 96px, but shrinkable: the ± buttons stay 18px and the input 3391 gives up width first (it is min-width 0 / flex 1 inside QtyStepperRow). */ 3392 flex: 0 1 96px; 3393 min-width: 52px; 3394 @media ${c.h3} { 3395 flex: 1 1 auto; 3396 min-width: 0; 3397 } 3398`,A=i.Ay.div` 3399 display: grid; 3400 > * { 3401 grid-area: 1 / 1; 3402 } 3403`,C=i.Ay.div` 3404 display: flex; 3405 flex-direction: column; 3406 gap: 4px; 3407 visibility: hidden; 3408 pointer-events: none; 3409`,F=i.Ay.div` 3410 display: flex; 3411 align-items: center; 3412 gap: 6px; 3413 padding: 6px 10px; 3414 background: var(--theme-palette-color-8); 3415 border-radius: 4px; 3416 color: var(--theme-palette-color-3); 3417 font-size: 11px; 3418 line-height: 1.2; 3419 white-space: nowrap; 3420 overflow: hidden; 3421 @media ${c.h3} { 3422 min-height: 44px; 3423 border-radius: 6px; 3424 } 3425 3426 span { 3427 overflow: hidden; 3428 text-overflow: ellipsis; 3429 } 3430 svg { 3431 flex-shrink: 0; 3432 width: 13px; 3433 height: 13px; 3434 color: var(--theme-palette-color-3); 3435 } 3436 b { 3437 color: var(--theme-palette-color-4); 3438 font-weight: 600; 3439 } 3440`;var D=n(32013),S=n(43626);const I=e=>{e.currentTarget.blur()},z=({controlsType:e,customOwnedString:t,standardCount:n,onStandard:o})=>"owned"===e?(0,r.Y)(T,{children:(0,r.FD)(S.Zz,{children:[(0,r.FD)(S.Oq,{children:[(0,r.Y)("input",{type:"checkbox",checked:1===n,onChange:e=>{o(e.currentTarget.checked?1:0)}}),(0,r.Y)(S.wL,{})]}),(0,r.Y)("div",{onClick:()=>{o(1===n?0:1)},children:t||"Owned"})]})}):"number"===e?(0,r.Y)(E,{type:"number",min:0,value:n,onWheel:I,onChange:e=>{o(+e.currentTarget.value)}}):(0,r.Y)(r.FK,{}),T=i.Ay.div` 3441 display: flex; 3442 justify-content: center; 3443 width: 100%; 3444`,E=(0,i.Ay)(D.Q)` 3445 text-align: center !important; 3446 font-size: 0.8em !important; 3447 color: var(--theme-palette-color-4) !important; 3448 font-weight: bold !important; 3449 height: 30px !important; 3450 width: 100%; 3451 padding: 0 0 0 15px !important; 3452`;var L=n(51533),M=n(15701),N=n(65562),P=n(86031),O=n(70165);function _(e){return{standard:+(e?.standard||0),foil:+(e?.foil||0),tradeStd:+(e?.trade||0),wishStd:+(e?.wish||0),tradeFoil:+(e?.trade_foil||0),wishFoil:+(e?.wish_foil||0)}}function R(e){const{collectionElement:t,cardId:n,edition:r,card:i,unrestr
3452icted:a}=e,[l,s]=(0,o.J0)(()=>_(t));(0,o.vJ)(()=>{s(_(t))},[t]);const{hasFoilOption:d,disableNonFoil:c,disableFoil:p}=function(e,t){const n=(P.SA.cards?.priceProviders?.length??0)>0,r=P.SA.collection.collectionFoil,{hasNonFoilPrice:o,hasFoilPrice:i}=e?(0,N.WM)(e):{hasNonFoilPrice:!0,hasFoilPrice:!0},a=!t&&n&&r;return{hasFoilOption:r,disableNonFoil:a&&i&&!o,disableFoil:a&&o&&!i}}(i,a),h=P.SA.collection.collectionCanTrade,u="foil"===r,g=u?"foil":"standard",m=u?"tradeFoil":"tradeStd",f=u?"wishFoil":"wishStd",x=l[g],v=l[m],y=l[f],w=u?p:c,b=(!!e.canBeTraded||a)&&h,$=(r,o)=>{const i="foil"===r,a=o.count??(i?l.foil:l.standard),s=o.trade??(i?l.tradeFoil:l.tradeStd),d=o.wish??(i?l.wishFoil:l.wishStd);if(e.collectionUpdateCallback(n,r,a,{trade:o.trade,wish:o.wish}),e.onSave)return void e.onSave({cardId:n,type:r,count:a,trade:s,wish:d});const c=O.yD?.multipleComponentCollection?`-${e.elementType}`:"",p=void 0!==o.trade||void 0!==o.wish;(0,L.s)(`${n.toString()}${c}`,r,o.count,{...p?{extra:(0,M.e)(t,s,d)}:{},trade:o.trade,wish:o.wish}).catch(e=>console.error(e))};return{foiling:u,hasFoilOption:d,standardCount:l.standard,ownedCount:x,tradeCount:v,wishCount:y,lockedActive:w,tradeable:b,handleOwnedChange:e=>{s(t=>({...t,[g]:e})),$(r,{count:e})},handleTradeChange:e=>{s(t=>({...t,[m]:e})),$(r,{trade:e})},handleWishChange:e=>{s(t=>({...t,[f]:e})),$(r,{wish:e})},handleClearEdition:()=>{s(e=>({...e,[g]:0,[m]:0,[f]:0})),$(r,{count:0,trade:0,wish:0})},handleGachaChange:e=>{s(t=>({...t,standard:e})),$("standard",{count:e})}}}var j=n(4738);const J=()=>{const e=(0,j.Ri)("collection-edition");return"foil"===e||"both"===e?e:"standard"},B=({collectionElement:e})=>(0,r.FD)(d.Nf,{children:[(0,r.Y)(d.lJ,{label:"Owned",value:+(e?.standard||0),readOnly:!0}),P.SA.collection.collectionFoil&&(0,r.Y)(d.lJ,{label:"Foil",title:"Owned Foil",value:+(e?.foil||0),readOnly:!0,foil:!0})]}),K=e=>{const t=R({collectionUpdateCallback:e.collectionUpdateCallback,collectionElement:e.collectionElement,cardId:e.cardId,canBeTraded:e.canBeTraded,elementType:e.elementType,edition:e.edition,card:e.card,unrestricted:e.unrestricted??!1,onSave:e.onSave});return(0,r.Y)(p,{foiling:t.foiling,locked:t.lockedActive,scope:e.displayMode??"both",canTrade:t.tradeable,hasFoil:t.hasFoilOption,owned:t.ownedCount,trade:t.tradeCount,wish:t.wishCount,onOwned:t.handleOwnedChange,onTrade:t.handleTradeChange,onWish:t.handleWishChange,onClear:t.handleClearEdition})},W=e=>{const t=R({collectionUpdateCallback:e.collectionUpdateCallback,collectionElement:e.collectionElement,cardId:e.cardId,elementType:e.elementType,edition:"standard",card:e.card,unrestricted:!1,onSave:e.onSave}),n=O.yD.collectionComponents.findIndex(t=>t===e.elementType),o=O.yD.collectionComponentTypes[n]??"owned";return(0,r.Y)(z,{controlsType:o,customOwnedString:e.customOwnedString,standardCount:t.standardCount,onStandard:t.handleGachaChange})},U=({collectionUpdateCallback:e,collectionElement:t,cardId:n,canBeTraded:i,gacha:l,elementType:s,customOwnedString:d,alien:c,displayMode:p="both",edition:h="standard",card:u,unrestricted:g=!1,standalone:m=!1,onSave:f,onEditionChange:x})=>{const v=m&&!!x,[y,w]=(0,o.J0)(m?J():h);if(c)return(0,r.Y)(Q,{children:(0,r.Y)(B,{collectionElement:t})});if(l)return(0,r.Y)(Q,{children:(0,r.Y)(W,{cardId:n,collectionElement:t,collectionUpdateCallback:e,elementType:s,customOwnedString:d,card:u,onSave:f})});const b=P.SA.collection.collectionFoil,$=v?h:m?y:h,k="both"===$&&b,Y={collectionUpdateCallback:e,collectionElement:t,cardId:n,canBeTraded:i,elementType:s,card:u,unrestricted:g,onSave:f,displayMode:p};return(0,r.FD)(Q,{children:[m&&b&&(0,r.Y)(a.Z,{value:$,onChange:e=>{(0,j.TV)("collection-edition",e,30),v?x(e):w(e)}}),k?(0,r.FD)(r.FK,{children:[(0,r.Y)(K,{...Y,edition:"standard"}),(0,r.Y)(K,{...Y,edition:"foil"})]}):(0,r.Y)(K,{...Y,edition:"both"===$?"standard":$})]})},Q=i.Ay.div` 3453 display: flex; 3454 flex-direction: column; 3455 gap: 5px; 3456 width: 100%; 3457`},87214(e,t,n){n.d(t,{Yr:()=>r.Y,_d:()=>o._d}),n(79318);var r=n(73634),o=n(22695)},12964(e,t,n){n.d(t,{Fj:()=>i.Fj,qA:()=>i.qA});var r=n(10201),o=n(90023),i=n(75654);const a=({size:e=11})=>(0,r.Y)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,r.Y)("path",{d:"M12 2c0 5-1.4 7.8-6 10 4.6 2.2 6 5 6 10 0-5 1.4-7.8 6-10-4.6-2.2-6-5-6-10z"})}),l=[{value:"standard",label:"Normal"},{value:"foil",label:"Foil",foil:!0,icon:(0,r.Y)(a,{size:11})},{value:"both",label:"Both"}];
3457n.d(t,["RE",0,a,"Z",0,({value:e,onChange:t})=>(0,r.Y)(o.$,{ariaLabel:"Edition",value:e,onChange:t,options:l}),"my",0,l])},75654(e,t,n){const r="linear-gradient(110deg, #7fe0d0 0%, #8fb8ff 28%, #c89cff 52%, #ffd28a 76%, #86e0a4 100%)",o=`\n background: ${r};\n -webkit-background-clip: text;\n background-clip: text;\n -webkit-text-fill-color: transparent;\n font-weight: 700;\n`,i="linear-gradient(110deg, rgba(127,224,208,0.16) 0%, rgba(143,184,255,0.2) 28%, rgba(200,156,255,0.18) 52%, rgba(255,210,138,0.14) 76%, rgba(134,224,164,0.16) 100%)",a="rgba(159, 200, 255, 0.3)",l=`\n background: ${i};\n box-shadow: inset 0 0 0 1px ${a};\n`;n.d(t,["AG",0,a,"Fj",0,o,"bC",0,i,"bx",0,r,"jt",0,l,"qA",0,"#9fc8ff"])},70213(e,t,n){var r=n(10201);const o=(e,t=14)=>function({size:n=t}){return(0,r.Y)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.map((e,t)=>(0,r.Y)("path",{d:e},t))})},i=o(["M13 2L3 14h9l-1 8 10-12h-9z"]),a=o(["M3 3v5h5","M3.05 13a9 9 0 1 0 .5-5L3 8","M12 7v5l4 2"]),l=o(["M3 7v6h6","M21 17a9 9 0 0 0-15-6.7L3 13"]),s=o(["M21 7v6h-6","M3 17a9 9 0 0 1 15-6.7L21 13"]),d=o(["M20 6L9 17l-5-5"]),c=o(["M18 6L6 18","M6 6l12 12"]),p=o(["M6 9l6 6 6-6"]),h=o(["M6 15l6-6 6 6"]),u=o(["M4 6h16","M7 12h10","M10 18h4"]),g=o(["M2 6h20v12H2z","M6 10h.01","M10 10h.01","M14 10h.01","M18 10h.01","M7 14h10"]),m=o(["M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4","M7 10l5 5 5-5","M12 15V3"]),f=o(["M12 5v14","M5 12h14"]),x=o(["M5 12h14"]),v=o(["M3 6h18","M8 6V4h8v2","M19 6l-1 14H6L5 6","M10 11v6","M14 11v6"]),y=o(["M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z","M12 6v6l4 2"]),w=o(["M5 12h14","M13 6l6 6-6 6"],11),b=o(["M5 4v7a4 4 0 0 0 4 4h10","M15 11l4 4-4 4"],12),$=o(["M12 2c0 5-1.4 7.8-6 10 4.6 2.2 6 5 6 10 0-5 1.4-7.8 6-10-4.6-2.2-6-5-6-10z"],10),k=o(["M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"]),Y=o(["M16 3l4 4-4 4","M20 7H4","M8 21l-4-4 4-4","M4 17h16"]),A=o(["M7 8h10l-3-3","M17 16H7l3 3"],16),C=o(["M12 8v5","M12 16.5v.5","M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18z"],16),F=o(["M9 9h11v11H9z","M5 15V5a2 2 0 0 1 2-2h8"]),D=o(["M4 12h15l-5-5","M19 12l-5 5"],18),S=o(["M9 6l6 6-6 6"],16),I=o(["M15 6l-6 6 6 6"],16),z=o(["M20 15a3 3 0 0 1-3 3H9l-5 3V7a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3z"],13),T=o(["M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z","M5 5l14 14"],16),E=o(["M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9","M13.7 21a2 2 0 0 1-3.4 0"],20),L=o(["M12 4l2.4 5 5.6.8-4 3.9 1 5.5-5-2.7-5 2.7 1-5.5-4-3.9 5.6-.8z"],13),M=o(["M12 4v9","M8.5 9.5L12 13l3.5-3.5","M5 19h14"],13),N=o(["M20 21a8 8 0 0 0-16 0","M12 13a4 4 0 1 0 0-8 4 4 0 0 0 0 8z"],16),P=o(["M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z","M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"],16),O=o(["M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4","M16 17l5-5-5-5","M21 12H9"],16),_=o(["M8 21h8","M12 17v4","M7 4h10v5a5 5 0 0 1-10 0z"],16),R=o(["M4 4h16v16H4z","M8 8h8","M8 12h8"],16),j=o(["M21 2v6h-6","M3 12a9 9 0 0 1 15-6.7L21 8","M3 22v-6h6","M21 12a9 9 0 0 1-15 6.7L3 16"]),J=o(["M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4","M17 8l-5-5-5 5","M12 3v12"]),B=o(["M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z","M12 12v6","M9 15l3-3 3 3"]),K=o(["M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z","M12 17a4 4 0 1 0 0-8 4 4 0 0 0 0 8"]),W=o(["M3 3h18v18H3z","M3 15l5-5 4 4 3-3 6 6","M8.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3"]),U=o(["M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z","M13 2v7h7"]),Q=o(["M3 7V5a2 2 0 0 1 2-2h2","M17 3h2a2 2 0 0 1 2 2v2","M21 17v2a2 2 0 0 1-2 2h-2","M7 21H5a2 2 0 0 1-2-2v-2","M7 12h10"]),G=o(["M7 2h10a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z","M9 7h6","M9 11h4"],18),H=o(["M4 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2z","M8 2v20","M12 7h4","M12 11h4"],14),q=o(["M15 3h6v6","M10 14 21 3","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"],12);n.d(t,["B0",0,H,"E",0,v,"GF",0,l,"H4",0,j,"MR",0,c,"N4",0,b,"NB",0,i,"NU",0,k,"Ni",0,P,"O7",0,C,"PE",0,K,"Qi",0,Y,"VU",0,B,"Vh",0,p,"Vj",0,S,"YP",0,x,"ZT",0,O,"_B",0,$,"_L",0,y,"aG",0,L,"b_",0,R,"bz",0,F,"cH",0,s,"dw",0,W,"fd",0,g,"fq",0,q,"g6",0,U,"gJ",0,a,"gW",0,_,"gu",0,I,"hI",0,w,"hR",0,A,"i8",0,m,"iW",0,d,"lW",0,M,"mD",0,D,"n1",0,Q,"nr",0,J,"ow",0,h,"pY",0,E,"pj",0,z,"r7",0,T,"
3457sm",0,G,"t0",0,u,"uI",0,f,"vg",0,N])},73634(e,t,n){var r=n(10201),o=(n(17402),n(63679)),i=n(92475),a=n(22695);const{FlexRow:l,TheSource:s,SourceName:d,NamePart:c,ValSquare:p,SourceBar:h}=a._d,u=o.I4.div` 3458 font-variant-numeric: tabular-nums; 3459 font-size: 12.5px; 3460 font-weight: 600; 3461 color: var(--theme-palette-color-1); 3462 min-width: 50px; 3463 text-align: right; 3464 white-space: nowrap; 3465`,g=o.I4.span` 3466 flex: 1 1 auto; 3467 min-width: 0; 3468 overflow: hidden; 3469 text-overflow: ellipsis; 3470 white-space: nowrap; 3471`;n.d(t,["Y",0,({label:e,collected:t,total:n,icon:o,iconWidth:a="16px",barColor:m,foil:f,onFilterClick:x,filterValue:v,filterType:y,clearFiltersFirst:w=!0})=>{const b=((e,t,n=!0)=>{const r=100*e/t;return n&&r>100?100:r})(t,n),$=!!(x&&v&&y);return(0,r.Y)(l,{children:(0,r.FD)(s,{onClick:()=>{$&&(w&&x("","clear"),x(v,y))},style:{cursor:$?"pointer":"default"},children:[(0,r.FD)(d,{children:[o&&(0,r.Y)(i.D,{$width:a,$height:a,src:o}),(0,r.Y)(g,{children:e})]}),(0,r.Y)(h,{$width:`${b.toFixed(1)}%`,$color:m,$foil:f}),(0,r.FD)(c,{children:[(0,r.FD)(p,{children:[(0,r.Y)("b",{children:t})," / ",n]}),(0,r.FD)(u,{children:[b.toFixed(1),"%"]})]})]})})}])},79318(e,t,n){n.d(t,{U:()=>V});var r=n(10201),o=n(17402),i=n(52464),a=n(86031),l=n(4738),s=n(91181),d=n(9135),c=n(79407),p=n(90023),h=n(22695);const{SourcesBlock:u,Filters:g,SetFilter:m,CollectionRulesExplanation:f,BigCollectionPrice:x,StatsRow:v,StatItem:y,PriceTag:w,BigPriceSign:b}=h._d,$=({mode:e,setMode:t,currentSet:n,setCurrentSet:o,sets:i,currencySymbol:a,collectionCost:l,totalCardsOwned:s,totalCards:d,totalCardsOwnedIncludingOverMax:h,uniqueCardsOwned:$,showPrices:k,specialCardTypes:Y,maxCardsInCollection:A,scope:C,setScope:F,hasActiveFilters:D,valueTrend:S})=>{const I=[{value:"all",label:"All collection"},{value:"filtered",label:"Filtered",title:D?void 0:"Set card filters above to enable"}];return(0,r.FD)(u,{children:[(0,r.FD)(x,{children:[(0,r.FD)(v,{children:[k?(0,r.FD)(y,{children:[(0,r.Y)(w,{children:"Estimate"}),(0,r.FD)(b,{$accent:!0,children:[a,l.toFixed(2)]})]}):(0,r.FD)(y,{children:[(0,r.Y)(w,{children:"Completion"}),(0,r.FD)(b,{$accent:!0,children:[(100*s/d).toFixed(1),"%"]})]}),(0,r.FD)(y,{children:[(0,r.Y)(w,{children:"Total cards"}),(0,r.Y)(b,{children:h.toLocaleString()})]}),(0,r.FD)(y,{children:[(0,r.Y)(w,{children:"Unique"}),(0,r.Y)(b,{children:$.toLocaleString()})]})]}),k?S:null]}),(0,r.Y)(g,{children:(0,r.FD)(m,{children:[(0,r.Y)(p.$,{options:[{value:"total",label:"Full-set*"},{value:"unique",label:"Unique"}],value:e,onChange:t,ariaLabel:"Completeness basis",raised:!0}),(0,r.Y)(p.$,{options:I,value:C,onChange:e=>{("all"===e||D)&&F(e)},ariaLabel:"Data scope",raised:!0}),(0,r.Y)(c.R,{options:i,value:i.find(e=>e.value===n),onChange:e=>o(e.value)})]})}),Object.keys(Y).length>0&&(0,r.Y)(f,{children:"total"===e?(0,r.FD)(r.FK,{children:["* ",A,"-set overall, but respects deck-building rules:",Object.keys(Y).map(e=>{const t=Y[e];return t.excludeFromCompletion?` ${e} excluded`:void 0!==t.collectionMaxForType?` ${t.collectionMaxForType}-set of ${e}`:null}).filter(Boolean).join(","),Object.keys(Y).some(e=>!Y[e].excludeFromCompletion&&!Y[e].collectionMaxForType)&&`, ${A}-set of other cards`]}):(0,r.FD)(r.FK,{children:["* At least 1 copy of each card (excluding"," ",Object.keys(Y).filter(e=>Y[e].excludeFromCompletion).join(", "),")"]})})]})};var k=n(63679),Y=n(55612),A=n(12434),C=n(539),F=n(58582),D=n(15088),S=n(87109),I=n(15757),z=n(90033);function T({currencySymbol:e,useCardmarket:t,scope:n,currentSet:o}){return"all"===n&&""===o&&0===(0,S.KJ)()?(0,r.Y)(E,{currencySymbol:e,useCardmarket:t}):null}function E({currencySymbol:e,useCardmarket:t}){const[n,i]=(0,o.J0)(null),[d,c]=(0,o.J0)(!1),p=(0,F.ft)(),h=(0,s.Yx)(),{open:u,sheet:g}=(0,z.y)();if((0,o.vJ)(()=>{let e=!0;return async function(){const e=`/cgfw/getcollectionvalue?game=${encodeURIComponent(A.Ay.TheGame)}`,t=await Y.A.get(e,void 0,{url:`https://api.dotgg.gg${e}`,headers:(0,l.z5)()});if(t.error)throw new Error(t.error_text||"Could not load your collection's value");return{premium:!0===t.premium,days:Number(t.days??0),eur:!0===t.eur,points:Array.isArray(t.points)?t.points:[],movers:Array.isArray(t.movers)?t.movers:void 0}}().then(t=>{e&&i(t)}
3471).catch(()=>{}),()=>{e=!1}},[]),!n)return null;const m=t&&n.eur,f=n.points.map(e=>({time:e.day,value:(m?e.eur:e.usd)??0})).filter(e=>e.value>0);if(f.length<2)return null;const x=f.slice(-8),v=x[0]?.value??0,y=(x[x.length-1]?.value??0)-v,w=v>0?y/v*100:0,b=(0,C.qb)(p),$=d?f:x,k=n.points.some(e=>e.estimated&&$.some(t=>t.time===e.day)),S=e=>{const t=(h??[]).find(t=>t.id===e);return t?a.SA.cards.getCardName(t):e};return(0,r.FD)(L,{children:[(0,r.FD)(M,{children:[(0,r.FD)(N,{$up:y>=0,children:[y>=0?"+":"â",e,Math.abs(y).toFixed(2)," (",w>=0?"+":"",w.toFixed(1),"%)"]}),(0,r.Y)("span",{children:"this week"}),n.premium?(0,r.Y)(P,{type:"button",onClick:()=>c(e=>!e),children:d?"Last 7 days":`${n.days}-day history`}):(0,r.Y)(I.wd,{surface:"portfolio.history",size:20,label:"90-day history",onOpen:()=>u("portfolio.history")})]}),(0,r.Y)(D.a,{series:[{key:"value",label:"Collection value",color:b.lineSeriesLineColor,fill:[b.lineSeriesTopColor,b.lineSeriesBottomColor],points:$}],range:"all",theme:b,currency:e,height:d?200:96,ariaLabel:"Collection value over time"}),k?(0,r.Y)(O,{children:"Earlier days show today's cards at that day's prices."}):null,d&&n.movers&&n.movers.length>0?(0,r.FD)(_,{children:[(0,r.Y)(R,{children:"This week's biggest moves in your collection"}),n.movers.map(e=>(0,r.FD)(j,{children:[(0,r.FD)(J,{$up:e.change>=0,children:[e.change>=0?"+":"â","$",Math.abs(e.change).toFixed(2)]}),(0,r.Y)("span",{children:S(e.card)}),(0,r.FD)(B,{children:["now $",e.now.toFixed(2)]})]},e.card))]}):null,g]})}const L=k.Ay.div` 3472 display: flex; 3473 flex-direction: column; 3474 gap: 6px; 3475 margin-top: 10px; 3476`,M=k.Ay.div` 3477 display: flex; 3478 flex-wrap: wrap; 3479 align-items: center; 3480 gap: 8px; 3481 font-size: 12.5px; 3482 color: var(--theme-palette-color-3); 3483`,N=k.Ay.span` 3484 font-weight: 700; 3485 font-variant-numeric: tabular-nums; 3486 color: ${e=>e.$up?"#3fb27f":"#d9534f"}; 3487`,P=k.Ay.button` 3488 margin-left: auto; 3489 padding: 3px 10px; 3490 border: 1px solid var(--theme-palette-color-5); 3491 border-radius: 999px; 3492 background: none; 3493 font: inherit; 3494 font-size: 12px; 3495 font-weight: 600; 3496 color: var(--theme-palette-color-1); 3497 cursor: pointer; 3498`,O=k.Ay.span` 3499 font-size: 11px; 3500 color: var(--theme-palette-color-4); 3501`,_=k.Ay.div` 3502 display: flex; 3503 flex-direction: column; 3504 gap: 4px; 3505 margin-top: 6px; 3506 font-size: 12.5px; 3507`,R=k.Ay.span` 3508 font-size: 11px; 3509 font-weight: 700; 3510 letter-spacing: 0.03em; 3511 text-transform: uppercase; 3512 color: var(--theme-palette-color-3); 3513`,j=k.Ay.div` 3514 display: flex; 3515 align-items: baseline; 3516 gap: 8px; 3517 color: var(--theme-palette-color-1); 3518`,J=k.Ay.span` 3519 min-width: 64px; 3520 font-weight: 700; 3521 font-variant-numeric: tabular-nums; 3522 color: ${e=>e.$up?"#3fb27f":"#d9534f"}; 3523`,B=k.Ay.span` 3524 margin-left: auto; 3525 color: var(--theme-palette-color-4); 3526 font-variant-numeric: tabular-nums; 3527`;var K=n(73634);const{SourcesBlock:W,SetsLimiter:U,SectionEyebrow:Q}=h._d,G=({collectionBySet:e,totalCardInSets:t,currentSet:n,SetNames:o,onFilterClick:i,hideSetsWithoutCards:a})=>{const s=a?Object.keys(e).filter(n=>{const r=n.toUpperCase();return e[r]>0&&t[r]>0}).map(e=>e.toUpperCase()):Object.keys(e).filter(e=>{const n=e.toUpperCase();return t[n]>0}).map(e=>e.toUpperCase());return(0,r.FD)(W,{children:[(0,r.Y)(Q,{children:"Sets"}),(0,r.Y)(U,{children:s.map((a,s)=>{const d=+e[a.toUpperCase()],c=t[a.toUpperCase()];if(isNaN(c)||""!==n&&a!==n&&!o[a]?.includes(n))return null;const p=`${(0,l.g3)(a)}${o[a]?` â ${o[a]}`:""}`;return(0,r.Y)(K.Y,{label:p,collected:d,total:c,onFilterClick:i,filterValue:a,filterType:"setId"},`set-${a}-${s}`)})})]})},{SourcesBlock:H,SectionEyebrow:q}=h._d,V=({collection:e,hideSetsWithoutCards:t,onFilterClick:n,filteredCardIds:o})=>{if(a.SA.collection.CustomCollectionStats){const o=a.SA.collection.CustomCollectionStats;return(0,r.Y)(o,{collection:e,hideSetsWithoutCards:t,onFilterClick:n})}return(0,r.Y)(X,{collection:e,hideSetsWithoutCards:t,onFilterClick:n,filteredCardIds:o})};const X=({collection:e,hideSetsWithoutCards:t,onFilterClick:n,filteredCardIds:c})=>{const[p,h]=(0,o.J0)("total"),[u,g]=(0,o.J0)(""),[m,f]=(0,o.J0)("all"),x=(0,s.Yx)(),v=void 0!==c,y=a.SA.cards.setNames(),w={};
3527Object.keys(a.SA.cards.rarityNames).forEach(e=>{w[e]=0});const b={},k={};Object.keys(a.SA.core.gameColors).forEach(e=>{k[e]=0});const Y={},A={},C={},F=[{label:"All Sets",value:""}];Object.keys(y).forEach(e=>{A[e.toUpperCase()]=0,C[e.toUpperCase()]=0,F.push({label:e,value:e.toUpperCase()})});const D={totalCards:0,totalCardsOwned:0,collectionCost:0,totalCardsOwnedIncludingOverMax:0,uniqueCardsOwned:0},S=x?.[0]?.currencySymbol||"$",I=(0,a.Fe)(),z=I?.maxCardsCopies??4,E=I?.specialCardTypes??{},L=a.SA.decks.deckBuildingRules[a.SA.decks.defaultFormat]?.specialCardProps||{},M=a.SA.cards.priceProviders,N="cardmarket"===(M&&M.length>0&&((0,l.Ri)(M[0].cookieName)||a.SA.cards.defaultPriceProvider)||"tcgplayer"),P={mode:p,currentSet:u,useCardmarket:N,collection:e,isFilteredScope:!("filtered"!==m||!v||!c),filteredCardIds:c,getMaxCardsForType:(e,t)=>{if(t)for(const e of Object.keys(L))if(!0===t[e]&&void 0!==L[e].collectionMaxForType)return L[e].collectionMaxForType;const n=E[e];return n&&void 0!==n.collectionMaxForType?n.collectionMaxForType:z},isExcludedFromCompletion:e=>{const t=E[e];return!0===t?.excludeFromCompletion},isExcludedFromSetColorCompletion:e=>!!a.SA.collection.excludeFromSetColorCompletion&&a.SA.collection.excludeFromSetColorCompletion(e),collectionByRarity:w,totalCardInRarity:b,collectionByColor:k,totalCardInColor:Y,collectionBySet:A,totalCardInSets:C,totalCardsAlreadyCounted:[],acc:D};return x?.forEach(e=>function(e,t){if(t.isFilteredScope&&!t.filteredCardIds.has(e.id))return;const n=t.isExcludedFromCompletion(e.cardtype),r=t.getMaxCardsForType(e.cardtype,e),o=t.collection.find(t=>t.card===e.id),l=o?+o.total:0;o&&l>0&&function({crd:e,colCard:t,ownedCount:n,maxForThisCardType:r,excludedFromCompletion:o,ctx:l}){const s=(0,i.sf)(t);s||(l.acc.totalCardsOwnedIncludingOverMax+=n,l.acc.uniqueCardsOwned+=1);const d="total"===l.mode?n>r?r:n:1,c=l.isExcludedFromSetColorCompletion(e);if(!o&&!c)if(e.setsList)e.setsList.forEach(e=>{const t=e.toUpperCase();void 0!==l.collectionBySet[t]?l.collectionBySet[t]=l.collectionBySet[t]+d:l.collectionBySet.Other=(l.collectionBySet.Other??0)+d});else if(e.setId&&void 0!==l.collectionBySet[e.setId.toUpperCase()]){const t=e.setId.toUpperCase();l.collectionBySet[t]=l.collectionBySet[t]+d}else l.collectionBySet.Other=(l.collectionBySet.Other??0)+d;(""===l.currentSet||e.setId&&e.setId.toUpperCase()===l.currentSet.toUpperCase())&&(void 0!==a.SA.cards.rarityNames[e.rarity]&&(l.collectionByRarity[e.rarity]=(l.collectionByRarity[e.rarity]??0)+d),c||e.colorsList.forEach(e=>{e&&(l.collectionByColor[e]=(l.collectionByColor[e]??0)+d)}),s||(l.acc.collectionCost+=function(e,t,n){const r=parseFloat(String((n?e.cmPrice:e.price)||"0"))||0,o=parseFloat(String((n?e.cmFoilPrice:e.foilPrice)||"0"))||0;return r<=0&&o<=0?0:(parseInt(t.standard??"0")||0)*(r>0?r:o)+(parseInt(t.foil??"0")||0)*(o>0?o:r)}(e,t,l.useCardmarket)),o||(l.acc.totalCardsOwned+=d))}({crd:e,colCard:o,ownedCount:l,maxForThisCardType:r,excludedFromCompletion:n,ctx:t}),function(e,t,n,r){const o=e.setsList?e.setsList:e.setId?[e.setId]:[],i="total"===r.mode?t:1;o.forEach(t=>{if(!t)return;const o=r.isExcludedFromSetColorCompletion(e);if(!n&&!o)if(void 0!==r.collectionBySet[t.toUpperCase()]){const e=t.toUpperCase();r.totalCardInSets[e]=(r.totalCardInSets[e]??0)+i}else r.totalCardInSets.Other=(r.totalCardInSets.Other??0)+i;""!==r.currentSet&&t.toUpperCase()!==r.currentSet.toUpperCase()||r.totalCardsAlreadyCounted.includes(e.id)||n||(r.acc.totalCards+=i,r.totalCardInRarity[e.rarity]||(r.totalCardInRarity[e.rarity]=0),r.totalCardInRarity[e.rarity]=(r.totalCardInRarity[e.rarity]??0)+i,o||e.colorsList.forEach(e=>{e&&(r.totalCardInColor[e]||(r.totalCardInColor[e]=0),r.totalCardInColor[e]+=i)}),r.totalCardsAlreadyCounted.push(e.id))})}(e,r,n,t)}(e,P)),(0,r.FD)(r.FK,{children:[(0,r.Y)($,{mode:p,setMode:h,currentSet:u,setCurrentSet:g,sets:F,currencySymbol:S,collectionCost:D.collectionCost,totalCardsOwned:D.totalCardsOwned,totalCards:D.totalCards,totalCardsOwnedIncludingOverMax:D.totalCardsOwnedIncludingOverMax,uniqueCardsOwned:D.uniqueCardsOwned,showPrices:a.SA.cards.showPrices,specialCardTypes:E,specialCardProps:L,maxCardsInCollection:z,scope:m,valueTrend:(0,r.Y)(T,{currencySymbol:S,useCardmarket:N,scope:m,currentSet:u}),setScope:f,hasActiveFilters:v}),(a.SA.collection.collectionStatsSections?.sets??!0)&&(0,r.Y)(G,{collectionBySet:A,totalCardInSets:C,currentSet:u,SetNames:y,onFilterClick:n,hideSetsWithoutCards:t}),(a.SA.collection.collectionStatsSections?.rarity??!0)&&(0,r.FD)(H,{children:[(0,r.Y)(q,{children:"Rarity"}),Object.keys(w).map((e,t)=>b[e]&&(0,r.Y)(K.Y,{label:a.SA.cards.rarityNames?.[e]||e,collected:w[e]??0,total:b[e]??0,icon:a.SA.cards.rarityIcons?.[e],onFilterClick:n,filterValue:e,filterType:"rarity"},t))]}),a.SA.collection.collectionStatsCustomSections&&a.SA.collection.collectionStatsCustomSections({collection:e,cards:x||[],mode:p,currentSet:u,maxCardsInCollection:z,collectionByRarity:w,totalCardInRarity:b,onFilterClick:n}),(a.SA.collection.collectionStatsSections?.color??!0)&&(0,r.FD)(H,{children:[(0,r.Y)(q,{children:"Elements"}),Object.keys(k).map((e,t)=>{if(!Y[e])return null;const o=(0,d.Qm)(e);return(0,r.Y)(K.Y,{label:(0,l.g3)((0,d.cd)(e)),collected:k[e]??0,total:Y[e]??0,icon:o?.icon,barColor:o?.color,onFilterClick:n,filterValue:e,filterType:"color"},t)})]})]})}},22695(e,t,n){var r=n(63679),o=n(75654),i=n(4150);const a=(0,r.I4)(i.M3)` 3528 max-height: 300px; 3529 overflow-y: auto; 3530 overflow-x: hidden; 3531 display: flex; 3532 flex-direction: column; 3533 gap: 0; 3534`,l=r.I4.div` 3535 display: flex; 3536 align-items: center; 3537 gap: 8px; 3538 min-width: 0; 3539 @media only screen and (max-width: 550px) { 3540 ${e=>e.$isset?"white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 65%;":""} 3541 } 3542`,s=r.I4.div` 3543 font-size: 10px; 3544 font-weight: 700; 3545 letter-spacing: 0.08em; 3546 text-transform: uppercase; 3547 color: var(--theme-palette-color-3); 3548 margin: 2px 0 10px; 3549`,d=r.I4.div` 3550 display: flex; 3551 flex-direction: column; 3552 gap: 6px; 3553 padding-top: 12px; 3554`,c=r.I4.div` 3555 display: flex; 3556 gap: 8px; 3557 justify-content: flex-start; 3558 align-items: center; 3559 flex-wrap: wrap; 3560 width: 100%; 3561 3562 > div:last-child { 3563 min-width: 200px; 3564 max-width: 240px; 3565 margin-left: auto; 3566 } 3567 3568 @media only screen and (max-width: 590px) { 3569 justify-content: center; 3570 >
3570 div:last-child { 3571 min-width: 150px; 3572 margin-left: 0; 3573 } 3574 } 3575`,p=r.I4.div` 3576 font-size: 11px; 3577 color: var(--theme-palette-color-3); 3578 text-align: left; 3579 line-height: 1.4; 3580 padding-top: 10px; 3581`,h=r.I4.div` 3582 font-size: 30px; 3583 font-weight: 800; 3584 letter-spacing: -0.01em; 3585 line-height: 1; 3586 font-variant-numeric: tabular-nums; 3587 color: ${e=>e.$accent?"var(--theme-palette-color-1)":"var(--theme-palette-color-4)"}; 3588 @media only screen and (max-width: 700px) { 3589 font-size: 24px; 3590 } 3591`,u=r.I4.div` 3592 font-size: 10px; 3593 font-weight: 600; 3594 letter-spacing: 0.08em; 3595 text-transform: uppercase; 3596 color: var(--theme-palette-color-3); 3597 margin-bottom: 3px; 3598`,g=r.I4.div` 3599 display: flex; 3600 flex-direction: column; 3601 padding: 2px 0 10px; 3602`,m=r.I4.div` 3603 display: flex; 3604 gap: 24px; 3605 align-items: flex-start; 3606 flex-wrap: wrap; 3607 @media only screen and (max-width: 700px) { 3608 gap: 16px; 3609 } 3610`,f=r.I4.div` 3611 display: flex; 3612 flex-direction: column; 3613 align-items: flex-start; 3614 gap: 2px; 3615 min-width: 90px; 3616 @media only screen and (max-width: 700px) { 3617 min-width: 70px; 3618 } 3619`,x=r.I4.div` 3620 display: flex; 3621 flex-direction: column; 3622 min-width: 0; 3623 border-radius: 6px; 3624 padding: 14px 16px; 3625 background: var(--theme-palette-color-8); 3626 border: 1px solid var(--theme-palette-color-5); 3627 @media only screen and (max-width: 700px) { 3628 padding: 12px 12px; 3629 } 3630`,v=r.I4.div` 3631 display: flex; 3632 width: 100%; 3633 transition: color 0.15s ease; 3634`,y=r.I4.div` 3635 font-variant-numeric: tabular-nums; 3636 font-size: 12px; 3637 color: var(--theme-palette-color-3); 3638 min-width: 72px; 3639 text-align: right; 3640 white-space: nowrap; 3641 b { 3642 color: var(--theme-palette-color-4); 3643 font-weight: 600; 3644 } 3645 @media only screen and (max-width: 550px) { 3646 min-width: 50px; 3647 font-size: 11px; 3648 } 3649`,w=r.I4.div` 3650 display: flex; 3651 align-items: center; 3652 gap: 8px; 3653 flex: 0 0 150px; 3654 width: 150px; 3655 min-width: 0; 3656 font-size: 13.5px; 3657 color: var(--theme-palette-color-3); 3658 white-space: nowrap; 3659 overflow: hidden; 3660 user-select: none; 3661 @media only screen and (max-width: 700px) { 3662 flex: 0 0 110px; 3663 width: 110px; 3664 font-size: 12.5px; 3665 } 3666`,b=r.I4.span` 3667 flex: 1 1 auto; 3668 min-width: 40px; 3669 height: 6px; 3670 border-radius: 50px; 3671 background: var(--theme-palette-color-7); 3672 position: relative; 3673 overflow: hidden; 3674 3675 &::after { 3676 content: ""; 3677 position: absolute; 3678 inset: 0 auto 0 0; 3679 width: ${e=>e.$width}; 3680 background: ${e=>e.$foil?o.bx:e.$color||"var(--theme-palette-color-1)"}; 3681 border-radius: 50px; 3682 transition: width 300ms ease; 3683 } 3684`,$={SourcesBlock:x,FlexRow:v,TheSource:r.I4.div` 3685 display: flex; 3686 align-items: center; 3687 gap: 10px; 3688 width: 100%; 3689 padding: 5px 0; 3690 cursor: default; 3691 transition: color 0.15s ease; 3692 &:hover { 3693 color: var(--theme-palette-color-4); 3694 } 3695`,SourceName:w,NamePart:l,ValSquare:y,SourceBar:b,BigCollectionPrice:g,BigPriceSign:h,PriceTag:u,StatsRow:m,StatItem:f,SectionSpacer:r.I4.div` 3696 height: 12px; 3697`,SectionDivider:r.I4.div` 3698 height: 1px; 3699 background: var(--theme-palette-color-5); 3700 margin: 12px 0; 3701`,SetsLimiter:a,Filters:d,SetFilter:c,CollectionRulesExplanation:p,SectionEyebrow:s};n.d(t,["B7",0,s,"_d",0,$,"mb",0,x])},52754(e,t,n){n.d(t,{YP:()=>p,vj:()=>c});var r=n(10201),o=n(17402),i=n(63679),a=n(51718),l=n(70213),s=n(7718),d=n(98973);function c({as:e,icon:t,label:n,hint:o,note:i,title:a,href:c,onClick:p,disabled:h}){const u=c?{as:"a",href:c,"data-native":!0}:{type:"button",onClick:p,disabled:h};if("sheet"===e)return(0,r.FD)(s.WH,{...u,title:a,children:[(0,r.Y)("span",{children:n}),(i||c)&&(0,r.Y)(Y,{children:i??(0,r.Y)(l.fq,{size:13})})]});if("menu"===e){const e=!t&&!o;return(0,r.FD)(w,{...u,"data-menu-item":!0,title:a,$plain:e,children:[t&&(0,r.Y)(b,{children:t}),(0,r.FD)($,{children:[e?(0,r.Y)("span",{children:n}):(0,r.Y)("b",{children:n}),o&&(0,r.Y)("small",{children:o})]}),(i||c)&&(0,r.Y)(k,{children:i??(0,r.Y)(l.fq,{size:12})})]})}return(0,r.FD)(d.IB,{...u,title:a,$disabled:h,children:[t,n,i]})}function p({primary:e,lead:t,label:n,icon:i,badge:s,menuTitle:d,minWidth:c=320,alignRight:p,children:h}){const{open:g,setOpen:w,ref:b}=(0,a.G)();return(0,o.vJ)(()=>
3701{if(!g)return;const e=e=>"Escape"===e.key&&w(!1);return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[g,w]),(0,r.FD)(u,{ref:b,$open:g,children:[e&&(0,r.FD)(m,{type:"button",title:e.title,disabled:e.disabled,onClick:()=>{w(!1),e.onClick()},children:[e.icon,e.label]}),t&&(0,r.Y)(f,{onClickCapture:()=>w(!1),children:t}),(e||t)&&(0,r.Y)(v,{}),(0,r.FD)(x,{type:"button",title:d,"aria-label":n??d,"aria-haspopup":"menu","aria-expanded":g,onClick:()=>w(e=>!e),children:[i,n,s,(0,r.Y)(l.Vh,{size:12})]}),(0,r.Y)(y,{role:"menu",$minWidth:`${c}px`,$align:p?"right":"left",$hidden:!g,onClick:e=>{e.target instanceof Element&&e.target.closest("[data-menu-item]")&&w(!1)},children:h})]})}const h=i.Ay.div` 3702 height: 1px; 3703 margin: 4px 0; 3704 background: var(--theme-palette-color-5); 3705`,u=i.Ay.div` 3706 position: relative; 3707 display: inline-flex; 3708 align-items: center; 3709 height: 30px; 3710 box-sizing: border-box; 3711 border: 1px solid ${e=>e.$open?"var(--theme-palette-color-1)":"transparent"}; 3712 border-radius: 6px; 3713 background: var(--theme-palette-color-8); 3714 color: ${e=>e.$open?"var(--theme-palette-color-4)":"var(--theme-palette-color-3)"}; 3715 font-size: 12.5px; 3716 font-weight: 600; 3717 white-space: nowrap; 3718 transition: border-color 150ms ease; 3719 &:hover { 3720 border-color: ${e=>e.$open?"var(--theme-palette-color-1)":"var(--theme-palette-color-5)"}; 3721 } 3722`,g=i.AH` 3723 display: inline-flex; 3724 align-items: center; 3725 gap: 6px; 3726 height: 100%; 3727 border: none; 3728 background: none; 3729 color: inherit; 3730 font: inherit; 3731 cursor: pointer; 3732 &:hover:not(:disabled) { 3733 color: var(--theme-palette-color-4); 3734 } 3735 &:disabled { 3736 opacity: 0.5; 3737 cursor: default; 3738 } 3739 svg { 3740 display: block; 3741 flex: none; 3742 } 3743`,m=i.Ay.button` 3744 ${g} 3745 padding: 0 10px; 3746`,f=i.Ay.span` 3747 display: inline-flex; 3748 height: 100%; 3749 > button { 3750 height: 100%; 3751 border: none; 3752 background: none; 3753 } 3754`,x=i.Ay.button` 3755 ${g} 3756 gap: 5px; 3757 padding: 0 8px; 3758`,v=i.Ay.span` 3759 width: 1px; 3760 height: 16px; 3761 background: var(--theme-palette-color-5); 3762`,y=(0,i.Ay)(d.up)` 3763 padding: 4px 0; 3764 font-size: 13px; 3765 ${e=>e.$hidden?"display: none;":""} 3766`,w=i.Ay.button` 3767 display: flex; 3768 align-items: flex-start; 3769 gap: 10px; 3770 width: 100%; 3771 padding: 8px 14px; 3772 border: none; 3773 background: none; 3774 color: ${e=>e.$plain?"var(--theme-palette-color-3)":"var(--theme-palette-color-4)"}; 3775 font: inherit; 3776 text-align: left; 3777 text-decoration: none; 3778 white-space: normal; 3779 cursor: pointer; 3780 &:hover:not(:disabled), 3781 &:focus-visible { 3782 background: #384759; 3783 outline: none; 3784 } 3785 &:disabled { 3786 color: var(--theme-palette-color-3); 3787 cursor: default; 3788 } 3789`,b=i.Ay.span` 3790 display: inline-flex; 3791 flex: none; 3792 width: 14px; 3793 margin-top: 2px; 3794`,$=i.Ay.span` 3795 display: flex; 3796 flex-direction: column; 3797 flex: 1; 3798 min-width: 0; 3799 b { 3800 font-weight: 600; 3801 } 3802 small { 3803 font-size: 11.5px; 3804 color: var(--theme-palette-color-3); 3805 } 3806`,k=i.Ay.span` 3807 align-self: center; 3808 margin-left: 12px; 3809 font-size: 11.5px; 3810 color: var(--theme-palette-color-3); 3811 white-space: nowrap; 3812`,Y=i.Ay.span` 3813 display: inline-flex; 3814 align-items: center; 3815 gap: 8px; 3816 font-size: 12.5px; 3817 color: var(--theme-palette-color-3); 3818`;n.d(t,["Nj",0,h])},22401(e,t,n){var r=n(17402);const o=(0,r.q6)(null);n.d(t,["$o",0,"dotgg:open-card-filters","Vh",0,()=>(0,r.NT)(o),"zg",0,o])},72870(e,t,n){n.d(t,{he:()=>i});var r=n(63679),o=n(28297);function i({selected:e,escape:t}){return r.AH` 3819 display: inline-flex; 3820 align-items: center; 3821 gap: 5px; 3822 height: 34px; 3823 min-width: 44px; 3824 padding: 0 13px; 3825 box-sizing: border-box; 3826 border-radius: 17px; 3827 border: 1px ${!0===t?"dashed":"solid"} 3828 ${!0===e?"var(--theme-palette-color-1)":"var(--theme-palette-color-5)"}; 3829 background: ${!0===e?"color-mix(in srgb, var(--theme-palette-color-1) 12%, transparent)":"none"}; 3830 color: ${!0===e?"var(--theme-palette-color-4)":"var(--theme-palette-color-3)"}; 3831 font-family: inherit; 3832 font-size: 12.5px; 3833 font-weight: 600; 3834 white-space: nowrap; 3835 @media only screen and ${o.Ab} { 3836 padding: 0 11px; 3837 } 3838 `}const a=r.AH` 3839 flex-wrap: wrap; 3840 row-gap: 0; 3841 padding: 0; 3842 overflow: visible; 3843 3844 @media only screen and ${o.Ab} { 3845 padding: 0; 3846 } 3847`,l=r.Ay.div` 3848 display: flex; 3849 align-items: center; 3850 gap: 8px; 3851 width: 100%; 3852 min-width: 0; 3853 padding: 0 12px; 3854 /* Rule 5: one row, one line. A wrapping chip row is 2â4 unpredictable 3855 heights and it pushes the first result off-screen. */ 3856 flex-wrap: nowrap; 3857 overflow-x: auto; 3858 overflow-y: hidden; 3859 scroll-behavior: smooth; 3860 -webkit-overflow-scrolling: touch; 3861 scrollbar-width: none; 3862 &::-webkit-scrollbar {
3863 display: none; 3864 } 3865 > * { 3866 flex: none; 3867 } 3868 @media only screen and ${o.Ab} { 3869 gap: 6px; 3870 padding: 0 10px; 3871 } 3872 ${e=>e.$wrap?a:""} 3873`,s=r.Ay.button` 3874 display: inline-flex; 3875 align-items: center; 3876 height: 46px; 3877 padding: 0; 3878 border: none; 3879 background: none; 3880 color: inherit; 3881 font-family: inherit; 3882 cursor: pointer; 3883 /* Rule: scale, never colour â the fill is state. */ 3884 transition: transform 150ms ease; 3885 &:active { 3886 transform: scale(0.95); 3887 } 3888 &:disabled { 3889 /* A greyed chip that explains itself on tap is a chip that needed a 3890 count instead: it is present, not hidden, and not hittable. */ 3891 opacity: 0.4; 3892 cursor: default; 3893 pointer-events: none; 3894 } 3895`,d=r.Ay.span` 3896 ${e=>i({selected:e.$selected,escape:e.$escape})} 3897`,c=r.Ay.span` 3898 display: block; 3899 max-width: 128px; 3900 overflow: hidden; 3901 text-overflow: ellipsis; 3902 white-space: nowrap; 3903`,p=r.Ay.span.attrs(e=>({style:{background:e.$color}}))` 3904 flex: none; 3905 width: 8px; 3906 height: 8px; 3907 border-radius: 2px; 3908`,h=r.Ay.span` 3909 font-variant-numeric: tabular-nums; 3910 font-weight: 500; 3911 color: var(--theme-palette-color-3); 3912`,u=r.Ay.span` 3913 display: inline-flex; 3914 align-items: center; 3915 margin-left: -3px; 3916 color: var(--theme-palette-color-1); 3917 font-size: 12px; 3918 line-height: 1; 3919`;n.d(t,["AK",0,h,"Cj",0,d,"WC",0,c,"X7",0,u,"s_",0,l,"vu",0,s,"zQ",0,p])},18041(e,t,n){n.d(t,{M:()=>d});var r=n(10201),o=n(17402),i=n(7718),a=n(72870);function l(e){return Array.isArray(e.value)}var s=n(28943);function d(e){const{options:t,allowAny:n=!0,anyLabel:d="Any",overflowAfter:u=8,sheetTitle:g,label:m,wrap:f=!1}=e,x=l(e),v=(0,o.Kr)(()=>Array.isArray(e.value)?e.value:""===e.value?[]:[e.value],[e.value]),y=(0,o.li)(null),w=(0,o.li)(v);w.current=v;const b=(0,o.li)(t);b.current=t;const $=t.map(e=>e.id).join(" "),[k,Y]=(0,o.J0)(()=>h(t,v));(0,o.vJ)(()=>{Y(h(b.current,w.current)),y.current?.scrollTo({left:0})},[$]);const A=(0,o.Kr)(()=>function(e,t){const n=new Map(e.map(e=>[e.id,e])),r=[];return t.forEach(e=>{const t=n.get(e);void 0!==t&&r.push(t)}),[...r,...e.filter(e=>!t.includes(e.id))]}(t,k),[t,k]);if(0===t.length||!n&&t.length<2)return null;const C=t.length>u,F=C?function(e,t,n){const r=e.filter(e=>t.includes(e.id)),o=e.filter(e=>!t.includes(e.id));return[...r,...o.slice(0,Math.max(n-r.length,0))]}(A,v,u):A,D=t=>{if(l(e)){const n=e.value;return void e.onChange(null===t?[]:n.includes(t)?n.filter(e=>e!==t):[...n,t])}null!==t?e.value!==t&&e.onChange(t):e.onChange("")};return(0,r.FD)(a.s_,{ref:y,$wrap:f,role:x?"group":"radiogroup","aria-label":m,children:[n&&(0,r.Y)(c,{multi:x,selected:0===v.length,label:d,onClick:()=>D(null)}),F.map(e=>(0,r.Y)(c,{multi:x,selected:v.includes(e.id),label:e.label,count:e.count,swatch:e.swatch,disabled:!0===e.disabled&&!v.includes(e.id),onClick:()=>D(e.id)},e.id)),C&&(0,r.Y)(i.er,{title:g??`All ${m.toLowerCase()}`,label:g??`All ${m.toLowerCase()}`,trigger:e=>(0,r.Y)(a.vu,{type:"button",onClick:e,"aria-haspopup":"dialog",children:(0,r.FD)(a.Cj,{$escape:!0,children:["All ",t.length,(0,r.Y)(p,{})]})}),children:(0,r.Y)(s.n,{options:t,selected:v,multi:x,anyLabel:d,allowAny:n,onPick:D})})]})}function c({multi:e,selected:t,label:n,count:o,swatch:i,disabled:l,onClick:s}){return(0,r.Y)(a.vu,{type:"button",role:e?void 0:"radio","aria-checked":e?void 0:t,"aria-pressed":e?t:void 0,disabled:l,title:n,onClick:s,children:(0,r.FD)(a.Cj,{$selected:t,children:[e&&t&&(0,r.Y)(a.X7,{"aria-hidden":"true",children:"â"}),void 0!==i&&(0,r.Y)(a.zQ,{$color:i,"aria-hidden":"true"}),(0,r.Y)(a.WC,{children:n}),void 0!==o&&(0,r.Y)(a.AK,{children:o})]})})}const p=()=>(0,r.Y)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round","aria-hidden":"true",children:(0,r.Y)("path",{d:"M9 6l6 6-6 6"})});function h(e,t){return[...e.filter(e=>t.includes(e.id)),...e.filter(e=>!t.includes(e.id))].map(e=>e.id)}},28943(e,t,n){n.d(t,{n:()=>c});var r=n(10201),o=n(17402),i=n(63679),a=n(1070),l=n(89024),s=n(4428),d=n(8609);function c({options:e,selected:t,multi:n,anyLabel:i,allowAny:c,onPick:f}){const[x,v]=(0,o.J0)(""),y=x.trim().toLowerCase(),w=""===y?e:e.filter(e=>(0,l.qW)(e.label,y));return(0,r.FD)(r.FK,{children:[e.length>20&&(0,r.Y)(p,{children:(0,r.FD)(d.W4,{children:[(0,r.Y)(s.ll,{type:"text",placeholder:"Search",value:x,onChange:e=>v(e.currentTarget.value)}),(0,r.Y)(d.WI,{children:a.pU}),""!==x&&(0,r.Y)(d.w_,{onClick:()=>v(""),title:"Clear search","aria-label":"Clear search",children:a.q8})]})}),c&&""===y&&(0,r.Y)(h,{type:"button",$selected:0===t.length,"aria-pressed":0===t.length,onClick:()=>f(null),children:(0,r.Y)("span",{children:i})}),w.map(e=>{const o=t.includes(e.id);return(0,r.FD)(h,{type:"button",$selected:o,"aria-pressed":o,disabled:!0===e.disabled&&!o,onClick:()=>f(e.id),children:[(0,r.Y)("span",{children:e.label}),void 0!==e.count&&(0,r.Y)(u,{children:e.count}),o&&(0,r.Y)(g,{"aria-hidden":"true",children:n?"â":"â"})]},e.id)}),0===w.length&&(0,r.Y)(m,{children:"No matches"})]})}const p=i.Ay.div` 3920 padding: 10px 16px; 3921 border-bottom: 1px solid var(--theme-palette-color-5); 3922`,h=i.Ay.button` 3923 display: flex; 3924 align-items: center; 3925 gap: 10px; 3926 width: 100%; 3927 height: 56px; 3928 padding: 0 16px; 3929 border: none; 3930 border-bottom: 1px solid var(--theme-palette-color-5); 3931 background: ${e=>e.$selected?"color-mix(in srgb, var(--theme-palette-color-1) 8%, transparent)":"none"}; 3932 color: ${e=>e.$selected?"var(--theme-palette-color-4)":"var(--theme-palette-color-3)"}; 3933 font-family: inherit; 3934 font-size: 14px; 3935 font-weight: ${e=>e.$selected?700:500}; 3936 text-align: left; 3937 cursor: pointer; 3938 &:disabled { 3939 opacity: 0.4; 3940 cursor: default; 3941 } 3942 > span:first-child { 3943 flex: 1; 3944 min-width: 0; 3945 overflow: hidden; 3946 text-overflow: ellipsis; 3947 white-space: nowrap; 3948 } 3949`,u=i.Ay.span` 3950 flex: none; 3951 font-variant-numeric: tabular-nums; 3952 font-size: 12px; 3953 font-weight: 500; 3954 color: var(--theme-palette-color-3); 3955`,g=i.Ay.span` 3956 flex: none; 3957 color: var(--theme-palette-color-1); 3958 font-size: 13px; 3959`,m=i.Ay.div` 3960 padding: 20px 16px; 3961 font-size: 12.5px; 3962 color: var(--theme-palette-color-3); 3963`},23764(e,t,n){n.d(t,{Iy:()=>a,Kw:()=>l});var r=n(10201),o=n(63679),i=n(72870);function a({label:e,children:t,leading:n}){return(0,r.FD)(s,{children:[(0,r.Y)(d,{children:e}),(0,r.FD)(c,{role:"group","aria-label":e,children:[n,t]})]})}function l({label:e,children:t}){return(0,r.FD)(s,{children:[(0,r.Y)(d,{children:e}),t]})}const s=o.Ay.div` 3964 display: flex; 3965 flex-direction: column; 3966 gap: 4px; 3967 padding: 6px 0; 3968 border-bottom: 1px solid var(--theme-palette-color-5); 3969 &:last-child { 3970 border-bottom: none; 3971 } 3972`,d=o.Ay.div` 3973 padding: 0 16px; 3974 font-size: 10.5px; 3975 font-weight: 700; 3976 letter-spacing: 0.07em; 3977 text-transform: uppercase; 3978 color: var(--theme-palette-color-3); 3979`,c=o.Ay.div` 3980 display: flex; 3981 align-items: center; 3982 gap: 6px; 3983 padding: 6px 16px; 3984 overflow-x: auto; 3985 overflow-y: hidden; 3986 scroll-snap-type: x proximity; 3987 -webkit-overflow-scrolling: touch; 3988 scrollbar-width: none; 3989 &::-webkit-scrollbar {
3990 display: none; 3991 } 3992 > * { 3993 flex: none; 3994 scroll-snap-align: start; 3995 } 3996`,p=o.Ay.button` 3997 ${e=>(0,i.he)({selected:e.$active})} 3998 cursor: pointer; 3999 &:disabled { 4000 opacity: 0.4; 4001 cursor: default; 4002 } 4003 img, 4004 svg { 4005 display: block; 4006 max-height: 18px; 4007 } 4008`,h=(0,o.Ay)(p)` 4009 border-style: dashed; 4010`,u=o.Ay.span` 4011 display: block; 4012 max-width: 128px; 4013 overflow: hidden; 4014 text-overflow: ellipsis; 4015 white-space: nowrap; 4016`;n.d(t,["$7",0,p,"Aw",0,h,"RN",0,u])},21493(e,t,n){n.d(t,{LF:()=>Ne,I_:()=>Me});var r=n(10201),o=n(17402),i=n(70213),a=n(4738),l=n(55612),s=n(12434);async function d(e){const t=`/cgfw/importcollection?game=${s.Ay.TheGame}`;return await l.A.post(t,e,{headers:(0,a.z5)(),url:`https://api.dotgg.gg${t}`,retry:!1})}var c=n(63679),p=n(49340),h=n(54375),u=n(18996),g=n(10306),m=n(11754),f=n(57966);const x=["cardid","card id","id","card"],v=["normal","standard","count","qty","quantity","amount","owned","regular","normal count"],y=["foil","foils","foil count","foils count","foil qty","foil quantity","special foil count","etched foil count"],w=["name","cardname","card name"],b=["set code","setcode","set id","setid","edition code","set"],$=["number","card number","collector number","collectornumber","cardnumber"];var k=n(79231);function Y(e){const t=new Map,n=new Map,r=new Map;return e.forEach(e=>{const o=e.id?.toLowerCase();o&&!t.has(o)&&t.set(o,e);const i=A(e.setId,e.number);i&&!r.has(i)&&r.set(i,e),[e.name,e.displayName].forEach(t=>{const r=t?.toLowerCase();r&&!n.has(r)&&n.set(r,e)})}),{byId:t,byName:n,byPrinting:r}}function A(e,t){const n=(e??"").trim().toLowerCase(),r=(t??"").trim().toLowerCase().replace(/^0+(?=\d)/,"");return n&&r?`${n}|${r}`:""}function C(e,t){const n=A(e.set,e.number),r=n?t.byPrinting.get(n):void 0;if(r)return r;return(e.id?t.byId.get(e.id.toLowerCase()):void 0)||(e.name?t.byName.get(e.name.toLowerCase()):void 0)}const F=e=>parseInt(e??"0",10)||0;function D(e,t){const n=e.get(t.cardId);if(n)return n.standard+=t.standard,void(n.foil+=t.foil);e.set(t.cardId,{...t})}function S(e,t,n,r=!1){const o=t.trim();return o?r||!(e=>{const t=e.split("\n").filter(e=>e.trim());return 0!==t.length&&t.filter(e=>e.includes(",")).length>=Math.ceil(t.length/2)})(o)?function(e,t,n){const r=(0,k.np)(e,t,n),o=new Map;r.matched.forEach(e=>{const t=o.get(e.cardId);t?t.standard+=e.quantity:o.set(e.cardId,{cardId:e.cardId,standard:e.quantity,foil:0,identifier:e.identifier})});const i=r.unmatched.map(e=>({identifier:e.identifier,standard:e.quantity,foil:0,keys:{id:"",name:e.identifier,set:"",number:""}}));return{matched:Array.from(o.values()),unmatched:i}}(e,o,n):function(e,t){const n=function(e){const t=[];let n=[],r="",o=!1;const i=()=>{n.push(r.trim()),r=""},a=()=>{i(),n.some(e=>""!==e)&&t.push(n),n=[]};for(let t=0;t<e.length;t++){const n=e[t]??"";o?'"'!==n?r+=n:'"'===e[t+1]?(r+='"',t++):o=!1:'"'===n&&""===r.trim()?(r="",o=!0):","===n?i():"\n"===n?a():"\r"!==n&&(r+=n)}return(""!==r||n.length>0)&&a(),t}(e),r=n[0];var o;r&&1===(o=r).length&&/^sep=.?$/i.test((o[0]??"").trim())&&n.shift();const i=n[0];if(!i)return{matched:[],unmatched:[]};let a={id:0,standard:1,foils:[2],name:3,set:-1,number:-1},l=0;const s=function(e){const t=e.map(e=>e.trim().toLowerCase()),n=e=>{for(const n of e){const e=t.indexOf(n);if(e>=0)return e}return-1},r=n(x),o=n(w),i=n(v),a=n(b),l=n($),s=t.map((e,t)=>y.includes(e)?t:-1).filter(e=>e>=0);return-1===r&&-1===o?null:{id:r,name:o,standard:i,foils:s,set:a,number:l}}(i);s&&(a=s,l=1);const d=Y(t),c=new Map,p=[];for(let e=l;e<n.length;e++){const t=n[e]??[],r=e=>e>=0?t[e]??"":"",o={id:r(a.id),name:r(a.name),set:r(a.set),number:r(a.number)},i=o.name||o.id;if(!i)continue;const l=a.standard>=0?F(t[a.standard]):0,s=a.foils.reduce((e,n)=>e+F(t[n]),0);if(l<=0&&s<=0)continue;const h=C(o,d);h?D(c,{cardId:h.id,standard:l,foil:s,identifier:i}):p.push({identifier:i,standard:l,foil:s,keys:o})}return{matched:Array.from(c.values()),unmatched:p}}(o,n):{matched:[],unmatched:[]}}const I=(e,t)=>e.standard*(0,f.eC)(t,"standard")+e.foil*(0,f.eC)(t,"foil"),z=({matched:e,unmatched:t,cards:n,onUpdateMatched:o,onRemoveMatched:i,onResolveUnmatched:a,onDismissUnmatched:l})=>{const s=(0,u.uK)(n),{zoom:d,popup:c}=(0,p.t)(),x=e.reduce((e,t)=>
4016e+t.standard,0),v=e.reduce((e,t)=>e+t.foil,0),y=e.reduce((e,t)=>e+I(t,s.get(t.cardId)),0);return(0,r.FD)(r.FK,{children:[t.length>0&&(0,r.Y)(u.FN,{title:"Needs attention",count:t.length,tone:"var(--theme-palette-color-10)",children:t.map((e,t)=>(0,r.Y)(u.qd,{identifier:e.identifier,meta:`${e.standard} normal · ${e.foil} foil â not recognized`,cards:n,onResolve:e=>a(t,e),onDismiss:()=>l(t)},`${e.identifier}-${t}`))}),(0,r.Y)(u.FN,{title:"Cards",count:e.length,children:e.map((e,t)=>(0,r.Y)(m.jT,{children:(0,r.FD)(m.J3,{$cols:"auto minmax(0, 1fr) auto auto auto auto",children:[(0,r.Y)(g.sx,{card:s.get(e.cardId),onZoom:()=>d(e.cardId)}),(0,r.Y)(u.d5,{card:s.get(e.cardId),fallback:e.cardId}),(0,r.FD)(T,{children:[(0,r.Y)(L,{children:"Normal"}),(0,r.Y)(g.kX,{value:e.standard,min:0,onChange:e=>o(t,{standard:e})})]}),(0,r.FD)(T,{children:[(0,r.Y)(L,{children:"Foil"}),(0,r.Y)(g.kX,{value:e.foil,min:0,onChange:e=>o(t,{foil:e})})]}),(0,r.FD)(E,{children:[(0,r.Y)(L,{children:"Value"}),(0,r.Y)("span",{children:(0,f.By)(I(e,s.get(e.cardId)))})]}),(0,r.Y)(m.Dy,{title:"Remove",onClick:()=>i(t),children:(0,r.Y)(h.gz,{size:15})})]})},`${e.cardId}-${t}`))}),(0,r.FD)(M,{children:[(0,r.FD)("span",{children:[(0,r.Y)("strong",{children:x})," normal · ",(0,r.Y)("strong",{children:v})," foil"]}),(0,r.FD)("span",{children:["total value ",(0,r.Y)("strong",{children:(0,f.By)(y)})]}),t.length>0&&(0,r.FD)(N,{children:[t.length," unresolved"]})]}),c]})},T=c.Ay.div` 4017 display: flex; 4018 flex-direction: column; 4019 align-items: center; 4020 gap: 2px; 4021`,E=(0,c.Ay)(T)` 4022 min-width: 52px; 4023 span:last-child { 4024 font-size: 12px; 4025 font-weight: 700; 4026 color: var(--theme-palette-color-1); 4027 line-height: 24px; 4028 white-space: nowrap; 4029 } 4030`,L=c.Ay.span` 4031 font-size: 9px; 4032 text-transform: uppercase; 4033 letter-spacing: 0.04em; 4034 color: var(--theme-palette-color-3); 4035 opacity: 0.6; 4036`,M=c.Ay.div` 4037 display: flex; 4038 gap: 16px; 4039 flex-wrap: wrap; 4040 padding: 12px 2px 2px; 4041 font-size: 12px; 4042 color: var(--theme-palette-color-3); 4043 strong { 4044 color: var(--theme-palette-color-1); 4045 font-weight: 800; 4046 } 4047`,N=c.Ay.span` 4048 color: var(--theme-palette-color-9); 4049`,P=c.Ay.div` 4050 display: flex; 4051 flex-direction: column; 4052 align-items: stretch; 4053 width: 100%; 4054 gap: 14px; 4055 position: relative; 4056`,O=c.Ay.div` 4057 display: flex; 4058 align-items: center; 4059 gap: 12px; 4060 @media only screen and (max-width: 560px) { 4061 flex-direction: column; 4062 align-items: stretch; 4063 gap: 6px; 4064 } 4065`,_=c.Ay.span` 4066 font-size: 10.5px; 4067 font-weight: 700; 4068 text-transform: uppercase; 4069 letter-spacing: 0.05em; 4070 color: var(--theme-palette-color-3); 4071 flex: 0 0 auto; 4072 min-width: 88px; 4073`,R=c.Ay.div` 4074 display: flex; 4075 align-items: center; 4076 justify-content: space-between; 4077 gap: 10px; 4078 flex-wrap: wrap; 4079`,j=c.Ay.label` 4080 display: inline-flex; 4081 align-items: center; 4082 gap: 8px; 4083 cursor: pointer; 4084 user-select: none; 4085 font-size: 12.5px; 4086 color: var(--theme-palette-color-3); 4087 input { 4088 position: absolute; 4089 opacity: 0; 4090 width: 0; 4091 height: 0; 4092 } 4093`,J=c.Ay.span` 4094 display: inline-flex; 4095 align-items: center; 4096 justify-content: center; 4097 width: 18px; 4098 height: 18px; 4099 flex-shrink: 0; 4100 border-radius: 4px; 4101 border: 1px solid var(--theme-palette-color-5); 4102 background: var(--theme-palette-color-7); 4103 color: transparent; 4104 transition: all 150ms ease; 4105 svg { 4106 display: block; 4107 } 4108 input:checked + & { 4109 background: var(--theme-palette-color-1); 4110 border-color: var(--theme-palette-color-1); 4111 color: var(--dotgg-on-accent, var(--theme-palette-color-8)); 4112 } 4113 input:focus-visible + & { 4114 box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-palette-color-1) 40%, transparent); 4115 } 4116`,B=c.Ay.button` 4117 background: none; 4118 border: none; 4119 padding: 0; 4120 cursor: pointer; 4121 font: inherit; 4122 font-size: inherit; 4123 color: var(--theme-palette-color-1); 4124 font-weight: 600; 4125 text-decoration: underline; 4126 text-underline-offset: 2px; 4127 &:hover { 4128 color: var(--theme-palette-color-2); 4129 } 4130`,K=c.Ay.textarea` 4131 width: 100%; 4132 min-height: 190px; 4133 padding: 12px 14px; 4134 font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; 4135 font-size: 12.5px; 4136 line-height: 1.55; 4137 border: 1px solid var(--theme-palette-color-5); 4138 border-radius: 6px; 4139 background-color: var(--theme-palette-color-7); 4140 color: var(--theme-palette-color-4); 4141 resize: vertical; 4142 4143 &::placeholder { 4144 color: var(--theme-palette-color-3); 4145 opacity: 0.6; 4146 } 4147 4148 &:focus { 4149 outline: none; 4150 border-color: var(--theme-palette-color-1); 4151 box-shadow: 0 0 0 1px var(--theme-palette-color-1); 4152 } 4153`,W=c.Ay.div` 4154 text-align: center; 4155 font-size: 12.5px; 4156 color: var(--theme-palette-color-3); 4157 &:empty { 4158 display: none; 4159 } 4160`,U=c.Ay.div` 4161 color: var(--theme-palette-color-9, #fca5a5); 4162`,Q=c.Ay.div` 4163 color: var(--theme-palette-color-12, #90f263); 4164`,G=c.Ay.div` 4165 display: flex; 4166 flex-direction: column; 4167 align-items: center; 4168 justify-content: center; 4169 gap: 8px; 4170 min-height: 180px; 4171 padding: 22px; 4172 text-align: center; 4173 border: 1.5px dashed 4174 ${e=>e.$highlight?"var(--theme-palette-color-1)":"var(--theme-palette-color-5)"}; 4175 border-radius: 6px; 4176 background: ${e=>e.$highlight?"color-mix(in srgb, var(--theme-palette-color-1) 7%, transparent)":"var(--theme-palette-color-7)"}; 4177 color: var(--theme-palette-color-3); 4178 cursor: pointer; 4179 transition: all 150ms ease; 4180 &:hover { 4181 border-color: var(--theme-palette-color-3); 4182 color: var(--theme-palette-color-4); 4183 } 4184`,H=c.Ay.span` 4185 display: inline-flex; 4186 align-items: center; 4187 justify-content: center; 4188 width: 46px; 4189 height: 46px; 4190 border-radius: 50%; 4191 background: var(--theme-palette-color-8); 4192 border: 1px solid var(--theme-palette-color-5); 4193 color: var(--theme-palette-color-1); 4194`,q=c.Ay.span` 4195 font-size: 14px; 4196 font-weight: 600; 4197 color: var(--theme-palette-color-4); 4198`,V=c.Ay.span` 4199 font-size: 12px; 4200 color: var(--theme-palette-color-3); 4201`,X=c.Ay.span` 4202 margin-top: 4px; 4203 font-size: 11px; 4204 color: var(--theme-palette-color-3); 4205 line-height: 1.5; 4206 white-space: pre-line; 4207 b { 4208 color: var(--theme-palette-color-4); 4209 font-weight: 600; 4210 } 4211`,Z=c.Ay.div` 4212 position: fixed; 4213 inset: 0; 4214 background-color: rgba(0, 0, 0, 0.65); 4215 display: flex; 4216 align-items: center; 4217 justify-content: center; 4218 padding: 16px; 4219 z-index: 100; 4220`,ee=c.Ay.div` 4221 max-width: 420px; 4222 background-color: var(--theme-palette-color-7); 4223 border: 1px solid color-mix(in srgb, var(--theme-palette-color-9, #dc2626) 50%, transparent); 4224 border-radius: 8px; 4225 padding: 18px 20px; 4226 box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); 4227`,te=c.Ay.div` 4228 display: flex; 4229 align-items: center; 4230 gap: 10px; 4231 margin-bottom: 10px; 4232 h3 { 4233 margin: 0; 4234 font-size: 15px; 4235 font-weight: 700; 4236 color: var(--theme-palette-color-4); 4237 } 4238`,ne=c.Ay.span` 4239 display: inline-flex; 4240 align-items: center; 4241 justify-content: center; 4242 width: 30px; 4243 height: 30px; 4244 flex-shrink: 0; 4245 border-radius: 6px; 4246 background: color-mix(in srgb, var(--theme-palette-color-9, #dc2626) 14%, transparent); 4247 border: 1px solid color-mix(in srgb, var(--theme-palette-color-9, #dc2626) 40%, transparent); 4248 color: var(--theme-palette-color-9, #fca5a5); 4249`,re=c.Ay.p` 4250 color: var(--theme-palette-color-3); 4251 font-size: 13px; 4252 line-height: 1.55; 4253 margin: 0 0 16px; 4254 strong { 4255 color: var(--theme-palette-color-4); 4256 } 4257`,oe=c.Ay.div` 4258 display: flex; 4259 gap: 8px; 4260 justify-content: flex-end; 4261 flex-wrap: wrap; 4262`;var ie=n(79407),ae=n(87109),le=n(74079);const se=({binders:e,value:t,onChange:n,label:o="Import into",hideMain:i=!1})=>{if(0===e.length)return null;const a=[...i?[]:[{value:String(0),label:"Main collection"}],...e.map(e=>({value:String(e.id),label:e.name}))],l=a.find(e=>e.value===String(t));return(0,r.FD)(O,{children:[(0,r.Y)(_,{children:o}),(0,r.Y)("div",{style:{flex:1,minWidth:0},children:(0,r.Y)(ie.R,{value:l,options:a,onChange:e=>{const t=Array.isArray(e)?e[0]:e;t&&n(Number(t.value))},formatOptionLabel:t=>{return(0,r.FD)("span",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[(0,r.Y)("span",{style:{width:11,height:11,borderRadius:"50%",flexShrink:0,background:(n=String(t.value),n===String(0)?"var(--theme-palette-color-5)":(0,le.Zr)(e.find(e=>String(e.id)===n)?.color)),boxShadow:"0 0 0 1px var(--theme-palette-color-5)"}}),t.label]});var n},isSearchable:!1,bordered:!0,width:"100%"})})]})},de=[{id:"add",icon:(0,r.Y)(i.uI,{size:15}),title:"Add to my collection",description:"Quantities in the import are added on top of what you already own. Import 1 of a card you have 3 of â you'll have 4."},{id:"set",icon:(0,r.Y)(i.H4,{size:15}),title:"Set exact quantities (sync)",description:"For each card in the import, set the amount to exactly that value. Cards not in the import are left untouched. Matches a DotGG export â good for syncing another tracker."},{id:"wipe",icon:(0,r.Y)(i.E,{size:15}),title:"Replace entire collection",description:"Delete your whole collection for this game first, then import. This cannot be undone.",danger:!0}],ce=({mode:e,onChange:t,allowWipe:n=!0}
4262)=>{const o=n?de:de.filter(e=>"wipe"!==e.id);return(0,r.FD)(pe,{children:[(0,r.Y)(he,{children:"How should this import be applied?"}),o.map(n=>{const o=e===n.id,i=Boolean(n.danger);return(0,r.FD)(ge,{$selected:o,$danger:i,children:[(0,r.Y)("input",{type:"radio",name:"import-mode",value:n.id,checked:o,onChange:()=>t(n.id)}),(0,r.Y)(me,{$on:o,$danger:i}),(0,r.Y)(fe,{$on:o,$danger:i,children:n.icon}),(0,r.FD)(xe,{children:[(0,r.Y)(ve,{children:n.title}),(0,r.Y)(ye,{children:n.description})]})]},n.id)})]})},pe=c.Ay.fieldset` 4263 border: none; 4264 margin: 0; 4265 padding: 0; 4266 display: flex; 4267 flex-direction: column; 4268 gap: 8px; 4269`,he=c.Ay.legend` 4270 padding: 0; 4271 margin-bottom: 6px; 4272 font-size: 13px; 4273 font-weight: 700; 4274 color: var(--theme-palette-color-4); 4275`,ue="var(--theme-palette-color-9, #dc2626)",ge=c.Ay.label` 4276 display: flex; 4277 gap: 12px; 4278 align-items: flex-start; 4279 padding: 12px 14px; 4280 border-radius: 6px; 4281 cursor: pointer; 4282 background-color: ${e=>e.$selected?e.$danger?`color-mix(in srgb, ${ue} 8%, transparent)`:"color-mix(in srgb, var(--theme-palette-color-1) 8%, transparent)":"var(--theme-palette-color-7)"}; 4283 border: 1px solid 4284 ${e=>e.$selected?e.$danger?ue:"var(--theme-palette-color-1)":"var(--theme-palette-color-5)"}; 4285 transition: all 150ms ease; 4286 &:hover { 4287 border-color: ${e=>e.$selected?e.$danger?ue:"var(--theme-palette-color-1)":"var(--theme-palette-color-3)"}; 4288 } 4289 4290 input[type="radio"] { 4291 position: absolute; 4292 opacity: 0; 4293 width: 0; 4294 height: 0; 4295 } 4296`,me=c.Ay.span` 4297 width: 18px; 4298 height: 18px; 4299 border-radius: 50%; 4300 flex-shrink: 0;
4301 margin-top: 1px; 4302 border: 2px solid 4303 ${e=>e.$on?e.$danger?ue:"var(--theme-palette-color-1)":"var(--theme-palette-color-5)"}; 4304 background: var(--theme-palette-color-8); 4305 display: inline-flex; 4306 align-items: center; 4307 justify-content: center; 4308 transition: all 150ms ease; 4309 &::after { 4310 content: ""; 4311 width: 8px; 4312 height: 8px; 4313 border-radius: 50%; 4314 background: ${e=>e.$danger?ue:"var(--theme-palette-color-1)"}; 4315 transform: scale(${e=>e.$on?1:0}); 4316 transition: transform 150ms ease; 4317 } 4318 input:focus-visible + & { 4319 box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-palette-color-1) 40%, transparent); 4320 } 4321`,fe=c.Ay.span` 4322 display: inline-flex; 4323 align-items: center; 4324 justify-content: center; 4325 width: 30px; 4326 height: 30px; 4327 flex-shrink: 0; 4328 border-radius: 4px; 4329 background: var(--theme-palette-color-8); 4330 border: 1px solid 4331 ${e=>e.$on?`color-mix(in srgb, ${e.$danger?ue:"var(--theme-palette-color-1)"} 40%, transparent)`:"var(--theme-palette-color-5)"}; 4332 color: ${e=>e.$on?e.$danger?ue:"var(--theme-palette-color-1)":"var(--theme-palette-color-3)"}; 4333 transition: all 150ms ease; 4334 svg { 4335 display: block; 4336 } 4337`,xe=c.Ay.div` 4338 display: flex; 4339 flex-direction: column; 4340 gap: 3px; 4341 min-width: 0; 4342`,ve=c.Ay.div` 4343 font-size: 13px; 4344 font-weight: 700; 4345 color: var(--theme-palette-color-4); 4346 user-select: none; 4347`,ye=c.Ay.div` 4348 font-size: 12px; 4349 line-height: 1.4; 4350 color: var(--theme-palette-color-3); 4351 user-select: none; 4352`;var we=n(51900),be=n(86031),$e=n(28297);const ke=({checked:e,onChange:t,children:n})=>(0,r.FD)(j,{children:[(0,r.Y)("input",{type:"checkbox",checked:e,onChange:e=>t(e.currentTarget.checked)}),(0,r.Y)(J,{children:(0,r.Y)(i.iW,{size:12})}),(0,r.Y)("span",{children:n})]});function Ye(e,t){return"preview"===e?(0,r.FD)(r.FK,{children:["Review the parsed cards, then import into ",(0,r.Y)("b",{children:t}),"."]}):"paste"===e?(0,r.FD)(r.FK,{children:["One card per line. Toggle ",(0,r.Y)("b",{children:"Deck format"})," for ",(0,r.Y)("code",{children:"3 Card Name (CARD-ID)"}),"."]}):(0,r.Y)(r.FK,{children:"CSV or plain-text exports up to 2 MB. The import starts when you pick a file."})}function Ae({step:e,importMode:t,targetName:n,canPreview:o,onCancel:a,onBack:l,onConfirm:s,onPreview:d}){return"preview"===e?(0,r.FD)(we.tA,{children:[(0,r.Y)($e.IX,{onClick:l,children:"Back"}),"wipe"===t?(0,r.FD)($e.cz,{onClick:s,children:[(0,r.Y)(i.E,{size:14}),(0,r.Y)("span",{children:"Replace & import"})]}):(0,r.FD)($e.pp,{onClick:s,children:[(0,r.Y)(i.iW,{size:14}),(0,r.FD)("span",{children:["Import to ",n]})]})]}):"paste"===e?(0,r.FD)(we.tA,{children:[(0,r.Y)($e.IX,{onClick:a,children:"Cancel"}),(0,r.Y)($e.pp,{onClick:d,disabled:!o,children:"Preview"})]}):(0,r.Y)(we.tA,{children:(0,r.Y)($e.IX,{onClick:a,children:"Cancel"})})}function Ce({onFile:e,onSwitchToPaste:t}){const[n,a]=o.Ay.useState(!1),l=o.Ay.useRef(null),s=(e,t)=>{e.stopPropagation(),a(t)};return(0,r.FD)(r.FK,{children:[(0,r.Y)("input",{type:"file",ref:l,style:{display:"none"},onChange:t=>e(t.currentTarget.files?.[0]),accept:".csv,.txt"}),(0,r.FD)(G,{onDragEnter:e=>s(e,!0),onDragOver:e=>{e.stopPropagation(),e.preventDefault()},onDragLeave:e=>s(e,!1),onDrop:t=>{t.preventDefault(),s(t,!1),e(t.dataTransfer?.files?.[0])},$highlight:n,onClick:()=>l.current?.click(),children:[(0,r.Y)(H,{children:(0,r.Y)(i.VU,{size:22})}),(0,r.Y)(q,{children:"Drag & drop a CSV, or click to browse"}),(0,r.FD)(V,{children:["Or"," ",(0,r.Y)(B,{onClick:e=>{e.stopPropagation(),t()},children:"paste text"})," ","instead."]}),be.SA.collection.collectionImportMessage&&(0,r.Y)(X,{children:be.SA.collection.collectionImportMessage})]})]})}var Fe=n(33530),De=n(91181);function Se({binderName:e,onCancel:t,onConfirm:n}){const o=e?`binder â${e}â`:"your main collection";return(0,r.Y)(Z,{children:(0,r.FD)(ee,{role:"alertdialog","aria-label":"Confirm replace",children:[(0,r.FD)(te,{children:[(0,r.Y)(ne,{children:(0,r.Y)(i.E,{size:15})}),(0,r.Y)("h3",{children:e?`Empty binder â${e}â?`:"Delete entire collection?"})]}),(0,r.FD)(re,{children:["You are about to ",(0,r.Y)("strong",{children:"permanently delete ALL cards"})," from ",o," and replace them with the imported data.",e?(0,r.Y)(r.FK,{children:" Your main collection is not affected."}):null," ","This action ",(0,r.Y)("strong",{children:"cannot be undone"}),"."]}),(0,r.FD)(oe,{children:[(0,r.Y)($e.IX,{onClick:t,children:"Cancel"}),(0,r.Y)($e.cz,{onClick:n,children:"Yes, delete & replace"})]})]})})}var Ie=n(90023),ze=n(81616);const Te=[{value:"file",label:"File upload",icon:(0,r.Y)(i.VU,{size:14})},{value:"paste",label:"Paste text",icon:(0,r.Y)(i.g6,{size:14})}];function Ee({show:e,onClose:t}
4352){const[n,a]=o.Ay.useState(null),[l,c]=o.Ay.useState(""),[p,h]=o.Ay.useState(!1),[u,g]=o.Ay.useState(!1),[m,f]=o.Ay.useState("add"),[x,v]=o.Ay.useState(null),[y,w]=o.Ay.useState(!1),[b,$]=o.Ay.useState(!0),k=function(){const e=(0,De.Yx)(),[t,n]=(0,o.J0)("input"),[r,i]=(0,o.J0)([]),[a,l]=(0,o.J0)([]),[c,p]=(0,o.J0)(null),h=(0,o.li)(""),u=(0,o.hb)(()=>{n("input"),i([]),l([]),p(null),h.current=""},[]),g=(0,o.hb)(()=>n("input"),[]),m=(0,o.hb)(async(t,r)=>{if(!t.trim())return p("Enter some card data first."),"empty";if(!(be.SA.decks.serverSideCardsLibrary||e&&0!==e.length))return p("Card data is still loading â try again in a moment."),"loading";const o=S(s.Ay.TheGame,t,e??[],r);if(0===o.matched.length&&0===o.unmatched.length)return"no_cards";const a=await async function(e){if(!be.SA.decks.serverSideCardsLibrary)return e;const t=e.unmatched.map(e=>e.keys?.name??"").filter(e=>""!==e);return 0===t.length?e:(await(0,Fe.rQ)(t),function(e,t){if(0===e.unmatched.length)return e;const n=Y(t),r=new Map;e.matched.forEach(e=>D(r,e));const o=[];return e.unmatched.forEach(e=>{const t=e.keys?C(e.keys,n):void 0;t?D(r,{cardId:t.id,standard:e.standard,foil:e.foil,identifier:e.identifier}):o.push(e)}),{matched:Array.from(r.values()),unmatched:o}}(e,De.jb.getStateOrElse([])))}(o);return h.current||(h.current="Pasted text"),i(a.matched),l(a.unmatched),p(null),n("preview"),"ok"},[e]),f=(0,o.hb)(async e=>{const t=await e.text();return h.current=e.name,m(t,!1)},[m]),x=(0,o.hb)(async(e,t,n,r)=>{const o=new File([new Blob([e],{type:"text/csv"})],"import.csv",{type:"text/csv"}),i=new FormData;return i.append("file",o),t&&i.append("deckFormat","1"),i.append("textManualImport","1"),i.append("importMode",n),i.append("label","Pasted text"),r>0&&i.append("binder_id",String(r)),d(i)},[]),v=(0,o.hb)((e,t)=>{i(n=>n.map((n,r)=>r===e?{...n,...t}:n))},[]),y=(0,o.hb)(e=>{i(t=>t.filter((t,n)=>n!==e))},[]),w=(0,o.hb)((e,t)=>{const n=a[e];n&&(i(e=>e.find(e=>e.cardId===t.id)?e.map(e=>e.cardId===t.id?{...e,standard:e.standard+n.standard,foil:e.foil+n.foil}:e):[...e,{cardId:t.id,standard:n.standard,foil:n.foil,identifier:n.identifier}]),l(t=>t.filter((t,n)=>n!==e)))},[a]),b=(0,o.hb)(e=>{l(t=>t.filter((t,n)=>n!==e))},[]),$=(0,o.hb)(async(e,t)=>{const n=r.filter(e=>e.standard>0||e.foil>0).map(e=>({cardId:e.cardId,standard:e.standard,foil:e.foil}));if(0===n.length)return"error:no_cards";const o=new FormData;return o.append("resolved",JSON.stringify(n)),o.append("importMode",e),o.append("label",h.current||"Import"),t>0&&o.append("binder_id",String(t)),d(o)},[r]);return{cards:e??[],step:t,matched:r,unmatched:a,error:c,setError:p,preview:m,previewFile:f,confirm:$,legacyUpload:x,back:g,reset:u,updateMatched:v,removeMatched:y,resolveUnmatched:w,dismissUnmatched:b}}(),A=(0,ze.h3)(),F=(A?.binders??[]).filter(e=>"custom"===e.type),[I,T]=o.Ay.useState(()=>(0,ae.KJ)()),E=0===I||F.some(e=>e.id===I)?I:0,L=e=>{"ok"===e?(E>0&&(0,ae.Yx)(E),a((0,r.Y)(Q,{children:"Collection imported! Redirectingâ¦"})),setTimeout(()=>{t(),window.location.reload()},1500)):a("error:no_cards"===e?(0,r.Y)(U,{children:"No valid cards found in the import data."}):"error:no_handler"===e?(0,r.Y)(U,{children:"This game doesn't support collection imports yet."}):"error:not_logged_in"===e?(0,r.Y)(U,{children:"You need to be logged in to import a collection."}):(0,r.Y)(U,{children:"Import failed. Please try again."}))},M=e=>{const t=new FormData;t.append("file",e),t.append("importMode",m),E>0&&t.append("binder_id",String(E)),a((0,r.Y)("div",{children:"Processing your importâ¦"})),d(t).then(L).catch(()=>L("error"))},N=()=>{a((0,r.Y)("div",{children:"Processing your importâ¦"})),k.confirm(m,E).then(L).catch(()=>L("error"))},j=e=>{g(e),a(null),k.reset(),e&&"wipe"===m&&f("add")},J=()=>{c(""),g(!1),h(!1),f("add"),v(null),w(!1),a(null),k.reset(),t()};if(!e)return null;const B=E>0?F.find(e=>e.id===E)?.name??"Binder":"Collection",G="preview"===k.step;return(0,r.Y)(we.qp,{headerIcon:(0,r.Y)(i.i8,{size:16}),header:"Import collection",subtitle:"Bring cards in from a CSV, another tracker, or a deck list.",show:!0,width:720,onClose:J,footHint:Ye(G?"preview":u?"paste":"file",B),footer:(0,r.Y)(Ae,{step:G?"preview":u?"paste":"file",importMode:m,targetName:B,canPreview:Boolean(l.trim()),onCancel:J,onBack:()=>{k.back(),v(null)},onConfirm:()=>{"wipe"!==m?N():w(!0)},onPreview:()=>{(async()=>{let e;a((0,r.Y)("div",{children:"Matching your cardsâ¦"}));try{e=await k.preview(l,p)}catch{e="no_cards"}"no_cards"===e?(a((0,r.Y)("div",{children:"Processing your importâ¦"})),k.legacyUpload(l,p,m,E).then(L).catch(()=>L("error"))):a(null)})()}}),children:(0,r.FD)(P,{children:[y&&(0,r.Y)(Se,{binderName:E>0?B:void 0,onCancel:()=>{v(null),w(!1),a(null)},onConfirm:()=>{x?M(x):N(),v(null),w(!1)}}),!G&&(0,r.FD)(O,{children:[(0,r.Y)(_,{children:"Source"}),(0,r.Y)(Ie.$,{options:Te,value:u?"paste":"file",onChange:e=>j("paste"===e),ariaLabel:"Import source"})]}),(0,r.Y)(se,{binders:F,value:E,onChange:T}
4352),(0,r.Y)(ce,{mode:m,onChange:f,allowWipe:!u}),G?(0,r.Y)(z,{matched:k.matched,unmatched:k.unmatched,cards:k.cards,onUpdateMatched:k.updateMatched,onRemoveMatched:k.removeMatched,onResolveUnmatched:k.resolveUnmatched,onDismissUnmatched:k.dismissUnmatched}):u?(0,r.FD)(r.FK,{children:[(0,r.Y)(R,{children:(0,r.Y)(ke,{checked:p,onChange:h,children:'Deck format â "3 Card Name (CARD-ID)"'})}),(0,r.Y)(K,{placeholder:p?"Paste deck list here:\n3 Card Name (CARD-ID)\n1 Another Card (CARD-ID2)\n...":"Paste CSV data here:\nCardId,Normal,Foil,Name,Set\nCARD-001,1,0,Card Name,Set Name\n...",value:l,onChange:e=>c(e.currentTarget.value)})]}):(0,r.FD)(r.FK,{children:[(0,r.Y)(R,{children:(0,r.Y)(ke,{checked:b,onChange:$,children:"Preview before importing"})}),(0,r.Y)(Ce,{onFile:e=>{(async e=>{if(e)if(e.size>=2097152)a((0,r.Y)(U,{children:"Filesize is too big, max is 2MB"}));else if(["text/csv","text/plain"].includes(e.type)||e.name.endsWith(".csv"))if(b){a((0,r.Y)("div",{children:"Parsing fileâ¦"}));try{"no_cards"===await k.previewFile(e)?M(e):a(null)}catch{M(e)}}else{if("wipe"===m)return v(e),void w(!0);M(e)}else a((0,r.Y)(U,{children:"Format is not supported. CSV or text files only"}))})(e)},onSwitchToPaste:()=>j(!0)})]}),(0,r.Y)(W,{children:!G&&u&&k.error?(0,r.Y)(U,{children:k.error}):n})]})})}var Le=n(52754);const Me=({as:e="toolbar"})=>{const[t,n]=o.Ay.useState(!1);return(0,r.FD)(r.FK,{children:[(0,r.Y)(Le.vj,{as:e,icon:(0,r.Y)(i.nr,{size:13}),label:"Import",hint:"A file, a list, or another site",title:"Import Collection",onClick:()=>n(!0)}),(0,r.Y)(Ee,{show:t,onClose:()=>n(!1)})]})},Ne=({as:e="toolbar"})=>be.SA.collection.collectionExportEnable?(0,r.Y)(Le.vj,{as:e,icon:(0,r.Y)(i.i8,{size:13}),label:"Export",hint:"Download your collection as a CSV",title:"Export Collection",onClick:()=>{(async()=>{if((0,a.x3)())try{const e=(0,ae.KJ)(),t=e>0?`&binder_id=${e}`:"",n=await fetch(`https://api.dotgg.gg/cgfw/exportcollection?game=${s.Ay.TheGame}${t}`,{headers:(0,a.z5)()}),r=await n.text();if(!n.ok||!(n.headers.get("content-type")||"").includes("csv"))return void alert(r.trim()||"Could not export your collection. Please try again.");const o=URL.createObjectURL(new Blob([r],{type:"text/csv"})),i=document.createElement("a");i.href=o,i.download="collection.csv",document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o)}catch{alert("Could not export your collection. Please try again.")}else alert("Please log in to export your collection.")})()}}):null},96576(e,t,n){n.d(t,{H:()=>p});var r=n(10201),o=n(17402),i=n(51533),a=n(26983),l=n(23244),s=n(87109),d=n(81616);const c=({cardId:e,element:t,owned:n,onClose:c,onUpdate:p})=>{const[h,u]=(0,o.J0)(()=>(0,a.Io)(t,n)),g=(0,o.li)(null);(0,o.vJ)(()=>{const e=e=>{const t=e.target;g.current&&t instanceof Node&&!g.current.contains(t)&&c()},t=e=>{"Escape"===e.key&&c()};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[c]);const m=Object.keys(h).reduce((e,t)=>e+(h[t]??0),0),f=Math.max(0,n-m),x=(0,o.hb)((r,o)=>{const l=(0,a.m4)(h,r,o,n);u(l);const c=(0,a.ET)(t?.extra_data,l),g=!!window.DotGGUser&&0!==(0,s.KJ)();g||function(e,t){const n=d.Ab.getState().get();n?.collection&&d.Ab.updateState({...n,collection:n.collection.map(n=>n.card===e?{...n,extra_data:t}:n)})}(e,c);const m=g?Number(t?.standard)||0:void 0;(0,i.s)(e,"standard",m,{extra:c}).then(()=>{g&&(0,s.XY)()}),p()},[h,n,t?.extra_data,t?.standard,e,p]),v=(0,a.ce)().filter(e=>"en"!==e.code);return(0,r.FD)(l.av,{ref:g,onClick:e=>e.stopPropagation(),children:[(0,r.FD)(l.ED,{children:[(0,r.Y)("span",{children:"Languages"}),(0,r.FD)("span",{children:[n," owned"]})]}),v.map(e=>{const t=h[e.code]??0;return(0,r.FD)(l.lB,{$on:t>0,children:[(0,r.Y)("b",{children:e.short}),(0,r.Y)("span",{children:e.label}),(0,r.FD)(l.oc,{children:[(0,r.Y)("button",{type:"button","aria-label":`One fewer ${e.label}`,disabled:t<=0,onClick:()=>x(e.code,t-1),children:"â"}),(0,r.Y)("input",{type:"text",inputMode:"numeric","aria-label":`${e.label} copies`,value:String(t),onChange:t=>x(e.code,parseInt(t.currentTarget.value,10)||0)}),(0,r.Y)("button",{type:"button","aria-label":`One more ${e.label}`,disabled:f<=0,onClick:()=>x(e.code,t+1),children:"+"})]})]},e.code)}),(0,r.FD)(l.gJ,{children:[(0,r.Y)("span",{children:(0,a.VZ)("en")?.label??"English"}),(0,r.Y)("b",{children:f})]}),(0,r.Y)(l.Cc,{children:"Anything you don't mark counts as English."})]})},p=({cardId:e,element:t,alien:n=!1})=>{const[i,s]=(0,o.J0)(!1),d=(0,a.Pi)(t),p=void 0!==(0,a.Tf)(),h=(0,o.Kr)(()=>p&&(0,a.IZ)(t,d)?(0,a.Kf)(t,d):[],[p,t,d]);if(!p)return null;const u=h.slice(0,2),g=h.slice(2),m=!n&&(0,a.O6)()&&d>0;return(0,r.FD)(l.PK,{$editing:i,children:[u.length>0&&(0,r.FD)(l.cN,{$clickable:m,title:m?"Languages you own â click to edit":h.map(e=>`${e.label} Ã${e.count}`).join(", "),onClick:m?()=>s(e=>!e):void 0,children:[u.map(e=>(0,r.FD)(l.jE,{children:[e.short,(0,r.FD)("b",{children:["Ã",e.count]})]},e.code)),g.length>0&&(0,r.FD)(l.vk,{title:g.map(e=>`${e.label} Ã${e.count}`).join(", "),children:["+",g.length]})]}),0===u.length&&m&&(0,r.Y)(l.g$,{type:"button",title:"Set which languages you own",onClick:()=>s(!0),children:"+ Lang"}),i&&m&&(0,r.Y)(c,{cardId:e,element:t,owned:d,onClose:()=>s(!1),onUpdate:()=>s(!0)})]})}},26983(e,t,n){n.d(t,{ET:()=>y,IZ:()=>f,Io:()=>g,Kf:()=>m,O6:()=>h,Pi:()=>u,Tf:()=>d,VZ:()=>s,ce:()=>c,lx:()=>p,m4:()=>v,zn:()=>x});var r=n(65562),o=n(86031);const i="en",a=[{code:"en",label:"English",short:"EN"},{code:"ja",label:"Japanese",short:"JA"},{code:"kr",label:"Korean",short:"KO"},{code:"cn",label:"Chinese (Trad.)",short:"ZH"},{code:"zhcn",label:"Chinese (Simpl.)",short:"ZHS"},{code:"fr",label:"French",short:"FR"},{code:"de",label:"German",short:"DE"}
4352,{code:"it",label:"Italian",short:"IT"},{code:"es",label:"Spanish",short:"ES"},{code:"es419",label:"Spanish (LatAm)",short:"LAS"},{code:"br",label:"Portuguese (BR)",short:"PT"},{code:"idid",label:"Indonesian",short:"ID"}],l=new Map(a.map(e=>[e.code,e]));function s(e){return l.get(e)}function d(){return o.SA.collection.cardLanguages}function c(){const e=d();return e?a.filter(t=>e.codes.includes(t.code)):[]}function p(){const e=d();return e?a.filter(t=>t.code===i||e.codes.includes(t.code)):[]}function h(){return"manual"===d()?.source}function u(e){if(!e)return 0;const t=Number(e.total);return Number.isFinite(t)&&t>0?t:(Number(e.standard)||0)+(Number(e.foil)||0)}function g(e,t){const n=(0,r.Ui)(e?.extra_data)?.lang;if(!n||"object"!=typeof n)return{};const o={};let l=Math.max(0,t);for(const e of a){if(e.code===i)continue;const t=Math.floor(Number(n[e.code])||0);if(t<=0)continue;const r=Math.min(t,l);if(r<=0)break;o[e.code]=r,l-=r}return o}function m(e,t){const n=g(e,t),r=[];let o=0;for(const e of a){if(e.code===i)continue;const t=n[e.code]??0;t>0&&(r.push({...e,count:t}),o+=t)}const s=Math.max(0,t-o);if(s>0){const e=l.get(i);e&&r.push({...e,count:s})}return r}function f(e,t){for(const n in g(e,t))return!0;return!1}function x(e,t,n){const r=g(e,t);if(n!==i)return r[n]??0;let o=0;for(const e in r)o+=r[e]??0;return Math.max(0,t-o)}function v(e,t,n,r){const o={...e};delete o[i];let a=0;for(const e in o)e!==t&&(a+=o[e]??0);const l=Math.max(0,r-a),s=Math.max(0,Math.min(Number.isFinite(n)?Math.floor(n):0,l));return s<=0?delete o[t]:o[t]=s,o}function y(e,t){const n={...(0,r.Ui)(e)??{}};let o=!1;for(const e in t){o=!0;break}return o?n.lang=t:delete n.lang,n}n.d(t,["hF",0,a])},23244(e,t,n){var r=n(63679),o=n(69143);const i=r.Ay.div` 4353 display: flex; 4354 align-items: center; 4355 gap: 4px; 4356 flex-wrap: wrap; 4357 cursor: ${e=>e.$clickable?"pointer":"default"}; 4358`,a="\n display: inline-flex;\n align-items: center;\n gap: 3px;\n padding: 1px 6px;\n border-radius: 3px;\n font-size: 11px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.025em;\n line-height: 1.3;\n white-space: nowrap;\n user-select: none;\n",l=r.Ay.span` 4359 ${a} 4360 background: var(--theme-palette-color-6); 4361 border: 1px solid var(--theme-palette-color-5); 4362 color: var(--theme-palette-color-4); 4363 transition: border-color 0.2s ease; 4364 4365 b { 4366 font-weight: 700; 4367 color: var(--theme-palette-color-1); 4368 } 4369 4370 &:hover { 4371 border-color: var(--theme-palette-color-1); 4372 } 4373`,s=r.Ay.span` 4374 ${a} 4375 background: var(--theme-palette-color-6); 4376 border: 1px solid var(--theme-palette-color-5); 4377 color: var(--theme-palette-color-3); 4378`,d=r.Ay.button` 4379 ${a} 4380 background: var(--theme-palette-color-6); 4381 border: 1px dashed var(--theme-palette-color-5); 4382 color: var(--theme-palette-color-3); 4383 font-family: inherit; 4384 cursor: pointer; 4385 opacity: 0; 4386 transition: 4387 opacity 150ms ease, 4388 border-color 150ms ease, 4389 color 150ms ease; 4390 4391 &:hover, 4392 &:focus-visible { 4393 opacity: 1; 4394 border-color: var(--theme-palette-color-1); 4395 color: var(--theme-palette-color-4); 4396 } 4397 4398 /* No hover to reveal it on touch, so it is simply always there. Hiding it 4399 would make the feature unreachable on a phone. */ 4400 @media (hover: none) and (pointer: coarse) { 4401 opacity: 1; 4402 } 4403`,c=r.Ay.div` 4404 display: flex; 4405 align-items: center; 4406 gap: 4px; 4407 flex-wrap: wrap; 4408 min-height: 18px; 4409 margin-top: 6px; 4410 position: relative; 4411 4412 ${o.QH}:hover + &, 4413 &:hover, 4414 &:focus-within { 4415 ${d} { 4416 opacity: 1; 4417 } 4418 } 4419 4420 ${e=>e.$editing?`${d} { opacity: 1; }`:""} 4421`,p=r.Ay.div` 4422 position: absolute; 4423 left: 0; 4424 top: calc(100% + 4px); 4425 width: 236px; 4426 box-sizing: border-box; 4427 z-index: 1000; 4428 background: rgba(0, 0, 0, 0.72); 4429 backdrop-filter: blur(8px); 4430 -webkit-backdrop-filter: blur(8px); 4431 border: 1px solid var(--theme-palette-color-5); 4432 border-radius: 8px; 4433 padding: 8px; 4434 box-shadow: 4435 0 8px 16px rgba(0, 0, 0, 0.15), 4436 0 4px 6px rgba(0, 0, 0, 0.1); 4437 display: flex; 4438 flex-direction: column; 4439 gap: 6px; 4440`,h=r.Ay.div` 4441 display: flex; 4442 align-items: baseline; 4443 justify-content: space-between; 4444 gap: 6px; 4445 padding: 0 2px; 4446 font-size: 10px; 4447 font-weight: 700; 4448 text-transform: uppercase; 4449 letter-spacing: 0.04em; 4450 color: var(--theme-palette-color-3); 4451`,u=r.Ay.div` 4452 display: flex; 4453 align-items: center; 4454 gap: 6px; 4455 padding: 1px 2px; 4456 border-radius: 4px; 4457 background: ${e=>e.$on?"var(--theme-palette-color-5)":"transparent"}; 4458 4459 > b { 4460 width: 26px; 4461 flex-shrink: 0; 4462 font-family: ui-monospace, Menlo, Consolas, monospace; 4463 font-size: 10.5px; 4464 font-weight: 700; 4465 color: ${e=>e.$on?"var(--theme-palette-color-1)":"var(--theme-palette-color-3)"}; 4466 } 4467 4468 > span { 4469 flex: 1; 4470 min-width: 0; 4471 font-size: 11px; 4472 line-height: 1.2; 4473 overflow: hidden; 4474 text-overflow: ellipsis; 4475 white-space: nowrap; 4476 color: ${e=>e.$on?"var(--theme-palette-color-4)":"var(--theme-palette-color-3)"}; 4477 } 4478`,g=r.Ay.div` 4479 display: flex; 4480 align-items: center; 4481 justify-content: space-between; 4482 gap: 2px; 4483 width: 74px; 4484 flex-shrink: 0; 4485 4486 button { 4487 display: flex; 4488 align-items: center; 4489 justify-content: center; 4490 width: 18px; 4491 height: 18px; 4492 flex-shrink: 0; 4493 background: var(--theme-palette-color-6); 4494 border: none; 4495 border-radius: 3px; 4496 padding: 0; 4497 color: var(--theme-palette-color-3); 4498 cursor: pointer; 4499 transition: all 150ms ease; 4500 } 4501 4502 button:hover:not(:disabled) { 4503 color: var(--theme-palette-color-4); 4504 background: var(--theme-palette-color-5); 4505 } 4506 4507 button:disabled { 4508 opacity: 0.35; 4509 cursor: default; 4510 } 4511 4512 input { 4513 flex: 1; 4514 min-width: 0; 4515 height: 20px; 4516 text-align: center; 4517 background: none; 4518 border: none; 4519 outline: none; 4520 border-radius: 3px; 4521 padding: 0; 4522 margin: 0; 4523 font-family: inherit; 4524 font-size: 12.5px; 4525 font-weight: 700; 4526 color: var(--theme-palette-color-4); 4527 } 4528 4529 input:focus { 4530 background: var(--theme-palette-color-6); 4531 box-shadow: 0 0 0 1px var(--theme-palette-color-1); 4532 } 4533`,m=r.Ay.div` 4534 display: flex; 4535 align-items: center; 4536 justify-content: space-between; 4537 gap: 6px; 4538 padding: 4px 2px 0; 4539 border-top: 1px solid var(--theme-palette-color-5); 4540 font-size: 10.5px; 4541 color: var(--theme-palette-color-3); 4542 4543 b { 4544 font-weight: 700; 4545 font-variant-numeric: tabular-nums; 4546 color: var(--theme-palette-color-4); 4547 } 4548`,f=r.Ay.div` 4549 font-size: 10px; 4550 line-height: 1.4; 4551 color: var(--theme-palette-color-3); 4552 padding: 0 2px; 4553 opacity: 0.8; 4554`;n.d(t,["Cc",0,f,"ED",0,h,"PK",0,c,"av",0,p,"cN",0,i,"g$",0,d,"gJ",0,m,"jE",0,l,"lB",0,u,"oc",0,g,"vk",0,s])}
4554,51940(e,t,n){var r=n(10201),o=n(70213);const i={trade:{icon:e=>(0,r.Y)(o.Qi,{size:e}),button:"Trade Surplus",buttonTitle:"Keep a set number of copies of each filtered card and put the rest on your trade list",header:"Trade my surplus",subtitle:"Keep the copies you want. The spares go on your trade list.",listName:"trade list",nLabel:"Keep",nMin:0,tail:"â list the rest for trade.",rest:"list the rest for trade",goTo:"go on your trade list",orderLabel:"Trade",orderTitles:{base:"Keep the alt arts",alt:"Keep the base art"},poolTitles:e=>({each:`Keep ${e} of every printing on its own â a card's alt art is only touched if you filtered it in`,pool:`Keep ${e} across base art + alt arts combined, and trade whatever is over`}),guarantees:e=>[{pre:"Cards you own",b:`${e} or fewer copies`,post:" of are left alone."},{pre:"A card already on your trade list is",b:"never taken off it",post:"."}],columnListed:"Listed",columnProposed:"To trade",emptyTitle:"No surplus under this rule.",emptyWhy:(e,t)=>`You own ${e} or fewer of each of these ${t.toLocaleString()} cards, so none are spare.`,emptyFix:(e,t)=>`Keep ${e} instead â ${t.toLocaleString()} card${1===t?"":"s"} would list`,confirmIdle:"Add to trade list",confirm:e=>`Add ${e.toLocaleString()} to trade list`,inStep:"New spares list themselves. A card you edit by hand is left alone.",resultCta:"See who wants them",source:"surplus",historyLabel:(e,t)=>
4554`Trade surplus â keep ${e}${t?" across printings":""}`},wish:{icon:e=>(0,r.Y)(o.aG,{size:e}),button:"Fill Wishlist",buttonTitle:"Want a set number of copies of each filtered card and put what you're missing on your wishlist",header:"Fill my wishlist",subtitle:"Say how many of each card you want. What you're missing goes on your wishlist.",listName:"wishlist",nLabel:"Want",nMin:1,tail:"â wish for what's missing.",rest:"wish for what's missing",goTo:"go on your wishlist",orderLabel:"Wish for",orderTitles:{base:"Put the wish on the base art",alt:"Put the wish on the alt art"},poolTitles:e=>({each:`Want ${e} of every printing on its own`,pool:`Want ${e} across base art + alt arts combined â owning any printing counts`}),guarantees:e=>[{pre:"Cards you own",b:`${e} or more copies`,post:" of are left alone."},{pre:"A wish that is already higher is",b:"never lowered",post:"."}],columnListed:"Wished",columnProposed:"To wish",emptyTitle:"Nothing missing under this rule.",emptyWhy:e=>`You already own ${e} or more of each of these cards.`,emptyFix:(e,t)=>`Want ${e} instead â ${t.toLocaleString()} card${1===t?"":"s"} would go on`,confirmIdle:"Add to wishlist",confirm:e=>`Add ${e.toLocaleString()} to wishlist`,inStep:"Cards you pull come off, new ones go on. A card you edit by hand is left alone.",resultCta:"See who has them",source:"wants",historyLabel:(e,t)=>
4554`Fill wishlist â want ${e}${t?" across printings":""}`}};n.d(t,["S",0,{inBinder:"Your lists live on your main collection â switch back to it to use them",startOver:e=>`Start your ${e} overâ¦`,startOverTitle:"Empty the list in one undoable step (it ends that list's rules too)",syncAndRules:"Sync & list rules",rulesShort:e=>e>0?`${e} on`:"none yet",rulesBadge:e=>`${e} rule${1===e?"":"s"}`,untradable:{pre:"Cards the game won't let you trade are",b:"left out",post:"."},footHint:"Owned counts don't change. Undo any run from",playset:(e,t)=>`${e} is a full playset in ${t}`,counting:"Counting your cardsâ¦",reviewCards:"Review cards",hideCards:"Hide cards",tableFoot:"Change any count before you confirm.",pooledOutside:e=>`${e.toLocaleString()} alt-art printing${1===e?"":"s"} outside your filter ${1===e?"is":"are"} counted`,outsideRow:"Alt art, outside your filter",saveRule:"Save rule",andSave:" & save rule",syncSwitch:e=>`Redo after every ${e} sync`,unlinked:"Off because your game account isn't linked. A rule runs again each time your account syncs, so it needs a link first.",link:"Link your account",blocked:e=>`Only rarity, set and owned filters can be saved as a rule. Clear ${e.join(", ")} to save this one.`,full:(e,t)=>
4554`Your ${e} already has ${t} saved rules, the most one list holds. Turn one off first.`,savesAs:"Saves as",besides:(e,t)=>` It sits next to your other ${t} ${e} rule${1===t?"":"s"}.`,replaces:"Replaces your saved rule",overlapLead:"Can't save: your rule",overlapWhy:e=>` already covers ${e.toLocaleString()} of these card${1===e?"":"s"}, and a card can only follow one rule.`,narrowThis:"Narrow this one to",orTurnOff:"or turn the other off. Running it once still works.",overlapFix:" Narrow the rarity or set, or turn the other off. Running it once still works.",narrow:"Narrow to",turnOtherOff:"Turn that rule off",covers:e=>`Covers ${e.toLocaleString()} of the cards above`,rulesHead:e=>`Your ${e} rules`,oneOverlaps:" · one overlaps",loadingRules:"Checking your saved rulesâ¦",busy:e=>`Updating your ${e}â¦`,errorTitle:e=>`Your ${e} wasn't updated.`,nothingWritten:"Nothing was written.",partWritten:"Part of the run may have been written â check History.",tryAgain:"Try again",ruleNotSaved:e=>`Your ${e} was updated, but the rule was not saved.`,nothingNow:"Nothing needed changing now.",partialRun:"The server wrote only part of the run â check History for what landed.",resultSaved:"Saved to your list rules:",resultRuns:e=>` It runs again after every ${e} sync. You'll find it in the strip above your cards.`,resultHistory:e=>`Recorded in History as â${e}â. You can undo the whole run, one section of it, or one card.`,undo:"Undo this run",undoing:"Undoingâ¦",undone:e=>`Run undone. Your ${e} is back to how it was.`,undoneRuleOff:"The rule it saved is turned off too.",undoneRuleKept:"Your saved rule keeps its new number; turn it off in the strip if you don't want it.",undoFailed:"Could not undo the run:",done:"Done"},"s",0,i])},63899(e,t,n){n.d(t,{U$:()=>u,b$:()=>m,oD:()=>g});var r=n(10201),o=n(17402),i=n(63679),a=n(55063),l=n(75279),s=n(51940),d=n(63099),c=n(28297),p=n(43284);function h(e){const t=`${e.cards.toLocaleString()} card${1===e.cards?"":"s"} kept in step`;return e.last_applied<=0?`${t} · runs after your next sync`:`${t} · ${e.last_changed>0?`changed ${e.last_changed.toLocaleString()}`:"nothing to change"} after ${function(e){const t=new Date(1e3*e),n=new Date,r=new Date(n.getTime()-864e5);return t.toDateString()===n.toDateString()?`the ${t.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})} sync`:t.toDateString()===r.toDateString()?"yesterday's sync":`the ${t.toLocaleDateString(void 0,{month:"short",day:"numeric"})} sync`}(e.last_applied)}`}function u({kind:e,n:t,scope:n}){return(0,r.FD)(r.FK,{children:[s.s[e].nLabel," ",t," of every ",(0,r.Y)(l.M6,{scope:n,withOwned:!0})]})}function g({rule:e}){const t=s.s[e.kind];return(0,r.FD)(r.FK,{children:[(0,r.FD)("b",{children:[t.nLabel," ",e.n]})," ","of every ",(0,r.Y)(l.M6,{scope:e.scope,withOwned:!0})," â ",t.rest]})}function m({rule:e,running:t,meta:n,onOpen:i,onTurnedOff:l,surface:d}){const c=s.s[e.kind],[u,m]=(0,o.J0)(!1),[y,A]=(0,o.J0)(null);return(0,r.FD)(f,{$surface:d,children:[(0,r.Y)(x,{children:c.icon(14)}),(0,r.FD)(v,{children:[i?(0,r.Y)(w,{type:"button",title:"Open this rule in its dialog",onClick:()=>i(e),children:(0,r.Y)(g,{rule:e})}):(0,r.Y)(b,{children:(0,r.Y)(g,{rule:e})}),(0,r.Y)($,{$error:null!==y,children:y??n??h(e)})]}),t?(0,r.FD)(Y,{children:[(0,r.Y)(a.tK,{"aria-hidden":"true"}),"Running with the syncâ¦"]}):(0,r.Y)(k,{type:"button",disabled:u,onClick:()=>{(async()=>{m(!0),A(null);const t=await(0,p.XF)(e);null===t?l?.(e):(A(t),m(!1))})()},"aria-label":`Turn off: ${e.label}`,children:u?"Turning offâ¦":"Turn off"})]})}const f=i.Ay.div` 4555 display: flex; 4556 align-items: center; 4557 gap: 12px; 4558 min-height: 48px; 4559 padding: 6px 14px; 4560 box-sizing: border-box; 4561 border-top: 1px solid color-mix(in srgb, var(--theme-palette-color-5) 55%, transparent); 4562 ${e=>e.$surface?"background: var(--theme-palette-color-8);":""} 4563 @media only screen and ${c.E0} { 4564 min-height: ${64}px; 4565 padding: 6px 16px; 4566 } 4567`,x=i.Ay.span` 4568 flex: none; 4569 display: inline-flex; 4570 align-items: center; 4571 justify-content: center; 4572 width: 26px; 4573 height: 26px; 4574 border-radius: 6px; 4575 background: color-mix(in srgb, var(--theme-palette-color-1) 12%, transparent); 4576 color: var(--theme-palette-color-1); 4577`,v=i.Ay.div` 4578 flex: 1; 4579 min-width: 0; 4580 display: flex; 4581 flex-direction: column; 4582 gap: 1px; 4583`,y="\n font-size: 13px;\n line-height: 1.35;\n color: var(--theme-palette-color-4);\n text-wrap: pretty;\n b {\n font-weight: 700;\n }\n",w=i.Ay.button` 4584 ${y} 4585 padding: 0; 4586 border: none; 4587 background: none; 4588 font-family: inherit; 4589 text-align: left; 4590 cursor: pointer; 4591 text-decoration-color: var(--theme-palette-color-5); 4592 text-underline-offset: 3px; 4593 &:hover { 4594 text-decoration-line: underline; 4595 } 4596`,b=i.Ay.span` 4597 ${y} 4598`,$=i.Ay.span` 4599 font-size: 11.5px; 4600 line-height: 1.35; 4601 color: ${e=>e.$error?d.nX.error:"var(--theme-palette-color-3)"}; 4602`,k=(0,i.Ay)(c.IX)` 4603 flex: none; 4604 height: 30px; 4605 padding: 0 12px; 4606 @media only screen and ${c.E0} { 4607 height: ${44}px; 4608 } 4609`,Y=i.Ay.span` 4610 flex: none; 4611 display: inline-flex; 4612 align-items: center; 4613 gap: 7px; 4614 font-size: 12px; 4615 color: var(--theme-palette-color-3); 4616`}
4616,29941(e,t,n){var r=n(10201),o=n(63679),i=n(21143),a=n(43284);const l=o.Ay.div` 4617 margin-top: 12px; 4618 border: 1px solid var(--theme-palette-color-5); 4619 border-radius: 8px; 4620 background: var(--theme-palette-color-8); 4621 overflow: hidden; 4622 > div:first-child { 4623 border-top: none; 4624 } 4625`;n.d(t,["P",0,()=>(0,a.q5)()?(0,r.Y)(l,{children:(0,r.Y)(i.H,{variant:"strip"})}):null])},21143(e,t,n){n.d(t,{H:()=>h});var r=n(10201),o=n(17402),i=n(63679),a=n(15096),l=n(51940),s=n(7718),d=n(28297),c=n(63899),p=n(43284);function h({variant:e,running:t,onOpen:n,onNewRule:i}){const{saved:a,failed:d}=(0,p.KT)(),[h,v]=(0,o.J0)(null),y=e=>v(`Turned off. Your ${l.s[e.kind].listName} stays exactly as it is.`),w=e=>(0,r.Y)(c.b$,{rule:e,running:t,onOpen:n,onTurnedOff:y},e.id);if(null===a)return(0,r.Y)(f,{children:d?"Couldn't load your list rules. Reload the page to try again.":"Loading your list rulesâ¦"});const b=[...(0,p.Tv)(a,"trade"),...(0,p.Tv)(a,"wish")];return"sheet"===e?(0,r.FD)(r.FK,{children:[["trade","wish"].map((e,t)=>{const n=(0,p.Tv)(a,e),i=l.s[e],d=t>0?x:s.oG;return(0,r.FD)(o.FK,{children:[(0,r.FD)(d,{$flush:n.length>0,children:[i.listName," rules"]}),n.length>0?n.map(w):(0,r.FD)(f,{children:["None yet. ",i.button," can save one."]})]},e)}),h&&(0,r.Y)(f,{role:"status",children:h})]}):(0,r.FD)(r.FK,{children:[(0,r.FD)(u,{children:[(0,r.Y)(g,{children:"List rules"}),(0,r.Y)("span",{children:"· run after every sync · a card you edit by hand is left alone"}),i&&(0,r.Y)(m,{type:"button",onClick:i,children:"+ New rule from these filters"})]}),b.length>0?b.map(w):(0,r.Y)(f,{children:"No list rules yet. Trade Surplus and Fill Wishlist can save one: turn on âRedo after every syncâ."}),h&&(0,r.Y)(f,{role:"status",children:h})]})}const u=i.Ay.div` 4626 display: flex; 4627 align-items: center; 4628 flex-wrap: wrap; 4629 gap: 4px 8px; 4630 padding: 10px 14px 6px; 4631 border-top: 1px solid var(--theme-palette-color-5); 4632 background: color-mix(in srgb, var(--theme-palette-color-7) 45%, transparent); 4633 font-size: 11.5px; 4634 color: var(--theme-palette-color-3); 4635`,g=i.Ay.span` 4636 font-size: 10.5px; 4637 font-weight: 700; 4638 letter-spacing: 0.07em; 4639 text-transform: uppercase; 4640`,m=(0,i.Ay)(a.OL)` 4641 margin-left: auto; 4642 font-size: 12px; 4643`,f=i.Ay.div` 4644 padding: 8px 14px 12px; 4645 font-size: 12.5px; 4646 line-height: 1.4; 4647 color: var(--theme-palette-color-3); 4648 @media only screen and ${d.E0} { 4649 padding: 4px 16px 12px; 4650 } 4651`,x=(0,i.Ay)(s.oG)` 4652 border-top: 1px solid color-mix(in srgb, var(--theme-palette-color-5) 55%, transparent); 4653`},43284(e,t,n){n.d(t,{BZ:()=>h,KT:()=>u,XF:()=>g});var r=n(17402),o=n(84031),i=n(86031),a=n(4738),l=n(81616);const s={saved:null,failed:!1},d=new l.il;let c=!1;const p=()=>Boolean(i.SA.collection.savedListRules)&&(0,a.x3)();function h(e=!1){!p()||c&&!e||(c=!0,(0,o.P9)().then(e=>d.updateState({saved:e,failed:!1})).catch(()=>d.updateState({saved:d.getStateOrElse(s).saved,failed:!0})))}function u(){const e=(0,l.Pj)(d);return(0,r.vJ)(()=>h(),[]),e??s}async function g(e){try{await(0,o.wh)({id:e.id})}catch(e){return e instanceof Error?e.message:"Could not turn the rule off."}const{saved:t}=d.getStateOrElse(s);return t&&d.updateState({saved:{...t,rules:t.rules.filter(t=>t.id!==e.id)},failed:!1}),null}n.d(t,["Tv",0,(e,t)=>(e?.rules??[]).filter(e=>e.kind===t),"q5",0,p,"vJ",0,"dotgg:open-list-rules"])},83708(e,t,n){var r=n(10201),o=n(17402),i=n(4941);const a=(0,o.q6)(null);n.d(t,["O",0,()=>(0,o.NT)(a),"W",0,({children:e})=>{const[t,n]=(0,o.J0)({cardId:"",show:0}),l=(0,o.hb)(e=>{n(t=>({cardId:e,show:t.show+1}))},[]),s=(0,o.Kr)(()=>l,[l]);return(0,r.FD)(a.Provider,{value:s,children:[e,t.show>0&&(0,r.Y)(i.X,{cardId:t.cardId,show:t.show})]})}])},49340(e,t,n){n.d(t,{t:()=>a});var r=n(10201),o=n(17402),i=n(4941);function a(){const[e,t]=(0,o.J0)({cardId:"",tick:0});return{zoom:(0,o.hb)(e=>t(t=>({cardId:e,tick:t.tick+1})),[]),popup:e.tick>0?(0,r.Y)(i.X,{cardId:e.cardId,show:e.tick}):null}}},15088(e,t,n){var r=n(10201),o=n(17402),i=n(63679),a=n(16133),l=n(41394);const s=10,d=(e,t)=>(0,a.GP)((0,l.H)(e),t?"MMM yy":"MMM d"),c=i.I4.div` 4654 position: relative; 4655 width: 100%; 4656 height: ${e=>e.$height}px; 4657 touch-action: pan-y; 4658 svg { 4659 display: block; 4660 cursor: crosshair; 4661 } 4662`,p=i.I4.div` 4663 position: absolute; 4664 top: 8px; 4665 left: ${e=>e.$left}px; 4666 min-width: 140px; 4667 padding: 6px 8px; 4668 border-radius: 4px; 4669 background-color: var(--theme-palette-color-7); 4670 border: 1px solid var(--theme-palette-color-5); 4671 font-size: 11.5px; 4672 color: var(--theme-palette-color-4); 4673 pointer-events: none; 4674 display: flex; 4675 flex-direction: column; 4676 gap: 3px; 4677`,h=i.I4.div` 4678 font-size: 10px; 4679 letter-spacing: 0.04em; 4680 text-transform: uppercase; 4681 color: var(--theme-palette-color-3); 4682`,u=i.I4.div` 4683 display: flex; 4684 align-items: center; 4685 gap: 6px; 4686 span { 4687 flex: 1; 4688 color: var(--theme-palette-color-3); 4689 } 4690 b { 4691 font-variant-numeric: tabular-nums; 4692 } 4693`,g=i.I4.span` 4694 width: 10px; 4695 height: 3px; 4696 border-radius: 2px; 4697 background-color: ${e=>e.$color}; 4698 flex: none !important; 4699`;
4699n.d(t,["a",0,({series:e,range:t,theme:n,currency:i,formatValue:m,height:f=220,ariaLabel:x="Price history"})=>{const[v,y]=(()=>{const[e,t]=(0,o.J0)(0),n=(0,o.li)(null),r=(0,o.li)(null);return(0,o.vJ)(()=>()=>{n.current?.disconnect(),null!==r.current&&cancelAnimationFrame(r.current)},[]),[e=>{n.current?.disconnect(),e&&(t(e.clientWidth),n.current=new ResizeObserver(()=>{null!==r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{r.current=null,t(t=>t===e.clientWidth?t:e.clientWidth)})}),n.current.observe(e))},e]})(),[w,b]=(0,o.J0)(null),$=(0,o.li)(null),k=e=>m?m(e):((e,t)=>`${e}${t.toFixed(2)}`)(i,e),Y=((e,t)=>{const n=[...new Set(e.flatMap(e=>e.points.map(e=>e.time)))].sort(),r=(e=>"7"===e?7:"30"===e?30:0)(t);return r>0&&n.length>r?n.slice(n.length-r):n})(e,t),A=e.map(e=>({...e,byDate:new Map(e.points.map(e=>[e.time,e.value]))})).filter(e=>Y.some(t=>e.byDate.has(t)));if((0,o.vJ)(()=>b(null),[t,e.length]),0===Y.length||0===A.length)return null;const C=A.flatMap(e=>Y.flatMap(t=>e.byDate.has(t)?[e.byDate.get(t)??0]:[])),F=Math.min(...C),D=Math.max(...C),S=(e=>{const t=e/4,n=10**Math.floor(Math.log10(t||1)),r=t/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n})(Math.max(D-F,.1*D,.01)),I=Math.max(0,Math.floor(F/S)*S-(F===D?S:0)),z=Math.ceil(D/S)*S+(D===I?S:0),T=Math.max(y-s-58,10),E=f-12-22,L=e=>s+(1===Y.length?T/2:e/(Y.length-1)*T),M=e=>12+E-(e-I)/(z-I||1)*E,N=[];for(let e=I;e<=z+S/2;e+=S)N.push(e);const P=e=>Y.map((t,n)=>
4699e.byDate.has(t)?`${0!==n&&e.byDate.has(Y[n-1]??"")?"L":"M"}${L(n).toFixed(1)} ${M(e.byDate.get(t)??0).toFixed(1)}`:"").filter(e=>""!==e).join(" "),O=e=>{const t=Y.map((t,n)=>[n,e.byDate.get(t)]).filter(e=>void 0!==e[1]);if(0===t.length)return"";const n=t[0]?.[0]??0,r=t[t.length-1]?.[0]??0,o=(12+E).toFixed(1);return`${P(e)} L${L(r).toFixed(1)} ${o} L${L(n).toFixed(1)} ${o} Z`},_=Math.max(1,Math.ceil(Y.length/Math.max(1,Math.floor(T/90)))),R=(Y[0]??"").slice(0,4)!==(Y[Y.length-1]??"").slice(0,4),j=null===w?null:Y[w]??null;return(0,r.FD)(c,{ref:v,$height:f,children:[y>0?(0,r.FD)("svg",{ref:$,"data-price-chart":!0,width:y,height:f,role:"img","aria-label":x,onPointerMove:e=>{const t=$.current?.getBoundingClientRect();if(!t)return;const n=e.clientX-t.left-s,r=Math.round(n/T*(Y.length-1));b(Math.min(Y.length-1,Math.max(0,r)))},onPointerLeave:()=>b(null),children:[(0,r.Y)("defs",{children:A.map(e=>e.fill?(0,r.FD)("linearGradient",{id:`fill-${e.key}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.Y)("stop",{offset:"0",stopColor:e.fill[0]}),(0,r.Y)("stop",{offset:"1",stopColor:e.fill[1]})]},e.key):null)}),(0,r.Y)("rect",{x:"0",y:"0",width:y,height:f,fill:n.backgroundColor,rx:"4"}),N.map(e=>(0,r.FD)("g",{children:[(0,r.Y)("line",{x1:s,x2:s+T,y1:M(e),y2:M(e),stroke:n.gridLinesColor,strokeWidth:"1"}),(0,r.Y)("text",{x:s+T+6,y:M(e)+3.5,fontSize:"10",fill:n.textColor,opacity:"0.75",children:k(e)})]},e)),Y.map((e,t)=>t%_===0&&t<Y.length-1?(0,r.Y)("text",{x:L(t),y:f-6,fontSize:"10",fill:n.textColor,opacity:"0.75",textAnchor:0===t?"start":"middle",children:d(e,R)},e):null),A.map(e=>e.fill?(0,r.Y)("path",{d:O(e),fill:`url(#fill-${e.key})`},`a-${e.key}`):null),A.map(e=>(0,r.Y)("path",{d:P(e),fill:"none",stroke:e.color,strokeWidth:"2",strokeLinejoin:"round"},e.key)),A.map(e=>{const t=(e=>{for(let t=Y.length-1;t>=0;t-=1){const n=e.byDate.get(Y[t]??"");if(void 0!==n)return n}})(e);return void 0===t?null:(0,r.FD)("g",{children:[(0,r.Y)("rect",{x:s+T+3,y:M(t)-8,width:52,height:"16",rx:"3",fill:e.color}),(0,r.Y)("text",{x:s+T+3+26,y:M(t)+3.5,fontSize:"10",fontWeight:"700",fill:"#fff",textAnchor:"middle",children:k(t)})]},`b-${e.key}`)}),null!==w&&null!==j?(0,r.FD)("g",{children:[(0,r.Y)("line",{x1:L(w),x2:L(w),y1:12,y2:12+E,stroke:n.textColor,strokeWidth:"1",strokeDasharray:"3 3",opacity:"0.6"}),A.map(e=>{const t=e.byDate.get(j);return void 0===t?null:(0,r.Y)("circle",{cx:L(w),cy:M(t),r:"3.5",fill:e.color,stroke:n.backgroundColor,strokeWidth:"1.5"},e.key)})]}):null]}):null,null!==w&&null!==j?(0,r.FD)(p,{$left:Math.min(Math.max(L(w)+10,0),Math.max(y-150,0)),children:[(0,r.Y)(h,{children:(0,a.GP)((0,l.H)(j),"MMM d, yyyy")}),A.map(e=>{const t=e.byDate.get(j);return void 0===t?null:(0,r.FD)(u,{children:[(0,r.Y)(g,{$color:e.color}),(0,r.Y)("span",{children:e.label}),(0,r.Y)("b",{children:k(t)})]},e.key)})]}):null]})}])},20104(e,t,n){var r=n(10201),o=n(17402),i=n(63679),a=n(89024);const l=i.Ay.div` 4700 position: relative; 4701 flex: 1; 4702 min-width: 0; 4703`,s=i.Ay.input` 4704 width: 100%; 4705 border-radius: 4px; 4706 border: 1px solid var(--theme-palette-color-5); 4707 background-color: var(--theme-palette-color-8); 4708 color: var(--theme-palette-color-3); 4709 padding: 5px 8px; 4710 font-size: 0.82em; 4711`,d=i.Ay.div` 4712 position: absolute; 4713 z-index: 20; 4714 top: calc(100% + 2px); 4715 left: 0; 4716 right: 0; 4717 background-color: var(--theme-palette-color-8); 4718 border: 1px solid var(--theme-palette-color-5); 4719 border-radius: 6px; 4720 overflow: hidden; 4721 box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4); 4722`,c=i.Ay.div` 4723 display: flex; 4724 justify-content: space-between; 4725 gap: 8px; 4726 padding: 6px 8px; 4727 cursor: pointer; 4728 font-size: 0.82em; 4729 color: var(--theme-palette-color-3); 4730 &:hover { 4731 background-color: var(--theme-palette-color-7); 4732 } 4733`,p=i.Ay.span` 4734 white-space: nowrap; 4735 overflow: hidden; 4736 text-overflow: ellipsis; 4737`,h=i.Ay.span` 4738 color: var(--theme-palette-color-6); 4739 flex-shrink: 0; 4740`;n.d(t,["r",0,({cards:e,onSelect:t,placeholder:n})=>{const[i,u]=(0,o.J0)(""),[g,m]=(0,o.J0)(!1),f=(0,o.Kr)(()=>{const t=i.trim().toLowerCase();if(t.length<2)return[];const n=[];for(const r of e)if(((0,a.qW)(r.name??"",t)||(0,a.qW)(r.displayName??"",t)||(0,a.qW)(r.id??"",t))&&(n.push(r),n.length>=8))break;return n},[i,e]);return(0,r.FD)(l,{children:[(0,r.Y)(s,{value:i,placeholder:n??"Search for the right cardâ¦",onFocus:()=>m(!0),onChange:e=>{u(e.currentTarget.value),m(!0)},onBlur:()=>setTimeout(()=>m(!1),150)}),g&&f.length>0&&(0,r.Y)(d,{children:f.map(e=>(0,r.FD)(c,{onMouseDown:()=>(e=>{t(e),u(""),m(!1)})(e),children:[(0,r.Y)(p,{children:e.displayName||e.name}),(0,r.Y)(h,{children:e.id})]},e.id))})]})}])},10306(e,t,n){n.d(t,{fA:()=>$,sx:()=>y,OW:()=>k,kX:()=>w});var r=n(10201),o=n(17402),i=n(63679);const a=i.Ay.div` 4741 display: inline-flex; 4742 align-items: center; 4743 background: var(--theme-palette-color-7); 4744 border: 1px solid rgba(255, 255, 255, 0.09); 4745 border-radius: 5px; 4746 overflow: hidden; 4747`,l=i.Ay.button` 4748 all: unset; 4749 cursor: pointer;
4750 width: 20px; 4751 height: 22px; 4752 display: inline-flex; 4753 align-items: center; 4754 justify-content: center; 4755 color: var(--theme-palette-color-3); 4756 font-size: 14px; 4757 font-weight: 600; 4758 transition: color 120ms ease; 4759 &:hover:not(:disabled) { 4760 color: var(--theme-palette-color-4); 4761 } 4762 &:disabled { 4763 color: var(--theme-palette-color-5); 4764 cursor: not-allowed; 4765 } 4766`,s=i.Ay.span` 4767 min-width: 22px; 4768 text-align: center; 4769 font-size: 12px; 4770 font-weight: 700; 4771 color: var(--theme-palette-color-4); 4772 font-variant-numeric: tabular-nums; 4773`,d=i.Ay.span` 4774 display: flex; 4775 align-items: center; 4776 justify-content: space-between; 4777 gap: 8px; 4778 width: 100%; 4779 min-width: 0; 4780`,c=i.Ay.span` 4781 font-size: 12px; 4782 color: var(--theme-palette-color-4); 4783 white-space: nowrap; 4784 overflow: hidden; 4785 text-overflow: ellipsis; 4786`,p=i.Ay.span` 4787 font-size: 11px; 4788 color: var(--theme-palette-color-3); 4789 flex-shrink: 0; 4790`,h=i.Ay.span` 4791 display: inline-flex; 4792 align-items: center; 4793 gap: 7px; 4794`,u=i.Ay.span` 4795 width: 8px; 4796 height: 8px; 4797 border-radius: 2px; 4798 flex-shrink: 0; 4799 background: ${e=>e.$hex}; 4800`;var g=n(54375),m=n(11754),f=n(91111),x=n(79407);const v=e=>0===e?"var(--theme-palette-color-1)":"#6A93F2";function y({card:e,onZoom:t,onReplace:n}){const[i,a]=(0,o.J0)(!1),l=(0,o.li)(null),s=e?.image,d=i?l.current?.getBoundingClientRect():void 0;return(0,r.FD)(m.WV,{ref:l,$clickable:!!t,title:t?"Click to enlarge":void 0,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onClick:t,children:[s?(0,r.Y)("img",{src:s,alt:e?.displayName||e?.name||"",loading:"lazy"}):(0,r.Y)("span",{children:(e?.displayName||e?.name||"?").slice(0,1)}),t&&(0,r.Y)(m.Eg,{children:(0,r.Y)(g.C0,{size:12})}),n&&(0,r.Y)(m.Rx,{title:"Replace card",onClick:e=>{e.stopPropagation(),n()},children:(0,r.Y)(g.Bd,{size:11})}),i&&s&&d&&(0,r.Y)(f.f,{children:(0,r.Y)(m.sf,{style:{left:Math.min(d.right+10,window.innerWidth-240),top:Math.max(8,Math.min(d.top-120,window.innerHeight-340))},children:(0,r.Y)("img",{src:s,alt:""})})})]})}function w({value:e,onChange:t,min:n=1,max:o=99}){return(0,r.FD)(a,{children:[(0,r.Y)(l,{disabled:e<=n,onClick:()=>t(Math.max(n,e-1)),children:"â"}),(0,r.Y)(s,{children:e}),(0,r.Y)(l,{disabled:e>=o,onClick:()=>t(Math.min(o,e+1)),children:"+"})]})}const b=e=>Array.isArray(e)?e[0]:e;function $({board:e,boards:t,onChange:n}){const o=Object.entries(t).map(([e,t])=>({value:e,label:t})),i=t[String(e)]??(0!==e?"Side":"Main");return(0,r.Y)(x.R,{options:o,value:{value:String(e),label:i},onChange:e=>n(Number(b(e).value)),formatOptionLabel:e=>(0,r.FD)(h,{children:[(0,r.Y)(u,{$hex:v(Number(e.value))}),e.label]}),width:"120px",bordered:!0}
4800)}function k({current:e,alternates:t,onPick:n}){const o=t.map(e=>({value:e.id,label:e.id,price:e.displayPrice&&"N/A"!==e.displayPrice?e.displayPrice:""}));return(0,r.Y)(x.R,{options:o,value:{value:e.id,label:e.id},onChange:e=>{const r=t.find(t=>t.id===b(e).value);r&&n(r)},formatOptionLabel:e=>(0,r.FD)(d,{children:[(0,r.Y)(c,{children:String(e.value)}),e.price?(0,r.Y)(p,{children:String(e.price)}):null]}),width:"100%",bordered:!0,maxMenuHeight:"260px"})}},54375(e,t,n){var r=n(10201);n(17402);const o=({size:e=16,style:t,children:n})=>(0,r.Y)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",style:t,children:n});n.d(t,["Bd",0,e=>(0,r.FD)(o,{...e,children:[(0,r.Y)("polyline",{points:"17 1 21 5 17 9"}),(0,r.Y)("path",{d:"M3 11V9a4 4 0 0 1 4-4h14"}),(0,r.Y)("polyline",{points:"7 23 3 19 7 15"}),(0,r.Y)("path",{d:"M21 13v2a4 4 0 0 1-4 4H3"})]}),"C0",0,e=>(0,r.FD)(o,{...e,children:[(0,r.Y)("circle",{cx:"11",cy:"11",r:"7"}),(0,r.Y)("path",{d:"m20 20-3.5-3.5"})]}),"gz",0,e=>(0,r.FD)(o,{...e,children:[(0,r.Y)("path",{d:"M18 6 6 18"}),(0,r.Y)("path",{d:"m6 6 12 12"})]}),"iW",0,e=>(0,r.Y)(o,{...e,children:(0,r.Y)("path",{d:"m5 12 5 5L20 7"})}),"or",0,e=>(0,r.FD)(o,{...e,children:[(0,r.Y)("path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),(0,r.Y)("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),(0,r.Y)("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]})])},15149(e,t,n){var r=n(63679);const o=r.Ay.div` 4801 display: flex; 4802 align-items: center; 4803 gap: 10px; 4804 padding: 6px 2px 10px; 4805 flex-wrap: wrap; 4806`,i=r.Ay.div` 4807 display: flex; 4808 align-items: center; 4809 gap: 5px; 4810 font-size: 12.5px; 4811 color: var(--theme-palette-color-3); 4812`,a=r.Ay.span` 4813 font-weight: 800; 4814 color: ${e=>e.$accent?"var(--theme-palette-color-1)":"var(--theme-palette-color-4)"}; 4815`,l=r.Ay.span` 4816 color: var(--theme-palette-color-3); 4817 opacity: 0.4; 4818 margin: 0 2px; 4819`,s=r.Ay.div` 4820 display: flex; 4821 gap: 6px; 4822 margin-left: 2px; 4823 font-size: 11px; 4824 color: var(--theme-palette-color-3); 4825 opacity: 0.6; 4826`,d=r.Ay.span` 4827 flex: 1; 4828`,c=r.Ay.span` 4829 display: inline-flex; 4830 align-items: center; 4831 gap: 5px; 4832 padding: 4px 9px; 4833 border-radius: 6px; 4834 font-size: 11.5px; 4835 font-weight: 600; 4836 background: rgba(242, 162, 99, 0.1); 4837 border: 1px solid rgba(242, 162, 99, 0.45); 4838 color: var(--theme-palette-color-10); 4839`,p=r.Ay.span` 4840 display: inline-flex; 4841 align-items: center; 4842 gap: 5px; 4843 font-size: 11.5px; 4844 font-weight: 600; 4845 color: var(--theme-palette-color-12); 4846`,h=r.Ay.div` 4847 max-height: 55vh; 4848 overflow-y: auto; 4849 padding-right: 4px; 4850 /* Phone: the modal body is the scroller â no nested scroll trap. */ 4851 @media only screen and (max-width: 700px) { 4852 max-height: none; 4853 overflow-y: visible; 4854 padding-right: 0; 4855 } 4856 &::-webkit-scrollbar {
4857 width: 8px; 4858 } 4859 &::-webkit-scrollbar-thumb { 4860 background: var(--theme-palette-color-5); 4861 border-radius: 4px; 4862 } 4863`,u=r.Ay.div` 4864 & + & { 4865 margin-top: 12px; 4866 } 4867`,g=r.Ay.div` 4868 display: flex; 4869 align-items: center; 4870 gap: 8px; 4871 padding: 2px 2px 7px; 4872`,m=r.Ay.span` 4873 font-size: 10px; 4874 font-weight: 700; 4875 letter-spacing: 0.08em; 4876 text-transform: uppercase; 4877 color: ${e=>e.$tone??"var(--theme-palette-color-3)"}; 4878`,f=r.Ay.span` 4879 font-size: 10.5px; 4880 color: var(--theme-palette-color-3); 4881 opacity: 0.6; 4882`,x=r.Ay.span` 4883 flex: 1; 4884 height: 1px; 4885 background: rgba(255, 255, 255, 0.07); 4886`,v=r.Ay.div` 4887 display: flex; 4888 flex-direction: column; 4889 gap: 6px; 4890`,y=r.Ay.div` 4891 font-size: 11.5px; 4892 color: var(--theme-palette-color-3); 4893 opacity: 0.7; 4894 padding: 8px 2px 0; 4895`,w=r.Ay.span` 4896 color: var(--theme-palette-color-9); 4897 font-weight: 600; 4898`,b=r.Ay.div` 4899 display: flex; 4900 flex-direction: column; 4901 gap: 8px; 4902`,$=r.Ay.div` 4903 font-size: 12px; 4904 color: var(--theme-palette-color-3); 4905`,k=r.Ay.textarea` 4906 width: 100%; 4907 min-height: 360px; 4908 resize: vertical; 4909 border-radius: 6px; 4910 padding: 10px; 4911 background: var(--theme-palette-color-7); 4912 border: 1px solid var(--theme-palette-color-5); 4913 color: var(--theme-palette-color-4); 4914 font-size: 13px; 4915 line-height: 1.4; 4916 outline: none; 4917 &:focus { 4918 border-color: var(--theme-palette-color-1); 4919 } 4920`,Y=r.Ay.div` 4921 color: var(--theme-palette-color-9); 4922 font-size: 12px; 4923`;n.d(t,["CD",0,g,"DI",0,v,"E_",0,b,"H3",0,c,"I0",0,y,"JF",0,h,"LH",0,i,"OB",0,l,"RL",0,s,"UI",0,w,"_x",0,m,"fF",0,a,"hK",0,d,"hi",0,p,"km",0,$,"l0",0,k,"o0",0,x,"w2",0,Y,"wn",0,u,"xo",0,o,"zq",0,f])},18996(e,t,n){n.d(t,{FN:()=>p,d5:()=>c,qd:()=>h,uK:()=>d});var r=n(10201),o=n(17402),i=n(20104),a=n(54375),l=n(15149),s=n(11754);function d(e){return(0,o.Kr)(()=>{const t=new Map;return e.forEach(e=>t.set(e.id,e)),t},[e])}function c({card:e,fallback:t}){return(0,r.FD)(s.iV,{children:[(0,r.FD)(s.a_,{children:[(0,r.Y)(s.uO,{children:e?.displayName||e?.name||t}),e?.cost?(0,r.Y)(s.FF,{children:e.cost}):null]}),(0,r.FD)(s.Kl,{children:[e?.cardtype&&(0,r.Y)("span",{children:e.cardtype}),e?.cardtype&&e?.rarity&&(0,r.Y)(s.Xk,{children:"·"}),e?.rarity&&(0,r.Y)("span",{children:e.rarity})]})]})}function p({title:e,count:t,tone:n,children:o}){return(0,r.FD)(l.wn,{children:[(0,r.FD)(l.CD,{children:[(0,r.Y)(l._x,{$tone:n,children:e}),(0,r.Y)(l.zq,{children:t}),(0,r.Y)(l.o0,{})]}),(0,r.Y)(l.DI,{children:o})]})}function h({identifier:e,meta:t,cards:n,onResolve:o,onDismiss:l}){return(0,r.FD)(s.MF,{children:[(0,r.FD)(s.jn,{children:[(0,r.Y)(s.GN,{children:"?"}),(0,r.FD)("div",{style:{flex:1,minWidth:0},children:[(0,r.Y)(s.kw,{children:e}),(0,r.Y)(s.wf,{children:t})]}),(0,r.Y)(s.Dy,{title:"Remove line",onClick:l,children:(0,r.Y)(a.gz,{size:15})})]}),(0,r.Y)(i.r,{cards:n,onSelect:o})]})}},11754(e,t,n){var r=n(63679);const o=r.Ay.div` 4924 background: var(--theme-palette-color-8); 4925 border: 1px solid rgba(255, 255, 255, 0.07); 4926 border-radius: 8px; 4927`,i=r.Ay.div` 4928 display: grid; 4929 grid-template-columns: ${e=>e.$cols??"auto minmax(0, 1fr) auto auto auto auto"}; 4930 align-items: center; 4931 gap: 10px; 4932 padding: 5px 9px; 4933`,a=r.Ay.div` 4934 position: relative; 4935 width: 30px; 4936 height: 42px; 4937 border-radius: 4px; 4938 overflow: hidden; 4939 flex-shrink: 0; 4940 background: var(--theme-palette-color-7); 4941 display: flex; 4942 align-items: center; 4943 justify-content: center; 4944 cursor: ${e=>e.$clickable?"zoom-in":"default"}; 4945 color: var(--theme-palette-color-3); 4946 img { 4947 width: 100%; 4948 height: 100%; 4949 object-fit: cover; 4950 } 4951`,l=r.Ay.span` 4952 position: absolute; 4953 inset: 0; 4954 display: flex; 4955 align-items: center; 4956 justify-content: center; 4957 background: rgba(19, 23, 27, 0.55); 4958 color: #fff; 4959 opacity: 0; 4960 transition: opacity 120ms ease; 4961 ${a}:hover & { 4962 opacity: 1; 4963 } 4964`,s=r.Ay.button` 4965 all: unset; 4966 position: absolute; 4967 top: 2px; 4968 left: 2px; 4969 width: 16px; 4970 height: 16px; 4971 display: flex; 4972 align-items: center; 4973 justify-content: center; 4974 border-radius: 3px; 4975 background: rgba(19, 23, 27, 0.8); 4976 color: var(--theme-palette-color-1); 4977 cursor: pointer; 4978 opacity: 0; 4979 transition: opacity 120ms ease; 4980 ${a}:hover & { 4981 opacity: 1; 4982 } 4983`,d=r.Ay.div` 4984 position: fixed;
4985 z-index: 10000002; 4986 width: 230px; 4987 border-radius: 10px; 4988 overflow: hidden; 4989 border: 1px solid var(--theme-palette-color-5); 4990 box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6); 4991 pointer-events: none; 4992 img { 4993 display: block; 4994 width: 100%; 4995 } 4996`,c=r.Ay.div` 4997 min-width: 0; 4998`,p=r.Ay.div` 4999 display: flex; 5000 align-items: center; 5001 gap: 7px; 5002 min-width: 0; 5003`,h=r.Ay.span` 5004 font-size: 13px; 5005 color: var(--theme-palette-color-4); 5006 font-weight: 600; 5007 white-space: nowrap; 5008 overflow: hidden; 5009 text-overflow: ellipsis; 5010 letter-spacing: -0.01em; 5011`,u=r.Ay.span` 5012 font-size: 10px; 5013 font-weight: 700; 5014 flex-shrink: 0; 5015 background: var(--theme-palette-color-7); 5016 border-radius: 3px; 5017 padding: 0 4px; 5018 color: var(--theme-palette-color-1); 5019 border: 1px solid rgba(255, 255, 255, 0.1); 5020`,g=r.Ay.div` 5021 display: flex; 5022 align-items: center; 5023 gap: 6px; 5024 margin-top: 2px; 5025 font-size: 10.5px; 5026 color: var(--theme-palette-color-3); 5027 opacity: 0.85; 5028 white-space: nowrap; 5029 overflow: hidden; 5030`,m=r.Ay.span` 5031 color: var(--theme-palette-color-3); 5032 opacity: 0.4; 5033`,f=r.Ay.button` 5034 all: unset; 5035 cursor: pointer; 5036 padding: 5px; 5037 color: var(--theme-palette-color-3); 5038 opacity: 0.55; 5039 border-radius: 4px; 5040 display: inline-flex; 5041 &:hover { 5042 color: var(--theme-palette-color-9); 5043 opacity: 1; 5044 } 5045`,x=r.Ay.div` 5046 background: rgba(242, 100, 100, 0.05); 5047 border: 1px solid rgba(242, 100, 100, 0.4); 5048 border-radius: 8px; 5049 padding: 8px 10px; 5050 display: flex; 5051 flex-direction: column; 5052 gap: 8px; 5053`,v=r.Ay.div` 5054 display: flex; 5055 align-items: center; 5056 gap: 9px; 5057`,y=r.Ay.span` 5058 width: 30px; 5059 height: 42px; 5060 border-radius: 4px; 5061 flex-shrink: 0; 5062 border: 1px dashed rgba(242, 100, 100, 0.5); 5063 background: rgba(242, 100, 100, 0.06); 5064 display: flex; 5065 align-items: center; 5066 justify-content: center; 5067 color: var(--theme-palette-color-9); 5068 font-size: 16px; 5069`,w=r.Ay.div` 5070 font-size: 12.5px; 5071 color: var(--theme-palette-color-4); 5072 font-weight: 500; 5073 white-space: nowrap; 5074 overflow: hidden; 5075 text-overflow: ellipsis; 5076`,b=r.Ay.div` 5077 font-size: 10.5px; 5078 color: var(--theme-palette-color-9);
5079 margin-top: 1px; 5080`,$=r.Ay.div` 5081 width: 168px; 5082`,k=r.Ay.div` 5083 display: inline-flex; 5084 align-items: baseline; 5085 gap: 6px; 5086 padding: 4px 8px; 5087 font-size: 12px; 5088 color: var(--theme-palette-color-3); 5089`;n.d(t,["Dy",0,f,"EH",0,$,"Eg",0,l,"FF",0,u,"GN",0,y,"J3",0,i,"Kl",0,g,"MF",0,x,"Rx",0,s,"SZ",0,k,"WV",0,a,"Xk",0,m,"a_",0,p,"iV",0,c,"jT",0,o,"jn",0,v,"kw",0,w,"sf",0,d,"uO",0,h,"wf",0,b])},33151(e,t,n){var r=n(10201),o=n(17402),i=n(63679),a=n(16724),l=n(80288);const s=["#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722","#795548","#607d8b"],d=i.Ay.div` 5090 display: flex; 5091 flex-direction: column; 5092 gap: 8px; 5093`,c=i.Ay.div` 5094 display: flex; 5095 flex-direction: column; 5096 gap: 4px; 5097`,p=l.ao,h=l.XY,u=i.Ay.div` 5098 ${l.Le} 5099 ${l.cg} 5100 background-color: ${e=>e.$color}; 5101 color: ${e=>e.$textColor||"#ffffff"}; 5102 padding: 3px 10px; 5103`,g=i.Ay.button` 5104 background: rgba(255, 255, 255, 0.05); 5105 border: 1px dashed rgba(255, 255, 255, 0.2); 5106 color: rgba(255, 255, 255, 0.7); 5107 padding: 4px 10px; 5108 border-radius: 4px; 5109 font-size: 0.65em; 5110 cursor: pointer; 5111 transition: all 0.15s ease; 5112 text-align: center; 5113 font-weight: 500; 5114 5115 &:hover { 5116 border-color: rgba(255, 255, 255, 0.4); 5117 background: rgba(255, 255, 255, 0.1); 5118 color: rgba(255, 255, 255, 0.9); 5119 } 5120`,m=i.Ay.form` 5121 display: flex; 5122 flex-direction: column; 5123 gap: 6px; 5124`,f=i.Ay.div` 5125 display: flex; 5126 align-items: center; 5127 gap: 6px; 5128 background-color: ${e=>e.$color}; 5129 border-radius: 50px; 5130 padding: 2px 8px 2px 2px; 5131 cursor: text; 5132`,x=i.Ay.div` 5133 width: 16px; 5134 height: 16px; 5135 min-width: 16px; 5136 border-radius: 50%; 5137 background-color: rgba(0, 0, 0, 0.3); 5138 cursor: pointer; 5139 border: 2px solid rgba(255, 255, 255, 0.5); 5140 transition: all 0.15s ease; 5141 flex-shrink: 0; 5142 5143 &:hover { 5144 transform: scale(1.1); 5145 border-color: rgba(255, 255, 255, 0.8); 5146 } 5147 5148 &:active { 5149 transform: scale(0.95); 5150 } 5151`,v=i.Ay.div` 5152 color: white; 5153 font-size: 0.6em; 5154 font-weight: bold; 5155 text-transform: uppercase; 5156 line-height: 1.2; 5157 outline: none; 5158 min-width: 60px; 5159 max-width: 100px; 5160 white-space: nowrap; 5161 overflow: hidden; 5162 5163 &:empty:before { 5164 content: attr(data-placeholder); 5165 color: rgba(255, 255, 255, 0.5); 5166 font-weight: normal; 5167 } 5168 5169 &:focus { 5170 outline: none; 5171 } 5172`,y=i.Ay.div` 5173 display: flex; 5174 gap: 4px; 5175 justify-content: flex-end; 5176`,w=i.Ay.button` 5177 background: ${e=>e.$primary?"rgba(100, 150, 255, 0.8)":"rgba(255, 255, 255, 0.05)"}; 5178 border: 1px solid 5179 ${e=>e.$primary?"rgba(100, 150, 255, 1)":"rgba(255, 255, 255, 0.15)"}; 5180 color: ${e=>e.$primary?"#fff":"rgba(255, 255, 255, 0.7)"}; 5181 padding: 3px 10px; 5182 border-radius: 4px; 5183 font-size: 0.65em; 5184 cursor: pointer; 5185 transition: all 0.15s ease; 5186 font-weight: 500; 5187 5188 &:hover:not(:disabled) { 5189 background: ${e=>e.$primary?"rgba(100, 150, 255, 1)":"rgba(255, 255, 255, 0.1)"}; 5190 transform: translateY(-1px); 5191 } 5192 5193 &:active:not(:disabled) { 5194 transform: translateY(0); 5195 } 5196 5197 &:disabled { 5198 opacity: 0.4; 5199 cursor: not-allowed; 5200 } 5201`;n.d(t,["H",0,s,"_",0,({currentTags:e,allExistingTags:t,onAddTag:n})=>{const[i,l]=(0,o.J0)(!1),[b,$]=(0,o.J0)(""),[k,Y]=(0,o.J0)(s[0]),A=(0,o.Kr)(()=>{const n=e.map(e=>e.name.toLowerCase());return t.filter(e=>!n.includes(e.name.toLowerCase()))},[e,t]),C=()=>{b.trim()&&(n({name:b.trim(),color:k}),$(""),l(!1),Y(s[Math.floor(Math.random()*s.length)]))};return(0,r.FD)(d,{children:[A.length>0&&(0,r.FD)(c,{children:[(0,r.Y)(p,{children:"Recent tags:"}),(0,r.Y)(h,{children:A.map(e=>(0,r.Y)(u,{$color:e.color,$textColor:(0,a.B_)(e.color),onClick:t=>{t.stopPropagation(),n(e)},children:e.name},e.name))})]}),(0,r.Y)(c,{children:i?(0,r.FD)(m,{onSubmit:e=>{e.preventDefault(),e.stopPropagation(),C()},children:[(0,r.FD)(f,{$color:k,children:[(0,r.Y)(x,{$color:k,onClick:()=>{const e=(s.indexOf(k)+1)%s.length;Y(s[e])},title:"Click to change color"}),(0,r.Y)(v,{contentEditable:!0,onInput:e=>{const t=e.currentTarget.textContent||"";if(t.length<=20)$(t);else{const n=t.slice(0,20);e.currentTarget.textContent=n,$(n);const r=document.createRange(),o=window.getSelection();r.selectNodeContents(e.currentTarget),r.collapse(!1),o?.removeAllRanges(),o?.addRange(r)}},onKeyDown:e=>{"Enter"===e.key?(e.preventDefault(),C()):"Escape"===e.key&&(l(!1),$(""))},onClick:e=>e.stopPropagation(),"data-placeholder":"Tag name...",autoFocus:!0})]}),(0,r.FD)(y,{children:[(0,r.Y)(w,{type:"submit",$primary:!0,disabled:!b.trim(),onClick:e=>e.stopPropagation(),children:"Add"}),(0,r.Y)(w,{type:"button",onClick:e=>{e.stopPropagation(),l(!1),$("")},children:"Cancel"})]})]}):(0,r.Y)(g,{onClick:e=>{e.stopPropagation(),l(!0)},children:"+ Create custom tag"})})]})}])},38811(e,t,n){n.d(t,{m:()=>D});var r=n(10201),o=n(17402),i=n(51533),a=n(12964),l=n(87109),s=n(65562),d=n(73918),c=n(86031),p=n(4738),h=n(81616),u=n(63679),g=n(75654);const m=u.Ay.div` 5202 display: contents; 5203`,f=u.Ay.div` 5204 position: relative; 5205 display: inline-flex; 5206 align-items: center; 5207 gap: 2px; 5208 background: rgba(150, 190, 230, 0.12); 5209 border: 1px solid rgba(150, 190, 230, 0.25); 5210 padding: 1px 6px; 5211 border-radius: 3px; 5212 font-size: 0.55em; 5213 font-weight: 700; 5214 text-transform: uppercase; 5215 letter-spacing: 0.025em; 5216 line-height: 1.3; 5217 white-space: nowrap; 5218 cursor: ${e=>e.$clickable?"pointer":"default"}; 5219 user-select: none; 5220 transition: all 0.2s ease; 5221 5222 svg { 5223 color: ${g.qA}; 5224 } 5225 span { 5226 ${g.Fj} 5227 } 5228 5229 ${e=>e.$clickable&&"\n &:hover { opacity: 0.85; transform: scale(1.05); }\n &:active { transform: scale(0.95); }\n "} 5230`,x=u.Ay.div` 5231 position: relative; 5232 background: ${e=>e.$owned?"var(--theme-palette-color-12, #90f263)":"rgba(67, 74, 86, 0.35)"}; 5233 border: 1px solid 5234 ${e=>e.$owned?"transparent":"var(--theme-palette-color-5)"}; 5235 color: ${e=>e.$owned?"var(--theme-palette-color-7)":"var(--theme-palette-color-3)"}; 5236 padding: 1px 6px; 5237 border-radius: 3px; 5238 font-size: 0.55em; 5239 font-weight: 700; 5240 text-transform: uppercase; 5241 letter-spacing: 0.025em; 5242 line-height: 1.3; 5243 white-space: nowrap; 5244 cursor: ${e=>e.$clickable?"pointer":"default"}; 5245 opacity: ${e=>e.$updating?.6:1}; 5246 transition: all 0.2s ease; 5247 user-select: none; 5248 5249 ${e=>e.$clickable&&!e.$updating&&"\n &:hover {\n opacity: 0.85;\n transform: scale(1.05);\n }\n\n &:active {\n transform: scale(0.95);\n }\n "} 5250`,v=u.Ay.div` 5251 position: absolute; 5252 top: 100%; 5253 left: 0; 5254 margin-top: 4px; 5255 background: rgba(0, 0, 0, 0.5); 5256 backdrop-filter: blur(8px); 5257 -webkit-backdrop-filter: blur(8px); 5258 border: 1px solid var(--theme-palette-color-5); 5259 border-radius: 8px; 5260 padding: 8px; 5261 box-shadow: 5262 0 8px 16px rgba(0, 0, 0, 0.15), 5263 0 4px 6px rgba(0, 0, 0, 0.1); 5264 z-index: 1000; 5265 display: flex; 5266 flex-direction: column; 5267 gap: 6px; 5268 min-width: 140px; 5269 animation: slideDown 0.15s ease-out; 5270 5271 @keyframes slideDown { 5272 from { 5273 opacity: 0; 5274 transform: translateY(-8px); 5275 } 5276 to { 5277 opacity: 1; 5278 transform: translateY(0); 5279 } 5280 } 5281`,y=u.Ay.div` 5282 display: flex; 5283 flex-direction: column; 5284 gap: 4px; 5285`,w=u.Ay.div` 5286 font-size: 0.65em; 5287 color: rgba(255, 255, 255, 0.7); 5288 text-transform: uppercase; 5289 font-weight: bold; 5290 text-align: center; 5291 ${e=>e.$foil&&g.Fj} 5292`,b=u.Ay.div` 5293 display: flex; 5294 align-items: center; 5295 gap: 4px; 5296`,$=u.Ay.div` 5297 flex: 1; 5298 background: rgba(255, 255, 255, 0.05); 5299 border: 1px solid rgba(255, 255, 255, 0.1); 5300 border-radius: 4px; 5301 color: rgba(255, 255, 255, 0.4); 5302 font-size: 12px; 5303 font-weight: bold; 5304 text-align: center; 5305 padding: 4px; 5306 height: 28px; 5307 display: flex; 5308 align-items: center; 5309 justify-content: center;
5310 cursor: not-allowed; 5311`,k=u.Ay.button` 5312 background: rgba(255, 255, 255, 0.1); 5313 border: 1px solid rgba(255, 255, 255, 0.2); 5314 border-radius: 4px; 5315 color: white; 5316 width: 28px; 5317 height: 28px; 5318 font-size: 16px; 5319 font-weight: bold; 5320 cursor: pointer; 5321 display: flex; 5322 align-items: center; 5323 justify-content: center; 5324 transition: all 0.15s ease; 5325 5326 &:hover { 5327 background: rgba(255, 255, 255, 0.2); 5328 } 5329 5330 &:active { 5331 transform: scale(0.95); 5332 } 5333`,Y=u.Ay.input` 5334 flex: 1; 5335 background: rgba(255, 255, 255, 0.1); 5336 border: 1px solid rgba(255, 255, 255, 0.2); 5337 border-radius: 4px; 5338 color: white; 5339 font-size: 14px; 5340 font-weight: bold; 5341 text-align: center; 5342 padding: 4px; 5343 width: 100%; 5344 height: 28px; 5345 ${e=>e.$foil&&g.jt} 5346 5347 &:focus { 5348 outline: none; 5349 border-color: #4caf50; 5350 } 5351 5352 /* Hide spin buttons */ 5353 &::-webkit-outer-spin-button, 5354 &::-webkit-inner-spin-button { 5355 -webkit-appearance: none; 5356 margin: 0; 5357 } 5358 -moz-appearance: textfield; 5359`,A=u.Ay.button` 5360 background: #4caf50; 5361 border: none; 5362 border-radius: 4px; 5363 color: white; 5364 font-size: 0.7em; 5365 font-weight: bold; 5366 text-transform: uppercase; 5367 padding: 6px 12px; 5368 cursor: pointer; 5369 transition: all 0.15s ease; 5370 5371 &:hover { 5372 background: #45a049; 5373 } 5374 5375 &:active { 5376 transform: scale(0.95); 5377 } 5378`,C=({hasFoilOption:e,shouldDisableNonFoil:t,shouldDisableFoil:n,standardInputValue:o,setStandardInputValue:i,foilInputValue:a,setFoilInputValue:l,standardInputRef:s,onKeyDown:d,onSave:c})=>(0,r.FD)(v,{onClick:e=>e.stopPropagation(),children:[e?(0,r.FD)(r.FK,{children:[(0,r.FD)(y,{children:[(0,r.Y)(w,{children:"Standard:"}),t?(0,r.Y)($,{title:"This card is only available in foil",children:"N/A"}):(0,r.FD)(b,{children:[(0,r.Y)(k,{onClick:()=>{const e=parseInt(o)||0;e>0&&i((e-1).toString())},children:"â"}),(0,r.Y)(Y,{ref:s,type:"number",min:"0",value:o,onChange:e=>i(e.currentTarget.value),onKeyDown:d,onWheel:e=>e.currentTarget.blur()}),(0,r.Y)(k,{onClick:()=>{const e=parseInt(o)||0;i((e+1).toString())},children:"+"})]})]}),(0,r.FD)(y,{children:[(0,r.Y)(w,{$foil:!0,children:"Foil:"}),n?(0,r.Y)($,{title:"This card is only available in non-foil",children:"N/A"}):(0,r.FD)(b,{children:[(0,r.Y)(k,{onClick:()=>{const e=parseInt(a)||0;e>0&&l((e-1).toString())},children:"â"}),(0,r.Y)(Y,{$foil:!0,type:"number",min:"0",value:a,onChange:e=>l(e.currentTarget.value),onKeyDown:d,onWheel:e=>e.currentTarget.blur()}),(0,r.Y)(k,{onClick:()=>{const e=parseInt(a)||0;l((e+1).toString())},children:"+"})]})]})]}):(0,r.FD)(r.FK,{children:[(0,r.Y)(w,{children:"Owned count:"}),(0,r.FD)(b,{children:[(0,r.Y)(k,{onClick:()=>{const e=parseInt(o)||0;e>0&&i((e-1).toString())},children:"â"}),(0,r.Y)(Y,{ref:s,type:"number",min:"0",value:o,onChange:e=>i(e.currentTarget.value),onKeyDown:d,onWheel:e=>e.currentTarget.blur()}),(0,r.Y)(k,{onClick:()=>{const e=parseInt(o)||0;i((e+1).toString())},children:"+"})]})]}),(0,r.Y)(A,{onClick:c,children:"Save"})]});async function F(e,t,n){t.forEach(t=>(0,d.Q)({card:e,...t})),n();for(const{type:n,count:r,trade:o}of t)await(0,i.s)(e,n,r,void 0===o?{}:{trade:o});window.DotGGUser&&0!==(0,l.KJ)()&&(0,l.XY)()}const D=({cardId:e,isOwned:t,onUpdate:n,readOnly:i=!1,card:l,alienTotalCount:d,countsElement:u})=>{const[g,v]=(0,o.J0)(!1),[y,w]=(0,o.J0)(!1),[b,$]=(0,o.J0)(""),[k,Y]=(0,o.J0)(""),A=(0,o.li)(null),D=(0,o.li)(null),S=(0,h.h3)(),I=!1!==c.SA.collection.collectionFoil,z="true"===(0,p.Ri)("collection-unrestricted"),T=(c.SA.cards?.priceProviders?.length??0)>0,{hasNonFoilPrice:E,hasFoilPrice:L}=l?(0,s.WM)(l):{hasNonFoilPrice:!0,hasFoilPrice:!0},M=!z&&T&&I&&L&&!E,N=!z&&T&&I&&E&&!L,{standardCount:P,foilCount:O,totalCount:_}=(0,o.Kr)(()=>{if(void 0!==d)return{standardCount:d,foilCount:0,totalCount:d};const t=u??S?.collection?.find(t=>t.card===e);if(!t)return{standardCount:0,foilCount:0,totalCount:0};const n=parseInt(t.standard||"0"),r=parseInt(t.foil||"0");return{standardCount:n,foilCount:r,totalCount:n+r}},[S?.collection,e,d,u]);var R,j,J;R=A,j=y,J=()=>w(!1),(0,o.vJ)(()=>{if(!j)return;const e=e=>{R.current&&!R.current.contains(e.target)&&J()};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[j,J,R]),(0,o.vJ)(()=>{y&&D.current&&($(P.toString()),Y(O.toString()),D.current.focus(),D.current.select())},[y,P,O]);const B=(0,o.hb)(()=>
5378{if(!l)return"standard";const e=(c.SA.cards?.priceProviders?.length??0)>0,t=c.SA.collection.collectionFoil;if(!e||!t)return"standard";const{hasNonFoilPrice:n,hasFoilPrice:r}=(0,s.WM)(l);return!n&&r?"foil":"standard"},[l]),K=(0,o.hb)(async r=>{if(r.stopPropagation(),!g&&!i)if(t)w(!y);else{v(!0);try{await F(e,[{type:B(),count:1}],n)}catch(e){console.error("Failed to update collection:",e)}finally{v(!1)}}},[e,t,g,i,n,B,y]),W=(0,o.hb)(async(t,r)=>{if(!g){v(!0),w(!1);try{const o=t+r===0?0:void 0,i=[{type:"standard",count:t,trade:o}];I&&i.push({type:"foil",count:r,trade:o}),await F(e,i,n)}catch(e){console.error("Failed to update collection:",e)}finally{v(!1)}}},[e,g,n,I]),U=(0,o.hb)(e=>{if("Enter"===e.key){e.preventDefault();const t=Math.max(0,parseInt(b)||0),n=I?Math.max(0,parseInt(k)||0):0;W(t,n)}else"Escape"===e.key&&w(!1)},[b,k,W,I]),Q={showStandard:!(G={isUpdating:g,isOwned:t,readOnly:i,standardCount:P,foilCount:O,totalCount:_}).isOwned||G.standardCount>0||0===G.foilCount||G.isUpdating,showFoil:G.isOwned&&G.foilCount>0,label:G.isUpdating?"...":G.isOwned?`Owned Ã${G.foilCount>0?G.standardCount:G.totalCount}`:"Not owned",standardTitle:G.readOnly?G.isOwned?`Owned Ã${G.totalCount}`:"Not owned":G.isOwned?"Click to edit count":"Click to mark as owned",foilTitle:G.readOnly?`${G.foilCount} foil`:"Click to edit count"};var G;const H=!Q.showStandard,q=y&&!i?(0,r.Y)(C,{hasFoilOption:I,shouldDisableNonFoil:M,shouldDisableFoil:N,standardInputValue:b,setStandardInputValue:$,foilInputValue:k,setFoilInputValue:Y,standardInputRef:D,onKeyDown:U,onSave:()=>{const e=Math.max(0,parseInt(b)||0),t=I?Math.max(0,parseInt(k)||0):0;W(e,t)}}):null;return(0,r.FD)(m,{ref:A,children:[Q.showStandard&&(0,r.FD)(x,{$owned:t,$clickable:!i,$updating:g,onClick:i?void 0:K,title:Q.standardTitle,children:[Q.label,!H&&q]}),Q.showFoil&&(0,r.FD)(f,{$clickable:!i,onClick:i?void 0:K,title:Q.foilTitle,children:[(0,r.Y)(a.RE,{size:9}),(0,r.FD)("span",{children:["Foil Ã",O]}),H&&q]})]})}},57387(e,t,n){n.d(t,{BU:()=>u,Uz:()=>m,WJ:()=>g});var r=n(51533),o=(n(33151),n(87109)),i=n(65562),a=n(81616);function l(e){const t=a.Ab.getState().get();t?.collection&&a.Ab.updateState({...t,collection:e(t.collection)})}function s(e){const t=parseInt(e?.standard||"0"),n=parseInt(e?.foil||"0"),r=n>0&&0===t?"foil":"standard";return{currentStandard:t,currentFoil:n,useType:r,useCount:"foil"===r?n:t}}function d(e,t){return{trade:parseInt(("foil"===t?e?.trade_foil:e?.trade)||"0"),wish:parseInt(("foil"===t?e?.wish_foil:e?.wish)||"0")}}function c(e){if(!e?.extra_data)return{};try{return"string"==typeof e.extra_data?JSON.parse(e.extra_data):e.extra_data}catch(e){return{}}}function p(e,t,n){l(r=>{const o=r.findIndex(t=>t.card===e);if(-1!==o){const e=r.slice();return e[o]={...e[o],extra_data:t},e}return n?[...r,{card:e,standard:"0",foil:"0",total:"0",trade:"0",wish:"0",extra_data:t}]:r})}function h(e,t,n){const{useType:o,useCount:i}=s(n.element);return(0,r.s)(e,o,n.binderMode?i||0:void 0,{extra:JSON.stringify(t)})}async function u(e,t,n){const{element:r,onUpdate:i,binderMode:a}=n,l=c(r),s=l.customTags||[];s.some(e=>e.name.toLowerCase()===t.name.toLowerCase())||(l.customTags=[...s,t],a||p(e,l,!0),i(),await h(e,l,n),a&&(0,o.XY)())}async function g(e,t,n){const{element:r,onUpdate:i,binderMode:a}=n;if(!r)return;const l=c(r),s=l.customTags||[];l.customTags=s.filter(e=>e.name!==t),a||p(e,l,!1),i(),await h(e,l,n),a&&(0,o.XY)()}async function m(e,t,n,o){const{onUpdate:a,card:c}=o,p=n?.collection?.find(t=>t.card===e),{currentStandard:h,currentFoil:u}=s(p),g=h+u,m=d(p,"standard"),f=d(p,"foil"),x=function(e){if(!e)return"standard";const{hasNonFoilPrice:t,hasFoilPrice:n}=(0,i.WM)(e);return n&&!t?"foil":"standard"}(c),v=e=>({std:e&&"standard"===x?1:0,foil:e&&"foil"===x?1:0});let y={std:m.trade,foil:f.trade},w={std:m.wish,foil:f.wish};"trade"===t?y=v(m.trade+f.trade===0&&g>0):"wish"===t?w=v(m.wish+f.wish===0):(y={std:0,foil:0},w={std:0,foil:0});const b=[["standard",y.std,m.trade,w.std,m.wish],["foil",y.foil,f.trade,w.foil,f.wish]].map(([t,n,r,o,i])=>({card:e,type:t,trade:n!==r?n:void 0,wish:o!==i?o:void 0})).filter(e=>void 0!==e.trade||void 0!==e.wish);l(e=>b.reduce((e,t)=>
5378(0,i.GB)(e,t),e)),a(),await Promise.all(b.map(t=>(0,r.s)(e,t.type,void 0,{trade:t.trade,wish:t.wish})))}},76162(e,t,n){n.d(t,{S:()=>S});var r=n(10201),o=n(17402),i=n(63679),a=n(17083),l=n(52905),s=n(36110),d=n(84827),c=n(90199),p=n(91181),h=n(81616),u=n(24499),g=n(12434);function m(e,t){return e.boards?Object.values((0,d.Z)(e.boards)).reduce((e,n)=>e+(Number(n[t])||0),0):Number(e.deck?.[t])||0}const f=({cardId:e,top:t,left:n,popupRef:i})=>{const[d,f]=(0,o.J0)(null),[Y,A]=(0,o.J0)(!1),C=(0,h.h3)(),F=(0,p.Yx)(),D=(0,c.zz)(),S=(0,o.Kr)(()=>(d??[]).reduce((t,n)=>t+m(n,e),0),[d,e]),I=(0,o.Kr)(()=>{if(!C?.collection)return 0;const{toBaseId:t,ownedByBase:n}=(0,s.Yy)(F,C.collection,D);return n[t(e)]||0},[F,C?.collection,e,D]);(0,o.vJ)(()=>{let t=!1;const n={page:1,limit:30,srt:"date",direct:"desc",type:"",my:1,myarchive:0,fav:0,getdecks:{...u.X,hascrd:[e]}};return(0,a.Br)(n,[],void 0,!0).then(e=>{t||f(e)}).catch(()=>{t||A(!0)}),()=>{t=!0}},[e]);const z=`${g.Ay.BASE_FOLDER}decks/?my=1&hascrd=${e}`;return(0,r.FD)(l.t1,{ref:i,$top:t,$left:n,onClick:e=>e.stopPropagation(),children:[(0,r.Y)(l.eN,{children:"In your decks:"}),Y&&(0,r.Y)(x,{children:"Couldn't load decks â try again"}),!Y&&null===d&&(0,r.Y)(x,{children:"Loadingâ¦"}),null!==d&&0===d.length&&(0,r.Y)(x,{children:"No decks found"}),null!==d&&d.length>0&&(0,r.FD)(r.FK,{children:[(0,r.Y)(y,{children:d.map(t=>(0,r.FD)(w,{href:`${g.Ay.BASE_FOLDER}decks/${t.slug}`,children:[(0,r.Y)(b,{children:t.humanname||t.name}),(0,r.FD)($,{children:["Ã",m(t,e)]})]},t.slug))}),(0,r.FD)(v,{$short:I<S,children:["Need ",S," across decks · you own ",I]})]}),(0,r.Y)(k,{href:z,target:"_blank",rel:"noreferrer",children:"Open in My Decks â"})]})},x=i.Ay.div` 5379 font-size: 0.7em; 5380 color: rgba(255, 255, 255, 0.6); 5381 padding: 2px 4px; 5382`,v=i.Ay.div` 5383 font-size: 0.72em; 5384 padding: 4px 4px 2px; 5385 margin-top: 2px; 5386 border-top: 1px solid rgba(255, 255, 255, 0.12); 5387 color: ${e=>e.$short?"#f0b429":"rgba(255, 255, 255, 0.6)"}; 5388 font-weight: ${e=>e.$short?600:400}; 5389`,y=i.Ay.div` 5390 display: flex; 5391 flex-direction: column; 5392 gap: 2px; 5393 max-height: 220px; 5394 overflow-y: auto; 5395`,w=i.Ay.a` 5396 display: flex; 5397 justify-content: space-between; 5398 align-items: baseline; 5399 gap: 8px; 5400 font-size: 0.75em; 5401 padding: 3px 4px; 5402 border-radius: 4px; 5403 color: var(--theme-palette-color-3); 5404 text-decoration: none; 5405 5406 &:hover { 5407 background: rgba(255, 255, 255, 0.08); 5408 color: var(--theme-palette-color-1); 5409 } 5410`,b=i.Ay.span` 5411 overflow: hidden; 5412 text-overflow: ellipsis; 5413 white-space: nowrap; 5414`,$=i.Ay.span` 5415 flex-shrink: 0; 5416 opacity: 0.7; 5417`,k=i.Ay.a` 5418 font-size: 0.7em; 5419 padding: 4px; 5420 color: var(--theme-palette-color-1); 5421 text-decoration: none; 5422 border-top: 1px solid rgba(255, 255, 255, 0.1); 5423 margin-top: 2px; 5424 5425 &:hover { 5426 text-decoration: underline; 5427 } 5428`;var Y=n(33151),A=n(57387),C=n(65562),F=n(86031);const D=({top:e,left:t,popupRef:n,currentTag:o,customTags:i,allExistingTags:a,hideSystemTags:s,onTagSelect:d,onAddTag:c,onRemoveTag:p})=>(0,r.FD)(l.t1,{ref:n,$top:e,$left:t,onClick:e=>e.stopPropagation(),children:[!s&&(0,r.FD)(l.oz,{children:[(0,r.FD)(l.bT,{$color:l.g1.wish,$active:"in-wishlist"===o,onClick:e=>{e.stopPropagation(),d("in-wishlist"===o?null:"wish")},children:["in-wishlist"===o?"â ":"","In wishlist"]}),F.SA.collection.collectionCanTrade&&(0,r.FD)(l.bT,{$color:l.g1.trade,$active:"for-trade"===o,onClick:e=>{e.stopPropagation(),d("for-trade"===o?null:"trade")},children:["for-trade"===o?"â ":"","For trade"]})]}),i.length>0&&(0,r.Y)(l.cG,{}),i.length>0&&(0,r.FD)(l.wQ,{children:[(0,r.Y)(l.eN,{children:"Current tags (click to remove):"}),(0,r.Y)(l.Sk,{children:i.map(e=>(0,r.FD)(l.PX,{$color:e.color,onClick:t=>{t.stopPropagation(),p(e.name)},children:["â ",e.name]},e.name))})]}),(0,r.Y)(l.cG,{}),(0,r.Y)(Y._,{currentTags:i,allExistingTags:a,onAddTag:c,onRemoveTag:p})]}),S=({cardId:e,currentTag:t,customTags:n,onUpdate:i,alienMode:a=!1,customBinderActive:s=!1,binderElement:d,tradeCount:c,wishCount:p,card:u})=>{const[g,m]=(0,o.J0)(!1),[x,v]=(0,o.J0)(!1),[y,w]=(0,o.J0)(null),[b,$]=(0,o.J0)(null),k=(0,o.li)(null),Y=(0,o.li)(null),F=(0,o.li)(null),S=(0,o.li)(null),I=(0,h.h3)(),z=(0,o.Kr)(()=>
5428{if(!a)return I?.deckCardCounts?.[e]},[I?.deckCardCounts,e,a]),T=(0,C.sp)(I?.collection);(0,o.vJ)(()=>{const e=e=>{const t=e.target;k.current&&!k.current.contains(t)&&F.current&&!F.current.contains(t)&&m(!1),Y.current&&!Y.current.contains(t)&&S.current&&!S.current.contains(t)&&$(null)};if(g||b)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[g,b]);const E=(0,o.hb)(e=>{if(e.stopPropagation(),!g&&F.current){const e=F.current.getBoundingClientRect();w({top:e.bottom+4,left:e.left})}m(!g)},[g]),L=(0,o.hb)(()=>s?d:I?.collection?.find(t=>t.card===e),[s,d,I?.collection,e]),M=(0,o.hb)(async t=>{if(!x){v(!0);try{await(0,A.BU)(e,t,{element:L(),onUpdate:i,binderMode:s})}catch(e){console.error("Failed to add custom tag:",e)}finally{v(!1)}}},[e,x,i,L,s]),N=(0,o.hb)(async t=>{if(!x){v(!0);try{await(0,A.WJ)(e,t,{element:L(),onUpdate:i,binderMode:s})}catch(e){console.error("Failed to remove custom tag:",e)}finally{v(!1)}}},[e,x,i,L,s]),P=(0,o.hb)(async t=>{if(!x&&!s){v(!0),m(!1);try{await(0,A.Uz)(e,t,I,{onUpdate:i,card:u})}catch(e){console.error("Failed to update tag:",e)}finally{v(!1)}}},[e,x,i,I,s,u]),O=[];return void 0!==c||void 0!==p?(c&&O.push({key:"trade",text:`For trade Ã${c}`}),p&&O.push({key:"wish",text:`In wishlist Ã${p}`})):t&&O.push("for-trade"===t?{key:"trade",text:"For trade"}:{key:"wish",text:"In wishlist"}),(0,r.FD)(l.Im,{children:[O.map(e=>(0,r.Y)(l.Ee,{$color:l.g1[e.key],$updating:x,onClick:a?void 0:E,title:a?e.text:"Click to manage tags",children:x?"...":e.text},e.key)),n.map(e=>(0,r.Y)(l.Ee,{$color:e.color,$updating:x,onClick:a?void 0:E,title:a?e.name:"Click to manage tags",children:e.name},e.name)),z&&(0,r.FD)(l.Ee,{ref:S,$neutral:!0,$updating:!1,onClick:e=>{if(e.stopPropagation(),b)$(null);else if(S.current){const e=S.current.getBoundingClientRect();$({top:e.bottom+4,left:e.left})}},title:`Used in ${z.decks} deck${1!==z.decks?"s":""} (need ${z.qty} copies) â Click to list them`,children:["In ",z.decks," ",1===z.decks?"deck":"decks"]}),!a&&(0,r.Y)(l.Ee,{ref:F,$neutral:!0,$isDefault:!0,$updating:x,onClick:E,title:"Click to add tag",children:"+tag"}),b&&(0,o.d5)((0,r.Y)(f,{cardId:e,top:b.top,left:b.left,popupRef:Y}
5428),document.body),g&&!a&&y&&(0,o.d5)((0,r.Y)(D,{top:y.top,left:y.left,popupRef:k,currentTag:t,customTags:n,allExistingTags:T,hideSystemTags:s,onTagSelect:P,onAddTag:M,onRemoveTag:N}),document.body)]})}},52905(e,t,n){var r=n(63679);const o=r.Ay.div` 5429 display: contents; 5430`,i=r.Ay.div` 5431 position: relative; 5432 background: ${e=>e.$neutral?"rgba(67, 74, 86, 0.35)":e.$color}; 5433 color: ${e=>e.$neutral?"var(--theme-palette-color-3)":"white"}; 5434 padding: 1px 6px; 5435 border-radius: 3px; 5436 font-size: 0.55em; 5437 font-weight: 700; 5438 text-transform: uppercase; 5439 letter-spacing: 0.025em; 5440 line-height: 1.3; 5441 white-space: nowrap; 5442 cursor: pointer; 5443 opacity: ${e=>e.$updating?.6:e.$isDefault?.8:1}; 5444 transition: all 0.2s ease; 5445 user-select: none; 5446 border: 1px solid 5447 ${e=>e.$isDefault||e.$neutral?"var(--theme-palette-color-5)":"transparent"}; 5448 ${e=>e.$isDefault?"border-style: dashed;":""} 5449 5450 ${e=>!e.$updating&&`\n &:hover {\n opacity: ${e.$isDefault?1:.85};\n ${e.$neutral?"color: var(--theme-palette-color-4); border-color: var(--theme-palette-color-3);":""}\n transform: scale(1.05);\n }\n\n &:active {\n transform: scale(0.95);\n }\n `} 5451`,a=r.Ay.div` 5452 position: fixed; 5453 top: ${e=>e.$top}px; 5454 left: ${e=>e.$left}px; 5455 background: rgba(0, 0, 0, 0.5); 5456 backdrop-filter: blur(8px); 5457 -webkit-backdrop-filter: blur(8px); 5458 border: 1px solid var(--theme-palette-color-5); 5459 border-radius: 8px; 5460 padding: 8px; 5461 box-shadow: 5462 0 8px 16px rgba(0, 0, 0, 0.15), 5463 0 4px 6px rgba(0, 0, 0, 0.1); 5464 z-index: 10000; 5465 display: flex; 5466 flex-direction: column; 5467 gap: 6px; 5468 width: 180px; 5469 animation: slideDown 0.15s ease-out; 5470 5471 @keyframes slideDown { 5472 from { 5473 opacity: 0; 5474 transform: translateY(-8px); 5475 } 5476 to { 5477 opacity: 1; 5478 transform: translateY(0); 5479 } 5480 } 5481`,l=r.Ay.div` 5482 background-color: ${e=>e.$color}; 5483 color: white; 5484 padding: 3px 10px; 5485 border-radius: 50px; 5486 font-size: 0.6em; 5487 font-weight: bold; 5488 text-transform: uppercase; 5489 line-height: 1.2; 5490 white-space: nowrap; 5491 cursor: pointer; 5492 transition: all 0.15s ease; 5493 user-select: none; 5494 text-align: center; 5495 opacity: ${e=>e.$active?1:.7}; 5496 border: ${e=>e.$active?"2px solid rgba(255, 255, 255, 0.5)":"none"}; 5497 5498 &:hover { 5499 opacity: 0.85; 5500 transform: scale(1.05); 5501 } 5502 5503 &:active { 5504 transform: scale(0.95); 5505 } 5506`,s=r.Ay.div` 5507 display: flex; 5508 flex-direction: column; 5509 gap: 4px; 5510`,d=r.Ay.div` 5511 display: flex; 5512 flex-direction: column; 5513 gap: 4px; 5514`,c=r.Ay.div` 5515 font-size: 0.65em; 5516 color: rgba(255, 255, 255, 0.5); 5517 text-transform: uppercase; 5518 font-weight: bold; 5519 padding: 0 4px; 5520`,p=r.Ay.div` 5521 display: flex; 5522 flex-wrap: wrap; 5523 gap: 4px; 5524`,h=r.Ay.div` 5525 background-color: ${e=>e.$color}; 5526 color: white; 5527 padding: 3px 10px; 5528 border-radius: 50px; 5529 font-size: 0.6em; 5530 font-weight: bold; 5531 line-height: 1.2; 5532 white-space: nowrap; 5533 cursor: pointer; 5534 transition: all 0.15s ease; 5535 user-select: none; 5536 5537 &:hover { 5538 opacity: 0.85; 5539 text-decoration: line-through; 5540 } 5541 5542 &:active { 5543 transform: scale(0.95); 5544 } 5545`,u=r.Ay.div` 5546 height: 1px; 5547 background: rgba(255, 255, 255, 0.1); 5548 margin: 6px 0; 5549`;n.d(t,["Ee",0,i,"Im",0,o,"PX",0,h,"Sk",0,p,"bT",0,l,"cG",0,u,"eN",0,c,"g1",0,{trade:"#ff9800",wish:"#2196f3"},"oz",0,s,"t1",0,a,"wQ",0,d])},66701(e,t,n){n.d(t,{QS:()=>d});var r=n(10201),o=n(17402),i=n(63679),a=n(92475),l=n(86031),s=n(1537);class d extends o.Ay.Component{render(){const e=this.props.width??25,t=l.SA.cards.duoColorMode,n=l.SA.core.gameColors,o=this.props.colors[0],i=this.props.colors[1];switch(t){case"gradient":return(0,r.Y)(s.x,{$active:!1,$width:e,$gradient:[n[o].gradient?.[0],this.props.colors.length>1?n[i].gradient?.[1]:n[o].gradient?.[1]],$color:"var(--theme-palette-color-4)",title:n[o].label,$borderColor:n[o].border??""});case"halficon":return(0,r.FD)(c,{$width:e,children:[(0,r.Y)(p,{height:e,width:e,src:n[o].icon}),(0,r.Y)(p,{$clipRight:!0,height:e,width:e,src:n[i].icon})]});case"twoicons":return(0,r.FD)(r.FK,{children:[""!==n[o].icon?(0,r.Y)(a.D,{$height:e.toString(),$width:e.toString(),src:n[o].icon}):(0,r.Y)(r.FK,{}),""!==n[i].icon?(0,r.Y)(a.D,{$height:e.toString(),$width:e.toString(),src:n[i].icon}):(0,r.Y)(r.FK,{})]})}}}const c=i.Ay.div` 5550 display: inline-flex; 5551 width: ${e=>e.$width+"px"}; 5552 flex-basis: ${e=>e.$width+"px"}; 5553 height: ${e=>e.$width+"px"}; 5554`,p=i.Ay.img` 5555 ${e=>
5555e.$clipRight?"clip-path: polygon(50% 0px, 100% 0px, 100% 100%, 50% 100%);":"clip-path: polygon(50% 0px, 0px 0px, 0 100%, 50% 100%);"} 5556 position: absolute; 5557`},47883(e,t,n){var r=n(10201),o=n(17402),i=n(63679),a=n(92366);const l=(0,o.q6)("classic"),s=l.Provider,d=()=>(0,o.NT)(l),c=i.I4.div` 5558 flex: none; 5559 display: flex; 5560 align-items: center; 5561 gap: 8px; 5562 a { 5563 font-size: 12.5px; 5564 font-weight: 600; 5565 white-space: nowrap; 5566 } 5567`,p=(0,i.I4)(a.Zk)` 5568 --detail-elevation: none; 5569`,h=i.I4.div` 5570 display: flex; 5571 flex-direction: column; 5572 gap: 10px; 5573 padding: 12px 14px; 5574`;n.d(t,["$w",0,s,"JH",0,({title:e,nav:t,actions:n,classic:o,children:i})=>{if("v2"!==d())return o(i,n);const l=t??("string"==typeof e?e:""),s=(e=>e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,""))(l);return(0,r.Y)(p,{id:s,"data-section":s,"data-section-label":l,"data-chrome":"v2",children:(0,r.FD)(h,{children:[(0,r.FD)(a.ZX,{children:[(0,r.Y)(a.xw,{children:e}),n?(0,r.Y)(c,{children:n}):null]}),i]})})},"ns",0,d])},92366(e,t,n){var r=n(63679);const o=r.I4.div` 5575 background-color: var(--theme-palette-color-7); 5576 border: 1px solid var(--theme-palette-color-5); 5577 border-radius: 6px; 5578`,i=r.I4.div` 5579 font-size: 9.5px; 5580 letter-spacing: 0.07em; 5581 text-transform: uppercase; 5582 color: var(--theme-palette-color-3); 5583`,a=r.I4.div` 5584 font-size: 10px; 5585 letter-spacing: 0.04em; 5586 text-transform: uppercase; 5587 color: var(--theme-palette-color-3); 5588`,l=r.I4.div` 5589 font-size: 13px; 5590 font-weight: 700; 5591 color: var(--theme-palette-color-4); 5592`,s=r.I4.div` 5593 display: flex; 5594 align-items: baseline; 5595 justify-content: space-between; 5596 gap: 10px; 5597`,d=r.I4.span` 5598 display: inline-flex; 5599 align-items: center; 5600 padding: ${e=>e.$pill?"3px 10px":"2px 8px"}; 5601 border-radius: ${e=>e.$pill?"999px":"3px"}; 5602 border: 1px solid 5603 ${e=>e.$pill?"transparent":"var(--theme-palette-color-5)"}; 5604 background-color: ${e=>e.$pill?"var(--theme-palette-color-5)":"var(--theme-palette-color-8)"}; 5605 font-size: ${e=>e.$pill?"12px":"11.5px"}; 5606 font-weight: ${e=>e.$pill?600:400}; 5607 color: var(--theme-palette-color-4) !important; 5608 text-decoration: none !important; 5609`,c=r.I4.span` 5610 display: inline-flex; 5611 align-items: center; 5612 gap: 4px; 5613 height: 22px; 5614 padding: 0 8px; 5615 flex: none; 5616 white-space: nowrap; 5617 border-radius: 4px; 5618 font-size: 11px; 5619 font-weight: 700; 5620 border: 1px solid ${e=>e.$tone}; 5621 background-color: ${e=>`color-mix(in srgb, ${e.$tone} 12%, transparent)`}; 5622 color: ${e=>e.$tone}; 5623`,p=r.I4.div` 5624 display: flex; 5625 flex-wrap: wrap; 5626 gap: 5px; 5627 align-items: center; 5628`,h=(r.I4.span` 5629 font-variant-numeric: tabular-nums; 5630`,r.I4.div` 5631 height: 1px; 5632 background-color: var(--theme-palette-color-5); 5633`),u=r.I4.div` 5634 display: flex; 5635 align-items: baseline; 5636 justify-content: space-between; 5637 gap: 8px; 5638`;n.d(t,["KT",0,a,"Lj",0,p,"N3",0,c,"ZX",0,s,"Zk",0,o,"fo",0,i,"jO",0,h,"vu",0,d,"xw",0,l,"y9",0,u])},68003(e,t,n){var r=n(63679),o=n(92366);const i=(e,t)=>e>0?`${t} `:"",a=(0,r.I4)(o.Zk)` 5639 display: grid; 5640 grid-template-columns: ${e=>`${i(e.$art,`${e.$art}px`)}1fr${e.$verdict?" 304px":""}`}; 5641 gap: 16px; 5642 padding: 12px; 5643 @media only screen and (max-width: 900px) { 5644 grid-template-columns: ${e=>`${i(e.$art,`${e.$art}px`)}1fr`}; 5645 gap: 12px; 5646 } 5647 @media only screen and (max-width: 700px) { 5648 grid-template-columns: ${e=>`${i(e.$art,`${Math.min(e.$art,112)}px`)}1fr`}; 5649 } 5650`,l=r.I4.div` 5651 display: flex; 5652 flex-direction: column; 5653 gap: 8px; 5654`,s=r.I4.img` 5655 width: ${e=>e.$art}px; 5656 height: ${e=>e.$square?e.$art:Math.round(1.485*e.$art)}px; 5657 object-fit: ${e=>e.$square?"contain":"cover"}; 5658 object-position: top center; 5659 padding: ${e=>e.$square?"10%":"0"}; 5660 box-sizing: border-box; 5661 border-radius: 6px; 5662 border: 1px solid var(--theme-palette-color-5); 5663 background-color: var(--theme-palette-color-8); 5664 cursor: zoom-in; 5665 @media only screen and (max-width: 700px) { 5666 width: ${e=>Math.min(e.$art,112)}px; 5667 height: ${e=>e.$square?Math.min(e.$art,112):166}px; 5668 } 5669`,d=r.I4.div` 5670 display: flex; 5671 align-items: center; 5672 gap: 4px; 5673`,c=r.I4.div` 5674 display: flex; 5675 align-items: center; 5676 gap: 4px; 5677 min-width: 0; 5678 overflow-x: auto; 5679 scroll-behavior: smooth; 5680 scroll-snap-type: x mandatory; 5681 scrollbar-width: none; 5682 &::-webkit-scrollbar {
5683 display: none; 5684 } 5685`,p=e=>`\n width: ${e}px;\n height: ${e}px;\n flex: none;\n padding: 0;\n border-radius: 4px;\n cursor: pointer;\n background-color: var(--theme-palette-color-8);\n`,h=p(28),u=r.I4.button` 5686 ${e=>p(e.$size??28)} 5687 overflow: hidden; 5688 scroll-snap-align: start; 5689 border: 1px solid 5690 ${e=>e.$on?"var(--theme-palette-color-1)":"var(--theme-palette-color-5)"}; 5691 img { 5692 display: block; 5693 width: 100%; 5694 height: 100%; 5695 object-fit: cover; 5696 object-position: top center; 5697 } 5698`,g=r.I4.button` 5699 ${h} 5700 display: flex; 5701 align-items: center; 5702 justify-content: center; 5703 border: 1px solid var(--theme-palette-color-5); 5704 color: var(--theme-palette-color-1); 5705`,m=r.I4.button` 5706 flex: none; 5707 width: 14px; 5708 height: 28px; 5709 padding: 0; 5710 border: none; 5711 background: none; 5712 color: var(--theme-palette-color-3); 5713 font-size: 15px; 5714 line-height: 1; 5715 cursor: pointer; 5716 opacity: ${e=>e.$spent?.25:1}; 5717 transition: opacity 150ms ease; 5718 &:hover { 5719 color: var(--theme-palette-color-4); 5720 } 5721 @media only screen and (max-width: 700px) { 5722 display: none; 5723 } 5724`,f=r.I4.div` 5725 display: flex; 5726 flex-direction: column; 5727 gap: 10px; 5728 min-width: 0; 5729`,x=r.I4.div` 5730 display: flex; 5731 align-items: center; 5732 gap: 10px; 5733 flex-wrap: wrap; 5734`,v=r.I4.h1` 5735 margin: 0; 5736 font-size: 20px; 5737 font-weight: 700; 5738 line-height: 1.15; 5739 color: var(--theme-palette-color-4); 5740`,y=r.I4.div` 5741 margin-top: -6px; 5742 font-size: 13px; 5743 color: var(--theme-palette-color-3); 5744`,w=r.I4.div` 5745 display: grid; 5746 grid-template-columns: ${e=>`repeat(${Math.max(e.$count,1)}, minmax(0, 1fr))`}; 5747 align-items: center; 5748 padding: 8px 0; 5749 border-top: 1px solid var(--theme-palette-color-5); 5750 border-bottom: 1px solid var(--theme-palette-color-5); 5751 @media only screen and (max-width: 700px) { 5752 grid-template-columns: 1fr 1fr; 5753 gap: 8px 10px; 5754 } 5755`,b=r.I4.a` 5756 display: flex; 5757 align-items: center; 5758 gap: 7px; 5759 padding: 0 12px; 5760 min-width: 0; 5761 color: inherit !important; 5762 text-decoration: none !important; 5763 &:first-child { 5764 padding-left: 0; 5765 } 5766 & + & { 5767 border-left: 1px solid var(--theme-palette-color-5); 5768 } 5769 @media only screen and (max-width: 700px) { 5770 padding: 0; 5771 & + & { 5772 border-left: none; 5773 } 5774 } 5775`,$=r.I4.img` 5776 width: 20px; 5777 height: 20px; 5778 flex: none; 5779 object-fit: contain; 5780`,k=r.I4.span` 5781 display: flex; 5782 flex-direction: column; 5783 line-height: 1.15; 5784`,Y=r.I4.span` 5785 font-size: 13.5px; 5786 font-weight: 600; 5787 color: var(--theme-palette-color-4); 5788`,A=r.I4.div` 5789 align-self: start; 5790 display: flex; 5791 flex-direction: column; 5792 gap: 8px; 5793 padding: 10px; 5794 border-radius: 6px; 5795 background-color: var(--theme-palette-color-8); 5796 border: 1px solid 5797 ${e=>e.$accent??"var(--theme-palette-color-5)"}; 5798 @media only screen and (max-width: 900px) { 5799 grid-column: 1 / -1; 5800 } 5801`,C=r.I4.div` 5802 display: grid; 5803 grid-template-columns: ${e=>`repeat(${Math.max(e.$count,1)}, minmax(0, 1fr))`}; 5804 gap: 5px; 5805`,F=r.I4.div` 5806 display: flex; 5807 flex-direction: column; 5808 gap: 4px; 5809`,D=r.I4.div` 5810 font-size: 9.5px; 5811 text-align: center; 5812 letter-spacing: 0.02em; 5813 color: var(--theme-palette-color-3); 5814 overflow: hidden; 5815 text-overflow: ellipsis; 5816 white-space: nowrap; 5817`,S=r.I4.div` 5818 height: 40px; 5819 display: flex; 5820 align-items: center; 5821 justify-content: center; 5822 border-radius: 4px; 5823 font-size: 21px; 5824 font-weight: 700; 5825 color: #fff; 5826 text-shadow: 0 1px 2px #0009; 5827 background-color: ${e=>e.$bgcolor??"var(--theme-palette-color-5)"}; 5828`,I=r.I4.div` 5829 display: flex; 5830 flex-direction: column; 5831 gap: 6px; 5832 border-radius: 4px; 5833 ${e=>e.$highlight?"outline: 2px solid var(--theme-palette-color-1);\n outline-offset: 4px;":""} 5834`;n.d(t,["ET",0,b,"FQ",0,$,"GP",0,g,"Ht",0,F,"LX",0,Y,"MR",0,l,"Ms",0,y,"QB",0,A,"SX",0,v,"T4",0,k,"T9",0,S,"XF",0,d,"Z9",0,c,"gj",0,D,"iA",0,w,"iH",0,x,"is",0,m,"j$",0,a,"kw",0,I,"lz",0,f,"py",0,C,"sQ",0,s,"zi",0,u])},38950(e,t,n){n.d(t,{I:()=>s});var r=n(10201),o=n(17402),i=n(63679),a=n(51900),l=n(28297);function s({title:e,children:t,confirmLabel:n,busyLabel:i,cancelLabel:s="Cancel",danger:c=!1,onConfirm:p,onClose:h}){const[u,g]=(0,o.J0)(!1),m=c?l.cz:l.pp;return(0,r.Y)(a.qp,{show:!0,phoneSheet:!0,width:460,header:e,onClose:()=>!u&&h(),dontHideOnBgClick:u,footer:(0,r.FD)(a.tA,{children:[(0,r.Y)(l.IX,{type:"button",onClick:h,disabled:u,children:s}),(0,r.Y)(m,{type:"button",onClick:()=>
5834{if(u)return;const e=p();e instanceof Promise?(g(!0),e.then(h,()=>g(!1))):h()},disabled:u,children:u&&i?i:n})]}),children:t&&(0,r.Y)(d,{children:t})})}const d=i.Ay.div` 5835 font-size: 14px; 5836 line-height: 1.5; 5837 color: var(--theme-palette-color-3); 5838 text-wrap: pretty; 5839 b { 5840 color: var(--theme-palette-color-4); 5841 font-weight: 600; 5842 } 5843`},66096(e,t,n){var r=n(10201),o=n(17402),i=n(63679),a=n(33560),l=n(70213),s=n(63346),d=n(42823),c=n(4738),p=n(76052),h=n(28297),u=n(30821),g=n(93015);const m="dotgg_follow_after_signin",f=(0,i.Ay)(s.tA)` 5844 flex: none; 5845 gap: 8px; 5846 ${e=>e.$following&&i.AH` 5847 background: color-mix(in srgb, var(--theme-palette-color-1) 14%, transparent); 5848 border-color: var(--theme-palette-color-1); 5849 color: var(--theme-palette-color-1); 5850 font-weight: 700; 5851 &:hover:not(:disabled) { 5852 background: color-mix(in srgb, var(--theme-palette-color-1) 22%, transparent); 5853 border-color: var(--theme-palette-color-1); 5854 color: var(--theme-palette-color-1); 5855 } 5856 `} 5857 ${e=>e.$failed&&i.AH` 5858 border-color: ${u.Q.dangerStrong}; 5859 `} 5860`,x=i.Ay.button` 5861 flex: none; 5862 display: inline-flex; 5863 align-items: center; 5864 gap: 6px; 5865 height: 32px; 5866 padding: 0 10px; 5867 border: none; 5868 border-radius: 6px; 5869 background: none; 5870 color: var(--theme-palette-color-1); 5871 font: inherit; 5872 font-size: 13px; 5873 font-weight: 700; 5874 white-space: nowrap; 5875 cursor: pointer; 5876 &:hover:not(:disabled) { 5877 background: color-mix(in srgb, var(--theme-palette-color-1) 10%, transparent); 5878 } 5879 &:disabled { 5880 opacity: 0.6; 5881 cursor: default; 5882 } 5883 &:focus-visible { 5884 ${u.I} 5885 } 5886 @media (pointer: coarse) { 5887 height: ${44}px; 5888 } 5889`,v=i.Ay.span` 5890 font-weight: 500; 5891 color: ${u.Q.muted}; 5892 @media only screen and ${h.E0} { 5893 display: none; 5894 } 5895`;n.d(t,["W",0,({topic:e,label:t,url:n,text:i="Follow",hint:h,variant:u="button",size:y="md",followingHint:w})=>{const{rows:b,status:$}=(0,g.ku)(),[k,Y]=(0,o.J0)(!1),[A,C]=(0,o.J0)(""),F=(0,g.E$)(b,e),D=(0,a.ZC)(e),S=(0,o.li)({topic:e,rows:b,label:t});S.current={topic:e,rows:b,label:t};const I=(0,o.hb)(async(e,t,n)=>{Y(!0),C("");try{await(0,g.So)(S.current.topic,e,t,n)}catch(e){C(e instanceof Error?e.message:"Couldn't update. Try again.")}finally{Y(!1)}},[]);(0,o.vJ)(()=>{if("ready"!==$||!(0,c.x3)())return;const e=function(e){const t=p.Ar.getItem(m);if(null===t)return null;let n=null;try{n=JSON.parse(t)}catch{}if("object"!=typeof n||null===n||!("id"in n)||n.id!==e)return null===n&&p.Ar.removeItem(m),null;p.Ar.removeItem(m);const r="label"in n&&"string"==typeof n.label?n.label:"",o="url"in n&&"string"==typeof n.url?n.url:"";return("exp"in n&&"number"==typeof n.exp?n.exp:0)>Date.now()?{label:r,url:o}:null}(D),t=S.current;e&&!(0,g.E$)(t.rows,t.topic)&&I(!0,e.label||t.label,e.url||window.location.href.replace(/#.*$/,""))},[$,D,I]);const z=()=>{const e=n??window.location.href.replace(/#.*$/,"");if(!(0,c.x3)())return function(e,t,n){p.Ar.setItem(m,JSON.stringify({id:e,label:t,url:n,exp:Date.now()+18e5}))}(D,t,e),void window.location.assign((0,d.u)(window.location.href));I(!F,t,e)},T=(0,c.x3)()&&"loading"===$,E=A||h||(F?`You get notified about ${t}. Click to unfollow.`:`Get notified about ${t}`),L=k?F?"Unfollowingâ¦":"Followingâ¦":A?"Try again":F?"Following":i;return"inline"===u?(0,r.FD)(x,{type:"button","aria-pressed":F,disabled:k||T,onClick:z,title:E,children:[k?(0,r.Y)(s.az,{"aria-hidden":"true"}):F?(0,r.Y)(l.iW,{size:14}):(0,r.Y)(l.uI,{size:14}),L,F&&!k&&!A&&w&&(0,r.FD)(v,{children:[" · ",w]})]}):(0,r.FD)(f,{type:"button",$size:y,$following:F&&!A,$failed:""!==A,"aria-pressed":F,"aria-busy":k||void 0,disabled:T,onClick:()=>{k||z()},title:E,children:[k?(0,r.Y)(s.az,{"aria-hidden":"true"}):F&&!A?(0,r.Y)(l.iW,{size:16}):(0,r.Y)(l.uI,{size:16}),L]})}])},93015(e,t,n){n.d(t,{E$:()=>c,So:()=>p,ku:()=>d});var r=n(17402),o=n(33560),i=n(4738);let a={status:"idle",rows:[]};const l=new Set;function s(e){a=e,l.forEach(e=>e())}function d(){const[,e]=(0,r.J0)(0);return(0,r.vJ)(()=>{const t=()=>e(e=>e+1);return l.add(t),function(e=!1){(0,i.x3)()&&(e||"loading"!==a.status&&"ready"!==a.status)&&(s({...a,status:"loading"}),(0,o.f6)().then(e=>s({status:"ready",rows:e})).catch(()=>s({...a,status:"failed"})))}(),()=>{l.delete(t)}},[]),a}function c(e,t){const n=(0,o.ZC)(t);return e.some(e=>(0,o.ZC)(e)===n)}async function p(e,t,n,r){await(0,o.ef)(e,t,n,r);const i=(0,o.ZC)(e),l=a.rows.filter(e=>(0,o.ZC)(e)!==i);t&&l.unshift({game:e.game,topic_type:e.type,topic_key:e.key,label:n,url:r,created:Math.floor(Date.now()/1e3)}),s({status:"ready",rows:l})}},95605(e,t,n){n.d(t,{Bf:()=>m,GO:()=>g});var r=n(10201),o=(n(17402),n(92475)),i=n(79407),a=n(63679),l=n(70165);const s=a.Ay.div` 5896 display: flex; 5897 align-items: center; 5898`,d=a.Ay.div` 5899 background: url("${()=>l.yD?.starIcon??"https://static.dotgg.gg/wuthering-waves/misc/star.webp"}"); 5900 width: 25px; 5901 height: 25px; 5902 background-size: contain; 5903`;var c=n(17352),p=n(472),h=n(12434);const u=e=>"string"==typeof e?e:void 0,g=({label:e,icon:t,stars:n,isCircledBorder:i,color:a,index:l})=>(0,r.Y)(c.t,{children:n?(0,r.Y)(s,{children:Array.apply(null,Array(n)).map((e,t)=>(0,r.Y)(d,{},t))}):(0,r.FD)(r.FK,{children:[""===t?(0,r.Y)(o.D,{$width:"23",$height:"23",src:"https://static.dotgg.gg/lorcana/generic/spacer.gif"}):(0,r.Y)(o.D,{$width:"23",$height:"23",src:`https://static.dotgg.gg/${h.Ay.TheGame}/${t}`,$isCircledBorder:i?a:void 0})," ",e]})},l),m=({classification:e,index:t,request:n,filterchange:o,dynamic:a,isMultiSelect:l})=>{const s=e.name,d=n[s]?.toString()||"",c=l&&d?d.split(",").map(e=>e.trim()).filter(e=>""!==e):[],h=function(e,t){const n=e.name,r=t?.[n];if(r)return r;const o=[];return e.details.some(e=>"any"===e.DisplayName.toLowerCase())||o.push({value:"",label:`${e.displayName}: Any`,icon:""}
5903),e.details.forEach(t=>{o.push({value:t.Name.toString(),label:`${e.displayName}: ${t.DisplayName}`,icon:t.Icon,stars:t.stars??"",isCircledBorder:e.isCircledBorder??!1,color:t.color??""})}),o}(e,a),m=e=>+e.value===+d||e.value===d,f=l?h.filter(e=>c.some(t=>+e.value===+t||e.value.toString().toLowerCase()===t.toLowerCase())):h.find(m),x=h.find(e=>""===e.value),v=x?.label||"Select...";return(0,r.Y)(p.l,{children:(0,r.Y)(i.R,{doubleWidth:!0,bordered:!0,value:f,onChange:e=>{o(Array.isArray(e)?e.map(e=>e.value).join(","):e.value,s)},options:h,isMulti:l,isSearchable:h.length>12,searchPlaceholder:`Search ${e.displayName}â¦`,placeholder:v,highlight:l&&c.length>0||!l&&h.some(m)&&""!==d,formatOptionLabel:e=>{return(0,r.Y)(g,{label:e.label,icon:u(e.icon),stars:(n=e.stars,"number"==typeof n?n:void 0),isCircledBorder:!0===e.isCircledBorder,color:u(e.color),index:t});var n}})},t)}},31146(e,t,n){var r=n(10201),o=n(17402),i=n(54958),a=(n(39583),n(4738)),l=n(8609),s=n(84473);const d={textSearch:"Search"},c=()=>(0,r.Y)("div",{children:(0,r.Y)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.Y)("path",{d:"M1.64258 6.35664L6.35724 1.64331M1.64258 1.64331L6.35724 6.35664",stroke:"var(--theme-palette-color-3)",strokeWidth:"1.33",strokeLinecap:"round"})})});n.d(t,["_",0,({filters:e,activeFilters:t,invertFilters:n,labeledFilters:p,sortFilters:h,loadedFilters:u,filterchange:g,queryChips:m})=>{const f=t.filter(e=>!("textSearch"===e&&m)),x=f.length+(m?.length??0);return 0===x?null:(0,r.FD)(s.Jj,{style:{marginTop:"10px"},children:[(0,r.FD)(l.jA,{children:[n&&(0,r.Y)(l.gs,{children:"Inverse filter mode"}),(0,r.FD)(l.x4,{children:["[",n?"Hiding":"Showing"," ",x," selection",1===x?"":"s","]"]})]}),(0,r.FD)(l.lp,{children:[Object.keys(e).map((t,n)=>{if(f.includes(t)&&""!==e[t]&&void 0!==e[t]){const i=e[t].toString(),s=i.includes(",");if(p[t]&&h[t]){const e=h[t].find(e=>e.value.toString()===i);return(0,r.FD)(l.tK,{onClick:()=>g("",t),children:[p[t]," ",e?.label??i,(0,r.Y)(c,{})]},n)}const m=u?.find(e=>e.name.toString().toLowerCase()===t.toString().toLowerCase()),f=m?.displayName??d[t]??(0,a.g3)(t);if(s){const e=i.split(",").map(e=>e.trim()).filter(e=>""!==e);return(0,r.FD)(o.Ay.Fragment,{children:[(0,r.FD)(l.ou,{children:[f,":"]}),e.map((o,i)=>{const a=m?.details.find(e=>e.Name.toString().toLowerCase()===o.toLowerCase()),s=a?.DisplayName??o;return(0,r.FD)(l.tK,{onClick:()=>{const n=e.filter(e=>e!==o).join(",");g(n,t)},children:[s,(0,r.Y)(c,{})]},`${n}-${i}`)})]},n)}{const e=m?.details.find(e=>e.Name.toString().toLowerCase()===i.toLowerCase());return(0,r.FD)(l.tK,{onClick:()=>
5903g("",t),children:[f,":"," ",e?.DisplayName??e?.label??i,(0,r.Y)(c,{})]},n)}}return null}),(0,r.Y)(i.T,{chips:m}),(0,r.Y)(l.tK,{onClick:()=>{g(void 0,"clear")},style:{border:"solid 1px #be2814",color:"#be2814"},children:"Clear All"})]})]})}])},91543(e,t,n){var r=n(10201),o=n(17402),i=n(63679),a=n(28266),l=n(51900),s=n(12434);const d=i.Ay.div` 5904 display: flex; 5905 justify-content: center; 5906 align-items: center; 5907 padding: 16px; 5908 5909 img { 5910 max-width: 100%; 5911 /* Height is the binding constraint on a short or landscape screen; without 5912 it a 2:1 splash pushes the Close button off the bottom (measured: a 5913 1920x700 viewport overflowed by 126px at a plain 82vh). 5914 The 260px is everything around the image that also needs to fit: the 5915 overlay's 56px top offset, this container's padding, and the modal's 5916 header and footer; 350px when the variant strip is under it, which is 5917 one row of 64px thumbs plus its padding. Overshooting is not fatal â the overlay scrolls â so 5918 this is a comfort bound, not a correctness one. On tall screens the 5919 dialog width usually binds first and this never comes into play. */ 5920 max-height: max(240px, calc(100vh - ${e=>e.$strip?350:260}px)); 5921 width: auto; 5922 height: auto; 5923 object-fit: contain; 5924 border-radius: 8px; 5925 } 5926`,c=i.Ay.div` 5927 position: relative; 5928 width: min(100%, calc(max(240px, 100vh - ${e=>e.$strip?350:260}px) * 88 / 63)); 5929 aspect-ratio: 88 / 63; 5930 overflow: hidden; 5931 border-radius: 8px; 5932 && img { 5933 position: absolute; 5934 top: 50%; 5935 left: 50%; 5936 width: calc(100% * 63 / 88); 5937 height: calc(100% * 88 / 63); 5938 max-width: none; 5939 max-height: none; 5940 border-radius: 0; 5941 transform: translate(-50%, -50%) rotate(90deg); 5942 } 5943`,p=i.Ay.div` 5944 display: flex; 5945 justify-content: center; 5946 padding: 0 16px 4px; 5947`;n.d(t,["O",0,({imagePath:e,altText:t,show:n,variants:i,turned:h})=>{const[u,g]=(0,o.J0)(!1),[m,f]=(0,o.J0)(0),[x,v]=(0,o.J0)(0);(0,o.vJ)(()=>{n>0&&n!==m&&(f(n),g(!0))},[n,m]);const y=i&&i.variants.length>1?i:null,w=y?.selected?.image??e;if((0,o.vJ)(()=>{v(0)},[w]),!w)return null;const b=w.startsWith("http")?w:`https://static.dotgg.gg/${s.Ay.TheGame}/${w}`,$=x>0?Math.min(Math.max(x+32,480),1600):1600;return(0,r.FD)(l.qp,{header:t,subtitle:y?.selected?.label,show:u,width:$,onClose:()=>{g(!1)},promptbuttons:[{label:"Close",id:"close"}],children:[(0,r.Y)(d,{$strip:!!y,children:!0===h?(0,r.Y)(c,{$strip:!!y,children:(0,r.Y)("img",{src:b,alt:t,onLoad:e=>v(e.currentTarget.naturalHeight)})}):(0,r.Y)("img",{src:b,alt:y?.selected?`${t} â ${y.selected.label}`:t,onLoad:e=>v(e.currentTarget.naturalWidth)})}),y?(0,r.Y)(p,{children:(0,r.Y)(a.Z,{state:y,size:64,row:!0})}):null]})}])},80269(e,t,n){var r=n(10201),o=n(17402),i=n(40131),a=n(58109);n.d(t,["a",0,({types:e,fallback:t,seed:n,children:l})=>{const[s,d]=(0,o.J0)(()=>e.every(i.Yn)),c=e.join(",");return(0,o.vJ)(()=>{if(e.every(i.Yn))return void d(!0);d(!1);let t=!0;return(n?n():(0,i.aG)(e)).then(()=>{t&&d(!0)}),()=>{t=!1}},[c]),s?(0,r.Y)(r.FK,{children:l}):(0,r.Y)(r.FK,{children:t??(0,r.Y)(a.O,{})})}])},61151(e,t,n){var r=n(10201),o=n(63679);const i=o.I4.span` 5948 display: inline-flex; 5949 align-items: center; 5950 gap: 4px; 5951 padding: ${e=>e.$small?"0 5px":"1px 7px"}; 5952 border-radius: 999px; 5953 font-size: ${e=>e.$small?"10px":"11px"}; 5954 font-weight: 700; 5955 line-height: 1.7; 5956 white-space: nowrap; 5957 color: ${e=>e.$color}; 5958 border: 1px solid ${e=>e.$color}; 5959 background: rgba(0, 0, 0, 0.55); 5960`,a=o.I4.img` 5961 width: ${e=>e.$small?"12px":"14px"}; 5962 height: ${e=>e.$small?"12px":"14px"}; 5963 object-fit: contain; 5964 display: block; 5965`,l=o.I4.span` 5966 width: 6px; 5967 height: 6px; 5968 border-radius: 50%; 5969 background: ${e=>e.$color}; 5970`;n.d(t,["F",0,({value:e,small:t})=>{const n="string"==typeof e?e:String(e??"");return(0,r.Y)(i,{$small:t,$color:"var(--theme-palette-color-3)",children:n})},"r",0,({label:e,color:t,small:n,iconUrl:o})=>""===e?(0,r.Y)(r.FK,{}):(0,r.FD)(i,{$small:n,$color:t,children:[void 0!==o&&""!==o?(0,r.Y)(a,{src:o,alt:"",loading:"lazy",$small:n}):(0,r.Y)(l,{$color:t}),e]})])},67049(e,t,n){n.d(t,{q:()=>M});var r=n(10201),o=n(17402),i=n(63679),a=n(74052),l=n(70892),s=n(74216),d=n(6768),c=n(95364),p=n(55367),h=n(70165);const u=(0,o.ph)(({item:e,index:t,elementType:n,isCollection:o,collectionItem:i,compact:a,cardClickFunction:l,onCollectionChange:c})=>{const p=e.id.toString();return(0,r.FD)("div",{children:[(0,r.Y)(d.Kl,{elementID:p,isCollection:o,collection:i?.standard,onClick:l,elementType:n,small:a,bacgroundMode:h.yD.elementTypes[n]?.backgroundMode}
5970),o&&(0,r.Y)(s.Z,{cardId:p,collectionElement:i,collectionUpdateCallback:c,gacha:!0,elementType:n})]},`${n}-${p}-${t}`)},(e,t)=>e.item.id===t.item.id&&e.elementType===t.elementType&&e.isCollection===t.isCollection&&e.compact===t.compact&&e.cardClickFunction===t.cardClickFunction&&e.onCollectionChange===t.onCollectionChange&&e.collectionItem?.standard===t.collectionItem?.standard&&e.collectionItem?.foil===t.collectionItem?.foil&&e.collectionItem?.total===t.collectionItem?.total),g=(0,o.ph)(({items:e,elementType:t,isCollection:n,collectionLookup:i,compact:a,perRow:l,cardClickFunction:s,onCollectionChange:d})=>{const g=(0,c.e)(),[x,v]=(0,o.J0)(0),[y,w]=(0,o.J0)(!0),b=e.slice(0,200*(x+1));(0,o.vJ)(()=>{e.length>0?g.setNavigationItems(e):g.clearNavigation()},[e]),(0,o.vJ)(()=>{v(0),w(e.length>200)},[e]),(0,o.vJ)(()=>{w(b.length<e.length)},[x,e.length,b.length]);const $=(0,o.hb)(t=>{t&&y&&b.length<e.length&&v(e=>e+1)},[y,b.length,e.length]);return(0,r.FD)(r.FK,{children:[(0,r.Y)(f,{"data-embed":0,$compact:a,$perRow:l,children:b.map((e,o)=>{const l=e.id.toString(),c=`${l}${h.yD.multipleComponentCollection?`-${t}`:""}`,p=i.get(c);return(0,r.Y)(u,{item:e,index:o,elementType:t,isCollection:n,collectionItem:p,compact:a,cardClickFunction:s,onCollectionChange:d},`${t}-${l}-${o}`)})}),(0,r.Y)(p.A,{onChange:$,wide:!0,children:y&&b.length<e.length?(0,r.Y)("div",{style:{flexBasis:"100%",padding:"20px 0"},children:Array.from({length:10},(e,t)=>(0,r.Y)(m,{},t))}):(0,r.Y)(r.FK,{})})]})},(e,t)=>e.items===t.items&&e.elementType===t.elementType&&e.isCollection===t.isCollection&&e.collectionLookup===t.collectionLookup&&e.compact===t.compact&&e.perRow===t.perRow&&e.cardClickFunction===t.cardClickFunction&&e.onCollectionChange===t.onCollectionChange),m=i.I4.div` 5971 height: 200px; 5972 background: var(--theme-palette-background-2); 5973 border-radius: 8px; 5974 animation: pulse 1.5s ease-in-out infinite; 5975 5976 @keyframes pulse { 5977 0%, 5978 100% { 5979 opacity: 0.6; 5980 } 5981 50% { 5982 opacity: 0.3; 5983 } 5984 } 5985`,f=i.I4.section` 5986 display: grid; 5987 grid-template-columns: ${e=>e.$perRow?`repeat(${e.$perRow}, minmax(0, 1fr))`:`repeat(auto-fill, ${e.$compact?"minmax(100px, 1fr)":"minmax(160px, 1fr)"})`}; 5988 justify-content: space-between; 5989 gap: 12px; 5990 padding-top: 20px; 5991 width: 100%; 5992 flex-basis: 100%; 5993 @media only screen and (max-width: 700px) { 5994 grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); 5995 padding: 10px 0 0 0; 5996 } 5997`;var x=n(40131),v=n(15299);const y=(0,o.ph)(({item:e,elementType:t,columns:n,gridTemplate:i,stack:a,cardClickFunction:l})=>{const[s,d]=(0,o.J0)(0),p=h.yD.elementTypes[t],u=e.slug||e.id.toString(),g=p?.slugOverride??t,m=!1!==p?.rowLinks,f=p?.popupTarget,y=f?.elementType??t,w=f?String(e[f.idField]??""):e.id.toString(),b=t=>{if(l)return t.preventDefault(),t.stopPropagation(),void l(e.id);if(t.preventDefault(),t.stopPropagation(),f){if(!w)return;(0,x.F$)(y).then(()=>d(e=>e+1))}else d(e=>e+1)},$=t=>{if(t.render)return t.render(e);const n=e[t.field];return null==n||""===n?"â":String(n)},k=n.map(e=>(0,r.Y)(S,{"data-label":e.label,$align:e.align??"left",$wrap:!!e.wrap,$stack:a,children:$(e)},e.field+e.label));return(0,r.FD)(r.FK,{children:[m?(0,r.Y)(F,{href:`/${g}/${u}`,"data-native":!0,onClick:b,$columns:i,$stack:a,children:k}):(0,r.Y)(D,{type:"button",onClick:b,$columns:i,$stack:a,children:k}),f?(0,r.Y)(c.c,{children:(0,r.Y)(v.l,{itemId:w,elementType:y,show:s})}):(0,r.Y)(v.l,{itemId:w,elementType:y,show:s})]})},(e,t)=>e.item.id===t.item.id&&e.elementType===t.elementType&&e.columns===t.columns&&e.gridTemplate===t.gridTemplate&&e.stack===t.stack&&e.cardClickFunction===t.cardClickFunction),w=(0,o.ph)(({items:e,elementType:t,columns:n,sortBy:i,sortOrder:a,onFilterChange:l,cardClickFunction:s})=>{const d=(0,c.e)(),[u,g]=(0,o.J0)(0),[m,f]=(0,o.J0)(!0),x=h.yD.elementTypes[t],v=!0===x?.tableRenderAllRows,w=v?e:e.slice(0,200*(u+1));(0,o.vJ)(()=>{e.length>0?d.setNavigationItems(e):d.clearNavigation()},[e]),(0,o.vJ)(()=>{g(0),f(!v&&e.length>200)},[e,v]),(0,o.vJ)(()=>{f(w.length<e.length)},[u,e.length,w.length]);const b=(0,o.hb)(t=>{t&&m&&w.length<e.length&&g(e=>e+1)},[m,w.length,e.length]),C=n.map(e=>e.width??"1fr").join(" "),F=!0===x?.tableStacksOnMobile;return(0,r.FD)($,{$stack:F,children:[(0,r.Y)(k,{$columns:C,$stack:F,children:n.map(e=>{const t=!!e.sortable&&i===e.field,n=t?"r"===a?"â¼":"â²":"";return(0,r.FD)(Y,{$align:e.align??"left",$sortable:!!e.sortable,$active:t,onClick:()=>(e=>{if(e.sortable)return i!==e.field?(l(e.field,"sortby"),void l("","sortorder")):void("r"===a?(l("","sortby"),l("","sortorder")):l("r","sortorder"))})(e),children:[e.label,n&&(0,r.Y)(A,{children:n})]},e.field+e.label)})}),w.map(e=>(0,r.Y)(y,{item:e,elementType:t,columns:n,gridTemplate:C,stack:F,cardClickFunction:s},`${t}-${e.id}`)),(0,r.Y)(p.A,{onChange:b,wide:!0,children:m&&w.length<e.length?(0,r.Y)(I,{children:"Loadingâ¦"}):(0,r.Y)(r.FK,{})})]})}),b="680px",$=i.I4.div` 5998 display: flex; 5999 flex-direction: column; 6000 width: 100%; 6001 /* Establishes the query container the rows below measure themselves against. */ 6002 ${e=>e.$stack?"container-type: inline-size; container-name: gachatable;":""} 6003 border-radius: 6px; 6004 overflow: hidden; 6005 border: 1px solid var(--theme-palette-color-5); 6006 background-color: var(--theme-palette-color-7); 6007 margin-top: 12px; 6008 6009 @media only screen and (max-width: 768px) { 6010 ${e=>e.$stack?"":"overflow-x: auto; -webkit-overflow-scrolling: touch;"} 6011 } 6012`,k=i.I4.div` 6013 display: grid; 6014 grid-template-columns: ${e=>e.$columns}; 6015 gap: 8px; 6016 padding: 10px 14px; 6017 background-color: var(--theme-palette-color-6); 6018 border-bottom: 2px solid var(--theme-palette-color-5); 6019 font-weight: 600; 6020 font-size: 0.7em; 6021 text-transform: uppercase; 6022 letter-spacing: 0.5px; 6023 color: var(--theme-palette-color-3); 6024
6025 /* Stacked cards carry their own per-cell labels, so the shared header â and 6026 with it the only sort affordance â would be a row of dead text. Sorting 6027 stays reachable through the filter bar's own SORT BY control. */ 6028 @container gachatable (max-width: ${b}) { 6029 ${e=>e.$stack?"display: none;":""} 6030 } 6031`,Y=i.I4.div` 6032 display: flex; 6033 align-items: center; 6034 gap: 4px; 6035 justify-content: ${e=>"right"===e.$align?"flex-end":"center"===e.$align?"center":"flex-start"}; 6036 cursor: ${e=>e.$sortable?"pointer":"default"}; 6037 color: ${e=>e.$active?"var(--theme-palette-color-1)":"var(--theme-palette-color-3)"}; 6038 user-select: none; 6039 6040 &:hover { 6041 color: ${e=>e.$sortable?"var(--theme-palette-color-1)":"var(--theme-palette-color-3)"}; 6042 } 6043`,A=i.I4.span` 6044 font-size: 0.8em; 6045`,C=i.AH` 6046 display: grid; 6047 grid-template-columns: ${e=>e.$columns}; 6048 gap: 8px; 6049 align-items: center; 6050 padding: 8px 14px; 6051 background-color: var(--theme-palette-color-7); 6052 border-bottom: 1px solid var(--theme-palette-color-5); 6053 text-decoration: none !important; 6054 color: var(--theme-palette-color-4); 6055 font-size: 0.9em; 6056 cursor: pointer; 6057 transition: background-color 0.15s ease; 6058 /* Rows off-screen skip style, layout and paint until scrolled near. This is 6059 what makes a whole-sheet table (tableRenderAllRows) affordable: with 6060 3,240 rows the browser's own work â not our JS â was ~1 s per re-sort and 6061 every scroll stuttered. Find-in-page still searches the skipped content and 6062 reveals the hit. The intrinsic size is the measured single-line row height; 6063 'auto' lets the browser remember a row's real height once laid out. */ 6064 content-visibility: auto; 6065 contain-intrinsic-size: auto 46px; 6066 6067 &:last-child { 6068 border-bottom: none; 6069 } 6070 6071 &:hover { 6072 background-color: var(--theme-palette-color-6); 6073 } 6074 6075 @container gachatable (max-width: ${b}) { 6076 ${e=>e.$stack?"grid-template-columns: 1fr; gap: 6px; padding: 12px 14px;":""} 6077 } 6078`,F=i.I4.a` 6079 ${C} 6080`,D=i.I4.button` 6081 ${C} 6082 width: 100%; 6083 border: none; 6084 border-bottom: 1px solid var(--theme-palette-color-5); 6085 font: inherit; 6086 text-align: left; 6087`,S=i.I4.div` 6088 display: flex; 6089 align-items: ${e=>e.$wrap?"flex-start":"center"}; 6090 gap: 6px; 6091 justify-content: ${e=>"right"===e.$align?"flex-end":"center"===e.$align?"center":"flex-start"}; 6092 min-width: 0; 6093 ${e=>e.$wrap?"white-space: normal; line-height: 1.4;":"overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"} 6094 6095 @container gachatable (max-width: ${b}) { 6096 ${e=>e.$stack?"flex-direction: column;\n align-items: stretch;\n justify-content: flex-start;\n gap: 2px;\n white-space: normal;\n overflow: visible;\n text-overflow: clip;\n\n &::before {\n content: attr(data-label);\n font-size: 0.68em;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n opacity: 0.55;\n }":""} 6097 } 6098`,I=i.I4.div` 6099 padding: 16px; 6100 text-align: center; 6101 color: var(--theme-palette-color-3); 6102 font-size: 0.85em; 6103`;var z=n(71335),T=n(22417),E=n(20557),L=n(81616);const M=e=>{const t=(0,L.U_)(e.elementType),[n,i]=(0,E.v)(e.elementType),s=!0===e.embed&&!0!==e.showfilter?0:n,[d,p]=(0,o.J0)(e.udata?.collection||[]),{filters:u,textSearchString:m}=(0,T.vs)(e),[f,x]=(0,o.J0)(u),[v,y]=(0,o.J0)(m);(0,o.vJ)(()=>{x(u),y(m)},[u,m]),(0,o.vJ)(()=>{e.udata?.collection&&p(e.udata.collection)},[e.udata?.collection]);const b=(0,a.C)(f),$=b!==f,{elementDB:k,isEmpty:Y}=(0,z.x)(t,b,e.listOverride,e.elementType),A=((e=[])=>(0,o.Kr)(()=>{const t=new Map;return e.forEach(e=>{t.set(e.card,e)}),{collection:e,collectionLookup:t}},[e]))(d),C=(0,o.hb)((t,n)=>{x(r=>{const o=(0,T.b4)(r,t,n,e.elementType),i=new URLSearchParams;Object.entries(o).forEach(([e,t])=>{t&&""!==t&&i.set(e,t)});const a=i.toString();return y(a),o})},[e.elementType]),F=(0,o.hb)((t,n,r)=>{p(o=>(({currentCollection:e,cardId:t,elementType:n,type:r,count:o,multipleComponentCollection:i})=>{const a=i?`${t}-${n}`:t,l=e.findIndex(e=>e.card===a);if(-1!==l){const t=[...e],n=t[l];if(!n)return t;const i={...n};return i[r]=o.toString(),i.total=(+i.foil+ +i.standard).toString(),t[l]=i,t}{const t={card:a,foil:"foil"===r?o.toString():"0",standard:"standard"===r?o.toString():"0",total:o.toString(),extra_data:"",trade:"0",wish:"0"};return[...e,t]}})({currentCollection:o,cardId:t,elementType:e.elementType,type:n,count:r,multipleComponentCollection:h.yD.multipleComponentCollection}))},[e.elementType]);return(0,r.FD)(c.c,{children:[(0,r.Y)(l.f,{embed:e.embed,showfilter:e.showfilter,filters:f,elementType:e.elementType,textSearchString:v,onFilterChange:C,perRow:n,onPerRowChange:i}),(0,r.Y)(N,{"data-pending":$?"true":"false",children:(()=>{const t=h.yD.elementTypes[e.elementType];return"table"===t?.displayMode&&(t.tableColumns?.length??0)>0&&!e.isCollection?(0,r.Y)(w,{items:k,elementType:e.elementType,columns:t.tableColumns,sortBy:b.sortby||"",sortOrder:b.sortorder||"",onFilterChange:C,cardClickFunction:e.cardClickFunction}):(0,r.Y)(g,{items:k,elementType:e.elementType,isCollection:e.isCollection,collectionLookup:A.collectionLookup,compact:e.compact??t?.compactGrid,perRow:s,cardClickFunction:e.cardClickFunction,onCollectionChange:F})})()}),Y&&(0,r.Y)(P,{children:"No Items Found..."})]})},N=i.I4.div` 6104 width: 100%; 6105 transition: opacity 160ms ease; 6106 /* Driven by a data attribute, not a prop â class swap: styled-components 6107 inserts a new rule for each new prop combination, and inserting a rule 6108 invalidates style for the whole document â ~200 ms over Advise's 13k 6109 cells, spent BEFORE the dim could paint. An attribute flip on one element 6110 is a one-element style change. Dim instantly, fade back: a fade-in never 6111 got a frame, because the re-render behind it blocked the main thread first. 6112 Measured 2026-08-28 on Nikke /advise/ (3,240 rows). */ 6113 &[data-pending="true"] { 6114 transition: none; 6115 opacity: 0.55; 6116 } 6117`,P=i.I4.div` 6118 width: 100%; 6119 height: 100%; 6120 display: flex; 6121 justify-content: center; 6122 align-items: center; 6123 font-size: 1.5em; 6124 color: var(--theme-palette-color-5); 6125 padding: 20px; 6126 text-align: center; 6127`},27406(e,t,n){var r=n(10201),o=n(63679);const i=o.I4.div` 6128 display: flex; 6129 align-items: center; 6130 flex-wrap: wrap; 6131 gap: 10px; 6132`,a=o.I4.div` 6133 font-size: 0.75em; 6134 letter-spacing: 0.04em; 6135 text-transform: uppercase; 6136 color: var(--theme-palette-color-3); 6137`,l=o.I4.input` 6138 && { 6139 width: 150px; 6140 flex: 0 0 150px; 6141 } 6142 accent-color: var(--theme-palette-color-1); 6143 cursor: pointer; 6144`,s=o.I4.div` 6145 min-width: 24px; 6146 font-weight: 700; 6147 font-variant-numeric: tabular-nums; 6148 color: var(--theme-palette-color-4); 6149`,d=o.I4.input` 6150 && { 6151 width: 72px; 6152 flex: 0 0 72px; 6153 padding: 2px 6px; 6154 } 6155 border-radius: 6px; 6156 border: 1px solid var(--theme-palette-color-5); 6157 background: var(--theme-palette-color-8); 6158 color: var(--theme-palette-color-4); 6159 font-weight: 700; 6160 font-variant-numeric: tabular-nums; 6161`,c=o.I4.div` 6162 display: flex; 6163 flex-wrap: wrap; 6164 gap: 4px; 6165`,p=o.I4.button` 6166 padding: 2px 8px; 6167 border-radius: 4px; 6168 font-size: 12px; 6169 font-weight: ${e=>e.$active?700:600}; 6170 cursor: pointer; 6171 border: 1px solid ${e=>e.$active?"var(--theme-palette-color-1)":"var(--theme-palette-color-5)"}; 6172 background-color: ${e=>e.$active?"var(--theme-palette-color-1)":"transparent"}; 6173 color: ${e=>e.$active?"var(--theme-palette-color-8)":"var(--theme-palette-color-4)"}; 6174 6175 &:hover { 6176 border-color: var(--theme-palette-color-1); 6177 } 6178`;n.d(t,["G",0,({label:e,value:t,min:n=1,max:o,presets:h,withInput:u,onCh
6178ange:g})=>{const m=e=>Math.min(o,Math.max(n,Number.isFinite(e)?e:n));return(0,r.FD)(i,{children:[(0,r.Y)(a,{children:e}),(0,r.Y)(l,{type:"range",min:n,max:o,value:t,"aria-label":e,onChange:e=>g(m(Number(e.currentTarget.value)))}),u?(0,r.Y)(d,{type:"number",min:n,max:o,value:t,"aria-label":e,onChange:e=>g(m(Number(e.currentTarget.value)))}):(0,r.Y)(s,{children:t}),h&&h.length>0?(0,r.Y)(c,{children:h.filter(e=>e>=n&&e<=o).map(e=>(0,r.Y)(p,{type:"button",$active:t===e,onClick:()=>g(e),children:e},e))}):null]})},"w",0,p])},63353(e,t,n){n.d(t,{yO:()=>J,Jg:()=>B,d4:()=>s.d4,ds:()=>s.ds,_X:()=>s._X});var r=n(10201),o=n(17402),i=n(67049),a=n(63679),l=n(92366),s=n(17998),d=n(3648),c=n(92475),p=n(50960),h=n(61204),u=n(70165),g=n(7062),m=n(12434);const f=e=>""===e?.icon?(0,r.Y)(r.FK,{}):(0,r.Y)(c.D,{src:`https://static.dotgg.gg/${m.Ay.TheGame}/${e?.icon}`,$height:"20",title:e?.name});function x(e,t,n){if(!e)return[];const o=[];return u.yD.extraFieldsToRender[t]?.forEach((i,a)=>{if(!0===n?.has(i.field))return;const l=!!u.yD.classifications[t]&&void 0!==u.yD.classifications[t]?.find(e=>e.name===i.field);let d=null;switch(i.type){case"textWithIcon":d=function({g:e,field:t,i:n,elementType:o,isClassification:i}){const a=e[t.field];if(null==a)return null;const l=t.processItem?t.processItem(a):a;if(void 0===l)return null;const d=t.getIconData&&t.idField?t.getIconData(l[t.idField]):void 0,c=t.textField?l[t.textField]:"";return(0,r.FD)(s.dN,{$wide:t.fullWidthBottom||t.fullWidth,children:[(0,r.Y)(s.ro,{children:t.label}),(0,r.Y)(s.eS,{$fontWeight:t.fontNotBold?"normal":"bold",children:i?(0,r.FD)("a",{href:`${m.Ay.BASE_FOLDER}${o}/?${t.field}=${a.toString()}`,"data-native":!0,children:[f(d),d?.name,": ",c]}):(0,r.FD)(r.FK,{children:[f(d),d?.name,": ",c]})})]},`${t.field}${n}`)}({g:e,field:i,i:a,elementType:t,isClassification:l});break;case"text":d=function({g:e,field:t,i:n,elementType:o,isClassification:i}){const a=e[t.field];return null==a||""===a.toString()?null:(0,r.FD)(s.dN,{$wide:t.fullWidthBottom||t.fullWidth,children:[(0,r.Y)(s.ro,{children:t.label}),(0,r.Y)(s.eS,{$fontWeight:t.fontNotBold?"normal":"bold",children:i?(0,r.Y)("a",{href:`${m.Ay.BASE_FOLDER}${u.yD.elementTypes[o]?.slugOverride??o}/?${t.field}=${a.toString()}`,"data-native":!0,children:a.toString()}):(0,r.Y)(r.FK,{children:a.toString()})})]},`${t.field}${n}`)}({g:e,field:i,i:a,elementType:t,isClassification:l});break;case"textProcessed":d=function({g:e,field:t,i:n,elementType:o,isClassification:i}){const a=e[t.field];return null==a||""===a.toString()?null:(0,r.FD)(s.dN,{$wide:t.fullWidthBottom||t.fullWidth,children:[(0,r.Y)(s.ro,{children:t.label}),(0,r.Y)(s.eS,{$fontWeight:t.fontNotBold?"normal":"bold",children:i?(0,r.Y)("a",{href:`/${o}/?${t.field}=${a.toString()}`,children:a.toString()}):(0,r.Y)("div",{children:void 0!==t.processFn?(0,g.x)(t.processFn(a.toString())):""})})]},`${t.field}${n}`)}({g:e,field:i,i:a,elementType:t,isClassification:l});break;case"link":d=function(e,t,n){const o=e[t.field];return null==o?null:(0,r.FD)(s.dN,{$wide:t.fullWidthBottom||t.fullWidth,children:[(0,r.Y)(s.ro,{children:t.label}),(0,r.Y)(s.eS,{$fontWeight:t.fontNotBold?"normal":"bold",children:(0,r.FD)("a",{href:t.linkTemplate?.replace("{FIELD}",o.toString().toLowerCase()),target:"_blank",children:[(0,r.Y)(h.g,{icon:p.C}),o.toString()]})})]},`${t.field}${n}`)}(e,i,a);break;case"element":d=function(e,t,n){if(null==e[t.field]||void 0===t.element)return null;const o=t.element({defs:e});return o&&null!==o?(0,r.FD)(s.dN,{$wide:t.fullWidthBottom||t.fullWidth,children:[(0,r.Y)(s.ro,{children:t.label}),(0,r.Y)(s.eS,{$fontWeight:t.fontNotBold?"normal":"bold",children:o})]},`${t.field}${n}`):null}(e,i,a);break;case"bareElement":d=function(e,t,n){if(null==e[t.field]||void 0===t.element)return null;const o=t.element({defs:e});return o&&null!==o?(0,r.Y)(s.dN,{$wide:t.fullWidthBottom||t.fullWidth,children:o},`${t.field}${n}`):null}(e,i,a)}d&&o.push(d)}),o}var v=n(75838);const y=({item:e,elementType:t,config:n})=>{const i=n.hero,a=i?[]:x(e,t,(e=>{const t=new Set([...e.subtitle??[],...e.claims??[]]);for(const n of e.facets??[])t.add(n.field);for(const n of e.tagRows??[])t.add(n.field);return t})(n)),c=u.yD.extraComponentsToRender[t]??[],p=(0,o.li)(null),[h,g]=(0,o.J0)([]);(0,o.vJ)(()=>{const e=p.current;if(!e)return;const t=()=>g([...e.querySelectorAll("[data-section]")].filter(e=>e.getBoundingClientRect().height>4).map(e=>e.getAttribute("data-section")??"").filter(e=>""!==e));t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[e.id]);const m=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");return(0,r.FD)(k,{ref:p,children:[i?(0,r.Y)(i,{item:e}):(0,r.Y)(d.t,{item:e,elementType:t,config:n,art:n.art?.size??200,showName:!0,extra:a.length>0?(0,r.Y)(Y,{children:(0,r.Y)(s.K4,{children:a})}):null}),h.length>1?(0,r.Y)(b,{"aria-label":"Sections on this page",children:c.map(e=>e.label).filter(e=>h.includes(m(e))).map(e=>(0,r.Y)($,{href:`#${m(e)}`,children:e},e))}):null,c.map((t,n)=>{if(t.hideIfEmpty){const n=e[t.field];if(null==n||""===n||Array.isArray(n)&&0===n.length)return null}const o=t.element;return o?(0,r.Y)(w,{id:m(t.label),"data-section":m(t.label),children:t.noWrapper?(0,r.Y)(o,{defs:e[t.field],parentEl:e}):(0,r.Y)(l.Zk,{children:(0,r.FD)(A,{children:[(0,r.Y)(l.xw,{children:t.label}),(0,r.Y)(o,{defs:e[t.field],parentEl:e})]})})},n):null}),(0,r.Y)(v.a,{gachaItem:e,elementType:t,colorToRender:""})]})},w=a.I4.div` 6179 scroll-margin-top: 80px; 6180 &:empty { 6181 display: none; 6182 } 6183`,b=a.I4.nav` 6184 display: flex; 6185 flex-wrap: wrap; 6186 gap: 8px; 6187`,$=a.I4.a` 6188 flex: none; 6189 white-space: nowrap; 6190 padding: 5px 11px; 6191 border-radius: 4px; 6192 background-color: var(--theme-palette-color-8); 6193 border: 1px solid var(--theme-palette-color-5); 6194 font-size: 12.5px; 6195 font-weight: 600; 6196 color: var(--theme-palette-color-3) !important; 6197 text-decoration: none !important; 6198 &:hover { 6199 color: var(--theme-palette-color-4) !important; 6200 border-color: var(--theme-palette-color-1); 6201 } 6202`,k=a.I4.div` 6203 display: flex; 6204 flex-direction: column; 6205 gap: 12px; 6206 width: 100%; 6207`,Y=a.I4.div` 6208 margin-top: 2px; 6209 padding-top: 10px; 6210 border-top: 1px solid var(--theme-palette-color-5); 6211 6212 ${s.ro} { 6213 font-size: 9.5px; 6214 letter-spacing: 0.07em; 6215 text-transform: uppercase; 6216 color: var(--theme-palette-color-3); 6217 } 6218 ${s.eS} { 6219 padding: 0; 6220 border: none; 6221 background: none; 6222 font-size: 13.5px; 6223 color: var(--theme-palette-color-4); 6224 } 6225`,A=a.I4.div` 6226 display: flex; 6227 flex-direction: column; 6228 gap: 10px; 6229 padding: 12px 14px; 6230`;var C=n(6768),F=n(81616),D=n(31145),S=n(92434);const I=({elementType:e,elementId:t})=>{const[n,i]=(0,o.J0)(1),a=(0,F.U_)(e);if(!(u.yD.gachaItemStatsDefs&&u.yD.gachaItemStatsDefs[e]&&0!==u.yD.gachaItemStatsDefs[e].length&&u.yD.gachaItemStatsDefsMinMax&&u.yD.gachaItemStatsDefsMinMax[e]))return(0,r.Y)(r.FK,{});const l=a?.find(e=>e.id.toString().toLowerCase()===t.toLowerCase()||e.slug===t);if(!l)return(0,r.Y)(r.FK,{});const s=u.yD.gachaItemStatsDefs[e],d=u.yD.gachaItemStatsDefsMinMax[e];return(0,r.FD)(T,{children:[(0,r.FD)(O,{children:[(0,r.FD)(S.Jb,{children:[(0,r.Y)("div",{style:{color:"var(--theme-palette-color-3)",flexBasis:"130px"},children:"Level"}),(0,r.FD)(S.Mu,{children:[(0,r.Y)(S.iN,{children:n}),(0,r.Y)(S.Ap,{type:"range",min:d.min,step:1,max:d.max,defaultValue:d.def,onChange:e=>i(+e.currentTarget.value)})]})]}),(0,r.Y)(z,{children:s.map((e,t)=>0===e.calc(e.field?l[e.field]:0,n)?(0,r.Y)(r.FK,{}):(0,r.FD)(E,{children:[e.Icon?(0,r.Y)(c.D,{src:`https://static.dotgg.gg/wuthering-waves/${e.Icon}`,$width:"36px",$height:"36px"}):(0,r.Y)(r.FK,{}),(0,r.FD)(N,{children:[(0,r.Y)(L,{children:e.Name}),(0,r.Y)(M,{children:(0,r.FD)(P,{children:[e.calc(e.field?l[e.field]:0,n),e.IsPercent?"%":""]})})]})]},t))})]}
6230),(0,r.Y)(O,{children:u.yD.gaugedStatsExtraComponent?(0,r.Y)(u.yD.gaugedStatsExtraComponent,{neededLevel:n,currentLevel:1,itemLocated:l,itemType:e}):(0,r.Y)(r.FK,{})})]})},z=a.I4.div` 6231 display: flex; 6232 flex-wrap: wrap; 6233 gap: 10px; 6234 padding-top: 15px; 6235`,T=a.I4.div` 6236 width: 100%; 6237 display: flex; 6238 flex-wrap: nowrap; 6239 flex-direction: row; 6240 @media only screen and (max-width: 1200px) { 6241 flex-direction: column; 6242 } 6243`,E=a.I4.div` 6244 width: 148px; 6245 display: flex; 6246 align-items: center; 6247 gap: 5px; 6248`,L=a.I4.div` 6249 line-height: 0.8em; 6250 font-size: 0.8em; 6251 color: var(--theme-palette-color-3); 6252`,M=a.I4.div` 6253 line-height: 1em; 6254`,N=a.I4.div` 6255 display: flex; 6256 flex-direction: column; 6257`,P=a.I4.div` 6258 color: #eee; 6259 font-weight: bold; 6260 line-height: 1.3em; 6261`,O=a.I4.div` 6262 display: flex; 6263 width: 100%; 6264 flex-wrap: wrap; 6265 flex-direction: row; 6266 align-content: flex-start; 6267`;var _=n(106);function R(e){if(!e.TheGachaItem)return(0,r.Y)(r.FK,{});switch(e.Field.type){case"text":return(0,r.FD)(s.dN,{$wide:e.Field.fullWidthBottom||e.Field.fullWidth,children:[(0,r.Y)(s.ro,{children:e.Field.label}),(0,r.Y)(s.eS,{$fontWeight:e.Field.fontNotBold?"normal":"bold",children:e.TheGachaItem?e.TheGachaItem[e.Field.field].toString():""})]});case"element":if(void 0!==e.Field.element){const t=e.TheGachaItem?void 0!==e.Field.filterFunction?e.TheGachaItem[e.Field.field].filter(e.Field.filterFunction):e.TheGachaItem[e.Field.field]:void 0;return(0,r.Y)(s.dN,{$wide:e.Field.fullWidthBottom||e.Field.fullWidth,children:(0,r.Y)(e.Field.element,{defs:t,parentEl:e.TheGachaItem})})}return(0,r.Y)(r.FK,{});case"gaugedElement":if(void 0!==e.Field.gaugedElement){const t=e.TheGachaItem?void 0!==e.Field.filterFunction?e.TheGachaItem[e.Field.field].filter(e.Field.filterFunction):e.TheGachaItem[e.Field.field]:void 0;return(0,r.Y)(s.dN,{$wide:e.Field.fullWidthBottom||e.Field.fullWidth,children:(0,r.Y)(e.Field.gaugedElement,{defs:t,level:1})})}return(0,r.Y)(r.FK,{});default:return(0,r.Y)(r.FK,{})}}const j=({elementId:e,elementType:t,onlyKeyFacts:n,gachaItem:o,hasImage:i})=>{if(!i)return null;const a=u.yD.elementTypes[t],l=a?.BelowImageBlock,d=!0!==n,c=(0,r.Y)(C.Kl,{elementID:e,noClick:!0,big:!0,bigHeight:d?a?.detailImageHeight:void 0,elementType:t,bacgroundMode:a?.backgroundMode});return(0,r.Y)(s._t,{$narrow:!!n,$width:d?a?.detailImageWidth:void 0,children:l?(0,r.FD)(s.Vl,{children:[c,o&&(0,r.Y)(l,{item:o})]}):c})},J=({elementType:e,elementId:t,onlyKeyFacts:n,gachaData:o})=>{const i=(0,F.U_)(e),a=o||i?.find(e=>e.id.toString().toLowerCase()===t.toLowerCase()||e.slug===t),l=(i?.length??0)>0&&!a,d=u.yD.elementTypes[e]?.detailV2;if(d&&!0!==n&&a)return(0,r.Y)(y,{item:a,elementType:e,config:d});const c=x(a,e),p=(0,D.G)(e,a),h=u.yD.elementTypes[e]?.titleElement,g=(u.yD.extraComponentsToRender[e]??[]).filter(e=>!0!==n||!0===e.showInPopup);return l?(0,r.FD)(s.sb,{children:[(0,r.Y)("h1",{children:"Not Found!"}),(0,r.Y)("div",{children:"Element you are trying to open is not found in the database..."})]}):(0,r.FD)(s.n5,{children:[(0,r.FD)(s.jV,{children:[(0,r.Y)(j,{elementId:t,elementType:e,onlyKeyFacts:n,gachaItem:a,hasImage:"table"!==u.yD.elementTypes[e]?.displayMode}),(0,r.Y)(s.uw,{children:(0,r.Y)(s.t1,{children:(0,r.FD)(s.ds,{children:[void 0!==h&&a?(0,r.Y)(h,{TheGachaItem:a}):(0,r.FD)(s._X,{$bgcolor:p,children:[a?.name," ",a?.title?(0,r.FD)(r.FK,{children:["- ",a?.title]}):(0,r.Y)(r.FK,{})]}),(0,r.Y)(s.d4,{children:(0,r.FD)(s.K4,{children:[c,(0,r.Y)(_.t,{element:a,elementType:e,itemDetailStructure:!0}),u.yD.gaugedStatsFullWidth?(0,r.Y)(r.FK,{}):(0,r.Y)(I,{elementId:t,elementType:e,fullWidth:!1})]})}),u.yD.gaugedStatsFullWidth?(0,r.Y)(s.d4,{children:(0,r.Y)(I,{elementId:t,elementType:e,fullWidth:!0})}):(0,r.Y)(r.FK,{})]})})})]}),g.length>0?(0,r.Y)(r.FK,{children:g.map((e,t)=>{if(e.hideIfEmpty&&a){const t=a[e.field];if(null==t||""===t||Array.isArray(t)&&0===t.length)return null}return e.noWrapper&&e.element?(0,r.Y)(e.element,{defs:a?.[e.field],parentEl:a},t):(0,r.FD)(s.ds,{children:[(0,r.FD)(s._X,{$bgcolor:p,children:[a?.name," - ",a?.title," ",e.label]}),(0,r.Y)(s.d4,{children:(0,r.Y)(R,{Field:e,TheGachaItem:a})})]},t)})}):(0,r.Y)(r.FK,{}),!n&&(0,r.Y)(v.a,{gachaItem:a,elementType:e,colorToRender:p})]})};function B(e){const t=e.elementId,n=(0,F.U_)(e.elementType),o=void 0!==t&&(n?.some(e=>e.slug===t||e.id.toString().toLowerCase()===t.toLowerCase())??!1);try{let n="",a="";const l=e.elementType,s=u.yD.classifications?.[l];
6267if(s?.forEach(e=>{e.details.forEach(r=>{t&&r.DisplayName.toLowerCase()===t.toLowerCase()&&(n=r.Name.toString().toLowerCase(),a=e.name.toString())})}),""!==n&&!o)return(0,r.Y)(i.q,{elementType:l,filterOverride:`${a}=${n}`})}catch(e){console.error(e)}return t?(0,r.Y)(J,{elementId:t,elementType:e.elementType}):(0,r.Y)(r.FK,{})}},17998(e,t,n){var r=n(63679);const o=r.Ay.div` 6268 margin: auto; 6269 width: 600px; 6270 padding: 10px; 6271 text-align: center; 6272 vertical-align: top; 6273 color: var(--theme-palette-color-3); 6274 border-radius: 6px; 6275 background-color: var(--theme-palette-color-5); 6276`,i=r.Ay.div` 6277 display: flex; 6278 flex-basis: 100%; 6279 gap: 10px; 6280 @media only screen and (max-width: 800px) { 6281 flex-direction: column; 6282 } 6283`,a=r.Ay.h2` 6284 color: ${e=>e.$color?e.$color:"var(--theme-headings-color)"}; 6285 ${e=>"background-color: "+(e.$bgcolor?e.$bgcolor:"var(--theme-palette-color-5)")+";"} 6286 display: flex; 6287 width: 100%; 6288 padding-left: 10px; 6289 border-radius: 10px 10px 0 0; 6290 justify-content: space-between; 6291 min-height: 60px; 6292 font-weight: bold; 6293 font-size: 16px !important; 6294 line-height: 60px; 6295 ${e=>e.$gradient?"background-image: linear-gradient(90deg, "+e.$gradient[0]+", "+e.$gradient[1]+");":""} 6296`,l=r.Ay.div` 6297 display: flex; 6298 flex-direction: column; 6299 width: 100%; 6300 ${e=>e.$wide?"grid-column: 1 / 3;":""} 6301`,s=r.Ay.div` 6302 color: var(--var-theme-palette-color-4); 6303 border-radius: 6px; 6304 border: 1px solid var(--theme-palette-color-5); 6305 background-color: var(--theme-palette-color-8); 6306 font-weight: ${e=>e.$fontWeight?e.$fontWeight:"bold"}; 6307 display: flex; 6308 gap: 5px; 6309 justify-content: flex-start; 6310 align-items: center; 6311 padding: 6px 9px; 6312 flex-wrap: wrap; 6313 font-size: 0.85em; 6314 max-width: ${e=>e.$fixedWidth?e.$fixedWidth:"100%"}; 6315`,d=r.Ay.div` 6316 display: flex; 6317 align-items: center; 6318 font-size: 0.75em; 6319 color: var(--theme-palette-color-3); 6320`,c=(r.Ay.div` 6321 ${e=>e.$iconName?"background-image: url("+e.$iconName+");":""} 6322 background-size: contain; 6323 background-repeat: no-repeat; 6324 background-position: center; 6325 width: ${e=>e.$width?e.$width:"40"}px; 6326 height: ${e=>e.$width?e.$width:"40"}px; 6327 6328 text-align: center; 6329 line-height: ${e=>e.$width?+e.$width-(e.$verticalCorrection?+e.$verticalCorrection:0):40-(e.$verticalCorrection?+e.$verticalCorrection:0)}px; 6330 color: var(--theme-palette-color-4) !important; 6331 font-size: 1.5em; 6332 text-shadow: 1px 1px 1px #000; 6333 ${e=>e.$addFilter?"filter: "+e.$addFilter+";":""} 6334`,r.Ay.div` 6335 width: 100%; 6336 margin-right: auto; 6337 margin-left: auto; 6338 display: flex; 6339 flex-wrap: wrap; 6340 gap: 10px; 6341 justify-content: center; 6342 @media only screen and (max-width: 800px) { 6343 max-width: unset; 6344 } 6345`),p=r.Ay.div` 6346 display: flex; 6347 width: ${e=>e.$narrow?"170px":void 0!==e.$width?`${e.$width}px`:"200px"}; 6348 min-height: 300px; 6349 gap: 10px; 6350 justify-content: center; 6351 @media only screen and (max-width: 800px) { 6352 width: 100%; 6353 height: auto; 6354 flex-direction: column; 6355 } 6356`,h=r.Ay.div` 6357 display: flex; 6358 flex-direction: column; 6359 gap: 10px; 6360 width: 100%; 6361`,u=r.Ay.div` 6362 display: flex; 6363 gap: 10px; 6364 flex: 1; 6365 min-width: 0; 6366 @media only screen and (max-width: 800px) { 6367 flex-wrap: wrap; 6368 width: 100%; 6369 } 6370`,g=r.Ay.div` 6371 display: flex; 6372 flex-direction: column; 6373 gap: 10px; 6374 height: 100%; 6375 width: 100%; 6376`,m=r.Ay.div` 6377 flex-basis: ${e=>e.$basis?e.$basis:"auto"}; 6378 display: flex; 6379 flex-direction: column; 6380 justify-content: flex-start; 6381 align-items: flex-start; 6382 6383 background-color: var(--theme-palette-color-7); 6384 border-radius: 6px; 6385 padding: 0; 6386 flex-wrap: nowrap; 6387 width: 100%; 6388 color: white; 6389 height: 100%; 6390 box-shadow: 0px 3px 5px #000; 6391 border-radius: 6px; 6392 @media only screen and (max-width: 800px) { 6393 width: 100%; 6394 height: auto; 6395 } 6396`,f=r.Ay.div` 6397 display: flex; 6398 width: 100%; 6399 flex-wrap: wrap; 6400 margin-top: 5px; 6401 padding: 10px; 6402 justify-content: center; 6403 flex-direction: row; 6404 @media only screen and (max-width: 1300px) { 6405 flex-direction: column; 6406 } 6407`,x=r.Ay.section` 6408 display: grid; 6409 grid-template-columns: 1fr 1fr; 6410 gap: 10px; 6411 width: 100%; 6412 @media only screen and (max-width: 1300px) { 6413 display: block; 6414 } 6415`;n.d(t,["K4",0,x,"Vl",0,h,"_X",0,a,"_t",0,p,"d4",0,f,"dN",0,l,"ds",0,m,"eS",0,s,"jV",0,i,"n5",0,c,"ro",0,d,"sb",0,o,"t1",0,g,"uw",0,u])},3648(e,t,n){n.d(t,{t:()=>u});var r=n(10201),o=n(17402),i=n(92366),a=n(68003),l=n(90653),s=n(6768),d=n(91543),c=n(28266),p=n(70165),h=n(12434);const u=({item:e,elementType:t,config:n,art:o,showName:s,verdictAccent:d,verdict:c,extra:u})=>{const g=(n.facets??[]).flatMap(n=>{const r=(0,l.s)(e,t,n.field,{classification:n.classification});return r?[{...n,resolved:r}]:[]}),x=(n.subtitle??[]).map(t=>void 0===e[t]||null===e[t]?"":String(e[t])).filter(e=>""!==e).join(" · "),v=n.badge,y=void 0!==c?c:(0,r.Y)(m,{item:e,config:n,accent:d}),w=""!==String(e.image||e.icon||"");return(0,r.FD)(a.j$,{$art:w?o:0,$verdict:null!==y,children:[w?(0,r.Y)(f,{item:e,elementType:t,art:o,square:!0===n.art?.square}):null,(0,r.FD)(a.lz,{children:[(0,r.FD)(a.iH,{children:[!0===s?(0,r.Y)(a.SX,{children:String(e.name??"")}):null,v?(0,r.Y)(v,{item:e}):null]}),x?(0,r.Y)(a.Ms,{children:x}):null,g.length>0?(0,r.Y)(a.iA,{$count:g.length,children:g.map(e=>(0,r.FD)(a.ET,{href:e.resolved.href,"data-native":!0,children:[e.resolved.icon?(0,r.Y)(a.FQ,{src:e.resolved.icon,alt:"",loading:"lazy"}):null,(0,r.FD)(a.T4,{children:[(0,r.Y)(i.fo,{children:e.label}),(0,r.Y)(a.LX,{children:e.resolved.label})]})]},e.field))}):null,(n.tagRows??[]).map(n=>{const o=(a=e[n.field],Array.isArray(a)?a.map(String).filter(e=>""!==e):[]);var a;if(0===o.length)return null;const l=p.yD.elementTypes[t]?.slugOverride??t;return(0,r.FD)(i.Lj,{children:[(0,r.Y)(i.fo,{children:n.label}),o.map(e=>(0,r.Y)(i.vu,{$pill:!0===n.pill,as:n.filter?"a":"span",href:n.filter?`${h.Ay.BASE_FOLDER}${l}/?${n.filter}=${encodeURIComponent(e)}`:void 0,"data-native":!0,children:e},e))]},n.field)}),u]}),y]})},g=({arenas:e,letters:t})=>(0,r.Y)(a.py,{$count:e.length,children:e.map(e=>{const n=t[e],o="string"==typeof n?n:"";return(0,r.FD)(a.Ht,{children:[(0,r.Y)(a.gj,{children:p.yD.tierlistCategories?.[e]?.displayName??e}),(0,r.Y)(a.T9,{$bgcolor:(0,l.O)(o),children:o||"â"})]},e)})}),m=({item:e,config:t,accent:n})=>{const l=t.verdict;if(!l)return null;const s=Object.keys(p.yD.tierlistCategories??{}),d=e.tiers??{},c=!0===l.tiers&&s.length>0&&Object.keys(d).length>0,h=(l.extraTiers??[]).flatMap(t=>{const n=e[t.field];return"object"!=typeof(r=n)||null===r||Array.isArray(r)||0===s.length?[]:s.some(e=>"string"==typeof n[e]&&""!==n[e])?[{...t,letters:n}]:[];var r}),u=(l.rows??[]).flatMap(t=>{const n=t.element({item:e});return n?[{label:t.label,element:n}]:[]});return c||0!==h.length||0!==u.length?(0,r.FD)(a.QB,{$accent:n,children:[l.label||l.byline?(0,r.FD)(i.y9,{children:[(0,r.Y)(i.fo,{children:l.label??"Tier ratings"}),l.byline?(0,r.Y)(i.KT,{children:l.byline}):null]}):null,c?(0,r.Y)(g,{arenas:s,letters:d}):null,h.map((e,t)=>(0,r.FD)(o.FK,{children:[c||t>0?(0,r.Y)(i.jO,{}):null,(0,r.FD)(a.kw,{$highlight:!0===e.highlight?.(),children:[(0,r.Y)(i.fo,{children:e.label}),(0,r.Y)(g,{arenas:s,letters:e.letters})]})]},e.field)),u.map((e,t)=>(0,r.FD)("div",{children:[c||h.length>0||t>0?(0,r.Y)(i.jO,{}):null,(0,r.FD)(i.y9,{children:[(0,r.Y)(i.fo,{children:e.label}),e.element]})]},e.label))]}):null},f=({item:e,elementType:t,art:n,square:i})=>{const l=(0,c.d)(t,e),[p,u]=(0,o.J0)(0),g=(0,o.li)(null),[m,f]=(0,o.J0)({overflows:!1,atStart:!0,atEnd:!1}),x=(0,o.hb)(()=>{const e=g.current;if(!e)return;const t=e.scrollWidth-e.clientWidth;f({overflows:t>1,atStart:e.scrollLeft<=1,atEnd:e.scrollLeft>=t-1})},[]);(0,o.vJ)(()=>{x();const e=g.current;if(!e)return;const t=new ResizeObserver(x);return t.observe(e),()=>t.disconnect()},[x,e.id]);const v=e=>{const t=g.current;t&&t.scrollBy({left:e*t.clientWidth,behavior:"smooth"})},y=l.selected?.image??String(e.image||e.icon||""),w=e=>`https://static.dotgg.gg/${h.Ay.TheGame}/${e}`;return(0,r.FD)(a.MR,{children:[(0,r.Y)(a.sQ,{$art:n,$square:i,src:w(y),alt:String(e.name??""),loading:"lazy",onClick:()=>u(e=>e+1)}),(0,r.FD)(a.XF,{children:[m.overflows?(0,r.Y)(a.is,{type:"button","aria-label":"Previous images",$spent:m.atStart,onClick:()=>v(-1),children:"â¹"}):null,(0,r.Y)(a.Z9,{ref:g,onScroll:x,children:l.variants.length>1?l.variants.map(e=>(0,r.Y)(a.zi,{type:"button",title:e.label,"aria-label":e.label,"aria-pressed":l.selected?.key===e.key,$on:l.selected?.key===e.key,onClick:()=>l.select(e.key),children:(0,r.Y)("img",{src:w(e.image),alt:"",loading:"lazy"})},e.key)):null}),m.overflows?(0,r.Y)(a.is,{type:"button","aria-label":"More images",$spent:m.atEnd,onClick:()=>v(1),children:"âº"}):null,(0,r.Y)(a.GP,{type:"button",title:"View full art","aria-label":"View full art",onClick:()=>u(e=>e+1),children:(0,r.Y)(s.jh,{size:16})})]}),(0,r.Y)(d.O,{imagePath:y,altText:String(e.name??""),show:p,variants:l})]})}},90653(e,t,n){var r=n(70165),o=n(12434);n.d(t,["O",0,e=>{const t=r.yD.itemTiersDrawOptions;if(!t)return;const n=t.names.indexOf(e);return n>=0?t.colors[n]:void 0},"s",0,(e,t,n,i)=>{const a=e[n],l="string"==typeof a?a:"";if(!l)return null;const s=i?.classification??n,d=r.yD.classifications[t]?.find(e=>e.name===s),c=d?.details.find(e=>String(e.Name)===l),p=r.yD.elementTypes[t]?.slugOverride??t;return{raw:l,label:c?.DisplayName??l,icon:c?.Icon?`https://static.dotgg.gg/${o.Ay.TheGame}/${c.Icon}`:"",href:`${o.Ay.BASE_FOLDER}${p}/?${s}=${encodeURIComponent(l)}`}}])},6768(e,t,n){n.d(t,{AC:()=>w.AC,Kl:()=>D,jh:()=>C});var r=n(10201),o=n(17402),i=n(63679),a=n(92475),l=n(70165),s=n(12434);const d=({small:e,elementType:t,gachaItem:n})=>{const[i,d]=(0,o.J0)("");return(0,r.Y)(u,{$small:e,children:l.yD.classifications[t]?.map((t,l)=>{if(!t.renderOnPortrait||!n)return null;let u=[];
6415return u=t.isArray?n[t.name]:[n[t.name]],u=(u??[]).flatMap(e=>Array.isArray(e)?e:[e]),u.map((n,u)=>{const g=null==n?"":String(n).toLowerCase(),m=""===g?void 0:t.details.find(e=>e.Name.toString().toLowerCase()===g);return t.renderTagOnPortrait&&n?(0,r.FD)(h,{children:[t.renderTagNameOnPortrait?`${t.displayName}: `:"",void 0!==t.processTagOutput?t.processTagOutput(n):n]},`${l}_${u}`):t.renderSpecial?(0,r.FD)(p,{onMouseEnter:()=>{d(`${t.name}_${u}`)},onMouseLeave:()=>{d("")},$small:e,children:[(0,r.Y)(t.renderSpecial,{value:n,small:e}),(0,r.FD)(c,{$active:i===`${t.name}_${u}`,$small:e,children:[t.displayName,": ",n]})]},`${l}_${u}`):m?.Icon?(0,r.FD)(p,{onMouseEnter:()=>{d(`${t.name}_${u}`)},onMouseLeave:()=>{d("")},$small:e,children:[(0,r.Y)(a.D,{width:e?"20":"30",height:e?"20":"30",$hover:!0,src:`https://static.dotgg.gg/${s.Ay.TheGame}/${m?.Icon}`,$width:e?"20px":void 0,$height:e?"20px":void 0,$isCircledBorder:t.isCircledBorder?m.color:void 0}),(0,r.FD)(c,{$active:i===`${t.name}_${u}`,$small:e,children:[t.displayName,": ",m.DisplayName]})]},`${l}_${u}`):(0,r.Y)(o.Ay.Fragment,{},l)})})})},c=i.I4.div` 6416 display: ${e=>e.$active?"flex":"none"}; 6417 color: var(--theme-palette-color-4); 6418 font-size: 0.7em; 6419 line-height: 0.9em; 6420 height: ${e=>e.$small?"20px":"30px"}; 6421 align-items: center; 6422`,p=i.I4.div` 6423 height: ${e=>e.$small?"20px":"30px"}; 6424 border-radius: 6px; 6425 display: flex; 6426 padding-right: 10px; 6427 gap: 3px; 6428 &:hover { 6429 background-color: rgba(0, 0, 0, 0.3); 6430 backdrop-filter: blur(9px); 6431 } 6432`,h=i.I4.div` 6433 height: 20px; 6434 border-radius: 6px; 6435 width: fit-content; 6436 display: flex; 6437 padding: 2px 10px; 6438 align-items: center; 6439 font-size: 0.7em; 6440 background-color: rgba(0, 0, 0, 0.3); 6441 backdrop-filter: blur(9px); 6442`,u=i.I4.div` 6443 position: absolute; 6444 display: ${e=>e.$small?"none":"flex"}; 6445 flex-direction: column; 6446 top: ${e=>e.$small?"2px":"10px"}; 6447 left: ${e=>e.$small?"2px":"10px"}; 6448 gap: 5px; 6449`;var g=n(15299),m=n(91543),f=n(28266),x=n(9299),v=n(21398),y=n(81616),w=n(12531),b=n(31145);const $=e=>{if(void 0!==e.imageElement){const t=e.imageElement;return(0,r.Y)(t,{TheGachaItem:e.gachaItem,small:e.small,big:e.big})}return(0,r.FD)(r.FK,{children:[(0,r.Y)(w.Td,{$pic:e.picUrl,$backgroundMode:e.backgroundMode,$iconSize:e.iconSize,$missing:e.missingImage&&!!e.placeholderImageUrl,draggable:e.draggable,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragExit:e.onDragExit}),e.placeholderImageUrl&&e.gachaItem.icon&&(0,r.Y)(v.A,{src:`https://static.dotgg.gg/${s.Ay.TheGame}/${e.gachaItem.icon}`,isMissing:e.onMissing})]})},k=e=>{const t=e.nameSuffix?void 0:e.nameElement;return(0,r.FD)(w.sM,{$small:e.small,children:[void 0!==t?(0,r.Y)(t,{TheGachaItem:e.gachaItem,small:e.small}):(0,r.FD)(w.KC,{$small:e.small,children:[e.gachaItem.name,e.nameSuffix??""]}),!e.small&&e.gachaItem.title?(0,r.Y)(w.l7,{children:e.gachaItem.title}):(0,r.Y)(r.FK,{})]})},Y=({badge:e})=>e?(0,r.Y)(w.I,{$color:e.color,title:e.title,"aria-label":e.title,role:"img",children:e.glyph}):(0,r.Y)(r.FK,{}),A=({tierEval:e})=>e&&e>0?(0,r.FD)(w.HZ,{children:[l.yD.tierlistRatingCaption,": ",e]}):(0,r.Y)(r.FK,{}),C=({size:e=18})=>(0,r.FD)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.Y)("path",{d:"M2.25 18.75V21.375C2.25 21.5821 2.41789 21.75 2.625 21.75H5.25M2.25 5.25V2.625C2.25 2.41789 2.41789 2.25 2.625 2.25H5.25M18.75 2.25H21.375C21.5821 2.25 21.75 2.41789 21.75 2.625V5.25M21.75 18.75V21.375C21.75 21.5821 21.5821 21.75 21.375 21.75H18.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.Y)("path",{d:"M18 18L14.3315 14.3315M6.75 11.1522C6.75 13.5834 8.72092 15.5543 11.1522 15.5543C13.5834 15.5543 15.5543 13.5834 15.5543 11.1522C15.5543 8.72092 13.5834 6.75 11.1522 6.75C8.72092 6.75 6.75 8.72092 6.75 11.1522Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),F=e=>(0,r.FD)(w.E7,{children:[(0,r.Y)(f.Z,{state:e.variants}),(0,r.Y)(w.XE,{onClick:t=>{t.stopPropagation(),e.onMagnify()},title:"View full size",children:(0,r.Y)(C,{})})]}),D=e=>{const[t,n]=(0,o.J0)(0),[i,a]=(0,o.J0)(!1),[c,p]=(0,o.J0)(0),h=(0,y.U_)(e.elementType),u=(0,o.Kr)(()=>
6449{if(h&&e.elementID)return h.find(t=>t.id.toString().toLowerCase()===e.elementID.toLowerCase()||t.slug===e.elementID)},[h,e.elementID]),v=(0,f.d)(e.elementType,u);if(null===e.elementID||!u)return"dev"===s.Ay.mode&&console.warn("No item found for ",e.elementType,e.elementID),(0,r.Y)(r.FK,{});const C=(0,b.G)(e.elementType,u),D=l.yD.elementTypes[e.elementType]?.nameElement,S=l.yD.elementTypes[e.elementType]?.imageElement,I=l.yD.elementTypes[e.elementType]?.imagePlaceholder,z=i&&I?I:u.icon,T=(E=e.big,L=z,M=v.selected?.image,E&&M?M:L);var E,L,M;const N=e.embed&&l.yD.gachaItemEmbedElements[e.elementType]&&l.yD.gachaItemEmbedElements[e.elementType].sidePanel?l.yD.gachaItemEmbedElements[e.elementType].sidePanel({element:u}):null;return(0,r.FD)(x.t,{children:[(0,r.FD)(w.QB,{children:[(0,r.FD)(w.JA,{$small:e.small,$big:e.big,$bigHeight:e.bigHeight,children:[(0,r.FD)(w.Qi,{href:e.hrefOverride??(P=e.elementType,O=u?.slug,`${s.Ay.BASE_URL}${l.yD.elementTypes[P]?.slugOverride??P}/${O}`),"data-native":!0,$color:C,$accent:e.accentColor,$dimmed:e.isCollection&&(!e.collection||0===+e.collection),$noHover:e.noClick||e.noHoverEffect,$small:e.small,$big:e.big,$bigHeight:e.bigHeight,onClick:t=>{e.noClick?t.preventDefault():void 0!==e.onClick?(t.preventDefault(),t.stopPropagation(),e.onClick(u?.id)):(t.preventDefault(),n(e=>e+1),t.stopPropagation())},children:[(0,r.Y)(Y,{badge:e.badge}),(0,r.Y)(A,{tierEval:e.tierEval}),(0,r.Y)(d,{small:e.small,elementType:e.elementType,gachaItem:u}),(0,r.Y)(w.az,{children:(0,r.Y)($,{imageElement:S,gachaItem:u,small:e.small,big:e.big,picUrl:T,backgroundMode:e.bacgroundMode??"contain",iconSize:l.yD.elementTypes[e.elementType]?.gridIconSize,missingImage:i,placeholderImageUrl:I,draggable:e.draggable,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragExit:e.onDragExit,onMissing:()=>a(!0)})}),(0,r.Y)(k,{nameElement:D,gachaItem:u,small:e.small,nameSuffix:e.nameSuffix})]}),N]}),e.big&&(0,r.Y)(F,{variants:v,onMagnify:()=>p(e=>e+1)})]}),(0,r.Y)(g.l,{itemId:e.elementID,elementType:e.elementType,show:t,variant:e.popupVariant,context:e.popupContext}),(0,r.Y)(m.O,{imagePath:v.selected?.image??z,altText:u.name,show:c,variants:v})]});var P,O}},12531(e,t,n){var r=n(63679),o=n(70165),i=n(12434);const a=()=>o.yD?.gridHoverBrightness??1.2,l=r.I4.div` 6450 width: 100%; 6451 display: flex; 6452 flex-direction: column; 6453 background-color: var(--theme-palette-color-8); 6454 border-top: solid 1px var(--theme-palette-color-5); 6455 padding: ${e=>e.$small?"4px 6px":"10px"}; 6456 border-radius: 0 0 6px 6px; 6457`,s=r.I4.div` 6458 position: absolute; 6459 left: 2px; 6460 top: 2px; 6461 z-index: 1; 6462 border-radius: 6px; 6463 background-color: rgba(0, 0, 0, 0.55); 6464 color: ${e=>e.$color??"var(--theme-palette-color-4)"}; 6465 font-size: 0.75em; 6466 line-height: 1; 6467 padding: 2px 4px; 6468 pointer-events: none; 6469`,d=r.I4.div` 6470 text-align: right; 6471 position: absolute; 6472 right: 2px; 6473 top: 2px; 6474 border-radius: 6px; 6475 background-color: rgba(0, 0, 0, 0.5); 6476 color: var(--theme-palette-color-4); 6477 font-size: 0.7em; 6478 line-height: 0.9em; 6479 padding: 2px 5px; 6480 border: 1px solid white; 6481`,c=r.I4.div` 6482 color: var(--theme-palette-color-4); 6483 white-space: nowrap; 6484 overflow: hidden; 6485 text-overflow: ellipsis; 6486 width: 100%; 6487 font-size: ${e=>e.$small?"0.7em":"1em"}; 6488 line-height: ${e=>e.$small?"1.1em":"inherit"}; 6489`,p=r.I4.div` 6490 white-space: nowrap; 6491 overflow: hidden; 6492 text-overflow: ellipsis; 6493 font-size: 0.8em; 6494 width: 100%; 6495 line-height: 1.2em; 6496 color: var(--theme-palette-color-3); 6497`,h=(e,t)=>void 0!==e.$bigHeight?`${e.$bigHeight}px`:t,u=r.I4.div.attrs(e=>({style:{filter:e.$dimmed?"brightness(0.6)":void 0}}))` 6498 width: 100%; 6499 height: ${e=>e.$small||e.$big?"auto":"265px"}; 6500 color: unset !important; 6501 position: relative; 6502 display: flex; 6503 flex-direction: column; 6504 border-radius: 6px; 6505 align-items: start; 6506 user-select: none; 6507 @media only screen and (max-width: 700px) { 6508 height: ${e=>e.$small?"auto":e.$big?h(e,"280px"):"200px"}; 6509 } 6510`,g=r.I4.a.attrs(e=>({style:{background:e.$color?`conic-gradient(from 178deg at 48.65% 50%, ${e.$color} 0deg, var(--theme-palette-color-8) 226.73077583312988deg, ${e.$color} 360deg)`:"conic-gradient(from 178deg at 48.65% 50%, var(--theme-palette-color-7) 0deg, var(--theme-palette-color-5) 226.73077583312988deg, var(--theme-palette-color-7) 360deg)",filter:e.$dimmed?"brightness(0.6)":void 0}}))` 6511 width: 100%; 6512 height: ${e=>e.$small?"115px":e.$big?h(e,"300px"):"265px"}; 6513 color: unset !important; 6514 position: relative; 6515 display: flex; 6516 flex-direction: column; 6517 border-radius: 6px; 6518 box-shadow: 0px 3px 5px #000; 6519 align-items: center; 6520 user-select: none; 6521 /* 2px when accented so the ring reads at the 115px tier-list card size; the 6522 unaccented default stays 1px so nothing shifts on games that never set it. */ 6523 border: solid 6524 ${e=>e.$accent?"2px":"1px"} 6525 ${e=>e.$accent??"var(--theme-palette-color-5)"}; 6526 ${e=>e.$noHover?"":`\n &:hover {\n filter: brightness(${a()});\n box-shadow: 0px 0px 2px 1px var(--theme-palette-color-1);\n }\n `} 6527 @media only screen and (max-width: 700px) { 6528 height: ${e=>e.$small?"115px":e.$big?h(e,"280px"):"200px"}; 6529 } 6530`,m=e=>e?`url(https://static.dotgg.gg/${i.Ay.TheGame}/${e})`:"none",f=r.I4.div` 6531 width: 100%; 6532 flex-basis: 100%; 6533 padding: 5px 5px 0 5px; 6534 border-radius: 6px 6px 0 0; 6535 height: 100%; 6536`,x=r.I4.div.attrs(e=>({style:{backgroundImage:m(e.$pic),backgroundSize:e.$iconSize?`${e.$iconSize}px`:e.$backgroundMode,filter:e.$missing?"grayscale(100%) opacity(0.5)":"none"}}))` 6537 width: 100%; 6538 height: 100%; 6539 flex-basis: 100%; 6540 background-position: center; 6541 background-repeat: no-repeat; 6542 cursor: pointer; 6543`,v=r.I4.div.attrs(e=>({style:{backgroundImage:m(e.$pic),backgroundSize:e.$backgroundMode??"cover"}}))` 6544 width: 100%; 6545 height: 100%; 6546 background-position: center top; 6547 background-repeat: no-repeat; 6548 cursor: pointer; 6549`,y=r.I4.div` 6550 display: flex; 6551 align-items: center; 6552 justify-content: space-between; 6553 gap: 12px; 6554 padding: 8px 0; 6555 width: 100%; 6556`,w=r.I4.div` 6557 display: flex; 6558 align-items: center; 6559 justify-content: center; 6560 width: 28px; 6561 height: 28px; 6562 color: var(--theme-palette-color-1); 6563 cursor: pointer; 6564 transition: 6565 background 0.2s ease, 6566 color 0.2s ease; 6567 border-radius: 4px; 6568 background: var(--theme-palette-color-7); 6569 6570 &:hover { 6571 color: var(--theme-palette-color-2); 6572 background: var(--theme-palette-color-6); 6573 } 6574`,b=r.I4.div` 6575 display: flex; 6576 flex-direction: column; 6577 width: 100%; 6578`;n.d(t,["AC",0,v,"E7",0,y,"HZ",0,d,"I",0,s,"JA",0,u,"KC",0,c,"OL",0,a,"QB",0,b,"Qi",0,g,"Td",0,x,"XE",0,w,"az",0,f,"l7",0,p,"sM",0,l])},31145(e,t,n){n.d(t,{G:()=>o});var r=n(70165);function o(e,t){const n=r.yD.classifications[e]?.find(e=>
6578!0===e.isDirectBackgroundColorSetter);if(n)return t?t[n.name]:"";const o=r.yD.classifications[e]?.find(e=>!0===e.isBackgroundClassification);if(!o)return;const i=t?t[o.name]:"",a=null==i?"":String(i);return o.details.find(e=>String(e.Name)===a)?.color}},41906(e,t,n){n.d(t,{rH:()=>d,wl:()=>p});var r=n(70165),o=n(173),i=n(27802);const a=" query",l=new Map,s=e=>{if(!l.has(e)){const t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");l.set(e,new RegExp(t,"i"))}return l.get(e)};function d(e,t){if(null==e)return!1;if(t.includes(",")){const n=t.split(",").map(e=>e.trim()).filter(e=>""!==e);if(Array.isArray(e))return n.some(t=>e.some(e=>String(e).toLowerCase()===t));const r=String(e).toLowerCase();if(r.includes(",")){const e=r.split(",").map(e=>e.trim());return n.some(t=>e.includes(t))}return n.some(e=>r===e)}if(Array.isArray(e))return e.some(e=>String(e).toLowerCase()===t);const n=String(e).toLowerCase();return n.includes(",")?n.split(",").map(e=>e.trim()).includes(t):n===t}function c(e){if(null!=e&&""!==e)return String(e).toLowerCase()}function p(e,t={},n,l){if(!e||0===e.length)return[];const p="1"===t.invertFilters;if(n&&n.length>0)return function(e,t){const n=new Set(t.map(e=>e.trim().toLowerCase()).filter(e=>""!==e));if(0===n.size)return[];const r=new Map,o=new Map,i=new Map;for(const t of e){const e=c(t.slug);void 0===e||r.has(e)||r.set(e,t);const n=c(t.id);void 0===n||o.has(n)||o.set(n,t);const a=c(t.name);if(void 0!==a){const e=i.get(a);void 0===e?i.set(a,[t]):e.push(t)}}const a=new Set;for(const e of n){const t=r.get(e)??o.get(e);if(void 0===t)for(const t of i.get(e)??[])a.add(t);else a.add(t)}return e.filter(e=>a.has(e))}(e,n);const h=t.textSearch,u="string"==typeof h&&(0,o.Q1)(h)?(0,i.I9)(h,e):void 0,g=Object.entries(t).filter(([e,t])=>""!==t&&null!=t&&"invertFilters"!==e).filter(([e])=>!(u&&"textSearch"===e)).map(([e,t])=>({key:e,value:t,stringValue:String(t).toLowerCase()}));u&&g.push({key:a,value:h,stringValue:""});let m=e;return g.length>0&&(m=e.filter(e=>{let t=!0;for(const{key:n,value:r,stringValue:o}of g){switch(n){case"sortby":case"sortorder":continue;case a:t=u?.matches(e)??!0;break;case"textSearch":const r=s(o);let i=!1;for(const[t,n]of Object.entries(e))if(null!=n&&r.test(String(n))){i=!0;break}if(!i){t=!1;break}break;default:d(e[n],o)||(t=!1)}if(!t)break}return p?!t:t})),function(e,t,n){const o=t.sortby,i=t.sortorder;if(o||i)return e.sort((e,t)=>{const n=o||"name",r=e[n],a=t[n];if(null==r&&null==a)return String(e.name||"").localeCompare(String(t.name||""));if(null==r)return"r"===i?1:-1;if(null==a)return"r"===i?-1:1;const l=String(r),s=String(a),d=/^-?\d*\.?\d+$/.test(l.trim()),c=/^-?\d*\.?\d+$/.test(s.trim());let p=0;if(d&&c){const e=parseFloat(l),t=parseFloat(s);p="r"===i?t-e:e-t}else p="r"===i?s.localeCompare(l):l.localeCompare(s);return 0===p?String(e.name||"").localeCompare(String(t.name||"")):p});if(n&&r.yD.elementTypes[n]?.sortBy){const{sortBy:t,sortOrder:o,sortMethod:i}=r.yD.elementTypes[n];return e.sort((e,n)=>{const r=e[t],a=n[t];if(null==r&&null==a)return 0;if(null==r)return"desc"===o?1:-1;if(null==a)return"desc"===o?-1:1;if("number"===i){const e=Number(a)-Number(r);return"desc"===o?e:-e}if("version"===i){const t=String(r),i=String(a),l=t.split(".").map(Number),s=i.split(".").map(Number),d=Math.max(l.length,s.length);for(let e=0;e<d;e++){const t=l[e]||0,n=s[e]||0;if(t!==n){const e=t-n;return"desc"===o?-e:e}}return String(e.name||"").localeCompare(String(n.name||""))}{const e=String(r),t=String(a).localeCompare(e);return"desc"===o?t:-t}})}return e.sort((e,t)=>String(e.name||"").localeCompare(String(t.name||"")))}(m,t,l)}},70892(e,t,n){n.d(t,{f:()=>D});var r=n(10201),o=n(17402),i=n(56828),a=n(79407),l=n(1057),s=n(41906),d=n(27802),c=n(38861),p=n(16281);function h(e,t){const{filters:n,listName:r,facets:i}=t,a=(0,o.Kr)(()=>{const t=new Map(i.map(e=>[e.name.toLowerCase(),e]));return(0,p.s)((0,d.sS)(e??[]),e??[],e=>{const n=t.get(e);if(n)return{label:n.displayName,selectKey:n.name,options:n.details?.map(e=>({value:String(e.Name),label:e.DisplayName??String(e.Name)}))}})},[e,i]);return(0,o.Kr)(()=>{const t=[...e??[]],o=e=>(0,s.wl)([...t],e).length;return{keys:a,lookup:(0,c.$X)(a),listName:r,total:t.length,count:e=>o({...n,textSearch:e}),countAlone:e=>o({textSearch:e}),notes:t=>(0,d.Us)(t,e??[])}},[a,e,n,r])}var u=n(39583),g=n(70165),m=n(4738),f=n(82965),x=n(81616),v=n(4428),y=n(8609),w=n(84473),b=n(472),$=n(95605),k=n(31146),Y=n(50086);const A=({showAllToggle:e,hiddenFilterCount:t,allFilters:n,setAllFilters:o,invertFilters:i,setInvertFilters:a,filterchange:l,searchString:s})=>(0,r.FD)(r.FK,{children:[e&&(0,r.FD)(y.Ly,{$active:n,$wide:!0,role:"button",tabIndex:0,"aria-expanded":n,title:n?"Show fewer filters":`Show ${t} more filters`,onClick:()=>{(0,m.TV)("cards-allfilters",n?"0":"1",30),o(!n)},children:[(0,r.FD)("svg",{width:"15",height:"15",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.Y)("path",{d:"M19.25 9.99989H6.895H19.25ZM2.534 9.99989H0.75H2.534ZM19.25 16.6069H13.502H19.25ZM9.141 16.6069H0.75H9.141ZM19.25 3.39289H16.145H19.25ZM11.784 3.39289H0.75H11.784ZM13.964 5.57289C14.2503 5.57289 14.5338 5.5165 14.7983 5.40695C15.0627 5.29739 15.3031 5.13681 15.5055 4.93438C15.7079 4.73195 15.8685 4.49163 15.9781 4.22714C16.0876 3.96265 16.144 3.67917 16.144 3.39289C16.144 3.10661 16.0876 2.82313 15.9781 2.55864C15.8685 2.29415 15.7079 2.05383 15.5055 1.8514C15.3031 1.64897 15.0627 1.48839 14.7983 1.37883C14.5338 1.26928 14.2503 1.21289 13.964 1.21289C13.3858 1.21289 12.8313 1.44257 12.4225 1.8514C12.0137 2.26023 11.784 2.81472 11.784 3.39289C11.784 3.97106 12.0137 4.52555 12.4225 4.93438C12.8313 5.34321 13.3858 5.57289 13.964 5.57289ZM4.714 12.1799C5.29217 12.1799 5.84666 11.9502 6.25549 11.5414C6.66432 11.1326 6.894 10.5781 6.894 9.99989C6.894 9.42172 6.66432 8.86723 6.25549 8.4584C5.84666 8.04957 5.29217 7.81989 4.714 7.81989C4.13583 7.81989 3.58134 8.04957 3.17251 8.4584C2.76368 8.86723 2.534 9.42172 2.534 9.99989C2.534 10.5781 2.76368 11.1326 3.17251 11.5414C3.58134 11.9502 4.13583 12.1799 4.714 12.1799ZM11.321 18.7879C11.8993 18.7879 12.4539 18.5582 12.8628 18.1492C13.2718 17.7403 13.502 17.1852 13.502 16.6069C13.502 16.0286 13.2718 15.4745 12.8628 15.0655C12.4539 14.6566 11.8993 14.4269 11.321 14.4269C10.7428 14.4269 10.1883 14.6566 9.77951 15.0654C9.37068 15.4742 9.141 16.0287 9.141 16.6069C9.141 17.1851 9.37068 17.7396 9.77951 18.1484C10.1883 18.5572 10.7428 18.7879 11.321 18.7879Z",fill:"white"}),(0,r.Y)("path",{d:"M19.25 9.99989H6.895M2.534 9.99989H0.75M2.534 9.99989C2.534 9.42172 2.76368 8.86723 3.17251 8.4584C3.58134 8.04957 4.13583 7.81989 4.714 7.81989C5.29217 7.81989 5.84666 8.04957 6.25549 8.4584C6.66432 8.86723 6.894 9.42172 6.894 9.99989C6.894 10.5781 6.66432 11.1326 6.25549 11.5414C5.84666 11.9502 5.29217 12.1799 4.714 12.1799C4.13583 12.1799 3.58134 11.9502 3.17251 11.5414C2.76368 11.1326 2.534 10.5781 2.534 9.99989ZM19.25 16.6069H13.502M13.502 16.6069C13.502 17.1852 13.2718 17.7403 12.8628 18.1492C12.4539 18.5582 11.8993 18.7879 11.321 18.7879C10.7428 18.7879 10.1883 18.5572 9.77951 18.1484C9.37068 17.7396 9.141 17.1851 9.141 16.6069M13.502 16.6069C13.502 16.0286 13.2718 15.4745 12.8628 15.0655C12.4539 14.6566 11.8993 14.4269 11.321 14.4269C10.7428 14.4269 10.1883 14.6566 9.77951 15.0654C9.37068 15.4742 9.141 16.0287 9.141 16.6069M9.141 16.6069H0.75M19.25 3.39289H16.145M11.784 3.39289H0.75M11.784 3.39289C11.784 2.81472 12.0137 2.26023 12.4225 1.8514C12.8313 1.44257 13.3858 1.21289 13.964 1.21289C14.2503 1.21289 14.5338 1.26928 14.7983 1.37883C15.0627 1.48839 15.3031 1.64897 15.50
657855 1.8514C15.7079 2.05383 15.8685 2.29415 15.9781 2.55864C16.0876 2.82313 16.144 3.10661 16.144 3.39289C16.144 3.67917 16.0876 3.96265 15.9781 4.22714C15.8685 4.49163 15.7079 4.73195 15.5055 4.93438C15.3031 5.13681 15.0627 5.29739 14.7983 5.40695C14.5338 5.5165 14.2503 5.57289 13.964 5.57289C13.3858 5.57289 12.8313 5.34321 12.4225 4.93438C12.0137 4.52555 11.784 3.97106 11.784 3.39289Z",stroke:"white",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round"})]}),(0,r.Y)(y.BR,{children:n?"Fewer":`+${t}`})]}),(0,r.Y)(y.Ly,{$active:i,onClick:()=>{const e=!i;(0,m.TV)("gacha-invertfilters",e?"1":"0",30),a(e),l(e?"1":"0","invertFilters")},title:"Invert filters: Hide items that match the selected filters",children:(0,r.FD)("svg",{width:"14",height:"18",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.Y)("path",{d:"M1.375 2.125V15.3037L11.9284 1.5H2C1.65482 1.5 1.375 1.77982 1.375 2.125Z",fill:"currentColor"}),(0,r.Y)("rect",{x:"0.75",y:"0.875",width:"12.5",height:"16.25",rx:"1.375",stroke:"currentColor",strokeWidth:"1.25",fill:"none"}),(0,r.Y)("line",{x1:"1.375",y1:"15.3037",x2:"11.9284",y2:"1.5",stroke:"currentColor",strokeWidth:"1.25"})]})}),s&&(0,r.Y)(Y.L,{shareTitleLable:"Share direct link to this set of filters",stringToCopy:s,withButton:!0})]});n(20557);const C=({filterKey:e,index:t,TheFilters:n,label:o,request:i,filterchange:l})=>(0,r.FD)(b.l,{children:[o&&(0,r.Y)(y.ph,{children:o}),(0,r.Y)(a.R,{doubleWidth:!1,bordered:!0,isSearchable:!1,value:n.find(t=>t.value.toString()===(i[e]||"")),onChange:t=>{l(t.value,e)},options:n,highlight:!(!n.find(t=>t.value.toString()===(i[e]||""))||""===i[e])})]},t),F=({elementType:e,filters:t,filterchange:n,searchString:a,perRow:s,onPerRowChange:d})=>{const[c,p]=(0,o.J0)("1"===(0,m.Ri)("cards-allfilters")),[Y,F]=(0,o.J0)("1"===(0,m.Ri)("gacha-invertfilters")),D=t,S=Object.keys(t).filter(e=>"invertFilters"!==e&&""!==t[e]&&void 0!==t[e]),I=g.yD.classifications[e],z=g.yD.sortConfig[e],T=(0,x.U_)(e),E=(0,u.y)({request:D,filterchange:n,vocab:h(T,{filters:D,listName:g.yD.gameNameForTitle??"this site",facets:I??[]}),delayMs:g.yD.debounceDelay}),L=(0,o.Kr)(()=>T&&0!==T.length&&I?(0,f.Jl)(T,D,e,{showCounts:!0,disableEmpty:!0,hideEmpty:!1}):null,[T,D,e,I]),M={};z&&(M.sortby=[{value:"",label:"Default"},...Object.keys(z).map(e=>({value:e,label:z[e]}))],M.sortorder=[{value:"",label:"ASC"},{value:"r",label:"DESC"}]);const N={sortby:"Sort By:",sortorder:"Order:"},P=["sortby","sortorder","textSearch"],O=(e,t,o)=>o?z?Object.keys(M).map((e,t)=>(0,r.Y)(C,{filterKey:e,index:t,TheFilters:M[e],label:N[e],request:D,filterchange:n},t)):[]:void 0!==I&&I.filter(e=>!e.hidden).slice(e,t).map((e,t)=>(0,r.Y)($.Bf,{classification:e,index:t,request:E.request,filterchange:E.filterchange,dynamic:L,isMultiSelect:!P.includes(e.name)},t)),_=I?.filter(e=>!e.hidden).length??0,R=Math.max(0,_-4),j=R>0,J=(0,r.FD)(r.FK,{children:[void 0!==d&&(0,r.Y)(i.r,{perRow:s??0,onPerRowChange:d,min:3,max:9,foilEffect:!1,onFoilEffectChange:()=>{},foilAvailable:!1,showPrices:!1,onShowPricesChange:()=>{},pricesAvailable:!1,dimUnowned:!1,onDimUnownedChange:()=>{},dimAvailable:!1}),(0,r.Y)(A,{showAllToggle:j,hiddenFilterCount:R,allFilters:c,setAllFilters:p,invertFilters:Y,setInvertFilters:F,filterchange:n,searchString:a})]});return(0,r.FD)(r.FK,{children:[(0,r.FD)(w.OB,{children:[(0,r.FD)(v.ro,{children:[(0,r.FD)(b.l,{$column:"1/3",children:[(0,r.Y)(l.b,{...E.fieldProps,placeholder:"Search by Name, Description, etc"}),(0,r.Y)(y.PL,{children:J})]}),O(0,4),(0,r.Y)(y.D2,{children:J})]}),c&&(0,r.Y)(v.ro,{$second:!0,children:O(4,void 0)}),z&&(0,r.Y)(v.ro,{$second:!0,children:O(void 0,void 0,!0)})]}),(0,r.Y)(k._,{filters:t,activeFilters:S,invertFilters:Y,labeledFilters:N,sortFilters:M,loadedFilters:I,filterchange:n,queryChips:E.chips})]})},D=(0,o.ph)(({embed:e,showfilter:t,filters:n,elementType:o,textSearchString:i,onFilterChange:a,perRow:l,onPerRowChange:s})=>{if(e&&!t)return null;const d=`${window.location.href.split("?")[0]}?${i}`;return(0,r.Y)(F,{filters:n,filterchange:a,elementType:o,searchString:d,perRow:l,onPerRowChange:s})},(e,t)=>e.embed===t.embed&&e.showfilter===t.showfilter&&e.elementType===t.elementType&&e.textSearchString===t.textSearchString&&e.onFilterChange===t.onFilterChange&&e.perRow===t.perRow&&e.onPerRowChange===t.onPerRowChange&&JSON.stringify(e.filters)===JSON.stringify(t.filters))},95364(e,t,n){var r=n(10201),o=n(17402);const i=(0,o.q6)(null);n.d(t,["c",0,({children:e})=>{const[t,n]=(0,o.J0)({gachaItems:[],itemIndexMap:new Map,currentIndex:-1,isNavigating:!1}),a=(0,o.hb)((e,t)=>{const r=new Map;e.forEach((e,t)=>{r.set(e.id.toString(),t)});let o=-1;t&&(o=r.get(t.toString())??-1),n({gachaItems:e,itemIndexMap:r,currentIndex:Math.max(0,o),isNavigating:e.length>1})},[]),l=(0,o.hb)(e=>{let t=null;return n(n=>{if(!n.isNavigating||0===n.gachaItems.length)return n;let r;if(r="prev"===e?n.currentIndex>0?n.currentIndex-1:0:n.currentIndex<n.gachaItems.length-1?n.currentIndex+1:n.gachaItems.length-1,r!==n.currentIndex){const e=n.gachaItems[r];return e&&(t=e.id.toString()),{...n,currentIndex:r}}return n}),t},[]),s=(0,o.hb)(()=>t.currentIndex>=0&&t.currentIndex<t.gachaItems.length?t.gachaItems[t.currentIndex]:null,[t.currentIndex,t.gachaItems]),d=(0,o.hb)(e=>{n(t=>{const n=t.itemIndexMap.get(e.toString());return void 0!==n&&n>=0?{...t,currentIndex:n}:t})},[]),c=(0,o.hb)(()=>({current:t.currentIndex+1,total:t.gachaItems.length,hasNext:t.currentIndex<t.gachaItems.length-1,hasPrev:t.currentIndex>0}),[t.currentIndex,t.gachaItems.length]),p=(0,o.hb)(()=>{n({gachaItems:[],itemIndexMap:new Map,currentIndex:-1,isNavigating:!1})},[]),h=(0,o.Kr)(()=>({navigationState:{gachaItems:t.gachaItems,itemIndexMap:t.itemIndexMap,currentIndex:t.currentIndex,isNavigating:t.isNavigating},setNavigationItems:a,setCurrentItemIndex:d,navigateToItem:l,getCurrentItem:s,getNavigationInfo:c,
6578clearNavigation:p}),[t.currentIndex,t.isNavigating,t.gachaItems,t.itemIndexMap,a,d,l,s,c,p]);return(0,r.Y)(i.Provider,{value:h,children:e})},"e",0,()=>(0,o.NT)(i)||{navigationState:{gachaItems:[],itemIndexMap:new Map,currentIndex:-1,isNavigating:!1},setNavigationItems:()=>{},setCurrentItemIndex:()=>{},navigateToItem:()=>null,getCurrentItem:()=>null,getNavigationInfo:()=>({current:0,total:0,hasNext:!1,hasPrev:!1}),clearNavigation:()=>{}}])},15299(e,t,n){n.d(t,{l:()=>y});var r=n(10201),o=n(17402),i=n(63679),a=n(63353),l=n(70165),s=n(12434);function d(e,t){if(!e)return;const n=("string"==typeof e.icon?e.icon:"")||l.yD.elementTypes[t]?.imagePlaceholder||"";return n?(0,r.Y)(c,{src:`https://static.dotgg.gg/${s.Ay.TheGame}/${n}`,alt:"",loading:"lazy",onError:e=>{e.currentTarget.style.display="none"}}):void 0}const c=i.Ay.img` 6579 display: block; 6580 width: 22px; 6581 height: 22px; 6582 object-fit: contain; 6583`;var p=n(40664);const h=e=>(0,r.Y)(p.i,{...e,itemType:"gacha item"}),u=e=>(0,r.Y)(p.Z,{...e});var g=n(95364),m=n(55622),f=n(51900),x=n(21204),v=n(81616);const y=({itemId:e,elementType:t,show:n,standalone:i,variant:a,context:c})=>{const[p,y]=(0,o.J0)(!1),[A,C]=(0,o.J0)(0),F=(0,v.U_)(t),D=(0,g.e)(),S=!0!==i&&D.navigationState.isNavigating,I=(0,o.Kr)(()=>S?D.getCurrentItem():F?.find(t=>t.id.toString()===e),[S,D.navigationState.currentIndex,e,F,D.getCurrentItem]),z=S?D.getNavigationInfo():{current:0,total:0,hasNext:!1,hasPrev:!1};(0,o.vJ)(()=>{if(!p||!S)return;const e=e=>{if("ArrowLeft"===e.key||"ArrowRight"===e.key){e.preventDefault();const t="ArrowLeft"===e.key?"prev":"next";D.navigateToItem(t)}};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[p,S,D.navigateToItem]),(0,o.vJ)(()=>{n>0&&n!==A&&(C(n),y(!0),S&&D.setCurrentItemIndex(e))},[n,e,A,S,D.setCurrentItemIndex]);const T=e=>{D.navigateToItem(e)};if((0,o.vJ)(()=>()=>{y(!1)},[]),!I)return null;const E=l.yD.elementTypes[t]?.nameElement,L=l.yD.elementTypes[t]?.popup,M=S;return(0,r.Y)(f.qp,{header:void 0!==E?(0,r.Y)(E,{TheGachaItem:I}):I.name,headerIcon:d(I,t),subtitle:!1===L?.keyFacts?I.title:void 0,show:p,onClose:e=>{switch(e){case"details":window.open(`${s.Ay.BASE_URL}${l.yD.elementTypes[t]?.slugOverride??t}/${I.slug}`);break;case"close":case"cancel":y(!1)}},promptbuttons:[{label:L?.detailsLabel??"More Details",id:"details",icon:x.Y}],footerCenter:M&&z.total>1?(0,r.FD)(k,{children:[(0,r.Y)(Y,{children:(0,r.Y)(h,{direction:"left",onClick:()=>T("prev"),disabled:!z.hasPrev})}),(0,r.Y)(u,{inline:!0,current:z.current,total:z.total}),(0,r.Y)(Y,{children:(0,r.Y)(h,{direction:"right",onClick:()=>T("next"),disabled:!z.hasNext})})]}):void 0,children:(0,r.FD)(b,{children:[M&&(0,r.FD)($,{children:[(0,r.Y)(h,{direction:"left",onClick:()=>T("prev"),disabled:!z.hasPrev}),(0,r.Y)(h,{direction:"right",onClick:()=>T("next"),disabled:!z.hasNext})]}),(0,r.Y)(m.o,{width:"100%",height:"100%",children:(0,r.Y)(w,{elementType:t,item:I,variant:a,context:S?void 0:c})})]})})},w=({elementType:e,item:t,variant:n,context:o})=>{const i=l.yD.elementTypes[e]?.popup;if(i?.component){const e=i.component;return(0,r.Y)(e,{item:t,variant:n,context:o})}if(!1===i?.keyFacts){const n=(l.yD.extraComponentsToRender[e]??[]).filter(e=>!0===e.showInPopup);return(0,r.Y)(r.FK,{children:n.map((e,n)=>{const o=e.element;return o?(0,r.Y)(o,{defs:t[e.field],parentEl:t},n):null})})}return(0,r.Y)(a.yO,{elementId:t.id.toString(),elementType:e,onlyKeyFacts:!0,gachaData:t})},b=i.Ay.div` 6584 position: relative; 6585 width: 100%; 6586 height: 100%; 6587 6588 /* Ensure navigation arrows can extend outside the container */ 6589 overflow: visible; 6590`,$=i.Ay.div` 6591 @media only screen and (max-width: 768px) { 6592 display: none; 6593 } 6594`,k=i.Ay.div` 6595 display: inline-flex; 6596 align-items: center; 6597 gap: 10px; 6598`,Y=i.Ay.span` 6599 display: none; 6600 @media only screen and (max-width: 768px) { 6601 display: inline-flex; 6602 } 6603`},59111(e,t,n){var r=n(10201),o=n(63679),i=n(12531);const a=(0,o.I4)(i.Qi)` 6604 height: auto; 6605 cursor: pointer; 6606 text-decoration: none; 6607 @media only screen and (max-width: 700px) { 6608 height: auto; 6609 } 6610`,l=o.I4.div` 6611 position: relative; 6612 width: 100%; 6613 aspect-ratio: ${e=>e.$aspect}; 6614 border-radius: 6px; 6615 overflow: hidden; 6616 6617 img { 6618 display: block; 6619 width: 100%; 6620 height: 100%; 6621 object-fit: ${e=>e.$fit}; 6622 } 6623`,s=o.I4.div` 6624 width: 100%; 6625 height: 100%; 6626 display: grid; 6627 place-items: center; 6628 font-size: 28px; 6629 opacity: 0.5; 6630`;n.d(t,["n",0,({name:e,title:t,src:n,aspect:o,fit:d="cover",color:c,active:p,href:h,onClick:u,overlay:g,placeholder:m})=>(0,r.FD)(a,{as:h?"a":"div",href:h,"data-native":!!h||void 0,role:h?void 0:"button",tabIndex:h?void 0:0,$color:c,$accent:p?"var(--theme-palette-color-1)":void 0,onClick:e=>{u&&(e.preventDefault(),u())},onKeyDown:e=>{!u||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),u())},children:[(0,r.Y)(i.az,{children:(0,r.FD)(l,{$aspect:o,$fit:d,children:[n?(0,r.Y)("img",{src:n,alt:"",loading:"lazy"}):(0,r.Y)(s,{children:m}),g]})}),(0,r.FD)(i.sM,{children:[(0,r.Y)(i.KC,{title:e,children:e}),t?(0,r.Y)(i.l7,{children:t}):null]})]})])},9114(e,t,n){n.d(t,{g:()=>l});var r=n(10201),o=n(17402),i=n(40131),a=n(15299);function l(){const[e,t]=(0,o.J0)({id:"",type:"characters",show:0}),n=(0,o.hb)((e,n,r)=>{(0,i.F$)(n).then(()=>{t(t=>({id:e,type:n,show:t.show+1,...r}))})},[]),l=(0,o.hb)((e,t,r)=>({onClick:o=>{!e||0!==o.button||o.ctrlKey||o.metaKey||o.shiftKey||(o.preventDefault(),o.stopPropagation(),n(e,t,r))}}),[n]),s=(0,r.Y)(a.l,{itemId:e.id,elementType:e.type,show:e.show,standalone:!0,context:e.context,variant:e.variant});return{openElement:n,linkProps:l,popup:s}}}
6630,22417(e,t,n){var r=n(17402),o=n(70165),i=n(4738),a=n(70994);n.d(t,["b4",0,(e,t,n,r)=>{let i={...e};"clear"===n?i={}:""!==t&&null!=t?i[n]=t:delete i[n];const a={};return o.yD.classifications[r]?.forEach(e=>{a[e.name]=i[e.name]??""}),["textSearch","sortby","sortorder","invertFilters"].forEach(e=>{i[e]&&""!==i[e]?a[e]=i[e]:a[e]=""}),a},"vs",0,e=>{const t=(0,a.zy)(),n=(0,r.Kr)(()=>((e,t,n)=>{const r=e||t.replace("?",""),a=new URLSearchParams(r),l=(0,i._w)(a.entries()),s={};return o.yD.classifications[n]?.forEach(e=>{s[e.name]=l[e.name]||e.defaultValue||""}),s.textSearch=l.textSearch||"",s.sortby=l.sortby||"",s.sortorder=l.sortorder||"",s.invertFilters=l.invertFilters||"",s})(e.filterOverride,t.search,e.elementType),[e.filterOverride,t.search,e.elementType]),l=(0,r.Kr)(()=>{const e=new URLSearchParams;return Object.entries(n).forEach(([t,n])=>{n&&""!==n&&e.set(t,n)}),e.toString()},[n]);return{filters:n,textSearchString:l}}])},71335(e,t,n){var r=n(17402),o=n(41906);n.d(t,["x",0,(e,t,n,i)=>(0,r.Kr)(()=>{if(!e)return{elementDB:[],isEmpty:!0};const r=(0,o.wl)(e,t,n,i);return{elementDB:r,isEmpty:0===r.length}},[e,t,n,i])])},20557(e,t,n){n.d(t,{v:()=>s});var r=n(17402),o=n(70165),i=n(4738);const a=e=>`gacha-per-row-${e}`,l=e=>Number.isFinite(e)&&e>0?Math.min(9,Math.max(3,Math.round(e))):0;function s(e){const[t,n]=(0,r.J0)(()=>{const t=Number((0,i.Ri)(a(e)));return t>0?l(t):l(o.yD.elementTypes[e]?.gridPerRow??0)||("undefined"!=typeof window&&window.innerWidth>0?l(Math.floor(window.innerWidth/200)):0)});return[t,(0,r.hb)(t=>{const r=l(t);n(r),(0,i.TV)(a(e),String(r),365)},[e])]}},31411(e,t,n){var r=n(10201),o=n(63679),i=n(9299),a=n(70165),l=n(81616),s=n(12434);const d=o.I4.div` 6631 width: ${e=>e.$size.endsWith("%")?e.$size:`${e.$size}px`}; 6632 ${e=>e.$size.endsWith("%")?"aspect-ratio: 1/1;":`height: ${e.$size}px;`} 6633 padding: 0; 6634 margin: 0; 6635 border-radius: 6px; 6636 ${e=>e.$color?`background: linear-gradient(180deg, ${e.$color}, var(--theme-palette-color-6));`:"background-color: var(--theme-palette-color-6);"} 6637 6638 &:hover { 6639 background-color: var(--theme-palette-color-5); 6640 } 6641 6642 @media only screen and (max-width: 800px) { 6643 width: ${e=>e.$mobileSize.endsWith("%")?e.$mobileSize:`${e.$mobileSize}px`}; 6644 ${e=>e.$mobileSize.endsWith("%")?"aspect-ratio: 1/1;":`height: ${e.$mobileSize}px;`} 6645 } 6646`,c=o.I4.div.attrs(e=>({style:{backgroundImage:e.$pic?`url(https://static.dotgg.gg/${s.Ay.TheGame}/${e.$pic})`:"none"}}))` 6647 width: ${e=>e.$size.endsWith("%")?e.$size:`${e.$size}px`}; 6648 ${e=>e.$size.endsWith("%")?"aspect-ratio: 1/1;":`height: ${e.$size}px;`} 6649 background-position: center; 6650 background-repeat: no-repeat; 6651 background-size: cover; 6652 cursor: pointer; 6653 border-radius: 6px; 6654 @media only screen and (max-width: 800px) { 6655 width: ${e=>e.$mobileSize.endsWith("%")?e.$mobileSize:`${e.$mobileSize}px`}; 6656 ${e=>e.$mobileSize.endsWith("%")?"aspect-ratio: 1/1;":`height: ${e.$mobileSize}px;`} 6657 } 6658`;n.d(t,["m",0,({elementType:e,elementID:t,size:n,mobileSize:o})=>{const s=(0,l.U_)(e);if(!t||!e)return(0,r.Y)(d,{$color:"var(--theme-palette-color-6)",$size:n,$mobileSize:o||n});let p=s?.find(e=>e.id.toString().toLowerCase()===t?.toLowerCase()||e.slug===t);const h=a.yD.classifications[e]?.find(e=>!0===e.isBackgroundClassification),u=h?h.details.find(e=>e.Name===(p?p[h.name]:""))?.color:void 0;return void 0===p?(0,r.Y)(r.FK,{}):(0,r.Y)(i.t,{children:(0,r.Y)(d,{$color:u,$size:n,$mobileSize:o||n,title:p.name,children:(0,r.Y)(c,{$pic:p.icon,$size:n,$mobileSize:o||n})})})}])},106(e,t,n){n.d(t,{t:()=>l});var r=n(10201),o=n(17402),i=n(63679),a=n(70165);class l extends o.Ay.Component{render(){if(!this.props.element)return(0,r.Y)(r.FK,{});if(!this.props.element.tiers||0===Object.keys(this.props.element.tiers).length)return(0,r.Y)(r.FK,{});if(!a.yD.itemTiersDrawOptions)return(0,r.Y)(r.FK,{});const e=a.yD.itemTiersDrawOptions.colors,t=a.yD.itemTiersDrawOptions.names,n=void 0!==this.props.itemDetailStructure&&this.props.itemDetailStructure;return(0,r.FD)(s,{$itemDetailStructure:n,children:[(0,r.Y)(u,{$itemDetailStructure:n,children:"Tier Ratings"}),(0,r.Y)(d,{children:(0,r.Y)(r.FK,{children:this.props.element.tiers?Object.keys(this.props.element.tiers).map((n,o)=>(0,r.FD)(c,{children:[(0,r.Y)(p,{children:n}),(0,r.Y)(h,{$bgcolor:e[t.indexOf(this.props.element.tiers[n])],children:this.props.element.tiers[n]})]},o)):(0,r.Y)(r.FK,{})})})]})}}const s=i.I4.div` 6659 ${e=>e.$itemDetailStructure?"\ndisplay: flex;\nflex-direction: row;\ngap: 3px;":"min-width: 200px;"} 6660`,d=i.I4.div` 6661 display: flex; 6662 flex-direction: row; 6663 gap: 3px; 6664 width: 100%; 6665 font-size: 0.8em; 6666 justify-content: space-around; 6667`,c=i.I4.div` 6668 display: flex; 6669 flex-direction: column; 6670 gap: 3px; 6671 width: 70px; 6672`,p=i.I4.div` 6673 font-weight: bold; 6674 text-align: center; 6675 color: var(--theme-palette-color-1); 6676 width: 100%; 6677`,h=i.I4.div` 6678 text-align: center; 6679 border: 1px solid #9796966e; 6680 border-radius: 6px; 6681 color: white; 6682 width: 100%; 6683 text-shadow: 0 0 4px white; 6684 ${e=>"background-color: "+(e.$bgcolor?e.$bgcolor:"#80808069")+";"} 6685`,u=i.I4.div` 6686 ${e=>e.$itemDetailStructure?"\n flex-basis: 130px;\n height: 57px;\n display: flex;\n align-items: center;\n font-size: 0.9em;\n color: var(--theme-palette-color-3);":"\n font-weight: bold;\n text-align: center;"} 6687`},31634(e,t,n){var r=n(10201),o=n(63679),i=n(58683);const a=(0,o.I4)(i.Zk)` 6688 padding: 12px 14px; 6689`,l=(0,o.I4)(i.ZX)` 6690 margin-bottom: 10px; 6691`;n.d(t,["I",0,({title:e,note:t,text:n,empty:o,children:s})=>(0,r.FD)(a,{children:[(0,r.FD)(l,{children:[(0,r.Y)(i.xw,{children:e}),null!=t&&""!==t&&(0,r.Y)(i.fo,{children:t})]}),void 0!==s?s:void 0!==n&&""!==n?(0,r.Y)(i.s7,{children:n}):(0,r.Y)(i.QX,{children:o})]})])},58683(e,t,n){var r=n(63679);const o=r.I4.div` 6692 background-color: var(--theme-palette-color-7); 6693 border: 1px solid var(--theme-palette-color-5); 6694 border-radius: 6px; 6695`,i=r.I4.div` 6696 font-size: 9.5px; 6697 letter-spacing: 0.07em; 6698 text-transform: uppercase; 6699 color: var(--theme-palette-color-3); 6700`,a=r.I4.div` 6701 font-size: 10px; 6702 letter-spacing: 0.04em; 6703 text-transform: uppercase; 6704 color: var(--theme-palette-color-3); 6705`,l=r.I4.div` 6706 font-size: 13px; 6707 font-weight: 700; 6708 color: var(--theme-palette-color-4); 6709`,s=r.I4.div` 6710 display: flex; 6711 align-items: baseline; 6712 justify-content: space-between; 6713 gap: 10px; 6714`,d="\n padding: 2px 8px;\n border-radius: 3px;\n background-color: var(--theme-palette-color-8);\n border: 1px solid var(--theme-palette-color-5);\n font-size: 11.5px;\n",c=r.I4.span` 6715 ${d} 6716 color: var(--theme-palette-color-4); 6717`,p=r.I4.a` 6718 ${d} 6719 color: var(--theme-palette-color-4) !important; 6720 text-decoration: none !important; 6721`,h=r.I4.div` 6722 display: flex; 6723 flex-wrap: wrap; 6724 gap: 5px; 6725 align-items: center; 6726`,u=r.I4.span` 6727 font-variant-numeric: tabular-nums; 6728`,g=r.I4.p` 6729 margin: 0; 6730 font-size: 13px; 6731 line-height: 1.5; 6732 color: var(--theme-palette-color-3); 6733 white-space: pre-wrap; 6734`,m=r.I4.div` 6735 font-size: 12.5px; 6736 font-style: italic; 6737 opacity: 0.65; 6738`,f=r.I4.div` 6739 display: flex; 6740 flex-direction: column; 6741 gap: 12px; 6742`;n.d(t,["Fz",0,p,"KT",0,a,"Lj",0,h,"QX",0,m,"ZX",0,s,"Zk",0,o,"fo",0,i,"q9",0,u,"rk",0,f,"s7",0,g,"vw",0,c,"xw",0,l])},28266(e,t,n){var r=n(10201),o=n(17402),i=n(63679),a=n(70165),l=n(12434);const s="__art",d=i.I4.div` 6743 display: flex; 6744 flex-wrap: ${e=>e.$row?"nowrap":"wrap"}; 6745 gap: 6px; 6746 flex: 1 1 auto; 6747 min-width: 0; 6748 ${e=>e.$row?"overflow-x: auto;\n justify-content: center;\n /* The safe keyword keeps the first thumb reachable once the row\n overflows: plain centring overflows BOTH ends and the left thumbs\n cannot be scrolled to. Browsers that do not parse it drop this\n line and keep the plain centring above. */\n justify-content: safe center;":""} 6749`,c=i.I4.button` 6750 flex: 0 0 auto; 6751 width: ${e=>e.$size??48}px; 6752 height: ${e=>e.$size??48}px; 6753 padding: 0; 6754 overflow: hidden; 6755 border-radius: 8px; 6756 border: 2px solid ${e=>e.$active?"var(--theme-palette-color-1)":"var(--theme-palette-color-5)"}; 6757 background: var(--theme-palette-color-7); 6758 cursor: pointer; 6759 6760 img { 6761 width: 100%; 6762 height: 100%; 6763 object-fit: cover; 6764 object-position: top center; 6765 display: block; 6766 } 6767 6768 &:hover { 6769 border-color: var(--theme-palette-color-1); 6770 } 6771`;n.d(t,["Z",0,({state:e,size:t,row:n})=>{const i=e.selected?.key,a=(0,o.li)(null);return(0,o.vJ)(()=>{n&&a.current?.scrollIntoView({block:"nearest",inline:"nearest"})},[n,i]),e.variants.length<2?(0,r.Y)("div",{}):(0,r.Y)(d,{role:"radiogroup","aria-label":"Image",$row:n,children:e.variants.map(n=>(0,r.Y)(c,{ref:n.key===i?a:void 0,type:"button",role:"radio","aria-checked":n.key===i,$active:n.key===i,$size:t,title:n.label,onClick:t=>{t.preventDefault(),t.stopPropagation(),e.select(n.key)},children:(0,r.Y)("img",{src:`https://static.dotgg.gg/${l.Ay.TheGame}/${n.thumb??n.image}`,alt:n.label,loading:"lazy"})},n.key))})},"d",0,(e,t)=>{const n=t?String(t.id):"",r=(0,o.Kr)(()=>t?((e,t)=>{const n=((e,t)=>{const[n,r]=a.yD.elementTypes[e]?.imageToggleLabels??["Portrait","Art"],o=[];return t.icon&&o.push({key:"__icon",label:n,image:t.icon}),t.image&&""!==t.image&&t.image!==t.icon&&o.push({key:s,label:r,image:t.image}),o})(e,t),r=a.yD.elementTypes[e]?.imageVariants?.(t)??[],o=new Set(n.map(e=>e.image)),i=[...n];for(const e of r)o.has(e.image)||(o.add(e.image),i.push(e));return i})(e,t):[],[e,t]),[i,l]=(0,o.J0)(null);(0,o.vJ)(()=>l(null),[n]);const d=a.yD.elementTypes[e]?.imageDefaultArt&&r.some(e=>e.key===s)?s:r[0]?.key,c=r.find(e=>e.key===(i??d))??r[0]??null;return{variants:r,selected:c,select:l}}])},12641(e,t,n){var r=n(63679);const o=r.AH` 6772 --bld-panel: color-mix(in srgb, var(--theme-palette-color-7) 55%, var(--theme-palette-color-6)); 6773 --bld-inset: color-mix(in srgb, var(--theme-palette-color-7) 80%, black); 6774 --bld-line: color-mix(in srgb, var(--theme-palette-color-5) 50%, transparent); 6775 --bld-line-strong: color-mix(in srgb, var(--theme-palette-color-5) 85%, transparent); 6776 --bld-line-soft: color-mix(in srgb, var(--theme-palette-color-5) 28%, transparent); 6777 --bld-ring: color-mix(in srgb, var(--theme-palette-color-1) 25%, transparent); 6778`,i=r.Ay.div` 6779 ${o} 6780 width: 100%; 6781 display: grid; 6782 grid-template-columns: minmax(0, 1fr) 336px; 6783 gap: 24px; 6784 align-items: start; 6785 6786 @media only screen and (max-width: 980px) { 6787 grid-template-columns: minmax(0, 1fr); 6788 } 6789`,a=r.Ay.div` 6790 display: flex; 6791 flex-direction: column; 6792 gap: 22px; 6793 min-width: 0; 6794`,l=r.Ay.div` 6795 ${o} 6796 width: 100%; 6797 display: flex; 6798 flex-direction: column; 6799 gap: 22px; 6800`,s=r.Ay.div` 6801 display: flex; 6802 align-items: center; 6803 gap: 12px; 6804 margin: 0 0 14px; 6805`,d=r.Ay.span` 6806 width: 3px; 6807 height: 15px; 6808 border-radius: 2px; 6809 background: var(--theme-palette-color-1); 6810 flex: 0 0 3px; 6811`,c=r.Ay.h2` 6812 margin: 0; 6813 font-size: 13px; 6814 font-weight: 700; 6815 letter-spacing: 0.12em; 6816 text-transform: uppercase; 6817 color: var(--theme-palette-color-4); 6818`,p=r.Ay.span` 6819 font-size: 12px; 6820 font-weight: 600; 6821 color: var(--theme-palette-color-3); 6822 white-space: nowrap; 6823`,h=r.Ay.span` 6824 flex: 1; 6825 height: 1px; 6826 background: linear-gradient(90deg, var(--bld-line-strong), transparent); 6827`,u=r.Ay.div` 6828 width: 100%; 6829 background: var(--bld-panel); 6830 border: 1px solid var(--bld-line); 6831 border-radius: 12px; 6832 padding: 20px 22px; 6833 6834 @media only screen and (max-width: 750px) { 6835 padding: 14px; 6836 } 6837`,g=(r.Ay.div` 6838 display: flex; 6839 flex-direction: column; 6840`,r.Ay.div` 6841 width: 100%; 6842 background: var(--bld-panel); 6843 border: 1px solid var(--bld-line); 6844 border-radius: 12px; 6845 padding: 20px 22px; 6846 6847 ${e=>e.$attached?r.AH` 6848 border-top-color: transparent; 6849 border-top-left-radius: 0; 6850 border-top-right-radius: 0; 6851 `:""} 6852 6853 @media only screen and (max-width: 750px) { 6854 padding: 14px; 6855 } 6856`),m=r.Ay.div` 6857 display: flex; 6858 align-items: center; 6859 justify-content: space-between; 6860 gap: 14px; 6861 margin: -20px -22px 18px; 6862 padding: 11px 22px; 6863 border-bottom: 1px solid var(--bld-line-soft); 6864 6865 @media only screen and (max-width: 750px) { 6866 margin: -14px -14px 14px; 6867 padding: 10px 14px; 6868 } 6869`,f=r.Ay.span` 6870 font-size: 10.5px; 6871 font-weight: 700; 6872 text-transform: uppercase; 6873 letter-spacing: 0.1em; 6874 color: var(--theme-palette-color-3); 6875`,x=r.Ay.div` 6876 ${o} 6877 display: flex; 6878 flex-direction: column; 6879 gap: 14px; 6880 width: 336px; 6881 flex: 0 0 336px; 6882 position: sticky; 6883 top: 70px; 6884 height: fit-content; 6885 6886 @media only screen and (max-width: 980px) { 6887 width: 100%; 6888 flex-basis: 100%; 6889 position: static; 6890 } 6891`,v=r.Ay.div` 6892 display: grid; 6893 grid-template-columns: 1fr 1fr; 6894 gap: 9px; 6895 width: 100%; 6896 6897 /* odd button count: stretch the last one across both columns */ 6898 & > *:last-child:nth-child(odd) { 6899 grid-column: span 2; 6900 } 6901`,y=r.AH` 6902 display: inline-flex; 6903 align-items: center; 6904 justify-content: center; 6905 gap: 8px; 6906 font-family: inherit; 6907 font-size: 13px; 6908 font-weight: 600; 6909 line-height: 1.2; 6910 border-radius: 6px; 6911 padding: 10px 12px; 6912 cursor: pointer; 6913 border: 1px solid transparent; 6914 transition: all 0.15s ease; 6915 white-space: nowrap; 6916 text-decoration: none; 6917 6918 svg { 6919 width: 17px; 6920 height: 17px; 6921 flex: 0 0 auto; 6922 } 6923`,w=r.Ay.button` 6924 ${y} 6925 background: var(--theme-palette-color-1); 6926 border-color: var(--theme-palette-color-1); 6927 color: var(--theme-palette-color-7); 6928 box-shadow: 0 4px 14px color-mix(in srgb, var(--theme-palette-color-1) 18%, transparent); 6929 opacity: ${e=>e.$disabled?.6:1}; 6930 cursor: ${e=>e.$disabled?"not-allowed":"pointer"}; 6931 6932 &:hover { 6933 background: var(--theme-palette-color-2); 6934 border-color: var(--theme-palette-color-2); 6935 } 6936`,b=r.Ay.a` 6937 ${y} 6938 background: rgba(255, 255, 255, 0.025); 6939 color: var(--theme-palette-color-4); 6940 border-color: var(--bld-line-strong); 6941 6942 svg { 6943 color: var(--theme-palette-color-1); 6944 } 6945 6946 &:hover { 6947 border-color: var(--theme-palette-color-1); 6948 color: var(--theme-palette-color-1); 6949 } 6950`,$=r.Ay.div` 6951 width: 100%; 6952 background: var(--bld-panel); 6953 border: 1px solid var(--bld-line); 6954 border-radius: 12px; 6955 overflow: hidden; 6956`,k=r.Ay.div` 6957 padding: 16px 18px; 6958 6959 & + & { 6960 border-top: 1px solid var(--bld-line-soft); 6961 } 6962 6963 &:empty { 6964 display: none; 6965 } 6966`,Y=r.Ay.div` 6967 display: flex; 6968 align-items: center; 6969 gap: 10px; 6970 margin: 0 0 12px; 6971 font-size: 12px; 6972 font-weight: 700; 6973 text-transform: uppercase; 6974 letter-spacing: 0.11em; 6975 color: var(--theme-palette-color-4); 6976 6977 &::before { 6978 content: ""; 6979 width: 3px; 6980 height: 13px; 6981 border-radius: 2px; 6982 background: var(--theme-palette-color-1); 6983 } 6984`,A=r.Ay.div` 6985 display: flex; 6986 flex-direction: column; 6987 gap: 12px; 6988`,C=r.Ay.label` 6989 display: block; 6990 font-size: 10.5px; 6991 font-weight: 700; 6992 text-transform: uppercase; 6993 letter-spacing: 0.09em; 6994 color: var(--theme-palette-color-3); 6995 margin-bottom: 6px; 6996`,F=r.AH` 6997 width: 100%; 6998 background: var(--bld-inset); 6999 border: 1px solid var(--bld-line-strong); 7000 border-radius: 6px; 7001 color: var(--theme-palette-color-4); 7002 font-family: inherit; 7003 font-size: 13.5px; 7004 padding: 10px 12px; 7005 outline: none; 7006 transition: 7007 border-color 0.15s, 7008 box-shadow 0.15s; 7009 7010 &::placeholder { 7011 color: color-mix(in srgb, var(--theme-palette-color-3) 55%, transparent); 7012 } 7013 7014 &:focus { 7015 border-color: var(--theme-palette-color-1); 7016 box-shadow: 0 0 0 3px var(--bld-ring); 7017 } 7018`,D=r.Ay.input` 7019 ${F} 7020`,S=r.Ay.textarea` 7021 ${F} 7022 min-height: 110px; 7023 resize: vertical; 7024 line-height: 1.5; 7025`;n.d(t,["$o",0,d,"A_",0,D,"DZ",0,g,"Dp",0,a,"Hy",0,w,"I5",0,s,"IF",0,h,"SI",0,k,"Y4",0,i,"Zk",0,u,"_N",0,b,"dh",0,C,"h0",0,Y,"hM",0,x,"j4",0,A,"kd",0,c,"l2",0,S,"ni",0,p,"ov",0,v,"rq",0,$,"uF",0,m,"w9",0,l,"wE",0,o,"yu",0,f])},96179(e,t,n){var r=n(63679),o=n(12434);const i=r.Ay.div` 7026 display: flex; 7027 flex-direction: column; 7028 align-items: stretch; 7029 gap: 5px; 7030 width: 160px; 7031 @media only screen and (max-width: 750px) { 7032 width: 100px; 7033 } 7034 @media only screen and (max-width: 480px) { 7035 width: 80px; 7036 } 7037`,a=r.Ay.div` 7038 width: 100%; 7039`,l=r.Ay.div` 7040 display: flex; 7041 flex-direction: column; 7042`,s=r.Ay.div` 7043 text-align: center; 7044 font-size: 0.8em; 7045`,d=r.Ay.span` 7046 color: var(--theme-palette-color-4); 7047 padding: 2px; 7048 background-color: rgba(0, 0, 0, 0.5); 7049 border-radius: 6px; 7050 text-align: center; 7051 white-space: nowrap; 7052 font-size: 0.8em; 7053 overflow: hidden; 7054`,c=r.Ay.span` 7055 color: rgba
7055(0, 0, 0, 0); 7056`,p=r.Ay.div` 7057 ${e=>e.$pic?`background: url(https://static.dotgg.gg/${o.Ay.TheGame}/${e.$pic})!important;\n background-size: cover !important;\n background-position: center bottom !important;\n background-repeat: no-repeat !important;\n background-color: var(--theme-palette-color-6) !important;`:e.$highlight?" background: linear-gradient(180deg, var(--theme-palette-color-2), rgba(0, 0, 0, 0))!important;":""} 7058 7059 width: var(--s); 7060 margin: var(--m); 7061 height: calc(var(--s) * 1.1547); 7062 display: inline-flex; 7063 font-size: initial; 7064 clip-path: polygon(0% 25%, 0% 75%, 50% 100%, 100% 75%, 100% 25%, 50% 0%); 7065 background: ${e=>e.$active?"var(--theme-palette-color-5)":"var(--theme-palette-color-6)"}; 7066 margin-bottom: calc(var(--m) - var(--s) * 0.2885); 7067 padding-top: 65px; 7068 justify-content: center; 7069 align-items: center; 7070 cursor: pointer; 7071 &:hover { 7072 filter: brightness(1.2); 7073 } 7074 @media only screen and (max-width: 750px) { 7075 padding-top: 25px; 7076 } 7077`,h=r.Ay.div` 7078 width: 100%; 7079 display: flex; 7080 flex-direction: row; 7081 justify-content: center; 7082 flex-wrap: wrap; 7083 border-radius: 6px; 7084 padding: 10px; 7085 gap: 10px; 7086 background: linear-gradient(120deg, black 5%, rgba(0, 0, 0, 0.3) 60%, rgba(0, 0, 0, 0)); 7087 @media only screen and (max-width: 750px) { 7088 padding: 8px; 7089 gap: 8px; 7090 } 7091 @media only screen and (max-width: 480px) { 7092 padding: 5px; 7093 gap: 5px; 7094 } 7095`,u=r.Ay.div` 7096 font-size: 0; /*disable white space between inline block element */ 7097 &::before { 7098 content: ""; 7099 width: calc(var(--s) / 2 + var(--m)); 7100 float: left; 7101 height: 120%; 7102 shape-outside: repeating-linear-gradient(#0000 0 calc(var(--f) - 3px), #000 0 var(--f)); 7103 } 7104`,g=r.Ay.div` 7105 width: 555px; 7106 height: 320px; 7107 display: flex; 7108 --s: 100px; /* size */ 7109 --m: 4px; /* margin */ 7110 --f: calc(1.732 * var(--s) + 4 * var(--m) - 1px); 7111 @media only screen and (max-width: 750px) { 7112 height: 200px; 7113 width: 320px; 7114 --s: 60px; /* size */ 7115 --m: 2px; /* margin */ 7116 } 7117`,m=r.Ay.div` 7118 display: ${e=>e.$visible?"flex":"none"}; 7119 flex-wrap: wrap; 7120 background-color: var(--theme-palette-color-6); 7121 border-radius: 6px; 7122 width: ${e=>`${e.$width}px`}; 7123 height: 692px; 7124 position: absolute; 7125 z-index: 1000; 7126 padding: 10px; 7127 7128 overflow-y: scroll; 7129 align-content: flex-start; 7130 @media only screen and (max-width: 750px) { 7131 width: 95%; 7132 height: 100%; 7133 padding: 2px; 7134 margin-left: -20px; 7135 } 7136 &::-webkit-scrollbar {
7137 width: 5px; 7138 } 7139 &::-webkit-scrollbar-track { 7140 background: rgba(0, 0, 0, 0); 7141 } 7142 &::-webkit-scrollbar-thumb { 7143 background: var(--theme-palette-color-1); 7144 } 7145 &::-webkit-scrollbar-thumb:hover { 7146 background: var(--theme-palette-color-3); 7147 } 7148`,f=r.Ay.div` 7149 font-size: 3em; 7150 width: 100%; 7151 height: 100%; 7152 display: flex; 7153 justify-content: center; 7154 align-items: center; 7155 &:hover { 7156 color: #eee; 7157 } 7158 @media only screen and (max-width: 480px) { 7159 font-size: 2em; 7160 } 7161`,x=r.Ay.div` 7162 display: flex; 7163 flex-direction: column; 7164 background-color: var(--theme-palette-color-6); 7165 width: 160px; 7166 height: 265px; 7167 cursor: pointer; 7168 border-radius: 6px; 7169 border: 1px solid var(--theme-palette-color-5); 7170 justify-content: space-between; 7171 flex-shrink: 0; 7172 &:hover { 7173 filter: brightness(1.1); 7174 } 7175 @media only screen and (max-width: 750px) { 7176 justify-content: flex-start; 7177 width: 100px; 7178 height: 162px; 7179 } 7180 @media only screen and (max-width: 480px) { 7181 width: 80px; 7182 height: 130px; 7183 } 7184`,v=r.Ay.div` 7185 width: 100%; 7186 display: flex; 7187 justify-content: space-between; 7188 gap: 10px; 7189 7190 @media only screen and (max-width: 750px) { 7191 gap: 10px; 7192 flex-wrap: wrap; 7193 } 7194`,y=(r.Ay.div` 7195 display: grid; 7196 gap: 6px; 7197 align-content: start; 7198 background-color: var(--theme-palette-color-8); 7199 padding: 10px; 7200 border-radius: 6px; 7201 width: 100%; 7202`,r.Ay.div` 7203 display: flex; 7204 flex-direction: row; 7205 flex-wrap: wrap; 7206 gap: 10px; 7207 width: 100%; 7208 justify-content: center; 7209`);n.d(t,["$M",0,a,"$Z",0,m,"FO",0,x,"FV",0,i,"Ho",0,y,"Mg",0,d,"RE",0,f,"Z6",0,v,"ZI",0,l,"bn",0,g,"cl",0,c,"hu",0,s,"mM",0,h,"s2",0,p,"t0",0,u])},29027(e,t,n){var r=n(10201),o=n(17402),i=n(95605),a=n(31146),l=n(1070),s=n(82965),d=n(4428),c=n(8609),p=n(84473),h=n(472);n.d(t,["e",0,({elementType:e,facetDefs:t,filters:n,filterchange:u,itemsOnBoard:g})=>{const m=n.textSearch??"",f=(0,o.Kr)(()=>0===g.length?null:(0,s.Jl)(g,n,e,{enabledFilters:t.map(e=>e.name),showCounts:!0,disableEmpty:!0,hideEmpty:!1}),[g,n,e,t]),x=Object.keys(n).filter(e=>n[e]);return(0,r.FD)(r.FK,{children:[(0,r.Y)(p.OB,{children:(0,r.FD)(d.ro,{children:[(0,r.Y)(h.l,{$column:"1/3",$mobileWrap:!0,children:(0,r.FD)(c.W4,{children:[(0,r.Y)(d.iB,{type:"text",value:m,placeholder:"Search by nameâ¦","aria-label":"Search the tier list by name",onChange:e=>u(e.currentTarget.value,"textSearch")}),(0,r.Y)(c.WI,{children:l.pU}),""!==m&&(0,r.Y)(c.w_,{onClick:()=>u("","textSearch"),title:"Clear search","aria-label":"Clear search",children:l.q8})]})}),t.map((e,t)=>(0,r.Y)(i.Bf,{classification:e,index:t,request:n,filterchange:u,dynamic:f,isMultiSelect:!0},e.name))]})}),(0,r.Y)(a._,{filters:n,activeFilters:x,invertFilters:!1,labeledFilters:{},sortFilters:{},loadedFilters:t,filterchange:u})]})}])},11107(e,t,n){var r=n(10201),o=(n(17402),n(70165)),i=n(26482);n.d(t,["S",0,()=>{const e=o.yD.tierlistLegend;return e&&0!==e.length?(0,r.Y)(i.n0,{"aria-label":"What the card borders mean",children:e.map(e=>(0,r.FD)(i.sT,{children:[e.glyph?(0,r.Y)(i._$,{$color:e.color,"aria-hidden":"true",children:e.glyph}):(0,r.Y)(i.Ib,{$color:e.color,"aria-hidden":"true"}),(0,r.Y)(i.KR,{children:e.label}),(0,r.Y)(i.PS,{"aria-hidden":"true",children:e.separator??"·"}),(0,r.Y)(i.Zg,{children:e.hint})]},e.color+e.label))}):null}])},26482(e,t,n){var r=n(63679);const o=r.I4.div` 7210 width: 120px; 7211`,i=r.I4.div` 7212 display: flex; 7213 flex-wrap: wrap; 7214 gap: 4px; 7215 width: 100%; 7216 margin-bottom: 10px; 7217 border-radius: 6px; 7218 justify-content: center; 7219 background-color: var(--theme-palette-color-6); 7220 padding: 8px; 7221 7222 /* Phone: two columns of 44px targets rather than four tabs squeezed onto one 7223 row. Four arenas is the common case and 2Ã2 is the shape that fits. */ 7224 @media only screen and (max-width: 750px) { 7225 display: grid; 7226 grid-template-columns: 1fr 1fr; 7227 gap: 6px; 7228 padding: 6px; 7229 } 7230`,a=r.I4.div` 7231 display: flex; 7232 align-items: center; 7233 gap: 8px; 7234 margin: 8px 0; 7235 font-size: 13px; 7236 color: var(--theme-palette-color-3); 7237`,l=r.I4.div` 7238 padding: 24px; 7239 text-align: center; 7240 color: var(--theme-palette-color-3); 7241`,s=r.I4.div` 7242 display: flex; 7243 gap: 10px; 7244 flex-wrap: wrap; 7245 padding: 5px 0; 7246`,d=r.I4.a` 7247 height: 34px; 7248 text-decoration: none; 7249 min-width: 118px; 7250 padding: 0 22px; 7251 border: none; 7252 font: inherit; 7253 font-size: 13px; 7254 line-height: 1; 7255 border-radius: 50px; 7256 background-color: ${e=>e.$active?"var(--theme-palette-color-1)":"transparent"}; 7257 color: ${e=>e.$active?"var(--theme-palette-color-7)":"var(--theme-palette-color-3)"}; 7258 font-weight: ${e=>e.$active?600:500}; 7259 display: flex; 7260 align-items: center; 7261 justify-content: center; 7262 cursor: pointer; 7263 transition: 7264 background-color 150ms ease, 7265 color 150ms ease; 7266 7267 &:hover { 7268 color: ${e=>e.$active?"var(--theme-palette-color-7)":"var(--theme-palette-color-4)"}; 7269 background-color: ${e=>e.$active?"var(--theme-palette-color-1)":"rgba(255, 255, 255, 0.08)"}; 7270 } 7271 &:focus-visible { 7272 outline: 2px solid var(--theme-palette-color-1); 7273 outline-offset: 2px; 7274 } 7275 7276 @media only screen and (max-width: 750px) { 7277 height: 44px; 7278 min-width: 0; 7279 padding: 0 8px; 7280 } 7281`,c=r.I4.div` 7282 display: flex; 7283 flex-wrap: wrap; 7284 align-items: center; 7285 gap: 10px 22px; 7286 width: 100%; 7287 /* The bands are the same colour, so without this the legend and the filter 7288 bar above it read as one tall panel rather than two things. */ 7289 margin: 10px 0; 7290 padding: 10px 12px; 7291 border-radius: 6px; 7292 background-color: var(--theme-palette-color-6); 7293 7294 @media only screen and (max-width: 750px) { 7295 flex-direction: column; 7296 align-items: stretch; 7297 gap: 9px; 7298 padding: 10px; 7299 } 7300`,p=r.I4.div` 7301 display: flex; 7302 align-items: center; 7303 gap: 8px; 7304 white-space: nowrap; 7305 7306 /* Phone: one entry per line, so the sentence may wrap inside its own row. */ 7307 @media only screen and (max-width: 750px) { 7308 white-space: normal; 7309 } 7310`,h=r.I4.span` 7311 flex: 0 0 auto; 7312 width: 22px; 7313 height: 22px; 7314 display: block; 7315 border-radius: 6px; 7316 border: 2px solid ${e=>e.$color}; 7317 background: linear-gradient( 7318 145deg, 7319 var(--theme-palette-color-5), 7320 var(--theme-palette-color-7) 7321 ); 7322 box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); 7323 7324 @media only screen and (max-width: 750px) {
7325 width: 20px; 7326 height: 20px; 7327 border-radius: 5px; 7328 } 7329`,u=r.I4.span` 7330 flex: 0 0 auto; 7331 width: 22px; 7332 height: 22px; 7333 display: flex; 7334 align-items: center; 7335 justify-content: center; 7336 font-size: 15px; 7337 line-height: 1; 7338 color: ${e=>e.$color}; 7339 7340 @media only screen and (max-width: 750px) { 7341 width: 20px; 7342 height: 20px; 7343 } 7344`,g=r.I4.span` 7345 font-size: 12px; 7346 font-weight: 600; 7347 line-height: 1.35; 7348 color: var(--theme-palette-color-4); 7349`,m=r.I4.span` 7350 font-size: 11.5px; 7351 line-height: 1.35; 7352 color: var(--theme-palette-color-3); 7353 opacity: 0.7; 7354`,f=r.I4.span` 7355 font-size: 11.5px; 7356 line-height: 1.35; 7357 color: var(--theme-palette-color-3); 7358`,x=r.I4.div` 7359 container-type: inline-size; 7360 flex: 0 0 var(--tier-badge-width); 7361 width: var(--tier-badge-width); 7362 background-color: ${e=>e.$color}; 7363 border-radius: 5px 0 0 5px; 7364 display: flex; 7365 align-items: center; 7366 justify-content: center; 7367 padding: 10px 4px; 7368 7369 /* Phone: a row is many card-rows tall, so a vertically centred letter ends up 7370 level with the middle of the group and off-screen while you read the top of 7371 it. Anchor it to the top instead â the label's job is to tell you which 7372 tier you are entering. */ 7373 @media only screen and (max-width: 750px) { 7374 align-items: flex-start; 7375 } 7376`,v=r.I4.span` 7377 color: var(--theme-palette-color-4); 7378 font-weight: bold; 7379 line-height: 1; 7380 white-space: nowrap; 7381 letter-spacing: -0.01em; 7382 font-size: 1.3em; 7383 font-size: min(1.5rem, calc(100cqw / (${e=>e.$chars} * 0.72 + 0.6))); 7384`,y=r.I4.div` 7385 --tier-badge-width: 64px; 7386 display: flex; 7387 flex-basis: 100%; 7388 background-color: var(--theme-palette-color-6); 7389 7390 border-radius: 6px; 7391 gap: 10px; 7392 @media only screen and (max-width: 750px) { 7393 --tier-badge-width: 48px; 7394 gap: 6px; 7395 } 7396`;n.d(t,["$Q",0,a,"$t",0,s,"Ft",0,d,"Ib",0,h,"Il",0,o,"KR",0,g,"MK",0,i,"PS",0,m,"Td",0,x,"XS",0,y,"Zg",0,f,"_$",0,u,"n0",0,c,"pp",0,l,"sT",0,p,"ti",0,v])},53791(e,t,n){var r=n(17402);const o="arena";n.d(t,["s",0,e=>{const t=e.join(","),n=(0,r.Kr)(()=>""===t?[]:t.split(","),[t]),{urlArena:i,urlFilters:a}=(0,r.Kr)(()=>{const e=new URLSearchParams(window.location.search),t={};for(const r of n){const n=e.get(r);n&&(t[r]=n)}const r=e.get("textSearch");return r&&(t.textSearch=r),{urlArena:e.get(o),urlFilters:t}},[n]);return{urlArena:i,urlFilters:a,writeUrl:(0,r.hb)((e,t)=>{const r=new URLSearchParams(window.location.search);r.delete(o),r.delete("textSearch");for(const e of n)r.delete(e);""!==e&&r.set(o,e);for(const[e,n]of Object.entries(t))""!==n&&r.set(e,n);const i=r.toString();try{window.history.replaceState(window.history.state,"",`${window.location.pathname}${""===i?"":`?${i}`}${window.location.hash}`)}catch{}},[n]),arenaHref:(0,r.hb)(e=>{const t=new URLSearchParams(window.location.search);return t.set(o,e),`?${t.toString()}`},[])}}])},91111(e,t,n){var r=n(17402);n.d(t,["f",0,({children:e})=>{const t=(0,r.li)(document.createElement("div"));return(0,r.vJ)(()=>(document.body.appendChild(t.current),()=>{try{document.body.contains(t.current)&&document.body.removeChild(t.current)}catch{}}),[]),r.Ay.createPortal(e,t.current)}])},55367(e,t,n){var r=n(10201),o=n(17402);n.d(t,["A",0,({wide:e,children:t,onChange:n,style:i,rootMargin:a="0px"})=>{const l=(0,o.li)(null),[s,d]=(0,o.J0)(!1),[c,p]=(0,o.J0)(!1);(0,o.vJ)(()=>{const e=l.current;if(!e)return;const t=new IntersectionObserver(([e])=>d(e?.isIntersecting??!1),{threshold:.1,rootMargin:a});return t.observe(e),()=>t.disconnect()},[a]);const h=(0,o.li)(n);return h.current=n,(0,o.vJ)(()=>{if(s===c)return;const e=setTimeout(()=>{p(s),h.current(s)},100);return()=>clearTimeout(e)},[s,c]),(0,r.Y)("div",{ref:l,style:{width:e?"100%":"auto",minHeight:"20px",...i},children:t})},"d",0,"1200px 0px"])},90023(e,t,n){n.d(t,{$:()=>s});var r=n(10201),o=n(63679),i=n(75654),a=n(28297),l=n(30821);function s({options:e,value:t,onChange:n,ariaLabel:o,raised:i,fill:a,wrap:l,dense:s}){return(0,r.Y)(d,{role:"group","aria-label":o,$raised:i,$fill:a,$wrap:l,children:e.map(e=>{const o=t===e.value,i=void 0!==e.href?{as:"a",href:e.href,"aria-current":o?"page":void 0}:{type:"button","aria-pressed":o,onClick:()=>n(e.value)};return(0,r.FD)(c,{...i,$on:o,$foil:e.foil,$iconOnly:!e.label,$fill:a,$dense:s,"aria-label":e.label?void 0:e.title,title:e.title,children:[e.icon,e.label&&(0,r.Y)("span",{children:e.label}),e.badge]},e.value)})})}const d=o.Ay.div` 7397 display: ${e=>
7397e.$fill?"flex":"inline-flex"}; 7398 ${e=>e.$wrap?"flex-wrap: wrap; max-width: 100%;":""} 7399 gap: 2px; 7400 background: ${e=>e.$raised?"var(--theme-palette-color-7)":"var(--theme-palette-color-8)"}; 7401 border-radius: 6px; 7402 padding: 2px; 7403`,c=o.Ay.button` 7404 display: inline-flex; 7405 align-items: center; 7406 justify-content: center; 7407 gap: 4px; 7408 height: ${e=>e.$dense?"26px":"28px"}; 7409 ${e=>e.$iconOnly?"width: 30px;":"padding: 0 12px;"} 7410 border: none; 7411 border-radius: 4px; 7412 background: ${e=>e.$on?e.$foil?"rgba(150,190,230,0.14)":l.Q.segOn:"none"}; 7413 color: ${e=>e.$on?"var(--theme-palette-color-4)":"var(--theme-palette-color-3)"}; 7414 font-family: inherit; 7415 font-size: 12px; 7416 font-weight: 600; 7417 white-space: nowrap; 7418 /* A pill can be a link (an option with an \`href\`). */ 7419 text-decoration: none; 7420 cursor: pointer; 7421 transition: all 150ms ease; 7422 7423 svg { 7424 display: block; 7425 } 7426 7427 /* An unselected pill used to answer a hover with a text colour and nothing 7428 else, which on a dark track is almost no answer at all. The tint says the 7429 pill is the target; the press says the click landed. */ 7430 &:hover { 7431 color: var(--theme-palette-color-4); 7432 ${e=>e.$on?"":"background: rgba(255, 255, 255, 0.06);"} 7433 } 7434 7435 &:active { 7436 transform: translateY(1px); 7437 } 7438 7439 &:focus-visible { 7440 outline: 2px solid var(--theme-palette-color-4); 7441 outline-offset: -1px; 7442 } 7443 7444 @media (prefers-reduced-motion: reduce) { 7445 transition: none; 7446 7447 &:active { 7448 transform: none; 7449 } 7450 } 7451 7452 ${e=>e.$on&&e.$foil?`span { ${i.Fj} } svg { color: ${i.qA}; }`:""} 7453 ${e=>e.$fill?"flex: 1; gap: 6px; height: 40px; font-size: 13.5px; font-weight: 700;":""} 7454 /* A control that owns a screen is tapped with a thumb: the 44px floor on a 7455 phone (the sign-in switch, "Who can message me"; account layer, 2026-09-27). */ 7456 @media only screen and ${a.E0} { 7457 ${e=>e.$fill?"height: 44px; font-size: 14px;":""} 7458 ${e=>e.$dense?"height: 28px;":""} 7459 } 7460`},75838(e,t,n){n.d(t,{a:()=>h});var r=n(10201),o=n(63679),i=n(29155),a=n(47883),l=n(63353),s=n(18318),d=n(86031),c=n(70165),p=n(76990);class h extends p.v{constructor(e){super(e);const t=c.yD?c.yD.elementTypes[e.elementType]?.slugOverride??e.elementType:e.elementType;e.gachaItem&&(0,i.Ky)(`${t}/${e.gachaItem.slug}`,c.yD?.boundPostTypes?.join(","))}render(){const e=this.props.gachaItem,t="cards"===this.props.elementType?d.SA.cards.getCardDetailConf():void 0;let n=[];if(this.store.mapState(e=>{n=e}),0===n.length)return(0,r.Y)(r.FK,{});const o=`${e?.name} Related Posts`;return(0,r.Y)(a.JH,{title:o,nav:"Articles",classic:e=>(0,r.FD)(l.ds,{children:["cards"===this.props.elementType&&void 0!==t?(0,r.Y)(t.TitleBlock,{card:this.props.gachaItem,titleType:o}):(0,r.Y)(l._X,{$bgcolor:this.props.colorToRender,children:o}),e]}),children:(0,r.Y)(u,{children:n.map((e,t)=>(0,r.Y)(g,{children:(0,r.Y)(s.l,{post:e,withContent:!0})},t))})})}}const u=o.Ay.div` 7461 display: grid; 7462 grid-template-columns: repeat(2, minmax(0, 1fr)); 7463 gap: 10px; 7464 width: 100%; 7465 padding: 10px; 7466 /* The V2 panel already pads its body. */ 7467 [data-chrome="v2"] & { 7468 padding: 0; 7469 } 7470 7471 @media only screen and (max-width: 1000px) { 7472 grid-template-columns: 1fr; 7473 } 7474`,g=o.Ay.div` 7475 width: 100%; 7476 max-width: 100%; 7477 box-sizing: border-box; 7478`},56245(e,t,n){n.d(t,{n:()=>d});var r=n(10201),o=n(63679),i=n(63346),a=n(38364);const l={primary:i.jn,secondary:i.tA,danger:i.Qi},s="Couldn't update. Try again.";function d({variant:e="primary",size:t="md",onAction:n,children:o,busyLabel:d,doneLabel:p,errorText:h=s,retryLabel:u="Try again",disabled:g,fill:m,inline:f,title:x,ariaLabel:v}){const{phase:y,error:w,run:b}=(0,a.W)(n),$=l[e];if("done"===y&&void 0!==p)return(0,r.Y)(c,{$fill:m,$inline:f,children:(0,r.Y)(i.i8,{$size:t,role:"status",children:p})});const k="busy"===y;return(0,r.FD)(c,{$fill:m,$inline:f,children:[(0,r.FD)($,{type:"button",$size:t,disabled:g,"aria-busy":k||void 0,"aria-disabled":k||void 0,title:x,"aria-label":v,onClick:()=>{k||b()},children:[k&&(0,r.Y)(i.az,{"aria-hidden":"true"}),k?d??o:"error"===y?u:o]}),"error"===y&&(0,r.Y)(i.ps,{role:"alert",children:"function"==typeof h?h(w):h})]})}const c=o.Ay.span` 7479 display: inline-flex; 7480 flex-direction: ${e=>e.$inline?"row":"column"}; 7481 align-items: ${e=>e.$inline?"center":e.$fill?"stretch":"flex-start"}; 7482 gap: ${e=>e.$inline?"8px":"4px"}; 7483 ${e=>e.$fill?"width: 100%;":""} 7484`;n.d(t,["X",0,s])}
7484,63346(e,t,n){var r=n(63679),o=n(28297),i=n(30821);const a=e=>"sm"!==e.$size;function l(e,t){const n=t&&"md"===(e.$size??"md")?48:44;return r.AH` 7485 @media only screen and ${o.E0} { 7486 height: ${n}px; 7487 ${"xs"===e.$size?"padding: 0 16px; font-size: 14px;":""} 7488 } 7489 `}const s=r.AH` 7490 justify-content: center; 7491 &:focus-visible { 7492 ${i.I} 7493 } 7494 &[aria-busy="true"] { 7495 cursor: progress; 7496 } 7497 ${function(e){return"xs"===e.$size?r.AH` 7498 height: 28px; 7499 padding: 0 10px; 7500 font-size: 12px; 7501 font-weight: 700; 7502 `:"sm"===e.$size?"":r.AH` 7503 height: 40px; 7504 padding: 0 16px; 7505 font-size: 13.5px; 7506 `}} 7507`,d=r.AH` 7508 color: ${i.Q.onAccent}; 7509 &:hover:not(:disabled) { 7510 filter: none; 7511 background: ${i.Q.accentHover}; 7512 border-color: ${i.Q.accentHover}; 7513 color: ${i.Q.onAccent}; 7514 } 7515 &:disabled { 7516 opacity: 1; 7517 background: ${i.Q.segOn}; 7518 border-color: ${i.Q.segOn}; 7519 color: ${i.Q.muted}; 7520 } 7521`,c=r.AH` 7522 color: var(--theme-palette-color-4); 7523 &:hover:not(:disabled) { 7524 background: ${i.Q.hoverFill}; 7525 border-color: var(--theme-palette-color-3); 7526 color: var(--theme-palette-color-4); 7527 } 7528 &:disabled { 7529 opacity: 1; 7530 border-color: ${i.Q.rowRule}; 7531 color: color-mix(in srgb, var(--theme-palette-color-3) 55%, var(--theme-palette-color-8)); 7532 } 7533 &[aria-busy="true"] { 7534 color: var(--theme-palette-color-3); 7535 } 7536`,p=(0,r.Ay)(o.pp)` 7537 ${s} 7538 /* The label sits on the accent: the site's on-accent ink, never a fixed colour. */ 7539 color: ${i.Q.onAccent}; 7540 &:hover:not(:disabled) { 7541 color: ${i.Q.onAccent}; 7542 } 7543 ${e=>a(e)&&d} 7544 ${e=>l(e,!0)} 7545`,h=(0,r.Ay)(o.IX)` 7546 ${s} 7547 ${e=>a(e)&&c} 7548 ${e=>l(e,!1)} 7549`,u=(0,r.Ay)(o.IX)` 7550 ${s} 7551 background: ${i.Q.dangerStrong}; 7552 border-color: ${i.Q.dangerStrong}; 7553 color: #fff; 7554 font-weight: 700; 7555 &:hover:not(:disabled) { 7556 background: color-mix(in srgb, ${i.Q.dangerStrong} 88%, #000); 7557 border-color: color-mix(in srgb, ${i.Q.dangerStrong} 88%, #000); 7558 color: #fff; 7559 } 7560 &:disabled { 7561 opacity: 0.6; 7562 background: none; 7563 border-color: ${i.Q.dangerEdge}; 7564 color: ${i.Q.danger}; 7565 } 7566 &[aria-busy="true"] { 7567 opacity: 0.8; 7568 } 7569 ${e=>l(e,!1)} 7570`,g=r.Ay.button` 7571 display: inline-flex; 7572 align-items: center; 7573 justify-content: ${e=>e.$center?"center":"flex-start"}; 7574 align-self: ${e=>e.$center?"stretch":"flex-start"}; 7575 gap: 2px; 7576 min-height: 32px; 7577 padding: 0; 7578 border: 0; 7579 background: none; 7580 font-family: inherit; 7581 font-size: 13.5px; 7582 font-weight: 600; 7583 color: ${e=>"muted"===e.$tone?"var(--theme-palette-color-3)":"var(--theme-palette-color-1)"}; 7584 cursor: pointer; 7585 &:hover:not(:disabled) { 7586 text-decoration: underline; 7587 color: ${e=>"muted"===e.$tone?"var(--theme-palette-color-4)":"var(--theme-palette-color-1)"}; 7588 } 7589 &:focus-visible { 7590 ${i.I} 7591 } 7592 &:disabled { 7593 opacity: 0.5; 7594 cursor: default; 7595 } 7596 @media only screen and ${o.E0} { 7597 min-height: ${44}px; 7598 font-size: 14px; 7599 } 7600`,m=r.i7` 7601 to { 7602 transform: rotate(360deg); 7603 } 7604`,f=r.Ay.span` 7605 flex: none; 7606 width: 12px; 7607 height: 12px; 7608 box-sizing: border-box; 7609 border-radius: 50%; 7610 border: 2px solid currentColor; 7611 border-right-color: transparent; 7612 animation: ${m} 0.8s linear infinite; 7613 @media (prefers-reduced-motion: reduce) { 7614 animation: none; 7615 } 7616`,x=r.Ay.span` 7617 font-size: 11.5px; 7618 font-weight: 500; 7619 line-height: 1.4; 7620 color: ${e=>"success"===e.$tone?i.Q.success:i.Q.danger}; 7621`,v=r.Ay.span` 7622 display: inline-flex; 7623 align-items: center; 7624 justify-content: center; 7625 gap: 6px; 7626 height: ${e=>"xs"===e.$size?28:"sm"===e.$size?36:40}px; 7627 font-size: ${e=>"xs"===e.$size?12:13}px; 7628 font-weight: 600; 7629 white-space: nowrap; 7630 color: ${i.Q.success}; 7631 @media only screen and ${o.E0} { 7632 height: ${44}px; 7633 } 7634`;n.d(t,["QW",0,g,"Qi",0,u,"az",0,f,"i8",0,v,"jn",0,p,"ps",0,x,"tA",0,h])},38364(e,t,n){n.d(t,{W:()=>o});var r=n(17402);function o(e,t=3e3){const[n,o]=(0,r.J0)("idle"),[i,a]=(0,r.J0)(null),l=(0,r.li)(0),s=(0,r.li)(!1),d=(0,r.li)(!0);return(0,r.vJ)(()=>(d.current=!0,()=>{d.current=!1}),[]),(0,r.vJ)(()=>{if("done"!==n)return;const e=setTimeout(()=>
7634o("idle"),t);return()=>clearTimeout(e)},[n,t]),{phase:n,error:i,run:async()=>{if(s.current)return;s.current=!0;const t=++l.current;o("busy"),a(null);try{await e(),d.current&&t===l.current&&o("done")}catch(e){d.current&&t===l.current&&(a(e),o("error"))}finally{s.current=!1}},reset:()=>{l.current+=1,o("idle"),a(null)}}}},62018(e,t,n){n.d(t,{d:()=>h});var r=n(10201),o=n(17402),i=n(63679),a=n(91111);const l=i.Ay.div` 7635 position: fixed; 7636 top: 0; 7637 left: 0; 7638 transform: translate3d(${e=>e.$x}px, ${e=>e.$y}px, 0); 7639 z-index: 10001; 7640 box-sizing: border-box; 7641 min-width: ${e=>e.$minWidth}px; 7642 max-height: 70vh; 7643 overflow-y: auto; 7644 overflow-x: hidden; 7645 padding: 4px; 7646 border: 1px solid var(--theme-palette-color-5); 7647 border-radius: 6px; 7648 /* Matches OurSelect's menu: translucent panel over a blur, so the board 7649 underneath stays readable as context for what you are about to do. */ 7650 background-color: color-mix(in srgb, var(--theme-palette-color-6) 92%, transparent); 7651 backdrop-filter: blur(8px); 7652 color: var(--theme-palette-color-3); 7653 font-family: inherit; 7654 font-size: 0.95em; 7655 box-shadow: 7656 0 8px 16px rgba(0, 0, 0, 0.25), 7657 0 4px 6px rgba(0, 0, 0, 0.15); 7658 user-select: none; 7659 7660 @media (prefers-contrast: high) { 7661 border-width: 2px; 7662 box-shadow: none; 7663 } 7664`,s=i.Ay.div` 7665 padding: 6px 8px 3px; 7666 color: var(--theme-palette-color-2); 7667 font-size: 0.72em; 7668 font-weight: 600; 7669 letter-spacing: 0.08em; 7670 text-transform: uppercase; 7671 border-bottom: 1px solid var(--theme-palette-color-6); 7672 margin-bottom: 2px; 7673 7674 &:first-child { 7675 padding-top: 2px; 7676 } 7677`,d=i.Ay.button` 7678 display: flex; 7679 align-items: center; 7680 gap: 8px; 7681 width: 100%; 7682 min-height: 32px; 7683 padding: 4px 8px; 7684 border: 1px solid transparent; 7685 border-radius: 4px; 7686 background: none; 7687 color: ${e=>e.$emphasis?"var(--theme-palette-color-1)":"var(--theme-palette-color-3)"}; 7688 font-family: inherit; 7689 font-size: 1em; 7690 font-weight: ${e=>e.$emphasis?600:400}; 7691 text-align: left; 7692 line-height: 1.2; 7693 cursor: pointer; 7694 transition: 7695 background-color 0.15s ease, 7696 color 0.15s ease; 7697 7698 &:hover:not(:disabled), 7699 &:focus-visible { 7700 outline: none; 7701 background-color: var(--theme-palette-color-5); 7702 color: var(--theme-palette-color-4); 7703 } 7704 &:focus-visible { 7705 border-color: var(--theme-palette-color-1); 7706 } 7707 &:disabled { 7708 opacity: 0.45; 7709 cursor: not-allowed; 7710 } 7711 7712 /* Touch targets, same threshold OurSelect's options use. */ 7713 @media (hover: none) and (pointer: coarse) { 7714 min-height: 44px; 7715 } 7716`,c=i.Ay.span` 7717 flex: 1; 7718 min-width: 0; 7719`,p=i.Ay.span` 7720 flex-shrink: 0; 7721 color: var(--theme-palette-color-2); 7722 font-size: 0.8em; 7723 opacity: 0.8; 7724`;function h(e){const t=(0,o.li)(null),n=function(e,t){const[n,r]=(0,o.J0)(e);return(0,o.Nf)(()=>{const n=t.current;if(!n)return;const{width:o,height:i}=n.getBoundingClientRect(),a=window.innerWidth-8,l=window.innerHeight-8,s=e.x+o>a?Math.max(8,e.x-o):e.x,d=e.y+i>
7724l?Math.max(8,e.y-i):e.y;r({x:Math.min(s,Math.max(8,a-o)),y:d})},[e,t]),n}(e.anchor,t),{onClose:i}=e,h=(0,o.hb)(e=>{const n=[...t.current?.querySelectorAll("button:not(:disabled)")??[]];if(0===n.length)return;const r=n.findIndex(e=>e===document.activeElement),o=n[(r+e+2*n.length)%n.length];o?.focus()},[]);let u;return(0,o.vJ)(()=>{const e=e=>{const n=e.target;t.current&&n instanceof Node&&!t.current.contains(n)&&i()},n=e=>{if("Escape"===e.key)return e.stopPropagation(),void i();"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),h("ArrowDown"===e.key?1:-1))};return document.addEventListener("mousedown",e),document.addEventListener("keydown",n),window.addEventListener("scroll",i,!0),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",n),window.removeEventListener("scroll",i,!0)}},[i,h]),(0,r.Y)(a.f,{children:(0,r.FD)(l,{ref:t,$x:n.x,$y:n.y,$minWidth:e.minWidth??210,role:"menu","aria-label":e.label,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),children:[void 0!==e.label&&(0,r.Y)(s,{children:e.label}),e.items.map(e=>{const t=void 0!==e.group&&e.group!==u?e.group:null;return u=e.group??u,(0,r.FD)("div",{children:[null!==t&&(0,r.Y)(s,{children:t}),(0,r.FD)(d,{type:"button",role:"menuitem",disabled:e.disabled,$emphasis:e.emphasis,onClick:()=>{e.onSelect(),i()},children:[void 0!==e.icon&&(0,r.Y)("span",{"aria-hidden":"true",children:e.icon}),(0,r.Y)(c,{children:e.label}),void 0!==e.hint&&(0,r.Y)(p,{children:e.hint})]})]},e.id)})]})})}},14361(e,t,n){n.d(t,{v:()=>i});var r=n(10201),o=n(17402);class i extends o.Ay.Component{constructor(e){super(e),this.state={hidden:!0}}componentDidMount(){this.props.delayByState&&!this.props.render||!this.props.delay||setTimeout(()=>{this.setState({hidden:!1})},+this.props.delay)}UNSAFE_componentWillReceiveProps(e){e.delayByState&&!e.render||!e.delay||setTimeout(()=>{this.setState({hidden:!1})},+e.delay)}render(){return this.state.hidden?(0,r.Y)(r.FK,{}):(0,r.Y)("div",{children:this.props.children})}}},9299(e,t,n){n.d(t,{t:()=>l});var r=n(10201),o=n(17402),i=n(89629),a=n(51900);class l extends o.Ay.Component{constructor(e){super(e),this.formbuttonshandle=e=>{switch(e){case"close":case"cancel":this.setState({hasError:!this.state.hasError});break;case"reload":window.location.reload()}},this.state={hasError:!1,errorText:""}}static isChunkLoadError(e){return/ChunkLoadError|Loading chunk [\w-]+ failed|Failed to fetch dynamically imported module|error loading dynamically imported module|Importing a module script failed/i.test(`${e?.name??""} ${e?.message??""}`)}componentDidCatch(e){if(e&&l.isChunkLoadError(e)){try{const e="dotgg_chunk_reload_at",t=Number(sessionStorage.getItem(e)||0);if(Date.now()-t>6e4)return sessionStorage.setItem(e,String(Date.now())),void window.location.reload()}catch{}this.setState({hasError:!0})}else e&&((0,i.N7)(e,"ErrorBoundary"),this.setState({errorText:`${e.message}, ${e.stack}, ${e.name}`})),this.setState({hasError:!0})}render(){return this.state.hasError&&this.props.justhide?(0,r.Y)(o.Ay.Fragment,{}):this.state.hasError?(0,r.Y)(a.qp,{header:"Error Occured!",show:this.state.hasError,onClose:this.formbuttonshandle,width:400,promptbuttons:[{label:"Reload",id:"reload"}],children:(0,r.FD)("div",{children:["Ouch! Something went wrong and we were unable to render this page properly. First of all, please try reload this page with Ctrl+F5, clear browser cache manually, disable all adblocking software and try to reload the page. If the error still persists, please post an issue ",(0,r.Y)("a",{href:"https://github.com/Razviar/mtgap/issues",children:"on our GitHub"})," to expedite solution for this problem.",(0,r.Y)("br",{}),"Use error technical details below if you're going to report an issue:",(0,r.Y)("textarea",{style:{width:"100%",height:"200px"},value:this.state.errorText})]})}):(0,r.Y)(o.Ay.Fragment,{children:this.props.children})}}},28709(e,t,n){n.d(t,{T:()=>l});var r=n(10201),o=n(63679),i=n(70213),a=n(30821);function l({id:e,checked:t,onChange:n,children:o,note:a,disabled:l}){return(0,r.FD)(s,{htmlFor:e,$disabled:l,children:[(0,r.Y)(d,{id:e,type:"checkbox",checked:t,disabled:l,onChange:e=>n(e.currentTarget.checked)}),(0,r.Y)(c,{"aria-hidden":"true",children:t&&(0,r.Y)(i.iW,{size:14})}),(0,r.FD)(p,{children:[o,a&&(0,r.Y)(h,{children:a})]})]})}const s=o.Ay.label` 7725 position: relative; 7726 display: flex; 7727 align-items: flex-start; 7728 gap: 12px; 7729 min-height: 44px; 7730 padding: 2px 0; 7731 box-sizing: border-box; 7732 cursor: ${e=>e.$disabled?"default":"pointer"}; 7733 ${e=>e.$disabled?"opacity: 0.6;":""} 7734`,d=o.Ay.input` 7735 && { 7736 position: absolute; 7737 top: 2px; 7738 left: 0; 7739 width: 22px; 7740 min-width: 0; 7741 height: 22px; 7742 margin: 0; 7743 opacity: 0; 7744 cursor: inherit; 7745 } 7746`,c=o.Ay.span` 7747 display: inline-flex; 7748 flex: none; 7749 align-items: center; 7750 justify-content: center; 7751 width: 22px; 7752 height: 22px;
7753 margin-top: 1px; 7754 box-sizing: border-box; 7755 border-radius: 4px; 7756 box-shadow: inset 0 0 0 2px var(--theme-palette-color-3); 7757 color: ${a.Q.onAccent}; 7758 ${d}:checked + & { 7759 background: var(--theme-palette-color-1); 7760 box-shadow: none; 7761 } 7762 ${d}:focus-visible + & { 7763 ${a.I} 7764 } 7765 svg { 7766 stroke-width: 3; 7767 } 7768`,p=o.Ay.span` 7769 display: flex; 7770 flex-direction: column; 7771 gap: 2px; 7772 min-width: 0; 7773 padding-top: 2px; 7774 font-size: 14px; 7775 line-height: 1.45; 7776 color: var(--theme-palette-color-4); 7777 a { 7778 font-weight: 600; 7779 color: var(--theme-palette-color-4); 7780 text-decoration: underline; 7781 } 7782`,h=o.Ay.span` 7783 font-size: 12.5px; 7784 line-height: 1.45; 7785 color: ${a.Q.muted}; 7786`},29854(e,t,n){n.d(t,{A:()=>l,s:()=>s});var r=n(10201),o=n(17402),i=n(70213),a=n(65057);function l({id:e,label:t,ariaLabel:n,labelEnd:o,value:l,onValue:s,type:d="text",message:c,variant:p,onPage:h,trailing:u,inputRef:g,...m}){const f=c?`${e}-note`:void 0;return(0,r.FD)(a.JV,{children:[(t||o)&&(0,r.FD)(a.pe,{children:[t&&(0,r.Y)(a.dh,{htmlFor:e,children:t}),o]}),(0,r.FD)(a.vK,{children:[(0,r.Y)(a.pd,{id:e,ref:g,type:d,value:l,"aria-label":t?void 0:n,"aria-invalid":"error"===c?.tone||void 0,"aria-describedby":f,$variant:p,$trailing:void 0!==u,$onPage:h,onChange:e=>s(e.currentTarget.value),...m}),u]}),c&&(0,r.FD)(a.XE,{id:f,$tone:c.tone,role:"error"===c.tone?"alert":"status",children:["success"===c.tone&&(0,r.Y)(i.iW,{size:13}),(0,r.Y)("span",{children:c.text})]})]})}function s(e){const[t,n]=(0,o.J0)(!1);return(0,r.Y)(l,{...e,type:t?"text":"password",trailing:(0,r.Y)(a.DE,{type:"button","aria-controls":e.id,"aria-pressed":t,"aria-label":t?"Hide password":"Show password",onClick:()=>n(e=>!e),children:t?"Hide":"Show"})})}},65057(e,t,n){var r=n(63679),o=n(28297),i=n(30821);const a=r.Ay.div` 7787 display: flex; 7788 flex-direction: column; 7789 gap: 6px; 7790 min-width: 0; 7791`,l=r.Ay.div` 7792 display: flex; 7793 align-items: baseline; 7794 gap: 12px; 7795 min-width: 0; 7796`,s=r.Ay.label` 7797 font-size: 13px; 7798 font-weight: 600; 7799 line-height: 1.3; 7800 color: var(--theme-palette-color-4); 7801 @media only screen and ${o.E0} { 7802 font-size: 13.5px; 7803 } 7804`,d=r.Ay.a` 7805 margin-left: auto; 7806 font-size: 13px; 7807 font-weight: 600; 7808 color: var(--theme-palette-color-1); 7809 text-decoration: none; 7810 white-space: nowrap; 7811 &:hover { 7812 text-decoration: underline; 7813 } 7814 &:focus-visible { 7815 ${i.I} 7816 } 7817`,c=r.Ay.div` 7818 position: relative; 7819 display: flex; 7820 min-width: 0; 7821`,p=r.Ay.input` 7822 && { 7823 width: 100%; 7824 min-width: 0; 7825 height: 44px; 7826 margin: 0; 7827 padding: 0 ${e=>e.$trailing?72:12}px 0 12px; 7828 box-sizing: border-box; 7829 border: 0; 7830 border-radius: 6px; 7831 --field-bg: var(--theme-palette-color-7); 7832 background: var(--field-bg); 7833 box-shadow: inset 0 0 0 1px ${i.Q.inputRing}; 7834 color: var(--theme-palette-color-4); 7835 font-family: inherit; 7836 font-size: 15px; 7837 line-height: normal; 7838 letter-spacing: normal; 7839 outline: none; 7840 transition: box-shadow 120ms ease; 7841 } 7842 &&::placeholder { 7843 color: color-mix(in srgb, var(--theme-palette-color-3) 70%, transparent); 7844 opacity: 1; 7845 } 7846 /* Fill and text stay put on focus: Blocksy's own :focus rule (0,2,1) empties 7847 the one and greys the other to its text colour. */ 7848 &&:focus { 7849 background: var(--field-bg); 7850 box-shadow: inset 0 0 0 2px ${i.Q.inputRingFocus}; 7851 color: var(--theme-palette-color-4); 7852 } 7853 &&[aria-invalid="true"] { 7854 box-shadow: inset 0 0 0 2px ${i.Q.danger}; 7855 } 7856 &&:disabled { 7857 opacity: 0.6; 7858 cursor: not-allowed; 7859 } 7860 @media only screen and ${o.E0} { 7861 && { 7862 height: 48px; 7863 font-size: 16px; 7864 ${e=>e.$onPage?"--field-bg: var(--theme-palette-color-8);":""} 7865 } 7866 } 7867 && { 7868 ${e=>{return"code"===(t=e.$variant)?r.AH` 7869 height: 56px; 7870 padding: 0 14px 0 calc(14px + 0.4em); 7871 text-align: center; 7872 font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; 7873 font-size: 26px; 7874 letter-spacing: 0.4em; 7875 @media only screen and ${o.E0} { 7876 height: 56px; 7877 font-size: 24px; 7878 } 7879 `:"recovery"===t?r.AH` 7880 height: 52px; 7881 padding: 0 14px; 7882 font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; 7883 font-size: 20px; 7884 letter-spacing: 0.12em; 7885 text-transform: uppercase; 7886 @media only screen and ${o.E0} { 7887 height: 52px; 7888 font-size: 20px; 7889 } 7890 `:"";var t}}
7890 7891 } 7892`,h=r.Ay.textarea` 7893 && { 7894 width: 100%; 7895 min-height: 96px; 7896 margin: 0; 7897 padding: 10px 12px; 7898 box-sizing: border-box; 7899 border: 0; 7900 border-radius: 6px; 7901 background: var(--theme-palette-color-7); 7902 box-shadow: inset 0 0 0 1px ${i.Q.inputRing}; 7903 color: var(--theme-palette-color-4); 7904 font-family: inherit; 7905 font-size: 15px; 7906 line-height: 1.5; 7907 resize: vertical; 7908 outline: none; 7909 } 7910 &&:focus { 7911 background: var(--theme-palette-color-7); 7912 box-shadow: inset 0 0 0 2px ${i.Q.inputRingFocus}; 7913 color: var(--theme-palette-color-4); 7914 } 7915 @media only screen and ${o.E0} { 7916 && { 7917 font-size: 16px; 7918 } 7919 } 7920`,u=r.Ay.button` 7921 position: absolute; 7922 top: 50%; 7923 right: 4px; 7924 display: inline-flex; 7925 align-items: center; 7926 height: 36px; 7927 padding: 0 10px; 7928 transform: translateY(-50%); 7929 border: 0; 7930 border-radius: 4px; 7931 background: none; 7932 color: var(--theme-palette-color-3); 7933 font-family: inherit; 7934 font-size: 12.5px; 7935 font-weight: 600; 7936 cursor: pointer; 7937 &:hover { 7938 color: var(--theme-palette-color-4); 7939 } 7940 &:focus-visible { 7941 ${i.I} 7942 } 7943 @media only screen and ${o.E0} { 7944 height: ${44}px; 7945 font-size: 13px; 7946 } 7947`,g=r.Ay.div` 7948 display: flex; 7949 align-items: flex-start; 7950 gap: 6px; 7951 font-size: 13px; 7952 line-height: 1.45; 7953 font-weight: ${e=>"success"===e.$tone?600:400}; 7954 color: ${e=>"error"===e.$tone?i.Q.danger:"warning"===e.$tone?i.Q.warning:"success"===e.$tone?i.Q.success:i.Q.muted}; 7955 svg { 7956 flex: none; 7957 margin-top: 2px; 7958 } 7959 a, 7960 button { 7961 padding: 0; 7962 border: 0; 7963 background: none; 7964 font: inherit; 7965 font-weight: 600; 7966 color: var(--theme-palette-color-4); 7967 text-decoration: none; 7968 cursor: pointer; 7969 } 7970 a:hover, 7971 button:hover { 7972 text-decoration: underline; 7973 } 7974 @media only screen and ${o.E0} { 7975 font-size: 13.5px; 7976 } 7977`;n.d(t,["DE",0,u,"JV",0,a,"XE",0,g,"dh",0,s,"fs",0,h,"pd",0,p,"pe",0,l,"rm",0,d,"vK",0,c])},1070(e,t,n){var r=n(10201);const o=(0,r.Y)("svg",{width:"14",height:"14",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.Y)("path",{d:"M19 19L15 15M17 9C17 11.1217 16.1571 13.1566 14.6569 14.6569C13.1566 16.1571 11.1217 17 9 17C6.87827 17 4.84344 16.1571 3.34315 14.6569C1.84285 13.1566 1 11.1217 1 9C1 6.87827 1.84285 4.84344 3.34315 3.34315C4.84344 1.84285 6.87827 1 9 1C11.1217 1 13.1566 1.84285 14.6569 3.34315C16.1571 4.84344 17 6.87827 17 9Z",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})}),i=(0,r.FD)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[(0,r.Y)("circle",{cx:"5",cy:"12",r:"2"}),(0,r.Y)("circle",{cx:"12",cy:"12",r:"2"}),(0,r.Y)("circle",{cx:"19",cy:"12",r:"2"})]}),a=(0,r.Y)("svg",{width:"11",height:"11",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.Y)("path",{d:"M1.64258 6.35664L6.35724 1.64331M1.64258 1.64331L6.35724 6.35664",stroke:"currentColor",strokeWidth:"1.33",strokeLinecap:"round"})});n.d(t,["bZ",0,i,"pU",0,o,"q8",0,a])},92475(e,t,n){var r=n(63679);const o=r.I4.img` 7978 height: ${e=>e.$height?`${e.$height}${e.$height.includes("px")?"":"px"}`:"30px"}; 7979 width: ${e=>e.$width?`${e.$width}${e.$width.includes("px")?"":"px"}`:"30px"}; 7980 object-fit: contain; 7981 max-height: ${e=>e.$height?`${e.$height}${e.$height.includes("px")?"":"px"}`:"30px"}; 7982 max-width: ${e=>e.$width?`${e.$width}${e.$width.includes("px")?"":"px"}`:"30px"}; 7983 filter: ${e=>e.$noshadow?e.$invertColor?"invert(1)":"":"drop-shadow(0px 2px 3px #000)"+(e.$invertColor?" invert(1)":"")}; 7984 ${e=>void 0!==e.$isCircledBorder?`\n border: solid 2px ${e.$isCircledBorder};\n border-radius: 50%;\n `:""} 7985`;r.I4.div` 7986 display: inline-block; 7987 height: ${e=>e.$height?`${e.$height}${e.$height.includes("px")?"":"px"}`:"30px"}; 7988 width: ${e=>e.$width?`${e.$width}${e.$width.includes("px")?"":"px"}`:"30px"}; 7989 object-fit: contain; 7990 max-height: ${e=>e.$height?`${e.$height}${e.$height.includes("px")?"":"px"}`:"30px"}; 7991 max-width: ${e=>e.$width?`${e.$width}${e.$width.includes("px")?"":"px"}`:"30px"}; 7992`,n.d(t,["D",0,o])},55622(e,t,n){n.d(t,{o:()=>a});var r=n(10201),o=n(17402),i=n(55367);class a extends o.Ay.Component{constructor(e){super(e),this.onVisibility=e=>{e?this.state.hidden&&this.setState({hidden:!1}):this.props.unloadOffscreen&&!this.state.hidden&&this.setState({hidden:!0})},this.state={hidden:!0}}render(){const e=(0,r.Y)("div",{style:{width:this.props.width,height:this.props.height,aspectRatio:this.props.aspectRatio,background:"var(--theme-palette-color-8)",borderRadius:"3.7%"}});return this.props.unloadOffscreen?(0,r.Y)(i.A,{onChange:this.onVisibility,wide:!0,rootMargin:"1500px 0px",children:this.state.hidden?e:(0,r.Y)(o.Ay.Fragment,{children:this.props.children})}):this.state.hidden?(0,r.Y)(i.A,{onChange:this.onVisibility,wide:!1,children:e}):(0,r.Y)(o.Ay.Fragment,{children:this.props.children})}}},12998(e,t,n){n.d(t,{r:()=>c});var r=n(17402),o=n(42715);const i=[],a=["overflow","marginRight","position","top","left","right","width"];let l=null;
7992const s="[id^='rootOfProContent']";let d=[];function c(e,t,n,c){const h=(0,r.li)({}),u=(0,r.li)(t);u.current=t,(0,r.vJ)(()=>{if(!e)return;const t=h.current;i.push(t);const n=e=>{"Escape"===e.key&&i[i.length-1]===t&&u.current()};return function(){if(l)return;const e=document.body,t={overflow:e.style.overflow,marginRight:e.style.marginRight,position:e.style.position,top:e.style.top,left:e.style.left,right:e.style.right,width:e.style.width};l={scrollY:window.scrollY,prev:t};const n=window.innerWidth-document.documentElement.clientWidth;e.style.overflow="hidden",n>0&&(e.style.marginRight=`${n}px`);const r=navigator.maxTouchPoints>0||window.matchMedia("(pointer: coarse)").matches;d=[],document.querySelectorAll(`[${o.kJ}]`).forEach(e=>{d.push({node:e,left:e.scrollLeft,top:e.scrollTop})}),document.querySelectorAll(s).forEach(e=>{e.inert=!0}),r&&(e.style.position="fixed",e.style.top=`-${l.scrollY}px`,e.style.left="0",e.style.right="0",e.style.width="100%")}(),document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n);const e=i.indexOf(t);-1!==e&&i.splice(e,1),0===i.length&&function(){if(!l)return;const{scrollY:e,prev:t}=l,n=document.body,r="fixed"===n.style.position;l=null,a.forEach(e=>{n.style[e]=t[e]}),r&&window.scrollTo(0,e),document.querySelectorAll(s).forEach(e=>{e.inert=!1}),d.forEach(({node:e,left:t,top:n})=>{e.scrollLeft=t,e.scrollTop=n}),d=[]}()}},[e]),function(e,t,n){const o=(0,r.li)(null),i=(0,r.li)(n);i.current=n,(0,r.vJ)(()=>{if(!e||!t)return;const n=document.activeElement;o.current=n instanceof HTMLElement?n:null;const r=()=>t.current?.focus({preventScroll:!0});let a=0;t.current?.isConnected?r():a=requestAnimationFrame(r);const l=e=>{if("Tab"!==e.key)return;const n=t.current;if(!n)return;const r=function(e){return Array.from(e.querySelectorAll(p)).filter(e=>e.getClientRects().length>0)}(n),o=r[0],i=r[r.length-1];if(!o||!i)return e.preventDefault(),void n.focus({preventScroll:!0});const a=document.activeElement;(e.shiftKey?a===o||a===n:a===i)&&(e.preventDefault(),(e.shiftKey?i:o).focus({preventScroll:!0}))};return document.addEventListener("keydown",l,!0),()=>{cancelAnimationFrame(a),document.removeEventListener("keydown",l,!0),function(e,t){const n=e=>null!==e&&document.contains(e),r=n(e)?e:n(t)?t:document.querySelector("h1, h2");r&&(r.matches(p)||r.setAttribute("tabindex","-1"),r.focus({preventScroll:!0}))}(o.current,i.current?.current??null),o.current=null}},[e,t])}(e,n,c)}const p=["a[href]","area[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","iframe","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(",")},21398(e,t,n){n.d(t,{A:()=>a});var r=n(17402);const o=new Map,i=new Map,a=({src:e,isMissing:t})=>{const n=(0,r.li)(t);return n.current=t,(0,r.vJ)(()=>{if(""!==e)return function(e,t){const n=o.get(e);if(void 0!==n)return t(n),()=>{};let r=i.get(e);if(void 0===r){r=new Set,i.set(e,r);const t=new Image,n=n=>{t.onload=null,t.onerror=null,o.set(e,n);const r=i.get(e);i.delete(e),r?.forEach(e=>e(n))};t.onload=()=>n("ok"),t.onerror=()=>n("missing"),t.src=e}const a=r;return a.add(t),()=>{a.delete(t)}}(e,e=>{"missing"===e&&n.current()})},[e]),null}},12534(e,t,n){var r=n(10201);const o=(0,n(17402).ph)(({checked:e})=>e?(0,r.FD)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,r.Y)("rect",{x:"1",y:"1",width:"18",height:"18",rx:"4",fill:"var(--theme-palette-color-4)",stroke:"var(--theme-palette-color-4)",strokeWidth:"1"}),(0,r.Y)("path",{d:"M5 10L8.5 13.5L15 6.5",stroke:"var(--theme-palette-color-5)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}):(0,r.Y)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,r.Y)("rect",{x:"1",y:"1",width:"18",height:"18",rx:"4",fill:"transparent",stroke:"var(--theme-palette-color-3)",strokeWidth:"1",strokeOpacity:"0.4"})}));o.displayName="CheckboxIcon",n.d(t,["R",0,o])},8765(e,t,n){var r=n(17402);n.d(t,["j",0,(e,t,n,o)=>{(0,r.vJ)(()=>
7992{if(!e)return;const r=e=>{const r=e.target;n.current&&!n.current.contains(r)&&t.current&&!t.current.contains(r)&&o()},i=e=>{"Escape"===e.key&&(o(),t.current&&t.current.focus())};return document.addEventListener("mousedown",r),document.addEventListener("keydown",i),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("keydown",i)}},[e,t,n,o])}])},79407(e,t,n){n.d(t,{R:()=>Y});var r=n(10201),o=n(17402),i=n(55367),a=n(8765),l=n(89024);const s=e=>"isSubHeading"in e&&!0===e.isSubHeading,d=e=>!0===e.isDisabled,c=(e,t)=>{const n=e.findIndex(e=>s(e)&&e.value===t.value);if(-1===n)return[];const r=[];for(let t=n+1;t<e.length;t++){const n=e[t];if(s(n))break;""===n.value||d(n)||r.push(n)}return r},p=(e,t,n)=>{const r=e.length;let o=t;for(let t=0;t<r;t++){if(o>=0&&o<r&&!s(e[o])&&!d(e[o]))return o;o+=n,o<0&&(o=r-1),o>=r&&(o=0)}return-1};var h=n(79822);const u=(0,o.ph)(({loadingMessage:e})=>(0,r.Y)(h.BB,{$active:!1,role:"status","aria-live":"polite",children:e?e():"Loading..."}));u.displayName="LoadingMessage";const g=(0,o.ph)(({noOptionsMessage:e,input:t})=>(0,r.Y)(h.BB,{$active:!1,role:"status",children:e?e(t):"No Options Available"}));g.displayName="NoOptionsMessage";const m=(0,o.ph)(({hasmore:e})=>(0,r.Y)("div",{style:{flexBasis:"100%"},role:"presentation",children:e&&Array.from({length:15}).map((e,t)=>(0,r.Y)(h.P7,{},t))}));m.displayName="InfiniteScrollIndicator";const f=(0,o.ph)(({menuRef:e,showing:t,height:n,isLoadingOptions:o,loadingMessage:i,shownOptions:a,noOptionsMessage:l,input:s,pagedOptions:d,renderOption:c,ITEMS_ON_PAGE:p,isAsync:f=!1,OurVisibilitySensor:x,handleSensor:v,hasmore:y,doubleWidth:w=!1,shouldShiftLeft:b=!1,leftOffset:$=0,twoColumns:k=!1,lightTheme:Y=!1,menuPlacement:A="auto"})=>{if(!t)return null;const C=k?(()=>{const e=d.map((e,t)=>c(e,t)),t=Math.ceil(e.length/2),n=e.slice(0,t),o=e.slice(t);return(0,r.FD)(h.Fv,{children:[(0,r.Y)(h.fW,{children:n}),(0,r.Y)(h.fW,{children:o})]})})():null;return(0,r.FD)(h.Gz,{ref:e,$showing:t,$height:n,$doubleWidth:w,$shouldShiftLeft:b,$leftOffset:$,$twoColumns:k,$lightTheme:Y,$placeUp:"top"===A,role:"listbox","aria-label":"Options",children:[o&&(0,r.Y)(u,{loadingMessage:i}),0===a.length&&!o&&(0,r.Y)(g,{noOptionsMessage:l,input:s}),k?C:d.map((e,t)=>c(e,t)),(a.length>p||f)&&(0,r.Y)(x,{onChange:v,wide:!0,children:(0,r.Y)(m,{hasmore:y})})]})});f.displayName="OurSelectMenu";var x=n(12534);const v=({option:e,isMulti:t,elementsFlexBasis:n,elementsFlexBasisMobile:o,groupSelection:i,formatOptionLabel:a,onOptionClick:l})=>{const s=t&&void 0!==i&&i.total>0,d=s&&i.selected===i.total;return(0,r.FD)(h.Sr,{$elementsFlexBasis:n,$elementsFlexBasisMobile:o,$twoColumns:"50%"===n,$clickable:s,onClick:s?()=>l(e):void 0,role:s?"option":"presentation","aria-selected":s?d:void 0,"aria-hidden":s?void 0:"true",title:s?d?"Deselect all in this group":"Select all":void 0,children:[(0,r.Y)(h.Hg,{children:a?a(e):e.label}),s&&i.cards>0&&(0,r.Y)(h.af,{children:i.cards}),s&&(0,r.Y)(h.VT,{children:(0,r.Y)(x.R,{checked:d})})]})},y=({option:e,index:t,showing:n,value:o,isMulti:i,elementsFlexBasis:a,elementsFlexBasisMobile:l,focusedOptionIndex:c,groupSelection:p,formatOptionLabel:u,onOptionClick:g})=>{const m="50%"===a;if(s(e))return(0,r.Y)(v,{option:e,isMulti:i,elementsFlexBasis:a,elementsFlexBasisMobile:l,groupSelection:p,formatOptionLabel:u,onOptionClick:g});const f=i?Array.isArray(o)&&o.some(t=>t.value===e.value&&""!==e.value):!i&&o&&!Array.isArray(o)&&o.value===e.value&&""!==e.value,y=t===c,w=d(e),b=void 0!==e.cardsCount&&""!==e.value;return(0,r.FD)(h.BB,{$active:Boolean(n&&f&&!w),$focused:Boolean(n&&y&&!f&&!w),$disabled:w,$elementsFlexBasis:a,$elementsFlexBasisMobile:l,$twoColumns:m,onClick:()=>g(e),role:"option","aria-selected":Boolean(f),"aria-disabled":w,tabIndex:-1,children:[(0,r.Y)(h.Hg,{children:u?u(e):e.label}),b&&(0,r.Y)(h.af,{$disabled:w,children:e.cardsCount}),i&&""!==e.value&&(0,r.Y)(h.VT,{children:(0,r.Y)(x.R,{checked:Boolean(f)})})]})};var w=n(1070),b=n(98973);const $=(0,o.ph)(({isMulti:e=!1,multiValue:t,singleValue:n,showing:o,formatOptionLabel:i,placeholder:a,searchPlaceholder:l,prefixLabel:s,isSearchable:d=!1,inputRef:c,input:p,handleInputChange:u,highlight:g=!1,isDisabled:m=!1})=>{const f=!o||Boolean(s)&&!d,x=1===t.length?t[0].label:`${t.length} selected`,v=e&&t.length>0?x:n?n.displayLabel||n.label:l||a;return(0,r.FD)(h.g5,{$highlight:g,$isMulti:e,children:[s&&(0,r.Y)(b.Pp,{$active:g,children:s}),d&&o&&(0,r.Y)(h.LZ,{children:w.pU}),d&&o?(0,r.Y)(h.DO,{ref:c,placeholder:v,onChange:u,defaultValue:p,onClick:e=>{e.stopPropagation()},disabled:m,"aria-label":a||"Search options",autoComplete:"off",spellcheck:!1}):e&&t.length>0?(0,r.Y)(h.K1,{children:x}):n&&f&&i?i(n):n&&f?(0,r.Y)(h.K1,{children:n.displayLabel||n.label}):(0,r.Y)(h.K1,{children:a})]})});$.displayName="OurSelectSelection";
7992const k=(0,r.Y)("svg",{height:"12",width:"12",viewBox:"0 0 20 20",focusable:"false",style:{fill:"currentcolor",stroke:"currentcolor",strokeWidth:0},"aria-hidden":"true",children:(0,r.Y)("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"})}),Y=({options:e,value:t,onChange:n,width:u,formatOptionLabel:g,noOptionsMessage:m,loadingMessage:x,loadOptions:v,placeholder:w="Select...",searchPlaceholder:b,prefixLabel:Y,highlight:A=!1,async:C=!1,isMulti:F=!1,elementsFlexBasis:D,elementsFlexBasisMobile:S,isSearchable:I=!1,doubleWidth:z=!1,scale:T,height:E,refForOutsideClick:L,bordered:M=!1,className:N,isDisabled:P=!1,maxMenuHeight:O,menuPlacement:_="auto",lightTheme:R=!1,"data-testid":j})=>{const J=(0,o.li)(null),B=L||J,K=(0,o.li)(null),W=(0,o.li)(null),[U,Q]=(0,o.J0)(!1),[G,H]=(0,o.J0)(-1),q=(0,o.hb)(()=>{P||(Q(!0),H(-1),I&&setTimeout(()=>W.current?.focus(),0))},[P,I]),V=(0,o.hb)(()=>{Q(!1),H(-1)},[]),{input:X,optionsAsync:Z,isLoadingOptions:ee,handleInputChange:te,resetSearch:ne}=((e,t,n,r=[])=>{const[i,a]=(0,o.J0)(""),[d,c]=(0,o.J0)(void 0),[p,h]=(0,o.J0)(!!e),u=(0,o.li)(null),g=(0,o.li)(!1);(0,o.vJ)(()=>{e&&n&&!g.current&&(g.current=!0,h(!0),n("",e=>{c(e),h(!1)}))},[e,n]);const m=(0,o.hb)(o=>{const i=o.currentTarget.value;a(i),u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{if(c(void 0),e&&n)h(!0),n(i,e=>{c(e),h(!1)});else if(t){const e=(e=>{const t=e.toLowerCase().trim();return t?e=>{if(s(e))return!0;const n=(0,l.qW)(e.label,t),r=!!e.value&&(0,l.qW)(e.value.toString(),t);return n||r}:()=>!0})(i);c(r.filter(e))}},300)},[e,n,t,r]);(0,o.vJ)(()=>()=>{u.current&&clearTimeout(u.current)},[]);const f=(0,o.hb)(()=>{a(""),e&&!g.current?c(void 0):e||c(void 0),h(!1)},[e]);return{input:i,setInput:a,optionsAsync:d,setOptionsAsync:c,isLoadingOptions:p,setIsLoadingOptions:h,handleInputChange:m,resetSearch:f}})(C,I,v,e),{shouldShiftLeft:re,leftOffset:oe}=((e,t,n)=>{const[r,i]=(0,o.J0)(0),a=(0,o.li)(null),l=(0,o.Kr)(()=>{if(!e.current||!n||!t)return{shouldShiftLeft:!1,leftOffset:0};const r=e.current.getBoundingClientRect(),o=window.innerWidth,i={containerLeft:r.left,containerWidth:r.width,viewportWidth:o};if(a.current&&a.current.containerLeft===i.containerLeft&&a.current.containerWidth===i.containerWidth&&a.current.viewportWidth===i.viewportWidth)return a.current.result;const l=2*r.width,s=r.left+l,d=s>o-20?{shouldShiftLeft:!0,leftOffset:Math.min(s-(o-20),r.width)}:{shouldShiftLeft:!1,leftOffset:0};return a.current={...i,result:d},d},[e,n,t,r]),s=(0,o.hb)(()=>{n&&t&&(a.current=null,i(e=>e+1))},[n,t]),d=(0,o.Kr)(()=>{if(!n)return()=>{};let e;return()=>{clearTimeout(e),e=setTimeout(s,16)}},[s,n]);return(0,o.vJ)(()=>{if(n&&t)return window.addEventListener("resize",d,{passive:!0}),window.addEventListener("scroll",d,{passive:!0}),()=>{window.removeEventListener("resize",d),window.removeEventListener("scroll",d)}},[n,t,d]),(0,o.vJ)(()=>{t||(i(0),a.current=null)},[t]),(0,o.Kr)(()=>n?l:{shouldShiftLeft:!1,leftOffset:0},[n,l])})(B,U,z),ie=(0,o.Kr)(()=>Z||e,[Z,e]),{pagedOptions:ae,hasmore:le,handleSensor:se}=((e,t)=>{const[n,r]=(0,o.J0)(0),[i,a]=(0,o.J0)(t||e.length>500),l=e.slice(0,500*(n+1)),s=(0,o.hb)(t=>{if(t&&i){const t=n+1;r(t),a(e.length>500*(t+1))}},[i,n,e.length]);return(0,o.vJ)(()=>{r(0),a(t||e.length>500)},[e,t]),{visiblePage:n,pagedOptions:l,hasmore:i,handleSensor:s}})(ie,C),de=(0,o.hb)(e=>{!function(e,t){const{isMulti:n,value:r,isDisabled:o,onChange:i,closeMenu:a,resetSearch:l}=t;if(!o)if(s(e))n&&function(e,t){const{value:n,options:r,onChange:o}=t,i=c(r,e);if(0===i.length)return;const a=Array.isArray(n)?n:[],l=new Set(a.map(e=>String(e.value))),s=i.every(e=>l.has(String(e.value)))?a.filter(e=>!i.some(t=>String(t.value)===String(e.value))):[...a,...i.filter(e=>!l.has(String(e.value)))];try{o(s)}catch(e){console.error("OurSelect: Error toggling group selection:",e)}}(e,t);else if(!d(e))if(""!==e.value)if(n&&Array.isArray(r)&&r.some(t=>t.value===e.value))try{i(r.filter(t=>t.value!==e.value))}catch(e){console.error("OurSelect: Error removing multi-value:",e)}else{n&&""!==e.value||(a(),l());try{n&&Array.isArray(r)?i([...r,e]):i(e)}catch(e){console.error("OurSelect: Error in onChange handler:",e)}}else{a(),l();try{i(n?[]:e)}catch(e){console.error("OurSelect: Error clearing selection:",e)}}}(e,{isMulti:F,value:t,isDisabled:P,options:ie,onChange:n,closeMenu:V,resetSearch:ne})},[F,t,n,P,ie,V,ne]);(0,a.j)(U,B,K,()=>{V(),ne()});const{handleKeyDown:ce}=(({isDisabled:e,showing:t,pagedOptions:n,focusedOptionIndex:r,setFocusedOptionIndex:i,onSelectOption:a,onOpenMenu:l,onCloseMenu:c})=>({handleKeyDown:(0,o.hb)(o=>
7992{if(e)return;const h=n;switch(o.key){case" ":if(o.target instanceof HTMLInputElement)break;if(o.preventDefault(),t){if(r>=0&&h[r]){const e=h[r];s(e)||d(e)||(a(e),i(-1))}}else{l();const e=p(h,0,1);i(e)}break;case"Enter":if(o.preventDefault(),t){if(r>=0&&h[r]){const e=h[r];s(e)||d(e)||(a(e),i(-1))}}else{l();const e=p(h,0,1);i(e)}break;case"ArrowDown":if(o.preventDefault(),t){const e=p(h,r+1,1);-1!==e&&i(e)}else{l();const e=p(h,0,1);i(e)}break;case"ArrowUp":if(o.preventDefault(),t){const e=p(h,r-1,-1);-1!==e&&i(e)}else{l();const e=p(h,h.length-1,-1);i(e)}break;case"Home":if(t){o.preventDefault();const e=p(h,0,1);i(e)}break;case"End":if(t){o.preventDefault();const e=p(h,h.length-1,-1);i(e)}break;case"Tab":t&&(c(),i(-1))}},[e,t,n,r,i,a,l,c])}))({isDisabled:P,showing:U,pagedOptions:ae,focusedOptionIndex:G,setFocusedOptionIndex:H,onSelectOption:de,onOpenMenu:q,onCloseMenu:V}),pe=(0,o.hb)(e=>{if(e&&!P&&F&&Array.isArray(t))try{const r=t.filter(t=>t.value.toString()!==e.toString());n(r)}catch(e){console.error("OurSelect: Error removing multi-value:",e)}},[t,n,F,P]),he=(0,o.Kr)(()=>F&&Array.isArray(t)?t:[],[F,t]),ue=(0,o.Kr)(()=>F||!t||Array.isArray(t)?void 0:t,[F,t]),ge=(0,o.hb)((e,n)=>{let o;if(F&&s(e)){const n=c(ie,e),r=Array.isArray(t)?new Set(t.map(e=>String(e.value))):new Set;o={total:n.length,selected:n.filter(e=>r.has(String(e.value))).length,cards:n.reduce((e,t)=>e+(Number(t.cardsCount)||0),0)}}return(0,r.Y)(y,{option:e,index:n,showing:U,value:t,isMulti:F,elementsFlexBasis:D,elementsFlexBasisMobile:S,focusedOptionIndex:G,groupSelection:o,formatOptionLabel:g,onOptionClick:de},s(e)?`subheading-${e.value}-${n}`:`${e.value}-${n}`)},[U,t,F,ie,D,S,de,g,G]);return(0,r.FD)(h.W_,{$width:u,$showing:U,className:N,"data-testid":j,"data-ourselect-open":U?"true":void 0,children:[(0,r.FD)(h.KA,{ref:B,$width:u,onClick:()=>{U?V():q()},$highlight:A,"data-highlight":A?"true":void 0,$active:U,$scale:T,$bordered:M,role:"combobox","aria-expanded":U,"aria-haspopup":"listbox","aria-disabled":P,tabIndex:P?-1:0,onKeyDown:ce,children:[(0,r.Y)($,{isMulti:F,multiValue:he,handleRemoveMulti:pe,singleValue:ue,showing:U,formatOptionLabel:g,placeholder:w,searchPlaceholder:b,prefixLabel:Y,isSearchable:I,inputRef:W,input:X,handleInputChange:te,value:t,highlight:A,isDisabled:P}),(0,r.Y)(h.l8,{onClick:e=>{e.stopPropagation(),U?V():q()},$isOpen:U,role:"button","aria-label":"Toggle dropdown",tabIndex:-1,children:k})]}),(0,r.Y)(f,{menuRef:K,showing:U,height:O||E,isLoadingOptions:ee,loadingMessage:x,shownOptions:ie,noOptionsMessage:m,input:X,pagedOptions:ae,renderOption:ge,ITEMS_ON_PAGE:500,isAsync:C,OurVisibilitySensor:i.A,handleSensor:se,hasmore:le,doubleWidth:z,menuPlacement:_,focusedOptionIndex:G,twoColumns:"50%"===D,lightTheme:R,...z&&{shouldShiftLeft:re,leftOffset:oe}})]})}},75722(e,t,n){var r=n(63679);r.AH` 7993 display: flex; 7994 align-items: center; 7995 justify-content: center; 7996`,r.AH` 7997 display: flex; 7998 align-items: center; 7999 justify-content: flex-start; 8000`,r.AH` 8001 display: flex; 8002 flex-direction: column; 8003`;const o=r.AH` 8004 transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease; 8005`,i=r.AH` 8006 transition: all 0.2s ease; 8007`,a=r.AH` 8008 &:focus-visible { 8009 outline: 1px solid var(--theme-palette-color-5); 8010 outline-offset: 1px; 8011 } 8012`,l=(r.AH` 8013 @media (prefers-contrast: high) { 8014 border: 1px solid; 8015 border-color: ButtonText; 8016 } 8017`,r.AH` 8018 @media (prefers-reduced-motion: reduce) { 8019 transition: none; 8020 } 8021`);n.d(t,["ND",0,a,"Tg",0,o,"VN",0,l,"WW",0,i])},94551(e,t,n){var r=n(63679),o=n(75722),i=n(91997);const a=r.Ay.div.attrs(e=>({style:{display:e.$showing?"flex":"none",maxHeight:e.$height?`${e.$height}`:"300px",width:e.$doubleWidth?"200%":"100%",left:e.$shouldShiftLeft?`-${e.$leftOffset||0}px`:"0",top:e.$placeUp?"auto":"100%",bottom:e.$placeUp?"100%":"auto",marginTop:e.$placeUp?"0":"3px",marginBottom:e.$placeUp?"3px":"0"}}))` 8022 position: absolute; 8023 top: 100%; 8024 left: 0; 8025 box-sizing: border-box; /* Ensure padding and border don't add to width */ 8026 min-width: 200px; /* Minimum width to ensure dropdown content fits */ 8027 /* The options query THIS box, not the viewport: a 50%-basis column layout 8028 inside a 280px menu (doubleWidth of a 140px trigger on a folding phone's 8029 ~840px inner screen) is two 130px columns that break set names one 8030 character per line. See MenuOption's @container arm. */ 8031 container-type: inline-size; 8032 8033 /* Always use flexbox for the container */ 8034 flex-direction: row; 8035 flex-wrap: wrap; 8036 gap: 5px; 8037 align-items: flex-start; 8038 align-content: flex-start; 8039 justify-content: flex-start; 8040 color: var(--theme-palette-color-3); 8041 user-select: none; 8042 z-index: 9999999; 8043 background-color: ${e=>e.$lightTheme?"rgba(255, 255, 255, 0.9)":"rgba(0, 0, 0, 0.5)"}; 8044 border: 1px solid var(--theme-palette-color-5); 8045 border-radius: 6px; 8046 padding: 4px; 8047 font-size: 0.95em; 8048 overflow-x: hidden; 8049 overflow-y: auto; 8050 box-shadow: 8051 0 8px 16px rgba(0, 0, 0, 0.15), 8052 0 4px 6px rgba(0, 0, 0, 0.1); 8053 backdrop-filter: blur(8px); 8054 transform: translateZ(0); 8055 will-change: transform, opacity; 8056 8057 ${i.Q} 8058 8059 /* Smooth scrolling */ 8060 scroll-behavior: smooth; 8061 8062 @media only screen and (max-width: 700px) { 8063 width: 95% !important; 8064 left: 2.5% !important; 8065 max-height: 50vh; 8066 border-radius: 12px; 8067 padding: 12px; 8068 /* Phones get a plain opaque panel: no blur, no forced compositing layer. 8069 Since the phone Filters sheets (2026-08-22) these menus open inside a 8070 fixed, touch-scrolling SheetBody, and there WebKit never painted the blur 8071 â the /decks "Deck includes cards" menu (500 rows, ~24000px) went 8072 see-through over Format/Sort, and an iPhone user reported the page 8073 crashing on tapping it (marvelsnap.gg feedback, 2026-09-13). A blurred, 8074 will-change'd layer that tall is the classic iOS tab-kill; nothing 8075 reached cgfw_errors, which is what a killed tab looks like. */ 8076 background-color: ${e=>e.$lightTheme?"rgb(255, 255, 255)":"var(--theme-palette-color-8)"}; 8077 backdrop-filter: none; 8078 transform: none; 8079 will-change: auto; 8080 } 8081 8082 /* High contrast mode support */ 8083 @media (prefers-contrast: high) { 8084 border-width: 2px; 8085 box-shadow: none; 8086 } 8087 8088 /* Reduced motion support */ 8089 ${o.VN} 8090`,l=r.Ay.div` 8091 position: relative; 8092 width: ${e=>e.$width?e.$width:"100%"}; 8093 min-width: 0; /* Critical: allows proper shrinking in flex containers */ 8094 flex: 1; /* Allow it to take available space in flex parent */ 8095 8096 /* Ensure proper stacking context */ 8097 isolation: isolate; 8098 8099 /* Higher z-index when dropdown is showing to ensure it appears above other 8100 selects. The isolate above traps the menu's own z-index (9999999) inside 8101 THIS box, so the open menu competes with the rest of the page at the number 8102 below and nothing higher inside it can help. At 1000 it lost to the 8103 deckbuilder's tag selector (InteractiveTagSelectorStyles, 10000) and the 8104 card list's sticky header (CardsList.styles, 10000), which painted their 8105 pills and rows through the open Tags filter (Discord, 2026-09-10). 20000 8106 clears both and stays far under PromptWnd's modal overlay at 90000, so an 8107 open dropdown still never covers a modal. 8108 8109 This number only orders the wrapper against its SIBLINGS. Where an ancestor 8110 opens its own stacking context it is spent inside that box and cannot lift the 8111 menu over anything outside it â the ancestor has to rise instead, keyed on the 8112 data-ourselect-open marker ourselect.tsx sets. cardPickerStyles' sticky 8113 PickerOverallWrapper is the case that proved it. */ 8114 z-index: ${e=>e.$showing?2e4:"auto"}; 8115`,s=r.Ay.div` 8116 display: flex; 8117 gap: 12px; 8118 width: 100%; 8119 8120 @container (max-width: 360px) { 8121 flex-direction: column; 8122 gap: 0; 8123 } 8124`,d=r.Ay.div` 8125 flex: 1; 8126`;n.d(t,["Fv",0,s,"Gz",0,a,"W_",0,l,"fW",0,d])},79822(e,t,n){n.d(t,{P7:()=>h,VT:()=>d,l8:()=>v,fW:()=>i.fW,BB:()=>c,Hg:()=>l,Gz:()=>i.Gz,Sr:()=>p,af:()=>s,LZ:()=>m,DO:()=>g,KA:()=>u,g5:()=>f,W_:()=>i.W_,K1:()=>x,Fv:()=>i.Fv});var r=n(91997),o=n(75722),i=n(94551),a=n(63679);const l=a.Ay.span` 8127 flex: 1; 8128 min-width: 0; 8129 display: flex; 8130 align-items: center; 8131 gap: 4px; 8132 font-size: 0.95em; 8133`,s=a.Ay.span` 8134 font-size: 0.75em; 8135 font-weight: 500; 8136 padding: 1px 5px; 8137 border-radius: 8px; 8138 background-color: ${e=>e.$disabled?"transparent":"var(--theme-palette-color-6)"}; 8139 color: var(--theme-palette-color-3); 8140 margin-left: 6px; 8141 flex-shrink: 0; 8142 min-width: 18px; 8143 text-align: center; 8144 font-variant-numeric: tabular-nums; 8145 opacity: ${e=>e.$disabled?.6:.8}; 8146`,d=a.Ay.span` 8147 display: inline-flex; 8148 align-items: center; 8149 justify-content: center; 8150 width: 16px; 8151 height: 16px; 8152 margin-left: 8px; 8153 flex-shrink: 0; 8154`,c=a.Ay.div` 8155 background-color: ${e=>e.$active?"var(--theme-palette-color-5)":"transparent"}; 8156 color: ${e=>e.$active?"var(--theme-palette-color-4)":"var(--theme-palette-color-3)"}; 8157 cursor: ${e=>e.$disabled?"not-allowed":"pointer"}; 8158 opacity: ${e=>e.$disabled?.45:1}; 8159 display: flex; 8160 flex-wrap: wrap; 8161 ${e=>e.$centered?"justify-content: center;":""}; 8162 align-items: center; 8163 user-select: none; 8164 8165 /* Focused state - subtle border instead of background */ 8166 border: 1px solid ${e=>e.$focused?"var(--theme-palette-color-5)":"transparent"}; 8167 /* Adjust padding to maintain consistent size with/without border */ 8168 padding: ${e=>e.$focused?"2px 4px":"3px 5px"}; 8169 8170 /* Conditional styling based on layout type */ 8171 ${e=>e.$twoColumns?"\n /* Two Column Wrapper layout: Let wrapper handle sizing */\n width: 100%;
8171\n ":`\n /* Flexbox layout: Use flex-basis for column control */\n flex-basis: ${e.$elementsFlexBasis?"50%"===e.$elementsFlexBasis?"calc(50% - 2.5px)":e.$elementsFlexBasis:"100%"};\n flex-grow: 0;\n flex-shrink: 1; // Allow shrinking to fit with gap\n `} 8172 8173 overflow: hidden; 8174 word-break: break-word; 8175 line-height: 1.15em; 8176 gap: 4px; 8177 border-radius: 4px; 8178 ${o.Tg} 8179 position: relative; 8180 box-sizing: border-box; 8181 8182 &:hover { 8183 ${e=>!e.$disabled&&"\n background-color: var(--theme-palette-color-5);\n color: var(--theme-palette-color-4);\n box-shadow: 0 0 0 1px var(--theme-palette-color-1, #fff2);\n "} 8184 } 8185 8186 ${o.ND} 8187 8188 @media only screen and (max-width: 700px) { 8189 flex-basis: ${e=>e.$elementsFlexBasisMobile?e.$elementsFlexBasisMobile:"100%"}; 8190 padding: ${e=>e.$focused?"9px":"10px"}; 8191 } 8192 8193 /* Two columns need ~360px to hold a set name, its count and a checkbox 8194 each. Narrower than that the menu is a single column, whatever the game 8195 asked for: BloodyPolarBear's fold-phone screenshot (2026-08-27) had the 8196 One Piece Set menu at ~280px reading "Piec / e / Her / oine / s". */ 8197 @container (max-width: 360px) { 8198 flex-basis: 100%; 8199 } 8200 8201 /* Improved touch targets for mobile */ 8202 @media (hover: none) and (pointer: coarse) { 8203 min-height: 40px; 8204 padding: ${e=>e.$focused?"9px":"10px"}; 8205 } 8206`,p=a.Ay.div` 8207 /* Conditional styling based on layout type */ 8208 ${e=>e.$twoColumns?"\n /* CSS Columns layout: Full width, prevent column breaks */\n width: 100%;\n break-inside: avoid;\n page-break-inside: avoid;\n margin-bottom: 2px;\n ":`\n /* Flexbox layout: Use flex-basis for column control */\n flex-basis: ${e.$elementsFlexBasis?"50%"===e.$elementsFlexBasis?"calc(50% - 3px)":e.$elementsFlexBasis:"100%"};\n `} 8209 8210 /* Visual styling for sub-headings */ 8211 color: var(--theme-palette-color-2); 8212 font-weight: 600; 8213 font-size: 0.8em; 8214 text-transform: uppercase; 8215 letter-spacing: 0.025em; 8216 /* Transparent border + border-box so the label, count badge and checkbox sit on 8217 the same horizontal rails as MenuOption's (which reserves 1px for focus). */ 8218 box-sizing: border-box; 8219 border: 1px solid transparent; 8220 padding: 5px 5px 2px 5px; 8221 margin-top: 3px; 8222 margin-bottom: 2px; 8223 8224 /* Non-interactive unless it acts as a group toggle */ 8225 user-select: none; 8226 ${e=>e.$clickable?"\n cursor: pointer;\n justify-content: space-between;\n gap: 8px;\n\n &:hover {\n color: var(--theme-palette-color-1);\n background: var(--theme-palette-color-7);\n }\n ":"\n cursor: default;\n pointer-events: none;\n "} 8227 8228 /* Visual separator */ 8229 border-bottom: 1px solid var(--theme-palette-color-6); 8230 8231 /* Ensure proper spacing and layout */ 8232 display: flex; 8233 align-items: center; 8234 justify-content: flex-start; 8235 flex-grow: 0; 8236 flex-shrink: 1; 8237 overflow: hidden; 8238 word-break: break-word; 8239 line-height: 1.2em; 8240 box-sizing: border-box; 8241 8242 /* First sub-heading doesn't need top margin */ 8243 &:first-child { 8244 margin-top: 0; 8245 } 8246 8247 /* Mobile responsive */ 8248 @media only screen and (max-width: 700px) { 8249 flex-basis: ${e=>e.$elementsFlexBasisMobile?e.$elementsFlexBasisMobile:"100%"}; 8250 padding: 12px 12px 8px 12px; 8251 font-size: 0.8em; 8252 } 8253 8254 /* Improved touch targets for mobile */ 8255 @media (hover: none) and (pointer: coarse) { 8256 padding: 12px; 8257 } 8258`,h=a.Ay.div` 8259 height: 20px; 8260 flex-basis: 100%; 8261 pointer-events: none; 8262`,u=a.Ay.div` 8263 cursor: ${e=>e.disabled?"not-allowed":"pointer"}; 8264 user-select: none; 8265 background-color: ${e=>e.disabled?"var(--theme-palette-color-8)":e.$highlight?"#384759":"var(--theme-palette-color-7)"}; 8266 display: flex; 8267 flex-wrap: nowrap; 8268 justify-content: space-between; 8269 min-height: 28px; 8270 overflow: hidden; 8271 width: ${e=>e.$width?e.$width:"100%"}; 8272 max-width: 100%; /* Prevent stretching beyond parent */ 8273 scale: ${e=>e.$scale?e.$scale:"none"}; 8274 transform-origin: left; 8275 border-radius: 6px; 8276 border: 1px solid 8277 ${e=>e.$bordered?"var(--theme-palette-color-5)":"transparent"}; 8278 font-size: 13px; 8279 transition: 8280 border-color 150ms ease, 8281 box-shadow 150ms ease, 8282 background-color 150ms ease; 8283 opacity: ${e=>e.disabled?.6:1}; 8284 8285 /* Use box-shadow for active (open) state to avoid content shifts â accent ring */ 8286 box-shadow: ${e=>e.disabled?"none":e.$active?"0 0 0 1px var(--theme-palette-color-1)":"0 0 0 1px transparent"}; 8287 8288 &:hover { 8289 border-color: ${e=>e.disabled?"transparent":"var(--theme-palette-color-5)"}; 8290 box-shadow: ${e=>e.disabled?"none":e.$active?"0 0 0 1px var(--theme-palette-color-1)":"0 0 0 1px var(--theme-palette-color-5)"}; 8291 } 8292 8293 &:focus-visible { 8294 outline: 1px solid var(--theme-palette-color-5); 8295 outline-offset: 2px; 8296 } 8297 8298 /* High contrast mode support */ 8299 @media (prefers-contrast: high) { 8300 border: 1px solid; 8301 border-color: ${e=>e.disabled?"GrayText":"ButtonText"}; 8302 } 8303 8304 /* Reduced motion support */ 8305 @media (prefers-reduced-motion: reduce) { 8306 transition: none; 8307 } 8308`,g=a.Ay.input` 8309 flex: 1; 8310 width: auto !important; 8311 min-width: 40px !important; 8312 color: var(--theme-palette-color-3) !important; 8313 border: none !important; 8314 background: none !important; 8315 font-family: inherit !important; 8316 font-size: 13px !important; 8317 font-weight: inherit; 8318 line-height: 28px; 8319 height: 28px !important; 8320 min-height: 0 !important; 8321 padding: 0 !important; 8322 margin: 0; 8323 8324 &:focus, 8325 &:focus-visible { 8326 outline: none; 8327 border: none; 8328 box-shadow: none; 8329 } 8330 8331 &:disabled { 8332 opacity: 0.6;
8333 cursor: not-allowed; 8334 } 8335 8336 &::placeholder { 8337 color: var(--theme-palette-color-3); 8338 opacity: 1; 8339 } 8340`,m=a.Ay.span` 8341 display: inline-flex; 8342 align-items: center; 8343 flex: 0 0 auto; 8344 color: var(--theme-palette-color-3); 8345 opacity: 0.7; 8346 pointer-events: none; 8347`,f=(a.Ay.div` 8348 display: flex; 8349 flex: 1; 8350 flex-wrap: wrap; 8351 align-items: center; 8352 padding: 2px 6px; 8353 gap: 3px; 8354 min-height: 24px; 8355 min-width: 0; /* Allows container to shrink properly */ 8356 overflow: hidden; 8357 8358 ${r.Q} 8359`,a.Ay.div` 8360 color: ${e=>e.$highlight?"var(--theme-palette-color-4)":"var(--theme-palette-color-3)"}; 8361 display: flex; 8362 align-content: center; 8363 align-items: center; 8364 justify-content: flex-start; 8365 padding-left: 8px; 8366 padding-right: 6px; 8367 height: 28px; 8368 line-height: 1.2em; 8369 flex: 1; 8370 min-width: 0; /* Critical: allows flex children to shrink below content size */ 8371 gap: 5px; 8372 /* Single line always â multi selections render as an "N selected" summary, 8373 and wrapping would grow the trigger height (jumpy open state). */ 8374 flex-wrap: nowrap; 8375 cursor: pointer; 8376 overflow: hidden; 8377`),x=a.Ay.div` 8378 white-space: nowrap; 8379 line-height: 28px; 8380 text-overflow: ellipsis; 8381 overflow: hidden; 8382 flex: 1; 8383 min-width: 0; /* Critical: allows text to be truncated properly */ 8384`,v=(a.Ay.div` 8385 display: flex; 8386 justify-content: flex-start; 8387 flex-wrap: nowrap; 8388 flex-direction: row; 8389 align-content: center; 8390 align-items: center; 8391 font-size: 0.75em; 8392 max-width: 120px; 8393 min-width: 60px; 8394 padding: 4px 6px; 8395 margin: 2px; 8396 height: auto; 8397 min-height: 24px; 8398 overflow: hidden; 8399 color: var(--theme-palette-color-2); 8400 background-color: var(--theme-palette-color-5); 8401 border: 1px solid var(--theme-palette-color-6); 8402 border-radius: 6px; 8403 cursor: ${e=>e.disabled?"default":"pointer"}; 8404 opacity: ${e=>e.disabled?.6:1}; 8405 ${o.WW} 8406 gap: 4px; 8407 box-sizing: border-box; 8408 8409 /* Better text handling */ 8410 line-height: 1.2; 8411 white-space: nowrap; 8412 text-overflow: ellipsis; 8413 8414 > div { 8415 height: auto; 8416 font-size: inherit; 8417 line-height: inherit; 8418 overflow: hidden; 8419 text-overflow: ellipsis; 8420 } 8421 8422 &:hover { 8423 background-color: ${e=>e.disabled?"var(--theme-palette-color-5)":"var(--theme-palette-color-6)"}; 8424 color: ${e=>e.disabled?"var(--theme-palette-color-2)":"var(--theme-palette-color-1)"}; 8425 transform: ${e=>e.disabled?"none":"translateY(-1px)"}; 8426 box-shadow: ${e=>e.disabled?"none":"0 1px 4px rgba(0, 0, 0, 0.1)"}; 8427 } 8428 8429 &:focus-visible { 8430 ${o.ND} 8431 } 8432 8433 svg { 8434 margin-left: 2px; 8435 flex-shrink: 0; 8436 transition: all 0.2s ease; 8437 opacity: 0.7; 8438 8439 &:hover { 8440 opacity: 1; 8441 } 8442 } 8443`,a.Ay.div` 8444 display: flex; 8445 align-items: center; 8446 cursor: pointer; 8447 padding: 2px; 8448 border-radius: 2px; 8449 8450 &:hover { 8451 background-color: rgba(255, 255, 255, 0.1); 8452 } 8453`,a.Ay.div` 8454 cursor: ${e=>e.disabled?"not-allowed":"pointer"}; 8455 height: 28px; 8456 color: ${e=>e.disabled?"var(--theme-palette-color-5)":"rgb(204, 204, 204)"}; 8457 ${o.WW} 8458 padding: 1px 8px 1px 3px; 8459 display: flex; 8460 align-items: center; 8461 opacity: ${e=>e.disabled?.5:1}; 8462 8463 &:hover { 8464 color: ${e=>e.disabled?"var(--theme-palette-color-5)":"var(--theme-palette-color-4)"}; 8465 } 8466 8467 &:focus-visible { 8468 ${o.ND} 8469 border-radius: 3px; 8470 } 8471 8472 svg { 8473 ${o.WW} 8474 transform: ${e=>e.$isOpen?"rotate(180deg)":"rotate(0deg)"} 8475 } 8476`)},91997(e,t,n){const r=n(63679).AH` 8477 /* Custom scrollbar for webkit browsers */ 8478 &::-webkit-scrollbar {
8479 width: 6px; 8480 } 8481 8482 &::-webkit-scrollbar-track { 8483 background: rgba(0, 0, 0, 0.1); 8484 border-radius: 3px; 8485 } 8486 8487 &::-webkit-scrollbar-thumb { 8488 background: var(--theme-palette-color-1); 8489 border-radius: 3px; 8490 transition: background-color 0.2s ease; 8491 } 8492 8493 &::-webkit-scrollbar-thumb:hover { 8494 background: var(--theme-palette-color-3); 8495 } 8496 8497 /* Firefox scrollbar */ 8498 scrollbar-width: thin; 8499 scrollbar-color: var(--theme-palette-color-1) rgba(0, 0, 0, 0.1); 8500`;n.d(t,["Q",0,r])},2992(e,t,n){var r=n(10201),o=n(17402),i=n(63679),a=n(91111);const l=i.Ay.div.attrs(e=>({style:{top:`${e.$top}px`,left:`${e.$left}px`}}))` 8501 position: absolute; 8502 z-index: 1000000; 8503`;n.d(t,["C",0,({children:e,content:t,place:n,mobileDisable:i})=>{const[s,d]=(0,o.J0)(!1),[c,p]=(0,o.J0)({top:0,left:0}),h=(0,o.li)(null),u=(0,o.li)(null),g=()=>{d(!1)};(0,o.vJ)(()=>(document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g)}),[]);const m=o.Ay.cloneElement(e,{onMouseEnter:()=>{if(!h.current)return;if(i&&window.innerWidth<=1e3)return;const e=h.current.getBoundingClientRect();window.innerWidth<=500?p({top:e.top+window.scrollY+60,left:0}):"right"===n?p({top:e.top+window.scrollY+30,left:e.left+e.width+10}):"bottom"===n&&p({top:e.top+window.scrollY+e.height+30,left:e.left+10}),d(!0)},onMouseLeave:()=>d(!1),ref:h});return(0,r.FD)(r.FK,{children:[m,s&&(0,r.Y)(a.f,{children:(0,r.Y)(l,{$top:c.top,$left:c.left,ref:u,children:t})})]})}])},51900(e,t,n){var r=n(10201),o=n(17402),i=n(63679),a=n(70213),l=n(12998),s=n(91111),d=n(28297),c=n(53794);const p=i.i7`from { opacity: 0; } to { opacity: 1; }`,h=i.i7`from { opacity: 0; transform: translateY(10px) scale(0.99); } to { opacity: 1; transform: none; }`,u=i.Ay.div` 8504 position: fixed; 8505 inset: 0; 8506 z-index: 90000; 8507 overflow-y: auto; 8508 display: flex; 8509 align-items: flex-start; 8510 justify-content: center; 8511 padding: 56px 28px calc(90px + var(--dotgg-bottom-obstruction, 0px)); 8512 background: rgba(0, 0, 0, 0.62); 8513 animation: ${p} 150ms ease-out; 8514 @media only screen and ${d.E0} { 8515 padding: 0; 8516 overflow: hidden; 8517 ${e=>e.$sheet?"align-items: flex-end;":""} 8518 } 8519 @media (prefers-reduced-motion: reduce) { 8520 animation: none; 8521 } 8522`,g=i.Ay.div` 8523 width: min(${e=>e.$width}px, 100%); 8524 display: flex; 8525 flex-direction: column; 8526 position: relative; 8527 text-align: left; 8528 background: var(--theme-palette-color-8); 8529 border: 1px solid var(--theme-palette-color-5); 8530 border-radius: 12px; 8531 box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3); 8532 outline: none; /* it takes focus itself on open (7a); it is not a control */ 8533 animation: ${h} 150ms ease-out; 8534 @media (prefers-reduced-motion: reduce) { 8535 animation: none; 8536 } 8537 @media only screen and ${d.E0} { 8538 /* 100% of the fixed overlay = the VISIBLE viewport on iOS (unlike 100vh). */ 8539 width: 100%; 8540 height: calc(100% - var(--dotgg-bottom-obstruction, 0px)); 8541 border-radius: 0; 8542 border: none; 8543 ${e=>e.$sheet?`\n height: 62%;\n margin-bottom: var(--dotgg-bottom-obstruction, 0px);\n border-top: 1px solid var(--theme-palette-color-5);\n border-radius: 12px 12px 0 0;\n /* Landscape (round 5, 5b): 62% of 375 is a search field and nothing\n else, so the sheet takes the whole height the ad leaves. */\n @media only screen and ${d.MZ} {\n height: calc(100% - var(--dotgg-bottom-obstruction, 0px));\n border-radius: 0;\n }\n `:""} 8544 /* iOS Safari auto-zooms the page when a focused field is under 16px, and 8545 the zoom outlives the keyboard â the fixed overlay then overflows the 8546 visual viewport. 16px on phones keeps it from ever zooming. Includes 8547 contenteditable: QuantityCounter's value is a div, not an input. */ 8548 input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), textarea, select, [contenteditable] { 8549 font-size: 16px; 8550 } 8551 } 8552`,m=i.Ay.header` 8553 flex: none; 8554 display: flex; 8555 align-items: flex-start; 8556 justify-content: space-between; 8557 gap: 16px; 8558 padding: 16px 20px 14px; 8559 border-bottom: 1px solid var(--theme-palette-color-5); 8560`,f=i.Ay.div` 8561 display: flex; 8562 align-items: center; 8563 gap: 12px; 8564 min-width: 0; 8565 h2 { 8566 margin: 0; 8567 font-size: 18px; 8568 font-weight: 700; 8569 color: var(--theme-palette-color-4); 8570 line-height: 1.2; 8571 } 8572 p { 8573 margin: 2px 0 0; 8574 font-size: 12.5px; 8575 color: var(--theme-palette-color-3); 8576 } 8577`,x=i.Ay.span` 8578 display: inline-flex; 8579 align-items: center; 8580 justify-content: center; 8581 width: 34px; 8582 height: 34px; 8583 flex-shrink: 0; 8584 border-radius: 6px; 8585 background: color-mix(in srgb, var(--theme-palette-color-1) 14%, transparent); 8586 border: 1px solid color-mix(in srgb, var(--theme-palette-color-1) 32%, transparent); 8587 color: var(--theme-palette-color-1); 8588 svg { 8589 display: block; 8590 } 8591`,v=i.Ay.button` 8592 display: inline-flex; 8593 align-items: center; 8594 justify-content: center; 8595 width: 34px; 8596 height: 34px; 8597 flex-shrink: 0; 8598 border: 1px solid transparent; 8599 border-radius: 6px; 8600 background: none; 8601 color: var(--theme-palette-color-3); 8602 cursor: pointer; 8603 transition: all 150ms ease; 8604 &:hover { 8605 color: var(--theme-palette-color-4); 8606 background: rgba(255, 255, 255, 0.06); 8607 border-color: var(--theme-palette-color-5); 8608 } 8609 /* 44px hit target on phones; the negative margin keeps the header box put. */ 8610 @media only screen and ${d.E0} { 8611 width: 44px; 8612 height: 44px; 8613 margin: -5px -5px 0 0; 8614 } 8615`,y=i.Ay.div` 8616 flex: 1 1 auto; 8617 min-height: 0; 8618 padding: 18px 20px; 8619 @media only screen and ${d.E0} { 8620 padding: 16px; 8621 overflow-y: auto; 8622 -webkit-overflow-scrolling: touch; 8623 overscroll-behavior: contain; 8624 } 8625`,w=i.Ay.div` 8626 font-size: 12px; 8627 color: var(--theme-palette-color-3); 8628 line-height: 1.35; 8629 max-width: 60%; 8630 b { 8631 color: var(--theme-palette-color-4); 8632 font-weight: 600; 8633 } 8634 code { 8635 font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; 8636 font-size: 11px; 8637 color: var(--theme-palette-color-4); 8638 background: var(--theme-palette-color-8); 8639 border: 1px solid var(--theme-palette-color-5); 8640 border-radius: 3px; 8641 padding: 1px 5px; 8642 } 8643 @media only screen and ${d.E0} { 8644 max-width: 100%; 8645 } 8646`,b=i.Ay.div` 8647 display: flex; 8648 gap: 8px; 8649 align-items: flex-start; 8650 margin-top: 14px; 8651 padding: 10px 12px; 8652 border-radius: 6px; 8653 background: var(--theme-palette-color-7); 8654 border: 1px solid var(--theme-palette-color-5); 8655 ${w} { 8656 font-size: 12.5px; 8657 max-width: 100%; 8658 } 8659`,$=i.Ay.span` 8660 display: inline-flex; 8661 align-items: center; 8662 justify-content: center; 8663 flex: none; 8664 width: 16px; 8665 height: 16px;
8666 margin-top: 1px; 8667 color: var(--theme-palette-color-3); 8668 svg { 8669 display: block; 8670 } 8671`,k=i.Ay.div` 8672 display: flex; 8673 align-items: center; 8674 justify-content: flex-end; 8675 flex-wrap: wrap; 8676 gap: 8px; 8677 margin-left: auto; 8678 max-width: 100%; 8679`,Y=i.Ay.div` 8680 flex: 1; 8681 display: flex; 8682 align-items: center; 8683 gap: 8px; 8684 justify-content: ${e=>e.$center?"center":e.$end?"flex-end":"flex-start"}; 8685 ${e=>e.$center?"flex: 0 0 auto;":""} 8686`,A=i.AH` 8687 ${k}, 8688 ${Y} { 8689 width: 100%; 8690 flex: none; 8691 margin-left: 0; 8692 display: flex; 8693 flex-wrap: wrap; 8694 justify-content: stretch; 8695 gap: 8px; 8696 &:empty { 8697 display: none; 8698 } 8699 } 8700 ${d.IX} { 8701 flex: 1 1 40%; 8702 height: 44px; 8703 justify-content: center; 8704 font-size: 13.5px; 8705 } 8706 ${d.pp}, 8707 ${d.cz} { 8708 flex: 1 1 100%; 8709 height: 48px; 8710 gap: 8px; 8711 font-size: 15px; 8712 order: 2; 8713 } 8714`,C=i.Ay.footer` 8715 flex: none; 8716 display: flex; 8717 align-items: center; 8718 justify-content: space-between; 8719 gap: 12px; 8720 flex-wrap: wrap; 8721 padding: 12px 20px; 8722 border-top: 1px solid var(--theme-palette-color-5); 8723 background: var(--theme-palette-color-7); 8724 border-radius: 0 0 12px 12px; 8725 @media only screen and ${d.E0} { 8726 border-radius: 0; 8727 flex-direction: column; 8728 align-items: stretch; 8729 gap: 8px; 8730 padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); 8731 ${A} 8732 } 8733`;n.d(t,["$A",0,w,"qp",0,({header:e,headerIcon:t,subtitle:n,show:i,width:p,onClose:h,promptbuttons:k=[],footer:A,footHint:F,footerCenter:D,dontHideOnBgClick:S,phoneSheet:I,sheetTop:z,children:T})=>{const E=(0,o.li)(null);(0,l.r)(i,()=>h("cancel"),E);const L=(0,c.WS)();if(!i)return null;const M=p||(window.innerWidth<1e3?Math.floor(.8*window.innerWidth):1e3),N=!!F&&!L,P=!!A||!!D||k.length>0||N;return(0,r.Y)(s.f,{children:(0,r.Y)(u,{className:"promptwndwrapper",$sheet:I,onMouseDown:e=>{e.target!==e.currentTarget||S||h("cancel")},children:(0,r.FD)(g,{ref:E,role:"dialog","aria-modal":"true","aria-label":"string"==typeof e?e:void 0,tabIndex:-1,$width:M,$sheet:I,children:[I&&L&&z,(0,r.FD)(m,{children:[(0,r.FD)(f,{children:[t&&(0,r.Y)(x,{children:t}),(0,r.FD)("div",{children:[(0,r.Y)("h2",{children:e}),n&&(0,r.Y)("p",{children:n})]})]}),(0,r.Y)(v,{type:"button",title:"Close","aria-label":"Close",onClick:e=>{e.stopPropagation(),h("cancel")},children:(0,r.Y)(a.MR,{size:18})})]}),(0,r.FD)(y,{children:[T,L&&F&&(0,r.FD)(b,{children:[(0,r.Y)($,{"aria-hidden":"true",children:(0,r.Y)(a.g6,{size:14})}),(0,r.Y)(w,{children:F})]})]}),P&&(0,r.FD)(C,{children:[N&&(0,r.Y)(w,{children:F}),A??(0,r.FD)(r.FK,{children:[D&&(0,r.Y)(Y,{"aria-hidden":"true"}),D&&(0,r.Y)(Y,{$center:!0,children:D}),(0,r.Y)(Y,{$end:!0,children:k.map(e=>{const t="outline"===e.variant?d.IX:d.pp;return(0,r.FD)(t,{onClick:()=>h(e.id),children:[e.icon,(0,r.Y)("span",{children:e.label})]},e.id)})})]})]})]})})})},"tA",0,k])},60001(e,t,n){var r=n(10201),o=(n(17402),n(63679)),i=n(51718),a=n(98973);const l=(0,r.FD)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,r.Y)("line",{x1:"4",y1:"21",x2:"4",y2:"14"}),(0,r.Y)("line",{x1:"4",y1:"10",x2:"4",y2:"3"}),(0,r.Y)("line",{x1:"12",y1:"21",x2:"12",y2:"12"}),(0,r.Y)("line",{x1:"12",y1:"8",x2:"12",y2:"3"}),(0,r.Y)("line",{x1:"20",y1:"21",x2:"20",y2:"16"}),(0,r.Y)("line",{x1:"20",y1:"12",x2:"20",y2:"3"}),(0,r.Y)("line",{x1:"1",y1:"14",x2:"7",y2:"14"}),(0,r.Y)("line",{x1:"9",y1:"8",x2:"15",y2:"8"}),(0,r.Y)("line",{x1:"17",y1:"16",x2:"23",y2:"16"})]}),s=o.Ay.div` 8734 font-size: 10.5px; 8735 font-weight: 600; 8736 text-transform: uppercase; 8737 letter-spacing: 0.025em; 8738 color: var(--theme-palette-color-3); 8739 padding: 2px 0 8px; 8740`,d=o.Ay.div` 8741 display: flex; 8742 flex-direction: column; 8743 gap: 6px; 8744 padding: 9px 0; 8745 border-top: 1px solid var(--theme-palette-color-5); 8746`,c=o.Ay.div` 8747 display: flex; 8748 align-items: center; 8749 justify-content: space-between; 8750 gap: 12px; 8751`,p=o.Ay.span` 8752 display: inline-flex; 8753 align-items: center; 8754 gap: 6px; 8755 font-size: 12.5px; 8756 font-weight: 600; 8757 color: var(--theme-palette-color-4); 8758`,h=o.Ay.span` 8759 min-width: 18px; 8760 text-align: center; 8761 font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; 8762 font-size: 12.5px; 8763 font-weight: 700; 8764 color: var(--theme-palette-color-1); 8765`,u=o.Ay.span` 8766 font-size: 11px; 8767 color: var(--theme-palette-color-3); 8768`,g=o.Ay.input` 8769 width: 100%; 8770 accent-color: var(--theme-palette-color-1); 8771 cursor: pointer; 8772`,m=o.Ay.button` 8773 all: unset; 8774 cursor: pointer; 8775 font-size: 11px; 8776 font-weight: 600; 8777 color: var(--theme-palette-color-4); 8778 padding: 1px 6px; 8779 border-radius: 4px; 8780 border: 1px solid var(--theme-palette-color-5); 8781 &:hover { 8782 color: var(--theme-palette-color-1); 8783 } 8784`,f=o.Ay.div` 8785 position: relative; 8786 flex-shrink: 0; 8787`,x=(0,o.Ay)(a.up)` 8788 padding: 10px 12px; 8789`,v=o.Ay.div` 8790 padding: 4px 16px 12px; 8791 > *:first-child { 8792 border-top: none; 8793 } 8794`,y=o.Ay.button` 8795 position: relative; 8796 width: 38px; 8797 height: 20px; 8798 flex-shrink: 0; 8799 border: none; 8800 border-radius: 50px; 8801 padding: 0; 8802 cursor: pointer; 8803 background: ${e=>e.$on?"var(--theme-palette-color-1)":"var(--theme-palette-color-5)"}; 8804 transition: background 150ms ease; 8805`,w=o.Ay.span` 8806 position: absolute; 8807 top: 2px; 8808 left: ${e=>
8808e.$on?"20px":"2px"}; 8809 width: 16px; 8810 height: 16px; 8811 border-radius: 50%; 8812 background: #fff; 8813 transition: left 150ms ease; 8814`;n.d(t,["$Z",0,v,"IE",0,m,"Jy",0,({title:e,minWidth:t,children:n})=>{const{open:o,setOpen:d,ref:c}=(0,i.G)();return(0,r.FD)(f,{ref:c,children:[(0,r.Y)(a.fl,{$open:o,onClick:()=>d(e=>!e),title:e,"aria-label":e,children:l}),o&&(0,r.FD)(x,{$minWidth:t,children:[(0,r.Y)(s,{children:e}),n]})]})},"Qf",0,l,"T_",0,({label:e,hint:t,icon:n,on:o,onToggle:i})=>(0,r.FD)(d,{children:[(0,r.FD)(c,{children:[(0,r.FD)(p,{children:[n,e]}),(0,r.Y)(y,{type:"button",role:"switch","aria-checked":o,$on:o,onClick:()=>i(!o),children:(0,r.Y)(w,{$on:o})})]}),t&&(0,r.Y)(u,{children:t})]}),"eO",0,s,"mA",0,({label:e,value:t,valueLabel:n,min:o,max:i,onChange:a,hint:l,aside:s})=>(0,r.FD)(d,{children:[(0,r.FD)(c,{children:[(0,r.Y)(p,{children:e}),(0,r.FD)(c,{children:[s,(0,r.Y)(h,{children:n??t})]})]}),(0,r.Y)(g,{type:"range",min:o,max:i,step:1,value:t,onChange:e=>a(Number(e.currentTarget.value)),"aria-label":e}),l&&(0,r.Y)(u,{children:l})]})])},50086(e,t,n){n.d(t,{L:()=>p});var r=n(10201),o=n(17402),i=n(63679),a=n(50698);const l=["M448 320Q447 279 420 252L420 252Q393 225 352 224Q307 225 280 257L190 212Q192 202 192 192Q192 182 190 172L280 127Q307 159 352 160Q393 159 420 132Q447 105 448 64Q447 23 420-4Q393-31 352-32Q311-31 284-4Q257 23 256 64Q256 74 258 84L168 129Q141 97 96 96Q55 97 28 124Q1 151 0 192Q1 233 28 260Q55 287 96 288Q141 287 168 255L258 300Q256 310 256 320Q257 361 284 388Q311 415 352 416Q393 415 420 388Q447 361 448 320L448 320M96 144Q123 145 138 168Q150 192 138 216Q123 239 96 240Q69 239 54 216Q42 192 54 168Q69 145 96 144L96 144M400 320Q399 347 376 362Q352 374 328 362Q305 347 304 320Q305 293 328 278Q352 266 376 278Q399 293 400 320L400 320M352 16Q379 17 394 40Q406 64 394 88Q379 111 352 112Q325 111 310 88Q298 64 310 40Q325 17 352 16L352 16Z",448,512,-60,!0];var s=n(61204),d=n(4738),c=n(75817);const p=e=>{const[t,n]=(0,o.J0)(!1),i=e.withButton?u:h;return(0,r.Y)(i,{$square:e.square,children:(0,r.FD)(c.K0,{title:t?"Link Copied!":e.shareTitleLable,onClick:t=>{t.stopPropagation(),t.preventDefault(),(0,d.GD)(e.stringToCopy),n(!0),setTimeout(()=>n(!1),2e3)},children:[(0,r.Y)(s.g,{icon:t?a.e:l}),e.labelString&&(0,r.Y)("span",{children:e.labelString})]})})},h=i.I4.div` 8815 position: relative; 8816`,u=i.I4.div` 8817 position: relative; 8818 display: flex; 8819 align-content: center; 8820 justify-content: center; 8821 align-items: center; 8822 border: ${e=>e.$active?"1.5px solid var(--theme-palette-color-1)":"1px solid var(--theme-palette-color-5)"}; 8823 background-color: var(--theme-palette-color-7); 8824 color: ${e=>e.$active?"var(--theme-palette-color-4)":"var(--theme-palette-color-3)"}; 8825 cursor: pointer; 8826 border-radius: 5px; 8827 ${e=>e.$square?"width: 30px; height: 30px; padding: 0; & > div { padding: 0; }\n border-color: transparent; border-radius: 6px; transition: border-color 150ms ease;\n &:hover { border-color: var(--theme-palette-color-5); color: var(--theme-palette-color-4); }":"padding: 5px; height: 32px; min-width: 32px;"} 8828`},849(e,t,n){var r=n(10201),o=n(17402),i=n(63679),a=n(4738);const l=i.I4.div` 8829 display: flex; 8830 background-color: var(--theme-palette-color-1); 8831 color: var(--dotgg-on-accent, var(--theme-palette-color-8)); 8832 padding: 2px 8px; 8833 min-height: 32px; 8834 box-sizing: border-box; 8835 justify-content: center; 8836 align-items: center; 8837 gap: 4px; 8838 border-radius: 5px; 8839 cursor: pointer; 8840 user-select: none; 8841`;n.d(t,["F",0,e=>{const[t,n]=(0,o.J0)(!1);return(0,r.FD)(l,{onClick:t=>{t.stopPropagation(),t.preventDefault(),(0,a.GD)(e.stringToCopy),n(!0),setTimeout(()=>n(!1),2e3)},children:[(0,r.Y)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.Y)("path",{d:"M12.5 12.3333C12.5 12.0239 12.377 11.7273 12.1582 11.5085C11.9394 11.2897 11.6428 11.1667 11.3333 11.1667C11.0239 11.1667 10.7273 11.2897 10.5085 11.5085C10.2897 11.7273 10.1667 12.0239 10.1667 12.3333C10.1667 12.6428 10.2897 12.9394 10.5085 13.1582C10.7273 13.377 11.0239 13.5 11.3333 13.5C11.6428 13.5 11.9394 13.377 12.1582 13.1582C12.377 12.9394 12.5 12.6428 12.5 12.3333ZM5.83333 8C5.83333 7.69058 5.71033 7.39392 5.49154 7.17513C5.27274 6.95634 4.97609 6.83333 4.66667 6.83333C4.35725 6.83333 4.06059 6.95634 3.8418 7.17513C3.623 7.39392 3.5 7.69058 3.5 8C3.5 8.30942 3.623 8.60608 3.8418 8.82487C4.06059 9.04366 4.35725 9.16667 4.66667 9.16667C4.97609 9.16667 5.27274 9.04366 5.49154 8.82487C5.71033 8.60608 5.83333 8.30942 5.83333 8ZM12.5 3.66667C12.5 3.35725 12.377 3.06059 12.1582 2.8418C11.9394 2.623 11.6428 2.5 11.3333 2.5C11.0239 2.5 10.7273 2.623 10.5085 2.8418C10.2897 3.06059 10.1667 3.35725 10.1667 3.66667C10.1667 3.97609 10.2897 4.27274 10.5085 4.49154C10.7273 4.71033 11.0239 4.83333 11.3333 4.83333C11.6428 4.83333 11.9394 4.71033 12.1582 4.49154C12.377 4.27274 12.5 3.97609 12.5 3.66667ZM13.5 3.66667C13.5 4.2413 13.2716 4.79224 12.8652 5.19857C12.4589 5.6049 11.908 5.83333 11.3333 5.83333C10.7587 5.83333 10.2078 5.6049 9.80143 5.19857C9.73298 5.13012 9.67008 5.05721 9.61198 4.98112L6.62435 7.07227C6.7605 7.35958 6.83333 7.67599 6.83333 8L6.83073 8.10742C6.81653 8.39362 6.74526 8.67176 6.62435 8.92708L9.61198 11.0182C9.67 10.9423 9.7331 10.8698 9.80143 10.8014C10.2078 10.3951 10.7587 10.1667 11.3333 10.1667C11.908 10.1667 12.4589 10.3951 12.8652 10.8014C13.2716 11.2078 13.5 11.7587 13.5 12.3333C13.5 12.908 13.2716 13.4589 12.8652 13.8652C12.4589 14.2716 11.908 14.5 11.3333 14.5C10.7587 14.5 10.2078 14.2716 9.80143 13.8652C9.3951 13.4589 9.16667 12.908 9.16667 12.3333C9.16667 12.2041 9.17864 12.076 9.20117 11.9505L6.04688 9.74284L6.00651 9.71159C6.00442 9.70979 6.00271 9.70756 6.00065 9.70573C5.62156 10.0022 5.15293 10.1667 4.66667 10.1667C4.09203 10.1667 3.54109 9.93823 3.13477 9.5319C2.72844 9.12557 2.5 8.57464 2.5 8C2.5 7.42536 2.72844 6.87443 3.13477 6.4681C3.54109 6.06177 4.09203 5.83333 4.66667 5.83333C5.15279 5.83333 5.62161 5.99729 6.00065 6.29362C6.01512 6.28075 6.03062 6.26854 6.04688 6.25716L9.20117 4.04883C9.17871 3.92351 9.16667 3.79573 9.16667 3.66667C9.16667 3.09203 9.3951 2.54109 9.80143 2.13477C10.2078 1.72844 10.7587 1.5 11.3333 1.5C11.908 1.5 12.4589 1.72844 12.8652 2.13477C13.2716 2.54109 13.5 3.09203 13.5 3.66667Z",fill:"currentColor"})}),e.labelString&&(0,r.Y)("span",{children:e.labelString}),!e.iconOnly&&(t?"Copied!":"Share")]})}])},56411(e,t,n){var r=n(10201),o=n(17402),i=n(63679),a=n(28297),l=n(43626);const s=i.Ay.div` 8842 font-size: 0.9em; 8843 line-height: 1em; 8844 ${e=>e.$on?"color: var(--theme-palette-color-4);":""} 8845 @media only screen and (max-width: 500px) { 8846 font-size: 0.7em; 8847 line-height: 0.9em; 8848 } 8849 ${e=>e.$row&&i.AH` 8850 font-size: 13px; 8851 font-weight: 600; 8852 line-height: 1.2; 8853 white-space: nowrap; 8854 color: ${e.$on?"var(--theme-palette-color-4)":"var(--theme-palette-color-3)"}; 8855 @media only screen and ${a.E0} { 8856 font-size: 13.5px; 8857 line-height: 1.2; 8858 } 8859 `} 8860`;n.d(t,["A",0,({initialChecked:e=!1,checked:t,onChange:n,checkedStrings:i,compact:a,ariaLabel:d,variant:c,disabled:p})=>{const[h,u]=(0,o.J0)(e),g=void 0!==t,m=g?t:h,f="row"===c,x=()=>{p||(g||u(!m),n&&n(!m))};return(0,o.vJ)(()=>{u(e)},[e]),(0,r.FD)(l.Zz,{$compact:a,$row:f,$disabled:p,children:[(0,r.FD)(l.Oq,{$row:f,children:[(0,r.Y)("input",{type:"checkbox",role:"switch",checked:m,disabled:p,onChange:x,"aria-label":d}),(0,r.Y)(l.wL,{$row:f})]}),(0,r.Y)(s,{$on:m,$row:f,onClick:x,children:m?i[1]:i[0]})]})}])},49259(e,t,n){n.d(t,{$I:()=>p,L$:()=>m,QU:()=>u,Xk:()=>f,r1:()=>g});var r=n(10201),o=n(63679),i=n(70213),a=n(59408),l=n(28297),s=n(30821),d=n(59061),c=n(36856);function p({user:e,size:t,phoneSize:n}){const o={$size:t,$phone:n??t};return e.avatar?(0,r.Y)(v,{src:(0,a.T)(e.avatar),alt:"",loading:"lazy",...o}
8860):(0,r.Y)(y,{"aria-hidden":"true",...o,children:e.nickname.slice(0,1).toUpperCase()})}const h={trade:"Trade",deck:"Deck"};function u({row:e,active:t,request:n,onOpen:o}){const i=e.unread_count??0,a=n||e.unread||i>0,l=e.origin?h[e.origin.kind]:void 0;return(0,r.FD)(b,{type:"button",$active:t,"aria-current":t?"true":void 0,onClick:()=>o(e.id),children:[(0,r.Y)(p,{user:e.other,size:40,phoneSize:44}),(0,r.FD)(Y,{children:[(0,r.FD)(A,{children:[(0,r.Y)(C,{$unread:a,children:e.other.nickname}),l&&(0,r.Y)(D,{children:l})]}),(0,r.FD)(S,{$unread:a&&!n,children:[e.blocked?"Blocked · ":"",e.mine?"You: ":"",e.snippet]})]}),(0,r.FD)(I,{children:[(0,r.Y)(T,{children:(0,d.gG)(e.updated)}),(0,r.FD)(z,{children:[!n&&i>0&&(0,r.Y)(c.ni,{"aria-label":`${i} unread`,children:i}),!n&&0===i&&e.unread&&(0,r.Y)(c.xx,{role:"img","aria-label":"Unread"})]})]})]})}function g(e,t){return e>0?`${e} ${1===e?"needs":"need"} your answer`:t>0?`${t} unread`:"Offers you sent and received"}function m({needsAnswer:e,unread:t}){const n=g(e,t);return(0,r.FD)($,{href:"/trade/inbox/",children:[(0,r.Y)(k,{"aria-hidden":"true",children:(0,r.Y)(i.hR,{size:18})}),(0,r.FD)(Y,{children:[(0,r.Y)(F,{children:"Trade offers"}),(0,r.FD)(S,{$unread:!1,children:[n,(0,r.FD)(c.bd,{children:[" · ",window.location.hostname.replace(/^www\./,"")]})]})]}),(0,r.Y)(E,{"aria-hidden":"true",children:(0,r.Y)(i.Vj,{})})]})}function f(){return(0,r.Y)(r.FK,{children:[0,1,2,3].map(e=>(0,r.FD)(L,{"aria-hidden":"true",children:[(0,r.Y)(M,{}),(0,r.FD)(N,{children:[(0,r.Y)(P,{$w:55}),(0,r.Y)(P,{$w:80})]})]},e))})}const x=o.AH` 8861 flex: none; 8862 width: ${e=>e.$size}px; 8863 height: ${e=>e.$size}px; 8864 border-radius: 50%; 8865 background: ${s.Q.hoverFill}; 8866 @media only screen and ${l.E0} { 8867 width: ${e=>e.$phone}px; 8868 height: ${e=>e.$phone}px; 8869 } 8870`,v=o.Ay.img` 8871 ${x} 8872 object-fit: cover; 8873`,y=o.Ay.span` 8874 ${x} 8875 display: inline-flex; 8876 align-items: center; 8877 justify-content: center; 8878 color: var(--theme-palette-color-3); 8879 font-weight: 700; 8880`,w=o.AH` 8881 display: grid; 8882 grid-template-columns: 40px minmax(0, 1fr) auto; 8883 gap: 12px; 8884 align-items: center; 8885 width: 100%; 8886 padding: 12px 14px; 8887 box-sizing: border-box; 8888 border: none; 8889 border-bottom: 1px solid ${s.Q.rowRule}; 8890 color: inherit; 8891 font: inherit; 8892 text-align: left; 8893 text-decoration: none; 8894 cursor: pointer; 8895 &:focus-visible { 8896 outline: 2px solid var(--theme-palette-color-4); 8897 outline-offset: -2px; 8898 } 8899 @media only screen and ${l.E0} { 8900 grid-template-columns: 44px minmax(0, 1fr) auto; 8901 height: ${72}px; 8902 padding: 0 12px; 8903 } 8904`,b=o.Ay.button` 8905 ${w} 8906 background: ${e=>e.$active?s.Q.bubbleMine:"transparent"}; 8907 box-shadow: ${e=>e.$active?"inset 3px 0 0 var(--theme-palette-color-1)":"none"}; 8908 &:hover { 8909 background: ${e=>e.$active?s.Q.bubbleMine:s.Q.hoverFill}; 8910 } 8911`,$=o.Ay.a` 8912 ${w} 8913 background: ${s.Q.threadBg}; 8914 &:hover { 8915 background: ${s.Q.hoverFill}; 8916 } 8917 @media only screen and ${l.E0} { 8918 height: ${64}px; 8919 background: none; 8920 } 8921`,k=o.Ay.span` 8922 display: inline-flex; 8923 align-items: center; 8924 justify-content: center; 8925 width: 40px; 8926 height: 40px; 8927 border-radius: 8px; 8928 background: color-mix(in srgb, var(--theme-palette-color-1) 14%, transparent); 8929 color: var(--theme-palette-color-1); 8930 @media only screen and ${l.E0} { 8931 width: 44px; 8932 height: 44px; 8933 } 8934`,Y=o.Ay.span` 8935 display: flex; 8936 flex-direction: column; 8937 gap: 3px; 8938 min-width: 0; 8939`,A=o.Ay.span` 8940 display: flex; 8941 align-items: center; 8942 gap: 6px; 8943 min-width: 0; 8944`,C=o.Ay.span` 8945 min-width: 0; 8946 overflow: hidden; 8947 text-overflow: ellipsis; 8948 white-space: nowrap; 8949 font-size: 13.5px; 8950 font-weight: ${e=>e.$unread?700:600}; 8951 color: ${e=>e.$unread?"var(--theme-palette-color-4)":"color-mix(in srgb, var(--theme-palette-color-4) 30%, var(--theme-palette-color-3))"}; 8952 @media only screen and ${l.E0} { 8953 font-size: 15px; 8954 } 8955`,F=(0,o.Ay)(C).attrs({$unread:!0})``,D=o.Ay.span` 8956 flex: none; 8957 padding: 1px 6px; 8958 border-radius: 3px; 8959 background: var(--theme-palette-color-7); 8960 box-shadow: inset 0 0 0 1px var(--theme-palette-color-5); 8961 font-size: 10.5px; 8962 font-weight: 700; 8963 color: var(--theme-palette-color-3); 8964`,S=o.Ay.span` 8965 overflow: hidden; 8966 text-overflow: ellipsis; 8967 white-space: nowrap; 8968 font-size: 12.5px; 8969 color: ${e=>e.$unread?"color-mix(in srgb, var(--theme-palette-color-4) 60%, var(--theme-palette-color-3))":"var(--theme-palette-color-3)"}; 8970 @media only screen and ${l.E0} { 8971 font-size: 13.5px; 8972 } 8973`,I=o.Ay.span` 8974 display: flex; 8975 flex-direction: column; 8976 align-items: flex-end; 8977 gap: 6px; 8978`,z=o.Ay.span` 8979 display: flex; 8980 align-items: center; 8981 height: 18px; 8982 @media only screen and ${l.E0} { 8983 height: 20px; 8984 } 8985`,T=o.Ay.span` 8986 font-size: 11.5px; 8987 white-space: nowrap; 8988 color: ${s.Q.muted}; 8989 @media only screen and ${l.E0} { 8990 font-size: 12px; 8991 } 8992`,E=o.Ay.span` 8993 display: inline-flex; 8994 color: var(--theme-palette-color-3); 8995`,L=o.Ay.div` 8996 display: grid; 8997 grid-template-columns: 40px minmax(0, 1fr); 8998 gap: 12px; 8999 align-items: center; 9000 padding: 12px 14px; 9001 border-bottom: 1px solid ${s.Q.rowRule}; 9002`,M=o.Ay.span` 9003 width: 40px; 9004 height: 40px; 9005 border-radius: 50%; 9006 background: var(--theme-palette-color-7); 9007`,N=o.Ay.span` 9008 display: flex; 9009 flex-direction: column; 9010 gap: 7px; 9011`,P=o.Ay.span` 9012 width: ${e=>e.$w}%; 9013 height: 10px; 9014 border-radius: 3px; 9015 background: var(--theme-palette-color-7); 9016`}
9016,32407(e,t,n){n.d(t,{s:()=>h});var r=n(10201),o=n(17402),i=n(63679),a=n(63346),l=n(92667),s=n(31777),d=n(28297),c=n(53794),p=n(30821);function h({entry:e,mine:t,otherName:n,editable:i,onEdit:l,meta:d=!0,stamp:p,note:h,status:w,failure:b,onRetry:$,guarded:k=!1}){const Y=(0,c.WS)(),[A,C]=(0,o.J0)(!1),[F,D]=(0,o.J0)(e.body),[S,I]=(0,o.J0)(!1),[z,T]=(0,o.J0)(""),E=()=>{const t=F.trim();t&&!S&&void 0!==e.id&&l&&(t!==e.body?(I(!0),T(""),l(e.id,t).then(()=>C(!1)).catch(e=>T(e.message)).finally(()=>I(!1))):C(!1))};return(0,r.FD)(u,{$mine:t,$wide:A,children:[(0,r.Y)(g,{$mine:t,$status:w,$guarded:k&&!t,$wide:A,children:A?(0,r.FD)(r.FK,{children:[(0,r.Y)(v,{value:F,rows:2,maxLength:500,autoFocus:!0,"aria-label":"Edit message",onChange:e=>D(e.currentTarget.value),onKeyDown:e=>{"Escape"===e.key?C(!1):"Enter"!==e.key||e.shiftKey||e.isComposing||Y||(e.preventDefault(),E())}}),(0,r.FD)(y,{children:[(0,r.Y)(a.tA,{type:"button",$size:"sm",onClick:()=>C(!1),disabled:S,children:"Cancel"}),(0,r.Y)(a.jn,{type:"button",$size:"sm",onClick:E,disabled:S||""===F.trim(),children:S?"Savingâ¦":"Save"})]}),""!==z&&(0,r.Y)(a.ps,{role:"alert",children:z})]}):e.body}),"failed"===w?(0,r.FD)(m,{$mine:t,role:"alert",children:[(0,r.Y)(f,{children:b?`Not sent: ${b}`:"Not sent"}),$&&(0,r.Y)(x,{type:"button",$strong:!0,onClick:$,children:"Retry"})]}):"sending"===w?(0,r.Y)(m,{$mine:t,children:"Sendingâ¦"}):d&&(0,r.FD)(m,{$mine:t,children:[t?"You":n," · ",p??(0,s.fF)(e.created),h&&` · ${h}`,(e.edited??0)>0&&" · edited",i&&l&&!A&&(0,r.FD)(r.FK,{children:[" · ",(0,r.Y)(x,{type:"button",onClick:()=>{D(e.body),T(""),C(!0)},children:"Edit"})]})]})]})}const u=i.Ay.div` 9017 align-self: ${e=>e.$mine?"flex-end":"flex-start"}; 9018 display: flex; 9019 flex-direction: column; 9020 align-items: ${e=>e.$mine?"flex-end":"flex-start"}; 9021 gap: 3px; 9022 max-width: ${e=>e.$wide?"100%":"68%"}; 9023 width: ${e=>e.$wide?"100%":"auto"}; 9024 min-width: 0; 9025 @media only screen and ${d.E0} { 9026 max-width: ${e=>e.$wide?"100%":"80%"}; 9027 } 9028`,g=i.Ay.div` 9029 display: flex; 9030 flex-direction: column; 9031 gap: 6px; 9032 width: ${e=>e.$wide?"100%":"auto"}; 9033 max-width: 100%; 9034 box-sizing: border-box; 9035 padding: 8px 12px; 9036 border-radius: 14px; 9037 background: ${e=>"failed"===e.$status?"var(--theme-palette-color-8)":e.$mine?p.Q.bubbleMine:"var(--theme-palette-color-7)"}; 9038 box-shadow: ${e=>"failed"===e.$status?`inset 0 0 0 1px ${p.Q.dangerStrong}`:e.$guarded?"inset 0 0 0 1px var(--theme-palette-color-5)":"none"}; 9039 opacity: ${e=>"sending"===e.$status?.6:1}; 9040 color: var(--theme-palette-color-4); 9041 font-size: 14px; 9042 line-height: 1.4; 9043 white-space: pre-wrap; 9044 overflow-wrap: anywhere; 9045 @media only screen and ${d.E0} { 9046 font-size: 15px; 9047 } 9048`,m=i.Ay.div` 9049 display: flex; 9050 flex-wrap: wrap; 9051 justify-content: ${e=>e.$mine?"flex-end":"flex-start"}; 9052 gap: 0 8px; 9053 padding: 0 4px; 9054 font-size: 11px; 9055 line-height: 1.35; 9056 color: ${p.Q.muted}; 9057`,f=i.Ay.span` 9058 color: ${p.Q.danger}; 9059`,x=i.Ay.button` 9060 padding: 0; 9061 margin: 0; 9062 border: 0; 9063 background: none; 9064 font: inherit; 9065 font-weight: ${e=>e.$strong?700:"inherit"}; 9066 color: var(--theme-palette-color-1); 9067 text-decoration: ${e=>e.$strong?"none":"underline"}; 9068 cursor: pointer; 9069 @media only screen and ${d.E0} { 9070 padding: 16px 10px; 9071 margin: -16px -10px; 9072 } 9073`,v=(0,i.Ay)(l.fs)` 9074 width: 100%; 9075 min-height: 58px; 9076 resize: vertical; 9077`,y=i.Ay.div` 9078 display: flex; 9079 justify-content: flex-end; 9080 gap: 8px; 9081`},62803(e,t,n){n.d(t,{U:()=>tt});var r=n(10201),o=n(17402),i=n(63679),a=n(14330),l=n(70213),s=n(42823),d=n(86031),c=n(4738),p=n(28297),h=n(53794),u=n(30821),g=n(72134),m=n(90023),f=n(35661),x=n(49259),v=n(36856);const y={everyone:"Everyone",known:"People I know",nobody:"Nobody"};function w({view:e,onView:t,requests:n}){const o=(0,h.WS)();return(0,r.Y)(m.$,{ariaLabel:"Messages view",value:e,onChange:t,fill:!0,raised:!o,options:[{value:"inbox",label:"Inbox"},{value:"requests",label:"Requests",badge:n>0?(0,r.Y)(v.ni,{"aria-label":`${n} waiting`,children:n}):void 0}]})}function b(){const[e,t]=(0,o.J0)(null);return(0,o.vJ)(()=>{let e=!0;return(0,a.hY)().then(n=>{e&&t(n)}).catch(()=>{}),()=>{e=!1}},[]),(0,r.FD)(k,{children:["People you haven't talked to. They can't write again until you accept, and ",(0,r.Y)("b",{children:"they won't know if you ignore them."})," ",(0,r.FD)(Y,{href:(0,f.aY)("messages"),children:["Who can message me",e?`: ${y[e]}`:""]})]})}function $({view:e,onView:t,rows:n,failed:o,requests:i,activeId:a,onOpen:l,hideOnPhone:s,tradeDoor:d}){const c=(0,g.N)();return(0,r.FD)(v.$q,{$hideOnPhone:s,children:[(0,r.Y)(v.DO,{children:(0,r.Y)(w,{view:e,onView:t,requests:i})}),"requests"===e&&(0,r.Y)(b,{}),null===n&&o?(0,r.Y)(v.t7,{role:"alert",children:"Couldn't load your messages. They'll retry in a moment."}):(0,r.FD)(v.Sc,{children:["inbox"===e&&d&&(0,r.Y)(x.L$,{needsAnswer:c.tradeNeedsAnswer,unread:c.tradeUnread}),null===n&&(0,r.Y)(x.Xk,{}),n?.map(t=>(0,r.Y)(x.QU,{row:t,active:t.id===a,request:"requests"===e,onOpen:l},t.id))]})]})}const k=i.Ay.div` 9082 flex: none; 9083 padding: 12px 14px; 9084 border-bottom: 1px solid ${u.Q.rowRule}; 9085 font-size: 12.5px; 9086 line-height: 1.5; 9087 color: var(--theme-palette-color-3); 9088 text-wrap: pretty; 9089 b { 9090 font-weight: 700; 9091 color: var(--theme-palette-color-4); 9092 } 9093 @media only screen and ${p.E0} { 9094 margin-bottom: 12px; 9095 padding: 12px 14px 0; 9096 border: none; 9097 border-radius: 8px; 9098 background: var(--theme-palette-color-8); 9099 box-shadow: inset 0 0 0 1px var(--theme-palette-color-5); 9100 font-size: 13.5px; 9101 } 9102`,Y=i.Ay.a` 9103 font-weight: 600; 9104 color: var(--theme-palette-color-1); 9105 text-decoration: none; 9106 &:hover { 9107 text-decoration: underline; 9108 } 9109 @media only screen and ${p.E0} { 9110 display: flex; 9111 align-items: center; 9112 min-height: ${44}px; 9113 margin-top: 4px; 9114 &::after { 9115 content: " âº"; 9116 white-space: pre; 9117 } 9118 } 9119`;var A=n(63346);function C({view:e,onView:t,requests:n,tradeSite:o}){const i="requests"===e;return(0,r.FD)(F,{children:[(n>0||i)&&(0,r.Y)(D,{children:(0,r.Y)(w,{view:e,onView:t,requests:n})}),(0,r.FD)(S,{children:[(0,r.Y)(I,{"aria-hidden":"true",children:(0,r.Y)(l.pj,{size:22})}),(0,r.Y)(z,{children:i?"No message requests":"No conversations yet"}),i?(0,r.Y)(T,{children:"When someone you haven't talked to writes to you, their message waits here until you accept. They w
9119on't know if you ignore it."}):(0,r.FD)(T,{children:["A conversation starts when you press ",(0,r.Y)("b",{children:"Message"})," on a player's profile",o?" or a trade offer":"",". Players who don't know you yet land in Requests first."]}),(0,r.FD)(E,{children:[o&&!i&&(0,r.Y)(A.jn,{as:"a",href:"/trade/matches/",children:"Find traders"}),(0,r.Y)(A.tA,{as:"a",href:(0,f.aY)("messages"),children:"Who can message me"})]})]})]})}const F=i.Ay.div` 9120 display: flex; 9121 flex-direction: column; 9122 min-height: 0; 9123 height: 100%; 9124`,D=i.Ay.div` 9125 flex: none; 9126 padding: 10px; 9127 border-bottom: 1px solid ${u.Q.rowRule}; 9128 @media only screen and ${p.E0} { 9129 padding: 4px 0 10px; 9130 border-bottom: none; 9131 } 9132`,S=i.Ay.div` 9133 flex: 1; 9134 display: flex; 9135 flex-direction: column; 9136 align-items: center; 9137 justify-content: center; 9138 gap: 10px; 9139 padding: 32px; 9140 text-align: center; 9141 @media only screen and ${p.E0} { 9142 justify-content: flex-start; 9143 padding: 48px 4px 24px; 9144 } 9145`,I=i.Ay.span` 9146 display: inline-flex; 9147 align-items: center; 9148 justify-content: center; 9149 width: 52px; 9150 height: 52px; 9151 border-radius: 50%; 9152 background: var(--theme-palette-color-7); 9153 box-shadow: inset 0 0 0 1px var(--theme-palette-color-5); 9154 color: var(--theme-palette-color-3); 9155 @media only screen and ${p.E0} { 9156 width: 56px; 9157 height: 56px; 9158 background: var(--theme-palette-color-8); 9159 } 9160`,z=i.Ay.div` 9161 font-size: 17px; 9162 font-weight: 700; 9163 color: var(--theme-palette-color-4); 9164 @media only screen and ${p.E0} { 9165 font-size: 18px; 9166 } 9167`,T=i.Ay.p` 9168 max-width: 360px; 9169 margin: 0; 9170 font-size: 13.5px; 9171 line-height: 1.55; 9172 color: var(--theme-palette-color-3); 9173 text-wrap: pretty; 9174 b { 9175 color: var(--theme-palette-color-4); 9176 } 9177 @media only screen and ${p.E0} { 9178 font-size: 14px; 9179 } 9180`,E=i.Ay.div` 9181 display: flex; 9182 flex-wrap: wrap; 9183 justify-content: center; 9184 gap: 8px; 9185 margin-top: 6px; 9186 @media only screen and ${p.E0} { 9187 flex-direction: column; 9188 align-self: stretch; 9189 margin-top: 8px; 9190 } 9191`;var L=n(24541),M=n(38608),N=n(63099),P=n(31777),O=n(95117),_=n(34450),R=n(33412),j=n(53887);let J=null;const B={accent:"var(--theme-palette-color-1)",good:u.Q.success,warn:N.nX.warn,plain:"var(--theme-palette-color-3)"};function K({user:e,about:t,onPropose:n}){const i=(0,_.VE)(e.user_id),a=function(e){const[t,n]=(0,o.J0)([]);return(0,o.vJ)(()=>{let t=!0;return n([]),(J??=(0,O.lK)().catch(e=>{throw J=null,e}),J).then(r=>{t&&n(r.offers.filter(t=>t.other.user_id===e))}).catch(()=>{}),()=>{t=!1}},[e]),t}(e.user_id),l=[t?.joined?(0,R.Zu)(new Date(1e3*t.joined)):"","number"==typeof t?.for_trade?`${t.for_trade.toLocaleString()} for trade`:""].filter(Boolean);return(0,r.FD)(W,{"aria-label":`About ${e.nickname}`,children:[(0,r.FD)(U,{children:[(0,r.Y)(x.$I,{user:e,size:64}),(0,r.Y)(Q,{children:e.nickname}),l.length>0&&(0,r.Y)(G,{children:l.join(" · ")}),(0,r.Y)(_.ui,{match:i,short:!0})]}),(0,r.FD)(H,{children:[(0,r.Y)(A.jn,{type:"button",onClick:n,children:"Propose trade"}),(0,r.Y)(A.tA,{as:"a",href:(0,j.Lp)(e.nickname),children:"View profile"})]}),a.length>0&&(0,r.FD)(q,{children:[(0,r.Y)(N.eN,{children:"Trades with you"}),a.slice(0,6).map(e=>(0,r.FD)(V,{href:`/trade/inbox/${e.id}/`,children:[(0,r.FD)("b",{children:["#",e.id]}),(0,r.Y)(X,{$color:B[(0,P.lH)(e.status,e.direction)],children:(0,P.Rh)(e.status,e.direction)})]},e.id))]})]})}const W=i.Ay.aside` 9192 display: flex; 9193 flex-direction: column; 9194 gap: 14px; 9195 min-height: 0; 9196 overflow-y: auto; 9197 padding: 20px 18px; 9198 border-left: 1px solid var(--theme-palette-color-5); 9199`,U=i.Ay.div` 9200 display: flex; 9201 flex-direction: column; 9202 align-items: center; 9203 gap: 8px; 9204 text-align: center; 9205`,Q=i.Ay.div` 9206 font-size: 16px; 9207 font-weight: 700; 9208 color: var(--theme-palette-color-4); 9209 overflow-wrap: anywhere; 9210`,G=i.Ay.div` 9211 font-size: 12px; 9212 color: var(--theme-palette-color-3); 9213`,H=i.Ay.div` 9214 display: flex; 9215 flex-direction: column; 9216 gap: 8px; 9217 > * { 9218 width: 100%; 9219 } 9220`,q=i.Ay.div` 9221 display: flex; 9222 flex-direction: column; 9223 gap: 8px; 9224 padding-top: 12px; 9225 border-top: 1px solid ${u.Q.rowRule}; 9226`,V=i.Ay.a` 9227 display: flex; 9228 justify-content: space-between; 9229 gap: 8px; 9230 font-size: 12.5px; 9231 color: var(--theme-palette-color-4); 9232 text-decoration: none; 9233 b { 9234 font-weight: 600; 9235 } 9236 &:hover b { 9237 color: var(--theme-palette-color-1); 9238 } 9239`,X=i.Ay.span` 9240 font-weight: 700; 9241 color: ${e=>e.$color}; 9242`;var Z=n(39131);function ee({nickname:e,draft:t,setDraft:n,sending:i,onSend:a}){const s=(0,h.WS)(),d=(0,o.li)(null);(0,o.Nf)(()=>{const e=d.current;e&&(e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight+2,160)}px`)},[t]);const c=()=>{""===t.trim()||i||a()},p=""===t.trim();return(0,r.FD)(te,{onSubmit:e=>{e.preventDefault(),c()},children:[(0,r.FD)(ne,{children:[(0,r.Y)(re,{ref:d,rows:1,value:t,maxLength:2e3,placeholder:`Message ${e}`,"aria-label":`Message ${e}`,onChange:e=>n(e.currentTarget.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.isComposing||(!s||e.ctrlKey||e.metaKey)&&(e.preventDefault(),c())}}),s?(0,r.Y)(ie,{type:"submit","aria-label":"Send",disabled:i||p,children:(0,r.Y)(l.mD,{})}):(0,r.Y)(oe,{type:"submit",disabled:i||p,children:i?"Sendingâ¦":"Send"})]}),!s&&(0,r.Y)(ae,{children:"Enter to send · Shift + Enter for a new line · plain text"})]})}const te=i.Ay.form` 9243 flex: none; 9244 display: flex; 9245 flex-direction: column; 9246 gap: 6px; 9247 padding: 12px 16px 10px; 9248 border-top: 1px solid ${u.Q.rowRule}; 9249 @media only screen and ${p.E0} { 9250 padding: 8px 10px; 9251 background: var(--theme-palette-color-8); 9252 } 9253`,ne=i.Ay.div` 9254 display: flex; 9255 align-items: flex-end; 9256 gap: 8px; 9257`,re=i.Ay.textarea` 9258 flex: 1; 9259 min-width: 0; 9260 min-height: ${44}px; 9261 max-height: ${160}px; 9262 padding: 11px 12px; 9263 box-sizing: border-box; 9264 border: none; 9265 border-radius: 8px; 9266 background: var(--theme-palette-color-7); 9267 box-shadow: inset 0 0 0 1px ${u.Q.inputRing}; 9268 color: var(--theme-palette-color-4); 9269 font: inherit; 9270 font-size: 14px; 9271 line-height: 1.4; 9272 resize: none; 9273 overflow-y: auto; 9274 &::placeholder { 9275 color: ${u.Q.muted}; 9276 } 9277 &:focus { 9278 outline: none; 9279 box-shadow: inset 0 0 0 2px ${u.Q.inputRingFocus}; 9280 } 9281 @media only screen and ${p.E0} { 9282 font-size: ${16}px; 9283 } 9284`,oe=(0,i.Ay)(A.jn)` 9285 flex: none; 9286 height: ${44}px; 9287 padding: 0 18px; 9288 font-size: 14px; 9289`,ie=(0,i.Ay)(A.jn)` 9290 flex: none; 9291 width: ${44}px; 9292 height: ${44}px; 9293 padding: 0; 9294`,ae=i.Ay.div` 9295 font-size: 11px; 9296 color: ${u.Q.muted}; 9297`;var le=n(38364),se=n(92667);const de=i.Ay.div` 9298 flex: none; 9299 display: flex; 9300 align-items: center; 9301 gap: 12px; 9302 height: 60px; 9303 padding: 0 10px 0 16px; 9304 border-bottom: 1px solid ${u.Q.rowRule}; 9305 @media only screen and ${p.E0} { 9306 gap: 8px; 9307 height: 56px; 9308 padding: 0 4px; 9309 background: var(--theme-palette-color-8); 9310 } 9311`,ce=i.Ay.div` 9312 display: flex; 9313 flex-direction: column; 9314 min-width: 0; 9315 margin-right: auto; 9316`,pe=i.Ay.a` 9317 overflow: hidden; 9318 text-overflow: ellipsis; 9319 white-space: nowrap; 9320 font-size: 15px; 9321 font-weight: 700; 9322 line-height: 1.3; 9323 color: var(--theme-palette-color-4); 9324 text-decoration: none; 9325 &:hover { 9326 color: var(--theme-palette-color-1); 9327 } 9328`,he=i.Ay.div` 9329 overflow: hidden; 9330 text-overflow: ellipsis; 9331 white-space: nowrap; 9332 font-size: 12px; 9333 color: var(--theme-palette-color-3); 9334`,ue=i.Ay.div` 9335 position: relative; 9336 flex: 1; 9337 min-height: 0; 9338 overflow-y: auto; 9339 display: flex; 9340 flex-direction: column; 9341 gap: 4px; 9342 padding: 16px 20px; 9343 background: ${u.Q.threadBg}; 9344 > :first-child { 9345 margin-top: auto; 9346 } 9347 @media only screen and ${p.E0} { 9348 padding: 12px; 9349 } 9350`,ge=i.Ay.div` 9351 display: flex; 9352 align-items: center; 9353 gap: 12px; 9354 margin: ${e=>e.$new?"2px 0 6px":"10px 0 6px"}; 9355 font-size: 11.5px; 9356 font-weight: 700; 9357 color: ${e=>e.$new?"var(--theme-palette-color-1)":u.Q.muted}; 9358 &::before, 9359 &::after { 9360 content: ""; 9361 flex: 1; 9362 height: 1px; 9363 background: ${e=>e.$new?"color-mix(in srgb, var(--theme-palette-color-1) 50%, transparent)":u.Q.rowRule}; 9364 } 9365 @media only screen and ${p.E0} { 9366 gap: 10px; 9367 margin: ${e=>e.$new?"2px 0 4px":"8px 0 4px"}; 9368 } 9369`,me=i.Ay.div` 9370 display: flex; 9371 flex-direction: column; 9372 align-items: ${e=>e.$mine?"flex-end":"flex-start"}; 9373 gap: 3px; 9374 margin-bottom: 8px; 9375 opacity: ${e=>e.$dim?.6:1}; 9376 @media only screen and ${p.E0} { 9377 margin-bottom: 6px; 9378 } 9379`,fe=i.Ay.div` 9380 align-self: center; 9381 margin-bottom: 8px; 9382 font-size: 11.5px; 9383 color: ${u.Q.muted}; 9384`,xe={accent:"var(--theme-palette-color-1)",good:u.Q.successRing,plain:"var(--theme-palette-color-5)"},ve=i.AH` 9385 flex: none; 9386 display: flex; 9387 margin: 0 16px 16px; 9388 border-radius: 8px; 9389 background: var(--theme-palette-color-7); 9390 box-shadow: inset 0 0 0 1px ${e=>xe[e.$tone??"plain"]}; 9391 @media only screen and ${p.E0} { 9392 margin: 0; 9393 border-radius: 0; 9394 background: var(--theme-palette-color-8); 9395 box-shadow: none; 9396 border-top: 1px solid ${e=>void 0===e.$tone||"plain"===e.$tone?u.Q.rowRule:xe[e.$tone]}; 9397 } 9398`,ye=i.Ay.div` 9399 ${ve} 9400 flex-direction: column; 9401 gap: 10px; 9402 padding: 14px 16px; 9403 @media only screen and ${p.E0} { 9404 padding: 14px 16px 16px; 9405 } 9406`,we=i.Ay.div` 9407 font-size: 14px; 9408 font-weight: 700; 9409 color: var(--theme-palette-color-4); 9410 @media only screen and ${p.E0} { 9411 font-size: 15px; 9412 } 9413`,be=i.Ay.div` 9414 font-size: 13px; 9415 line-height: 1.5; 9416 color: var(--theme-palette-color-3); 9417 text-wrap: pretty; 9418 @media only screen and ${p.E0} { 9419 font-size: 13.5px; 9420 } 9421`,$e=i.Ay.div` 9422 ${ve} 9423 align-items: flex-start; 9424 gap: 10px; 9425 padding: 12px 14px; 9426 font-size: 13px; 9427 line-height: 1.5; 9428 color: var(--theme-palette-color-3); 9429 svg { 9430 flex: none; 9431 margin-top: 2px; 9432 } 9433 @media only screen and ${p.E0} { 9434 padding: 14px 16px; 9435 font-size: 14px; 9436 } 9437`,ke=i.Ay.button` 9438 display: inline-flex; 9439 align-items: center; 9440 justify-content: center; 9441 height: 40px; 9442 padding: 0 8px; 9443 border: none; 9444 border-radius: 6px; 9445 background: none; 9446 font: inherit; 9447 font-size: 13px; 9448 font-weight: 600; 9449 color: ${u.Q.danger}; 9450 cursor: pointer; 9451 &:hover { 9452 background: color-mix(in srgb, ${u.Q.dangerStrong} 12%, transparent); 9453 } 9454 &:focus-visible { 9455 outline: 2px solid var(--theme-palette-color-4); 9456 outline-offset: 2px; 9457 } 9458 @media only screen and ${p.E0} { 9459 height: ${44}px; 9460 padding: 0 12px; 9461 font-size: 14px; 9462 } 9463`,Ye=[{value:"spam",label:"Spam"},{value:"harassment",label:"Harassment"},{value:"scam",label:"Scam"},{value:"other",label:"Other"}];function Ae({conversationId:e,nickname:t,inSheet:n,onDone:i,onCancel:l}){const[s,d]=(0,o.J0)("spam"),[c,p]=(0,o.J0)(""),h=(0,le.W)(async()=>{await(0,a.sN)(e,s,c),i()}),u="busy"===h.phase,g=(0,r.FD)(r.FK,{children:[(0,r.FD)(Ce,{children:["Block and report ",t,"?"]}),(0,r.Y)(be,{children:"They won't be able to message you or send you trade offers. Staff will see this conversation."}),(0,r.Y)(m.$,{ariaLabel:"Report reason",value:s,onChange:d,fill:!0,raised:!0,options:Ye}),(0,r.Y)(Fe,{type:"text",maxLength:500,placeholder:"Anything staff should know (optional)",value:c,onChange:e=>p(e.currentTarget.value),"aria-label":"Note for staff"}),"error"===h.phase&&(0,r.Y)(A.ps,{role:"alert",children:h.error instanceof Error&&h.error.message?h.error.message:"Couldn't send the report. Try again."}),(0,r.FD)(De,{children:[(0,r.Y)(A.tA,{type:"button",disabled:u,onClick:l,children:"Cancel"}),(0,r.FD)(A.Qi,{type:"button","aria-busy":u||void 0,onClick:()=>{h.run()},children:[u&&(0,r.Y)(A.az,{"aria-hidden":"true"}),u?"Reportingâ¦":"error"===h.phase?"Try again":"Block & report"]})]})]});return n?(0,r.Y)(Se,{children:g}):(0,r.Y)(ye,{children:g})}const Ce=i.Ay.div` 9464 font-size: 15px; 9465 font-weight: 700; 9466 color: var(--theme-palette-color-4); 9467 @media only screen and ${p.E0} { 9468 font-size: 17px; 9469 } 9470`,Fe=(0,i.Ay)(se.ks)` 9471 width: 100%; 9472 box-sizing: border-box; 9473`,De=i.Ay.div` 9474 display: flex; 9475 gap: 8px; 9476 @media only screen and ${p.E0} { 9477 display: grid; 9478 grid-template-columns: 1fr 1fr; 9479 > * { 9480 height: 48px; 9481 } 9482 } 9483`,Se=i.Ay.div` 9484 display: flex; 9485 flex-direction: column; 9486 gap: 12px; 9487 padding: 16px; 9488`;var Ie=n(56245);function ze({nickname:e,onAccept:t,onIgnore:n,onIgnored:i,onReport:a}){const l=(0,le.W)(t),s=(0,le.W)(n),d="busy"===l.phase||"busy"===s.phase,c="error"===l.phase?l.error:"error"===s.phase?s.error:null,p="done"===s.phase;return(0,o.vJ)(()=>
9488{if(!p)return;const e=setTimeout(i,2e3);return()=>clearTimeout(e)},[p,i]),p?(0,r.Y)(ye,{role:"status",children:(0,r.FD)(be,{children:["Ignored. ",e," won't be told."]})}):(0,r.FD)(ye,{$tone:c?"plain":"accent",children:[c?(0,r.Y)(A.ps,{role:"alert",children:c instanceof Error&&c.message?c.message:Ie.X}):(0,r.FD)(r.FK,{children:[(0,r.FD)(we,{children:[e," wants to message you"]}),(0,r.Y)(be,{children:"You haven't talked before. Accept to reply â they won't know if you ignore it."})]}),(0,r.FD)(Te,{children:[(0,r.FD)(A.jn,{type:"button","aria-busy":"busy"===l.phase||void 0,disabled:d,onClick:()=>{l.run()},children:["busy"===l.phase&&(0,r.Y)(A.az,{"aria-hidden":"true"}),"busy"===l.phase?"Acceptingâ¦":"Accept"]}),(0,r.Y)(A.tA,{type:"button","aria-busy":"busy"===s.phase||void 0,disabled:d,onClick:()=>{s.run()},children:"busy"===s.phase?"Ignoringâ¦":"Ignore"}),(0,r.Y)(Ee,{type:"button",disabled:d,onClick:a,children:"Block & report"})]})]})}const Te=i.Ay.div` 9489 display: flex; 9490 align-items: center; 9491 gap: 8px; 9492 > button:not(:last-child) { 9493 padding: 0 18px; 9494 } 9495 @media only screen and ${p.E0} { 9496 display: grid; 9497 grid-template-columns: 1fr 1fr; 9498 > button:not(:last-child) { 9499 height: 48px; 9500 font-size: 15px; 9501 } 9502 } 9503`,Ee=(0,i.Ay)(ke)` 9504 margin-left: auto; 9505 @media only screen and ${p.E0} { 9506 grid-column: 1 / -1; 9507 justify-self: center; 9508 margin-left: 0; 9509 } 9510`;var Le=n(59061),Me=n(32407);const Ne=e=>e.charAt(0).toLowerCase()+e.slice(1);
9510function Pe({origin:e,me:t,inert:n}){const o=function(e,t){switch(e.kind){case"trade":return{long:`Started from ${Ne(e.label)}`,short:`From ${Ne(e.label)}`,link:{long:"View offer",short:"View"}};case"deck":return{long:`Started from the deck ${e.label}`,short:`From ${e.label}`,link:{long:"View deck",short:"View"}};case"profile":return e.id===t?{long:"Sent from your profile",short:"From your profile",link:null}:{long:`Started from ${e.label}'s profile`,short:`From ${e.label}'s profile`,link:null};default:return e.label?{long:`Started from ${e.label}`,short:`From ${e.label}`,link:null}:null}}(e,t);if(!o)return null;const i=function(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return""}}(e.url),a="trade"===e.kind?l.hR:"deck"===e.kind?l.sm:l.vg;return(0,r.FD)(Oe,{children:[(0,r.Y)(_e,{$accent:"profile"!==e.kind,children:(0,r.Y)(a,{size:14})}),(0,r.FD)(Re,{children:[(0,r.Y)(v.bd,{children:o.long}),(0,r.Y)(v.sj,{children:o.short})]}),i&&(0,r.FD)(je,{children:["· ",i]}),o.link&&!n&&i&&(0,r.FD)(Je,{href:e.url,children:[(0,r.Y)(v.bd,{children:o.link.long}),(0,r.Y)(v.sj,{children:o.link.short})]})]})}const Oe=i.Ay.div` 9511 align-self: center; 9512 display: inline-flex; 9513 align-items: center; 9514 gap: 8px; 9515 max-width: 100%; 9516 min-height: 30px; 9517 margin-bottom: 8px; 9518 padding: 0 12px; 9519 box-sizing: border-box; 9520 border-radius: 15px; 9521 background: var(--theme-palette-color-8); 9522 box-shadow: inset 0 0 0 1px var(--theme-palette-color-5); 9523 font-size: 12px; 9524 font-weight: 600; 9525 color: var(--theme-palette-color-4); 9526 @media only screen and ${p.E0} { 9527 gap: 6px; 9528 min-height: 32px; 9529 margin-bottom: 6px; 9530 border-radius: 16px; 9531 font-size: 12.5px; 9532 } 9533`,_e=i.Ay.span` 9534 display: inline-flex; 9535 flex: none; 9536 color: ${e=>e.$accent?"var(--theme-palette-color-1)":"var(--theme-palette-color-3)"}; 9537`,Re=i.Ay.span` 9538 min-width: 0; 9539 overflow: hidden; 9540 text-overflow: ellipsis; 9541 white-space: nowrap; 9542`,je=(0,i.Ay)(v.bd)` 9543 flex: none; 9544 font-weight: 500; 9545 color: var(--theme-palette-color-3); 9546`,Je=i.Ay.a` 9547 flex: none; 9548 color: var(--theme-palette-color-1); 9549 text-decoration: none; 9550 &:hover { 9551 text-decoration: underline; 9552 } 9553`;function Be({conv:e,messages:t,lastReadAtOpen:n,newWith:i,loadError:a,onRetry:l}){const s=Number(window.DotGGUser??0),d=(0,o.li)(null),c=(0,o.li)(!1),p=(0,o.li)(!0),h=(0,o.Kr)(()=>function(e,t,n,r){const o=null===n?-1:e.findIndex(e=>e.id>n&&e.user!==t&&!e.status),i=o>0?e.slice(o).filter(e=>e.user!==t&&!e.status).length:0,a=[];let l="",s=null;for(const[n,d]of e.entries()){const e=(0,Le.nt)(d.created,r);e!==l&&((n>
95530||"Today"!==e)&&a.push({kind:"day",key:`d${d.id}`,label:e}),l=e,s=null),n===o&&i>0&&(a.push({kind:"new",key:`n${d.id}`,count:i}),s=null);const c=d.user===t,p=s?.messages[s.messages.length-1];!s||s.mine!==c||d.status||p?.status?(s={kind:"group",key:`g${d.id}`,mine:c,messages:[d]},a.push(s)):s.messages.push(d)}return a}(t,s,n,Date.now()/1e3),[t,s,n]),u=e?.other.nickname??i?.nickname??"",g="request"===e?.my_state,m=!0===e?.blocked,f=t.length>0&&t[t.length-1]?.user===s;return(0,o.Nf)(()=>{const e=d.current;if(e&&0!==t.length){if(!c.current){c.current=!0;const t=e.querySelector("[data-new-rule]");return void(e.scrollTop=t?Math.max(0,t.offsetTop-e.clientHeight/4):e.scrollHeight)}(p.current||f)&&(e.scrollTop=e.scrollHeight)}},[t.length,f]),(0,r.FD)(ue,{ref:d,onScroll:e=>{const t=e.currentTarget;p.current=t.scrollHeight-t.scrollTop-t.clientHeight<120},children:[t.length>=200&&(0,r.FD)(fe,{children:["Showing the latest ",200," messages"]}),e?.origin&&(0,r.Y)(Pe,{origin:e.origin,me:s,inert:g}),""!==a&&(0,r.Y)(Ke,{role:"alert",children:a}),!e&&i&&0===t.length&&(0,r.FD)(We,{children:["Say hello to ",i.nickname,". Your first message arrives as a request unless they already know you."]}),h.map(t=>"day"===t.kind?(0,r.Y)(ge,{children:t.label},t.key):"new"===t.kind?(0,r.FD)(ge,{$new:!0,"data-new-rule":"",children:[t.count," new"]},t.key):(0,r.Y)(me,{$mine:t.mine,$dim:m,children:t.messages.map((n,o)=>(0,r.Y)(Me.s,{entry:n,mine:t.mine,otherName:u,editable:!1,meta:o===t.messages.length-1,stamp:(0,Le.zH)(n.created),note:t.mine&&e?.pending?"sent as a request":void 0,status:n.status,failure:n.failure,onRetry:"failed"===n.status?()=>l(n.body):void 0,guarded:g||m},n.id))},t.key))]})}const Ke=i.Ay.div` 9554 align-self: center; 9555 padding: 8px 0; 9556 font-size: 13px; 9557 color: ${u.Q.danger}; 9558`,We=i.Ay.div` 9559 align-self: center; 9560 max-width: 360px; 9561 padding: 12px 0; 9562 font-size: 13px; 9563 line-height: 1.5; 9564 text-align: center; 9565 color: var(--theme-palette-color-3); 9566`,Ue={1:"once",2:"twice"};function Qe(e){return e?.joined?(0,R.Zu)(new Date(1e3*e.joined)):""}function Ge({other:e,conv:t,about:n,isNew:o,onBack:i,menu:a}){const s=function(e,t,n,r){return e?.blocked?"Blocked":"request"===e?.my_state?`${Qe(r)||"Message request"} · you haven't talked before`:e?.pending?`Waiting for ${t?.nickname??"them"} to accept`:e||n?function(e){if(!e)return"";const t=e.traded>0?`You traded ${Ue[e.traded]??`${e.traded} times`}`:"";return[t,e.you_follow?t?"you follow them":"You follow them":""].filter(Boolean).join(" · ")}(r)||Qe(r)||(n?"New conversation":""):""}(t,e,o,n),d="request"===t?.my_state&&!t.blocked;return(0,r.FD)(de,{children:[(0,r.Y)(He,{type:"button",$bare:!0,"aria-label":"Back to conversations",onClick:i,children:(0,r.Y)(l.gu,{size:20})}),e&&(0,r.Y)(x.$I,{user:e,size:36,phoneSize:32}),(0,r.FD)(ce,{children:[e&&(0,r.Y)(pe,{href:(0,j.Lp)(e.nickname),children:e.nickname}),s&&(0,r.Y)(he,{children:d?(0,r.FD)(r.FK,{children:[(0,r.Y)(v.bd,{children:s}),(0,r.Y)(v.sj,{children:"Message request"})]}):s})]}),a]})}const He=(0,i.Ay)(M.S)` 9567 display: none; 9568 @media only screen and ${p.E0} { 9569 display: inline-flex; 9570 color: var(--theme-palette-color-4); 9571 } 9572`;var qe=n(64900),Ve=n(12434);function Xe({conversationId:e,newWith:t,origin:n,hideOnPhone:i,person:s,tradeSite:d,onBack:c,onCreated:p,onChanged:u,onClosed:g,onRead:m}){const f=function(e,t,n,r){const i=Number(window.DotGGUser??0),l=Ve.Ay.TheGame.toLowerCase(),[s,d]=(0,o.J0)(null),[c,p]=(0,o.J0)(null),[h,u]=(0,o.J0)([]),[g,m]=(0,o.J0)(null),[f,x]=(0,o.J0)(""),[v,y]=(0,o.J0)(null),w=(0,o.li)(0),b=(0,o.li)(!1),$=(0,o.li)(0),k=(0,o.li)(r);k.current=r;const Y=(0,o.hb)(()=>{if(e<=0)return;const t=++$.current;(0,a.QL)(e,b.current?void 0:l).then(n=>{if(t!==$.current)return;d(n.conversation),u(n.messages),x(""),b.current||(b.current=!0,y(n.conversation.last_read_id??null),p(n.about??null));const r=n.messages[n.messages.length-1];r&&r.id!==w.current&&(w.current=r.id,r.user!==i&&"accepted"===n.conversation.my_state&&(0,a.vs)(e).then(()=>{(0,qe.jP)(),k.current.read(e)}).catch(()=>{w.current=0}))}).catch(e=>{t===$.current&&x(e.message||"Couldn't load the conversation.")})},[e,i,l]),A=e>0?0:t?.user_id??0;return(0,o.vJ)(()=>
9572{if(A<=0)return;let e=!0;return(0,a.hG)(A,l).then(t=>{e&&p(t.about??null)}).catch(()=>{}),()=>{e=!1}},[A,l]),(0,o.vJ)(()=>{d(null),p(null),u([]),m(null),x(""),y(null),w.current=0,b.current=!1,Y();const e=setInterval(()=>{"visible"===document.visibilityState&&Y()},2e4),t=$;return()=>{clearInterval(e),t.current++}},[Y]),{conv:s,about:c,messages:g?[...h,g]:h,loadError:f,lastReadAtOpen:v,sending:"sending"===g?.status,reload:Y,send:async r=>{const o=r.trim();if(!o||"sending"===g?.status)return;const s={id:-Date.now(),user:i,body:o,created:Math.floor(Date.now()/1e3),status:"sending"};m(s);try{const r=await(0,a._z)({conversationId:e>0?e:void 0,to:e>0?void 0:t?.user_id,body:o,game:l,origin:e>0?null:n});if(m(null),e<=0)return void k.current.created(r.conversation_id);w.current=r.message.id,u(e=>[...e,r.message]),d(e=>e&&e.pending!==r.pending?{...e,pending:r.pending}:e)}catch(e){const t=e instanceof Error?e.message:"";throw m({...s,status:"failed",failure:t}),e instanceof Error?e:new Error("Couldn't send. Try again.")}}}}(e,t,n,{created:p,read:m}),[x,y]=(0,o.J0)(""),[w,b]=(0,o.J0)(!1),[$,k]=(0,o.J0)(!1),[Y,A]=(0,o.J0)(!1),C=(0,h.WS)(),F=(0,o.li)(null),D=Number(window.DotGGUser??0),S=f.conv,I=S?.other??t,z=I?.nickname??"";(0,o.vJ)(()=>{const e=F.current;C&&!i&&e&&window.scrollTo({top:window.scrollY+e.getBoundingClientRect().top-50})},[C,i,e]);const T=e=>{f.send(e).then(()=>{y(t=>t.trim()===e.trim()?"":t),A(!1)}).catch(()=>{})},E=(e,t)=>S?(0,r.Y)(Ae,{conversationId:S.id,nickname:z,inSheet:e,onCancel:()=>t?t():b(!1),onDone:()=>{t?.(),b(!1),f.reload(),u()}}):null;let L=null;return w&&S?L=E(!1):S?.blocked?L=(0,r.FD)($e,{children:[(0,r.Y)(Ze,{}),"You can't message each other."]}):"request"===S?.my_state?L=(0,r.Y)(ze,{nickname:z,onAccept:()=>(0,a.Ym)(S.id).then(()=>{A(!0),f.reload(),u()}),onIgnore:()=>(0,a.Qx)(S.id),onIgnored:()=>{u(),g()},onReport:()=>b(!0)}):S?.pending&&f.messages.some(e=>e.user===D&&!e.status)?L=(0,r.FD)($e,{children:[(0,r.Y)(l._L,{size:16}),"Sent as a message request. You can write more once ",z," accepts."]}):(S||t)&&(L=(0,r.FD)(r.FK,{children:[Y&&(0,r.Y)(ye,{$tone:"good",role:"status",children:(0,r.FD)(be,{children:["â Accepted. ",z," can write to you now; reply below."]})}),(0,r.Y)(ee,{nickname:z,draft:x,setDraft:y,sending:f.sending,onSend:()=>T(x)})]})),(0,r.FD)(r.FK,{children:[(0,r.FD)(v.Fz,{ref:F,$hideOnPhone:i,children:[(0,r.Y)(Ge,{other:I,conv:S,about:f.about,isNew:e<=0,onBack:c,menu:I?(0,r.Y)(M.n,{title:z,bareOnPhone:!0,items:[{id:"profile",label:"View profile",href:(0,j.Lp)(z)},...d?[{id:"trade",label:"Propose trade",onSelect:()=>k(!0)}]:[],...S&&!S.blocked?[{id:"report",label:"Block & reportâ¦",danger:!0,onSelect:()=>b(!0),page:e=>E(!0,e)}]:[]]}):null}),(0,r.Y)(Be,{conv:S,messages:f.messages,lastReadAtOpen:f.lastReadAtOpen,newWith:t,loadError:f.loadError,onRetry:T},e),L]}),s&&I&&(0,r.Y)(K,{user:I,about:f.about,onPropose:()=>k(!0)}),$&&I&&(0,r.Y)(Z.l,{target:{user:(0,O.TG)(I.user_id,I.nickname)},onClose:()=>k(!1),onOpen:e=>window.location.assign(`/trade/inbox/${e}/`)})]})}function Ze(){return(0,r.Y)(et,{children:(0,r.Y)(l.r7,{})})}const et=i.Ay.span` 9573 display: inline-flex; 9574 flex: none; 9575 color: ${u.Q.danger}; 9576`;function tt(){const[e]=(0,o.J0)(L.VF),[t,n]=(0,o.J0)(e.view),[i,p]=(0,o.J0)(e.c),[u,g]=(0,o.J0)(null),[m,f]=(0,o.J0)(""),x=(0,c.x3)(),y=(0,h.WS)(),w=function(e,t){const[n,r]=(0,o.J0)(null),[i,l]=(0,o.J0)(0),[s,d]=(0,o.J0)(!1),c=(0,o.li)(0),p=(0,o.hb)(()=>{const t=++c.current;(0,a.Zn)(e).then(e=>{t===c.current&&(r(e.conversations),l(e.counts.requests),d(!1))}).catch(()=>{t===c.current&&d(!0)})},[e]);(0,o.vJ)(()=>{if(!t)return;r(null),d(!1),p();const e=setInterval(()=>{"visible"===document.visibilityState&&p()},6e4);return()=>clearInterval(e)},[p,t]);const h=(0,o.hb)(e=>{r(t=>t?.map(t=>t.id===e?{...t,unread:!1,unread_count:0}:t)??t)},[]);return{rows:n,requests:i,failed:s,refresh:p,markRead:h}}(t,x),b=!0===d.SA.collection?.collectionCanTrade,k=(0,o.li)(null),Y=function(e){const[t,n]=(0,o.J0)(!1);return(0,o.vJ)(()=>{const t=e.current;if(!t||"undefined"==typeof ResizeObserver)return;const r=()=>n(t.getBoundingClientRect().width>=1280);r();const o=new ResizeObserver(r);return o.observe(t),()=>o.disconnect()},[e,1280]),t}(k),A=(0,o.li)(0),F=i>0||null!==u;(0,o.vJ)(()=>{e.to<=0||!x||(0,a.hG)(e.to).then(e=>{e.conversation_id>0?(p(e.conversation_id),(0,L.qo)("inbox",e.conversation_id)):e.other&&g(e.other)}).catch(e=>f(e.message||"Couldn't open that conversation."))},[e.to,x]),(0,o.vJ)(()=>{const e=()=>{const e=(0,L.VF)();n(e.view),p(e.c),g(null)};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[]),(0,o.vJ)(()=>{y&&!F&&window.scrollTo({top:A.current})},[y,F]);const D=(0,o.hb)(()=>{p(0),g(null),(0,L.qo)(t,0)},[t]);if(!x)return(0,r.FD)(v.YW,{children:[(0,r.Y)(v.sT,{children:"Messages"}),(0,r.FD)(v.t7,{children:[(0,r.Y)("a",{href:(0,s.u)(window.location.href),children:"Sign in"})," to see your messages."]})]});const S=e=>{n(e),f(""),p(0),g(null),(0,L.qo)(e,0)},I=null!==w.rows&&0===w.rows.length&&!F;return(0,r.FD)(v.YW,{children:[(0,r.Y)(nt,{$hideOnPhone:F,children:"Messages"}),(0,r.Y)(v.$f,{ref:k,$person:b&&Y&&F,$single:I,children:I?(0,r.Y)(C,{view:t,onView:S,requests:w.requests,tradeSite:b}):(0,r.FD)(r.FK,{children:[(0,r.Y)($,{view:t,onView:S,rows:w.rows,failed:w.failed,requests:w.requests,activeId:i,onOpen:e=>{A.current=window.scrollY,g(null),f(""),p(e),(0,L.qo)(t,e,!0)},hideOnPhone:F,tradeDoor:b}),F?(0,r.Y)(Xe,{conversationId:i,newWith:i>0?null:u,origin:i>0?null:e.from,hideOnPhone:!1,person:b&&Y,tradeSite:b,onBack:()=>{i>0&&function(e){const t=window.history.state;return"object"==typeof t&&null!==t&&"dmThread"in t&&t.dmThread===e}(i)?window.history.back():D()},onCreated:e=>{g(null),n("inbox"),p(e),(0,L.qo)("inbox",e),w.refresh()},onChanged:w.refresh,onClosed:D,onRead:w.markRead},i>0?i:`to-${u?.user_id??0}`):(0,r.FD)(rt,{$hideOnPhone:!0,children:[(0,r.Y)(l.pj,{size:22}),m?(0,r.Y)(ot,{role:"alert",children:m}):"Pick a conversation to read it here."]})]})})]})}const nt=(0,i.Ay)(v.sT)` 9577 @media only screen and ${p.E0} { 9578 display: ${e=>e.$hideOnPhone?"none":"block"}; 9579 } 9580`,rt=(0,i.Ay)(v.Fz)` 9581 grid-column: 2 / -1; 9582 align-items: center; 9583 justify-content: center; 9584 gap: 10px; 9585 padding: 32px; 9586 font-size: 13px; 9587 text-align: center; 9588 color: var(--theme-palette-color-3); 9589 background: ${u.Q.threadBg}; 9590`,ot=i.Ay.span` 9591 color: ${u.Q.danger}; 9592`},38608(e,t,n){n.d(t,{n:()=>h});var r=n(10201),o=n(17402),i=n(63679),a=n(62018),l=n(1070),s=n(7718),d=n(28297),c=n(53794),p=n(30821);function h({title:e,items:t,bareOnPhone:n=!1}
9592){return(0,c.WS)()?(0,r.Y)(g,{title:e,items:t,bare:n}):(0,r.Y)(u,{title:e,items:t})}function u({title:e,items:t}){const[n,i]=(0,o.J0)(null);return(0,r.FD)(r.FK,{children:[(0,r.Y)(x,{type:"button",title:"More","aria-label":`More: ${t.map(e=>e.label).join(", ")}`,"aria-haspopup":"menu","aria-expanded":null!==n,onClick:e=>{const t=e.currentTarget.getBoundingClientRect();i({x:Math.max(8,t.right-210),y:t.bottom+6})},children:l.bZ}),n&&(0,r.Y)(a.d,{anchor:n,label:e,minWidth:210,onClose:()=>i(null),items:t.filter(e=>void 0!==e.href||void 0!==e.onSelect).map(e=>({id:e.id,label:e.label,onSelect:()=>e.href?window.location.assign(e.href):e.onSelect?.()}))})]})}function g({title:e,items:t,bare:n}){const[i,a]=(0,o.J0)(!1),[d,c]=(0,o.J0)(0),p=()=>{a(!1),c(e=>e+1)};return(0,r.Y)(s.er,{title:e,label:`More: ${t.map(e=>e.label).join(", ")}`,open:i,onOpenChange:a,trigger:(t,o)=>(0,r.Y)(x,{type:"button",$bare:n,"aria-label":`More for ${e}`,"aria-haspopup":"dialog","aria-expanded":o,onClick:t,children:l.bZ}),children:t.map(e=>{if(e.control)return(0,r.FD)(s.aE,{children:[(0,r.Y)(f,{children:e.label}),e.control]},e.id);if(e.page){const t=e.page;return(0,r.Y)(s.Dp,{label:e.label,trigger:(t,n)=>(0,r.Y)(m,{type:"button",$danger:e.danger,...n,onClick:t,children:e.label}),children:t(p)},e.id)}return e.href?(0,r.Y)(m,{as:"a",href:e.href,$danger:e.danger,children:e.label},e.id):(0,r.Y)(m,{type:"button",$danger:e.danger,onClick:()=>{p(),e.onSelect?.()},children:e.label},e.id)})},d)}const m=(0,i.Ay)(s.WH)` 9593 font-weight: 600; 9594 color: ${e=>e.$danger?p.Q.danger:"var(--theme-palette-color-4)"}; 9595 text-decoration: none; 9596`,f=i.Ay.span` 9597 flex: 1; 9598 min-width: 0; 9599 font-weight: 600; 9600`,x=i.Ay.button` 9601 flex: none; 9602 display: inline-flex; 9603 align-items: center; 9604 justify-content: center; 9605 width: 40px; 9606 height: 40px; 9607 padding: 0; 9608 border: none; 9609 border-radius: 6px; 9610 background: none; 9611 box-shadow: inset 0 0 0 1px var(--theme-palette-color-5); 9612 color: var(--theme-palette-color-3); 9613 cursor: pointer; 9614 &:hover { 9615 color: var(--theme-palette-color-4); 9616 background: ${p.Q.hoverFill}; 9617 } 9618 &:focus-visible { 9619 outline: 2px solid var(--theme-palette-color-4); 9620 outline-offset: 2px; 9621 } 9622 @media only screen and ${d.E0} { 9623 width: ${44}px; 9624 height: ${44}px; 9625 ${e=>e.$bare?"box-shadow: none;":""} 9626 } 9627`;n.d(t,["S",0,x])},59061(e,t,n){n.d(t,{gG:()=>l,nt:()=>s,zH:()=>d});var r=n(31777);function o(e){const t=new Date(1e3*e);return t.setHours(0,0,0,0),t.getTime()/1e3}function i(e,t){return Math.round((o(t)-o(e))/86400)}function a(e,t){const n=new Date(1e3*e),r=n.getFullYear()===new Date(1e3*t).getFullYear();return n.toLocaleDateString(void 0,r?{month:"short",day:"numeric"}:{month:"short",day:"numeric",year:"numeric"})}function l(e,t=Date.now()/1e3){const n=i(e,t);return n<=0?(0,r.fF)(e,t):1===n?"Yesterday":a(e,t)}function s(e,t=Date.now()/1e3){const n=i(e,t);return n<=0?"Today":1===n?"Yesterday":a(e,t)}function d(e,t=Date.now()/1e3){return i(e,t)<=0?(0,r.fF)(e,t):new Date(1e3*e).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"}).toLowerCase()}},36856(e,t,n){var r=n(63679),o=n(28297),i=n(30821);const a=r.Ay.div` 9628 display: flex; 9629 flex-direction: column; 9630 gap: 12px; 9631 min-width: 0; 9632 margin: 4px 0 24px; 9633 @media only screen and ${o.E0} { 9634 gap: 4px; 9635 margin-bottom: 0; 9636 } 9637`,l=r.Ay.h1` 9638 margin: 0; 9639 font-size: 28px; 9640 font-weight: 700; 9641 line-height: 1.15; 9642 letter-spacing: -0.01em; 9643 color: var(--theme-palette-color-4); 9644 @media only screen and ${o.E0} { 9645 font-size: 24px; 9646 padding: 4px 4px 8px; 9647 } 9648`,s=r.Ay.div` 9649 display: grid; 9650 grid-template-columns: ${function(e){return e.$single?"minmax(0, 1fr)":e.$person?"340px minmax(0, 1fr) 280px":"minmax(280px, 340px) minmax(0, 1fr)"}}; 9651 height: clamp(520px, calc(100dvh - 200px), 820px); 9652 border: 1px solid var(--theme-palette-color-5); 9653 border-radius: 8px; 9654 background: var(--theme-palette-color-8); 9655 overflow: hidden; 9656 @media only screen and ${o.E0} { 9657 display: block; 9658 height: auto; 9659 border: none; 9660 border-radius: 0; 9661 background: none; 9662 overflow: visible; 9663 } 9664`,d=r.Ay.div` 9665 display: flex; 9666 flex-direction: column; 9667 min-width: 0; 9668 min-height: 0; 9669 overflow-y: auto; 9670 border-right: 1px solid var(--theme-palette-color-5); 9671 @media only screen and ${o.E0} { 9672 display: ${e=>e.$hideOnPhone?"none":"flex"}; 9673 overflow: visible;
9674 border-right: none; 9675 } 9676`,c=r.Ay.div` 9677 display: flex; 9678 flex-direction: column; 9679 min-width: 0; 9680 min-height: 0; 9681 @media only screen and ${o.E0} { 9682 display: ${e=>e.$hideOnPhone?"none":"flex"}; 9683 height: calc(100dvh - ${50}px - var(--dotgg-page-reserve, 8px)); 9684 border: 1px solid var(--theme-palette-color-5); 9685 border-radius: 8px; 9686 background: var(--theme-palette-color-8); 9687 overflow: hidden; 9688 } 9689`,p=r.Ay.div` 9690 flex: none; 9691 padding: 10px; 9692 border-bottom: 1px solid ${i.Q.rowRule}; 9693 @media only screen and ${o.E0} { 9694 padding: 4px 0 10px; 9695 border-bottom: none; 9696 } 9697`,h=r.Ay.div` 9698 display: flex; 9699 flex-direction: column; 9700 @media only screen and ${o.E0} { 9701 background: var(--theme-palette-color-8); 9702 border: 1px solid var(--theme-palette-color-5); 9703 border-radius: 8px; 9704 overflow: hidden; 9705 > :last-child { 9706 border-bottom: none; 9707 } 9708 } 9709`,u=r.Ay.span` 9710 display: inline-flex; 9711 align-items: center; 9712 justify-content: center; 9713 flex: none; 9714 min-width: 18px; 9715 height: 18px; 9716 padding: 0 5px; 9717 box-sizing: border-box; 9718 border-radius: 9px; 9719 background: ${i.Q.unread}; 9720 color: var(--dotgg-on-accent, var(--theme-palette-color-8)); 9721 font-size: 11px; 9722 font-weight: 700; 9723 line-height: 1; 9724 @media only screen and ${o.E0} { 9725 min-width: 20px; 9726 height: 20px; 9727 padding: 0 6px; 9728 border-radius: 10px; 9729 font-size: 12px; 9730 } 9731`,g=r.Ay.span` 9732 flex: none; 9733 width: 8px; 9734 height: 8px; 9735 border-radius: 50%; 9736 background: ${i.Q.unread}; 9737`,m=r.Ay.span` 9738 @media only screen and ${o.E0} { 9739 display: none; 9740 } 9741`,f=r.Ay.span` 9742 display: none; 9743 @media only screen and ${o.E0} { 9744 display: inline; 9745 } 9746`,x=r.Ay.div` 9747 padding: 24px 16px; 9748 font-size: 13px; 9749 line-height: 1.5; 9750 text-align: center; 9751 color: var(--theme-palette-color-3); 9752`;n.d(t,["$f",0,s,"$q",0,d,"DO",0,p,"Fz",0,c,"Sc",0,h,"YW",0,a,"bd",0,m,"ni",0,u,"sT",0,l,"sj",0,f,"t7",0,x,"xx",0,g])},24541(e,t,n){n.d(t,{VF:()=>a,qo:()=>l,rx:()=>s});var r=n(7204);const o=["trade","deck","profile"];function i(e){const[t,n]=(e??"").split(":"),r=o.find(e=>e===t),i=Number(n);return r&&Number.isInteger(i)&&i>0?{kind:r,id:i}:null}function a(){const e=new URLSearchParams(window.location.search),t=Number(e.get("to"))||0;return{view:"requests"===e.get("view")?"requests":"inbox",c:Number(e.get("c"))||0,to:t,from:t>0?i(e.get("from")):null}}function l(e,t,n=!1){const r=new URLSearchParams(window.location.search);r.delete("to"),r.delete("from"),"requests"===e?r.set("view","requests"):r.delete("view"),t>0?r.set("c",String(t)):r.delete("c");const o=r.toString(),i=`${window.location.pathname}${o?`?${o}`:""}`;n?window.history.pushState({dmThread:t},"",i):window.history.replaceState(window.history.state,"",i)}function s(e,t){const n=new URLSearchParams({to:String(e)});return t&&n.set("from",`${t.kind}:${t.id}`),`${(0,r.l2)()}u/me/messages/?${n.toString()}`}},55989(e,t,n){n.d(t,{P:()=>a});var r=n(10201),o=n(69404);const i=/\b([A-Z]{1,4}\d{0,2}[a-z]?-\d{2,3}(?:-[A-Z]{1,5})?)\b/g;function a({text:e}){i.lastIndex=0;const t=[];let n=0;for(let a=i.exec(e);null!==a;a=i.exec(e)){const i=a[1];void 0!==i&&(a.index>n&&t.push(e.slice(n,a.index)),t.push((0,r.Y)(o.CardEmbed,{cardDirectId:i},`${a.index}-${i}`)),n=a.index+a[0].length)}return 0===t.length?(0,r.Y)(r.FK,{children:e}):(n<e.length&&t.push(e.slice(n)),(0,r.Y)(r.FK,{children:t}))}},23388(e,t,n){n.d(t,{I:()=>c});var r=n(10201),o=n(63679),i=n(55989),a=n(60083);const l="#7fa8d4",s=o.Ay.div` 9753 display: flex; 9754 flex-direction: column; 9755 gap: ${e=>e.$compact?"6px":"10px"}; 9756 min-width: 0; 9757 padding: ${e=>e.$compact?"0 0 0 12px":"14px 16px"}; 9758 /* 9759 * â ï¸ THE FRAMED ARM IS A BARE INTERPOLATION, NOT A QUOTED ONE. This was 9760 * written as a JS string containing the interpolation's own source text, so 9761 * the framed block rendered with NO border at all: CSS drops an invalid 9762 * declaration whole and says nothing, and the LINE token was not even 9763 * imported into this file â the identifier was inside a string, so nothing 9764 * referenced it and nothing complained. 9765 * 9766 * Third instance of this exact mistake on this surface (see MetaRow's Rank 9767 * and ArchetypeHero's Tile), and the wall built for the first two matched
9768 * only strings that are ENTIRELY one interpolation, so this shape walked 9769 * through it. Both the bug and the hole are fixed. 9770 * 9771 * No backticks in this comment: one ENDS the styled template. That is a 9772 * different trap, and it caught this very paragraph. 9773 */ 9774 border: ${e=>e.$compact?"none":`1px solid ${a.pj}`}; 9775 border-left: 2px solid ${e=>e.$compact?`${l}55`:l}; 9776 border-radius: ${e=>e.$compact?"0":"8px"}; 9777 background: ${e=>e.$compact?"none":a.zH}; 9778`,d=o.Ay.div` 9779 margin: 0; 9780 font-size: 13.5px; 9781 line-height: 1.6; 9782 color: ${a.$p}; 9783`;function c({archetype:e,compact:t=!1}){const n=e.research_note?.trim();return n?(0,r.Y)(s,{$compact:t,children:(0,r.Y)(d,{children:(0,r.Y)(i.P,{text:n})})}):null}n.d(t,["X",0,l])},24466(e,t,n){n.d(t,{Hf:()=>c,NA:()=>d,Oh:()=>u,Pc:()=>x,SM:()=>p,fd:()=>m});var r=n(86031),o=n(4738),i=n(12434);const a=e=>(0,o.fG)(e),l=(e,t=0)=>null==e?"â":`${(100*e).toFixed(t)}%`,s=e=>null==e?"â":`${e.toFixed(1)}%`;function d(e,t){return null!==e.share&&e.share_source?`${s(e.share)} of ${e.share_source.event} (${e.share_source.date})`:t}function c(e,t,n){return"7d"===e?"Last 7 days":"14d"===e?"Last 14 days":"30d"===e?"Last 30 days":"ban"===e?`Since ${n?.label??"the format change"}`:`Since ${t??"release"}`}function p(e){const t=e.players?`${a(e.place)} of ${e.players.toLocaleString("en-US")}`:a(e.place);return e.record?`${t} · ${e.event} · ${e.record}`:`${t} · ${e.event}`}const h=(e,t)=>`${i.Ay.BASE_URL}decks/${t||e}/`;function u(e,t,n=!1){return t||!e.leader?`${i.Ay.BASE_URL}decks/?at=${encodeURIComponent(e.slug)}${n?"":"&is_tournament=1"}`:`${i.Ay.BASE_URL}decks/?hascrd=${encodeURIComponent(e.leader)}`}const g=e=>`${i.Ay.BASE_URL}tournaments/${e}/`;function m(e){if(e.winrate_n)return"matches"===e.winrate_method?`Wins over ${e.winrate_n} decided matches against other archetypes, counted from the recorded rounds this archetype played in the window â mirror matches left out.`:"standings"===e.winrate_method?`Wins over ${e.winrate_n} decided rounds, from the W-L records on the standings.`:void 0}const f=e=>e>0?1.96*Math.sqrt(.25/e)*100:0;function x(e){if(e.momentum)return void 0!==e.winrate_7d&&null!==e.winrate_7d&&e.winrate_7d_n?`Last seven days: ${l(e.winrate_7d,1)} over ${e.winrate_7d_n} decided matches, against the window's rate.`:`Last seven days: ${"up"===e.momentum?"winning more":"down"===e.momentum?"winning less":"holding"} than over the window. The figure is Premium.`}n.d(t,["D3",0,f,"F9",0,e=>e.deck_id>0?h(e.deck_id,e.slug):e.event_slug?g(e.event_slug):void 0,"IE",0,a,"Oe",0,l,"Sj",0,(e,t)=>l(e,t?1:0),"U8",0,e=>!1===r.SA.decks.metaLeaderIdLabel?null:e.leader??null,"Xt",0,e=>`${i.Ay.BASE_URL}${r.SA.decks.metaArchetypePath??"meta/"}${e}/`,"_9",0,e=>`${e>0?"+":""}${e.toFixed(1)}`,"eA",0,(e,t)=>{const n=e.winrate;if(null==n)return"â";const r=`${Math.round(100*n)}%`,o=e.winrate_n??0;return t&&o>0?`${r} ±${Math.max(1,Math.round(f(o)))}`:r},"fe",0,e=>`Since ${e.label.replace(/^the /i,"")}`,"kl",0,"is wins over decided matches, mirror matches left out â counted from the recorded rounds wherever they cover at least half an archetype's placed decks, otherwise from the W-L records on the standings â with the sample printed beside it. Everyone sees it to the whole percent; the decimal, the seven-day trend and the matchups are Premium.","lt",0,s,"pu",0,(e,t,n=!1)=>t&&!n?`Decks (${e})`:"Browse decks","t2",0,h,"vz",0,e=>(r.SA.decks.metaFormats?.length??0)>1&&e?`${i.Ay.BASE_URL}meta/${e.toLowerCase()}/`:`${i.Ay.BASE_URL}meta/`,"yB",0,g])},60083(e,t,n){const r="#b0bac5",o="#6c7581",i="#ffd366",a="#6fcf97",l="#e0563d";n.d(t,["$p",0,r,"AV",0,a,"IT",0,"#2b2f36","JQ",0,{S:"#18920b",A:"#588a0d",B:"#9ea211",C:"#a07518",D:"#903e15"},"JY",0,"#101418","Pg",0,"#ffffff","QA",0,"#e9b44c","UH",0,l,"Z1",0,"#14181d","d7",0,e=>"up"===e?a:"down"===e?l:"new"===e?i:o,"dX",0,i,"ew",0,e=>e>0?a:e<0?l:o,"fi",0,e=>"old"===e?l:"stale"===e?"#e0a53d":r,"gN",0,o,"l6",0,"#171b20","pj",0,"#434a56","s",0,"#fbbe4f","vU",0,"#20252b","zH",0,"#13171b"])},40664(e,t,n){var r=n(10201),o=(n(17402),n(63679));const i=o.Ay.button` 9784 width: 40px; 9785 height: 40px; 9786 border-radius: 50%; 9787 border: none; 9788 background: rgba(255, 255, 255, 0.5); 9789 color: white; 9790 9791 display: flex; 9792 align-items: center; 9793 justify-content: center; 9794 cursor: ${e=>e.$disabled?"not-allowed":"pointer"}; 9795 9796 opacity: ${e=>e.$disabled?"0.3":"0.8"}; 9797 transition: all 0.2s ease; 9798 9799 z-index: 1001; 9800 9801 /* Reset all button styles to prevent square artifacts */ 9802 padding: 0; 9803 margin: 0; 9804 box-sizing: border-box; 9805 appearance: none; 9806 -webkit-appearance: none; 9807 -moz-appearance: none; 9808 outline: none; 9809 text-decoration: none; 9810 font-family: inherit; 9811 9812 /* Force circular shape */ 9813 min-width: 40px; 9814 min-height: 40px; 9815 max-width: 40px; 9816 max-height: 40px; 9817 overflow: hidden; 9818 9819 &:hover { 9820 opacity: ${e=>e.$disabled?"0.3":"1"}; 9821 background: rgba(255, 255, 255, 0.7); 9822 color: #000; 9823 transform: scale(${e=>e.$disabled?"1":"1.1"}); 9824 } 9825 9826 &:active { 9827 transform: scale(${e=>e.$disabled?"1":"0.95"}); 9828 } 9829 9830 &:focus { 9831 outline: 1px solid rgba(255, 255, 255, 0.5); 9832 outline-offset: 2px; 9833 } 9834 9835 /* Desktop: Position arrows at 50% of viewport height instead of modal height */ 9836 @media only screen and (min-width: 769px) { 9837 position: fixed; 9838 top: 50vh; 9839 transform: translateY(-50%); 9840 ${e=>
9840"left"===e.$direction?"left: 20px;":"right: 20px;"} 9841 9842 &:hover { 9843 transform: translateY(-50%) scale(${e=>e.$disabled?"1":"1.1"}); 9844 } 9845 9846 &:active { 9847 transform: translateY(-50%) scale(${e=>e.$disabled?"1":"0.95"}); 9848 } 9849 } 9850 9851 /* Mobile: Style for bottom navigation row */ 9852 @media only screen and (max-width: 768px) { 9853 position: relative; 9854 width: 36px; 9855 height: 36px; 9856 min-width: 36px; 9857 min-height: 36px; 9858 max-width: 36px; 9859 max-height: 36px; 9860 } 9861`,a=o.Ay.div` 9862 display: flex; 9863 align-items: center; 9864 justify-content: center; 9865 width: 24px; 9866 height: 24px; 9867`,l=o.Ay.div` 9868 background: var(--theme-palette-color-8); 9869 border: 1px solid var(--theme-palette-color-5); 9870 border-radius: 20px; 9871 font-variant-numeric: tabular-nums; 9872 color: var(--theme-palette-color-3); 9873 font-weight: 500; 9874 white-space: nowrap; 9875 9876 ${e=>e.$inline?"\n /* Static pill inside a modal footer */\n padding: 5px 14px;\n font-size: 0.85em;\n ":"\n padding: 8px 16px;\n font-size: 0.9em;\n z-index: 1001;\n\n /* Desktop: Position below modal center */\n @media only screen and (min-width: 769px) {\n position: absolute;\n bottom: -50px;\n left: 50%;\n transform: translateX(-50%);\n }\n\n /* Mobile: Style for bottom navigation row */\n @media only screen and (max-width: 768px) {\n position: relative;\n font-size: 0.8em;\n padding: 6px 12px;\n }\n "} 9877`;n.d(t,["Z",0,({current:e,total:t,inline:n})=>(0,r.FD)(l,{$inline:n,children:[e," / ",t]}),"i",0,({direction:e,onClick:t,disabled:n,itemType:o="item"})=>(0,r.Y)(i,{$direction:e,$disabled:n,onClick:e=>{e.preventDefault(),e.stopPropagation(),n||t()},title:`Navigate to ${"left"===e?"previous":"next"} ${o} (${"left"===e?"â":"â"})`,children:(0,r.Y)(a,{$direction:e,children:(0,r.Y)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:"left"===e?(0,r.Y)("path",{d:"M15.41 7.41L14 6L8 12L14 18L15.41 16.59L10.83 12L15.41 7.41Z",fill:"currentColor"}):(0,r.Y)("path",{d:"M8.59 16.59L10 18L16 12L10 6L8.59 7.41L13.17 12L8.59 16.59Z",fill:"currentColor"})})})})])},7718(e,t,n){n.d(t,{er:()=>A,WH:()=>I,p$:()=>L,oG:()=>E,Dp:()=>C,aE:()=>S,DQ:()=>F});var r=n(10201),o=n(17402),i=n(63679),a=n(70213),l=n(12998),s=n(91111),d=n(28297),c=n(30821);const p=i.Ay.button` 9878 display: inline-flex; 9879 align-items: center; 9880 justify-content: center; 9881 width: 44px; 9882 height: 44px; 9883 flex: none; 9884 border: 1px solid var(--theme-palette-color-5); 9885 border-radius: 6px; 9886 background: none; 9887 color: var(--theme-palette-color-3); 9888 cursor: pointer; 9889 svg { 9890 display: block; 9891 } 9892`,h=i.Ay.div` 9893 position: fixed; 9894 inset: 0; 9895 z-index: 89000; 9896 background: rgba(0, 0, 0, 0.55); 9897`,u=i.Ay.div` 9898 position: absolute; 9899 left: 0; 9900 right: 0; 9901 bottom: var(--dotgg-bottom-obstruction, 0px); 9902 max-height: ${e=>e.$tall?"calc(100% - 80px - var(--dotgg-bottom-obstruction, 0px))":"72%"}; 9903 display: flex; 9904 flex-direction: column; 9905 background: var(--theme-palette-color-8); 9906 border-top: 1px solid var(--theme-palette-color-5); 9907 border-radius: 12px 12px 0 0; 9908 box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.35); 9909 /* It takes focus itself on open; it is not a control. */ 9910 outline: none; 9911`,g=i.Ay.div` 9912 flex: none; 9913 display: flex; 9914 align-items: center; 9915 gap: 4px; 9916 padding: 10px 8px 10px 16px; 9917 @media only screen and ${d.Ab} { 9918 padding-left: 12px; 9919 } 9920 border-bottom: 1px solid var(--theme-palette-color-5); 9921 font-size: 10.5px; 9922 font-weight: 700; 9923 letter-spacing: 0.07em; 9924 text-transform: uppercase; 9925 color: var(--theme-palette-color-3); 9926 > span { 9927 flex: 1; 9928 min-width: 0; 9929 } 9930 /* The back chevron lives in the head's left slot, so the title moves right 9931 of it and the 16px padding becomes part of the 44px box. */ 9932 > button:first-child { 9933 margin-left: -10px; 9934 color: var(--theme-palette-color-1); 9935 } 9936 /* The account layer's head (A6âA8): a list's title, not a tool's label. 9937 The 44px buttons set the row's height, so they lose the -10px pull. */ 9938 ${e=>e.$large&&`\n padding-top: 4px;\n padding-bottom: 6px;\n padding-right: 4px;\n border-bottom-color: ${c.Q.rowRule};\n font-size: 17px;\n letter-spacing: normal;\n text-transform: none;\n color: var(--theme-palette-color-4);\n > button {\n margin-top: 0;\n margin-bottom: 0;\n }\n `} 9939`,m=i.Ay.span` 9940 flex: none; 9941 display: block; 9942 width: 36px; 9943 height: 4px; 9944 margin: 8px auto 0; 9945 border-radius: 2px; 9946 background: var(--theme-palette-color-5); 9947`,f=i.Ay.button` 9948 display: inline-flex; 9949 align-items: center; 9950 justify-content: center; 9951 width: 44px; 9952 height: 44px; 9953 flex: none; 9954 margin: -10px 0; 9955 border: none; 9956 border-radius: 6px; 9957 background: none; 9958 color: var(--theme-palette-color-3); 9959 cursor: pointer; 9960 svg { 9961 display: block; 9962 } 9963`,x=i.Ay.div` 9964 ${e=>e.$hidden?"display: none;":""} 9965`,v=i.Ay.div` 9966 flex: 1 1 auto; 9967 min-height: ${e=>void 0===e.$floor?"0":`${e.$floor}px`}; 9968 overflow-y: auto; 9969 -webkit-overflow-scrolling: touch; 9970 overscroll-behavior: contain; 9971`,y=i.Ay.div` 9972 flex: none; 9973 display: flex; 9974 align-items: center; 9975 gap: 8px; 9976 padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px)); 9977 @media only screen and ${d.Ab} { 9978 padding-left: 12px; 9979 padding-right: 12px; 9980 } 9981 border-top: 1px solid var(--theme-palette-color-5); 9982 background: var(--theme-palette-color-8); 9983`;var w=n(75817);const b=(0,o.q6)(null),$=()=>(0,r.FD)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"
9983currentColor","aria-hidden":"true",children:[(0,r.Y)("circle",{cx:"5",cy:"12",r:"2"}),(0,r.Y)("circle",{cx:"12",cy:"12",r:"2"}),(0,r.Y)("circle",{cx:"19",cy:"12",r:"2"})]}),k=()=>(0,r.Y)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:(0,r.Y)("path",{d:"M9 6l6 6-6 6"})}),Y=()=>(0,r.Y)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:(0,r.Y)("path",{d:"M15 6l-6 6 6 6"})});function A({title:e,label:t,children:n,trigger:i,footer:d,open:c,onOpenChange:w,returnFocusTo:k,headAction:A,heading:C,tall:F}){const[D,S]=(0,o.J0)(!1),I=c??D,z=e=>{void 0===c&&S(e),w?.(e)},[T,E]=(0,o.J0)(null),[L,M]=(0,o.J0)(null),N=(0,o.li)(null),P=()=>{E(null),z(!1)};(0,l.r)(I,P,N,k);const[O,_]=(0,o.J0)(null);(0,o.vJ)(()=>{null!==O&&(N.current?.querySelector(`[data-sheet-nav="${CSS.escape(O)}"]`)?.focus({preventScroll:!0}),_(null))},[O]);const[R,j]=(0,o.J0)(void 0);return(0,r.FD)(r.FK,{children:[i?i(()=>z(!0),I):(0,r.Y)(p,{type:"button",title:t,"aria-label":t,"aria-haspopup":"dialog","aria-expanded":I,onClick:()=>z(!0),children:(0,r.Y)($,{})}),I&&(0,r.Y)(s.f,{children:(0,r.Y)(h,{onMouseDown:e=>{e.target===e.currentTarget&&P()},children:(0,r.FD)(u,{ref:N,role:"dialog","aria-modal":"true","aria-label":T?T.from:e,tabIndex:-1,$tall:F,children:["large"===C&&(0,r.Y)(m,{"aria-hidden":"true"}),(0,r.FD)(g,{$large:"large"===C,children:[T&&(0,r.Y)(f,{type:"button","aria-label":"Back",title:"Back",onClick:()=>{const e=T?.from??null;E(null),j(void 0),_(e)},children:(0,r.Y)(Y,{})}),(0,r.Y)("span",{children:T?T.from:e}),!T&&A,(0,r.Y)(f,{type:"button","aria-label":"Close",title:"Close",onClick:P,children:(0,r.Y)(a.MR,{size:18})})]}),(0,r.Y)(v,{"data-sheet-body":!0,$floor:R,children:(0,r.FD)(b.Provider,{value:{open:e=>{j(N.current?.querySelector("[data-sheet-body]")?.clientHeight),E(e)},active:T?.from??null,slot:L},children:[(0,r.Y)(x,{$hidden:null!==T,children:n}),(0,r.Y)("div",{ref:M})]})}),d&&!T&&(0,r.Y)(y,{children:d(P)})]})})})]})}function C({label:e,summary:t,children:n,trigger:i}){const a=(0,o.NT)(b),l=a?.active===e,s=()=>a?.open({from:e});return(0,r.FD)(r.FK,{children:[i?i(s,{"data-sheet-nav":e}):(0,r.FD)(I,{type:"button","data-sheet-nav":e,onClick:s,children:[(0,r.Y)("span",{children:e}),(0,r.FD)(z,{children:[t,(0,r.Y)(T,{children:(0,r.Y)(k,{})})]})]}),l&&a?.slot?(0,o.d5)(n,a.slot):null]})}function F(){return null!==(0,o.NT)(b)}const D=`\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n min-height: 48px;\n padding: 0 16px;\n box-sizing: border-box;\n @media only screen and ${d.Ab} {\n padding-left: 12px;\n padding-right: 12px;\n }\n border-bottom: 1px solid var(--theme-palette-color-5);\n font-family: inherit;\n font-size: 14px;\n text-align: left;\n color: var(--theme-palette-color-4);\n`,S=i.Ay.div` 9984 ${D} 9985 /* A control that renders nothing for this visitor must not leave a blank 9986 48px row behind it: the deck sheet showed one to every signed-out reader, 9987 because BuyMissingOnlyRow is guest-hidden and its wrapper was not. 9988 Same guard SheetBlock has carried since round 3. */ 9989 &:empty { 9990 display: none; 9991 } 9992 /* Long-hand on purpose: the shorthand would be emitted after the 320 arm 9993 inside sheetRowCss and would win over it. */ 9994 padding-top: 4px; 9995 padding-bottom: 4px; 9996`,I=i.Ay.button` 9997 ${D} 9998 justify-content: space-between; 9999 background: none; 10000 cursor: pointer; 10001 &[disabled] { 10002 opacity: 0.5; 10003 cursor: default; 10004 } 10005 svg { 10006 flex: none; 10007 } 10008`,z=i.Ay.span` 10009 display: inline-flex; 10010 align-items: center; 10011 gap: 8px; 10012 min-width: 0; 10013 max-width: 60%; 10014 margin-left: auto; 10015`,T=i.Ay.span` 10016 display: inline-flex; 10017 flex: none; 10018 color: var(--theme-palette-color-1); 10019`,E=i.Ay.div` 10020 padding: 14px 16px 6px; 10021 @media only screen and ${d.Ab} { 10022 padding-left: 12px; 10023 padding-right: 12px; 10024 } 10025 ${e=>e.$flush?"":"border-bottom: 1px solid var(--theme-palette-color-5);"} 10026 font-size: 10.5px; 10027 font-weight: 700; 10028 letter-spacing: 0.07em; 10029 text-transform: uppercase; 10030 color: var(--theme-palette-color-3); 10031`,L=i.Ay.div` 10032 display: flex; 10033 flex-direction: column; 10034 > * { 10035 ${D} 10036 } 10037 ${w.K0} { 10038 font-size: 14px; 10039 border-radius: 0; 10040 svg { 10041 width: 18px; 10042 height: 18px; 10043 } 10044 } 10045`},99529(e,t,n){n.d(t,{q:()=>a});var r=n(10201),o=n(63679),i=n(16133);function a({when:e,today:t}){return(0,r.FD)(l,{"aria-hidden":"true",$today:t,children:[(0,r.Y)(s,{children:(0,i.GP)(e,"MMM")}),(0,r.Y)(d,{children:(0,i.GP)(e,"d")})]})}const l=o.Ay.div` 10046 display: flex; 10047 flex-direction: column; 10048 align-items: center; 10049 justify-content: center; 10050 gap: 1px; 10051 width: 44px; 10052 height: 46px; 10053 border: 1px solid 10054 ${e=>!0===e.$today?"var(--theme-palette-color-1)":"var(--theme-palette-color-5)"}; 10055 border-radius: 6px; 10056 background: ${e=>!0===e.$today?"color-mix(in srgb, var(--theme-palette-color-1) 14%, transparent)":"var(--theme-palette-color-7)"}; 10057`,s=o.Ay.span` 10058 font-size: 9.5px; 10059 font-weight: 800; 10060 letter-spacing: 0.1em; 10061 text-transform: uppercase; 10062 line-height: 1; 10063 color: var(--theme-palette-color-1); 10064`,d=o.Ay.span` 10065 font-size: 17px; 10066 font-weight: 800; 10067 line-height: 1; 10068 color: var(--theme-palette-color-4); 10069`},49194(e,t,n){var r=n(63679),o=n(28297);const i=()=>r.AH` 10070 @media only screen and ${o.MZ} and (min-width: 720px) { 10071 display: grid; 10072 grid-template-columns: 1fr 1fr;
10073 column-gap: 1px; 10074 row-gap: 0; 10075 background: var(--theme-palette-color-5); 10076 > * { 10077 min-width: 0; 10078 } 10079 /* A band spans, so it indexes BOTH columns â that is what makes this one 10080 grid rather than two lists (6b). The trailing non-row spans too, so an 10081 infinite-scroll sentinel never strands the last real row in a half 10082 column; it is matched by shape because OurVisibilitySensor does not 10083 forward attributes. */ 10084 > [data-phone-span], 10085 > *:not([data-phone-row]):last-child { 10086 grid-column: 1 / -1; 10087 } 10088 } 10089`,a=r.Ay.div` 10090 display: flex; 10091 flex-direction: column; 10092 width: 100%; 10093 /* Both list pages that adopt this drop it into a wrapping flex container 10094 (DbListWrapper, OurInfiniteScroll), where width alone is not enough. */ 10095 flex-basis: 100%; 10096 ${i()} 10097`;n.d(t,["S",0,i,"X",0,a])},1748(e,t,n){n.d(t,{II:()=>s,g7:()=>h,jP:()=>d});var r=n(10201),o=n(63679),i=n(66323),a=n(28297);function l(e){return e.ctrlKey||e.metaKey||e.shiftKey||"button"in e&&1===e.button}function s(e,t){if(l(t)){if(t.target instanceof Element&&t.target.closest("[data-row-title]"))return;return t.preventDefault(),void window.open(e,"_blank","noopener")}"button"in t&&0!==t.button||(t.preventDefault(),window.location.href=e)}function d({leading:e,title:t,meta:n,note:o,trailing:a,action:d,dense:c,href:p,onActivate:h,accent:b,selected:$}){const k=void 0!==h||void 0!==p,Y=e=>{if(e.defaultPrevented)return;const t=e.target instanceof Element?e.target:null;t?.closest("a,button,input,select")&&!t.closest("[data-row-title]")||(void 0!==p&&l(e)?s(p,e):h?h(e):void 0!==p&&s(p,e))};return(0,r.FD)(u,{"data-phone-row":"",role:k?void 0!==p?"link":"button":void 0,tabIndex:k?0:void 0,onClick:k?Y:void 0,onAuxClick:k?Y:void 0,onKeyDown:k?e=>{e.target===e.currentTarget&&("Enter"===e.key||" "===e.key&&void 0===p)&&(e.preventDefault(),Y(e))}:void 0,$dense:c,$tall:null!=o,$accent:b,$selected:$,$interactive:k,children:[null!=e&&(0,r.Y)(g,{children:e}),(0,r.FD)(m,{children:[(0,r.Y)(f,{$dense:c,children:void 0!==p?(0,r.Y)(v,{href:p,"data-native":!0,"data-row-title":"",children:t}):t}),void 0!==n&&(0,r.Y)(i.Y,{parts:n}),null!=o&&(0,r.Y)(x,{children:o})]}),null!=a&&(0,r.Y)(y,{children:a}),null!=d&&(0,r.Y)(w,{children:d})]})}const c=o.Ay.div` 10098 display: flex; 10099 flex-direction: column; 10100 align-items: flex-end; 10101 gap: 4px; 10102 width: 66px; 10103 @media only screen and ${a.Ab} { 10104 width: 50px; 10105 } 10106`,p=o.Ay.div` 10107 width: 112px; 10108`;function h(){return(0,r.Y)(b,{"aria-hidden":"true",children:(0,r.Y)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:(0,r.Y)("path",{d:"M9 6l6 6-6 6"})})})}const u=o.Ay.div` 10109 position: relative; 10110 display: flex; 10111 align-items: center; 10112 gap: 10px; 10113 width: 100%; 10114 height: ${e=>e.$tall?96:e.$dense?64:72}px; 10115 padding: 0 12px; 10116 box-sizing: border-box; 10117 background: var(--theme-palette-color-8); 10118 border-bottom: 1px solid color-mix(in srgb, var(--theme-palette-color-5) 55%, transparent); 10119 box-shadow: ${e=>e.$accent?"inset 3px 0 0 var(--theme-palette-color-1)":"none"}; 10120 outline: ${e=>e.$selected?"2px solid var(--theme-palette-color-1)":"none"}; 10121 outline-offset: -2px; 10122 cursor: ${e=>e.$interactive?"pointer":"default"}; 10123 @media only screen and ${a.Ab} { 10124 height: ${e=>e.$tall?96:e.$dense?64:68}px; 10125 padding: 0 10px; 10126 gap: 8px; 10127 } 10128 @media only screen and ${a.MZ} { 10129 /* Rule 6 makes every row dense in landscape â but a three-line row cannot 10130 give up 32px without clipping the line it exists for. It keeps its 10131 height; the density rule applies to rows whose third line is optional. */ 10132 height: ${e=>e.$tall?96:64}px; 10133 } 10134`,g=o.Ay.div` 10135 flex: none; 10136 display: flex; 10137 align-items: center; 10138`,m=o.Ay.div` 10139 flex: 1; 10140 min-width: 0; 10141`,f=o.Ay.div` 10142 font-size: ${e=>e.$dense?14.5:15}px; 10143 font-weight: 600; 10144 line-height: 1.2; 10145 color: var(--theme-palette-color-4); 10146 white-space: nowrap; 10147 overflow: hidden; 10148 text-overflow: ellipsis; 10149 @media only screen and ${a.Ab} { 10150 font-size: ${e=>e.$dense?13.5:14}px; 10151 } 10152 @media only screen and ${a.MZ} { 10153 font-size: 14.5px; 10154 } 10155`,x=o.Ay.div` 10156 margin-top: 2px; 10157 font-size: 11.5px; 10158 line-height: 1.3; 10159 color: var(--theme-palette-color-3); 10160 white-space: nowrap; 10161 overflow: hidden; 10162 text-overflow: ellipsis; 10163 @media only screen and ${a.Ab} { 10164 font-size: 11px; 10165 } 10166`,v=o.Ay.a` 10167 color: inherit; 10168 text-decoration: none; 10169 &:hover { 10170 color: inherit; 10171 } 10172`,y=o.Ay.div` 10173 flex: none; 10174`,w=o.Ay.div` 10175 flex: none; 10176`,b=o.Ay.div` 10177 display: flex; 10178 align-items: center; 10179 justify-content: center; 10180 width: ${44}px; 10181 height: ${44}px; 10182 color: var(--theme-palette-color-3); 10183 @media only screen and ${a.Ab} { 10184 width: 26px; 10185 } 10186`;n.d(t,["UE",0,p,"pM",0,c,"pn",0,72])},4229(e,t,n){n.d(t,{ce:()=>c});var r=n(10201),o=n(17402),i=n(63679),a=n(7718),l=n(28297),s=n(53794);const d=()=>(0,r.FD)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,r.Y)("path",{d:"M4 6h16"}),(0,r.Y)("path",{d:"M7 12h10"}),(0,r.Y)("path",{d:"M10 18h4"})]});function c({count:e,activeCount:t,filters:n,filtersFooter:i,filtersOpen:c,onFiltersOpenChange:p,sortToggle:h,extra:f,viewToggle:x,actions:v,actionsLabel:y,strip:Y,search:A}){const C=(0,s.PG)(),F=(0,s.Ub)(l.Ab),D=C&&void 0!==A,S=void 0!==e&&!((F||D)&&void 0!==Y),I=(0,o.li)(null);return(0,r.FD)(r.FK,{children:[(0,r.FD)(w,{children:[S&&(0,r.Y)(b,{children:e}),D&&(0,r.Y)(m,{children:A}),C&&void 0!==Y&&(0,r.Y)(g,{children:Y}),(0,r.Y)(a.er,{title:"Filters & sort",label:"Filters and sort",footer:i,open:c,onOpenChange:p,returnFocusTo:I,trigger:e=>(0,r.FD)($,{ref:I,type:"button",onClick:e,$active:t>0,$iconOnly:D,"aria-label":"Filters and sort","aria-haspopup":"dialog",children:[(0,r.Y)(d,{}),!D&&(0,r.Y)("span",{children:"Filters"}),t>0&&(0,r.Y)(k,{children:t})]}),children:n}),h,f,x,void 0!==v&&(0,r.Y)(a.er,{title:"This page",label:y??"This page",children:v})]}),!D&&A,!C&&void 0!==Y&&(0,r.Y)(u,{children:Y})]})}const p=i.Ay.button` 10187 display: inline-flex; 10188 align-items: center; 10189 gap: 5px; 10190 height: 22px; 10191 padding: 0 8px; 10192 border-radius: 11px; 10193 border: 1px solid color-mix(in srgb, var(--theme-palette-color-1) 45%, transparent); 10194 background: color-mix(in srgb, var(--theme-palette-color-1) 10%, transparent); 10195 color: var(--theme-palette-color-1); 10196 font-family: inherit; 10197 font-size: 11px; 10198 font-weight: 600; 10199 white-space: nowrap; 10200 cursor: pointer; 10201 span { 10202 color: var(--theme-palette-color-3); 10203 } 10204`,h=i.Ay.span` 10205 strong { 10206 color: var(--theme-palette-color-4); 10207 font-weight: 700; 10208 } 10209`,u=i.Ay.div` 10210 display: flex; 10211 align-items: center; 10212 gap: 6px; 10213 height: 34px; 10214 overflow-x: auto; 10215 overflow-y: hidden; 10216 scrollbar-width: none; 10217 font-size: 11.5px; 10218 color: var(--theme-palette-color-3); 10219 border-bottom: 1px solid color-mix(in srgb, var(--theme-palette-color-5) 55%, transparent); 10220 &::-webkit-scrollbar {
10221 display: none; 10222 } 10223 > * { 10224 flex: none; 10225 } 10226`,g=(0,i.Ay)(u)` 10227 flex: 1 1 auto; 10228 min-width: 0; 10229 height: auto; 10230 border-bottom: none; 10231`,m=i.Ay.div` 10232 flex: 2 1 130px; 10233 min-width: 130px; 10234 > * { 10235 padding: 0; 10236 } 10237 /* 36 like every other control in this row, not 44: the row is the 44px 10238 target and the field sits inside it with the same slack the sort and view 10239 buttons get. The 16px font does NOT move â below it iOS zooms the 10240 viewport on focus, which is the one thing this row cannot afford. */ 10241 input { 10242 height: 36px !important; 10243 } 10244`,f=i.Ay.div` 10245 display: flex; 10246 flex-direction: column; 10247 gap: 10px; 10248 padding: 12px 16px; 10249 border-bottom: 1px solid var(--theme-palette-color-5); 10250 &:empty { 10251 display: none; 10252 } 10253`,x=(0,i.Ay)(l.IX)` 10254 height: 44px; 10255 padding: 0 16px; 10256 flex: none; 10257`,v=(0,i.Ay)(l.pp)` 10258 flex: 1; 10259 height: 48px; 10260 justify-content: center; 10261 font-size: 15px; 10262`,y=i.Ay.button` 10263 display: inline-flex; 10264 align-items: center; 10265 justify-content: center; 10266 width: 36px; 10267 height: 36px; 10268 flex: none; 10269 border: 1px solid var(--theme-palette-color-5); 10270 border-radius: 6px; 10271 background: none; 10272 color: var(--theme-palette-color-3); 10273 cursor: pointer; 10274 svg { 10275 display: block; 10276 } 10277`,w=i.Ay.div` 10278 display: flex; 10279 align-items: center; 10280 gap: 5px; 10281 width: 100%; 10282 min-height: 44px; 10283 padding: 4px 0; 10284 /* 320, rule 2: 4 and no lower â below that two adjacent 36px controls read 10285 as one segmented control. The row stays 44 and the controls stay 36. */ 10286 @media only screen and ${l.Ab} { 10287 gap: 4px; 10288 } 10289 > * { 10290 min-width: 0; 10291 } 10292 /* The ⯠trigger is 44px by default; in this row it matches the 36px controls. */ 10293 > button[aria-haspopup="dialog"] { 10294 width: 36px; 10295 height: 36px; 10296 } 10297`,b=i.Ay.span` 10298 flex: none; 10299 font-size: 12.5px; 10300 color: var(--theme-palette-color-3); 10301 strong { 10302 color: var(--theme-palette-color-4); 10303 font-weight: 700; 10304 } 10305`,$=i.Ay.button` 10306 display: inline-flex; 10307 align-items: center; 10308 justify-content: center; 10309 gap: 5px; 10310 /* An auto basis, not 0: in landscape the applied-filters strip shares this 10311 row, and a zero-basis Filters button would be squeezed to its badge. 10312 Once the search field is in the row too there is no width to flex into, 10313 so it becomes a fixed 36px icon square like its neighbours â rule 4 lets 10314 a LABEL go (the sheet it opens is titled "Filters & sort"), never the 10315 target itself, which stays 36 and keeps its aria-label. */ 10316 flex: ${e=>e.$iconOnly?"none":"1 1 auto"}; 10317 min-width: 0; 10318 height: 36px; 10319 padding: 0 9px; 10320 position: relative; 10321 ${e=>e.$iconOnly?i.AH` 10322 width: 36px; 10323 padding: 0; 10324 /* No room beside a 14px glyph in a 36px square, so the count rides 10325 the corner instead of the row. */ 10326 > span:last-child { 10327 position: absolute; 10328 top: -6px; 10329 right: -6px; 10330 } 10331 `:""} 10332 border: 1px solid ${e=>e.$active?"var(--theme-palette-color-1)":"var(--theme-palette-color-5)"}; 10333 border-radius: 6px; 10334 background: ${e=>e.$active?"color-mix(in srgb, var(--theme-palette-color-1) 10%, transparent)":"none"}; 10335 color: ${e=>e.$active?"var(--theme-palette-color-4)":"var(--theme-palette-color-3)"}; 10336 font-family: inherit; 10337 font-size: 12.5px; 10338 font-weight: 600; 10339 cursor: pointer; 10340`,k=i.Ay.span` 10341 display: inline-flex; 10342 align-items: center; 10343 justify-content: center; 10344 min-width: 17px; 10345 height: 17px; 10346 padding: 0 5px; 10347 border-radius: 9px; 10348 background: var(--theme-palette-color-1); 10349 color: var(--dotgg-on-accent, var(--theme-palette-color-8)); 10350 font-size: 10px; 10351 font-weight: 800; 10352`;n.d(t,["L7",0,x,"Sd",0,y,"X",0,v,"ap",0,p,"oh",0,h,"rh",0,f])},66323(e,t,n){n.d(t,{Y:()=>a});var r=n(10201),o=n(17402),i=n(63679);function a({parts:e}){const t=e.filter(e=>null!==e&&!1!==e&&""!==e);return(0,r.Y)(l,{children:t.map((e,t)=>(0,r.FD)(o.FK,{children:[t>0&&(0,r.Y)(d,{"aria-hidden":"true",children:"â¢"}),(0,r.Y)(s,{children:e})]},t))})}const l=i.Ay.div` 10353 display: flex; 10354 align-items: center; 10355 gap: 5px; 10356 margin-top: 2px; 10357 font-size: 11.5px; 10358 line-height: 1.2; 10359 color: var(--theme-palette-color-3); 10360 white-space: nowrap; 10361 overflow: hidden; 10362 b, 10363 strong { 10364 color: var(--theme-palette-color-4); 10365 font-weight: 600; 10366 } 10367`,s=i.Ay.span` 10368 flex: none; 10369 white-space: nowrap; 10370 10371 &:last-child { 10372 min-width: 0; 10373 flex: 0 1 auto; 10374 overflow: hidden; 10375 text-overflow: ellipsis; 10376 } 10377`,d=i.Ay.span` 10378 flex: none; 10379 color: var(--theme-palette-color-5); 10380`},69092(e,t,n){n.d(t,{j:()=>l});var r=n(10201),o=n(63679),i=n(12534),a=n(7718);function l({label:e,options:t,value:n,onChange:o,placeholder:l}){const u=new Set(n.map(e=>String(e.value))),g=n.length>0?n.map(e=>e.label).join(", "):l;return(0,r.Y)(a.Dp,{label:e,summary:(0,r.Y)(s,{$on:n.length>0,children:g}),children:t.map(e=>{const t=u.has(String(e.value));return(0,r.FD)(d,{type:"button",role:"checkbox","aria-checked":t,$on:t,onClick:()=>(e=>{o(u.has(String(e.value))?n.filter(t=>t.value!==e.value):[...n,e])})(e),children:[(0,r.Y)(c,{children:(0,r.Y)(i.R,{checked:t})}),(0,r.Y)(p,{children:e.label}),void 0!==e.cardsCount&&(0,r.Y)(h,{children:e.cardsCount})]},String(e.value))})})}const s=o.Ay.span` 10381 font-size: 13px; 10382 overflow: hidden; 10383 text-overflow: ellipsis; 10384 white-space: nowrap; 10385 color: ${e=>e.$on?"var(--theme-palette-color-1)":"var(--theme-palette-color-3)"}; 10386`,d=(0,o.Ay)(a.WH)` 10387 justify-content: flex-start; 10388 color: ${e=>e.$on?"var(--theme-palette-color-4)":"var(--theme-palette-color-3)"}; 10389`,c=o.Ay.span` 10390 display: inline-flex; 10391 align-items: center; 10392 justify-content: center;
10393 width: 20px; 10394 height: 20px; 10395 flex: none; 10396`,p=o.Ay.span` 10397 flex: 1; 10398 min-width: 0; 10399`,h=o.Ay.span` 10400 flex: none; 10401 min-width: 18px; 10402 padding: 1px 5px; 10403 border-radius: 8px; 10404 background-color: var(--theme-palette-color-6); 10405 color: var(--theme-palette-color-3); 10406 font-size: 11px; 10407 font-weight: 500; 10408 text-align: center; 10409 font-variant-numeric: tabular-nums; 10410 opacity: 0.8; 10411`},42715(e,t,n){n.d(t,{c4:()=>a,cA:()=>l});var r=n(17402);const o="data-phone-table-scrolled",i="data-phone-pane";function a(e){e.setAttribute(i,"");const t=()=>{e.toggleAttribute(o,e.scrollLeft>0)},n=()=>{const t=Math.round(e.getBoundingClientRect().top+window.scrollY);e.style.setProperty("--dotgg-pane-top",`${t}px`)};t(),n();const r=requestAnimationFrame(n);return e.addEventListener("scroll",t,{passive:!0}),window.addEventListener("resize",n),window.addEventListener("orientationchange",n),()=>{cancelAnimationFrame(r),e.removeEventListener("scroll",t),window.removeEventListener("resize",n),window.removeEventListener("orientationchange",n)}}function l(){const e=(0,r.li)(null);return(0,r.vJ)(()=>{const t=e.current;if(null!==t)return a(t)},[]),e}n.d(t,["P7",0,o,"kJ",0,i])},50698(e,t,n){n.d(t,["e",0,["M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z",512,512,0,!1]])},37542(e,t,n){n.d(t,["W",0,["M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c-9.4 9.4-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47c-9.4-9.4-24.6-9.4-33.9 0z",512,512,0,!1]])},21204(e,t,n){var r=n(10201);const o=(0,r.FD)("svg",{width:"20",height:"20",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.Y)("path",{d:"M11 2.25H3.5C3.08579 2.25 2.75 2.58579 2.75 3V15C2.75 15.4142 3.08579 15.75 3.5 15.75H11C11.4142 15.75 11.75 15.4142 11.75 15V3C11.75 2.58579 11.4142 2.25 11 2.25Z",stroke:"currentColor",strokeWidth:"1.5"}),(0,r.Y)("path",{d:"M21.5 2.25H15.5C15.0858 2.25 14.75 2.58579 14.75 3V7.5C14.75 7.91421 15.0858 8.25 15.5 8.25H21.5C21.9142 8.25 22.25 7.91421 22.25 7.5V3C22.25 2.58579 21.9142 2.25 21.5 2.25Z",stroke:"currentColor",strokeWidth:"1.5"}),(0,r.Y)("path",{d:"M21.5 11.25H15.5C15.0858 11.25 14.75 11.5858 14.75 12V21C14.75 21.4142 15.0858 21.75 15.5 21.75H21.5C21.9142 21.75 22.25 21.4142 22.25 21V12C22.25 11.5858 21.9142 11.25 21.5 11.25Z",stroke:"currentColor",strokeWidth:"1.5"}),(0,r.Y)("path",{d:"M2.75 18.75H11.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,r.Y)("path",{d:"M2.75 21.75H8.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]});n.d(t,["Y",0,o])},82986(e,t,n){n.d(t,["t",0,["M192 384c-8.188 0-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L192 306.8l137.4-137.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-160 160C208.4 380.9 200.2 384 192 384z",384]])},91937(e,t,n){n.d(t,["U",0,["M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160zm352-160l-160 160c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L301.3 256 438.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0z",512,512]])},6210(e,t,n){n.d(t,["v",0,["M470.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 256 265.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160zm-352 160l160-160c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L210.7 256 73.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z",512,512]])},19509(e,t,n){n.d(t,["G",0,["M192 384c-8.188 0-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L192 306.8l137.4-137.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-160 160C208.4 380.9 200.2 384 192 384z",384,512,0,!0]])},41188(e,t,n){n.d(t,["j",0,["M512 64L192 64L192 448L416 448L512 352L512 64L512 64M48 320L160 320L160 272L48 272L48-16L272-16L272 32L320 32L320-16L320-64L272-64L48-64L0-64L0-16L0 272L0 320L48 320L48 320Z",512,512,-60,!0]])}
10411,94315(e,t,n){n.d(t,["_",0,["M524.5 69.84a1.5 1.5 0 0 0 -.764-.7A485.1 485.1 0 0 0 404.1 32.03a1.816 1.816 0 0 0 -1.923 .91 337.5 337.5 0 0 0 -14.9 30.6 447.8 447.8 0 0 0 -134.4 0 309.5 309.5 0 0 0 -15.14-30.6 1.89 1.89 0 0 0 -1.924-.91A483.7 483.7 0 0 0 116.1 69.14a1.712 1.712 0 0 0 -.788 .676C39.07 183.7 18.19 294.7 28.43 404.4a2.016 2.016 0 0 0 .765 1.375A487.7 487.7 0 0 0 176 479.9a1.9 1.9 0 0 0 2.063-.676A348.2 348.2 0 0 0 208.1 430.4a1.86 1.86 0 0 0 -1.019-2.588 321.2 321.2 0 0 1 -45.87-21.85 1.885 1.885 0 0 1 -.185-3.126c3.082-2.309 6.166-4.711 9.109-7.137a1.819 1.819 0 0 1 1.9-.256c96.23 43.92 200.4 43.92 295.5 0a1.812 1.812 0 0 1 1.924 .233c2.944 2.426 6.027 4.851 9.132 7.16a1.884 1.884 0 0 1 -.162 3.126 301.4 301.4 0 0 1 -45.89 21.83 1.875 1.875 0 0 0 -1 2.611 391.1 391.1 0 0 0 30.01 48.81 1.864 1.864 0 0 0 2.063 .7A486 486 0 0 0 610.7 405.7a1.882 1.882 0 0 0 .765-1.352C623.7 277.6 590.9 167.5 524.5 69.84zM222.5 337.6c-28.97 0-52.84-26.59-52.84-59.24S193.1 219.1 222.5 219.1c29.67 0 53.31 26.82 52.84 59.24C275.3 310.1 251.9 337.6 222.5 337.6zm195.4 0c-28.97 0-52.84-26.59-52.84-59.24S388.4 219.1 417.9 219.1c29.67 0 53.31 26.82 52.84 59.24C470.7 310.1 447.5 337.6 417.9 337.6z",640]])},80855(e,t,n){n.d(t,["a",0,["M504 256C504 119 393 8 256 8S8 119 8 256c0 123.8 90.69 226.4 209.3 245V327.7h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.28c-30.8 0-40.41 19.12-40.41 38.73V256h68.78l-11 71.69h-57.78V501C413.3 482.4 504 379.8 504 256z"]])},92602(e,t,n){n.d(t,["F",0,["M488 261.8C488 403.3 391.1 504 248 504 110.8 504 0 393.2 0 256S110.8 8 248 8c66.8 0 123 24.5 166.3 64.9l-67.5 64.9C258.5 52.6 94.3 116.6 94.3 256c0 86.5 69.1 156.6 153.7 156.6 98.2 0 135-70.4 140.8-106.9H248v-85.3h236.1c2.3 12.7 3.9 24.9 3.9 41.4z",488]])},45913(e,t,n){n.d(t,["q",0,["M103 108L55 192L156 368L356 368L457 192L417 122L341 214L322 236L304 214L232 128L193 169L175 187L158 168L103 108L103 108M128 416L0 192L128-32L384-32L512 192L384 416L128 416L128 416M232 288Q231 311 212 323Q192 333 172 323Q153 311 152 288Q153 265 172 253Q192 243 212 253Q231 265 232 288L232 288Z",512,512,-60,!0]])}
10411,89138(e,t,n){n.d(t,["Z",0,["M391.2 103.5H352.5v109.7h38.63zM285 103H246.4V212.8H285zM120.8 0 24.31 91.42V420.6H140.1V512l96.53-91.42h77.25L487.7 256V0zM449.1 237.8l-77.22 73.12H294.6l-67.6 64v-64H140.1V36.58H449.1z"]])},33954(e,t,n){n.d(t,["H",0,["M459.4 151.7c.325 4.548 .325 9.097 .325 13.65 0 138.7-105.6 298.6-298.6 298.6-59.45 0-114.7-17.22-161.1-47.11 8.447 .974 16.57 1.299 25.34 1.299 49.06 0 94.21-16.57 130.3-44.83-46.13-.975-84.79-31.19-98.11-72.77 6.498 .974 12.99 1.624 19.82 1.624 9.421 0 18.84-1.3 27.61-3.573-48.08-9.747-84.14-51.98-84.14-102.1v-1.299c13.97 7.797 30.21 12.67 47.43 13.32-28.26-18.84-46.78-51.01-46.78-87.39 0-19.49 5.197-37.36 14.29-52.95 51.65 63.67 129.3 105.3 216.4 109.8-1.624-7.797-2.599-15.92-2.599-24.04 0-57.83 46.78-104.9 104.9-104.9 30.21 0 57.5 12.67 76.67 33.14 23.72-4.548 46.46-13.32 66.6-25.34-7.798 24.37-24.37 44.83-46.13 57.83 21.12-2.273 41.58-8.122 60.43-16.24-14.29 20.79-32.16 39.31-52.63 54.25z"]])},47184(e,t,n){n.d(t,["B",0,["M549.7 124.1c-6.281-23.65-24.79-42.28-48.28-48.6C458.8 64 288 64 288 64S117.2 64 74.63 75.49c-23.5 6.322-42 24.95-48.28 48.6-11.41 42.87-11.41 132.3-11.41 132.3s0 89.44 11.41 132.3c6.281 23.65 24.79 41.5 48.28 47.82C117.2 448 288 448 288 448s170.8 0 213.4-11.49c23.5-6.321 42-24.17 48.28-47.82 11.41-42.87 11.41-132.3 11.41-132.3s0-89.44-11.41-132.3zm-317.5 213.5V175.2l142.7 81.21-142.7 81.2z",576]])},97930(e,t,n){n.d(t,["_",0,["M103 272Q104 296 120 312L120 312Q136 327 159 328Q183 327 199 312Q215 296 215 272Q215 248 199 232Q183 217 159 216Q136 217 120 232Q104 248 103 272L103 272M159 296Q149 296 142 289L142 289Q135 282 135 272Q135 262 142 255Q149 248 159 248Q182 250 183 272Q182 294 159 296L159 296M214 397Q228 391 241 381L268 389Q277 392 283 385Q308 358 319 323Q322 314 315 307L294 288Q296 282 295 275Q295 273 295 271Q295 269 295 266Q296 261 295 256L315 237Q322 230 319 221Q308 186 283 159Q277 152 268 154L242 162Q229 152 214 145L207 119Q204 110 196 108Q179 104 159 104Q142 104 123 108Q115 110 113 119L107 145Q91 152 78 162L52 154Q43 152 37 159Q12 186 1 221Q-2 230 5 237L25 256Q24 264 24 271Q24 280 25 288L5 307Q-2 314 1 323Q12 358 37 385Q43 392 52 389L79 381Q92 391 106 397L113 425Q115 434 123 436Q142 440 159 440Q179 440 196 436Q204 434 207 425L214 397L214 397M59 300L57 284Q56 282 56 280Q55 276 55 271Q55 267 56 264Q56 262 57 259L58 244L35 221Q42 203 54 188L84 197L97 188Q107 180 119 175L134 168L141 137Q151 136 159 136Q170 136 179 137L186 168L201 175Q212 180 223 188L236 197L266 188Q278 203 285 221L262 244L263 259Q264 263 263 267Q263 269 263 271Q263 274 263 276Q264 280 263 284L261 300L285 323Q278 341 266 356L234 346L222 356Q212 363 201 367L187 374L179 407Q170 408 159 408Q151 408 141 407L134 374L119 367Q108 363 98 356L86 346L54 356Q42 341 35 323L59 300L59 300M464 152Q488 151 504 136L504 136Q519
10411120 520 96Q519 72 504 56Q488 41 464 40Q440 41 424 56Q409 72 408 96Q409 120 424 136Q440 151 464 152L464 152L464 152M488 96Q486 118 464 120Q442 118 440 96Q442 74 464 72Q486 74 488 96L488 96M589 42Q583 28 573 15L582-12Q584-21 577-27Q550-52 515-63Q506-66 499-59L479-38Q472-40 463-40Q455-40 448-39L429-59Q422-66 413-63Q378-52 351-27Q344-21 347-12L354 14Q344 27 337 42L311 49Q302 52 300 60Q296 77 296 96Q296 114 300 133Q302 141 311 143L337 149Q344 165 354 178L347 204Q344 213 351 219Q378 244 413 255Q422 258 429 251L448 231Q455 232 463 232Q472 232 479 231L499 251Q506 258 515 255Q550 244 577 219Q584 213 582 204L573 177Q583 164 589 150L617 143Q626 141 628 133Q632 114 632 96Q632 77 628 60Q626 52 617 49L589 42L589 42M492 197L476 199Q470 200 463 200Q457 200 451 199L436 198L413 221Q395 214 380 202L390 172L380 159Q372 149 367 137L361 122L329 115Q328 105 328 96Q328 86 329 77L361 70L367 55Q372 44 380 33L390 20L380-10Q395-22 413-29L436-6L451-7Q457-8 463-8Q470-8 476-7L492-5L515-29Q533-22 548-10L538 22L548 34Q555 44 560 55L566 69L599 77Q600 87 600 96Q600 105 599 115L566 122L560 137Q555 148 548 158L538 170L548 202Q533 214 515 221L492 197L492 197Z",640,512,-64,!0]])},50960(e,t,n){n.d(t,["C",0,["M173 317Q212 354 263 354L263 354Q314 354 354 317Q389 279 391 231Q392 182 360 142L355 136Q344 126 332 135Q322 145 331 157L336 163Q361 193 359 230Q358 266 331 294Q302 322 263 322Q225 322 196 294L71 169Q43 140 43 101Q43 63 71 34Q101 5 139 5Q177 5 207 34L230 56Q241 66 252 56Q262 45 252 34L230 11Q190-27 139-27Q88-27 48 11Q11 51 11 102Q11 153 48 192L173 317L173 317M466 67Q427 30 376 30L376 30Q326 30 286 67Q251 105 249 153Q247 202 279 242L285 248Q296 258 308 249Q318 239 310 227L304 221Q279 191 281 154Q282 118 309 90Q338 62 377 62Q415 62 444 90L569 215Q597 244 597 282Q597 321 569 350Q539 379 501 379Q463 379 433 350L411 328Q399 318 388 328Q378 340 388 350L411 373Q450 411 501 411Q552 411 592 373Q629 334 629 283Q629 232 592 193L466 67L466 67Z",640,512,-64,!0]])},77292(e,t,n){var r=n(10201);const o=(0,r.FD)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"1.2em"},children:[(0,r.Y)("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),(0,r.Y)("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.Y)("g",{id:"SVGRepo_iconCarrier",children:(0,r.Y)("g",{id:"Interface / External_Link",children:(0,r.Y)("path",{id:"Vector",stroke:"currentColor",d:"M10.0002 5H8.2002C7.08009 5 6.51962 5 6.0918 5.21799C5.71547 5.40973 5.40973 5.71547 5.21799 6.0918C5 6.51962 5 7.08009 5 8.2002V15.8002C5 16.9203 5 17.4801 5.21799 17.9079C5.40973 18.2842 5.71547 18.5905 6.0918 18.7822C6.5192 19 7.07899 19 8.19691 19H15.8031C16.921 19 17.48 19 17.9074 18.7822C18.2837 18.5905 18.5905 18.2839 18.7822 17.9076C19 17.4802 19 16.921 19 15.8031V14M20 9V4M20 4H15M20 4L13 11",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]});n.d(t,["I",0,o])},61204(e,t,n){n.d(t,{g:()=>i});var r=n(10201),o=n(17402);class i extends o.Ay.Component{render(){const e=this.props.icon[0],t=this.props.icon[1]?this.props.icon[1]:512,n=this.props.icon[2]?this.props.icon[2]:512,o=this.props.icon[3]?this.props.icon[3]:0,i=!!this.props.icon[4]&&this.props.icon[4];return(0,r.FD)("svg",{className:this.props.className,role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:`0 ${o} ${t} ${n}`,style:{...this.props.style,height:"1em",verticalAlign:"-0.125em"},transform:i?"scale(+1,-1)":"",children:[this.props.title?(0,r.Y)("title",{children:this.props.title}):"",(0,r.Y)("path",{fill:"currentColor",d:e})]})}}},17e3(e,t,n){n.d(t,["y",0,["M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z",576,512,0,!1]])},54958(e,t,n){n.d(t,{T:()=>s});var r=n(10201),o=n(63679),i=n(1070),a=n(8609);n(39583);const l=(0,o.Ay)(a.Nu)` 10412 color: var(--theme-palette-color-9, #f26464); 10413 font-weight: 700; 10414`;function s({chips:e}){return e&&0!==e.length?(0,r.Y)(r.FK,{children:e.map(e=>(0,r.FD)(a.tK,{onClick:e.onRemove,title:e.title,children:[e.neg&&(0,r.Y)(l,{children:"not"}),(0,r.Y)(a.Nu,{children:e.label}),e.value,i.q8]},e.key))}):null}},92568(e,t,n){n.d(t,{S:()=>d,X:()=>c});var r=n(10201),o=n(17402),i=n(1070),a=n(69128),l=n(38861),s=n(38314);function d(e,t){return(0,o.Kr)(()=>(0,a.IN)(e).map(e=>({clause:e,reads:(0,l.Lp)(e,t),alone:t.countAlone?.(e.raw),known:"field"!==e.kind||!!t.lookup(e.key)})),[e,t])}function c({rows:e,text:t,onEdit:n,variant:o}){const l="empty"===o;return(0,r.Y)(s.BJ,{$gap:l?4:3,children:e.map(({clause:e,reads:o,alone:d,known:c})=>(0,r.FD)(s.fI,{$alert:l&&0===d,children:[(0,r.Y)(s.Cy,{$tone:c?"gold":"warn",children:e.raw}),(0,r.Y)(s.KK,{children:o}
10414),void 0!==d&&(0,r.Y)(s.v5,{children:l?`${d.toLocaleString()} cards`:d.toLocaleString()}),l?(0,r.Y)(s.Cd,{type:"button",onClick:()=>n((0,a.UB)(t,e)),children:"Drop"}):(0,r.Y)(s.K0,{type:"button",title:"Remove this clause","aria-label":`Remove ${e.raw}`,onClick:()=>n((0,a.UB)(t,e)),children:i.q8})]},`${e.s}-${e.raw}`))})}},1057(e,t,n){n.d(t,{b:()=>$});var r=n(10201),o=n(17402),i=n(63679),a=n(1070),l=n(8765),s=n(69128),d=n(38861),c=n(4428),p=n(8609),h=n(92568),u=n(38314),g=n(11708);const m=[["key:value","has it (every clause must match)"],["-key:value -word","leave it out"],["key>=4 key<2 key!=3","compare numbers"],["a or b (a or b) c","either one"],['"two words"',"an exact phrase"]],f=(0,r.FD)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.Y)("path",{d:"M12 8v5"}),(0,r.Y)("path",{d:"M12 16.5v.5"}),(0,r.Y)("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18z"})]});function x({set:e,selected:t,onHover:n,onAccept:o}){return(0,r.FD)(r.FK,{children:[(0,r.FD)(u.ZX,{children:[(0,r.Y)(u.Q1,{children:e.title}),(0,r.Y)(u.v5,{children:"ââ move · â insert · esc close"})]}),(0,r.Y)(u.OY,{$max:296,children:(0,r.Y)(u.wn,{children:0===e.items.length?(0,r.Y)(u.Sv,{children:"No key or value matches that. It will be searched as plain text."}):e.items.map((e,i)=>(0,r.FD)(u.cD,{$active:i===t,role:"option","aria-selected":i===t,onMouseDown:e=>{e.preventDefault(),o(i)},onMouseEnter:()=>n(i),children:[e.swatch&&(0,r.Y)(u.rp,{$color:e.swatch}),(0,r.Y)(u.Cy,{children:e.code}),(0,r.Y)(u.KK,{children:e.meaning}),(0,r.Y)(u.v5,{children:e.count})]},e.insert))})})]})}const v=e=>[...["t","c","cost","r","s","k"].map(t=>e.lookup(t)).filter((e,t,n)=>!!e&&n.indexOf(e)===t).map(e=>e.numeric?`${e.key}>=`:`${(0,g.k)(e)}:`),"-",'""'];function y({text:e,vocab:t,phone:n,onEdit:i,onInsert:a}){const l=(0,h.S)(e,t),s=(0,o.Kr)(()=>t.notes(e),[e,t]),c=(0,o.Kr)(()=>(0,d.jM)(t),[t]),p=(0,o.Kr)(()=>l.length>0?t.count?.(e):void 0,[l.length,e,t]),g=s.map(e=>(0,r.FD)(u.L7,{children:[f,(0,r.Y)("span",{children:e})]},e));return(0,r.FD)(u.OY,{$max:n?420:372,children:[(l.length>0||n)&&(0,r.FD)(u.wn,{$divided:!0,children:[l.length>0&&(0,r.FD)(r.FK,{children:[(0,r.FD)(u.vg,{children:[(0,r.Y)(u.Q1,{children:"Your search"}),void 0!==p&&void 0!==t.total&&(0,r.FD)(u.v5,{children:[p.toLocaleString()," of ",t.total.toLocaleString()]})]}),(0,r.Y)(h.X,{rows:l,text:e,onEdit:i,variant:"panel"}),g]}),n&&(0,r.Y)(u.B_,{$top:l.length>0,children:v(t).map(e=>(0,r.Y)(u.Cd,{type:"button",$phone:!0,onMouseDown:t=>{t.preventDefault(),a(e)},children:e},e))})]}),!n&&(0,r.FD)(u.z_,{children:[(0,r.FD)(u.wn,{children:[(0,r.Y)(u.DZ,{children:"Operators"}),(0,r.Y)(u.BJ,{$gap:5,children:m.map(([e,t])=>(0,r.FD)(u.pn,{children:[(0,r.Y)(u.Cy,{children:e}),(0,r.Y)("span",{children:t})]},e))}),(0,r.Y)(u.DZ,{$top:!0,children:"Try one"}),(0,r.Y)(u.BJ,{$gap:4,$start:!0,children:c.map(e=>(0,r.Y)(u.Cd,{type:"button",onMouseDown:t=>{t.preventDefault(),i(e)},children:e},e))})]}),(0,r.FD)(u.wn,{children:[(0,r.FD)(u.vg,{children:[(0,r.FD)(u.Q1,{children:["Keys on ",t.listName]}),(0,r.Y)(u.v5,{children:"click to insert"})]}),(0,r.Y)(u.B_,{$max:228,children:t.keys.map(e=>(0,r.FD)(u.Cd,{type:"button",title:`${e.label}${e.aliases.length?` · also ${e.aliases.join(", ")}`:""}`,onMouseDown:t=>{t.preventDefault(),a(`${e.key}:`)},children:[(0,r.Y)("span",{children:e.key}
10414),e.aliases[0]&&(0,r.Y)(u.v5,{children:e.aliases[0]})]},e.key))})]})]})]})}const w=(0,i.Ay)(c.iB)` 10415 ${u.dG} 10416`,b=(0,i.Ay)(c.ll)` 10417 ${u.dG} 10418`;function $({value:e,onChange:t,onCommit:n,vocab:i,placeholder:c,phone:h}){const[g,m]=(0,o.J0)(!1),[f,v]=(0,o.J0)(0),[$,k]=(0,o.J0)(0),[Y,A]=(0,o.J0)(!1),C=(0,o.li)(null),F=(0,o.li)(null),D=(0,o.li)(null),S=(0,o.li)(null),I=(0,o.hb)(()=>m(!1),[]);(0,l.j)(g,C,F,I);const z=(0,o.Kr)(()=>i.notes(e),[e,i]),T=(0,o.Kr)(()=>e?(0,s.FQ)(e,e=>!!i.lookup(e)):[],[e,i]),E=(0,o.Kr)(()=>g&&!Y?(0,d.CI)(e,f,i):null,[g,Y,e,f,i]),L=()=>{const e=D.current,t=S.current;if(!e||!t)return;const n=getComputedStyle(e),r=t.parentElement;r&&(r.style.font=n.font,r.style.letterSpacing=n.letterSpacing,r.style.paddingLeft=`${parseFloat(n.paddingLeft)+parseFloat(n.borderLeftWidth)}px`),t.style.transform=`translateX(${-e.scrollLeft}px)`};(0,o.Nf)(L,[T]);const M=e=>{v(e.selectionStart??e.value.length),L()},N=(e,t)=>(requestAnimationFrame(()=>{const e=D.current;e&&(e.focus(),e.setSelectionRange(t,t),v(t),L())}),k(0),m(!0),e),P=r=>{const o=E?.items[r];if(!E||!o)return;const i=(0,s.e_)(e,E.s,E.e,o.insert),a=E.s+o.insert.length;if("key"===E.mode)t(N(i,a));else{const e=a===i.length?`${i} `:i;n(N(e,a+(e===i?0:1)))}},O=e=>n(N(e,e.length)),_=h?b:w;return(0,r.FD)(u.JV,{ref:C,children:[(0,r.FD)(p.W4,{children:[T.length>0&&(0,r.Y)(u.Y2,{$phone:h,"aria-hidden":"true",children:(0,r.Y)(u.ff,{ref:S,children:T.map((e,t)=>(0,r.Y)(u.KF,{$role:e.role,children:e.text},t))})}),(0,r.Y)(_,{ref:D,type:h?"search":"text","aria-label":"Search cards","aria-expanded":g,autoComplete:"off",spellcheck:!1,placeholder:c,value:e,$phone:h,$mirrored:T.length>0,onInput:e=>{t(e.currentTarget.value),M(e.currentTarget),k(0),A(!1),m(!0)},onFocus:e=>{M(e.currentTarget),m(!0)},onClick:e=>M(e.currentTarget),onKeyUp:e=>M(e.currentTarget),onScroll:L,onKeyDown:t=>{if("Escape"===t.key)return void m(!1);const r=E?.items??[];if("Enter"===t.key&&0===r.length)return n(e),void m(!1);if(g&&0!==r.length)if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault();const e="ArrowDown"===t.key?1:-1;k(t=>Math.max(0,Math.min(r.length-1,t+e)))}else"Enter"!==t.key&&"Tab"!==t.key||(t.preventDefault(),P(Math.min($,r.length-1)))}}),(0,r.Y)(p.WI,{children:a.pU}),(0,r.FD)(u.LN,{$phone:h,children:[""!==e&&(0,r.Y)(u.DT,{type:"button",title:"Clear search","aria-label":"Clear search",onClick:()=>O(""),children:a.q8}),(0,r.Y)(u.cG,{$phone:h}),(0,r.FD)(u.I2,{type:"button",title:"Typed search syntax","aria-expanded":g,$open:g,$warn:z.length>0,$phone:h,onClick:()=>{A(!0),m(e=>!e)},children:[(0,r.Y)(u.pM,{children:"{â}"}),(0,r.Y)("span",{children:"Syntax"}),z.length>0&&(0,r.Y)(u.ni,{$tone:"warn",children:z.length})]})]})]}),(0,r.Y)(u.sR,{ref:F,$showing:g,role:"listbox",children:g&&(E?(0,r.Y)(x,{set:E,selected:Math.min($,Math.max(0,E.items.length-1)),onHover:k,onAccept:P}):(0,r.Y)(y,{text:e,vocab:i,phone:h,onEdit:O,onInsert:n=>{const r=e.trim(),o=r?`${r} ${n}`:n,i='""'===n?o.length-1:o.length;t(N(o,i))}}))})]})}},38314(e,t,n){var r=n(63679),o=n(94551),i=n(8609);const a="color-mix(in srgb, var(--theme-palette-color-3) 70%, transparent)",l="color-mix(in srgb, var(--theme-palette-color-5) 60%, transparent)",s=r.AH` 10419 font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; 10420`,d=r.Ay.div` 10421 position: relative; 10422 width: 100%; 10423 min-width: 0; 10424 /* The input sits above the mirror, so the magnifier has to sit above it. */ 10425 ${i.WI} { 10426 z-index: 3; 10427 } 10428`,c=r.Ay.div` 10429 position: absolute; 10430 inset: 0; 10431 padding: 0 ${e=>1+(e.$phone?108:91)}px 0 31px; 10432 display: flex; 10433 align-items: center; 10434 font-size: ${e=>e.$phone?"16px":"13px"}; 10435 white-space: pre; 10436 overflow: hidden; 10437 pointer-events: none; 10438 z-index: 2; 10439`,p=r.Ay.span` 10440 display: inline-block; 10441 white-space: pre; 10442`,h={space:"",key:"color: var(--theme-palette-color-1);",unknown:"color: var(--theme-palette-color-10); border-bottom: 1px dashed var(--theme-palette-color-10);",op:`color: ${a};`,value:"color: var(--theme-palette-color-4);",neg:"color: var(--theme-palette-color-9);",or:"color: var(--theme-palette-color-10);",phrase:"color: var(--theme-palette-color-13);",text:"color: var(--theme-palette-color-3);"},u=r.Ay.span` 10443 ${e=>h[e.$role]} 10444`,g=r.AH` 10445 padding-right: ${e=>e.$phone?108:91}px !important; 10446 position: relative; 10447 z-index: 1; 10448 ${e=>e.$mirrored&&r.AH` 10449 color: transparent !important; 10450 caret-color: var(--theme-palette-color-1); 10451 `} 10452 &::placeholder { 10453 color: var(--theme-palette-color-3); 10454 } 10455`,m=r.Ay.div` 10456 position: absolute; 10457 right: ${e=>e.$phone?8:5}px; 10458 top: 0; 10459 bottom: 0; 10460 display: flex; 10461 align-items: center; 10462 gap: ${e=>e.$phone?6:4}px; 10463 z-index: 4; 10464`,f=(0,r.Ay)(i.w_)` 10465 position: static; 10466 &:hover { 10467 color: var(--theme-palette-color-4); 10468 } 10469`,x=r.Ay.span` 10470 width: 1px; 10471 height: ${e=>e.$phone?16:14}px; 10472 background: var(--theme-palette-color-5); 10473`,v=r.Ay.button` 10474 display: inline-flex; 10475 align-items: center; 10476 gap: 5px; 10477 height: ${e=>e.$phone?28:22}px; 10478 padding: 0 ${e=>e.$phone?8:7}px; 10479 border-radius: 4px; 10480 font-size: 11px; 10481 font-weight: 600; 10482 letter-spacing: 0.025em; 10483 cursor: pointer; 10484 transition: all 150ms ease; 10485 border: 1px solid 10486 ${e=>e.$open?"var(--theme-palette-color-1)":e.$warn?"var(--theme-palette-color-10)":"var(--theme-palette-color-5)"}; 10487 background: ${e=>e.$open?"color-mix(in srgb, var(--theme-palette-color-1) 12%, transparent)":"transparent"}; 10488 color: ${e=>e.$open?"var(--theme-palette-color-1)":e.$warn?"var(--theme-palette-color-10)":"var(--theme-palette-color-3)"}; 10489 &:hover { 10490 border-color: var(--theme-palette-color-1); 10491 color: var(--theme-palette-color-1); 10492 } 10493`,y=r.Ay.span` 10494 ${s} 10495 line-height: 1; 10496 white-space: nowrap; 10497`,w=r.Ay.span` 10498 background: var(--theme-palette-color-${e=>"warn"===e.$tone?10:1}); 10499 color: var(--theme-palette-color-7); 10500 font-size: 9.5px; 10501 font-weight: 700; 10502 border-radius: 50px; 10503 padding: 0 5px; 10504 line-height: 1.5; 10505`,b=(0,r.Ay)(o.Gz)` 10506 width: 640px !important; 10507 max-width: calc(100vw - 32px); 10508 top: calc(100% + 3px); 10509 flex-direction: column; 10510 flex-wrap: nowrap; 10511 align-items: stretch; 10512 gap: 0; 10513 padding: 0; 10514 overflow: hidden; 10515 @media only screen and (max-width: 700px) { 10516 padding: 0; 10517 width: 100% !important; 10518 max-width: 100%; 10519 left: 0 !important; 10520 } 10521`,$=r.Ay.div` 10522 display: flex; 10523 align-items: center; 10524 justify-content: space-between; 10525 gap: 8px; 10526 padding: 8px 12px 6px; 10527 border-bottom: 1px solid ${l}; 10528`,k=r.Ay.span` 10529 font-size: 10px; 10530 font-weight: 600; 10531 text-transform: uppercase; 10532 letter-spacing: 0.025em; 10533 color: var(--theme-palette-color-3); 10534`,Y=(0,r.Ay)(k)` 10535 display: block; 10536 margin: ${e=>e.$top?12:0}px 0 7px; 10537`,A=r.Ay.span` 10538 font-size: 11px; 10539 color: ${a}; 10540 white-space: nowrap; 10541 font-variant-numeric: tabular-nums; 10542`,C=r.Ay.div` 10543 max-height: ${e=>e.$max}px; 10544 overflow-y: auto; 10545 width: 100%; 10546`,F=r.Ay.div` 10547 padding: 10px 12px; 10548 ${e=>e.$divided&&`border-bottom: 1px solid ${l};`} 10549`,D=r.Ay.span` 10550 ${s} 10551 font-size: 12px; 10552 white-space: nowrap; 10553 color: var(--theme-palette-color-${e=>"warn"===e.$tone?10:"body"===e.$tone?3:1}); 10554`,S=r.Ay.span` 10555 font-size: 12.5px; 10556 color: var(--theme-palette-color-3); 10557 flex: 1; 10558 min-width: 0; 10559 overflow: hidden; 10560 text-overflow: ellipsis; 10561 white-space: nowrap; 10562`,I=r.Ay.span` 10563 flex: 0 0 auto; 10564 width: 10px; 10565 height: 10px; 10566 border-radius: 50px; 10567 background: ${e=>e.$color}; 10568`,z=r.Ay.div` 10569 display: flex; 10570 align-items: center; 10571 gap: 10px; 10572 padding: 5px 8px; 10573 border-radius: 4px; 10574 background: ${e=>e.$active?"rgba(255, 255, 255, 0.08)":"rgba(255, 255, 255, 0.03)"}; 10575 border: 1px solid 10576 ${e=>e.$alert?"color-mix(in srgb, var(--theme-palette-color-9) 50%, transparent)":"transparent"}; 10577 cursor: default; 10578 & > :first-child { 10579 min-width: 108px; 10580 } 10581 @media only screen and (max-width: 700px) { 10582 padding: 7px 8px; 10583 & > :first-child { 10584 min-width: 70px; 10585 } 10586 } 10587`,T=(0,r.Ay)(z)` 10588 cursor: pointer; 10589 & > :first-child { 10590 min-width: 0; 10591 } 10592 background: ${e=>e.$active?"rgba(255, 255, 255, 0.08)":"transparent"}; 10593`,E=r.Ay.button` 10594 background: none; 10595 border: none; 10596 padding: 2px; 10597 color: ${a}; 10598 cursor: pointer; 10599 display: flex; 10600 &:hover { 10601 color: var(--theme-palette-color-9); 10602 } 10603`,L=r.Ay.button` 10604 ${s} 10605 display: inline-flex; 10606 align-items: baseline; 10607 gap: 4px; 10608 font-size: 11.5px; 10609 color: var(--theme-palette-color-3); 10610 background: rgba(67, 74, 86, 0.35); 10611 border: 1px solid var(--theme-palette-color-5); 10612 border-radius: 4px; 10613 padding: ${e=>e.$phone?"4px 8px":"3px 7px"}; 10614 cursor: pointer; 10615 text-align: left; 10616 &:hover { 10617 border-color: var(--theme-palette-color-1); 10618 color: var(--theme-palette-color-1); 10619 } 10620`,M=r.Ay.div` 10621 display: flex; 10622 gap: 8px; 10623 align-items: flex-start; 10624 margin-top: 8px; 10625 padding: 6px 8px; 10626 border-radius: 4px; 10627 background: color-mix(in srgb, var(--theme-palette-color-10) 10%, transparent); 10628 border: 1px solid color-mix(in srgb, var(--theme-palette-color-10) 35%, transparent); 10629 font-size: 12.5px; 10630 line-height: 1.45; 10631 color: var(--theme-palette-color-10); 10632 svg { 10633 flex: 0 0 auto;
10634 margin-top: 1px; 10635 } 10636`,N=r.Ay.div` 10637 display: grid; 10638 grid-template-columns: 1fr 1fr; 10639 & > :first-child { 10640 border-right: 1px solid ${l}; 10641 } 10642 @media only screen and (max-width: 700px) { 10643 grid-template-columns: 1fr; 10644 & > :first-child { 10645 border-right: none; 10646 border-bottom: 1px solid ${l}; 10647 } 10648 } 10649`,P=r.Ay.div` 10650 display: flex; 10651 flex-direction: column; 10652 gap: ${e=>e.$gap}px; 10653 ${e=>e.$start&&"align-items: flex-start;"} 10654`,O=r.Ay.div` 10655 display: flex; 10656 flex-wrap: wrap; 10657 gap: 4px; 10658 ${e=>e.$top&&"margin-top: 10px;"} 10659 ${e=>e.$max&&`max-height: ${e.$max}px; overflow-y: auto;`} 10660`,_=r.Ay.div` 10661 display: flex; 10662 gap: 8px; 10663 align-items: baseline; 10664 font-size: 12px; 10665 color: var(--theme-palette-color-3); 10666 line-height: 1.35; 10667 & > :first-child { 10668 min-width: 104px; 10669 } 10670`,R=r.Ay.div` 10671 display: flex; 10672 align-items: baseline; 10673 justify-content: space-between; 10674 gap: 8px; 10675 margin-bottom: 8px; 10676`,j=r.Ay.div` 10677 padding: 14px 10px; 10678 font-size: 12.5px; 10679 color: var(--theme-palette-color-3); 10680`;n.d(t,["BJ",0,P,"B_",0,O,"Cd",0,L,"Cy",0,D,"DT",0,f,"DZ",0,Y,"I2",0,v,"JV",0,d,"K0",0,E,"KF",0,u,"KK",0,S,"L7",0,M,"LN",0,m,"OY",0,C,"Q1",0,k,"Sv",0,j,"Y2",0,c,"ZX",0,$,"cD",0,T,"cG",0,x,"dG",0,g,"fI",0,z,"ff",0,p,"ni",0,w,"pM",0,y,"pn",0,_,"rp",0,I,"sR",0,b,"v5",0,A,"vg",0,R,"wn",0,F,"z_",0,N])},89970(e,t,n){n.d(t,{N:()=>p});var r=n(17402),o=n(86031),i=n(98597),a=n(19895),l=n(13810),s=n(38861),d=n(16281),c=n(91181);function p(e){const t=(0,c.Yx)(),n=t=>{const n=Reflect.get(e,t);return"string"==typeof n?n:void 0},p=n("legalities"),h=n("color"),u=!0===o.SA.decks.serverSideCardsLibrary,g=(0,r.Kr)(()=>{const e=o.SA.cards.cardFilterDrawerOptions(p,h),n=new Map(Object.keys(e).map(e=>[e.toLowerCase(),e])),r=o.SA.core.gameColors??{};return(0,d.s)((0,l.OD)(),u?[]:t??[],t=>{const o=n.get(t);if(!o)return;const a=(e=>(e??[]).filter(e=>""!==e.value&&!0!==e.isSubHeading))(e[o]);return{label:(0,i.v)(o,e[o]),selectKey:o,options:a.length>0?a.map(e=>({value:String(e.value),label:String(e.label),swatch:"color"===t?r[String(e.value)]?.color:void 0})):void 0}})},[t,p,h,u]);return(0,r.Kr)(()=>{const n=o.SA.core.gameNameForTitle??"this site";if(u)return{keys:g,lookup:(0,s.$X)(g),listName:n,notes:l.M3};const r=t??[],i=e=>(0,a.u)(r,e,void 0,{skipSort:!0}).length,d={};return o.SA.cards.cardsFilterParams.forEach(t=>{const n=Reflect.get(e,t);null!=n&&""!==n&&(d[t]=String(n))}),{keys:g,lookup:(0,s.$X)(g),listName:n,total:i({}),count:e=>i({...d,textSearch:e}),countAlone:e=>i({textSearch:e}),notes:l.M3}},[g,t,e,u])}},79874(e,t,n){n.d(t,{$:()=>o});var r=n(17402);function o(e,t,n){const o=e??"",[i,a]=(0,r.J0)(o),l=(0,r.li)(o),s=(0,r.li)(t);s.current=t,(0,r.vJ)(()=>{o!==l.current&&(l.current=o,a(o))},[o]),(0,r.vJ)(()=>{if(i===l.current)return;const e=setTimeout(()=>{l.current=i,s.current(i)},n);return()=>clearTimeout(e)},[i,n]);const d=(0,r.hb)(e=>{l.current=e,a(e),s.current(e)},[]);return{value:i,setValue:a,commitNow:d}}},39583(e,t,n){n.d(t,{y:()=>s});var r=n(17402),o=n(69128),i=n(38861),a=n(79874),l=n(11708);function s({request:e,filterchange:t,vocab:n,colorAnd:s,delayMs:d}){const c=(0,a.$)(e.textSearch,e=>t(e,"textSearch"),d),p=(0,l.P)({filters:e,filterchange:t,text:c.value,commitText:c.commitNow,vocab:n,colorAnd:s}),h=((e,t,n)=>(0,r.Kr)(()=>(0,o.IN)(e).map(r=>{const a=(0,i.kk)(r,t);return{key:`${r.s}-${r.raw}`,label:a.label,value:a.value,neg:a.neg,title:`Remove ${r.raw}`,onRemove:()=>n((0,o.UB)(e,r))}}),[e,t,n]))(c.value,n,c.commitNow);return{...p,fieldProps:{value:c.value,onChange:c.setValue,onCommit:c.commitNow,vocab:n},chips:h}}},11708(e,t,n){n.d(t,{P:()=>l});var r=n(17402),o=n(69128);const i=e=>(e??"").split(",").map(e=>e.trim()).filter(Boolean),a=e=>e.aliases.find(e=>e.length<=2)??e.key;function l({filters:e,filterchange:t,text:n,commitText:l,vocab:s,colorAnd:d}){const c=s.keys.length>0,p=(0,r.Kr)(()=>new Map(s.keys.filter(e=>e.selectKey).map(e=>[e.selectKey??"",e])),[s.keys]),h=(0,r.hb)(e=>t=>s.lookup(t)?.key===e.key,[s]),{request:u,inQuery:g}=(0,r.Kr)(()=>{if(!c)return{request:e,inQuery:new Set};const t=(0,o.IN)(n),r={...e},a=new Set;return p.forEach((n,l)=>{const s=(0,o.VG)(t,h(n)),d=[...new Map([...i(e[l]),...s.values].map(e=>[e.toLowerCase(),e])).values()];r[l]=d.join(","),s.complex&&0===d.length&&a.add(l)}),{request:r,inQuery:a}},[c,e,n,p,h]),m=(0,r.hb)((e,t,r)=>(0,o.us)(n,{matchesKey:h(e),writeKey:a(e),values:t,separate:r}),[n,h]);return{request:u,inQuery:g,filterchange:(0,r.hb)((r,a)=>{const s=p.get(a);if(c&&s)return""!==(e[a]??"")&&t("",a),void l(m(s,i(r),"color"===a&&!0===d));t(r,a);const u=p.get("color");
10680if(c&&"filterLogicAnd"===a&&u){const e=(0,o.VG)((0,o.IN)(n),h(u)).values;e.length>1&&l(m(u,e,"1"===r))}},[c,p,e,t,l,m,d,n,h])}}n.d(t,["k",0,a])},30712(e,t,n){var r=n(10201);const o=n(63679).I4.div` 10681 line-height: 1.6; 10682 overflow-wrap: anywhere; 10683 10684 br + br { 10685 content: ""; 10686 display: block; 10687 height: 6px; 10688 } 10689`;n.d(t,["k",0,({html:e,className:t})=>e?(0,r.Y)(o,{className:t,dangerouslySetInnerHTML:{__html:e}}):null])},1221(e,t,n){n.d(t,{C:()=>u});var r=n(10201),o=n(17402),i=n(63679),a=n(52754);const l=(0,r.FD)("svg",{width:"13",height:"13",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.Y)("path",{d:"M6.5 2.5H3.5A1 1 0 0 0 2.5 3.5V6.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.Y)("path",{d:"M11.5 2.5H14.5A1 1 0 0 1 15.5 3.5V6.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.Y)("path",{d:"M6.5 15.5H3.5A1 1 0 0 1 2.5 14.5V11.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.Y)("path",{d:"M11.5 15.5H14.5A1 1 0 0 0 15.5 14.5V11.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.Y)("path",{d:"M2.5 9H15.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]});var s=n(86031),d=n(84668),c=n(98973),p=n(12434);const h=(0,d.A)({loader:async()=>await n.e(6123).then(n.bind(n,96123)),loading:()=>null,render:(e,t)=>{const n=e.ScanModal;return(0,r.Y)(n,{...t})}}),u=({variant:e="compact"})=>{const[t,n]=(0,o.J0)(!1);if(!s.SA.collection.allowScanningToCollection)return null;const i=(p.Ay.TheGame||"").toLowerCase(),d="Scan a card into your collection";return(0,r.FD)(r.FK,{children:["menu"===e||"sheet"===e?(0,r.Y)(a.vj,{as:e,icon:l,label:"Scan",hint:"Point your camera at a card",title:d,onClick:()=>n(!0)}):"icon"===e?(0,r.Y)(m,{onClick:()=>n(!0),title:d,"aria-label":d,children:l}):(0,r.FD)(g,{onClick:()=>n(!0),title:d,children:[l,"Scan"]}),t&&(0,r.Y)(h,{game:i,onClose:()=>n(!1)})]})},g=(0,i.Ay)(c.IB)` 10690 svg { 10691 width: 13px; 10692 height: 13px; 10693 } 10694`,m=i.Ay.button` 10695 cursor: pointer; 10696 display: flex; 10697 align-items: center; 10698 justify-content: center; 10699 width: 30px; 10700 height: 30px; 10701 padding: 5px; 10702 border-radius: 5px; 10703 background: var(--theme-palette-color-7); 10704 border: 1.5px solid var(--theme-palette-color-1); 10705 color: var(--theme-palette-color-1); 10706 &:hover { 10707 background: var(--theme-palette-color-1); 10708 color: var(--dotgg-on-accent, var(--theme-palette-color-8)); 10709 } 10710 svg { 10711 display: block; 10712 width: 16px; 10713 height: 16px; 10714 } 10715`},38615(e,t,n){n.d(t,{P:()=>i});var r=n(86031),o=n(4738);function i(){const e=r.SA.cards.setPageName;return e?{href:`/${e}`,label:e.split("-").map(o.g3).join(" ")}:null}},78688(e,t,n){var r=n(10201),o=n(17402),i=n(63679),a=n(80649),l=n(51533),s=n(50698),d=n(61204),c=n(36110),p=n(97589),h=n(86031),u=n(90199),g=n(91181),m=n(81616),f=n(28297);const x=i.Ay.div` 10716 display: inline-flex; 10717 align-items: center; 10718 justify-content: center; 10719 padding: 2px 6px; 10720 border-radius: 3px; 10721 font-size: 0.9em; 10722 font-weight: bold; 10723 margin-left: 5px; 10724 background-color: ${e=>(0,p.K)(e.$status)}; 10725 color: white; 10726 min-width: 20px; 10727 cursor: ${e=>e.$clickable?"pointer":"default"}; 10728 opacity: ${e=>e.$updating?.6:1}; 10729 transition: opacity 0.2s; 10730 10731 &:hover { 10732 opacity: ${e=>e.$clickable&&!e.$updating?.8:e.$updating?.6:1}; 10733 } 10734 /* Phone: the status hue at 18% with the hue as text â white-on-red at 11px 10735 was the loudest thing on the row (Claude Design 2026-08-22, 2a). */ 10736 @media only screen and ${f.E0} { 10737 flex: none; 10738 margin-left: 0; 10739 height: 22px; 10740 min-width: 22px; 10741 padding: 0 6px; 10742 border-radius: 4px; 10743 font-size: 11px; 10744 background-color: color-mix( 10745 in srgb, 10746 ${e=>(0,p.K)(e.$status)} 18%, 10747 transparent 10748 ); 10749 color: ${e=>(0,p.K)(e.$status)}; 10750 } 10751`,v=i.Ay.div` 10752 display: flex; 10753 align-items: center; 10754 justify-content: center; 10755 font-size: 0.7em; 10756 border-right: solid 1px var(--theme-palette-color-5); 10757 border-left: solid 1px var(--theme-palette-color-5); 10758 background-color: ${e=>(0,p.K)(e.$status)}; 10759 color: var(--theme-palette-color-8); 10760 cursor: ${e=>e.$clickable?"pointer":"default"}; 10761 opacity: ${e=>e.$updating?.6:1}; 10762 transition: opacity 0.2s; 10763 10764 &:hover { 10765 opacity: ${e=>e.$clickable&&!e.$updating?.8:e.$updating?.6:1}; 10766 } 10767`;n.d(t,["h",0,({cardId:e,deckQuantity:t,mode:n="image",fullDeck:i,currentBoard:p,claimedOffset:f})=>{const y=(0,m.h3)(),w=(0,g.Yx)(),b=(0,u.zz)(),[$,k]=(0,o.J0)(!1),Y=(0,o.Kr)(()=>
10767{if(!y?.collection)return{owned:0,missing:t,status:"not-owned",isWishlisted:!1,ownedTitle:void 0};const{toBaseId:n,ownedByBase:r,wishByBase:o,ownedPrintingsByBase:a}=(0,c.Yy)(w,y.collection,b),l=n(e),s=r[l]||0;let d=f??0;if(i){const t=h.SA.decks.boardsOrder,r=t&&t.length>0?t:["0"],o=r.indexOf(p??"0");for(let t=0;t<=o;t++){const a=r[t],s="0"===a?i.deck:i.boards?.[a];if(!s)continue;const c=t===o;for(const[t,r]of Object.entries(s)){if(c&&t===e)break;n(t)===l&&(d+=Number(r)||0)}}}const u=Math.max(0,s-d),g=Math.max(0,t-u),m=(o[l]||0)>0;let x;x=u>=t?"owned":m?"wishlisted":0===s?"not-owned":"missing";const v=[...a[l]??[]].sort((e,t)=>t.count-e.count||e.cardId.localeCompare(t.cardId)),$=v.map(e=>`${e.cardId} x${e.count}`).join(", ");return{owned:u,missing:g,status:x,isWishlisted:m,ownedTitle:$?v.some(t=>t.cardId===e)?`Owned as ${$}`:`Counted from another printing you own: ${$}`:void 0}},[y?.collection,w,e,t,i,p,f,b]),A=async()=>{const t="not-owned"===Y.status||"wishlisted"===Y.status||"missing"===Y.status;if(window.DotGGUser&&!$&&t){k(!0);try{const t=Y.isWishlisted?0:Y.missing;await(0,l.s)(e,"standard",void 0,{wish:t}),await(0,a.d)()}catch(e){console.error("Failed to update wishlist:",e)}finally{k(!1)}}};if("text"===n){const e="not-owned"===Y.status||"wishlisted"===Y.status||"missing"===Y.status;return(0,r.Y)(x,{$status:Y.status,$clickable:e,$updating:$,title:Y.ownedTitle,onClick:e?A:void 0,children:"owned"===Y.status?(0,r.Y)(d.g,{icon:s.e}):"wishlisted"===Y.status?(0,r.Y)(r.FK,{children:"W"}):(0,r.FD)(r.FK,{children:["-",Y.missing]})})}const C="not-owned"===Y.status||"wishlisted"===Y.status||"missing"===Y.status;return(0,r.Y)(v,{$status:Y.status,$clickable:C,$updating:$,title:Y.ownedTitle,onClick:C?A:void 0,children:"not-owned"===Y.status?(0,r.Y)(r.FK,{children:"Not Owned"}):"wishlisted"===Y.status?(0,r.Y)(r.FK,{children:"Wishlisted"}):"owned"===Y.status?(0,r.Y)(r.FK,{children:"Owned"}):(0,r.FD)(r.FK,{children:["Missing ",Y.missing]})})}])},415(e,t,n){var r=n(63679),o=n(28297);const i=r.DU` 10768 @media only screen and ${o.E0} { 10769 h1.page-title { 10770 display: none; 10771 } 10772 } 10773 @media only screen and ${o.MZ} { 10774 .ct-container { 10775 padding-top: 0; 10776 } 10777 } 10778`,a=r.Ay.div` 10779 display: flex; 10780 flex-basis: 100%; 10781 width: 100%; 10782 justify-content: space-between; 10783 flex-wrap: wrap; 10784`,l=r.Ay.div` 10785 background-color: var(--theme-palette-color-8); 10786 width: 100%; 10787 border-radius: 8px; 10788 padding: 12px; 10789 /* 320px (round 3, 3f): 12 -> 10px gutters. 44 + 44 + 20 + 2x10 is 128px of 10790 fixed furniture, leaving 192 for a deck name â the budget the whole 10791 system is checked against. */ 10792 @media only screen and ${o.Ab} { 10793 padding: 10px; 10794 } 10795`,s=r.Ay.div` 10796 display: flex; 10797 justify-content: space-between; 10798 align-items: center; 10799 gap: 5px; 10800 flex-basis: 100%; 10801 flex-wrap: wrap; 10802 background-color: var(--theme-palette-color-8); 10803 border-radius: 8px; 10804 padding: 12px; 10805 @media only screen and (max-width: 700px) { 10806 flex-direction: column; 10807 padding: 8px 12px; 10808 /* The phone header's nowrap title/meta must not widen the row past the 10809 viewport â let it shrink and clip instead. */ 10810 min-width: 0; 10811 width: 100%; 10812 } 10813`,d=r.Ay.div` 10814 ${e=>e.$wide?"flex-basis:50%;":""} 10815 border-radius: 6px; 10816 gap: 10px; 10817 display: flex; 10818 flex-wrap: wrap; 10819 justify-content: center; 10820 align-content: flex-start; 10821 min-height: ${e=>e.$embed?"auto":"683px"}; 10822 @media only screen and (max-width: 700px) { 10823 width: 100%; 10824 min-height: auto; 10825 padding: 7px; 10826 } 10827`;n.d(t,["XL",0,a,"b",0,l,"dH",0,d,"ic",0,s,"pX",0,i])},28564(e,t,n){n.d(t,{c:()=>h});var r=n(10201),o=n(17402),i=n(32613),a=n(4738),l=n(63679);const s=l.Ay.div` 10828 display: flex; 10829 flex-direction: column; 10830 align-items: center; 10831 gap: 4px; 10832`,d=l.Ay.div` 10833 background: #fff; 10834 padding: 8px; 10835 border-radius: 4px; 10836 display: inline-block; 10837 cursor: pointer; 10838 line-height: 0; 10839`,c=l.Ay.div` 10840 font-size: 0.75em; 10841 color: var(--theme-palette-color-3); 10842 text-align: center; 10843`,p=l.Ay.div` 10844 font-size: 0.72em; 10845 color: var(--theme-palette-color-1); 10846 text-align: center; 10847 max-width: 160px; 10848`,h=({value:e,deckName:t,filePrefix:l,size:h=100,hint:u="Click to save as PNG",note:g})=>{const m=(0,o.li)(null),{saveElementAsPng:f}={saveElementAsPng:async(e,t="screenshot.png")=>{const{saveElementAsPng:r}=await Promise.all([n.e(777),n.e(7683)]).then(n.bind(n,77683));return r(e,t)}};return e?(0,r.FD)(s,{children:[(0,r.Y)(d,{ref:m,onClick:()=>{(async()=>{m.current&&await f(m.current,`${l}-${(0,a.Yv)(t||"deck")}.png`)})()},title:"Click to save QR code as PNG",children:(0,r.Y)(i.Z,{title:`${t||"Deck"} QR code`,value:e,size:h})}),(0,r.Y)(c,{children:u}),g?(0,r.Y)(p,{children:g}):null]}):null}},37788(e,t,n){n.d(t,{Zo:()=>m});var r=n(10201),o=n(17402),i=n(63679),a=n(92475),l=n(86031),s=n(4738),d=n(28297),c=n(1537);const p=i.Ay.span` 10849 color: var(--theme-palette-color-4); 10850`,h=i.Ay.div` 10851 font-weight: bold; 10852 height: 27px; 10853 color: var(--theme-palette-color-3); 10854 border-bottom: solid 2px var(--theme-palette-color-3); 10855 margin-bottom: 5px; 10856 display: flex; 10857 justify-content: left; 10858 align-items: center; 10859 gap: 3px; 10860 width: ${e=>e.$last?"calc(100% + 5px)":"100%"}; 10861 padding: 0; 10862 white-space: nowrap; 10863 user-select: none; 10864 overflow: hidden; 10865 font-size: 0.8em; 10866 /* Phone: a 30px rule row â 11px uppercase label, muted count. */ 10867 @media only screen and (max-width: 700px) { 10868 height: 30px; 10869 font-size: 11px; 10870 text-transform: uppercase; 10871 letter-spacing: 0.04em; 10872 border-bottom: solid 1px var(--theme-palette-color-5); 10873 margin-bottom: 0; 10874 ${p} { 10875 color: var(--theme-palette-color-5); 10876 font-weight: 600; 10877 } 10878 } 10879 /* 320px: the rule row tightens with the gutters (round 3, 3f). */ 10880 @media only screen and ${d.Ab} {
10881 height: 26px; 10882 } 10883`,u={kind:"swatch",width:30};function g(e){return(0,r.Y)(r.FK,{children:e.rawGroupTitle.split("/").map((t,n)=>{const i=l.SA.core.gameColors[t];return i?"icon"===e.variant.kind?(0,r.FD)(o.FK,{children:[void 0!==i.icon&&""!==i.icon&&(0,r.Y)(a.D,{$width:`${e.variant.size}px`,$height:`${e.variant.size}px`,src:i.icon})," ",i.label]},`${n}-${t}`):(0,r.FD)(o.FK,{children:[(0,r.Y)(c.x,{$active:!1,$width:e.variant.width,$gradient:i.gradient,title:t,$borderColor:i.border??""}),i.label]},`${n}-${t}`):(0,r.FD)(o.FK,{children:[t," "]},`${n}-${t}`)})})}function m(e=u){return function(t){switch(t.group){case"none":return(0,r.Y)(r.FK,{});case"cost":return(0,r.FD)(h,{$padded:"condtext"!==t.mode,$last:t.last,children:["Cost: ",t.rawGroupTitle," ",(0,r.FD)(p,{children:["[",t.groupCount,"]"]})]});case"color":return(0,r.FD)(h,{$padded:"condtext"!==t.mode,$last:t.last,children:[(0,r.Y)(g,{rawGroupTitle:t.rawGroupTitle,variant:e}),(0,r.FD)(p,{children:["[",t.groupCount,"]"]})]});case"cardtype":return(0,r.FD)(h,{$padded:"condtext"!==t.mode,$last:t.last,children:[l.SA.cards.cardtypes()[t.rawGroupTitle]," ",(0,r.FD)(p,{children:["[",t.groupCount,"]"]})]});case"rarity":return(0,r.FD)(h,{$padded:"condtext"!==t.mode,$last:t.last,children:[l.SA.cards.rarityNames[t.rawGroupTitle]," ",(0,r.FD)(p,{children:["[",t.groupCount,"]"]})]});default:return(0,r.FD)(h,{$padded:"condtext"!==t.mode,$last:t.last,children:[(0,s.g3)(t.rawGroupTitle)," ",(0,r.FD)(p,{children:["[",t.groupCount,"]"]})]})}}}const f=m();n.d(t,["Dk",0,p,"VZ",0,f,"Zd",0,h])},6e3(e,t,n){var r=n(10201),o=(n(17402),n(63679)),i=n(623);const a=o.I4.div` 10884 width: 100%; 10885 min-height: 800px; 10886 display: flex; 10887 gap: 10px; 10888 ${i.aE} 10889 ${i.Xj} 10890 10891 @media only screen and (max-width: 750px) { 10892 flex-direction: column; 10893 min-height: 1400px; 10894 } 10895`,l=o.I4.div` 10896 flex: 1; 10897 display: flex; 10898 flex-direction: column; 10899 gap: 10px; 10900 min-width: 0; 10901 10902 @media only screen and (min-width: 1450px) { 10903 flex-direction: row; 10904 } 10905`,s=o.I4.div` 10906 display: flex; 10907 flex-direction: column; 10908 gap: 10px; 10909 flex: 1; 10910 min-width: 0; 10911`,d=o.I4.div` 10912 height: 50px; 10913 background: var(--theme-palette-color-6, #2a2a2a); 10914 border-radius: 6px; 10915 ${i.Rs} 10916`,c=o.I4.div` 10917 display: grid; 10918 grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); 10919 gap: 8px; 10920 padding: 10px; 10921 background: var(--theme-palette-color-8, #1a1a1a); 10922 border-radius: 6px; 10923 min-height: 400px; 10924 10925 @media only screen and (max-width: 750px) { 10926 grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); 10927 min-height: 300px; 10928 } 10929`,p=o.I4.div` 10930 aspect-ratio: 0.72; 10931 background: var(--theme-palette-color-6, #2a2a2a); 10932 border-radius: 6px; 10933 ${i.Rs} 10934`,h=o.I4.div` 10935 display: flex; 10936 flex-direction: column; 10937 gap: 10px; 10938 flex: 1; 10939 min-width: 0; 10940`,u=o.I4.div` 10941 height: 40px; 10942 background: var(--theme-palette-color-6, #2a2a2a); 10943 border-radius: 6px; 10944 ${i.Rs} 10945`,g=o.I4.div` 10946 display: grid; 10947 grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); 10948 gap: 8px; 10949 padding: 10px; 10950 background: var(--theme-palette-color-8, #1a1a1a); 10951 border-radius: 6px; 10952 min-height: 400px; 10953 10954 @media only screen and (max-width: 750px) { 10955 grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); 10956 min-height: 300px; 10957 } 10958`,m=o.I4.div` 10959 aspect-ratio: 0.72; 10960 background: var(--theme-palette-color-6, #2a2a2a); 10961 border-radius: 6px; 10962 ${i.Rs} 10963`,f=o.I4.div` 10964 width: 290px; 10965 flex-shrink: 0; 10966 display: flex; 10967 flex-direction: column; 10968 gap: 10px; 10969 10970 @media only screen and (max-width: 750px) { 10971 width: 100%; 10972 } 10973`,x=o.I4.div` 10974 height: 50px; 10975 background: var(--theme-palette-color-6, #2a2a2a); 10976 border-radius: 6px; 10977 ${i.Rs} 10978`,v=o.I4.div` 10979 height: 200px; 10980 background: var(--theme-palette-color-8, #1a1a1a); 10981 border-radius: 6px; 10982 ${i.Rs} 10983`,y=o.I4.div` 10984 display: flex; 10985 flex-direction: column; 10986 gap: 10px; 10987 padding: 10px; 10988 background: var(--theme-palette-color-8, #1a1a1a); 10989 border-radius: 6px; 10990 min-height: 404px; 10991`,w=o.I4.div` 10992 height: ${e=>e.$height||"40px"}; 10993 background: var(--theme-palette-color-6, #2a2a2a); 10994 border-radius: 6px; 10995 ${i.Rs} 10996`;n.d(t,["F",0,()=>(0,r.FD)(a,{"data-skeleton-type":"builder",children:[(0,r.FD)(l,{children:[(0,r.FD)(s,{children:[(0,r.Y)(d,{}),(0,r.Y)(c,{children:Array.from({length:12}).map((e,t)=>(0,r.Y)(p,{},t))})]}),(0,r.FD)(h,{children:[(0,r.Y)(u,{}),(0,r.Y)(g,{children:Array.from({length:8}).map((e,t)=>(0,r.Y)(m,{},t))})]})]}),(0,r.FD)(f,{children:[(0,r.Y)(x,{}),(0,r.Y)(v,{}
10996),(0,r.FD)(y,{children:[(0,r.Y)(w,{$height:"40px"}),(0,r.Y)(w,{$height:"40px"}),(0,r.Y)(w,{$height:"40px"}),(0,r.Y)(w,{$height:"100px"}),(0,r.Y)(w,{$height:"40px"})]})]})]})])},30174(e,t,n){var r=n(10201),o=(n(17402),n(63679)),i=n(623);const a=o.I4.div` 10997 width: 100%; 10998 display: flex; 10999 flex-direction: column; 11000 gap: 20px; 11001 ${i.aE} 11002 ${i.Xj} 11003 padding: 20px 0; 11004`,l=o.I4.div` 11005 display: flex; 11006 gap: 10px; 11007 background-color: var(--theme-palette-color-8, #2a2a2a); 11008 border-radius: 8px; 11009 padding: 15px; 11010 11011 @media only screen and (max-width: 480px) { 11012 flex-direction: column; 11013 padding: 10px; 11014 } 11015`,s=o.I4.div` 11016 width: 300px; 11017 min-width: 300px; 11018 height: 420px; 11019 background: var(--theme-palette-color-6, #1a1a1a); 11020 border-radius: 8px; 11021 ${i.Rs} 11022 11023 @media only screen and (max-width: 800px) { 11024 width: 100%; 11025 min-width: unset; 11026 height: 400px; 11027 } 11028`,d=o.I4.div` 11029 flex: 1; 11030 display: flex; 11031 flex-direction: column; 11032 gap: 15px; 11033`,c=o.I4.div` 11034 height: 40px; 11035 background: var(--theme-palette-color-6, #1a1a1a); 11036 border-radius: 6px; 11037 ${i.Rs} 11038`,p=o.I4.div` 11039 display: grid; 11040 grid-template-columns: 1fr 1fr; 11041 gap: 10px; 11042 11043 @media only screen and (max-width: 700px) { 11044 grid-template-columns: 1fr; 11045 } 11046`,h=o.I4.div` 11047 height: 60px; 11048 background: var(--theme-palette-color-6, #1a1a1a); 11049 border-radius: 6px; 11050 ${i.Rs} 11051`,u=o.I4.div` 11052 display: flex; 11053 flex-direction: column; 11054 gap: 15px; 11055 background-color: var(--theme-palette-color-8, #2a2a2a); 11056 border-radius: 8px; 11057 padding: 15px; 11058 11059 @media only screen and (max-width: 480px) { 11060 padding: 10px; 11061 gap: 10px; 11062 } 11063`,g=o.I4.div` 11064 height: 30px; 11065 width: 200px; 11066 background: var(--theme-palette-color-6, #1a1a1a); 11067 border-radius: 6px; 11068 ${i.Rs} 11069`,m=o.I4.div` 11070 display: grid; 11071 grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 11072 gap: 15px; 11073`,f=o.I4.div` 11074 height: 120px; 11075 background: var(--theme-palette-color-6, #1a1a1a); 11076 border-radius: 6px; 11077 ${i.Rs} 11078`,x=o.I4.div` 11079 height: 300px; 11080 background: var(--theme-palette-color-6, #1a1a1a); 11081 border-radius: 6px; 11082 ${i.Rs} 11083`;n.d(t,["l",0,()=>(0,r.FD)(a,{"data-skeleton-type":"card-detail",children:[(0,r.FD)(l,{children:[(0,r.Y)(s,{}),(0,r.FD)(d,{children:[(0,r.Y)(c,{}),(0,r.FD)(p,{children:[(0,r.Y)(h,{}),(0,r.Y)(h,{}),(0,r.Y)(h,{}),(0,r.Y)(h,{}),(0,r.Y)(h,{}),(0,r.Y)(h,{})]})]})]}),(0,r.FD)(u,{children:[(0,r.Y)(g,{}),(0,r.FD)(m,{children:[(0,r.Y)(f,{}),(0,r.Y)(f,{}),(0,r.Y)(f,{}),(0,r.Y)(f,{})]})]}),(0,r.FD)(u,{children:[(0,r.Y)(g,{}),(0,r.Y)(x,{})]})]})])},58109(e,t,n){var r=n(10201),o=(n(17402),n(63679)),i=n(623);const a=o.I4.div` 11084 width: 100%; 11085 display: flex; 11086 flex-direction: column; 11087 gap: 20px; 11088 ${i.aE} 11089 ${i.Xj} 1109050% { 11091 opacity: 0.7; 11092 } 11093 } 11094`,l=o.I4.div` 11095 height: 60px; 11096 margin-bottom: 15px; 11097 background: var(--theme-palette-color-6, #2a2a2a); 11098 border-radius: 6px; 11099 ${i.Rs} 11100`,s=o.I4.div` 11101 display: grid; 11102 grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 11103 gap: 15px; 11104 11105 @media only screen and (max-width: 1000px) { 11106 grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); 11107 gap: 10px; 11108 } 11109 11110 @media only screen and (max-width: 700px) { 11111 grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); 11112 } 11113`,d=o.I4.div` 11114 height: 280px; 11115 background: var(--theme-palette-color-6, #1a1a1a); 11116 border-radius: 8px; 11117 ${i.Rs} 11118 11119 @media only screen and (max-width: 700px) { 11120 height: 200px; 11121 } 11122`;n.d(t,["O",0,()=>(0,r.FD)(a,{"data-skeleton-type":"cards-library",children:[(0,r.Y)(l,{}),(0,r.Y)(s,{children:Array.from({length:12}).map((e,t)=>(0,r.Y)(d,{},t))})]})])},33399(e,t,n){var r=n(10201),o=(n(17402),n(63679)),i=n(623);const a=o.I4.div` 11123 width: 100%; 11124 display: flex; 11125 flex-direction: column; 11126 gap: 20px; 11127 ${i.aE} 11128 ${i.Xj} 1112950% { 11130 opacity: 0.7; 11131 } 11132 } 11133`,l=o.I4.div` 11134 height: 100px; 11135 margin-bottom: 15px; 11136 background: var(--theme-palette-color-6, #2a2a2a); 11137 border-radius: 6px; 11138 ${i.Rs} 11139 11140 @media only screen and (max-width: 700px) { 11141 height: 80px; 11142 } 11143`,s=o.I4.div` 11144 height: 60px; 11145 margin-bottom: 15px; 11146 background: var(--theme-palette-color-6, #2a2a2a); 11147 border-radius: 6px; 11148 ${i.Rs} 11149`,d=o.I4.div` 11150 display: grid; 11151 grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 11152 gap: 15px; 11153 11154 @media only screen and (max-width: 1000px) { 11155 grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); 11156 gap: 10px; 11157 } 11158 11159 @media only screen and (max-width: 700px) { 11160 grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); 11161 } 11162`,c=o.I4.div` 11163 height: 280px; 11164 background: var(--theme-palette-color-6, #1a1a1a); 11165 border-radius: 8px; 11166 ${i.Rs} 11167 11168 @media only screen and (max-width: 700px) { 11169 height: 200px; 11170 } 11171`;n.d(t,["o",0,()=>(0,r.FD)(a,{"data-skeleton-type":"collection",children:[(0,r.Y)(l,{}),(0,r.Y)(s,{}),(0,r.Y)(d,{children:Array.from({length:12}).map((e,t)=>(0,r.Y)(c,{},t))})]})])},59543(e,t,n){var r=n(10201),o=(n(17402),n(63679)),i=n(623);const a=o.I4.div` 11172 width: 100%; 11173 min-height: ${e=>e.$deckHeight}; 11174 display: flex; 11175 flex-direction: column; 11176 gap: 10px; 11177 ${i.aE} 11178 ${i.Xj} 1117950% { 11180 opacity: 0.7; 11181 } 11182 } 11183`,l=o.I4.div` 11184 background: var(--theme-palette-color-6, #2a2a2a); 11185 border-radius: 8px; 11186 height: ${e=>e.$height}; 11187 position: relative; 11188 overflow: hidden; 11189 11190 &::after { 11191 content: ""; 11192 position: absolute; 11193 top: 0; 11194 left: -100%; 11195 width: 100%; 11196 height: 100%; 11197 background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent); 11198 animation: skeletonShimmer 2s infinite; 11199 } 11200100% { 11201 left: 100%; 11202 } 11203 } 11204`,s=o.I4.div` 11205 display: flex; 11206 gap: 10px; 11207 padding-top: 10px; 11208 11209 @media only screen and (max-width: 700px) { 11210 flex-wrap: wrap; 11211 } 11212`,d=o.I4.div` 11213 background: var(--theme-palette-color-6, #2a2a2a); 11214 border-radius: 8px; 11215 height: 80px; 11216 flex: 1; 11217 min-width: 150px; 11218 position: relative; 11219 overflow: hidden; 11220 11221 &::after { 11222 content: ""; 11223 position: absolute; 11224 top: 0; 11225 left: -100%; 11226 width: 100%; 11227 height: 100%; 11228 background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent); 11229 animation: skeletonShimmer 2s infinite; 11230 } 11231100% { 11232 left: 100%; 11233 } 11234 } 11235`;n.d(t,["C",0,({deckHeight:e="600px"})=>(0,r.FD)(a,{"data-skeleton-type":"deck-embed",$deckHeight:e,children:[(0,r.Y)(l,{$height:e}),(0,r.FD)(s,{children:[(0,r.Y)(d,{}),(0,r.Y)(d,{}),(0,r.Y)(d,{})]})]})])},45324(e,t,n){var r=n(10201),o=(n(17402),n(63679)),i=n(623);const a=o.I4.div` 11236 width: 100%; 11237 min-height: ${e=>e.$deckHeight}; 11238 display: flex; 11239 gap: 20px; 11240 ${i.aE} 11241 ${i.Xj} 11242 11243 @media only screen and (max-width: 700px) { 11244 flex-direction: column; 11245 min-height: 900px; 11246 gap: 10px; 11247 } 11248`,l=o.I4.div` 11249 flex: 1; 11250 min-width: 0; 11251 display: flex; 11252 flex-direction: column; 11253 gap: 15px; 11254 11255 @media only screen and (max-width: 700px) { 11256 gap: 10px; 11257 } 11258`,s=o.I4.div` 11259 width: 280px; 11260 flex-shrink: 0; 11261 display: flex; 11262 flex-direction: column; 11263 gap: 15px; 11264 11265 @media only screen and (max-width: 700px) { 11266 width: 100%; 11267 gap: 10px; 11268 } 11269`,d=o.I4.div` 11270 background: var(--theme-palette-color-6, #2a2a2a); 11271 border-radius: 8px; 11272 position: relative; 11273 overflow: hidden; 11274 11275 &::after { 11276 content: ""; 11277 position: absolute; 11278 top: 0; 11279 left: -100%; 11280 width: 100%; 11281 height: 100%; 11282 background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent); 11283 animation: skeletonShimmer 2s infinite; 11284 } 11285 11286 &.skeletonHeader { 11287 height: 60px; 11288 margin-bottom: 10px; 11289 11290 @media only screen and (max-width: 700px) { 11291 height: 50px; 11292 margin-bottom: 5px; 11293 } 11294 } 11295 11296 &.skeletonToolbar { 11297 height: 50px; 11298 margin-bottom: 10px; 11299 11300 @media only screen and (max-width: 700px) { 11301 height: 40px; 11302 margin-bottom: 5px; 11303 } 11304 } 11305 11306 &.skeletonDeckGrid { 11307 height: ${e=>e.$height||"800px"}; 11308 margin-bottom: 15px; 11309 11310 @media only screen and (max-width: 700px) { 11311 height: 500px; 11312 margin-bottom: 10px; 11313 } 11314 } 11315 11316 &.skeletonDescription { 11317 height: ${e=>e.$height||"150px"}; 11318 } 11319 11320 &.skeletonCard { 11321 height: ${e=>e.$height||"600px"}; 11322 11323 @media only screen and (max-width: 700px) { 11324 height: 400px; 11325 } 11326 } 11327 11328 &.skeletonStats { 11329 height: 250px; 11330 11331 @media only screen and (max-width: 700px) { 11332 height: 200px; 11333 } 11334 } 11335`;n.d(t,["z",0,({deckHeight:e="800px",sidebarHeight:t="600px",descriptionHeight:n="150px"})=>(0,r.FD)(a,{"data-skeleton-type":"deck",$deckHeight:e,children:[(0,r.FD)(l,{children:[(0,r.Y)(d,{className:"skeletonHeader"}),(0,r.Y)(d,{className:"skeletonToolbar"}),(0,r.Y)(d,{className:"skeletonDeckGrid",$height:e}),(0,r.Y)(d,{className:"skeletonDescription",$height:n})]}),(0,r.FD)(s,{children:[(0,r.Y)(d,{className:"skeletonCard",$height:t}),(0,r.Y)(d,{className:"skeletonStats"})]})]})])},63506(e,t,n){var r=n(10201),o=(n(17402),n(63679)),i=n(623);const a=e=>(0,r.FD)(l,{"data-skeleton-type":e.skeletonType,children:[(0,r.Y)(s,{$he
11335ight:e.filtersHeight,$heightMobile:e.filtersHeightMobile}),(0,r.Y)(d,{}),(0,r.Y)(c,{children:Array.from({length:e.cards}).map((t,n)=>(0,r.Y)(p,{$height:e.cardHeight,$heightMobile:e.cardHeightMobile},n))})]}),l=o.I4.div` 11336 width: 100%; 11337 display: flex; 11338 flex-direction: column; 11339 gap: 0; 11340 ${i.aE} 11341 ${i.Xj} 11342`,s=o.I4.div` 11343 height: ${e=>e.$height}; 11344 margin-bottom: 10px; 11345 background: var(--theme-palette-color-6, #2a2a2a); 11346 border-radius: 8px; 11347 ${i.Rs} 11348 11349 @media only screen and (max-width: 768px) { 11350 height: ${e=>e.$heightMobile}; 11351 } 11352`,d=o.I4.div` 11353 height: 32px; 11354 width: 160px; 11355 margin-bottom: 10px; 11356 background: var(--theme-palette-color-6, #2a2a2a); 11357 border-radius: 8px; 11358 ${i.Rs} 11359`,c=o.I4.div` 11360 display: grid; 11361 grid-template-columns: repeat(2, 1fr); 11362 gap: 20px; 11363 11364 @media only screen and (max-width: 768px) { 11365 display: flex; 11366 flex-direction: column; 11367 gap: 15px; 11368 } 11369`,p=o.I4.div` 11370 height: ${e=>e.$height}; 11371 background: var(--theme-palette-color-8, #1a1a1a); 11372 border-radius: 8px; 11373 box-shadow: 0px 10px 15px #000; 11374 ${i.Rs} 11375 11376 @media only screen and (max-width: 768px) { 11377 height: ${e=>e.$heightMobile}; 11378 } 11379`;n.d(t,["V",0,()=>(0,r.Y)(a,{skeletonType:"decks-explorer",filtersHeight:"var(--dotgg-skel-decks-filters, 134px)",filtersHeightMobile:"var(--dotgg-skel-decks-filters-mobile, 420px)",cardHeight:"441px",cardHeightMobile:"610px",cards:8}),"v",0,()=>(0,r.Y)(a,{skeletonType:"filtered-grid",filtersHeight:"50px",filtersHeightMobile:"50px",cardHeight:"200px",cardHeightMobile:"180px",cards:6})])},64546(e,t,n){var r=n(10201),o=(n(17402),n(63679)),i=n(623);const a=o.I4.div` 11380 width: 100%; 11381 min-height: ${e=>e.$height}; 11382 display: flex; 11383 flex-direction: column; 11384 gap: 8px; 11385 ${i.aE} 11386 ${i.Xj} 1138750% { 11388 opacity: 0.7; 11389 } 11390 } 11391`,l=o.I4.div` 11392 display: flex; 11393 align-items: center; 11394 gap: 12px; 11395 padding: 12px; 11396 background: var(--theme-palette-color-6, #2a2a2a); 11397 border-radius: 8px; 11398 position: relative; 11399 overflow: hidden; 11400 11401 &::after { 11402 content: ""; 11403 position: absolute; 11404 top: 0; 11405 left: -100%; 11406 width: 100%; 11407 height: 100%; 11408 background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent); 11409 animation: skeletonShimmer 2s infinite; 11410 } 11411100% { 11412 left: 100%; 11413 } 11414 } 11415`,s=o.I4.div` 11416 width: 40px; 11417 height: 40px; 11418 background: var(--theme-palette-color-7, #252525); 11419 border-radius: 50%; 11420 flex-shrink: 0; 11421`,d=o.I4.div` 11422 flex: 1; 11423 display: flex; 11424 flex-direction: column; 11425 gap: 6px; 11426`,c=o.I4.div` 11427 width: 70%; 11428 height: 18px; 11429 background: var(--theme-palette-color-7, #252525); 11430 border-radius: 4px; 11431`,p=o.I4.div` 11432 width: 40%; 11433 height: 14px; 11434 background: var(--theme-palette-color-7, #252525); 11435 border-radius: 4px; 11436`;n.d(t,["l",0,({height:e="400px",count:t=5})=>(0,r.Y)(a,{"data-skeleton-type":"decks-list-embed",$height:e,children:Array.from({length:t}).map((e,t)=>(0,r.FD)(l,{children:[(0,r.Y)(s,{}),(0,r.FD)(d,{children:[(0,r.Y)(c,{}),(0,r.Y)(p,{})]})]},t))})])},35791(e,t,n){var r=n(10201),o=(n(17402),n(63679)),i=n(623);const a=o.I4.div` 11437 width: 100%; 11438 min-height: ${e=>e.$height}; 11439 ${i.aE} 11440 ${i.Xj} 1144150% { 11442 opacity: 0.7; 11443 } 11444 } 11445`,l=o.I4.div` 11446 width: 100%; 11447 display: grid; 11448 grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 11449 gap: 10px; 11450 11451 @media only screen and (max-width: 750px) { 11452 grid-template-columns: 1fr; 11453 } 11454`,s=o.I4.div` 11455 background: var(--theme-palette-color-6, #1a1a1a); 11456 border-radius: 8px; 11457 padding: 12px; 11458 display: flex; 11459 flex-direction: column; 11460 gap: 10px; 11461 position: relative; 11462 overflow: hidden; 11463 11464 &::after { 11465 content: ""; 11466 position: absolute; 11467 top: 0; 11468 left: -100%; 11469 width: 100%; 11470 height: 100%; 11471 background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent); 11472 animation: skeletonShimmer 2s infinite; 11473 } 11474100% { 11475 left: 100%; 11476 } 11477 } 11478`,d=o.I4.div` 11479 display: flex; 11480 justify-content: space-between; 11481 align-items: center; 11482`,c=o.I4.div` 11483 width: 55%; 11484 height: 22px; 11485 background: var(--theme-palette-color-7, #252525); 11486 border-radius: 4px; 11487`,p=o.I4.div` 11488 width: 28px; 11489 height: 28px; 11490 background: var(--theme-palette-color-7, #252525); 11491 border-radius: 4px; 11492`,h=o.I4.div` 11493 width: 100%; 11494 height: 16px; 11495 background: var(--theme-palette-color-7, #252525); 11496 border-radius: 4px; 11497`,u=o.I4.div` 11498 display: flex; 11499 gap: 6px; 11500 flex-wrap: wrap; 11501`,g=o.I4.div` 11502 width: 40px; 11503 height: 56px; 11504 background: var(--theme-palette-color-7, #252525); 11505 border-radius: 4px; 11506`;n.d(t,["W",0,({height:e="300px",count:t=4})=>(0,r.Y)(a,{"data-skeleton-type":"meta-embed",$height:e,children:(0,r.Y)(l,{children:Array.from({length:t}).map((e,t)=>(0,r.FD)(s,{children:[(0,r.FD)(d,{children:[(0,r.Y)(c,{}),(0,r.Y)(p,{})]}),(0,r.Y)(h,{}),(0,r.Y)(u,{children:Array.from({length:4}).map((e,t)=>(0,r.Y)(g,{},t))})]},t))})})])},79268(e,t,n){var r=n(10201),o=(n(17402),n(63679)),i=n(623);const a=o.I4.div` 11507 width: 100%; 11508 display: flex; 11509 flex-direction: column; 11510 gap: 20px; 11511 ${i.aE} 11512 ${i.Xj} 1151350% { 11514 opacity: 0.7; 11515 } 11516 } 11517`,l=o.I4.div` 11518 display: flex; 11519 gap: 15px; 11520 width: 100%; 11521 margin-bottom: 10px; 11522 border-radius: 5px; 11523 justify-content: space-between; 11524 background-color: var(--theme-palette-color-6, #2a2a2a); 11525 padding: 10px 15px; 11526 flex-wrap: wrap; 11527 ${i.Rs} 11528 11529 @media only screen and (max-width: 750px) { 11530 justify-content: center; 11531 } 11532`,s=o.I4.div` 11533 width: 200px; 11534 height: 38px; 11535 background: var(--theme-palette-color-7, #1a1a1a); 11536 border-radius: 4px; 11537 11538 @media only screen and (max-width: 750px) { 11539 width: 100%; 11540 } 11541`,d=o.I4.div` 11542 display: flex; 11543 gap: 5px; 11544`,c=o.I4.div` 11545 width: 80px; 11546 height: 38px; 11547 background: var(--theme-palette-color-7, #1a1a1a); 11548 border-radius: 4px; 11549`,p=o.I4.div` 11550 width: 100%; 11551 display: grid; 11552 grid-template-columns: repeat(auto-fill, minmax(315px, 1fr)); 11553 gap: 10px; 11554 11555 @media only screen and (max-width: 750px) { 11556 grid-template-columns: 1fr; 11557 } 11558`,h=o.I4.div` 11559 background: var(--theme-palette-color-6, #1a1a1a); 11560 border-radius: 8px; 11561 padding: 15px; 11562 display: flex; 11563 flex-direction: column; 11564 gap: 12px; 11565 ${i.Rs} 11566`,u=o.I4.div` 11567 display: flex; 11568 justify-content: space-between; 11569 align-items: center; 11570`,g=o.I4.div` 11571 width: 60%; 11572 height: 24px; 11573 background: var(--theme-palette-color-7, #252525); 11574 border-radius: 4px; 11575`,m=o.I4.div` 11576 width: 32px; 11577 height: 32px; 11578 background: var(--theme-palette-color-7, #252525); 11579 border-radius: 4px; 11580`,f=o.I4.div` 11581 width: 100%; 11582 height: 20px; 11583 background: var(--theme-palette-color-7, #252525); 11584 border-radius: 4px; 11585`,x=o.I4.div` 11586 display: flex; 11587 gap: 8px; 11588 flex-wrap: wrap; 11589`,v=o.I4.div` 11590 width: 50px; 11591 height: 70px; 11592 background: var(--theme-palette-color-7, #252525); 11593 border-radius: 4px; 11594`;n.d(t,["z",0,()=>(0,r.FD)(a,{"data-skeleton-type":"meta",children:[(0,r.FD)(l,{children:[(0,r.Y)(s,{}),(0,r.FD)(d,{children:[(0,r.Y)(c,{}),(0,r.Y)(c,{})]}),(0,r.Y)(s,{})]}),(0,r.Y)(p,{children:Array.from({length:8}).map((e,t)=>(0,r.FD)(h,{children:[(0,r.FD)(u,{children:[(0,r.Y)(g,{}),(0,r.Y)(m,{})]}),(0,r.Y)(f,{}),(0,r.Y)(x,{children:Array.from({length:5}).map((e,t)=>(0,r.Y)(v,{},t))})]},t))})]})])},17705(e,t,n){var r=n(10201),o=(n(17402),n(63679)),i=n(623);const a=o.I4.div` 11595 width: 100%; 11596 min-height: ${e=>e.$height}; 11597 display: flex; 11598 flex-direction: column; 11599 gap: 15px; 11600 padding: 15px; 11601 background: var(--theme-palette-color-6, #1a1a1a); 11602 border-radius: 8px; 11603 ${i.aE} 11604 ${i.Xj} 1160550% { 11606 opacity: 0.7; 11607 } 11608 } 11609`,l=o.I4.div` 11610 display: flex; 11611 justify-content: space-between; 11612 align-items: center; 11613`,s=o.I4.div` 11614 width: 150px; 11615 height: 24px; 11616 background: var(--theme-palette-color-7, #252525); 11617 border-radius: 4px; 11618`,d=o.I4.div` 11619 width: 80px; 11620 height: 28px; 11621 background: var(--theme-palette-color-7, #252525); 11622 border-radius: 4px; 11623`,c=o.I4.div` 11624 flex: 1; 11625 min-height: 200px; 11626 background: var(--theme-palette-color-7, #252525); 11627 border-radius: 8px; 11628 position: relative; 11629 overflow: hidden; 11630 11631 &::after { 11632 content: ""; 11633 position: absolute; 11634 top: 0; 11635 left: -100%; 11636 width: 100%; 11637 height: 100%; 11638 background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent); 11639 animation: skeletonShimmer 2s infinite; 11640 } 11641100% { 11642 left: 100%; 11643 } 11644 } 11645`;n.d(t,["k",0,({height:e="300px"})=>(0,r.FD)(a,{"data-skeleton-type":"price-chart-embed",$height:e,children:[(0,r.FD)(l,{children:[(0,r.Y)(s,{}),(0,r.Y)(d,{})]}),(0,r.Y)(c,{})]})])},85959(e,t,n){var r=n(10201),o=(n(17402),n(63679)),i=n(623);const a=({count:e=10})=>(0,r.Y)(d,{children:Array.from({length:e}).map((e,t)=>(0,r.Y)(c,{},t))}),l=o.I4.div` 11646 width: 100%; 11647 display: flex; 11648 flex-direction: column; 11649 gap: 20px; 11650 ${i.aE} 11651 ${i.Xj} 11652`,s=o.I4.div` 11653 height: 60px; 11654 margin-bottom: 15px; 11655 background: var(--theme-palette-color-6, #2a2a2a); 11656 border-radius: 6px; 11657 ${i.Rs} 11658`,d=o.I4.div` 11659 display: grid; 11660 grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 11661 gap: 15px; 11662 11663 @media only screen and (max-width: 700px) { 11664 grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); 11665 gap: 10px; 11666 } 11667`,c=o.I4.div` 11668 height: 410px; 11669 background: var(--theme-palette-color-6, #1a1a1a); 11670 border-radius: 8px; 11671 ${i.Rs} 11672 11673 @media only screen and (max-width: 700px) { 11674 height: 320px; 11675 } 11676`;n.d(t,["N",0,()=>(0,r.FD)(l,{"data-skeleton-type":"products",children:[(0,r.Y)(s,{}),(0,r.Y)(a,{})]}
11676),"e",0,a])},33204(e,t,n){var r=n(10201),o=(n(17402),n(63679)),i=n(623);const a=o.I4.div` 11677 margin-bottom: 30px; 11678`,l=o.I4.div` 11679 display: grid; 11680 grid-template-columns: repeat(2, 1fr); 11681 gap: 20px; 11682 11683 @media only screen and (max-width: 1000px) { 11684 grid-template-columns: 1fr; 11685 } 11686`,s=(0,o.I4)(i.u4)` 11687 display: flex; 11688 flex-direction: column; 11689`,d=(0,o.I4)(i.u4)` 11690 grid-column: 1 / -1; 11691 display: flex; 11692 flex-direction: column; 11693`;n.d(t,["B",0,({minHeight:e="1000px"})=>(0,r.FD)(i.ls,{$minHeight:e,"data-skeleton-type":"settings",children:[(0,r.FD)(a,{children:[(0,r.Y)(i.Z1,{$width:"150px",$height:"32px"}),(0,r.Y)(i.Z1,{$width:"70%",$height:"18px",style:{marginTop:"8px"}})]}),(0,r.FD)(l,{children:[Array.from({length:4}).map((e,t)=>(0,r.FD)(s,{children:[(0,r.Y)(i.Z1,{$width:"40%",$height:"24px",$radius:"6px"}),(0,r.FD)(i.te,{$direction:"column",$gap:"12px",style:{marginTop:"15px"},children:[(0,r.Y)(i.Z1,{$width:"100%",$height:"40px"}),(0,r.Y)(i.Z1,{$width:"100%",$height:"40px"}),(0,r.Y)(i.Z1,{$width:"80%",$height:"40px"})]})]},t)),(0,r.FD)(d,{children:[(0,r.Y)(i.Z1,{$width:"30%",$height:"24px"}),(0,r.FD)(i.te,{$gap:"15px",style:{marginTop:"15px"},children:[(0,r.Y)(i.Z1,{$width:"150px",$height:"80px",$radius:"8px",$shimmer:!0}),(0,r.FD)(i.te,{$direction:"column",$gap:"8px",style:{flex:1},children:[(0,r.Y)(i.Z1,{$width:"60%",$height:"20px"}),(0,r.Y)(i.Z1,{$width:"90%",$height:"16px"}),(0,r.Y)(i.Z1,{$width:"70%",$height:"16px"})]})]})]}),(0,r.FD)(d,{children:[(0,r.Y)(i.Z1,{$width:"35%",$height:"24px"}),(0,r.FD)(i.te,{$gap:"20px",$align:"center",style:{marginTop:"20px"},children:[(0,r.Y)(i.NH,{$size:"100px"}),(0,r.FD)(i.te,{$direction:"column",$gap:"10px",style:{flex:1},children:[(0,r.Y)(i.Z1,{$width:"100%",$height:"40px"}),(0,r.Y)(i.Z1,{$width:"100%",$height:"40px"}),(0,r.Y)(i.Z1,{$width:"100%",$height:"40px"})]})]})]}),(0,r.FD)(d,{children:[(0,r.Y)(i.Z1,{$width:"30%",$height:"24px"}),(0,r.FD)(i.te,{$direction:"column",$gap:"12px",style:{marginTop:"15px"},children:[(0,r.Y)(i.Z1,{$width:"100%",$height:"40px"}),(0,r.Y)(i.Z1,{$width:"100%",$height:"40px"})]})]})]})]})])},43075(e,t,n){var r=n(10201),o=(n(17402),n(63679)),i=n(623);const a=o.I4.div` 11694 width: 100%; 11695 display: flex; 11696 flex-direction: column; 11697 gap: 10px; 11698`,l=(0,o.I4)(i.u4)` 11699 display: flex; 11700 flex-wrap: wrap; 11701 border-radius: 5px; 11702`,s=(0,o.I4)(i.qZ)` 11703 grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); 11704 gap: 10px; 11705 11706 @media only screen and (max-width: 1140px) { 11707 grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); 11708 gap: 5px; 11709 } 11710`,d=o.I4.div` 11711 width: 25px; 11712 height: 25px; 11713 background: var(--theme-palette-color-7, #252525); 11714 border-radius: 50%; 11715`;n.d(t,["W",0,({minHeight:e="800px"})=>(0,r.FD)(i.ls,{$minHeight:e,"data-skeleton-type":"shop",children:[(0,r.Y)(i.Z1,{$height:"60px",$radius:"6px",$shimmer:!0}),(0,r.Y)(a,{children:Array.from({length:6}).map((e,t)=>(0,r.FD)(l,{$padding:"10px",$gap:"10px",$shimmer:!0,children:[(0,r.FD)(i.te,{$justify:"space-between",$align:"center",style:{width:"100%",marginBottom:"5px"},children:[(0,r.FD)(i.te,{$direction:"column",$gap:"8px",style:{flex:1},children:[(0,r.Y)(i.Z1,{$width:"60%",$height:"22px",style:{maxWidth:"250px"}}),(0,r.Y)(i.Z1,{$width:"45%",$height:"16px",style:{maxWidth:"180px"}}),(0,r.Y)(i.Z1,{$width:"30%",$height:"14px",style:{maxWidth:"120px"}})]}),(0,r.FD)(i.te,{$gap:"5px",$align:"center",children:[(0,r.Y)(d,{}),(0,r.Y)(i.Z1,{$width:"60px",$height:"20px"})]})]}),(0,r.Y)(s,{children:Array.from({length:t%2==0?4:1}).map((e,t)=>(0,r.Y)(i.mG,{$ratio:1},t))})]},t))})]})])},38144(e,t,n){var r=n(10201),o=(n(17402),n(623));n.d(t,["R",0,({minHeight:e="800px"})=>(0,r.FD)(o.ls,{$minHeight:e,"data-skeleton-type":"simple-page",children:[(0,r.Y)(o.Z1,{$width:"250px",$height:"32px",$radius:"6px"}),(0,r.Y)(o.Z1,{$height:"1px",style:{background:"var(--theme-palette-color-7, #252525)",margin:"20px 0"}}),(0,r.Y)(o.qZ,{$columns:"repeat(auto-fill, minmax(200px, 1fr))",$gap:"15px",children:Array.from({length:12}).map((e,t)=>(0,r.Y)(o.u4,{style:{height:"250px"}},t))})]})])},51736(e,t,n){var r=n(10201),o=(n(17402),n(63679)),i=n(623);const a=o.I4.div` 11716 width: 100%; 11717 min-height: ${e=>e.$height}; 11718 border-radius: 6px; 11719 padding: 10px; 11720 background-color: var(--theme-palette-color-8, #1a1a1a); 11721 ${i.aE} 11722 ${i.Xj} 1172350% { 11724 opacity: 0.7; 11725 } 11726 } 11727`,l=o.I4.div` 11728 width: 100%; 11729 height: 36px; 11730 background: var(--theme-palette-color-6, #2a2a2a); 11731 border-radius: 4px; 11732 margin-bottom: 8px; 11733 position: relative; 11734 overflow: hidden; 11735 11736 &::after { 11737 content: ""; 11738 position: absolute; 11739 top: 0; 11740 left: -100%; 11741 width: 100%; 11742 height: 100%; 11743 background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent); 11744 animation: skeletonShimmer 2s infinite; 11745 } 11746100% { 11747 left: 100%; 11748 } 11749 } 11750`,s=o.I4.div` 11751 display: flex; 11752 flex-direction: column; 11753 gap: 6px; 11754`,d=o.I4.div` 11755 width: 100%; 11756 height: 44px; 11757 background: var(--theme-palette-color-6, #2a2a2a); 11758 border-radius: 4px; 11759 position: relative; 11760 overflow: hidden; 11761 11762 &::after { 11763 content: ""; 11764 position: absolute; 11765 top: 0; 11766 left: -100%; 11767 width: 100%; 11768 height: 100%; 11769 background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent); 11770 animation: skeletonShimmer 2s infinite; 11771 } 11772`;n.d(t,["$",0,({height:e="350px",rowCount:t=5})=>(0,r.FD)(a,{"data-skeleton-type":"tournaments-embed",$height:e,children:[(0,r.Y)(l,{}),(0,r.Y)(s,{children:Array.from({length:t}).map((e,t)=>(0,r.Y)(d,{},t))})]})])},20482(e,t,n){var r=n(10201),o=(n(17402),n(63679)),i=n(623);const a=o.I4.div` 11773 width: 100%; 11774 display: flex; 11775 flex-direction: column; 11776 gap: 20px; 11777 ${i.aE} 11778 ${i.Xj} 1177950% { 11780 opacity: 0.7; 11781 } 11782 } 11783`,l=o.I4.div` 11784 display: flex; 11785 gap: 20px; 11786 align-items: center; 11787 padding: 20px; 11788 background: var(--theme-palette-color-6, #1a1a1a); 11789 border-radius: 8px; 11790 ${i.Rs} 11791 11792 @media only screen and (max-width: 750px) { 11793 flex-direction: column; 11794 text-align: center; 11795 } 11796`,s=o.I4.div` 11797 width: 80px; 11798 height: 80px; 11799 border-radius: 50%; 11800 background: var(--theme-palette-color-7, #252525); 11801 flex-shrink: 0; 11802`,d=o.I4.div` 11803 display: flex; 11804 flex-direction: column; 11805 gap: 10px; 11806 flex: 1; 11807`,c=o.I4.div` 11808 width: 200px; 11809 height: 28px; 11810 background: var(--theme-palette-color-7, #252525); 11811 border-radius: 4px; 11812 11813 @media only screen and (max-width: 750px) { 11814 width: 150px; 11815 margin: 0 auto; 11816 } 11817`,p=o.I4.div` 11818 width: 300px; 11819 height: 20px; 11820 background: var(--theme-palette-color-7, #252525); 11821 border-radius: 4px; 11822 11823 @media only screen and (max-width: 750px) { 11824 width: 200px; 11825 margin: 0 auto; 11826 } 11827`,h=o.I4.div` 11828 display: flex; 11829 gap: 10px; 11830 flex-wrap: wrap; 11831 11832 @media only screen and (max-width: 750px) { 11833 justify-content: center; 11834 } 11835`,u=o.I4.div` 11836 width: 100px; 11837 height: 40px; 11838 background: var(--theme-palette-color-6, #1a1a1a); 11839 border-radius: 4px; 11840 ${i.Rs} 11841`,g=o.I4.div` 11842 background: var(--theme-palette-color-6, #1a1a1a); 11843 border-radius: 8px; 11844 padding: 20px; 11845 ${i.Rs} 11846`,m=o.I4.div` 11847 display: grid; 11848 grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); 11849 gap: 15px; 11850 11851 @media only screen and (max-width: 700px) { 11852 grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); 11853 gap: 10px; 11854 } 11855`,f=o.I4.div` 11856 height: 200px; 11857 background: var(--theme-palette-color-7, #252525); 11858 border-radius: 8px; 11859 11860 @media only screen and (max-width: 700px) { 11861 height: 140px; 11862 } 11863`;n.d(t,["j",0,()=>(0,r.FD)(a,{"data-skeleton-type":"user",children:[(0,r.FD)(l,{children:[(0,r.Y)(s,{}),(0,r.FD)(d,{children:[(0,r.Y)(c,{}),(0,r.Y)(p,{})]})]}),(0,r.Y)(h,{children:Array.from({length:4}).map((e,t)=>(0,r.Y)(u,{},t))}),(0,r.Y)(g,{children:(0,r.Y)(m,{children:Array.from({length:12}).map((e,t)=>(0,r.Y)(f,{},t))})})]})])},623(e,t,n){var r=n(63679);const o=r.AH` 11864 @keyframes skeletonPulse { 11865 0%, 100% { opacity: 1; } 11866 50% { opacity: 0.7; } 11867 } 11868 11869 /* 11870 * Sweep via transform (composited) â NOT left/top/width. 11871 * Animating layout properties like \`left\` makes Chrome's Layout 11872 * Instability API count every shimmer frame as a real layout shift, 11873 * which wrecked deck-page CLS (~0.3 field). The ::after keeps its 11874 * base \`left: -100%; width: 100%\`, so translateX(0)->(200%) reproduces 11875 * the exact -100%..+100% sweep with zero CLS. Do not revert to \`left\`. 11876 */ 11877 @keyframes skeletonShimmer { 11878 0% { transform: translateX(0); } 11879 100% { transform: translateX(200%); } 11880 } 11881`,i=r.AH` 11882 animation: skeletonPulse 1.5s ease-in-out infinite; 11883`,a=r.AH` 11884 position: relative; 11885 overflow: hidden; 11886 11887 &::after { 11888 content: ""; 11889 position: absolute; 11890 top: 0; 11891 left: -100%; 11892 width: 100%; 11893 height: 100%; 11894 background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent); 11895 animation: skeletonShimmer 2s infinite; 11896 } 11897`,l=r.I4.div` 11898 width: ${e=>e.$width||"100%"}; 11899 height: ${e=>e.$height||"20px"}; 11900 background: var(--theme-palette-color-7, #252525); 11901 border-radius: ${e=>e.$radius||"4px"}; 11902 ${e=>e.$shimmer&&a} 11903`,s=r.I4.div` 11904 background: var(--theme-palette-color-6, #2a2a2a); 11905 border-radius: 8px; 11906 padding: ${e=>e.$padding||"15px"}; 11907 ${e=>e.$gap&&`gap: ${e.$gap};`} 11908 ${e=>e.$shimmer&&a} 11909`,d=r.I4.div` 11910 width: 100%; 11911 min-height: ${e=>e.$minHeight||"auto"}; 11912 display: flex; 11913 flex-direction: column; 11914 gap: 20px; 11915 ${i} 11916 ${o} 11917`,c=r.I4.div` 11918 display: grid; 11919 grid-template-columns: ${e=>e.$columns||"repeat(auto-fill, minmax(200px, 1fr))"}; 11920 gap: ${e=>e.$gap||"15px"}; 11921 11922 @media only screen and (max-width: 750px) { 11923 ${e=>e.$mobileColumns&&`grid-template-columns: ${e.$mobileColumns};`} 11924 } 11925`,p=r.I4.div` 11926 display: flex; 11927 flex-direction: ${e=>e.$direction||"row"}; 11928 ${e=>e.$gap&&`gap: ${e.$gap};`} 11929 ${e=>e.$align&&`align-items: ${e.$align};`} 11930 ${e=>e.$justify&&`justify-content: ${e.$justify};`} 11931`,h=r.I4.div` 11932 width: ${e=>e.$size||"80px"}; 11933 height: ${e=>e.$size||"80px"}; 11934 background: var(--theme-palette-color-7, #252525); 11935 border-radius: 50%; 11936 flex-shrink: 0; 11937 ${a} 11938`,u=r.I4.div` 11939 aspect-ratio: ${e=>e.$ratio||.72}; 11940 background: var(--theme-palette-color-6, #2a2a2a); 11941 border-radius: 8px; 11942 ${e=>!1!==e.$shimmer&&a} 11943`;n.d(t,["NH",0,h,"Rs",0,a,"Xj",0,o,"Z1",0,l,"aE",0,i,"ls",0,d,"mG",0,u,"qZ",0,c,"te",0,p,"u4",0,s])},18318(e,t,n){var r=n(10201),o=n(17402),i=n(63679),a=n(16133),l=n(55622),s=n(21398),d=n(4738),c=n(12434);function p(e){let t=0;for(let n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)>>>0;const n=t%160,r=n%20+1;return`ava_${(Math.floor(n/20)+1).toString().padStart(2,"0")}_${r.toString().padStart(2,"0")}.png`}const h=i.Ay.div` 11944 flex-shrink: 0; 11945 width: 240px; 11946 min-height: 140px; 11947 overflow: hidden; 11948 border-radius: 12px 0 0 12px; 11949 11950 @media only screen and (max-width: 600px) { 11951 width: 120px; 11952 min-height: 120px; 11953 border-radius: 12px 0 0 12px; 11954 } 11955`,u=i.Ay.div` 11956 display: flex; 11957 flex-direction: column; 11958 justify-content: space-between; 11959 flex: 1; 11960 min-width: 0; 11961`,g=i.Ay.div` 11962 display: flex; 11963 align-items: center; 11964 gap: 12px; 11965 margin-top: auto; 11966 flex-wrap: wrap; 11967 11968 @media only screen and (max-width: 600px) { 11969 gap: 6px; 11970 margin-top: 4px; 11971 } 11972`,m=i.Ay.a` 11973 display: flex; 11974 align-items: center; 11975 gap: 6px; 11976 text-decoration: none; 11977 position: relative; 11978 z-index: 1; 11979 11980 @media only screen and (max-width: 600px) { 11981 gap: 4px; 11982 } 11983`,f=i.Ay.img` 11984 border-radius: 50%; 11985 ${e=>e.$invert&&"filter: invert(0.9);"} 11986 11987 @media only screen and (max-width: 600px) { 11988 width: 14px; 11989 height: 14px; 11990 } 11991`,x=i.Ay.span` 11992 color: var(--theme-palette-color-3); 11993 font-size: 0.85em; 11994 font-weight: 600; 11995 white-space: nowrap; 11996 &:hover { 11997 color: var(--theme-palette-color-4); 11998 } 11999 12000 @media only screen and (max-width: 600px) { 12001 font-size: 0.6em; 12002 } 12003`,v=({$ava:e})=>(0,r.Y)(y,{src:e,alt:"avatar"}),y=i.Ay.img` 12004 width: 22px; 12005 height: 22px; 12006 border-radius: 50%; 12007 object-fit: cover; 12008 margin-right: 6px; 12009`,w=i.Ay.div` 12010 color: var(--theme-palette-color-3) !important; 12011 font-size: 0.85em; 12012 margin-top: 8px; 12013 display: -webkit-box; 12014 -webkit-line-clamp: 2; 12015 -webkit-box-orient: vertical; 12016 overflow: hidden; 12017`,b=i.Ay.div` 12018 display: flex; 12019 padding: 0; 12020 gap: 5px; 12021 flex-wrap: wrap; 12022`,$=i.Ay.div` 12023 background-color: var(--theme-palette-color-5); 12024 color: rgb(255, 255, 255); 12025 border-radius: 3px; 12026 padding: 0px 8px; 12027 display: flex; 12028 height: 22px; 12029 line-height: 22px; 12030 align-items: center; 12031 gap: 5px; 12032 white-space: nowrap; 12033 font-size: 0.7em; 12034 font-weight: 600; 12035 12036 @media only screen and (max-width: 600px) { 12037 height: 16px; 12038 line-height: 16px; 12039 font-size: 0.55em; 12040 padding: 0px 5px; 12041 } 12042`,k=i.Ay.div` 12043 display: flex; 12044 align-items: center; 12045 font-size: 0.8em; 12046 font-weight: 600; 12047 color: var(--theme-palette-color-3); 12048 opacity: 0.75; 12049 12050 img { 12051 opacity: 1; 12052 } 12053`,Y=i.Ay.div` 12054 display: flex; 12055 gap: 5px; 12056 align-items: center; 12057 font-size: 0.8em; 12058 color: var(--theme-palette-color-3); 12059 opacity: 0.75; 12060`,A=i.Ay.div` 12061 display: flex; 12062 column-gap: 15px; 12063 row-gap: 5px; 12064 padding: 12px 16px; 12065 flex-wrap: wrap; 12066 border-top: 1px solid var(--theme-palette-color-6); 12067 12068 @media only screen and (max-width: 600px) { 12069 padding: 8px 12px; 12070 column-gap: 10px; 12071 } 12072`,C=i.Ay.div.attrs(e=>({style:{backgroundImage:e.$src&&""!==e.$src?`url(${e.$src})`:"none"}}))` 12073 width: 100%; 12074 height: 100%; 12075 min-height: 140px; 12076 overflow: hidden; 12077 background-size: cover; 12078 background-position: center; 12079 transition: transform 0.3s ease; 12080 12081 &:hover { 12082 transform: scale(1.05); 12083 } 12084 12085 @media only screen and (max-width: 600px) { 12086 min-height: 120px; 12087 } 12088`,F=i.Ay.h2` 12089 margin: 0 !important; 12090 font-size: 1.05em; 12091 line-height: 1.4; 12092 display: -webkit-box; 12093 -webkit-line-clamp: 2; 12094 -webkit-box-orient: vertical; 12095 overflow: hidden; 12096 12097 @media only screen and (max-width: 600px) { 12098 font-size: 0.9em; 12099 line-height: 1.3; 12100 } 12101`,D=i.Ay.article` 12102 display: flex; 12103 flex-direction: row; 12104 margin: 0 !important; 12105 padding: 0 !important; 12106 border: var(--card-border, none); 12107 box-shadow: var(--theme-box-shadow); 12108 background-color: var(--theme-palette-color-8); 12109 border-radius: 12px; 12110 overflow: hidden; 12111 min-height: 140px; 12112 height: 100%; 12113 transition: 12114 transform 0.2s ease, 12115 box-shadow 0.2s ease; 12116 12117 @media only screen and (max-width: 600px) { 12118 min-height: 120px; 12119 } 12120`,S=i.Ay.a` 12121 text-decoration: none; 12122 display: block; 12123 height: 100%; 12124 12125 &:hover ${D} { 12126 transform: translateY(-2px); 12127 box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3); 12128 } 12129`,I=i.Ay.div` 12130 display: flex; 12131 padding: 16px 16px 12px 16px; 12132 flex-direction: column; 12133 flex: 1; 12134 gap: 8px; 12135 12136 @media only screen and (max-width: 600px) { 12137 padding: 10px 12px 8px 12px; 12138 gap: 4px; 12139 } 12140`,z=i.Ay.time` 12141 white-space: nowrap; 12142 font-weight: 600; 12143 12144 @media only screen and (max-width: 600px) { 12145 display: none; 12146 } 12147`,T=i.Ay.time` 12148 display: none; 12149 white-space: nowrap; 12150 font-weight: 600; 12151 12152 @media only screen and (max-width: 600px) { 12153 display: inline; 12154 } 12155`;n.d(t,["R",0,D,"l",0,({post:e,withContent:t})=>{const[n,i]=(0,o.J0)(!1),y=new Date(1e3*+e.post_date),E=""===e.guid?"https://dotgg.gg/wp-content/uploads/sites/16/2023/08/DotGG-Site-Image-scaled.jpg":e.guid.replace(".jpg","-550x400.jpg").replace(".png","-550x400.png"),L=""===e.guid?"https://dotgg.gg/wp-content/uploads/sites/16/2023/08/DotGG-Site-Image-scaled.jpg":e.guid,M=(()=>
12155{if("string"!=typeof e.tags||""===e.tags)return[];try{const t=JSON.parse(e.tags.replaceAll("\\",""));return Array.isArray(t)?t:[]}catch{return[]}})(),N=e.post_name.startsWith("https")?e.post_name:`${c.Ay.BASE_URL}${e.post_name}`;return(0,r.Y)(S,{href:N,target:"_blank",children:(0,r.FD)(D,{children:[(0,r.Y)(h,{children:(0,r.FD)(l.o,{width:"240px",height:"100%",children:[(0,r.Y)(C,{$src:n?L:E,title:e.post_title}),(0,r.Y)(s.A,{src:E,isMissing:()=>{""===e.guid||n||i(!0)}})]})}),(0,r.FD)(u,{children:[(0,r.FD)(I,{children:[(0,r.Y)(F,{children:(0,d.iT)(e.post_title)}),t?(0,r.Y)(w,{children:e.post_content}):null,(0,r.FD)(g,{children:[void 0!==e.source&&(0,r.FD)(m,{href:`https://${e.source}`,target:"_blank",onClick:e=>e.stopPropagation(),children:[e.site_icon&&null!==e.site_icon?(0,r.Y)(f,{src:e.site_icon,height:"22",width:"22",$invert:"mtgazone.com"===e.source}):null,(0,r.Y)(x,{children:e.site_name&&null!==e.site_name?(0,d.iT)(e.site_name):e.source})]}),M.length>0&&(0,r.Y)(b,{children:M.slice(0,2).map((e,t)=>(0,r.Y)($,{children:(0,d.iT)(e)},t))})]})]}),(0,r.FD)(A,{children:[(0,r.FD)(k,{children:[(0,r.Y)(v,{$ava:`https://static.dotgg.gg/avatars/${e.author_avatar&&""!==e.author_avatar?e.author_avatar:p(e.author||"anonymous")}`}),e.author]}),(0,r.FD)(Y,{children:[(0,r.Y)("svg",{width:"12",height:"12",viewBox:"0 0 15 15",fill:"currentColor",children:(0,r.Y)("path",{d:"M7.5,0C3.4,0,0,3.4,0,7.5S3.4,15,7.5,15S15,11.6,15,7.5S11.6,0,7.5,0z M7.5,13.6c-3.4,0-6.1-2.8-6.1-6.1c0-3.4,2.8-6.1,6.1-6.1c3.4,0,6.1,2.8,6.1,6.1C13.6,10.9,10.9,13.6,7.5,13.6z M10.8,9.2c-0.1,0.2-0.4,0.4-0.6,0.4c-0.1,0-0.2,0-0.3-0.1L7.2,8.1C7,8,6.8,7.8,6.8,7.5V4c0-0.4,0.3-0.7,0.7-0.7S8.2,3.6,8.2,4v3.1l2.4,1.2C10.9,8.4,11,8.8,10.8,9.2z"})}),(0,r.Y)(z,{dateTime:y.toISOString(),children:(0,a.GP)(y,"MMM dd, yyyy")}),(0,r.Y)(T,{dateTime:y.toISOString(),children:(0,a.GP)(y,"MMM dd")})]})]})]})]})})}])},62596(e,t,n){var r=n(63679),o=n(28297),i=n(30821);const a=r.I4.div` 12156 display: flex; 12157 align-items: stretch; 12158 gap: 2px; 12159 margin: 16px 0 14px; 12160 border-bottom: 1px solid var(--theme-palette-color-5); 12161 /* Allow horizontal scroll on narrow widths, but pin overflow-y to hidden: 12162 leaving it at the default lets overflow-x auto compute overflow-y to auto 12163 too, so the count pill / 2px underline spawns a stray vertical scrollbar 12164 (the bug from the mock). */ 12165 overflow-x: auto; 12166 overflow-y: hidden; 12167 ${e=>e.$grid&&r.AH` 12168 @media only screen and ${o.E0} { 12169 display: grid; 12170 grid-template-columns: repeat(3, minmax(0, 1fr)); 12171 gap: 6px; 12172 margin: 12px 0; 12173 border-bottom: none; 12174 overflow: visible; 12175 } 12176 `} 12177`,l=r.I4.a` 12178 display: inline-flex; 12179 align-items: center; 12180 gap: 7px; 12181 white-space: nowrap; 12182 padding: 0 14px 12px; 12183 font-size: 14px; 12184 font-weight: 600; 12185 cursor: pointer; 12186 text-decoration: none; 12187 color: ${e=>e.$active?"var(--theme-palette-color-4)":"var(--theme-palette-color-3)"}; 12188 border-bottom: 2px solid 12189 ${e=>e.$active?e.$accent||"var(--theme-palette-color-1)":"transparent"}; 12190 margin-bottom: -1px; 12191 transition: color 0.15s ease, border-color 0.15s ease; 12192 12193 &:hover { 12194 color: var(--theme-palette-color-4); 12195 } 12196 ${e=>e.$grid&&r.AH` 12197 @media only screen and ${o.E0} { 12198 justify-content: center; 12199 gap: 5px; 12200 min-width: 0; 12201 height: ${44}px; 12202 margin: 0; 12203 padding: 0 8px; 12204 border: none; 12205 border-radius: 6px; 12206 background: ${e.$active?"var(--theme-palette-color-6)":"var(--theme-palette-color-8)"}; 12207 box-shadow: inset 0 0 0 1px ${e.$active?e.$accent||"var(--theme-palette-color-1)":"var(--theme-palette-color-5)"}; 12208 font-size: 13.5px; 12209 font-weight: 700; 12210 } 12211 `} 12212`,s=r.I4.span` 12213 min-width: 0; 12214 overflow: hidden; 12215 text-overflow: ellipsis; 12216`,d=r.I4.span` 12217 display: inline-flex; 12218 align-items: center; 12219 opacity: 0.8; 12220 svg { 12221 width: 12px; 12222 height: 12px; 12223 } 12224`,c=r.I4.span` 12225 font-size: 10.5px; 12226 font-weight: 700; 12227 line-height: 1.5; 12228 border-radius: 50px; 12229 padding: 1px 7px; 12230 background: ${e=>e.$active?e.$accent||"var(--theme-palette-color-1)":"var(--theme-palette-color-5)"}; 12231 color: ${e=>e.$active?"var(--dotgg-on-accent, var(--theme-palette-color-8))":"var(--theme-palette-color-4)"}; 12232 ${e=>e.$grid&&r.AH` 12233 @media only screen and ${o.E0} { 12234 padding: 0; 12235 background: none; 12236 color: ${e.$active?e.$accent||"var(--theme-palette-color-1)":i.Q.muted}; 12237 } 12238 `} 12239`;n.d(t,["$d",0,d,"VQ",0,a,"h7",0,c,"sB",0,l,"yP",0,s])},62532(e,t,n){n.d(t,{l:()=>We});var r=n(10201),o=n(17402),i=n(16133),a=n(29155),l=n(40131),s=n(15299),d=n(9299),c=n(42715),p=n(63679),h=n(99529),u=n(49194),g=n(1748);const m={day:75,week:30,month:10},f=864e5;function x(e,t){return Math.max(e*t,44)}const v={rowHeight:76,headerHeight:52,rowTopOffset:58,imageSize:56,minWidthForImage:220,minWidthForDates:130,showDateRange:!0},y={rowHeight:58,headerHeight:44,rowTopOffset:50,imageSize:40,minWidthForImage:140,minWidthForDates:90,showDateRange:!1},w={events:[],minDate:0,maxDate:0,rowCount:0};var b=n(28297);function $({events:e,isUTC:t,todayNonce:n,onOpenDetail:a}){const l=(0,o.li)(null),s=[...e].sort((e,t)=>
12239e.dateStart.getTime()-t.dateStart.getTime());let d="";const c=Math.max(s.findIndex(e=>!e.isPast),0);return(0,o.vJ)(()=>{if(0===n||null===l.current)return;const e=l.current.querySelectorAll("[data-phone-row]");e[c]?.scrollIntoView({behavior:"smooth",block:"center"})},[n,c]),(0,r.Y)(u.X,{ref:l,children:s.map((e,n)=>{const l=(0,i.GP)(e.dateStart,"MMMM yyyy"),s=l!==d;return d=l,(0,r.FD)(o.FK,{children:[s&&(0,r.Y)(A,{"data-phone-span":"",children:l}),(0,r.Y)(g.jP,{leading:(0,r.Y)(h.q,{when:e.dateStart,today:e.isActive}),title:e.item.title,meta:[(0,r.Y)(C,{$live:e.isActive,children:e.isActive?"LIVE":e.isPast?"ENDED":"UPCOMING"},"kind"),k(e)?(0,r.FD)("span",{children:[(0,i.GP)(e.dateStart,"MMM d")," â ",(0,i.GP)(e.dateEnd,"MMM d")]},"range"):(0,r.Y)("span",{children:(0,i.GP)(e.dateStart,t?"MMM d · HH:mm":"MMM d")},"at")],trailing:(0,r.FD)(g.pM,{children:[(0,r.Y)(F,{children:Y(e)}),(0,r.Y)(D,{children:(0,i.GP)(e.dateStart,"EEE")})]}),action:(0,r.Y)(g.g7,{}),accent:e.isActive,href:e.item.href,onActivate:void 0===e.item.href||""===e.item.href?t=>{t.preventDefault(),a(e)}:void 0})]},n)})})}function k(e){return e.dateEnd.getTime()-e.dateStart.getTime()>f}function Y(e){if(e.isActive)return"Now";const t=Math.round((e.dateStart.getTime()-Date.now())/f);return 0===t?"Today":t>0?`in ${t}d`:`${Math.abs(t)}d ago`}const A=p.Ay.div` 12240 position: sticky; 12241 top: 0; 12242 z-index: 4; 12243 display: flex; 12244 align-items: center; 12245 height: 30px; 12246 padding: 0 12px; 12247 background: var(--theme-palette-color-7); 12248 border-bottom: 1px solid var(--theme-palette-color-5); 12249 font-size: 11px; 12250 font-weight: 800; 12251 letter-spacing: 0.08em; 12252 text-transform: uppercase; 12253 color: var(--theme-palette-color-3); 12254 @media only screen and ${b.Ab} { 12255 padding: 0 10px; 12256 } 12257`,C=p.Ay.span` 12258 flex: none; 12259 padding: 2px 6px; 12260 border-radius: 4px; 12261 background: color-mix(in srgb, var(--theme-palette-color-1) 10%, transparent); 12262 color: ${e=>!0===e.$live?"var(--theme-palette-color-1)":"var(--theme-palette-color-3)"}; 12263 font-size: 10.5px; 12264 font-weight: 700; 12265 letter-spacing: 0.04em; 12266 @media only screen and ${b.Ab} { 12267 display: none; 12268 } 12269`,F=p.Ay.span` 12270 font-size: 13px; 12271 font-weight: 700; 12272 font-variant-numeric: tabular-nums; 12273 color: var(--theme-palette-color-4); 12274`,D=p.Ay.span` 12275 font-size: 10.5px; 12276 color: var(--theme-palette-color-3); 12277`;var S=n(18041),I=n(23764),z=n(90023),T=n(56411),E=n(4229);const L=[{id:"day",label:"Day"},{id:"week",label:"Week"},{id:"month",label:"Month"}];function M({count:e,mode:t,onMode:n,zoom:o,onZoom:i,isUTC:a,onToggleUTC:l,showExpired:s,onToggleExpired:d,onToday:c}){return(0,r.Y)(E.ce,{count:(0,r.Y)(z.$,{ariaLabel:"Events view",value:t,options:[{value:"list",label:"List"},{value:"timeline",label:"Timeline"}],onChange:n}),activeCount:(a?1:0)+(s?1:0),extra:(0,r.Y)(N,{type:"button",onClick:c,children:"Today"}),filters:(0,r.FD)(r.FK,{children:["timeline"===t&&(0,r.Y)(I.Kw,{label:"Scale",children:(0,r.Y)(S.M,{label:"Scale",allowAny:!1,options:L.map(e=>({id:e.id,label:e.label})),value:o,onChange:e=>{""!==e&&i(e)}})}),(0,r.FD)(E.rh,{children:[(0,r.Y)(T.A,{compact:!0,checked:a,onChange:l,checkedStrings:["Use UTC","Use UTC"]}),(0,r.Y)(T.A,{compact:!0,checked:s,onChange:d,checkedStrings:["Show expired","Show expired"]})]})]}),filtersFooter:t=>(0,r.FD)(E.X,{type:"button",onClick:t,children:["Show ",e," ",1===e?"event":"events"]})})}const N=p.Ay.button` 12278 display: inline-flex; 12279 align-items: center; 12280 justify-content: center; 12281 flex: none; 12282 height: 36px; 12283 padding: 0 10px; 12284 border: 1px solid var(--theme-palette-color-5); 12285 border-radius: 6px; 12286 background: none; 12287 color: var(--theme-palette-color-3); 12288 font-family: inherit; 12289 font-size: 12.5px; 12290 font-weight: 600; 12291 cursor: pointer; 12292`,P=p.I4.a` 12293 position: absolute; 12294 display: flex; 12295 top: ${e=>e.$top}px; 12296 left: ${e=>e.$left}px; 12297 /* Already clamped by barWidth(), the same call the packer makes (7b). */ 12298 width: ${e=>e.$width}px; 12299 height: ${e=>e.$height-10}px; 12300 flex-direction: row; 12301 border-radius: 8px; 12302 padding: 8px 10px; 12303 background-color: ${e=>e.$active?"var(--theme-palette-color-6)":e.$past?"var(--theme-palette-color-7)":"var(--theme-palette-color-6)"}; 12304 border: 1px solid 12305 ${e=>e.$active?"var(--theme-palette-color-1)":"var(--theme-palette-color-5)"}; 12306 box-shadow: ${e=>e.$active?"0 0 0 1px var(--theme-palette-color-1), 0 2px 12px rgba(255, 211, 102, 0.15)":"none"}; 12307 text-decoration: none; 12308 color: inherit; 12309 opacity: ${e=>e.$past?.55:1}; 12310 transition: 12311 transform 120ms ease, 12312 box-shadow 120ms ease, 12313 filter 120ms ease; 12314 &:hover { 12315 transform: translateY(-1px); 12316 box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); 12317 filter: brightness(1.08); 12318 z-index: 20; 12319 } 12320 /* The dead track between two bars, split down the middle: a thumb landing 12321 in the gap hits the nearer bar instead of nothing. Never more than half 12322 the gap â two overlapping hit areas and the top one silently wins. */ 12323 &::after { 12324 content: ""; 12325 position: absolute; 12326 inset: -${2}px; 12327 border-radius: inherit; 12328 } 12329 @media only screen and (max-width: 800px) { 12330 padding: 6px 8px; 12331 border-radius: 6px; 12332 } 12333`,O=p.I4.div` 12334 position: absolute; 12335 inset: 0; 12336 border-radius: inherit; 12337 overflow: hidden; 12338 pointer-events: none; 12339`,_=p.I4.div` 12340 position: absolute; 12341 top: 0; 12342 left: 0; 12343 bottom: 0; 12344 background-color: var(--theme-palette-color-1); 12345 opacity: 0.12; 12346 pointer-events: none; 12347`,R=p.I4.div` 12348 position: sticky; 12349 left: 8px; 12350 display: flex; 12351 flex-direction: row; 12352 gap: 10px; 12353 align-items: center; 12354 min-width: 0; 12355 max-width: 100%; 12356 user-select: none; 12357 @media only screen and (max-width: 800px) { 12358 gap: 8px; 12359 left: 6px; 12360 } 12361`,j=p.I4.div` 12362 background: url(${e=>e.$bg}) no-repeat; 12363 background-position: ${e=>void 0!==e.$pos&&""!==e.$pos?e.$pos:"center"}; 12364 background-size: ${e=>void 0!==e.$zoom&&""!==e.$zoom?e.$zoom:"cover"}; 12365 width: ${e=>e.$size}px; 12366 height: ${e=>e.$size}px; 12367 border-radius: 6px; 12368 flex-shrink: 0; 12369`,J=p.I4.div` 12370 display: flex; 12371 flex-direction: column; 12372 min-width: 0; 12373 gap: 4px; 12374`,B=p.I4.div` 12375 display: flex; 12376 align-items: center; 12377 gap: 6px; 12378 min-width: 0;
12379`,K=p.I4.span` 12380 flex-shrink: 0; 12381 background-color: var(--theme-palette-color-1); 12382 color: var(--dotgg-on-accent, var(--theme-palette-color-8)); 12383 font-size: 0.65em; 12384 font-weight: bold; 12385 padding: 2px 6px; 12386 border-radius: 4px; 12387 letter-spacing: 0.06em; 12388 @media only screen and (max-width: 800px) { 12389 padding: 1px 4px; 12390 font-size: 0.6em; 12391 } 12392`,W=p.I4.div` 12393 overflow: hidden; 12394 color: var(--theme-palette-color-4); 12395 white-space: nowrap; 12396 text-overflow: ellipsis; 12397 font-weight: 600; 12398 font-size: 0.95em; 12399 min-width: 0; 12400 @media only screen and (max-width: 800px) { 12401 font-size: 0.85em; 12402 } 12403`,U=p.I4.div` 12404 display: flex; 12405 gap: 8px; 12406 font-size: 0.75em; 12407 align-items: center; 12408 color: var(--theme-palette-color-3); 12409 min-width: 0; 12410 @media only screen and (max-width: 800px) { 12411 font-size: 0.7em; 12412 gap: 6px; 12413 } 12414`,Q=p.I4.div` 12415 white-space: nowrap; 12416 overflow: hidden; 12417 text-overflow: ellipsis; 12418 min-width: 0; 12419`,G=p.I4.div` 12420 flex-shrink: 0; 12421 border-radius: 4px; 12422 padding: 1px 6px; 12423 background-color: var(--theme-palette-color-7); 12424 color: var(--theme-palette-color-4); 12425`,H=p.I4.div` 12426 display: flex; 12427 flex-direction: column; 12428 align-items: center; 12429 justify-content: center; 12430 gap: 6px; 12431 border: 1px dashed var(--theme-palette-color-5); 12432 border-radius: 8px; 12433 background-color: var(--theme-palette-color-8); 12434 color: var(--theme-palette-color-3); 12435`,q=p.I4.div` 12436 font-size: 1.1em; 12437 font-weight: 600; 12438 color: var(--theme-palette-color-4); 12439`,V=p.I4.div` 12440 font-size: 0.85em; 12441`,X=p.I4.div` 12442 width: 100%; 12443 background-color: var(--theme-palette-color-7); 12444 border-radius: 8px; 12445 position: relative; 12446 overflow: hidden; 12447`,Z=p.I4.div` 12448 position: absolute; 12449 inset: 0; 12450 background: linear-gradient( 12451 90deg, 12452 rgba(255, 255, 255, 0) 0%, 12453 rgba(255, 255, 255, 0.04) 50%, 12454 rgba(255, 255, 255, 0) 100% 12455 ); 12456 animation: tlShimmer 1.4s infinite; 12457 @keyframes tlShimmer { 12458 0% { 12459 transform: translateX(-100%); 12460 } 12461 100% { 12462 transform: translateX(100%); 12463 } 12464 } 12465`,ee=p.I4.div` 12466 display: flex; 12467 flex-wrap: wrap; 12468 gap: 10px; 12469 align-items: center; 12470 margin-bottom: 10px; 12471 @media only screen and (max-width: 800px) { 12472 gap: 6px; 12473 margin-bottom: 8px; 12474 } 12475`,te=p.I4.div` 12476 display: flex; 12477 flex-wrap: wrap; 12478 gap: 10px; 12479 margin-left: auto; 12480 @media only screen and (max-width: 800px) { 12481 gap: 8px; 12482 margin-left: 0; 12483 width: 100%; 12484 } 12485`,ne=p.I4.div` 12486 display: inline-flex; 12487 border: 1px solid var(--theme-palette-color-5); 12488 border-radius: 6px; 12489 overflow: hidden; 12490 background-color: var(--theme-palette-color-7); 12491`,re=p.I4.button` 12492 appearance: none; 12493 border: none; 12494 padding: 6px 12px; 12495 font-size: 0.85em; 12496 background-color: ${e=>e.$active?"var(--theme-palette-color-1)":"transparent"}; 12497 color: ${e=>e.$active?"var(--theme-palette-color-7)":"var(--theme-palette-color-3)"}; 12498 cursor: pointer; 12499 font-weight: ${e=>e.$active?"bold":"normal"}; 12500 transition: 12501 background-color 120ms ease, 12502 color 120ms ease; 12503 &:hover { 12504 color: var(--theme-palette-color-4); 12505 } 12506 & + & { 12507 border-left: 1px solid var(--theme-palette-color-5); 12508 } 12509 @media only screen and (max-width: 800px) { 12510 padding: 5px 10px; 12511 font-size: 0.8em; 12512 } 12513`,oe=p.I4.button` 12514 appearance: none; 12515 border: 1px solid var(--theme-palette-color-5); 12516 background-color: var(--theme-palette-color-7); 12517 color: var(--theme-palette-color-3); 12518 border-radius: 6px; 12519 padding: 6px 12px; 12520 font-size: 0.85em; 12521 cursor: pointer; 12522 transition: 12523 background-color 120ms ease, 12524 color 120ms ease, 12525 border-color 120ms ease; 12526 &:hover { 12527 color: var(--theme-palette-color-1); 12528 border-color: var(--theme-palette-color-1); 12529 } 12530 @media only screen and (max-width: 800px) { 12531 padding: 5px 10px; 12532 font-size: 0.8em; 12533 } 12534`,ie=p.I4.div` 12535 width: 100%; 12536 overflow-x: auto; 12537 overflow-y: ${e=>!0===e.$fullHeight?"hidden":"auto"}; 12538 position: relative; 12539 cursor: grab; 12540 user-select: none; 12541 -webkit-user-select: none; 12542 /* The strip is already a two-axis pane, so on a phone it takes 6d's one 12543 gesture line: contain is what stops a horizontal fling becoming a 12544 back-navigation and a vertical one becoming pull-to-refresh. Nothing sets 12545 touch-action â the browser picks the dominant axis better than we can,
12546 and on touch there is no drag handler for it to fight (round 6, 6e). */ 12547 @media only screen and ${b.E0} { 12548 overscroll-behavior: contain; 12549 } 12550 border-radius: 8px; 12551 background-color: var(--theme-palette-color-8); 12552 &.dragging { 12553 cursor: grabbing; 12554 } 12555 &::-webkit-scrollbar { 12556 height: 10px; 12557 width: 10px; 12558 } 12559 &::-webkit-scrollbar-track { 12560 background: var(--theme-palette-color-7); 12561 } 12562 &::-webkit-scrollbar-thumb { 12563 background: var(--theme-palette-color-5); 12564 border-radius: 5px; 12565 } 12566 &::-webkit-scrollbar-thumb:hover { 12567 background: var(--theme-palette-color-1); 12568 } 12569 @media only screen and (max-width: 800px) { 12570 cursor: auto; 12571 &::-webkit-scrollbar { 12572 height: 4px; 12573 width: 4px; 12574 } 12575 } 12576`,ae=p.I4.div` 12577 position: relative; 12578`,le=p.I4.div` 12579 position: sticky; 12580 top: 0; 12581 left: 0; 12582 height: ${e=>e.$h}px; 12583 background: linear-gradient( 12584 to bottom, 12585 var(--theme-palette-color-8) 0%, 12586 var(--theme-palette-color-8) 80%, 12587 rgba(0, 0, 0, 0) 100% 12588 ); 12589 border-bottom: 1px solid var(--theme-palette-color-5); 12590 z-index: 30; 12591`,se=p.I4.div` 12592 position: absolute; 12593 top: 0; 12594 height: ${e=>e.$h}px; 12595 display: flex; 12596 flex-direction: column; 12597 align-items: center; 12598 justify-content: center; 12599 gap: 2px; 12600 user-select: none; 12601`,de=p.I4.div` 12602 color: var(--theme-palette-color-1); 12603 font-size: 0.7em; 12604 font-weight: bold; 12605 line-height: 1em; 12606 text-transform: uppercase; 12607 letter-spacing: 0.04em; 12608 display: inline-flex; 12609 align-items: center; 12610 gap: 4px; 12611 white-space: nowrap; 12612 @media only screen and (max-width: 800px) { 12613 font-size: 0.65em; 12614 } 12615`,ce=p.I4.span` 12616 font-size: 0.85em; 12617 font-weight: normal; 12618 color: var(--theme-palette-color-3); 12619`,pe=p.I4.div` 12620 font-size: 0.95em; 12621 line-height: 1em; 12622 color: var(--theme-palette-color-4); 12623 @media only screen and (max-width: 800px) { 12624 font-size: 0.85em; 12625 } 12626`,he=p.I4.div` 12627 font-size: 0.65em; 12628 line-height: 1em; 12629 color: var(--theme-palette-color-3); 12630 text-transform: uppercase; 12631`,ue=p.I4.div` 12632 position: absolute; 12633 top: 0; 12634 bottom: 0; 12635 width: 1px; 12636 background-color: var(--theme-palette-color-5); 12637 opacity: ${e=>e.$strong?.7:.35}; 12638 pointer-events: none; 12639`,ge=p.I4.div` 12640 position: absolute; 12641 top: 0; 12642 bottom: 0; 12643 background-color: var(--theme-palette-color-7); 12644 opacity: 0.4; 12645 pointer-events: none; 12646`,me=p.I4.div` 12647 position: absolute; 12648 top: 0; 12649 width: 2px; 12650 background-color: var(--theme-palette-color-1); 12651 z-index: 40; 12652 pointer-events: none; 12653 box-shadow: 0 0 8px var(--theme-palette-color-1); 12654`,fe=p.I4.div` 12655 position: absolute; 12656 top: 4px; 12657 transform: translateX(-50%); 12658 background-color: var(--theme-palette-color-1); 12659 color: var(--dotgg-on-accent, var(--theme-palette-color-8)); 12660 font-size: 0.7em; 12661 font-weight: bold; 12662 padding: 3px 8px; 12663 border-radius: 999px; 12664 z-index: 50; 12665 white-space: nowrap; 12666 display: inline-flex; 12667 align-items: center; 12668 gap: 6px; 12669 pointer-events: none; 12670 letter-spacing: 0.04em; 12671 @media only screen and (max-width: 800px) { 12672 font-size: 0.6em; 12673 padding: 2px 6px; 12674 gap: 4px; 12675 } 12676`,xe=p.I4.span` 12677 width: 6px; 12678 height: 6px; 12679 border-radius: 50%; 12680 background-color: var(--theme-palette-color-7); 12681 animation: nowPulse 1.8s ease-in-out infinite; 12682 @keyframes nowPulse { 12683 0%, 12684 100% { 12685 opacity: 1; 12686 } 12687 50% { 12688 opacity: 0.3; 12689 } 12690 } 12691`,ve=e=>(0,r.FD)(ee,{children:[(0,r.Y)(ne,{role:"group","aria-label":"Zoom level",children:["day","week","month"].map(t=>(0,r.Y)(re,{type:"button",$active:e.zoom===t,onClick:()=>e.onZoomChange(t),children:"day"===t?"Day":"week"===t?"Week":"Month"},t))}),(0,r.Y)(oe,{type:"button",onClick:e.onTodayClick,children:"Today"}),(0,r.FD)(te,{children:[(0,r.Y)(T.A,{compact:!0,onChange:e.onToggleUTC,checkedStrings:["Use UTC","Use UTC"]}),(0,r.Y)(T.A,{compact:!0,onChange:e.onToggleExpired,checkedStrings:["Show expired","Show expired"]})]})]});var ye=n(51900),we=n(30712);function be({event:e,onClose:t,onOpenRef:n,isUTC:a}){const[l,s]=(0,o.J0)(null);if((0,o.vJ)(()=>{null!==e&&s(e)},[e]),null===l)return null;const{item:d}=l,c=d.detail,p=a?"UTC":"local time";
12691return(0,r.FD)(ye.qp,{header:d.title,subtitle:d.kind!==d.title?d.kind:void 0,show:null!==e,width:620,onClose:t,footHint:`Times shown in ${p}.`,footer:void 0!==c?.externalUrl&&""!==c.externalUrl?(0,r.Y)(Me,{href:c.externalUrl,target:"_blank",rel:"noopener noreferrer",children:c.externalLabel??"Official announcement"}):void 0,children:[""!==d.image?(0,r.Y)($e,{$bg:d.image,$accent:d.color??"",role:"img","aria-label":d.title}):null,(0,r.FD)(ke,{$live:l.isActive,children:[(0,r.Y)(Ye,{children:l.isActive?"Running now":l.isPast?"Ended":"Upcoming"}),(0,r.FD)(Ae,{children:[(0,i.GP)(l.dateStart,"EEE d MMM yyyy, HH:mm")," â"," ",(0,i.GP)(l.dateEnd,"EEE d MMM yyyy, HH:mm")]})]}),void 0!==c?.facts&&c.facts.length>0?(0,r.Y)(Ce,{children:c.facts.map(e=>(0,r.FD)(Fe,{children:[(0,r.Y)(De,{children:e.label}),(0,r.Y)(Se,{children:e.value})]},e.label))}):null,void 0!==c?.description&&""!==c.description?(0,r.Y)(Ie,{html:c.description}):null,void 0!==c?.refs&&c.refs.length>0?(0,r.Y)(ze,{children:c.refs.map(e=>(0,r.FD)(Te,{type:"button",$rarity:e.rarity??0,onClick:()=>n(e),children:[(0,r.Y)(Ee,{src:e.icon,alt:"",loading:"lazy"}),(0,r.Y)(Le,{children:e.name})]},`${e.elementType}:${e.id}`))}):null]})}const $e=p.Ay.div` 12692 width: 100%; 12693 height: 190px; 12694 border-radius: 10px; 12695 margin-bottom: 14px; 12696 background-image: url(${e=>e.$bg}); 12697 background-repeat: no-repeat; 12698 background-size: cover; 12699 background-position: center; 12700 background-color: ${e=>""!==e.$accent?e.$accent:"var(--theme-palette-color-7)"}; 12701 @media only screen and ${b.E0} { 12702 height: 140px; 12703 } 12704`,ke=p.Ay.div` 12705 display: flex; 12706 flex-direction: column; 12707 gap: 2px; 12708 padding: 10px 12px; 12709 border-radius: 8px; 12710 border: 1px solid 12711 ${e=>e.$live?"var(--theme-palette-color-1)":"var(--theme-palette-color-5)"}; 12712 background: var(--theme-palette-color-7); 12713 margin-bottom: 14px; 12714`,Ye=p.Ay.div` 12715 font-size: 11px; 12716 font-weight: 800; 12717 letter-spacing: 0.08em; 12718 text-transform: uppercase; 12719 color: var(--theme-palette-color-3); 12720`,Ae=p.Ay.div` 12721 font-size: 13.5px; 12722 font-variant-numeric: tabular-nums; 12723 color: var(--theme-palette-color-4); 12724`,Ce=p.Ay.div` 12725 display: flex; 12726 flex-wrap: wrap; 12727 gap: 8px; 12728 margin-bottom: 14px; 12729`,Fe=p.Ay.div` 12730 display: flex; 12731 align-items: baseline; 12732 gap: 6px; 12733 padding: 5px 9px; 12734 border-radius: 6px; 12735 background: var(--theme-palette-color-7); 12736`,De=p.Ay.span` 12737 font-size: 10.5px; 12738 font-weight: 700; 12739 letter-spacing: 0.05em; 12740 text-transform: uppercase; 12741 color: var(--theme-palette-color-3); 12742`,Se=p.Ay.span` 12743 font-size: 13px; 12744 font-weight: 600; 12745 color: var(--theme-palette-color-4); 12746`,Ie=(0,p.Ay)(we.k)` 12747 margin: 0 0 14px; 12748 font-size: 14px; 12749 color: var(--theme-palette-color-4); 12750`,ze=p.Ay.div` 12751 display: flex; 12752 flex-wrap: wrap; 12753 gap: 8px; 12754`,Te=p.Ay.button` 12755 display: flex; 12756 flex-direction: column; 12757 align-items: center; 12758 gap: 4px; 12759 width: 74px; 12760 padding: 6px 4px; 12761 border-radius: 8px; 12762 cursor: pointer; 12763 background: var(--theme-palette-color-7); 12764 border: 1px solid 12765 ${e=>e.$rarity>=5?"rgba(255, 211, 102, 0.7)":"var(--theme-palette-color-5)"}; 12766 &:hover { 12767 filter: brightness(1.1); 12768 } 12769`,Ee=p.Ay.img` 12770 width: 52px; 12771 height: 52px; 12772 border-radius: 6px; 12773 object-fit: cover; 12774`,Le=p.Ay.span` 12775 font-size: 11px; 12776 line-height: 1.2; 12777 text-align: center; 12778 color: var(--theme-palette-color-4); 12779`,Me=p.Ay.a` 12780 display: inline-flex; 12781 align-items: center; 12782 padding: 8px 14px; 12783 border-radius: 6px; 12784 font-size: 13px; 12785 font-weight: 600; 12786 text-decoration: none; 12787 color: var(--dotgg-on-accent, var(--theme-palette-color-8)); 12788 background: var(--theme-palette-color-1); 12789`;class Ne{constructor(e){this.opts=e,this.active=!1,this.startX=0,this.startScroll=0,this.moved=!1,this.pointerId=null,this.onPointerDown=e=>{const t=this.opts.element();null!==t&&0===e.button&&"touch"!==e.pointerType&&(e.target instanceof Element&&null!==e.target.closest("button, input, label, a")||(this.active=!0,this.moved=!1,this.startX=e.clientX,this.startScroll=t.scrollLeft,this.pointerId=e.pointerId,t.setPointerCapture(e.pointerId),t.classList.add("dragging")))},this.onPointerMove=e=>
12789{const t=this.opts.element();if(!this.active||null===t)return;const n=e.clientX-this.startX;Math.abs(n)>5&&(this.moved=!0),t.scrollLeft=this.startScroll-n},this.onPointerUp=()=>{if(!this.active)return;const e=this.opts.element();null!==this.pointerId&&!0===e?.hasPointerCapture(this.pointerId)&&e.releasePointerCapture(this.pointerId),e?.classList.remove("dragging"),this.active=!1,this.pointerId=null,window.setTimeout(()=>{this.moved=!1},0)},this.onWheel=e=>{const t=this.opts.element();null===t||this.opts.pageOwnsVerticalScroll()||Math.abs(e.deltaY)>Math.abs(e.deltaX)&&(t.scrollLeft+=e.deltaY,e.preventDefault())},this.onClickCapture=e=>{this.moved&&(e.preventDefault(),e.stopPropagation())}}}var Pe=n(99899);const Oe=e=>{const{event:t,dayScale:n,dims:o,isUTC:a,onClick:l,onOpenDetail:s}=e,d=x(t.lengthDays,n),c=t.leftDays*n,p=o.rowTopOffset+o.rowHeight*t.row,h=d>=o.minWidthForImage,u=d>=o.minWidthForDates,{item:g}=t,m=void 0!==g.href&&""!==g.href;return(0,r.FD)(P,{$width:d,$left:c,$top:p,$height:o.rowHeight,$active:t.isActive,$past:t.isPast,href:m?g.href:void 0,role:m?void 0:"button",tabIndex:m?void 0:0,onKeyDown:m?void 0:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),s(t))},onDragStart:e=>e.preventDefault(),onClick:e=>{l(e),e.defaultPrevented||m||s(t)},children:[t.isActive?(0,r.Y)(O,{"aria-hidden":"true",children:(0,r.Y)(_,{style:{width:100*t.progress+"%"}})}):null,(0,r.FD)(R,{children:[h&&g.image?(0,r.Y)(j,{$bg:g.image,$size:o.imageSize,$pos:g.imagePos,$zoom:g.imageZoom}):null,(0,r.FD)(J,{children:[(0,r.FD)(B,{children:[t.isActive?(0,r.Y)(K,{children:"LIVE"}):null,(0,r.Y)(W,{children:g.title})]}),u?(0,r.FD)(U,{children:[o.showDateRange?(0,r.FD)(Q,{children:[(0,i.GP)(t.dateStart,"MMM d, h:mm a")," â"," ",(0,i.GP)(t.dateEnd,"MMM d, h:mm a")]}):null,(0,r.Y)(G,{children:(0,r.Y)(Pe.F,{dateStart:(t.dateStart.getTime()/1e3).toString(),dateEnd:(t.dateEnd.getTime()/1e3).toString(),utc:!a})})]}):null]})]})]})},_e=e=>{const{minDate:t,totalDays:n,dayScale:o,contentWidth:a,dims:l,showDayName:s,showEveryDayNumber:d}=e;let c="",p="";return(0,r.FD)(r.FK,{children:[Array.from({length:n}).map((e,n)=>{const i=new Date(t+n*f).getDay();return 0===i||6===i?(0,r.Y)(ge,{style:{left:n*o+"px",width:`${o}px`}},`wk${n}`):null}),Array.from({length:n}).map((e,n)=>{const i=1===new Date(t+n*f).getDay();return d||i?(0,r.Y)(ue,{$strong:i&&!d,style:{left:n*o+"px"}},`l${n}`):null}),(0,r.Y)(le,{$h:l.headerHeight,style:{width:`${a}px`},children:Array.from({length:n}).map((e,n)=>{const a=new Date(t+n*f),h=(0,i.GP)(a,"MMM"),u=(0,i.GP)(a,"yyyy"),g=c!==h||p!==u,m=p!==u&&0!==n;c=h,p=u;const x=1===a.getDay(),v=d||x;return(0,r.FD)(se,{$h:l.headerHeight,style:{left:n*o+"px",width:`${o}px`},children:[g?(0,r.FD)(de,{children:[h,m?(0,r.Y)(ce,{children:u}):null]}):null,v?(0,r.Y)(pe,{children:(0,i.GP)(a,"dd")}):null,s?(0,r.Y)(he,{children:(0,i.GP)(a,"EEEEEE")}):null]},n)})})]})};var Re=n(2195);function je(e,t){return new Date(e+(t?(0,Re.TA)():0))}var Je=n(69124),Be=n(76990);function Ke(e){return"undefined"!=typeof window&&window.matchMedia?window.matchMedia(e):null}class We extends Be.v{constructor(e){var t;super(e),this.openRef=e=>{(0,l.F$)(e.elementType).then(()=>{this.setState(t=>({detail:null,elementPopup:{id:e.id,type:e.elementType,show:t.elementPopup.show+1}}))})},this.wrapper=o.Ay.createRef(),this.nowMark=o.Ay.createRef(),this.drag=new Ne({element:()=>this.wrapper.current,pageOwnsVerticalScroll:()=>this.isFullHeight}),this.mql=Ke("(max-width: 800px)"),this.phoneMql=Ke(b.E0),this.detachPane=null,this.handleBreakpointChange=()=>this.forceUpdate(),this.centerOnNow=e=>{if(!this.nowMark.current||!this.wrapper.current)return;const t=this.nowMark.current.offsetLeft,n=this.wrapper.current.offsetWidth;this.wrapper.current.scrollTo({left:Math.max(0,t-n/2),behavior:e?"smooth":"auto"}),this.state.hasCenteredOnNow||this.setState({hasCenteredOnNow:!0})},this.state={isUTC:!1,showExpired:!1,zoom:"day",hasCenteredOnNow:!1,isLoaded:this.store.getState().nonEmpty(),mode:(t=b.MZ,Ke(t)?.matches?"timeline":"list"),todayNonce:0,detail:null,sourceNonce:0,elementPopup:{id:"",type:"characters",show:0}},this.loadSources()}async loadSources(){const e=[];(0,Je.u$)()&&e.push((0,a.Ce)());for(const t of(0,Je._H)())e.push(t.load());const t=await Promise.allSettled(e);for(const e of t)"rejected"===e.status&&console.error("timeline: a source failed to load",e.reason);this.setState(e=>({isLoaded:!0,sourceNonce:e.sourceNonce+1}))}collectItems(){const e=[];
12789if((0,Je.u$)())for(const t of this.store.getStateOrElse([])){const n=(0,Re.gG)(t);null!==n&&e.push(n)}for(const t of(0,Je._H)())try{e.push(...t.items())}catch(e){console.error(`timeline: source "${t.id}" threw while reading items`,e)}return e}componentDidMount(){super.componentDidMount(),this.mql?.addEventListener("change",this.handleBreakpointChange),this.phoneMql?.addEventListener("change",this.handleBreakpointChange),this.syncPane()}componentWillUnmount(){super.componentWillUnmount(),this.mql?.removeEventListener("change",this.handleBreakpointChange),this.phoneMql?.removeEventListener("change",this.handleBreakpointChange),this.detachPane?.(),this.detachPane=null}componentDidUpdate(e,t){this.state.hasCenteredOnNow&&t.zoom===this.state.zoom||this.centerOnNow(!1),this.syncPane()}syncPane(){const e=this.wrapper.current;if(null==e)return this.detachPane?.(),void(this.detachPane=null);null===this.detachPane&&(this.detachPane=(0,c.c4)(e))}get isMobile(){return this.mql?.matches??!1}get isPhone(){return this.phoneMql?.matches??!1}get dims(){return this.isMobile?y:v}get isFullHeight(){return!0===this.props.fullHeight&&!0!==this.props.embed&&!this.isPhone}render(){const e=m[this.state.zoom],t=60*(new Date).getTimezoneOffset()*1e3,n=Date.now(),o=n+(this.state.isUTC?t:0),a=this.dims,l=this.isMobile,c=this.collectItems(),p=0===c.length?w:function(e,t){const n=Date.now(),r=e.map(e=>({item:e,dateStart:je(e.startUtcMs,t.isUTC),dateEnd:je(e.endUtcMs,t.isUTC)})).filter(({dateStart:e,dateEnd:t})=>!isNaN(e.getTime())&&!isNaN(t.getTime())).filter(({item:e})=>t.showExpired||e.endUtcMs>n).sort((e,t)=>Math.min(Math.abs(n-e.item.startUtcMs),Math.abs(n-e.item.endUtcMs))-Math.min(Math.abs(n-t.item.startUtcMs),Math.abs(n-t.item.endUtcMs)));if(0===r.length)return w;let o=1/0,i=-1/0;for(const{dateStart:e,dateEnd:t}of r){const n=new Date(e.getTime()).setHours(0,0,0,0),r=new Date(t.getTime()).setHours(0,0,0,0);n<o&&(o=n),r>i&&(i=r)}const a=new Date(n).setHours(0,0,0,0);a<o&&(o=a),a>i&&(i=a);const l=[],s=[];for(const{item:e,dateStart:i,dateEnd:a}of r){const r=i.getTime(),d=a.getTime(),c=Math.max(.5,(d-r)/f),p=r+(x(c,t.dayScale)+4)/t.dayScale*f;let h=0;for(;void 0!==l[h]&&l[h]>r;)h++;l[h]=Math.max(d,p);const u=n>=e.startUtcMs&&n<=e.endUtcMs,g=n>e.endUtcMs,m=u?(n-e.startUtcMs)/Math.max(1,e.endUtcMs-e.startUtcMs):0;s.push({item:e,dateStart:i,dateEnd:a,row:h,lengthDays:c,leftDays:(r-o)/f,isActive:u,isPast:g,progress:m})}return{events:s,minDate:o,maxDate:i,rowCount:l.length}}(c,{isUTC:this.state.isUTC,showExpired:this.state.showExpired,dayScale:e}),{events:h,minDate:u,maxDate:g,rowCount:v}=p,y=Math.max(g-u,f),k=Math.ceil(y/f)+1,Y=e*k,A=Math.max(v,1),C=a.rowTopOffset+A*a.rowHeight+12,F=this.isFullHeight,D=this.props.embed?`${a.rowTopOffset+Math.min(A,6)*a.rowHeight+12}px`:this.isPhone?b.SW:F?`${C}px`:l?"50vh":"60vh",S=!this.state.isLoaded&&0===h.length,I=this.state.isLoaded&&0===h.length,z=e>=50,T=e>=22,E=(o-u)*e/f,L=this.isPhone&&!0!==this.props.embed,N=L&&"list"===this.state.mode;return(0,r.FD)(d.t,{justhide:!0,children:[L?(0,r.Y)(M,{count:h.length,mode:this.state.mode,onMode:e=>this.setState({mode:e}),zoom:this.state.zoom,onZoom:e=>this.setState({zoom:e}),isUTC:this.state.isUTC,onToggleUTC:()=>this.setState({isUTC:!this.state.isUTC}),showExpired:this.state.showExpired,onToggleExpired:()=>this.setState({showExpired:!this.state.showExpired}),onToday:()=>"list"===this.state.mode?this.setState(e=>({todayNonce:e.todayNonce+1})):this.centerOnNow(!0)}):null,L?null:(0,r.Y)(ve,{zoom:this.state.zoom,onZoomChange:e=>this.setState({zoom:e}),onTodayClick:()=>this.centerOnNow(!0),onToggleUTC:()=>this.setState({isUTC:!this.state.isUTC}),onToggleExpired:()=>this.setState({showExpired:!this.state.showExpired})}),S?(0,r.Y)(X,{style:{height:D},"aria-hidden":"true",children:(0,r.Y)(Z,{})}):I?(0,r.FD)(H,{style:{height:D},children:[(0,r.Y)(q,{children:"No upcoming events"}),(0,r.Y)(V,{children:this.state.showExpired?"There are no events on the timeline.":"Toggle Show expired to see past events."})]}):N?(0,r.Y)($,{events:h,isUTC:this.state.isUTC,todayNonce:this.state.todayNonce,onOpenDetail:e=>
12789this.setState({detail:e})}):(0,r.Y)(ie,{ref:this.wrapper,$fullHeight:F,style:{height:D},onPointerDown:this.drag.onPointerDown,onPointerMove:this.drag.onPointerMove,onPointerUp:this.drag.onPointerUp,onPointerCancel:this.drag.onPointerUp,onWheel:this.drag.onWheel,role:"region","aria-label":"Events timeline",children:(0,r.FD)(ae,{style:{width:`${Y}px`,height:`${C}px`},children:[(0,r.Y)(_e,{minDate:u,totalDays:k,dayScale:e,contentWidth:Y,dims:a,showDayName:z,showEveryDayNumber:T}),(0,r.Y)(me,{ref:this.nowMark,style:{left:`${E}px`,height:`${C}px`}}),(0,r.FD)(fe,{style:{left:`${E}px`},children:[(0,r.Y)(xe,{}),"NOW · ",(0,i.GP)(this.state.isUTC?o:n,"MMM d · h:mm a")]}),h.map(t=>(0,r.Y)(Oe,{event:t,dayScale:e,dims:a,isUTC:this.state.isUTC,onClick:this.drag.onClickCapture,onOpenDetail:e=>this.setState({detail:e})},t.item.key))]})}),(0,r.Y)(be,{event:this.state.detail,onClose:()=>this.setState({detail:null}),onOpenRef:this.openRef,isUTC:this.state.isUTC}),(0,r.Y)(s.l,{itemId:this.state.elementPopup.id,elementType:this.state.elementPopup.type,show:this.state.elementPopup.show})]})}}},2195(e,t,n){n.d(t,{TA:()=>o,gG:()=>i,zT:()=>l});var r=n(54807);function o(){return 60*(new Date).getTimezoneOffset()*1e3}function i(e){const t=a(e.date_binding),n=a(e.date_binding_end);return null===t||null===n?null:{key:`post:${e.post_name}:${e.date_binding??""}`,title:e.post_title,image:e.guid,startUtcMs:t,endUtcMs:n,href:`/${e.post_name}`,kind:"Article"}}function a(e){if(void 0===e||""===e)return null;const t=(0,r.qg)(e,"yyyy-MM-dd HH:mm:ss",new Date).getTime();return isNaN(t)?null:t-o()}function l(e){if(void 0===e||""===e)return null;const t=/^(\d{4})-(\d{2})-(\d{2})[ T](\d{2}):(\d{2}):(\d{2})/.exec(e.trim());return null===t?null:Date.UTC(Number(t[1]),Number(t[2])-1,Number(t[3]),Number(t[4]),Number(t[5]),Number(t[6]))}},69124(e,t,n){n.d(t,{Iy:()=>o,_H:()=>i,u$:()=>a});const r=[];function o(e){r.some(t=>t.id===e.id)||r.push(e)}function i(){return r}function a(){return true}},78187(e,t,n){var r=n(10201),o=n(63679),i=n(12964);const a=o.Ay.span` 12790 display: inline-flex; 12791 align-items: center; 12792 justify-content: center; 12793 gap: 5px; 12794`,l=o.Ay.span` 12795 display: inline-flex; 12796 align-items: center; 12797 line-height: 1.3; 12798`,s=o.Ay.span` 12799 display: inline-flex; 12800 align-items: center; 12801 gap: 3px; 12802 padding: 0 5px; 12803 border-radius: 3px; 12804 background: rgba(150, 190, 230, 0.12); 12805 border: 1px solid rgba(150, 190, 230, 0.25); 12806 font-size: inherit; 12807 line-height: 1.3; 12808 12809 span { 12810 ${i.Fj} 12811 } 12812 svg { 12813 color: ${i.qA}; 12814 } 12815`;n.d(t,["u",0,({normal:e,foil:t,suffix:n})=>(0,r.FD)(a,{children:[(e>0||t<=0)&&(0,r.Y)(l,{children:e}),t>0&&(0,r.FD)(s,{title:`${t} foil`,children:[(0,r.Y)(i.RE,{size:11}),(0,r.Y)("span",{children:t})]}),n&&(0,r.Y)("span",{children:n})]})])},43933(e,t,n){var r=n(10201),o=n(17402),i=n(63679),a=n(65562),l=n(81616),s=n(80288);const d=i.Ay.div` 12816 display: flex; 12817 flex-direction: ${e=>e.$compact?"row":"column"}; 12818 gap: ${e=>e.$compact?"4px":"3px"}; 12819 padding: ${e=>e.$compact?"4px":"6px"}; 12820 background: rgba(255, 255, 255, 0.03); 12821 border-radius: 4px; 12822 margin-top: 2px; 12823 align-items: ${e=>e.$compact?"center":"flex-start"}; 12824 flex-wrap: wrap; 12825`,c=i.Ay.div` 12826 font-size: 0.55em; 12827 color: rgba(255, 255, 255, 0.5); 12828 text-transform: uppercase; 12829 font-weight: bold; 12830 letter-spacing: 0.5px; 12831`,p=i.Ay.div` 12832 display: flex; 12833 flex-wrap: wrap; 12834 gap: 3px; 12835 align-items: center; 12836`,h=i.Ay.div` 12837 padding: 2px 6px; 12838 border-radius: 50px; 12839 font-size: 0.55em; 12840 font-weight: bold; 12841 text-transform: uppercase; 12842 line-height: 1.2; 12843 white-space: nowrap; 12844 user-select: none; 12845`,u=(0,i.Ay)(h)` 12846 background-color: ${e=>e.$owned?"#4caf50":"#666"}; 12847 color: white; 12848 opacity: ${e=>e.$owned?1:.7}; 12849`,g=(0,i.Ay)(h)` 12850 background-color: #7c4dff; 12851 color: white; 12852 cursor: pointer; 12853 transition: all 0.15s ease; 12854 12855 &:hover { 12856 opacity: 0.85; 12857 transform: scale(1.05); 12858 } 12859`;n.d(t,["K",0,({cardId:e,compact:t=!1})=>{const n=(0,l.h3)(),i=(0,o.Kr)(()=>{const t=n?.collection?.find(t=>t.card===e),r=n?.deckCardCounts?.[e];return t?{ownedCount:parseInt(t.standard||"0")+parseInt(t.foil||"0"),tradeCount:parseInt(t.trade||"0")+parseInt(t.trade_foil||"0"),wishCount:parseInt(t.wish||"0")+parseInt(t.wish_foil||"0"),customTags:(0,a.kH)(t.extra_data),deckCardCount:r}:{ownedCount:0,tradeCount:0,wishCount:0,customTags:[],deckCardCount:r}},[n?.collection,n?.deckCardCounts,e]);if(!window.DotGGUser||!n?.user?.user_id)return null;const{ownedCount:h,tradeCount:m,wishCount:f,customTags:x,deckCardCount:v}=i;return h>0||v||m>0||f>0||x.length>0||!t?(0,r.FD)(d,{$compact:t,children:[!t&&(0,r.Y)(c,{children:"Your collection:"}),(0,r.FD)(p,{children:[(0,r.Y)(u,{$owned:h>0,title:h>0?`You own ${h} ${1===h?"copy":"copies"}`:"You don't own this card",children:h>0?`Own: ${h}`:"Not owned"}),v&&(0,r.FD)(g,{onClick:t=>{t.stopPropagation(),window.open(`/decks/?my=1&hascrd=${e}`,"_blank")},title:`Used in ${v.decks} deck${1!==v.decks?"s":""} (need ${v.qty} copies) â Click to view`,children:["In ",v.decks," ",1===v.decks?"deck":"decks"]}),m>0&&(0,r.FD)(s.I2,{$color:"#ff9800",title:`You have ${m} listed for trade`,children:["Trading: ",m]}),f>0&&(0,r.FD)(s.I2,{$color:"#2196f3",title:`You want ${f} more copies`,children:["Want: ",f]}),x.map(e=>(0,r.Y)(s.I2,{$color:e.color,title:e.name,children:e.name},e.name))]})]}):null}])},41396(e,t,n){n.d(t,{y:()=>A,R4:()=>Y,hZ:()=>b,x4:()=>$,k:()=>Je});var r=n(10201),o=n(17402),i=n(14510),a=n(35304),l=n(45298),s=n(62444),d=n(86031),c=n(56703),p=n(34561),h=n(4738),u=n(91181),g=n(81616),m=n(48887),f=n(89629),x=n(53794),v=n(63679);const y=v.i7` 12860 0%, 100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); } 12861 50% { box-shadow: 0 0 0 4px var(--theme-palette-color-1); } 12862`,w=v.I4.div` 12863 display: flex; 12864 justify-content: center; 12865 padding-top: 10px; 12866`,b=v.I4.div` 12867 display: flex; 12868 gap: 5px; 12869 align-items: center; 12870`,$=v.I4.div` 12871 font-size: 0.6em; 12872 line-height: 0.9em; 12873`,k=v.I4.a` 12874 cursor: pointer; 12875 width: 60px; 12876 font-size: 0.8em; 12877 display: flex; 12878 align-items: center; 12879 align-content: center; 12880 justify-content: center; 12881 gap: 5px; 12882 border-radius: 3px; 12883 background-color: var(--theme-palette-color-2); 12884 font-weight: bold; 12885 color: var(--dotgg-on-accent-2, var(--theme-palette-color-8)); 12886 &:hover { 12887 color: #000; 12888 filter: brightness(1.2); 12889 } 12890`,Y=v.I4.div` 12891 color: var(--theme-palette-color-4); 12892 width: 100%; 12893 text-align: center; 12894`,A=v.I4.div` 12895 width: 100%; 12896 display: flex; 12897 gap: 5px; 12898 padding: 5px; 12899 align-items: center; 12900 justify-content: space-between; 12901`,C=v.I4.div` 12902 width: 100%; 12903 display: grid; 12904 grid-gap: 10px; 12905 grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); 12906 @media only screen and (max-width: 1140px) { 12907 grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); 12908 grid-gap: 5px; 12909 } 12910`,F=v.I4.div` 12911 display: flex; 12912 flex-direction: column; 12913`,D=v.I4.div` 12914 width: 100%; 12915 text-align: center; 12916 padding: 40px 20px; 12917 font-size: 1.1em; 12918 color: var(--theme-palette-color-4); 12919`,S=v.I4.div` 12920 display: flex; 12921 gap: 10px; 12922 align-items: center; 12923 justify-content: flex-end; 12924 padding: 5px 0; 12925 background-color: var(--theme-palette-color-7); 12926`,I=v.I4.div` 12927 display: flex; 12928 align-items: center; 12929 gap: 8px; 12930 @media only screen and (max-width: 700px) { 12931 flex-direction: column; 12932 align-items: flex-start; 12933 gap: 4px; 12934 } 12935`,z=v.I4.span` 12936 font-size: 0.9em; 12937 color: var(--theme-palette-color-3); 12938 white-space: nowrap; 12939 @media only screen and (max-width: 700px) { 12940 font-size: 0.85em; 12941 } 12942`,T=v.I4.span` 12943 font-size: 0.85em; 12944 color: var(--theme-palette-color-4); 12945 opacity: 0.8; 12946`,E=v.I4.div` 12947 display: flex; 12948 align-items: center; 12949 gap: 8px; 12950 padding: 6px 0; 12951`,L=v.I4.div` 12952 display: flex; 12953 align-items: center; 12954 justify-content: space-between; 12955 gap: 10px; 12956 flex-wrap: wrap; 12957`,M=v.I4.div` 12958 display: flex; 12959 align-items: center; 12960 gap: 10px; 12961 flex-wrap: wrap; 12962`,N=v.I4.button` 12963 display: inline-flex; 12964 align-items: center; 12965 gap: 6px; 12966 height: 28px; 12967 padding: 0 10px; 12968 border: 1px solid 12969 ${e=>e.$active?"var(--theme-palette-color-1)":"var(--theme-palette-color-5)"}; 12970 border-radius: 5px; 12971 background-color: var(--theme-palette-color-7); 12972 color: ${e=>e.$active?"var(--theme-palette-color-4)":"var(--theme-palette-color-3)"}; 12973 font-family: inherit; 12974 font-size: 0.8em; 12975 font-weight: 600; 12976 cursor: pointer; 12977 white-space: nowrap; 12978 transition: color 0.15s ease, border-color 0.15s ease; 12979 12980 &:hover { 12981 color: var(--theme-palette-color-4); 12982 border-color: var(--theme-palette-color-1); 12983 } 12984`,P=v.I4.button` 12985 display: inline-flex; 12986 align-items: center; 12987 gap: 6px; 12988 height: 32px; 12989 padding: 0 12px; 12990 border: 1px solid var(--theme-palette-color-5); 12991 border-radius: 5px; 12992 background-color: var(--theme-palette-color-7); 12993 color: var(--theme-palette-color-3); 12994 font-family: inherit; 12995 font-size: 0.85em; 12996 font-weight: 600; 12997 cursor: pointer; 12998 white-space: nowrap; 12999 transition: color 0.15s ease, border-color 0.15s ease; 13000 13001 &:hover:not(:disabled) { 13002 color: var(--theme-palette-color-4); 13003 border-color: var(--theme-palette-color-1); 13004 } 13005 &:disabled { 13006 opacity: 0.6; 13007 cursor: default; 13008 } 13009 13010 ${e=>e.$pulse&&v.AH` 13011 color: var(--theme-palette-color-4); 13012 border-color: var(--theme-palette-color-1); 13013 animation: ${y} 1.1s ease-in-out 3; 13014 `} 13015`;var O=n(90023),_=n(12964);const R=[{value:"both",label:"Both"},{value:"nonfoil",label:"Normal"},{value:"foil",label:"Foil",foil:!0,icon:(0,r.Y)(_.RE,{size:11})}],j=({isWishlist:e,value:t,onChange:n})=>(0,r.FD)(E,{children:[(0,r.Y)(z,{children:e?"Wishlist edition:":"Edition:"}),(0,r.Y)(O.$,{ariaLabel:"Edition filter",value:t,options:R,onChange:n})]}),J="export-listing-btn",B={grid:(0,r.FD)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,r.Y)("path",{d:"M3 3h7v7H3z"}),(0,r.Y)("path",{d:"M14 3h7v7h-7z"}),(0,r.Y)("path",{d:"M14 14h7v7h-7z"}),(0,r.Y)("path",{d:"M3 14h7v7H3z"})]}),list:(0,r.FD)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,r.Y)("path",{d:"M8 6h13"}),(0,r.Y)("path",{d:"M8 12h13"}),(0,r.Y)("path",{d:"M8 18h13"}),(0,r.Y)("path",{d:"M3 6h.01"}),(0,r.Y)("path",{d:"M3 12h.01"}),(0,r.Y)("path",{d:"M3 18h.01"})]})},K=({hasFoil:e,individualUser:t,isWishlist:n,editionFilter:o,onEditionChange:i,viewMode:a,onViewModeChange:l,showPrices:s,onShowPricesChange:d,exporting:c,onExport:p,pulse:h})=>(0,r.FD)(L,{children:[(0,r.FD)(M,{children:[e&&(0,r.Y)(j,{isWishlist:n,value:o,onChange:i}),(0,r.Y)(O.$,{ariaLabel:"Listing view mode",value:a,options:[{value:"grid",icon:B.grid,title:"Image grid"},{value:"list",icon:B.list,title:"List"}],onChange:l}),(0,r.Y)(N,{type:"button",$active:s,title:s?"Hide card prices":"Show card prices",onClick:()=>
13015d(!s),children:s?"Prices: on":"Prices: off"})]}),t&&(0,r.Y)(P,{id:J,type:"button",disabled:c,$pulse:h,onClick:p,children:c?"Exportingâ¦":`Export ${n?"wishlist":"trade list"} as image`})]});var W=n(54780),U=n(1748),Q=n(28297);function G({loaded:e,total:t,hasMore:n,auto:i,onLoadMore:a,noun:l,pageSize:s,filteredEnd:d,backToTop:c}){const p=(0,o.li)(null),h=(0,o.li)(a);return h.current=a,(0,o.vJ)(()=>{const e=p.current;if(null===e||!n||!i)return;if("undefined"==typeof IntersectionObserver)return;const t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&h.current()},{rootMargin:"400px 0px"});return t.observe(e),()=>t.disconnect()},[n,i,e]),(0,r.FD)(r.FK,{children:[n&&i&&(0,r.FD)(r.FK,{children:[(0,r.Y)(q,{ref:p,"aria-hidden":"true"}),(0,r.Y)(V,{"aria-hidden":"true"}),(0,r.Y)(V,{"aria-hidden":"true"})]}),n&&!i&&(0,r.FD)(X,{children:[(0,r.FD)(Z,{type:"button",onClick:a,children:["Load ",Math.min(s,t-e)," more"]}),(0,r.FD)(ee,{children:[e.toLocaleString()," of ",t.toLocaleString()," loaded"]})]}),!n&&t>0&&(0,r.FD)(te,{children:[(0,r.FD)("span",{children:["End of ",t.toLocaleString()," ",l]}),d]}),!0===c&&(0,r.Y)(H,{})]})}function H(){return(0,r.Y)(ne,{type:"button","aria-label":"Back to top",title:"Back to top",onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),children:(0,r.FD)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,r.Y)("path",{d:"M12 19V5"}),(0,r.Y)("path",{d:"M5 12l7-7 7 7"})]})})}const q=v.Ay.div` 13016 width: 100%; 13017 height: 1px; 13018`,V=v.Ay.div` 13019 width: 100%; 13020 height: ${U.pn}px; 13021 border-bottom: 1px solid color-mix(in srgb, var(--theme-palette-color-5) 55%, transparent); 13022 background: linear-gradient( 13023 90deg, 13024 var(--theme-palette-color-8) 0%, 13025 var(--theme-palette-color-7) 50%, 13026 var(--theme-palette-color-8) 100% 13027 ); 13028 background-size: 200% 100%; 13029 animation: phone-list-skeleton 1s ease-in-out infinite; 13030 @keyframes phone-list-skeleton { 13031 0% { 13032 background-position: 150% 0; 13033 } 13034 100% { 13035 background-position: -50% 0; 13036 } 13037 } 13038 @media (prefers-reduced-motion: reduce) { 13039 animation: none; 13040 } 13041`,X=v.Ay.div` 13042 display: flex; 13043 flex-direction: column; 13044 align-items: center; 13045 gap: 6px; 13046 width: 100%; 13047 padding: 12px; 13048 box-sizing: border-box; 13049 @media only screen and ${Q.Ab} { 13050 padding: 10px; 13051 } 13052`,Z=(0,v.Ay)(Q.IX)` 13053 ${(0,Q.d3)()} 13054`,ee=v.Ay.div` 13055 font-size: 11.5px; 13056 color: var(--theme-palette-color-3); 13057`,te=v.Ay.div` 13058 display: flex; 13059 flex-direction: column; 13060 align-items: center; 13061 justify-content: center; 13062 gap: 8px; 13063 width: 100%; 13064 min-height: 64px; 13065 padding: 12px; 13066 box-sizing: border-box; 13067 font-size: 12px; 13068 color: var(--theme-palette-color-3); 13069 @media only screen and ${Q.Ab} { 13070 padding: 10px; 13071 } 13072`,ne=v.Ay.button` 13073 position: fixed; 13074 right: 12px; 13075 @media only screen and ${Q.Ab} { 13076 right: 10px; 13077 } 13078 bottom: calc(12px + var(${W.h7}, 8px)); 13079 z-index: 70000; 13080 display: inline-flex; 13081 align-items: center; 13082 justify-content: center; 13083 width: ${44}px; 13084 height: ${44}px; 13085 border: 1px solid var(--theme-palette-color-5); 13086 border-radius: 22px; 13087 background: var(--theme-palette-color-7); 13088 color: var(--theme-palette-color-4); 13089 cursor: pointer; 13090 svg { 13091 display: block; 13092 } 13093`;var re=n(49194);var oe=n(4941),ie=n(22197),ae=n(78187);const le=({cardData:e,cardForTrade:t,isWishlist:n,individualUser:i,showPrice:a})=>{const[l,s]=(0,o.J0)(0),c=n?+t.wished:+t.available,p=n?+(t.wished_foil??0):+(t.available_foil??0),h=e.number?`${e.setId}-${e.number.toString().padStart(3,"0")}`:e.id,u=a&&e.displayPrice&&"N/A"!==e.displayPrice?e.displayPrice:null;return(0,r.FD)(r.FK,{children:[(0,r.Y)(U.jP,{leading:(0,r.Y)(se,{children:(0,r.Y)(ie.Uc,{cardId:e.id,width:34,clickable:!1,hidePrice:!0,noHoverLight:!0})}),title:d.SA.cards.getCardName(e),meta:[(0,r.FD)(de,{children:[(0,r.Y)(ae.u,{normal:c,foil:p}),(0,r.Y)("span",{children:n?"wished":"for trade"})]},"count"),(0,r.Y)("span",{children:h},"id"),u?(0,r.Y)(ce,{children:u},"price"):null],onActivate:()=>s(e=>e+1),action:i?void 0:(0,r.Y)(pe,{href:`/trade/card/${e.id}${n?"?wishlisted":""}`,children:n?"Wishes":"Offers"})}),l>0&&(0,r.Y)(oe.X,{cardId:e.id,show:l})]})},se=v.Ay.div` 13094 width: 34px; 13095 height: 48px; 13096 border-radius: 4px; 13097 overflow: hidden; 13098 background: #000; 13099`,de=v.Ay.span` 13100 display: inline-flex; 13101 align-items: center; 13102 gap: 4px; 13103 color: var(--theme-palette-color-4); 13104 font-weight: 600; 13105 > span:last-child { 13106 color: var(--theme-palette-color-3); 13107 font-weight: 400; 13108 } 13109`,ce=v.Ay.b` 13110 color: #4fa814 !important; 13111`,pe=v.Ay.a` 13112 display: inline-flex; 13113 align-items: center; 13114 justify-content: center; 13115 min-width: 72px; 13116 height: ${44}px; 13117 padding: 0 12px; 13118 border: 1px solid var(--theme-palette-color-5); 13119 border-radius: 6px; 13120 color: var(--theme-palette-color-3); 13121 font-size: 12.5px; 13122 font-weight: 600; 13123 text-decoration: none; 13124 white-space: nowrap; 13125 &:hover { 13126 color: var(--theme-palette-color-4); 13127 } 13128`;function he({listings:e,isWishlist:t,individualUser:n,showPrices:i,loading:a,total:l,activeFilters:s,onClearFilters:d,onEditFilters:c,signature:p,emptyState:h}){const u=t?"wishes":"offers",g=function({total:e,signature:t,activeFilters:n,storageKey:r,pageSize:i=50,autoPages:a=4}){const l=(0,o.li)(null),s=(0,o.li)(function(e){if(void 0===e||"undefined"==typeof sessionStorage)return null;try{const n=sessionStorage.getItem(e);if(null===n)return null;const r=JSON.parse(n);return"object"==typeof(t=r)&&null!==t&&"string"==typeof Reflect.get(t,"signature")&&"number"==typeof Reflect.get(t,"pages")&&"number"==typeof Reflect.get(t,"scrollY")?r:null}catch{return null}var t}(r)).current,d=null!==s&&s.signature===t,[c,p]=(0,o.J0)(()=>d?s.pages:1),h=(0,o.li)({signature:t,activeFilters:n}),u=(0,o.li)(!1);(0,o.vJ)(()=>{!u.current&&d&&(u.current=!0,requestAnimationFrame(()=>{requestAnimationFrame(()=>window.scrollTo(0,s.scrollY))}))},[d,s]),(0,o.vJ)(()=>{const e=h.current;h.current={signature:t,activeFilters:n},e.signature!==t&&(n<e.activeFilters||(p(1),function(e){if(null===e)return;const t=e.getBoundingClientRect().top+window.scrollY-8;window.scrollY<=t||window.scrollTo({top:t,behavior:"auto"})}(l.current)))},[t,n]),(0,o.vJ)(()=>
13128{if(void 0===r)return;const e=()=>{!function(e,t){if("undefined"!=typeof sessionStorage)try{sessionStorage.setItem(e,JSON.stringify(t))}catch{}}(r,{signature:t,pages:c,scrollY:window.scrollY})};return window.addEventListener("pagehide",e),window.addEventListener("beforeunload",e),()=>{e(),window.removeEventListener("pagehide",e),window.removeEventListener("beforeunload",e)}},[r,t,c]);const g=c*i;return{limit:g,loaded:Math.min(g,e),hasMore:e>g,auto:c<a,loadMore:()=>p(e=>e+1),listRef:l}}({total:e.length,signature:p,activeFilters:s,storageKey:"trade-paging"+(void 0===n?"":`:${n}`),pageSize:ue});return a?(0,r.Y)(D,{children:"Loading trading listingsâ¦"}):0===l?h??(0,r.Y)(D,{children:t?"No wishlist entries found. Be the first to add cards to your wishlist!":"No trade offers found. Be the first to list cards for trade!"}):0===e.length?(0,r.FD)(ge,{children:[(0,r.FD)(me,{children:["No ",u," match your filters"]}),(0,r.FD)(fe,{children:[l," ",u," exist â ",1===s?"one filter is":`${s} filters are`," ","hiding them."]}),c&&(0,r.Y)(ve,{type:"button",onClick:c,children:"Edit filters"}),(0,r.Y)(xe,{type:"button",onClick:d,children:"Clear filters"})]}):(0,r.FD)(r.FK,{children:[(0,r.Y)(re.X,{ref:g.listRef,children:e.slice(0,g.limit).map(({cardData:e,cardForTrade:o},a)=>(0,r.Y)(le,{cardData:e,cardForTrade:o,isWishlist:t,individualUser:n,showPrice:i},`${e.id}-${a}`))}),(0,r.Y)(G,{loaded:g.loaded,total:e.length,hasMore:g.hasMore,auto:g.auto,onLoadMore:g.loadMore,noun:u,pageSize:ue,backToTop:!0,filteredEnd:s>0?(0,r.FD)(r.FK,{children:[(0,r.FD)(fe,{children:["Nothing else here? Widen a filter to see more ",u,"."]}),(0,r.FD)(xe,{type:"button",onClick:d,children:["Clear ",1===s?"1 filter":`${s} filters`]})]}):void 0})]})}const ue=50,ge=v.Ay.div` 13129 display: flex; 13130 flex-direction: column; 13131 align-items: center; 13132 gap: 9px; 13133 width: 100%; 13134 margin-top: 12px; 13135 padding: 16px 12px; 13136 border: 1px solid var(--theme-palette-color-5); 13137 border-radius: 6px; 13138 text-align: center; 13139`,me=v.Ay.div` 13140 font-size: 13.5px; 13141 font-weight: 600; 13142 color: var(--theme-palette-color-4); 13143`,fe=v.Ay.div` 13144 font-size: 11.5px; 13145 line-height: 1.45; 13146 color: var(--theme-palette-color-3); 13147`,xe=(0,v.Ay)(Q.IX)` 13148 ${(0,Q.d3)()} 13149`,ve=(0,v.Ay)(Q.pp)` 13150 ${(0,Q.d3)()} 13151`;var ye=n(18041),we=n(23764),be=n(7718),$e=n(4229),ke=n(415);const Ye=new Set(["invertFilters","filterLogicAnd","sortby","sortorder"]),Ae=[{value:"both",label:"Both"},{value:"nonfoil",label:"Normal"},{value:"foil",label:"Foil"}];function Ce({isWishlist:e,onWishlist:t,individualUser:n,count:o,filters:i,filterchange:a,hasFoil:s,editionFilter:d,onEditionChange:c,viewerOptions:p,viewerFilter:u,onViewerFilterChange:g,viewMode:m,onViewModeChange:f,showPrices:x,onShowPricesChange:v,exporting:y,onExport:w,filtersOpen:b,onFiltersOpenChange:$}){const k=function(e){return Object.entries(e).filter(([e,t])=>!Ye.has(e)&&""!==String(t??"")).map(([e,t])=>[e,String(t)])}(i),Y=s&&"both"!==d,A=k.length+(Y?1:0)+u.length,C=e?"wishes":"offers",F=()=>{a(void 0,"clear"),c("both"),g([])};return(0,r.FD)(Fe,{children:[(0,r.Y)(ke.pX,{}),(0,r.Y)($e.ce,{count:n?(0,r.Y)("strong",{children:o}):(0,r.Y)(O.$,{ariaLabel:"Offers or wishlists",value:e?"wish":"offers",options:[{value:"offers",label:"Offers"},{value:"wish",label:"Wish"}],onChange:e=>t("wish"===e)}),activeCount:A,filters:(0,r.FD)(r.FK,{children:[(0,r.Y)(l.d,{filters:i,filterchange:a,phoneChips:!0}),s&&(0,r.Y)(we.Kw,{label:"Edition",children:(0,r.Y)(ye.M,{label:"Edition",anyLabel:"Both",options:Ae.filter(e=>"both"!==e.value).map(e=>({id:e.value,label:e.label})),value:"both"===d?"":d,onChange:e=>c(""===e?"both":e)})}),p.length>0&&(0,r.Y)(we.Kw,{label:"My collection",children:(0,r.Y)(ye.M,{label:"My collection",options:p.map(e=>({id:e.value,label:e.label})),value:u,onChange:g})})]}),filtersOpen:b,onFiltersOpenChange:$,filtersFooter:e=>(0,r.FD)(r.FK,{children:[(0,r.Y)($e.L7,{type:"button",onClick:F,children:"Reset"}),(0,r.FD)($e.X,{type:"button",onClick:e,children:["Show ",o," ",C]})]}),viewToggle:(0,r.Y)(O.$,{ariaLabel:"Listing view mode",value:m,options:[{value:"list",icon:B.list,title:"List"},{value:"grid",icon:B.grid,title:"Image grid"}],onChange:f}),strip:0===o&&A>0?(0,r.FD)(r.FK,{children:[(0,r.FD)($e.oh,{children:["No ",C," match"]}),(0,r.FD)($e.ap,{type:"button",onClick:F,children:["Clear ",A]})]}):(0,r.FD)(r.FK,{children:[(0,r.FD)($e.oh,{children:[(0,r.Y)("strong",{children:o})," ",C]}),Y&&(0,r.FD)($e.ap,{type:"button",onClick:()=>c("both"),children:[Ae.find(e=>e.value===d)?.label,(0,r.Y)("span",{"aria-hidden":"true",children:"Ã"})]}),u.map(e=>(0,r.FD)($e.ap,{type:"button",onClick:()=>(e=>{g(u.includes(e)?u.filter(t=>t!==e):[...u,e])})(e),children:[p.find(t=>t.value===e)?.label??e,(0,r.Y)("span",{"aria-hidden":"true",children:"Ã"})]},e)),k.map(([e,t])=>(0,r.FD)($e.ap,{type:"button",onClick:()=>a("",e),children:["textSearch"===e?`â${t}â`:`${(0,h.g3)(e)}: ${t}`,(0,r.Y)("span",{"aria-hidden":"true",children:"Ã"})]},e))]}
13151),actionsLabel:"Prices · export",actions:(0,r.FD)(r.FK,{children:[(0,r.Y)(be.WH,{type:"button",onClick:()=>v(!x),children:x?"Hide card prices":"Show card prices"}),n&&(0,r.Y)(be.WH,{type:"button",disabled:y,onClick:w,children:y?"Exportingâ¦":`Export ${e?"wishlist":"trade list"} as image`})]})})]})}const Fe=v.Ay.div` 13152 width: 100%; 13153`;var De=n(23835),Se=n(96576),Ie=n(43933);const ze=({individualUser:e,isWishlist:t})=>e?t?(0,r.FD)(r.FK,{children:["Wanted",(0,r.Y)("br",{}),"count"]}):(0,r.FD)(r.FK,{children:["Offer",(0,r.Y)("br",{}),"count"]}):t?(0,r.FD)(r.FK,{children:["Total",(0,r.Y)("br",{}),"Wanted"]}):(0,r.FD)(r.FK,{children:["Total",(0,r.Y)("br",{}),"offers"]}),Te=({cardData:e,cardForTrade:t,isWishlist:n,individualUser:i,hidePrice:a})=>{const l=(0,g.h3)(),[,s]=(0,o.J0)(0),d=(0,o.hb)(()=>s(e=>e+1),[]),c=String(t.userid)!==String(window.DotGGUser??""),p=(0,o.Kr)(()=>c?{card:t.card,foil:t.foil,standard:t.standard,total:t.total,extra_data:t.extra_data,trade:t.available,wish:t.wished,trade_foil:t.available_foil??"0",wish_foil:t.wished_foil??"0"}:l?.collection?.find(e=>e.card===t.card),[c,l?.collection,t]);return(0,r.FD)(F,{children:[i&&(0,r.Y)(De._,{card:e,collectionElement:p,al
13153ien:c,onUpdate:d}),(0,r.Y)(ie.Uc,{cardSlug:e.slug,withTitle:!0,clickable:!0,narrowDesc:!0,hidePrice:a}),i&&(0,r.Y)(Se.H,{cardId:e.id,element:p,alien:!0}),(0,r.FD)(A,{children:[(0,r.FD)(b,{children:[(0,r.Y)($,{children:(0,r.Y)(ze,{individualUser:i,isWishlist:n})}),(0,r.Y)(Y,{children:(0,r.Y)(ae.u,{normal:n?+t.wished:+t.available,foil:n?+(t.wished_foil??0):+(t.available_foil??0)})})]}),!i&&(0,r.Y)(k,{href:`/trade/card/${e.id}${n?"?wishlisted":""}`,children:n?"Wishlists":"Offers"})]}),i&&c&&(0,r.Y)(Ie.K,{cardId:e.id,compact:!0})]})};var Ee=n(88769),Le=n(79407),Me=n(472);const Ne=({individualUser:e,isWishlist:t,onWishlist:n,viewerOptions:o,viewerFilter:i,onViewerFilterChange:a,hideViewerFilter:l,onHideViewerFilter:s,filteredTrades:d,totalTrades:c})=>{const p=o.filter(e=>i.includes(e.value)),u=!!window.DotGGUser;return(0,r.FD)(r.FK,{children:[!e&&(0,r.Y)(w,{children:(0,r.Y)(O.$,{ariaLabel:"Which listings",value:t?"wish":"trade",onChange:e=>n("wish"===e),options:[{value:"trade",label:"Trade Offers"},{value:"wish",label:"Wishlists"}]})}),u&&l&&(0,r.Y)(S,{children:(0,r.Y)(Ee.bk,{onClick:()=>{s(!1),(0,h.TV)("trade-hide-viewer-filter","false",365)},children:"Show Filter"})}),u&&!l&&(0,r.FD)(Ee.ic,{children:[(0,r.FD)(Ee.BU,{children:[(0,r.FD)(I,{children:[(0,r.Y)(z,{children:"My collection:"}),(0,r.Y)(Me.T,{$width:window.innerWidth>=700?"220px":"140px",$mobileWidthOverride:!0,children:(0,r.Y)(Le.R,{placeholder:"Filter by my data",value:p,onChange:e=>a(Array.isArray(e)?e.flatMap(e=>{const t="object"==typeof(n=e)&&null!==n&&"value"in n?o.find(t=>t.value===e.value):void 0;var n;return t?[t.value]:[]}):[]),options:o,bordered:!0,isMulti:!0})})]}),i.length>0&&d&&(0,r.FD)(T,{children:[d.length," of ",c," cards"]})]}),(0,r.Y)(Ee.bk,{onClick:()=>{s(!0),(0,h.TV)("trade-hide-viewer-filter","true",365)},children:"Hide"})]})]})};var Pe=n(91111);const Oe=e=>e?"minmax(0, 1fr) 110px 100px 80px":"minmax(0, 1fr) 110px 100px",_e=({isWishlist:e,showPrice:t})=>(0,r.FD)(a._I,{$columns:Oe(t),children:[(0,r.Y)(a.fh,{$align:"left",children:"Card"}),(0,r.Y)(a.fh,{$align:"left",children:"ID"}),(0,r.Y)(a.fh,{children:e?"Wanted":"For trade"}),t&&(0,r.Y)(a.fh,{$align:"right",children:"Price"})]}),Re=({cardData:e,cardForTrade:t,isWishlist:n,showPrice:i})=>{const[l,s]=(0,o.J0)(0),[c,p]=(0,o.J0)(null),h=(0,o.li)(null),u=(0,o.hb)(e=>{h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{p({x:e.clientX+15,y:e.clientY+15})},100)},[]),g=(0,o.hb)(()=>{h.current&&clearTimeout(h.current),p(null)},[]),m=d.SA.core.gameColors?.[e.color]?.color,f=e.number?`${e.setId}-${e.number.toString().padStart(3,"0")}`:e.id;return(0,r.FD)(r.FK,{children:[(0,r.FD)(a._I,{$columns:Oe(i),onMouseMove:u,onMouseLeave:g,children:[(0,r.Y)(a.eA,{$color:m,onClick:()=>s(e=>e+1),children:(0,r.Y)(a.uO,{children:e.name})}),(0,r.Y)(a.fh,{$align:"left",children:(0,r.Y)(a.Um,{children:f})}),(0,r.Y)(a.fh,{children:(0,r.Y)(ae.u,{normal:n?+t.wished:+t.available,foil:n?+(t.wished_foil??0):+(t.available_foil??0)})}),i&&(0,r.Y)(a.fh,{$align:"right",children:(0,r.Y)(a.JG,{children:e.displayPrice&&"N/A"!==e.displayPrice?e.displayPrice:"-"})})]}),c&&(0,r.Y)(Pe.f,{children:(0,r.Y)(a.AJ,{$top:c.y,$left:c.x,children:(0,r.Y)(ie.Uc,{cardId:e.id,width:200,position:"absolute"})})}),(0,r.Y)(oe.X,{cardId:e.id,show:l})]})};function je(e){const t=(0,h.Ri)("listing-mode");return"list"===t||"grid"===t?t:e?"list":"grid"}const Je=e=>{const t=(0,u.Yx)(),v=(0,g.WM)(),y=e.tradesOverride??v,w=void 0!==e.tradesOverride,[b,$]=(0,o.J0)(!0),k=!!d.SA.collection.collectionFoil,Y=(0,x.WS)(),[A,F]=(0,o.J0)(()=>({filters:(0,s.z)({}),isWishlist:!0===e.isWishlist,viewerFilter:[],hideViewerFilter:"true"===(0,h.Ri)("trade-hide-viewer-filter"),viewMode:je(Y),showPrices:"false"!==(0,h.Ri)("listing-show-prices")})),S=e=>{(0,h.TV)("listing-mode",e,365),F(t=>({...t,viewMode:e}))},I=e=>{(0,h.TV)("listing-show-prices",String(e),365),F(t=>({...t,showPrices:e}))},z=e=>F(t=>({...t,isWishlist:e})),{listingRef:T,exporting:E,handleExport:L,pulse:M}=function(e,t){const r=(0,o.li)(null),[i,a]=(0,o.J0)(!1),[l,s]=(0,o.J0)(()=>"undefined"!=typeof window&&"1"===new URLSearchParams(window.location.search).get("export"));return(0,o.vJ)(()=>
13153{if(!l)return;const e=setTimeout(()=>{document.getElementById(J)?.scrollIntoView({behavior:"smooth",block:"center"})},900),t=setTimeout(()=>s(!1),3500);return()=>{clearTimeout(e),clearTimeout(t)}},[l]),{listingRef:r,exporting:i,handleExport:async()=>{if(r.current&&!i){a(!0);try{const{shareElementAsImage:o}=await Promise.all([n.e(777),n.e(5187)]).then(n.bind(n,65187)),i=e?"wishlist":"trade",a=t||"my";await o(r.current,{filename:`${a}-${i}.png`,shareTitle:`${a} â ${i} list`})}catch(e){(0,f.N7)(e,"listingExport")}finally{a(!1)}}},pulse:l}}(A.isWishlist,e.individualUser),N=(0,o.Kr)(()=>{const e=[{value:"viewer-owned",label:"I own this"},{value:"viewer-unowned",label:"I don't own"}];return d.SA.collection.collectionCanTrade&&(e.push({value:"viewer-wishlisted",label:"On my wishlist"}),e.push({value:"viewer-trade",label:"I'm trading"})),e.push({value:"viewer-in-deck",label:"In my decks"}),e.push({value:"viewer-not-in-deck",label:"Not in my decks"}),e},[]);(0,o.vJ)(()=>{w?$(!1):($(!0),(0,i.Y)().catch(e=>{(0,f.N7)(e,"getTrades")}).finally(()=>{$(!1)}))},[w]);const P=(e,t)=>{const n=t;let r=(0,p.hF)(A.filters);"clear"===n?r={}:""!==e?r[n]=e:delete r[n];const o={};d.SA.cards.cardsFilterParams.forEach(e=>{o[e]=r[e]?r[e]:""});const i=(0,s.z)(o);F(e=>({...e,filters:i}))},O=e=>{F(t=>({...t,viewerFilter:e}))},_=(0,o.Kr)(()=>t?(0,c.u)(t,(0,p.hF)(A.filters)):[],[t,A.filters]),R=function(e,t){const n=(0,g.h3)();return(0,o.Kr)(()=>{if(!e||0===t.length)return e;const r=n?.collection?new Map(n.collection.map(e=>[e.card,e])):new Map,o=n?.deckCardCounts||{};return e.filter(e=>{const n=r.get(e.card),i=n?parseInt(n.standard||"0")+parseInt(n.foil||"0"):0,a=n?parseInt(n.wish||"0")+parseInt(n.wish_foil||"0"):0,l=n?parseInt(n.trade||"0")+parseInt(n.trade_foil||"0"):0,s=!!o[e.card];return t.every(e=>{switch(e){case"viewer-owned":return i>0;case"viewer-unowned":return 0===i;case"viewer-wishlisted":return a>0;case"viewer-trade":return l>0;case"viewer-in-deck":return s;case"viewer-not-in-deck":return!s;default:return!0}})})},[e,t,n?.collection,n?.deckCardCounts])}(y,A.viewerFilter),{editionFilter:j,setEditionFilter:B,displayedTrades:W}=function(e,t){const[n,r]=(0,o.J0)(()=>{return"foil"===(e=(0,h.Ri)("trade-edition-filter"))||"nonfoil"===e?e:"both";var e}),i=(0,o.Kr)(()=>function(e,t,n){return e?e.filter(e=>{const r=n?+e.wished:+e.available,o=n?+(e.wished_foil??0):+(e.available_foil??0);return"both"===t?r+o>0:"foil"===t?o>0:r>0}):e}(e,n,t),[e,n,t]);return{editionFilter:n,setEditionFilter:e=>{(0,h.TV)("trade-edition-filter",e,30),r(e)},displayedTrades:i}}(R,A.isWishlist),U=(0,o.Kr)(()=>{const e=new Map;return(W??[]).forEach(t=>{const n=e.get(t.card);n?n.push(t):e.set(t.card,[t])}),_.flatMap(t=>(e.get(t.id)??[]).map(e=>({cardData:t,cardForTrade:e})))},[W,_]),[Q,G]=(0,o.J0)(!1),H=b||!t||0===t.length,q=Object.values((0,p.hF)(A.filters)).filter(e=>""!==e).length+("both"===j?0:1)+A.viewerFilter.length,V=JSON.stringify([(0,p.hF)(A.filters),j,A.viewerFilter,A.isWishlist]),X=window.DotGGUser?N:[];return(0,r.FD)(r.FK,{children:[Y?(0,r.Y)(Ce,{isWishlist:A.isWishlist,onWishlist:z,individualUser:e.individualUser,count:U.length,filters:A.filters,filterchange:P,hasFoil:k,editionFilter:j,onEditionChange:B,viewerOptions:X,viewerFilter:A.viewerFilter,onViewerFilterChange:O,viewMode:A.viewMode,onViewModeChange:S,showPrices:A.showPrices,onShowPricesChange:I,exporting:E,onExport:L,filtersOpen:Q,onFiltersOpenChange:G}):(0,r.FD)(r.FK,{children:[(0,r.Y)(l.d,{filters:A.filters,filterchange:P}),(0,r.Y)(Ne,{individualUser:e.individualUser,isWishlist:A.isWishlist,onWishlist:z,viewerOptions:N,viewerFilter:A.viewerFilter,onViewerFilterChange:O,hideViewerFilter:A.hideViewerFilter,onHideViewerFilter:e=>F(t=>({...t,hideViewerFilter:e})),filteredTrades:R,totalTrades:y?.length||0}),y&&y.length>0&&(0,r.Y)(K,{hasFoil:k,individualUser:e.individualUser,isWishlist:A.isWishlist,editionFilter:j,onEditionChange:B,viewMode:A.viewMode,onViewModeChange:S,showPrices:A.showPrices,onShowPricesChange:I,exporting:E,onExport:L,pulse:M})]}),(0,r.Y)(m.VY,{ref:T,children:Y&&"list"===A.viewMode?(0,r.Y)(he,{listings:U,isWishlist:A.isWishlist,individualUser:e.individualUser,showPrices:A.showPrices,loading:H,total:y?.length??0,activeFilters:q,signature:V,onEditFilters:()=>G(!0),emptyState:e.emptyState,onClearFilters:()=>{P(void 0,"clear"),B("both"),O([])}}):H?(0,r.Y)(D,{children:"Loading trading listings..."}):y&&0!==y.length?0===U.length?(0,r.Y)(D,{children:'No cards match your filters. Try adjusting the edition or "My collection" filter.'}
13153):"list"===A.viewMode?(0,r.FD)(a.yA,{children:[(0,r.Y)(_e,{isWishlist:A.isWishlist,showPrice:A.showPrices}),U.map(({cardData:e,cardForTrade:t},n)=>(0,r.Y)(Re,{cardData:e,cardForTrade:t,isWishlist:A.isWishlist,showPrice:A.showPrices},`${e.id}-${n}`))]}):(0,r.Y)(C,{children:U.map(({cardData:t,cardForTrade:n},o)=>(0,r.Y)(Te,{cardData:t,cardForTrade:n,isWishlist:A.isWishlist,individualUser:e.individualUser,hidePrice:!A.showPrices},`${t.id}-${o}`))}):e.emptyState??(0,r.Y)(D,{children:A.isWishlist?"No wishlist entries found. Be the first to add cards to your wishlist!":"No trade offers found. Be the first to list cards for trade!"})})]})}},23051(e,t,n){n.d(t,{Y:()=>d,_:()=>s});var r=n(10201),o=n(63679),i=n(36110),a=n(86031),l=n(76521);function s({id:e,w:t,radius:n=3}){const o=Math.round(7*t/5),a=(0,l.pr)(e)?.name??e;return(0,r.Y)(c,{src:(0,i.JE)(e),alt:a,title:a,width:t,height:o,loading:"lazy",$w:t,$h:o,$r:n})}function d({rarity:e,size:t=15}){const n=e?a.SA.cards.rarityIcons?.[e]:void 0;return n?(0,r.Y)(p,{src:n,alt:e,title:e,height:t,$s:t}):null}const c=o.Ay.img` 13154 flex: none; 13155 display: block; 13156 width: ${e=>e.$w}px; 13157 height: ${e=>e.$h}px; 13158 object-fit: cover; 13159 border-radius: ${e=>e.$r}px; 13160 background: linear-gradient(160deg, #39404a, #1d2126); 13161`,p=o.Ay.img` 13162 flex: none; 13163 display: inline-block; 13164 width: auto; 13165 height: ${e=>e.$s}px; 13166 max-width: ${e=>5*e.$s}px; 13167 object-fit: contain; 13168 vertical-align: -2px; 13169`},34034(e,t,n){n.d(t,{$S:()=>x,HW:()=>g});var r=n(10201),o=n(63679),i=n(70213),a=n(91181),l=n(28297),s=n(53794),d=n(23051),c=n(99379),p=n(63099),h=n(70632),u=n(76521);function g({get:e,give:t,rarity:n,w:o,onCard:l}){(0,a.Yx)();const c=(0,s.WS)(),p=o??(c?32:44),g=e=>{if(!e)return(0,r.Y)("span",{});const t=(0,r.Y)(d._,{id:e.card,w:p,radius:c?3:4});return l?(0,r.Y)(h.xb,{type:"button","aria-label":`${(0,u.pr)(e.card)?.name??e.card}, show card`,onClick:()=>l(e.card),children:t}):t};return(0,r.FD)(y,{$art:p,$hug:!c,children:[g(e),(0,r.Y)(w,{children:e&&(0,r.Y)(m,{line:e})}),(0,r.FD)($,{$phone:c,children:[n&&(0,r.Y)(d.Y,{rarity:n,size:c?13:15}),(0,r.Y)(i.hR,{size:c?14:18})]}),(0,r.Y)(w,{$right:c,children:t&&(0,r.Y)(m,{line:t})}),g(t)]})}function m({line:e}){const t=(0,c.l4)(e),n=(0,u.pr)(e.card)?.name??e.card;return(0,r.FD)(r.FK,{children:[(0,r.Y)(b,{children:n}),e.qty>1&&(0,r.FD)(Y,{children:["Ã",e.qty]}),""!==t.text&&(0,r.Y)(k,{$chosen:t.chosen,children:t.text})]})}const f=o.Ay.div` 13170 display: flex; 13171 flex-direction: column; 13172 > * + * { 13173 border-top: 1px solid color-mix(in srgb, var(--theme-palette-color-5) 40%, transparent); 13174 } 13175`;function x({left:e="You get",right:t="You give"}){return(0,r.FD)(v,{$tone:"faint",children:[e," ",(0,r.Y)("b",{"aria-hidden":"true",children:"â"})," ",t]})}const v=(0,o.Ay)(p.eN)` 13176 display: block; 13177 padding-bottom: 4px; 13178 border-bottom: 1px solid color-mix(in srgb, var(--theme-palette-color-5) 40%, transparent); 13179 b { 13180 margin: 0 2px; 13181 color: var(--theme-palette-color-1); 13182 } 13183`,y=o.Ay.div` 13184 display: grid; 13185 align-items: center; 13186 min-width: 0; 13187 ${e=>e.$hug?o.AH` 13188 grid-template-columns: ${e.$art}px minmax(0, max-content) auto minmax(0, max-content) ${e.$art}px; 13189 justify-content: start; 13190 gap: 11px; 13191 padding: 6px 0; 13192 `:o.AH` 13193 grid-template-columns: ${e.$art}px minmax(0, 1fr) auto minmax(0, 1fr) ${e.$art}px; 13194 gap: 7px; 13195 padding: 6px 0; 13196 `} 13197`,w=o.Ay.div` 13198 display: flex; 13199 align-items: baseline; 13200 justify-content: ${e=>e.$right?"flex-end":"flex-start"}; 13201 gap: 5px; 13202 min-width: 0; 13203 font-size: 13.5px; 13204 font-weight: 700; 13205 color: var(--theme-palette-color-4); 13206 white-space: nowrap; 13207 @media only screen and ${l.E0} { 13208 font-size: 12.5px; 13209 font-weight: 600; 13210 } 13211`,b=o.Ay.span` 13212 min-width: 0; 13213 overflow: hidden; 13214 text-overflow: ellipsis; 13215`,$=o.Ay.span` 13216 display: inline-flex; 13217 align-items: center; 13218 gap: ${e=>e.$phone?5:10}px; 13219 padding: 0 ${e=>e.$phone?0:4}px; 13220 color: var(--theme-palette-color-1); 13221 svg { 13222 display: block; 13223 } 13224`,k=o.Ay.span` 13225 flex: none; 13226 font-size: 10.5px; 13227 font-weight: 800; 13228 letter-spacing: 0.04em; 13229 color: ${e=>e.$chosen?"var(--theme-palette-color-1)":p.gN}; 13230`,Y=o.Ay.span` 13231 flex: none; 13232 color: ${p.gN}; 13233 font-weight: 500; 13234`;n.d(t,["d_",0,f])},16435(e,t,n){n.d(t,{KD:()=>h,cW:()=>p,ib:()=>g,wb:()=>u});var r=n(10201),o=n(63679),i=n(53887),a=n(92667),l=n(63099),s=n(8251),d=n(76521);const c=o.Ay.a` 13235 min-width: 0; 13236 font-size: ${e=>e.$size??15}px; 13237 font-weight: 800; 13238 color: var(--theme-palette-color-4); 13239 text-decoration: none; 13240 white-space: nowrap; 13241 overflow: hidden; 13242 text-overflow: ellipsis; 13243 &:hover { 13244 color: var(--theme-palette-color-1); 13245 } 13246`;function p({user:e}){if(!e.accepting)return(0,r.Y)(l.vu,{$tone:"warn",children:"not taking offers"});const t=(0,d.DS)(e.last_active);return""===t?null:(0,r.Y)(l.vu,{$tone:(0,d.tJ)(e.last_active,3)?"good":"plain",children:t})}function h({nickname:e,size:t,list:n="trade",label:o}){return(0,r.Y)(c,{href:(0,i.Lp)(e,n),$size:t,children:o??e})}function u({user:e,showContact:t=!0,showNote:n=!0,highlightLangs:o=[],children:i}){return(0,r.FD)(m,{children:[(0,r.FD)(l.fI,{$gap:6,$wrap:!1,children:[(0,r.Y)(h,{nickname:e.nickname}),(0,r.Y)(p,{user:e}),(0,r.Y)(s.cd,{langs:e.langs,highlight:o}),i]}
13246),n&&""!==e.note&&(0,r.FD)(f,{children:["â",e.note,"â"]}),t&&(0,r.Y)(g,{user:e})]})}function g({user:e}){const t=(0,d.xd)(),n=t.friendCode&&""!==e.friend_code?t.friendCode:null;return n||""!==e.discord?(0,r.FD)(l.fI,{$gap:6,children:[n&&(0,r.FD)(a.qN,{type:"button",title:`Copy ${n.label}`,onClick:()=>(0,d.t1)(e.friend_code,n.label),children:[(0,r.Y)(l.QX,{children:n.label}),(0,r.Y)("b",{children:(0,d.Vh)(e.friend_code)})]}),""!==e.discord&&(0,r.FD)(a.qN,{type:"button",title:"Copy Discord handle",onClick:()=>(0,d.t1)(e.discord,"Discord handle"),children:[(0,r.Y)(l.QX,{children:"Discord"}),(0,r.Y)("b",{children:e.discord})]})]}):null}const m=o.Ay.div` 13247 display: flex; 13248 flex-direction: column; 13249 gap: 6px; 13250 min-width: 0; 13251`,f=o.Ay.div` 13252 font-size: 13px; 13253 color: var(--theme-palette-color-3); 13254 font-style: italic; 13255 overflow-wrap: anywhere; 13256`;n.d(t,["fr",0,f])},8251(e,t,n){n.d(t,{Ng:()=>h,TL:()=>c,cd:()=>p});var r=n(10201),o=n(63679),i=n(26983),a=n(99379),l=n(92667),s=n(63099);function d(){const e=(0,i.lx)();return e.length>0?e:i.hF}function c(e){return e.map(e=>(0,i.VZ)(e)?.label??e.toUpperCase()).join(", ")}function p({langs:e,highlight:t=[]}){return e&&0!==e.length?(0,r.FD)(u,{title:`Trades in ${c(e)}`,children:[e.slice(0,3).map(e=>(0,r.Y)(s.Ds,{$on:t.includes(e),children:(0,a.nd)(e)},e)),e.length>3&&(0,r.FD)(s.Ds,{children:["+",e.length-3]})]}):null}function h({value:e,onChange:t,disabled:n=!1}){return(0,r.Y)(g,{role:"group","aria-label":"Card languages you trade in",children:d().map(o=>{const i=e.includes(o.code);return(0,r.Y)(l.$7,{type:"button","aria-pressed":i,$on:i,disabled:n||!i&&e.length>=6,onClick:()=>{return n=o.code,t(e.includes(n)?e.filter(e=>e!==n):[...e,n]);var n},children:o.label},o.code)})})}const u=o.Ay.span` 13257 display: inline-flex; 13258 flex: none; 13259 gap: 3px; 13260`,g=(0,o.Ay)(l.ND)` 13261 flex-wrap: wrap; 13262 overflow: visible; 13263`},39131(e,t,n){n.d(t,{l:()=>ue});var r=n(10201),o=n(17402),i=n(63679),a=n(70213),l=n(51900),s=n(90023),d=n(23051),c=n(92667),p=n(76521);function h(e){const t=new Map;for(const n of e)t.set((0,p.z0)(n.card),(t.get((0,p.z0)(n.card))??0)+n.qty);return[...t]}function u({balance:e,get:t,rules:n,onShow:i}){const l=e.needed[0];return(0,r.FD)(c.oI,{$tone:e.tone,role:"status","aria-live":"polite",children:["good"===e.tone&&(0,r.Y)(a.iW,{size:16}
13263),"warn"===e.tone&&(0,r.Y)(a.O7,{}),(0,r.Y)(g,{children:e.ok?n.sameRarity?(0,r.FD)(r.FK,{children:["Balanced â ",e.swaps," swap",1===e.swaps?"":"s",(0,r.Y)(m,{children:h(t).map(([e,t])=>(0,r.FD)(o.FK,{children:[" · ",(0,r.Y)(d.Y,{rarity:e,size:12})," ",t]},e))})]}):"Ready to send":e.needed.length>0?(0,r.FD)(r.FK,{children:["Still needed:"," ",e.needed.map((e,t)=>(0,r.FD)(o.FK,{children:[t>0&&", ",e.count," ",(0,r.Y)(d.Y,{rarity:e.rarity,size:12})," to ",e.side]},`${e.side}-${e.rarity}`))]}):e.message}),l&&(0,r.FD)(f,{type:"button",$tone:"warn",onClick:()=>i(l.side,l.rarity),children:["Show ",l.count]})]})}const g=i.Ay.div` 13264 flex: 1; 13265 min-width: 0; 13266`,m=i.Ay.span` 13267 color: var(--theme-palette-color-3); 13268 font-weight: 500; 13269`,f=(0,i.Ay)(c.$k)` 13270 flex: none; 13271 height: 28px; 13272 padding: 0 10px; 13273 border-radius: 14px; 13274 font-size: 11.5px; 13275`;var x=n(68007),v=n(63099),y=n(34034);function w({give:e,get:t,rules:n}){const o=(0,x.GC)(t,e,n.sameRarity),i=n.sameRarity?o.filter(e=>e.get&&e.give):o,a=n.sameRarity?o.flatMap(e=>e.get&&e.give?[]:e.get?[{line:e.get,side:"get"}]:e.give?[{line:e.give,side:"give"}]:[]):[];return(0,r.FD)(b,{children:[(0,r.Y)(y.$S,{left:"The bundle",right:"read as pairs"}),0===i.length&&0===a.length&&(0,r.Y)($,{children:"Nothing picked yet â tap a card on each side."}),(0,r.FD)(y.d_,{children:[i.map((e,t)=>(0,r.Y)(y.HW,{...e,w:40},t)),a.map(({line:e,side:t})=>(0,r.FD)(k,{children:[(0,r.Y)(Y,{children:(0,r.Y)(d._,{id:e.card,w:40,radius:4})}),(0,r.Y)(A,{children:(0,p.pr)(e.card)?.name??e.card}),(0,r.Y)(d.Y,{rarity:(0,p.z0)(e.card),size:14}),(0,r.FD)(C,{children:["you ",t," this â no partner on the other side yet"]})]},`${t}|${e.card}|${e.foil}`))]})]})}const b=i.Ay.div` 13276 display: flex; 13277 flex-direction: column; 13278 padding: 10px 12px; 13279 background: var(--theme-palette-color-7); 13280 border: 1px solid var(--theme-palette-color-5); 13281 border-radius: 8px; 13282`,$=i.Ay.div` 13283 padding: 10px 0 4px; 13284 font-size: 13px; 13285 color: ${v.gN}; 13286`,k=i.Ay.div` 13287 display: flex; 13288 align-items: center; 13289 gap: 11px; 13290 padding: 6px 0; 13291`,Y=i.Ay.span` 13292 display: flex; 13293 opacity: 0.6; 13294`,A=i.Ay.span` 13295 font-size: 13px; 13296 font-weight: 700; 13297 color: var(--theme-palette-color-3); 13298`,C=i.Ay.span` 13299 font-size: 12.5px; 13300 font-weight: 600; 13301 color: ${v.nX.warn}; 13302`;function F(e,t,n){return e.sameRarity?t?"1 card for 1 card, same rarity"+(n>0?` â ${n} pair${1===n?"":"s"} ready`:""):"Pocket trades are 1-for-1 within a rarity, so each side needs the same number of each.":"Pick what you want from their trade list and what you offer."}function D({rules:e,nick:t,blocked:n,missingCode:o,openOffers:i,noWishlist:a,needWishlist:l,needLang:s,sendError:d,lastActive:h}){const u=!n&&!(0,p.tJ)(h,30);return(0,r.FD)(r.FK,{children:[n&&(0,r.Y)(v.LA,{children:"You can't trade with this person (one of you has blocked the other)."}),!n&&s&&(0,r.Y)(c.oI,{$tone:"warn",children:(0,r.FD)("span",{children:[t," only takes offers from traders who share one of their card languages, and yours are different. If your trade languages are wrong, fix them on your ",(0,r.Y)("a",{href:"/trade/matches/",children:"matches page"}),"."]})}),!n&&a&&(0,r.Y)(c.oI,{$tone:"warn",children:(0,r.Y)("span",{children:l?`${t} only takes offers that include a card from their wishlist, and hasn't listed one â there is nothing you can offer them yet.`:`${t} hasn't listed a wishlist, so nothing you offer can be something they asked for. Expect a slow answer, and say in your message why you picked it.`})}),u&&(0,r.Y)(c.oI,{$tone:"warn",children:(0,r.FD)("span",{children:[t," ",h>0?`was last ${(0,p.DS)(h)}`:"hasn't been seen on the site lately"," â they may not answer. Traders marked ",(0,r.Y)("b",{children:"active"})," on your ",(0,r.Y)("a",{href:"/trade/matches/",children:"matches"})," reply sooner."]})}),o&&e.friendCode&&(0,r.Y)(c.oI,{$tone:"warn",children:(0,r.FD)("span",{children:["You haven't set your ",(0,r.Y)("b",{children:e.friendCode.label})," yet â ",t," will need it to add you."," ",(0,r.Y)("a",{href:"/trade/matches/",children:"Set it now"}),"."]})}),i>0&&(0,r.Y)(v.LA,{children:"You already have an open offer with this trader."}),""!==d&&(0,r.Y)(v.LA,{role:"alert",children:d})]})}function S({nick:e,rules:t,onOpen:n}){return(0,r.FD)(I,{role:"status",children:[(0,r.FD)("h3",{children:["Offer sent to ",e]}),(0,r.FD)("p",{children:["It's in your inbox under ",(0,r.Y)("b",{children:"Waiting on them"}),". They have 14 days to answer, and you'll get their"," ",t.friendCode?t.friendCode.label:"contact details"," with the accept."]}),(0,r.Y)(c.wo,{type:"button",onClick:n,children:"Open it in the inbox"})]})}const I=i.Ay.div` 13303 display: flex; 13304 flex-direction: column; 13305 align-items: center; 13306 gap: 9px; 13307 padding: 18px 0 12px; 13308 text-align: center; 13309 h3 { 13310 margin: 0; 13311 font-size: 16px; 13312 color: var(--theme-palette-color-4); 13313 } 13314 p { 13315 margin: 0; 13316 max-width: 400px; 13317 font-size: 13px; 13318 line-height: 1.5;
13319 color: color-mix(in srgb, var(--theme-palette-color-3) 80%, transparent); 13320 text-wrap: pretty; 13321 } 13322 b { 13323 color: var(--theme-palette-color-4); 13324 font-weight: 600; 13325 } 13326 button { 13327 margin-top: 8px; 13328 } 13329`;function z({warnings:e,balance:t,get:n,rules:o,showBalance:i,onShow:a,noteOpen:l,onToggleNote:s,message:d,onMessage:p,sendBtn:h}){return(0,r.FD)(E,{children:[e,i&&(0,r.Y)(u,{balance:t,get:n,rules:o,onShow:a}),l&&(0,r.Y)(c.fs,{maxLength:500,value:d,autoFocus:!0,onChange:e=>p(e.currentTarget.value),placeholder:"Hi! Happy to swap â add me when you accept."}),(0,r.FD)(L,{children:[(0,r.Y)(M,{type:"button","aria-expanded":l,onClick:s,children:"Note"}),h]})]})}function T({balance:e,give:t,get:n,rules:o,onCancel:i,cancelDisabled:a,sendBtn:s}){return(0,r.FD)(r.FK,{children:[(0,r.Y)(l.$A,{children:e.ok?(0,r.FD)(r.FK,{children:["Ready: you give ",(0,r.Y)("b",{children:t.length}),", you get ",(0,r.Y)("b",{children:n.length}),".",o.friendCode&&(0,r.FD)(r.FK,{children:[" ","They add you by ",(0,r.Y)("b",{children:o.friendCode.label})," once you both accept."]})]}):e.message}),(0,r.FD)(l.tA,{children:[(0,r.Y)(c.LP,{type:"button",onClick:i,disabled:a,children:"Cancel"}),s]})]})}const E=i.Ay.div` 13330 display: flex; 13331 flex-direction: column; 13332 gap: 8px; 13333 width: 100%; 13334`,L=i.Ay.div` 13335 display: flex; 13336 align-items: center; 13337 gap: 8px; 13338`,M=(0,i.Ay)(c.LP)` 13339 flex: none; 13340 min-width: 84px; 13341 font-size: 13.5px; 13342`;var N=n(99379),P=n(28297);function O({line:e,side:t,chosen:n,otherNick:o,onChoose:i,onRemove:a}){const l=(0,p.pr)(e.card),s=Object.values(e.langs??{}).reduce((e,t)=>e+t,0),c="give"===t;return(0,r.FD)(_,{children:[(0,r.FD)(R,{children:[(0,r.Y)(d._,{id:e.card,w:40,radius:4}),(0,r.FD)(j,{children:[(0,r.Y)(J,{children:l?.name??e.card}),(0,r.FD)(B,{children:[c?"You own":`${o} holds`," ",s,l?.rarity&&(0,r.FD)(r.FK,{children:[" · ",(0,r.Y)(d.Y,{rarity:l.rarity,size:12})," ",l.rarity]})]})]}),(0,r.Y)(K,{type:"button",onClick:a,children:"Remove"})]}),(0,r.Y)(v.eN,{children:c?"Which copy are you giving?":"Which copy do you want?"}),(0,r.FD)(W,{role:"radiogroup","aria-label":"Copy language",children:[(0,N.f0)(e.langs).map(e=>(0,r.FD)(U,{type:"button",role:"radio","aria-checked":n===e.code,$on:n===e.code,onClick:()=>i(e.code),children:[(0,N.nd)(e.code)," ",(0,r.Y)("b",{children:e.count})]},e.code)),(0,r.Y)(U,{type:"button",role:"radio","aria-checked":""===n,$on:""===n,$dashed:!0,onClick:()=>i(""),children:"Any"})]}),(0,r.FD)(Q,{children:["From ",c?"your":"their"," linked account, not typed â the game reports the language of every copy it hands"," ",c?"you":"out","."]})]})}const _=i.Ay.div` 13343 display: flex; 13344 flex-direction: column; 13345 gap: 8px; 13346 padding: 10px 12px; 13347 background: var(--theme-palette-color-7); 13348 border: 1px solid var(--theme-palette-color-1); 13349 border-radius: 8px; 13350`,R=i.Ay.div` 13351 display: flex; 13352 align-items: center; 13353 gap: 10px; 13354 margin-bottom: 2px; 13355`,j=i.Ay.div` 13356 flex: 1; 13357 min-width: 0; 13358`,J=i.Ay.div` 13359 font-size: 14px; 13360 font-weight: 700; 13361 color: var(--theme-palette-color-4); 13362 white-space: nowrap; 13363 overflow: hidden; 13364 text-overflow: ellipsis; 13365`,B=i.Ay.div` 13366 margin-top: 2px; 13367 font-size: 11.5px; 13368 color: ${v.gN}; 13369`,K=i.Ay.button` 13370 flex: none; 13371 min-height: ${44}px; 13372 padding: 0 4px; 13373 border: none; 13374 background: none; 13375 color: var(--theme-palette-color-3); 13376 font-family: inherit; 13377 font-size: 12.5px; 13378 text-decoration: underline; 13379 cursor: pointer; 13380`,W=(0,i.Ay)(c.ND)` 13381 flex-wrap: wrap; 13382`,U=(0,i.Ay)(c.$7)` 13383 height: ${44}px; 13384 padding: 0 12px; 13385 border-radius: 6px; 13386 font-size: 12.5px; 13387`,Q=i.Ay.div` 13388 font-size: 11.5px; 13389 line-height: 1.45; 13390 color: ${v.gN}; 13391`;var G=n(1070),H=n(36110),q=n(91181),V=n(70632);function X({line:e,selected:t,dim:n,marked:o,untradable:i,onClick:a}){(0,q.Yx)();const l=(0,p.pr)(e.card),s=(0,N.l4)(e),d=[l?.name??e.card,l?.rarity,e.foil?"Foil":"",s.text].filter(Boolean).join(" · "),c=void 0!==a&&!i,h=e.qty>1||1===e.foil?`${1===e.foil?"â¦":""}${e.qty>1?`Ã${e.qty}`:""}`:s.text;return(0,r.FD)(V.$w,{$selected:t,$dim:n||i,$clickable:c,title:i?`${d} â cannot be traded in the game`:d,role:c?"button":void 0,tabIndex:c?0:void 0,"aria-pressed":c?!!t:void 0,onClick:c?a:void 0,onKeyDown:e=>{!c||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),a())},children:[(0,r.Y)("img",{src:(0,H.JE)(e.card),alt:d,loading:"lazy",width:64,height:89}),o&&!i&&(0,r.Y)(V.iF,{"aria-hidden":"true",children:"â"}),i?(0,r.Y)(V.fg,{children:"no trade"}):""!==h&&(0,r.Y)(V.n3,{$accent:h===s.text&&s.chosen,children:h})]})}var Z=n(86031),ee=n(89024),te=n(4428),ne=n(8609);function re({title:e,matchLabel:t,lines:n,selected:i,chosenLangs:a,onTap:l,rarityFilter:s,needed:h,focus:u,emptyText:g,children:m,phone:f}){const y=(0,o.Kr)(()=>n.filter(e=>(0,p.yz)(e.card)),[n]),w=y.some(e=>e.match),[b,$]=(0,o.J0)(w),[k,Y]=(0,o.J0)(""),[A,C]=(0,o.J0)(""),[F,D]=(0,o.J0)(""),[S,I]=(0,o.J0)(90);(0,o.vJ)(()=>{u?.rarity&&(Y(u.rarity),C(""),$(!1))},[u]);const z=(0,o.Kr)(()=>{const e=new Map;for(const t of y){const n=(0,p.z0)(t.card);
13391n&&e.set(n,(e.get(n)??0)+1)}const t=Object.keys(Z.SA.cards.rarityIcons??{});return[...e].sort((e,n)=>(t.indexOf(e[0])+1||99)-(t.indexOf(n[0])+1||99))},[y]),T=(0,o.Kr)(()=>{const e=new Set;for(const t of y)for(const n of(0,N.f0)(t.langs))"en"!==n.code&&e.add(n.code);return[...e]},[y]),E=(0,o.Kr)(()=>{const e=F.trim().toLowerCase();return n.filter(t=>!(!i.has((0,x.QW)(t))&&(b&&!t.match||k&&(0,p.z0)(t.card)!==k||A&&!t.langs?.[A]||e&&!(0,ee.qW)((0,p.pr)(t.card)?.name??t.card,e)&&!(0,ee.qW)(t.card,e))))},[n,b,k,A,F,i]),L=(0,o.Kr)(()=>n.filter(e=>i.has((0,x.QW)(e))&&!e.match).length,[n,i]),M=e=>Y(k===e?"":e),O=f?te.ll:de;return(0,r.FD)(oe,{children:[!f&&(0,r.FD)(v.fI,{$gap:8,children:[(0,r.Y)(ie,{children:e}),(0,r.FD)(v.QX,{children:[i.size," picked · ",y.length," available"]})]}),(0,r.FD)(v.fI,{$gap:6,$wrap:!1,children:[w&&(0,r.FD)(c.$7,{type:"button",$on:b,"aria-pressed":b,onClick:()=>$(!b),children:["â ",t]}),(0,r.Y)(se,{children:(0,r.FD)(ne.W4,{children:[(0,r.Y)(O,{type:"search",placeholder:f?"Search":"Search name",value:F,onChange:e=>D(e.currentTarget.value),"aria-label":`Search ${e}`}),(0,r.Y)(ne.WI,{children:G.pU}),""!==F&&(0,r.Y)(ne.w_,{type:"button",onClick:()=>D(""),title:"Clear search","aria-label":"Clear search",children:G.q8})]})})]}),(s&&z.length>1||T.length>0)&&(0,r.FD)(c.ND,{"aria-label":"Filter by rarity",children:[s&&z.length>1&&z.map(([e,t])=>h.includes(e)&&k!==e?(0,r.FD)(le,{type:"button",$on:!1,onClick:()=>M(e),title:`${e} still needed on this side`,children:[(0,r.Y)(d.Y,{rarity:e,size:13})," needed"]},e):(0,r.FD)(c.$7,{type:"button",$on:k===e,"aria-pressed":k===e,title:e,onClick:()=>M(e),children:[(0,r.Y)(d.Y,{rarity:e,size:13}),Z.SA.cards.rarityIcons?.[e]?t:`${e} ${t}`]},e)),T.map(e=>(0,r.FD)(c.$7,{type:"button",$on:A===e,"aria-pressed":A===e,onClick:()=>C(A===e?"":e),children:["Language ",(0,r.Y)("b",{children:(0,N.nd)(e)})]},e))]}),m,L>0&&(0,r.FD)(v.Ck,{children:[L," of your picks ",1===L?"is":"are"," not ",t," â fine to send, just not something they asked for."]}),0===n.length?(0,r.Y)(v.Ck,{children:g}):0===E.length?(0,r.Y)(v.Ck,{children:"No cards fit these filters."}):(0,r.FD)(ae,{$phone:f,children:[(0,r.Y)(V.WO,{children:E.slice(0,S).map(e=>{const t=(0,x.QW)(e),n=a.get(t);return(0,r.Y)(X,{line:n?{...e,lang:n}:e,marked:!0===e.match,selected:i.has(t),untradable:!(0,p.yz)(e.card),onClick:()=>l(e)},t)})}),E.length>S&&(0,r.FD)(P.IX,{type:"button",onClick:()=>I(S+90),children:["Show ",Math.min(90,E.length-S)," more"]})]})]})}const oe=i.Ay.div` 13392 display: flex; 13393 flex-direction: column; 13394 gap: 8px; 13395 min-width: 0; 13396`,ie=i.Ay.h3` 13397 margin: 0; 13398 font-size: 15px; 13399 color: var(--theme-palette-color-4); 13400`,ae=i.Ay.div` 13401 display: flex; 13402 flex-direction: column; 13403 gap: 8px; 13404 padding: 3px; 13405 ${e=>e.$phone?"":"max-height: 300px; overflow-y: auto;"} 13406`,le=(0,i.Ay)(c.$7)` 13407 border-color: ${v.nX.warnEdge}; 13408 background: ${v.nX.warnBg}; 13409 color: ${v.nX.warn}; 13410`,se=i.Ay.div` 13411 flex: 1; 13412 min-width: 110px; 13413`,de=(0,i.Ay)(te.iB)` 13414 border-color: var(--theme-palette-color-5) !important; 13415 &::-webkit-search-cancel-button { 13416 display: none; 13417 } 13418`;var ce=n(95117),pe=n(91995),he=n(53794);function ue({target:e,title:t,onClose:n,onSent:i,onOpen:d}){const h=(0,p.xd)(),g=(0,he.WS)(),m=(0,q.Yx)(),f=function(e,t){const[n,r]=(0,o.J0)(null),[i,a]=(0,o.J0)(""),[l,s]=(0,o.J0)(new Set),[d,c]=(0,o.J0)(new Set),[p,h]=(0,o.J0)(new Map),[u,g]=(0,o.J0)(new Map),[m,f]=(0,o.J0)(null),v=e.user.user_id,y=e.get,w=e.give;(0,o.vJ)(()=>{let e=!0;const n=[...new Set([...y??[],...w??[]].map(e=>e.card))];return(0,ce.nQ)(v,n).then(n=>{if(!e)return;r(n);const o=(e,t)=>(e??t.filter(e=>e.match)).flatMap(e=>{const n=t.find(t=>(0,x.QW)(t)===(0,x.QW)(e))??t.find(t=>t.card===e.card);return n?[n]:[]}),i=(0,x.rg)(o(y,n.they_trade),o(w,[...n.my_trade,...n.my_giveable]),t);s(i.get),c(i.give);const a=e=>new Map((e??[]).filter(e=>e.lang).map(e=>[(0,x.QW)(e),e.lang??""]));h(a(y)),g(a(w))}).catch(t=>e&&a(t.message)),()=>{e=!1}},[v,y,w,t]);const b=(0,o.Kr)(()=>({get:n?.they_trade??[],give:n?[...n.my_trade,...n.my_giveable]:[]}),[n]),$=e=>"get"===e?s:c,k=e=>"get"===e?h:g,Y=(e,t)=>
13418{$(e)(e=>{const n=new Set(e);return n.delete(t),n}),k(e)(e=>{const n=new Map(e);return n.delete(t),n})},A=(0,o.Kr)(()=>({get:(0,x.B7)(l,p),give:(0,x.B7)(d,u)}),[l,p,d,u]);return{data:n,loadError:i,pool:b,selected:{get:l,give:d},chosenLangs:{get:p,give:u},lines:A,picking:m,tap:(e,t)=>{const n=(0,x.QW)(t),r="get"===e?l:d,o=m?.side===e&&(0,x.QW)(m.line)===n;if(!r.has(n))return r.size>=20?void(0,pe.Ni)("An offer can hold at most 20 cards per side.",4e3):($(e)(e=>new Set(e).add(n)),void f((0,N.jB)(t)?{side:e,line:t}:null));!(0,N.jB)(t)||o?(Y(e,n),o&&f(null)):f({side:e,line:t})},chooseLang:e=>{if(!m)return;const t=(0,x.QW)(m.line);k(m.side)(n=>{const r=new Map(n);return e?r.set(t,e):r.delete(t),r})},removePicking:()=>{m&&(Y(m.side,(0,x.QW)(m.line)),f(null))}}}(e,h.sameRarity),[y,b]=(0,o.J0)("get"),[$,k]=(0,o.J0)({get:void 0,give:void 0}),[Y,A]=(0,o.J0)(""),[C,I]=(0,o.J0)(!1),[E,L]=(0,o.J0)(!1),[M,P]=(0,o.J0)(""),[O,_]=(0,o.J0)(0),R=function(e,t,n,r){const o=(0,p.g5)(e,t,n,r),i=[];if(n.sameRarity&&r&&e.length>0&&t.length>0)for(const[n,r]of(0,p.YD)(e,t))i.push({side:r>0?"get":"give",rarity:n,count:Math.abs(r)});const a=0===e.length&&0===t.length;return{tone:null===o?"good":a||"Card details are still loadingâ¦"===o?"plain":"warn",ok:null===o,needed:i,swaps:n.sameRarity?Math.min(e.length,t.length):Math.max(e.length,t.length),message:o}}(f.lines.give,f.lines.get,h,void 0!==m&&m.length>0),j=!0===f.data?.blocked,J=null!==f.data&&!j,B=ge(f.data),K=e.user.nickname,W=(e,t)=>{b(e),k(n=>({...n,[e]:{rarity:t}}))},U=(0,r.Y)(D,{rules:h,nick:K,blocked:j,missingCode:null!==h.friendCode&&null!==f.data&&""===f.data.my_profile.friend_code,openOffers:f.data?.open_offers??0,noWishlist:null!==f.data&&0===f.data.they_wish.length,needWishlist:!0===f.data?.they_need_wishlist,needLang:B,sendError:M,lastActive:f.data?Math.max(f.data.user.last_active,e.user.last_active):Math.floor(Date.now()/1e3)}),Q=(0,r.Y)(ye,{type:"button",onClick:()=>{!R.ok||E||j||(L(!0),P(""),(0,ce.Jy)({to:e.user.user_id,give:f.lines.give,receive:f.lines.get,message:Y}).then(e=>{const t=e.offer?.id??0;if(!t)throw new Error("The offer may not have gone through â check your inbox before sending it again.");(0,ce.L7)(),L(!1),_(t),i?.(t)}).catch(e=>{P(e.message),(0,pe.Ni)(e.message,6e3),L(!1)}))},disabled:!R.ok||E||!J||B,children:E?"Sendingâ¦":"Send offer"}),G=e=>(0,r.Y)(me,{c:f,side:e,rules:h,balance:R,focus:$[e],phone:g,nick:K});return O>0?(0,r.Y)(l.qp,{show:!0,width:960,header:t??`Trade with ${K}`,headerIcon:g?void 0:(0,r.Y)(a.hR,{size:18}),subtitle:F(h,g,0),onClose:n,children:(0,r.Y)(S,{nick:K,rules:h,onOpen:()=>d(O)})}):(0,r.Y)(l.qp,{show:!0,width:960,header:t??`Trade with ${K}`,headerIcon:g?void 0:(0,r.Y)(a.hR,{size:18}),subtitle:F(h,g,Math.min(f.lines.get.length,f.lines.give.length)),onClose:()=>!E&&n(),dontHideOnBgClick:E,footer:g?(0,r.Y)(z,{warnings:U,balance:R,get:f.lines.get,rules:h,showBalance:J,onShow:W,noteOpen:C,onToggleNote:()=>I(!C),message:Y,onMessage:A,sendBtn:Q}):(0,r.Y)(T,{balance:R,give:f.lines.give,get:f.lines.get,rules:h,onCancel:n,cancelDisabled:E,sendBtn:Q}),children:(0,r.FD)(fe,{children:[""!==f.loadError&&(0,r.Y)(v.LA,{role:"alert",children:f.loadError}),!f.data&&""===f.loadError&&(0,r.Y)(v.RH,{children:"Loading both trade listsâ¦"}),f.data&&!g&&U,J&&g&&(0,r.FD)(r.FK,{children:[(0,r.Y)(s.$,{fill:!0,raised:!0,ariaLabel:"Which side",value:y,onChange:b,options:[{value:"get",label:"You get",badge:(0,r.Y)(v.Ex,{$quiet:"get"!==y,children:f.lines.get.length})},{value:"give",label:"You give",badge:(0,r.Y)(v.Ex,{$quiet:"give"!==y,children:f.lines.give.length})}]}),G(y)]}),J&&!g&&(0,r.FD)(r.FK,{children:[(0,r.FD)(xe,{children:[G("get"),G("give")]}),(0,r.Y)(w,{give:f.lines.give,get:f.lines.get,rules:h}),(0,r.Y)(u,{balance:R,get:f.lines.get,rules:h,onShow:W}),(0,r.FD)("div",{children:[(0,r.Y)(ve,{htmlFor:"trade-offer-note",children:"Add a note (optional)"}),(0,r.Y)(c.fs,{id:"trade-offer-note",maxLength:500,value:Y,onChange:e=>A(e.currentTarget.value),placeholder:"Hi! Happy to swap â add me when you accept."})]})]})]})})}const ge=e=>!0===e?.they_need_lang;function me({c:e,side:t,rules:n,balance:o,focus:i,phone:a,nick:l}){const s=e.picking?.side===t?e.picking:null;return(0,r.Y)(re,{title:"get"===t?"You get":"You give",matchLabel:"get"===t?"on my wishlist":"on their wishlist",lines:e.pool[t],selected:e.selected[t],chosenLangs:e.chosenLangs[t],onTap:n=>e.tap(t,n),rarityFilter:n.sameRarity,needed:o.needed.filter(e=>e.side===t).map(e=>e.rarity),focus:i,phone:a,emptyText:"get"===t?`${l} has nothing listed for trade right now.`:"Your trade list is empty â mark cards for trade in your collection first.",children:s&&(0,r.Y)(O,{line:s.line,side:t,otherNick:l,chosen:e.chosenLangs[t].get((0,x.QW)(s.line))??"",onChoose:e.chooseLang,onRemove:e.removePicking})})}const fe=i.Ay.div` 13419 display: flex; 13420 flex-direction: column; 13421 gap: 14px; 13422 @media only screen and ${P.E0} { 13423 gap: 10px; 13424 } 13425`,xe=i.Ay.div` 13426 display: grid; 13427 grid-template-columns: 1fr 1fr; 13428 gap: 18px; 13429`,ve=i.Ay.label` 13430 display: block; 13431 margin-bottom: 6px; 13432 font-size: 13px; 13433 color: var(--theme-palette-color-3); 13434`,ye=(0,i.Ay)(c.wo)` 13435 @media only screen and ${P.E0} { 13436 flex: 1; 13437 height: 48px; 13438 font-size: 15px; 13439 } 13440`},68007(e,t,n){n.d(t,{B7:()=>a,GC:()=>l,rg:()=>i});var r=n(76521);const o=e=>`${e.card}|${e.foil}`;function i(e,t,n){const i=e=>({card:e.card,foil:e.foil,qty:1}),a=e.filter(e=>(0,r.yz)(e.card)).map(i),l=t.filter(e=>(0,r.yz)(e.card)).map(i);if(!n)return{get:new Set(a.slice(0,10).map(o)),give:new Set(l.slice(0,10).map(o))};const s=e=>{const t=new Map;for(const n of e){const e=(0,r.z0)(n.card);if(""===e)continue;const o=t.get(e)??[];o.push(n),t.set(e,o)}return t},d=s(a),c=s(l),p=new Set,h=new Set;for(const[e,t]of d){const n=c.get(e)??[],r=Math.min(t.length,n.length,10-p.size);if(t.slice(0,r).forEach((e,t)=>{const r=n[t];r&&(p.add(o(e)),h.add(o(r)))}),p.size>=10)break}if(0===p.size&&0===h.size){const e=a[0],t=l[0];e&&p.add(o(e)),t&&h.add(o(t))}return{get:p,give:h}}function a(e,t){return[...e].map(e=>{const[n="",r="0"]=e.split("|"),o=t?.get(e);return o?{card:n,foil:Number(r),qty:1,lang:o}:{card:n,foil:Number(r),qty:1}})}function l(e,t,n,o=0){if(!n)return Array.from({length:Math.max(e.length,t.length)},(n,r)=>({get:e[r],give:t[r]}));const i=e=>{const t=new Map;for(const n of e){const e=(0,r.z0)(n.card);t.set(e,[...t.get(e)??[],n])}return t},a=i(e),l=i(t),s=[],d=[],c=(e,t,n)=>{for(let r=0;r<Math.max(e.length,t.length);r++){const o={get:e[r],give:t[r],rarity:n||void 0};(o.get&&o.give?s:d).push(o)}};for(const e of new Set([...a.keys(),...l.keys()])){const t=a.get(e)??[],n=l.get(e)??[];if(0===o){c(t,n,e);continue}const r=t.filter(e=>e.deluxe),i=n.filter(e=>e.deluxe),s=Math.min(r.length,i.length),d=t.filter(e=>!e.deluxe);c(r.slice(0,s),i.slice(0,s),e),c(1===o?[...r.slice(s),...d]:d,n.filter(e=>!e.deluxe),e),2===o&&c(r.slice(s),[],e),c([],i.slice(s),e)}return[...s,...d]}n.d(t,["QW",0,o])},99379(e,t,n){n.d(t,{f0:()=>i,jB:()=>a,l4:()=>l,nd:()=>o});var r=n(26983);function o(e){return(0,r.VZ)(e)?.short??e.toUpperCase()}function i(e){if(!e)return[];const t=r.hF.filter(t=>"en"!==t.code&&(e[t.code]??0)>0).map(t=>({code:t.code,count:e[t.code]??0})),n=e.en??0;return n>0&&t.push({code:"en",count:n}),t}function a(e){return i(e.langs).length>1}function l(e){return e.lang?{text:o(e.lang),chosen:!0}:{text:i(e.langs).filter(e=>"en"!==e.code).slice(0,2).map(e=>o(e.code)).join(" "),chosen:!1}}},92667(e,t,n){var r=n(63679),o=n(63346),i=n(28297),a=n(63099);const l=r.Ay.button` 13441 flex: none; 13442 display: inline-flex; 13443 align-items: center; 13444 gap: 5px; 13445 height: 30px; 13446 padding: 0 10px; 13447 border-radius: 15px; 13448 border: 1px ${e=>e.$dashed?"dashed":"solid"} 13449 ${e=>e.$on?"var(--theme-palette-color-1)":"var(--theme-palette-color-5)"}; 13450 background: ${e=>e.$on?"color-mix(in srgb, var(--theme-palette-color-1) 10%, transparent)":"none"}; 13451 color: ${e=>e.$on?"var(--theme-palette-color-4)":"var(--theme-palette-color-3)"}; 13452 font-family: inherit; 13453 font-size: 12px; 13454 font-weight: 700; 13455 letter-spacing: 0.02em; 13456 white-space: nowrap; 13457 cursor: pointer; 13458 b { 13459 color: ${e=>e.$on?"var(--theme-palette-color-1)":"var(--theme-palette-color-4)"}; 13460 } 13461 img { 13462 display: block; 13463 } 13464 &:disabled { 13465 opacity: 0.45; 13466 cursor: default; 13467 } 13468 @media (pointer: coarse) { 13469 height: ${44}px; 13470 padding: 0 12px; 13471 font-size: 12.5px; 13472 } 13473`,s=r.Ay.div` 13474 display: flex; 13475 align-items: center; 13476 gap: 6px; 13477 min-width: 0; 13478 overflow-x: auto; 13479 scrollbar-width: none; 13480 &::-webkit-scrollbar {
13481 display: none; 13482 } 13483`,d=(0,r.Ay)(o.jn).attrs({$size:"sm"})``,c=(0,r.Ay)(o.tA).attrs({$size:"sm"})``,p={warn:[a.nX.warnEdge,a.nX.warn],good:[a.nX.goodEdge,a.nX.good],accent:["var(--theme-palette-color-1)","var(--theme-palette-color-1)"]},h=(0,r.Ay)(c)` 13484 border-color: ${e=>p[e.$tone][0]}; 13485 color: ${e=>p[e.$tone][1]}; 13486 font-weight: 700; 13487 &:hover:not(:disabled) { 13488 border-color: ${e=>p[e.$tone][1]}; 13489 color: ${e=>p[e.$tone][1]}; 13490 background: ${e=>"good"===e.$tone?a.nX.goodBg:"warn"===e.$tone?a.nX.warnBg:"color-mix(in srgb, var(--theme-palette-color-1) 10%, transparent)"}; 13491 } 13492`,u=(0,r.Ay)(i.pp)` 13493 justify-content: center; 13494 @media only screen and ${i.E0} { 13495 width: 100%; 13496 height: 48px; 13497 font-size: 15px; 13498 } 13499`,g=r.Ay.div` 13500 display: flex; 13501 align-items: center; 13502 gap: 8px; 13503 padding: 8px 10px; 13504 border-radius: 6px; 13505 font-size: 12.5px; 13506 line-height: 1.35; 13507 font-weight: ${e=>"plain"===e.$tone?500:700}; 13508 border: 1px solid 13509 ${e=>"good"===e.$tone?a.nX.goodEdge:"warn"===e.$tone?a.nX.warnEdge:"var(--theme-palette-color-5)"}; 13510 background: ${e=>"good"===e.$tone?a.nX.goodBg:"warn"===e.$tone?a.nX.warnBg:"var(--theme-palette-color-7)"}; 13511 color: ${e=>"good"===e.$tone?a.nX.good:"warn"===e.$tone?a.nX.warn:"var(--theme-palette-color-3)"}; 13512 svg { 13513 flex: none; 13514 } 13515 img { 13516 display: inline-block; 13517 vertical-align: -1px; 13518 } 13519 a { 13520 color: inherit; 13521 text-decoration: underline; 13522 } 13523`,m=r.Ay.button` 13524 display: inline-flex; 13525 align-items: center; 13526 justify-content: center; 13527 gap: 6px; 13528 min-height: 28px; 13529 padding: 0 10px; 13530 border-radius: 6px; 13531 border: 1px dashed var(--theme-palette-color-5); 13532 background: none; 13533 color: var(--theme-palette-color-3); 13534 font-family: inherit; 13535 font-size: 12.5px; 13536 font-weight: 600; 13537 cursor: pointer; 13538 b { 13539 color: var(--theme-palette-color-4); 13540 font-weight: 700; 13541 font-variant-numeric: tabular-nums; 13542 letter-spacing: 0.02em; 13543 } 13544 &:hover { 13545 border-color: var(--theme-palette-color-3); 13546 } 13547 @media only screen and ${i.E0} { 13548 min-height: ${44}px; 13549 } 13550`,f=r.Ay.input` 13551 height: 36px; 13552 padding: 0 10px; 13553 border-radius: 6px; 13554 border: 1px solid var(--theme-palette-color-5); 13555 background: var(--theme-palette-color-7); 13556 color: var(--theme-palette-color-4); 13557 font-family: inherit; 13558 font-size: 14px; 13559 min-width: 0; 13560 @media only screen and ${i.E0} { 13561 height: ${44}px; 13562 font-size: 16px; 13563 } 13564`,x=r.Ay.textarea` 13565 width: 100%; 13566 min-height: 64px; 13567 padding: 8px 10px; 13568 border-radius: 6px; 13569 border: 1px solid var(--theme-palette-color-5); 13570 background: var(--theme-palette-color-7); 13571 color: var(--theme-palette-color-4); 13572 font-family: inherit; 13573 font-size: 14px; 13574 line-height: 1.45; 13575 resize: vertical; 13576 box-sizing: border-box; 13577 @media only screen and ${i.E0} { 13578 font-size: 16px; 13579 } 13580`;n.d(t,["$7",0,l,"$M",0,u,"$k",0,h,"LP",0,c,"ND",0,s,"fs",0,x,"ks",0,f,"oI",0,g,"qN",0,m,"wo",0,d])},63099(e,t,n){var r=n(63679),o=n(28297),i=n(30821);const a={good:i.Q.success,goodEdge:i.Q.successRing,warn:"#e0a340",warnEdge:"#b7791f",error:"#ef5350",goodBg:"rgba(46, 157, 91, 0.1)",warnBg:"rgba(183, 121, 31, 0.12)"},l="color-mix(in srgb, var(--theme-palette-color-3) 80%, transparent)",s=r.Ay.div` 13581 display: flex; 13582 flex-direction: column; 13583 gap: 14px; 13584 margin: 8px 0 24px; 13585 @media only screen and ${o.E0} { 13586 gap: 10px; 13587 margin-bottom: calc(8px + var(--dotgg-bottom-obstruction, 0px)); 13588 } 13589`,d=r.Ay.section` 13590 border: 1px solid var(--theme-palette-color-5); 13591 border-radius: 10px; 13592 background: var(--theme-palette-color-8); 13593 padding: 14px 16px; 13594 @media only screen and ${o.E0} { 13595 padding: 12px; 13596 } 13597`,c=r.Ay.div` 13598 display: flex; 13599 align-items: center; 13600 justify-content: space-between; 13601 gap: 10px; 13602 flex-wrap: wrap; 13603 margin-bottom: 10px; 13604 h2, 13605 h3 { 13606 margin: 0; 13607 font-size: 16px; 13608 line-height: 1.3; 13609 color: var(--theme-palette-color-4); 13610 } 13611`,p=r.Ay.span` 13612 color: ${l}; 13613 font-size: 12.5px; 13614`,h=r.Ay.p` 13615 margin: 0; 13616 color: var(--theme-palette-color-3); 13617 font-size: 13px; 13618 line-height: 1.5; 13619`,u=r.Ay.div` 13620 display: flex; 13621 align-items: center; 13622 gap: ${e=>e.$gap??8}px; 13623 ${e=>!1!==e.$wrap&&r.AH` 13624 flex-wrap: wrap; 13625 `} 13626`,g={accent:"var(--theme-palette-color-1)",good:a.good,muted:l,faint:"color-mix(in srgb, var(--theme-palette-color-3) 60%, transparent)"},m=r.Ay.span` 13627 font-size: ${e=>"faint"===e.$tone?10:10.5}px; 13628 font-weight: 800; 13629 letter-spacing: ${e=>"faint"===e.$tone?"0.08em":"0.07em"}; 13630 text-transform: uppercase; 13631 white-space: nowrap; 13632 color: ${e=>g[e.$tone??"muted"]}; 13633`,f=r.Ay.div` 13634 display: flex; 13635 align-items: center; 13636 gap: 14px; 13637 min-height: 44px; 13638`,x=r.Ay.span` 13639 flex: 1; 13640 min-width: 0; 13641 height: 1px; 13642 background: color-mix(in srgb, var(--theme-palette-color-5) 60%, transparent); 13643 @media only screen and ${o.E0} { 13644 display: none; 13645 } 13646`,v=r.Ay.span` 13647 flex: none; 13648 margin-left: auto; 13649 font-size: 12px; 13650 color: ${l}; 13651 white-space: nowrap; 13652 b { 13653 color: var(--theme-palette-color-4); 13654 font-weight: 700; 13655 } 13656`,y=r.Ay.div` 13657 border: 1px solid var(--theme-palette-color-5); 13658 border-radius: 10px; 13659 overflow: hidden; 13660 > [data-phone-row]:last-child { 13661 border-bottom: none; 13662 } 13663`,w=r.Ay.span` 13664 display: inline-flex; 13665 align-items: center; 13666 height: 20px; 13667 padding: 0 7px; 13668 border-radius: 4px; 13669 background: var(--theme-palette-color-7); 13670 border: 1px solid ${e=>e.$on?"var(--theme-palette-color-1)":"var(--theme-palette-color-5)"}; 13671 color: ${e=>e.$on?"var(--theme-palette-color-1)":"var(--theme-palette-color-3)"}; 13672 font-size: 10.5px; 13673 font-weight: 800; 13674 letter-spacing: 0.04em; 13675 white-space: nowrap; 13676`,b=r.Ay.div` 13677 display: flex; 13678 align-items: center; 13679 justify-content: space-between; 13680 gap: 8px; 13681 min-height: 28px; 13682 padding: 0 12px; 13683 font-size: 11px; 13684 color: ${l}; 13685`,$=r.Ay.span` 13686 display: inline-flex; 13687 align-items: center; 13688 gap: 5px; 13689 height: 22px; 13690 padding: 0 8px; 13691 border-radius: 11px; 13692 font-size: 11.5px; 13693 font-weight: 700; 13694 white-space: nowrap; 13695 flex: none; 13696 border: 1px solid var(--theme-palette-color-5); 13697 color: var(--theme-palette-color-3); 13698 ${e=>"accent"===e.$tone&&r.AH` 13699 border-color: var(--theme-palette-color-1); 13700 color: var(--theme-palette-color-1); 13701 `} 13702 ${e=>"good"===e.$tone&&r.AH` 13703 border-color: ${a.goodEdge}; 13704 color: ${a.good}; 13705 `} 13706 ${e=>"warn"===e.$tone&&r.AH` 13707 border-color: ${a.warnEdge}; 13708 color: ${a.warn}; 13709 `} 13710`,k=r.Ay.span` 13711 display: inline-flex; 13712 align-items: center; 13713 gap: 5px; 13714 height: ${e=>e.$small?22:26}px; 13715 padding: 0 ${e=>e.$small?9:10}px; 13716 border-radius: 13px; 13717 background: var(--theme-palette-color-1); 13718 color: var(--dotgg-on-accent, var(--theme-palette-color-8)); 13719 font-size: ${e=>e.$small?11.5:12.5}px; 13720 font-weight: 800; 13721 white-space: nowrap; 13722 flex: none; 13723`,Y=r.Ay.span` 13724 display: inline-block; 13725 width: 8px; 13726 height: 8px; 13727 border-radius: 50%; 13728 background: ${e=>e.$hidden?"transparent":"var(--theme-palette-color-1)"}; 13729 flex: none; 13730`,A=r.Ay.span` 13731 display: inline-flex; 13732 align-items: center; 13733 justify-content: center; 13734 min-width: 18px; 13735 height: 18px; 13736 padding: 0 5px; 13737 border-radius: 9px; 13738 background: ${e=>e.$quiet?"var(--theme-palette-color-5)":"var(--theme-palette-color-1)"}; 13739 color: ${e=>e.$quiet?"var(--theme-palette-color-4)":"var(--theme-palette-color-8)"}; 13740 font-size: 11px; 13741 font-weight: 800; 13742`,C=r.Ay.div` 13743 color: ${a.error}; 13744 font-size: 13px; 13745 font-weight: 600; 13746`,F=r.Ay.div` 13747 padding: 28px 16px; 13748 text-align: center; 13749 color: var(--theme-palette-color-3); 13750 font-size: 14px; 13751 line-height: 1.6; 13752 a { 13753 font-weight: 700; 13754 } 13755`,D=r.Ay.span` 13756 position: absolute; 13757 width: 1px; 13758 height: 1px; 13759 overflow: hidden; 13760 clip: rect(0 0 0 0); 13761 white-space: nowrap; 13762`;n.d(t,["CD",0,b,"Ck",0,h,"Ds",0,w,"Ex",0,A,"JY",0,"color-mix(in srgb, var(--theme-palette-color-5) 45%, var(--theme-palette-color-8))","LA",0,C,"M
137627",0,f,"Pk",0,v,"QX",0,p,"RH",0,F,"XV",0,Y,"ZX",0,c,"Zk",0,d,"dO",0,y,"eN",0,m,"fI",0,u,"gN",0,l,"mV",0,D,"nX",0,a,"os",0,k,"qR",0,x,"vU",0,"color-mix(in srgb, var(--theme-palette-color-5) 55%, transparent)","vu",0,$,"z6",0,s])},31777(e,t,n){n.d(t,{Ip:()=>c,M:()=>d,Rh:()=>i,Wq:()=>p,Y7:()=>h,Z3:()=>m,cj:()=>l,fF:()=>f,fk:()=>s,lH:()=>a,vv:()=>g,zn:()=>u});var r=n(63099),o=n(76521);function i(e,t){switch(e){case"pending":return"incoming"===t?"needs your answer":"waiting for them";case"accepted":return"accepted";case"completed":return"done";case"declined":return"declined";case"cancelled":return"cancelled";case"expired":return"expired"}}function a(e,t){return"pending"===e?"incoming"===t?"accent":"plain":"accepted"===e||"completed"===e?"good":"warn"}function l(e,t,n){const r=t?"You":n;switch(e){case"accepted":return`${r} accepted the offer`;case"declined":return`${r} declined the offer`;case"cancelled":return`${r} cancelled the trade`;case"completed":return`${r} marked the trade as done`;case"expired":return"The offer expired after two weeks without an answer";case"pending":return"Offer sent"}}function s(e,t=Date.now()/1e3){return"pending"!==e.status?null:Math.max(0,Math.ceil((e.updated+1209600-t)/86400))}function d(e){return[...new Set([...e.you_give,...e.you_get].map(e=>(0,o.z0)(e.card)).filter(e=>""!==e))]}function c(e){return"pending"===e.status&&"incoming"===e.direction?"var(--theme-palette-color-1)":"accepted"===e.status?r.nX.goodEdge:"var(--theme-palette-color-5)"}function p(e){const t=f(e);return"just now"===t?t:`${t} ago`}function h(e){return`Offer #${e.id} · ${"incoming"===e.direction?"sent to you":"sent by you"} · ${p(e.updated)}`}function u(e){const t=e=>e.reduce((e,t)=>e+t.qty,0);return`Give ${t(e.you_give)} · get ${t(e.you_get)}`}function g(e,t){return t.friendCode&&""!==e.other.friend_code?`${t.friendCode.label} ${(0,o.Vh)(e.other.friend_code)}`:""!==e.other.discord?`Discord ${e.other.discord}`:"Agree how to meet in the thread"}function m(e){return e.last&&"text"===e.last.kind?`â${e.last.body}â`:"incoming"===e.direction?"Sent you an offer":"You sent an offer"}function f(e,t=Date.now()/1e3){const n=Math.max(0,t-e);return n<60?"just now":n<3600?`${Math.floor(n/60)}m`:n<86400?`${Math.floor(n/3600)}h`:n<2592e3?`${Math.floor(n/86400)}d`:new Date(1e3*e).toLocaleDateString()}},70632(e,t,n){var r=n(63679),o=n(28297);const i=r.Ay.button` 13763 position: relative; 13764 display: block; 13765 flex: none; 13766 padding: 0; 13767 margin: 0; 13768 border: 0; 13769 background: none; 13770 border-radius: 4px; 13771 cursor: zoom-in; 13772 &:focus-visible { 13773 outline: 2px solid var(--theme-palette-color-1); 13774 outline-offset: 2px; 13775 } 13776`,a=r.Ay.div` 13777 display: flex; 13778 flex-wrap: wrap; 13779 gap: 6px; 13780`,l=r.Ay.div` 13781 position: relative; 13782 width: 64px; 13783 border-radius: 6px; 13784 outline: 2px solid transparent; 13785 outline-offset: 1px; 13786 ${e=>e.$clickable&&r.AH` 13787 cursor: pointer; 13788 `} 13789 ${e=>e.$selected&&r.AH` 13790 outline-color: var(--theme-palette-color-1); 13791 `} 13792 ${e=>e.$dim&&r.AH` 13793 opacity: 0.45; 13794 `} 13795 img { 13796 width: 100%; 13797 display: block; 13798 border-radius: 5px; 13799 } 13800 @media only screen and ${o.E0} { 13801 width: 58px; 13802 } 13803`,s=r.Ay.span` 13804 position: absolute; 13805 right: 2px; 13806 bottom: 2px; 13807 min-width: 18px; 13808 height: 18px; 13809 padding: 0 4px; 13810 border-radius: 4px; 13811 background: ${e=>e.$accent?"var(--theme-palette-color-1)":"rgba(0, 0, 0, 0.78)"}; 13812 color: ${e=>e.$accent?"var(--theme-palette-color-8)":"#fff"}; 13813 font-size: 11px; 13814 font-weight: 800; 13815 line-height: 18px; 13816 text-align: center; 13817 box-sizing: border-box; 13818`,d=r.Ay.span` 13819 position: absolute; 13820 left: 0; 13821 right: 0; 13822 bottom: 2px; 13823 text-align: center; 13824 font-size: 9px; 13825 font-weight: 800; 13826 letter-spacing: 0.04em; 13827 text-transform: uppercase; 13828 color: #fff; 13829 text-shadow: 0 1px 2px #000; 13830`,c=r.Ay.span` 13831 position: absolute; 13832 left: 2px; 13833 top: 2px; 13834 width: 18px; 13835 height: 18px; 13836 border-radius: 50%; 13837 background: var(--theme-palette-color-1); 13838 color: var(--dotgg-on-accent, var(--theme-palette-color-8)); 13839 font-size: 12px; 13840 font-weight: 900; 13841 line-height: 18px; 13842 text-align: center; 13843`;r.Ay.span` 13844 align-self: center; 13845 color: var(--theme-palette-color-3); 13846 font-size: 12.5px; 13847 font-weight: 600; 13848`,n.d(t,["$w",0,l,"WO",0,a,"fg",0,d,"iF",0,c,"n3",0,s,"xb",0,i])},95117(e,t,n){n.d(t,{L7:()=>u,TG:()=>a});var r=n(4738),o=n(55612),i=n(12434);function a(e,t,n=""){return{user_id:e,nickname:t,discord:n,friend_code:"",note:"",accepting:!0,last_active:0}}
13848class l extends Error{constructor(e,t=""){super(e),this.code=t}}function s(e,t={}){const n=new URLSearchParams({game:i.Ay.TheGame.toLowerCase()});for(const[e,r]of Object.entries(t))n.set(e,String(r));return`/cgfw/${e}?${n.toString()}`}function d(e){if(!e||"object"!=typeof e)throw new l("The trade service did not answer. Please try again.");if(e.error)throw new l(e.error_text||"Something went wrong.",e.code??"");return e}async function c(e,t={}){const n=s(e,t);return d(await o.A.get(n,void 0,{url:`https://api.dotgg.gg${n}`,headers:(0,r.z5)()}))}async function p(e,t){const n=s(e);return d(await o.A.post(n,t,{url:`https://api.dotgg.gg${n}`,headers:(0,r.z5)(),retry:!1}))}const h="dotgg:trade-unread-changed";function u(){window.dispatchEvent(new Event(h))}n.d(t,["Dy",0,e=>c("tradeoffers",{id:e}),"Ex",0,(e=0,t=!1,n=!1,r)=>c("tradefinder",{...e>0?{active:e}:{},...t?{fresh:1}:{},...n?{peek:1}:{},...r&&r.rarity.length>0?{rarity:r.rarity.join(",")}:{},...r&&r.set.length>0?{set:r.set.join(",")}:{},...r&&r.keepfoil>0?{keepfoil:r.keepfoil}:{}}),"Gt",0,()=>c("tradefinder",{stats:1}),"Jy",0,e=>p("tradeoffer",{action:"create",...e}),"MX",0,()=>c("tradeprofile"),"ND",0,e=>p("tradeoffer",{action:"applied",id:e}),"Sm",0,async e=>(await c("tradefinder",{match:e,peek:1})).match??null,"Vd",0,e=>p("tradeprofile",e),"Yk",0,(e,t)=>p("tradeoffer",{action:"message",id:e,body:t}),"as",0,(e,t,n)=>p("tradeoffer",{action:"edit",id:e,message:t,body:n}),"cL",0,async()=>(await c("tradeoffers",{check:1})).unread,"e9",0,h,"gc",0,e=>p("tradeoffer",{action:"read",id:e}),"lK",0,()=>c("tradeoffers"),"nQ",0,(e,t=[])=>c("tradefinder",t.length>0?{with:e,pin:t.join(",")}:{with:e}),"om",0,(e,t)=>
13848p("tradeoffer",{action:t,id:e}),"uw",0,(e,t)=>p("tradeoffer",{action:t?"block":"unblock",user:e})])},76521(e,t,n){n.d(t,{DS:()=>f,Vh:()=>g,YD:()=>p,g5:()=>h,pr:()=>s,t1:()=>u,tJ:()=>x,vx:()=>m,xd:()=>l,yz:()=>d,z0:()=>c});var r=n(91995),o=n(86031),i=n(4738),a=n(91181);function l(){const e=o.SA.collection.tradeRules;return{sameRarity:!0===e?.sameRarity,friendCode:e?.friendCode??null}}function s(e){const t=a.jb.getState().get();if(!t)return;const n=a.jb.getMap().get(e),r=void 0!==n?t[n]:void 0;return r?.id===e?r:t.find(t=>t.id===e)}function d(e){return!1!==s(e)?.canBeTraded}function c(e){return s(e)?.rarity??""}function p(e,t){const n=new Map,r=(e,t)=>{for(const r of e){const e=c(r.card)||"Unknown";n.set(e,(n.get(e)??0)+t*r.qty)}};r(e,1),r(t,-1);for(const[e,t]of n)0===t&&n.delete(e);return n}function h(e,t,n,r=!0){if(0===e.length&&0===t.length)return"Pick the cards you want and the cards you offer.";if(n.sameRarity){if(0===e.length)return"Pick at least one card to give.";if(0===t.length)return"Pick at least one card to get.";if(!r||[...e,...t].some(e=>""===c(e.card)))return"Card details are still loadingâ¦";const n=p(e,t);if(n.size>0)return`Pocket trades are same-rarity. Still needed: ${[...n].map(([e,t])=>`${Math.abs(t)} ${e} ${t>0?"to get":"to give"}`).join(", ")}.`}return null}function u(e,t){(0,i.GD)(e),(0,r.GF)(`${t} copied`)}function g(e){return e.replace(/\D/g,"").replace(/(\d{4})(?=\d)/g,"$1-")}function m(e,t=Date.now()/1e3){if(!e)return"";const n=Math.max(0,t-e);if(n<3600)return"now";if(n<86400)return`${Math.floor(n/3600)}h ago`;const r=Math.floor(n/86400);if(r<45)return`${r}d ago`;const o=Math.floor(r/30);return o<12?`${o}mo ago`:"over a year ago"}function f(e,t=Date.now()/1e3){const n=m(e,t);return""===n?"":"over a year ago"===n?"inactive for a year+":`active ${n}`}function x(e,t=14){return e>0&&Date.now()/1e3-e<86400*t}},29747(e,t,n){n.d(t,{NU:()=>d,Y_:()=>l,ZP:()=>c,aB:()=>p,p0:()=>a});var r=n(76052),o=n(12434);const i=e=>`dotgg:trade-nudge:${o.Ay.TheGame.toLowerCase()}:${e}`;function a(e){return Number(r.Ar.getItem(i(`dismiss:${e}`))??0)>Date.now()}function l(e,t){r.Ar.setItem(i(`dismiss:${e}`),String(Date.now()+864e5*t))}const s="dotgg:trade-just-listed";function d(){window.dispatchEvent(new Event(s))}function c(){r.Ar.setItem(i("visited"),"1")}function p(){return"1"===r.Ar.getItem(i("visited"))}n.d(t,["iZ",0,s])},88635(e,t,n){var r=n(10201),o=(n(17402),n(63679)),i=n(63346);const a=o.I4.div` 13849 display: flex; 13850 flex-direction: column; 13851 gap: 12px; 13852 max-width: 440px; 13853 margin: 24px auto; 13854 padding: 24px; 13855 box-sizing: border-box; 13856 border: 1px solid var(--theme-palette-color-5, rgba(0, 0, 0, 0.1)); 13857 border-radius: 8px; 13858 background-color: var(--theme-palette-color-8, rgba(0, 0, 0, 0.04)); 13859`,l=o.I4.h2` 13860 margin: 0; 13861 font-size: 20px; 13862 font-weight: 700; 13863 color: var(--theme-palette-color-4, inherit); 13864`,s=o.I4.p` 13865 margin: 0; 13866 font-size: 14px; 13867 line-height: 1.5; 13868 color: var(--theme-palette-color-3, inherit); 13869`;n.d(t,["v",0,({loginUrl:e,title:t="Sign in to see your profile",message:n="Your profile, comments and settings live in your DotGG account: one account for every DotGG site."})=>(0,r.FD)(a,{children:[(0,r.Y)(l,{children:t}),(0,r.Y)(s,{children:n}),(0,r.Y)(i.jn,{as:"a",href:e,"data-native":!0,children:"Sign in or create an account"})]})])},36086(e,t,n){var r=n(10201),o=n(17402),i=n(63679),a=n(55115),l=n(12434);function s(e){return e.page_url?e.page_url:`/${e.object_id.replace(/^-+|-+$/g,"").replace(/--+/g,"/")}`}const d=i.I4.div` 13870 display: flex; 13871 flex-direction: column; 13872 gap: 12px; 13873 padding: 12px 0; 13874`,c=i.I4.div` 13875 display: flex; 13876 gap: 24px; 13877 padding: 12px 16px; 13878 background: var(--theme-palette-color-8, #1a1a1a); 13879 border-radius: 8px; 13880`,p=i.I4.div` 13881 display: flex; 13882 flex-direction: column; 13883 gap: 4px; 13884`,h=i.I4.div` 13885 font-size: 11px; 13886 text-transform: uppercase; 13887 letter-spacing: 0.5px; 13888 opacity: 0.6; 13889`,u=i.I4.div` 13890 font-size: 22px; 13891 font-weight: 700; 13892 &[data-sign="pos"] { 13893 color: #3fb06a; 13894 } 13895 &[data-sign="neg"] { 13896 color: #d35454; 13897 } 13898`,g=i.I4.div` 13899 display: flex; 13900 flex-direction: column; 13901 gap: 8px; 13902`,m=i.I4.div` 13903 display: flex; 13904 flex-direction: column; 13905 gap: 6px; 13906 padding: 10px 12px; 13907 background: var(--theme-palette-color-8, #1a1a1a); 13908 border-radius: 6px; 13909`,f=i.I4.div` 13910 display: flex; 13911 align-items: center; 13912 gap: 10px; 13913 font-size: 12px; 13914 color: var(--theme-palette-color-5, #888); 13915`,x=i.I4.span` 13916 text-transform: uppercase; 13917 letter-spacing: 0.5px; 13918 padding: 2px 6px; 13919 background: var(--theme-palette-color-6, #333); 13920 border-radius: 3px; 13921 font-size: 10px; 13922 font-weight: 600; 13923`,v=i.I4.span` 13924 font-weight: 600; 13925 &[data-sign="pos"] { 13926 color: #3fb06a; 13927 } 13928 &[data-sign="neg"] { 13929 color: #d35454; 13930 } 13931`,y=i.I4.span` 13932 opacity: 0.75; 13933`,w=i.I4.a` 13934 color: inherit; 13935 text-decoration: none; 13936 display: flex; 13937 flex-direction: column; 13938 gap: 4px; 13939 &:hover { 13940 opacity: 0.85; 13941 } 13942`,b=i.I4.div` 13943 white-space: pre-wrap; 13944 word-break: break-word; 13945 font-size: 14px; 13946`,$=i.I4.div` 13947 font-size: 11px; 13948 opacity: 0.55; 13949`,k=i.I4.div` 13950 opacity: 0.6; 13951 font-size: 14px; 13952 padding: 12px 0; 13953`,Y=i.I4.div` 13954 color: #d35454; 13955 font-size: 13px; 13956`,A=i.I4.div` 13957 display: flex; 13958 align-items: center; 13959 justify-content: center; 13960 gap: 12px; 13961 padding-top: 8px; 13962`,C=i.I4.button` 13963 background: transparent; 13964 border: 1px solid var(--theme-palette-color-6, #444); 13965 color: inherit; 13966 padding: 4px 12px; 13967 border-radius: 4px; 13968 cursor: pointer; 13969 font-size: 12px; 13970 &:disabled { 13971 opacity: 0.4;
13972 cursor: not-allowed; 13973 } 13974`,F=i.I4.span` 13975 font-size: 12px; 13976 opacity: 0.7; 13977`;n.d(t,["A",0,({userData:e})=>{const[t,n]=(0,o.J0)([]),[i,D]=(0,o.J0)(0),[S,I]=(0,o.J0)(0),[z,T]=(0,o.J0)(0),[E,L]=(0,o.J0)(!0),[M,N]=(0,o.J0)(null),P=e.user.user_id;(0,o.vJ)(()=>{let e=!1;return L(!0),N(null),(0,a.uf)(l.Ay.TheGame.toLowerCase(),P,z,30).then(t=>{e||(n(t.comments),D(t.karma),I(t.total))}).catch(t=>{e||N(t instanceof Error?t.message:"Failed to load comments")}).finally(()=>{e||L(!1)}),()=>{e=!0}},[P,z]);const O=Math.max(1,Math.ceil(S/30));return(0,r.FD)(d,{children:[(0,r.FD)(c,{children:[(0,r.FD)(p,{children:[(0,r.Y)(h,{children:"Karma"}),(0,r.Y)(u,{"data-sign":i>0?"pos":i<0?"neg":"zero",children:i>0?`+${i}`:i})]}),(0,r.FD)(p,{children:[(0,r.Y)(h,{children:"Comments"}),(0,r.Y)(u,{children:S})]})]}),M&&(0,r.Y)(Y,{children:M}),E?(0,r.Y)(k,{children:"Loadingâ¦"}):0===t.length?(0,r.Y)(k,{children:"No comments yet."}):(0,r.Y)(g,{children:t.map(e=>{return(0,r.FD)(m,{children:[(0,r.FD)(f,{children:[(0,r.Y)(x,{children:e.game}),(0,r.FD)(v,{"data-sign":e.score>0?"pos":e.score<0?"neg":"zero",children:[e.score>0?`+${e.score}`:e.score," pts"]}),(0,r.Y)(y,{children:(t=e.created_at,new Date(1e3*t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}))})]}),(0,r.FD)(w,{href:s(e),target:"_blank",rel:"noreferrer",children:[(0,r.Y)(b,{children:e.body}),(0,r.FD)($,{children:[e.object_type," · ",e.object_id]})]})]},e.id);var t})}),!E&&O>1&&(0,r.FD)(A,{children:[(0,r.Y)(C,{disabled:0===z,onClick:()=>T(e=>Math.max(0,e-1)),children:"â¹ Prev"}),(0,r.FD)(F,{children:["Page ",z+1," / ",O]}),(0,r.Y)(C,{disabled:z>=O-1,onClick:()=>T(e=>Math.min(O-1,e+1)),children:"Next âº"})]})]})}])},34450(e,t,n){n.d(t,{VE:()=>u,rn:()=>h,ui:()=>m});var r=n(10201),o=n(17402),i=n(63679),a=n(70213),l=n(36856),s=n(95117),d=n(86031),c=n(4738),p=n(28297);function h(e){return e>0&&(0,c.x3)()&&!0===d.SA.collection?.collectionCanTrade&&String(window.DotGGUser??"")!==String(e)}function u(e){const[t,n]=(0,o.J0)(null),r=h(e);return(0,o.vJ)(()=>{if(n(null),!r)return;let t=!0;return(0,s.Sm)(e).then(e=>{t&&n(e)}).catch(()=>{}),()=>{t=!1}},[e,r]),t}function g(e,t,n,o){const i=n?t.charAt(0).toUpperCase()+t.slice(1):t;return(0,r.FD)(r.FK,{children:[i," ",(0,r.Y)("b",{children:e.n})," ",o?e.short:e.long]})}function m({match:e,short:t=!1,boxed:n=!1}){if(!e)return null;const o={n:e.they_have_total,long:"from your wishlist",short:"you want"},i={n:e.they_want_total,long:"from your trade list",short:"of yours"};if(o.n<=0&&i.n<=0)return null;const s=e=>(0,r.FD)(r.FK,{children:[o.n>0&&g(o,"has",!0,e),o.n>0&&i.n>0&&" · ",i.n>0&&g(i,"wants",o.n<=0,e)]});return(0,r.FD)(f,{$boxed:n,children:[(0,r.Y)(x,{"aria-hidden":"true",children:(0,r.Y)(a.hR,{size:14})}),t?(0,r.Y)("span",{children:s(!0)}):(0,r.FD)("span",{children:[(0,r.Y)(l.bd,{children:s(!1)}),(0,r.Y)(l.sj,{children:s(!0)})]})]})}const f=i.Ay.div` 13978 display: flex; 13979 align-items: center; 13980 gap: 8px; 13981 font-size: 13px; 13982 line-height: 1.4; 13983 color: var(--theme-palette-color-4); 13984 b { 13985 font-weight: 700; 13986 } 13987 @media only screen and ${p.E0} { 13988 ${e=>e.$boxed?"padding: 8px 10px; border-radius: 6px; background: var(--theme-palette-color-7);":""} 13989 } 13990`,x=i.Ay.span` 13991 display: inline-flex; 13992 flex: none; 13993 color: var(--theme-palette-color-1); 13994`},79477(e,t,n){n.d(t,{d:()=>g});var r=n(10201),o=n(63679),i=n(70213),a=n(72134),l=n(49259),s=n(36856),d=n(35661),c=n(53887),p=n(28297),h=n(30821);function u(e){const t=[e.dmUnread>0?`${e.dmUnread} unread`:"",e.dmRequests>0?`${e.dmRequests} request${1===e.dmRequests?"":"s"}`:""].filter(Boolean);return t.length>0?t.join(" · "):"Inbox and requests"}function g({nick:e,tradeSite:t}){const n=(0,a.N)(),o=[{key:"messages",label:"Messages",sub:u(n),count:n.dmUnread,href:(0,c.Lp)(e,"messages"),icon:(0,r.Y)(i.pj,{size:16})},...t?[{key:"trades",label:"Trade inbox",sub:(0,l.r1)(n.tradeNeedsAnswer,n.tradeUnread),count:n.tradeNeedsAnswer||n.tradeUnread,href:"/trade/inbox/",icon:(0,r.Y)(i.hR,{size:16})}]:[],{key:"settings",label:"Settings",sub:"Account, notifications, display",count:0,href:(0,d.aY)(),icon:(0,r.Y)(i.Ni,{size:16})}];return(0,r.Y)(m,{"aria-label":"Your places",children:o.map(e=>(0,r.FD)(f,{href:e.href,children:[(0,r.Y)(x,{"aria-hidden":"true",children:e.icon}),(0,r.FD)(v,{children:[(0,r.Y)(y,{children:e.label}),(0,r.Y)(w,{children:e.sub})]}),e.count>0&&(0,r.Y)(s.ni,{"aria-label":`${e.count} waiting`,children:e.count}),(0,r.Y)(b,{"aria-hidden":"true",children:(0,r.Y)(i.Vj,{})})]},e.key))})}const m=o.Ay.nav` 13995 display: grid; 13996 grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 13997 gap: 10px; 13998 margin: 12px 0 0; 13999 @media only screen and ${p.E0} { 14000 display: flex; 14001 flex-direction: column; 14002 gap: 0; 14003 border-radius: 8px; 14004 background: var(--theme-palette-color-8); 14005 box-shadow: inset 0 0 0 1px var(--theme-palette-color-5); 14006 overflow: hidden; 14007 } 14008`,f=o.Ay.a` 14009 display: flex; 14010 align-items: center; 14011 gap: 12px; 14012 min-width: 0; 14013 height: 56px; 14014 padding: 0 14px; 14015 box-sizing: border-box; 14016 border-radius: 8px; 14017 background: var(--theme-palette-color-8); 14018 box-shadow: inset 0 0 0 1px var(--theme-palette-color-5); 14019 color: inherit; 14020 text-decoration: none; 14021 &:hover { 14022 box-shadow: inset 0 0 0 1px var(--theme-palette-color-3); 14023 } 14024 &:focus-visible { 14025 outline: 2px solid var(--theme-palette-color-4); 14026 outline-offset: 2px; 14027 } 14028 @media only screen and ${p.E0} { 14029 height: 52px; 14030 border-radius: 0; 14031 background: none; 14032 box-shadow: none; 14033 border-bottom: 1px solid ${h.Q.rowRule}; 14034 &:last-child { 14035 border-bottom: none; 14036 } 14037 &:hover { 14038 box-shadow: none; 14039 background: ${h.Q.hoverFill}; 14040 } 14041 } 14042`,x=o.Ay.span` 14043 flex: none; 14044 display: inline-flex; 14045 align-items: center; 14046 justify-content: center; 14047 width: 32px; 14048 height: 32px; 14049 border-radius: 8px; 14050 background: var(--theme-palette-color-7); 14051 color: var(--theme-palette-color-3); 14052 @media only screen and ${p.E0} { 14053 width: 18px; 14054 height: 18px; 14055 background: none; 14056 } 14057`,v=o.Ay.span` 14058 display: flex; 14059 flex-direction: column; 14060 min-width: 0; 14061 margin-right: auto; 14062`,y=o.Ay.span` 14063 font-size: 14px; 14064 font-weight: 700; 14065 color: var(--theme-palette-color-4); 14066 @media only screen and ${p.E0} { 14067 font-size: 15px; 14068 font-weight: 600; 14069 } 14070`,w=o.Ay.span` 14071 overflow: hidden; 14072 text-overflow: ellipsis; 14073 white-space: nowrap; 14074 font-size: 12px; 14075 color: var(--theme-palette-color-3); 14076 @media only screen and ${p.E0} { 14077 display: none; 14078 } 14079`,b=o.Ay.span` 14080 display: none; 14081 @media only screen and ${p.E0} { 14082 display: inline-flex; 14083 color: ${h.Q.muted}; 14084 } 14085`},97528(e,t,n){n.d(t,{y:()=>a});var r=n(10201),o=n(62596);const i=(0,r.FD)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,r.Y)("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2"}),(0,r.Y)("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]});function a({items:e}){return(0,r.Y)(o.VQ,{$grid:!0,children:e.map(e=>(0,r.FD)(o.sB,{$grid:!0,$active:e.active,$accent:e.accent,href:e.href,"aria-current":e.active?"page":void 0,children:[e.locked&&(0,r.Y)(o.$d,{title:"Private â only you can see this",children:i}),(0,r.Y)(o.yP,{children:e.label}),(e.count??0)>0&&(0,r.Y)(o.h7,{$grid:!0,$active:e.active,$accent:e.accent,children:(e.count??0).toLocaleStr
14085ing()})]},e.key))})}},91831(e,t,n){n.d(t,{X:()=>c,h:()=>p});var r=n(10201),o=n(17402),i=n(63679),a=n(63346),l=n(52199),s=n(28297),d=n(30821);function c({label:e,value:t,actionLabel:n="Change",editing:o,onEdit:i,children:l}){return(0,r.FD)(h,{$editing:o,children:[(0,r.Y)(u,{$editing:o,children:e}),o?(0,r.Y)(m,{children:l}):(0,r.FD)(r.FK,{children:[(0,r.Y)(g,{children:t}),(0,r.Y)(a.tA,{type:"button",onClick:i,"aria-label":`${n} ${e.toLowerCase()}`,children:n})]})]})}function p({onSave:e,onCancel:t,saveLabel:n="Save",busyLabel:i="Savingâ¦",canSave:s=!0,children:d}){const[c,p]=(0,o.J0)(!1),[h,u]=(0,o.J0)("");return(0,r.FD)(f,{noValidate:!0,onSubmit:t=>{t.preventDefault(),(async()=>{if(!c&&s){p(!0),u("");try{await e()}catch(e){return u(e instanceof Error?e.message:"Couldn't save. Try again."),void p(!1)}p(!1)}})()},children:[d,h&&(0,r.Y)(a.ps,{role:"alert",children:h}),(0,r.FD)(l.IY,{children:[(0,r.FD)(a.jn,{type:"submit",disabled:!s,"aria-busy":c||void 0,children:[c&&(0,r.Y)(a.az,{"aria-hidden":"true"}),c?i:h?"Try again":n]}),(0,r.Y)(a.tA,{type:"button",onClick:t,disabled:c,children:"Cancel"})]})]})}const h=i.Ay.div` 14086 display: grid; 14087 grid-template-columns: 160px minmax(0, 1fr) auto; 14088 gap: 8px 16px; 14089 align-items: ${e=>e.$editing?"start":"center"}; 14090 min-height: 60px; 14091 padding: 10px 0; 14092 box-sizing: border-box; 14093 border-bottom: 1px solid ${d.Q.rowRule}; 14094 &:last-child { 14095 border-bottom: none; 14096 } 14097 @media only screen and ${s.E0} { 14098 grid-template-columns: minmax(0, 1fr) auto; 14099 gap: 4px 12px; 14100 } 14101`,u=i.Ay.span` 14102 font-size: 14px; 14103 font-weight: 600; 14104 color: var(--theme-palette-color-4); 14105 ${e=>e.$editing?"padding-top: 4px; line-height: 44px;":""} 14106 @media only screen and ${s.E0} { 14107 grid-column: 1; 14108 padding-top: 0; 14109 font-size: 15px; 14110 line-height: inherit; 14111 } 14112`,g=i.Ay.div` 14113 display: flex; 14114 align-items: center; 14115 gap: 10px; 14116 min-width: 0; 14117 font-size: 14px; 14118 line-height: 1.45; 14119 color: var(--theme-palette-color-3); 14120 overflow-wrap: anywhere; 14121 img { 14122 flex: none; 14123 width: 32px; 14124 height: 32px; 14125 border-radius: 50%; 14126 object-fit: cover; 14127 } 14128 @media only screen and ${s.E0} { 14129 grid-column: 1; 14130 grid-row: 2; 14131 font-size: 13.5px; 14132 } 14133 + button { 14134 @media only screen and ${s.E0} { 14135 grid-column: 2; 14136 grid-row: 1 / span 2; 14137 } 14138 } 14139`,m=i.Ay.div` 14140 grid-column: 2 / -1; 14141 min-width: 0; 14142 padding: 4px 0; 14143 @media only screen and ${s.E0} { 14144 grid-column: 1 / -1; 14145 } 14146`,f=i.Ay.form` 14147 display: flex; 14148 flex-direction: column; 14149 gap: 12px; 14150 margin: 0; 14151`},65492(e,t,n){n.d(t,{T6:()=>x,cC:()=>v,lB:()=>m,rX:()=>u,rk:()=>g});var r=n(10201),o=n(17402),i=n(63679),a=n(65057),l=n(29854),s=n(61182),d=n(53887),c=n(28297),p=n(91831),h=n(75213);function u(e,t,n){const r=(0,d.Xe)(e);if(""===r||r===t)return null;const o=(0,d.qK)(r);return o?{tone:"error",text:o}:"checking"===n?{tone:"muted",text:"Checking availabilityâ¦"}:"available"===n?{tone:"success",text:"Nickname is available"}:"taken"===n?{tone:"warning",text:"That nickname is taken. A number will be added."}:null}function g({fields:e,current:t,onCancel:n,onSaved:i}){const[a,c]=(0,o.J0)(t),{status:g,check:m}=(0,s.G)(t),f=(0,d.Xe)(a),x=u(a,t,g);return(0,r.Y)(p.h,{canSave:""!==f&&f!==t&&"error"!==x?.tone,onCancel:n,onSave:async()=>i(await(0,h.Lt)(e,{nick:f})),children:(0,r.Y)(l.A,{id:"settings-nick",ariaLabel:"New nickname",value:a,onValue:e=>{c(e),m(e)},autoComplete:"nickname",maxLength:32,autoFocus:!0,message:x})})}function m({fields:e,onCancel:t,onSaved:n}){const[i,l]=(0,o.J0)(e.description);return(0,r.Y)(p.h,{canSave:i!==e.description,onCancel:t,onSave:async()=>{const t={...e,description:i};await(0,h.Lt)(t,{}),n(t)},children:(0,r.Y)(a.JV,{children:(0,r.Y)(a.fs,{id:"settings-about","aria-label":"About you",value:i,rows:4,maxLength:4e3,placeholder:"A line or two about what you play and collect.",autoFocus:!0,onChange:e=>l(e.currentTarget.value)})})})}const f=[{key:"soc_discord",label:"Discord",placeholder:"username"},{key:"soc_twitter",label:"Twitter / X",placeholder:"@username"},{key:"soc_youtube",label:"YouTube",placeholder:"Channel URL or name"},{key:"soc_twitch",label:"Twitch",placeholder:"Channel name"},{key:"soc_facebook",label:"Facebook",placeholder:"Profile URL"}];function x({fields:e,onCancel:t,onSaved:n}){const[i,a]=(0,o.J0)(e),s=f.some(t=>i[t.key]!==e[t.key]);return(0,r.Y)(p.h,{canSave:s,onCancel:t,onSave:async()=>{await(0,h.Lt)(i,{}),n(i)},children:(0,r.Y)(y,{children:f.map((e,t)=>(0,r.Y)(l.A,{id:`settings-${e.key}`,label:e.label,value:i[e.key],placeholder:e.placeholder,autoFocus:0===t,onValue:t=>a(n=>({...n,[e.key]:t}))},e.key))})})}function v(e){const t=f.filter(t=>""!==e[t.key].trim()).map(e=>e.label);return t.length?t.join(", "):"None yet"}const y=i.Ay.div` 14152 display: grid; 14153 grid-template-columns: repeat(2, minmax(0, 1fr)); 14154 gap: 12px 16px; 14155 @media only screen and ${c.E0} { 14156 grid-template-columns: minmax(0, 1fr); 14157 } 14158`},75213(e,t,n){n.d(t,{Lt:()=>i,mD:()=>o});var r=n(71643);function o(e){const t=e?.usermeta??{};return{description:t.description??"",soc_discord:t.discord??"",soc_twitter:t.twitter??"",soc_youtube:t.youtube??"",soc_twitch:t.twitch??"",soc_facebook:t.facebook??""}}async function i(e,t){const n=await(0,r.Mm)({nick:"",email:"",password:"",avatar:"",...e,...t});if(!n||1!==n.result)throw new Error(function(e){return"not_authenticated"===e?.error?"Your session isn't recognized here. Please log out, log back in, and try again.":e?.error_text||"Couldn't save. Try again."}(n));return n}n.d(t,["as",0,e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.trim())])},30728(e,t,n){n.d(t,{A:()=>Wr});var r=n(10201),o=n(17402),i=n(2347),a=n(70213),l=n(63679),s=n(63346),d=n(29854),c=n(56411),p=n(28297),h=n(30821);function u({label:e,help:t,tag:n,children:o,stack:i,disabled:a,status:l}){const s=l?l.text:t;return(0,r.FD)(m,{$stack:i,children:[(0,r.FD)("div",{children:[(0,r.FD)(f,{children:[(0,r.Y)(x,{$disabled:a,children:e}),n&&(0,r.Y)(v,{children:n})]}),s&&(0,r.Y)(y,{$tone:l?.tone,role:"error"===l?.tone?"alert":void 0,children:s})]}),o&&(0,r.Y)(w,{$stack:i,children:o})]})}function g({label:e,help:t,tag:n,words:i,checked:a,onChange:l,disabled:s,savingText:d="Savingâ¦",errorText:p="Couldn't save. Try again.",ariaLabel:h}){const[g,m]=(0,o.J0)(a),[f,x]=(0,o.J0)("idle"),v=(0,o.li)(0);(0,o.vJ)(()=>{m(a)},[a]);const y="saving"===f?{tone:"busy",text:d}:"error"===f?{tone:"error",text:p}:null;return(0,r.Y)(u,{label:e,help:t,tag:n,disabled:s,status:y,children:(0,r.Y)(c.A,{variant:"row",checked:g,checkedStrings:i,disabled:s,ariaLabel:h??("string"==typeof e?e:void 0),onChange:e=>{(async e=>{const t=g,n=++v.current;m(e),x("saving");try{await l(e),n===v.current&&x("idle")}catch{if(n!==v.current)return;m(t),x("error")}})(e)}})})}const m=l.Ay.div` 14159 display: grid; 14160 grid-template-columns: minmax(0, 1fr) auto; 14161 gap: 16px; 14162 align-items: center; 14163 min-height: 60px; 14164 padding: 10px 0; 14165 box-sizing: border-box; 14166 border-bottom: 1px solid ${h.Q.rowRule}; 14167 &:last-child { 14168 border-bottom: none; 14169 } 14170 @media only screen and ${p.E0} { 14171 gap: 12px; 14172 ${e=>e.$stack?"grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px 0;":""} 14173 } 14174`,f=l.Ay.div` 14175 display: flex; 14176 align-items: center; 14177 flex-wrap: wrap; 14178 gap: 4px 8px; 14179`,x=l.Ay.span` 14180 font-size: 14px; 14181 font-weight: 600; 14182 line-height: 1.35; 14183 color: ${e=>e.$disabled?"var(--theme-palette-color-3)":"var(--theme-palette-color-4)"}; 14184 @media only screen and ${p.E0} { 14185 font-size: 15px; 14186 } 14187`,v=l.Ay.span` 14188 padding: 2px 6px; 14189 border-radius: 3px; 14190 box-shadow: inset 0 0 0 1px var(--theme-palette-color-5); 14191 font-size: 10px; 14192 font-weight: 800; 14193 letter-spacing: 0.06em; 14194 text-transform: uppercase; 14195 color: ${h.Q.muted}; 14196`,y=l.Ay.div` 14197 margin-top: 2px; 14198 font-size: 13px; 14199 line-height: 1.4; 14200 color: ${e=>"error"===e.$tone?h.Q.danger:"busy"===e.$tone?"var(--theme-palette-color-3)":h.Q.muted}; 14201`,w=l.Ay.div` 14202 display: flex; 14203 justify-content: flex-end; 14204 min-width: 0; 14205 @media only screen and ${p.E0} { 14206 ${e=>e.$stack?"justify-content: stretch; > * { flex: 1; min-width: 0; }":""} 14207 } 14208`;var b=n(52199);function $(){const[e,t]=(0,o.J0)(null);(0,o.vJ)(()=>
14208{if("success"!==e?.tone)return;const n=window.setTimeout(()=>t(null),3e3);return()=>window.clearTimeout(n)},[e]);const n=(0,o.hb)((e="Saved")=>t({tone:"success",text:e}),[]),r=(0,o.hb)((e="Couldn't save. Try again.")=>t({tone:"error",text:e}),[]),i=(0,o.hb)((e="Savingâ¦")=>t({tone:"busy",text:e}),[]),a=(0,o.hb)(()=>t(null),[]);return{status:e,saved:n,failed:r,busy:i,clear:a}}function k({title:e,meta:t,status:n,rows:o,statusEnd:i,lead:l,sub:s}){const d=(0,r.FD)(r.FK,{children:[(0,r.Y)(b._x,{children:e}),t&&(0,r.Y)(b.Wb,{children:t}),n&&(0,r.FD)(b.vj,{$tone:n.tone,$end:i,role:"error"===n.tone?"alert":"status",children:["success"===n.tone&&(0,r.Y)(a.iW,{size:13}),n.text]})]});return l||s?(0,r.FD)(Y,{$rows:o,children:[l,(0,r.FD)("div",{children:[(0,r.Y)(b.dI,{$tight:!0,children:d}),s]})]}):(0,r.Y)(b.dI,{$rows:o,children:d})}const Y=l.Ay.div` 14209 display: flex; 14210 align-items: center; 14211 gap: 12px; 14212 ${e=>e.$rows?"padding: 12px 0 8px;":"margin-bottom: 12px;"} 14213 > div { 14214 min-width: 0; 14215 } 14216`;var A=n(10135),C=n(56245),F=n(28709);const D='"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace',S=l.Ay.div` 14217 display: grid; 14218 grid-template-columns: 184px minmax(0, 1fr); 14219 gap: 24px; 14220 align-items: start; 14221 @media only screen and ${p.E0} { 14222 grid-template-columns: minmax(0, 1fr); 14223 gap: 12px; 14224 } 14225`,I=l.Ay.div` 14226 display: flex; 14227 flex-direction: column; 14228 gap: 12px; 14229 min-width: 0; 14230`,z=l.Ay.div` 14231 justify-self: start; 14232 padding: 12px; 14233 border-radius: 8px; 14234 background: #fff; 14235 line-height: 0; 14236`,T=l.Ay.p` 14237 margin: 0; 14238 font-size: 14px; 14239 line-height: 1.5; 14240 color: var(--theme-palette-color-4); 14241`,E=l.Ay.span` 14242 font-size: 12.5px; 14243 font-weight: 600; 14244 color: var(--theme-palette-color-4); 14245 @media only screen and ${p.E0} { 14246 font-size: 13px; 14247 } 14248`,L=l.Ay.code` 14249 display: flex; 14250 flex: 1; 14251 align-items: center; 14252 min-width: 0; 14253 min-height: 44px; 14254 padding: 6px 12px; 14255 box-sizing: border-box; 14256 border-radius: 6px; 14257 background: var(--theme-palette-color-7); 14258 box-shadow: inset 0 0 0 1px ${h.Q.inputRing}; 14259 font-family: ${D}; 14260 font-size: 15px; 14261 letter-spacing: 0.08em; 14262 color: var(--theme-palette-color-4); 14263 /* A long key wraps between its groups of four, never inside one. */ 14264 word-break: normal; 14265 overflow-wrap: anywhere; 14266 user-select: all; 14267 @media only screen and ${p.E0} { 14268 font-size: 14px; 14269 letter-spacing: 0.06em; 14270 } 14271`,M=l.Ay.div` 14272 display: flex; 14273 gap: 8px; 14274 min-width: 0; 14275`,N=l.Ay.div` 14276 height: 1px; 14277 background: ${h.Q.rowRule}; 14278`,P=l.Ay.form` 14279 display: flex; 14280 align-items: flex-start; 14281 gap: 8px; 14282 margin: 0; 14283 > :first-child { 14284 flex: 0 1 220px; 14285 } 14286 && input { 14287 height: 48px; 14288 padding: 0 14px; 14289 font-size: 20px; 14290 letter-spacing: 0.3em; 14291 text-align: left; 14292 } 14293 && button { 14294 height: 48px; 14295 padding: 0 20px; 14296 font-size: 14px; 14297 } 14298 @media only screen and ${p.E0} { 14299 flex-direction: column; 14300 align-items: stretch; 14301 > :first-child { 14302 flex: none; 14303 } 14304 && input { 14305 height: 52px; 14306 font-size: 22px; 14307 } 14308 } 14309`,O=l.Ay.div` 14310 display: grid; 14311 grid-template-columns: repeat(2, minmax(0, max-content)); 14312 gap: 10px 32px; 14313 padding: 14px 16px; 14314 border-radius: 8px; 14315 background: var(--theme-palette-color-7); 14316 box-shadow: inset 0 0 0 1px ${h.Q.rowRule}; 14317 font-family: ${D}; 14318 font-size: 15px; 14319 letter-spacing: 0.06em; 14320 color: var(--theme-palette-color-4); 14321 user-select: all; 14322 @media only screen and ${p.E0} { 14323 grid-template-columns: repeat(2, minmax(0, 1fr)); 14324 gap: 10px 16px; 14325 } 14326`,_=l.Ay.div` 14327 padding: 10px 14px; 14328 border-radius: 6px; 14329 background: color-mix(in srgb, ${h.Q.dangerStrong} 12%, transparent); 14330 box-shadow: inset 0 0 0 1px ${h.Q.dangerEdge}; 14331 font-size: 13px; 14332 line-height: 1.5; 14333 color: var(--theme-palette-color-4); 14334 strong { 14335 font-weight: 700; 14336 } 14337`,R=l.Ay.div` 14338 display: flex; 14339 flex-wrap: wrap; 14340 align-items: center; 14341 justify-content: space-between; 14342 gap: 8px 12px; 14343 padding: 10px 0; 14344 border-top: 1px solid ${h.Q.rowRule}; 14345 font-size: 14px; 14346 color: var(--theme-palette-color-4); 14347 b { 14348 font-weight: 600; 14349 } 14350`,j=l.Ay.div` 14351 margin-top: 2px; 14352 font-size: 12px; 14353 color: ${h.Q.muted}; 14354`,J=l.Ay.div` 14355 display: flex; 14356 flex-direction: column; 14357 gap: ${e=>e.$gap??12}px; 14358 min-width: 0; 14359`;function B({codes:e,onDone:t}){const[n,i]=(0,o.J0)(!1);return(0,r.FD)(J,{children:[(0,r.FD)(_,{children:[(0,r.FD)("strong",{children:["Two-factor is on. Save these ",e.length," recovery codes now: this is the only time they are shown."]})," ","If you lose this phone, each code signs you in once."]}),(0,r.Y)(O,{"aria-label":"Recovery codes",children:e.map(e=>(0,r.Y)("span",{children:e},e))}
14359),(0,r.FD)(b.w,{$phoneGrid:!0,children:[(0,r.Y)(C.n,{variant:"secondary",onAction:()=>navigator.clipboard.writeText(e.join("\n")),doneLabel:"â Copied",errorText:"Couldn't copy. Write the codes down, or download them.",children:"Copy all"}),(0,r.Y)(C.n,{variant:"secondary",onAction:async()=>function(e){const t=["DotGG two-factor recovery codes","Each code signs you in once. Keep this file somewhere you can reach","without the device running your authenticator app.","",...e,""].join("\n"),n=URL.createObjectURL(new Blob([t],{type:"text/plain;charset=utf-8"}));try{const e=document.createElement("a");e.href=n,e.download="dotgg-recovery-codes.txt",document.body.appendChild(e),e.click(),document.body.removeChild(e)}finally{URL.revokeObjectURL(n)}}(e),doneLabel:"â Downloaded",errorText:"Couldn't download. Copy the codes instead.",children:"Download .txt"})]}),(0,r.Y)(F.T,{id:"twofa-codes-saved",checked:n,onChange:i,children:"I've saved them somewhere I can reach without this phone"}),(0,r.Y)(b.IY,{children:(0,r.Y)(s.jn,{type:"button",disabled:!n,onClick:t,children:"Done"})})]})}var K=n(44260);function W(e){const t=1e3*Number(e);if(!t)return"never";const n=Math.floor((Date.now()-t)/864e5);return n<=0?"today":1===n?"yesterday":n<30?`${n} days ago`:new Date(t).toLocaleDateString()}async function U(e){if(1!==+(await(0,K.CQ)(e)).result)throw new Error("Couldn't update your trusted browsers. Try again.")}const Q=e=>e instanceof Error?e.message:"Couldn't reach the server. Try again.";function G(){const[e,t]=(0,o.J0)(null),[n,i]=(0,o.J0)(0),a=()=>{(0,K.Dp)().then(e=>{t(1===+e.result&&Array.isArray(e.devices)?e.devices:[]),i(+(e.current_id??0))}).catch(()=>t([]))};(0,o.vJ)(a,[]);const l=e?.length??0,s=null===e?"Loadingâ¦":0===l?"None. Every sign-in asks for a code. Tick âTrust this browserâ when you sign in on a device that's yours.":`${l} browser${1===l?"":"s"} skip the code. Your password is still asked every time.`;return(0,r.FD)(b.un,{id:"trusted-browsers",children:[(0,r.Y)(u,{label:"Browsers you trust",help:s,children:l>0&&(0,r.Y)(C.n,{variant:"secondary",onAction:async()=>{await U(),a()},errorText:Q,children:"Forget all"})}),e?.map(e=>(0,r.FD)(R,{children:[(0,r.FD)("div",{children:[(0,r.Y)("b",{children:e.label}),+e.id===n&&" · this browser",(0,r.FD)(j,{children:["Last used ",W(e.last_used_at)," · added ",W(e.created_at)," · ",e.ip,e.country?` (${e.country})`:""," · expires ",new Date(1e3*Number(e.expires_at)).toLocaleDateString()]})]}),(0,r.Y)(C.n,{variant:"secondary",size:"xs",onAction:async()=>{await U(e.id),a()},errorText:Q,children:"Forget"})]},e.id))]})}function H(e){const[t,n]=(0,o.J0)(null),i=t=>()=>{e.onPasswordChange(""),e.onCodeChange(""),n(t)},a="rotate"===t?e.onRotate:e.onDisable;return(0,r.FD)(J,{children:[e.staleRotation&&(0,r.FD)(_,{children:["You started switching to a new authenticator and didn't finish. ",(0,r.Y)("strong",{children:"Nothing has changed"}),": your current app still works."," ",(0,r.Y)(s.QW,{type:"button",disabled:e.busy,onClick:e.onDiscardRotation,children:"Discard the unfinished switch"})]}),(0,r.FD)("div",{children:[(0,r.Y)(u,{label:"Authenticator app",help:`Sign-in asks for a 6-digit code. ${e.recoveryLeft} recovery code${1===e.recoveryLeft?"":"s"} left.`,children:(0,r.Y)(q,{children:"On"})}),(0,r.Y)(u,{label:"New phone?",help:"Move two-factor to it without turning it off. Your current app keeps working until the new one is confirmed, and your recovery codes stay the same.",children:(0,r.Y)(s.tA,{type:"button",onClick:i("rotate"),disabled:"rotate"===t,children:"Switch device"})}),(0,r.Y)(u,{label:"Turn off two-factor",help:"Sign-in will ask for your password only.",children:(0,r.Y)(s.tA,{type:"button",onClick:i("off"),disabled:"off"===t,children:"Turn off"})})]}),t&&(0,r.FD)(V,{noValidate:!0,onSubmit:t=>{t.preventDefault(),e.busy||a()},children:[(0,r.Y)(E,{children:"rotate"===t?"Switch to a new device":"Turn off two-factor"}),(0,r.Y)(b.c5,{children:"Confirm with your password and a code from the app you have now. A recovery code works too, if the old phone is gone."}),(0,r.FD)(X,{children:[(0,r.Y)(d.s,{id:"twofa-confirm-password",label:"Password",autoComplete:"current-password",value:e.password,onValue:e.onPasswordChange,autoFocus:!0}),(0,r.Y)(d.A,{id:"twofa-confirm-code",label:"Code or recovery code",autoComplete:"one-time-code",autoCapitalize:"characters",spell
14359Check:!1,maxLength:16,value:e.code,onValue:e.onCodeChange})]}),(0,r.FD)(b.IY,{children:["rotate"===t?(0,r.FD)(s.jn,{type:"submit",disabled:e.busy,"aria-busy":e.busy||void 0,children:[e.busy&&(0,r.Y)(s.az,{"aria-hidden":"true"}),e.busy?"Checkingâ¦":"Continue"]}):(0,r.FD)(s.Qi,{type:"submit",disabled:e.busy,"aria-busy":e.busy||void 0,children:[e.busy&&(0,r.Y)(s.az,{"aria-hidden":"true"}),e.busy?"Turning offâ¦":"Turn off two-factor"]}),(0,r.Y)(s.tA,{type:"button",disabled:e.busy,onClick:()=>n(null),children:"Cancel"})]})]})]})}const q=l.Ay.span` 14360 display: inline-flex; 14361 align-items: center; 14362 height: 24px; 14363 padding: 0 10px; 14364 border-radius: 12px; 14365 box-shadow: inset 0 0 0 1px ${h.Q.successRing}; 14366 font-size: 12px; 14367 font-weight: 700; 14368 color: ${h.Q.success}; 14369`,V=l.Ay.form` 14370 display: flex; 14371 flex-direction: column; 14372 gap: 10px; 14373 margin: 0; 14374 padding: 14px 16px; 14375 border-radius: 8px; 14376 background: var(--theme-palette-color-7); 14377 box-shadow: inset 0 0 0 1px ${h.Q.rowRule}; 14378 ${b.c5} { 14379 margin: 0; 14380 } 14381`,X=l.Ay.div` 14382 display: grid; 14383 grid-template-columns: repeat(2, minmax(0, 1fr)); 14384 gap: 12px; 14385 @media only screen and ${p.E0} { 14386 grid-template-columns: minmax(0, 1fr); 14387 } 14388`;var Z=n(32613),ee=n(53794);const te=e=>e.replace(/\s+/g,""),ne=e=>te(e).replace(/(.{4})(?=.)/g,"$1 ");function re({secret:e,otpauthUrl:t,code:n,busy:i,mode:a,onCodeChange:l,onConfirm:c}){const p=(0,ee.WS)(),[h,u]=(0,o.J0)(!1),g=(0,o.li)("");(0,o.vJ)(()=>{const e=n.trim();!i&&/^\d{6}$/.test(e)&&g.current!==e&&(g.current=e,c())},[n,i,c]);const m=(0,r.Y)(C.n,{variant:"secondary",onAction:()=>navigator.clipboard.writeText(te(e)),doneLabel:"â Copied",errorText:"Couldn't copy. Select the key and copy it by hand.",children:p?"Copy":"Copy key"}),f=(0,r.FD)(M,{children:[(0,r.Y)(L,{"aria-label":"Setup key",children:ne(e)}),m]}),x=(0,r.Y)(z,{children:(0,r.Y)(Z.Z,{value:t,size:160,title:"rotate"===a?"New authenticator QR code":"2FA setup QR code"})}),v=(0,r.FD)(I,{children:[(0,r.Y)(E,{children:"Then enter the 6-digit code it shows"}),(0,r.FD)(P,{noValidate:!0,onSubmit:e=>{e.preventDefault(),!i&&n.trim().length>=6&&c()},children:[(0,r.Y)(d.A,{id:"twofa-setup-code",ariaLabel:"The 6-digit code from your authenticator app",variant:"code",inputMode:"numeric",autoComplete:"one-time-code",maxLength:8,placeholder:"â¢â¢â¢â¢â¢â¢",value:n,onValue:l}),(0,r.FD)(s.jn,{type:"submit",disabled:i||n.trim().length<6,"aria-busy":i||void 0,children:[i&&(0,r.Y)(s.az,{"aria-hidden":"true"}),i?"Verifyingâ¦":"rotate"===a?"Switch over":"Turn on"]})]})]}),y="rotate"===a?"Add DotGG to your NEW authenticator app. Your old app keeps working until you finish; nothing changes if you stop here.":"Scan this with Google Authenticator, Authy, 1Password or any TOTP app on your phone.";return p?(0,r.FD)(I,{children:["rotate"===a&&(0,r.Y)(b.c5,{children:y}),(0,r.Y)(s.jn,{as:"a",href:t,"data-native":!0,children:"Open in authenticator app"}),(0,r.Y)(b.c5,{children:"Opens Google Authenticator, Authy or 1Password with DotGG filled
14388in."}),(0,r.Y)(N,{}),(0,r.Y)(E,{children:"Or copy the setup key"}),f,h?x:(0,r.Y)(s.QW,{type:"button",onClick:()=>u(!0),children:"Scanning from another device? Show QR code âº"}),(0,r.Y)(N,{}),v]}):(0,r.FD)(S,{children:[x,(0,r.FD)(I,{children:[(0,r.Y)(T,{children:y}),(0,r.FD)(I,{children:[(0,r.Y)(E,{children:"Can't scan? Enter this key instead"}),f]}),(0,r.Y)(N,{}),v]})]})}const oe={bad_password:"That password is not correct.",already_enabled:"Two-factor authentication is already enabled.",not_configured:"2FA is not available right now â please try again later.",not_authenticated:"Your session isn't recognized here. Please log out, log back in, and try again."},ie={...oe,not_enabled:"Two-factor authentication is not active on this account."};function ae(e){return"code_reused"===e?"You already used that code. Wait for your authenticator app to show the next one.":"locked"===e?"Too many incorrect codes â wait a few minutes and try again.":"That code didn't match. Check your authenticator app and try again."}const le=()=>(0,r.FD)(b.c5,{children:[(0,r.Y)("strong",{children:"Never set a password?"})," If you sign in with Google, Facebook or Discord, your account has one you have never seen. Set one under ",(0,r.Y)("a",{href:"#sign-in",children:"Sign-in ⸠Password"})," and come back, or, if you are DotGG staff, manage two-factor from ",(0,r.Y)("strong",{children:"wp-admin ⸠Two-Factor Auth"}),", which needs no password."]});function se(e,t){return"off"===e?t?"Step 1 of 3":void 0:"setup"===e?"Step 2 of 3":"recovery"===e?"Step 3 of 3":"rotate"===e?"New device":void 0}function de({s:e,starting:t,setStarting:n}){return t?(0,r.FD)(ue,{noValidate:!0,onSubmit:t=>{t.preventDefault(),e.busy||e.beginEnroll()},children:[(0,r.Y)(d.s,{id:"twofa-begin-password",label:"Your password",autoComplete:"current-password",value:e.password,onValue:e.setPassword,autoFocus:!0,message:{tone:"muted",text:"Confirm it's you to begin."}}),(0,r.FD)(b.IY,{children:[(0,r.FD)(s.jn,{type:"submit",disabled:e.busy,"aria-busy":e.busy||void 0,children:[e.busy&&(0,r.Y)(s.az,{"aria-hidden":"true"}),e.busy?"Startingâ¦":"Continue"]}),(0,r.Y)(s.tA,{type:"button",disabled:e.busy,onClick:()=>n(!1),children:"Cancel"})]})]}):(0,r.Y)(u,{label:"Authenticator app",help:"Off. Protect your account with 6-digit codes from Google Authenticator, Authy, 1Password or any TOTP app.",children:(0,r.Y)(s.jn,{type:"button",onClick:()=>n(!0),children:"Turn on"})})}function ce(){const e=function(){const[e,t]=(0,o.J0)("loading"),[n,r]=(0,o.J0)(!1),[i,a]=(0,o.J0)(0),[l,s]=(0,o.J0)(!1),[d,c]=(0,o.J0)(""),[p,h]=(0,o.J0)(""),[u,g]=(0,o.J0)(""),[m,f]=(0,o.J0)(""),[x,v]=(0,o.J0)([]),[y,w]=(0,o.J0)(!1),[b,$]=(0,o.J0)(null),[k,Y]=(0,o.J0)(!1),[A,C]=(0,o.J0)(null);(0,o.vJ)(()=>{(0,K.mh)().then(e=>{e&&1===+e.result?(r(Boolean(e.required)),a(+e.recovery_left||0),s(Boolean(e.rotating)),t(e.enabled?"on":"off")):t("unavailable")}).catch(()=>{t("unavailable")})},[]);const F=()=>{$(null),Y(!1),C(null)},D=()=>{g(""),f(""),h("")},S=async(e,n,r)=>{F(),w(!0);try{const o=await e();1===+o.result&&o.secret&&o.otpauth_url?(g(o.secret),f(o.otpauth_url),s(!1),h(""),t(n)):(Y("bad_password"===o.error),$(r[o.error??""]??ae(o.error)))}catch{$("Could not reach the server. Please try again.")}finally{w(!1)}};return{view:e,setView:t,required:n,recoveryLeft:i,staleRotation:l,password:d,setPassword:c,code:p,setCode:h,secret:u,otpauthUrl:m,recoveryCodes:x,busy:y,error:b,setError:$,noPassword:k,notice:A,beginEnroll:()=>{if(!d)return F(),$("Enter your account password to start the setup."),void Y(!0);S(()=>(0,K.Ge)(d),"setup",oe)},beginRotate:()=>{if(!d||!p)return F(),$("Switching devices needs your password and a code from the authenticator you have now (a recovery code works too)."),void Y(!d);S(()=>(0,K.PR)(d,p),"rotate",ie)},confirmEnroll:async()=>{F(),w(!0);try{const e=await(0,K.hm)(p);1===+e.result&&Array.isArray(e.recovery_codes)?(v(e.recovery_codes),a(e.recovery_codes.length),c(""),h(""),t("recovery")):$(ae(e.error))}catch{$("Could not reach the server. Please try again.")}finally{w(!1)}},confirmRotate:async()=>{F(),w(!0);try{const e=await(0,K.e5)(p);1===+e.result?(c(""),D(),t("on"),C("Two-factor moved to your new device. The old app no longer works; your recovery codes are unchanged.")):"no_pending_rotation"===e.error?(t("on"),$("That device switch expired. Start it again.")):$(ae(e.error))}catch{$("Could not reach the server. Please try again.")}finally{w(!1)}},cancelEnroll:async()=>{F(),w(!0);try{await(0,K.eu)(d,"")}catch{}finally{w(!1),D(),t("off")}},cancelRotate:async()=>{F(),w(!0);let e=!1;try{e=1===(await(0,K.kg)()).result}catch{}finally{w(!1),D(),t("on"),e?(s(!1),C("Device switch cancelled. Your current authenticator still works.")):$("Couldn't cancel the device switch just now. Your current authenticator still works, and the unfinished switch expires on its own.")}},disable:async()=>
14388{if(F(),!d||!p)return $("Disabling 2FA needs your password and a current authenticator (or recovery) code."),void Y(!d);w(!0);try{const e=await(0,K.eu)(d,p);1===+e.result?(c(""),h(""),t("off"),C(e.required?"Two-factor authentication removed. Staff accounts must re-enroll â set it up again below.":"Two-factor authentication has been turned off.")):(Y("bad_password"===e.error),$("bad_password"===e.error?"That password is not correct.":ae(e.error)))}catch{$("Could not reach the server. Please try again.")}finally{w(!1)}}}}(),[t,n]=(0,o.J0)(!1),i="on"===e.view||"recovery"===e.view,a="loading"!==e.view&&"unavailable"!==e.view;(0,A.o)("account","twofa",a?i?"Two-factor on":"Two-factor off":null);const l="setup"===e.view||"rotate"===e.view;return(0,r.FD)(r.FK,{children:[(0,r.FD)(pe,{id:"two-factor",$accent:l||"off"===e.view&&t,children:[(0,r.FD)(he,{children:[(0,r.Y)(k,{title:"Two-factor authentication",meta:se(e.view,t)}),l&&(0,r.Y)(s.QW,{type:"button",$tone:"muted",onClick:()=>{n(!1),"rotate"===e.view?e.cancelRotate():e.cancelEnroll()},disabled:e.busy,children:"Cancel"})]}),e.required&&!i&&"loading"!==e.view&&(0,r.FD)(_,{children:["Two-factor is ",(0,r.Y)("strong",{children:"required for DotGG staff accounts"}),": wp-admin will ask for it. If this asks for a password you have never set (you sign in with Google), set one under Sign-in first, or enrol from"," ",(0,r.Y)("strong",{children:"wp-admin ⸠Two-Factor Auth"}),", which needs none."]}),"loading"===e.view&&(0,r.Y)(b.c5,{children:"Loading two-factor statusâ¦"}),"unavailable"===e.view&&(0,r.Y)(b.c5,{children:"Two-factor settings couldn't load right now. Reload the page to try again."}),"off"===e.view&&(0,r.Y)(de,{s:e,starting:t,setStarting:n}),l&&(0,r.Y)(re,{mode:"rotate"===e.view?"rotate":"enroll",secret:e.secret,otpauthUrl:e.otpauthUrl,code:e.code,busy:e.busy,onCodeChange:e.setCode,onConfirm:()=>{"rotate"===e.view?e.confirmRotate():e.confirmEnroll()}}
14388),"recovery"===e.view&&(0,r.Y)(B,{codes:e.recoveryCodes,onDone:()=>{n(!1),e.setView("on")}}),"on"===e.view&&(0,r.Y)(H,{recoveryLeft:e.recoveryLeft,staleRotation:e.staleRotation,password:e.password,code:e.code,busy:e.busy,onPasswordChange:e.setPassword,onCodeChange:e.setCode,onRotate:e.beginRotate,onDisable:()=>{e.disable()},onDiscardRotation:()=>{e.cancelRotate()}}),(e.error||e.noPassword||e.notice)&&(0,r.FD)(J,{$gap:4,children:[e.error&&(0,r.Y)(b.Kw,{role:"alert",children:e.error}),e.noPassword&&(0,r.Y)(le,{}),e.notice&&(0,r.Y)(b.nS,{role:"status",children:e.notice})]})]}),"on"===e.view&&(0,r.Y)(G,{})]})}const pe=(0,l.Ay)(b.XY)` 14389 ${e=>e.$accent?"border-color: var(--theme-palette-color-1);":""} 14390`,he=l.Ay.div` 14391 display: flex; 14392 align-items: flex-start; 14393 justify-content: space-between; 14394 gap: 12px; 14395 > button { 14396 min-height: 0; 14397 color: var(--theme-palette-color-3); 14398 } 14399`,ue=l.Ay.form` 14400 display: flex; 14401 flex-direction: column; 14402 gap: 12px; 14403 max-width: 420px; 14404 margin: 0; 14405`;var ge=n(80649),me=n(59408),fe=n(71643),xe=n(65057),ve=n(91831),ye=n(75213);function we({fields:e,current:t,onCancel:n,onSaved:i}){const[l,d]=(0,o.J0)(null),[c,p]=(0,o.J0)(!1),[h,u]=(0,o.J0)(!1),[g,m]=(0,o.J0)(""),f=(0,o.li)(null),x=async e=>{if(e&&e.type.startsWith("image/")){u(!0),m("");try{const t=new FormData;t.append("file",e),i(await(0,fe.F4)(t))}catch{m("Couldn't upload that picture. Try another, or a smaller one."),u(!1)}}};return(0,r.FD)(ve.h,{canSave:null!==l,saveLabel:"Save ghost",onCancel:n,onSave:async()=>{l&&(await(0,ye.Lt)(e,{avatar:l}),i(l))},children:[(0,r.FD)(be,{children:[(0,r.FD)($e,{$dragging:c,onDragEnter:e=>{e.preventDefault(),p(!0)},onDragOver:e=>e.preventDefault(),onDragLeave:()=>p(!1),onDrop:e=>{e.preventDefault(),p(!1),x(e.dataTransfer?.files?.[0])},children:[(0,r.Y)("img",{src:(0,me.T)(l??t),alt:"",width:96,height:96}),(0,r.Y)("span",{children:h?"Uploadingâ¦":"Drop a picture here"})]}),(0,r.FD)(ke,{children:[(0,r.FD)(s.tA,{type:"button",disabled:h,onClick:()=>f.current?.click(),children:[(0,r.Y)(a.nr,{size:15}),"Choose a picture"]}),(0,r.Y)(s.tA,{type:"button",disabled:h,onClick:()=>d(function(){const e=Math.floor(160*Math.random()),t=Math.floor(e/20)+1,n=e%20+1;return`ava_${String(t).padStart(2,"0")}_${String(n).padStart(2,"0")}.png`}()),children:l?"Another ghost":"Random ghost"}),(0,r.Y)(Ye,{ref:f,type:"file",accept:"image/*",tabIndex:-1,"aria-hidden":"true",onChange:e=>{x(e.currentTarget.files?.[0])}})]})]}),g&&(0,r.Y)(xe.XE,{$tone:"error",role:"alert",children:g})]})}const be=l.Ay.div` 14406 display: flex; 14407 flex-wrap: wrap; 14408 align-items: center; 14409 gap: 16px; 14410`,$e=l.Ay.div` 14411 display: flex; 14412 flex-direction: column; 14413 align-items: center; 14414 justify-content: center; 14415 gap: 8px; 14416 width: 148px; 14417 height: 148px; 14418 box-sizing: border-box; 14419 border-radius: 8px; 14420 border: 2px ${e=>e.$dragging?"solid var(--theme-palette-color-1)":`dashed ${h.Q.rowRule}`}; 14421 background: var(--theme-palette-color-7); 14422 font-size: 12px; 14423 color: var(--theme-palette-color-3); 14424 img { 14425 width: 72px; 14426 height: 72px; 14427 border-radius: 50%; 14428 object-fit: cover; 14429 } 14430`,ke=l.Ay.div` 14431 display: flex; 14432 flex-direction: column; 14433 gap: 8px; 14434`,Ye=l.Ay.input` 14435 display: none; 14436`;var Ae=n(65492);const Ce=()=>{(0,ge.d)().catch(()=>{})};function Fe({user:e,fields:t,setFields:n}){const[i,a]=(0,o.J0)(null),[l,s]=(0,o.J0)(e.nickname),[d,c]=(0,o.J0)(e.usermeta?.avatar??""),p=$(),h=t.description.trim(),u=e=>()=>{p.clear(),a(e)},g=()=>a(null),m=e=>{a(null),p.saved(e)};return(0,r.FD)(b.un,{id:"profile",children:[(0,r.Y)(k,{rows:!0,title:"Profile",meta:"What others see",status:p.status}),(0,r.Y)(ve.X,{label:"Nickname",value:l,editing:"nick"===i,onEdit:u("nick"),children:(0,r.Y)(Ae.rk,{fields:t,current:l,onCancel:g,onSaved:e=>{e.new_nick&&s(e.new_nick),Ce(),m(e.nick_changed?"Saved. It can take a few minutes to show everywhere.":void 0)}})}),(0,r.Y)(ve.X,{label:"Avatar",value:(0,r.FD)(r.FK,{children:[(0,r.Y)("img",{src:(0,me.T)(d),alt:"",width:32,height:32}),"Beside your name everywhere"]}),editing:"avatar"===i,onEdit:u("avatar"),children:(0,r.Y)(we,{fields:t,current:d,onCancel:g,onSaved:e=>{c(e),Ce(),m()}})}),(0,r.Y)(ve.X,{label:"About you",value:h?h.length>140?`${h.slice(0,140)}â¦`:h:"Not written yet",actionLabel:h?"Edit":"Add",editing:"about"===i,onEdit:u("about"),children:(0,r.Y)(Ae.lB,{fields:t,onCancel:g,onSaved:e=>{n(e),m()}})}),(0,r.Y)(ve.X,{label:"Social links",value:(0,Ae.cC)(t),actionLabel:"Edit",editing:"social"===i,onEdit:u("social"),children:(0,r.Y)(Ae.T6,{fields:t,onCancel:g,onSaved:e=>{n(e),m()}})})]})}function De({user:e,fields:t}){const[n,i]=(0,o.J0)(null),[a,l]=(0,o.J0)(!0===e.needs_email),[s,c]=(0,o.J0)(""),[p,h]=(0,o.J0)(""),u=$
14436(),g=e=>()=>{u.clear(),c(""),h(""),i(e)},m=()=>i(null);return(0,r.FD)(b.un,{id:"sign-in",children:[(0,r.Y)(k,{rows:!0,title:"Sign-in",status:u.status}),(0,r.Y)(ve.X,{label:"Email",value:a?"None yet. Add one so you can reset your password.":"Where password resets and account notices go",actionLabel:a?"Add":"Change",editing:"email"===n,onEdit:g("email"),children:(0,r.Y)(ve.h,{canSave:(0,ye.as)(s),onCancel:m,onSave:async()=>{try{await(0,fe.Z6)(s.trim())}catch(e){if(e instanceof fe.My&&"in_use"===e.code)throw new Error("That email already belongs to another DotGG account.");throw e}l(!1),i(null),u.saved(),(0,ge.d)().catch(()=>{})},children:(0,r.Y)(d.A,{id:"settings-email",ariaLabel:a?"Email":"New email",type:"email",inputMode:"email",autoComplete:"email",placeholder:"[email protected]",value:s,onValue:c,autoFocus:!0})})}),(0,r.Y)(ve.X,{label:"Password",value:"Sign in with your email and a password",editing:"password"===n,onEdit:g("password"),children:(0,r.Y)(ve.h,{canSave:p.length>=6,onCancel:m,onSave:async()=>{await(0,ye.Lt)(t,{password:p}),i(null),u.saved("Saved. Use it the next time you sign in.")},children:(0,r.Y)(d.s,{id:"settings-password",ariaLabel:"New password",autoComplete:"new-password",value:p,onValue:h,autoFocus:!0,message:{tone:"muted",text:"At least 6 characters."}})})})]})}function Se({userData:e}){const[t,n]=(0,o.J0)(()=>(0,ye.mD)(e.user));return(0,r.FD)(r.FK,{children:[(0,r.Y)(Fe,{user:e.user,fields:t,setFields:n}),(0,r.Y)(De,{user:e.user,fields:t}),(0,r.Y)(ce,{})]})}var Ie=n(86031),ze=n(94315),Te=n(61204),Ee=n(4738);const Le=["discord_code","discord_state","discord"];function Me(){const e=new URL(window.location.href);for(const t of Le)e.searchParams.delete(t);return e.toString()}const Ne=(e,t)=>e instanceof Error?e.message:t;function Pe(){const[e,t]=(0,o.J0)(null),[n,i]=(0,o.J0)(!1),a=$(),{saved:l,failed:d}=a;(0,A.o)("connections","discord",e?.configured?e.linked?"Discord connected":"Discord not connected":null,0),(0,o.vJ)(()=>{if(!(0,Ee.x3)())return;let e=!0;const n=new URLSearchParams(window.location.search),r=n.get("discord_code"),o=n.get("discord_state"),a="cancelled"===n.get("discord");return(r||o||a)&&window.history.replaceState(window.history.state,"",Me()),a&&d("Discord connection was cancelled."),(r&&o?(0,fe.WV)(r,o).then(e=>(l("Connected"),e)):(0,fe.NU)()).then(n=>{e&&n&&t(n)}).catch(n=>{e&&(d(Ne(n,"Couldn't load your Discord connection.")),(0,fe.NU)().then(n=>e&&n&&t(n)).catch(()=>e&&i(!0)))}),()=>{e=!1}},[l,d]);const c=!0===e?.linked&&e.holds&&!e.role_applied;if((0,o.vJ)(()=>{if(!c)return;let e=0;const n=()=>{"visible"!==document.visibilityState||Date.now()-e<15e3||(e=Date.now(),(0,fe.og)().then(e=>{e&&(t(e),e.role_applied&&l("Premium role added"))}).catch(()=>{}))};return window.addEventListener("focus",n),document.addEventListener("visibilitychange",n),()=>{window.removeEventListener("focus",n),document.removeEventListener("visibilitychange",n)}},[c,l]),!(0,Ee.x3)())return null;const p=!0===e?.linked;return(0,r.FD)(b.XY,{id:"discord",children:[(0,r.Y)(k,{title:"Discord",status:a.status,lead:(0,r.Y)(Oe,{"aria-hidden":"true",children:(0,r.Y)(Te.g,{icon:ze._})}),sub:(0,r.Y)(_e,{$on:p,children:null===e?n?"Couldn't load":"Loadingâ¦":p?`Connected as @${e.username}`:"Not connected"})}),e&&!e.configured&&(0,r.Y)(b.c5,{children:"Connecting Discord isn't available right now."}),e?.configured&&(0,r.FD)(r.FK,{children:[(0,r.Y)(b.c5,{children:p?(h=e,h.holds?h.in_guild?h.role_applied?"Your Premium role is active in the DotGG Discord. You can also sign in with Discord.":"Your Premium role is being added. It can take up to ten minutes.":"Join the DotGG Discord server. Your Premium role is added when you come back to this page, or within ten minutes.":"The Premium role comes with DotGG Premium. Subscribe and it is added within a few minutes. You can also sign in with Discord."):"Premium members get a Premium role in the DotGG Discord. Connecting shows your subscription status inside the server; nothing else is shared."}),(0,r.FD)(b.w,{$phoneGrid:!0,children:[p&&!e.holds&&(0,r.Y)(s.jn,{as:"a",href:"#premium","data-native":!0,children:"See Premium"}),p&&e.holds&&!e.in_guild&&(0,r.Y)(s.jn,{as:"a",href:e.invite,target:"_blank",rel:"noopener noreferrer","data-native":!0,children:"Join the server"}),p?(0,r.Y)(C.n,{variant:"secondary",onAction:async()=>{const e=await(0,fe.ke)();e&&t(e),a.saved("Disconnected")},busyLabel:"Disconnectingâ¦",errorText:e=>Ne(e,"Couldn't disconnect Discord."),children:"Disconnect"}):(0,r.Y)(C.n,{onAction:async()=>{a.clear(),window.location.assign(await(0,fe.p_)(Me())),await new Promise(()=>{})},busyLabel:"Opening Discordâ¦",errorText:e=>Ne(e,"Couldn't start the Discord connection."),children:"Connect Discord"})]})]})]});var h}const Oe=l.Ay.span` 14437 display: inline-flex; 14438 flex: none; 14439 align-items: center; 14440 justify-content: center; 14441 width: 40px; 14442 height: 40px; 14443 border-radius: 8px; 14444 background: #5865f2; 14445 color: #fff; 14446 font-size: 20px; 14447 svg { 14448 width: 22px; 14449 height: 22px; 14450 } 14451`,_e=l.Ay.div` 14452 font-size: 13px; 14453 font-weight: ${e=>e.$on?600:400}; 14454 color: ${e=>e.$on?h.Q.success:h.Q.muted}; 14455`;function Re(){const e=Ie.SA.core.customSettingsSections??[];return(0,r.FD)(r.FK,{children:[(0,r.Y)(Pe,{}),e.map((e,t)=>(0,r.Y)(e,{},t))]})}var je=n(55612),Je=n(12434);async function Be(){const e=`/cgfw/resetcollection?game=${Je.Ay.TheGame.toLowerCase()}`;return await je.A.post(e,{},{url:`https://api.dotgg.gg${e}`,headers:(0,Ee.z5)()})}async function Ke(){const e=`/cgfw/resetdecks?game=${Je.Ay.TheGame.toLowerCase()}`;return await je.A.post(e,{},{url:`https://api.dotgg.gg${e}`,headers:(0,Ee.z5)()})}
14455async function We(){const e="/cgfw/deleteaccount";return await je.A.post(e,{},{url:`https://api.dotgg.gg${e}`,headers:(0,Ee.z5)()})}function Ue({id:e,title:t,text:n,word:i,button:a,busy:l,run:c,done:p,after:h}){const[u,g]=(0,o.J0)(""),[m,f]=(0,o.J0)("idle"),[x,v]=(0,o.J0)(""),y=u.trim()===i;return(0,r.FD)(qe,{id:e,children:[(0,r.Y)(b._x,{children:t}),(0,r.Y)(b.c5,{children:n}),(0,r.FD)(Ve,{noValidate:!0,onSubmit:e=>{e.preventDefault(),(async()=>{if(y&&"busy"!==m&&"done"!==m){f("busy"),v("");try{const e=await c();if(!1!==e.error)throw new Error(e.error_text||"Something went wrong.")}catch(e){return v(e instanceof Error?e.message:"Something went wrong."),void f("error")}f("done"),window.setTimeout(h,1500)}})()},children:[(0,r.Y)(d.A,{id:`${e}-confirm`,label:`Type ${i} to confirm`,value:u,onValue:g,placeholder:i,autoCapitalize:"characters",autoComplete:"off",spellCheck:!1,disabled:"busy"===m||"done"===m}),"done"===m?(0,r.Y)(b.nS,{role:"status",children:p}):(0,r.FD)(s.Qi,{type:"submit",disabled:!y,"aria-busy":"busy"===m||void 0,children:["busy"===m&&(0,r.Y)(s.az,{"aria-hidden":"true"}),"busy"===m?l:a]}),"error"===m&&(0,r.Y)(s.ps,{role:"alert",children:x})]})]})}const Qe=()=>window.location.reload(),Ge=()=>{window.location.href="/"},He=({showGameActions:e})=>{const t=Ie.SA.core.gameNameForTitle||"this game";return(0,r.FD)(r.FK,{children:[e&&(0,r.FD)(r.FK,{children:[(0,r.Y)(Ue,{id:"reset-collection",title:`Reset ${t} collection`,text:`Every card in your ${t} collection is removed, binders included. Nothing on other DotGG sites is touched. This can't be undone.`,word:"RESET",button:"Reset collection",busy:"Resettingâ¦",run:Be,done:"Collection reset. Reloadingâ¦",after:Qe}),(0,r.Y)(Ue,{id:"delete-decks",title:`Delete ${t} decks`,text:`All your saved ${t} decks are deleted. Decks on other DotGG sites stay. This can't be undone.`,word:"DELETE",button:"Delete decks",busy:"Deletingâ¦",run:Ke,done:"Decks deleted. Reloadingâ¦",after:Qe})]}),(0,r.Y)(Ue,{id:"delete-account",title:"Delete account",text:"Deletion starts as soon as you confirm, on every DotGG site: your collections, binders, decks, wishlists and trade lists go with it, and none of it can be recovered.",word:"DELETE MY ACCOUNT",button:"Delete my account",busy:"Deletingâ¦",run:We,done:"Account deleted. Taking you homeâ¦",after:Ge})]})},qe=(0,l.Ay)(b.XY)` 14456 border-color: ${h.Q.dangerEdge}; 14457 ${b._x} { 14458 margin-bottom: 6px; 14459 } 14460`,Ve=l.Ay.form` 14461 display: flex; 14462 flex-direction: column; 14463 align-items: flex-start; 14464 gap: 10px; 14465 max-width: 420px; 14466 margin: 0; 14467 > * { 14468 align-self: stretch; 14469 } 14470 > button { 14471 align-self: flex-start; 14472 } 14473 @media only screen and ${p.E0} { 14474 max-width: none; 14475 > button { 14476 align-self: stretch; 14477 } 14478 } 14479`;var Xe=n(19424),Ze=n(21493),et=n(79407);function tt({label:e,help:t,options:n,cookie:i,fallback:a,days:l=365,onSaved:s}){const d=(0,ee.WS)(),[c,p]=(0,o.J0)(()=>(0,Ee.Ri)(i)||a);return(0,r.Y)(u,{label:e,help:t,stack:!0,children:(0,r.Y)(et.R,{options:n,value:n.find(e=>e.value===c),onChange:e=>{Array.isArray(e)||(p(e.value),(0,Ee.TV)(i,e.value,l),s())},isSearchable:!1,bordered:!0,width:d?"100%":"200px",height:d?"44px":"40px"})})}function nt({label:e,help:t,words:n,read:i,write:a,onSaved:l}){const[s,d]=(0,o.J0)(i);return(0,r.Y)(g,{label:e,help:t,words:n,checked:s,onChange:e=>{d(e),a(e),l()}})}function rt(e,t,n){const r=(0,Ee.Ri)(t)||n;return e.find(e=>e.value===r)?.label??""}const ot="https://api.dotgg.gg",it=()=>encodeURIComponent(Je.Ay.TheGame);function at(e){return{url:`${ot}${e}`,headers:(0,Ee.z5)()}}const lt=e=>{const t="number"==typeof e?e:parseInt(String(e??0),10);return Number.isFinite(t)?t:0};function st(e){return e.token?{id:lt(e.id),label:String(e.label??""),token:String(e.token),createdAt:lt(e.created_at),lastUsedAt:lt(e.last_used_at),uses:lt(e.uses)}:null}function dt(e){return{links:(Array.isArray(e.tokens)?e.tokens:[e]).map(st).filter(e=>null!==e),max:null===e.max?null:void 0===e.max?1:lt(e.max)}}async function ct(e){const t=`/cgfw/exporttoken?game=${it()}`,n=await je.A.post(t,e,at(t));if(n.error)throw new Error(n.error_text||"Could not update your export link");return dt(n)}const pt=e=>ct(e?{action:"rotate",id:e}:{action:"rotate"});var ht=n(90748),ut=n(49889),gt=n(90033);const mt=e=>e instanceof Error?e.message:"Something went wrong. Try again.";function ft({onSaved:e}
14479){const[t,n]=o.Ay.useState(null),[i,a]=o.Ay.useState(""),[l,s]=o.Ay.useState(""),d=(0,ut.G)("tokens"),{open:c,sheet:p}=(0,gt.y)(),h=Ie.SA.collection.collectionExportEnable&&(0,Ee.x3)();if(o.Ay.useEffect(()=>{if(!h)return;let e=!0;return async function(){const e=`/cgfw/exporttoken?game=${it()}`,t=await je.A.get(e,void 0,at(e));if(t.error)throw new Error(t.error_text||"Could not load your export links");return dt(t)}().then(t=>{e&&n(t)}).catch(t=>{e&&a(mt(t))}),()=>{e=!1}},[h]),!h)return null;const g=t?.links??[],m=t?t.max:1,f=g.length>0&&(null===m||g.length<m);return(0,r.FD)(u,{label:g.length>1?"Permanent export links":"Permanent export link",stack:!0,help:(0,r.FD)(r.FK,{children:["A URL that always returns your current collection as CSV, with no sign-in, so spreadsheets and tools can pull it on a schedule. Anyone with the link can read your collection: treat it like a password.",i&&(0,r.Y)(kt,{$error:!0,children:i})]}),children:[0===g.length?(0,r.Y)(C.n,{variant:"secondary",disabled:!t&&!i,onAction:async()=>{n(await pt()),e("Link created")},busyLabel:"Creatingâ¦",errorText:mt,children:t||i?"Create link":"Loadingâ¦"}):(0,r.FD)(vt,{children:[g.map(t=>(0,r.Y)(xt,{link:t,showLabel:g.length>1||""!==t.label,onState:n,onSaved:e},t.id||t.token)),f&&(0,r.FD)(bt,{children:[(0,r.Y)(xe.pd,{value:l,maxLength:40,placeholder:"Name another link, e.g. Google Sheets","aria-label":"Name for a new export link",$variant:"text",onChange:e=>s(e.currentTarget.value)}),(0,r.Y)(C.n,{variant:"secondary",onAction:async()=>{const t=l.trim();if(!t)throw new Error("Give the link a name, like the tool that will use it.");n(await(e=>ct({action:"create",label:e}))(t)),s(""),e(`Link "${t}" created`)},busyLabel:"Addingâ¦",errorText:mt,children:"Add link"})]}),!f&&"number"==typeof d.cap&&d.capMoment(g.length)&&(0,r.Y)(ht.B,{allowance:"tokens",cap:d.cap,onOpen:()=>c("cap.tokens")})]}),p]})}function xt({link:e,showLabel:t,onState:n,onSaved:o}){const i=function(e,t=0){const n=t>0?`&binder_id=${t}`:"";return`${ot}/cgfw/exportcollection?game=${it()}&token=${encodeURIComponent(e)}${n}`}(e.token),a=e.label||"Default link";return(0,r.FD)(yt,{children:[t&&(0,r.Y)(wt,{children:a}),(0,r.Y)(xe.pd,{readOnly:!0,value:i,"aria-label":`Export link: ${a}`,$variant:"text",onFocus:e=>e.currentTarget.select()}),(0,r.FD)($t,{children:[(0,r.Y)(C.n,{variant:"secondary",onAction:()=>navigator.clipboard.writeText(i),doneLabel:"â Copied",errorText:"Couldn't copy. Select the link and copy it by hand.",children:"Copy"}),(0,r.Y)(C.n,{variant:"secondary",onAction:async()=>{window.confirm(`Regenerate "${a}"? Anything using the current link will stop working.`)&&(n(await pt(e.id||void 0)),o("New link made. The old one no longer works."))},busyLabel:"Regeneratingâ¦",errorText:mt,children:"Regenerate"}),(0,r.Y)(C.n,{variant:"secondary",onAction:async()=>{var t;window.confirm(`Revoke "${a}"? Anything using it will stop working.`)&&(n(await(t=e.id||void 0,ct(t?{action:"revoke",id:t}:{action:"revoke"}))),o("Link revoked"))},busyLabel:"Revokingâ¦",errorText:mt,children:"Revoke"})]}),e.lastUsedAt>0&&(0,r.FD)(kt,{children:["Fetched ",e.uses," ",1===e.uses?"time":"times",", last on ",new Date(1e3*e.lastUsedAt).toLocaleDateString(),"."]})]})}const vt=l.Ay.div` 14480 display: flex; 14481 flex-direction: column; 14482 gap: 14px; 14483 width: min(460px, 100%); 14484`,yt=l.Ay.div` 14485 display: flex; 14486 flex-direction: column; 14487 gap: 8px; 14488 && input { 14489 font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; 14490 font-size: 12px; 14491 } 14492`,wt=l.Ay.span` 14493 font-size: 12.5px; 14494 font-weight: 700; 14495 color: var(--theme-palette-color-1); 14496`,bt=l.Ay.div` 14497 display: flex; 14498 flex-wrap: wrap; 14499 gap: 8px; 14500 && input { 14501 flex: 1 1 220px; 14502 } 14503`,$t=l.Ay.div` 14504 display: flex; 14505 flex-wrap: wrap; 14506 gap: 8px; 14507`,kt=l.Ay.span` 14508 display: block; 14509 margin-top: 4px; 14510 color: ${e=>e.$error?h.Q.danger:"var(--theme-palette-color-3)"}; 14511`;var Yt=n(45952),At=n(75370),Ct=n(81616);const Ft=()=>{const e=(0,Ct.h3)(),[t,n]=o.Ay.useState(null),i=t??(0,At.ef)(e);return(0,At.cl)()&&(0,Ee.x3)()?(0,r.Y)(g,{label:"Paper mode",help:i?"On: each copy counts once across your Physical decks (new decks are; mark taken-apart ones Theorycraft), so a playset can't cover two decks at once. Now answering: can I sleeve all of these at the same time?":"Off
14511: every deck is measured against your whole collection on its own. Now answering: could I build this deck?",words:["Off","On"],checked:i,onChange:async e=>{const t="1"===await async function(e,t){const n=`/cgfw/setusersetting?game=${encodeURIComponent(Je.Ay.TheGame)}`,r=await je.A.post(n,{key:"paper_mode",value:t},{url:`https://api.dotgg.gg${n}`,headers:(0,Ee.z5)()});if(r.error)throw new Error(r.error_text||"Failed to save setting");return r.value??t}(0,e?"1":"0");n(t),(0,At.Vr)(t),(0,Yt.PP)()},errorText:"Couldn't save paper mode. Try again."}):null};function Dt(){const e=$(),t=()=>e.saved();return(0,r.FD)(b.un,{id:"collection",children:[(0,r.Y)(k,{rows:!0,title:"Collection",status:e.status}),(0,r.Y)(u,{label:"Binders",help:"Create, color, reorder and share separate binders for your collection",children:(0,r.Y)(Xe.i,{})}),(0,r.Y)(u,{label:"Import / export",help:"Import cards from CSV, or export your collection for a backup",children:(0,r.Y)(Ze.I_,{})}),(0,r.Y)(ft,{onSaved:t=>e.saved(t)}),(0,r.Y)(Ft,{}),(0,r.Y)(nt,{label:"Unrestricted mode",help:"Add cards even when their foil / non-foil availability is unconfirmed",words:["Off","On"],read:()=>"true"===(0,Ee.Ri)("collection-unrestricted"),write:e=>(0,Ee.TV)("collection-unrestricted",e?"true":"false",365),onSaved:t}),(0,r.Y)(nt,{label:"Statistics panel",help:"Collection statistics and completion progress",words:["Hidden","Shown"],read:()=>"true"!==(0,Ee.Ri)("collection-hide-stats"),write:e=>(0,Ee.TV)("collection-hide-stats",e?"false":"true",365),onSaved:t})]})}const St={table:"Table",text:"Text",image:"Images",condtext:"Condensed text",condimage:"Condensed images"};function It(){return(Ie.SA.cards.cardImageModes||["table","image"]).map(e=>({value:e,label:St[e]??e}))}const zt=[{value:"both",label:"Count & playset"},{value:"count",label:"Count only"},{value:"playset",label:"Playset only"},{value:"none",label:"Hidden"}];function Tt(){const e=Ie.SA.cards.priceProviders??[];return{options:e.map(e=>({value:e.id,label:`${e.name} (${e.currency})`})),cookie:e[0]?.cookieName||"price-provider",fallback:Ie.SA.cards.defaultPriceProvider||"tcgplayer",currency:t=>e.find(e=>e.id===t)?.currency??""}}function Et({collectionRows:e,onChange:t}){const n=$(),o=()=>{n.saved(),t()},i=Tt(),a=e&&!0===Ie.SA.cards.showPrices;return e||0!==i.options.length?(0,r.FD)(b.un,{id:"cards",children:[(0,r.Y)(k,{rows:!0,title:"Cards",meta:"Saved in this browser",status:n.status}),e&&(0,r.FD)(r.FK,{children:[(0,r.Y)(tt,{label:"Card display",help:"How cards show in lists and collections",options:It(),cookie:"collection-mode",fallback:Ie.SA.cards.defaultImageMode||"image",onSaved:o}),(0,r.Y)(tt,{label:"Collection counts on cards",help:"What the numbers on a card say",options:zt,cookie:"collection-display-mode",fallback:"both",onSaved:o})]}),a&&(0,r.Y)(nt,{label:"Price listing tables",help:"The big tables on price pages",words:["Hidden","Shown"],read:()=>"true"!==(0,Ee.Ri)("hidebiglisting"),write:e=>(0,Ee.TV)("hidebiglisting",e?"false":"true",365),onSaved:o}),i.options.length>0&&(0,r.Y)(tt,{label:"Price source",help:`Where prices for ${Ie.SA.core.gameNameForTitle||"this game"} come from`,options:i.options,cookie:i.cookie,fallback:i.fallback,onSaved:o})]}):null}const Lt=[{value:"image",label:"Images"},{value:"text",label:"Text list"},{value:"condtext",label:"Condensed text"},{value:"condimage",label:"Condensed images"}],Mt=[{value:"type",label:"By type"},{value:"cardtype",label:"By card type"},{value:"cost",label:"By cost"},{value:"color",label:"By color"},{value:"rarity",label:"By rarity"},{value:"none",label:"No grouping"}],Nt=[{value:"cost",label:"By cost"},{value:"name",label:"By name"},{value:"type",label:"By type"},{value:"rarity",label:"By rarity"},{value:"id",label:"By set number"},{value:"default",label:"Default order"}],Pt=[{value:"none",label:"None"},{value:"collection",label:"Collection info"},{value:"changes",label:"Recent changes"}];function Ot(){const e=$(),t=()=>e.saved(),n=window.innerWidth>=700;return(0,r.FD)(b.un,{id:"decks",children:[(0,r.Y)(k,{rows:!0,title:"Decks",meta:"Saved in this browser",status:e.status}),(0,r.Y)(tt,{label:"Deck display",help:"How cards show in deck views",options:Lt,cookie:"deck-mode",fallback:n?Ie.SA.cards.defaultImageMode||"image":"text",days:30,onSaved:t}),(0,r.Y)(tt,{label:"Card grouping",help:"How cards are grouped in a deck",options:Mt,cookie:"deck-group",fallback:Ie.SA.decks.defaultGroupingCriteria||"type",days:30,onSaved:t}),(0,r.Y)(tt,{label:"Card sorting",help:"The order inside each group",options:Nt,cookie:"deck-sort",fallback:Ie.SA.decks.defaultSortingCriteria||"cost",days:30,onSaved:t}),(0,r.Y)(tt,{label:"Card info overlay",help:"Extra info drawn on cards in deck views",options:Pt,cookie:"deck-detail
14511s-mode",fallback:"none",days:30,onSaved:t}),(0,r.Y)(nt,{label:"Layout options panel",help:"Open by default in deck views",words:["Hidden","Shown"],read:()=>{const e=(0,Ee.Ri)("tools-state");return e?"shown"===e:n},write:e=>(0,Ee.TV)("tools-state",e?"shown":"hidden",30),onSaved:t})]})}function _t(e){const t=Ie.SA.core.userProfileTabs;return!t||t.includes(e)}function Rt(){const e=_t("collection"),[,t]=(0,o.J0)(0);return(0,A.o)("display","line",function(e){const t=Tt();return[e?rt(It(),"collection-mode",Ie.SA.cards.defaultImageMode||"image"):"",e?rt(zt,"collection-display-mode","both").toLowerCase():"",t.options.length?t.currency((0,Ee.Ri)(t.cookie)||t.fallback):""].filter(Boolean).join(" · ")}(e)||null),(0,r.FD)(r.FK,{children:[(0,r.Y)(Et,{collectionRows:e,onChange:()=>t(e=>e+1)}),_t("decks")&&(0,r.Y)(Ot,{}),e&&(0,r.Y)(Dt,{})]})}var jt=n(14330),Jt=n(90023);const Bt={everyone:"Anyone can write to you. People you don't know land in Requests until you accept.",known:"Only people who already know you: you've messaged them, traded with them, or follow them.",nobody:"Nobody can start a new conversation with you. Existing conversations keep working."},Kt={everyone:"anyone can message",known:"people you know",nobody:"nobody can message"},Wt=[{value:"everyone",label:"Everyone"},{value:"known",label:"People I know"},{value:"nobody",label:"Nobody"}],Ut=()=>{const e=(0,ee.WS)(),[t,n]=(0,o.J0)(null),[i,a]=(0,o.J0)(!1),l=$();if((0,A.o)("notifications","dm",t?Kt[t]:null,1),(0,o.vJ)(()=>{if(!(0,Ee.x3)())return;let e=!0;return(0,jt.hY)().then(t=>{e&&n(t)}).catch(()=>{e&&a(!0)}),()=>{e=!1}},[]),!(0,Ee.x3)())return null;const s=t&&(0,r.Y)(Gt,{children:(0,r.Y)(Jt.$,{ariaLabel:"Who can message me",fill:!0,raised:!0,value:t,onChange:e=>{(async e=>{const r=t;n(e),l.busy();try{await(0,jt.ds)(e),l.saved()}catch{n(r),l.failed("Couldn't save. Try again.")}})(e)},options:Wt})}),d=i?"Couldn't load this setting. Reload to try again.":t?Bt[t]:"Loadingâ¦";return(0,r.Y)(Qt,{id:"messages",children:e?(0,r.FD)(r.FK,{children:[(0,r.Y)(k,{title:"Who can message me",status:l.status,statusEnd:!0}),s,(0,r.Y)(Ht,{children:d})]}):(0,r.FD)(r.FK,{children:[(0,r.Y)(k,{title:"Messages",status:l.status}),(0,r.Y)(u,{label:"Who can message me",help:d,children:s})]})})},Qt=(0,l.Ay)(b.XY)` 14512 @media only screen and ${p.E0} { 14513 order: -1; 14514 } 14515`,Gt=l.Ay.div` 14516 width: 330px; 14517 max-width: 100%; 14518`,Ht=(0,l.Ay)(b.c5)` 14519 margin: 10px 0 0; 14520`;var qt=n(33560),Vt=n(93015),Xt=n(1748);const Zt=l.Ay.div` 14521 display: flex; 14522 flex-direction: column; 14523 gap: 16px; 14524 /* The hub mounts this in a wrapping flex row (ContainerContent), where it 14525 would shrink to its content: the phone list came out 238px wide. */ 14526 width: 100%; 14527 min-width: 0; 14528 padding: 8px 0 24px; 14529`,en=l.Ay.a` 14530 display: inline-flex; 14531 align-items: center; 14532 align-self: flex-start; 14533 gap: 6px; 14534 height: 32px; 14535 padding: 0 12px 0 6px; 14536 box-sizing: border-box; 14537 border-radius: 6px; 14538 box-shadow: inset 0 0 0 1px var(--theme-palette-color-5); 14539 font-size: 12.5px; 14540 font-weight: 600; 14541 color: var(--theme-palette-color-4); 14542 text-decoration: none; 14543 &:hover { 14544 background: ${h.Q.hoverFill}; 14545 box-shadow: inset 0 0 0 1px var(--theme-palette-color-3); 14546 } 14547 &:focus-visible { 14548 ${h.I} 14549 } 14550 @media only screen and ${p.E0} { 14551 height: ${44}px; 14552 font-size: 13.5px; 14553 } 14554`,tn=l.Ay.h1` 14555 margin: 0; 14556 font-size: 28px; 14557 font-weight: 700; 14558 line-height: 1.15; 14559 letter-spacing: -0.01em; 14560 color: var(--theme-palette-color-4); 14561 @media only screen and ${p.E0} { 14562 font-size: 24px; 14563 } 14564 ${e=>e.$srOnly?"position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;":""} 14565`,nn=l.Ay.div` 14566 display: grid; 14567 grid-template-columns: 248px minmax(0, 800px); 14568 gap: 32px; 14569 align-items: start; 14570 @media (max-width: 960px) { 14571 grid-template-columns: 208px minmax(0, 1fr); 14572 gap: 20px; 14573 } 14574`,rn=l.Ay.nav` 14575 position: sticky; 14576 top: ${72}px; 14577 display: flex; 14578 flex-direction: column; 14579 gap: 4px; 14580 min-width: 0; 14581`,on=l.Ay.div` 14582 padding: 4px 12px 6px; 14583 font-size: 10.5px; 14584 font-weight: 800; 14585 letter-spacing: 0.08em; 14586 text-transform: uppercase; 14587 color: ${h.Q.muted}; 14588 & ~ & { 14589 padding-top: 14px; 14590 } 14591`,an=l.Ay.a` 14592 display: flex; 14593 flex-direction: column; 14594 justify-content: center; 14595 min-height: ${e=>e.$danger?40:48}px; 14596 padding: 6px 12px; 14597 box-sizing: border-box; 14598 border-radius: 6px; 14599 text-decoration: none; 14600 background: ${e=>e.$on?"color-mix(in srgb, var(--theme-palette-color-8) 75%, transparent)":"none"}; 14601 box-shadow: ${e=>e.$on?"inset 3px 0 0 var(--theme-palette-color-1)":"none"}; 14602 transition: background 120ms ease; 14603 &:hover { 14604 background: color-mix(in srgb, var(--theme-palette-color-8) ${e=>e.$on?75:45}%, transparent); 14605 } 14606 &:focus-visible { 14607 ${h.I} 14608 } 14609`,ln=l.Ay.span` 14610 font-size: 14px; 14611 font-weight: 700; 14612 line-height: 1.3; 14613 color: ${e=>e.$danger?h.Q.danger:e.$on?"var(--theme-palette-color-4)":"var(--theme-palette-color-3)"}; 14614`,sn=l.Ay.span` 14615 overflow: hidden; 14616 font-size: 12px; 14617 line-height: 1.35; 14618 white-space: nowrap; 14619 text-overflow: ellipsis; 14620 color: ${h.Q.muted}; 14621`,dn=l.Ay.div` 14622 height: 1px; 14623 margin: 10px 12px; 14624 background: ${h.Q.rowRule}; 14625`,cn=l.Ay.div` 14626 margin: 12px; 14627 padding: 12px; 14628 border-radius: 6px; 14629 box-shadow: inset 0 0 0 1px ${h.Q.rowRule}; 14630 font-size: 12px; 14631 line-height: 1.5; 14632 color: var(--theme-palette-color-3); 14633 a { 14634 font-weight: 600; 14635 color: var(--theme-palette-color-4); 14636 text-decoration: none; 14637 } 14638 a:hover { 14639 text-decoration: underline; 14640 } 14641`,pn=l.Ay.div` 14642 display: flex; 14643 flex-direction: column; 14644 gap: 44px; 14645 min-width: 0; 14646`,hn=l.Ay.section` 14647 display: flex; 14648 flex-direction: column; 14649 gap: 16px; 14650 min-width: 0; 14651 scroll-margin-top: ${76}px; 14652 &[hidden] { 14653 display: none; 14654 } 14655`,un=l.Ay.div` 14656 display: flex; 14657 flex-direction: column; 14658 gap: 4px; 14659 /* A phone page may lift a card above its siblings (order: -1); the head stays first. */ 14660 @media only screen and ${p.E0} { 14661 order: -2; 14662 } 14663`,gn=l.Ay.h2` 14664 margin: 0; 14665 font-size: 20px; 14666 font-weight: 700; 14667 line-height: 1.25; 14668 color: ${e=>e.$danger?h.Q.danger:"var(--theme-palette-color-4)"}; 14669 @media only screen and ${p.E0} { 14670 font-size: 22px; 14671 } 14672`,mn=l.Ay.p` 14673 margin: 0; 14674 font-size: 13px; 14675 line-height: 1.5; 14676 color: var(--theme-palette-color-3); 14677`,fn=l.Ay.a` 14678 display: inline-flex; 14679 align-items: center; 14680 gap: 2px; 14681 align-self: flex-start; 14682 min-height: ${44}px; 14683 padding-right: 8px; 14684 font-size: 14px; 14685 font-weight: 600; 14686 color: var(--theme-palette-color-1); 14687 text-decoration: none; 14688 order: -3; 14689 &:focus-visible { 14690 ${h.I} 14691 } 14692`,xn=l.Ay.div` 14693 padding: 6px 4px 0; 14694 font-size: 11px; 14695 font-weight: 800; 14696 letter-spacing: 0.08em; 14697 text-transform: uppercase; 14698 color: ${h.Q.muted}; 14699`,vn=l.Ay.div` 14700 overflow: hidden; 14701 border-radius: 8px; 14702 box-shadow: inset 0 0 0 1px var(--theme-palette-color-5); 14703 [data-phone-row]:last-child { 14704 border-bottom: none; 14705 } 14706`,yn=l.Ay.a` 14707 display: flex; 14708 align-items: center; 14709 gap: 12px; 14710 min-height: 68px; 14711 padding: 12px 14px; 14712 box-sizing: border-box; 14713 border-radius: 8px; 14714 background: var(--theme-palette-color-8); 14715 box-shadow: inset 0 0 0 1px var(--theme-palette-color-5); 14716 text-decoration: none; 14717 color: var(--theme-palette-color-3); 14718 &:focus-visible { 14719 ${h.I} 14720 } 14721 img { 14722 flex: none; 14723 width: 44px; 14724 height: 44px; 14725 border-radius: 50%; 14726 object-fit: cover; 14727 background: var(--theme-palette-color-7); 14728 } 14729`,wn=l.Ay.span` 14730 display: flex; 14731 flex: 1; 14732 flex-direction: column; 14733 min-width: 0; 14734 font-size: 13px; 14735 b { 14736 overflow: hidden; 14737 font-size: 15px; 14738 font-weight: 700; 14739 white-space: nowrap; 14740 text-overflow: ellipsis; 14741 color: var(--theme-palette-color-4); 14742 } 14743`,bn=l.Ay.span` 14744 color: ${h.Q.danger}; 14745`,$n=()=>window.location.hostname.replace(/^www\./,""),kn=(e,t)=>e.filter(e=>e.scope===t),Yn=({g:e,on:t,onPick:n})=>{const o=(0,A.r)(e.id),i="danger"===e.scope;return(0,r.FD)(an,{href:`#${e.id}`,"data-native":!0,$on:t,$danger:i,"aria-current":t?"location":void 0,onClick:t=>{t.preventDefault(),n(e.id)},children:[(0,r.Y)(ln,{$on:t,$danger:i,children:e.label}),o&&!i&&(0,r.Y)(sn,{children:o})]})},An=({groups:e,active:t,onPick:n,displayElsewhere:o})=>{const i=kn(e,"site");return(0,r.FD)(rn,{"aria-label":"Settings sections",children:[(0,r.Y)(on,{children:"DotGG account · every site"}),kn(e,"account").map(e=>(0,r.Y)(Yn,{g:e,on:t===e.id,onPick:n},e.id)),i.length>0&&(0,r.FD)(on,{children:[$n()," only"]}),i.map(e=>(0,r.Y)(Yn,{g:e,on:t===e.id,onPick:n},e.id)),(0,r.Y)(dn,{}),kn(e,"danger").map(e=>(0,r.Y)(Yn,{g:e,on:t===e.id,onPick:n},e.id)),o&&(0,r.Y)(cn,{children:o})]})},Cn=({g:e,onOpen:t})=>{const n=(0,A.r)(e.id),o="danger"===e.scope;return(0,r.Y)(Xt.jP,{dense:!0,title:o?(0,r.Y)(bn,{children:e.label}):e.label,meta:n&&!o?[n]:void 0,action:(0,r.Y)(Xt.g7,{}),href:`#${e.id}`,onActivate:n=>{n.preventDefault(),t(e.id)}})},Fn=({groups:e,userData:t,onOpen:n})=>{const o=kn(e,"site"),i=t.user;return(0,r.FD)(r.FK,{children:[(0,r.FD)(yn,{href:"#profile","data-native":!0,onClick:e=>{e.preventDefault(),n("profile")},children:[(0,r.Y)("img",{src:(0,me.T)(i.usermeta?.avatar),alt:"",width:44,height:44}),(0,r.FD)(wn,{children:[(0,r.Y)("b",{children:i.nickname}),(0,r.Y)("span",{children:"Edit profile"})]}),(0,r.Y)(Xt.g7,{})]}),(0,r.Y)(xn,{children:"DotGG account · every site"}),(0,r.Y)(vn,{children:kn(e,"account").map(e=>(0,r.Y)(Cn,{g:e,onOpen:n},e.id))}),o.length>0&&(0,r.FD)(r.FK,{children:[(0,r.FD)(xn,{children:[$n()," only"]}),(0,r.Y)(vn,{children:o.map(e=>(0,r.Y)(Cn,{g:e,onOpen:n},e.id))})]}),(0,r.Y)(vn,{children:kn(e,"danger").map(e=>(0,r.Y)(Cn,{g:e,onOpen:n},e.id))})]})},Dn=({def:e,subtitle:t,hidden:n,onBack:o,children:i})=>(0,r.FD)(hn,{id:e.id,hidden:n,"aria-labelledby":`${e.id}-title`,children:[o&&(0,r.FD)(fn,{href:`${window.location.pathname}${window.location.search}`,"data-native":!0,onClick:e=>{e.preventDefault(),o()},children:[(0,r.Y)(a.gu,{size:18}),"Settings"]}),(0,r.FD)(un,{children:[(0,r.Y)(gn,{id:`${e.id}-title`,$danger:"danger"===e.scope,children:e.label}),t&&(0,r.Y)(mn,{children:t})]}),i]}),Sn={thread:"Comment thread",user:"Player",archetype:"Archetype",tournaments:"Tourn
14745aments",news:"News"},In={user:"A bell row when they publish a deck",archetype:"New public decks, grouped",tournaments:"One row when results are posted",thread:"New comments, grouped",news:"A bell row when a new article is published"},zn={user:["M20 21a8 8 0 0 0-16 0","M12 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8z"],archetype:[],tournaments:["M8 21h8","M12 17v4","M7 4h10v5a5 5 0 0 1-10 0z"],thread:[],news:["M4 4h16v16H4z","M8 8h8","M8 12h8"]};function Tn({kind:e}){return"archetype"===e?(0,r.Y)(a.sm,{size:16}):"thread"===e?(0,r.Y)(a.pj,{size:16}):(0,r.Y)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:zn[e].map(e=>(0,r.Y)("path",{d:e},e))})}function En(e){if(!e.game)return"every site";try{return new URL(e.url).hostname.replace(/^www\./,"")}catch{return e.game}}function Ln(){const{rows:e,status:t}=(0,Vt.ku)(),n=e.length;if((0,A.o)("notifications","follows","ready"===t?`${n} follow${1===n?"":"s"}`:null,0),!(0,Ee.x3)())return null;const o=Je.Ay.TheGame.toLowerCase(),i=$n(),a={type:"news",game:o,key:o},l=e.some(e=>(0,qt.ZC)(e)===(0,qt.ZC)(a));return(0,r.FD)(b.un,{id:"following",children:[(0,r.Y)(k,{rows:!0,title:"Following",meta:"ready"===t?`${n} topic${1===n?"":"s"}`:void 0}),"failed"===t&&(0,r.Y)(b.c5,{role:"alert",children:"Couldn't load what you follow. Reload to try again."}),"loading"===t&&(0,r.Y)(b.c5,{children:"Loading what you followâ¦"}),"ready"===t&&0===n&&(0,r.Y)(b.c5,{children:"You don't follow anything yet. Look for the Follow buttons on players' profiles, archetype pages, tournaments and comment threads."}),e.map(e=>(0,r.FD)(Mn,{children:[(0,r.Y)(Nn,{children:(0,r.Y)(Tn,{kind:e.topic_type})}),(0,r.FD)(Pn,{children:[(0,r.FD)(On,{children:[e.url?(0,r.Y)(_n,{href:e.url,children:e.label||e.topic_key}):(0,r.Y)(_n,{as:"span",children:e.label||e.topic_key}),(0,r.Y)(Rn,{children:Sn[e.topic_type]??e.topic_type})]}),(0,r.FD)(Jn,{children:[(0,r.FD)(jn,{children:[Sn[e.topic_type]??e.topic_type," · "]}),In[e.topic_type]??"Updates in your bell"," · ",En(e)]})]}),(0,r.Y)(C.n,{variant:"secondary",onAction:()=>(0,Vt.So)({type:e.topic_type,game:e.game,key:e.topic_key},!1,"",""),errorText:"Couldn't unfollow. Try again.",children:"Unfollow"})]},(0,qt.ZC)(e))),""!==o&&"ready"===t&&!l&&(0,r.FD)(Mn,{$suggest:!0,children:[(0,r.Y)(Nn,{$accent:!0,children:(0,r.Y)(Tn,{kind:"news"})}),(0,r.FD)(Pn,{children:[(0,r.Y)(On,{children:(0,r.FD)(_n,{as:"span",children:["News on ",i]})}),(0,r.Y)(Jn,{children:"A bell row when a new article is published here"})]}),(0,r.Y)(C.n,{onAction:()=>(0,Vt.So)(a,!0,`News on ${i}`,Je.Ay.BASE_URL),errorText:"Couldn't follow. Try again.",children:"+ Follow"})]})]})}const Mn=l.Ay.div` 14746 display: grid; 14747 grid-template-columns: 36px minmax(0, 1fr) auto; 14748 gap: 12px; 14749 align-items: center; 14750 margin: 0 -20px; 14751 padding: 10px 20px; 14752 border-top: 1px solid ${h.Q.rowRule}; 14753 ${e=>e.$suggest?`background: ${h.Q.threadBg}; margin-bottom: -4px; border-radius: 0 0 7px 7px;`:""} 14754 @media only screen and ${p.E0} { 14755 grid-template-columns: minmax(0, 1fr) auto; 14756 gap: 10px; 14757 min-height: 64px; 14758 margin: 0 -14px; 14759 padding: 6px 8px 6px 14px; 14760 ${e=>e.$suggest?"margin-bottom: -2px;":""} 14761 } 14762`,Nn=l.Ay.span` 14763 display: inline-flex; 14764 align-items: center; 14765 justify-content: center; 14766 width: 36px; 14767 height: 36px; 14768 border-radius: 8px; 14769 background: ${e=>e.$accent?"color-mix(in srgb, var(--theme-palette-color-1) 14%, transparent)":"var(--theme-palette-color-7)"}; 14770 color: ${e=>e.$accent?"var(--theme-palette-color-1)":"var(--theme-palette-color-3)"}; 14771 @media only screen and ${p.E0} { 14772 display: none; 14773 } 14774`,Pn=l.Ay.div` 14775 display: flex; 14776 flex-direction: column; 14777 gap: 2px; 14778 min-width: 0; 14779`,On=l.Ay.div` 14780 display: flex; 14781 align-items: baseline; 14782 gap: 8px; 14783 min-width: 0; 14784`,_n=l.Ay.a` 14785 overflow: hidden; 14786 font-size: 14px; 14787 font-weight: 700; 14788 white-space: nowrap; 14789 text-overflow: ellipsis; 14790 color: var(--theme-palette-color-4); 14791 text-decoration: none; 14792 &:hover { 14793 text-decoration: underline; 14794 } 14795 @media only screen and ${p.E0} { 14796 font-size: 15px; 14797 font-weight: 600; 14798 } 14799`,Rn=l.Ay.span` 14800 flex: none; 14801 font-size: 11px; 14802 font-weight: 700; 14803 letter-spacing: 0.04em; 14804 text-transform: uppercase; 14805 color: ${h.Q.muted}; 14806 @media only screen and ${p.E0} { 14807 display: none; 14808 } 14809`,jn=l.Ay.span` 14810 display: none; 14811 @media only screen and ${p.E0} { 14812 display: inline; 14813 } 14814`,Jn=l.Ay.div` 14815 overflow: hidden; 14816 font-size: 12.5px; 14817 white-space: nowrap; 14818 text-overflow: ellipsis; 14819 color: var(--theme-palette-color-3); 14820 @media only screen and ${p.E0} { 14821 color: ${h.Q.muted}; 14822 } 14823`;var Bn=n(60220),Kn=n(24466),Wn=n(15757);const Un=["January","February","March","April","May","June","July","August","September","October","November","December"],Qn=e=>"string"==typeof e?e:"number"==typeof e?String(e):"",Gn=e=>"number"==typeof e?e:null,Hn=e=>"object"==typeof e&&null!==e,qn=()=>{const e=!0===Ie.SA.decks.metaAlerts&&(0,Ee.x3)(),[t,n]=(0,o.J0)(null),[i,a]=(0,o.J0)(!1),[l,d]=(0,o.J0)(!1),{open:c,sheet:p}=(0,gt.y)();if((0,o.vJ)(()=>
14823{if(!e)return;let t=!0;return(0,Bn.q)(Je.Ay.TheGame).then(e=>{if(!t)return;n(e);const r=e.alerts.reduce((e,t)=>Math.max(e,t.id),0);r>e.seen_id&&(0,Bn.s)(Je.Ay.TheGame,r).catch(()=>{})}).catch(()=>{t&&a(!0)}),()=>{t=!1}},[e]),!e)return null;const h=!0===t?.premium,g=h?null:(0,r.FD)(nr,{children:["Premium would have told you on day one.",(0,r.Y)(Wn.wd,{surface:"alerts.sameday",size:20,onOpen:()=>c("alerts.sameday")})]});return(0,r.FD)(r.FK,{children:[(0,r.Y)(u,{label:"Meta alerts",help:h?"A tier change, a top-10 entry, a big mover, or your own deck's archetype moving, the day it happens.":"Free accounts get a monthly recap; Premium gets every move the day it happens."}),i&&(0,r.Y)(b.c5,{children:"Alerts couldn't load right now."}),t&&0===t.alerts.length&&(0,r.FD)(Vn,{children:[(0,r.Y)(b.c5,{children:h?"Nothing yet. The first alert lands the day the meta moves.":"Nothing yet. The first recap lands on the 1st of a month with something to say."}),g]}),t?.alerts.slice(0,l?void 0:5).map(e=>{const n=function(e){const t=e.payload,n=Qn(t.name),r=Qn(t.slug),o=r&&"recap"!==e.kind?(0,Kn.Xt)(r):void 0;switch(e.kind){case"tier":return{text:`${n} moved ${Qn(t.from)} â ${Qn(t.to)}`,detail:Qn(t.reason),href:o};case"top10":{const e="in"===t.direction,r=Gn(t.place),i=Gn(t.players);return{text:`${n} ${e?"entered":"left"} the top 10`,detail:e&&r?`${(0,Kn.IE)(r)}${i?` of ${i}`:""}, ${Qn(t.event)}`:"",href:o}}case"mover":{const e=Gn(t.share_delta)??0,r=Gn(t.share);return{text:`${n} is moving: ${(0,Kn._9)(e)} points in 7 days`,detail:null!==r?`now ${r}% of the field`:"",href:o}}case"mydeck":return{text:`Your ${n} deck: ${"tier"===t.event?`the archetype moved ${Qn(t.from)} â ${Qn(t.to)}`:`it ${"in"===t.direction?"entered":"left"} the top 10`}`,detail:Qn(t.reason),href:o};default:{const e=Qn(t.month),n=Un[Number(e.slice(5,7))-1]??e,r=Array.isArray(t.highlights)?t.highlights.filter(Hn).map(e=>`${Qn(e.name)} ${Qn(e.from)}â${Qn(e.to)}`).join(" · "):"";return{text:`${n} in review: ${Gn(t.tier_moves)??0} tier moves, ${Gn(t.top10)??0} top-10 changes, ${Gn(t.movers)??0} big movers`,detail:r}}}}(e);return(0,r.FD)(Vn,{children:[(0,r.FD)(Xn,{children:[e.id>t.seen_id&&(0,r.Y)(tr,{title:"New"}),n.href?(0,r.Y)("a",{href:n.href,children:n.text}):n.text,(0,r.Y)(er,{children:(o=e.created_at,new Date(1e3*o).toLocaleDateString(void 0,{month:"short",day:"numeric"}))})]}),n.detail&&(0,r.Y)(Zn,{children:n.detail}),"recap"===e.kind&&g]},e.id);var o}),t&&t.alerts.length>5&&!l&&(0,r.Y)(Vn,{children:(0,r.FD)(s.QW,{type:"button",onClick:()=>d(!0),children:["Show all ",t.alerts.length," alerts"]})}),p]})},Vn=l.Ay.div` 14824 padding: 10px 0; 14825 border-bottom: 1px solid ${h.Q.rowRule}; 14826 ${b.c5} { 14827 margin: 0; 14828 } 14829`,Xn=l.Ay.div` 14830 font-size: 14px; 14831 font-weight: 600; 14832 line-height: 1.4; 14833 color: var(--theme-palette-color-4); 14834 a { 14835 color: inherit; 14836 text-decoration: none; 14837 } 14838 a:hover { 14839 text-decoration: underline; 14840 } 14841`,Zn=l.Ay.div` 14842 margin-top: 2px; 14843 font-size: 13px; 14844 color: ${h.Q.muted}; 14845`,er=l.Ay.span` 14846 margin-left: 8px; 14847 font-size: 11.5px; 14848 font-weight: 400; 14849 color: ${h.Q.muted}; 14850 white-space: nowrap; 14851`,tr=l.Ay.span` 14852 display: inline-block; 14853 width: 8px; 14854 height: 8px; 14855 margin-right: 8px; 14856 border-radius: 50%; 14857 background: ${h.Q.unread}; 14858 vertical-align: middle; 14859`,nr=l.Ay.div` 14860 display: flex; 14861 flex-wrap: wrap; 14862 align-items: center; 14863 gap: 8px; 14864 margin-top: 6px; 14865 font-size: 12.5px; 14866 color: var(--theme-palette-color-3); 14867`,rr=()=>{};function or(){return(0,r.FD)(r.FK,{children:[(0,r.Y)(Ln,{}),(0,r.Y)(Ut,{}),(0,r.FD)(b.un,{id:"alerts",children:[(0,r.Y)(k,{rows:!0,title:"Bell"}),(0,r.Y)(qn,{}),(0,r.Y)(g,{label:"Also email me",tag:"Coming later",help:"A daily digest of what's in your bell",words:["Off","On"],checked:!1,disabled:!0,onChange:rr})]})]})}var ir=n(20347),ar=n(60083),lr=n(70576),sr=n(72225),dr=n(22729),cr=n(62530);const pr=l.Ay.div` 14868 display: flex; 14869 flex-direction: column; 14870 gap: 10px; 14871 margin-top: 12px; 14872 padding: 12px 14px; 14873 border: 1px dashed var(--theme-palette-color-5, #434a56); 14874 border-radius: 8px; 14875`,hr=l.Ay.div` 14876 display: flex; 14877 align-items: baseline; 14878 gap: 10px; 14879 flex-wrap: wrap; 14880`,ur=l.Ay.span` 14881 font-size: 13px; 14882 font-weight: 700; 14883 color: var(--theme-palette-color-4, #ffffff); 14884`,gr=l.Ay.span` 14885 font-size: 9.5px; 14886 font-weight: 700; 14887 letter-spacing: 0.08em; 14888 text-transform: uppercase; 14889 padding: 1px 6px; 14890 border-radius: 3px; 14891 border: 1px solid var(--theme-palette-color-5, #6c7581); 14892 color: var(--theme-palette-color-3, #b0bac5); 14893`,mr=l.Ay.div` 14894 font-size: 11.5px; 14895 line-height: 1.5; 14896 color: var(--theme-palette-color-3, #b0bac5); 14897`,fr=l.Ay.div` 14898 display: flex; 14899 align-items: center; 14900 gap: 12px; 14901 flex-wrap: wrap; 14902`,xr=l.Ay.span` 14903 font-size: 11.5px; 14904 color: ${e=>e.$bad?h.Q.danger:"var(--theme-palette-color-3, #b0bac5)"}; 14905`;function vr(){const e=(0,Ct.h3)(),t=e?.user?.premiumState,[n,i]=(0,o.J0)(null),[a,l]=(0,o.J0)(!1),[s,d]=(0,o.J0)(null),c=n??t??null;return c?.can_switch?(0,r.FD)(pr,{children:[(0,r.FD)(hr,{children:[(0,r.Y)(ur,{children:"View the site as"}),(0,r.Y)(gr,{children:"Staff"})]}),(0,r.Y)(mr,{children:"Changes what pages SHOW you, not what your account owns. Everything gated â the meta page's win rates, best performers, matchups â follows this. Ads and billing do not."}),(0,r.FD)(fr,{children:[(0,r.Y)(Jt.$,{ariaLabel:"Premium view",value:c.view,onChange:e=>{l(!0),d(null),(0,fe.pm)(e).then(e=>{!e.error&&e.state?i(e.state):d(e.error_text??"Could not change the view.")}).catch(()=>d("Could not reach the server.")).finally(()=>l(!1))},options:[{value:"auto",label:c.holds?"My account (premium)":"My account (free)"},{value:"premium",label:"Premium"},{value:"free",label:"Free"}]}),s?(0,r.Y)(xr,{$bad:!0,children:s}):(0,r.Y)(xr,{children:a?"Savingâ¦":`Serving the ${c.premium?"premium":"free"} page${"auto"===c.view?"":" (overridden)"}.`})]})]}):null}const yr=["Every matchup","The whole top 10","Win-rate ranges","Bu
14905ilt for me","90-day collection value","No ads"],wr=()=>{const e=(0,Ct.h3)()?.user,t=(0,cr.WX)(e),n=e?.sitePremium??[],o=(0,sr.zf)(!!e&&!t),i=(0,lr.K_)(o,"settings.premium"),a=(0,lr.tA)(o),l=[...i.filter(e=>e.key===a),...i.filter(e=>e.key!==a)];return(0,A.o)("premium","plan",e?t?"Active on every site":"Not subscribed · see plans":null),(0,r.FD)(b.XY,{id:"premium-plan",children:[(0,r.Y)(k,{title:"DotGG Premium",status:t?{tone:"success",text:"Active"}:null}),(0,r.Y)(dr._,{}),t?(0,r.FD)(r.FK,{children:[(0,r.Y)(b.c5,{children:"Premium is on for you on every DotGG site. Thank you for supporting DotGG."}),(0,r.Y)(Cr,{children:yr.map(e=>(0,r.Y)(Fr,{children:e},e))}),(0,r.FD)(Dr,{children:[(0,r.Y)("span",{children:"The Premium role on the DotGG Discord follows your subscription."}),(0,r.Y)(Sr,{type:"button",onClick:()=>{window.location.hash="discord"},children:"Link Discord"})]}),(0,r.Y)(Ir,{href:(0,ir.e)("account/"),"data-native":!0,children:"Manage your subscription"})]}):(0,r.FD)(r.FK,{children:[(0,r.Y)(b.c5,{children:"Every matchup with its record, the whole top 10, how sure each win rate is, Built for me priced, and no ads on any DotGG site. One plan covers every site."}),(0,r.Y)(br,{children:l.map((e,t)=>(0,r.FD)($r,{href:e.href,"data-native":!0,$lead:0===t,children:[(0,r.Y)(kr,{children:e.name}),(0,r.Y)(Yr,{children:e.note}),(0,r.Y)(Ar,{children:e.price})]},e.key))}),(0,r.Y)(Ir,{href:(0,ir.e)("premium/"),"data-native":!0,children:"See everything Premium opens â"})]}),n.length>0&&(0,r.FD)(b.c5,{children:["Also a member on: ",n.join(", "),"."]}),(0,r.Y)(vr,{})]})},br=l.Ay.div` 14906 display: grid; 14907 grid-template-columns: repeat(2, minmax(0, 1fr)); 14908 gap: 12px; 14909 @media only screen and ${p.E0} { 14910 grid-template-columns: minmax(0, 1fr); 14911 } 14912`,$r=l.Ay.a` 14913 position: relative; 14914 display: flex; 14915 flex-direction: column; 14916 gap: 4px; 14917 padding: 14px 16px; 14918 border-radius: 8px; 14919 grid-column: ${e=>e.$lead?"1 / -1":"auto"}; 14920 background: var(--theme-palette-color-7); 14921 box-shadow: inset 0 0 0 1px ${e=>e.$lead?Wn.zF:"var(--theme-palette-color-5)"}; 14922 color: inherit; 14923 text-decoration: none; 14924 transition: box-shadow 120ms ease, background 120ms ease; 14925 &:hover { 14926 background: ${h.Q.hoverFill}; 14927 box-shadow: inset 0 0 0 ${e=>e.$lead?2:1}px ${e=>e.$lead?ar.dX:"var(--theme-palette-color-3)"}; 14928 } 14929`,kr=l.Ay.span` 14930 font-size: 14px; 14931 font-weight: 700; 14932 color: var(--theme-palette-color-1); 14933`,Yr=l.Ay.span` 14934 font-size: 12.5px; 14935 line-height: 1.4; 14936 color: var(--theme-palette-color-3); 14937`,Ar=l.Ay.span` 14938 font-size: 20px; 14939 font-weight: 700; 14940 color: var(--theme-palette-color-1); 14941`,Cr=l.Ay.div` 14942 display: flex; 14943 flex-wrap: wrap; 14944 gap: 8px; 14945`,Fr=l.Ay.span` 14946 display: inline-flex; 14947 align-items: center; 14948 min-height: 28px; 14949 padding: 0 10px; 14950 border-radius: 4px; 14951 box-shadow: inset 0 0 0 1px var(--theme-palette-color-5); 14952 font-size: 12.5px; 14953 color: var(--theme-palette-color-1); 14954`,Dr=l.Ay.div` 14955 display: flex; 14956 flex-wrap: wrap; 14957 align-items: center; 14958 justify-content: space-between; 14959 gap: 8px 16px; 14960 padding: 12px 14px; 14961 border-radius: 8px; 14962 box-shadow: inset 0 0 0 1px var(--theme-palette-color-5); 14963 font-size: 13.5px; 14964 color: var(--theme-palette-color-3); 14965`,Sr=l.Ay.button` 14966 && { 14967 min-height: 36px; 14968 padding: 0 12px; 14969 border-radius: 6px; 14970 border: 1px solid ${Wn.zF}; 14971 background: transparent; 14972 color: ${Wn.zF}; 14973 font: inherit; 14974 font-weight: 700; 14975 cursor: pointer; 14976 } 14977`,Ir=l.Ay.a` 14978 align-self: flex-start; 14979 color: ${Wn.zF}; 14980 font-size: 13.5px; 14981 font-weight: 700; 14982`;var zr=n(35661);const Tr={group:null,section:null};function Er(){let e="";try{e=decodeURIComponent(window.location.hash.replace(/^#/,""))}catch{return Tr}return(0,zr.aX)(e)?{group:zr.w3[e],section:e}:Tr}const Lr="dotggSettingsPage";function Mr(e){return`${window.location.pathname}${window.location.search}${e}`}function Nr(e,t){document.getElementById(e)?.scrollIntoView({block:"start",behavior:!t||"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"})}const Pr={id:"account",label:"Account & security",scope:"account"},Or={id:"notifications",label:"Notifications & privacy",scope:"account"},_r={id:"connections",label:"Connections",scope:"account"},Rr={id:"premium",label:"Premium",scope:"account"},jr={id:"display",label:"Display & collection",scope:"site"},Jr={id:"danger",label:"Danger zone",scope:"danger"};function Br(e){return e?(0,r.FD)(r.FK,{children:["Display settings live on each game site."," ",(0,r.FD)("a",{href:`${e.url}u/settings/#display`,children:["Open ",e.label," display âº"]})]}):"Display settings live on each game site, in its own Settings."}const Kr=({userData:e,siteHalf:t,heading:n})=>{const l=(0,ee.WS)(),{loc:s,open:d,close:c,mark:p}=function(){const[e,t]=(0,o.J0)(Er);return(0,o.vJ)(()=>{const e=()=>t(Er());return window.addEventListener("hashchange",e),window.addEventListener("popstate",e),()=>{window.removeEventListener("hashchange",e),window.removeEventListener("popstate",e)}},[]),{loc:e,open:(0,o.hb)(e=>{const n=window.history.state,r="object"==typeof n&&null!==n?n:{};window.history.pushState({...r,[Lr]:!0},"",Mr(`#${e}`)),t(Er())},[]),close:(0,o.hb)(()=>{!function(){const e=window.history.state;return"object"==typeof e&&null!==e&&Lr in e}()?(window.history.replaceState(window.history.state,"",Mr("")),t(Tr)):window.history.back()},[]),mark:(0,o.hb)(e=>{window.history.replaceState(window.history.state,"",Mr(`#${e}`))},[])}}(),h=[Pr,Or,_r,Rr,...t?[jr]:[],Jr],u=function(e,t){const n=e.join(","),[r,i]=(0,o.J0)(e[0]??null);return(0,o.vJ)(()=>
14982{if(!t)return;const e=n.split(",");let r=0;const o=()=>{r=0;let t=e[0]??null;for(const n of e){const e=document.getElementById(n);e&&e.getBoundingClientRect().top-124<=1&&(t=n)}const n=document.documentElement;window.scrollY>0&&window.innerHeight+window.scrollY>=n.scrollHeight-4&&(t=e[e.length-1]??t),i(t)},a=()=>{r||(r=requestAnimationFrame(o))};return o(),window.addEventListener("scroll",a,{passive:!0}),window.addEventListener("resize",a),()=>{r&&cancelAnimationFrame(r),window.removeEventListener("scroll",a),window.removeEventListener("resize",a)}},[n,t,124]),r}(h.map(e=>e.id),!l),g=(0,o.li)(null),m=(0,o.li)(s.group);!function(e,t){(0,o.vJ)(()=>{if(!e)return;let t=!1;const n=()=>{t||Nr(e,!1)},r=()=>{t=!0},o=requestAnimationFrame(n),i=[window.setTimeout(n,450),window.setTimeout(n,1400)],a=["wheel","touchstart","keydown"];for(const e of a)window.addEventListener(e,r,{passive:!0,once:!0});return()=>{cancelAnimationFrame(o);for(const e of i)window.clearTimeout(e);for(const e of a)window.removeEventListener(e,r)}},[e,t])}(s.section,l?s.group:"desktop"),(0,o.vJ)(()=>{l&&m.current&&!s.group&&g.current?.scrollIntoView({block:"start"}),m.current=s.group},[l,s.group]);const f=l?s.group:null,x=l&&!f,v="dotgg.gg"===$n()?(0,i.l)():null,y=(e,t,n)=>(0,r.Y)(Dn,{def:e,subtitle:n,hidden:l&&f!==e.id,onBack:l&&f===e.id?c:void 0,children:t},e.id),w=(0,r.FD)(pn,{children:[y(Pr,(0,r.Y)(Se,{userData:e}),"Your DotGG account, the same on every site."),y(Or,(0,r.Y)(or,{}),"Applies on every DotGG site. Everything here arrives in the bell; email isn't built yet."),y(_r,(0,r.Y)(Re,{})),y(Rr,(0,r.Y)(wr,{}),"One subscription for every DotGG site."),t&&y(jr,(0,r.Y)(Rt,{}),`For ${$n()} only.`),y(Jr,(0,r.Y)(He,{showGameActions:t}))]});return(0,r.FD)(Zt,{ref:g,children:[v&&!f&&(0,r.FD)(en,{href:v.url,"data-native":!0,children:[(0,r.Y)(a.gu,{size:16}),"Back to ",v.label]}),n&&(0,r.Y)(tn,{$srOnly:l&&!!f,children:"Settings"}),l?(0,r.FD)(r.FK,{children:[x&&(0,r.Y)(Fn,{groups:h,userData:e,onOpen:d}),w]}):(0,r.FD)(nn,{children:[(0,r.Y)(An,{groups:h,active:u,onPick:e=>{p(e),Nr(e,!0)},displayElsewhere:t?void 0:Br(v)}),w]})]})},Wr=({userData:e,showGameSettings:t=!0,heading:n=!0})=>window.DotGGUser&&window.DotGGUser.toString()===e?.user.user_id.toString()?(0,r.Y)(Kr,{userData:e,siteHalf:t,heading:n}):(0,r.Y)(Zt,{children:(0,r.Y)(b.c5,{children:"You can only view settings for your own account."})})},35661(e,t,n){n.d(t,{aX:()=>i,aY:()=>a});var r=n(7204);const o={account:"account",profile:"account","sign-in":"account","two-factor":"account",notifications:"notifications",following:"notifications",messages:"notifications",alerts:"notifications",connections:"connections",discord:"connections","pocket-sync":"connections",premium:"premium",display:"display",cards:"display",decks:"display",collection:"display",danger:"danger","delete-account":"danger"};function i(e){return Object.prototype.hasOwnProperty.call(o,e)}function a(e){return("undefined"==typeof window?"/u/me/settings/":new URL("hub"===(0,r.ai)()?"settings/":"u/me/settings/",(0,r.vf)()).pathname)+(e?`#${e}`:"")}n.d(t,["w3",0,o])},10135(e,t,n){n.d(t,{o:()=>s,r:()=>d});var r=n(17402);const o=new Map,i=new Set;function a(e,t,n){const r=o.get(e)??new Map,a=r.get(t);if(null===n){if(!a)return;r.delete(t)}else{if(a&&a.text===n.text&&a.order===n.order)return;r.set(t,n)}o.set(e,r),function(){for(const e of i)e()}()}function l(e){const t=o.get(e);return t?[...t.values()].sort((e,t)=>e.order-t.order).map(e=>e.text).join(" · "):""}function s(e,t,n,o=0){(0,r.vJ)(()=>{a(e,t,n?{text:n,order:o}:null)},[e,t,n,o]),(0,r.vJ)(()=>()=>a(e,t,null),[e,t])}function d(e){const[t,n]=(0,r.J0)(()=>l(e));return(0,r.vJ)(()=>{const t=()=>n(l(e));return i.add(t),t(),()=>{i.delete(t)}},[e]),t}},52199(e,t,n){var r=n(63679),o=n(28297),i=n(30821);const a=r.Ay.div` 14983 min-width: 0; 14984 padding: 16px 20px; 14985 box-sizing: border-box; 14986 background-color: var(--theme-palette-color-8); 14987 border: 1px solid var(--theme-palette-color-5); 14988 border-radius: 8px; 14989 scroll-margin-top: ${76}px; 14990 @media only screen and ${o.E0} { 14991 padding: 14px; 14992 } 14993`,l=(0,r.Ay)(a)` 14994 padding-top: 4px; 14995 padding-bottom: 4px; 14996 @media only screen and ${o.E0} { 14997 padding-top: 2px; 14998 padding-bottom: 2px; 14999 } 15000`,s=r.Ay.h3` 15001 display: flex; 15002 align-items: center; 15003 flex-wrap: wrap; 15004 gap: 6px 10px; 15005 margin: 0 0 12px; 15006 font-size: 16px; 15007 font-weight: 700; 15008 line-height: 1.3; 15009 color: var(--theme-palette-color-4); 15010 svg { 15011 flex: none; 15012 width: 18px; 15013 height: 18px; 15014 } 15015`,d=r.Ay.div` 15016 display: flex; 15017 align-items: center; 15018 flex-wrap: wrap; 15019 gap: 4px 10px; 15020 ${e=>e.$tight?"":e.$rows?"padding: 12px 0 8px;":"margin-bottom: 12px;"} 15021 ${s} { 15022 margin: 0; 15023 } 15024`,c=r.Ay.span` 15025 font-size: 12.5px; 15026 color: ${i.Q.muted}; 15027`,p=r.Ay.span` 15028 display: inline-flex; 15029 align-items: center; 15030 gap: 4px; 15031 font-size: 12.5px; 15032 font-weight: 600; 15033 color: ${e=>"success"===e.$tone?i.Q.success:"error"===e.$tone?i.Q.danger:"var(--theme-palette-color-3)"}; 15034 ${e=>e.$end?"margin-left: auto;
15034":""} 15035`,h=r.Ay.p` 15036 margin: 0 0 12px; 15037 font-size: 13px; 15038 line-height: 1.5; 15039 color: var(--theme-palette-color-3); 15040 strong { 15041 color: var(--theme-palette-color-4); 15042 font-weight: 600; 15043 } 15044`,u=r.Ay.div` 15045 display: flex; 15046 flex-wrap: wrap; 15047 align-items: flex-start; 15048 gap: 8px; 15049 @media only screen and ${o.E0} { 15050 ${e=>e.$phoneGrid?r.AH` 15051 display: grid; 15052 grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); 15053 && > *, 15054 && > * > button, 15055 && > * > a { 15056 width: 100%; 15057 } 15058 /* A wrapper (AsyncButton's) stretches its button; a button keeps its label centred. */ 15059 && > :not(button):not(a) { 15060 align-items: stretch; 15061 } 15062 `:""} 15063 } 15064`,g=r.Ay.div` 15065 display: flex; 15066 flex-wrap: wrap; 15067 gap: 8px; 15068 @media only screen and ${o.E0} { 15069 > * { 15070 flex: 1 1 40%; 15071 } 15072 } 15073`,m=r.Ay.div` 15074 display: flex; 15075 flex-wrap: wrap; 15076 gap: 12px 16px; 15077 justify-content: space-between; 15078 align-items: center; 15079 min-height: 60px; 15080 padding: 10px 0; 15081 box-sizing: border-box; 15082 border-bottom: 1px solid ${i.Q.rowRule}; 15083 &:last-child { 15084 border-bottom: none; 15085 } 15086`,f=r.Ay.div` 15087 flex: 1 1 220px; 15088 min-width: 0; 15089`,x=r.Ay.div` 15090 font-size: 14px; 15091 font-weight: 600; 15092 line-height: 1.35; 15093 color: var(--theme-palette-color-4); 15094 @media only screen and ${o.E0} { 15095 font-size: 15px; 15096 } 15097`,v=r.Ay.div` 15098 margin-top: 2px; 15099 font-size: 13px; 15100 line-height: 1.45; 15101 color: ${i.Q.muted}; 15102 strong { 15103 color: var(--theme-palette-color-4); 15104 font-weight: 600; 15105 } 15106`,y=r.Ay.div` 15107 display: flex; 15108 flex: 0 1 auto; 15109 flex-wrap: wrap; 15110 gap: 8px; 15111 justify-content: flex-end; 15112 align-items: center; 15113 min-width: min(120px, 100%); 15114`,w=r.Ay.div` 15115 margin-top: 8px; 15116 font-size: 13px; 15117 font-weight: 600; 15118 color: ${i.Q.success}; 15119`,b=r.Ay.div` 15120 margin-top: 8px; 15121 font-size: 13px; 15122 line-height: 1.45; 15123 color: ${i.Q.danger}; 15124`,$=r.Ay.button` 15125 background: transparent; 15126 border: 1px solid var(--theme-palette-color-5); 15127 color: inherit; 15128 padding: 8px 16px; 15129 border-radius: 4px; 15130 cursor: pointer; 15131 font-size: 14px; 15132 15133 &:hover { 15134 background-color: var(--theme-palette-color-7); 15135 } 15136`;n.d(t,["$0",0,v,"IY",0,g,"Kw",0,b,"OA",0,y,"Wb",0,c,"XY",0,a,"Zb",0,$,"_x",0,s,"c5",0,h,"dI",0,d,"dz",0,x,"nS",0,w,"pM",0,m,"tN",0,f,"un",0,l,"vj",0,p,"w",0,u])},61182(e,t,n){n.d(t,{G:()=>a});var r=n(17402),o=n(71643),i=n(53887);function a(e){const[t,n]=(0,r.J0)(""),a=(0,r.li)(null);return(0,r.vJ)(()=>()=>{a.current&&clearTimeout(a.current)},[]),{status:t,check:t=>{const r=(0,i.Xe)(t);a.current&&clearTimeout(a.current),null!==(0,i.qK)(r)||void 0!==e&&r===e?n(""):(n("checking"),a.current=setTimeout(async()=>{try{const e=await(0,o.Yx)(r);n(e<=1?"available":"taken")}catch{n("")}},1500))}}}},85260(e,t,n){n.d(t,{z:()=>X});var r=n(10201),o=n(17402),i=n(63679),a=n(9299),l=n(16435),s=n(8251),d=n(38608),c=n(33412),p=n(4738),h=n(28297),u=n(53794),g=n(30821),m=n(70213),f=n(66096),x=n(93015),v=n(56245),y=n(63346),w=n(24541),b=n(35661),$=n(42823),k=n(53887);function Y(e){return`${window.location.origin}${(0,k.Lp)(e)}/`}function A(e){return{type:"user",game:"",key:String(e)}}function C(e){const t=(0,w.rx)(e.userId,{kind:"profile",id:e.userId});return e.signedIn?t:(0,$.u)(new URL(t,window.location.origin).href)}function F(e){return e.blocked?"One of you blocked the other":e.notTaking?`${e.nickname} isn't taking offers right now`:void 0}function D({m:e,size:t="md",compact:n=!1,label:o="Propose trade"}){return(0,r.FD)(y.jn,{type:"button",$size:t,"data-span":"",disabled:e.blocked||e.notTaking,title:F(e),onClick:e.onPropose,children:[!n&&(0,r.Y)(m.hR,{size:16}),o]})}function S({m:e,size:t="md",compact:n=!1}){const o=e.tradeSite?y.tA:y.jn;return(0,r.FD)(o,{as:"a",href:C(e),$size:t,"data-span":e.tradeSite?void 0:"",children:[!n&&(0,r.Y)(m.pj,{size:16}),"Message"]})}function I({m:e,size:t="md"}){return(0,r.Y)(f.W,{topic:A(e.userId),label:e.nickname,url:Y(e.nickname),size:t,hint:`Get notified when ${e.nickname} publishes a deck, on any DotGG site`})}function z({m:e,status:t}){const{rows:n}
15136=(0,x.ku)(),o=(0,x.E$)(n,A(e.userId)),i=[{id:"copy",label:"Copy profile link",onSelect:()=>{(0,p.GD)(Y(e.nickname)),e.onCopied()}},...e.onBlock?[{id:"block",label:`Block ${e.nickname}`,danger:!0,onSelect:e.onBlock}]:[]],a=t||(e.blocked?`Blocked. ${e.nickname} can't message you or send you offers.`:o?"Bell row per new deck · Unfollow anytime":`Follow: a bell row when ${e.nickname} publishes a deck, on any DotGG site`);return(0,r.FD)(E,{children:[(0,r.FD)(L,{$trade:e.tradeSite,children:[e.tradeSite&&(0,r.Y)(D,{m:e}),(0,r.Y)(S,{m:e}),(0,r.Y)(I,{m:e}),(0,r.Y)(d.n,{title:e.nickname,items:i})]}),(0,r.Y)(M,{role:t?"status":void 0,children:a})]})}function T({nickname:e}){const t=(0,u.WS)();return(0,r.Y)(E,{children:(0,r.FD)(L,{$mine:!0,children:[(0,r.Y)(y.tA,{as:"a",href:(0,b.aY)("profile"),children:"Edit profile"}),(0,r.Y)(v.n,{variant:"secondary",fill:t,doneLabel:"â Copied",onAction:async()=>(0,p.GD)(Y(e)),children:"Copy link"})]})})}const E=i.Ay.div` 15137 grid-area: act; 15138 display: flex; 15139 flex-direction: column; 15140 align-items: flex-end; 15141 justify-content: center; 15142 gap: 8px; 15143 min-width: 0; 15144 @media only screen and ${h.E0} { 15145 align-items: stretch; 15146 margin-top: 12px; 15147 } 15148`,L=i.Ay.div` 15149 display: flex; 15150 flex-wrap: wrap; 15151 justify-content: flex-end; 15152 gap: 8px; 15153 @media only screen and ${h.E0} { 15154 display: grid; 15155 grid-template-columns: ${e=>e.$mine?"1fr 1fr":e.$trade?"1fr 1fr 44px":"1fr 44px"}; 15156 > * { 15157 width: 100%; 15158 min-width: 0; 15159 } 15160 > [data-span] { 15161 grid-column: 1 / -1; 15162 } 15163 ${e=>e.$mine?"":"> :last-child { width: auto; }"} 15164 } 15165`,M=i.Ay.div` 15166 max-width: 420px; 15167 font-size: 12px; 15168 line-height: 1.4; 15169 text-align: right; 15170 color: ${g.Q.muted}; 15171 @media only screen and ${h.E0} { 15172 max-width: none; 15173 text-align: left; 15174 } 15175`;function N({shown:e,user:t,m:n,tabs:i,status:a,onName:l}){const s=(0,u.WS)(),[h,g]=(0,o.J0)(0);(0,o.vJ)(()=>{e&&g(function(){let e=0;const t=[document.getElementById("header"),...document.querySelectorAll("#header [data-sticky]")];for(const n of t){if(!n)continue;const t=n.getBoundingClientRect(),r=getComputedStyle(n).position;("fixed"===r||"sticky"===r)&&t.height>0&&t.top<=1&&t.bottom>0&&(e=Math.max(e,t.bottom))}return Math.round(e)}()||(s?50:0))},[e,s]);const m=i.find(e=>e.active),f=a||(m?`${m.label}${(m.count??0)>0?` · ${(m.count??0).toLocaleString()}`:""}`:""),x=[...n.tradeSite?[{id:"message",label:"Message",href:C(n)}]:[],{id:"follow",label:`Follow ${n.nickname}`,control:(0,r.Y)(I,{m:n,size:"sm"})},{id:"copy",label:"Copy profile link",onSelect:()=>{(0,p.GD)(Y(n.nickname)),n.onCopied()}},...i.length>1?[{id:"tabs",label:"Switch tab"+(m?` · ${m.label}`:""),page:()=>(0,r.Y)(P,{tabs:i})}]:[]];return(0,r.Y)(O,{$top:h,children:(0,r.FD)(_,{$shown:e,"aria-hidden":!e,children:[(0,r.FD)(R,{type:"button",onClick:l,tabIndex:e?0:-1,title:"Back to the top",children:[(0,r.Y)(c.TO,{user:t,compact:!0}),(0,r.FD)(j,{children:[(0,r.Y)("b",{children:n.nickname}),f&&(0,r.Y)("span",{role:a?"status":void 0,children:f})]})]}),(0,r.Y)(J,{children:s?(0,r.FD)(r.FK,{children:[n.tradeSite?(0,r.Y)(D,{m:n,size:"sm",compact:!0,label:"Propose"}):(0,r.Y)(S,{m:n,size:"sm",compact:!0}),(0,r.Y)(d.n,{title:n.nickname,items:x,bareOnPhone:!0})]}):(0,r.FD)(r.FK,{children:[n.tradeSite&&(0,r.Y)(D,{m:n,size:"sm",compact:!0}),(0,r.Y)(S,{m:n,size:"sm",compact:!0}),(0,r.Y)(I,{m:n,size:"sm"})]})})]})})}function P({tabs:e}){return(0,r.Y)(r.FK,{children:e.map(e=>(0,r.FD)(B,{href:e.href,"aria-current":e.active?"page":void 0,$active:e.active,children:[e.label,(e.count??0)>0&&(0,r.Y)(K,{children:(e.count??0).toLocaleString()})]},e.key))})}const O=i.Ay.div` 15176 position: sticky; 15177 top: ${e=>e.$top}px; 15178 z-index: 30; 15179 height: 0; 15180`,_=i.Ay.div` 15181 position: absolute; 15182 top: 0; 15183 left: 0; 15184 right: 0; 15185 display: flex; 15186 align-items: center; 15187 gap: 12px; 15188 height: 56px; 15189 padding: 0 16px; 15190 box-sizing: border-box; 15191 border: 1px solid var(--theme-palette-color-5); 15192 border-radius: 0 0 8px 8px; 15193 background: var(--theme-palette-color-8); 15194 box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25); 15195 opacity: ${e=>e.$shown?1:0}; 15196 transform: translateY(${e=>e.$shown?"0":"-8px"}); 15197 visibility: ${e=>e.$shown?"visible":"hidden"}; 15198 transition: 15199 opacity 0.15s ease, 15200 transform 0.15s ease, 15201 visibility 0.15s; 15202 @media (prefers-reduced-motion: reduce) { 15203 transition: none; 15204 } 15205 @media only screen and ${h.E0} { 15206 gap: 8px; 15207 height: 52px; 15208 padding: 0 4px 0 12px; 15209 } 15210`,R=i.Ay.button` 15211 display: flex; 15212 align-items: center; 15213 gap: 12px; 15214 min-width: 0; 15215 margin-right: auto; 15216 padding: 0; 15217 border: none; 15218 background: none; 15219 color: inherit; 15220 font: inherit; 15221 text-align: left; 15222 cursor: pointer; 15223 @media only screen and ${h.E0} { 15224 gap: 10px; 15225 } 15226`,j=i.Ay.span` 15227 display: flex; 15228 align-items: baseline; 15229 gap: 12px; 15230 min-width: 0; 15231 b { 15232 overflow: hidden; 15233 text-overflow: ellipsis; 15234 white-space: nowrap; 15235 font-size: 15px; 15236 font-weight: 800; 15237 color: var(--theme-palette-color-4); 15238 } 15239 span { 15240 white-space: nowrap; 15241 font-size: 12.5px; 15242 color: var(--theme-palette-color-3); 15243 } 15244 @media only screen and ${h.E0} { 15245 flex-direction: column; 15246 align-items: flex-start; 15247 gap: 0; 15248 b { 15249 font-size: 14.5px; 15250 } 15251 span { 15252 font-size: 11.5px; 15253 } 15254 } 15255`,J=i.Ay.div` 15256 flex: none; 15257 display: flex; 15258 align-items: center; 15259 gap: 8px; 15260 @media only screen and ${h.E0} { 15261 gap: 0; 15262 } 15263`,B=i.Ay.a` 15264 display: flex; 15265 align-items: center; 15266 justify-content: space-between; 15267 min-height: 48px; 15268 padding: 0 16px; 15269 border-bottom: 1px solid var(--theme-palette-color-5); 15270 font-size: 14px; 15271 font-weight: ${e=>e.$active?700:600}; 15272 color: ${e=>e.$active?"var(--theme-palette-color-1)":"var(--theme-palette-color-4)"}; 15273 text-decoration: none; 15274`,K=i.Ay.span` 15275 font-size: 12px; 15276 color: ${g.Q.muted}; 15277`;var W=n(34450),U=n(38950),Q=n(39131),G=n(95117),H=n(91995),q=n(65562),V=n(86031);const X=({userData:e,tabs:t=[]})=>{const n=e?.user,i=Number(n?.user_id??0),s=!!window.DotGGUser&&String(window.DotGGUser)===String(i),d=!0===V.SA.collection?.collectionCanTrade,h=function(e){const[t,n]=(0,o.J0)({user:null,blocked:!1}),r=(0,W.rn)(e);return(0,o.vJ)(()=>
15277{if(n({user:null,blocked:!1}),!r)return;let t=!0;return(0,G.nQ)(e).then(e=>{t&&n({user:e.user,blocked:e.blocked})}).catch(()=>{}),()=>{t=!1}},[e,r]),t}(s?0:i),u=(0,W.VE)(s?0:i),g=function(e,t,n){const i=Number(e?.user_id??0),a=e?.nickname??"",l=(0,p.x3)(),[s,d]=(0,o.J0)(!1),[c,h]=(0,o.J0)(!1),[u,g]=(0,o.J0)(!1),[m,f]=(0,o.J0)("");(0,o.vJ)(()=>{if(!m)return;const e=setTimeout(()=>f(""),3e3);return()=>clearTimeout(e)},[m]);const x=t.blocked||u,v={userId:i,nickname:a,tradeSite:n,signedIn:l,blocked:x,notTaking:null!==t.user&&!t.user.accepting,onPropose:()=>l?d(!0):window.location.assign((0,$.u)(window.location.href)),onBlock:n&&l&&!x?()=>h(!0):null,onCopied:()=>f("â Profile link copied")},y=(0,r.FD)(r.FK,{children:[s&&(0,r.Y)(Q.l,{target:{user:t.user??(0,G.TG)(i,a,e?.usermeta?.discord??"")},onClose:()=>d(!1),onOpen:e=>window.location.assign(`/trade/inbox/${e}/`)}),c&&(0,r.Y)(U.I,{title:`Block ${a}?`,confirmLabel:"Block",busyLabel:"Blockingâ¦",danger:!0,onConfirm:()=>(0,G.uw)(i,!0).then(()=>g(!0)).catch(e=>{throw(0,H.Ni)(e.message,5e3),e}),onClose:()=>h(!1),children:"Open trades with them are cancelled, and they can no longer see you in matches, send you offers or message you. You can unblock them from your trade profile."})]});return{m:v,status:m,dialogs:y}}(n,h,d),m=(0,o.li)(null),f=function(e){const[t,n]=(0,o.J0)(!1);return(0,o.vJ)(()=>{const t=e.current;if(!t||"undefined"==typeof IntersectionObserver)return;const r=new IntersectionObserver(([e])=>{e&&n(!e.isIntersecting&&e.boundingClientRect.top<0)},{rootMargin:"-64px 0px 0px 0px"});return r.observe(t),()=>r.disconnect()},[e]),t}(m);return(0,r.FD)(a.t,{justhide:!0,children:[(0,r.FD)(te,{ref:m,children:[(0,r.Y)(c.s9,{userData:e,meta:(0,r.Y)(Z,{userData:e,own:s,tradeSite:d}),badges:h.user?(0,r.Y)(l.cW,{user:h.user}):null,hideDiscord:!s&&d&&(0,p.x3)()}),s?(0,r.Y)(oe,{children:"This is what other players see."}):(0,r.Y)(ee,{match:u,facts:h}),s?(0,r.Y)(T,{nickname:n?.nickname??""}):n?(0,r.Y)(z,{m:g.m,status:g.status}):null]}),!s&&n&&(0,r.Y)(N,{shown:f,user:n,m:g.m,tabs:t,status:g.status,onName:()=>{const e=m.current;e&&window.scrollTo({top:Math.max(0,window.scrollY+e.getBoundingClientRect().top-96),behavior:"smooth"})}}),!s&&g.dialogs]})};function Z({userData:e,own:t,tradeSite:n}){const o=(0,q.sz)(e?.collection);if(o.owned<=0&&o.trade<=0&&o.wish<=0)return null;const i=e=>e?void 0:"";return(0,r.FD)(r.FK,{children:[(0,r.FD)("span",{"data-wide":i(t||!n),children:[(0,r.Y)("b",{children:o.owned.toLocaleString()})," owned"]}),n&&(0,r.FD)(r.FK,{children:[(0,r.FD)("span",{"data-wide":i(!t),children:[(0,r.Y)("b",{children:o.trade.toLocaleString()})," for trade"]}),(0,r.FD)("span",{"data-wide":"",children:[(0,r.Y)("b",{children:o.wish.toLocaleString()})," on wishlist"]})]})]})}function ee({match:e,facts:t}){const n=t.user;return e||n?(0,r.FD)(ne,{children:[(0,r.Y)(W.ui,{match:e,boxed:!0}),n&&(0,r.FD)(re,{children:[(0,r.Y)(s.cd,{langs:n.langs}),(0,r.Y)(l.ib,{user:n})]}),n&&""!==n.note&&(0,r.FD)(l.fr,{children:["â",n.note,"â"]})]}):null}const te=i.I4.div` 15278 display: grid; 15279 grid-template-columns: auto minmax(0, 1fr) auto; 15280 grid-template-areas: 15281 "avatar who act" 15282 "avatar extra act"; 15283 column-gap: 20px; 15284 align-items: center; 15285 margin-bottom: 12px; 15286 padding: 20px 22px; 15287 border-radius: 8px; 15288 background: var(--theme-palette-color-8); 15289 box-shadow: inset 0 0 0 1px var(--theme-palette-color-5); 15290 @media only screen and (max-width: 1100px) { 15291 column-gap: 18px; 15292 padding: 18px 20px; 15293 } 15294 @media only screen and ${h.E0} { 15295 grid-template-columns: auto minmax(0, 1fr); 15296 grid-template-areas: 15297 "avatar who" 15298 "extra extra" 15299 "act act"; 15300 column-gap: 14px; 15301 padding: 14px; 15302 } 15303`,ne=i.I4.div` 15304 grid-area: extra; 15305 display: flex; 15306 flex-direction: column; 15307 gap: 8px; 15308 min-width: 0; 15309 margin-top: 8px; 15310 @media only screen and ${h.E0} { 15311 margin-top: 12px; 15312 } 15313`,re=i.I4.div` 15314 display: flex; 15315 flex-wrap: wrap; 15316 align-items: center; 15317 gap: 6px; 15318 &:empty { 15319 display: none; 15320 } 15321`,oe=(0,i.I4)(ne)` 15322 font-size: 12px; 15323 color: ${g.Q.muted}; 15324 @media only screen and ${h.E0} { 15325 display: none; 15326 } 15327`},33412(e,t,n){n.d(t,{TO:()=>F,s9:()=>D,Zu:()=>Y});var r=n(10201),o=n(63679),i=n(16133),a=n(45994),l=n(9299),s=n(41188),d=n(94315),c=n(61204),p=n(17e3),h=n(17402),u=n(60220),g=n(86031),m=n(4738),f=n(12434);const x=o.I4.span` 15328 position: absolute; 15329 top: -4px; 15330 right: -4px;
15331 min-width: 20px; 15332 height: 20px; 15333 padding: 0 6px; 15334 border-radius: 10px; 15335 background: var(--theme-palette-color-8, #ffd700); 15336 color: var(--theme-palette-color-1, #111); 15337 font-size: 11px; 15338 font-weight: 700; 15339 line-height: 20px; 15340 text-align: center; 15341 border: 2px solid var(--theme-palette-color-1, #111); 15342`,v=({userId:e})=>{const t=!0===g.SA.decks.metaAlerts&&(0,m.x3)()&&void 0!==window.DotGGUser&&String(window.DotGGUser)===String(e??""),[n,o]=(0,h.J0)(0);return(0,h.vJ)(()=>{if(!t)return;let e=!0;return(0,u.q)(f.Ay.TheGame).then(t=>{e&&o(t.alerts.filter(e=>e.id>t.seen_id).length)}).catch(()=>{}),()=>{e=!1}},[t]),t&&0!==n?(0,r.Y)(x,{title:`${n} new meta alert${1===n?"":"s"} â see Settings`,children:n}):null};var y=n(59408),w=n(28297),b=n(78058),$=n(62530);const k="(max-width: 1100px)";function Y(e){const t=Math.floor((Date.now()-e.getTime())/864e5);return"Joined "+(t<1?"today":t<30?`${t}d ago`:t<365?`${Math.floor(t/30)}mo ago`:`${Math.floor(t/365)}y ago`)}const A={nikke:"NIKKE Premium"};function C(e){return A[e]??`${e.toUpperCase()} Premium`}function F({user:e,compact:t=!1}){const n=(0,$.WX)(e);return(0,r.FD)(I,{children:[(0,r.Y)(z,{$src:(0,y.T)(e?.usermeta?.avatar),$premium:n,$compact:t}),n&&!t&&(0,r.Y)(T,{title:"DotGG Premium",children:(0,r.Y)(c.g,{icon:b.z})})]})}const D=({userData:e,meta:t,badges:n,hideDiscord:o=!1})=>{const[h,u]=(0,a.J0)(!1),g=e?.user,f=(0,$.WX)(g),x=g?.sitePremium??[],y=function(e){if(!e)return null;const t=new Date(e.includes("T")?e:e.replace(" ","T"));return isNaN(t.getTime())?null:{rel:Y(t),abs:(0,i.GP)(t,"MMM d, yyyy")}}(g?.accountCreated??g?.user_registered),w=o?"":g?.usermeta?.discord??"";return(0,r.FD)(l.t,{justhide:!0,children:[(0,r.FD)(S,{children:[(0,r.Y)(F,{user:g}),(0,r.Y)(v,{userId:g?.user_id})]}),(0,r.FD)(E,{children:[(0,r.FD)(L,{children:[(0,r.Y)(M,{children:g?.nickname}),f&&(0,r.Y)(N,{children:"Premium"}),x.map(e=>(0,r.FD)(P,{title:`${C(e)} â billed separately from DotGG Premium`,children:[(0,r.Y)(c.g,{icon:p.y})," ",C(e)]},e)),n]}),(0,r.FD)(O,{children:[y&&(0,r.FD)(_,{children:[y.rel,(0,r.FD)(R,{children:[" · ",y.abs]})]}),t,w&&(0,r.FD)(_,{children:[(0,r.Y)(c.g,{icon:d._})," Discord:"," ",h?(0,r.FD)(j,{onClick:()=>(0,m.GD)(w),title:"Click to copy",children:[(0,r.Y)(c.g,{icon:s.j})," ",w]}):(0,r.Y)(J,{onClick:()=>u(!0),children:"[show discord]"})]})]})]})]})},S=o.I4.div` 15343 grid-area: avatar; 15344 position: relative; 15345 flex-shrink: 0; 15346 align-self: center; 15347`,I=o.I4.div` 15348 position: relative; 15349`,z=o.I4.div` 15350 width: ${e=>e.$compact?32:72}px; 15351 height: ${e=>e.$compact?32:72}px; 15352 border-radius: 50%; 15353 background: var(--theme-palette-color-6) url(${e=>e.$src}) center / cover no-repeat; 15354 box-shadow: ${e=>e.$premium?e.$compact?"0 0 0 2px var(--theme-palette-color-8), 0 0 0 3px var(--theme-palette-color-1)":"0 0 0 3px var(--theme-palette-color-8), 0 0 0 5px var(--theme-palette-color-1)":"none"}; 15355 @media only screen and ${k} { 15356 width: ${e=>e.$compact?32:64}px; 15357 height: ${e=>e.$compact?32:64}px; 15358 } 15359 @media only screen and ${w.E0} { 15360 width: ${e=>e.$compact?30:60}px; 15361 height: ${e=>e.$compact?30:60}px; 15362 ${e=>e.$premium&&!e.$compact?"box-shadow: 0 0 0 2px var(--theme-palette-color-8), 0 0 0 4px var(--theme-palette-color-1);":""} 15363 } 15364`,T=o.I4.span` 15365 position: absolute; 15366 bottom: -2px; 15367 right: -2px; 15368 width: 24px; 15369 height: 24px; 15370 box-sizing: border-box; 15371 border-radius: 50%; 15372 background: var(--theme-palette-color-1); 15373 color: var(--dotgg-on-accent, var(--theme-palette-color-8)); 15374 display: flex; 15375 align-items: center; 15376 justify-content: center; 15377 font-size: 11px; 15378 border: 2px solid var(--theme-palette-color-8); 15379 @media only screen and ${w.E0} { 15380 width: 20px; 15381 height: 20px; 15382 font-size: 9px; 15383 } 15384`,E=o.I4.div` 15385 grid-area: who; 15386 min-width: 0; 15387 display: flex; 15388 flex-direction: column; 15389 justify-content: center; 15390 gap: 8px; 15391 @media only screen and ${w.E0} { 15392 gap: 5px; 15393 } 15394`,L=o.I4.div` 15395 display: flex; 15396 align-items: center; 15397 gap: 10px; 15398 flex-wrap: wrap; 15399 min-width: 0; 15400 @media only screen and ${w.E0} { 15401 gap: 8px; 15402 } 15403`,M=o.I4.h1` 15404 margin: 0; 15405 min-width: 0;
15406 overflow-wrap: anywhere; 15407 color: var(--theme-palette-color-4); 15408 font-size: 28px; 15409 font-weight: 800; 15410 line-height: 1; 15411 letter-spacing: -0.01em; 15412 @media only screen and ${k} { 15413 font-size: 26px; 15414 } 15415 @media only screen and ${w.E0} { 15416 font-size: 22px; 15417 } 15418`,N=o.I4.span` 15419 display: inline-flex; 15420 align-items: center; 15421 gap: 5px; 15422 background: var(--theme-palette-color-1); 15423 color: var(--dotgg-on-accent, var(--theme-palette-color-8)); 15424 font-size: 10px; 15425 font-weight: 800; 15426 text-transform: uppercase; 15427 letter-spacing: 0.04em; 15428 border-radius: 3px; 15429 padding: 3px 8px; 15430 line-height: 1; 15431 @media only screen and ${w.E0} { 15432 padding: 3px 6px; 15433 font-size: 9.5px; 15434 } 15435`,P=(0,o.I4)(N)` 15436 background: transparent; 15437 color: var(--theme-palette-color-1); 15438 box-shadow: inset 0 0 0 1px var(--theme-palette-color-1); 15439`,O=o.I4.div` 15440 display: flex; 15441 align-items: center; 15442 gap: 4px 16px; 15443 flex-wrap: wrap; 15444 font-size: 13px; 15445 color: var(--theme-palette-color-3); 15446 > * { 15447 white-space: nowrap; 15448 } 15449 b { 15450 font-weight: 700; 15451 color: var(--theme-palette-color-4); 15452 } 15453 @media only screen and ${w.E0} { 15454 gap: 0; 15455 font-size: 12.5px; 15456 > [data-wide] { 15457 display: none; 15458 } 15459 > * + *::before { 15460 content: " · "; 15461 white-space: pre; 15462 } 15463 } 15464`,_=o.I4.span``,R=o.I4.span` 15465 white-space: pre; 15466 @media only screen and ${w.E0} { 15467 display: none; 15468 } 15469`,j=o.I4.span` 15470 display: inline-flex; 15471 align-items: center; 15472 gap: 4px; 15473 color: var(--theme-palette-color-4); 15474 cursor: pointer; 15475`,J=o.I4.span` 15476 color: var(--theme-palette-color-4); 15477 cursor: pointer; 15478 &:hover { 15479 text-decoration: underline; 15480 } 15481`},86180(e,t,n){n.d(t,{Cz:()=>p,iW:()=>c});const r=e=>"totalCost"in e&&"totalCards"in e&&"avgPrice"in e,o=e=>e.price?+e.price:0,i=(e,t)=>e.color.toLowerCase()===t.toLowerCase(),a=()=>({totalPrice:0,avgPrice:0,totalCost:0,totalCards:0,deckString:""}),l=(e,t,n)=>{e.deckString+=`${""===e.deckString?"":"||"}${n} ${t.name.replace(" - "," ")}`};function s(e=o){return(t,n,o)=>(r(t)&&(t.totalCost+=null==n.cost?0:+n.cost*o,t.totalCards+=o,t.totalPrice+=e(n)*o,t.avgPrice=t.totalCost/t.totalCards,Number.isNaN(t.avgPrice)&&(t.avgPrice=0)),l(t,n,o),t)}const d=(e,t,n,o)=>{switch(e){case"averageCardCostTitle":return"Average card cost";case"averageCardCost":return`Avg. cost: ${(r(t)?t.avgPrice:0).toFixed(1)}`}return""};function c(e={}){return{colorNCompareForCurve:i,baseDeckFields:a,calcDeckFields:s(e.getPrice),getFactsField:d}}function p(){return{colorNCompareForCurve:i,baseDeckFields:a,calcDeckFields:(e,t,n)=>(r(e)&&(e.totalCards+=n),l(e,t,n),e),getFactsField:(e,t,n,r)=>"averageCardCostTitle"===e?"Average card cost":""}}n.d(t,["B9",0,(e,t)=>e.colorsList.includes(t),"G4",0,e=>e.price&&+e.price>0?+e.price:e.foilPrice&&+e.foilPrice>0?+e.foilPrice:0,"gd",0,i,"jn",0,a,"pW",0,e=>e.comparativePrice||0])},65510(e,t,n){n(33151),n.d(t,["o",0,[{name:"Win Condition",color:"#9B2335"},{name:"Core Card",color:"#2E8B57"},{name:"Flex Slot",color:"#6A5ACD"},{name:"Tech Card",color:"#FF6B35"},{name:"Budget Option",color:"#20B2AA"},{name:"To Replace",color:"#DC143C"},{name:"Testing",color:"#9370DB"},{name:"Foil",color:"#B8860B"}]])},28716(e,t,n){n.d(t,{x:()=>i});var r=n(18656),o=n(91181);function i(e,t,n,i){const a=o.jb.mapState(e=>(0,r.F)(t,e)).getOrElse([]),l=e.header&&void 0===i?.board?[e.header(n)]:[],{groupBy:s,lead:d,leadLine:c=e.line}=e;if(s){const t=new Map;for(const{card:n,count:r}of a){const o=s(n);t.set(o,[...t.get(o)??[],e.line(n,r)])}const n=[...t].map(([e,t])=>`${e}\n${t.join("\n")}\n\n`).join("");return[...l,n].join("\n")}const p=e=>d?.(e)??!1;return[...l,...a.filter(({card:e})=>p(e)).map(({card:e,count:t})=>c(e,t)),...a.filter(({card:e})=>!p(e)).map(({card:t,count:n})=>e.line(t,n))].join("\n")}n(61271),n.d(t,["z",0,{line:(e,t)=>`${t} ${e.displayName}`}])},50830(e,t,n){n.d(t,{R:()=>i,Z:()=>o});var r=n(86031);function o(e){const t=Object.keys((0,r.IE)())[0]?.toLowerCase()??"";return""!==t&&e.cardtype.toLowerCase()===t}function i(e,t=e){const n=e=>{const n=t(e);return n?`${e.name}(${n})`:e.name};return{header:e=>`name (${e})`,lead:o,leadLine:t=>`${e(t)} ${n(t)}`,line:(t,r)=>`${r} ${e(t)} ${n(t)}`}}n(61271)},12247(e,t,n){n.d(t,{Pz:()=>l,XV:()=>s});var r=n(10201),o=n(92475),i=n(1537),a=n(9135);function l(e="30px"){return function(t){const n=(0,a.Qm)(t.color)?.icon;return n?(0,r.FD)(r.FK,{children:[(0,r.Y)(o.D,{$width:e,$height:e,src:n})," ",t.countUsed]}):(0,r.Y)(r.FK,{})}}function s(e,t="40px"){return function(n){return(0,r.FD)(r.FK,{children:[(0,r.Y)(o.D,{$width:t,$height:t,src:e(n.color)})," ",n.countUsed]})}}n.d(t,["yo",0,e=>{const t=(0,a.Qm)(e.color);return(0,r.Y)(i.x,{$active:!1,$width:40,$gradient:t?.gradient,$color:"var(--theme-palette-color-4)",title:(0,a.cd)(e.color),$borderColor:t?.border??"",$smallerFont:!0,children:e.countUsed})}])},87043(e,t,n){n.d(t,{A:()=>
15481o});var r=n(91181);function o(e){return()=>{const t={};return r.jb.mapState(n=>{n.forEach(n=>{const r=e?.keyOf?e.keyOf(n):n.setId;if(!r)return;const o=e?.uppercaseKeys?r.toUpperCase():r;void 0===t[o]&&(t[o]=(e?.nameOf?e.nameOf(n):void 0)||r)})}),t}}},16381(e,t,n){var r=n(10201),o=n(38144);const i=(0,n(84668).A)({loader:async()=>await n.e(2150).then(n.bind(n,52150)),loading:()=>(0,r.Y)(o.R,{}),render(e){const t=e.IllustratorsPage;return(0,r.Y)(t,{})}});n.d(t,["k",0,i])},58425(e,t,n){const r={grey:"var(--theme-palette-color-14, #bbbbbb)",teal:"var(--theme-palette-color-13, #63f2d4)",green:"var(--theme-palette-color-12, #90f263)",yellow:"var(--theme-palette-color-11, #f2de63)",orange:"var(--theme-palette-color-10, #f2a263)",red:"var(--theme-palette-color-9, #f26464)"},o={label:"Common / Uncommon",short:"C/U",color:r.grey,rarities:["Common","Uncommon"]},i={label:"Promo & other",short:"Promo",color:"var(--theme-palette-color-3)"};n.d(t,["JR",0,r,"JZ",0,o,"N5",0,e=>{const t=new Map;e.tiers.forEach((e,n)=>e.rarities?.forEach(e=>t.set(e.toLowerCase(),n)));const n=new Set((e.unranked??[]).map(e=>e.toLowerCase())),r=e.tiers.findIndex(e=>!0===e.rest);return e=>{const o="string"==typeof e?e.trim().toLowerCase():"",i=t.get(o);return void 0!==i?i:""===o||n.has(o)?-1:r}},"_D",0,e=>e.tiers.flatMap((e,t)=>!0===e.lens?[t]:[]).reverse(),"eK",0,(e,t)=>e.tiers[t]??i])},39859(e,t,n){n.d(t,{X:()=>m});var r=n(10201),o=(n(17402),n(63679)),i=n(623);const a=()=>(0,r.FD)(l,{"data-skeleton-type":"ledger",children:[(0,r.Y)(d,{}),(0,r.FD)(c,{children:[(0,r.Y)(p,{}),(0,r.Y)(h,{})]}),(0,r.Y)(u,{}),Array.from({length:5}).map((e,t)=>(0,r.Y)(g,{},t))]}),l=o.I4.div` 15482 width: 100%; 15483 display: flex; 15484 flex-direction: column; 15485 gap: 12px; 15486 ${i.aE} 15487 ${i.Xj} 15488`,s=o.I4.div` 15489 background: var(--theme-palette-color-6, #2a2a2a); 15490 border-radius: 6px; 15491 ${i.Rs} 15492`,d=(0,o.I4)(s)` 15493 height: 38px; 15494 width: 220px; 15495 margin-bottom: 4px; 15496`,c=o.I4.div` 15497 display: grid; 15498 grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); 15499 gap: 10px; 15500 @media only screen and (max-width: 900px) { 15501 grid-template-columns: minmax(0, 1fr); 15502 } 15503`,p=(0,o.I4)(s)` 15504 height: 232px; 15505`,h=(0,o.I4)(s)` 15506 height: 232px; 15507`,u=(0,o.I4)(s)` 15508 height: 32px; 15509 margin: 4px 0; 15510`,g=(0,o.I4)(s)` 15511 height: 54px; 15512 border-radius: 8px; 15513`,m=(0,n(84668).A)({loader:async()=>await Promise.all([n.e(116),n.e(4341)]).then(n.bind(n,44341)),loading:()=>(0,r.Y)(a,{}),render(e){const t=e.LedgerPage;return(0,r.Y)(t,{})}})},84668(e,t,n){n.d(t,{A:()=>s});var r=n(10201),o=n(17402);const i="dotgg:chunk-reload-ts";var a=n(2340),l=n(89629);function s(e){const{loader:t,loading:n,render:s}=e,d=(0,o.RZ)(async()=>{let e;try{e=await(0,a.bD)(t,{shouldRetry:a.ME,silent:!0,onRetry:(e,t)=>{e>=2&&(0,l.S7)(t)}})}catch(e){if((0,l.S7)(e),function(e){if("undefined"==typeof window)return!1;if(!function(e){if(!e||"object"!=typeof e)return!1;const t=e;if("ChunkLoadError"===t.name)return!0;const n=t.message??"";return/Loading( CSS)? chunk .+ failed|dynamically imported module|error loading dynamically imported module/i.test(n)}(e))return!1;if("undefined"!=typeof navigator&&!1===navigator.onLine)return!1;let t=0;try{t=Number(window.sessionStorage.getItem(i))||0}catch{}if(Date.now()-t<2e4)return!1;try{window.sessionStorage.setItem(i,String(Date.now()))}catch{}return window.location.reload(),!0}(e))return await new Promise(()=>{});throw e}return{default:t=>(0,r.Y)(r.FK,{children:s(e,t)})}});return e=>(0,r.Y)(o.tY,{fallback:n(e),children:(0,r.Y)(d,{...e})})}},70994(e,t,n){n.d(t,{QZ:()=>c,zy:()=>o,RQ:()=>l,Zp:()=>i.Z,g:()=>a,ok:()=>s});var r=n(67390);const o=()=>{const[e]=(0,r.rd)(),t=new URL(e?.url||window.location.href,window.location.origin);return{pathname:t.pathname,search:t.search,hash:window.location.hash}};var i=n(84442);const a=()=>{const[e]=(0,r.rd)();return e?.matches||{}},l=e=>{const[t]=(0,r.rd)(),n=(0,r.m0)(t?.url||window.location.pathname,e,{});return!1===n?null:{params:n||{}}},s=()=>{const[e,t]=(0,r.rd)(),n=new URL(e?.url||window.location.href,window.location.origin);return[new URLSearchParams(n.search),n=>{const r=new URL(e?.url||window.location.href,window.location.origin),o=new URLSearchParams(r.
15513search);Object.entries(n).forEach(([e,t])=>{t?o.set(e,t):o.delete(e)});const i=o.toString(),a=i?`${r.pathname}?${i}`:r.pathname;t(a)}]};var d=n(45994);const c=()=>{const[e,t]=(0,d.J0)(()=>window.location.hash);return(0,d.vJ)(()=>{const e=()=>{t(window.location.hash)};return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]),[e,e=>{const t=e.startsWith("#")?e:`#${e}`;window.location.hash=t}]}},98626(e,t,n){function r(e){const t=new URLSearchParams(window.location.search),n=t.get(e);if(null===n)return null;t.delete(e);const r=t.toString();return window.history.replaceState(window.history.state,"",`${window.location.pathname}${""===r?"":`?${r}`}${window.location.hash}`),n}n.d(t,{Z:()=>r})},84442(e,t,n){var r=n(67390);n.d(t,["Z",0,()=>{const[,e]=(0,r.rd)();return e}])},59408(e,t,n){n.d(t,{T:()=>o});const r="https://static.dotgg.gg/avatars/";function o(e){return e&&""!==e?e.startsWith("http")?e:r+e:r+"ava_01_01.png"}},42823(e,t,n){function r(e){return"https://api.dotgg.gg/auth.php?returl="+encodeURIComponent(e)}n.d(t,{u:()=>r})},53887(e,t,n){n.d(t,{Lp:()=>u,NM:()=>g,Xe:()=>p,qK:()=>h});var r=n(7204);const o=/[/\\%<>"]/,i="[\\u0000-\\u001F\\u007F-\\u009F\\u200B-\\u200F\\u202A-\\u202E\\u2066-\\u2069\\uFEFF]",a=new RegExp(i),l=new RegExp(i,"g"),s=/[\u00A0\u2000-\u200A\u202F\u205F\u3000]/g,d=/[\p{L}\p{N}]/u,c=/^id-\d+$/i;function p(e){return e.replace(l,"").replace(s," ").replace(/\s+/g," ").trim()}function h(e){const t=[...e].length;return t<2||t>32?"Nickname must be 2-32 characters.":a.test(e)?"Nickname cannot contain invisible or direction-changing characters.":o.test(e)?'Nickname cannot contain any of: / \\ % < > "':d.test(e)?c.test(e)?"That nickname is reserved.":null:"Nickname must contain at least one letter or number."}function u(e,...t){const n=t.filter(Boolean).map(encodeURIComponent).join("/");return`${(0,r.l2)()}u/${encodeURIComponent(e)}${n?`/${n}`:""}`}function g(e){try{return decodeURIComponent(e)}catch{return e}}},79063(e,t,n){n.d(t,{ST:()=>s,YK:()=>l,z7:()=>d});var r=n(8879),o=n(89629);const i=e=>"string"==typeof e||"number"==typeof e||"boolean"==typeof e,a=(e,t)=>r.lqM(r.FsL(r.L5J(),r.pdi(e)),()=>t);function l(e,t){return Array.isArray(e)?e:(""!==e&&null!=e&&(0,o.yb)(t,`expected array, got ${typeof e}: ${String(e).slice(0,60)}`),[])}function s(e,t){return null==e||"object"!=typeof e||Array.isArray(e)?(""!==e&&null!=e&&(0,o.yb)(t,`expected object, got ${typeof e}: ${String(e).slice(0,60)}`),null):e}function d(e,t,n){if(!Array.isArray(t))return""!==t&&null!=t&&(0,o.yb)(n,"expected array, got "+(null===t?"null":typeof t)),[];const i=r.xLC(e,{}),a=[];let l=0;for(const n of t){const t=r.xLC(e,n);t.success?a.push(t.output):i.success&&(a.push(i.output),l++)}return l>0&&(0,o.yb)(n,`${l}/${t.length} rows coerced to defaults`),a}n.d(t,["IW",0,()=>a(e=>Array.isArray(e)?e.filter(e=>null!=e).map(e=>String(e)):[],[]),"RJ",0,()=>a(e=>null==e?null:"string"==typeof e?e:i(e)?String(e):null,null),"SA",0,(e=!1)=>a(t=>!0===t||"1"===t||1===t||!1!==t&&"0"!==t&&0!==t&&null!=t&&e,e),"n0",0,(e="")=>a(t=>"string"==typeof t?t:i(t)?String(t):e,e),"sX",0,(e=0)=>a(t=>{const n="number"==typeof t?t:parseFloat(String(t));return Number.isFinite(n)?n:e},e),"wG",0,()=>a(e=>Array.isArray(e)||"string"==typeof e?e:null,null)])},77683(e,t,n){n.d(t,{saveElementAsPng:()=>o});var r=n(10777);async function o(e,t){if(e)try{const n=await(0,r.$E)(e,{cacheBust:!0});if(window.showSaveFilePicker){const e={types:[{description:"PNG Image",accept:{"image/png":[".png"]}}],suggestedName:t};try{const t=await window.showSaveFilePicker(e);if(!t)return;const r=await t.createWritable(),o=await(await fetch(n)).blob();return await r.write(o),void await r.close()}catch(e){if(e&&("AbortError"===e.name||e.message?.includes("AbortError")))return}}const o=document.createElement("a");o.download=t,o.href=n,document.body.appendChild(o),o.click(),document.body.removeChild(o)}catch(e){alert("Failed to save image. Please try a different browser or take a screenshot.")}}},65187(e,t,n){n.d(t,{shareElementAsImage:()=>i});var r=n(10777),o=n(77683);async function i(e,{filename:t,shareTitle:n,shareText:i}){if(!e)return;const a=navigator;if("function"==typeof a.share&&"function"==typeof a.canShare)try{const o=await(0,r.ZR)(e,{cacheBust:!0});if(o){const e=new File([o],t,{type:"image/png"});if(a.canShare({files:[e]}))return void await a.share({files:[e],title:n,text:i})}}catch(e){if("AbortError"===e?.name)return}await(0,o.saveElementAsPng)(e,t)}},36110(e,t,n){n.d(t,{JE:()=>s,Yy:()=>l,_x:()=>a});var r=n(86031),o=n(90199),i=n(12434);function a(e){const t=r.SA.decks?.aaNormalizeField,n="string"==typeof t?[t]:t??[];if(0===n.length||!e||0===e.length)return e=>e;const o=new Map;for(const t of e){if(!t.id)continue;const e=t;for(const r of n){const n=e[r];if("string"==typeof n&&""!==n){o.set(t.id,n);break}}}return e=>o.get(e)??e}function l(e,t,n=(0,o.eK)()){const r=n?e=>e:a(e),i={},l={},s={};for(const e of t??[]){const t=r(e.card),n=parseInt(e.standard||"0",10)+parseInt(e.foil||"0",10);if(i[t]=(i[t]||0)+n,l[t]=(l[t]||0)+parseInt(e.wish||"0",10),n>0){const r=s[t];r?r.push({cardId:e.card,count:n}
15513):s[t]=[{cardId:e.card,count:n}]}}return{toBaseId:r,ownedByBase:i,wishByBase:l,ownedPrintingsByBase:s}}function s(e){if(!e)return"";const t=String(e).replace(/_[a-z]\d+$/i,""),n=r.SA.decks.cardFolder??"card";return`https://static.dotgg.gg/${i.Ay.TheGame}/${n}/${encodeURIComponent(t)}.webp`}},2793(e,t,n){var r=n(79063);const o={id:(0,r.n0)(),name:(0,r.n0)(),setId:(0,r.n0)(),number:(0,r.n0)(),displayName:(0,r.n0)(),rarity:(0,r.n0)(),cardtype:(0,r.n0)(),marketIds:(0,r.n0)(),image:(0,r.n0)(),color:(0,r.n0)(),cost:(0,r.n0)(),image_back:(0,r.n0)(),slug:(0,r.n0)(),hasback:(0,r.SA)(),priceType:(0,r.n0)("None"),price:(0,r.RJ)(),displayPrice:(0,r.n0)("N/A"),comparativePrice:(0,r.sX)(),comparativeNormalPrice:(0,r.sX)(),comparativeFoilPrice:(0,r.sX)(),foilPrice:(0,r.RJ)(),deltaPrice:(0,r.n0)(),deltaFoilPrice:(0,r.n0)(),delta7dPrice:(0,r.n0)(),delta7dPriceFoil:(0,r.n0)(),colorsList:(0,r.IW)(),deltaPricePercent:(0,r.sX)(),delta7dPricePercent:(0,r.sX)(),deltaFoilPricePercent:(0,r.sX)(),delta7dPriceFoilPercent:(0,r.sX)(),cardkingdomprice:(0,r.n0)(),cmid:(0,r.n0)(),cmPrice:(0,r.RJ)(),cmFoilPrice:(0,r.RJ)(),cmDeltaPrice:(0,r.n0)(),cmDeltaFoilPrice:(0,r.n0)(),cmDelta7dPrice:(0,r.n0)(),cmDelta7dPriceFoil:(0,r.n0)(),cmurl:(0,r.n0)(),currencySymbol:(0,r.n0)("$")};n.d(t,["o",0,o])},16724(e,t,n){function r(e){const t=e.replace("#",""),n=3===t.length?t.split("").map(e=>e+e).join(""):t;return(.299*parseInt(n.substring(0,2),16)+.587*parseInt(n.substring(2,4),16)+.114*parseInt(n.substring(4,6),16))/255>.5?"#1a1a1a":"#ffffff"}function o(e){return"#1a1a1a"===e?"0 1px 2px rgba(255, 255, 255, 0.2)":"0 1px 2px rgba(0, 0, 0, 0.3)"}n.d(t,{B_:()=>r,iz:()=>o})},62444(e,t,n){n.d(t,{z:()=>a});var r=n(86031),o=n(89629),i=n(65986);function a(e,t){let n={...i.dr};const a=t&&r.SA.cards.deckbuilderFilterDefaults||r.SA.cards.cardsFilterDefaults;if(a){const e=Object.keys(a);for(var l=0;l<e.length;l++){const t=e[l];void 0!==n[t]&&a[t]&&(n[t]=a[t])}}let s=Object.keys(e);for(var d=0;d<s.length;d++)void 0!==n[s[d]]?n[s[d]]=e[s[d]]:(0,o.yb)("getCardsRequest",`unknown parameter "${s[d]}"`);return n}},31432(e,t,n){n.d(t,{l:()=>a});var r=n(86031),o=n(91181),i=n(81616);function a(e){const t=t=>void 0===e||t.includes(e),n={},a=new Set;return i.F_.mapState(e=>{e.forEach(e=>{t(e.id)&&(n[e.id]=e.title,a.add(e.id.toLowerCase()))})}),!0!==r.SA.decks.serverSideCardsLibrary&&o.jb.mapState(e=>{e.forEach(e=>{(e.setsList?.length?e.setsList:[e.setId]).forEach(e=>{e&&!a.has(e.toLowerCase())&&t(e)&&(n[e]=`[${e}]`,a.add(e.toLowerCase()))})})}),n}},32699(e,t,n){n.d(t,{D:()=>a,Q:()=>l});var r=n(86031),o=n(4738);const i=e=>parseFloat(String(e??0))||0;function a(e){const t=Boolean(e.deltaPrice)&&null!=e.price&&0!==+e.price,n=Boolean(e.deltaFoilPrice)&&null!=e.foilPrice&&0!==+e.foilPrice;return t||n}function l(e){const t=r.SA.cards.priceProviders;let n=0,a=0,l=0,s=0,d=0,c=0,p="$";"cardmarket"===(t&&t.length>0&&((0,o.Ri)(t[0].cookieName)||r.SA.cards.defaultPriceProvider)||"tcgplayer")?(n=i(e.cmPrice),a=i(e.cmFoilPrice),l=i(e.cmDeltaPrice),s=i(e.cmDeltaFoilPrice),d=i(e.cmDelta7dPrice),c=i(e.cmDelta7dPriceFoil),p="â¬"):(n=i(e.price),a=i(e.foilPrice),l=i(e.deltaPrice),s=i(e.deltaFoilPrice),d=i(e.delta7dPrice),c=i(e.delta7dPriceFoil),p="$");const h=0===e.hasNormal||"0"===e.hasNormal||!1===e.hasNormal,[u,g,m,f]=h?[a,"Foil",n,"Normal"]:[n,"Normal",a,"Foil"];return u>0?(e.displayPrice=p+u.toFixed(u>100?1:2),e.comparativePrice=u,e.priceType=g):m>0?(e.displayPrice=p+m.toFixed(m>100?1:2),e.comparativePrice=m,e.priceType=f):(e.displayPrice="N/A",e.comparativePrice=0,e.priceType="None"),e.currencySymbol=p,e.comparativeNormalPrice=n,e.comparativeFoilPrice=a,e.deltaPricePercent=n>0?l/n:0,e.deltaFoilPricePercent=a>0?s/a:0,e.delta7dPricePercent=n>0?d/n:0,e.delta7dPriceFoilPercent=a>0?c/a:0,e}},87109(e,t,n){n.d(t,{KJ:()=>d,Np:()=>h,XY:()=>l,Yx:()=>x,ZG:()=>p,jg:()=>f,jn:()=>m});var r=n(4738),o=n(12434);const i="dotgg:set-active-binder",a="dotgg:reseed-binder";function l(){window.dispatchEvent(new CustomEvent(a))}const s=()=>`${o.Ay.TheGame}-active-binder`;function d(){const e=(0,r.Ri)(s()),t=e?parseInt(e,10):0;return Number.isFinite(t)&&t>0?t:0}const c=()=>`${o.Ay.TheGame}-deck-check-binder`;function p(){const e=(0,r.Ri)(c()),t=e?parseInt(e,10):0;return Number.isFinite(t)&&t>0?t:0}function h(e){const t=Number(e);(0,r.TV)(c(),String(Number.isFinite(t)&&t>0?t:0),30)}const u="dotgg:binder-sum-view";let g=null;function m(){return g}function f(e){g!==e&&(g=e,window.dispatchEvent(new CustomEvent(u,{detail:{scope:e}}
15513)))}function x(e){const t=Number(e),n=Number.isFinite(t)&&t>0?t:0;(0,r.TV)(s(),String(n),30),f(null),window.dispatchEvent(new CustomEvent(i,{detail:{binderId:n}}))}n.d(t,["C0",0,i,"In",0,u,"xc",0,a])},74079(e,t,n){n.d(t,{Zr:()=>a,xf:()=>i});const r=[{value:"#3b82f6",label:"Blue"},{value:"#ef4444",label:"Red"},{value:"#22c55e",label:"Green"},{value:"#14b8a6",label:"Teal"},{value:"#8b5cf6",label:"Purple"},{value:"#f59e0b",label:"Orange"},{value:"#ec4899",label:"Pink"},{value:"#eab308",label:"Yellow"},{value:"#06b6d4",label:"Cyan"},{value:"#64748b",label:"Slate"}],o=new Set(r.map(e=>e.value));function i(e){if(!e)return null;const t=e.trim().toLowerCase();return o.has(t)?t:null}function a(e){return i(e)??"var(--theme-palette-color-1)"}n.d(t,["gO",0,r])},15701(e,t,n){function r(e,t,n){const r=t>0||n>0;if(e?.extra_data)try{const t="string"==typeof e.extra_data?JSON.parse(e.extra_data):e.extra_data;return r?JSON.stringify({...t,listingTime:((new Date).getTime()/1e3).toFixed()}):"string"==typeof e.extra_data?e.extra_data:JSON.stringify(e.extra_data)}catch{return r?JSON.stringify({listingTime:((new Date).getTime()/1e3).toFixed()}):void 0}if(r)return JSON.stringify({listingTime:((new Date).getTime()/1e3).toFixed()})}n.d(t,{e:()=>r})},65562(e,t,n){n.d(t,{B6:()=>v,F0:()=>d,GB:()=>o,RX:()=>w,Ui:()=>c,WM:()=>s,jN:()=>y,kH:()=>p,sp:()=>m,sz:()=>i});var r=n(52464);function o(e,t){return function(e,t){const n=(0,r.hV)(t),o=n?e.find(e=>e.card===t):void 0,i=n?.[0];if(!n||!o||void 0===i)return e;const a={standard:o.standard,foil:o.foil,total:o.total,trade:o.trade,wish:o.wish,trade_foil:o.trade_foil??"0",wish_foil:o.wish_foil??"0"},l=e.slice();for(const e of n){const t=l.findIndex(t=>t.card===e),n={...(-1!==t?l[t]:void 0)??{...o,card:e},...a,card:e};e===i?delete n.twin_of:n.twin_of=i,-1!==t?l[t]=n:l.push(n)}return l}(function(e,t){const{card:n,type:r,trade:o,wish:i}=t,a="foil"===r?"trade_foil":"trade",l="foil"===r?"wish_foil":"wish",s=e.findIndex(e=>e.card===n),d=-1!==s?e[s]:void 0,c=Number(d?.[r]??0)||0,p=t.count??c,h=function(e,t,n,r){if(void 0!==r&&r!==n)return Math.max(0,r);const o=t-e;return o>0?Math.max(0,n-o):n}(c,p,Number(d?.[l]??0)||0,i);if(d){const t={...d,[r]:p.toString(),[a]:void 0!==o?o.toString():d[a]??"0",[l]:h.toString(),total:(+("foil"===r?p:d.foil)+ +("standard"===r?p:d.standard)).toString()},n=e.slice();return n[s]=t,n}const u={card:n,foil:"foil"===r?p.toString():"0",standard:"standard"===r?p.toString():"0",total:p.toString(),extra_data:"",trade:"0",wish:"0",trade_foil:"0",wish_foil:"0",[a]:o?o.toString():"0",[l]:h.toString()};return[...e,u]}(e,t),t.card)}function i(e){const t={owned:0,trade:0,wish:0};return(e??[]).forEach(e=>{(0,r.sf)(e)||(parseInt(e.standard||"0")+parseInt(e.foil||"0")>0&&(t.owned+=1),parseInt(e.trade||"0")+parseInt(e.trade_foil||"0")>0&&(t.trade+=1),parseInt(e.wish||"0")+parseInt(e.wish_foil||"0")>0&&(t.wish+=1))}),t}const a=e=>1===e||"1"===e||!0===e,l=e=>null!=e&&parseFloat(String(e))>0;function s(e){const t=a(e.hasNormal)||a(e.hasFoil);return{hasNonFoilPrice:void 0!==e.hasNormal&&t?a(e.hasNormal):l(e.price),hasFoilPrice:void 0!==e.hasFoil&&t?a(e.hasFoil):l(e.foilPrice)}}function d(e){if(!e)return"standard";const{hasNonFoilPrice:t,hasFoilPrice:n}=s(e);return!t&&n?"foil":"standard"}function c(e){if(!e)return{};try{return"string"==typeof e?JSON.parse(e):e}catch(e){return{}}}function p(e){const t=c(e);return t?.customTags&&Array.isArray(t.customTags)?t.customTags:[]}const h=new WeakMap,u=[],g=new WeakMap;function m(e){const t=e??u;let n=g.get(t);if(!n){const e=new Map;for(const n of t)for(const t of x(n)){const n=t.name.toLowerCase();e.has(n)||e.set(n,t)}n=Array.from(e.values()),g.set(t,n)}return n}const f=e=>"object"==typeof e&&null!==e&&"string"==typeof e.name&&"string"==typeof e.color;function x(e){if(!e.extra_data)return[];let t;try{t="string"==typeof e.extra_data?JSON.parse(e.extra_data):e.extra_data}catch{return[]}if("object"!=typeof t||null===t||!("customTags"in t))return[];const n=t.customTags;return Array.isArray(n)?n.filter(f):[]}function v(e){const t=e??u;let n=h.get(t);return n||(n=new Map(t.map(e=>[e.card,e])),h.set(t,n)),n}function y(e){if(!e)return{ownership:"not-owned",secondary:null,customTags:[],tradeCount:0,wishCount:0};const t=parseInt(e.standard||"0")+parseInt(e.foil||"0"),n=parseInt(e.trade||"0")+parseInt(e.trade_foil||"0"),r=parseInt(e.wish||"0")+parseInt(e.wish_foil||"0");let o=null;return n>0?o="for-trade":r>0&&(o="in-wishlist"),{ownership:t>0?"owned":"not-owned",secondary:o,customTags:p(e.extra_data),tradeCount:n,wishCount:r}}function w(e){const t=new Map;
15513return e.forEach(e=>{e.extra_data&&p(e.extra_data).forEach(e=>{t.has(e.name.toLowerCase())||t.set(e.name.toLowerCase(),e)})}),Array.from(t.values())}},97589(e,t,n){n.d(t,{K:()=>o});const r={owned:"#64ac67ff",missing:"#dc8e4aff",notOwned:"#db6363ff",wishlisted:"#568ece"};function o(e){switch(e){case"owned":return r.owned;case"not-owned":return r.notOwned;case"missing":return r.missing;case"wishlisted":return r.wishlisted}}n.d(t,["f",0,r])},99907(e,t,n){n.d(t,{X3:()=>a,lI:()=>l});var r=n(26983),o=n(65562),i=n(54270);function a(e,t){if(!(t.collectionFilter&&0!==t.collectionFilter.length||t.alien))return e;const n=(a=t.collectionFilter??[],l=t.alien,{ownedRange:(0,i.fN)(a),hasOwned:a.includes("owned"),hasOwned1:a.includes("owned1"),hasOwnedSet:a.includes("ownedset"),hasOwned4:a.includes("owned4"),hasUnowned:!l&&a.includes("unowned"),hasWishlisted:a.includes("wishlisted"),hasTrade:a.includes("trade"),hasFoil:a.includes("foil"),hasNonFoil:a.includes("nonfoil"),hasInDeck:a.includes("in-deck"),hasNotInDeck:a.includes("not-in-deck"),customTags:a.filter(e=>e.startsWith("tag:")),languages:a.filter(e=>e.startsWith("lang:")).map(e=>e.substring(5).toLowerCase()),viewerOwned:a.includes("viewer-owned"),viewerUnowned:a.includes("viewer-unowned"),viewerWishlisted:a.includes("viewer-wishlisted"),viewerTrade:a.includes("viewer-trade"),viewerInDeck:a.includes("viewer-in-deck")});var a,l;const s={collectionMap:new Map(t.currentCollection.map(e=>[e.card,e])),viewerCollectionMap:new Map((t.viewerCollection??[]).map(e=>[e.card,e])),deckCardCounts:t.deckCardCounts,maxCardsInCollection:t.maxCardsInCollection,alien:t.alien};return e.filter(e=>function(e,t,n){const a=n.collectionMap.get(e),l={total:a?+a.total:0,wish:a?+a.wish+ +(a.wish_foil||0):0,trade:a?+a.trade+ +(a.trade_foil||0):0,foil:a?+(a.foil||0):0,standard:a?+(a.standard||0):0};if(n.alien&&0===l.total)return!1;const s=n.deckCardCounts?.[e],d=function(e,t,n,r){return e.hasOwned&&t.total>0||e.hasOwned1&&t.total>=1&&t.total<r||e.hasOwnedSet&&t.total===r||e.hasOwned4&&t.total>r||e.hasUnowned&&0===t.total||e.hasWishlisted&&t.wish>0||e.hasTrade&&t.trade>0||e.hasFoil&&t.foil>0||e.hasNonFoil&&t.standard>0||e.hasInDeck&&!!n||e.hasNotInDeck&&!n}(t,l,s,n.maxCardsInCollection),c=function(e,t,n){const r=t?parseInt(t.standard||"0")+parseInt(t.foil||"0"):0,o=t?parseInt(t.wish||"0")+parseInt(t.wish_foil||"0"):0,i=t?parseInt(t.trade||"0")+parseInt(t.trade_foil||"0"):0;return e.viewerOwned&&r>0||e.viewerUnowned&&0===r||e.viewerWishlisted&&o>0||e.viewerTrade&&i>0||e.viewerInDeck&&!!n}(t,n.viewerCollectionMap.get(e),s),p=function(e,t){if(0===e.customTags.length||!t?.extra_data)return!1;const n=(0,o.kH)(t.extra_data);return e.customTags.some(e=>{const t=e.substring(4);return n.some(e=>e.name.toLowerCase()===t.toLowerCase())})}(t,a),h=function(e,t){if(0===e.languages.length)return!1;const n=(0,r.Pi)(t);return!(n<=0)&&e.languages.some(e=>(0,r.zn)(t,n,e)>0)}(t,a),u=!t.ownedRange||(0,i.on)(l.total,t.ownedRange),g=function(e){return e.hasOwned||e.hasOwned1||e.hasOwnedSet||e.hasOwned4||e.hasUnowned||e.hasWishlisted||e.hasTrade||e.hasFoil||e.hasNonFoil||e.hasInDeck||e.hasNotInDeck||e.customTags.length>0||e.languages.length>0}(t),m=u&&(!g||d||p||h),f=null!=t.ownedRange||g;return function(e){return e.viewerOwned||e.viewerUnowned||e.viewerWishlisted||e.viewerTrade||e.viewerInDeck}(t)?f?c&&m:c:m}(e.id,n,s))}function l(e,t,n){const r=new Map;for(const e of t)r.set(e.card,+e.total);const o=new Array(n+1).fill(0);for(const t of e){const e=r.get(t.id)??0,i=Number.isFinite(e)&&e>0?Math.floor(e):0,a=i>=n?n:i;o[a]=(o[a]??0)+1}return o}},73918(e,t,n){n.d(t,{Q:()=>a});var r=n(87109),o=n(65562),i=n(81616);function a(e){if(window.DotGGUser&&0!==(0,r.KJ)())return null;const t=i.Ab.getState().get();if(!t?.collection)return null;const n=(0,o.GB)(t.collection,e);return i.Ab.updateState({...t,collection:n}),n}},91995(e,t,n){var r=n(17402);const o=(0,r.q6)(null);let i=null;n.d(t,["$S",0,(e,t)=>{i&&i.showToast("info",e,t)},"GF",0,(e,t)=>{i&&i.showToast("success",e,t)},"Ni",0,(e,t)=>{i&&i.showToast("error",e,t)},"RM",0,e=>{i=e},"Z0",0,({children:e})=>{const[t,n]=(0,r.J0)(null),i=(0,r.hb)((e,t,r)=>{const o=Date.now().toString();n({id:o,type:e,message:t,duration:r||3e3})},[]),a=(0,r.hb)(()=>{n(null)},[]),l=r.Ay.useMemo(()=>({toast:t,showToast:i,hideToast:a}),[t,i,a]);return r.Ay.createElement(o.Provider,{value:l},e)},"fq",0,()=>null!==i,"rQ",0,(e,t)=>{i&&i.showToast("warning",e,t)},"v4",0,()=>{const e=(0,r.NT)(o);if(!e)throw new Error("useCollectionToast must be used within CollectionToastProvider");return e}])},52464(e,t,n){n.d(t,{Gl:()=>i,hV:()=>l,qe:()=>a,sf:()=>s});let r=new Map,o=new Map;function i(e){if(r=new Map,o=new Map,e&&"object"==typeof e&&!Array.isArray(e))for(const[t,n]of Object.entries(e)){if("string"!=typeof n||""===n)continue;r.set(t,n);const e=o.get(n)??[n];t===n||e.includes(t)||e.push(t),o.set(n,e)}}function a(e){return r.get(e)}function l(e){const t=r.get(e);return void 0===t?void 0:o.get(t)}function s(e){return!!e?.twin_of}},57966(e,t,n){n.d(t,{By:()=>d,Qn:()=>l,eC:()=>s});var r=n(86031),o=n(4738);const i=e=>parseFloat(String(e??0))||0;function a(){const e=r.SA.cards.priceProviders;return"cardmarket"===(e&&e.length>0&&((0,o.Ri)(e[0].cookieName)||r.SA.cards.defaultPriceProvider)||"tcgplayer")}function l(){return a()?"â¬":"$"}function s(e,t){if(!e)return 0;const n=a(),r=i(n?e.cmPrice:e.price),o=i(n?e.cmFoilPrice:e.foilPrice),l="foil"===t?o:r;return l>0?l:i(e.comparativePrice)}function d(e){return l()+e.toFixed(2)}},32634(e,t,n){n.d(t,{$3:()=>l,h5:()=>a});var r=n(80649),o=n(93346);const i=e=>{const t=Number(e??0);return Number.isFinite(t)&&t>0?Math.floor(t):0};function a(e,t,n){return i("trade"===t?"foil"===n?e?.trade_foil:e?.trade:"foil"===n?e?.wish_foil:e?.wish)}async function l(e,t){const n=function(e){const t=new Map;for(const n of e){const e=`${n.card}|${n.edition}`,r=t.get(e)??{card:n.card,type:n.edition};r[n.kind]=i(n.value),t.set(e,r)}return[...t.values()]}("function"==typeof e?e((await(0,r.d)()).collection):e);let a=0,l=!1;for(let e=0;e<n.length;e+=500){const r=n.slice(e,e+500),i=await(0,o.v)(r,t);if(!1!==i.error)throw new Error(i.error_text||"Could not update your lists.");a+=i.processed??r.length,l=l||(0,o.O)(i)}return{written:a,partial:l}}n.d(t,["BJ",0,(e,t)=>i("foil"===t?e?.foil:e?.standard)])},73734(e,t,n){n.d(t,{RX:()=>l,wg:()=>
15513i,x5:()=>a});var r=n(86031);const o=(e,t)=>{const n=t.trim().toLowerCase();return Object.keys(e??{}).find(e=>e.toLowerCase()===n)};function i(e){const t=r.SA.cards.rarityNames,n=o(t,e)??e,i=t?.[n]??n,a=n.length<=4&&n===n.toUpperCase();return{value:n,label:a?n:i,icon:r.SA.cards.rarityIcons?.[n]}}function a(e){return o(r.SA.cards.setNames?.(),e)??e.toUpperCase()}function l(e){return e?e.open?`owned ${e.min} or more`:e.min===e.max?`owned ${e.min}`:`owned ${e.min}â${e.max}`:"any owned count"}},84031(e,t,n){n.d(t,{Aq:()=>d,P9:()=>s,wh:()=>c});var r=n(4738),o=n(55612),i=n(12434);n(32634);const a=e=>`/cgfw/${e}?game=${i.Ay.TheGame.toLowerCase()}`,l=e=>({url:`https://api.dotgg.gg${a(e)}`,headers:(0,r.z5)()});async function s(){const e=await o.A.get(a("listrules"),void 0,l("listrules"));if(e.error)throw new Error(e.error_text||"Could not load your saved rules.");return{rules:e.rules??[],linked:!0===e.linked}}async function d(e){const t=await o.A.post(a("listrulesave"),e,{...l("listrulesave"),retry:!1});if(t.error||!t.rule)throw new Error(t.error_text||"Could not save the rule.");return t.rule}async function c(e){const t=await o.A.post(a("listruledelete"),e,{...l("listruledelete"),retry:!1});if(t.error)throw new Error(t.error_text||"Could not turn the rule off.")}},22560(e,t,n){n.d(t,{S:()=>i});var r=n(17402),o=n(87109);function i(){const[e,t]=(0,r.J0)(o.jn);return(0,r.vJ)(()=>{const e=()=>t((0,o.jn)());return window.addEventListener(o.In,e),e(),()=>window.removeEventListener(o.In,e)},[]),e}},97530(e,t,n){n(68261)},68261(e,t,n){var r=n(10201);!function(){function e(e,t){const n=String(this);if("[object RegExp]"===Object.prototype.toString.call(e))return n.replace(e,t);const r=String(e);if("function"==typeof t){const e=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return n.replace(new RegExp(e,"g"),t)}return n.split(r).join(String(t))}try{Object.defineProperty(String.prototype,"replaceAll",{value:e,writable:!1,configurable:!1,enumerable:!1})}catch{try{String.prototype.replaceAll=e}catch{}}}();var o=n(14730),i=n(80649),a=n(37017),l=n(76052);function s(e){try{return!!l.Ar.getItem("dotgg_token")&&l.Ar.getItem("dotgg_site")===e}catch{return!1}}let d=-1,c=null;function p(){if(c=null,document.body.classList.contains("adthrive-disable-all"))return;const e=document.querySelectorAll(".raptive-dotgg-comment").length;if(0===e||e===d)return;d=e;const t=window.adthrive??={};(t.cmd??=[]).push(()=>{t.reinsertAds?.()})}var h=n(17402);const u="data-panel-stop";function g(e,t){if("Escape"===e.key)return e.preventDefault(),e.stopPropagation(),void t();if("ArrowDown"!==e.key&&"ArrowUp"!==e.key&&"Home"!==e.key&&"End"!==e.key)return;const n=[...e.currentTarget.querySelectorAll(`[${u}]`)];if(0===n.length)return;e.preventDefault();const r=n.findIndex(e=>e===document.activeElement),o=n.length-1,i="Home"===e.key?0:"End"===e.key?o:"ArrowDown"===e.key?Math.min(o,r+1):Math.max(0,r-1);n[i]?.focus()}function m(e){e?.querySelector(`[${u}]`)?.focus({preventScroll:!0})}function f(e,t,n){const r=(0,h.li)(n);r.current=n,(0,h.vJ)(()=>{if(!e)return;const n=e=>{e.target instanceof Node&&t.current?.contains(e.target)||r.current(!1)},o=e=>{"Escape"===e.key&&r.current(!0)},i=()=>r.current(!1);return document.addEventListener("mousedown",n),document.addEventListener("keydown",o),window.addEventListener("popstate",i),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("keydown",o),window.removeEventListener("popstate",i)}},[e,t])}var x=n(70213),v=n(20347),y=n(34139),w=n(72134),b=n(54155),$=n(66556);function k({phone:e,onNavigate:t}){const{elsewhere:n}=(0,$.Dl)(),{dmUnread:o,dmRequests:i}=(0,w.N)(),a=(0,v.$)("messages"),l=[o>0?`${o} unread`:"",i>0?`${i} request${1===i?"":"s"}`:""].filter(Boolean).join(" · ");return 0!==n.length||a?(0,r.FD)(b.NM,{$phone:e,children:[(0,r.Y)(y.GZ,{items:n,phone:e}),a&&(0,r.FD)(b.hg,{href:a,"data-native":"","data-panel-stop":"",$phone:e,onClick:t,children:[!e&&(0,r.Y)(x.pj,{size:16}),(0,r.Y)("strong",{children:"Messages"}),l&&(0,r.Y)("span",{children:l}),(0,r.Y)(x.Vj,{size:16})]})]}):null}var Y=n(63679),A=n(63346),C=n(28297),F=n(30821),D=n(26675);const S=Y.Ay.div` 15514 position: relative; 15515 display: inline-flex; 15516`,I=Y.Ay.button` 15517 position: relative; 15518 display: inline-flex; 15519 align-items: center; 15520 justify-content: center; 15521 width: 36px; 15522 height: 36px; 15523 padding: 0; 15524 border: none; 15525 border-radius: 6px; 15526 background: ${e=>e.$open?D.A:"none"}; 15527 box-shadow: inset 0 0 0 1px var(--theme-palette-color-5); 15528 color: ${e=>e.$open?"var(--theme-palette-color-1)":"var(--theme-palette-color-4)"}; 15529 cursor: pointer; 15530 &:hover { 15531 color: var(--theme-palette-color-1); 15532 } 15533 &:focus-visible { 15534 ${F.I} 15535 } 15536 svg { 15537 display: block; 15538 } 15539 @media (pointer: coarse) { 15540 min-width: ${44}px; 15541 min-height: ${44}px; 15542 margin: -4px; 15543 } 15544`,z=Y.Ay.span` 15545 position: absolute; 15546 top: ${e=>e.$phone?"5px":"-3px"}; 15547 right: ${e=>e.$phone?"3px":"-5px"}; 15548 min-width: 17px; 15549 height: 17px; 15550 padding: 0 4px; 15551 box-sizing: border-box; 15552 border-radius: 9px; 15553 border: 2px solid var(--theme-palette-color-8); 15554 background: ${F.Q.unread}; 15555 color: ${F.Q.onAccent}; 15556 font-size: 10px; 15557 font-weight: 700; 15558 line-height: 13px; 15559 text-align: center; 15560 pointer-events: none; 15561 user-select: none; 15562`,T=Y.Ay.div` 15563 position: absolute; 15564 top: calc(100% + 6px); 15565 right: 0; 15566 z-index: 9999; 15567 display: flex; 15568 flex-direction: column; 15569 width: 392px; 15570 max-width: calc(100vw - 16px); 15571 background: var(--theme-palette-color-8); 15572 border: 1px solid var(--theme-palette-color-5); 15573 border-radius: 8px; 15574 box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); 15575 overflow: hidden; 15576 text-align: left; 15577`,E=Y.Ay.div` 15578 display: flex; 15579 align-items: center; 15580 gap: 10px; 15581 padding: 12px 12px 10px 16px; 15582 border-bottom: 1px solid ${F.Q.rowRule}; 15583 h2 { 15584 margin: 0; 15585 font-size: 15px; 15586 font-weight: 700; 15587 line-height: 1.3; 15588 color: var(--theme-palette-color-4); 15589 } 15590 > span { 15591 min-width: 0; 15592 overflow: hidden; 15593 text-overflow: ellipsis; 15594 white-space: nowrap; 15595 font-size: 12px; 15596 color: var(--theme-palette-color-3); 15597 } 15598`,L=Y.AH` 15599 display: inline-flex; 15600 align-items: center; 15601 justify-content: center; 15602 flex: none; 15603 border: none; 15604 border-radius: 6px; 15605 background: none; 15606 cursor: pointer; 15607 text-decoration: none; 15608 &:hover:not(:disabled) { 15609 background: ${D.A}; 15610 } 15611 &:focus-visible { 15612 ${F.I} 15613 } 15614`,M=Y.Ay.button` 15615 ${L} 15616 height: ${e=>e.$phone?44:32}px; 15617 padding: 0 ${e=>e.$phone?12:10}px; 15618 color: var(--theme-palette-color-1); 15619 font-family: inherit; 15620 font-size: ${e=>e.$phone?"14px":"12.5px"}; 15621 font-weight: 700; 15622 white-space: nowrap; 15623 &:disabled { 15624 opacity: 0.6; 15625 cursor: default; 15626 } 15627`,N=Y.Ay.a` 15628 ${L} 15629 width: 32px; 15630 height: 32px; 15631 color: var(--theme-palette-color-3); 15632 &:hover { 15633 color: var(--theme-palette-color-4); 15634 } 15635`,P=Y.Ay.span` 15636 flex: 1; 15637`,O=Y.Ay.div` 15638 padding: 10px 16px 0; 15639 font-size: 13px; 15640 color: ${F.Q.danger}; 15641`,_=Y.Ay.div` 15642 max-height: min(600px, calc(100vh - 240px)); 15643 overflow-y: auto; 15644 overscroll-behavior: contain; 15645 padding: 4px 6px 6px; 15646`,R=Y.Ay.div` 15647 display: flex; 15648 flex-direction: column; 15649 align-items: center; 15650 gap: 8px; 15651 padding: ${e=>e.$phone?"32px 28px":"28px 28px 24px"}; 15652 text-align: center; 15653 > i { 15654 display: inline-flex; 15655 align-items: center; 15656 justify-content: center; 15657 width: 44px; 15658 height: 44px; 15659 border-radius: 50%; 15660 background: ${D.A}; 15661 color: var(--theme-palette-color-3); 15662 } 15663 strong { 15664 font-size: ${e=>e.$phone?"15px":"14px"}; 15665 font-weight: 700; 15666 color: var(--theme-palette-color-4); 15667 } 15668 p { 15669 margin: 0; 15670 font-size: ${e=>e.$phone?"13.5px":"12.5px"}; 15671 line-height: 1.5; 15672 color: var(--theme-palette-color-3); 15673 text-wrap: pretty; 15674 } 15675`,j=(0,Y.Ay)(A.tA)` 15676 margin-top: 6px; 15677 height: 32px; 15678 padding: 0 12px; 15679 font-size: 12.5px; 15680 font-weight: 600; 15681 @media only screen and ${C.E0} { 15682 height: ${44}px; 15683 padding: 0 16px; 15684 font-size: 14px; 15685 } 15686`;
15686var J=n(93015),B=n(56245),K=n(61204),W=n(59408),U=n(78058),Q=n(31777),G=n(76521);const H=e=>"pending"===e.status&&"incoming"===e.direction;function q(e,t=Date.now()){const n=[],r=[];for(const o of e.trade)(H(o)?n:r).push(X(o,t));var o,i;n.push(...function(e,t){const n=(0,v.$)("requests");if(!n||e<=0)return[];const r="Message request · you haven't talked before",o=t.map(e=>{const t=`${n}&c=${e.id}`;return{key:`dm-request-${e.id}`,href:t,mark:e.user.avatar?{kind:"avatar",src:e.user.avatar}:{kind:"glyph",glyph:"msg",trade:!1},title:`${e.user.nickname} wants to message you`,fact:r,time:e.created,unread:!1,action:{kind:"link",label:"Review request",href:t}}}),i=e-t.length;if(i>0){const e=1===i;o.push({key:"dm-requests",href:n,mark:{kind:"glyph",glyph:"msg",trade:!1},title:t.length>0?`${i} more ${e?"person wants":"people want"} to message you`:e?"Someone wants to message you":`${i} people want to message you`,fact:e?r:"Message requests · you haven't talked before",time:null,unread:!1,action:{kind:"link",label:e?"Review request":"Review requests",href:n}})}return o}(e.dmRequests,e.dmRequestRows)),e.tradeMatches>0&&r.push(function(e,t){const n=t.map(e=>(0,G.pr)(e)?.name).filter(e=>!!e).slice(0,2),r=Math.max(0,e-n.length);return{key:"trade-matches",href:"/trade/matches/",mark:{kind:"glyph",glyph:"listed",trade:!0},title:1===e?"A card on your wishlist was just listed":`${e} cards on your wishlist were just listed`,fact:n.length>0?`${n.join(", ")}${r>0?` and ${r} more`:""}`:"On the trade hub now",time:null,unread:!0,action:{kind:"link",label:"See who has them",href:"/trade/matches/"}}}(e.tradeMatches,e.matchCards)),(0,$.WP)(e)&&e.intro&&r.push((o=e.intro,i=(0,$.jx)(e),{key:"trade-intro",href:"/trade/matches/",mark:{kind:"glyph",glyph:"swap",trade:!0},title:"New: the Trade Hub",fact:o.wish>0?`See who has the ${o.wish} card${1===o.wish?"":"s"} on your wishlist, and trade for them`:o.trade>0?"Players want cards you list for trade: see who, and send an offer":"Find players who have the cards you want, and swap your spares",time:null,unread:i,action:{kind:"link",label:"Open the hub",href:"/trade/matches/"}}));for(const t of e.follows)r.push(re(t));for(const t of e.items)r.push(oe(t));r.sort((e,t)=>(t.time??1/0)-(e.time??1/0));const a=new Date(t);a.setHours(0,0,0,0);const l=a.getTime()/1e3;return{needs:n,today:r.filter(e=>null===e.time||e.time>=l),earlier:r.filter(e=>null!==e.time&&e.time<l)}}function V(e,t=Date.now()){if(null===e)return"";const n=Math.max(0,t/1e3-e);if(n<60)return"now";if(n<3600)return`${Math.floor(n/60)}m`;const r=new Date(1e3*e),o=new Date(t),i=Math.round((new Date(o.getFullYear(),o.getMonth(),o.getDate()).getTime()-new Date(r.getFullYear(),r.getMonth(),r.getDate()).getTime())/864e5);return i<=0?`${Math.floor(n/3600)}h`:1===i?"Yesterday":i<7?r.toLocaleDateString("en-US",{weekday:"short"}):r.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function X(e,t){const n=H(e),r=`/trade/inbox/${e.id}/`;return{key:`trade-${e.id}`,href:r,mark:e.avatar?{kind:"avatar",src:e.avatar}:{kind:"glyph",glyph:Z(e),trade:!0},title:ee(e),fact:te(e,t),time:e.updated,unread:!0,action:n?{kind:"link",label:"Answer offer",href:r,primary:!0}:void 0}}function Z(e){return"accepted"===e.status||"completed"===e.status?"check":"expired"===e.status?"clock":"swap"}function ee(e){switch(e.status){case"pending":return"incoming"===e.direction?`${e.nickname} sent you a trade offer`:`${e.nickname} replied to your offer`;case"accepted":return`${e.nickname} accepted your trade`;case"completed":return`${e.nickname} marked your trade as done`;case"declined":return`${e.nickname} declined your trade offer`;case"cancelled":return`${e.nickname} cancelled a trade`;case"expired":return"outgoing"===e.direction?`Your offer to ${e.nickname} expired`:`${e.nickname}'s offer to you expired`}}function te(e,t){switch(e.status){case"pending":{if("incoming"!==e.direction)return"New message in the thread";const n=void 0!==e.get&&void 0!==e.give?`You get ${e.get} · you give ${e.give}`:"Waiting for your answer",r=(0,Q.fk)(e,t/1e3);return null===r?n:`${n} · ${0===r?"expires today":`expires in ${r} day${1===r?"":"s"}`}`}case"accepted":return e.friend_code?`${(0,G.xd)().friendCode?.label??"Friend ID"} ${(0,G.Vh)(e.friend_code)} · add them in the game`:"Arrange the swap in the thread";case"completed":return"Update your collection";case"expired":return"No answer in 14 days";default:return"The offer is closed"}}const ne={follow_thread:"msg",follow_user:"user",follow_archetype:"cards",follow_tournaments:"trophy",follow_news:"news",dm_message:"msg",follow_announcement:"news"};function re(e){const t="follow_announcement"===e.kind,[n,r]=t&&!e.snippet?function(e){const t=/^(.+?[.!?])\s+(\S.*)$/s.exec(e.trim());return t?.[1]&&t[2]?[t[1].replace(/\.$/,""),t[2]]:[e,""]}(e.title):[e.title,e.snippet],o="dm"!==e.topic.type&&"announcement"!==e.topic.type;return{key:`follow-${e.id}`,href:e.url||"#",mark:t?{kind:"crown"}:e.avatar?{kind:"avatar",src:e.avatar}:{kind:"glyph",glyph:ne[e.kind],trade:!1},title:n,fact:r,time:e.created,unread:e.unseen,action:o?{kind:"unfollow",item:e}:void 0}}function oe(e){const t=e.body?`â${function(e,t){return e.length>t?`${e.slice(0,t-1)}â¦`:e}(e.body,e.page_title?36:90)}â`:"",n="reply"===e.type,r=n?e.author_nickname?`${e.author_nickname} replied to your comment`:"New reply to your comment":`Your comment reached ${e.threshold}
15686 upvotes`,o=n?[t,e.page_title].filter(Boolean).join(" · "):e.page_title??t;return{key:`comment-${e.id}`,href:e.page_url||"#",mark:n&&e.author_avatar?{kind:"avatar",src:e.author_avatar}:{kind:"glyph",glyph:n?"msg":"star",trade:!1},title:r,fact:o,time:e.created_at,unread:e.unseen}}const ie={swap:x.hR,check:x.iW,listed:x.lW,msg:x.pj,star:x.aG,clock:x._L,news:x.b_,trophy:x.gW,user:x.vg,cards:x.sm};function ae({row:e,unread:t,phone:n,wrapFact:o,onNavigate:i}){return(0,r.FD)(D.y6,{role:"listitem",$phone:n,children:[(0,r.Y)(le,{mark:e.mark,phone:n}),(0,r.FD)(D.NJ,{$phone:n,children:[(0,r.Y)(D.pJ,{href:e.href,"data-native":"","data-panel-stop":"",$phone:n,$unread:t,onClick:i,children:e.title}),e.fact&&(0,r.Y)(D.Pr,{$phone:n,$wrap:o,children:e.fact}),e.action&&(0,r.Y)(D.dS,{$phone:n,children:(0,r.Y)(se,{action:e.action,onNavigate:i})})]}),(0,r.FD)(D.cW,{$phone:n,children:[null!==e.time&&(0,r.Y)("time",{dateTime:new Date(1e3*e.time).toISOString(),children:V(e.time)}),t&&(0,r.Y)(D.XV,{role:"img","aria-label":"Unread"})]})]})}function le({mark:e,phone:t}){if("avatar"===e.kind)return(0,r.Y)(D.dC,{src:(0,W.T)(e.src),alt:"",loading:"lazy",$phone:t});if("crown"===e.kind)return(0,r.Y)(D.Yx,{$crown:!0,$phone:t,"aria-hidden":"true",children:(0,r.Y)(K.g,{icon:U.z})});const n=ie[e.glyph];return(0,r.Y)(D.Yx,{$trade:e.trade,$phone:t,"aria-hidden":"true",children:(0,r.Y)(n,{size:t?18:16})})}function se({action:e,onNavigate:t}){if("unfollow"===e.kind){const{item:t}=e,n=async()=>{"dm"!==t.topic.type&&"announcement"!==t.topic.type&&(await(0,J.So)({type:t.topic.type,game:t.topic.game,key:t.topic.key},!1,"",""),(0,$.NL)(t.id))};return(0,r.Y)(B.n,{variant:"secondary",size:"xs",inline:!0,busyLabel:"Unfollowingâ¦",retryLabel:"Retry",errorText:"Couldn't unfollow",title:"Stop these notifications",onAction:n,children:"Unfollow"})}const n=e.primary?A.jn:A.tA;return(0,r.Y)(n,{as:"a",href:e.href,$size:"xs","data-native":"",onClick:t,children:e.label})}function de({groups:e,isUnread:t,phone:n,onNavigate:o}){const i=[["needs","Needs you",e.needs],["today","Today",e.today],["earlier","Earlier",e.earlier]];return(0,r.Y)(r.FK,{children:i.filter(([,,e])=>e.length>0).map(([e,i,a])=>{const l=`dotgg-bell-${n?"m":"d"}-${e}`;return(0,r.FD)("section",{"aria-labelledby":l,children:[(0,r.FD)(D.EQ,{$phone:n,$accent:"needs"===e,children:[(0,r.Y)("h3",{id:l,children:i}),"needs"===e&&!n&&(0,r.Y)("span",{children:"stays until you answer · Clear won't remove it"})]}),(0,r.Y)("div",{role:"list",children:a.map(i=>(0,r.Y)(ae,{row:i,unread:t(i),phone:n,wrapFact:n&&"needs"===e,onNavigate:o},i.key))})]},e)})})}function ce({phone:e,onNavigate:t}){const n=(0,v.$)("following");return(0,r.FD)(R,{$phone:e,children:[!e&&(0,r.Y)("i",{"aria-hidden":"true",children:(0,r.Y)(x.iW,{size:20})}),(0,r.Y)("strong",{children:"Youâre all caught up"}),(0,r.Y)("p",{children:"Replies to your comments, trade offers and news from what you follow land here."}),n&&(0,r.Y)(j,{as:"a",href:n,$size:"md","data-native":"","data-panel-stop":"",onClick:t,children:"What can I follow?"})]})}function pe({phone:e}){return(0,r.Y)("div",{"aria-busy":"true","aria-label":"Loading notifications",children:[0,1,2].map(t=>(0,r.FD)(D.A6,{$phone:e,children:[(0,r.Y)("span",{}),(0,r.FD)("div",{children:[(0,r.Y)("i",{}),(0,r.Y)("i",{})]})]},t))})}const he=e=>[...e.needs,...e.today,...e.earlier];function ue(e){return{unread:new Set(he(q(e)).filter(e=>e.unread).map(e=>e.key)),here:(0,$.$)(e),elsewhere:e.elsewhereUnseen,loaded:e.loaded}}function ge(e){const[t,n]=(0,h.J0)(()=>ue(e)),r=(0,h.li)(e);return r.current=e,(0,h.vJ)(()=>{(0,$.nX)(),r.current.loaded&&n(e=>e.loaded?e:ue(r.current))},[e.loaded]),{isUnread:e=>e.unread||t.unread.has(e.key),status:"failed"===e.clearing?"Couldn't clear. Try again.":[t.here>0?`${t.here} new here`:"",t.elsewhere>0?`${t.elsewhere} elsewhere`:""].filter(Boolean).join(" · ")}}function me(e){return e.items.length>0||e.follows.length>0||(0,$.WP)(e)}function fe({bell:e,phone:t,isUnread:n,onNavigate:o}){if(!e.loaded)return(0,r.Y)(pe,{phone:t});const i=q(e);return 0===he(i).length?(0,r.Y)(ce,{phone:t,onNavigate:o}):(0,r.Y)(de,{groups:i,isUnread:n,phone:t,onNavigate:o})}function xe({onClose:e}){const t=(0,$.Dl)(),{isUnread:n,status:o}=ge(t),i=(0,h.li)(null),a=(0,v.$)("notifications");return(0,h.vJ)(()=>{m(i.current)},[t.loaded]),(0,r.FD)(T,{ref:i,role:"dialog","aria-label":"Notifications",onKeyDown:t=>g(t,()=>e(!0)),children:[(0,r.FD)(E,{children:[(0,r.Y)("h2",{children:"Notifications"}),o&&(0,r.Y)("span",{children:o}),(0,r.Y)(P,{}),me(t)&&(0,r.Y)(M,{type:"button",onClick:()=>{(0,$.XI)()},disabled:"busy"===t.clearing,children:"busy"===t.clearing?"Clearingâ¦":"Clear"}),a&&(0,r.Y)(N,{href:a,"data-native":"","aria-label":"Notification settings",title:"Notification settings",children:(0,r.Y)(x.Ni,{size:16})})]}),(0,r.Y)(_,{children:(0,r.Y)(fe,{bell:t,isUnread:n,onNavigate:()=>e(!1)})}),(0,r.Y)(k,{onNavigate:()=>e(!1)})]})}function ve({onNavigate:e}){const t=(0,$.Dl)(),{isUnread:n}=ge(t);return(0,r.FD)("div",{onKeyDown:t=>g(t,e),children:["failed"===t.clearing&&(0,r.Y)(O,{role:"alert",children:"Couldnât clear. Try again."}),(0,r.Y)(fe,{bell:t,phone:!0,isUnread:n,onNavigate:e})]})}function ye(){const e=(0,$.Dl)();return me(e)?(0,r.Y)(M,{type:"button",$phone:!0,onClick:()=>{(0,$.XI)()},disabled:"busy"===e.clearing,children:"busy"===e.clearing?"Clearingâ¦":"failed"===e.clearing?"Try again":"Clear"}):null}const we=({game:e=""})=>{const t=(0,$.Dl)(e),[n,o]=(0,h.J0)(!1),i=(0,h.li)(null),a=(0,h.li)(null),l=(0,$.zi)(t),s=(e=!1)=>{o(!1),e&&i.current?.focus()};f(n,a,s),(0,h.vJ)(()=>{t.loaded&&i.current?.offsetParent&&(0,$.LN)()&&o(!0)},[t.loaded]);const d=l>0?`Notifications, ${l} new`:"Notifications";return(0,r.FD)(S,{ref:a,children:[(0,r.FD)(I,{ref:i,type:"button",$open:n,"aria-label":d,title:d,"aria-haspopup":"dialog","aria-expanded":n,onClick:()=>n?s():o(!0),children:[(0,r.Y)(x.pY,{size:20}),l>0&&(0,r.Y)(z,{"aria-hidden":"true",children:l>99?"99+":l})]}),n&&(0,r.Y)(xe,{onClose:s})]})};var be=n(42823),$e=n(65562),ke=n(222);const Ye=F.Q.hoverFill,Ae=Y.Ay.div` 15687 display: inline-flex; 15688 align-items: center; 15689 gap: ${e=>e.$phone?"0":"10px"}; 15690 margin: ${e=>e.$phone?"0 0 0 4px":"0 0 0 10px"}; 15691`,Ce=Y.Ay.div` 15692 position: relative; 15693 display: inline-flex; 15694`,Fe=Y.Ay.button` 15695 position: relative; 15696 display: inline-flex; 15697 align-items: center; 15698 justify-content: center; 15699 width: ${e=>e.$phone?44:36}px; 15700 height: ${e=>e.$phone?44:36}px; 15701 padding: 0; 15702 border: none; 15703 border-radius: 50%; 15704 background: none; 15705 cursor: pointer; 15706 &:hover img { 15707 opacity: 0.85; 15708 } 15709 &:focus-visible { 15710 ${F.I} 15711 } 15712`,De=Y.Ay.img` 15713 display: block; 15714 flex: none; 15715 width: ${e=>e.$size}px; 15716 height: ${e=>e.$size}px; 15717 border-radius: 50%; 15718 object-fit: cover; 15719 background: ${Ye}; 15720 ${e=>e.$premium&&"box-shadow: 0 0 0 2px var(--theme-palette-color-8), 0 0 0 3px var(--theme-palette-color-1);"} 15721`,Se=Y.Ay.div` 15722 position: absolute; 15723 top: calc(100% + 6px); 15724 right: 0; 15725 z-index: 9999; 15726 width: 280px; 15727 max-width: calc(100vw - 16px); 15728 background: var(--theme-palette-color-8); 15729 border: 1px solid var(--theme-palette-color-5); 15730 border-radius: 8px; 15731 box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); 15732 overflow: hidden; 15733 text-align: left; 15734`,Ie=Y.Ay.a` 15735 display: flex; 15736 align-items: center; 15737 gap: 10px; 15738 height: ${e=>e.$phone?52:44}px; 15739 padding: 0 ${e=>e.$phone?16:14}px; 15740 /* A strip darker than the panel on every palette (color-6 equals color-8 on dotgg.gg). */ 15741 background: ${F.Q.threadBg}; 15742 border-bottom: 1px solid ${F.Q.rowRule}; 15743 color: var(--theme-palette-color-4); 15744 font-size: ${e=>e.$phone?"15px":"13px"}; 15745 font-weight: 700; 15746 text-decoration: none; 15747 svg { 15748 color: var(--theme-palette-color-1); 15749 } 15750 &:hover { 15751 color: var(--theme-palette-color-4); 15752 background: color-mix(in srgb, var(--theme-palette-color-5) 45%, var(--theme-palette-color-8)); 15753 } 15754 &:focus-visible { 15755 outline: 2px solid var(--theme-palette-color-4); 15756 outline-offset: -2px; 15757 } 15758`,ze=Y.Ay.div` 15759 display: flex; 15760 align-items: center; 15761 gap: ${e=>e.$phone?"12px":"10px"}; 15762 padding: ${e=>e.$phone?"12px 16px 14px":"14px 14px 12px"}; 15763 min-width: 0; 15764 strong { 15765 display: block; 15766 overflow: hidden; 15767 text-overflow: ellipsis; 15768 white-space: nowrap; 15769 font-size: ${e=>e.$phone?"16px":"14px"}; 15770 font-weight: 700; 15771 color: var(--theme-palette-color-4); 15772 } 15773 span { 15774 display: block; 15775 font-size: ${e=>e.$phone?"13px":"12px"}; 15776 color: var(--theme-palette-color-3); 15777 } 15778`,Te=Y.Ay.nav` 15779 border-top: 1px solid ${F.Q.rowRule}; 15780 padding: ${e=>e.$phone?"0":"4px 0"}; 15781 & + & { 15782 padding-top: ${e=>e.$phone?"0":"4px"}; 15783 } 15784`,Ee=Y.AH` 15785 display: flex; 15786 align-items: center; 15787 gap: ${e=>e.$phone?"14px":"12px"}; 15788 width: 100%; 15789 height: ${e=>e.$phone?52:40}px; 15790 padding: 0 ${e=>e.$phone?16:14}px; 15791 box-sizing: border-box; 15792 border: none; 15793 background: none; 15794 font-family: inherit; 15795 font-size: ${e=>e.$phone?"15px":"13.5px"}; 15796 font-weight: 600; 15797 text-align: left; 15798 text-decoration: none; 15799 cursor: pointer; 15800 ${e=>e.$phone&&`border-bottom: 1px solid ${F.Q.rowRule};`} 15801 svg { 15802 flex: none; 15803 color: var(--theme-palette-color-3); 15804 } 15805 &:hover { 15806 background: ${Ye}; 15807 } 15808 &:focus-visible { 15809 outline: 2px solid var(--theme-palette-color-4); 15810 outline-offset: -2px; 15811 } 15812`,Le=Y.Ay.a` 15813 ${Ee} 15814 color: var(--theme-palette-color-4); 15815 &:hover { 15816 color: var(--theme-palette-color-4); 15817 } 15818 > b { 15819 margin-left: auto; 15820 min-width: ${e=>e.$phone?22:20}px; 15821 height: ${e=>e.$phone?20:18}px; 15822 padding: 0 ${e=>e.$phone?7:6}px; 15823 box-sizing: border-box; 15824 border-radius: 10px; 15825 background: ${F.Q.unread}; 15826 color: ${F.Q.onAccent}; 15827 font-size: ${e=>e.$phone?"12px":"11px"}; 15828 font-weight: 700; 15829 line-height: ${e=>e.$phone?20:18}px; 15830 text-align: center; 15831 } 15832 > em { 15833 margin-left: auto; 15834 font-style: normal; 15835 font-size: ${e=>e.$phone?"12.5px":"11.5px"}; 15836 font-weight: 500; 15837 color: ${F.Q.muted}; 15838 } 15839`,Me=Y.Ay.button` 15840 ${Ee} 15841 color: var(--theme-palette-color-3); 15842 border-bottom: none; 15843 &:disabled { 15844 cursor: progress; 15845 } 15846`,Ne=Y.Ay.p` 15847 margin: 0; 15848 padding: 0 ${e=>e.$phone?16:12}px 10px; 15849 font-size: ${e=>e.$phone?"13.5px":"12.5px"}; 15850 color: ${F.Q.danger}; 15851`,Pe=Y.Ay.div` 15852 border-top: 1px solid ${F.Q.rowRule}; 15853 background: var(--theme-palette-color-8); 15854`,Oe=Y.Ay.a` 15855 position: relative; 15856 display: inline-flex; 15857 align-items: center; 15858 height: 36px; 15859 margin-left: 4px; 15860 padding: 0 12px; 15861 border-radius: 6px; 15862 background: var(--theme-palette-color-1); 15863 color: ${F.Q.onAccent}; 15864 font-size: 13.5px; 15865 font-weight: 700; 15866 line-height: 1; 15867 white-space: nowrap; 15868 text-decoration: none; 15869 &::before { 15870 content: ""; 15871 position: absolute; 15872 inset: -4px 0; 15873 } 15874 /* A darker accent, not color-2: color-2 IS color-1 on dotgg.gg and riftbound.gg. */ 15875 &:hover { 15876 background: ${F.Q.accentHover}; 15877 } 15878 &:focus-visible { 15879 ${F.I} 15880 } 15881`;var _e=n(7204),Re=n(2347);function je(e){const[t,n]=(0,h.J0)(!1),[o,i]=(0,h.J0)(""),a=e.phone?18:16;return(0,r.FD)(r.FK,{children:[e.back&&(0,r.FD)(Ie,{href:e.back.url,"data-native":"","data-panel-stop":"",$phone:e.phone,onClick:e.onNavigate,children:[(0,r.Y)(x.gu,{size:16}),"Back to ",e.back.label]}),(0,r.FD)(ze,{$phone:e.phone,children:[(0,r.Y)(De,{src:e.avatar,alt:"",$size:e.phone?44:40,$premium:e.premium}),(0,r.FD)("div",{children:[(0,r.Y)("strong",{children:e.nick||"Your account"}),(0,r.Y)("span",{children:e.subline})]})]}),e.extra,(0,r.Y)(Te,{$phone:e.phone,"aria-label":"Account",children:e.items.map(({key:t,label:n,href:o,Icon:i,badge:l=0,sub:s})=>(0,r.FD)(Le,{href:o,"data-native":"","data-panel-stop":"",$phone:e.phone,onClick:e.onNavigate,children:[(0,r.Y)(i,{size:a}),n,l>0&&(0,r.Y)("b",{"aria-label":`${l} new`,children:l>99?"99+":l}),0===l&&s&&(0,r.Y)("em",{children:s})]},t))}),(0,r.FD)(Te,{$phone:e.phone,children:[(0,r.FD)(Me,{type:"button","data-
15881panel-stop":"",$phone:e.phone,disabled:t,onClick:()=>{(async()=>{n(!0),i("");try{await e.onSignOut()}catch(e){n(!1),i(e instanceof Error&&e.message?e.message:"Could not sign you out. Please try again.")}})()},children:[(0,r.Y)(x.ZT,{size:a}),t?"Signing outâ¦":e.signOutLabel]}),o&&(0,r.Y)(Ne,{role:"alert",$phone:e.phone,children:o})]})]})}const Je=[{place:"profile",label:"Profile",Icon:x.vg},{place:"messages",label:"Messages",Icon:x.pj},{place:"trades",label:"Trades",Icon:x.hR},{place:"collection",label:"Collection",Icon:x.sm},{place:"settings",label:"Settings",Icon:x.Ni}];function Be({meta:e,avatar:t,premium:n,phone:o,omit:i=[],onNavigate:a}){const l=(0,w.N)(),s=e?.user.nickname??"",d=(0,$e.sz)(e?.collection).owned,c="hub"===(0,_e.ai)(),p={messages:l.dmUnread,trades:l.tradeUnread},h=Je.flatMap(({place:e,label:t,Icon:n})=>{const r=i.includes(e)?null:(0,v.$)(e,s);if(!r)return[];const o="collection"===e&&d>0?`${d.toLocaleString("en-US")} cards`:void 0;return[{key:e,label:t,href:r,Icon:n,badge:p[e],sub:o}]});return(0,r.Y)(je,{nick:s,subline:c?"dotgg.gg · your account":"DotGG account · every site",avatar:t,premium:n,back:c?(0,Re.l)():null,items:h,onSignOut:ke.Ax,signOutLabel:"Sign out of every site",phone:o,onNavigate:a})}var Ke=n(81616),We=n(62530);let Ue=!1;function Qe(){const e=(0,Ke.h3)();return(0,h.vJ)(()=>{Ue||"comments"!==(0,_e.ai)()||e?.user.nickname||(Ue=!0,(0,i.d)({commentsOnly:!0}).catch(()=>{}))},[e]),{meta:e,avatar:(0,W.T)(e?.user.usermeta?.avatar),premium:(0,We.WX)(e?.user)}}function Ge(){const{meta:e,avatar:t,premium:n}=Qe(),[o,i]=(0,h.J0)(!1),a=(0,h.li)(null),l=(0,h.li)(null),s=(0,h.li)(null),d=(e=!1)=>{i(!1),e&&a.current?.focus()};f(o,l,d),(0,h.vJ)(()=>{o&&m(s.current)},[o]);const c=e?.user.nickname??"";return(0,r.FD)(Ce,{ref:l,children:[(0,r.Y)(Fe,{ref:a,type:"button","aria-label":c?`Account menu, ${c}`:"Account menu",title:c||"Account","aria-haspopup":"dialog","aria-expanded":o,onClick:()=>o?d():i(!0),children:(0,r.Y)(De,{src:t,alt:"",$size:32})}),o&&(0,r.Y)(Se,{ref:s,role:"dialog","aria-label":"Account",onKeyDown:e=>g(e,()=>d(!0)),children:(0,r.Y)(Be,{meta:e,avatar:t,premium:n,onNavigate:()=>d()})})]})}var He=n(7718);function qe(){const e=(0,$.Dl)(),{meta:t,avatar:n,premium:o}=Qe(),[i,a]=(0,h.J0)(!1),l=(0,h.li)(null),s=(0,$.zi)(e),d=()=>a(!1);(0,h.vJ)(()=>{e.loaded&&l.current?.offsetParent&&(0,$.LN)()&&a(!0)},[e.loaded]);const c=t?.user.nickname??"",p=`Account and notifications${s>0?`, ${s} new`:""}${c?`, ${c}`:""}`;return(0,r.FD)(r.FK,{children:[(0,r.FD)(Fe,{ref:l,type:"button",$phone:!0,"aria-label":p,title:c||"Account","aria-haspopup":"dialog","aria-expanded":i,onClick:()=>a(!0),children:[(0,r.Y)(De,{src:n,alt:"",$size:30}),s>0&&(0,r.Y)(z,{$phone:!0,"aria-hidden":"true",children:s>99?"99+":s})]}),(0,r.Y)(He.er,{title:"Notifications",label:"Account and notifications",open:i,onOpenChange:e=>{e||d()},trigger:()=>null,heading:"large",tall:!0,returnFocusTo:l,headAction:(0,r.Y)(ye,{}),children:i&&(0,r.FD)(r.FK,{children:[(0,r.Y)(ve,{onNavigate:d}),(0,r.Y)(k,{phone:!0,onNavigate:d}),(0,r.Y)(Pe,{children:(0,r.Y)(Be,{meta:t,avatar:n,premium:o,phone:!0,omit:["messages"],onNavigate:d})})]})})]})}function Ve({device:e,theme:t}){const n=!!window.DotGGUser;return(0,h.Nf)(()=>{if(!t)return;if(!n)return function(e){const t=e.querySelector("a[href]");if(!t)return()=>{};const n=t.getAttribute("href"),r=()=>{t.href=(0,be.u)(window.location.href)};return r(),t.setAttribute("data-native",""),t.addEventListener("pointerdown",r),t.addEventListener("focus",r),()=>{t.removeEventListener("pointerdown",r),t.removeEventListener("focus",r),null!==n&&t.setAttribute("href",n)}}(t);const e=t.style.getPropertyValue("display");return t.style.setProperty("display","none","important"),()=>{e?t.style.setProperty("display",e):t.style.removeProperty("display")}},[t,n]),n?"mobile"===e?(0,r.Y)(Ae,{$phone:!0,children:(0,r.Y)(qe,{})}):(0,r.FD)(Ae,{children:[(0,r.Y)(we,{}),(0,r.Y)(Ge,{})]}):null}var Xe=n(74944),Ze=n(62637),et=n(9299),tt=n(97525),nt=n(29155),rt=n(79407),ot=n(55367),it=n(91995),at=n(4738),lt=n(18318);const st=[1,2,3,4,5,6,7,8,9,10,11,12],dt=e=>{const t=e.initialPosts,n=void 0!==t&&t.length>0,o=e.initialSource??"",[i,a]=(0,h.J0)(0),[l,s]=(0,h.J0)(!0),[d,c]=(0,h.J0)(!n),[p,u]=(0,h.J0)(t??[]),[g,m]=(0,h.J0)([]),[f,x]=(0,h.J0)(""),[v,y]=(0,h.J0)(Math.max(t?.length??0,20)),w=(0,h.li)(!1);(0,h.vJ)(()=>{let r=!0;""===o&&(0,tt.M)("https://api.dotgg.gg/get-znews-sites").then(e=>{r&&e&&m(e)});const i=void 0!==e.limit&&(t?.length??0)<e.limit;if(!n||i)(0,nt.K5)(1,void 0,""===o?void 0:o).then(e=>{r&&(u(e),a(1),s(e.length>40))}).catch(console.error).finally(()=>{r&&c(!1)});else{const n=Math.min(200,2*Math.max(t?.length??0,e.limit??20)),i=()=>{(0,nt.K5)(1,void 0,""===o?void 0:o,n).then(e=>{r&&!w.current&&0!==e.length&&u(e)}).catch(console.error)},a=window.requestIdleCallback;"function"==typeof a?a(i):window.setTimeout(i,3e3)}return()=>{r=!1}},[]);const b=[{value:"",label:"All Sites",element:(0,r.Y)("span",{style:{display:"flex",alignItems:"center",gap:6},children:"All Sites"})},...g.map(e=>
15881{const t=(0,at.iT)(e.name);return{value:e.siteId,label:t,element:(0,r.FD)("span",{style:{display:"flex",alignItems:"center",gap:6},children:[e.icon&&(0,r.Y)("img",{src:e.icon,alt:t,style:{width:18,height:18,objectFit:"contain"}}),t]})}})],$=(e,t)=>{if(d)return;w.current=!0;const n=void 0!==t?t:i,r=n+1,o=0===n;c(!0),(0,nt.K5)(r,void 0,""===e?void 0:e).then(e=>{s(e.length>40),u(o?e:[...p,...e]),a(r),y(e=>e+20)}).catch(e=>{console.error(e),(0,it.rQ)("Couldn't load posts. Please try again.")}).finally(()=>c(!1))},k=""!==o?o:f,Y=p.filter(t=>(""===k||t.source===k)&&(!e.excludeCurrent||e.excludeCurrent&&!window.location.href.includes(t.source))),A=void 0!==e.limit?Y.slice(0,e.limit):Y.slice(0,v),C=v<Y.length,F=void 0===e.limit&&(C||l);return(0,r.FD)(r.FK,{children:[""===o&&(0,r.Y)(ct,{children:(0,r.Y)(rt.R,{options:b,value:b.find(e=>e.value===f),onChange:e=>{w.current=!0,x(e.value),y(20),a(0),$(e.value,0)},bordered:!0,formatOptionLabel:({value:e,label:t,element:n})=>n||(0,r.Y)(r.FK,{children:t})})}),(0,r.FD)(pt,{$home:void 0===e.limit,children:[A.length>0?(0,r.Y)(r.FK,{children:A.map((e,t)=>(0,r.Y)(lt.l,{post:e},t))}):(0,r.Y)(r.FK,{children:st.map(e=>(0,r.Y)(lt.R,{},`postDummy-${e}`))}),F&&(0,r.Y)(ot.A,{onChange:e=>{e&&(C?y(v+20):!d&&l&&$(""===k?void 0:k))},wide:!0,children:(0,r.Y)(lt.R,{})})]})]})},ct=Y.Ay.div` 15882 width: 250px; 15883 padding-bottom: 10px; 15884 @media only screen and (max-width: 1200px) { 15885 width: 100%; 15886 } 15887`,pt=Y.Ay.div` 15888 display: grid; 15889 grid-template-columns: repeat(2, minmax(0, 1fr)); 15890 grid-column-gap: 20px; 15891 grid-row-gap: 20px; 15892 @media only screen and (max-width: 1100px) { 15893 grid-template-columns: 1fr; 15894 } 15895`;var ht=n(62532),ut=n(55115);function gt(){try{const e=l.Ar.getItem("dotgg_nick")||"";return e?{nick:e,avatar:l.Ar.getItem("dotgg_avatar")||""}:null}catch{return null}}const mt=({site:e})=>{const[t,n]=(0,h.J0)((0,at.x3)()),[o,i]=(0,h.J0)(gt),[s,d]=(0,h.J0)([]),[c,p]=(0,h.J0)(0),[u,v]=(0,h.J0)(!1),y=(0,h.li)(null),w=(0,h.li)(null),b=(0,h.li)(null),$=(0,h.li)(0),k=(0,h.li)(0),Y=(0,h.Kr)(()=>async()=>{try{const t=await(0,ut.wb)(e);d(t.notifications),p(t.unseen),$.current=t.max_id,k.current=t.unseen}catch{}},[e]);(0,h.vJ)(()=>{const e=()=>{n((0,at.x3)()),i(gt()),(0,at.x3)()?Y():(d([]),p(0))};return window.addEventListener("dotgg:auth",e),()=>window.removeEventListener("dotgg:auth",e)},[Y]),(0,h.vJ)(()=>{if(!t)return;let n=!1;return(0,a.tb)(e).then(e=>{if(n||!e)return;const t={nick:e.nick,avatar:e.avatar||""};i(t);try{l.Ar.setItem("dotgg_nick",t.nick),t.avatar&&l.Ar.setItem("dotgg_avatar",t.avatar)}catch{}}).catch(()=>{}),()=>{n=!0}},[t,e]),(0,h.vJ)(()=>{if(!t)return;Y();const n=async()=>{if("visible"===document.visibilityState)try{const t=await(0,ut.ED)(e);t.max_id===$.current&&t.unseen===k.current||await Y()}catch{}},r=setInterval(n,3e5),o=()=>{"visible"===document.visibilityState&&n()};return document.addEventListener("visibilitychange",o),()=>{clearInterval(r),document.removeEventListener("visibilitychange",o)}},[t,e,Y]);const A=(e=!1)=>{v(!1),e&&w.current?.focus()};if(f(u,y,A),(0,h.vJ)(()=>{u&&m(b.current)},[u]),!t)return(0,r.Y)(Oe,{href:"/u/","data-native":"",children:"Sign in"});const C=(0,W.T)(o?.avatar),F=o?.nick??"",D=(0,r.FD)(xt,{children:[(0,r.Y)(vt,{children:"Notifications"}),0===s.length?(0,r.Y)(yt,{children:"No notifications."}):(0,r.Y)(wt,{children:s.slice(0,6).map(e=>(0,r.FD)(bt,{href:e.page_url||"#","data-unseen":e.unseen?"1":"0","data-panel-stop":"",children:[(0,r.Y)($t,{children:"reply"===e.type?"New reply to your comment":`Your comment reached ${e.threshold} upvotes`}),e.body&&(0,r.Y)(kt,{children:e.body.length>110?`${e.body.slice(0,109)}â¦`:e.body})]},e.id))})]});return(0,r.FD)(Ce,{ref:y,children:[(0,r.FD)(Fe,{ref:w,type:"button",onClick:()=>{(async()=>{const t=!u;if(v(t),t&&c>0)try{await(0,ut.Un)(e),p(0),k.current=0,d(e=>e.map(e=>({...e,unseen:!1})))}catch{}})()},"aria-label":"Account menu","aria-expanded":u,title:F||"Account",children:[(0,r.Y)(De,{src:C,alt:"",$size:32}),c>0&&(0,r.Y)(ft,{children:c>9?"9+":c})]}),u&&(0,r.Y)(Se,{ref:b,role:"dialog","aria-label":"Account",onKeyDown:e=>g(e,()=>A(!0)),children:(0,r.Y)(je,{nick:F,subline:"Your account on this site",avatar:C,premium:!1,items:[...F?[{key:"profile",label:"Profile",href:`/u/${encodeURIComponent(F)}`,Icon:x.vg}]:[],{key:"settings",label:"Settings",href:"/u/me/settings",Icon:x.Ni}],extra:D,onSignOut:()=>{(0,a.o$)(),window.location.href="/u/"},signOutLabel:"Sign out",onNavigate:()=>A()})})]})}
15895,ft=Y.I4.span` 15896 position: absolute; 15897 top: -3px; 15898 right: -5px; 15899 min-width: 17px; 15900 height: 17px; 15901 padding: 0 4px; 15902 box-sizing: border-box; 15903 border-radius: 9px; 15904 border: 2px solid var(--theme-palette-color-8); 15905 background: ${F.Q.unread}; 15906 color: ${F.Q.onAccent}; 15907 font-size: 10px; 15908 font-weight: 700; 15909 line-height: 13px; 15910 text-align: center; 15911 pointer-events: none; 15912`,xt=Y.I4.div` 15913 padding: 8px 0; 15914 border-top: 1px solid ${F.Q.rowRule}; 15915`,vt=Y.I4.div` 15916 padding: 4px 14px; 15917 font-size: 10.5px; 15918 font-weight: 800; 15919 letter-spacing: 0.08em; 15920 text-transform: uppercase; 15921 color: ${F.Q.muted}; 15922`,yt=Y.I4.div` 15923 padding: 8px 14px; 15924 font-size: 13px; 15925 color: var(--theme-palette-color-3); 15926`,wt=Y.I4.div` 15927 display: flex; 15928 flex-direction: column; 15929 max-height: 280px; 15930 overflow-y: auto; 15931`,bt=Y.I4.a` 15932 display: block; 15933 padding: 8px 14px; 15934 text-decoration: none; 15935 color: inherit; 15936 &[data-unseen="1"] { 15937 box-shadow: inset 3px 0 0 ${F.Q.unread}; 15938 } 15939 &:hover { 15940 background: var(--theme-palette-color-6); 15941 } 15942 &:focus-visible { 15943 outline: 2px solid var(--theme-palette-color-4); 15944 outline-offset: -2px; 15945 } 15946`,$t=Y.I4.div` 15947 font-size: 13px; 15948 font-weight: 600; 15949 color: var(--theme-palette-color-4); 15950`,kt=Y.I4.div` 15951 margin-top: 2px; 15952 font-size: 12px; 15953 color: var(--theme-palette-color-3); 15954`,Yt=({site:e,turnstileSiteKey:t})=>{const[n,o]=(0,h.J0)(()=>(0,at.x3)()?"checking":"guest");return(0,h.vJ)(()=>{if("checking"!==n)return;let t=!1;return(async()=>{const n=await(0,a.tb)(e);if(!t)if(n&&n.nick){try{l.Ar.setItem("dotgg_nick",n.nick),n.avatar&&l.Ar.setItem("dotgg_avatar",n.avatar)}catch{}window.location.replace("/u/"+encodeURIComponent(n.nick))}else o("guest")})(),()=>{t=!0}},[n,e]),"checking"===n?(0,r.Y)(At,{children:(0,r.Y)(Ct,{children:"Checking sessionâ¦"})}):(0,r.Y)(At,{children:(0,r.Y)(Xe.v,{site:e,turnstileSiteKey:t,mode:"both",onSuccess:()=>{const e=(()=>{try{return l.Ar.getItem("dotgg_nick")||""}catch{return""}})();window.location.href=e?"/u/"+encodeURIComponent(e):"/u/"}})})},At=Y.I4.div` 15955 display: flex; 15956 flex-direction: column; 15957 gap: 14px; 15958`,Ct=Y.I4.div` 15959 opacity: 0.7; 15960 text-align: center; 15961 padding: 24px; 15962`;var Ft=n(88635),Dt=n(62803),St=n(20482),It=n(36086),zt=n(79477),Tt=n(97528),Et=n(30728),Lt=n(85260),Mt=n(53887);const Nt=({nick:e,initialTab:t="comments"})=>{const[n,o]=(0,h.J0)(void 0),[a,l]=(0,h.J0)(!0),s="messages"===t;if((0,h.vJ)(()=>{if(s)return;let n=!1;return l(!0),(0,i.y)(e,{commentsOnly:!0}).then(r=>{if(!n){if(r.redirect_to_nick&&r.redirect_to_nick!==e){const e=`${(0,Mt.Lp)(r.redirect_to_nick)}/${"comments"===t?"":t}`;window.history.replaceState(null,"",e)}o(r)}}).catch(e=>{console.error("NativeProfileView load failed",e)}).finally(()=>{n||l(!1)}),()=>{n=!0}},[e,s,t]),s)return(0,r.Y)(Dt.U,{});if(a||!n)return(0,r.Y)(St.j,{});if(0===n.user.user_id)return(0,r.Y)(Pt,{children:"User not found."});const d=!!window.DotGGUser&&window.DotGGUser.toString()===n.user.user_id.toString(),c=n.user.nickname||e;if("settings"===t)return d?(0,r.Y)(Et.A,{userData:n,showGameSettings:!1}):(0,r.Y)(Pt,{children:"Settings are private."});const p=[{key:"comments",label:"Comments",href:`${(0,Mt.Lp)(c)}/`,active:!0}];return(0,r.FD)(r.FK,{children:[(0,r.Y)(Lt.z,{userData:n,tabs:p}),d&&(0,r.Y)(zt.d,{nick:c,tradeSite:!1}),(0,r.Y)(Tt.y,{items:p}),(0,r.Y)(It.A,{userData:n})]})},Pt=Y.I4.div` 15963 padding: 40px; 15964 text-align: center; 15965 font-size: 18px; 15966 opacity: 0.7; 15967`;var Ot=n(71643),_t=n(29854),Rt=n(51900),jt=n(65492),Jt=n(75213),Bt=n(61182);const Kt="dotgg_nick_gate_deferred",Wt="dotgg_email_gate_deferred";function Ut(e){try{return"1"===sessionStorage.getItem(e)}catch{return!1}}const Qt={nick:{title:"Choose a nickname",text:"This is what others see on your profile, comments, decks and trades. You can change it later in Settings.",action:"Continue",busy:"Savingâ¦"},email:{title:"Add your email",text:"Discord didn't share a verified email, so your account has none yet. Add one to reset your password and get account notices. You can keep signing in with Discord either way.",action:"Save email",busy:"Savingâ¦"}},Gt=()=>{const e=(0,Ke.h3)()?.user,t=!!e&&+e.user_id>0,[n,o]=(0,h.J0)(null),[a,l]=(0,h.J0)(0),[s,d]=(0,h.J0)(!0),[c,p]=(0,h.J0)(""),[u,g]=(0,h.J0)(!1),[m,f]=(0,h.J0)(""),{status:x,check:v}=(0,Bt.G)(e?.nickname),y=(0,h.li)(null);(0,h.vJ)(()=>{a>0&&y.current?.focus({preventScroll:!0})},[a]),(0,h.vJ)(()=>
15967{if(null===n&&t&&e){const t=function(e){const t=!0===e.needs_email&&!Ut(Wt);return!0===e.needs_nick?Ut(Kt)?[]:t?["nick","email"]:["nick"]:t?["email"]:[]}(e);t.length&&o(t)}},[t,e,n]);const w=n?.[a];if(!s||!e||!w)return null;const b=Qt[w],$=()=>{!function(e){try{sessionStorage.setItem(e,"1")}catch{}}("nick"===w?Kt:Wt),d(!1)},k=(0,Mt.Xe)(c),Y=m?{tone:"error",text:m}:"nick"===w?(0,jt.rX)(c,e.nickname,x):null,C=!u&&("nick"===w?""!==k&&k!==e.nickname&&"error"!==Y?.tone:(0,Jt.as)(c));return(0,r.Y)(Rt.qp,{show:!0,width:440,header:b.title,subtitle:n&&n.length>1?(0,r.Y)(Ht,{at:a,of:n.length}):void 0,dontHideOnBgClick:!0,onClose:$,footer:(0,r.FD)(Rt.tA,{children:[(0,r.Y)(Xt,{type:"button",$tone:"muted",onClick:$,disabled:u,children:"Maybe later"}),(0,r.FD)(A.jn,{type:"submit",form:"account-step-form",disabled:!C,"aria-busy":u||void 0,children:[u&&(0,r.Y)(A.az,{"aria-hidden":"true"}),u?b.busy:b.action]})]}),children:(0,r.FD)(Zt,{id:"account-step-form",noValidate:!0,onSubmit:t=>{t.preventDefault(),(async()=>{if(C){g(!0),f("");try{"nick"===w?await(0,Jt.Lt)((0,Jt.mD)(e),{nick:k}):await(0,Ot.Z6)(c.trim())}catch(e){return f(e instanceof Error?e.message:"Couldn't save that. Try again."),void g(!1)}g(!1),(0,i.d)().catch(()=>{}),p(""),f(""),n&&a+1<n.length?l(a+1):d(!1)}})()},children:[(0,r.Y)(en,{children:b.text}),(0,r.Y)(_t.A,{id:`account-step-${w}`,ariaLabel:"nick"===w?"Nickname":"Email",type:"nick"===w?"text":"email",inputMode:"nick"===w?"text":"email",autoComplete:"nick"===w?"nickname":"email",placeholder:"nick"===w?"Your nickname":"[email protected]",maxLength:"nick"===w?32:100,value:c,onValue:e=>{p(e),f(""),"nick"===w&&v(e)},inputRef:y,message:Y},w)]})})};function Ht({at:e,of:t}){return(0,r.FD)(qt,{children:[(0,r.Y)("span",{"aria-hidden":"true",children:Array.from({length:t},(t,n)=>(0,r.Y)(Vt,{$on:n<=e},n))}),"Step ",e+1," of ",t]})}const qt=Y.Ay.span` 15968 display: inline-flex; 15969 align-items: center; 15970 gap: 10px; 15971 margin-top: 6px; 15972 font-size: 12px; 15973 font-weight: 600; 15974 color: ${F.Q.muted}; 15975 > span { 15976 display: inline-flex; 15977 gap: 4px; 15978 } 15979`,Vt=Y.Ay.span` 15980 width: 28px; 15981 height: 4px; 15982 border-radius: 2px; 15983 background: ${e=>e.$on?"var(--theme-palette-color-1)":"var(--theme-palette-color-5)"}; 15984`,Xt=(0,Y.Ay)(A.QW)` 15985 align-self: center; 15986 padding: 0 12px; 15987 @media only screen and ${C.E0} { 15988 flex: 1 1 100%; 15989 justify-content: center; 15990 } 15991`,Zt=Y.Ay.form` 15992 display: flex; 15993 flex-direction: column; 15994 gap: 14px; 15995 margin: 0; 15996`,en=Y.Ay.p` 15997 margin: 0; 15998 font-size: 14px; 15999 line-height: 1.5; 16000 color: var(--theme-palette-color-4); 16001`;var tn=n(55612);function nn(e){return{url:`https://api.dotgg.gg${e}`,headers:(0,at.z5)()}}async function rn(e,t){const n=`/auth/v2/profile?site=${encodeURIComponent(e)}&nick=${encodeURIComponent(t)}`,r=await tn.A.get(n,void 0,nn(n));if(r.error)throw new Error(r.error_text||"Failed to load profile");return r}const on=({site:e,nick:t})=>{const[n,o]=(0,h.J0)(null),[i,s]=(0,h.J0)(null),[d,c]=(0,h.J0)([]),[p,u]=(0,h.J0)(!1),[g,m]=(0,h.J0)(0),[f,x]=(0,h.J0)(!1);if((0,h.vJ)(()=>{let n=!1;return rn(e,t).then(e=>{n||o(e)}).catch(e=>{n||s(e instanceof Error?e.message:"Failed to load profile")}),()=>{n=!0}},[e,t]),(0,h.vJ)(()=>{if(!n)return;let t=!1;return u(!0),(0,ut.uf)(e,n.user_id,g,20).then(e=>{t||(c(e.comments||[]),x(20===(e.comments?.length||0)))}).catch(()=>{}).finally(()=>{t||u(!1)}),()=>{t=!0}},[n,g,e]),i)return(0,r.Y)(an,{children:(0,r.Y)(In,{children:i})});if(!n)return(0,r.Y)(an,{children:(0,r.Y)(Sn,{children:"Loadingâ¦"})});const v=n.created_at?new Date(n.created_at.replace(" ","T")+"Z").toLocaleDateString():"",y=(()=>{if("undefined"==typeof window)return 0;const e=window.DotGGUser;if(void 0!==e)return Number(e)||0;try{return Number(l.Ar.getItem("dotgg_user"))||0}catch{return 0}})()===n.user_id;return(0,r.FD)(an,{children:[(0,r.FD)(ln,{children:[(0,r.Y)(sn,{src:(0,W.T)(n.avatar),alt:n.nick}),(0,r.FD)(dn,{children:[(0,r.Y)(cn,{children:n.nick}),v&&(0,r.FD)(pn,{children:["Joined ",v]}),(0,r.FD)(hn,{children:[(0,r.Y)("strong",{children:n.karma})," karma",(0,r.Y)(un,{children:"·"}),(0,r.FD)("span",{children:[n.total_comments," comments"]})]}),(0,r.FD)(gn,{children:[n.twitch&&(0,r.Y)(mn,{href:n.twitch,target:"_blank",rel:"noopener noreferrer",children:"Twitch"}),n.youtube&&(0,r.Y)(mn,{href:n.youtube,target:"_blank",rel:"noopener noreferrer",children:"YouTube"}),n.twitter&&(0,r.Y)(mn,{href:n.twitter,target:"_blank",rel:"noopener noreferrer",children:"Twitter/X"}),n.facebook&&(0,r.Y)(mn,{href:n.facebook,target:"_blank",rel:"noopener noreferrer",children:"Facebook"}),n.discord&&(0,r.FD)(fn,{children:["Discord: ",n.discord]})]}),y&&(0,r.FD)(xn,{children:[(0,r.Y)(vn,{href:"/u/me/settings",children:"Edit profile"}),(0,r.Y)(yn,{type:"button",onClick:()=>{(0,a.o$)(),window.location.href="/u/"},children:"Log out"})]})]})]}),n.description&&(0,r.Y)(wn,{children:n.description}),(0,r.Y)(bn,{children:"Recent comments"}),p&&0===d.length?(0,r.Y)(Sn,{children:"Loading commentsâ¦"}):0===d.length?(0,r.Y)(Sn,{children:"No comments yet."}):(0,r.Y)($n,{children:d.map(e=>(0,r.FD)(kn,{children:[(0,r.FD)(Yn,{children:[(0,r.Y)(An,{"data-direction":e.score>0?"up":e.score<0?"down":"",children:e.score>0?`+${e.score}`:e.score}
16001),(0,r.Y)(Cn,{children:new Date(1e3*e.created_at).toLocaleString()}),e.page_url&&(0,r.Y)(Fn,{href:e.page_url,target:"_blank",rel:"noopener noreferrer",children:e.object_id||e.page_url})]}),(0,r.Y)(Dn,{children:e.body})]},e.id))}),(0,r.FD)(zn,{children:[(0,r.Y)(Tn,{type:"button",disabled:0===g,onClick:()=>m(e=>Math.max(0,e-1)),children:"â Newer"}),(0,r.FD)(En,{children:["page ",g+1]}),(0,r.Y)(Tn,{type:"button",disabled:!f,onClick:()=>m(e=>e+1),children:"Older â"})]})]})},an=Y.I4.div` 16002 display: flex; 16003 flex-direction: column; 16004 gap: 18px; 16005`,ln=Y.I4.div` 16006 display: flex; 16007 gap: 18px; 16008 padding: 16px; 16009 background: var(--theme-palette-color-8, #fff); 16010 border: 1px solid var(--theme-palette-color-6, rgba(0, 0, 0, 0.08)); 16011 border-radius: 8px; 16012`,sn=Y.I4.img` 16013 width: 96px; 16014 height: 96px; 16015 border-radius: 50%; 16016 object-fit: cover; 16017 flex-shrink: 0; 16018`,dn=Y.I4.div` 16019 display: flex; 16020 flex-direction: column; 16021 gap: 6px; 16022 min-width: 0; 16023`,cn=Y.I4.h2` 16024 margin: 0; 16025 font-size: 22px; 16026 font-weight: 700; 16027 color: var(--theme-palette-color-2, inherit); 16028`,pn=Y.I4.div` 16029 font-size: 13px; 16030 color: var(--theme-palette-color-3, inherit); 16031 opacity: 0.7; 16032`,hn=Y.I4.div` 16033 font-size: 14px; 16034 color: var(--theme-palette-color-3, inherit); 16035 strong { color: var(--theme-palette-color-1, inherit); font-size: 16px; margin-right: 4px; } 16036`,un=Y.I4.span` 16037 margin: 0 8px; 16038 opacity: 0.4; 16039`,gn=Y.I4.div` 16040 display: flex; 16041 flex-wrap: wrap; 16042 gap: 8px; 16043 margin-top: 4px; 16044`,mn=Y.I4.a` 16045 font-size: 13px; 16046 padding: 3px 9px; 16047 border-radius: 4px; 16048 background: var(--theme-palette-color-7, rgba(0, 0, 0, 0.05)); 16049 color: var(--theme-palette-color-1, inherit); 16050 text-decoration: none; 16051 &:hover { opacity: 0.85; } 16052`,fn=Y.I4.span` 16053 font-size: 13px; 16054 padding: 3px 9px; 16055 border-radius: 4px; 16056 background: var(--theme-palette-color-7, rgba(0, 0, 0, 0.05)); 16057 color: var(--theme-palette-color-3, inherit); 16058`,xn=Y.I4.div` 16059 display: flex; 16060 gap: 8px; 16061 margin-top: 10px; 16062 flex-wrap: wrap; 16063`,vn=Y.I4.a` 16064 display: inline-block; 16065 background: var(--paletteColor1, #2563eb); 16066 color: var(--theme-palette-color-4, #fff); 16067 text-decoration: none; 16068 padding: 7px 14px; 16069 border-radius: 5px; 16070 font-size: 13px; 16071 font-weight: 600; 16072 &:hover { background: var(--paletteColor2, #1d4ed8); } 16073`,yn=Y.I4.button` 16074 background: transparent; 16075 border: 1px solid var(--theme-palette-color-6, rgba(0, 0, 0, 0.15)); 16076 color: inherit; 16077 padding: 6px 13px; 16078 border-radius: 5px; 16079 font-size: 13px; 16080 cursor: pointer; 16081 &:hover { background: var(--theme-palette-color-7, rgba(0, 0, 0, 0.04)); } 16082`,wn=Y.I4.div` 16083 padding: 14px 16px; 16084 background: var(--theme-palette-color-8, #fff); 16085 border: 1px solid var(--theme-palette-color-6, rgba(0, 0, 0, 0.08)); 16086 border-radius: 8px; 16087 white-space: pre-wrap; 16088 color: var(--theme-palette-color-3, inherit); 16089`,bn=Y.I4.h3` 16090 margin: 12px 0 0; 16091 font-size: 16px; 16092 font-weight: 600; 16093`,$n=Y.I4.div` 16094 display: flex; 16095 flex-direction: column; 16096 gap: 8px; 16097`,kn=Y.I4.div` 16098 padding: 10px 12px; 16099 background: var(--theme-palette-color-8, #fff); 16100 border: 1px solid var(--theme-palette-color-6, rgba(0, 0, 0, 0.08)); 16101 border-radius: 6px; 16102`,Yn=Y.I4.div` 16103 display: flex; 16104 align-items: center; 16105 gap: 8px; 16106 font-size: 12px; 16107 color: var(--theme-palette-color-3, inherit); 16108 opacity: 0.7; 16109 margin-bottom: 4px; 16110`,An=Y.I4.span` 16111 font-weight: 700; 16112 &[data-direction="up"] { color: var(--theme-palette-color-1, #2a2); } 16113 &[data-direction="down"] { color: var(--theme-palette-color-2, #c33); } 16114`,Cn=Y.I4.span``,Fn=Y.I4.a` 16115 margin-left: auto; 16116 color: inherit; 16117 text-decoration: none; 16118 &:hover { text-decoration: underline; } 16119`,Dn=Y.I4.div` 16120 white-space: pre-wrap; 16121 word-break: break-word; 16122 font-size: 14px; 16123`,Sn=Y.I4.div` 16124 color: var(--theme-palette-color-3, inherit); 16125 opacity: 0.7; 16126`,In=Y.I4.div` 16127 color: #dc2626; 16128`,zn=Y.I4.div` 16129 display: flex; 16130 align-items: center; 16131 justify-content: center; 16132 gap: 12px; 16133 margin-top: 8px; 16134`,Tn=Y.I4.button` 16135 background: transparent; 16136 border: 1px solid var(--theme-palette-color-6, rgba(0, 0, 0, 0.15)); 16137 color: inherit; 16138 padding: 5px 10px; 16139 border-radius: 4px; 16140 cursor: pointer; 16141 font-size: 13px; 16142 &:disabled { opacity: 0.5;
16142 cursor: not-allowed; } 16143`,En=Y.I4.span` 16144 font-size: 13px; 16145 opacity: 0.7; 16146`,Ln=Y.I4.div` 16147 display: flex; 16148 flex-direction: column; 16149 gap: 18px; 16150 max-width: 640px; 16151`,Mn=Y.I4.section` 16152 padding: 14px 16px; 16153 background: var(--theme-palette-color-8, #fff); 16154 border: 1px solid var(--theme-palette-color-6, rgba(0, 0, 0, 0.08)); 16155 border-radius: 8px; 16156`,Nn=Y.I4.h3` 16157 margin: 0 0 10px; 16158 font-size: 14px; 16159 font-weight: 700; 16160 text-transform: uppercase; 16161 letter-spacing: 0.5px; 16162 opacity: 0.65; 16163`,Pn=Y.I4.div` 16164 display: flex; 16165 align-items: center; 16166 gap: 14px; 16167`,On=Y.I4.img` 16168 width: 96px; 16169 height: 96px; 16170 border-radius: 50%; 16171 object-fit: cover; 16172`,_n=Y.I4.div` 16173 display: flex; 16174 gap: 8px; 16175 flex-wrap: wrap; 16176`,Rn=Y.I4.button` 16177 background: transparent; 16178 border: 1px solid var(--theme-palette-color-6, rgba(0, 0, 0, 0.15)); 16179 color: inherit; 16180 padding: 6px 12px; 16181 border-radius: 4px; 16182 cursor: pointer; 16183 font-size: 13px; 16184 &:disabled { opacity: 0.5; cursor: not-allowed; } 16185 &:hover:not(:disabled) { background: var(--theme-palette-color-7, rgba(0, 0, 0, 0.04)); } 16186`,jn=Y.I4.div` 16187 margin-top: 12px; 16188 display: grid; 16189 grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); 16190 gap: 6px; 16191 max-height: 260px; 16192 overflow-y: auto; 16193 padding: 4px; 16194 background: var(--theme-palette-color-7, rgba(0, 0, 0, 0.04)); 16195 border-radius: 6px; 16196`,Jn=Y.I4.button` 16197 background: transparent; 16198 border: 2px solid ${e=>e.$active?"var(--paletteColor1, #2a72d8)":"transparent"}; 16199 border-radius: 50%; 16200 padding: 0; 16201 cursor: pointer; 16202 width: 56px; 16203 height: 56px; 16204 img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; } 16205 &:hover { transform: scale(1.05); } 16206`,Bn=Y.I4.div` 16207 display: flex; 16208 flex-direction: column; 16209 gap: 4px; 16210 margin-bottom: 12px; 16211 &:last-child { margin-bottom: 0; } 16212`,Kn=Y.I4.div` 16213 display: grid; 16214 grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 16215 gap: 12px; 16216`,Wn=Y.I4.label` 16217 font-size: 12px; 16218 font-weight: 600; 16219 opacity: 0.75; 16220`,Un=Y.I4.input` 16221 font: inherit; 16222 padding: 8px 10px; 16223 border-radius: 5px; 16224 border: 1px solid var(--theme-palette-color-6, rgba(0, 0, 0, 0.15)); 16225 background: var(--theme-palette-color-7, transparent); 16226 color: inherit; 16227`,Qn=Y.I4.textarea` 16228 font: inherit; 16229 padding: 8px 10px; 16230 border-radius: 5px; 16231 border: 1px solid var(--theme-palette-color-6, rgba(0, 0, 0, 0.15)); 16232 background: var(--theme-palette-color-7, transparent); 16233 color: inherit; 16234 resize: vertical; 16235`,Gn=Y.I4.div` 16236 font-size: 12px; 16237 min-height: 1.2em; 16238 color: ${e=>"ok"===e.$status?"#1e6f1e":"taken"===e.$status?"#dc2626":"var(--theme-palette-color-3, inherit)"}; 16239 opacity: ${e=>"ok"===e.$status||"taken"===e.$status?1:.7}; 16240`,Hn=Y.I4.div` 16241 color: #dc2626; 16242 font-size: 13px; 16243`,qn=Y.I4.div` 16244 color: #1e6f1e; 16245 font-size: 13px; 16246`,Vn=Y.I4.div` 16247 opacity: 0.7; 16248`,Xn=Y.I4.div` 16249 display: flex; 16250 justify-content: flex-end; 16251`,Zn=Y.I4.button` 16252 background: var(--paletteColor1, #2563eb); 16253 color: var(--theme-palette-color-4, #fff); 16254 border: 0; 16255 border-radius: 6px; 16256 padding: 10px 18px; 16257 font-size: 14px; 16258 font-weight: 600; 16259 cursor: pointer; 16260 &:disabled { opacity: 0.5; cursor: not-allowed; } 16261 &:hover:not(:disabled) { background: var(--paletteColor2, #1d4ed8); } 16262`,er=Y.I4.div` 16263 display: flex; 16264 justify-content: space-between; 16265 align-items: center; 16266 gap: 8px; 16267 flex-wrap: wrap; 16268`,tr=Y.I4.a` 16269 color: var(--paletteColor1, #2563eb); 16270 text-decoration: none; 16271 font-size: 14px; 16272 font-weight: 600; 16273 &:hover { text-decoration: underline; } 16274`,nr=Y.I4.button` 16275 background: transparent; 16276 border: 1px solid var(--theme-palette-color-6, rgba(0, 0, 0, 0.15)); 16277 color: inherit; 16278 padding: 6px 13px; 16279 border-radius: 5px; 16280 font-size: 13px; 16281 cursor: pointer; 16282 &:hover { background: var(--theme-palette-color-7, rgba(0, 0, 0, 0.04)); } 16283`;function rr(e,t){return`ava_${e.toString().padStart(2,"0")}_${t.toString().padStart(2,"0")}.png`}const or=(()=>{const e=[];for(let t=1;t<=8;t++)for(let n=1;n<=20;n++)e.push(rr(t,n));return e})(),ir=({previewAvatar:e,showPicker:t,setShowPicker:n,uploading:o,fileInputRef:i,onUpload:a,onPickDefault:l})=>(0,r.FD)(Mn,{children:[(0,r.Y)(Nn,{children:"Avatar"}),(0,r.FD)(Pn,{children:[(0,r.Y)(On,{src:(0,W.T)(e),alt:""}),(0,r.FD)(_n,{children:[(0,r.Y)(Rn,{type:"button",onClick:()=>n(e=>!e),children:t?"Hide picker":"Pick default"}),(0,r.Y)(Rn,{type:"button",onClick:()=>i.current?.click(),disabled:o,children:o?"Uploadingâ¦":"Upload custom"}),(0,r.Y)("input",{ref:i,type:"file",accept:"image/*",style:{display:"none"},onChange:e=>{const t=e.currentTarget.files?.[0];t&&a(t)}})]})]}),t&&(0,r.Y)(jn,{children:or.map(t=>(0,r.Y)(Jn,{type:"button",$active:e===t,onClick:()=>l(t),children:(0,r.Y)("img",{src:(0,W.T)(t),alt:t})},t))})]}),ar=({site:e})=>{const[t,n]=(0,h.J0)(null),[o,i]=(0,h.J0)(!0),[s,d]=(0,h.J0)(null),[c,p]=(0,h.J0)(""),[u,g]=(0,h.J0)(""),[m,f]=(0,h.J0)(""),[x,v]=(0,h.J0)(""),[
16283y,w]=(0,h.J0)(""),[b,$]=(0,h.J0)(""),[k,Y]=(0,h.J0)(""),[A,C]=(0,h.J0)(""),[F,D]=(0,h.J0)(""),[S,I]=(0,h.J0)(""),[z,T]=(0,h.J0)(""),[E,L]=(0,h.J0)(null),[M,N]=(0,h.J0)(!1),[P,O]=(0,h.J0)(!1),_=(0,h.li)(null),[R,j]=(0,h.J0)(""),J=(0,h.li)(null),[B,K]=(0,h.J0)(!1),[W,U]=(0,h.J0)(null),[Q,G]=(0,h.J0)(!1);if((0,h.vJ)(()=>{let t=!1;return(0,at.x3)()?((async()=>{const r=await(0,a.tb)(e);if(!t){if(!r)return i(!1),void d("Session invalid. Please log in again.");try{const o=await rn(e,r.nick);if(t)return;n(o),p(o.nick),g(o.description),f(o.twitch),v(o.youtube),w(o.twitter),$(o.facebook),Y(o.discord),T(o.avatar),i(!1)}catch(e){if(t)return;i(!1),d(e instanceof Error?e.message:"Failed to load profile")}}})(),()=>{t=!0}):(i(!1),void d("You must be logged in to view this page."))},[e]),(0,h.vJ)(()=>{if(t&&c){if(c!==t.nick)return j("checking"),J.current&&clearTimeout(J.current),J.current=setTimeout(async()=>{try{const t=await async function(e,t){const n=`/auth/v2/check_nick?site=${encodeURIComponent(e)}&nick=${encodeURIComponent(t)}`,r=await tn.A.get(n,void 0,nn(n));if(r.error)throw new Error(r.error_text||"Check failed");return!!r.available}(e,c);j(t?"ok":"taken")}catch{j("")}},1500),()=>{J.current&&clearTimeout(J.current)};j("current")}else j("")},[c,t,e]),o)return(0,r.Y)(Ln,{children:(0,r.Y)(Vn,{children:"Loadingâ¦"})});if(s)return(0,r.Y)(Ln,{children:(0,r.Y)(Hn,{children:s})});if(!t)return null;const H=E??z;return(0,r.FD)(Ln,{children:[(0,r.FD)(er,{children:[(0,r.Y)(tr,{href:"/u/"+encodeURIComponent(t.nick),children:"â View profile"}),(0,r.Y)(nr,{type:"button",onClick:()=>{(0,a.o$)(),window.location.href="/u/"},children:"Log out"})]}),(0,r.Y)(ir,{previewAvatar:H,showPicker:M,setShowPicker:N,uploading:P,fileInputRef:_,onUpload:async e=>{O(!0),U(null);try{const t=await async function(e){const t=new FormData;t.append("file",e);const n=await tn.A.post("/auth/v2/avatar_upload",t,nn("/auth/v2/avatar_upload"));if(n.error||!n.filename)throw new Error(n.error_text||"Upload failed");return n.filename}(e);L(t),N(!1)}catch(e){U(e instanceof Error?e.message:"Upload failed")}finally{O(!1)}},onPickDefault:e=>{L(e),N(!1)}}),(0,r.FD)(Mn,{children:[(0,r.Y)(Nn,{children:"Profile"}),(0,r.FD)(Bn,{children:[(0,r.Y)(Wn,{children:"Nickname"}),(0,r.Y)(Un,{value:c,onChange:e=>p(e.currentTarget.value),maxLength:32,minLength:2}),(0,r.FD)(Gn,{$status:R,children:["current"===R&&"This is your current nick.","checking"===R&&"Checkingâ¦","ok"===R&&"Available.","taken"===R&&"Taken. Pick another."]})]}),(0,r.FD)(Bn,{children:[(0,r.Y)(Wn,{children:"Bio"}),(0,r.Y)(Qn,{value:u,onChange:e=>g(e.currentTarget.value),maxLength:4e3,rows:4})]})]}),(0,r.FD)(Mn,{children:[(0,r.Y)(Nn,{children:"Social links"}),(0,r.FD)(Kn,{children:[(0,r.FD)(Bn,{children:[(0,r.Y)(Wn,{children:"Twitch"})," ",(0,r.Y)(Un,{value:m,onChange:e=>f(e.currentTarget.value),placeholder:"https://twitch.tv/â¦"})]}),(0,r.FD)(Bn,{children:[(0,r.Y)(Wn,{children:"YouTube"})," ",(0,r.Y)(Un,{value:x,onChange:e=>v(e.currentTarget.value),placeholder:"https://youtube.com/@â¦"})]}),(0,r.FD)(Bn,{children:[(0,r.Y)(Wn,{children:"Twitter/X"}),(0,r.Y)(Un,{value:y,onChange:e=>w(e.currentTarget.value),placeholder:"https://twitter.com/â¦"})]}),(0,r.FD)(Bn,{children:[(0,r.Y)(Wn,{children:"Facebook"})," ",(0,r.Y)(Un,{value:b,onChange:e=>$(e.currentTarget.value),placeholder:"https://facebook.com/â¦"})]}),(0,r.FD)(Bn,{children:[(0,r.Y)(Wn,{children:"Discord"})," ",(0,r.Y)(Un,{value:k,onChange:e=>Y(e.currentTarget.value),placeholder:"username#0000"})]})]})]}),(0,r.FD)(Mn,{children:[(0,r.Y)(Nn,{children:"Account"}),(0,r.FD)(Bn,{children:[(0,r.Y)(Wn,{children:"New email (optional â leave blank to keep current)"}),(0,r.Y)(Un,{type:"email",value:A,onChange:e=>C(e.currentTarget.value),placeholder:t.nick+"@â¦"})]}),(0,r.FD)(Bn,{children:[(0,r.Y)(Wn,{children:"Current password (only required to change password)"}),(0,r.Y)(Un,{type:"password",value:S,onChange:e=>I(e.currentTarget.value),autoComplete:"current-password"})]}),(0,r.FD)(Bn,{children:[(0,r.Y)(Wn,{children:"New password (optional â leave blank to keep current)"}),(0,r.Y)(Un,{type:"password",value:F,onChange:e=>D(e.currentTarget.value),autoComplete:"new-password"})]})]}),W&&(0,r.Y)(Hn,{children:W}),Q&&(0,r.Y)(qn,{children:"Saved."}),(0,r.Y)(Xn,{children:(0,r.Y)(Zn,{type:"button",onClick:async()=>
16283{if(!t||B)return;if("taken"===R)return void U("That nick is taken. Pick another.");K(!0),U(null),G(!1);const e=function(e,t){const n={};return t.nick!==e.nick&&(n.nick=t.nick.trim()),t.description!==e.description&&(n.description=t.description),t.twitch!==e.twitch&&(n.twitch=t.twitch.trim()),t.youtube!==e.youtube&&(n.youtube=t.youtube.trim()),t.twitter!==e.twitter&&(n.twitter=t.twitter.trim()),t.facebook!==e.facebook&&(n.facebook=t.facebook.trim()),t.discord!==e.discord&&(n.discord=t.discord.trim()),t.pendingAvatar&&t.pendingAvatar!==t.currentAvatar&&(n.avatar=t.pendingAvatar),""!==t.email.trim()&&(n.email=t.email.trim()),""!==t.password&&(n.password=t.password,n.password_old=t.passwordOld),n}(t,{nick:c,description:u,twitch:m,youtube:x,twitter:y,facebook:b,discord:k,pendingAvatar:E,currentAvatar:z,email:A,password:F,passwordOld:S});try{const t=await async function(e){const t=await tn.A.post("/auth/v2/profile_update",e,nn("/auth/v2/profile_update"));if(t.error)throw new Error(t.error_text||"Update failed");return t}(e);if(n(t),p(t.nick),g(t.description),f(t.twitch),v(t.youtube),w(t.twitter),$(t.facebook),Y(t.discord),T(t.avatar),L(null),C(""),D(""),I(""),G(!0),e.nick){const e={error:!1,user_id:t.user_id,token:l.Ar.getItem("dotgg_token")||"",nick:t.nick,avatar:t.avatar,site:t.site};e.token&&(0,a.RW)(e)}}catch(e){U(e instanceof Error?e.message:"Save failed")}finally{K(!1)}},disabled:B||"taken"===R,children:B?"Savingâ¦":"Save changes"})})]})};var lr=n(74908),sr=n(86031),dr=n(12434);function cr(){!function(){const e=document.getElementById("dotgg-comments");if(!e||e.dataset.mounted)return;e.dataset.mounted="1";const t=e.dataset,n=(0,lr.v)(t.game||dr.Ay.TheGame.toLowerCase()),i=t.objectType||"page",l=t.objectId||window.location.pathname,d=t.pageUrl||window.location.href,h=t.turnstileSiteKey||void 0,u=t.site||void 0;if(!document.querySelector("[data-raptive-slot='above']")){const t=document.createElement("div");t.className="raptive-dotgg-comment",t.dataset.raptiveSlot="above",e.parentNode?.insertBefore(t,e),"undefined"!=typeof window&&"undefined"!=typeof document&&(null!==c&&clearTimeout(c),c=setTimeout(p,300))}const g=async function(e,t,n){var r;if(e&&t)if(n){if(!s(e))try{const n=await fetch(t,{credentials:"include",headers:{accept:"application/json"}});if(!n.ok)return;const o=await n.json();"object"==typeof(r=o)&&null!==r&&"string"==typeof o.ticket&&""!==o.ticket&&(0,a.RW)(await(0,a.X7)({site:e,ticket:o.ticket}))}catch{}}else s(e)&&(0,a.o$)()}(u,t.handoff,"1"===t.loggedIn),m=()=>{g.then(()=>(0,o.Hr)(e).render((0,r.Y)(et.t,{justhide:!0,children:(0,r.Y)(Ze.H,{game:n,objectType:i,objectId:l,pageUrl:d,turnstileSiteKey:h,site:u})})))};if("undefined"==typeof IntersectionObserver)return void m();const f=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(f.disconnect(),m())},{rootMargin:"800px 0px"});f.observe(e)}(),function(){if(!hr()?.site)for(const e of document.querySelectorAll("[data-id='account']")){if(e.dataset.dotggAccount)continue;e.dataset.dotggAccount="1";const t=e.closest("[data-device='mobile']")?"mobile":"desktop",n=document.createElement("div");n.className="dotgg-account-host",n.style.display="contents",e.before(n),(0,o.Hr)(n).render((0,r.Y)(et.t,{justhide:!0,children:(0,r.Y)(Ve,{device:t,theme:e})}))}}(),function(){const e=window.DOTGG_GAME?.TheGame;if(e&&dr.Ay.TheGame&&e.toLowerCase()!==dr.Ay.TheGame.toLowerCase())return;const t=document.getElementsByClassName("RootOfEmbeddedEvents");for(const e of Array.from(t)){const t=e;t.dataset.mounted||(t.dataset.mounted="1",(0,o.Hr)(t).render((0,r.Y)(et.t,{justhide:!0,children:(0,r.Y)(ht.l,{embed:!0})})))}}(),function(){const e=window.DOTGG_GAME?.TheGame;if(e&&dr.Ay.TheGame&&e.toLowerCase()!==dr.Ay.TheGame.toLowerCase())return;const t=document.getElementsByClassName("RootOfEmbeddedSyndication");for(const e of Array.from(t)){const t=e;if(t.dataset.mounted)continue;const n=t.dataset.syndication;if(!n)continue;let i=!1;if(t.dataset.atts)try{i="1"===JSON.parse(t.dataset.atts)?.excludecurrent}catch{}const a=pr(t);t.dataset.mounted="1",(0,o.Hr)(t).render((0,r.Y)(et.t,{justhide:!0,children:(0,r.Y)(dt,{excludeCurrent:i,limit:"infinite"===n?void 0:+n,initialPosts:a.posts,initialSource:a.source})}))}}(),function(){const e=document.getElementById("dotgg-auth");if(!e||e.dataset.mounted)return;e.dataset.mounted="1";
16283const t=e.dataset.site||"",n=e.dataset.turnstileSiteKey||void 0;t&&(0,o.Hr)(e).render((0,r.Y)(et.t,{justhide:!0,children:(0,r.Y)(Xe.v,{site:t,turnstileSiteKey:n,mode:"both",onSuccess:()=>{window.location.href="/"}})}))}(),function(){const e=document.getElementById("dotgg-user-index");if(!e||e.dataset.mounted)return;e.dataset.mounted="1";const t=e.dataset.site||"",n=e.dataset.turnstileSiteKey||void 0;t&&(0,o.Hr)(e).render((0,r.Y)(et.t,{justhide:!0,children:(0,r.Y)(Yt,{site:t,turnstileSiteKey:n})}))}(),function(){const e=document.getElementById("dotgg-user-profile");if(!e||e.dataset.mounted)return;e.dataset.mounted="1";const t=e.dataset.site||"",n=(0,Mt.NM)(e.dataset.nick||"");t&&n&&(0,o.Hr)(e).render((0,r.Y)(et.t,{justhide:!0,children:(0,r.Y)(on,{site:t,nick:n})}))}(),function(){const e=document.getElementById("dotgg-user-settings");if(!e||e.dataset.mounted)return;e.dataset.mounted="1";const t=e.dataset.site||"";t&&(0,o.Hr)(e).render((0,r.Y)(et.t,{justhide:!0,children:(0,r.Y)(ar,{site:t})}))}(),function(){const e=document.getElementById("dotgg-user-native-index");if(!e||e.dataset.mounted)return;e.dataset.mounted="1";const t=e.dataset.loginUrl||"";ur((0,lr.v)(e.dataset.game||dr.Ay.TheGame.toLowerCase())),window.DotGGUser?(0,i.d)({commentsOnly:!0}).then(n=>{const i=n.user?.nickname||"";if(i){const t="messages"===e.dataset.tab?"messages/":"";window.location.replace(`${(0,Mt.Lp)(i)}/${t}${window.location.search}`)}else(0,o.Hr)(e).render((0,r.Y)(Ft.v,{loginUrl:t}))}).catch(()=>{(0,o.Hr)(e).render((0,r.Y)(Ft.v,{loginUrl:t}))}):(0,o.Hr)(e).render((0,r.Y)(et.t,{justhide:!0,children:(0,r.Y)(Ft.v,{loginUrl:t})}))}(),function(){const e=document.getElementById("dotgg-user-native-profile");if(!e||e.dataset.mounted)return;e.dataset.mounted="1";const t=(0,Mt.NM)(e.dataset.nick||""),n=e.dataset.tab||"",i="settings"===n||"messages"===n?n:"comments";ur((0,lr.v)(e.dataset.game||dr.Ay.TheGame.toLowerCase())),t&&(0,o.Hr)(e).render((0,r.Y)(et.t,{justhide:!0,children:(0,r.Y)(Nt,{nick:t,initialTab:i})}))}(),function(){const e=document.getElementById("dotgg-user-native-settings");if(!e||e.dataset.mounted)return;e.dataset.mounted="1";const t=e.dataset.loginUrl||"";ur((0,lr.v)(e.dataset.game||dr.Ay.TheGame.toLowerCase())),window.DotGGUser?(0,i.d)({commentsOnly:!0}).then(n=>{const i=n.user?.nickname||"";i?window.location.replace(`${(0,Mt.Lp)(i,"settings")}${window.location.hash}`):(0,o.Hr)(e).render((0,r.Y)(Ft.v,{loginUrl:t}))}).catch(()=>{(0,o.Hr)(e).render((0,r.Y)(Ft.v,{loginUrl:t}))}):(0,o.Hr)(e).render((0,r.Y)(et.t,{justhide:!0,children:(0,r.Y)(Ft.v,{loginUrl:t})}))}(),function(){const e=hr();if(!e)return;if(!e.site&&!e.nativeHeaderAvatar)return;if(!e.site&&document.querySelector("[data-dotgg-account]"))return;const t=(e.headerSelector||"").split(",").map(e=>e.trim()).filter(Boolean);if(0===t.length)return;const n=()=>
16283{if(document.getElementById("dotgg-header-account"))return!0;for(const n of t){const t=document.querySelector(n);if(!t||!t.parentNode)continue;const i=document.createElement("div");return i.id="dotgg-header-account",i.style.display="inline-flex",i.style.alignItems="center",t.parentNode.insertBefore(i,t.nextSibling),(0,o.Hr)(i).render((0,r.Y)(et.t,{justhide:!0,children:e.site?(0,r.Y)(mt,{site:e.site}):(0,r.Y)(Ve,{device:"desktop"})})),!0}return!1};n()||setTimeout(n,250)}(),function(){if(!window.DotGGUser)return;if(document.getElementById("dotgg-nickname-gate"))return;const e=document.createElement("div");e.id="dotgg-nickname-gate",document.body.appendChild(e),(0,o.Hr)(e).render((0,r.Y)(et.t,{justhide:!0,children:(0,r.Y)(Gt,{})}))}()}function pr(e){const t=e.querySelector("script.dotgg-syn-data");if(!t?.textContent)return{};try{const e=JSON.parse(t.textContent);if("object"!=typeof e||null===e)return{};const r="posts"in e?e.posts:void 0,o="source"in e?e.source:void 0;return{posts:(n=r,Array.isArray(n)?r:void 0),source:"string"==typeof o?o:void 0}}catch{return{}}var n}function hr(){return window.dotggCommentsConfig}function ur(e){dr.Ay.TheGame||(dr.Ay.TheGame=e),(0,sr.fZ)({core:{userProfileTabs:["comments","settings"]}})}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",cr,{once:!0}):cr()},74908(e,t,n){function r(e){if(e)return e;const t=(window.location.hostname||"").replace(/^www\./,""),n=t.lastIndexOf(".");return(n>0?t.slice(0,n):t).toLowerCase()}n.d(t,{v:()=>r})},66525(e,t,n){const r=n(63679).Ay.input` 16284 color: var(--theme-palette-color-4) !important; 16285 border-top: none; 16286 border-right: none; 16287 border-bottom: 1px solid var(--theme-palette-color-5); 16288 border-left: none; 16289 border-radius: 0; 16290 background-color: var(--bg-color); 16291 font-size: 16px; 16292`;n.d(t,["p",0,r])},86031(e,t,n){n.d(t,{Fe:()=>d,IE:()=>c,SA:()=>l,fZ:()=>s});var r=n(10201),o=n(65510),i=n(28716),a=n(85972);n(61271);let l={core:{cardDataVersion:0,metaDataVersion:0,premiumPreview:!1,debounceDelay:200,showAds:!1,gameNameForTitle:"",gameColors:{},colorlessIsGoodForAnyColor:!1,colorlessColors:[],userProfileTabs:void 0,enableCommentsTab:!0,hasSealedProducts:!1,hasProductCatalog:!1,productsListPage:!0,customSettingsSections:[],pageCallouts:{}},collection:{collectionHideSetsWithoutCards:!1,collectionExportEnable:!1,collectionFoil:!0,collectionMaxCap:!1,collectionImportMessage:"Drag and drop CSV file with your collection (or click here to pick it)",collectionCanTrade:!1,allowScanningToCollection:!1,ledger:!1,tableColumns:["cost","type","rarity","set","owned","foil","price"]},cards:{showPrices:!0,cardsHasBackside:!1,backSidesNames:["Front","Back"],prepareCardBackside:(e,t)=>{},requestCardPrices:!1,pricePageFilters:[],priceChartTheme:{Light:{backgroundColor:"#F4F4F5",textColor:"#eee",gridLinesColor:"#dadada",timescaleBorderColor:"#71649C",lineSeriesLineColor:"#FB7258",lineSeriesTopColor:"#FB7258CE",lineSeriesBottomColor:"#fbbf4f19",lineSeriesFoilColor:"#9110a2",cardPriceBlockBackground:{Foil:"#9110a2",Normal:"green",jp:"#95161e"}},Dark:{backgroundColor:"#20252b",textColor:"#eee",gridLinesColor:"#444",timescaleBorderColor:"#71649C",lineSeriesLineColor:"#FB7258",lineSeriesTopColor:"#FB7258CE",lineSeriesBottomColor:"#fbbf4f19",lineSeriesFoilColor:"#9110a2",cardPriceBlockBackground:{Foil:"#9110a2",Normal:"green",jp:"#95161e"}}},requestCardDetails:!1,requestCardFaces:!1,filterConfig:[],sortConfig:{},processCardsData:function(e){return e},cardLinkBase:"/cards/",getCardUrl:function(e){return`https://${window.location.hostname}${l.cards.cardLinkBase}${e}`},getCardName:e=>e.name,getCardColor:e=>l.core.gameColors[e.color]?.color??"",getCardPriceType:e=>"Foil"===e.priceType?"Foil":"Normal",getCardSubtitle:(e,t)=>"",getCardNameForCardTextDrawer:e=>(0,r.Y)(r.FK,{}),getCardDrawerSubtitle:e=>`#${e.setId}-${e.number.padStart(3,"0")}`,cardsFilterParams:["textSearch","setId","cost","color","rarity","cardtype","sortby","sortorder","clear","dailyprice","usdprice","invertFilters","filterLogicAnd"],cardsFilterDefaults:{},getSameNameCards:(e,t)=>e.filter(e=>e.name===t.name),getOtherPrintingsCards:(e,t)=>[],cardFilterDrawerOptions:function(e){return{}},CardTextIcon:e=>(0,r.Y)(r.FK,{}),rarityIcons:{},rarityNames:{},setName:()=>"",setNames:()=>({}),setIcon:()=>"",setNoIcons:!1,phoneSummaryFacts:["Power","Counter","Life","HP","Health","Attack","Defense","Strength"],setPageElements:{productList:!0,cardList:!0,specialElements:e=>(0,r.Y)(r.FK,{})},isCardBanned:(e,t)=>!1,hasUnlimitedCopies:e=>!1,cardImageModes:["table","condtext","image","condimage"],cardImageRatio:"524/731",cardImagePlaceholder:"",cardtypes:()=>{let e={};return a.Bk.mapState(t=>{e=Object.fromEntries(Object.entries(t).filter(([e,t])=>""!==e&&""!==t))}),e},getCardDetailConf:()=>({otherCardsBlock:{},includeMarketData:e=>!1,TitleBlock:e=>(0,r.Y)(r.FK,{}),SpecialCardDetailBlocks:[],cardDetailFacts:[],cardDetailFactsBack:[]}),duoColorMode:"gradient",defaultImageMode:"image",cardTypesToShowInMeta:[]},decks:{metaV2:!1,metaArchetypePages:!1,metaArchetypePath:"meta/",metaLeaderIdLabel:!0,metaFieldPaint:"rank",metaNameColors:{},metaAlerts:!1,metaTierList:!1,priceFilterEnabled:!1,placementFilterEnabled:!1,defaultDeckTags:o.o,leaderFilterEnabled:!1,missingCountSortEnabled:!1,aaNormalizeField:"",copyLimitAcrossPrintings:!1,publishGateEnabled:!1,cardGroupModes:["cardtype","color","rarity","cost","none"],cardSortInDecks:["id","name","price","cost"],defaultGroupingCriteria:"cardtype",defaultSortingCriteria:"id",showDeckManaCurve:!0,manaCurveTitle:"Cost",showDeckAverageCardCost:!0,showDeckColorStats:!0,showDeckCardCount:!0,deckCardWidthOverride:"",bannedCardTypesForDeckCover:[],restrictedCardTypesForDeckCover:[],colorNCompareForCurve:(e,t)=>
16292!1,baseDeckFields:()=>({totalPrice:0,deckString:""}),calcDeckFields:(e,t,n)=>e,tcgProductline:"",getFactsField:(e,t,n,r)=>"",DeckfactsUsedColor:e=>(0,r.FD)(r.FK,{children:[e.color,": ",e.countUsed]}),DeckRowSpecials:e=>(0,r.Y)(r.FK,{}),DeckfactsSpecials:e=>(0,r.Y)(r.FK,{}),cardsArrayToCode:(e,t,n)=>{const r=l.decks.textExport;return r?(0,i.x)(r,e,t,n):""},SubsectionRenderer:e=>(0,r.Y)(r.FK,{}),deckBuildingRules:{Standard:{cardsInDeck:50,maxCardsCopies:4,maxColorsInDeck:2,specialCardTypes:{},legalities:"standard"}},defaultFormat:"Standard",productTypes:[],defaultMetaFormat:"",legalities:[],noZeroPrices:!1,legalityStandardOnlyForPrices:!1,cardTypeExcludeFromCurve:[],extraCurves:[],cardTypesFixedOrder:{},serverSideCardsLibrary:!1,metaSupertypes:{},backgroundSize:"115%",backgroundPosition:"55% 21%",affiliates:{tcgplayer:!0,cardkingdom:!1,printingproxies:!1,cardmarket:!1},getCardNameForTCG:e=>e.name,getCardNameForCardmarket:e=>e.name,printingProxiesGameParam:"",boards:void 0,boardsOrder:void 0,boardsToMerge:void 0,boardsToApplyGrouping:void 0,boardsNotInDeck:[],cardTypesTermsToIgnoreWhenGrouping:{},tournamentFieldsSettings:{country:!0,set:!0,format:!1},deckLinkBase:"decks/",deckEmbedComponent:void 0,adPlacements:{decks:!0},cardFolder:"card",cardArtFolder:"",setBackgroundMode:"cover",cardImageMode:"cover",atSlugsMtaLinks:!1,deckImportMessage:"7 Forest\n3 Island\n4 Mountain",exportOptions:[]},deckbuilder:{selectNotLeaderProp:"",colorSelectComponent:"buttons",cardPicker_showTypeSelector:!1,cardPicker_colorSelect2UsedColorsFilter:!0},playtest:{enabled:!1},misc:{tournamentsStatsMode:"color"}};function s(e){Object.entries(e).forEach(([e,t])=>{t&&(l[e]||(l[e]={}),Object.assign(l[e],t))})}function d(e){const t=l.decks.deckBuildingRules;return t[e&&t[e]?e:l.decks.defaultFormat]}function c(){return d()?.specialCardTypes??{}}},70165(e,t,n){n.d(t,{R8:()=>i,X1:()=>a,j3:()=>l,yD:()=>o});var r=n(10201);let o;function i(){return o?.primaryElementType??"characters"}function a(e){const t={displayName:"",cardsInDeck:0,extraFieldsDefs:[]};for(const n of[o.teamBuildingRules.default,o.teamBuildingRules[e]])n&&Object.assign(t,n);return t}function l(e){o||(o=s),Object.keys(e).forEach(t=>{o[t]=e[t]})}const s={classifications:{},gachaItemEmbedElements:{},gachaItemStatsDefs:{},gachaItemStatsDefsMinMax:{},debounceDelay:200,gameNameForTitle:"",teamNoun:"Team",extraFieldsToRender:{characters:[]},extraComponentsToRender:{characters:[]},teamBuildingRules:{},defaultFormat:"",getTeamBuildingRules:function(e){throw new Error("Function not implemented.")},drawTeamStats:function(e){return(0,r.Y)(r.FK,{})},hasTeamStats:!1,hexagonalBuilder:!1,gachaApiToLoad:[],elementTypes:{},tierlistCategories:{},defaultTierCategory:"",multipleComponentCollection:!1,collectionComponents:[],collectionComponentTitles:[],collectionComponentTypes:[],processApiData:(e,t)=>t,tierlistRatingCaption:"Rating",sortConfig:{},homeGridMinWidth:80,gridHoverBrightness:1.2}},79231(e,t,n){n.d(t,{$O:()=>F,np:()=>D,gR:()=>S});var r=n(65560),o=n(86031),i=n(19880),a=n(89066);function l(e){const t=o.SA.decks.boards;if(t)for(const[n,r]of Object.entries(t))if(r.toLowerCase()===e.toLowerCase())return Number(n);return/side/i.test(e)?1:0}const s={riftbound:[e=>{try{const{mainDeck:t,sideboard:n}=(0,r.getDeckFromCode)(e),o=[];return t.forEach(e=>o.push({identifier:e.cardCode,quantity:e.count,board:0})),n.forEach(e=>o.push({identifier:e.cardCode,quantity:e.count,board:1})),o.length?o:null}catch{return null}}],pokepocket:[e=>{const t=(0,a.oD)(e);if(!t)return null;const n=[];for(const e of t.cards){const t=`${e.kind}:${e.gameId}`,r=n.find(e=>e.identifier===t);r?r.quantity+=1:n.push({identifier:t,quantity:1,board:0})}return n.length?n:null},e=>{const t=(0,i.P)(e);return t?t.map(e=>({identifier:`${e.setCode}-${e.number}`,quantity:e.count,board:0})):null}]},d={red:"1",yel:"2",blu:"3"},c=e=>e.replace(/[''`]/g,"");function p(e,t,n){const r=[],o=[];for(const i of t){const t=u(e,i.identifier,n);t?r.push({cardId:t.id,quantity:i.quantity,board:i.board,identifier:i.identifier}):o.push({identifier:i.identifier,quantity:i.quantity,board:i.board})}return{matched:r,unmatched:o}}function h(e,t){const n=new Map;for(const e of t)e.id&&n.set(e.id.toLowerCase(),e);const r=[],o=[];for(const t of e){const e=n.get(t.identifier.toLowerCase());e?r.push({cardId:e.id,quantity:t.quantity,board:t.board,identifier:t.identifier}):o.push({identifier:t.identifier,quantity:t.quantity,board:t.board})}return{matched:r,unmatched:o}}function u(e,t,n){switch(e){case"lorcana":return g(t,n);case"cookierun":case"onepiece":return function(e,t){const n=e.toLowerCase();return t.find(e=>e.id?.toLowerCase()===n)||m(e,t)}(t,n);case"starwars":return function(e,t){const n=e.split("-");if(n.length<2)return;const r=n[0],o=n.slice(1).join("-");return t.find(e=>e.setId?.toLowerCase()===r.toLowerCase()&&e.number===o)}(t,n);case"fabtcg":return function(e,t){const n=e.match(/^(.+?)\s*\((red|yel|blu)\)\s*$/i),r=n?n[1].trim():e,o=n?d[n[2].toLowerCase()]:null,i=r.toLowerCase();return o?t.find(e=>{if(e.name?.toLowerCase()!==i)return!1;const t=e.pitch;return t===o||!t}):t.find(e=>e.name?.toLowerCase()===i)}(t,n);case"dragonball":case"gundam":case"sorcery":return function(e,t){const n=e.toLowerCase();let r=t.find(e=>e.id_normal?.toLowerCase()===n);return r||(r=t.find(e=>{const t=e;return((t.id??"")+(t.altcode??"")).toLowerCase()===n}),r||(r=t.find(e=>e.id?.toLowerCase()===n),r||t.find(e=>e.name?.toLowerCase()===n)))}(t,n);case"riftbound":return function(e,t){const n=e.toUpperCase();let r=t.find(e=>e.id?.toUpperCase()===n);if(r)return r;const o=e.toLowerCase();if(r=t.find(e=>e.name?.toLowerCase()===o),r)return r;const i=e.replace(/, /g," - ").toLowerCase();return i!==o&&(r=t.find(e=>e.name?.toLowerCase()===i),r)?r:t.find(e=>e.displayName?.toLowerCase()===o)}(t,n);case"cyberpunk":return function(e,t){const n=e.toLowerCase(),r=t.find(e=>e.id?.toLowerCase()===n);if(r)return r;const o=e=>f[e.id?.split("-")[0]??""]??4,i=e=>[...e].sort((e,t)=>
16292o(e)-o(t)||(e.id??"").localeCompare(t.id??""))[0];return i(t.filter(e=>e.name?.toLowerCase()===n))??i(t.filter(e=>e.displayName?.toLowerCase()===n))}(t,n);case"pokepocket":return function(e,t){const n=e.match(/^(PK|TR):(\d+)$/);if(n)return function(e,t,n){if(!e||!Number.isFinite(t)||t<=0)return;let r;for(const o of n){if(o.game_kind!==e||Number(o.game_id)!==t)continue;if(!r){r=o;continue}const n=v(o)-v(r);(n<0||0===n&&o.id<r.id)&&(r=o)}return r}(n[1]??"",Number(n[2]),t);const r=e.toLowerCase(),o=t.find(e=>e.id?.toLowerCase()===r);if(o)return o;const i=e.lastIndexOf("-");if(i>0){const n=e.slice(0,i).toLowerCase(),r=y(e.slice(i+1));if(r){const e=t.find(e=>e.setId?.toLowerCase()===n&&y(e.number)===r);if(e)return e}}return m(e,t)??g(e,t)}(t,n);default:return}}function g(e,t){const n=e.toLowerCase();let r=t.find(e=>e.displayName?.toLowerCase()===n);if(r)return r;const o=c(n);return t.find(e=>c(e.displayName?.toLowerCase()??"")===o)}function m(e,t){const n=e.toLowerCase();let r=t.find(e=>e.name?.toLowerCase()===n);if(r)return r;const o=c(n);return t.find(e=>c(e.name?.toLowerCase()??"")===o)}const f={wnc:0,wncep:1,wncth:2,promo:3},x={Common:0,Uncommon:1,Rare:2,"Double Rare":3,"Art Rare":4,"Super Rare":5,Shiny:6,"Special Art Rare":7,"Shiny Super Rare":8,"Immersive Rare":9,"Crown Rare":10},v=e=>x[e.rarity??""]??Number.MAX_SAFE_INTEGER;function y(e){const t=parseInt(String(e??""),10);return Number.isNaN(t)?"":String(t)}function w(e,t,n,r){const o=e.find(e=>e.identifier===t&&e.board===r);o?o.quantity+=n:e.push({identifier:t,quantity:n,board:r})}const b=/^[A-Za-z]+[0-9]*-[0-9]+[A-Za-z]?(?:@[0-9]+)?$/;function $(e){const t=[];for(const n of e.split("\n")){const e=n.trim();if(!e||e.includes("~~"))continue;const r=e.match(/^(\d+)\s+\S.*?\s+\[([A-Za-z]+[0-9]*-[0-9]+[A-Za-z]?(?:@[0-9]+)?)\]$/),o=r?.[1],i=r?.[2];if(o&&i){const e=parseInt(o,10);e>0&&w(t,i,e,0);continue}let a=" ";e.length>=2&&/^\d/.test(e)&&("x"===e[1]||"x"===e[2])&&(a="x");const l=e.indexOf(a);if(-1===l)continue;const s=parseInt(e.substring(0,l),10);if(!s||s<=0)continue;const d=e.substring(l+1).trim();if(d.length<3)continue;const c=d.split(" ",1)[0];w(t," "===a&&b.test(c)?c:d,s,0)}return{deckName:null,entries:t}}function k(e){const t=function(e){const t=[];let n=null;for(const r of e.split("\n")){const e=r.trim();if(!e)continue;if(e.toLowerCase().startsWith("name")){const t=e.indexOf("("),r=e.lastIndexOf(")");-1!==t&&-1!==r&&r>t&&(n=e.substring(t+1,r));continue}if(/^[_-]+$/.test(e))continue;const o=e.split(" ",2);if(o.length<2)continue;let i=parseInt(o[0],10),a=o[1];(!i||i<=0)&&(i=1,a=e);const l=a.split(" ",2)[0].trim();l.length<2||t.push({identifier:l,quantity:i,board:0})}return{deckName:n,entries:t}}(e);return t.entries.length>0?t:function(e){const t=[];for(const n of e.split("\n")){const e=n.trim();if(!e)continue;if(/^[_-]+$/.test(e))continue;const r=e.indexOf("["),o=e.indexOf("]",r);if(-1===r||-1===o)continue;const i=e.substring(r+1,o).trim();if(i.length<2)continue;const a=e.substring(0,r).trim();let l=parseInt(a,10);(!l||l<=0)&&(l=1),w(t,i,l,0)}return{deckName:null,entries:t}}(e)}const Y=/^(?:P-[A-Za-z]|[A-Za-z]\d+[A-Za-z]?)$/;function A(e){const t=e.match(/\(\s*([A-Za-z][A-Za-z0-9-]*?)[\s-]+(\d+)\s*\)\s*$/),n=t?.[1],r=t?.[2];if(n&&r&&Y.test(n))return{setCode:n,number:r};const o=e.split(/\s+/).filter(Boolean),i=o[o.length-1];if(!i)return null;const a=o[o.length-2];if(/^\d+$/.test(i)&&a&&Y.test(a))return{setCode:a,number:i};const l=i.lastIndexOf("-");if(l>0){const e=i.slice(0,l),t=i.slice(l+1);if(/^\d+$/.test(t)&&Y.test(e))return{setCode:e,number:t}}return null}const C={lorcana:function(e){const t=[];let n=0;for(const r of e.split("\n")){const e=r.trim();if(!e)continue;if(/^(maybe\s*board|maybe|side\s*board)\s*:?\s*$/i.test(e)){n=1;continue}const o=e.indexOf(" ");if(-1===o)continue;const i=parseInt(e.substring(0,o),10);if(!i||i<=0)continue;const a=e.substring(o+1).trim();a.length<3||w(t,a,i,n)}return{deckName:null,entries:t}},cookierun:$,onepiece:$,starwars:function(e){const t=[];for(const n of e.split("\n")){const e=n.trim();if(!e)continue;const r=e.replace(/x/gi,"|").replace(/_/g,"|").split("|");if(3!==r.length)continue;const o=parseInt(r[0],10);if(!o||o<=0)continue;const i=r[1].trim()+"-"+r[2].trim();t.push({identifier:i,quantity:o,board:0})}return{deckName:null,entries:t}},fabtcg:function(e){const t=[];for(const n of e.split("\n")){const e=n.trim();if(!e)continue;const r=e.match(/^(\d+)\s*x\s+(.+)$/i);if(!r)continue;const o=parseInt(r[1],10);if(!o||o<=0)continue;const i=r[2].trim();i.length<3||t.push({identifier:i,quantity:o,board:0})}return{deckName:null,entries:t}},dragonball:k,gundam:k,sorcery:function(e){const t=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split("\n"),n=t[0]?.trim().replace(/^name \((.*)\)$/i,"$1")||null,r=[];for(let e=1;e<t.length;e++){const n=t[e].trim();if(!n)continue;const o=n.match(/^(\d+) (.+)/);if(!o)continue;const i=parseInt(o[1],10);if(!i||i<=0)continue;const a=o[2].trim(),l=/\(([a-z0-9]+(?:[-_][a-z0-9]+)+)\)$/.exec(a)?.[1]??a;r.push({identifier:l,quantity:i,board:0})}return{deckName:n,entries:r}},riftbound:function(e){const t=[];let n=0;for(const r of e.split("\n")){const e=r.trim();if(!e)continue;if(/^side\s*board\s*:?\s*$/i.test(e)){n=1;continue}if(/^[A-Za-z][A-Za-z ]*:\s*$/.test(e))continue;const o=e.match(/^(\d+)\s+(.+?)\s+\(([A-Z0-9]+-[A-Z0-9]+[a-z]?)\)\s*$/i);if(o){const e=parseInt(o[1],10),r=o[3].toUpperCase();e>0&&w(t,r,e,n);continue}const i=e.replace(/x/i,"|").replace(/_/g,"|").split("|");if(3===i.length&&/^\d+$/.test(i[0])){const e=parseInt(i[0],10),r=(i[1]+"-"+i[2]).toUpperCase();e>0&&w(t,r,e,n);continue}const a=e.match(/^(\d+)\s+(.+)$/);if(a){const e=parseInt(a[1],10),r=a[2].trim();e>0&&r.length>=3&&w(t,r,e,n)}}return{deckName:null,entries:t}},cyberpunk:function(e){const t=[];for(const n of e.split("\n")){const e=n.trim();if(!e)continue;const r=e.match(/^(\d+)\s+.+?\s+\(([a-z0-9]+-[a-z0-9]+)\)\s*$/i);if(r){const e=parseInt(r[1],10);e>0&&w(t,r[2].toLowerCase(),e,0);continue}const o=e.match(/^(\d+)x?_([a-z0-9]+)_([a-z0-9]+)\s*$/i);if(o){const e=parseInt(o[1],10);e>0&&w(t,`${o[2]}-${o[3]}`.toLowerCase(),e,0);continue}const i=e.match(/^(\d+)\s+(.+)$/);if(i){const e=parseInt(i[1],10),n=i[2].trim();e>0&&n.length>=1&&w(t,n,e,0)}}return{deckName:null,entries:t}},pokepocket:function(e){const t=[];for(const n of e.split("\n")){const e=n.trim().replace(/^[-*â¢]\s+/,"");if(!e)continue;const r=e.match(/^(\d+)\s*[xX]?\s+(.+)$/),o=r?.[1],i=r?.[2]?.trim();if(!o||!i)continue;const a=parseInt(o,10);if(!a||a<=0)continue;const l=A(i),s=l?`${l.setCode}-${l.number}`:i;s.length<2||w(t,s,a,0)}return{deckName:null,entries:t}}},F={lorcana:"4 Ariel - On Human Legs\n2 Maui - Half-Shark\n3 Stitch - Rock Star",cookierun:"3 ST6-002 Fire Spirit Cookie\n2 BS8-004 Cilantro Cobra Cookie\nor\
16292n4xBS7-108\n3xBS1-001\nor\n4 GingerBrave",onepiece:"4xOP01-001\n4xOP01-002\n3xOP01-003\nor\n4 Monkey.D.Luffy\n3 Roronoa Zoro",starwars:"3xSOR_001\n2xSOR_002\n1xSHD_001",fabtcg:"3 x Wounding Blow (red)\n2 x Sink Below (blu)\n1 x Bravo, Star of the Show",dragonball:"name (My Deck)\nFB01-001 Son Goku(FB01-001)\n4 FB01-002 Vegeta(FB01-002)\nor\n4 [Son Goku]\n3 [Vegeta]",gundam:"name (My Deck)\nGCG01-001 Strike Gundam(GCG01-001)\n4 GCG01-002 Kira Yamato(GCG01-002)\nor\n4 [Strike Gundam]\n3 [Kira Yamato]",sorcery:"My Deck Name\n4 alpha-001\n3 alpha-002\n2 beta-001",cyberpunk:"3 Card Name (wnc-041)\n2 Another Card (wncep-003)\nor\n1_wnc_005a",riftbound:"1 Ornn - Fire Below the Mountain (SFD-244)\n3 World Atlas (SFD-086)\n2 Tianna Crownguard (SFD-060)\nor\n3_SFD_086\n2_OGN_045",pokepocket:"2 Helioptile B1a 28\n2 Mega Manectric ex B2b 27\n2 Professor's Research P-A 7\nor\n2 Helioptile (B1a-28)\nor paste a deck code â the in-game one or a Limitless one:\nEJibgJiapJiapJiWnpiWnpiWlâ¦\n3232B1a28222B461232P0B43"};function D(e,t,n){const r=t.trim();if(r.startsWith("{")||r.startsWith("[")){const e=function(e){let t;try{t=JSON.parse(e)}catch{return null}if(!t||"object"!=typeof t)return null;const n=t.deck;if(!n||"object"!=typeof n)return null;const r=[];for(const[e,t]of Object.entries(n)){if(!Array.isArray(t))continue;const n=l(e);for(const e of t){const t=e,o=t.id??t.cardId,i="string"==typeof o?o:"number"==typeof o?String(o):"",a=Number(t.count??t.quantity??0);i&&a>0&&r.push({identifier:i,quantity:a,board:n})}}if(0===r.length)return null;const o=t.metadata;return{entries:r,deckName:"string"==typeof o?.name?o.name:null}}(r);if(e)return{...h(e.entries,n),deckName:e.deckName}}const o=function(e,t){const n=s[e];if(!n)return null;const r=t.trim();if(!r||/\s/.test(r)||r.length<8)return null;for(const e of n){const t=e(r);if(t)return t}return null}(e,r);if(o)return{...e in C?p(e,o,n):h(o,n),deckName:null};const i=C[e];if(!i)return{matched:[],unmatched:[],deckName:null};const a=i(t);if(0===a.entries.length)return{matched:[],unmatched:[],deckName:a.deckName};const{matched:d,unmatched:c}=p(e,a.entries,n);if("sorcery"===e)for(const e of d){const t=n.find(t=>t.id===e.cardId);t&&"site"===t.cardtype?.toLowerCase()&&(e.board=1)}return{matched:d,unmatched:c,deckName:a.deckName}}function S(e){return e in C}},19880(e,t,n){n.d(t,{P:()=>r,R:()=>o});function r(e){if(!e.startsWith("3"))return null;const t=[];let n=1;for(;n<e.length;){if(n+5>e.length)return null;const r=Number(e[n]),o=Number(e[n+1]),i=Number(e[n+2]);if(!r||!o||!i)return null;const a=n+3+o,l=a+i;if(l>e.length)return null;const s=e.slice(n+3,a).replace(/0/g,"-"),d=e.slice(a,l);if(!/^\d+$/.test(d))return null;t.push({setCode:s,number:d,count:r}),n=l}return t.length>0?t:null}function o(e){let t="3";for(const n of e){const e=n.setCode.replace(/-/g,"0"),r=String(Number(n.number));if(!e||!/^\d+$/.test(r))continue;let o=n.count;for(;o>0;){const n=Math.min(o,9);t+=`${n}${e.length}${r.length}${e}${r}`,o-=n}}return"3"===t?"":t}},89066(e,t,n){n.d(t,{EH:()=>l,oD:()=>a});const r=["UNSPECIFIED","Colorless","Grass","Fire","Water","Lightning","Psychic","Fighting","Darkness","Metal","Dragon"],o=1e7,i=e=>Number.isInteger(e)&&e>=0&&e<=255;function a(e){const t=e.trim();if(!/^[A-Za-z0-9+/]+={0,2}$/.test(t)||t.length<8)return null;let n;try{const e=atob(t);n=Uint8Array.from(e,e=>e.charCodeAt(0))}catch{return null}let i=0;const a=[],l=(e,t)=>{if(i>=n.length)return!1;const r=n[i++]??0;if(i+3*r>n.length)return!1;for(let l=0;l<r;l++){const r=(n[i]??0)<<16|(n[i+1]??0)<<8|(n[i+2]??0);i+=3;const l=r-t;if(l<=0||l>=o)return!1;a.push({kind:e,gameId:l})}return!0};if(!l("TR",o))return null;if(!l("PK",0))return null;const s=[];if(i<n.length){const e=n[i++]??0;if(i+e>n.length)return null;for(let t=0;t<e;t++){const e=n[i++]??0,t=r[e];t&&e>0&&s.push(t)}}return i!==n.length||0===a.length?null:{cards:a,energies:s}}function l(e){const t=e.cards.filter(e=>"TR"===e.kind).map(e=>e.gameId),n=e.cards.filter(e=>"PK"===e.kind).map(e=>e.gameId),a=[],l=(e,t)=>{a.push(255&e.length);for(const n of e){const e=n+t;a.push(e>>16&255,e>>8&255,255&e)}};l(t,o),l(n,0);const s=e.energies.map(e=>r.findIndex(t=>t.toLowerCase()===e.toLowerCase())).filter(e=>e>0);
16292return a.push(255&s.length),s.forEach(e=>a.push(255&e)),a.every(i)?btoa(String.fromCharCode(...a)):""}},18656(e,t,n){function r(e,t){const n=new Map(t.map(e=>[e.id,e])),r=[];for(const[t,o]of Object.entries(e)){if(!o||o<=0)continue;const e=n.get(t);e&&r.push({card:e,count:o})}return r}n.d(t,{F:()=>r})},99899(e,t,n){n.d(t,{F:()=>d,M:()=>s});var r=n(10201),o=n(17402),i=n(63679),a=n(16133),l=n(75817);class s extends o.Ay.Component{render(){const e=(new Date).getTime(),t=new Date(1e3*Number(this.props.date)).getTime();if(isNaN(t))return(0,r.Y)(r.FK,{});const n=(e-t)/1e3;let o="";return o=n<0||n>86400||this.props.static?(0,a.GP)(parseInt(`${this.props.date}000`,10),"MMM dd, yyyy"):n>3600?`${Math.floor(n/3600)}h ago`:`${Math.floor(n/60)}m ago`,this.props.broken?(0,r.Y)("div",{style:{lineHeight:"1em"},children:o}):(0,r.FD)(l.oX,{$inline:this.props.inline,children:[(0,r.Y)("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.Y)("path",{d:"M14 7.03516H2V14.0352L2.0026 14.0866C2.02835 14.3386 2.24122 14.5352 2.5 14.5352H13.5C13.7761 14.5352 14 14.3113 14 14.0352V7.03516ZM10 4.03516V3.53516H6V4.03516C6 4.3113 5.77614 4.53516 5.5 4.53516C5.22386 4.53516 5 4.3113 5 4.03516V3.53516H2.5C2.22386 3.53516 2.00001 3.75902 2 4.03516V6.03516H14V4.03516C14 3.75902 13.7761 3.53516 13.5 3.53516H11V4.03516C11 4.3113 10.7761 4.53516 10.5 4.53516C10.2239 4.53516 10 4.3113 10 4.03516ZM15 14.0352C15 14.8636 14.3284 15.5352 13.5 15.5352H2.5C1.67157 15.5352 1 14.8636 1 14.0352V4.03516C1.00001 3.20674 1.67158 2.53516 2.5 2.53516H5V2.03516C5 1.75901 5.22386 1.53516 5.5 1.53516C5.77614 1.53516 6 1.75901 6 2.03516V2.53516H10V2.03516C10 1.75901 10.2239 1.53516 10.5 1.53516C10.7761 1.53516 11 1.75901 11 2.03516V2.53516H13.5C14.3284 2.53516 15 3.20674 15 4.03516V14.0352Z",fill:"white",fillOpacity:"0.6"})}),o]})}}class d extends o.Ay.Component{render(){const e=this.props.utc?0:1e3*(new Date).getTimezoneOffset()*60,t=(new Date).getTime()+e,n=new Date(1e3*+this.props.dateStart).getTime(),o=this.props.dateEnd?new Date(1e3*+this.props.dateEnd).getTime():n,i=(t-o)/1e3,a=(o-t)/1e3,l=(n-t)/1e3;let s=(0,r.Y)(r.FK,{});if(t>o)if(i>86400){const e=Math.floor(i/86400),t=Math.floor((i-60*e*60*24)/3600);s=(0,r.FD)(r.FK,{children:["Ended"," ",(0,r.FD)(p,{children:[e,"d ",t,"h"]})," ","ago"]})}else if(i>3600){const e=Math.floor(i/3600),t=Math.floor((i-60*e*60)/60);s=(0,r.FD)(r.FK,{children:["Ended"," ",(0,r.FD)(p,{children:[e,"h ",t,"m"]})," ","ago"]})}else s=(0,r.FD)(r.FK,{children:["Ended ",(0,r.FD)(p,{children:[Math.floor(i/60),"m"]})," ago"]});else if(t>n&&t<o)if(a>86400){const e=Math.floor(a/86400),t=Math.floor((a-60*e*60*24)/3600);s=(0,r.FD)(r.FK,{children:[(0,r.FD)(p,{children:[e,"d ",t,"h"]})," ","left"]})}else if(a>3600){const e=Math.floor(a/3600),t=Math.floor((a-60*e*60)/60);s=(0,r.FD)(r.FK,{children:[(0,r.FD)(p,{children:[e,"h ",t,"m"]})," ","left"]})}else s=(0,r.FD)(r.FK,{children:[(0,r.FD)(p,{children:[Math.floor(a/60),"m"]})," left"]});else if(t<n)if(l>86400){const e=Math.floor(l/86400),t=Math.floor((l-60*e*60*24)/3600);s=(0,r.FD)(r.FK,{children:["In"," ",(0,r.FD)(p,{children:[e,"d ",t,"h"]})]})}else if(l>3600){const e=Math.floor(l/3600),t=Math.floor((l-60*e*60)/60);s=(0,r.FD)(r.FK,{children:["In"," ",(0,r.FD)(p,{children:[e,"h ",t,"m"]})]})}else s=(0,r.FD)(r.FK,{children:["In ",(0,r.FD)(p,{children:[Math.floor(l/60),"m"]})]});return(0,r.Y)(c,{$vertical:this.props.vertical,children:s})}}const c=i.I4.div` 16293 display: inline-flex; 16294 gap: 5px; 16295 ${e=>e.$vertical?"flex-direction: column; line-height: 10px;":""} 16296`,p=i.I4.div` 16297 white-space: nowrap; 16298 font-weight: bold; 16299`},84827(e,t,n){n.d(t,{X:()=>o,Z:()=>i});var r=n(86031);function o(e){return!(r.SA.decks.boardsNotInDeck??[]).includes(String(e))}function i(e){const t={};for(const[n,r]of Object.entries(e))o(n)&&(t[n]=r);return t}},45952(e,t,n){n.d(t,{bn:()=>h,PP:()=>u,e$:()=>g});var r=n(17402),o=n(4738),i=n(55612);const a={decks:[],cards:{}};var l=n(12434);var s=n(75370);const d=new(n(81616).il);let c=null,p=0;function h(e){e<=0||!(0,s.cl)()?0!==p&&(p=0,d.updateState(a)):p!==e&&null===c&&(c=async function(){const e=`/cgfw/getdeckcommitments?game=${encodeURIComponent(l.Ay.TheGame)}`,t=await i.A.get(e,void 0,{url:`https://api.dotgg.gg${e}`,headers:(0,o.z5)()});if(t.error)throw new Error(t.error_text||"Failed to load deck commitments");return{decks:(t.decks??[]).map(e=>({id:Number(e.id)||0,humanname:e.humanname??"",slug:e.slug??""})),cards:t.cards??a.cards}}().then(t=>{p=e,d.updateState(t)}).catch(()=>{d.updateState(a)}).finally(()=>{c=null}))}function u(){p=0}function g(){const[e,t]=(0,r.J0)(()=>d.getState().getOrElse(a)??a);return(0,r.vJ)(()=>{const e=()=>t(d.getState().getOrElse(a)??a);return d.addListener(e),e(),()=>d.removeListener(e)},[]),e}},75370(e,t,n){n.d(t,{Vr:()=>s,cl:()=>a,ef:()=>l});var r=n(86031),o=n(4738);const i="paper-mode";function a(){return!0===r.SA.decks?.physicalDecks}function l(e){if(!a())return!1;const t=e?.settings?.paper_mode;return void 0!==t?"1"===t:"1"===(0,o.Ri)(i)}function s(e){(0,o.TV)(i,e?"1":"0",365)}},56703(e,t,n){n.d(t,{u:()=>r.u});var r=n(19895)},34561(e,t,n){n.d(t,{hF:()=>o});var r=n(86031);function o(e){const t={};
16299return r.SA.cards.cardsFilterParams.forEach(n=>{""!==e[n]&&void 0!==e[n]&&(t[n]=e[n].toString())}),t}n(70165)},672(e,t,n){n.d(t,{lD:()=>c});var r=n(86031),o=n(21991),i=n(89024);const a={showCounts:!0,disableEmpty:!0,hideEmpty:!1};function l({card:e,filterField:t,filterValue:n,filterConfig:r,andMode:a}){if(!n||""===n)return!0;const l=a&&"color"===t,d=r.find(e=>e.search===t||e.field===t);if(!d)return!0;const c=s(e,d.field);switch(d.type){case"equalText":return function(e,t,n){if(t.includes(",")){const r=t.split(",").map(e=>e.trim().toLowerCase()),o=String(e).toLowerCase();return n?r.every(e=>o===e):r.some(e=>o===e)}return String(e).toLowerCase()===t.toLowerCase()}(c,n,l);case"equalTextAny":return function(e,t,n,r){const o=n.split(",").map(e=>e.trim().toLowerCase()),i=Array.isArray(t.field)?t.field:[t.field],a=t=>i.some(n=>{const r=e[n];return"string"==typeof r&&(r.toLowerCase()===t||r.toLowerCase().includes(t))});return r&&o.length>1?o.every(a):o.some(a)}(e,d,n,l);case"containsText":return(0,i.qW)(String(c),n);case"artistCredit":return(0,o.bJ)(String(c),n);case"commaSplitSearchTerms":return function(e,t,n){const r=t.split(",").map(e=>e.trim().toLowerCase()),o=String(e).toLowerCase();return n&&r.length>1?r.every(e=>o===e):r.some(e=>o===e||o.includes(e))}(c,n,l);case"numberList":return function(e,t){return null!=e&&""!==e&&t.split(",").map(e=>e.trim()).filter(e=>""!==e).includes(String(e))}(c,n);case"arrayTextItemsPassAnyValid":case"arrayTextItems":return function(e,t,n){if(!Array.isArray(e))return!1;const r=t.split(",").map(e=>e.trim().toLowerCase()),o=t=>e.some(e=>null!=e&&String(e).toLowerCase()===t);return n&&r.length>1?r.every(o):r.some(o)}(c,n,l);default:return String(c).toLowerCase()===n.toLowerCase()}}function s(e,t){if(Array.isArray(t)){for(const n of t){const t=e[n];if(null!=t&&""!==t)return t}return""}return e[t]??""}function d(e,t,n=a){const{showCounts:r,disableEmpty:o,hideEmpty:i}={...a,...n},l={};for(const[e,n]of Object.entries(t))l[e.toLowerCase()]=n;return e.map(e=>{if(""===e.value)return e;if(!0===e.isSubHeading)return e;const n=t[e.value]??l[e.value.toLowerCase()]??0;return i&&0===n?null:{...e,cardsCount:r?n:void 0,isDisabled:o&&0===n}}).filter(e=>null!==e)}function c({cards:e,currentFilters:t,baseFilterOptions:n,config:o=a,andMode:i,queryFor:c}){const p=o.enabledFilters||Object.keys(n),h=["sortby","sortorder","clear"],u=function(e,t,n,o={}){const{andMode:i,queryFor:a}=o,d=r.SA.cards.filterConfig||[],c={},p=new Map(n.map(e=>[e,a?.(e)]));return n.forEach(e=>{c[e]={}}),e.forEach(e=>{n.forEach(n=>{const r=p.get(n);let o=!r||r(e);const a=i&&"color"===n;for(const[r,s]of o?Object.entries(t):[])if((r!==n||a)&&s&&""!==s&&!["sortby","sortorder","clear","invertFilters","filterLogicAnd","textSearch"].includes(r)&&!l({card:e,filterField:r,filterValue:s,filterConfig:d,andMode:i})){o=!1;break}if(o){const t=d.find(e=>e.search===n||e.field===n),r=s(e,t?.field||n);if(Array.isArray(r))r.forEach(e=>{if(e){const t=String(e);c[n][t]=(c[n][t]||0)+1}});else if(null!=r&&""!==r){const e=String(r);c[n][e]=(c[n][e]||0)+1}}})}),c}(e,t,p.filter(e=>!h.includes(e)),{andMode:i,queryFor:c}),g=r.SA.cards.filterExtraConfig||{},m={};for(const[e,t]of Object.entries(n))if(h.includes(e))m[e]=t;else if(u[e]){const n=g[e],r={...o,hideEmpty:n?.hideEmpty??o.hideEmpty};m[e]=d(t,u[e],r)}else m[e]=t;return m}},98597(e,t,n){function r(e,t){const n=t?.find(e=>""===e.value),r=n?.displayLabel;if(r)return r.replace(/\s*Filter$/i,"").trim();if(n?.label){const e=n.label.replace(/^Any\s+/i,"").trim();if(""!==e&&e.toLowerCase()!==n.label.toLowerCase())return e}return e.charAt(0).toUpperCase()+e.slice(1).replace(/([A-Z])/g," $1").trim()}n.d(t,{v:()=>r})},76424(e,t,n){n.d(t,{Al:()=>x,Db:()=>w,MD:()=>f,ce:()=>k,oH:()=>$,qK:()=>b,sK:()=>y});var r=n(10201),o=n(66701),i=n(92475),a=n(86031),l=n(4738),s=n(91181),d=n(17352),c=n(1537),p=n(4930),h=n(9135);const u="https://static.dotgg.gg/lorcana/generic/spacer.gif",g=e=>(0,h.Qm)(e)?.icon||u,m=(e,t,n)=>n?(0,r.Y)(i.D,{$width:`${t}`,$height:`${t}`,src:g(e)}):(0,r.Y)(i.D,{width:`${t}px`,height:`${t}px`,src:g(e)});function f(e,{iconSize:t=25,emptyLabel:n="Any Color",displayLabel:i,transientIcons:s=!1}
16299={}){const c=[{value:"",label:n,...i?{displayLabel:i}:{}}],p=e?.split(",")??[],u=a.SA.deckbuilder.cardPicker_colorSelect2UsedColorsFilter&&2===p.length;if((0,h.qd)().forEach(([e,n])=>{!1!==n.showInFilter&&(u&&!p.includes(e)||c.push({value:e,label:n.label,labelElement:(0,r.FD)(d.t,{children:[m(e,t,s)," ",n.label]})}))}),e&&u){const[t="",n=""]=p;c.unshift({value:e,label:e,labelElement:(0,r.FD)(d.t,{children:[(0,r.Y)(o.QS,{width:25,colors:[t,n]}),p.map(e=>(0,l.g3)(e)).join(", ")]})})}return c}function x(e,{emptyLabel:t="Any Color",displayLabel:n="Color Filter",width:i=20,hover:s=!0,labelFromKey:p=!1}={}){const u=[{value:"",label:t,...n?{displayLabel:n}:{}}],g=e?.split(",")??[],m=a.SA.deckbuilder.cardPicker_colorSelect2UsedColorsFilter&&2===g.length;if((0,h.qd)().forEach(([e,t])=>{!1!==t.showInFilter&&(m&&!g.includes(e)||u.push({value:e,label:p?e:t.label,labelElement:(0,r.FD)(d.t,{children:[(0,r.Y)(c.x,{$active:!1,$hover:s,$width:i,$gradient:t.gradient,title:t.label,$borderColor:t.border??""})," ",t.label]})}))}),e&&m){const[t="",n=""]=g;u.unshift({value:e,label:e,labelElement:(0,r.FD)(d.t,{children:[(0,r.Y)(o.QS,{width:25,colors:[t,n]}),g.map(e=>(0,l.g3)(e)).join(", ")]})})}return u}function v(e,{emptyLabel:t,displayLabel:n}){const r=[{value:"",label:t,...n?{displayLabel:n}:{}}];return Object.entries(e).forEach(([e,t])=>{r.push({value:e,label:t})}),r}function y({emptyLabel:e="Any Rarity",displayLabel:t="Rarity Filter",iconSize:n}={}){const o=[{value:"",label:e,...t?{displayLabel:t}:{}}];return Object.entries(a.SA.cards.rarityNames).forEach(([e,t])=>{void 0!==n?o.push({value:e,label:t,labelElement:(0,r.FD)(d.t,{children:[(0,r.Y)(i.D,{$width:`${n}`,$height:`${n}`,src:a.SA.cards.rarityIcons[e]||u})," ",t]})}):o.push({value:e,label:t})}),o}function w(e=e=>e.setId,{emptyLabel:t="Any Set",displayLabel:n="Set Filter"}={}){const r=[{value:"",label:t,...n?{displayLabel:n}:{}}],o=new Set,i=new Map;return s.jb.mapState(t=>{t.forEach(t=>{if(!t.setId||o.has(t.setId))return;o.add(t.setId);const n=e(t);i.set(n,(i.get(n)??0)+1),r.push({value:t.setId,label:n})})}),r.map(e=>e.value&&(i.get(e.label)??0)>1?{...e,label:`${e.label} (${e.value.toUpperCase()})`}:e)}function b(e){const t=(e?(0,h.Qm)(e)?.gradient:void 0)??["#ccc","#ccc"];return function(e){return(0,r.Y)(p.P,{$width:20,$gradient:t,children:e})}}function $(e,{emptyLabel:t,displayLabel:n,labelPrefix:o="",renderValue:i,maxValue:a}){let l=[];s.jb.mapState(e=>{l=e});const c={};l.forEach(t=>{const n=t[e];if(null==n||""===n)return;const r=String(n);void 0!==a&&Number(r)>a||(c[r]=(c[r]||0)+1)});const p=Object.keys(c).sort((e,t)=>{const n=Number(e),r=Number(t),o=""!==e&&!isNaN(n),i=""!==t&&!isNaN(r);return o&&i?n-r:o!==i?o?-1:1:e.localeCompare(t)}),h=[{value:"",label:t,labelElement:(0,r.Y)(r.FK,{children:t}),...n?{displayLabel:n}:{}}];return p.forEach(e=>{h.push({value:e,label:`${o}${e}`,labelElement:(0,r.FD)(d.t,{children:[o,i?i(e):e]}),cardsCount:c[e]})}),h}function k(e,t,n,o={}){const{emptyLabelValue:a="",iconTemplate:d,options:c}=o;let p=[];s.jb.mapState(e=>{p=e});const h={};p.forEach(e=>{(Array.isArray(e[t])?e[t]:[e[t]]).forEach(e=>{"string"==typeof e&&e&&(h[e]=(h[e]||0)+1)})});let u=null;const g=Object.entries(h).filter(([e])=>!c?.noneLabel||"none"!==e).map(([e,t])=>{const n=c?.labelPrefix?`${c.labelPrefix}${e}`:(0,l.g3)(e);return{value:e,label:n,labelElement:(0,r.FD)(r.FK,{children:[d&&(0,r.FD)(r.FK,{children:[(0,r.Y)(i.D,{$width:"20",src:d.replace("{NAME}",e)})," "]}),n]}),cardsCount:t}});return c?.noneLabel&&h.none&&(u={value:"none",label:c.noneLabel,cardsCount:h.none}),g.sort((e,t)=>"count"===n?+(t.cardsCount??0)-+(e.cardsCount??0):"intValue"===n?parseInt(e.value)-parseInt(t.value):e.value.localeCompare(t.value)),e&&g.unshift({value:a,label:e,labelElement:(0,r.Y)(r.FK,{children:e})}),u&&g.push(u),g}n.d(t,["VA",0,(e={})=>v(a.SA.cards.setNames(),{emptyLabel:"Any Set",displayLabel:"Set Filter",...e}),"dr",0,(e={})=>v(a.SA.cards.cardtypes(),{emptyLabel:"Any Card Type",displayLabel:"Card Type Filter",...e}),"xf",0,()=>[{value:"",label:"ASC"},{value:"r",label:"DESC"}]])},25235(e,t,n){function r(e,t,n){const r=parseInt(e.number)||0,o=parseInt(t.number)||0,i="0"===e.name?"z":e.name,a="0"===t.name?"z":t.name;return r===o?i===a?e.name?.localeCompare(t.name):i.localeCompare(a):r-o}n.d(t,{y:()=>r})},21991(e,t,n){var r=n(89024);const o=/\s*(?:\/|\+|&|,)\s*/,i=e=>(0,r.o0)((0,r.fQ)(e)),a=new Map,l=e=>{let t=a.get(e);if(void 0===t){const n=e.split(o).map(e=>e.trim()).filter(e=>""!==i(e));t={names:n,keys:[...new Set(n.map(i))]},a.set(e,t)}return t},s=e=>l(e).keys,d=(e,t)=>{const n=s(t);if(0===n.length)return!1;const r=s(e);return n.every(e=>r.includes(e))};n.d(t,["BU",0,i,"IT",0,s,"ZU",0,(e,t,n)=>"string"!=typeof n||""===n||(0,r.tK)(t.field).some(t=>{const o=(0,r.GR)(e,t);return"string"==typeof o&&d(o,n)}),"bJ",0,d,"of",0,e=>l(e).names])},19895(e,t,n){n.d(t,{u:()=>f});var r=n(86031),o=n(13810),i=n(89629),a=n(89024),l=n(21991);const s=new WeakMap,d=e=>"string"==typeof e&&e.includes(",")?e.split(",").map(e=>e.trim().toLowerCase()).filter(e=>""!==e):["string"==typeof e?e.toLowerCase():e],c=({cardData:e,config:t,searchStringObject:n,listOverride:r,anyColor:o,invertMode:c,andMode:p})=>{const h=n[t.search],u=p&&"color"===t.search,g=c&&!["listOverride","haschartdata"].includes(t.type||"");let m;switch(t.type){case"haschartdata":m=((e,t,n)=>{const r=(0,a.tK)(t.field);if("2"===n){let t=0;return r.forEach(n=>{0!==(0,a.Ro)((0,a.GR)(e,n))&&t++}),t>=1}if("1"!==n)return!0;let o=0;return r.forEach(t=>{0!==(0,a.Ro)((0,a.GR)(e,t))&&o++}),o>=r.length})(e,t,h);break;case"priceAtLeast":m=((e,t,n)=>{if(void 0===n||""===n)return!0;const r=(0,a.Ro)(n);if(Number.isNaN(r))return!0;const o=(0,a.Ro)((0,a.GR)(e,(0,a.tK)(t.field)[0]??""));return o>0?o>=r:r<=0})(e,t,h);break;case"floatGreaterThen":m=((e,t,n)=>{const r=(0,a.Ro)(n);if(Number.isNaN(r))return!0;const o=(0,a.tK)(t.field);let i=!0;return o.forEach(t=>{let n=(0,a.GR)(e,t);"string"==typeof n&&(n=(0,a.Ro)(n)),"number"==typeof n&&(i=i&&n>=r)}),i})(e,t,h);break;case"listOverride":m=((e,t,n,r)=>{if(void 0===r)return!0;const o=(0,a.tK)(t.field),i=(e=>{const t=s.get(e);if(t&&t.length===e.length)return t.set;const n=new Set(e);return s.set(e,{length:e.length,set:n}),n})(r);let l=!1;o.forEach(t=>{const n=(0,a.GR)(e,t);l=l||i.has(n)});let d=l;return void 0!==t.excludeFieldValues&&t.excludeFieldValues.forEac
16299h(t=>{const n=(0,a.GR)(e,t.field);t.vals.forEach(e=>{d=d&&n!==e})}),d})(e,t,0,r);break;case"containsText":m=((e,t,n)=>{if(void 0===n)return!0;const r=(0,a.tK)(t.field),o=d(n);let i=!1;return o.forEach(t=>{r.forEach(n=>{const r=(0,a.GR)(e,n);if(!r)return;const o=(0,a.dI)(r);"string"==typeof o&&(0,a.qW)(o,t)&&(i=!0)})}),i})(e,t,h);break;case"commaSplitTextItems":m=((e,t,n)=>{if(void 0===n)return!0;const r=(0,a.tK)(t.field);let o=!0;return r.forEach(t=>{const r=(0,a.GR)(e,t);"string"==typeof r&&(o=o&&n.split(",").includes(r.toLowerCase()))}),o})(e,t,h);break;case"arrayTextItemsPassAnyValid":m=((e,t,n,r)=>{if(void 0===n)return!0;const o=(0,a.tK)(t.field),i="string"==typeof n&&n.includes(",")?n.split(",").map(e=>e.trim()).filter(e=>""!==e):[n];if(r&&i.length>1){let t=!0;return o.forEach(n=>{const r=(0,a.GR)(e,n);(0,a.cy)(r)?i.forEach(e=>{-1===r.indexOf(e)&&(t=!1)}):t=!1}),t}let l=!1;return o.forEach(t=>{const n=(0,a.GR)(e,t);(0,a.cy)(n)&&(0===n.length||i.forEach(e=>{-1!==n.indexOf(e)&&(l=!0)}))}),l})(e,t,h,u);break;case"colorsList":m=((e,t,n)=>{if(void 0===n)return!0;let r=!1;const o=n.split(",");return(0,a.tK)(t.field).forEach(t=>{const n=(0,a.GR)(e,t);if((0,a.cy)(n))if(0===n.length);else{let e=0;n.forEach(t=>{-1!==o.indexOf(t)&&e++}),r=e===n.length}}),r})(e,t,h);break;case"arrayTextItemsNoItemsNoPass":case"arrayTextItems":m=((e,t,n,r)=>{if(void 0===n)return!0;const o=(0,a.tK)(t.field),i="string"==typeof n&&n.includes(",")?n.split(",").map(e=>e.trim().toLowerCase()).filter(e=>""!==e):[n.toLowerCase()];let l=!0;return o.forEach(n=>{const o=(0,a.GR)(e,n);if((0,a.cy)(o))if(0===o.length)"arrayTextItemsNoItemsNoPass"===t.type&&(l=!1);else if(r&&i.length>1){const e=i.every(e=>o.some(t=>"string"==typeof t&&t.toLowerCase()===e));l=l&&e}else{const e=i.some(e=>o.some(t=>"string"==typeof t&&t.toLowerCase()===e));l=l&&e}}),l})(e,t,h,u);break;case"commaSplitSearchTerms":m=((e,t,n,r)=>{if(void 0===n)return!0;const o=(0,a.tK)(t.field),i=n.toLowerCase().split(",");if(r&&i.length>1){let t=!0;return o.forEach(n=>{const r=(0,a.GR)(e,n);"string"==typeof r&&i.forEach(e=>{r.toLowerCase()===e||r.toLowerCase().includes(e)||(t=!1)})}),t}let l=!0;return o.forEach(t=>{const n=(0,a.GR)(e,t);"string"==typeof n&&(l=l&&-1!==i.indexOf(n.toLowerCase()))}),l})(e,t,h,u);break;case"equalText":case"equalTextStrict":m=((e,t,n)=>{if(void 0===n)return!0;const r=(0,a.tK)(t.field),o=d(n);if(o.length>1){let t=!1;return r.forEach(n=>{const r=(0,a.GR)(e,n);if("string"==typeof r){const e=r.toLowerCase();o.some(t=>e===t)&&(t=!0)}}),t}let i=!0;return r.forEach(r=>{const o=(0,a.GR)(e,r);"string"==typeof o?void 0!==n&&"string"==typeof o&&(i=i&&o.toLowerCase()===n.toLowerCase()):"equalTextStrict"===t.type&&(i=!1)}),i})(e,t,h);break;case"equalTextAny":m=((e,t,n,r)=>{if(void 0===n)return!0;const o=(0,a.tK)(t.field),i=d(n);if(r&&i.length>1){let t=!0;return i.forEach(n=>{let r=!1;o.forEach(t=>{const o=(0,a.GR)(e,t);if("string"==typeof o){const e=o.toLowerCase();e===n&&(r=!0),e.includes(n)&&(r=!0)}}),r||(t=!1)}),t}let l=0;return o.forEach(t=>{const n=(0,a.GR)(e,t);if("string"==typeof n){const e=n.toLowerCase();i.some(t=>e===t)&&(l+=1),i.some(t=>e.includes(t))&&(l+=1)}}),l>0})(e,t,h,u);break;case"artistCredit":m=(0,l.ZU)(e,t,h);break;case"numberList":m=((e,t,n)=>{if(void 0===n||""===n)return!0;const r=String(n).split(",").map(e=>e.trim()).filter(e=>""!==e);return 0===r.length||(0,a.tK)(t.field).some(t=>{const n=(0,a.GR)(e,t);return null!=n&&""!==n&&r.includes(String(n))})})(e,t,h);break;case"callback":m=t.callback(e,n,r,o);break;default:(0,i.yb)("filterDispatcher",`unknown filter type "${t.type}"`),m=!0}return g&&void 0!==h&&""!==h?!m:m},p=(e,t,n)=>null===e&&null===t?0:null===e?1:null===t?-1:e===t?0:"r"===n?e>t?-1:1:e<t?-1:1,h=e=>{if(null==e||""===e)return null;const t=Number(e);return isNaN(t)?null:t},u=e=>{if(null==e||""===e)return null;const t=parseInt(String(e),10);return isNaN(t)?null:t},g=(e,t,n,r)=>{const o=h(e[n.field]),i=h(t[n.field]);return p(o,i,r)},m=(e,t,n)=>{const{config:r,sortOrder:o,lastNumber:l}=n;switch(r.type){case"text":return((e,t,n,r)=>{const o=e[n.field],i=t[n.field];if(null==o&&null==i)return 0;if(null==o)return 1;if(null==i)return-1;const a="0"===String(o)?"z":String(o),l="0"===String(i)?"z":String(i);if(a===l)return 0;const s=a.localeCompare(l);return"r"===r?-s:s})(e,t,r,o);case"callback":return"r"===o?-r.callback(e,t,l):r.callback(e,t,l);case"number":return((e,t,n,r)=>{const o=u(e[n.field]),i=u(t[n.field]);return p(o,i,r)})(e,t,r,o);case"float":return g(e,t,r,o);case"float/float":return((e,t,n,r)=>{const o=h(e[n.field]),i=h(e[n.field2]),a=h(t[n.field]),l=h(t[n.field2]);
16299return p(null===o||null===i||0===i?null:o/i,null===a||null===l||0===l?null:a/l,r)})(e,t,r,o);case"floatNoZero":return((e,t,n,r)=>g(e,t,n,r))(e,t,r,o);case"price":return((e,t,n,r)=>{const o=e=>{const t=h((0,a.GR)(e,n.field));return null!==t&&t>0?t:null};return p(o(e),o(t),r)})(e,t,r,o);default:return(0,i.yb)("sortDispatcher",`unknown sorting type "${r.type}"`),0}};function f(e,t={},n,i={}){const{anyColor:l,skipSort:s}=i,d=r.SA.cards.filterConfig,p=r.SA.cards.sortConfig,h="1"===t.invertFilters,u="1"===t.filterLogicAnd;if(!e||0===e.length)return[];const g=t.textSearch,f="string"==typeof g&&(0,o.Q1)(g)?(0,o.m_)(g,e):void 0,x=f?((e,t)=>{const n={...e,textSearch:void 0};for(const[e,r]of Object.entries(t))void 0!==n[e]&&""!==n[e]||(n[e]=r);return n})(t,f.params):t,v=e.filter(e=>{if(f&&f.matches(e)===h)return!1;for(let t=0;t<d.length;t++){const r={...d[t]};if(r.field=(0,a.tK)(r.field),!c({cardData:e,config:r,searchStringObject:x,listOverride:n,anyColor:l,invertMode:h,andMode:u}))return!1}return!0});if(s)return v;const y=t.sortorder,w=String(t.sortby||""),b=(w.includes(",")?w.split(",").map(e=>e.trim()).filter(Boolean):[w]).map(e=>p[e]).filter(e=>void 0!==e),$=b.map((e,t)=>{if(t===b.length-1)return e;const n=e.callback?.primary;return n?{...e,callback:n}:e});if(0===$.length)return v;const k="r"===y?"-1":"99999999";return v.sort((e,t)=>{for(const n of $){const r=m(e,t,{config:n,sortOrder:y,lastNumber:k});if(0!==r)return r}return 0})}},6165(e,t,n){n.d(t,{Pg:()=>a,Zp:()=>l,d9:()=>i});var r=n(89024);const o={"7dpercentgains":"delta7dPricePercent","7ddollargains":"delta7dPrice","1dpercentgains":"deltaPricePercent","1ddollargains":"deltaPrice","1ddollarfoilgains":"deltaFoilPrice","7ddollarfoilgains":"delta7dPriceFoil"};function i({foil:e=!0}={}){const t={price:{type:"price",field:"comparativePrice"}};for(const[e,n]of Object.entries(o))t[e]={type:"float",field:n};return e&&(t.pricefoil={type:"price",field:"comparativeFoilPrice"}),t}function a(e,t){return!((0,r.Hg)(t.sortby,"7dpercentgains")&&null===e.price)}function l(e,t){return void 0===t.color||t.color.split(",").includes(e.color)}},50295(e,t,n){var r=n(69128),o=n(6180),i=n(173),a=n(89024);const l=null,s=(e,t)=>t.flatMap(t=>{const n=Reflect.get(e,t);return null==n||""===n?[]:Array.isArray(n)?n.filter(e=>null!=e&&""!==e):[n]}),d=(e,t)=>{const n=(0,a.fQ)(e),r=(0,a.fQ)(t);return n===r||""!==(0,a.o0)(n)&&(0,a.o0)(n)===(0,a.o0)(r)},c=e=>"number"==typeof e?e:"string"!=typeof e||""===e.trim()?Number.NaN:Number(e),p={">":(e,t)=>e>t,">=":(e,t)=>
16299e>=t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t},h=(e,t)=>n=>s(n,e).some(e=>(0,a.qW)((0,a.dI)(e),t)),u=(e,t,n)=>{const{targets:r,textFields:u}=(0,o.s)(n),g=[],m={},f=(e,o)=>{switch(e.kind){case"text":return""===(0,a.o0)(e.value)?l:h(u,e.value);case"not":{const t=f(e.child,!1);return t===l?l:e=>!t(e)}case"and":case"or":{const t=e.children.map(t=>f(t,o&&"and"===e.kind)).filter(e=>e!==l);return 0===t.length?l:"and"===e.kind?e=>t.every(t=>t(e)):e=>t.some(t=>t(e))}case"field":{const i=r.get(e.key);if(!i)return g.push(`"${e.key}" is not a filter here, so ${e.raw} was searched as text`),h(u,e.raw);if("text"===i.kind){if(p[e.op])return g.push(`${e.raw}: ${e.key} is text, it cannot be compared`),l;const t=h(i.fields,e.value);return"!="===e.op?e=>!t(e):t}if("param"===i.kind)return!o||":"!==e.op&&"="!==e.op?g.push(`${e.raw}: ${i.name} can only be set, not negated, compared or or'd`):m[i.name]=e.value,l;const f=n.filterConfig?.some(e=>e.search===i.name&&"numberList"===e.type)??!1;return((e,{op:t,value:n},r,{notes:o,exactValues:i})=>{const h=p[t];if(h){const r=c(n);return Number.isNaN(r)?(o.push(`${e.name}${t}${n}: a comparison needs a number`),l):t=>s(t,e.fields).some(e=>{const t=c(e);return!Number.isNaN(t)&&h(t,r)})}const u=n.split(",").map(e=>e.trim()).filter(Boolean),g=i?(e,t)=>(0,a.fQ)(e)===(0,a.fQ)(t):d,m=u.map(()=>i||":"!==t);if(":"===t&&!i){const t=new Set;for(const n of r)for(const r of s(n,e.fields))t.add((0,a.dI)(r));u.forEach((e,n)=>{m[n]=[...t].some(t=>d(t,e))})}const f=t=>{const n=s(t,e.fields).map(a.dI);return u.some((e,t)=>n.some(n=>m[t]?g(n,e):(0,a.qW)(n,e)))};return"!="===t?e=>!f(e):f})(i,e,t,{notes:g,exactValues:f})}}};return{matches:f((0,i.mA)(e),!0)??(()=>!0),params:m,notes:g}};n.d(t,["Y",0,u,"i",0,(e,t,n)=>{const{targets:i}=(0,o.s)(n);return o=>{const a=(0,r.wC)(e,e=>(e=>{const t=i.get(e.toLowerCase());return t&&"text"!==t.kind?t.name.toLowerCase():void 0})(e)===o.toLowerCase());return""===a?void 0:u(a,t,n).matches}}])},69128(e,t,n){var r=n(173);const o=/^([a-z][a-z0-9_]*)(!=|>=|<=|:|=|>|<)(.*)$/is,i=/^([a-z][a-z0-9_]*)(!=|>=|<=|:|=|>|<)$/i,a=e=>{const t=[];let n=0;for(;n<e.length;){const r=e.charAt(n);let o=n+1;if(/\s/.test(r)){for(;o<e.length&&/\s/.test(e.charAt(o));)o++;t.push({kind:"space",text:e.slice(n,o),s:n,e:o})}else if("("===r||")"===r)t.push({kind:"paren",text:r,s:n,e:o});else{let i='"'===r;for(;o<e.length&&(i||!/[\s()]/.test(e.charAt(o)));)'"'===e.charAt(o)&&(i=!i),o++;t.push({kind:"word",text:e.slice(n,o),s:n,e:o})}n=o}return t},l=e=>e.replace(/"/g,""),s=e=>"word"===e?.kind&&"or"===e.text.toLowerCase(),d=e=>{const t=a(e).filter(e=>"space"!==e.kind),n=[];let i=0;return t.forEach((e,a)=>{if("paren"===e.kind)return void(i=Math.max(0,i+("("===e.text?1:-1)));if(s(e))return;const d=e.text.startsWith("-")&&e.text.length>1,c=d?e.text.slice(1):e.text,p=i>0||s(t[a-1])||s(t[a+1]),h={raw:e.text,s:e.s,e:e.e,neg:d,grouped:p},[,u="",g="",m=""]=o.exec(c)??[],f=r.Do.find(e=>e===g);f&&""!==l(m)?n.push({...h,kind:"field",key:u.toLowerCase(),op:f,value:l(m)}):c.startsWith('"')?n.push({...h,kind:"phrase",key:"",op:"",value:l(c)}):n.push({...h,kind:"text",key:"",op:"",value:c})}),n},c=e=>e.replace(/\s+/g," ").trim(),p=(e,t,n,r)=>e.slice(0,t)+r+e.slice(n),h=(e,t,n=":")=>{const r=t.join(",");return`${e}${n}${/\s/.test(r)?`"${r}"`:r}`},u=e=>{const t=o.exec(e);return t?{key:(t[1]??"").toLowerCase(),op:t[2]??":",value:t[3]??""}:void 0};n.d(t,["CT",0,e=>{const t=i.exec(e);return t?{key:(t[1]??"").toLowerCase(),op:t[2]??":"}:void 0},"E7",0,(e,t)=>a(e).find(e=>"word"===e.kind&&t>=e.s&&t<=e.e),"FQ",0,(e,t)=>a(e).flatMap(e=>{if("word"!==e.kind)return[{text:e.text,role:"paren"===e.kind?"op":"space"}];if(s(e))return[{text:e.text,role:"or"}];const n=e.text.startsWith("-")&&e.text.length>1,r=n?e.text.slice(1):e.text,o=n?[{text:"-",role:"neg"}]:[],i=u(r);return i?[...o,{text:r.slice(0,i.key.length),role:t(i.key)?"key":"unknown"},{text:i.op,role:"op"},{text:i.value,role:"value"}]:[...o,{text:r,role:r.startsWith('"')?"phrase":"text"}]}),"IN",0,d,"UB",0,(e,t)=>c(p(e,t.s,t.e,"")),"VG",0,(e,t)=>{const n=e.filter(e=>"field"===e.kind&&t(e.key)),r=n.filter(e=>!(e.neg||e.grouped||":"!==e.op&&"="!==e.op));return{values:r.flatMap(e=>e.value.split(",").map(e=>
16299e.trim()).filter(Boolean)),complex:n.length>r.length}},"e_",0,p,"us",0,(e,t)=>{const n=d(e).filter(e=>"field"===e.kind&&t.matchesKey(e.key)&&!e.neg&&!e.grouped&&(":"===e.op||"="===e.op)),r=0===t.values.length?"":t.separate?t.values.map(e=>h(t.writeKey,[e])).join(" "):h(t.writeKey,t.values);let o=e;return[...n].reverse().forEach((e,t)=>{o=p(o,e.s,e.e,t===n.length-1?r:"")}),c(n.length>0?o:`${e} ${r}`)},"wC",0,(e,t)=>d(e).filter(e=>"field"===e.kind&&t(e.key)).reverse().reduce((e,t)=>p(e,t.s,t.e,""),e).replace(/\s+/g," ").trim(),"xV",0,u])},13810(e,t,n){n.d(t,{Q1:()=>a.Q1});var r=n(86031),o=(n(672),n(50295)),i=n(6180),a=n(173);const l=()=>({filterConfig:r.SA.cards.filterConfig,sortConfig:r.SA.cards.sortConfig,cardsFilterParams:r.SA.cards.cardsFilterParams,querySyntaxKeys:r.SA.cards.querySyntaxKeys});let s;n.d(t,["M3",0,e=>(0,a.Q1)(e)?(0,o.Y)(e,[],l()).notes:[],"OD",0,()=>(0,i.s)(l()),"gj",0,(e,t)=>{if(e&&(0,a.Q1)(e)&&!0!==r.SA.decks.serverSideCardsLibrary)return(0,o.i)(e,t,l())},"m_",0,(e,t)=>{if(s?.input===e&&s.pool===t)return s.compiled;const n=(0,o.Y)(e,t,l());return s={input:e,pool:t,compiled:n},n}])},6180(e,t,n){const r=new Set(["textsearch","sortby","sortorder","clear","invertfilters","filterlogicand","dailyprice","hidefoil"]),o=new Set(["callback","listOverride","haschartdata"]),i=new Set(["float","floatNoZero","number","price"]),a={t:["cardtype","type","card_type","realtype","category"],type:["cardtype","card_type","realtype","category"],c:["color","element","colors"],colour:["color"],r:["rarity"],s:["setid","set"],e:["setid","set"],set:["setid"],edition:["edition"],mv:["cost"],cmc:["cost"],k:["keywords","keyword"],kw:["keywords"],keyword:["keywords"],tag:["tags"],a:["artist","illustrator"],artist:["illustrator"],illustrator:["artist"],pow:["power"],str:["strength"],wp:["willpower"],will:["willpower"],aspect:["color"],trait:["traits","features","characteristics","tribes"],usd:["price","usdprice"],price:["usdprice"],n:["name"],o:["effects","text"],oracle:["effects","text"],role:["class","category"],element:["attribute","color"]},l=e=>"string"==typeof e?e:"",s=e=>"string"==typeof e?[e]:Array.isArray(e)?e.filter(e=>"string"==typeof e):[];n.d(t,["s",0,e=>{const t=new Map,n=e.filterConfig??[],d=n.find(e=>"textSearch"===e.search),c=d?s(d.field):["name","id"];if(e.querySyntaxKeys)return((e,t)=>{const n=new Map([["text",{kind:"text",fields:t}]]);for(const t of e){const e="text"===t.kind?{kind:"text",fields:t.fields}:{kind:"field",fields:t.fields,name:t.key};[t.key,...t.aliases??[]].forEach(t=>n.set(t.toLowerCase(),e))}return{targets:n,textFields:t,listing:[{key:"text",aliases:[],kind:"text"},...e.map(e=>({key:e.key,aliases:e.aliases??[],kind:e.kind,label:e.label,numeric:e.numeric}))]}})(e.querySyntaxKeys,c);t.set("text",{kind:"text",fields:c});for(const e of n){const n=l(e.search),r=s(e.field);n&&"textSearch"!==n&&!o.has(l(e.type))&&0!==r.length&&t.set(n.toLowerCase(),{kind:"field",fields:r,name:n})}for(const[n,r]of Object.entries(e.sortConfig??{})){const e=n.toLowerCase(),o=l(r.field);e&&!t.has(e)&&o&&i.has(l(r.type))&&(/gains|delta/i.test(e)||t.set(e,{kind:"field",fields:[o],name:n}))}for(const n of e.cardsFilterParams??[]){const e=n.toLowerCase();t.has(e)||r.has(e)||t.set(e,{kind:"param",name:n})}t.has("name")||t.set("name",{kind:"field",fields:["name"],name:"name"}),t.has("id")||t.set("id",{kind:"field",fields:["id"],name:"id"});const p=[...t.entries()],h=new Map;for(const[e,n]of Object.entries(a)){if(t.has(e))continue;const r=n.find(e=>t.has(e)),o=void 0===r?void 0:t.get(r);void 0!==r&&o&&(t.set(e,o),h.set(r,[...h.get(r)??[],e]))}return{targets:t,textFields:c,listing:p.map(([e,t])=>({key:e,aliases:h.get(e)??[],kind:t.kind}))}}])},173(e,t,n){const r=[":","=","!=",">",">=","<","<="],o=/^([a-z][a-z0-9_]*)(!=|>=|<=|:|=|>|<)(.+)$/is,i=(e,t)=>{const n=e.indexOf('"',t+1),r=-1===n?e.length:n;return{value:e.slice(t+1,r),end:-1===n?r:r+1}},a=(e,t)=>1===t.length&&t[0]?t[0]:{kind:e,children:t};n.d(t,["Do",0,r,"Q1",0,e=>!!e&&(!!e.includes('"')||e.split(/\s+/).some(e=>{const t=e.replace(/^\(+/,"");return o.test(t)||/^-[^\s-]/.test(t)})),"mA",0,e=>{const t=(e=>{const t=[];let n=0;for(;n<e.length;){const r=e.charAt(n);if(/\s/.test(r))n++;else if("("===r||")"===r)t.push({t:"("===r?"open":"close"}),n++;else if('"'===r){const{value:r,end:o}=i(e,n);t.push({t:"phrase",value:r}),n=o}else if("-"===r&&n+1<e.length&&!/[\s)]/.test(e.charAt(n+1)))t.push({t:"not"}),n++;else{let r="";for(;n<e.length&&!/[\s()]/.test(e.charAt(n));)if('"'===e[n]&&/(!=|>=|<=|[:=<>])$/.test(r)){const{value:t,end:o}=i(e,n);r+=`"${t}"`,n=o}else r+=e.charAt(n),n++;t.push("or"===r.toLowerCase()?{t:"or"}:{t:"word",value:r})}}return t})(e);let n=0;const l=()=>{const e=[];let r=[];for(;n<t.length&&"close"!==t[n]?.t;){if("or"===t[n]?.t){n++,r.length>0&&e.push(a("and",r)),r=[];continue}const o=s();o&&r.push(o)}return r.length>0&&e.push(a("and",r)),a("or",e.length>0?e:[{kind:"and",children:[]}])},s=()=>{const e=t[n++];if(e)switch(e.t){case"not":{const e=s();return e?{kind:"not",child:e}:void 0}case"open":{const e=l();return"close"===t[n]?.t&&n++,e}case"phrase":return""===e.value.trim()?void 0:{kind:"text",value:e.value};case"word":return(e=>{const[,t="",n="",i=""]=o.exec(e)??[],a=r.find(e=>e===n),l=(s=i).length>=2&&s.startsWith('"')&&s.endsWith('"')?s.slice(1,-1):s;var s;return a&&""!==l?{kind:"field",key:t.toLowerCase(),op:a,value:l,raw:e}:{kind:"text",value:e}})(e.value);default:return}},d=[l()];for(;n<t.length;
16299)n++,d.push(l());return a("and",d)}])},27802(e,t,n){var r=n(50295),o=n(6180),i=n(173);const a=/(image|img|icon|portrait|avatar|url|link|slug|path|html|^_)/i,l=e=>"string"==typeof e||"number"==typeof e||"boolean"==typeof e,s=e=>{const t=new Set,n=new Map;for(const r of e.slice(0,300))for(const[e,o]of Object.entries(r)){const r=Array.isArray(o)?o:[o];if(null==o||!r.every(l))continue;t.add(e);const i=r.every(e=>String(e).length<=60);n.set(e,(n.get(e)??!0)&&i&&!a.test(e))}return{filterConfig:[{search:"textSearch",field:[...t],type:"containsText"},...[...n].filter(([,e])=>e).map(([e])=>({search:e,field:e,type:"equalText"}))]}};let d;n.d(t,["I9",0,(e,t)=>{if(d?.input===e&&d.pool===t)return d.compiled;const n=(0,r.Y)(e,[...t],s(t));return d={input:e,pool:t,compiled:n},n},"Us",0,(e,t)=>(0,i.Q1)(e)?(0,r.Y)(e,[],s(t)).notes:[],"sS",0,e=>(0,o.s)(s(e)),"uU",0,(e,t)=>{if(e&&(0,i.Q1)(e))return(0,r.i)(e,[...t],s(t))}])},38861(e,t,n){var r=n(69128);const o={">":">",">=":"â¥","<":"<","<=":"â¤","!=":"â "},i=(e,t)=>t.split(",").map(t=>{const n=e?.values?.find(e=>e.value.toLowerCase()===t.trim().toLowerCase());return n?n.label:t.trim()}).join(", "),a=(e,t,n)=>t.map(t=>e.lookup(t)).find(e=>!!e&&(!n||(e.values?.length??0)>0));n.d(t,["$X",0,e=>{const t=new Map;return e.forEach(e=>{t.set(e.key,e),e.aliases.forEach(n=>t.set(n,e))}),e=>t.get(e.toLowerCase())},"CI",0,(e,t,n)=>{const o=(0,r.E7)(e,t);if(!o)return null;const i=o.text.startsWith("-")?"-":"",a=o.text.slice(i.length);if(""===a||a.startsWith('"'))return null;const l=(0,r.CT)(a),s=l?{...l,value:""}:(0,r.xV)(a);if(s)return((e,t,n,r)=>{const o=r.lookup(n.key);if(!o?.values||0===o.values.length)return null;const i=n.value.lastIndexOf(","),a=-1===i?"":n.value.slice(0,i+1),l=(-1===i?n.value:n.value.slice(i+1)).replace(/"/g,"").toLowerCase(),s=new Set(a.replace(/"/g,"").toLowerCase().split(",").filter(Boolean)),d=o.values.filter(e=>!s.has(e.value.toLowerCase())).filter(e=>e.value.toLowerCase().includes(l)||e.label.toLowerCase().includes(l)).slice(0,40).map(e=>{const r=/\s/.test(e.value)?`"${a}${e.value}"`:`${a}${e.value}`;return{code:e.value,meaning:e.label!==e.value?e.label:o.label,count:void 0!==e.count?e.count.toLocaleString():"",swatch:e.swatch,insert:`${t}${n.key}${n.op}${r}`}});return{mode:"value",title:`${o.label} â ${o.values.length} values`,items:d,...e}})(o,i,s,n);const d=a.toLowerCase(),c=n.keys.map(e=>{const t=e.aliases.find(e=>e===d)??e.aliases.find(e=>
16299e.startsWith(d)),n=e.key===d||t===d?-1:e.key.startsWith(d)?0:t?1:e.key.includes(d)?2:9;return{k:e,alias:t,score:n}}).filter(e=>e.score<9).sort((e,t)=>e.score-t.score).slice(0,40).map(({k:e,alias:t,score:n})=>{const r=`${(1===n||-1===n&&t===d)&&t?t:e.key}:`;return{code:r,meaning:e.label,count:e.aliases.join(" "),insert:`${i}${r}`}});return 0===c.length?null:{mode:"key",title:`Keys matching â${a}â`,items:c,s:o.s,e:o.e}},"Lp",0,(e,t)=>{const n=t=>e.neg?`not ${t.charAt(0).toLowerCase()}${t.slice(1)}`:t;if("phrase"===e.kind)return`${e.neg?"no ":""}exact phrase "${e.value}"`;if("text"===e.kind)return`${e.neg?"does not contain":"contains"} "${e.value}"`;const r=t.lookup(e.key);return r?":"===e.op||"="===e.op?n(`${r.label} is ${i(r,e.value)}`):"!="===e.op?n(`${r.label} is not ${i(r,e.value)}`):Number.isNaN(Number(e.value))?"needs a number":n(`${r.label} ${o[e.op]??e.op} ${e.value}`):"searched as plain text"},"jM",0,e=>{const t=a(e,["t","type","role","class"],!0),n=a(e,["c","element","rarity"],!0),r=a(e,["r","rarity","attack_type"],!0),o=a(e,["s","set"],!0),i=a(e,["k","keywords","tags","team","traits"],!0),l=a(e,["cost","might","power","hp","difficulty","strength"],!1),s=(e,t=0)=>{const n=e?.values??[],r=n[Math.min(t,n.length-1)]?.value;return e&&r?`${(e=>e.aliases.find(e=>e.length<=2)??e.key)(e)}:${/\s/.test(r)?`"${r}"`:r}`:""};return[[s(t),s(n),l?`${l.key}<=3`:""],[l?`${l.key}>=5`:"",i?`-${s(i)}`:""],[s(o,1),s(r,2)],[s(t,1),`-${s(n,1)}`]].map(e=>e.filter(e=>""!==e&&"-"!==e).join(" ")).filter((e,t,n)=>e.includes(":")&&n.indexOf(e)===t)},"kk",0,(e,t)=>{const n="field"===e.kind?t.lookup(e.key):void 0;return{label:n?n.label:"phrase"===e.kind?"Phrase":"field"===e.kind?e.key:"Text",value:n&&":"!==e.op&&"="!==e.op?`${o[e.op]??e.op} ${"!="===e.op?i(n,e.value):e.value}`:i(n,e.value),neg:e.neg,known:"field"!==e.kind||!!n}}])},16281(e,t,n){const r=e=>{const t=e.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2");return t.charAt(0).toUpperCase()+t.slice(1)};n.d(t,["s",0,(e,t,n)=>e.listing.filter(e=>"text"!==e.key).map(o=>{const i=e.targets.get(o.key),a=i&&"param"!==i.kind?i.fields:[o.key],l=new Map;let s=0,d=0;t.forEach((e,t)=>{new Set(((e,t)=>t.flatMap(t=>{const n=Reflect.get(e,t);return(Array.isArray(n)?n:[n]).filter(e=>"string"==typeof e||"number"==typeof e||"boolean"==typeof e).map(e=>String(e)).filter(e=>""!==e)}))(e,a)).forEach(e=>{const n=l.get(e.toLowerCase());n?n.count++:l.set(e.toLowerCase(),{value:e,count:1}),t<400&&(d++,Number.isFinite(Number(e))&&s++)})});const c=n(o.key),p=[...l.values()],h=p.length<=60&&p.every(e=>e.value.length<=40)?p.sort((e,t)=>t.count-e.count).map(e=>({value:e.value,label:e.value,count:e.count})):void 0,u=c?.options?c.options.map(e=>({...e,count:e.count??l.get(e.value.toLowerCase())?.count??(t.length>0?0:void 0)})):h;return{key:o.key,aliases:o.aliases,label:o.label??c?.label??r(o.key),selectKey:c?.selectKey,values:u,numeric:o.numeric??(d>0&&s/d>=.8)}})])},18121(e,t,n){n.d(t,{i:()=>i});var r=n(86031);const o=(e,t)=>{const n="0"===e.name?"z":e.name??"",r="0"===t.name?"z":t.name??"";return n===r?(e.name??"").localeCompare(t.name??""):n.localeCompare(r)};function i(e={}){const{order:t,rankBy:n="list",tieBreak:i=o}=e,a=(e,o,a)=>{const l=t?t():Object.keys(r.SA.core.gameColors),s=e=>{const t=void 0===e?-1:l.indexOf(e);return-1===t?l.length:t};if("scalar"===n){const t=s(e.color)-s(o.color);return 0!==t?t:a?i(e,o):0}const d=e.colorsList?.length?e.colorsList:e.color?[e.color]:[],c=o.colorsList?.length?o.colorsList:o.color?[o.color]:[];if(d.length!==c.length)return d.length-c.length;for(let e=0;e<d.length;e++){const t=s(d[e])-s(c[e]);if(0!==t)return t}return a?i(e,o):0},l=(e,t)=>
16299a(e,t,!0);return l.primary=(e,t)=>a(e,t,!1),l}const a=i();n.d(t,["z",0,a])},77931(e,t,n){var r=n(81616);const o=new WeakMap,i=new Map,a=Number.MAX_SAFE_INTEGER,l=e=>{const t=parseInt(e.ReleaseDate);return Number.isFinite(t)&&t>0?t:a},s=e=>{const t=o.get(e);if(t)return t;const n=new Map;return[...e].sort((e,t)=>l(e)-l(t)).forEach((e,t)=>{n.set(e.id.toLowerCase(),t)}),o.set(e,n),n},d=(e,t)=>t.get((e.setId??"").toLowerCase())??t.size,c=e=>(e.setId??"").toLowerCase(),p=e=>parseInt(e.number)||0,h=(e,t,n)=>{const o=r.F_.mapState(s).getOrElse(i),a=d(e,o)-d(t,o);if(0!==a)return a;const l=c(e).localeCompare(c(t));if(0!==l)return l;const h=p(e)-p(t);return 0!==h?h:n?(e.name??"").localeCompare(t.name??""):0},u=(e,t)=>h(e,t,!0);u.primary=(e,t)=>h(e,t,!1),n.d(t,["t",0,u])},89024(e,t,n){const r=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),o=e=>e.replace(/[^\p{L}\p{N}]+/gu,"");n.d(t,["GR",0,(e,t)=>e[t],"Hg",0,(e,t)=>String(e??"").split(",").some(e=>e.trim()===t),"Ro",0,e=>"string"==typeof e?+e:"number"==typeof e?e:0,"cy",0,e=>null!==e&&"object"==typeof e&&"number"==typeof e.length,"dI",0,e=>{if(e&&"object"==typeof e)try{return JSON.stringify(e).toLowerCase()}catch(e){return""}return"string"==typeof e?e:String(e)},"fQ",0,r,"o0",0,o,"qW",0,(e,t)=>{const n=r(t),i=r(e.toLowerCase());if(i.includes(n))return!0;const a=o(n);return""!==a&&o(i).includes(a)},"tK",0,e=>"string"==typeof e?[e]:e])},4738(e,t,n){n.d(t,{GD:()=>u,Gl:()=>a,Kh:()=>o,Mn:()=>l,Ri:()=>d,TV:()=>c,W2:()=>p,XN:()=>v,Yv:()=>x,_D:()=>m,_w:()=>b,ev:()=>i,fG:()=>f,g3:()=>s,nW:()=>y,sg:()=>h});var r=n(76052);function o(e,t){if("object"!=typeof e||null==e)return 0;if(t){let t=0;return Object.keys(e).forEach(n=>{0!==+e[n]&&t++}),t}return Object.keys(e).length}function i(e){let t=0;return"object"!=typeof e||null===e?0:(Object.keys(e).forEach(n=>t+=parseInt(e[n],10)),t)}function a(e){if("string"==typeof e)try{return JSON.parse(e)}catch(e){return{}}return e}function l(e,t){const n=e-.5+Math.random()*(t-e+1);return Math.round(n)}function s(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function d(e){const t=document.cookie.match(new RegExp(`(?:^|; )${e.replace(/([.$?*|{}()[\]\\/+^])/g,"\\$1")}=([^;]*)`));return t?decodeURIComponent(t[1]):void 0}function c(e,t,n){let r="";if(n){const e=new Date;e.setTime(e.getTime()+24*n*60*60*1e3),r="; expires="+e.toUTCString()}document.cookie=e+"="+(t||"")+r+"; path=/;"}function p(e){const t=6e4*(void 0===e?5:e);return Math.round(Date.now()/t)*t}function h(e,t){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{n=null,e(...r)},t)}}function u(e){navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(e).catch(()=>{g(e)}):g(e)}function g(e){const t=document.createElement("textarea"),n=navigator?.userAgent?.match(/ipad|iphone/i);if(t.style.whiteSpace="pre-wrap",t.value=e,t.readOnly=!0,t.contentEditable="true",document.body.appendChild(t),n){const e=document.createRange();e.selectNodeContents(t);const n=window.getSelection();n&&(n.removeAllRanges(),n.addRange(e),t.setSelectionRange(0,999999))}else t.select();try{document.execCommand("copy")}catch(e){console.warn("Copy to clipboard failed.",e)}t.remove()}function m(e){const t=Math.floor(((new Date).getTime()-e)/1e3);let n=t/31536e3;return n>1?Math.floor(n)+" years":(n=t/2592e3,n>1?Math.floor(n)+" months":(n=t/86400,n>1?Math.floor(n)+" days":(n=t/3600,n>1?Math.floor(n)+" hours":(n=t/60,n>1?Math.floor(n)+" minutes":Math.floor(t)+" seconds"))))}function f(e){const t=e%10,n=e%100;return 1===t&&11!==n?e+"st":2===t&&12!==n?e+"nd":3===t&&13!==n?e+"rd":e+"th"}function x(e){return e.toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-")}function v(e){const t={};return Object.keys(e).forEach(n=>{t[e[n]]=n}),t}function y(e,t=30,n=60,r=["#903e15","#a07518","#9ea211","#588a0d","#18920b"]){const o=(n-t)/r.length;let i=0;return e>t&&(e>n?i=r.length-1:(i=Math.floor((e-t)/o)-1,i<0&&(i=0),i>=r.length-1&&(i=r.length-1))),r[i]}const w=()=>{if("undefined"!=typeof window){if(void 0!==window.DotGGUser&&void 0!==window.DotGGUserToken)return{user:window.DotGGUser,token:window.DotGGUserToken};try{const e=r.Ar?.getItem("dotgg_user"),t=r.Ar?.getItem("dotgg_token");if(e&&t)return{user:e,token:t}}catch{}}return null};function b(e){const t={};if(null==e)return t;const n=e=>{null!=e&&(t[e[0]]=e[1])};if("function"==typeof e[Symbol.iterator])for(const t of e)n(t);else if("function"==typeof e.next)for(let t=e.next();t&&!t.done;t=e.next())n(t.value);else if("number"==typeof e.length)for(let t=0;t<e.length;t++)n(e[t]);return t}n.d(t,["iT",0,e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value},"x3",0,()=>null!==w(),"z5",0,()=>{const e=w();return e?{Dotgguserauth:`${e.user}:${e.token}`}:{}}])}
16299,82965(e,t,n){n.d(t,{Jl:()=>l});var r=n(70165),o=n(27802);const i={showCounts:!0,disableEmpty:!0,hideEmpty:!1};function a(e,t,n){if(!n||""===n)return!0;const r=e[t];if(n.includes(",")){const e=n.split(",").map(e=>e.trim().toLowerCase()).filter(e=>""!==e);if(Array.isArray(r))return e.some(e=>r.map(e=>e?.toString().toLowerCase()).includes(e));{const t=r?.toString().toLowerCase();return e.some(e=>t===e)}}return Array.isArray(r)?r.map(e=>e?.toString().toLowerCase()).includes(n.toLowerCase()):r?.toString().toLowerCase()===n.toLowerCase()}function l(e,t,n,l=i){const s=r.yD.classifications[n];if(!s)return{};const d=function(e,t,n,r){const o={},i=new Map(n.map(e=>[e,r?.(e)]));return n.forEach(e=>{o[e]={}}),e.forEach(e=>{n.forEach(n=>{const r=i.get(n);let l=!r||r(e);for(const[r,o]of l?Object.entries(t):[])if(r!==n&&o&&""!==o&&!["sortby","sortorder","clear","invertFilters","textSearch"].includes(r)&&!a(e,r,o)){l=!1;break}if(l){const t=e[n];if(Array.isArray(t))t.forEach(e=>{if(null!=e&&""!==e){const t=String(e).toLowerCase();o[n][t]=(o[n][t]||0)+1}});else if(null!=t&&""!==t){const e=String(t).toLowerCase();o[n][e]=(o[n][e]||0)+1}}})}),o}(e,t,l.enabledFilters||s.map(e=>e.name),(0,o.uU)(t.textSearch,e)),c={};return s.forEach(e=>{const t=function(e,t){const n=[];return n.push({value:"",label:`${t}: Any`,icon:""}),e.details.forEach(t=>{n.push({value:t.Name.toString(),label:t.DisplayName,icon:t.Icon,stars:t.stars,isCircledBorder:e.isCircledBorder??!1,color:t.color??""})}),n}(e,e.displayName),n=d[e.name]||{};c[e.name]=function(e,t,n=i){const{showCounts:r,disableEmpty:o,hideEmpty:a}={...i,...n};return e.map(e=>{if(""===e.value)return e;const n=t[String(e.value).toLowerCase()]??0;return a&&0===n?null:{...e,cardsCount:r?n:void 0,isDisabled:o&&0===n}}).filter(e=>null!==e)}(t,n,l)}),c}},10504(e,t,n){n.d(t,{O:()=>i});var r=n(70165),o=n(81616);function i(){const e=r.yD.classifications,t=o.fS;Object.keys(r.yD.classifications).forEach(n=>{r.yD.classifications[n]?.map((r,o)=>{if(!r.autodetails)return;const i=[],a=[];t[n]?.mapState(e=>{e&&a.push(...e)}),a?.forEach(e=>{(Array.isArray(e[r.name])?e[r.name]:[e[r.name]]).forEach(e=>{i.includes(e)||""===e||i.push(e)})}),i.sort();const l=r.details?.length>0?[...r.details]:[];i.forEach(e=>{e&&l.push({Name:e.toLowerCase(),DisplayName:e,Icon:r.autoicons?r.autoicons(e):""})}),e[n]?.[o]?.details&&(e[n][o].details=l)})}),(0,r.j3)({classifications:e})}},46186(e,t,n){n.d(t,{U:()=>i});var r=n(79063);const o={id:(0,r.n0)(),name:(0,r.n0)(),description:(0,r.n0)(),slug:(0,r.n0)(),icon:(0,r.n0)(),image:(0,r.n0)(),hasBigImage:(0,r.n0)()};function i(e){if("object"!=typeof e||null===e)return{};const t={};for(const[n,r]of Object.entries(e))"string"==typeof r&&(t[n]=r);return t}n.d(t,["w",0,o])},4150(e,t,n){var r=n(63679);const o=r.AH` 16300 &::-webkit-scrollbar {
16301 width: 5px; 16302 height: 5px; 16303 } 16304 &::-webkit-scrollbar-track { 16305 background: rgba(0, 0, 0, 0); 16306 } 16307 &::-webkit-scrollbar-thumb { 16308 background: var(--theme-palette-color-5); 16309 border-radius: 3px; 16310 } 16311 &::-webkit-scrollbar-thumb:hover { 16312 background: var(--theme-palette-color-1); 16313 } 16314 scrollbar-width: thin; 16315 scrollbar-color: var(--theme-palette-color-5) transparent; 16316`,i=r.DU` 16317div#editcontentdb, 16318div.nicescroll { 16319 ${o} 16320} 16321`,a=r.Ay.div` 16322 ${o} 16323`;n.d(t,["M3",0,a,"Vy",0,i,"eA",0,o])},61434(e,t,n){n.d(t,{$k:()=>f,Au:()=>g,GQ:()=>m,Lo:()=>h,MO:()=>x,QZ:()=>y,X3:()=>c,rP:()=>p,wN:()=>u});const r="dotgg:network-retry-now",o=new Set,i=new Map;let a=0,l=!1,s={offline:!1,retrying:0,nextRetryAt:null};function d(){let e=null,t=0;for(const n of i.values())n.visible&&(t++,n.nextRetryAt>0&&(null===e||n.nextRetryAt<e)&&(e=n.nextRetryAt));s={offline:l,retrying:t,nextRetryAt:e};for(const e of o)e(s)}function c(){return s}function p(e){return o.add(e),e(s),()=>{o.delete(e)}}function h(e=s){return e.offline||e.retrying>0}function u(){const e=++a,t="undefined"!=typeof window?setTimeout(()=>{const t=i.get(e);t&&(t.visible=!0,t.graceTimer=null,w(),d())},3e3):null;return i.set(e,{nextRetryAt:0,visible:!1,graceTimer:t}),d(),e}function g(e,t){const n=i.get(e);n&&(n.nextRetryAt=t,d())}function m(e){const t=i.get(e);t&&(t.graceTimer&&clearTimeout(t.graceTimer),i.delete(e),d())}function f(){"undefined"!=typeof window&&window.dispatchEvent(new Event(r))}function x(e){return"undefined"==typeof window?()=>{}:(window.addEventListener(r,e),()=>window.removeEventListener(r,e))}let v=null;function y(e){v=e,h()&&queueMicrotask(e)}function w(){v?.()}if("undefined"!=typeof window){l=!1===navigator.onLine,s={offline:l,retrying:0,nextRetryAt:null};const e=()=>{const e=!1===navigator.onLine;e!==l&&(l=e,l&&w(),d())};window.addEventListener("online",e),window.addEventListener("offline",e)}},87732(e,t,n){n.d(t,{Xx:()=>r});class r{constructor(e){this.value=e}isEmpty(){return void 0===this.value}nonEmpty(){return void 0!==this.value}get(){return this.value}getOrElse(e){return this.value??e}map(e){return new r(this.value?e(this.value):void 0)}flatMap(e){return this.value?e(this.value):new r}}},90199(e,t,n){n.d(t,{cQ:()=>d,eK:()=>s,zz:()=>c});var r=n(17402),o=n(4738),i=n(12434);const a="dotgg:set-owned-printing-mode",l=()=>`${i.Ay.TheGame}-owned-exact`;function s(){return"undefined"!=typeof document&&"1"===(0,o.Ri)(l())}function d(e){(0,o.TV)(l(),!0===e?"1":"0",30),window.dispatchEvent(new CustomEvent(a,{detail:{exact:!0===e}}))}function c(){const[e,t]=(0,r.J0)(s());return(0,r.vJ)(()=>{const e=()=>t(s());return window.addEventListener(a,e),()=>window.removeEventListener(a,e)},[]),e}},54270(e,t,n){n.d(t,{A1:()=>d,A4:()=>h,EJ:()=>x,Jx:()=>f,Kx:()=>i,XV:()=>m,et:()=>u,fN:()=>l,nn:()=>p,oG:()=>a,on:()=>s,tN:()=>g,x_:()=>c});const r="qty:",o=new Set(["owned","owned1","ownedset","owned4","unowned"]);function i(e){return{min:0,max:e,open:!0}}function a(e){return e.min<=0&&e.open}function l(e){const t=e.find(e=>e.startsWith(r));if(!t)return null;const n=t.slice(4),o=n.indexOf("-");if(o<0)return null;const i=parseInt(n.slice(0,o),10),a=n.slice(o+1),l=a.endsWith("+"),s=parseInt(l?a.slice(0,-1):a,10);return Number.isNaN(i)||Number.isNaN(s)?null:{min:i,max:s,open:l}}function s(e,t){return e>=t.min&&(t.open||e<=t.max)}function d(e,t){const n=e.filter(e=>!e.startsWith(r)),o=function(e){if(a(e))return null;const t=e.open?`${e.max}+`:`${e.max}`;return`${r}${e.min}-${t}`}(t);return o?[...n,o]:n}function c(e,t,n){const r=[{key:"any",label:"Any",title:"Show every card",range:i(e)},{key:"none",label:"None",title:"Cards you don't own",range:{min:0,max:0,open:!1}},{key:"owned",label:"1+",title:"Any card you own",range:{min:1,max:e,open:!0}},{key:"set",label:"Playset",title:`Exactly ${t} ${1===t?"copy":"copies"}`,range:{min:t,max:t,open:!1}},{key:"miss",label:"Missing",title:`Fewer than a playset (0â${t-1})`,range:{min:0,max:Math.max(0,t-1),open:!1}},{key:"extra",label:"Extras",title:`Surplus copies (${t+1}+)`,range:{min:t+1,max:e,open:!0}}],o=[];for(const e of r)n&&"none"===e.key||o.some(t=>p(t.range,e.range))||o.push(e);return o}function p(e,t){return!(!a(e)||!a(t))||e.open===t.open&&e.min===t.min&&(e.open||e.max===t.max)}function h(e,t,n){const r=e=>{const t=parseInt(e.replace(/[^0-9]/g,""),10);return Number.isFinite(t)?Math.max(0,Math.min(t,n)):null};
16323let o=r(e)??0,i=""===t.trim(),a=n;if(i||(a=r(t)??0,a>=n&&(i=!0)),i)a=n;else if(o>a){const e=o;o=a,a=e}return{min:o,max:a,open:i}}function u(e){return{min:0===e.min?"":String(e.min),max:e.open?"":String(e.max)}}function g(e,t){const n=Math.max(1,Number.isFinite(t)?t:1);let r=0;for(const t of e){const e=+t.total;Number.isFinite(e)&&e>r&&(r=e)}return Math.max(n+1,r)}function m(e,t){const n=t.open?e.length-1:Math.min(t.max,e.length-1);let r=0;for(let o=Math.max(0,t.min);o<=n;o++)r+=e[o]??0;return r}function f(e){return a(e)?"Any":e.open?`${e.min}+`:e.min===e.max?`${e.min}`:`${e.min}â${e.max}`}function x(e,t){if(e.some(e=>e.startsWith(r)))return e;if(!e.some(e=>o.has(e)))return e;const n=function(e){return Number.isFinite(e)?e+1:e}(t),i=t,a=[];e.includes("unowned")&&a.push([0,0]),e.includes("owned")&&a.push([1,n]),e.includes("owned1")&&a.push([1,Math.max(1,i-1)]),e.includes("ownedset")&&a.push([i,i]),e.includes("owned4")&&a.push(e.includes("ownedset")?[n,n]:[i,n]);const l=e.filter(e=>!o.has(e));if(0===a.length)return l;const s=Math.max(...a.map(e=>e[1]));return d(l,{min:Math.min(...a.map(e=>e[0])),max:s,open:s>=n})}},99517(e,t,n){n.d(t,{m:()=>r});function r(){return[{value:"",label:"Any Printing",displayLabel:"Printing Filter"},{value:"base",label:"Base Art"},{value:"alt",label:"Alternate Art"}]}},55612(e,t,n){n.d(t,{A:()=>b});var r=n(2340),o=n(12434),i=n(10201),a=n(17402),l=n(63679),s=n(14730),d=n(61434);const c="dotgg-network-banner",p=()=>{const[e,t]=(0,a.J0)(d.X3),[,n]=(0,a.J0)(0);if((0,a.vJ)(()=>(0,d.rP)(t),[]),(0,a.vJ)(()=>{if(null===e.nextRetryAt)return;const t=setInterval(()=>n(e=>e+1),500);return()=>clearInterval(t)},[e.nextRetryAt]),!(0,d.Lo)(e))return null;const r=null!==e.nextRetryAt?Math.max(0,Math.ceil((e.nextRetryAt-Date.now())/1e3)):null,o=e.offline?"You appear to be offline.":"Having trouble reaching the server.",l=e.offline?"We'll reconnect automatically as soon as you're back online.":r&&r>0?`Retrying in ${r}sâ¦`:"Retryingâ¦";return(0,i.FD)(m,{role:"status","aria-live":"polite",children:[(0,i.Y)(f,{"aria-hidden":"true"}),(0,i.FD)(x,{children:[(0,i.Y)("strong",{children:o})," ",l]}),(0,i.Y)(v,{type:"button",onClick:()=>(0,d.$k)(),children:"Try now"})]})};let h=!1;const u=l.i7` 16324 from { opacity: 0; } 16325 to { opacity: 1; } 16326`,g=l.i7` 16327 to { transform: rotate(360deg); } 16328`,m=l.Ay.div` 16329 position: fixed; 16330 top: 16px; 16331 left: 50%; 16332 transform: translateX(-50%); 16333 z-index: 10001; 16334 display: flex; 16335 align-items: center; 16336 gap: 12px; 16337 max-width: calc(100vw - 32px); 16338 padding: 10px 16px; 16339 border-radius: 10px; 16340 background: linear-gradient(135deg, #b45309 0%, #92400e 100%); 16341 color: #fff; 16342 font-size: 14px; 16343 line-height: 1.4; 16344 box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35); 16345 animation: ${u} 0.25s ease-out; 16346 16347 @media (max-width: 600px) { 16348 left: 16px; 16349 right: 16px; 16350 transform: none; 16351 max-width: none; 16352 } 16353`,f=l.Ay.span` 16354 flex-shrink: 0; 16355 width: 16px; 16356 height: 16px; 16357 border: 2px solid rgba(255, 255, 255, 0.35); 16358 border-top-color: #fff; 16359 border-radius: 50%; 16360 animation: ${g} 0.8s linear infinite; 16361`,x=l.Ay.span` 16362 flex: 1; 16363 min-width: 0; 16364`,v=l.Ay.button` 16365 flex-shrink: 0; 16366 border: 1px solid rgba(255, 255, 255, 0.5); 16367 background: rgba(255, 255, 255, 0.12); 16368 color: #fff; 16369 font-size: 13px; 16370 font-weight: 600; 16371 padding: 4px 12px; 16372 border-radius: 6px; 16373 cursor: pointer; 16374 transition: background 0.15s; 16375 16376 &:hover { 16377 background: rgba(255, 255, 255, 0.25); 16378 } 16379`;function y(e,t){return"function"==typeof t?t:!1===t?()=>!1:!0===t||"get"===e?e=>"network"===e||"timeout"===e||"server"===e:e=>"network"===e}function w(e){return async(t,n,i)=>{const a=i?.url||`${o.Ay.apiUrl}${t}`,l={...i?.headers};n&&n instanceof FormData?delete l["Content-Type"]:n&&(l["Content-Type"]="application/json");const s=i?.timeoutMs??("get"===e?2e4:void 0),d=async()=>{const t=s?new AbortController:void 0,r=t&&s?setTimeout(()=>t.abort(),s):void 0,o={method:e.toUpperCase(),headers:l,credentials:!1===i?.withCredentials?"omit":"include",mode:"cors",...i?.keepalive?{keepalive:!0}:{},...t?{signal:t.signal}:{}};n&&"post"===e&&(o.body=n instanceof FormData?n:JSON.stringify(n));try{const e=await fetch(a,o);if(!e.ok){const t=await e.text().catch(()=>""),n=new Error(`HTTP error! status: ${e.status}`);throw n.response={status:e.status,statusText:e.statusText,data:t},n}const t=e.headers.get("content-type");return t&&t.includes("application/json")?await e.json():await e.text()}finally{r&&clearTimeout(r)}};try{return await(0,r.bD)(d,{shouldRetry:y(e,i?.retry)})}catch(e){throw console.error("Request failed:",e),e}}}(0,d.QZ)(function e(){if(h||"undefined"==typeof document)return;if(!document.body)return void document.addEventListener("DOMContentLoaded",e,{once:!0});if(null===document.querySelector('[id^="rootOfProContent"]'))return;if(h=!0,document.getElementById(c))return;const t=document.createElement("div");t.id=c,document.body.appendChild(t),(0,s.Hr)(t).render((0,i.Y)(p,{}))});const b={get:w("get"),post:w("post")}}
16379,2340(e,t,n){n.d(t,{bD:()=>d});var r=n(61434);function o(e){if(e&&"object"==typeof e){const t=e;if("AbortError"===t.name)return"timeout";const n=t.response?.status;if("number"==typeof n){if(429===n||n>=500)return"server";if(n>=400)return"client"}if(void 0===t.response)return"network"}return"unknown"}const i=[4e3,8e3,15e3];function a(e){const t=i[e]??15e3,n=.2*t;return Math.round(t-n+Math.random()*n*2)}function l(e){return new Promise(t=>{const n="undefined"!=typeof window;let o;const i=()=>{void 0!==o&&clearTimeout(o),a(),n&&window.removeEventListener("online",i),t()},a=(0,r.MO)(i);n&&window.addEventListener("online",i),null!==e&&(o=setTimeout(i,e))})}function s(){return"undefined"!=typeof navigator&&!1===navigator.onLine}async function d(e,t){const n=t.retries??8;let i=null;const d=e=>{null!==i&&(0,r.Au)(i,e)};try{for(let c=0;;c++)try{return await e()}catch(e){const p=o(e);if(c>=n||!t.shouldRetry(p,c))throw e;if(t.onRetry?.(c,e),t.silent||null!==i||(i=(0,r.wN)()),s())d(0),c--,await l(2e4);else{const e=a(c);d(Date.now()+e),await l(e)}}}finally{null!==i&&(0,r.GQ)(i)}}n.d(t,["ME",0,e=>"network"===e||"timeout"===e])},7062(e,t,n){n.d(t,{x:()=>l});var r=n(10201),o=(n(17402),n(10900));const i=/^[a-zA-Z][a-zA-Z0-9-]*$/,a=/^[a-zA-Z_:][a-zA-Z0-9_.:-]*$/;function l(e,t){const n=t?.replace,l={...t,replace:(e,t)=>{if(n){const r=n(e,t);if(null!=r&&!1!==r&&!0!==r)return r}if(e&&"tag"===e.type){const t=e;if(t.name&&!i.test(t.name))return(0,r.Y)(r.FK,{children:t.children?(0,o.zd)(t.children,l):null});if(t.attribs)for(const e of Object.keys(t.attribs))a.test(e)||delete t.attribs[e]}}};try{return(0,o.Ay)(e,l)}catch(n){return console.error("Failed to parse HTML in safeParse:",{error:n,htmlLength:"string"==typeof e?e.length:0,options:t}),(0,r.Y)("span",{})}}},76052(e,t,n){n.d(t,{Mu:()=>c,YA:()=>p,le:()=>d});var r=n(91995);const o=new Map;let i=!1;function a(){if(i)return;i=!0;let e=0;const t=()=>{(0,r.fq)()?(0,r.rQ)("Your browser is blocking site storage, so we can't keep you signed in or save your collection and decks on this device. To fix it, allow cookies / site data for this site in your browser settings, then reload the page.",15e3):e++<20&&setTimeout(t,500)};setTimeout(t,800)}const l={getItem(e){try{return window.localStorage.getItem(e)}catch{return a(),o.has(e)?o.get(e):null}},setItem(e,t){try{window.localStorage.setItem(e,t)}catch{a(),o.set(e,t)}},removeItem(e){try{window.localStorage.removeItem(e)}catch{a(),o.delete(e)}}},s="dotgg:burst:";function d(e){const t=l.getItem(s+e);if(null===t)return null;try{const n=JSON.parse(t);return function(e){return"object"==typeof e&&null!==e&&"number"==typeof e.exp&&"v"in e}(n)?Date.now()>=n.exp?(l.removeItem(s+e),null):n.v:null}catch{return l.removeItem(s+e),null}}function c(e,t,n){try{const r=JSON.stringify({exp:Date.now()+n,v:t});if(r.length>32768)return;l.setItem(s+e,r)}catch{}}function p(e){l.removeItem(s+e)}n.d(t,["Ar",0,l])},76990(e,t,n){n.d(t,{v:()=>l});var r=n(17402),o=n(87732);class i extends r.Ay.Component{constructor(){super(...arguments),this.storeChange=()=>{this.forceUpdate()}}componentDidMount(){this.store.addListener(this.storeChange)}componentWillUnmount(){this.store.removeListener(this.storeChange)}}const a=new class{constructor(e){this.listeners=[],this.state=new o.Xx(e)}addListener(e){this.listeners.push(e)}removeListener(e){const t=this.listeners.indexOf(e);-1!==t&&this.listeners.splice(t,1)}getState(){return this.state}getStateOrElse(e){return this.state.getOrElse(e)}mapState(e){return this.state.map(e)}flatMapState(e){return this.state.flatMap(e)}updateState(e){this.state=new o.Xx(e),this.emit()}emit(){for(const e of this.listeners)e()}};class l extends i{constructor(){super(...arguments),this.store=a}}n.d(t,["_",0,a])},85972(e,t,n){n.d(t,{bb:()=>c,il:()=>i,t7:()=>s});var r=n(17402),o=n(87732);class i{constructor(e){this.listeners=new Set,this.state=new o.Xx(e)}addListener(e){this.listeners.add(e)}removeListener(e){this.listeners.delete(e)}getState(){return this.state}getStateOrElse(e){return this.state.getOrElse(e)}mapState(e){return this.state.map(e)}flatMapState(e){return this.state.flatMap(e)}
16379updateState(e){this.state=new o.Xx(e),this.emit()}emit(){for(const e of this.listeners)e()}}class a extends r.Ay.Component{constructor(){super(...arguments),this.storeChange=()=>{this.forceUpdate()}}componentDidMount(){this.store.addListener(this.storeChange)}componentWillUnmount(){this.store.removeListener(this.storeChange)}}const l=new i;class s extends a{constructor(){super(...arguments),this.store=l}}new i,new i;const d=new i;class c extends a{constructor(){super(...arguments),this.store=d}}new i;const p=new i;new i,n.d(t,["Ab",0,l,"Bk",0,p])},91181(e,t,n){n.d(t,{Md:()=>l});var r=n(17402),o=n(87732);const i=new class{constructor(e){this.listeners=new Set,this.state=new o.Xx(e),this.storeMap=new Map,this.isLoading=!1,this.names=[],this.idsPost=[],this.ids=[],this.filtered=[]}addListener(e){this.listeners.add(e)}removeListener(e){this.listeners.delete(e)}appendLoadingQueue(e,t){t.forEach(t=>{switch(e){case"ids":this.ids.includes(t)||this.ids.push(t);break;case"idsPost":this.idsPost.includes(t)||this.idsPost.push(t);break;case"names":this.names.includes(t)||this.names.push(t);break;case"filtered":this.filtered.includes(t)||this.filtered.push(t)}})}hasItemsInQueue(){return this.ids.length>0||this.idsPost.length>0||this.names.length>0||this.filtered.length>0}getLoadingQueue(e){let t=[];switch(e){case"ids":t=this.ids,this.ids=[];break;case"idsPost":t=this.idsPost,this.idsPost=[];break;case"names":t=this.names,this.names=[];break;case"filtered":t=this.filtered,this.filtered=[]}return t}startLoad(){this.isLoading=!0}endLoad(){this.isLoading=!1}getLoadStatus(){return this.isLoading}getMap(){return this.storeMap}getState(){return this.state}getStateOrElse(e){return this.state.getOrElse(e)}mapState(e){return this.state.map(e)}flatMapState(e){return this.state.flatMap(e)}updateMap(e){this.storeMap=e}updateState(e){this.state=new o.Xx(e),this.emit()}emit(){for(const e of this.listeners)e()}},a=()=>(e=>{const[t,n]=(0,r.J0)(e.getState()),o=(0,r.hb)(()=>{n(e.getState())},[e]);return(0,r.vJ)(()=>(e.addListener(o),()=>{e.removeListener(o)}),[e,o]),t.get()})(i);function l(){return a()}n.d(t,["Yx",0,a,"jb",0,i])},85075(e,t,n){n.d(t,{X6:()=>a,fS:()=>o.fS});var r=n(17402),o=n(81616);class i extends r.Ay.Component{constructor(){super(...arguments),this.storeChange=()=>{this.forceUpdate()}}componentDidMount(){Object.keys(this.store).forEach(e=>{this.store[e]?.addListener(this.storeChange)})}componentWillUnmount(){Object.keys(this.store).forEach(e=>{this.store[e]?.removeListener(this.storeChange)})}}class a extends i{constructor(){super(...arguments),this.store=o.fS}}},81616(e,t,n){n.d(t,{il:()=>a});var r=n(17402),o=n(87732),i=n(21591);class a{constructor(e){this.listeners=new Set,this.state=new o.Xx(e)}addListener(e){this.listeners.add(e)}removeListener(e){this.listeners.delete(e)}getState(){return this.state}getStateOrElse(e){return this.state.getOrElse(e)}mapState(e){return this.state.map(e)}flatMapState(e){return this.state.flatMap(e)}updateState(e){this.state=new o.Xx(e),this.emit()}emit(){for(const e of this.listeners)e()}}const l=e=>{const[t,n]=(0,r.J0)(e?.getState()),o=(0,r.hb)(()=>{n(e?.getState())},[e]);return(0,r.vJ)(()=>{n(e?.getState())},[e]),(0,r.vJ)(()=>(e?.addListener(o),()=>{e?.removeListener(o)}),[e,o]),t?.get()},s=new a,d=new a,c=new a,p=new a,h=new a,u=new a,g=new a,m=new a,f=new a,x=new a,v=new a,y=new a,w=new a,b=new a,$={};i.Z.forEach(e=>{$[e]=new a});const k={};n.d(t,["Ab",0,s,"Bk",0,y,"DK",0,x,"Ex",0,k,"FB",0,()=>l(d),"F_",0,v,"Is",0,()=>l(u),"Ke",0,()=>l(f),"Pj",0,l,"S9",0,d,"U_",0,e=>l($[e]),"WM",0,()=>l(b),"ZM",0,f,"aE",0,w,"as",0,h,"cg",0,g,"fS",0,$,"fm",0,b,"gq",0,e=>l(k[e]),"h3",0,()=>l(s),"hP",0,()=>l(h),"hw",0,m,"iX",0,c,"ih",0,()=>l(v),"lA",0,()=>l(w),"lG",0,u,"un",0,p,"vY",0,()=>l(c),"wG",0,()=>l(x)])},48887(e,t,n){var r=n(63679);const o=r.Ay.div` 16380 width: 100%; 16381 margin-right: auto; 16382 margin-left: auto; 16383 gap: ${e=>e.gap?e.gap:0}; 16384 margin-top: 20px; 16385 border-radius: 20px; 16386 display: flex; 16387 flex-wrap: wrap; 16388 @media only screen and (max-width: 1140px) { 16389 max-width: unset; 16390 } 16391`,i=r.Ay.div` 16392 width: 100%; 16393 margin-right: auto; 16394 margin-left: auto; 16395 gap: ${e=>e.gap?e.gap:0}; 16396 border-radius: 20px; 16397 display: flex; 16398 flex-wrap: wrap; 16399 @media only screen and (max-width: 1140px) { 16400 max-width: unset; 16401 } 16402`,a=r.Ay.div` 16403 width: 100%; 16404 margin-right: auto; 16405 margin-left: auto; 16406 16407 margin-top: 10px; 16408 border-radius: 6px; 16409 display: flex; 16410 flex-wrap: wrap; 16411 background-color: var(--theme-palette-color-8); 16412 16413 padding: 10px; 16414 @media only screen and (max-width: 1140px) { 16415 max-width: unset; 16416 padding: 8px; 16417 } 16418`;n.d(t,["BQ",0,o,"Tt",0,i,"VY",0,a])}
16418,75817(e,t,n){var r=n(63679);const o=r.Ay.div` 16419 display: flex; 16420 flex-direction: row; 16421 justify-content: ${e=>e.$short?"flex-start":"space-between"}; 16422 align-items: flex-start; 16423 user-select: none; 16424 background-color: var(--theme-palette-color-6); 16425 border-radius: 6px; 16426 padding: 0; 16427 cursor: pointer; 16428 height: 184px; 16429 width: 100%; 16430 16431 @media only screen and (max-width: 768px) { 16432 width: 100%; 16433 flex-wrap: wrap; 16434 height: 170px; 16435 } 16436`,i=r.Ay.div` 16437 width: 100%; 16438 height: 100%; 16439 display: flex; 16440 flex-direction: column; 16441 justify-content: space-between; 16442 border-radius: 9px; 16443 padding: 5px; 16444 background: radial-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7) 65%, black); 16445`,a=r.Ay.div` 16446 width: ${e=>e.$short?"10px":"15px"}; 16447 text-align: center; 16448 16449 @media only screen and (max-width: 750px) { 16450 display: none; 16451 } 16452`,l=r.Ay.div` 16453 white-space: nowrap; 16454 display: ${e=>e.$inline?"inline":"flex"}; 16455 align-items: center; 16456 gap: 3px; 16457`,s=(r.Ay.a` 16458 color: var(--theme-palette-color-1); 16459 font-size: 1.1em; 16460 width: 100%; 16461 display: flex; 16462 font-weight: bold; 16463 gap: 5px; 16464 align-content: center; 16465 align-items: center; 16466`,r.Ay.div` 16467 display: flex; 16468 width: 100%; 16469 flex-wrap: wrap; 16470 gap: 5px; 16471 align-content: center; 16472 align-items: center; 16473`,r.AH` 16474 display: flex; 16475 /* 16476 * GEOMETRY IS FIXED. Height, padding, radius and gap are identical for every 16477 * tone â a tone changes COLOUR and nothing else. Buttons of different heights 16478 * sitting in one row is the single most obvious "amateur" tell, and it is what 16479 * happens the moment a variant is allowed to set its own size. 16480 */ 16481 padding: 2px 8px; 16482 min-height: 32px; 16483 box-sizing: border-box; 16484 justify-content: center; 16485 align-items: center; 16486 gap: 4px; 16487 border-radius: 5px; 16488 cursor: pointer; 16489 user-select: none; 16490 font: inherit; 16491 text-decoration: none; 16492 white-space: nowrap; 16493 transition: 16494 background-color 0.15s ease, 16495 color 0.15s ease, 16496 border-color 0.15s ease; 16497 16498 ${e=>"accent"===e.$tone?"\n border: solid 1px var(--theme-palette-color-1);\n background: var(--theme-palette-color-1);\n color: var(--dotgg-on-accent, var(--theme-palette-color-8));\n ":"ghost"===e.$tone?"\n border: solid 1px transparent;\n background: none;\n color: var(--theme-palette-color-2);\n ":"\n border: solid 1px var(--theme-palette-color-1);\n background: none;\n color: var(--theme-palette-color-1);\n "} 16499 16500 &:hover { 16501 ${e=>"accent"===e.$tone?"background: var(--theme-palette-color-2); border-color: var(--theme-palette-color-2);":"background: color-mix(in srgb, var(--theme-palette-color-1) 12%, transparent); color: var(--theme-palette-color-1);"} 16502 } 16503 16504 &[disabled], 16505 &[aria-disabled="true"] { 16506 opacity: 0.5; 16507 cursor: not-allowed; 16508 pointer-events: none; 16509 } 16510`),d=r.Ay.div` 16511 ${s} 16512`,c=(r.Ay.a` 16513 ${s} 16514`,r.Ay.div` 16515 cursor: pointer; 16516 display: flex; 16517 align-content: center; 16518 align-items: center; 16519 gap: 3px; 16520 font-size: 0.8em; 16521 padding: 2px 7px; 16522 border-radius: 5px; 16523 line-height: 1.1em; 16524 white-space: nowrap; 16525 &:hover { 16526 color: var(--theme-palette-color-1) !important; 16527 } 16528 16529 svg { 16530 flex-shrink: 0; 16531 width: 16px; 16532 height: 16px; 16533 } 16534 16535 @media only screen and (max-width: 600px) { 16536 font-size: 0.75em; 16537 padding: 3px 5px; 16538 gap: 2px; 16539 16540 svg { 16541 width: 14px; 16542 height: 14px; 16543 } 16544 } 16545`),p=r.Ay.div` 16546 display: flex; 16547 align-items: center; 16548 gap: 3px; 16549 /* Row facts share the meta line's 22px rhythm (see decks/row/MetaBadge) so 16550 icon+count pairs sit on the same baseline as the chips beside them. */ 16551 font-size: ${e=>e.$big?"1em":"12px"}; 16552 min-height: ${e=>e.$big?"auto":"22px"}; 16553 color: var(--theme-palette-color-4); 16554 white-space: nowrap; 16555 flex-shrink: 0; 16556 @media only screen and (max-width: 500px) { 16557 font-size: ${e=>e.$big?"0.9em":"0.7em"}; 16558 gap: 1px; 16559 img { 16560 width: 12px !important; 16561 height: 12px !important; 16562 } 16563 svg { 16564 width: 14px; 16565 height: 14px; 16566 } 16567 } 16568`;r.Ay.div` 16569 display: flex; 16570 justify-content: space-between; 16571 font-size: 0.8em; 16572`,r.Ay.div` 16573 text-decoration: none; 16574 color: unset !important; 16575 display: flex; 16576 flex-direction: column; 16577 width: 23%; 16578 flex-basis: 23%; 16579 user-select: none; 16580 @media only screen and (max-width: 700px) { 16581 width: 100%; 16582 flex-basis: 100%; 16583 } 16584`,r.Ay.div` 16585 display: flex; 16586 white-space: nowrap; 16587 align-items: center; 16588 gap: 3px; 16589 overflow: hidden; 16590 max-width: 80%; 16591`,r.Ay.div` 16592 display: flex; 16593 flex-wrap: wrap; 16594 align-items: flex-start; 16595 align-content: flex-start; 16596`,r.Ay.div` 16597 display: flex; 16598 flex-wrap: wrap; 16599 gap: 5px; 16600 align-items: center; 16601 color: var(--theme-palette-color-4); 16602`,r.Ay.div` 16603 display: ${e=>e.$sharing?"flex":"none"}; 16604 top: 20px; 16605 left: 0px; 16606 width: 30px; 16607 gap: 5px; 16608 position: absolute; 16609 margin-top: 5px; 16610 flex-direction: column; 16611 background-color: var(--theme-palette-color-5); 16612 z-index: 100; 16613 align-items: center; 16614 border-radius: 5px; 16615 padding: 5px; 16616`,r.Ay.h2` 16617 background-color: ${e=>e.$color?e.$color:"var(--theme-palette-color-5)"}; 16618 display: flex; 16619 flex-basis: 100%; 16620 padding: 0; 16621 border-radius: 10px 10px 0 0; 16622 justify-content: space-between; 16623 min-height: 60px; 16624 font-size: 16px !important; 16625 ${e=>e.short?"min-height:88px;":""} 16626 16627 @media only screen and (max-width: 750px) { 16628 } 16629`,n.d(t,["K0",0,c,"cL",0,a,"cy",0,p,"fz",0,o,"i4",0,d,"mM",0,i,"oX",0,l])},4428(e,t,n){var r=n(63679),o=(n(28297),n(32013));const i=r.Ay.div` 16630 ${e=>e.$alignTop?"align-content: space-content;":""} 16631 display: grid; 16632 width: 100%; 16633 gap: 6px; 16634 margin-top: ${e=>e.$second?"8px":"0"}; 16635 ${e=>e.$twoLines?`grid-template-columns: 1fr 1fr 1fr 1fr${e.$second?"":" 30px"};`:"grid-template-columns: 1fr 1fr 1fr "+(e.$embed?"":" 1fr 1fr 1fr"+(e.$
16635second?"":" auto"))+";"} 16636 justify-content: space-around; 16637 16638 @media only screen and (max-width: 800px) { 16639 display: flex; 16640 flex-direction: column; 16641 } 16642 @media only screen and (max-width: 920px) and (min-width: 801px) { 16643 grid-template-columns: 1fr 1fr 1fr ${e=>e.$embed?"":" 1fr 1fr"}; 16644 } 16645`,a=(r.Ay.div` 16646 ${e=>e.$alignTop?"align-content: space-content;":""} 16647 display: flex; 16648 flex-wrap: wrap; 16649 gap: 8px; 16650 justify-content: space-around; 16651 width: 100%; 16652 16653 @media only screen and (max-width: 800px) { 16654 display: flex; 16655 flex-direction: column; 16656 } 16657`,(0,r.Ay)(o.p)` 16658 height: 30px !important; 16659 font-size: 13px; 16660 width: 100%; 16661 padding-left: 30px !important; 16662 padding-right: 27px !important; 16663 border: 1px solid transparent !important; 16664 transition: 16665 border-color 150ms ease, 16666 box-shadow 150ms ease; 16667 &:hover { 16668 border-color: var(--theme-palette-color-5) !important; 16669 } 16670 &:focus, 16671 &:focus-visible { 16672 outline: none; 16673 border-color: var(--theme-palette-color-1) !important; 16674 } 16675 ${e=>e.$wide?"grid-column: span 2;":""} 16676`),l=(0,r.Ay)(a)` 16677 height: ${44}px !important;
16678 /* 16px is not a taste call: below it, iOS zooms the viewport on focus and 16679 the user is left scrolled sideways inside a sheet. The floor that MAKES 16680 this stick lives on the base Input in common-styled.ts â its 16681 0.9em !important beat this line silently for a day; kept here because it 16682 is where a reader looks for the size. */ 16683 font-size: ${16}px; 16684 border-color: var(--theme-palette-color-5) !important; 16685 &::-webkit-search-cancel-button { 16686 display: none; 16687 } 16688`,s=(r.Ay.div` 16689 display: flex; 16690 width: 100%; 16691 align-items: center; 16692 gap: 4px; 16693 padding: 4px; 16694 overflow: hidden; 16695`,r.Ay.div` 16696 cursor: pointer; 16697 height: 28px; 16698 width: 20px; 16699 overflow: hidden; 16700 margin-left: 4px; 16701 display: flex; 16702 align-items: center; 16703 justify-content: center; 16704 gap: 4px; 16705 &:hover { 16706 color: var(--theme-palette-color-1); 16707 } 16708 @media only screen and (max-width: 800px) { 16709 width: auto; 16710 } 16711`);n.d(t,["YP",0,s,"iB",0,a,"ll",0,l,"ro",0,i])},84473(e,t,n){var r=n(63679);const o=r.Ay.div` 16712 background-color: var(--theme-palette-color-8); 16713 display: flex; 16714 flex-wrap: wrap; 16715 justify-content: start; 16716 padding: 10px 12px; 16717 border-radius: 6px; 16718 z-index: 20; 16719 position: relative; 16720 width: 100%; 16721 ${e=>e.$wide?"flex-basis:50%;":""} 16722 ${e=>e.$alignContentFlex?"align-content: flex-start;":""} 16723 align-content: flex-start; 16724 @media only screen and (max-width: 1200px) { 16725 display: block; 16726 } 16727`,i=(r.Ay.div` 16728 display: grid; 16729 grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr; 16730 gap: 10px; 16731 width: 100%; 16732 margin-bottom: 10px; 16733 border-radius: 6px; 16734 min-height: 135px; 16735 justify-content: center; 16736 @media only screen and (max-width: 750px) { 16737 display: flex; 16738 flex-wrap: wrap; 16739 width: 100%; 16740 } 16741`,r.Ay.div` 16742 background-color: var(--theme-palette-color-8); 16743 display: flex; 16744 flex-wrap: wrap; 16745 justify-content: start; 16746 padding: 8px 10px; 16747 border-radius: 6px; 16748 position: relative; 16749 width: 100%; 16750 align-content: flex-start; 16751 gap: 3px; 16752 @media only screen and (max-width: 1200px) { 16753 display: block; 16754 } 16755`);n.d(t,["Jj",0,i,"OB",0,o])},4930(e,t,n){const r=n(63679).Ay.div` 16756 display: inline-block; 16757 width: ${e=>e.$width?e.$width:"30"}px !important; 16758 height: ${e=>e.$width?e.$width:"30"}px !important; 16759 text-align: center; 16760 line-height: ${e=>e.$width?+e.$width:40}px; 16761 color: var(--theme-palette-color-4) !important; 16762 font-size: ${e=>e.$width?e.$width/30:1}em; 16763 border-radius: 50%; 16764 border: 1px solid 16765 ${e=>e.$borderColor?e.$borderColor:"#00000000"}; 16766 ${e=>e.$gradient?"background-image: linear-gradient("+e.$gradient[0]+", "+e.$gradient[1]+");":""} 16767`;n.d(t,["P",0,r])},92434(e,t,n){var r=n(63679);const o=r.I4.div` 16768 appearance: none; 16769 display: flex; 16770 flex-direction: row; 16771 gap: 20px; 16772 ${e=>e.$width?`width: ${e.$width}`:"width: 100%;"} 16773`,i=r.I4.div` 16774 display: flex; 16775 width: 100%; 16776 align-items: center; 16777 gap: 10px; 16778 padding: ${e=>e.$noPadding?"0":"5px"}; 16779`,a=r.I4.input` 16780 appearance: none; 16781 width: 75%; 16782 height: 10px; 16783 background-color: rgba(255, 255, 255, 0.2); 16784 border-radius: 6px; 16785 outline: none; 16786 &::-webkit-slider-thumb { 16787 appearance: none; 16788 width: 15px; 16789 height: 15px; 16790 border-radius: 25%; 16791 background: var(--theme-palette-color-1); 16792 cursor: pointer; 16793 } 16794`,l=r.I4.div` 16795 color: var(--theme-palette-color-1); 16796 font-weight: bold; 16797 width: 25px; 16798`;n.d(t,["Ap",0,a,"Jb",0,o,"Mu",0,i,"iN",0,l])},43626(e,t,n){var r=n(63679),o=n(28297),i=n(30821);const a=r.Ay.div` 16799 display: flex; 16800 align-items: center; 16801 height: 32px; 16802 cursor: pointer; 16803 16804 ${e=>e.$compact?"flex-direction: column;\n padding-left: 5px;\n font-size: 0.7em;\n user-select: none;":"gap: 5px;\n user-select: none;"} 16805 ${e=>e.$row&&r.AH` 16806 flex-direction: row-reverse; 16807 gap: 10px; 16808 @media (pointer: coarse) { 16809 height: 44px; 16810 } 16811 `} 16812 ${e=>e.$disabled&&"opacity: 0.5; cursor: default;"} 16813`,l=(r.Ay.div` 16814 display: flex; 16815 align-items: center; 16816 height: 32px; 16817 cursor: pointer; 16818 16819 flex-direction: column; 16820 padding-left: 5px; 16821 font-size: 0.7em; 16822 user-select: none; 16823`,r.Ay.label` 16824 display: flex; 16825 align-content: center; 16826 align-items: center; 16827 width: 28px; 16828 height: 16px; 16829 margin: 0 !important; 16830 padding: 0 !important; 16831 input { 16832 opacity: 0; 16833 width: 0; 16834 height: 0; 16835 &:checked + div { 16836 background-color: ${e=>e.$row?"var(--theme-palette-color-1)":i.Q.segOn}; 16837 } 16838 &:checked + div:before { 16839 background-color: ${e=>e.$row?"var(--theme-palette-color-8)":"white"}; 16840 } 16841 &:focus-visible + div { 16842 ${i.I} 16843 } 16844 } 16845 ${e=>e.$row&&r.AH` 16846 width: 40px; 16847 height: 24px; 16848 @media only screen and ${o.E0} { 16849 width: 44px;
16850 height: 26px; 16851 } 16852 `} 16853`),s=r.Ay.div` 16854 display: flex; 16855 align-items: center; 16856 justify-content: flex-start; 16857 background-color: var(--theme-palette-color-7); 16858 transition: 0.4s; 16859 border-radius: 1.5em; 16860 height: 16px; 16861 width: 28px; 16862 padding: 2px; 16863 16864 &:before { 16865 content: ""; 16866 height: 95%; 16867 aspect-ratio: 1; 16868 background-color: ${i.Q.segOn}; 16869 transition: 0.4s; 16870 border-radius: 50%; 16871 } 16872 16873 input:checked + & { 16874 justify-content: flex-end; 16875 } 16876 16877 /* The switch row's track: color-5 off / color-1 on, an 18px knob in color-3 / color-8. */ 16878 ${e=>e.$row&&r.AH` 16879 box-sizing: border-box; 16880 width: 40px; 16881 height: 24px; 16882 padding: 3px; 16883 border-radius: 12px; 16884 background-color: var(--theme-palette-color-5); 16885 transition: background-color 0.2s; 16886 &:before { 16887 width: 18px; 16888 height: 18px; 16889 background-color: var(--theme-palette-color-3); 16890 transition: background-color 0.2s; 16891 } 16892 @media only screen and ${o.E0} { 16893 width: 44px; 16894 height: 26px; 16895 border-radius: 13px; 16896 &:before { 16897 width: 20px; 16898 height: 20px; 16899 } 16900 } 16901 `} 16902`;n.d(t,["Oq",0,l,"Zz",0,a,"wL",0,s])},80288(e,t,n){var r=n(63679);const o=r.AH` 16903 border-radius: 50px; 16904 font-size: 0.6em; 16905 font-weight: bold; 16906 text-transform: uppercase; 16907 line-height: 1.2; 16908 white-space: nowrap; 16909 user-select: none; 16910`,i=r.AH` 16911 cursor: pointer; 16912 transition: all 0.15s ease; 16913 16914 &:hover { 16915 opacity: 0.85; 16916 transform: scale(1.05); 16917 } 16918 16919 &:active { 16920 transform: scale(0.95); 16921 } 16922`,a=r.Ay.div` 16923 display: flex; 16924 flex-wrap: wrap; 16925 gap: 4px; 16926`,l=r.Ay.div` 16927 font-size: 0.65em; 16928 color: rgba(255, 255, 255, 0.5); 16929 text-transform: uppercase; 16930 font-weight: bold; 16931 padding: 0 4px; 16932`,s=(r.Ay.div` 16933 ${o} 16934 ${i} 16935 background-color: ${e=>e.$color}; 16936 color: ${e=>e.$textColor||"#ffffff"}; 16937 padding: 3px 10px; 16938`,r.Ay.div` 16939 ${o} 16940 background-color: ${e=>e.$color}; 16941 color: ${e=>e.$textColor||"#ffffff"}; 16942 padding: 3px 10px; 16943 cursor: pointer; 16944 transition: all 0.15s ease; 16945 16946 &:hover { 16947 opacity: 0.85; 16948 text-decoration: line-through; 16949 } 16950 16951 &:active { 16952 transform: scale(0.95); 16953 } 16954`,r.Ay.div` 16955 ${o} 16956 background-color: ${e=>e.$color}; 16957 color: ${e=>e.$textColor||"#ffffff"}; 16958 padding: 2px 6px; 16959 font-size: 0.55em; 16960 text-shadow: ${e=>"#1a1a1a"===e.$textColor?"0 1px 2px rgba(255, 255, 255, 0.2)":"0 1px 2px rgba(0, 0, 0, 0.3)"}; 16961`),d=r.Ay.div` 16962 display: flex; 16963 flex-wrap: wrap; 16964 gap: 3px; 16965 align-items: center; 16966 justify-content: center; 16967 margin-top: 4px; 16968`;n.d(t,["I2",0,s,"Le",0,o,"XY",0,a,"ao",0,l,"cg",0,i,"eb",0,d])},46304(e,t,n){var r=n(63679);r.Ay.div` 16969 display: block; 16970 width: 100%; 16971 height: 40px; 16972 line-height: 40px; 16973 text-align: center; 16974 padding: 0; 16975 cursor: pointer; 16976 margin-bottom: 5px !important; 16977 margin-top: 10px !important; 16978 color: rgb(255, 255, 255) !important; 16979 background-color: var(--theme-palette-color-5) !important; 16980 border-radius: 6px; 16981`;const o=r.Ay.div` 16982 margin: auto; 16983 width: 600px; 16984 padding: 10px; 16985 text-align: left; 16986 vertical-align: top; 16987 color: var(--theme-palette-color-4); 16988 border-radius: 6px; 16989`;n.d(t,["s",0,o])},28297(e,t,n){var r=n(63679);const o="(orientation: landscape) and (max-height: 480px) and (min-width: 480px)",i=`(max-width: 700px), ${o} and (max-width: 1100px) and (pointer: coarse)`,a=r.Ay.button` 16990 display: inline-flex; 16991 align-items: center; 16992 gap: 6px; 16993 height: 36px; 16994 padding: 0 14px; 16995 border: 1px solid var(--theme-palette-color-5); 16996 border-radius: 6px; 16997 background: none; 16998 color: var(--theme-palette-color-3); 16999 font-family: inherit; 17000 font-size: 12.5px; 17001 font-weight: 600; 17002 white-space: nowrap; 17003 cursor: pointer; 17004 transition: all 150ms ease; 17005 &:hover:not(:disabled) { 17006 color: var(--theme-palette-color-4); 17007 border-color: var(--theme-palette-color-3); 17008 } 17009 &:disabled { 17010 opacity: 0.45; 17011 cursor: default; 17012 } 17013 svg { 17014 display: block; 17015 } 17016`,l=(0,r.Ay)(a)` 17017 background: var(--theme-palette-color-1); 17018 border-color: var(--theme-palette-color-1); 17019 color: var(--dotgg-on-accent, var(--theme-palette-color-8)); 17020 font-weight: 700; 17021 &:hover:not(:disabled) { 17022 color: var(--theme-palette-color-8); 17023 border-color: var(--theme-palette-color-1); 17024 filter: brightness(1.1); 17025 } 17026`,s=(0,r.Ay)(a)` 17027 background: var(--theme-palette-color-9, #dc2626); 17028 border-color: var(--theme-palette-color-9, #dc2626); 17029 color: #fff; 17030 font-weight: 700; 17031 &:hover:not(:disabled) { 17032 color: #fff; 17033 border-color: var(--theme-palette-color-9, #dc2626); 17034 filter: brightness(0.9); 17035 } 17036`;n.d(t,["Ab",0,"(max-width: 360px)","E0",0,i,"IX",0,a,"MZ",0,o,"SW",0,"calc(100dvh - var(--dotgg-pane-top, 94px) - var(--dotgg-page-reserve, 8px))","cz",0,s,"d3",0,()=>r.AH` 17037 width: 100%; 17038 height: ${44}px; 17039 justify-content: center; 17040`,"h3",0,"(max-width: 700px), (pointer: coarse)","pp",0,l])},60395(e,t,n){var r=n(63679);const o=r.Ay.div` 17041 display: flex; 17042 flex-direction: column; 17043 line-height: 1.3; 17044 justify-content: center; 17045 min-width: 0; 17046 overflow: hidden; 17047 17048 & >
17048 div:first-child { 17049 overflow: hidden; 17050 text-overflow: ellipsis; 17051 display: -webkit-box; 17052 -webkit-line-clamp: 2; 17053 -webkit-box-orient: vertical; 17054 white-space: normal; 17055 } 17056`,i=r.Ay.div` 17057 display: flex; 17058 justify-content: center; 17059 align-items: center; 17060 padding-right: 20px; 17061`,a=r.Ay.div` 17062 color: #000; 17063`;n.d(t,["bU",0,a,"eD",0,i,"uO",0,o])},17352(e,t,n){const r=n(63679).I4.div` 17064 width: 100%; 17065 display: flex; 17066 gap: 5px; 17067 align-items: center; 17068`;n.d(t,["t",0,r])},32013(e,t,n){var r=n(63679),o=n(28297);const i=r.AH` 17069 @media ${o.h3} { 17070 font-size: ${16}px !important; 17071 } 17072`,a=r.Ay.input` 17073 color: var(--theme-palette-color-3) !important; 17074 background-color: var(--theme-palette-color-7) !important; 17075 border-radius: 5px !important; 17076 border: 0 !important; 17077 font-size: 0.9em !important; 17078 padding-left: 10px !important; 17079 padding-right: 27px !important; 17080 &:placeholder-shown { 17081 text-overflow: ellipsis; 17082 } 17083 ${i} 17084`,l=r.Ay.input` 17085 color: var(--theme-palette-color-3) !important; 17086 background-color: var(--theme-palette-color-7) !important; 17087 border-radius: 0 0 5px 5px !important; 17088 border: 0 !important; 17089 font-size: 0.9em !important; 17090 padding-left: 10px !important; 17091 padding-right: 10px !important; 17092 ${i} 17093`;n.d(t,["Q",0,l,"p",0,a])},42895(e,t,n){var r=n(63679),o=n(28297);const i=r.Ay.div``,a=r.Ay.li``,l=r.Ay.div` 17094 display: flex; 17095 gap: 10px; 17096 font-size: 0.8em; 17097 font-weight: normal; 17098 flex-basis: 100%; 17099 @media only screen and (max-width: 560px) { 17100 font-size: 0.6em; 17101 } 17102`,s=r.Ay.div` 17103 display: flex; 17104 flex-direction: column; 17105`,d=r.Ay.div` 17106 background-color: var(--theme-palette-color-8); 17107 border-radius: 6px; 17108 padding: 10px; 17109`,c=r.Ay.div` 17110 display: flex; 17111 flex-direction: column; 17112 gap: 10px; 17113 width: ${e=>e.$fullWidth?"100%":"75%"}; 17114 @media only screen and (max-width: 1200px) { 17115 width: 100%; 17116 } 17117 ${e=>e.$landscapeSplit?`@media only screen and ${o.MZ} {\n width: calc(100% - 260px);\n min-width: 0;\n }`:""} 17118`,p=r.Ay.div` 17119 display: flex; 17120 align-items: center; 17121 gap: 10px; 17122`;n.d(t,["DF",0,p,"Ho",0,c,"Rc",0,l,"dQ",0,d,"lE",0,a,"mH",0,i,"vh",0,s])},13530(e,t,n){var r=n(63679),o=n(28297),i=n(32013);n(42895),r.Ay.div` 17123 display: flex; 17124 gap: 10px; 17125 width: 440px; 17126 flex-wrap: wrap; 17127 align-content: flex-start; 17128 @media only screen and (max-width: 750px) { 17129 gap: 5px; 17130 width: 100%; 17131 } 17132`;const a=r.Ay.textarea` 17133 width: 100%; 17134 height: 170px; 17135 color: var(--theme-palette-color-4) !important; 17136 border-top: none; 17137 border-right: none; 17138 border-bottom: 1px solid var(--theme-palette-color-5); 17139 border-left: none; 17140 border-radius: 0; 17141 background-color: var(--theme-palette-color-6) !important; 17142 font-size: 16px; 17143 :focus-visible { 17144 outline: none; 17145 border-bottom: 1px solid var(--theme-palette-color-3); 17146 } 17147`,l=(0,r.Ay)(i.p)` 17148 width: 100%; 17149 height: 32px; 17150 /* In the phone ⯠sheet (an OverflowSheet, not a PromptWnd, so the modal's 17151 16px input rule does not reach it): 16px is what stops iOS zooming the 17152 page on focus, 44 is the tap floor (round 5, 5d). */ 17153 @media only screen and ${o.E0} { 17154 height: 44px; 17155 font-size: 16px !important; 17156 } 17157`,s=r.Ay.div` 17158 display: flex; 17159 flex-wrap: wrap; 17160 17161 width: 290px; 17162 flex-direction: row; 17163 align-content: flex-start; 17164 gap: 10px; 17165 17166 position: sticky; 17167 top: 70px; 17168 height: fit-content; 17169 17170 /* Hide when there's no content (empty children) */ 17171 &:empty { 17172 display: none; 17173 } 17174 17175 /* Use :has() to hide when only containing empty elements - modern browsers */ 17176 &:not(:has(> *:not(:empty))) { 17177 display: none; 17178 } 17179 17180 @media only screen and (max-width: 750px) { 17181 flex-basis: 100%; 17182 width: 100%; 17183 } 17184 17185 ${e=>e.$landscapeRail?`@media only screen and ${o.MZ} {\n flex-basis: 250px;\n width: 250px;\n position: static;\n overflow-y: auto;\n max-height: 100vh;\n }`:""} 17186`,d=r.i7` 17187 0% { width: 90%; } 17188 100% { width: 0; } 17189`,c=(r.Ay.div` 17190 animation-name: ${d}; 17191 animation-duration: 3s; 17192 height: 2px; 17193 background-color: rgba(255, 255, 255, 0.7); 17194 border-radius: 0 0 6px 6px; 17195`,r.Ay.div` 17196 padding: 8px 12px; 17197 font-size: 14px; 17198`,r.Ay.div` 17199 display: flex; 17200 flex-direction: column; 17201 justify-content: space-between; 17202 align-items: stretch; 17203 background-color: rgba(255, 255, 255, 0.15); 17204 color: white; 17205 border-radius: 8px; 17206 font-size: 0.9em; 17207 cursor: pointer; 17208 box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); 17209 border: 1px solid rgba(255, 255, 255, 0.1); 17210 min-width: 200px; 17211 max-width: 400px; 17212`,r.Ay.div` 17213 position: fixed; 17214 bottom: calc(20px + var(--dotgg-bottom-obstruction, 0px)); 17215 right: 20px; 17216 z-index: 9999; 17217 pointer-events: ${e=>e.children?"auto":"none"}; 17218`,r.Ay.div` 17219 width: 100%; 17220 display: flex; 17221 flex-wrap: wrap; 17222 justify-content: space-between; 17223 row-gap: 10px; 17224 17225 @media only screen and (max-width: 750px) { 17226 gap: 10px; 17227 } 17228`);n.d(t,["Gf",0,s,"OH",0,l,"TW",0,a,"Z6",0,c])},8609(e,t,n){var r=n(63679);const o=r.I4.div` 17229 position: absolute; 17230 left: 9px; 17231 top: 0; 17232 bottom: 0; 17233 display: flex; 17234 justify-content: center; 17235 align-items: center; 17236 pointer-events: none; 17237 color: var(--theme-palette-color-3); 17238 svg path { 17239 stroke: currentColor; 17240 } 17241`,i=r.I4.button` 17242 position: absolute; 17243 right: 6px; 17244 top: 0; 17245 bottom: 0; 17246 margin: auto 0; 17247 height: 20px;
17248 width: 20px; 17249 display: flex; 17250 justify-content: center; 17251 align-items: center; 17252 background: none; 17253 border: none; 17254 border-radius: 3px; 17255 padding: 0; 17256 color: var(--theme-palette-color-3); 17257 cursor: pointer; 17258 &:hover { 17259 color: var(--theme-palette-color-4); 17260 } 17261 svg { 17262 display: block; 17263 } 17264`,a=r.I4.div` 17265 display: flex; 17266 position: relative; 17267 width: 100%; 17268`,l=r.I4.div` 17269 font-size: 11px; 17270 font-weight: 600; 17271 text-transform: uppercase; 17272 letter-spacing: 0.025em; 17273 color: var(--theme-palette-color-3); 17274 white-space: nowrap; 17275 height: 28px; 17276 line-height: 28px; 17277`,s=r.I4.div` 17278 font-size: 0.8em; 17279 width: 100%; 17280`,d=r.I4.div` 17281 display: flex; 17282 flex-wrap: wrap; 17283 gap: 8px; 17284`,c=r.I4.div` 17285 display: inline-flex; 17286 align-items: center; 17287 gap: 6px; 17288 border-radius: 4px; 17289 padding: 3px 6px 3px 8px; 17290 background-color: rgba(67, 74, 86, 0.35); 17291 border: 1px solid var(--theme-palette-color-5); 17292 color: var(--theme-palette-color-4); 17293 font-size: 12px; 17294 line-height: 1.3; 17295 cursor: pointer; 17296 transition: all 0.15s ease; 17297 17298 &:hover { 17299 border-color: var(--theme-palette-color-3); 17300 } 17301 17302 svg path { 17303 stroke: var(--theme-palette-color-3); 17304 transition: stroke 0.15s ease; 17305 } 17306 17307 &:hover svg path { 17308 stroke: var(--theme-palette-color-1); 17309 } 17310`,p=r.I4.span` 17311 text-transform: uppercase; 17312 letter-spacing: 0.025em; 17313 font-size: 10px; 17314 font-weight: 600; 17315 color: var(--theme-palette-color-3); 17316`,h=r.I4.div` 17317 display: none; 17318 @media only screen and (max-width: 800px) { 17319 display: flex; 17320 gap: 8px; 17321 } 17322`,u=r.I4.div` 17323 display: flex; 17324 gap: 8px; 17325 @media only screen and (max-width: 800px) { 17326 display: none; 17327 } 17328`,g=r.I4.div` 17329 width: ${e=>e.$wide?"auto":"30px"}; 17330 gap: ${e=>e.$wide?"5px":"0"}; 17331 display: flex; 17332 align-content: center; 17333 justify-content: center; 17334 align-items: center; 17335 border: 1px solid 17336 ${e=>e.$active?"var(--theme-palette-color-1)":"transparent"}; 17337 background-color: var(--theme-palette-color-7); 17338 color: ${e=>e.$active?"var(--theme-palette-color-1)":"var(--theme-palette-color-3)"}; 17339 cursor: pointer; 17340 border-radius: 6px; 17341 padding: ${e=>e.$wide?"5px 9px":"5px"}; 17342 height: 30px; 17343 transition: all 0.15s ease; 17344 17345 &:focus-visible { 17346 outline: 2px solid var(--theme-palette-color-1); 17347 outline-offset: 2px; 17348 } 17349 17350 &:hover { 17351 border-color: ${e=>e.$active?"var(--theme-palette-color-1)":"var(--theme-palette-color-5)"}; 17352 color: ${e=>e.$active?"var(--theme-palette-color-1)":"var(--theme-palette-color-4)"}; 17353 } 17354 17355 svg { 17356 display: block; 17357 } 17358`,m=r.I4.span` 17359 font-size: 12px; 17360 font-weight: 600; 17361 line-height: 1; 17362 white-space: nowrap; 17363`,f=r.I4.span` 17364 background: #ff6b35; 17365 color: white; 17366 padding: 2px 8px; 17367 border-radius: 3px; 17368 font-weight: 600; 17369 margin-right: 8px; 17370 display: inline-block; 17371 font-size: 0.85em; 17372 line-height: 1.4; 17373`,x=r.I4.div` 17374 display: flex; 17375 align-items: center; 17376 color: white; 17377 font-size: 13px; 17378 font-weight: 600; 17379 line-height: 1.3; 17380 padding: 4px 0; 17381 cursor: default; 17382 pointer-events: none; 17383`,v=(0,r.I4)(c)` 17384 background: none; 17385 border: 1px solid var(--theme-palette-color-9, #f26464); 17386 color: var(--theme-palette-color-9, #f26464); 17387 font-weight: 600; 17388 padding: 3px 10px; 17389 17390 &:hover { 17391 background: var(--theme-palette-color-9, #f26464); 17392 border-color: var(--theme-palette-color-9, #f26464); 17393 color: var(--theme-palette-color-7); 17394 } 17395 17396 svg path { 17397 stroke: currentColor; 17398 } 17399 17400 &:hover svg path { 17401 stroke: currentColor; 17402 } 17403`,y=r.I4.span` 17404 color: #9ca3af; 17405`;n.d(t,["BR",0,m,"D2",0,u,"Ly",0,g,"Nu",0,p,"PL",0,h,"W4",0,a,"WI",0,o,"gs",0,f,"jA",0,s,"lp",0,d,"n3",0,v,"ou",0,x,"ph",0,l,"tK",0,c,"w_",0,i,"x4",0,y])},1537(e,t,n){var r=n(63679);r.Ay.div` 17406 display: flex; 17407 justify-content: center; 17408 gap: 0.5rem; 17409`;const o=r.Ay.div.attrs(e=>({style:{width:`${e.$width?e.$width:"30"}px`,height:`${e.$width?e.$width:"30"}px`,fontSize:(e.$width?e.$width/(e.$smallerFont?30:20):e.$smallerFont?.8:1)+"em",color:`${e.$color?e.$color:"var(--theme-palette-color-4)"}`,backgroundImage:e.$gradient?`linear-gradient(135deg, ${e.$gradient[0]?e.$gradient[0]:""} 40%, ${e.$gradient[1]?e.$gradient[1]:""} 60%)`:void 0}}))` 17410 display: inline-flex; 17411 align-content: center; 17412 justify-content: center; 17413 align-items: center; 17414 font-weight: bold; 17415 border-radius: 50%; 17416 text-shadow: 1px 1px black; 17417 17418 cursor: pointer; 17419 ${e=>e.$active?"filter: brightness(1.8);":""} 17420 17421 &:hover { 17422 ${e=>e.$hover?"filter: brightness(1.9);":""} 17423 } 17424 position: relative; 17425 &::after { 17426 position: absolute; 17427 left: 0; 17428 top: 0; 17429 content: "+"; 17430 right: 0; 17431 bottom: 3px; 17432 display: ${e=>e.$active?"flex":"none"}; 17433 align-items: center; 17434 justify-content: center; 17435 text-shadow: 0 0 4px ${e=>e.$gradient?e.$gradient[0]:""}; 17436 } 17437`;n.d(t,["x",0,o])},472(e,t,n){var r=n(63679);const o=r.Ay.div` 17438 width: ${e=>e.$width}; 17439 display: ${e=>e.$hide?"none":"block"}; 17440 vertical-align: ${e=>e.$verticalAlign?e.$verticalAlign:"baseline"}; 17441 &::-webkit-scrollbar {
17442 width: 5px; 17443 } 17444 &::-webkit-scrollbar-track { 17445 background-color: rgba(0, 0, 0, 0); 17446 } 17447 &::-webkit-scrollbar-thumb { 17448 background: var(--theme-palette-color-1); 17449 } 17450 &::-webkit-scrollbar-thumb:hover { 17451 background: var(--theme-palette-color-3); 17452 } 17453 @media only screen and (max-width: 1000px) { 17454 ${e=>e.$mobileFlex?"flex: 1 1 0; min-width: 0; width: auto !important;":`width: ${e.$mobileWidthOverride?e.$width:"100%"} !important;`} 17455 } 17456`,i=r.Ay.div` 17457 grid-column: ${e=>e.$column?e.$column:"auto"}; 17458 width: 100% !important; 17459 min-width: 0; /* Critical: allows flex children to shrink */ 17460 display: ${e=>e.$hide?"none":"flex"}; 17461 gap: 3px; 17462 align-items: center; 17463 17464 &::-webkit-scrollbar { 17465 width: 5px; 17466 } 17467 &::-webkit-scrollbar-track { 17468 background-color: rgba(0, 0, 0, 0); 17469 } 17470 &::-webkit-scrollbar-thumb { 17471 background-color: var(--theme-palette-color-1); 17472 } 17473 &::-webkit-scrollbar-thumb:hover { 17474 background: var(--theme-palette-color-3); 17475 } 17476 @media only screen and (max-width: 1000px) { 17477 justify-content: space-between; 17478 gap: 7px; 17479 ${e=>e.$mobileWrap?"flex-wrap: wrap;":""} 17480 } 17481`;n.d(t,["T",0,o,"l",0,i])},99104(e,t,n){var r=n(63679);const o=r.I4.div` 17482 display: flex; 17483 border-radius: 6px; 17484 user-select: none; 17485 padding: 2px; 17486 border: solid 1px var(--theme-palette-color-5); 17487 & > * { 17488 border-radius: 5px; 17489 } 17490 17491 @media only screen and (max-width: 750px) { 17492 display: flex; 17493 flex-wrap: wrap; 17494 justify-content: center; 17495 } 17496`,i=r.I4.div` 17497 background-color: ${e=>e.$active?"var(--theme-palette-color-1)":"transparent"}; 17498 user-select: none; 17499 padding: 5px 10px; 17500 color: ${e=>e.$active?"var(--theme-palette-color-7)":"var(--theme-palette-color-1)"}; 17501 display: flex; 17502 align-items: center; 17503 justify-content: center; 17504 cursor: pointer; 17505 height: 26px; 17506 &:hover { 17507 color: ${e=>e.$active?"var(--theme-palette-color-7)":"var(--theme-palette-color-1)"}; 17508 background-color: ${e=>e.$active?"var(--theme-palette-color-2)":" rgba(255, 255, 255, 0.1)"}; 17509 } 17510`;n.d(t,["C",0,o,"D",0,i])},98973(e,t,n){var r=n(63679);const o=r.Ay.div` 17511 display: flex; 17512 align-items: center; 17513 justify-content: space-between; 17514 gap: 12px; 17515 flex-wrap: wrap; 17516 width: 100%; 17517 margin: 4px 0; 17518`,i=r.Ay.div` 17519 display: flex; 17520 align-items: center; 17521 gap: 8px; 17522 flex-wrap: wrap; 17523 /* Keep the trailing cluster pinned right even when the toolbar wraps */ 17524 ${e=>e.$end?"margin-left: auto; justify-content: flex-end;":""} 17525 @media only screen and (max-width: 700px) { 17526 width: 100%; 17527 margin-left: 0; 17528 justify-content: flex-start; 17529 } 17530`,a=r.Ay.span` 17531 width: 1px; 17532 height: 16px; 17533 background: var(--theme-palette-color-5); 17534 margin: 0 4px; 17535 @media only screen and (max-width: 700px) { 17536 display: none; 17537 } 17538`,l=r.Ay.span` 17539 font-size: 13px; 17540 color: var(--theme-palette-color-3); 17541 white-space: nowrap; 17542 strong { 17543 color: var(--theme-palette-color-4); 17544 font-weight: 700; 17545 } 17546`,s=r.Ay.button` 17547 display: inline-flex; 17548 align-items: center; 17549 gap: 6px; 17550 background: none; 17551 border: 1px solid transparent; 17552 border-radius: 6px; 17553 padding: 0 10px; 17554 height: 30px; 17555 font-family: inherit; 17556 font-size: 12.5px; 17557 font-weight: 600; 17558 color: var(--theme-palette-color-3); 17559 cursor: ${e=>e.$disabled?"default":"pointer"}; 17560 opacity: ${e=>e.$disabled?.5:1}; 17561 white-space: nowrap; 17562 text-decoration: none; 17563 transition: all 150ms ease; 17564 svg { 17565 display: block; 17566 } 17567 &:hover { 17568 color: var(--theme-palette-color-4); 17569 background: rgba(255, 255, 255, 0.05); 17570 } 17571`,d=(0,r.Ay)(s)` 17572 background: var(--theme-palette-color-8); 17573 border-color: ${e=>e.$open?"var(--theme-palette-color-1)":"transparent"}; 17574 color: ${e=>e.$open?"var(--theme-palette-color-4)":"var(--theme-palette-color-3)"}; 17575 &:hover { 17576 background: var(--theme-palette-color-8); 17577 border-color: ${e=>e.$open?"var(--theme-palette-color-1)":"var(--theme-palette-color-5)"}; 17578 color: var(--theme-palette-color-4); 17579 } 17580`,c=(0,r.Ay)(d)` 17581 padding: 0; 17582 width: 30px; 17583 justify-content: center; 17584`,p=r.Ay.div` 17585 position: absolute; 17586 top: calc(100% + 6px); 17587 ${e=>"left"===e.$align?"left: 0;":"right: 0;"} 17588 min-width: ${e=>e.$minWidth??"240px"}; 17589 background: rgba(0, 0, 0, 0.65); 17590 backdrop-filter: blur(8px); 17591 border: 1px solid var(--theme-palette-color-5); 17592 border-radius: 6px; 17593 box-shadow: 17594 0 8px 16px rgba(0, 0, 0, 0.15), 17595 0 4px 6px rgba(0, 0, 0, 0.1); 17596 z-index: 9999999; 17597 17598 @media only screen and (max-width: 700px) { 17599 position: fixed; 17600 top: auto; 17601 bottom: calc(16px + var(--dotgg-bottom-obstruction, 0px)); 17602 left: 50%; 17603 right: auto; 17604 transform: translateX(-50%); 17605 width: calc(100vw - 24px); 17606 min-width: 0; 17607 max-width: 360px; 17608 max-height: 72vh; 17609 overflow-y: auto; 17610 } 17611`,h=r.Ay.span` 17612 background: var(--theme-palette-color-1); 17613 color: var(--dotgg-on-accent, var(--theme-palette-color-8)); 17614 font-size: 10px; 17615 font-weight: 700; 17616 border-radius: 50px; 17617 padding: 1px 6px; 17618 line-height: 1.4; 17619`,u=(r.Ay.div` 17620 display: flex; 17621 gap: 2px; 17622 background: var(--theme-palette-color-8); 17623 border-radius: 6px; 17624 padding: 2px; 17625`,r.Ay.button` 17626 display: flex; 17627 align-items: center; 17628 justify-content: center; 17629 width: 30px;
17630 height: 26px; 17631 background: ${e=>e.$on?"#384759":"none"}; 17632 border: none; 17633 border-radius: 4px; 17634 color: ${e=>e.$on?"var(--theme-palette-color-4)":"var(--theme-palette-color-3)"}; 17635 cursor: pointer; 17636 transition: all 150ms ease; 17637 svg { 17638 display: block; 17639 } 17640 &:hover { 17641 color: var(--theme-palette-color-4); 17642 } 17643`,r.Ay.span` 17644 font-size: 12px; 17645 color: ${e=>e.$active?"var(--theme-palette-color-1)":"var(--theme-palette-color-3)"}; 17646 white-space: nowrap; 17647 flex-shrink: 0; 17648`);n.d(t,["$Q",0,l,"IB",0,s,"M7",0,o,"Pp",0,u,"ST",0,d,"V3",0,h,"fl",0,c,"sc",0,i,"up",0,p,"x_",0,a])},89629(e,t,n){n.d(t,{N7:()=>d,S7:()=>p,k0:()=>v,yb:()=>c});var r=n(55612),o=n(12434);const i="https://api.dotgg.gg/jsreprt",a=new Set;let l=0;function s(e){if(e instanceof Error)return e;if("string"==typeof e)return new Error(e);const t=function(e){if(null==e||"object"!=typeof e)return null;const t=e;if("string"!=typeof t.type||""===t.type)return null;if(!("isTrusted"in t||"target"in t&&"currentTarget"in t))return null;const n=t.target,r=null!=n&&"object"==typeof n?n:null;return{type:t.type,target:r}}(e);if(t){const e=t.target,n=e?.tagName?.toLowerCase(),r=e?.src||e?.href;return new Error(`${t.type} event`+(n?` on <${n}>${r?` ${r}`:""}`:""))}if(null!=e&&"object"==typeof e){const t=e,n=t.message??t.reason??t.error;if("string"==typeof n&&""!==n){const e=new Error(n);return"string"==typeof t.name&&""!==t.name&&(e.name=t.name),e}try{const t=JSON.stringify(e);if(t&&"{}"!==t)return new Error(t)}catch{}}return new Error(Object.prototype.toString.call(e))}function d(e,t){try{if(l>=25)return;const n=s(e),d=`${t??""}|${n.name}|${n.message}`;if(a.has(d))return;a.add(d),l++,r.A.post(i,{name:n.name??"",message:`${t?`[${t}] `:""}${n.message??""}`,stack:n.stack??"",file:"",line:"",column:"",url:"undefined"!=typeof window?window.location.href:"",version:o.Ay.version},{url:i}).catch(()=>{})}catch{}}function c(e,t){d(new Error(`data-issue: ${t}`),e)}function p(e){try{if(l>=25)return;const t=s(e),n=(e&&"object"==typeof e?e.request:"")||t.message.match(/https?:\/\/\S+?\.js/)?.[0]||"",d="undefined"!=typeof window?window.location.host:"";let c="";try{c=n?new URL(n).host:""}catch{}const p=function(e){if(!e)return"?";try{return(new URL(e).pathname.split("/").pop()||e).replace(/\.[a-f0-9]{8,}\.js$/i,".js")}catch{return e.slice(0,80)}}(n),h=c&&c!==d?1:0,u=`chunk-fail|${p}|${d}`;if(a.has(u))return;a.add(u),l++,r.A.post(i,{name:"ChunkLoadError",message:`[chunk-fail] ${p} chunkHost=${c||"?"} cross=${h}`,stack:(t.stack??"").slice(0,2e3),file:n,line:"",column:"",url:"undefined"!=typeof window?window.location.href:"",version:o.Ay.version},{url:i,keepalive:!0}).catch(()=>{})}catch{}}const h=["failed to fetch","networkerror when attempting to fetch","load failed","network request failed","the network connection was lost","the operation was aborted","the request timed out","the internet connection appears to be offline","failed to import script","importing a module script failed","dynamically imported module","the string did not match the expected pattern","the play() request was interrupted","the fetching process for the media resource was aborted","the element has no supported sources","the request is not allowed by the user agent","called without required arguments","usersyncurl","__gpp","gam vast","vast wrapper","unable to fetch gam","uid2","gpt load timed out","tenant_config","origin not found","invalid state transition","__tcfapi","__uspapi","__cmp","adsbygoogle","googletag","pubads","prebid","pbjs","apstag","vpaid","imasdk","doubleclick.net","googlesyndication","securepubads","adthrive.com","amazon-adsystem","adnxs.com","criteo","pubmatic","rubiconproject","openx.net","casalemedia","moatads","adsafeprotected","doubleverify","3lift.com","sharethrough","taboola","outbrain","mediavine","ezoic","scorecardresearch","permutive","id5-sync","metamask","runtime.sendmessage","chrome-extension://","moz-extension://"],u=["dotgg.gg"];function g(e,t){const n=`${e} ${t}`.toLowerCase();return h.some(e=>n.includes(e))}function m(e){if(!e)return!1;try{const t=new URL(e).host.toLowerCase(),n="undefined"!=typeof window?window.location.host.toLowerCase():"";return!(!n||t!==n)||u.some(e=>t===e||t.endsWith("."+e))}catch{return!1}}const f=/(?:https?|[a-z]+-extension):\/\/[^\s)]+/gi;let x=!1;function v(){x||"undefined"==typeof window||(x=!0,window.addEventListener("unhandledrejection",e=>{const t=s(e.reason??"unhandledrejection");g(t.name,t.message)||function(e){const t=e?.match(f);return!!t&&!t.some(m)}(t.stack)||d(t,"unhandledrejection")}),window.addEventListener("error",e=>{if(!e.error)return;if(!m(e.filename))return;const t=s(e.error);g(t.name,t.message)||d(t,"window.onerror")}))}},53794(e,t,n){n.d(t,{OX:()=>l,PG:()=>s,Ub:()=>i,WS:()=>a});var r=n(17402),o=n(28297);function i(e){const[t,n]=(0,r.J0)(()=>"undefined"!=typeof window&&window.matchMedia(e).matches);return(0,r.vJ)(()=>{const t=window.matchMedia(e),r=()=>n(t.matches);return n(t.matches),t.addEventListener("change",r),()=>t.removeEventListener("change",r)},[e]),t}function a(){return i(o.E0)}function l(){const e=i(o.Ab),t=i(o.MZ);return e||t}function s(){const e=a(),t=i(o.MZ);return e&&t}},78552(e,t,n){var r=n(10201),o=n(79268);const i=(0,n(84668).A)({loader:async()=>await Promise.all([n.e(53),n.e(9315),n.e(1546),n.e(8957),n.e(5434),n.e(8879),n.e(2937)]).then(n.bind(n,12937)),loading:()=>(0,r.Y)(o.z,{}),render(e){const t=e.MetaArchetypePage;return(0,r.Y)(t,{})}});n.d(t,["h",0,i])},11767(e,t,n){var r=n(10201),o=n(79268);const i=(0,n(84668).A)({loader:async()=>await Promise.all([n.e(5434),n.e(7449),n.e(5730),n.e(8879)]).then(n.bind(n,71721)),loading:()=>(0,r.Y)(o.z,{}),render(e){const t=e.AutomaticTierList;return(0,r.Y)(t,{})}});n.d(t,["e",0,i])},58390(e,t,n){n.d(t,{I:()=>c});var r=n(51700),o=n(79063),i=n(86031),a=n(4738),l=n(55612),s=n(2056),d=n(12434);async function c(e={}){const t=[`game=${d.Ay.TheGame}`];e.window&&t.push(`window=${e.window}`),e.format&&t.push(`format=${encodeURIComponent(e.format)}`),e.slug&&t.push(`slug=${encodeURIComponent(e.slug)}`),e.history&&t.push("history=1"),e.tierHistory&&t.push("tier_history=1");const n=e.authed?(0,a.z5)():{},c=Object.keys(n).length>0;if(c)t.push(`r=${Date.now().toString(36)}${Math.random().toString(36).slice(2,8)}`);else{const e=await async function(){return 0!==i.SA.core.metaDataVersion&&void 0!==i.SA.core.metaDataVersion||await(0,r.Dn)(),i.SA.core.metaDataVersion}();void 0!==e&&t.push(`cache=${e}`)}const p=`/cgfw/getmetasnapshot?${t.join("&")}`,h=await l.A.get(p,void 0,{url:`https://api.dotgg.gg${p}`,headers:n,withCredentials:c}),u=(0,o.ST)(h,"getmetasnapshot");return null===u||(0,s.Ct)(u)?null:u}},61271(e,t,n){n(33151)},65986(e,t,n){n.d(t,["Sg",0,{id:"",name:"",rarity:"",marketIds:"",image:"",image_back:"",slug:"",cost:"",hasback:!1,price:null,priceType:"None",foilPrice:null,deltaPrice:"",deltaFoilPrice:"",delta7dPrice:"",delta7dPriceFoil:"",displayName:"",displayPrice:"N/A",comparativePrice:0,comparativeNormalPrice:0,comparativeFoilPrice:0,setId:"",color:"",cardtype:"",number:"",colorsList:[],deltaPricePercent:0,delta7dPricePercent:0,deltaFoilPricePercent:0,delta7dPriceFoilPercent:0,cardkingdomprice:"",cmid:"",cmPrice:null,cmFoilPrice:null,cmDeltaPrice:"",cmurl:"",cmDeltaFoilPrice:"",cmDelta7dPrice:"",cmDelta7dPriceFoil:"",currencySymbol:"$"},"dr",0,{textSearch:"",setId:"",cost:"",color:"",rarity:"",cardtype:"",sortby:"",sortorder:"",clear:"",dailyprice:"",usdprice:"",type:"",supertype:"",ink:"",strength:"",willpower:"",lore:"",hidefoil
17648:"",franchise:"",illustrator:"",setgrouping:"",hyperspace:"",legalities:"",inCollection:"",game:"",stage:"",weakness:"",retreat:"",characteristics:"",classifications:"",combopower:"",power:"",features:"",arenas:"",traits:"",hp:"",source:"",series:"",ex:"",hasAbility:"",printing:"",finish:"",artist:"",attribute:"",card_type:"",defense:"",life:"",intellect:"",pitch:"",realType:"",class:"",talents:"",tribes:"",keywords:"",cv:"",effects:"",effectTypes:"",grade:"",cardLevel:"",productCategoryTitle:"",isFlip:"",invertFilters:"",filterLogicAnd:"",released:"",isToken:"",hasChanges:"",category:"",specificEffects:"",tags:"",element:"",name:"",aptitude:"",promo:"",edition:"",block:"",legality:"",errata:"",twoSided:"",counter:"",subtypes:"",resistance:"",attack:"",ability:"",damage:"",evolvesFrom:""}])},24499(e,t,n){n.d(t,["X",0,{hascrd:[],nothascrd:[],youtube:0,smartsrch:"",format:"",date:"",color:[],collection:0,topset:"",at:0,is_tournament:"",legalonly:0,priceMin:"",priceMax:"",placement:"",leader:""},"y",0,{name:"",author:"",authornick:"",date:"",date_edited:"",slug:"",humanname:"",description:"",leader:"",atid:null,archetype:null,supertype:"",tags:"",youtube:"",code:"",deck:{},deck_extra:{},public:"",views:"",fingerprint:"",title_image:"",format:"",priceeur:0,is_tournament:"",physical:"1"}])},21591(e,t,n){const r=["characters","weapons","echoes","achievements","items","map","wengines","diskdrives","bangboos","heroes","accessories","skins","skills","expansions","cards","monsters","supports","teams","players","locations","borders","emotes","reactions","titles","card_backs","variants","avatars","obtainmethods","recipes","essences","pokemon","species","moves","abilities","types","evolution_chains","alt_pokemon","alt_abilities","alt_pokemon_abilities","alt_moves","alt_pokemon_moves","alt_evolution_methods","alt_descriptions","alt_encounters","alt_types","alt_locations","alt_items","champions","traits","augments","pals","structures","technology","uniques","currency","vehicles","businesses","wildlife","missions","equipment","activities","gangs","radio","properties","shop","artifact_sets","materials","gcg_cards","food","crafts","domains","namecards","books","furniture","quests","outfits","scenery","banners","advise","cubes","soloraids","storycharacters","wallpapers","episodes","events","merchants","partners","fragments","keywords","epiphanies"];n.d(t,["Z",0,r,"r",0,e=>r.find(t=>t===e)])},2056(e,t,n){function r(e){return!!e&&"object"==typeof e&&"status"in e&&"error"===e.status}function o(e){const t=Math.max(0,Math.floor((Date.now()/1e3-e)/86400));return{days:t,level:t>21?"old":t>10?"stale":"fresh"}}function i(e){return"cut"===e?.population?{of:"of the top cuts",label:"The top cuts",unit:"decks",whole:"the published top cuts",rank:"in the top cuts",leading:"leading",quarterOf:"its cut",countOf:"what reached a top cut",commonest:"most common in the cuts"}:{of:"of the field",label:"The field",unit:"placed decks",whole:"everything you will sit across from",rank:"most played",leading:"most-played",quarterOf:"its own event",countOf:"what was played",commonest:"most played"}}function a(e,t,n){const r=e=>n&&(e.share??0)<.5?1:0;return e.sort((e,n)=>r(e)-r(n)||(t(n)??0)-(t(e)??0)||(n.share??0)-(e.share??0))}n.d(t,{Ct:()=>r,EB:()=>s,PY:()=>o,Wr:()=>a,ZZ:()=>d,_c:()=>u,hn:()=>h,rQ:()=>i,wT:()=>c,xQ:()=>p});const l=(e,t=!1)=>e?t?{label:"Top ¼ of cut",name:"top quarter of the cut",short:"¼ cut"}:{label:"Top 25%",name:"top 25% rate",short:"top ¼"}:{label:"Top-8 rate",name:"top-8 rate",short:"top-8"};function s(e){const t=(e=>null==e||void 0!==e.field_topq_rate)(e);if(!t){const e=l(!1);return{topQuarter:t,...e,tile:e.label}}const n=e?.field_topq_rate,r="cut"===e?.population,o=l(!0,r);return{topQuarter:t,...o,tile:r?o.label:"Top 25% finishes",title:(r?"How often a deck finishes in the top quarter of its event's published cut â the top 2 of a top 8, the top 4 of a top 16: once in, how often it goes deep":"How often an entry finishes in the top quarter of its own event (8+ players) â the same bar at a local and at a 2,000-player regional")+(void 0!==n&&n>0?`. The average counted deck: ${(100*n).toFixed(0)}%.`:".")}}function d(e,t,n=20){if("research"===t)return{ranked:e,tail:[],over:e.length};const r=e.filter(e=>e.decks>=n),o=e.filter(e=>e.decks<n),i=e.length<=12?o.length:Math.max(0,5-r.length);return{ranked:[...r,...o.slice(0,i)],tail:o.slice(i),over:r.length}}function c(e){return e.some(e=>void 0!==e.share_delta&&null!==e.share_delta)}
17648function p(e){return e?.available?.winrate??!0}function h(e){return e?"up"===e.direction?"â² up":"down"===e.direction?"â¼ down":"flat"===e.direction?"â flat":"new":"â"}function u(e,t){return"research"===e?"Research meta · compiled weekly":"editorial"===e?`Editor's call · ${new Date(1e3*t).toISOString().slice(0,10)}`:"Measured from tournament results"}n.d(t,["H$",0,e=>"conversion"!==e,"O5",0,l,"Qc",0,e=>e?.deck_floor??20,"Sm",0,e=>e.tier_basis??"conversion","tZ",0,(e,t)=>t?e.topq_rate??null:e.top8_rate])},84335(e,t,n){var r=n(10201),o=n(6e3);const i=(0,n(84668).A)({loader:async()=>await Promise.all([n.e(53),n.e(9315),n.e(1546),n.e(8957),n.e(4055)]).then(n.bind(n,94055)),loading:()=>(0,r.Y)(o.F,{}),render(e){const t=e.Builder;return(0,r.Y)(t,{})}});n.d(t,["M",0,i])},1950(e,t,n){var r=n(10201),o=n(30174);const i=(0,n(84668).A)({loader:async()=>await Promise.all([n.e(53),n.e(9315),n.e(1546),n.e(116),n.e(3202),n.e(4114),n.e(5341),n.e(7635),n.e(2238),n.e(4732)]).then(n.bind(n,44511)),loading:()=>(0,r.Y)(o.l,{}),render(e){const t=e.CardDetailsPage;return(0,r.Y)(t,{})}});n.d(t,["Z",0,i])},53621(e,t,n){n.d(t,{Y:()=>p});var r=n(10201),o=n(35791),i=n(86031),a=n(84668),l=n(70994),s=n(78552);const d=(0,a.A)({loader:async()=>await Promise.all([n.e(9315),n.e(4114),n.e(5341),n.e(1635),n.e(2153)]).then(n.bind(n,16082)),loading:()=>(0,r.Y)(o.W,{count:2,height:"200px"}),render(e){const t=e.AutomaticMetaForCard;return(0,r.Y)(t,{})}}),c=(0,a.A)({loader:async()=>await Promise.all([n.e(9315),n.e(4114),n.e(5341),n.e(1635),n.e(2153)]).then(n.bind(n,16082)),loading:()=>(0,r.Y)(o.W,{count:2,height:"200px"}),render(e){const t=e.AutomaticMetaForArchetype;return(0,r.Y)(t,{})}});function p(e){const t=(0,l.RQ)("/meta/:atSlug")?.params?.atSlug??"",n=i.SA.decks.metaV2Formats,o=t.toLowerCase().replace(/-\d+$/,"");return void 0===n||n.some(e=>o.endsWith(`-${e.toLowerCase()}`))?(0,r.Y)(s.h,{}):(0,r.Y)(c,{})}n.d(t,["e",0,d])},33523(e,t,n){var r=n(10201),o=n(58109);const i=(0,n(84668).A)({loader:async()=>await Promise.all([n.e(53),n.e(116),n.e(3202),n.e(8244)]).then(n.bind(n,89850)),loading:()=>(0,r.Y)(o.O,{}),render(e){const t=e.CardsPage;return(0,r.Y)(t,{})}});n.d(t,["d",0,i])},48724(e,t,n){var r=n(10201),o=n(58109);const i=(0,n(84668).A)({loader:async()=>await n.e(4097).then(n.bind(n,94097)),loading:()=>(0,r.Y)(o.O,{}),render(e,t){const n=e.GachaGridPage;return(0,r.Y)(n,{...t})}});n.d(t,["Y",0,i])},25213(e,t,n){var r=n(10201),o=n(33399);const i=(0,n(84668).A)({loader:async()=>await Promise.all([n.e(53),n.e(116),n.e(3202),n.e(2857)]).then(n.bind(n,17271)),loading:()=>(0,r.Y)(o.o,{}),render(e){const t=e.CollectionPage;return(0,r.Y)(t,{})}});n.d(t,["M",0,i])},39567(e,t,n){var r=n(10201),o=n(45324);const i=(0,n(84668).A)({loader:async()=>await Promise.all([n.e(53),n.e(9315),n.e(1546),n.e(8957),n.e(4114),n.e(5341),n.e(1635),n.e(9938)]).then(n.bind(n,79938)),loading:()=>(0,r.Y)(o.z,{}),render(e){const t=e.Deck;return(0,r.Y)(t,{})}});n.d(t,["E",0,i])},92275(e,t,n){var r=n(10201),o=n(59543);const i=(0,n(84668).A)({loader:async()=>await Promise.all([n.e(53),n.e(9315),n.e(1546),n.e(8957),n.e(920)]).then(n.bind(n,60920)),loading:()=>(0,r.Y)(o.C,{}),render(e){const t=e.DeckScreenshot;return(0,r.Y)(t,{})}});n.d(t,["q",0,i])},72356(e,t,n){var r=n(10201),o=n(63506);const i=(0,n(84668).A)({loader:async()=>await Promise.all([n.e(9315),n.e(4114),n.e(5341),n.e(1635),n.e(2156)]).then(n.bind(n,6229)),loading:()=>(0,r.Y)(o.V,{}),render(e){const t=e.DecksDetailed;return(0,r.Y)(t,{})}});n.d(t,["T",0,i])},93317(e,t,n){var r=n(10201),o=n(33399);const i=(0,n(84668).A)({loader:async()=>await n.e(8697).then(n.bind(n,68697)),loading:()=>(0,r.Y)(o.o,{}),render(e){const t=e.GachaCollectionPage;return(0,r.Y)(t,{})}});n.d(t,["e",0,i])},74806(e,t,n){var r=n(10201),o=n(30174);const i=(0,n(84668).A)({loader:async()=>await n.e(3171).then(n.bind(n,63171)),loading:()=>(0,r.Y)(o.l,{}),render(e,t){const n=e.GachaElementDetails;return(0,r.Y)(n,{...t})}});n.d(t,["I",0,i])},80864(e,t,n){var r=n(10201),o=n(79268);const i=(0,n(84668).A)({loader:async()=>await n.e(5676).then(n.bind(n,45676)),loading:()=>(0,r.Y)(o.z,{}),render(e,t){const n=e.TierListGacha;return(0,r.Y)(n,{...t})}});n.d(t,["$",0,i])},83831(e,t,n){var r=n(10201),o=n(79268);const i=(0,n(84668).A)({loader:async()=>await Promise.all([n.e(53),n.e(9315),n.e(1546),n.e(8957),n.e(5434),n.e(7449),n.e(471),n.e(1803),n.e(8879),n.e(3856)]).then(n.bind(n,11803)),loading:()=>(0,r.Y)(o.z,{}),render(e){const t=e.AutomaticMeta;return(0,r.Y)(t,{})}});n.d(t,["C",0,i])},6991(e,t,n){var r=n(10201),o=n(58109);const i=(0,n(84668).A)({loader:async()=>await Promise.all([n.e(53),n.e(116),n.e(3202),n.e(8879),n.e(4968)]).then(n.bind(n,10312)),loading:()=>(0,r.Y)(o.O,{}),render(e){const t=e.PricesNewPage;return(0,r.Y)(t,{})}});n.d(t,["U",0,i])},86159(e,t,n){var r=n(10201),o=n(58109);const i=(0,n(84668).A)({loader:async()=>await Promise.all([n.e(53),n.e(8879),n.e(5009)]).then(n.bind(n,17390)),loading:()=>(0,r.Y)(o.O,{}),render(e){const t=e.PricesPage;return(0,r.Y)(t,{})}});n.d(t,["E",0,i])},52297(e,t,n){var r=n(10201),o=n(85959);const i=(0,n(84668).A)({loader:async()=>await Promise.all([n.e(9292),n.e(8879),n.e(5611)]).then(n.bind(n,15611)),loading:()=>(0,r.Y)(o.N,{}),render(e){const t=e.ProductsPage;return(0,r.Y)(t,{})}});n.d(t,["S",0,i])},247(e,t,n){var r=n(10201),o=n(58109);const i=(0,n(84668).A)({loader:async()=>await Promise.all([n.e(53),n.e(116),n.e(3202),n.e(8879),n.e(4668)]).then(n.bind(n,11334)),loading:()=>(0,r.Y)(o.O,{}),render(e,t){const n=e.SetsPage;return(0,r.Y)(n,{setPageName:t.setPageName})}});n.d(t,["T",0,i])},20227(e,t,n){var r=n(10201),o=n(45324);const i=(0,n(84668).A)({loader:async()=>await Promise.all([n.e(1704),n.e(6364)]).then(n.bind(n,36364)),loading:()=>(0,r.Y)(o.z,{}),render(e){const t=e.Team;return(0,r.Y)(t,{})}});n.d(t,["w",0,i])},72170(e,t,n){var r=n(10201),o=n(6e3);const i=(0,n(84668).A)({loader:async()=>await Promise.all([n.e(793),n.e(3554)]).then(n.bind(n,77026)),loading:()=>(0,r.Y)(o.F,{}),render(e){const t=e.Builder;return(0,r.Y)(t,{})}});n.d(t,["n",0,i])},7792(e,t,n){var r=n(10201),o=n(63506);const i=(0,n(84668).A)({loader:async()=>await Promise.all([n.e(4114),n.e(1704),n.e(1841)]).then(n.bind(n,68796)),loading:()=>(0,r.Y)(o.v,{}),render(e){const t=e.Teams;return(0,r.Y)(t,{})}});n.d(t,["f",0,i])},43656(e,t,n){var r=n(10201),o=n(79268);const i=(0,n(84668).A)({loader:async()=>await Promise.all([n.e(53),n.e(9315),n.e(1546),n.e(8957),n.e(471),n.e(8879),n.e(3184)]).then(n.bind(n,35991)),loading:()=>(0,r.Y)(o.z,{}),render(e){const t=e.TierList;return(0,r.Y)(t,{})}});n.d(t,["v",0,i])},28954(e,t,n){n.d(t,{W:()=>l});var r=n(10201),o=n(86031),i=n(70994),a=n(11767);function l(e){const t=((0,i.RQ)("/tier-list/:formatSlug")?.params?.formatSlug??"").toLowerCase(),n=o.SA.decks.metaV2Formats;return void 0===n||n.some(e=>e.toLowerCase()===t)?(0,r.Y)(a.e,{}):null}},88331(e,t,n){var r=n(10201),o=n(35791),i=n(84668);const a=(0,i.A)({loader:async()=>await Promise.all([n.e(53),n.e(8879),n.e(4857)]).then(n.bind(n,84857)),loading:()=>(0,r.Y)(o.W,{}),render(e){const t=e.TierListManual;return(0,r.Y)(t,{})}}),l=(0,i.A)({loader:async()=>await Promise.all([n.e(53),n.e(8879),n.e(4857)]).then(n.bind(n,84857)),loading:()=>(0,r.Y)(o.W,{}),render(e,t){const n=e.TierListManualDetails;return(0,r.Y)(n,{...t})}});n.d(t,["s",0,a,"y",0,l])},40001(e,t,n){var r=n(10201),o=n(58109);const i=(0,n(84668).A)({loader:async()=>await n.e(8958).then(n.bind(n,18958)),loading:()=>(0,r.Y)(o.O,{}),render(e){const t=e.Timeline;return(0,r.Y)(t,{})}});n.d(t,["S",0,i])},74431(e,t,n){var r=n(10201),o=n(63506);const i=(0,n(84668).A)({loader:async()=>await Promise.all([n.e(53),n.e(9315),n.e(1546),n.e(8957),n.e(8879),n.e(5762)]).then(n.bind(n,72206)),loading:()=>(0,r.Y)(o.v,{}),render(e){const t=e.TournamentDetails;return(0,r.Y)(t,{})}});n.d(t,["h",0,i])},45182(e,t,n){var r=n(10201),o=n(51736);const i=(0,n(84668).A)({loader:async()=>await n.e(9560).then(n.bind(n,69560)),loading:()=>(0,r.Y)(o.$,{rowCount:10}),render(e,t){const n=e.TournamentEmbed;return(0,r.Y)(n,{...t})}});n.d(t,["h",0,i])}
17648,37407(e,t,n){n.d(t,{e:()=>u});var r=n(10201),o=(n(17402),n(63679)),i=n(623);const a=()=>(0,r.FD)(l,{"data-skeleton-type":"tournaments",children:[(0,r.Y)(s,{children:(0,r.Y)(d,{})}),(0,r.Y)(c,{}),(0,r.Y)(p,{children:Array.from({length:10}).map((e,t)=>(0,r.Y)(h,{},t))})]}),l=o.I4.div` 17649 width: 100%; 17650 margin-top: 20px; 17651 border-radius: 6px; 17652 padding: 10px; 17653 background-color: var(--theme-palette-color-8, #1a1a1a); 17654 ${i.aE} 17655 ${i.Xj} 1765650% { 17657 opacity: 0.7; 17658 } 17659 } 17660 17661 @media only screen and (max-width: 1140px) { 17662 padding: 8px; 17663 } 17664`,s=o.I4.div` 17665 padding: 15px 0; 17666`,d=o.I4.div` 17667 width: 200px; 17668 height: 38px; 17669 background: var(--theme-palette-color-6, #2a2a2a); 17670 border-radius: 4px; 17671 ${i.Rs} 17672`,c=o.I4.div` 17673 width: 100%; 17674 height: 40px; 17675 background: var(--theme-palette-color-6, #2a2a2a); 17676 border-radius: 4px; 17677 margin-bottom: 10px; 17678 ${i.Rs} 17679`,p=o.I4.div` 17680 display: flex; 17681 flex-direction: column; 17682 gap: 8px; 17683`,h=o.I4.div` 17684 width: 100%; 17685 height: 50px; 17686 background: var(--theme-palette-color-6, #2a2a2a); 17687 border-radius: 4px; 17688 ${i.Rs} 17689`,u=(0,n(84668).A)({loader:async()=>await Promise.all([n.e(1224),n.e(8879),n.e(2135)]).then(n.bind(n,42371)),loading:()=>(0,r.Y)(a,{}),render(e){const t=e.TournamentsPage;return(0,r.Y)(t,{})}})},22483(e,t,n){var r=n(10201),o=n(51736);const i=(0,n(84668).A)({loader:async()=>await Promise.all([n.e(1224),n.e(8879),n.e(8621)]).then(n.bind(n,48621)),loading:()=>(0,r.Y)(o.$,{}),render(e,t){const n=e.TournamentsEmbed;return(0,r.Y)(n,{...t})}});n.d(t,["y",0,i])},17588(e,t,n){var r=n(10201),o=n(58109);const i=(0,n(84668).A)({loader:async()=>await Promise.all([n.e(7635),n.e(8468)]).then(n.bind(n,84384)),loading:()=>(0,r.Y)(o.O,{}),render(e){const t=e.TradePage;return(0,r.Y)(t,{})}});n.d(t,["u",0,i])},44501(e,t,n){var r=n(10201),o=n(20482);const i=(0,n(84668).A)({loader:async()=>await Promise.all([n.e(53),n.e(9315),n.e(116),n.e(3202),n.e(4114),n.e(5341),n.e(9292),n.e(8879),n.e(8806)]).then(n.bind(n,86543)),loading:()=>(0,r.Y)(o.j,{}),render(e){const t=e.UserPage;return(0,r.Y)(t,{})}});n.d(t,["p",0,i])},45676(e,t,n){n.r(t),n.d(t,{TierListGacha:()=>x});var r=n(10201),o=n(17402),i=n(6768),a=n(41906),l=n(70165),s=n(81616),d=n(48887),c=n(13530),p=n(26482),h=n(29027),u=n(11107),g=n(53791);const m=({elementType:e})=>{const t=e||"characters",n=l.yD.tierlistDrawOptions,m=n?.names??["S","A","B","C","D"],f=n?.colors??["#18920b","#588a0d","#9ea211","#a07518","#903e15"],x=Math.max(...m.map(e=>e.length),1),v=(0,s.U_)(t),y=(0,o.Kr)(()=>Object.keys(v?.find(e=>e.tiers)?.tiers??{}),[v]),w=(0,o.Kr)(()=>{const e=l.yD.tierlistFilters??[],n=l.yD.classifications[t]??[];return e.map(e=>n.find(t=>t.name===e)).filter(e=>void 0!==e)},[t]),b=(0,o.Kr)(()=>w.map(e=>e.name),[w]),{urlArena:$,urlFilters:k,writeUrl:Y,arenaHref:A}=(0,g.s)(b),[C,F]=(0,o.J0)(null),[D,S]=(0,o.J0)(!1),[I,z]=(0,o.J0)(k),T=(0,o.Kr)(()=>{const e=e=>null==e?void 0:y.find(t=>t.toLowerCase()===e.toLowerCase());return e(C)??e($)??e(l.yD.defaultTierCategory)??y[0]??""},[y,C,$]),E=(0,o.Kr)(()=>{if(!v||""===T)return[];const e=l.yD.tierlistItemAccent,t=l.yD.tierlistItemBadge,n=l.yD.tierlistExtraEntries,r=[];for(const o of v){const i=o.tiers?.[T],a=t?.(o);i&&r.push({key:`${o.id}`,item:o,tier:i,eval:+o.tiersEval?.[T]||0,accent:e?.(o),badge:a});for(const e of n?.(o)??[]){const t=e.tiers?.[T];t&&r.push({key:e.key,item:o,tier:t,eval:+(e.tiersEval?.[T]??0)||0,nameSuffix:e.nameSuffix,accent:e.accent,badge:a,href:e.href,variant:e.variant})}}return r},[v,T]),L=(0,o.Kr)(()=>E.map(e=>e.item),[E]),M=(0,o.Kr)(()=>{const e=(I.textSearch??"").trim().toLowerCase(),t=Object.entries(I).filter(([e,t])=>"textSearch"!==e&&""!==t);return""===e&&0===t.length?E:E.filter(n=>!(""!==e&&!`${n.item.name}${n.nameSuffix??""}`.toLowerCase().includes(e))&&t.every(([e,t])=>(0,a.rH)(n.item[e],t.toLowerCase())))},[E,I]),N=Object.values(I).some(e=>""!==e);(0,o.vJ)(()=>{""!==T&&D&&Y(T,I)},[T,I,D,Y]);const P=(0,o.hb)((e,t)=>{S(!0),z(n=>{if("clear"===t)return{};const r={...n};return""===e||null==e?delete r[t]:r[t]=e,r})},[]);return(0,r.FD)(d.BQ,{children:[(0,r.Y)(p.MK,{children:y.map(e=>(0,r.Y)(p.Ft,{href:A(e),"data-native":!0,onClick:t=>{t.preventDefault(),S(!0),F(e)},$active:e===T,"aria-current":e===T?"true":void 0,children:l.yD?.tierlistCategories?.[e]?.displayName??e},e))}),l.yD.tierlistFilters?(0,r.Y)(h.e,{elementType:t,facetDefs:w,filters:I,filterchange:P,itemsOnBoard:L}):null,(0,r.Y)(u.S,{}),N?(0,r.FD)(p.$Q,{children:["Showing ",M.length," of ",E.length]}):null,(0,r.Y)(c.Z6,{children:m.map((e,n)=>{const a=M.filter(t=>t.tier.toLowerCase()===e.toLowerCase());return a.length>0?(0,r.FD)(p.XS,{children:[(0,r.Y)(p.Td,{$color:f[n],children:(0,r.Y)(p.ti,{$chars:x,children:e})}),(0,r.Y)(p.$t,{children:a.slice().sort((e,t)=>
17689e.eval===t.eval?e.item.name?.localeCompare(t.item.name):t.eval-e.eval).map(e=>(0,r.Y)(p.Il,{children:(0,r.Y)(i.Kl,{elementID:e.item.id,small:!0,elementType:t,tierEval:e.eval,accentColor:e.accent,badge:e.badge,nameSuffix:e.nameSuffix,hrefOverride:e.href,popupVariant:e.variant})},e.key))})]},n):(0,r.Y)(o.Ay.Fragment,{},n)})}),N&&0===M.length?(0,r.Y)(p.pp,{children:"Nothing matches those filters."}):null]})};var f=n(9299);class x extends o.Ay.Component{render(){return(0,r.Y)(o.Ay.Fragment,{children:(0,r.Y)(f.t,{children:(0,r.Y)(m,{elementType:this.props.elementType})})})}}},65411(e,t,n){var r=n(10201),o=n(1537),i=n(9135);n.d(t,["u",0,({color:e,cost:t,width:n=20})=>{const a="string"==typeof e&&e.includes(",")?e.split(",")[0]?.trim():e,l=(0,i.Qm)(a);return void 0===l?(0,r.Y)(r.FK,{}):(0,r.Y)(o.x,{$active:!1,$width:n,$gradient:[l.gradient?.[0],l.gradient?.[1]],$color:"var(--theme-palette-color-4)",title:l.label,$borderColor:l.border??"",children:t||0})}])},30821(e,t,n){n.d(t,["I",0,"outline: 2px solid var(--theme-palette-color-4); outline-offset: 2px;","Q",0,{unread:"var(--acct-unread, var(--theme-palette-color-1))",rowRule:"var(--acct-row-rule, color-mix(in srgb, var(--theme-palette-color-5) 55%, var(--theme-palette-color-8)))",threadBg:"var(--acct-thread-bg, color-mix(in srgb, var(--theme-palette-color-7) 30%, var(--theme-palette-color-8)))",bubbleMine:"var(--acct-bubble-mine, color-mix(in srgb, var(--theme-palette-color-1) 22%, var(--theme-palette-color-8)))",segOn:"var(--acct-seg-on, #384759)",muted:"var(--acct-muted, color-mix(in srgb, var(--theme-palette-color-3) 85%, transparent))",danger:"var(--acct-danger, #e57368)",dangerStrong:"var(--acct-danger-strong, #c0392b)",dangerEdge:"var(--acct-danger-edge, #5c2424)",success:"var(--acct-success, #3fbf73)",successRing:"var(--acct-success-ring, #2e9d5b)",warning:"var(--acct-warning, #e0a340)",inputRing:"var(--acct-input-ring, var(--theme-palette-color-3))",inputRingFocus:"var(--acct-input-ring-focus, var(--theme-palette-color-1))",onAccent:"var(--dotgg-on-accent, var(--theme-palette-color-8))",accentHover:"var(--acct-accent-hover, color-mix(in srgb, var(--theme-palette-color-1) 84%, #000))",hoverFill:"var(--acct-hover-fill, color-mix(in srgb, var(--theme-palette-color-7) 70%, var(--theme-palette-color-8)))"}])},9135(e,t,n){n.d(t,{Qm:()=>i,cd:()=>l,qd:()=>a});var r=n(86031),o=n(4738);function i(e){if(null==e||""===e)return;const t=r.SA.core.gameColors,n=t[e];if(void 0!==n)return n;const o=e.toLowerCase();for(const[e,n]of Object.entries(t))if(e.toLowerCase()===o)return n}function a(){return Object.entries(r.SA.core.gameColors)}function l(e){return i(e)?.label??(0,o.g3)(e)}},9029(e,t,n){var r=n(10201),o=n(84668),i=n(41840);const a=(0,o.A)({loader:async()=>await n.e(6603).then(n.bind(n,86603)),loading:()=>(0,r.Y)(i.w,{}),render(e){const t=e.PlaytestPage;return(0,r.Y)(t,{})}});n.d(t,["V",0,a])},41840(e,t,n){n.d(t,{w:()=>v});var r=n(10201),o=n(63679),i=n(96586),a=n(37236);const l=o.Ay.div` 17690 ${a.t_} 17691 display: grid; 17692 /* Same grid as BoardShell â including the always-reserved 44px log spine. */ 17693 grid-template-columns: minmax(0, 1fr) 44px; 17694 min-height: 82vh; 17695 background: var(--pt-canvas); 17696 17697 @media only screen and (max-width: 767px) { 17698 grid-template-columns: minmax(0, 1fr); 17699 } 17700`,s=o.Ay.div` 17701 display: flex; 17702 flex-direction: column; 17703 min-width: 0; 17704`,d=o.Ay.div` 17705 flex: 0 0 48px; 17706 height: 48px; 17707 background: var(--pt-panel); 17708 border-bottom: 1px solid var(--pt-line); 17709`,c=o.Ay.div` 17710 flex: 0 0 auto; 17711 display: flex; 17712 gap: var(--pt-gap-lg); 17713 padding: 12px 16px 14px; 17714`,p=o.Ay.div` 17715 flex: 0 0 50px; 17716 background: var(--pt-inset); 17717 border-top: 1px solid var(--pt-line); 17718 border-bottom: 1px solid var(--pt-line); 17719`,h=o.Ay.div` 17720 flex: 1; 17721 display: flex; 17722 flex-direction: column; 17723 gap: var(--pt-gap); 17724 padding: 14px 16px 0; 17725`,u=o.Ay.div` 17726 height: 64px; 17727 border-radius: var(--pt-radius); 17728 background: var(--pt-inset); 17729 border: 1px solid var(--pt-line); 17730`,g=o.Ay.div` 17731 flex: 0 0 auto; 17732 display: flex; 17733 gap: var(--pt-gap); 17734 align-items: flex-end; 17735 min-height: 186px; 17736 padding: 26px 16px 10px; 17737 background: color-mix(in srgb, var(--theme-palette-color-7) 55%, transparent); 17738 border-top: 1px solid var(--pt-line-soft); 17739`,m=o.Ay.div` 17740 background: var(--pt-panel); 17741 border-left: 1px solid var(--pt-line); 17742 17743 @media only screen and (max-width: 767px) { 17744 display: none; 17745 } 17746`,f=o.Ay.div` 17747 display: flex; 17748 gap: var(--pt-gap-sm); 17749`;function x(e){return(0,r.Y)(f,{children:Array.from({length:e.count},(t,n)=>(0,r.Y)(i.Qv,{$size:e.size??"board"},n))})}function v(){return(0,r.FD)(l,{"aria-busy":"true","aria-label":"Loading playtest",children:[(0,r.FD)(s,{children:[(0,r.Y)(d,{}),(0,r.Y)(c,{children:(0,r.Y)(x,{count:6})}),(0,r.Y)(p,{}),(0,r.FD)(h,{children:[(0,r.Y)(x,{count:6}),(0,r.Y)(u,{})]}),(0,r.Y)(g,{children:(0,r.Y)(x,{count:5,size:"hand"})})]}),(0,r.Y)(m,{})]})}},22263(e,t,n){function r(e,t){return 0===t?e.deck:!0===e.noOpponent?null:e.opponentDeck??e.deck}n.d(t,{o:()=>r})},58232(e,t,n){n.d(t,{Ro:()=>i,cT:()=>a});var r=n(8879);const o=(e,t)=>r.lqM(r.FsL(r.L5J(),r.pdi(e)),()=>t);function i(e){const t=parseInt(e.replace(/[^0-9-]/g,""),10);return Number.isFinite(t)?t:0}function a(e){return e.split("/").map(e=>e.trim()).filter(e=>""!==e)}n.d(t,["Sc",0,()=>o(e=>Array.isArray(e)?e.filter(e=>null!=e).map(e=>String(e)):[],[]),"gx",0,(e="")=>o(t=>"string"==typeof t?t:(e=>"string"==typeof e||"number"==typeof e||"boolean"==typeof e)(t)?String(t):e,e),"zA",0,()=>o(e=>Array.isArray(e)?e.filter(e=>null!=e).map(e=>String(e)):"string"==typeof e?e:null,null)])},65599(e,t,n){n.d(t,{K5:()=>o,Vb:()=>s,wd:()=>a,xh:()=>l,y4:()=>i});let r={};function o(e){r=e}function i(e){const t={};for(const n of e)Object.assign(t,n.facts);r=t}function a(){return r}function l(e){return r[e]}function s(e){return r[e]?.name??e}},29806(e,t,n){n.d(t,{J7:()=>s,LM:()=>l,zr:()=>i});var r=n(665),o=n(26747);function i(e,t){const n={turnNumber:t.turnNumber,phase:t.phase,player:t.turnPlayer};switch(e.t){case"SETUP":return{...n,category:"system",tone:"auto",icon:"â¶",text:"Game started."};case"MANUAL_OVERRIDE":return{...n,category:"override",tone:"override",icon:"â ",text:`Override: ${e.description}`};case"FREE_RESOURCE":return{...n,category:"override",tone:"override",icon:"â ",text:`Adjusted resources â ${e.reason}`};case"ANNOTATE":return{...n,category:"system",tone:"user",icon:"â",text:"Added an annotation."};case"CLEAR_ANNOTATIONS":return{...n,category:"system",tone:"user",icon:"â",text:"Cleared annotations."};case"NOTE":return{...n,category:"system",tone:"user",icon:"â",text:`Note: ${e.text}`};case"SET_PLAYER_NAME":return{...n,category:"system",tone:"user",icon:"â°",text:`Player ${e.player+1} is now "${e.name}".`};case"ROLL":{const r="number"==typeof t.extra.lastRoll?t.extra.lastRoll:"?";return{...n,category:"system",tone:"user",icon:"ð²",text:2===e.sides?`Coin flip: ${1===r?"heads":"tails"}.`:`Rolled a d${e.sides}: ${r}.`}}case"RANDOM_DISCARD":return{...n,category:"system",tone:"user",icon:"â",text:"Discarded a card at random."};case"MILL":return{...n,category:"system",tone:"user",icon:"â£",text:`Put ${e.count} card${1===e.count?"":"s"} from the top of the deck into the discard pile.`};default:return{...n,category:"system",tone:"user",icon:"â¢",text:e.t}}}
17749function a(e,t,n,r){if("MANUAL_OVERRIDE"===t.t){const o=e.describe(t.forced,n,r);return{...o,category:"override",tone:"override",icon:"â ",text:`${o.text} (override: ${t.description})`}}return e.describe(t,n,r)}function l(e,t){const[n,...i]=t;if(!n||"SETUP"!==n.t)return[];const l=[];let s=(0,r.TS)(e,(0,o.YE)(),n);return l.push({index:0,...a(e.adapter,n,s,s)}),i.forEach((t,n)=>{const o=s;s=(0,r.TS)(e,o,t),l.push({index:n+1,...a(e.adapter,t,o,s)})}),l}function s(e){const t=[];let n=-1,r="";for(const o of e)o.turnNumber!==n&&(n=o.turnNumber,r="",t.push(`\n== Turn ${n} ==`)),o.phase!==r&&(r=o.phase,t.push(`-- ${r} --`)),t.push(`${o.icon} ${o.text}`);return t.join("\n").trim()}n.d(t,["Ig",0,[{id:"turn",label:"Turns"},{id:"resource",label:"Resources"},{id:"card",label:"Cards"},{id:"combat",label:"Combat"},{id:"override",label:"Overrides"},{id:"system",label:"System"}]])},665(e,t,n){n.d(t,{TS:()=>p,sA:()=>s});var r=n(46365),o=n(26747);function i(e,t){return e.zones.find(e=>e.id===t)}function a(e){return e.zones.find(e=>"secret"===e.visibility&&e.ordered)?.id??"deck"}function l(e){return e.zones.find(e=>"private"===e.visibility)?.id??"hand"}function s(e){return e.zones.find(e=>"trash"===e.id||"discard"===e.id||"graveyard"===e.id)?.id??"trash"}function d(e,t,n,i){const d=function(e,t,n){if("PLAY_CARD"===n.t||"MOVE_CARD"===n.t){const e=(0,o.sQ)(t,{instanceId:n.instanceId,to:n.to,index:"MOVE_CARD"===n.t?n.index:void 0,location:n.location??null}),r=e.card?{[n.instanceId]:e.card.instanceId}:{};return{state:e.state,remap:r}}if("SEARCH"===n.t){const r={};let i=t;for(const t of n.take){const n=(0,o.sQ)(i,{instanceId:t,to:l(e)});n.card&&(r[t]=n.card.instanceId),i=n.state}return"shuffle"===n.then&&(i=(0,o.kP)(i,n.player,n.zone)),{state:i,remap:r}}if("ATTACH"!==n.t)return null;const r=(0,o.kH)(t,n.toInstanceId),i=(0,o.kH)(t,n.instanceId);if(r&&i&&r.zone===i.zone&&r.controllerId===i.controllerId){const e=null===i.attachedTo?t:(0,o.xF)(t,i.attachedTo,e=>{e.attachments=e.attachments.filter(e=>e!==n.instanceId)});return{state:(0,o.xF)((0,o.xF)(e,n.toInstanceId,e=>{e.attachments=[...e.attachments,n.instanceId]}),n.instanceId,e=>{e.attachedTo=n.toInstanceId,void 0!==n.orientation&&(e.orientation=n.orientation)}),remap:{}}}const a=(0,o.sQ)(t,{instanceId:n.instanceId,to:r?.zone??"costArea",toPlayer:r?.controllerId,orientation:n.orientation??i?.orientation});if(!a.card)return{state:a.state,remap:{}};const s=a.card.instanceId,d=(0,o.xF)(a.state,n.toInstanceId,e=>{e.attachments=[...e.attachments,s]});return{state:(0,o.xF)(d,s,e=>{e.attachedTo=n.toInstanceId}),remap:{[n.instanceId]:s}}}(e,t,n);if(d)return d;const c=function(e,t){switch(t.t){case"SET_ORIENTATION":return(0,o.xF)(e,t.instanceId,e=>{e.orientation=t.orientation});case"SET_FACE_DOWN":return(0,o.xF)(e,t.instanceId,e=>{e.faceDown=t.faceDown});case"SET_DOES_NOT_READY":return(0,o.xF)(e,t.instanceId,e=>{e.doesNotReady=t.value});case"SET_COUNTER":return(0,o.xF)(e,t.instanceId,e=>{t.value<=0?delete e.counters[t.counter]:e.counters[t.counter]=t.value});case"ADD_MODIFIER":return(0,o.xF)(e,t.instanceId,e=>{e.modifiers=[...e.modifiers,t.modifier]});case"REMOVE_MODIFIER":return(0,o.xF)(e,t.instanceId,e=>{e.modifiers=e.modifiers.filter(e=>e.id!==t.modifierId)});case"SET_POSITION":return(0,o.xF)(e,t.instanceId,e=>{e.pos=t.pos});case"NOTE":return null===t.instanceId?e:(0,o.xF)(e,t.instanceId,e=>{e.note=""===t.text?null:t.text});case"DETACH":{const n=(0,o.kH)(e,t.instanceId);if(!n?.attachedTo)return e;const r=(0,o.xF)(e,n.attachedTo,e=>{e.attachments=e.attachments.filter(e=>e!==t.instanceId)});return(0,o.xF)(r,t.instanceId,e=>{e.attachedTo=null})}default:return null}}(t,n)??function(e,t,n){switch(n.t){case"DRAW":return function(e,t,n,r){const i=a(e),s=l(e);let d=t;for(let e=0;e<r;e++){const e=(0,o.kE)((0,o.vv)(d,n),i)[0];if(void 0===e)break;d=(0,o.sQ)(d,{instanceId:e,to:s}).state}return d}(e,t,n.player,n.count);case"SET_PLAYER_COUNTER":{const e=(0,o.H_)(t);return(0,o.vv)(e,n.player).counters[n.counter]=n.value,e}case"FREE_RESOURCE":return Object.entries(n.delta).reduce((e,[t,r])=>(0,o.dH)(e,n.player,t,r),t);case"SET_PLAYER_NAME":{const e=(0,o.H_)(t);return(0,o.vv)(e,n.player).name=n.name,e}case"SHUFFLE":return(0,o.kP)(t,n.player,n.zone);case"RANDOM_DISCARD":{const i=(0,o.kE)((0,o.vv)(t,n.player),n.from);if(0===i.length)return t;const[a,l]=(0,r.vz)(t.rng,i.length),d=i[a],c={...t,rng:l};return void 0===d?c:(0,o.sQ)(c,{instanceId:d,to:s(e)}).state}case"ROLL":{const[e,i]=(0,r.vz)(t.rng,n.sides),a=(0,o.H_)({...t,rng:i});return a.extra.lastRoll=e+1,a}case"MILL":{const r=a(e),i=s(e);let l=t;for(let e=0;e<n.count;e++){const e=(0,o.kE)((0,o.vv)(l,n.player),r)[0];if(void 0===e)break;l=(0,o.sQ)(l,{instanceId:e,to:i}).state}return l}default:return null}}(e,t,n)??function(e,t){switch(t.t){case"ANNOTATE":{const n=(0,o.H_)(e);return n.annotations=[...n.annotations,t.annotation],n}case"CLEAR_ANNOTATIONS":{const t=(0,o.H_)(e);return t.annotations=[],t}case"CREATE_TOKEN":{let n=e;for(let e=0;e<t.count;e++)n=(0,o.zY)(n,{cardId:t.cardId,owner:t.player,zone:t.to})[1];return n}case"ADD_CARD_FROM_POOL":return(0,o.zY)(e,{cardId:t.cardId,owner:t.player,zone:t.to})[1];default:return null}}(t,n)??function(e,t,n){if("BULK_ORIENT"===t.t){let n=e;
17749for(const e of t.zones)for(const r of(0,o.kE)((0,o.vv)(n,t.player),e)){const e=(0,o.kH)(n,r);e&&"given"!==e.orientation&&(e.doesNotReady&&"active"===t.orientation||(n=(0,o.xF)(n,r,e=>{e.orientation=t.orientation})))}return n}if("BULK_MOVE"!==t.t)return null;let r=e;for(const i of[...(0,o.kE)((0,o.vv)(e,t.player),t.from)]){const e=(0,o.kH)(r,i);if(!e)continue;const a=n(e.cardId)?.kind??"";t.kinds.length>0&&!t.kinds.includes(a)||(r=(0,o.sQ)(r,{instanceId:i,to:t.to}).state)}return r}(t,n,i)??t;return{state:c,remap:{}}}function c(e,t,n){const r=d(e.adapter,t,n,e.facts),o=e.adapter.apply(r.state,function(e,t){const n=e=>t[e]??e;switch(e.t){case"PLAY_CARD":case"MOVE_CARD":return{...e,instanceId:n(e.instanceId)};case"ATTACH":return{...e,instanceId:n(e.instanceId),toInstanceId:n(e.toInstanceId)};case"SEARCH":return{...e,take:e.take.map(n)};default:return e}}(n,r.remap));return{...e.adapter.cleanup(o),lastRejection:null}}function p(e,t,n){if("SETUP"===n.t)return e.adapter.setup({deck:n.deck,opponentDeck:n.opponentDeck,noOpponent:n.noOpponent,seed:n.seed,firstPlayer:n.firstPlayer,mode:n.mode});if("MANUAL_OVERRIDE"===n.t)return c(e,t,n.forced);const r=function(e,t,n){if(null!==t.winner&&"SETUP"!==n.t)return"The game is over â restart or undo to keep playing.";const r=function(e,t,n){if("PLAY_CARD"!==n.t&&"MOVE_CARD"!==n.t)return null;const r=(0,o.kH)(t,n.instanceId);if(!r)return"That card is no longer in play.";const a=i(e,n.to);if(!a)return`Unknown zone "${n.to}".`;if(null===a.capacity)return null;const l=(0,o.vv)(t,r.ownerId);return(0,o.kE)(l,n.to).filter(e=>e!==n.instanceId&&null==l.cards[e]?.attachedTo).length+1>a.capacity?`${a.label} is full (max ${a.capacity}).`:null}(e,t,n);if(r)return r;switch(n.t){case"DRAW":{const r=(0,o.vv)(t,n.player),i=e.zones.find(e=>"secret"===e.visibility&&e.ordered);return i&&(0,o.kE)(r,i.id).length<n.count?`Not enough cards left in ${i.label}.`:null}case"ATTACH":return n.instanceId===n.toInstanceId?"A card cannot be attached to itself.":(0,o.kH)(t,n.toInstanceId)?null:"That attachment target is gone.";case"SET_ORIENTATION":{const r=(0,o.kH)(t,n.instanceId);if(!r)return"That card is no longer in play.";const a=i(e,r.zone);return a&&!a.orientable?`Cards in ${a.label} cannot be rested or readied.`:"given"===r.orientation?"Given DON!! are neither active nor rested (CR 4-4-2).":null}case"SEARCH":{const e=(0,o.vv)(t,n.player),r=new Set((0,o.kE)(e,n.zone));return n.take.some(e=>!r.has(e))?"Those cards are not in that zone.":null}default:return null}}(e.adapter,t,n)??e.adapter.validate(t,n);return null!==r?{...t,lastRejection:{actionType:n.t,reason:r}}:c(e,t,n)}},46365(e,t,n){n.d(t,{A1:()=>l,jy:()=>a,k4:()=>i,vz:()=>o,wX:()=>r});function r(e){const t=function(e){let t=1779033703^e.length;for(let n=0;n<e.length;n++)t=Math.imul(t^e.charCodeAt(n),3432918353),t=t<<13|t>>>19;return()=>(t=Math.imul(t^t>>>16,2246822507),t=Math.imul(t^t>>>13,3266489909),t^=t>>>16,t>>>0)}(e);return{s0:t(),s1:t(),s2:t(),s3:t()}}function o(e,t){const[n,r]=function(e){const{s0:t,s1:n,s2:r}=e;let{s3:o}=e;const i=(t+n|0)+o|0;return o=o+1|0,[(i>>>0)/4294967296,{s0:n^n>>>9,s1:r+(r<<3)|0,s2:0|(r<<21|r>>>11)+i,s3:o}]}(e);return[Math.floor(n*Math.max(1,t)),r]}function i(e,t){const n=[...e];let r=t;for(let e=n.length-1;e>0;e--){const[t,i]=o(r,e+1);r=i;const a=n[e],l=n[t];void 0!==a&&void 0!==l&&(n[e]=l,n[t]=a)}return[n,r]}function a(e){const t=[];for(const n of e){let e=n>>>0;for(let n=0;n<4;n++)t.push("23456789ABCDEFGHJKMNPQRSTUVWXYZ".charAt(e%31)),e=Math.floor(e/31)}const n=t.join("");return`${n.slice(0,4)}-${n.slice(4,8)}`}function l(e){const t=e.toUpperCase().replace(/[^0-9A-Z]/g,"");return""===t?"":t.length>4?`${t.slice(0,4)}-${t.slice(4,12)}`:t}},99614(e,t,n){function r(e,t,n){return e.modifiers.reduce((e,r)=>r.kind===n&&function(e,t){switch(e.duration){case"permanent":default:return!0;case"turn":case"battle":case"combat":return e.appliedOnTurn===t.turnNumber;case"until-your-next-turn":return e.appliedOnTurn+2>t.turnNumber}}(r,t)?e+("number"==typeof r.value?r.value:0):e,0)}n.d(t,{m8:()=>a,yr:()=>r});const o=(e,t)=>(e?.name??"").localeCompare(t?.name??""),i=[{id:"none",label:"Draw order",compare:()=>0},{id:"cost",label:"Cost",compare:(e,t)=>
17749(e?.cost??0)-(t?.cost??0)||o(e,t)},{id:"name",label:"Name",compare:o},{id:"type",label:"Type",compare:(e,t)=>(e?.kind??"").localeCompare(t?.kind??"")||o(e,t)},{id:"color",label:"Colour",compare:(e,t)=>(e?.colors[0]??"").localeCompare(t?.colors[0]??"")||o(e,t)}];function a(e,t,n){const r=i.find(e=>e.id===n);return r&&"none"!==r.id?[...e].sort((e,n)=>r.compare(t[e.cardId],t[n.cardId])):[...e]}n.d(t,["gU",0,i])},26747(e,t,n){n.d(t,{H_:()=>o,YE:()=>f,dH:()=>m,jQ:()=>x,kE:()=>l,kH:()=>s,kP:()=>g,sQ:()=>h,t9:()=>c,vv:()=>a,xF:()=>u,zY:()=>p});var r=n(46365);function o(e){return{...e,players:[i(e.players[0]),i(e.players[1])],combat:e.combat?{...e.combat,bonus:{...e.combat.bonus}}:null,annotations:[...e.annotations],extra:{...e.extra}}}function i(e){const t={};for(const[n,r]of Object.entries(e.zones))t[n]=[...r];const n={};for(const[t,r]of Object.entries(e.cards))n[t]={...r,counters:{...r.counters},attachments:[...r.attachments]};return{...e,zones:t,cards:n,counters:{...e.counters},flags:{...e.flags}}}function a(e,t){return 0===t?e.players[0]:e.players[1]}function l(e,t){return e.zones[t]??[]}function s(e,t){return e.players[0].cards[t]??e.players[1].cards[t]}function d(e,t){return e.players[0].cards[t]?0:e.players[1].cards[t]?1:null}function c(e,t,n){const r=a(e,t),o=[];for(const e of l(r,n)){const t=r.cards[e];t&&o.push(t)}return o}function p(e,t){const[n,r]=function(e){const t=e.instanceSeq+1;return[`i${t}`,{...e,instanceSeq:t}]}(e),i=o(r),s=a(i,t.owner),d={instanceId:n,cardId:t.cardId,ownerId:t.owner,controllerId:t.owner,zone:t.zone,location:null,orientation:"active",faceDown:!1,counters:{},attachments:[],attachedTo:null,modifiers:[],enteredOnTurn:i.turnNumber,summoningSick:!1,pos:null,note:null,doesNotReady:!1};s.cards[n]=d;const c=l(s,t.zone),p=void 0===t.index?c.length:Math.max(0,Math.min(t.index,c.length));return c.splice(p,0,n),s.zones[t.zone]=c,[d,i]}function h(e,t){const n=s(e,t.instanceId);if(!n)return{state:e,card:null};const r=t.toPlayer??n.ownerId,i=function(e,t){const n=d(e,t);if(null===n)return e;const r=o(e),i=a(r,n),s=i.cards[t];if(!s)return r;const c=l(i,s.zone).filter(e=>e!==t);return i.zones[s.zone]=c,delete i.cards[t],r}(e,t.instanceId),[c,h]=p(i,{cardId:n.cardId,owner:r,zone:t.to,index:t.index}),u=a(h,r).cards[c.instanceId];return u?(u.ownerId=n.ownerId,u.controllerId=r,u.location=t.location??null,u.orientation=t.orientation??"active",u.faceDown=t.faceDown??!1,{state:h,card:u}):{state:h,card:null}}function u(e,t,n){const r=d(e,t);if(null===r)return e;const i=o(e),l=a(i,r).cards[t];return l&&n(l),i}function g(e,t,n){const i=o(e),s=a(i,t),[d,c]=(0,r.k4)(l(s,n),i.rng);return s.zones[n]=d,{...i,rng:c}}function m(e,t,n,r){const i=o(e),l=a(i,t);return l.counters[n]=(l.counters[n]??0)+r,i}function f(){return{gameKey:"",mode:"solitaire",seed:"",rng:{s0:0,s1:0,s2:0,s3:0},instanceSeq:0,turnNumber:0,turnPlayer:0,firstPlayer:0,phase:"",players:[x(0,[],!1),x(1,[],!0)],combat:null,annotations:[],lastRejection:null,winner:null,winReason:null,extra:{}}}function x(e,t,n){const r={};for(const e of t)r[e]=[];return{id:e,zones:r,cards:{},counters:{},flags:{},name:0===e?"You":"Opponent",isDummy:n}}},16482(e,t,n){n.d(t,{X:()=>h});var r=n(10201),o=n(63679),i=n(76770);const a=o.Ay.button` 17750 display: flex; 17751 flex-direction: column; 17752 align-items: center; 17753 gap: 6px; 17754 padding: 0; 17755 border: 0; 17756 background: none; 17757 cursor: pointer; 17758 17759 &:focus-visible { 17760 outline: none; 17761 box-shadow: 0 0 0 3px var(--pt-ring); 17762 border-radius: var(--pt-radius); 17763 } 17764`,l=o.Ay.div` 17765 position: relative; 17766 width: var(--pt-pile-w); 17767 height: var(--pt-pile-h); 17768`,s=o.Ay.span` 17769 position: absolute; 17770 inset: 0; 17771 transform: translate(${e=>e.$offset}px, ${e=>e.$offset}px); 17772 border-radius: var(--pt-radius); 17773 background: var(--pt-raised); 17774 border: 1px solid var(--pt-line-soft); 17775`,d=o.Ay.span` 17776 position: absolute; 17777 inset: 0; 17778 border-radius: var(--pt-radius); 17779 background: var(--pt-inset); 17780 border: 1px solid ${e=>e.$strong?"var(--pt-line-strong)":"var(--pt-line)"}; 17781 display: flex; 17782 align-items: center; 17783 justify-content: center; 17784 font-size: ${e=>e.$strong?"var(--pt-t-lg)":"var(--pt-t-md)"}; 17785 font-weight: ${e=>e.$strong?800:700}; 17786 color: ${e=>e.$strong?"var(--pt-text-strong)":"var(--pt-text)"}; 17787 font-variant-numeric: tabular-nums; 17788 transition: border-color var(--pt-dur) var(--pt-ease); 17789 17790 ${a}:hover & { 17791 border-color: var(--pt-accent); 17792 } 17793`,c=o.Ay.div` 17794 position: relative; 17795 width: 76px; 17796 height: var(--pt-pile-h); 17797`,p=o.Ay.span` 17798 position: absolute; 17799 left: ${e=>e.$left}px; 17800 top: ${e=>e.$top}px; 17801 width: 44px; 17802 height: 62px; 17803 border-radius: var(--pt-radius); 17804 background: var(--pt-raised); 17805 border: 1px solid var(--pt-line); 17806 transform: rotate(${e=>e.$rot}deg); 17807 display: flex; 17808 align-items: center; 17809 justify-content: center; 17810 font-size: var(--pt-t-md); 17811 font-weight: 700; 17812 color: var(--pt-text-strong); 17813`;function h(e){const t=`${e.label} â ${e.count}`,n=e.count>1;return!0===e.fan?(0,r.FD)(a,{type:"button",title:t,onClick:e.onClick,children:[(0,r.FD)(c,{children:[(0,r.Y)(p,{$left:0,$top:6,$rot:-8}),(0,r.Y)(p,{$left:14,$top:4,$rot:0}),(0,r.Y)(p,{$left:28,$top:6,$rot:8,children:e.count})]}),(0,r.Y)(i.ZV,{children:e.label})]}):(0,r.FD)(a,{type:"button",title:t,onClick:e.onClick,children:[(0,r.FD)(l,{children:[n&&(0,r.Y)(s,{$offset:4}),n&&(0,r.Y)(s,{$offset:2}),(0,r.Y)(d,{$strong:!0===e.emphasis,children:e.count})]}),(0,r.Y)(i.ZV,{children:e.label})]})}}
17813,96586(e,t,n){n.d(t,{xC:()=>A});var r=n(10201),o=n(17402),i=n(63679),a=n(37236);const l={board:{w:"var(--pt-card-w)",h:"var(--pt-card-h)"},hand:{w:"var(--pt-hand-w)",h:"var(--pt-hand-h)"},pile:{w:"var(--pt-pile-w)",h:"var(--pt-pile-h)"},landscape:{w:"var(--pt-land-w)",h:"var(--pt-land-h)"},preview:{w:"260px",h:"364px"}},s=i.Ay.div` 17814 position: relative; 17815 /* 17816 * Always "flex: none", never a width basis. A basis length applies to the 17817 * MAIN axis, so inside a column flex container (the Riftbound battlefield 17818 * stack) a width basis silently becomes the HEIGHT â which squared off every 17819 * landscape card and cropped its art. Explicit width/height below is 17820 * direction-agnostic. 17821 */ 17822 flex: none; 17823 width: ${e=>l[e.$size].w}; 17824 height: ${e=>l[e.$size].h}; 17825 cursor: pointer; 17826 touch-action: none; 17827 opacity: ${e=>e.$dimmed?"var(--pt-quiet)":1}; 17828 transform: translateY(${e=>e.$lift}px); 17829 transition: 17830 transform var(--pt-dur) var(--pt-ease), 17831 opacity var(--pt-dur) var(--pt-ease); 17832 17833 &:hover { 17834 transform: translateY(${e=>e.$lift-2}px); 17835 } 17836 &:active { 17837 transform: translateY(${e=>e.$lift}px) scale(0.95); 17838 } 17839`,d={default:"0 0 0 1px var(--pt-line-soft), var(--pt-shadow)",playable:"0 0 0 1px var(--pt-ring-live), var(--pt-shadow-lift)",selected:"0 0 0 2px var(--pt-accent), var(--pt-shadow-lift)",illegal:"0 0 0 2px var(--pt-illegal)",override:"0 0 0 1px var(--pt-override), var(--pt-shadow)",disabled:"0 0 0 1px var(--pt-line-soft)"},c=i.Ay.div` 17840 position: relative; 17841 width: 100%; 17842 height: 100%; 17843 border-radius: var(--pt-radius); 17844 box-shadow: ${e=>d[e.$ring]}; 17845 filter: ${e=>e.$grey?"grayscale(.5)":"none"}; 17846 transform: ${e=>e.$rested?a.Hf:"none"}; 17847 transition: transform var(--pt-dur-turn) var(--pt-ease); 17848 17849 ${s}:focus-visible & { 17850 box-shadow: 17851 0 0 0 3px var(--pt-ring), 17852 0 0 0 1px var(--pt-accent); 17853 } 17854 ${s}:hover & { 17855 box-shadow: ${e=>"default"===e.$ring?"0 0 0 1px var(--pt-line-strong), var(--pt-shadow-lift)":d[e.$ring]}; 17856 } 17857`,p=i.Ay.img` 17858 width: 100%; 17859 height: 100%; 17860 object-fit: cover; 17861 border-radius: inherit; 17862 display: block; 17863 pointer-events: none; 17864 ${e=>e.$turned?"\n position: absolute;\n top: 50%;\n left: 50%;
17864\n width: var(--pt-land-h);\n height: var(--pt-land-w);\n transform: translate(-50%, -50%) rotate(90deg);\n ":""} 17865`,h=i.Ay.div` 17866 width: 100%; 17867 height: 100%; 17868 border-radius: inherit; 17869 background: 17870 repeating-linear-gradient( 17871 45deg, 17872 color-mix(in srgb, var(--pt-accent) 22%, transparent) 0 6px, 17873 transparent 6px 12px 17874 ), 17875 var(--pt-raised); 17876`,u=i.Ay.div` 17877 flex: none; 17878 width: ${e=>l[e.$size??"board"].w}; 17879 height: ${e=>l[e.$size??"board"].h}; 17880 border-radius: var(--pt-radius); 17881 background: var(--pt-inset); 17882 border: 1px solid var(--pt-line-soft); 17883`,g=i.Ay.div` 17884 flex: none; 17885 width: ${e=>l[e.$size??"board"].w}; 17886 height: ${e=>l[e.$size??"board"].h}; 17887 border-radius: var(--pt-radius); 17888 border: 1px dashed ${e=>e.$drop?"var(--pt-accent)":"var(--pt-line)"}; 17889 background: ${e=>e.$drop?"var(--pt-drop)":"var(--pt-zone)"}; 17890 display: flex; 17891 align-items: center; 17892 justify-content: center; 17893 color: var(--pt-text-dim); 17894 font-size: 22px; 17895 font-weight: 300; 17896 transition: background var(--pt-dur) var(--pt-ease); 17897`,m=i.Ay.span` 17898 position: absolute; 17899 left: 5px; 17900 top: 5px; 17901 width: 24px; 17902 height: 24px; 17903 border-radius: 50%; 17904 display: flex; 17905 align-items: center; 17906 justify-content: center; 17907 font-size: var(--pt-t); 17908 font-weight: 800; 17909 z-index: 2; 17910 ${e=>e.$playable?"background:var(--pt-accent);color:var(--theme-palette-color-7);":"background:rgba(0,0,0,.8);color:var(--pt-text-dim);border:1px solid var(--pt-line);"} 17911`,f=i.Ay.span` 17912 position: absolute; 17913 right: 3px; 17914 bottom: 3px; 17915 padding: 1px 5px; 17916 border-radius: var(--pt-radius-sm); 17917 background: rgba(0, 0, 0, 0.82); 17918 color: var(--theme-palette-color-11); 17919 font-size: var(--pt-t-sm); 17920 font-weight: 700; 17921 font-variant-numeric: tabular-nums; 17922 opacity: ${e=>e.$dim?"var(--pt-quiet)":1}; 17923 z-index: 2; 17924`,x=i.Ay.span` 17925 position: absolute; 17926 left: 4px; 17927 top: ${e=>e.$low?"32px":"4px"}; 17928 padding: 1px 5px; 17929 border-radius: var(--pt-radius-sm); 17930 background: rgba(0, 0, 0, 0.85); 17931 font-size: var(--pt-t-sm); 17932 font-weight: 700; 17933 z-index: 2; 17934 ${e=>"estimate"===e.$tone?"color:var(--pt-estimate);border-bottom:1px dotted var(--pt-estimate);":"illegal"===e.$tone?"color:var(--pt-illegal);border:1px solid var(--pt-illegal);":"color:var(--pt-override);border:1px solid var(--pt-override);"} 17935`,v=i.Ay.span` 17936 position: absolute; 17937 right: 5px; 17938 top: 32px; 17939 padding: 1px 4px; 17940 border-radius: var(--pt-radius-sm); 17941 background: rgba(0, 0, 0, 0.85); 17942 border: 1px solid var(--pt-override); 17943 color: var(--pt-override); 17944 font-size: 11px; 17945 z-index: 2; 17946`,y=i.Ay.button` 17947 position: absolute; 17948 right: 2px; 17949 top: 2px; 17950 width: 26px; 17951 height: 26px; 17952 padding: 0; 17953 border-radius: var(--pt-radius-sm); 17954 background: rgba(0, 0, 0, 0.7); 17955 border: 1px solid var(--pt-line); 17956 color: var(--pt-text); 17957 font-size: 13px; 17958 line-height: 1; 17959 cursor: pointer; 17960 z-index: 3; 17961 opacity: ${e=>e.$shown?1:0}; 17962 transition: opacity var(--pt-dur) var(--pt-ease); 17963 17964 @media (hover: none) { 17965 opacity: 1; 17966 } 17967 ${s}:hover &, ${s}:focus-within & { 17968 opacity: 1; 17969 } 17970`,w=i.Ay.div` 17971 position: absolute; 17972 left: -4px; 17973 bottom: 16px; 17974 display: flex; 17975 flex-direction: column; 17976 gap: 3px; 17977 z-index: 2; 17978`,b=i.Ay.span` 17979 width: 16px; 17980 height: 9px; 17981 border-radius: 2px; 17982 background: var(--pt-accent); 17983 box-shadow: var(--pt-shadow); 17984`,$=i.Ay.div` 17985 position: absolute; 17986 left: 50%; 17987 bottom: 100%; 17988 margin-bottom: ${10}px; 17989 transform: translateX(-50%); 17990 display: flex; 17991 gap: 6px; 17992 padding: 7px; 17993 border-radius: var(--pt-radius); 17994 background: var(--pt-panel); 17995 border: 1px solid var(--pt-line-strong); 17996 box-shadow: var(--pt-shadow-lift); 17997 z-index: 5; 17998`;function k(e){return!0===e.illegal?"illegal":!0===e.selected?"selected":!0===e.disabled?"disabled":e.card.doesNotReady?"override":!0===e.playable?"playable":"default"}function Y(e){return!0===e.selected?"hand"===e.size?-18:-6:!0===e.playable?-8:0}function A(e){const t=(0,o.li)(null),{onPreview:n,onMenu:i}=e,a=(0,o.hb)(()=>{n&&(t.current=setTimeout(n,500))},[n]),l=(0,o.hb)(()=>{null!==t.current&&clearTimeout(t.current),t.current=null},[]),d=(0,o.hb)(e=>{e.preventDefault(),i?.({x:e.clientX,y:e.clientY})},[i]);(0,o.vJ)(()=>l,[l]);const{onPrimary:u}=e,g=(0,o.hb)(e=>{if("Enter"===e.key&&u&&(e.preventDefault(),u()),"ContextMenu"===e.key||"F10"===e.key&&e.shiftKey){const t=e.currentTarget.getBoundingClientRect();e.preventDefault(),i?.({x:t.left+t.width/2,y:t.top+t.height/2})}},[u,i]),A=!0===e.hidden||e.card.faceDown,C=e.size??"board";return(0,r.FD)(s,{$size:!0===e.facts?.landscape?"landscape":C,$lift:Y(e),$dimmed:!0===e.disabled||!1===e.playable&&"hand"===C,tabIndex:0,role:"button",title:A?"Face down":e.facts?.name??e.card.cardId,onClick:e.onPrimary,onKeyDown:g,onContextMenu:d,onPointerDown:a,onPointerUp:l,onPointerLeave:l,children:[(0,r.Y)(c,{$rested:"rested"===e.card.orientation,$ring:k(e),$grey:!0===e.disabled,children:A?(0,r.Y)(h,{}):(0,r.Y)(p,{src:e.facts?.image??"",alt:e.facts?.name??e.card.cardId,loading:"lazy",$turned:!0===e.facts?.landscape&&!0===e.facts.artTurned})}),void 0!==e.cost&&!A&&(0,r.Y)(m,{$playable:!0===e.playable,children:e.cost}),void 0!==e.power&&!A&&(0,r.Y)(f,{$dim:"rested"===e.card.orientation,children:e.power}),!0===e.illegal&&(0,r.Y)(x,{$tone:"illegal",children:"â"}),e.card.doesNotReady&&(0,r.Y)(x,{$tone:"override",$low:void 0!==e.cost,children:"â "}),void 0!==e.estimated&&(0,r.FD)(x,{$tone:"estimate",$low:!0,title:"Engine estimate â editable",children:[e.estimated," â"]}),null!==e.card.note&&(0,r.Y)(v,{title:e.card.note,children:"â"}),e.card.attachments.length>0&&(0,r.Y)(w,{title:`${e.card.attachments.length} attached`,children:e.card.attachments.map(e=>(0,r.Y)(b,{},e))}),e.onMenu&&(0,r.Y)(y,{type:"button",$shown:!0===e.selected,"aria-label":"Card actions",onClick:e=>{e.stopPropagation(),d(e)},children:"â®"}),!0===e.selected&&e.actions&&(0,r.Y)($,{children:e.actions})]})}n.d(t,["Bn",0,g,"Qv",0,u])},42652(e,t,n){n.d(t,{b:()=>p});var r=n(10201),o=n(63679),i=n(96586),a=n(76770);const l=o.Ay.div` 17999 display: flex; 18000 flex-direction: column; 18001 gap: 6px; 18002 min-width: 0; 18003 padding: ${e=>e.$live?"5px":"0"}; 18004 margin: ${e=>e.$live?"-5px":"0"}; 18005 border-radius: var(--pt-radius); 18006 background: ${e=>e.$live?"var(--pt-zone-live)":"transparent"}; 18007 transition: background var(--pt-dur) var(--pt-ease); 18008`,s=o.Ay.div` 18009 display: flex; 18010 gap: var(--pt-gap-sm); 18011 align-items: flex-start; 18012 flex-wrap: wrap; 18013 18014 /* 18015 * On a phone a five-slot zone wrapped to three rows and ate the whole screen. 18016 * Scroll the row instead of wrapping it: the capacity is still legible from 18017 * the count in the label, and the empty slots stay reachable by swiping. 18018 */ 18019 @media only screen and (max-width: 767px) { 18020 flex-wrap: nowrap; 18021 overflow-x: auto; 18022 padding-bottom: 2px; 18023 } 18024`,d=o.Ay.span` 18025 color: var(--pt-text); 18026`,c=o.Ay.span` 18027 color: var(--pt-text-dim); 18028`;function p(e){const{descriptor:t,cards:n}=e,o=function(e,t){return null===e.capacity?0===t?1:0:Math.max(0,e.capacity-t)}(t,n.length);return(0,r.FD)(l,{$live:!0===e.live,children:[(0,r.FD)(s,{children:[n.map(t=>(0,r.Y)(i.xC,{card:t,facts:e.facts[t.cardId],size:e.size,power:e.powerOf?.(t),playable:e.playableOf?.(t),selected:e.selectedId===t.instanceId,hidden:e.hidden,onPrimary:()=>e.onCardPrimary?.(t),onMenu:n=>e.onCardMenu?.(t,n),onPreview:()=>e.onPreview?.(t)},t.instanceId)),Array.from({length:o},(t,n)=>(0,r.Y)(i.Bn,{$size:e.size,$drop:!0===e.live,children:!0===e.addable&&!0===e.live?"+":""},`slot-${n}`))]}),(0,r.FD)(a.ZV,{children:[t.label," ",null!==t.capacity?(0,r.FD)(r.FK,{children:[(0,r.Y)(d,{children:n.length}),"/",t.capacity]}):(0,r.Y)(d,{children:n.length}
18028),void 0!==e.note&&""!==e.note&&(0,r.FD)(c,{children:[" · ",e.note]})]})]})}},560(e,t,n){n.d(t,{M:()=>o});var r=n(10201);function o(e,t){return function(n){if("neutral"===n.part)return null;const o=0===n.viewer?1:0;return"opponent"===n.part?(0,r.Y)(e,{...n,player:o,own:!1}):(0,r.FD)(r.FK,{children:[(0,r.Y)(e,{...n,player:n.viewer,own:!0}),(0,r.Y)(t,{...n})]})}}},43796(e,t,n){n.d(t,{C1:()=>x});var r=n(10201),o=n(63679);const i={primary:"border:1px solid var(--pt-accent);background:var(--pt-accent);color:var(--theme-palette-color-7);",ghost:"border:1px solid transparent;background:none;color:var(--pt-text-dim);",outline:"border:1px solid var(--pt-line-strong);background:rgba(255,255,255,.025);color:var(--pt-text);",danger:"border:1px solid var(--pt-illegal);background:rgba(255,255,255,.03);color:var(--pt-text-strong);"},a=o.Ay.button` 18029 display: inline-flex; 18030 align-items: center; 18031 justify-content: center; 18032 gap: var(--pt-gap-sm); 18033 height: ${e=>e.$cta?"var(--pt-touch)":"32px"}; 18034 padding: 0 ${e=>e.$cta?"18px":"12px"}; 18035 border-radius: var(--pt-radius); 18036 ${e=>i[e.$tone??"outline"]} 18037 font-size: ${e=>e.$cta?"var(--pt-t)":"var(--pt-t-sm)"}; 18038 font-weight: ${e=>e.$cta?700:600}; 18039 white-space: nowrap; 18040 cursor: pointer; 18041 /* transform + colour only â never a size. */ 18042 transition: 18043 transform var(--pt-dur-fast) var(--pt-ease), 18044 border-color var(--pt-dur) var(--pt-ease), 18045 color var(--pt-dur) var(--pt-ease), 18046 background var(--pt-dur) var(--pt-ease); 18047 18048 &:hover:not(:disabled) { 18049 border-color: var(--pt-accent); 18050 color: ${e=>"primary"===e.$tone?"var(--theme-palette-color-7)":"var(--pt-accent)"}; 18051 background: ${e=>"primary"===e.$tone?"var(--theme-palette-color-2)":""}; 18052 } 18053 &:active:not(:disabled) { 18054 transform: scale(0.96); 18055 } 18056 &:focus-visible { 18057 outline: none; 18058 box-shadow: 0 0 0 3px var(--pt-ring); 18059 } 18060 &:disabled { 18061 opacity: var(--pt-mute); 18062 cursor: not-allowed; 18063 } 18064`,l=o.Ay.button` 18065 width: var(--pt-touch); 18066 height: var(--pt-touch); 18067 padding: 0; 18068 border: 0; 18069 border-radius: var(--pt-radius); 18070 background: none; 18071 color: var(--pt-text); 18072 font-size: 15px; 18073 cursor: pointer; 18074 transition: 18075 background var(--pt-dur) var(--pt-ease), 18076 color var(--pt-dur) var(--pt-ease); 18077 18078 &:hover { 18079 background: var(--pt-inset); 18080 color: var(--pt-accent); 18081 } 18082 &:focus-visible { 18083 outline: none; 18084 box-shadow: 0 0 0 3px var(--pt-ring); 18085 } 18086`,s={default:"border:1px solid var(--pt-line);color:var(--pt-text);background:var(--pt-inset);",accent:"border:1px solid var(--pt-accent);color:var(--pt-accent);background:var(--pt-zone-live);",warn:"border:1px solid var(--pt-override);color:var(--pt-override);background:none;",muted:"border:1px solid var(--pt-line);color:var(--pt-text-dim);background:none;",live:"border:1px solid var(--pt-ring-live);color:var(--pt-playable);background:var(--pt-zone-live);",seat:"border:1px solid transparent;color:var(--theme-palette-color-7);background:var(--pt-accent);"},d=o.Ay.span` 18087 display: inline-flex; 18088 align-items: center; 18089 gap: var(--pt-gap-xs); 18090 padding: ${e=>e.$pill?"0 10px":"2px 7px"}; 18091 height: ${e=>e.$pill?"26px":"auto"}; 18092 border-radius: ${e=>e.$pill?"var(--pt-radius-pill)":"var(--pt-radius-sm)"}; 18093 ${e=>s[e.$tone??"default"]} 18094 font-size: var(--pt-t-xs); 18095 font-weight: 700; 18096 letter-spacing: 0.08em; 18097 text-transform: uppercase; 18098 white-space: nowrap; 18099 transition: 18100 border-color var(--pt-dur) var(--pt-ease), 18101 color var(--pt-dur) var(--pt-ease), 18102 transform var(--pt-dur-fast) var(--pt-ease); 18103 18104 &:active { 18105 transform: scale(0.95); 18106 } 18107`,c=o.Ay.span` 18108 font-size: var(--pt-t-xs); 18109 font-weight: 700; 18110 letter-spacing: 0.11em; 18111 text-transform: uppercase; 18112 color: var(--pt-text-dim); 18113 white-space: nowrap; 18114`,p=o.Ay.span` 18115 font-size: var(--pt-t-sm); 18116 font-weight: 700; 18117 color: var(--pt-text); 18118 font-variant-numeric: tabular-nums; 18119`,h=o.Ay.span` 18120 font-size: var(--pt-t-xl); 18121 font-weight: 800; 18122 line-height: 0.9; 18123 letter-spacing: -0.01em; 18124 color: var(--pt-accent); 18125 font-variant-numeric: tabular-nums; 18126`,u=o.Ay.span` 18127 font-family: var(--pt-font-mono); 18128 font-size: var(--pt-t-sm); 18129 color: var(--pt-text-dim); 18130 background: var(--pt-inset); 18131 border: 1px solid var(--pt-line-soft); 18132 padding: 5px 9px; 18133 border-radius: var(--pt-radius); 18134 white-space: nowrap; 18135`,g=o.Ay.div` 18136 display: inline-flex; 18137 align-items: center; 18138 border: 1px solid var(--pt-line); 18139 border-radius: var(--pt-radius); 18140 background: var(--pt-inset); 18141`,m=o.Ay.button` 18142 min-width: var(--pt-touch); 18143 height: 32px; 18144 border: none; 18145 border-radius: var(--pt-radius-sm); 18146 background: transparent; 18147 color: var(--pt-text-strong); 18148 font-size: var(--pt-t-md); 18149 line-height: 1; 18150 cursor: pointer; 18151 transition: background var(--pt-dur-fast) var(--pt-ease); 18152 18153 &:hover { 18154 background: var(--pt-raised); 18155 } 18156 &:focus-visible { 18157 outline: none; 18158 box-shadow: 0 0 0 3px var(--pt-ring); 18159 } 18160`,f=o.Ay.span` 18161 min-width: 2.5ch; 18162 text-align: center; 18163 color: var(--pt-text-strong); 18164 font-size: var(--pt-t-md); 18165 font-weight: 700; 18166 font-variant-numeric: tabular-nums; 18167`;function x(e){const t=e.min??0;return(0,r.FD)(g,{title:e.label,children:[(0,r.Y)(m,{type:"button","aria-label":`Decrease ${e.label}`,onClick:()=>e.onChange(Math.max(t,e.value-1)),children:"â"}),(0,r.Y)(f,{children:e.value}),(0,r.Y)(m,{type:"button","aria-label":`Increase ${e.label}`,onClick:()=>e.onChange(e.value+1),children:"+"})]})}n.d(t,["$n",0,a,"JU",0,c,"K0",0,l,"Kp",0,u,"WT",0,p,"vu",0,d,"yV",0,h])},76770(e,t,n){var r=n(63679),o=n(37236);const i=r.Ay.div` 18168 ${o.t_} 18169 ${o.VN} 18170 ${e=>o.Br[e.$density??"default"]} 18171 ${e=>e.$flatAttention?o.MR:""} 18172 ${e=>e.$chroma?o.Si:""} 18173 position: ${e=>e.$focus?"fixed":"relative"}; 18174 inset: ${e=>e.$focus?"0":"auto"};
18175 z-index: ${e=>e.$focus?"9999":"1"}; 18176 isolation: isolate; 18177 display: grid; 18178 /* 18179 * The log column is always present â 44px as a spine, 336px expanded. The 18180 * WIDTH change is not animated and never will be: opening the log is 18181 * input-driven (so excluded from CLS by definition), whereas an animated 18182 * width would have Chrome score every frame as a real shift. The rail slides 18183 * into the reserved column with translateX, which is transform-only. 18184 */ 18185 grid-template-columns: minmax(0, 1fr) ${e=>e.$logOpen?"336px":"44px"}; 18186 grid-template-rows: minmax(0, 1fr); 18187 /* 18188 * ONE SCROLLBAR, and it is the page's. 18189 * 18190 * This used to be a fixed frame â a 100vh-minus-header calc with a 940px cap 18191 * and an inner scroll region for the seats â which meant the board scrolled 18192 * inside a page that also scrolled. Two nested scrollbars is a genuinely 18193 * unpleasant thing to use: the wheel does different things depending on where 18194 * the pointer is, and the inner one hides content with no outward sign. 18195 * 18196 * So the board now takes its NATURAL height and the document scrolls. The 18197 * seats unfold in full; nothing is clipped. The min-height keeps a short deck 18198 * from leaving a stripe of empty page under the board. 18199 * 18200 * FOCUS MODE IS THE EXCEPTION and stays viewport-locked: it is a capture 18201 * layout, where the frame has to be exactly the screen and nothing may move 18202 * under a recording. The measured header offset is still used for it. 18203 */ 18204 height: ${e=>e.$focus?"100vh":"auto"}; 18205 min-height: ${e=>e.$focus?"100vh":`calc(100vh - ${Math.max(0,e.$offsetTop??56)}px)`}; 18206 max-height: none; 18207 background: ${e=>e.$chroma?e.$chromaColor:"var(--pt-canvas)"}; 18208 color: var(--pt-text); 18209 /* The site's face, whichever one this game's Blocksy customiser picked. */ 18210 ${o.fw} 18211 font-size: var(--pt-t); 18212 18213 @media only screen and (max-width: 767px) { 18214 grid-template-columns: minmax(0, 1fr); 18215 height: auto; 18216 min-height: 100vh; 18217 } 18218`,a=r.Ay.div` 18219 display: flex; 18220 flex-direction: column; 18221 min-width: 0; 18222 overflow: visible; 18223`,l=r.Ay.div` 18224 flex: 0 0 auto; 18225 min-height: 48px; 18226 display: flex; 18227 align-items: center; 18228 gap: 14px; 18229 padding: 0 8px 0 2px; 18230 background: var(--pt-panel); 18231 border-bottom: 1px solid var(--pt-line); 18232 18233 /* Below the three-column breakpoint the bar wraps rather than overflowing â 18234 every control stays reachable, which is the touch-parity rule. */ 18235 @media only screen and (max-width: 767px) { 18236 flex-wrap: wrap; 18237 gap: 6px; 18238 padding: 6px 8px; 18239 } 18240`,s=r.Ay.div` 18241 /* Never shrink: a squashed seat clips the tops of its cards. If the viewport 18242 is short it is YOUR half that scrolls, because that is the one you are 18243 acting in. */ 18244 flex: 0 0 auto; 18245 padding: 10px 16px; 18246 opacity: ${e=>(0,o.cU)(e.$tier)}; 18247 transition: opacity var(--pt-dur) var(--pt-ease); 18248 18249 &:hover { 18250 opacity: var(--pt-live); 18251 } 18252`,d=r.Ay.div` 18253 flex: 0 0 auto; 18254 display: flex; 18255 align-items: center; 18256 gap: var(--pt-gap); 18257 padding: 8px 16px; 18258 font-size: var(--pt-t-sm); 18259 color: var(--pt-text-dim); 18260 border-bottom: 1px dashed var(--pt-line); 18261 opacity: var(--pt-mute); 18262 transition: opacity var(--pt-dur) var(--pt-ease); 18263 18264 &:hover, 18265 &:focus-within { 18266 opacity: var(--pt-quiet); 18267 } 18268`,c=r.Ay.button` 18269 padding: 3px 10px; 18270 border: 1px solid var(--pt-line-strong); 18271 border-radius: var(--pt-radius); 18272 background: none; 18273 color: var(--pt-text); 18274 font: inherit; 18275 font-size: var(--pt-t-sm); 18276 cursor: pointer; 18277 white-space: nowrap; 18278 18279 &:hover { 18280 border-color: var(--pt-accent); 18281 } 18282`,p=r.Ay.div` 18283 flex: 0 0 auto; 18284 padding: 10px 16px; 18285 display: flex; 18286 flex-direction: column; 18287 gap: var(--pt-gap); 18288`,h=r.Ay.div` 18289 flex: 0 0 auto; 18290 overflow-x: hidden; 18291 display: flex; 18292 flex-direction: column; 18293`,u=r.Ay.div` 18294 flex: 0 0 auto; 18295 padding: 0 16px 10px; 18296`,g=r.DU` 18297 /* 18298 * The page title, breadcrumbs and any pre-content block are chrome the board 18299 * replaces. Hidden, not restyled â restyling would leave their margins behind. 18300 */ 18301 body.dotgg-playtest-active h1.page-title, 18302 body.dotgg-playtest-active .ct-breadcrumbs, 18303 body.dotgg-playtest-active #ContentBeforeProContent { 18304 display: none; 18305 } 18306 18307 /* 18308 * Full-bleed. The Blocksy shell is exactly three elements deep â 18309 * .ct-container(-fluid) > article > #rootOfProContent<game> â and the outer 18310 * one carries max-width 1290px, 75px side margins and 40px vertical padding. 18311 * We STRIP those for the duration of the board rather than nesting another 18312 * wrapper inside them: a wrapper-in-a-wrapper would keep the margins and just 18313 * add its own. The site header above stays exactly as it is; the board never
18314 * draws a second one. 18315 */ 18316 body.dotgg-playtest-active .ct-container, 18317 body.dotgg-playtest-active .ct-container-fluid, 18318 body.dotgg-playtest-active [class*="ct-container"] > article { 18319 /* 18320 * Blocksy sets an explicit WIDTH, not just a max-width, and it sets it on 18321 * BOTH the container and the article inside it (their own rule is 18322 * [class*="ct-container"] > article, pulling --theme-container-width), so 18323 * releasing only the container leaves the board inset by the article. 18324 * Measured, not guessed â see the wrapper probe in the knowledge note. 18325 */ 18326 width: 100%; 18327 max-width: none; 18328 margin: 0; 18329 padding: 0; 18330 } 18331`,m=r.Ay.div` 18332 flex: 0 0 auto; 18333 display: flex; 18334 align-items: center; 18335 gap: var(--pt-gap); 18336 flex-wrap: wrap; 18337 padding: 7px 16px; 18338 background: var(--pt-inset); 18339 border-top: 1px solid var(--pt-line); 18340 border-bottom: 1px solid var(--pt-line); 18341`,f=r.Ay.div` 18342 display: flex; 18343 align-items: flex-start; 18344 gap: var(--pt-gap-lg); 18345 flex-wrap: wrap; 18346 /* NEVER shrink. Inside a scrolling flex column a shrinking row squashes its 18347 children and the caps labels ride up over the row below it. */ 18348 flex: 0 0 auto; 18349`,x=r.Ay.span` 18350 font-size: var(--pt-t-xs); 18351 font-weight: 700; 18352 letter-spacing: 0.09em; 18353 text-transform: uppercase; 18354 color: var(--pt-text-dim); 18355 white-space: nowrap; 18356`,v=r.Ay.div` 18357 flex: 0 0 auto; 18358 padding: 8px 16px; 18359 background: color-mix(in srgb, var(--theme-palette-color-7) 55%, transparent); 18360 border-top: 1px solid var(--pt-line-soft); 18361`,y=r.Ay.div` 18362 display: flex; 18363 align-items: center; 18364 gap: 10px; 18365 margin-bottom: 10px; 18366 18367 &::before { 18368 content: ""; 18369 width: 3px; 18370 height: 13px; 18371 border-radius: 2px; 18372 flex: 0 0 3px; 18373 background: ${e=>e.$them?"var(--pt-seat-them)":"var(--pt-seat-you)"}; 18374 } 18375`,w=r.Ay.span` 18376 font-size: var(--pt-t-xs); 18377 font-weight: 700; 18378 letter-spacing: 0.11em; 18379 text-transform: uppercase; 18380 color: var(--pt-text-strong); 18381 white-space: nowrap; 18382`,b=r.Ay.span` 18383 flex: 1; 18384 height: 1px; 18385 background: linear-gradient(90deg, var(--pt-line-strong), transparent); 18386`,$=r.Ay.div` 18387 flex: 1 1 auto; 18388`,k=r.Ay.span` 18389 width: 1px; 18390 align-self: stretch; 18391 background: var(--pt-line-soft); 18392`,Y=r.Ay.div` 18393 ${o.B} 18394 position: fixed; 18395 inset: 0; 18396 z-index: 10000; 18397 display: flex; 18398 align-items: center; 18399 justify-content: center; 18400 padding: var(--pt-gap-lg); 18401 background: rgba(0, 0, 0, 0.72); 18402`,A=r.Ay.div` 18403 ${o.t_} 18404 max-width: 640px; 18405 max-height: 82vh; 18406 overflow: auto; 18407 padding: var(--pt-gap-lg); 18408 border: 1px solid var(--pt-line-strong); 18409 border-radius: var(--pt-radius-lg); 18410 background: var(--pt-panel); 18411 color: var(--pt-text); 18412 box-shadow: var(--pt-shadow-lift); 18413`,C=r.AH` 18414 animation: pt-fade var(--pt-dur) var(--pt-ease); 18415 @keyframes pt-fade { 18416 from { 18417 opacity: 0; 18418 } 18419 to { 18420 opacity: 1; 18421 } 18422 } 18423`;n.d(t,["CD",0,w,"EW",0,y,"L0",0,i,"Lo",0,c,"ME",0,g,"O1",0,p,"Qk",0,h,"SD",0,u,"ZV",0,x,"cG",0,k,"fI",0,f,"fZ",0,d,"hI",0,a,"hK",0,$,"jO",0,b,"lG",0,A,"lW",0,v,"m9",0,m,"my",0,s,"pk",0,Y,"qG",0,C,"tq",0,l])},37236(e,t,n){n.d(t,{cU:()=>p});var r=n(63679);const o=r.AH` 18424 /* surfaces */ 18425 --pt-canvas: color-mix(in srgb, var(--theme-palette-color-7) 92%, black); 18426 --pt-panel: color-mix(in srgb, var(--theme-palette-color-7) 55%, var(--theme-palette-color-6)); 18427 --pt-inset: color-mix(in srgb, var(--theme-palette-color-7) 80%, black); 18428 --pt-raised: color-mix(in srgb, var(--theme-palette-color-6) 70%, var(--theme-palette-color-5)); 18429 --pt-zone: color-mix(in srgb, var(--theme-palette-color-7) 60%, transparent); 18430 --pt-zone-live: color-mix(in srgb, var(--theme-palette-color-1) 7%, transparent); 18431 18432 /* lines and rings */ 18433 --pt-line: color-mix(in srgb, var(--theme-palette-color-5) 50%, transparent); 18434 --pt-line-strong: color-mix(in srgb, var(--theme-palette-color-5) 85%, transparent); 18435 --pt-line-soft: color-mix(in srgb, var(--theme-palette-color-5) 28%, transparent); 18436 --pt-ring: color-mix(in srgb, var(--theme-palette-color-1) 25%, transparent); 18437 --pt-ring-live: color-mix(in srgb, var(--theme-palette-color-1) 55%, transparent); 18438 18439 /* text */ 18440 --pt-text: var(--theme-palette-color-3); 18441 --pt-text-strong: var(--theme-palette-color-4); 18442 --pt-text-dim: color-mix(in srgb, var(--theme-palette-color-3) 62%, transparent); 18443 18444 /* attention ladder â see the header comment; this IS the design */ 18445 --pt-live: 1; 18446 --pt-quiet: 0.68; 18447 --pt-mute: 0.4; 18448 18449 /* semantic states */ 18450 --pt-accent: var(--theme-palette-color-1); 18451 --pt-playable: color-mix(in srgb, var(--theme-palette-color-1) 70%, white); 18452 --pt-illegal: var(--theme-palette-color-9); 18453 --pt-override: var(--theme-palette-color-11); 18454 --pt-estimate: color-mix(in srgb, var(--theme-palette-color-13) 70%, var(--theme-palette-color-3)); 18455 --pt-ready: var(--theme-palette-color-12); 18456 --pt-drop: color-mix(in srgb, var(--theme-palette-color-1) 16%, transparent); 18457 18458 /* log tones */ 18459 --pt-log-auto: var(--pt-text-dim); 18460 --pt-log-user: var(--theme-palette-color-4); 18461 --pt-log-override: var(--theme-palette-color-11); 18462 --pt-log-rejected: var(--theme-palette-color-9); 18463 18464 /* seats */ 18465 --pt-seat-you: var(--theme-palette-color-1); 18466 --pt-seat-them: color-mix(in srgb, var(--theme-palette-color-2) 80%, var(--theme-palette-color-5)); 18467 18468 /* 18469 * TYPEFACE â the board ships NO font of its own. (No backticks in here: this 18470 * is inside a template literal, and one would end it.) 18471 * 18472 * Blocksy sets the site face on the body element from the customiser, and 18473 * each of the ~14 sites picks its own, so the board must INHERIT rather than 18474 * name a family. A hardcoded stack made the playtest the only surface on the 18475 * site rendering in a different typeface. Inheriting is also the convention 18476 * already used by Segmented.tsx and DeckbuilderStyles.tsx. 18477 * 18478 * The mono token is a SYSTEM stack, never a downloaded face: seeds and ids 18479 * want tabular alignment, but a web font on a board that must paint in the 18480 * first frame is a needless request. See inheritsSiteFont below for the 18481 * form-control half of this. 18482 */ 18483 --pt-font: inherit; 18484 --pt-font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; 18485 18486 /* geometry */ 18487 --pt-radius-sm: 3px; 18488 --pt-radius: 6px; 18489 --pt-radius-lg: 10px; 18490 --pt-radius-pill: 50px; 18491 --pt-gap-xs: 4px; 18492 --pt-gap-sm: 8px; 18493 --pt-gap: 12px; 18494 --pt-gap-lg: 22px; 18495 --pt-touch: 44px; 18496 18497 /* type scale â six steps, 10 to 30px, and no others */ 18498 --pt-t-xs: 10px; 18499 --pt-t-sm: 11.5px; 18500 --pt-t: 13px; 18501 --pt-t-md: 15px; 18502 --pt-t-lg: 20px; 18503 --pt-t-xl: 30px; 18504 18505 /* card sizing */ 18506 --pt-card-w: 92px; 18507 --pt-card-h: 129px; 18508 --pt-hand-w: 108px; 18509 --pt-hand-h: 151px; 18510 --pt-pile-w: 56px; 18511 --pt-pile-h: 78px; 18512 --pt-land-w: 120px; 18513 --pt-land-h: 86px; 18514 18515 /* elevation â two, plus none */ 18516 --pt-shadow: 0 2px 6px rgba(0, 0, 0, 0.45); 18517 --pt-shadow-lift: 0 8px 22px rgba(0, 0, 0, 0.5); 18518 18519 /* motion â transform and opacity ONLY */ 18520 --pt-dur-fast: 90ms; 18521 --pt-dur: 160ms; 18522 --pt-dur-turn: 240ms; 18523 --pt-ease: cubic-bezier(0.2, 0, 0.2, 1); 18524 18525 /* Phones get the compact card scale by default â the same preset the density 18526 control exposes, not a separate set of numbers. */ 18527 @media only screen and (max-width: 767px) { 18528 --pt-card-w: 76px; 18529 --pt-card-h: 106px; 18530 --pt-hand-w: 90px; 18531 --pt-hand-h: 126px; 18532 --pt-pile-w: 48px; 18533 --pt-pile-h: 67px; 18534 --pt-gap-lg: 14px; 18535 } 18536`,i=r.AH` 18537 font-family: var(--pt-font); 18538 18539 :where(button, input, select, textarea, optgroup) { 18540 font-family: inherit; 18541 } 18542`,a=r.AH` 18543 ${o} 18544 ${i} 18545 color: var(--pt-text); 18546`,l=r.AH` 18547 --pt-shadow: none; 18548 --pt-shadow-lift: none; 18549 * { 18550 transition: none !important; 18551 animation: none !important; 18552 } 18553`,s=r.AH` 18554 @media (prefers-reduced-motion: reduce) { 18555 * { 18556 transition: none !important; 18557 animation: none !important; 18558 } 18559 } 18560`,d={compact:r.AH` 18561 --pt-card-w: 76px; 18562 --pt-card-h: 106px; 18563 --pt-hand-w: 90px; 18564 --pt-hand-h: 126px; 18565 --pt-gap-lg: 16px; 18566 `,default:r.AH``,roomy:r.AH` 18567 --pt-card-w: 104px; 18568 --pt-card-h: 146px; 18569 --pt-hand-w: 122px; 18570 --pt-hand-h: 171px; 18571 --pt-gap-lg: 28px; 18572 `},c=r.AH` 18573 --pt-quiet: 1; 18574 --pt-mute: 1; 18575`;function p(e){return"live"===e?"var(--pt-live)":"present"===e?"var(--pt-quiet)":"var(--pt-mute)"}n.d(t,["B",0,a,"Br",0,d,"Hf",0,"rotate(90deg)","MR",0,c,"Si",0,l,"VN",0,s,"fw",0,i,"t_",0,o])},90748(e,t,n){n.d(t,{B:()=>s});var r=n(10201),o=n(63679),i=n(15757);const a=(e,t,n)=>void 0!==t&&t>e?`Free accounts keep ${e} ${n}, and you have ${t}. Premium has no limit.`:null,l={binders:(e,t)=>a(e,t,"binders")??`You've used all ${e} binders. Premium has no limit.`,folders:(e,t)=>a(e,t,"folders")??`You've used all ${e} folders. Premium has no limit.`,tags:(e,t)=>a(e,t,"tags")??`You've used all ${e} tags. Premium has no limit.`,plans:(e,t)=>a(e,t,"plans per deck")??`This deck has all ${e} of its plans. Premium has no limit.`,tokens:()=>"Want a separate link for each tool? Premium keeps several, each with its own name."};function s({allowance:e,cap:t,count:n,onOpen:o,className:a}){return(0,r.FD)(d,{className:a,children:[l[e](t,n),(0,r.Y)(i.wd,{surface:`cap.${e}`,size:20,label:"tokens"===e?"More links":"Go unlimited",onOpen:o})]})}const d=o.Ay.div` 18576 display: flex; 18577 flex-wrap: wrap; 18578 align-items: center; 18579 gap: 8px; 18580 padding: 4px 2px; 18581 font-size: 12px; 18582 line-height: 1.35; 18583 color: var(--theme-palette-color-3); 18584`}
18584,15757(e,t,n){n.d(t,{UV:()=>h,wd:()=>u});var r=n(10201),o=n(63679),i=n(60083),a=n(33783);const l=i.QA,s={28:{pad:"0 10px",font:"11.5px",glyph:11},36:{pad:"0 12px",font:"12.5px",glyph:12},20:{pad:"0 7px",font:"10.5px",glyph:9}},d=o.AH` 18585 --dotgg-premium: ${l}; 18586 display: inline-flex; 18587 align-items: center; 18588 gap: 5px; 18589 height: ${e=>e.$size}px; 18590 padding: ${e=>s[e.$size].pad}; 18591 border-radius: 6px; 18592 border: 1px solid var(--dotgg-premium); 18593 background: rgba(233, 180, 76, 0.06); 18594 color: var(--dotgg-premium); 18595 font-weight: 700; 18596 font-size: ${e=>s[e.$size].font}; 18597 line-height: 1; 18598 white-space: nowrap; 18599 cursor: pointer; 18600 transition: 18601 background 0.12s ease, 18602 color 0.12s ease; 18603 18604 &:hover, 18605 &:focus-visible { 18606 background: var(--dotgg-premium); 18607 color: ${i.Z1}; 18608 } 18609 &:active { 18610 transform: translateY(1px); 18611 } 18612`,c=o.Ay.button` 18613 ${d} 18614`,p=o.Ay.span` 18615 ${d} 18616 cursor: inherit; 18617`;function h({size:e,color:t="currentColor"}){return(0,r.FD)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,r.Y)("rect",{x:"4",y:"10",width:"16",height:"11",rx:"2"}),(0,r.Y)("path",{d:"M8 10V7a4 4 0 0 1 8 0v3"})]})}function u({surface:e,size:t=28,label:n="Unlock",onOpen:o,className:i}){const l=(0,r.FD)(r.FK,{children:[(0,r.Y)(h,{size:s[t].glyph}),n]});return o?(0,r.Y)(c,{type:"button",$size:t,className:i,"data-surface":e,"aria-label":`${n} â premium`,onClick:()=>{(0,a.Q)(e),o()},children:l}):(0,r.Y)(p,{$size:t,className:i,"data-surface":e,children:l})}const g=o.AH` 18618 --dotgg-premium: ${l}; 18619`;n.d(t,["U3",0,g,"zF",0,l])},3743(e,t,n){n.d(t,{S:()=>g});var r=n(10201),o=n(63679),i=n(60083),a=n(15757),l=n(33783);const s=o.Ay.section` 18620 ${a.U3} 18621 position: relative; 18622 width: 100%; 18623 border-radius: 12px; 18624 overflow: hidden; 18625 /* metaTokens LINE, not token 7: that token is near-black on onepiece.gg and 18626 undefined on riftbound.gg, so this frame drew an invisible border on one 18627 game and the design's on the other. The lock is the thing being sold; it 18628 cannot be the one element that renders differently per site. */ 18629 border: 1px solid ${i.pj}; 18630`,d=o.Ay.div` 18631 /* A minimum so the frost has something to sit on even when the caller's 18632 placeholder is a couple of thin rows. */ 18633 min-height: 150px; 18634 padding: 12px 14px; 18635 /* The placeholder rows must never be reachable: not by tab, not by a screen 18636 reader, not by text selection. They are a picture of a table. */ 18637 user-select: none; 18638 pointer-events: none; 18639`,c=o.Ay.div` 18640 position: absolute; 18641 inset: 0; 18642 display: flex; 18643 flex-direction: column; 18644 align-items: center; 18645 justify-content: flex-end; 18646 gap: 8px; 18647 padding: 16px 14px 18px; 18648 text-align: center; 18649 background: linear-gradient( 18650 to bottom, 18651 rgba(20, 24, 29, 0.3) 0%, 18652 rgba(20, 24, 29, 0.92) 62%, 18653 rgba(20, 24, 29, 0.92) 100% 18654 ); 18655 backdrop-filter: blur(3px); 18656`,p=o.Ay.div` 18657 font-size: 14px; 18658 font-weight: 700; 18659`,h=o.Ay.div` 18660 font-size: 12px; 18661 color: ${i.Pg}; 18662 max-width: 34em; 18663`,u=o.Ay.button` 18664 ${a.U3} 18665 display: inline-flex; 18666 align-items: center; 18667 justify-content: center; 18668 height: 38px; 18669 padding: 0 18px; 18670 border-radius: 8px; 18671 border: 1px solid var(--dotgg-premium); 18672 background: rgba(233, 180, 76, 0.1); 18673 color: var(--dotgg-premium); 18674 font-weight: 700; 18675 font-size: 13px; 18676 cursor: pointer; 18677 18678 &:hover, 18679 &:focus-visible { 18680 background: var(--dotgg-premium); 18681 color: ${i.Z1}; 18682 } 18683`;function g({surface:e,unlocked:t,children:n,skeleton:o,title:i,promise:a,ctaLabel:g="Unlock",onOpen:m}){return t?n:(0,r.FD)(s,{children:[(0,r.Y)(d,{"aria-hidden":"true",children:o}),(0,r.FD)(c,{children:[(0,r.Y)(p,{children:i}),(0,r.Y)(h,{children:a}),(0,r.Y)(u,{type:"button","data-surface":e,onClick:()=>{(0,l.Q)(e),m?.()},children:g})]})]})}},70576(e,t,n){n.d(t,{K_:()=>l,tA:()=>s,y:()=>d});var r=n(10201),o=n(63679),i=n(60083),a=n(72225);function l(e,t){const n=t?`?src=${encodeURIComponent(t)}`:"",r=[],o=e?.lifetime;if(o?.open){const e=(i=o.price,Number.isInteger(i)?`$${i}`:`$${i.toFixed(2)}`),t=o.cap-o.left;r.push({key:"lifetime",name:"Lifetime",note:t>=50?`Once, for good · ${o.left} of ${o.cap} left`:`Once, for good · ${o.cap} seats, ever`,price:e,cta:`Get Lifetime · ${e} once`,href:`${o.url}${n}`})}var i;
18683return r.push({key:"annual",name:"Annual",note:"$1.67 a month, billed yearly",price:"$19.99",cta:"Go annual · $19.99 a year",href:`https://dotgg.gg/premium/annual/${n}`},{key:"monthly",name:"Monthly",note:"Cancel anytime",price:"$4.99",cta:"Go monthly · $4.99 a month",href:`https://dotgg.gg/premium/monthly/${n}`}),r}function s(e,t=Date.now()){return!0===e?.lifetime.open&&"active"===(0,a.Fk)(e.week,t)?"lifetime":"annual"}function d({plans:e,value:t,onChange:n}){return(0,r.Y)(c,{role:"radiogroup","aria-label":"Plan",children:e.map(e=>{const o=e.key===t;return(0,r.FD)(p,{$on:o,children:[(0,r.Y)("input",{type:"radio",name:"dotgg-premium-plan",value:e.key,checked:o,onChange:()=>n(e.key)}),(0,r.Y)(h,{$on:o,"aria-hidden":"true"}),(0,r.FD)(u,{children:[(0,r.Y)(g,{children:e.name}),(0,r.Y)(m,{children:e.note})]}),(0,r.Y)(f,{children:e.price})]},e.key)})})}const c=o.Ay.div` 18684 display: flex; 18685 flex-direction: column; 18686 gap: 8px; 18687`,p=o.Ay.label` 18688 position: relative; 18689 display: grid; 18690 grid-template-columns: 18px minmax(0, 1fr) auto; 18691 gap: 12px; 18692 align-items: center; 18693 min-height: 52px; 18694 padding: 10px 14px; 18695 border-radius: 8px; 18696 border: 1px solid ${e=>e.$on?i.dX:i.pj}; 18697 background: ${e=>e.$on?"rgba(255, 211, 102, 0.07)":"transparent"}; 18698 cursor: pointer; 18699 18700 && > input { 18701 position: absolute; 18702 width: 1px; 18703 height: 1px; 18704 margin: 0; 18705 padding: 0; 18706 opacity: 0; 18707 pointer-events: none; 18708 } 18709 18710 &:focus-within { 18711 outline: 2px solid ${i.dX}; 18712 outline-offset: 2px; 18713 } 18714`,h=o.Ay.span` 18715 width: 16px; 18716 height: 16px; 18717 border-radius: 50%; 18718 border: 2px solid ${e=>e.$on?i.dX:i.pj}; 18719 display: grid; 18720 place-items: center; 18721 18722 &::after { 18723 content: ""; 18724 width: 8px; 18725 height: 8px; 18726 border-radius: 50%; 18727 background: ${e=>e.$on?i.dX:"transparent"}; 18728 } 18729`,u=o.Ay.span` 18730 display: flex; 18731 flex-direction: column; 18732 gap: 1px; 18733 min-width: 0; 18734`,g=o.Ay.span` 18735 font-size: 14.5px; 18736 font-weight: 700; 18737 color: ${i.Pg}; 18738`,m=o.Ay.span` 18739 font-size: 12px; 18740 color: ${i.$p}; 18741`,f=o.Ay.span` 18742 font-size: 15px; 18743 font-weight: 800; 18744 color: ${i.Pg}; 18745 font-variant-numeric: tabular-nums; 18746`},22729(e,t,n){n.d(t,{_:()=>p});var r=n(10201),o=n(17402),i=n(63679),a=n(81616),l=n(15757),s=n(33783),d=n(90033);const c="dotgg-thanks-notice";function p({dismissible:e=!1}){const t=(0,a.h3)()?.user?.allowances,[n,i]=(0,o.J0)(()=>e&&function(){try{return"1"===localStorage.getItem(c)}catch{return!1}}()),{open:l,sheet:p}=(0,d.y)();if(!t?.grandfathered||null===t.cutoff||n)return null;const x=new Date(1e3*t.cutoff).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric",timeZone:"UTC"});return(0,r.FD)(h,{children:[e&&(0,r.Y)(f,{type:"button","aria-label":"Dismiss",onClick:()=>{try{localStorage.setItem(c,"1")}catch{}i(!0)},children:"Ã"}),(0,r.Y)(u,{children:"Thank you for being with us"}),(0,r.FD)(g,{children:["As a thank-you for your loyalty, your account keeps"," ",(0,r.Y)("b",{children:"unlimited binders, deck folders, tags and deck plans â for good"}),". Accounts created from ",x," will start with limits. Yours never will."]}),(0,r.FD)(g,{children:["Premium is still here whenever you want more: no ads on any DotGG site, every matchup and how sure each win rate is on every meta page, Built for me, and meta alerts the day things move."," ",(0,r.Y)(m,{type:"button",onClick:()=>{(0,s.Q)("notice.thanks"),l("notice.thanks")},children:"See Premium"})]}),p]})}const h=i.Ay.div` 18747 position: relative; 18748 margin: 0 0 14px; 18749 padding: 14px 40px 14px 16px; 18750 border-radius: 8px; 18751 background: var(--theme-palette-color-7); 18752 box-shadow: inset 3px 0 0 ${l.zF}, inset 0 0 0 1px var(--theme-palette-color-5); 18753`,u=i.Ay.div` 18754 font-size: 15px; 18755 font-weight: 700; 18756 color: var(--theme-palette-color-1); 18757 margin-bottom: 6px; 18758`,g=i.Ay.p` 18759 margin: 0 0 6px; 18760 font-size: 13px; 18761 line-height: 1.5; 18762 color: var(--theme-palette-color-3); 18763 b { 18764 color: var(--theme-palette-color-1); 18765 } 18766 &:last-of-type { 18767 margin-bottom: 0; 18768 } 18769`,m=i.Ay.button` 18770 padding: 0; 18771 border: 0; 18772 background: none; 18773 font: inherit; 18774 font-weight: 700; 18775 color: ${l.zF}; 18776 cursor: pointer; 18777 text-decoration: underline; 18778 text-underline-offset: 2px; 18779`,f=i.Ay.button` 18780 position: absolute; 18781 top: 8px; 18782 right: 10px; 18783 width: 26px;
18784 height: 26px; 18785 border: 0; 18786 border-radius: 50%; 18787 background: none; 18788 font-size: 18px; 18789 line-height: 1; 18790 color: var(--theme-palette-color-4); 18791 cursor: pointer; 18792 &:hover { 18793 color: var(--theme-palette-color-1); 18794 } 18795`},78058(e,t,n){n.d(t,["z",0,["M309 106c11.4-7 19-19.7 19-34c0-22.1-17.9-40-40-40s-40 17.9-40 40c0 14.4 7.6 27 19 34L209.7 220.6c-9.1 18.2-32.7 23.4-48.6 10.7L72 160c5-6.7 8-15 8-24c0-22.1-17.9-40-40-40S0 113.9 0 136s17.9 40 40 40c.2 0 .5 0 .7 0L86.4 427.4c5.5 30.4 32 52.6 63 52.6H426.6c30.9 0 57.4-22.1 63-52.6L535.3 176c.2 0 .5 0 .7 0c22.1 0 40-17.9 40-40s-17.9-40-40-40s-40 17.9-40 40c0 9 3 17.3 8 24l-89.1 71.3c-15.9 12.7-39.5 7.5-48.6-10.7L309 106z",576,512,0,!1]])},72225(e,t,n){n.d(t,{Fk:()=>i,HN:()=>l,bn:()=>a,kq:()=>s,ps:()=>d,zf:()=>g});var r=n(17402),o=n(33783);function i(e,t=Date.now()){if(!e)return null;const n=t/1e3;return n<e.from?"upcoming":n<e.until?"active":n<e.until+604800?"ended":null}function a(e){return new Date(1e3*e).toLocaleDateString("en-US",{month:"short",day:"numeric",timeZone:"UTC"})}function l(e){const t=new Date(1e3*e.from),n=new Date(1e3*(e.until-1));return`${t.toLocaleDateString("en-US",{month:"short",timeZone:"UTC"})} ${t.getUTCDate()}â${n.getUTCDate()}`}function s(){const e="undefined"==typeof window?"":window.location.href;return`https://api.dotgg.gg/auth.php?returl=${encodeURIComponent(e)}`}function d(){(0,o.Q)("week.signin")}const c={open:!1,price:0,cap:0,left:0,url:""};function p(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const h=e=>"number"==typeof e&&Number.isFinite(e)?e:null;let u=null;function g(e){const[t,n]=(0,r.J0)(null);return(0,r.vJ)(()=>{if(!e)return;let t=!0;return(u??=fetch("https://api.dotgg.gg/premiumoffer").then(e=>e.ok?e.json():null).then(e=>function(e){if(!p(e))return null;const t=e.week,n=p(t)?h(t.from):null,r=p(t)?h(t.until):null,o=null!==n&&null!==r?{from:n,until:r}:null,i=e.lifetime;if(!p(i))return{week:o,lifetime:c};const a=h(i.price),l=h(i.cap),s=h(i.left),d="string"==typeof i.url&&i.url.startsWith("https://dotgg.gg/")?i.url:null;return{week:o,lifetime:!0===i.open&&null!==a&&null!==l&&null!==s&&null!==d?{open:!0,price:a,cap:l,left:s,url:d}:c}}(e)).catch(()=>null),u).then(e=>{t&&n(e)}),()=>{t=!1}},[e]),t}},33783(e,t,n){n.d(t,{Q:()=>l});var r=n(86031),o=n(12434);const i="https://api.dotgg.gg/premiumunlock",a=new Set;function l(e){try{if(a.has(e))return;a.add(e);const t=JSON.stringify({s:e,g:o.Ay.TheGame,p:r.SA.core.premiumPreview?1:0}),n=new Blob([t],{type:"text/plain"});if("undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon)return void navigator.sendBeacon(i,n);fetch(i,{method:"POST",body:n,keepalive:!0}).catch(()=>{})}catch{}}},49889(e,t,n){n.d(t,{G:()=>i,o:()=>o});var r=n(81616);function o(){return(0,r.h3)()?.user?.allowances?.tier}function i(e){const t=(0,r.h3)()?.user?.allowances,n=t?.caps[e],o="new"===t?.tier;return{cap:n,capMoment:e=>o&&"number"==typeof n&&e>=n}}},62530(e,t,n){n.d(t,{WX:()=>a,pU:()=>s,xS:()=>l});var r=n(86031),o=n(4738),i=n(81616);function a(e){return e?.premiumState?.holds??!0===e?.capabilities?.premium}function l(){const e=(0,i.h3)(),t=(n=e?.user,n?.premiumState?.premium??!0===n?.capabilities?.premium);var n;const a=Number(e?.user?.user_id??0)>0||(0,o.x3)(),l=!0===r.SA.core.premiumPreview;return function(){if("undefined"==typeof window)return!1;try{return"preview"===new URLSearchParams(window.location.search).get("gate")}catch{return!1}}()?{unlocked:!1,subscribed:!1,signedIn:a,preview:l,forcedFree:!0}:{unlocked:t||l,subscribed:t,signedIn:a,preview:l,forcedFree:!1}}function s(e,t){return null===e?"none":t?void 0===e?"none":"exact":void 0===e?"locked":"rounded"}},90033(e,t,n){n.d(t,{y:()=>S});var r=n(10201),o=n(17402),i=n(63679),a=n(51900),l=n(60083),s=n(15757),d=n(72225);const c=i.Ay.div` 18796 display: flex; 18797 flex-direction: column; 18798 gap: 8px; 18799 padding: 12px 14px; 18800 border: 1px solid var(--dotgg-premium); 18801 border-radius: 8px; 18802 font-size: 14px; 18803 line-height: 1.45; 18804 color: ${l.$p}; 18805 18806 b { 18807 color: ${l.dX}; 18808 } 18809`,p=i.Ay.a` 18810 display: inline-flex; 18811 align-items: center; 18812 justify-content: center; 18813 align-self: flex-start; 18814 min-height: 44px; 18815 padding: 0 18px; 18816 border-radius: 6px; 18817 background: ${l.dX}; 18818 color: ${l.Z1}; 18819 font-weight: 800; 18820 font-size: 14px; 18821 text-decoration: none; 18822 white-space: nowrap; 18823 18824 &:hover, 18825 &:focus-visible { 18826 background: ${l.s}; 18827 color: ${l.Z1}; 18828 } 18829`;function h({offer:e,signedIn:t,withSignIn:n=!0}){const o=e?.week??null,i=(0,d.Fk)(o);if(!o||null===i)return null;const a=(0,d.bn)(o.until-1),l=t||!n?null:(0,r.Y)(p,{href:(0,d.kq)(),"data-surface":"week.signin",onClick:d.ps,children:"Sign in free"});return"upcoming"===i?(0,r.FD)(c,{children:[(0,r.FD)("span",{children:[(0,r.FD)("b",{children:["Premium Week, ",(0,d.HN)(o),":"]})," every meta page is free for signed-in readers â every matchup, the whole top 10, how sure each win rate is."]}),l]}):"active"===i?t?(0,r.Y)(c,{children:(0,r.FD)("span",{children:[(0,r.Y)("b",{children:"It's Premium Week:"})," every meta page is open to you until ",a,". Premium keeps it open after the week â and takes the ads away."]})}):(0,r.FD)(c,{children:[(0,r.FD)("span",{children:[(0,r.Y)("b",{children:"It's Premium Week:"})," sign in (it's free) and every meta page opens for you until ",a,"."]}),l]}):(0,r.Y)(c,{children:(0,r.FD)("span",{children:[(0,r.Y)("b",{children:"That was Premium Week."})," Premium keeps every meta page open â and takes the ads away."]})})}var u=n(70576),g=n(33783),m=n(49889),f=n(62530);const x=i.Ay.div` 18830 ${s.U3} 18831 display: flex; 18832 flex-direction: column; 18833 gap: 14px; 18834`,v=i.Ay.p` 18835 margin: 0; 18836 font-size: 15px; 18837 font-weight: 600; 18838 line-height: 1.45; 18839 color: ${l.Pg}; 18840 text-wrap: pretty; 18841`,y=i.Ay.ul` 18842 margin: 0; 18843 padding: 0; 18844 list-style: none; 18845 display: flex; 18846 flex-direction: column; 18847 gap: 10px; 18848`,w=i.Ay.li` 18849 display: grid; 18850 grid-template-columns: 16px minmax(0, 1fr); 18851 gap: 12px; 18852 align-items: start; 18853 font-size: 14px; 18854 line-height: 1.5; 18855 color: ${l.$p}; 18856 text-wrap: pretty; 18857 18858 b { 18859 /* The bright gold, not the dim premium mark: this is the promise being 18860 read, while --dotgg-premium is the colour of a lock. */ 18861 color: ${l.dX}; 18862 font-weight: 700; 18863 } 18864`,b=i.Ay.span` 18865 display: block; 18866 margin-top: 3px; 18867 color: var(--dotgg-premium); 18868`,$=i.Ay.span` 18869 font-size: 11.5px; 18870 line-height: 1.4; 18871 color: ${l.gN}; 18872`,k=i.Ay.a` 18873 display: inline-flex; 18874 align-items: center; 18875 justify-content: center; 18876 min-height: 44px; 18877 padding: 0 22px; 18878 border-radius: 6px; 18879 background: ${l.dX}; 18880 color: ${l.Z1}; 18881 font-weight: 800; 18882 font-size: 15px; 18883 text-decoration: none; 18884 white-space: nowrap; 18885 18886 &:hover, 18887 &:focus-visible { 18888 background: ${l.s}; 18889 color: ${l.Z1}; 18890 } 18891`,Y=(0,r.Y)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,r.Y)("path",{d:"M20 6L9 17l-5-5"})}),A=[{key:"wr",lead:"How sure each win rate is",rest:": its range, the matches behind it, and 7-day trends"},{key:"mu",lead:"Every matchup and the whole top 10",rest:", with records, events and decklists"},{key:"bfm",lead:"Built for me",rest:": the missing cards priced, the upgrade path from your deck"},{key:"ads",lead:"No ads",rest:" on any DotGG site"}],C={key:"caps",lead:"Unlimited binders, folders, tags and deck plans",rest:""};function F(e){return e?"cap.history"===e?"Every change to your collection, kept forever â and the numbers behind the free meta.":"cap.tokens"===e?"Up to five named export links, one per tool â and the numbers behind the free meta.":e.startsWith("cap.")?"No limit on binders, folders, tags or deck plans â and the numbers behind the free meta.":e.endsWith(".winrate")?"How sure this win rate is: its range and the matches behind it. Plus every matchup and the whole top 10.":e.endsWith(".matchups")||"archetype.matchupnotes"===e?"Every matchup, with its record. Plus the whole top 10 and how sure each win rate is.":e.endsWith(".to
18891p10")?"The whole top 10: event, finish and decklist. Plus every matchup, with its record.":e.endsWith(".trend")||e.endsWith(".history")?"7-day trends and the history beyond 30 days. Plus every matchup and the whole top 10.":e.endsWith(".builtforme")?"The cards you're missing for a winning list, priced, and the upgrade path from your own deck.":e.endsWith(".early")?"New set snapshots a day early. Plus every matchup and the whole top 10.":"alerts.sameday"===e?"Meta alerts the day things move, not in next month's recap.":"portfolio.history"===e?"Your collection's value over 90 days and the week's biggest movers â plus the numbers behind the free meta.":"pack.advisor"===e?"Your chance of a new card in every pack, and how many packs finish it â plus the numbers behind the free meta.":"Every matchup, the whole top 10 and how sure each win rate is, on every DotGG meta page.":"Every matchup, the whole top 10 and how sure each win rate is, on every DotGG meta page."}function D({open:e,onClose:t,surface:n}){const i=function(e){return e?e.endsWith(".winrate")?"wr":e.endsWith(".matchups")||e.endsWith(".top10")||"archetype.matchupnotes"===e?"mu":e.endsWith(".builtforme")?"bfm":null:null}(n),l=("new"===(0,m.o)()?[...A,C]:A).filter(e=>e.key!==i),c=(0,d.zf)(e),{signedIn:p}=(0,f.xS)(),[D,S]=(0,o.J0)(null),I=(0,u.K_)(c,n),z=I.find(e=>e.key===(D??(0,u.tA)(c)))??I[0],T=!p&&"active"===(0,d.Fk)(c?.week),E=T?(0,r.Y)(k,{href:(0,d.kq)(),"data-surface":"week.signin",onClick:d.ps,children:"Sign in free"}):z?(0,r.Y)(k,{href:z.href,"data-surface":n,onClick:()=>{"lifetime"===z.key&&(0,g.Q)("sheet.lifetime")},children:z.cta}):null;return(0,r.Y)(a.qp,{show:e,onClose:t,width:560,phoneSheet:!0,header:"See the whole picture",headerIcon:(0,r.FD)("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:s.zF,strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,r.Y)("rect",{x:"4",y:"10",width:"16",height:"11",rx:"2"}),(0,r.Y)("path",{d:"M8 10V7a4 4 0 0 1 8 0v3"})]}),footer:E,footHint:(0,r.Y)($,{children:T?"Premium keeps it all open after the week, from $4.99 a month.":"One subscription covers every DotGG Network site."}),children:(0,r.FD)(x,{children:[(0,r.Y)(h,{offer:c,signedIn:p,withSignIn:!T}),(0,r.Y)(v,{children:F(n)}),(0,r.Y)(y,{children:l.map(e=>(0,r.FD)(w,{children:[(0,r.Y)(b,{children:Y}),(0,r.FD)("span",{children:[(0,r.Y)("b",{children:e.lead}),e.rest]})]},e.key))}),T?null:(0,r.Y)(u.y,{plans:I,value:z?.key??"annual",onChange:S})]})})}function S(){const[e,t]=(0,o.J0)(void 0),n=(0,o.hb)(e=>t(e),[]),i=(0,o.hb)(()=>t(void 0),[]);return{open:n,close:i,sheet:(0,r.Y)(D,{open:void 0!==e,onClose:i,surface:e})}}}}]);
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.