https://wutheringwaves.gg/wp-content/plugins/dotgg-game/common/js/async/2767.d2bfc8ff88123b01c3f7.js
1"use strict";(self.webpackChunkallyourbasedotgg=self.webpackChunkallyourbasedotgg||[]).push([[2767],{67047(e,t,n){n.d(t,{g:()=>h});var r=n(15073),a=n(58468),o=n(22197),l=n(66701),i=n(91078),s=n(92475),c=n(2992),d=n(86031),p=n(91181);class h extends a.Ay.Component{render(){const e=this.props.statsMode?this.props.statsMode:"card",t=Object.keys(this.props.colors);if("card"===e){const e=[];return t.forEach(t=>{e.push(null)}),p.jb.mapState(n=>{n.forEach(n=>{t.forEach((t,r)=>{n.id===t&&(e[r]=n)})})}),(0,r.Y)(r.FK,{children:e.map((e,t)=>null!=e?(0,r.Y)(c.C,{place:"bottom",content:(0,r.Y)(o.Uc,{cardId:e.id,width:240}),children:(0,r.Y)("div",{children:(0,r.Y)(s.D,{$width:this.props.big?"40px":"30px",$height:this.props.big?"40px":"30px",src:e.image,title:d.SA.cards.getCardDrawerSubtitle(e)+" "+e.displayName})})},t):null)})}const n=d.SA.core.gameColors;return n[t[0]]?(0,r.Y)(r.FK,{children:t.length>1?(0,r.Y)(l.QS,{colors:t,width:this.props.big?25:18}):void 0===n[t[0]].icon?(0,r.Y)(i.L,{colorsList:t,label:"",active:!1,width:this.props.big?25:18}):""===n[t[0]].icon?(0,r.Y)(r.FK,{}):(0,r.Y)(s.D,{$width:this.props.big?"25px":"18px",$height:this.props.big?"25px":"18px",src:n[t[0]].icon})}):(0,r.Y)(r.FK,{})}}},91078(e,t,n){n.d(t,{L:()=>l});var r=n(15073),a=n(86031),o=n(1537);function l(e){if(0===e.colorsList.length)return(0,r.Y)(r.FK,{});const t=a.SA.core.gameColors;return(0,r.Y)(o.x,{$active:e.active,$width:e.width,$gradient:[t[e.colorsList[0]].gradient?.[0],e.colorsList.length>1?t[e.colorsList[1]].gradient?.[1]:t[e.colorsList[0]].gradient?.[1]],$color:"var(--theme-palette-color-4)",title:t[e.colorsList[0]].label,$borderColor:t[e.colorsList[0]].border??"",$smallerFont:!!e.small,children:e.label})}},61029(e,t,n){n.d(t,{L:()=>c});var r=n(15073),a=n(63679),o=n(1070),l=n(4428),i=n(8609),s=n(53794);function c({value:e,onValue:t,onClear:n,ariaLabel:a,phone:c,inputRef:p,className:h,...m}){const u=(0,s.WS)(),g=c??u?l.ll:d;return(0,r.FD)(i.W4,{className:h,children:[(0,r.Y)(g,{type:"search",value:e,"aria-label":a,ref:p,onChange:e=>t(e.currentTarget.value),...m}),(0,r.Y)(i.WI,{children:o.pU}),""===e||m.disabled?null:(0,r.Y)(i.w_,{type:"button","aria-label":"Clear search",title:"Clear search",onClick:()=>n?n():t(""),children:o.q8})]})}const d=(0,a.Ay)(l.iB)` 2 height: 36px !important; 3 border-color: var(--theme-palette-color-5) !important; 4 &::-webkit-search-cancel-button { 5 display: none; 6 } 7`},2992(e,t,n){var r=n(15073),a=n(58468),o=n(63679),l=n(91111);const i=o.Ay.div.attrs(e=>({style:{top:`${e.$top}px`,left:`${e.$left}px`}}))` 8 position: absolute; 9 z-index: 1000000; 10`;n.d(t,["C",0,({children:e,content:t,place:n,mobileDisable:o})=>{const[s,c]=(0,a.J0)(!1),[d,p]=(0,a.J0)({top:0,left:0}),h=(0,a.li)(null),m=(0,a.li)(null),u=()=>{c(!1)};(0,a.vJ)(()=>(document.addEventListener("mousedown",u),()=>{document.removeEventListener("mousedown",u)}),[]);const g=a.Ay.cloneElement(e,{onMouseEnter:()=>{if(!h.current)return;if(o&&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}),c(!0)},onMouseLeave:()=>c(!1),ref:h});return(0,r.FD)(r.FK,{children:[g,s&&(0,r.Y)(l.f,{children:(0,r.Y)(i,{$top:d.top,$left:d.left,ref:m,children:t})})]})}])},36929(e,t,n){n.d(t,{U:()=>G});var r=n(15073),a=n(58468),o=n(63679),l=n(11939),i=n(66096),s=n(55367),c=n(49194),d=n(99529),p=n(1748),h=n(55526),m=n(86031),u=n(28297);const g=({tournament:e})=>{const t=new Date(1e3*+e.date),n=!isNaN(t.getTime()),a=+e.players_count,o=e.top_legends?.[0],l=m.SA.decks.tournamentFieldsSettings.format,i=e.winner_country,s=m.SA.decks.tournamentFieldsSettings.country&&void 0!==i&&""!==i&&"0"!==i&&"PB"!==i;return(0,r.Y)(p.jP,{leading:n?(0,r.Y)(d.q,{when:t}):null,title:e.name,meta:[l&&e.format?(0,r.Y)(f,{children:e.format.toUpperCase()},"fmt"):null,a>0?(0,r.FD)("span",{children:[a," players"]},"players"):null,o&&o.name&&e.legends_keyed?(0,r.FD)("span",{children:[(0,h.v0)(o.name)," ",(100*o.n/e.legends_keyed).toFixed(0),"%"]},"top"):null,e.winner_name?(0,r.FD)(y,{children:[(0,r.Y)("b",{children:e.winner_name}),s&&(0,r.Y)(v,{src:`https://purecatamphetamine.github.io/country-flag-icons/3x2/${i.toUpperCase()}.svg`,alt:i,loading:"lazy"})]}
10,"won"):null],href:`/tournaments/${e.slug}`,action:(0,r.Y)(p.g7,{})})},f=o.Ay.span` 11 flex: none; 12 padding: 2px 6px; 13 border-radius: 4px; 14 background: color-mix(in srgb, var(--theme-palette-color-1) 10%, transparent); 15 color: var(--dotgg-accent-text, var(--theme-palette-color-1)); 16 font-size: 10.5px; 17 font-weight: 700; 18 letter-spacing: 0.04em; 19 @media only screen and ${u.Ab} { 20 display: none; 21 } 22`,y=o.Ay.span` 23 display: inline-flex; 24 align-items: center; 25 gap: 4px; 26 min-width: 0; 27 overflow: hidden; 28`,v=o.Ay.img` 29 width: 14px; 30 border-radius: 2px; 31`;var w=n(18041),x=n(415),Y=n(61029),b=n(79407),S=n(79874),F=n(472);const A=["16","64","256"];function $({value:e,onCommit:t,phone:n=!1}){const a=(0,S.$)(e,t,450);return(0,r.Y)(Y.L,{phone:n,ariaLabel:"Search tournaments",placeholder:n?"Search events":"Search events, cities, organisers, winners",value:a.value,onValue:a.setValue,onClear:()=>a.commitNow("")})}function C({value:e,onChange:t,short:n=!1}){const a=A.map(e=>({id:e,label:n?`${e}+`:`${e}+ players`}));return(0,r.Y)(w.M,{label:"Event size",anyLabel:"Any size",options:a,value:e,onChange:t})}function k({formats:e,format:t,onFormat:n,q:a,onQuery:o,size:l,onSize:i}){const s=e.find(e=>e.value===t);return(0,r.FD)(L,{children:[e.length>0?(0,r.Y)(F.T,{$width:"200px",children:(0,r.Y)(b.R,{placeholder:"Format",value:s,onChange:e=>{Array.isArray(e)||n(String(e.value))},options:e,highlight:void 0!==s&&""!==t,doubleWidth:!0})}):null,(0,r.Y)(D,{children:(0,r.Y)($,{value:a,onCommit:o})}),(0,r.Y)(q,{children:(0,r.Y)(C,{value:l,onChange:i})})]})}const L=o.Ay.div` 32 display: flex; 33 align-items: center; 34 flex-wrap: wrap; 35 gap: 12px; 36 width: 100%; 37 padding: 15px 0; 38`,D=o.Ay.div` 39 flex: 1 1 280px; 40 max-width: 420px; 41`,q=o.Ay.div` 42 flex: 1 1 320px; 43 min-width: 0; 44`;function P({count:e,formats:t,value:n,onChange:a,q:o,onQuery:l,size:i,onSize:s}){const c=t.length>1;return(0,r.FD)(T,{children:[(0,r.FD)(_,{children:[(0,r.Y)(x.pX,{}),(0,r.FD)(z,{children:[(0,r.Y)("strong",{children:e})," events"]}),c?(0,r.Y)(w.M,{label:"Format",anyLabel:t.find(e=>""===e.value)?.label??"All",options:t.filter(e=>""!==e.value).map(e=>({id:String(e.value),label:String(e.label)})),value:n,onChange:a}):(0,r.Y)(C,{value:i,onChange:s,short:!0})]}),c?(0,r.Y)(_,{children:(0,r.Y)(C,{value:i,onChange:s,short:!0})}):null,(0,r.Y)($,{value:o,onCommit:l,phone:!0})]})}const T=o.Ay.div` 45 display: flex; 46 flex-direction: column; 47 gap: 6px; 48 width: 100%; 49 flex-basis: 100%; 50 min-width: 0; 51 padding-bottom: 6px; 52`,_=o.Ay.div` 53 display: flex; 54 align-items: center; 55 gap: 8px; 56 width: 100%; 57 min-height: 44px; 58 padding: 4px 0; 59 min-width: 0; 60`,z=o.Ay.span` 61 flex: none; 62 font-size: 12.5px; 63 color: var(--theme-palette-color-3); 64 strong { 65 color: var(--theme-palette-color-4); 66 font-weight: 700; 67 } 68`;var E=n(52049),J=n(55369);class K extends a.Ay.Component{render(){return(0,r.FD)(J.QW,{$withbg:!1,$columns:"1fr 4fr 1fr 1fr 1fr 1fr 1fr",children:[(0,r.Y)(J.$o,{}),(0,r.FD)(J.a,{children:[(0,r.Y)(J.__,{children:this.props.fetching?"Fetching...":this.props.nothing?"No Tournaments Found":""}),(0,r.Y)(J.Q6,{children:this.props.fetching?"Please wait...":(this.props.nothing,"")})]}),(0,r.FD)(J.Ul,{children:["..",(0,r.Y)(J.r1,{children:" Players"})]}),(0,r.Y)(J.hS,{}),(0,r.Y)(J.TP,{})]})}}class W extends a.Ay.Component{render(){const e=`1fr ${this.props.meta?" 3fr":"4fr"} ${m.SA.decks.tournamentFieldsSettings.set?" 1fr":""}${m.SA.decks.tournamentFieldsSettings.format?" 1fr":""} ${this.props.meta?"2fr":""} 1fr 1fr${m.SA.decks.tournamentFieldsSettings.country?" 1fr":""}`;return(0,r.FD)(U,{$columns:e,children:[(0,r.Y)(I,{children:"Date"}),(0,r.Y)(N,{children:"Name"}),m.SA.decks.tournamentFieldsSettings.format?(0,r.Y)(I,{children:"Format"}):(0,r.Y)(r.FK,{}),this.props.meta?(0,r.FD)(r.FK,{children:[m.SA.decks.tournamentFieldsSettings.set?(0,r.Y)(I,{children:"Set"}):(0,r.Y)(r.FK,{}),(0,r.Y)(I,{children:"Meta"})]}):(0,r.Y)(r.FK,{}),(0,r.Y)(I,{children:"Players"}),(0,r.Y)(I,{$left:!0,children:"Winner"}),m.SA.decks.tournamentFieldsSettings.country?(0,r.Y)(I,{$left:!0,children:"Country"}):(0,r.Y)(r.FK,{})]})}}const I=o.I4.div` 69 text-align: ${e=>
69e.$left?"left":"center"}; 70 @media only screen and (max-width: 1000px) { 71 width: auto; 72 } 73`,N=o.I4.div` 74 padding: 5px; 75 width: 45%; 76 @media only screen and (max-width: 1000px) { 77 width: 80%; 78 line-height: 1em; 79 } 80`,U=o.I4.div` 81 display: grid; 82 grid-template-columns: ${e=>e.$columns}; 83 gap: 10px; 84 flex-basis: 100%; 85 align-items: center; 86 cursor: pointer; 87 background-color: var(--theme-palette-color-7) !important; 88 color: var(--dotgg-accent-text, var(--theme-palette-color-1)) !important; 89 font-size: 0.8em !important; 90 border-bottom: 1px solid var(--theme-palette-color-5); 91 @media only screen and (max-width: 1000px) { 92 display: none; 93 } 94`;var M=n(70994),B=n(81616),Q=n(53794),R=n(12434);function j(e){const t=new URLSearchParams(e.replace("?",""));return{format:t.get("format")??"",q:(t.get("q")??"").trim(),minPlayers:Math.max(0,parseInt(t.get("min_players")??"",10)||0)}}const G=({embed:e,filter:t})=>{const n=(0,M.zy)(),o=(0,M.Zp)(),[d,p]=(0,a.J0)(!0),[h,u]=(0,a.J0)(!1),[f,y]=(0,a.J0)(0),[v,w]=(0,a.J0)(()=>j(t||n.search)),[x,Y]=(0,a.J0)(!1),b=(0,B.lA)(),S=(0,Q.WS)(),F=(0,a.li)(null),A=t=>{if(h||!d)return;const n=f+1;u(!0),y(n),(0,l.l)(n,b,v).then(async t=>{await new Promise(e=>setTimeout(e,500));const n=!e&&t.length>=30;p(n),u(!1)}).catch(e=>{console.error("Error loading tournaments:",e),u(!1),p(!1)})};(0,a.vJ)(()=>{e||window.scrollTo(0,0);const r=j(t||n.search);(!x||r.format!==v.format||r.q!==v.q||r.minPlayers!==v.minPlayers)&&(B.aE.updateState(void 0),w(r),y(0),u(!1),p(!0),Y(!0))},[n.search,e,t,x,v.format,v.q,v.minPlayers]);const $=(0,a.Jt)(()=>A());(0,a.vJ)(()=>{if(x&&0===f&&!h){const e=setTimeout(()=>{$()},100);return()=>clearTimeout(e)}},[x,f,h]),(0,a.vJ)(()=>()=>{F.current&&clearTimeout(F.current)},[]);const C=(e,t)=>{let r={};switch(""!==v.format&&(r.format=v.format.toString()),""!==v.q&&(r.q=v.q),v.minPlayers>0&&(r.min_players=String(v.minPlayers)),t){case"srt":case"direct":r[t]=e;break;case"format":case"q":case"min_players":""!==e?r[t]=e:delete r[t];break;case"clear":r={}}const a=new URLSearchParams(r).toString();o(`${n.pathname}${a.length>0?`?${a}`:""}`)},L=(new Date).getTime()/1e3,D=(b??[]).filter(e=>+e.players_count>0&&+e.date<=L&&(""===v.format||e.format===v.format)),q=[{value:"",label:"Any Format"}];return Object.keys(m.SA.decks.deckBuildingRules).forEach(e=>{q.push({value:e.toLowerCase(),label:`${e}`})}),(0,r.FD)(X,{children:[e?null:(0,r.Y)(V,{children:(0,r.Y)(i.W,{topic:{type:"tournaments",game:R.Ay.TheGame.toLowerCase(),key:R.Ay.TheGame.toLowerCase()},label:"New tournament results",url:`${R.Ay.BASE_URL}tournaments/`,text:"Follow results",hint:"Get notified when new tournament results are posted"})}),e||!S?null:(0,r.Y)(P,{count:D.length,formats:m.SA.decks.tournamentFieldsSettings.format?q.map(e=>""===e.value?{...e,label:"All"}:e):[],value:v.format,onChange:e=>C(e,"format"),q:v.q,onQuery:e=>C(e.trim(),"q"),size:v.minPlayers>0?String(v.minPlayers):"",onSize:e=>C(e,"min_players")}),e||S?null:(0,r.Y)(k,{formats:m.SA.decks.tournamentFieldsSettings.format?q:[],format:v.format,onFormat:e=>C(e,"format"),q:v.q,onQuery:e=>C(e.trim(),"q"),size:v.minPlayers>0?String(v.minPlayers):"",onSize:e=>C(e,"min_players")}),S?null:(0,r.Y)(W,{meta:null!==b?.[0]?.stats}),(0,r.FD)(O,{id:"TheTournamentsOutput",children:[S?(0,r.Y)(c.X,{children:D.map((e,t)=>(0,r.Y)(g,{tournament:e},t))}):D.map((e,t)=>(0,r.Y)(E.B,{tournament:e},t)),(0,r.Y)(s.A,{onChange:e=>{e&&d&&x&&!h&&(F.current&&clearTimeout(F.current),F.current=setTimeout(()=>{A(),F.current=null},200))},wide:!0,children:d?(0,r.Y)("div",{style:{flexBasis:"100%"},children:Array.apply(1,Array(5)).map((e,t)=>(0,r.Y)(K,{fetching:0===t},t))}):0===b?.length?(0,r.Y)(K,{nothing:!0},1):(0,r.Y)(r.FK,{})})]})]})},O=o.I4.div` 95 display: flex; 96 flex-wrap: wrap; 97 width: 100%; 98`,V=o.I4.div` 99 display: flex; 100 justify-content: flex-end; 101 width: 100%; 102 margin-bottom: 8px; 103`,X=o.I4.div` 104 width: 100%; 105 margin-right: auto; 106 margin-left: auto; 107 108 margin-top: 20px; 109 border-radius: 20px; 110 display: flex; 111 flex-wrap: wrap; 112 background-color: var(--theme-palette-color-8); 113 114 border-radius: 6px; 115 padding: 10px; 116 @media only screen and (max-width: 1140px) { 117 max-width: unset; 118 padding: 8px; 119 } 120`}}]);
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.