diff --git a/dist/index.mjs b/dist/index.mjs index e63484f..814c91d 100644 --- a/dist/index.mjs +++ b/dist/index.mjs @@ -1,4 +1,4 @@ -import Re, { useState as ft, useEffect as yt, forwardRef as da, useRef as ma } from "react"; +import Re, { useEffect as ft, useState as pt, forwardRef as da, useRef as ma } from "react"; import { useNavigate as un, useParams as ga } from "react-router-dom"; function Nt(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; @@ -282,7 +282,7 @@ function ba() { } finally { ne = !1, M.current = ye, te(), Error.prepareStackTrace = ce; } - var mt = b ? b.displayName || b.name : "", Kr = mt ? G(mt) : ""; + var gt = b ? b.displayName || b.name : "", Kr = gt ? G(gt) : ""; return typeof b == "function" && X.set(b, Kr), Kr; } function Pe(b, O, L) { @@ -322,7 +322,7 @@ function ba() { return ""; } var Ne = Object.prototype.hasOwnProperty, tt = {}, Ct = w.ReactDebugCurrentFrame; - function ht(b) { + function dt(b) { if (b) { var O = b._owner, L = Ie(b.type, b._source, O ? O.type : null); Ct.setExtraStackFrame(L); @@ -344,7 +344,7 @@ function ba() { } catch (Ee) { ie = Ee; } - ie && !(ie instanceof Error) && (ht(ce), A("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", Q || "React class", L, le, typeof ie), ht(null)), ie instanceof Error && !(ie.message in tt) && (tt[ie.message] = !0, ht(ce), A("Failed %s type: %s", L, ie.message), ht(null)); + ie && !(ie instanceof Error) && (dt(ce), A("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", Q || "React class", L, le, typeof ie), dt(null)), ie instanceof Error && !(ie.message in tt) && (tt[ie.message] = !0, dt(ce), A("Failed %s type: %s", L, ie.message), dt(null)); } } } @@ -471,7 +471,7 @@ function ba() { } } var De = w.ReactCurrentOwner, Hr = w.ReactDebugCurrentFrame; - function dt(b) { + function mt(b) { if (b) { var O = b._owner, L = Ie(b.type, b._source, O ? O.type : null); Hr.setExtraStackFrame(L); @@ -529,7 +529,7 @@ Check the top-level render call using <` + L + ">."); return; Wr[L] = !0; var Q = ""; - b && b._owner && b._owner !== De.current && (Q = " It was passed a child from " + K(b._owner.type) + "."), dt(b), A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', L, Q), dt(null); + b && b._owner && b._owner !== De.current && (Q = " It was passed a child from " + K(b._owner.type) + "."), mt(b), A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', L, Q), mt(null); } } function Gr(b, O) { @@ -581,11 +581,11 @@ Check the top-level render call using <` + L + ">."); for (var O = Object.keys(b.props), L = 0; L < O.length; L++) { var Q = O[L]; if (Q !== "children" && Q !== "key") { - dt(b), A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", Q), dt(null); + mt(b), A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", Q), mt(null); break; } } - b.ref !== null && (dt(b), A("Invalid attribute `ref` supplied to `React.Fragment`."), dt(null)); + b.ref !== null && (mt(b), A("Invalid attribute `ref` supplied to `React.Fragment`."), mt(null)); } } function Jr(b, O, L, Q, ce, ye) { @@ -607,8 +607,8 @@ Check the top-level render call using <` + L + ">."); if (Me !== void 0) if (Q) if (Tt(Me)) { - for (var mt = 0; mt < Me.length; mt++) - Gr(Me[mt], b); + for (var gt = 0; gt < Me.length; gt++) + Gr(Me[gt], b); Object.freeze && Object.freeze(Me); } else A("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); @@ -2097,13 +2097,17 @@ const Is = async (e, n, t, r, i) => { }; function cg({ config: e }) { const n = un(); - return setInterval(function() { - async function t() { - let r = await qo(e.host); - r && r.status === 200 && n("/"); - } + return ft(() => { + const t = async () => { + let i = await qo(e.host); + i && i.status === 200 && n("/"); + }; t(); - }, 5e3), /* @__PURE__ */ P.jsxs("div", { className: "flex flex-col items-center my-8 md:my-12", children: [ + const r = setInterval(async () => { + t(); + }, 1e4); + return () => clearInterval(r); + }, [n]), /* @__PURE__ */ P.jsxs("div", { className: "flex flex-col items-center my-8 md:my-12", children: [ /* @__PURE__ */ P.jsxs("div", { className: "w-full flex flex-col items-center mt-48", children: [ /* @__PURE__ */ P.jsx("p", { className: "font-black text-4xl italic", children: "We'll be right back!" }), /* @__PURE__ */ P.jsxs("p", { className: "mb-1 font-thin", children: [ @@ -2775,7 +2779,6 @@ const ui = [ "proof", "prosy", "proud", - "pubic", "pudgy", "puff", "puffy", @@ -5995,14 +5998,18 @@ const ui = [ 9: "nine" }; function fg({ config: e }) { - const n = un(), [t, r] = ft(`${ui[Math.floor(Math.random() * ui.length)]}-${ci[Math.floor(Math.random() * ci.length)]}-${Math.floor(Math.random() * (99 - 0 + 1) + 0)}`), [i, o] = ft(e.minTeams), [l, a] = ft(e.variants.length > 0 ? e.variants[0] : null); - yt(() => { - async function u() { - let c = await qo(e.host); - (!c || c.status !== 200) && n("/status/down"); - } + const n = un(), [t, r] = pt(`${ui[Math.floor(Math.random() * ui.length)]}-${ci[Math.floor(Math.random() * ci.length)]}-${Math.floor(Math.random() * (99 - 0 + 1) + 0)}`), [i, o] = pt(e.minTeams), [l, a] = pt(e.variants.length > 0 ? e.variants[0] : null); + ft(() => { + const u = async () => { + let f = await qo(e.host); + (!f || f.status !== 200) && n("/status/down"); + }; u(); - }, [history]); + const c = setInterval(async () => { + u(); + }, 1e4); + return () => clearInterval(c); + }, [n]); async function s(u) { u.preventDefault(); let c = await Is(e.host, e.key, t, i, l); @@ -6115,8 +6122,8 @@ function Ms(e) { return Sr({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M464 440l-28.12-32.11c-22.48-25.65-43.33-45.45-72.08-58.7-26.61-12.26-60-18.65-104.27-19.84V432L48 252 259.53 72v103.21c72.88 3 127.18 27.08 161.56 71.75C449.56 284 464 335.19 464 399.26z" } }] })(e); } function $s({ isConn: e }) { - const [n, t] = ft(0); - return yt(() => { + const [n, t] = pt(0); + return ft(() => { e ? setTimeout(() => t((r) => r - 1), 1500) : t(0); }, [e, t]), /* @__PURE__ */ P.jsxs("div", { className: `flex items-center ${e ? "cursor-pointer" : ""}`, children: [ n ? null : /* @__PURE__ */ P.jsx("div", { className: "px-1", children: e ? "connected" : "connecting" }), @@ -6140,10 +6147,10 @@ const pg = da((e, n) => { error: m, setError: p, children: d - } = e, { gameID: g } = ga(), k = un(), [w, A] = ft(!0); - yt(() => { + } = e, { gameID: g } = ga(), k = un(), [w, A] = pt(!0); + ft(() => { c && l && c[l.Name] && localStorage.setItem(g, c[l.Name]); - }, [l, c, g]), yt(() => { + }, [l, c, g]), ft(() => { const v = async (z) => { if (z <= 0) { k("/"); @@ -6184,13 +6191,13 @@ const pg = da((e, n) => { r.current.send(JSON.stringify({ ActionType: "Reset", MoreDetails: { MoreOptions: { Seed: Date.now(), Variant: v } } })); }, E = () => { r.current && (i && c && l && i.Actions && i.Actions.length > 0 && i.Actions[i.Actions.length - 1].Team !== c[l.Name] || r.current.send(JSON.stringify({ ActionType: "Undo" }))); - }, [x, N] = ft(!0); - yt(() => { + }, [x, N] = pt(!0); + ft(() => { const v = () => N(!x); return window.addEventListener("resize", v), (D) => window.removeEventListener("resize", v); }); - const [q, Z] = ft(0); - return yt(() => { + const [q, Z] = pt(0); + return ft(() => { q > 0 && setTimeout(() => Z(q - 1), 1e3); }, [q]), /* @__PURE__ */ P.jsx("div", { className: "min-h-screen flex flex-col items-center p-2 md:p-4 fade-in", children: /* @__PURE__ */ P.jsxs("div", { ref: n, className: `h-full w-full ${t.gamePageMaxWidth} flex flex-col items-center grow`, children: [ /* @__PURE__ */ P.jsxs("div", { className: "flex justify-between items-center relative w-full mb-1 justfy-self-start font-thin text-sm", children: [ @@ -9258,7 +9265,7 @@ function ff(e) { htmlFlowData: D, htmlText: a(Ct, s), htmlTextData: D, - image: a(ht), + image: a(dt), label: s, link: a(Ht), listItem: a(Tt), @@ -9685,7 +9692,7 @@ function ff(e) { value: "" }; } - function ht() { + function dt() { return { type: "image", title: null, @@ -11271,8 +11278,8 @@ qe.prototype.commaOrSpaceSeparated = !1; qe.prototype.mustUseProperty = !1; qe.prototype.defined = !1; let gp = 0; -const re = pt(), Ce = pt(), wl = pt(), R = pt(), be = pt(), kt = pt(), ze = pt(); -function pt() { +const re = ht(), Ce = ht(), wl = ht(), R = ht(), be = ht(), kt = ht(), ze = ht(); +function ht() { return 2 ** ++gp; } const cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ @@ -15257,15 +15264,15 @@ function Xm(e, n) { } function Qt(e, n, t, r, i, o) { const l = r === 1 ? "tableHeader" : r === 2 ? "tableDelimiter" : "tableData", a = "tableContent"; - t[0] !== 0 && (o.end = Object.assign({}, gt(n.events, t[0])), e.add(t[0], 0, [["exit", o, n]])); - const s = gt(n.events, t[1]); + t[0] !== 0 && (o.end = Object.assign({}, yt(n.events, t[0])), e.add(t[0], 0, [["exit", o, n]])); + const s = yt(n.events, t[1]); if (o = { type: l, start: Object.assign({}, s), // Note: correct end is set later. end: Object.assign({}, s) }, e.add(t[1], 0, [["enter", o, n]]), t[2] !== 0) { - const u = gt(n.events, t[2]), c = gt(n.events, t[3]), f = { + const u = yt(n.events, t[2]), c = yt(n.events, t[3]), f = { type: a, start: Object.assign({}, u), end: Object.assign({}, c) @@ -15279,13 +15286,13 @@ function Qt(e, n, t, r, i, o) { } e.add(t[3] + 1, 0, [["exit", f, n]]); } - return i !== void 0 && (o.end = Object.assign({}, gt(n.events, i)), e.add(i, 0, [["exit", o, n]]), o = void 0), o; + return i !== void 0 && (o.end = Object.assign({}, yt(n.events, i)), e.add(i, 0, [["exit", o, n]]), o = void 0), o; } function vo(e, n, t, r, i) { - const o = [], l = gt(n.events, t); + const o = [], l = yt(n.events, t); i && (i.end = Object.assign({}, l), o.push(["exit", i, n])), r.end = Object.assign({}, l), o.push(["exit", r, n]), e.add(t + 1, 0, o); } -function gt(e, n) { +function yt(e, n) { const t = e[n], r = t[0] === "enter" ? "start" : "end"; return t[1][r]; } diff --git a/dist/index.umd.js b/dist/index.umd.js index f6f700f..63d10da 100644 --- a/dist/index.umd.js +++ b/dist/index.umd.js @@ -26,7 +26,7 @@ Check your code at `+O+":"+L+"."}return""}}var ea={};function Um(b){{var O=Zl(); Check the top-level render call using <`+L+">.")}return O}}function ta(b,O){{if(!b._store||b._store.validated||b.key!=null)return;b._store.validated=!0;var L=Um(O);if(ea[L])return;ea[L]=!0;var Q="";b&&b._owner&&b._owner!==Le.current&&(Q=" It was passed a child from "+K(b._owner.type)+"."),vt(b),A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',L,Q),vt(null)}}function na(b,O){{if(typeof b!="object")return;if(Ut(b))for(var L=0;L",ie=" Did you accidentally export a JSX literal instead of a component?"):Se=typeof b,A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Se,ie)}var Ae=qt(b,O,L,pe,be);if(Ae==null)return Ae;if(ae){var He=O.children;if(He!==void 0)if(Q)if(Ut(He)){for(var Et=0;Etn=>{const t=aa.call(n);return e[t]||(e[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Ye=e=>(e=e.toLowerCase(),n=>Vt(n)===e),Wt=e=>n=>typeof n===e,{isArray:ht}=Array,Pt=Wt("undefined");function sa(e){return e!==null&&!Pt(e)&&e.constructor!==null&&!Pt(e.constructor)&&Me(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Wr=Ye("ArrayBuffer");function ua(e){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(e):n=e&&e.buffer&&Wr(e.buffer),n}const ca=Wt("string"),Me=Wt("function"),Yr=Wt("number"),Yt=e=>e!==null&&typeof e=="object",fa=e=>e===!0||e===!1,Gt=e=>{if(Vt(e)!=="object")return!1;const n=vn(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},pa=Ye("Date"),ha=Ye("File"),da=Ye("Blob"),ma=Ye("FileList"),ga=e=>Yt(e)&&Me(e.pipe),ya=e=>{let n;return e&&(typeof FormData=="function"&&e instanceof FormData||Me(e.append)&&((n=Vt(e))==="formdata"||n==="object"&&Me(e.toString)&&e.toString()==="[object FormData]"))},ba=Ye("URLSearchParams"),ka=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ot(e,n,{allOwnKeys:t=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),ht(e))for(r=0,i=e.length;r0;)if(i=t[r],n===i.toLowerCase())return i;return null}const Jr=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Kr=e=>!Pt(e)&&e!==Jr;function En(){const{caseless:e}=Kr(this)&&this||{},n={},t=(r,i)=>{const o=e&&Gr(n,i)||i;Gt(n[o])&&Gt(r)?n[o]=En(n[o],r):Gt(r)?n[o]=En({},r):ht(r)?n[o]=r.slice():n[o]=r};for(let r=0,i=arguments.length;r(Ot(n,(i,o)=>{t&&Me(i)?e[o]=Vr(i,t):e[o]=i},{allOwnKeys:r}),e),xa=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),va=(e,n,t,r)=>{e.prototype=Object.create(n.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:n.prototype}),t&&Object.assign(e.prototype,t)},Ea=(e,n,t,r)=>{let i,o,l;const a={};if(n=n||{},e==null)return n;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)l=i[o],(!r||r(l,e,n))&&!a[l]&&(n[l]=e[l],a[l]=!0);e=t!==!1&&vn(e)}while(e&&(!t||t(e,n))&&e!==Object.prototype);return n},Sa=(e,n,t)=>{e=String(e),(t===void 0||t>e.length)&&(t=e.length),t-=n.length;const r=e.indexOf(n,t);return r!==-1&&r===t},Ca=e=>{if(!e)return null;if(ht(e))return e;let n=e.length;if(!Yr(n))return null;const t=new Array(n);for(;n-- >0;)t[n]=e[n];return t},Ta=(e=>n=>e&&n instanceof e)(typeof Uint8Array<"u"&&vn(Uint8Array)),Aa=(e,n)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;n.call(e,o[0],o[1])}},Pa=(e,n)=>{let t;const r=[];for(;(t=e.exec(n))!==null;)r.push(t);return r},Oa=Ye("HTMLFormElement"),Ra=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,i){return r.toUpperCase()+i}),Xr=(({hasOwnProperty:e})=>(n,t)=>e.call(n,t))(Object.prototype),Fa=Ye("RegExp"),Qr=(e,n)=>{const t=Object.getOwnPropertyDescriptors(e),r={};Ot(t,(i,o)=>{let l;(l=n(i,o,e))!==!1&&(r[o]=l||i)}),Object.defineProperties(e,r)},_a=e=>{Qr(e,(n,t)=>{if(Me(e)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=e[t];if(Me(r)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},Ia=(e,n)=>{const t={},r=i=>{i.forEach(o=>{t[o]=!0})};return ht(e)?r(e):r(String(e).split(n)),t},ja=()=>{},Da=(e,n)=>(e=+e,Number.isFinite(e)?e:n),Sn="abcdefghijklmnopqrstuvwxyz",Zr="0123456789",ei={DIGIT:Zr,ALPHA:Sn,ALPHA_DIGIT:Sn+Sn.toUpperCase()+Zr},za=(e=16,n=ei.ALPHA_DIGIT)=>{let t="";const{length:r}=n;for(;e--;)t+=n[Math.random()*r|0];return t};function La(e){return!!(e&&Me(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Na=e=>{const n=new Array(10),t=(r,i)=>{if(Yt(r)){if(n.indexOf(r)>=0)return;if(!("toJSON"in r)){n[i]=r;const o=ht(r)?[]:{};return Ot(r,(l,a)=>{const s=t(l,i+1);!Pt(s)&&(o[a]=s)}),n[i]=void 0,o}}return r};return t(e,0)},Ma=Ye("AsyncFunction"),T={isArray:ht,isArrayBuffer:Wr,isBuffer:sa,isFormData:ya,isArrayBufferView:ua,isString:ca,isNumber:Yr,isBoolean:fa,isObject:Yt,isPlainObject:Gt,isUndefined:Pt,isDate:pa,isFile:ha,isBlob:da,isRegExp:Fa,isFunction:Me,isStream:ga,isURLSearchParams:ba,isTypedArray:Ta,isFileList:ma,forEach:Ot,merge:En,extend:wa,trim:ka,stripBOM:xa,inherits:va,toFlatObject:Ea,kindOf:Vt,kindOfTest:Ye,endsWith:Sa,toArray:Ca,forEachEntry:Aa,matchAll:Pa,isHTMLForm:Oa,hasOwnProperty:Xr,hasOwnProp:Xr,reduceDescriptors:Qr,freezeMethods:_a,toObjectSet:Ia,toCamelCase:Ra,noop:ja,toFiniteNumber:Da,findKey:Gr,global:Jr,isContextDefined:Kr,ALPHABET:ei,generateString:za,isSpecCompliantForm:La,toJSONObject:Na,isAsyncFn:Ma,isThenable:e=>e&&(Yt(e)||Me(e))&&Me(e.then)&&Me(e.catch)};function se(e,n,t,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",n&&(this.code=n),t&&(this.config=t),r&&(this.request=r),i&&(this.response=i)}T.inherits(se,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:T.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ti=se.prototype,ni={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{ni[e]={value:e}}),Object.defineProperties(se,ni),Object.defineProperty(ti,"isAxiosError",{value:!0}),se.from=(e,n,t,r,i,o)=>{const l=Object.create(ti);return T.toFlatObject(e,l,function(s){return s!==Error.prototype},a=>a!=="isAxiosError"),se.call(l,e.message,n,t,r,i),l.cause=e,l.name=e.name,o&&Object.assign(l,o),l};const $a=null;function Cn(e){return T.isPlainObject(e)||T.isArray(e)}function ri(e){return T.endsWith(e,"[]")?e.slice(0,-2):e}function ii(e,n,t){return e?e.concat(n).map(function(i,o){return i=ri(i),!t&&o?"["+i+"]":i}).join(t?".":""):n}function Ba(e){return T.isArray(e)&&!e.some(Cn)}const Ua=T.toFlatObject(T,{},null,function(n){return/^is[A-Z]/.test(n)});function Jt(e,n,t){if(!T.isObject(e))throw new TypeError("target must be an object");n=n||new FormData,t=T.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,k){return!T.isUndefined(k[g])});const r=t.metaTokens,i=t.visitor||c,o=t.dots,l=t.indexes,s=(t.Blob||typeof Blob<"u"&&Blob)&&T.isSpecCompliantForm(n);if(!T.isFunction(i))throw new TypeError("visitor must be a function");function u(d){if(d===null)return"";if(T.isDate(d))return d.toISOString();if(!s&&T.isBlob(d))throw new se("Blob is not supported. Use a Buffer instead.");return T.isArrayBuffer(d)||T.isTypedArray(d)?s&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function c(d,g,k){let w=d;if(d&&!k&&typeof d=="object"){if(T.endsWith(g,"{}"))g=r?g:g.slice(0,-2),d=JSON.stringify(d);else if(T.isArray(d)&&Ba(d)||(T.isFileList(d)||T.endsWith(g,"[]"))&&(w=T.toArray(d)))return g=ri(g),w.forEach(function(C,I){!(T.isUndefined(C)||C===null)&&n.append(l===!0?ii([g],I,o):l===null?g:g+"[]",u(C))}),!1}return Cn(d)?!0:(n.append(ii(k,g,o),u(d)),!1)}const f=[],m=Object.assign(Ua,{defaultVisitor:c,convertValue:u,isVisitable:Cn});function p(d,g){if(!T.isUndefined(d)){if(f.indexOf(d)!==-1)throw Error("Circular reference detected in "+g.join("."));f.push(d),T.forEach(d,function(w,A){(!(T.isUndefined(w)||w===null)&&i.call(n,w,T.isString(A)?A.trim():A,g,m))===!0&&p(w,g?g.concat(A):[A])}),f.pop()}}if(!T.isObject(e))throw new TypeError("data must be an object");return p(e),n}function oi(e){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return n[r]})}function Tn(e,n){this._pairs=[],e&&Jt(e,this,n)}const li=Tn.prototype;li.append=function(n,t){this._pairs.push([n,t])},li.toString=function(n){const t=n?function(r){return n.call(this,r,oi)}:oi;return this._pairs.map(function(i){return t(i[0])+"="+t(i[1])},"").join("&")};function qa(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ai(e,n,t){if(!n)return e;const r=t&&t.encode||qa,i=t&&t.serialize;let o;if(i?o=i(n,t):o=T.isURLSearchParams(n)?n.toString():new Tn(n,t).toString(r),o){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Ha{constructor(){this.handlers=[]}use(n,t,r){return this.handlers.push({fulfilled:n,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){T.forEach(this.handlers,function(r){r!==null&&n(r)})}}const si=Ha,ui={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Va=typeof URLSearchParams<"u"?URLSearchParams:Tn,Wa=typeof FormData<"u"?FormData:null,Ya=typeof Blob<"u"?Blob:null,Ga=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),Ja=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Ve={isBrowser:!0,classes:{URLSearchParams:Va,FormData:Wa,Blob:Ya},isStandardBrowserEnv:Ga,isStandardBrowserWebWorkerEnv:Ja,protocols:["http","https","file","blob","url","data"]};function Ka(e,n){return Jt(e,new Ve.classes.URLSearchParams,Object.assign({visitor:function(t,r,i,o){return Ve.isNode&&T.isBuffer(t)?(this.append(r,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},n))}function Xa(e){return T.matchAll(/\w+|\[(\w*)]/g,e).map(n=>n[0]==="[]"?"":n[1]||n[0])}function Qa(e){const n={},t=Object.keys(e);let r;const i=t.length;let o;for(r=0;r=t.length;return l=!l&&T.isArray(i)?i.length:l,s?(T.hasOwnProp(i,l)?i[l]=[i[l],r]:i[l]=r,!a):((!i[l]||!T.isObject(i[l]))&&(i[l]=[]),n(t,r,i[l],o)&&T.isArray(i[l])&&(i[l]=Qa(i[l])),!a)}if(T.isFormData(e)&&T.isFunction(e.entries)){const t={};return T.forEachEntry(e,(r,i)=>{n(Xa(r),i,t,0)}),t}return null}function Za(e,n,t){if(T.isString(e))try{return(n||JSON.parse)(e),T.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(e)}const An={transitional:ui,adapter:Ve.isNode?"http":"xhr",transformRequest:[function(n,t){const r=t.getContentType()||"",i=r.indexOf("application/json")>-1,o=T.isObject(n);if(o&&T.isHTMLForm(n)&&(n=new FormData(n)),T.isFormData(n))return i&&i?JSON.stringify(ci(n)):n;if(T.isArrayBuffer(n)||T.isBuffer(n)||T.isStream(n)||T.isFile(n)||T.isBlob(n))return n;if(T.isArrayBufferView(n))return n.buffer;if(T.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Ka(n,this.formSerializer).toString();if((a=T.isFileList(n))||r.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return Jt(a?{"files[]":n}:n,s&&new s,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),Za(n)):n}],transformResponse:[function(n){const t=this.transitional||An.transitional,r=t&&t.forcedJSONParsing,i=this.responseType==="json";if(n&&T.isString(n)&&(r&&!this.responseType||i)){const l=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(n)}catch(a){if(l)throw a.name==="SyntaxError"?se.from(a,se.ERR_BAD_RESPONSE,this,null,this.response):a}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ve.classes.FormData,Blob:Ve.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};T.forEach(["delete","get","head","post","put","patch"],e=>{An.headers[e]={}});const Pn=An,es=T.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ts=e=>{const n={};let t,r,i;return e&&e.split(` `).forEach(function(l){i=l.indexOf(":"),t=l.substring(0,i).trim().toLowerCase(),r=l.substring(i+1).trim(),!(!t||n[t]&&es[t])&&(t==="set-cookie"?n[t]?n[t].push(r):n[t]=[r]:n[t]=n[t]?n[t]+", "+r:r)}),n},fi=Symbol("internals");function Rt(e){return e&&String(e).trim().toLowerCase()}function Kt(e){return e===!1||e==null?e:T.isArray(e)?e.map(Kt):String(e)}function ns(e){const n=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(e);)n[r[1]]=r[2];return n}const rs=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function On(e,n,t,r,i){if(T.isFunction(r))return r.call(this,n,t);if(i&&(n=t),!!T.isString(n)){if(T.isString(r))return n.indexOf(r)!==-1;if(T.isRegExp(r))return r.test(n)}}function is(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,t,r)=>t.toUpperCase()+r)}function os(e,n){const t=T.toCamelCase(" "+n);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+t,{value:function(i,o,l){return this[r].call(this,n,i,o,l)},configurable:!0})})}class Xt{constructor(n){n&&this.set(n)}set(n,t,r){const i=this;function o(a,s,u){const c=Rt(s);if(!c)throw new Error("header name must be a non-empty string");const f=T.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||s]=Kt(a))}const l=(a,s)=>T.forEach(a,(u,c)=>o(u,c,s));return T.isPlainObject(n)||n instanceof this.constructor?l(n,t):T.isString(n)&&(n=n.trim())&&!rs(n)?l(ts(n),t):n!=null&&o(t,n,r),this}get(n,t){if(n=Rt(n),n){const r=T.findKey(this,n);if(r){const i=this[r];if(!t)return i;if(t===!0)return ns(i);if(T.isFunction(t))return t.call(this,i,r);if(T.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,t){if(n=Rt(n),n){const r=T.findKey(this,n);return!!(r&&this[r]!==void 0&&(!t||On(this,this[r],r,t)))}return!1}delete(n,t){const r=this;let i=!1;function o(l){if(l=Rt(l),l){const a=T.findKey(r,l);a&&(!t||On(r,r[a],a,t))&&(delete r[a],i=!0)}}return T.isArray(n)?n.forEach(o):o(n),i}clear(n){const t=Object.keys(this);let r=t.length,i=!1;for(;r--;){const o=t[r];(!n||On(this,this[o],o,n,!0))&&(delete this[o],i=!0)}return i}normalize(n){const t=this,r={};return T.forEach(this,(i,o)=>{const l=T.findKey(r,o);if(l){t[l]=Kt(i),delete t[o];return}const a=n?is(o):String(o).trim();a!==o&&delete t[o],t[a]=Kt(i),r[a]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const t=Object.create(null);return T.forEach(this,(r,i)=>{r!=null&&r!==!1&&(t[i]=n&&T.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,t])=>n+": "+t).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...t){const r=new this(n);return t.forEach(i=>r.set(i)),r}static accessor(n){const r=(this[fi]=this[fi]={accessors:{}}).accessors,i=this.prototype;function o(l){const a=Rt(l);r[a]||(os(i,l),r[a]=!0)}return T.isArray(n)?n.forEach(o):o(n),this}}Xt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),T.reduceDescriptors(Xt.prototype,({value:e},n)=>{let t=n[0].toUpperCase()+n.slice(1);return{get:()=>e,set(r){this[t]=r}}}),T.freezeMethods(Xt);const Ze=Xt;function Rn(e,n){const t=this||Pn,r=n||t,i=Ze.from(r.headers);let o=r.data;return T.forEach(e,function(a){o=a.call(t,o,i.normalize(),n?n.status:void 0)}),i.normalize(),o}function pi(e){return!!(e&&e.__CANCEL__)}function Ft(e,n,t){se.call(this,e??"canceled",se.ERR_CANCELED,n,t),this.name="CanceledError"}T.inherits(Ft,se,{__CANCEL__:!0});function ls(e,n,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?e(t):n(new se("Request failed with status code "+t.status,[se.ERR_BAD_REQUEST,se.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}const as=Ve.isStandardBrowserEnv?function(){return{write:function(t,r,i,o,l,a){const s=[];s.push(t+"="+encodeURIComponent(r)),T.isNumber(i)&&s.push("expires="+new Date(i).toGMTString()),T.isString(o)&&s.push("path="+o),T.isString(l)&&s.push("domain="+l),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){const r=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function ss(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function us(e,n){return n?e.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):e}function hi(e,n){return e&&!ss(n)?us(e,n):n}const cs=Ve.isStandardBrowserEnv?function(){const n=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function i(o){let l=o;return n&&(t.setAttribute("href",l),l=t.href),t.setAttribute("href",l),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return r=i(window.location.href),function(l){const a=T.isString(l)?i(l):l;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function fs(e){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return n&&n[1]||""}function ps(e,n){e=e||10;const t=new Array(e),r=new Array(e);let i=0,o=0,l;return n=n!==void 0?n:1e3,function(s){const u=Date.now(),c=r[o];l||(l=u),t[i]=s,r[i]=u;let f=o,m=0;for(;f!==i;)m+=t[f++],f=f%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),u-l{const o=i.loaded,l=i.lengthComputable?i.total:void 0,a=o-t,s=r(a),u=o<=l;t=o;const c={loaded:o,total:l,progress:l?o/l:void 0,bytes:a,rate:s||void 0,estimated:s&&l&&u?(l-o)/s:void 0,event:i};c[n?"download":"upload"]=!0,e(c)}}const Qt={http:$a,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(t,r){let i=e.data;const o=Ze.from(e.headers).normalize(),l=e.responseType;let a;function s(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}T.isFormData(i)&&(Ve.isStandardBrowserEnv||Ve.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let u=new XMLHttpRequest;if(e.auth){const p=e.auth.username||"",d=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(p+":"+d))}const c=hi(e.baseURL,e.url);u.open(e.method.toUpperCase(),ai(c,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function f(){if(!u)return;const p=Ze.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),g={data:!l||l==="text"||l==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:p,config:e,request:u};ls(function(w){t(w),s()},function(w){r(w),s()},g),u=null}if("onloadend"in u?u.onloadend=f:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(f)},u.onabort=function(){u&&(r(new se("Request aborted",se.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new se("Network Error",se.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let d=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const g=e.transitional||ui;e.timeoutErrorMessage&&(d=e.timeoutErrorMessage),r(new se(d,g.clarifyTimeoutError?se.ETIMEDOUT:se.ECONNABORTED,e,u)),u=null},Ve.isStandardBrowserEnv){const p=(e.withCredentials||cs(c))&&e.xsrfCookieName&&as.read(e.xsrfCookieName);p&&o.set(e.xsrfHeaderName,p)}i===void 0&&o.setContentType(null),"setRequestHeader"in u&&T.forEach(o.toJSON(),function(d,g){u.setRequestHeader(g,d)}),T.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),l&&l!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",di(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",di(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=p=>{u&&(r(!p||p.type?new Ft(null,e,u):p),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const m=fs(c);if(m&&Ve.protocols.indexOf(m)===-1){r(new se("Unsupported protocol "+m+":",se.ERR_BAD_REQUEST,e));return}u.send(i||null)})}};T.forEach(Qt,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{value:n})}catch{}Object.defineProperty(e,"adapterName",{value:n})}});const mi={getAdapter:e=>{e=T.isArray(e)?e:[e];const{length:n}=e;let t,r;for(let i=0;ie instanceof Ze?e.toJSON():e;function dt(e,n){n=n||{};const t={};function r(u,c,f){return T.isPlainObject(u)&&T.isPlainObject(c)?T.merge.call({caseless:f},u,c):T.isPlainObject(c)?T.merge({},c):T.isArray(c)?c.slice():c}function i(u,c,f){if(T.isUndefined(c)){if(!T.isUndefined(u))return r(void 0,u,f)}else return r(u,c,f)}function o(u,c){if(!T.isUndefined(c))return r(void 0,c)}function l(u,c){if(T.isUndefined(c)){if(!T.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,f){if(f in n)return r(u,c);if(f in e)return r(void 0,u)}const s={url:o,method:o,data:o,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:a,headers:(u,c)=>i(yi(u),yi(c),!0)};return T.forEach(Object.keys(Object.assign({},e,n)),function(c){const f=s[c]||i,m=f(e[c],n[c],c);T.isUndefined(m)&&f!==a||(t[c]=m)}),t}const bi="1.5.0",_n={};["object","boolean","number","function","string","symbol"].forEach((e,n)=>{_n[e]=function(r){return typeof r===e||"a"+(n<1?"n ":" ")+e}});const ki={};_n.transitional=function(n,t,r){function i(o,l){return"[Axios v"+bi+"] Transitional option '"+o+"'"+l+(r?". "+r:"")}return(o,l,a)=>{if(n===!1)throw new se(i(l," has been removed"+(t?" in "+t:"")),se.ERR_DEPRECATED);return t&&!ki[l]&&(ki[l]=!0,console.warn(i(l," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(o,l,a):!0}};function hs(e,n,t){if(typeof e!="object")throw new se("options must be an object",se.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],l=n[o];if(l){const a=e[o],s=a===void 0||l(a,o,e);if(s!==!0)throw new se("option "+o+" must be "+s,se.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new se("Unknown option "+o,se.ERR_BAD_OPTION)}}const In={assertOptions:hs,validators:_n},nt=In.validators;class Zt{constructor(n){this.defaults=n,this.interceptors={request:new si,response:new si}}request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=dt(this.defaults,t);const{transitional:r,paramsSerializer:i,headers:o}=t;r!==void 0&&In.assertOptions(r,{silentJSONParsing:nt.transitional(nt.boolean),forcedJSONParsing:nt.transitional(nt.boolean),clarifyTimeoutError:nt.transitional(nt.boolean)},!1),i!=null&&(T.isFunction(i)?t.paramsSerializer={serialize:i}:In.assertOptions(i,{encode:nt.function,serialize:nt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let l=o&&T.merge(o.common,o[t.method]);o&&T.forEach(["delete","get","head","post","put","patch","common"],d=>{delete o[d]}),t.headers=Ze.concat(l,o);const a=[];let s=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(t)===!1||(s=s&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,f=0,m;if(!s){const d=[gi.bind(this),void 0];for(d.unshift.apply(d,a),d.push.apply(d,u),m=d.length,c=Promise.resolve(t);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const l=new Promise(a=>{r.subscribe(a),o=a}).then(i);return l.cancel=function(){r.unsubscribe(o)},l},n(function(o,l,a){r.reason||(r.reason=new Ft(o,l,a),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const t=this._listeners.indexOf(n);t!==-1&&this._listeners.splice(t,1)}static source(){let n;return{token:new jn(function(i){n=i}),cancel:n}}}const ds=jn;function ms(e){return function(t){return e.apply(null,t)}}function gs(e){return T.isObject(e)&&e.isAxiosError===!0}const Dn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Dn).forEach(([e,n])=>{Dn[n]=e});const ys=Dn;function wi(e){const n=new en(e),t=Vr(en.prototype.request,n);return T.extend(t,en.prototype,n,{allOwnKeys:!0}),T.extend(t,n,null,{allOwnKeys:!0}),t.create=function(i){return wi(dt(e,i))},t}const Ce=wi(Pn);Ce.Axios=en,Ce.CanceledError=Ft,Ce.CancelToken=ds,Ce.isCancel=pi,Ce.VERSION=bi,Ce.toFormData=Jt,Ce.AxiosError=se,Ce.Cancel=Ce.CanceledError,Ce.all=function(n){return Promise.all(n)},Ce.spread=ms,Ce.isAxiosError=gs,Ce.mergeConfig=dt,Ce.AxiosHeaders=Ze,Ce.formToJSON=e=>ci(T.isHTMLForm(e)?new FormData(e):e),Ce.getAdapter=mi.getAdapter,Ce.HttpStatusCode=ys,Ce.default=Ce;const tn=Ce;tn.defaults.withCredentials=!0;const bs=async(e,n,t,r,i)=>{let o={method:"POST",url:`${e}/game/create`,headers:{"Content-Type":"application/json"},data:JSON.stringify({GameKey:n,GameID:t,Teams:r,TurnLength:null,MoreOptions:{Seed:Date.now(),Variant:i}})};return tn(o).catch(l=>l.response).then(l=>l.status)},ks=async(e,n,t)=>{let r={method:"GET",url:`${e}/game/snapshot?GameKey=${n}&GameID=${t}`};return tn(r).catch(i=>i.response)},xi=async e=>{let n={method:"GET",url:`${e}/health`};return tn(n).catch(t=>t.response)};function ws({config:e}){const n=St.useNavigate();return setInterval(function(){async function t(){let r=await xi(e.host);r&&r.status===200&&n("/")}t()},5e3),P.jsxs("div",{className:"flex flex-col items-center my-8 md:my-12",children:[P.jsxs("div",{className:"w-full flex flex-col items-center mt-48",children:[P.jsx("p",{className:"font-black text-4xl italic",children:"We'll be right back!"}),P.jsxs("p",{className:"mb-1 font-thin",children:[P.jsx("span",{className:`text-3xl font-black font-['${e.font}'] text-${e.color} mr-1`,children:e.key})," is down for maintenance"]})]}),P.jsx("div",{className:"absolute bottom-8 md:bottom-12",children:P.jsx(Ht,{})})]})}const vi=["able","about","above","abuzz","ace","achy","acid","acned","acute","adept","adult","afire","afoot","afoul","aft","after","aged","agile","aging","aglow","ago","ahead","aided","airy","ajar","akin","alert","alien","alike","alive","alone","aloof","alpha","alto","amber","ample","angry","anti","antic","antsy","any","apart","apish","apt","arced","arch","arid","ashen","ashy","askew","astir","atrip","attic","avian","avid","awake","aware","awash","away","awed","awful","awing","awned","awry","axial","azure","back","bad","baggy","bald","balmy","bandy","bare","bared","basal","base","based","basic","bated","bats","batty","bay","beady","beamy","beat","beefy","beery","beige","bent","best","beta","bias","birch","bitty","black","blame","bland","blank","bleak","blear","blind","blond","blown","blue","bluff","blunt","boggy","bogus","bold","bone","boned","bonny","bony","boon","boozy","bored","born","boss","bossy","both","bound","bowed","boxed","boxy","brag","brash","brave","brief","briny","brisk","broad","broke","brown","brute","buff","buggy","built","bulgy","bulky","bully","bum","bumpy","burly","burnt","bush","bushy","bust","busty","busy","butch","calm","camp","campy","catty","cheap","chewy","chic","chief","civic","civil","clean","clear","cleft","close","cocky","cod","cold","color","comfy","comic","cool","coral","corny","cosy","coy","cozy","crazy","crisp","cross","cubic","cured","curly","curt","curvy","cushy","cut","cute","cyan","daft","daily","damp","dandy","dank","dark","dated","dazed","deaf","dear","deep","deft","deist","dense","dewy","dicey","dim","dingy","dinky","dire","dirty","dodgy","domed","done","dopey","dopy","dormy","down","downy","dozen","drab","drawn","dread","drear","dress","dried","droll","dry","dual","dud","due","dull","dumb","dummy","dusky","dusty","dyed","dying","each","eager","early","eased","east","easy","edged","edgy","eerie","eight","elder","elect","elfin","elite","empty","ended","epic","equal","even","every","evil","exact","extra","eyed","fab","faced","faded","faint","fair","fake","false","famed","fancy","far","fast","fat","fatal","fated","fazed","feral","few","fewer","fiery","fifth","fifty","filmy","final","fine","finer","fired","firm","first","fishy","fit","five","fixed","fizzy","flaky","flash","flat","fleet","flint","flip","fluid","flush","fly","foamy","focal","foggy","fond","fore","foul","found","four","foxy","frail","frank","free","fresh","fried","front","full","fumed","funky","funny","furry","fused","fussy","fuzzy","game","gaudy","gaunt","gawky","giant","giddy","gimpy","glad","glum","godly","going","gold","gone","good","gooey","goofy","grand","great","green","grey","grim","grimy","gross","grown","gruff","gummy","gushy","gusty","gutsy","hairy","hale","half","halt","hammy","handy","happy","hard","hardy","harsh","hasty","hazel","hazy","heard","heavy","hefty","held","here","hex","hexed","high","hilly","hind","hip","hired","hoar","hoary","hokey","holey","holy","home","homey","honey","horny","hot","huffy","huge","human","humid","hurt","husky","icky","icy","ideal","idle","iffy","ill","inert","inky","inner","ionic","irate","iron","jade","jaded","jaggy","jawed","jazzy","jet","joint","jolly","jowly","juicy","jumbo","jumpy","just","kempt","key","keyed","khaki","kin","kind","kinky","known","kooky","laced","lacy","laid","lame","lank","lanky","large","last","late","later","lax","lay","lazy","leafy","leaky","lean","least","left","legal","less","level","light","like","liked","limp","lined","lit","live","liver","livid","loamy","local","loco","lofty","lone","long","loony","loopy","loose","lossy","lost","loud","lousy","loved","low","lowly","loyal","lucid","lucky","lumpy","lunar","lurid","lush","lusty","lyric","macho","macro","mad","made","magic","main","major","male","mangy","manic","manly","many","mass","matt","matte","mauve","mealy","mean","meaty","meek","meet","mere","merry","messy","metal","micro","mild","milky","mimic","mined","mini","minor","mint","minty","minus","mired","mirky","misty","mixed","mock","mod","modal","model","moist","molar","moldy","mono","moody","moony","moot","moral","more","mossy","most","mothy","motor","mousy","moved","mown","much","mucky","muddy","muggy","mum","mural","murky","mushy","musky","must","musty","mute","muted","naive","nary","nasal","nasty","natal","natty","naval","near","neat","needy","nervy","new","newsy","next","nice","nifty","nigh","nine","ninth","noble","noisy","none","north","nosed","noted","novel","nubby","numb","nuts","nutty","oaken","oaten","obese","odd","oiled","oily","okay","old","olden","older","olive","one","only","oozy","open","optic","oral","other","out","outer","oval","over","overt","owing","own","owned","pagan","paid","pale","palmy","pass","past","pasty","pat","paved","peaky","peaty","pedal","pent","peppy","perky","pert","pesky","pet","petty","phony","piano","picky","pied","piggy","pilar","pink","plain","plane","plumb","plump","plus","plush","polar","poor","pop","port","posed","posh","potty","pricy","prim","prior","privy","prize","prone","proof","prosy","proud","pubic","pudgy","puff","puffy","pulpy","punk","puny","pupal","pure","pushy","quack","quasi","quick","quiet","rabid","radio","rainy","rapid","rare","rash","raspy","ratty","raw","ready","real","rear","red","regal","retro","rich","rife","right","rigid","riled","ripe","risen","risky","ritzy","roast","robed","rocky","roomy","ropey","rose","rosy","rough","round","rowdy","royal","ruby","rude","ruled","rum","rummy","runic","runny","runty","rural","rush","rushy","rust","rusty","rutty","sad","safe","sage","said","salt","salty","same","sandy","sane","sappy","sassy","saute","saved","scaly","scant","scary","scrub","seamy","sear","seedy","self","sent","seven","sewed","sewn","shady","shaky","sham","sharp","shed","sheer","shiny","short","shot","showy","shut","shy","sick","side","sign","silky","silly","silty","sissy","six","sixth","sixty","size","sized","skew","skim","slack","slain","slaty","slav","sleek","slick","slim","slimy","slow","sly","small","smart","smoky","smug","snaky","sneak","snide","snowy","snub","snuff","snug","soapy","sober","soft","soggy","solar","sold","sole","solid","solo","some","sooty","sore","sorry","sound","soupy","sour","south","sown","spare","spent","spicy","spiky","spiny","splay","split","spry","spumy","squab","squat","stagy","stale","star","stark","steep","stern","stiff","still","stock","stone","stony","stout","straw","stray","stuck","stung","suave","such","sudsy","sulky","sunk","sunny","super","sure","surly","sweet","swell","swept","swift","swish","sworn","tabby","taboo","tacky","taken","talky","tall","tame","tamed","tan","tangy","taped","tardy","tart","tasty","tawny","teal","ten","tenor","tense","tenth","tepid","terse","testy","thick","thin","third","three","tidal","tidy","tied","tight","tiled","timed","timid","tinny","tiny","tipsy","tired","toed","token","tonal","toned","tonic","top","tops","torn","total","tough","toxic","tried","trig","trim","trite","true","tubby","tubed","tumid","twee","twin","two","ugly","ultra","uncut","under","undue","unfed","unfit","union","unlit","unwed","upper","upset","urban","used","usual","utter","vague","vain","valid","vapid","vast","viral","vital","vivid","vocal","void","wacky","warm","wary","washy","waste","wavy","waxed","waxen","waxy","weak","weary","weedy","weeny","weepy","weird","well","welsh","west","wet","whiny","white","whole","wide","wild","wily","wimpy","windy","wired","wiry","wise","wispy","witty","wonky","woody","wooly","woozy","wordy","wormy","worn","worse","worst","worth","wound","woven","wrong","wroth","wry","young","yucky","yummy","zany","zero","zesty","zippy","zonal"],Ei=["ace","ache","acid","acme","acorn","acre","act","actor","add","adder","adept","advil","afro","agave","age","aged","agent","agony","ailey","aim","aioli","air","aisle","akron","alarm","album","ale","alert","algae","alias","alibi","alien","alley","alloy","ally","aloe","alpha","alps","altar","amber","amigo","amino","amish","ammo","amp","angel","anger","angle","angst","angus","anime","ankle","annex","anole","ant","ante","antic","anvil","ape","apex","aphid","apple","april","apron","aqua","arbor","arc","arch","area","arena","argon","argus","ark","arm","armor","arms","army","aroma","array","arrow","arson","art","ascot","aspen","asset","ate","atom","attic","audio","audit","auger","aunt","aunty","aura","auto","award","awe","awl","axe","axiom","axis","axle","azure","baby","back","bacon","badge","bag","bagel","bail","bait","baker","bale","balk","ball","balm","ban","band","bane","banjo","bank","banks","bar","barb","bard","barge","bark","barn","baron","bars","base","bash","basic","basil","basin","basis","bass","bat","batch","bath","baton","bay","bayou","beach","bead","beads","beak","beam","bean","bear","beard","beast","beat","beats","bed","bee","beech","beef","beep","beer","beet","begin","beige","being","belch","bell","belly","belt","bench","bend","bends","bent","beret","berry","bet","beta","bevel","bevy","bias","bib","bible","bid","bidet","bike","biker","bill","bin","bind","bingo","biome","biped","birch","bird","birth","bison","bit","bite","biter","black","blade","blame","blank","blast","blaze","blend","blimp","blind","bling","blink","blip","bliss","blitz","bloat","blob","block","blog","bloke","blond","blood","bloom","blow","blue","blues","bluff","blur","blurb","blush","boa","boar","board","boast","boat","bod","body","bog","bogey","boil","bold","bolt","bomb","bond","bone","boner","bones","bong","bongo","bonus","boo","book","boom","boon","boost","boot","booth","booty","booze","bore","borer","born","boss","bot","botch","bound","bow","bowel","bowl","bowls","box","boxer","boy","bra","brace","brag","braid","brail","brain","brake","bran","brand","brass","brat","brave","bravo","brawl","brawn","bread","break","breed","brew","briar","bribe","brick","bride","brie","brief","brim","brine","brink","brit","brits","britt","broad","broil","brood","brook","broom","broth","brow","brown","brunt","brush","brute","buck","bud","buddy","budge","buff","bug","buggy","bugle","build","bulb","bulge","bulk","bull","bully","bum","bump","bun","bunch","bung","bunk","bunny","buns","bunt","buoy","bur","burn","burns","burp","burst","bus","bush","bust","buy","buyer","buzz","bye","bylaw","byte","cab","cabin","cable","cabot","cache","caddy","cadet","cafe","cage","cager","cake","calf","call","calm","cam","camel","camp","can","canal","candy","cane","cap","cape","caper","car","carat","card","cards","care","caret","cargo","carp","carry","cart","case","cash","cask","cast","caste","cat","catch","caulk","cause","cave","cavil","caw","cease","cedar","cell","cello","cent","chaff","chain","chair","chalk","champ","chant","chaos","chap","chard","charm","chart","chase","chasm","chat","cheat","check","cheek","cheep","cheer","chef","chess","chest","chew","chic","chick","chief","child","chill","chime","chimp","chin","chip","chips","chirp","chit","chive","chock","choir","choke","choky","chomp","chop","chord","chore","chow","chuck","chug","chum","chump","chunk","churn","chute","cider","cigar","cinch","cite","city","clack","claim","clam","clamp","clams","clan","clang","clank","clap","clash","clasp","class","clay","clean","clear","cleat","cleft","clerk","click","cliff","climb","cling","clip","cloak","clock","clog","clone","close","clot","cloth","cloud","clout","clove","clown","club","cluck","clue","clump","clunk","coach","coal","coast","coat","cobra","cocoa","cod","code","cog","coil","coin","coke","cola","cold","colon","color","colt","coma","comb","combo","come","comet","comic","comma","conch","condo","cone","coney","conk","cook","cool","coot","cop","cope","copy","coral","cord","cords","core","cork","corn","corp","corps","cost","costs","cosy","cot","couch","cough","count","court","cove","coven","cover","cow","cowl","cows","cozy","crab","crabs","crack","craft","cramp","crane","crank","crash","crate","crawl","craze","crazy","creak","cream","cred","cree","creed","creek","creep","crepe","cress","crest","crew","crib","crime","crimp","crisp","croak","crock","crook","crop","cross","crow","crowd","crown","crud","crude","crumb","crush","crust","crux","cry","crypt","cub","cubby","cube","cubit","cue","cuff","cull","cult","cup","curb","curd","cure","curl","curry","curse","curve","cut","cyan","cycle","cynic","dab","daily","dairy","daisy","dame","damp","dance","dandy","dane","dare","dark","dart","darts","dash","data","date","dawn","day","days","daze","deaf","deal","dean","dear","debit","debt","debut","decal","decay","deck","decor","decoy","deed","deeds","deep","deer","delay","deli","delta","demo","demon","denim","dent","depot","depth","derby","desk","detox","deuce","devil","dew","dial","diary","dibs","dice","diet","dig","digit","digs","dill","dime","diner","ding","dip","dirt","disc","disco","dish","disk","ditch","ditto","dive","diver","dock","dodge","dog","dogma","doll","dolly","dolt","dome","donor","donut","doom","door","dope","dork","dorm","dot","doubt","dough","dove","dowel","down","dozen","dozer","draft","drag","drain","drama","drape","draw","dread","dream","dress","drew","drier","drift","drill","drink","drip","drive","drone","drool","drop","drove","drug","druid","drum","dry","dryer","duck","duct","due","duel","duet","dug","dunce","dune","dunk","dusk","dust","duty","dye","dyer","dying","eager","eagle","ear","earth","ease","easel","east","eater","eats","echo","edge","eel","egg","eggs","ego","eight","elbow","elder","elect","elf","elite","elk","elm","elves","email","ember","empty","emu","end","enemy","entry","envy","epic","epoxy","equal","era","error","essay","eve","even","event","evil","exam","exile","exit","extra","eye","eyes","fable","face","facet","fact","fad","fade","faint","fair","fairy","faith","fake","fall","falls","fame","fan","fancy","fang","far","farce","fare","farm","fast","fat","fate","fault","favor","fawn","fax","fear","feast","feat","fed","fee","feed","feel","felt","femur","fence","fern","ferry","fetch","feud","fever","few","fib","fiber","field","fiend","fifth","fifty","fig","fight","file","filet","fill","film","filth","final","finch","find","fine","fire","firm","first","fish","fist","fit","five","fiver","fives","fix","fixer","fizz","flag","flair","flak","flake","flame","flank","flap","flaps","flare","flash","flask","flat","flats","flaw","flea","fleet","flesh","flex","flick","flier","flies","fling","flint","flip","flirt","float","flock","flood","floor","flop","floss","flour","flow","flu","flub","fluff","fluid","fluke","flume","flush","flute","flux","fly","flyer","foam","focus","fog","foil","fold","folk","folks","folly","font","food","fool","foot","force","forge","fork","form","fort","forth","forty","forum","foul","found","four","fowl","fox","foyer","frail","frame","frat","fraud","fray","freak","free","freon","fret","friar","fries","frill","frisk","frizz","frog","front","frost","froth","frown","fruit","fry","fryer","fudge","fuel","full","fume","fumes","fun","fund","funds","fungi","funk","funny","fur","fury","fuse","fuss","futon","fuze","fuzz","gag","gage","gain","game","gamma","gap","gape","gas","gash","gasp","gate","gates","gator","gauge","gavel","gawk","gaze","gear","gecko","geek","gel","gem","gene","genie","genoa","genre","gent","germ","ghost","ghoul","giant","gift","gild","gimp","gin","gipsy","girl","gist","give","given","giver","gizmo","glad","glade","gland","glans","glare","glass","glaze","gleam","glee","glide","glint","globe","gloom","glory","gloss","glove","glow","glue","gnat","gnome","goal","goat","going","gold","golem","golf","goner","goo","good","goof","goofy","goon","goose","goth","gouge","gown","grab","grace","grad","grade","graft","grail","grain","gram","grand","grant","grape","graph","grasp","grass","grate","gravy","gray","graze","great","greed","green","grey","grid","grief","grill","grime","grin","grind","grip","gripe","grit","grits","groan","groom","gross","group","grove","growl","grub","gruel","grump","grunt","guard","guess","guest","guide","guild","guilt","gulch","gulf","gull","gulp","gum","gun","guppy","guru","gush","gust","gut","guts","guy","gym","habit","hack","hag","hail","hair","half","hall","halo","halt","ham","hand","hands","handy","hang","hare","harp","hash","haste","hat","hatch","hate","hater","haunt","have","haven","havoc","hawk","hay","haze","hazel","head","heap","heaps","heart","heat","heavy","hedge","heed","heel","heft","heir","helix","hell","hello","helm","help","hem","hemp","hen","herb","herd","here","hero","hex","hick","hide","high","hike","hiker","hill","hilt","hind","hinge","hint","hip","hippo","hippy","hire","hiss","hit","hitch","hive","hives","hoagy","hoard","hoax","hob","hobby","hobo","hog","hoist","hold","hole","home","honey","honk","honor","hoof","hook","hooks","hoop","hoops","hoot","hop","hope","hops","horde","horn","horse","hose","host","hotel","hound","hour","hours","house","howl","hub","hue","huff","hug","hula","hulk","hull","hum","human","humor","hump","humus","hunch","hunk","hunt","hurl","hurry","hurt","hush","husk","husky","hut","hydra","hyena","hymn","hype","ibis","ice","icing","icon","idea","ideal","idiom","idiot","idle","idler","idol","igloo","iglu","ill","image","imp","inch","index","info","ingot","ink","inlet","inn","input","intro","ion","iris","iron","irony","isle","issue","itch","ivory","ivy","jab","jack","jacks","jail","jam","jamb","jar","java","jaw","jay","jazz","jean","jeans","jeep","jeer","jello","jelly","jest","jet","jetty","jewel","jig","jive","job","jock","jog","join","joint","joist","joke","joker","jolly","jolt","joust","joy","judge","jug","juice","juke","jump","junk","junky","juror","jury","kale","kayak","kazoo","kebab","keen","keep","keg","kelp","key","kick","kid","kiddy","kiln","kilo","kilt","kin","kind","king","kiss","kit","kite","kitty","kiwi","knack","knee","kneel","knell","knife","knit","knob","knock","knot","know","koala","krill","lab","label","labor","lace","lack","lad","ladle","lady","lag","lair","lake","lamb","lame","lamp","lance","land","lane","lap","lapel","lapse","lard","large","larva","laser","lash","lass","lasso","last","lat","latch","latex","lathe","latte","laugh","lava","law","lawn","laws","lay","layer","layup","leach","lead","leaf","leak","lean","leap","lear","lease","leash","least","leave","ledge","leech","leeds","leek","leer","left","lefty","leg","lego","legs","lemon","lemur","lens","lent","let","level","lever","liar","libel","lick","lid","lie","lied","life","lift","light","like","lilac","limb","limbo","lime","limit","limp","line","linen","liner","link","links","lint","lion","lip","lisp","list","lit","liter","liver","llama","loach","load","loads","loaf","loan","lob","lobby","lobe","local","lock","lodge","loft","log","logic","logo","loner","look","loom","loon","loony","loop","loot","lord","loser","loss","lost","lot","lots","lotto","lotus","love","lover","low","lower","luck","lump","lunch","lung","lure","lush","lying","mace","macro","madam","mafia","magi","magic","magma","maid","mail","main","major","maker","male","malt","mam","mama","mamba","mambo","mamma","man","mane","mango","mania","manor","map","maple","march","mare","mark","marks","mars","marsh","mash","mask","mass","mast","mat","match","mate","mates","math","maths","max","maxim","may","mayo","mayor","maze","meal","mean","means","meat","medal","medic","meet","meld","melee","melon","melt","memo","men","mend","menu","meow","mercy","merit","mesh","mess","metal","meter","meth","metro","might","mile","milk","mill","mills","mimer","mimic","min","mince","mind","mine","miner","mini","mink","minor","mint","minus","miser","miss","mist","mite","miter","mitt","mix","mixer","moan","moat","mob","mocha","mock","mod","modal","mode","model","modem","mogul","mojo","molar","mold","mole","molt","mom","momma","mommy","money","monk","month","moo","mooch","mood","moody","moon","moose","mop","mope","moped","moral","morse","moss","motel","moth","motor","motto","mould","mound","mount","mouse","mouth","move","mover","movie","mow","mucus","mud","muff","mug","mulch","mule","mum","mummy","munch","mural","muse","mush","music","musk","must","mute","mutt","mylar","nacho","name","namer","names","nanna","nap","nasal","navy","neck","need","needy","neon","nepal","nerd","nerve","nest","net","news","newt","nick","niece","night","nine","niner","ninja","ninth","noble","nod","node","noise","nomad","none","nook","noon","noose","north","nose","notch","note","noun","nudge","nuke","nun","nurse","nut","nylon","oaf","oak","oar","oasis","oat","oates","oath","ocean","octet","odds","ode","odor","offer","ogre","oil","oiler","oink","okay","old","oldie","olive","omega","omen","one","onion","onset","ooze","open","optic","oral","orange","orb","orbit","orca","order","ore","oreo","organ","ounce","out","oval","oven","over","owl","owner","oxbow","oxen","ozone","pace","pacer","pack","pact","pad","page","pager","pail","pain","pains","paint","pair","pal","pale","palm","pan","panda","pane","panel","panic","pansy","pant","pants","papa","paper","par","park","parks","part","parts","party","pass","past","pasta","paste","pat","patch","path","patio","pause","pave","paw","pawn","pay","payer","peace","peach","peak","pear","pearl","pecan","pedal","peek","peel","peer","peg","pelt","pen","penny","perch","peril","perk","pesto","pet","petal","petty","phase","phone","photo","piano","pick","pie","piece","pier","pig","piggy","pigmy","pike","pile","piles","pill","pimp","pin","pinch","pine","ping","pink","pinky","pinot","pint","pipe","pit","pita","pitch","pitt","pity","pivot","pixel","pizza","place","plaid","plain","plan","plane","plank","plant","plate","play","plaza","plea","plier","plot","plow","ploy","pluck","plug","plum","plumb","plume","plump","plus","plush","plyer","pod","poem","poet","point","poke","poker","pole","poll","polls","pond","pong","pony","pooch","poof","pool","poor","pop","poppy","porch","pore","pork","port","pose","poser","post","pot","pouch","pound","power","prank","prawn","press","prey","price","pride","prime","prism","prize","pro","probe","prom","promo","proof","prop","props","prose","prowl","prune","pry","pub","puck","puff","pug","pull","pulp","pulse","puma","pump","pun","punch","punk","punks","punt","pup","pupil","puppy","purge","purse","push","put","putt","putty","quack","quad","quake","qualm","quart","queen","query","quest","quick","quid","quiet","quilt","quirk","quirt","quiz","quota","quote","race","racer","rad","radar","radio","raft","rafts","rag","rage","raid","rail","rails","rain","raise","rake","rally","ram","ramp","ranch","range","rank","rant","rap","rapid","rash","rat","rate","rates","ratio","raw","ray","razor","razz","reach","read","ready","real","realm","ream","rear","rebel","red","reed","reef","reek","reel","reign","relay","relic","rent","reply","reset","resin","rest","retro","revel","rhino","rhyme","rib","rice","ricer","rich","ride","rider","ridge","riff","rifle","rift","rig","right","rim","rind","ring","rings","rink","rinse","riot","rip","rise","riser","risk","rite","rival","river","roach","road","roads","roar","roast","robe","robin","robot","rock","rod","rodeo","rogue","role","roll","room","rooms","roost","root","roots","rope","rose","rot","rotor","rouge","rough","round","route","rover","row","rowdy","rower","royal","rub","rube","ruby","rug","rugby","ruin","rule","ruler","rum","rummy","rumor","run","rune","rung","runt","ruse","rush","rust","rut","saber","safe","sag","saga","sage","sail","saint","salad","sale","salem","sales","salon","salsa","salt","same","sand","sands","sang","sash","sass","sauce","sauna","save","saver","savor","saw","say","scale","scan","scar","scare","scarf","scene","scent","scold","scone","scoop","scope","score","scorn","scout","scrap","sea","seal","seam","seat","seats","sect","sedan","see","seed","seek","seer","self","sell","sense","serum","serve","servo","set","setup","seven","shack","shade","shake","sham","shame","shank","shape","shard","share","shark","sharp","shave","shawl","shed","sheep","sheet","shelf","shell","shift","shill","shim","shin","ship","shirt","shoe","shoes","shop","shore","shot","shove","show","shred","shrub","shrug","shy","sick","siege","sigh","sight","sign","silk","silks","silly","silo","sin","sink","sinus","sip","sir","siren","six","sixer","sixth","sixty","size","ski","skid","skier","skill","skim","skin","skip","skirt","skit","skull","skunk","sky","slab","slack","slag","slain","slam","slang","slant","slap","slash","slate","slave","slaw","sled","sleep","sleet","slew","slews","slice","slick","slide","slime","sling","slip","slit","slob","slope","slot","sloth","slug","slum","slump","slur","slush","smack","small","smart","smash","smear","smell","smelt","smile","smirk","smith","smock","smog","smoke","snack","snag","snail","snake","snap","snare","snarl","sneak","sniff","snipe","snore","snort","snot","snow","snug","soak","soap","soar","sob","sock","sofa","softy","soil","sole","solid","son","sonar","song","sonny","soot","sooth","sore","sort","soul","sound","soup","sour","south","spa","space","spade","spam","span","spar","spare","spark","spasm","spat","spawn","speed","spell","spelt","spice","spike","spill","spin","spit","spite","splat","split","spoil","spoke","spoof","spook","spool","spoon","spore","sport","spot","spots","spout","spray","spree","spud","spur","spurt","spy","squat","squid","stab","stack","staff","stag","stage","stain","stair","stake","stalk","stall","stamp","stand","star","stare","start","stash","state","stay","stays","steak","steal","steam","steed","steel","steer","stem","step","steps","stern","stew","stick","stiff","still","stilt","sting","stink","stint","stir","stock","stoic","stomp","stone","stool","stoop","stop","stops","store","stork","storm","story","stove","strap","straw","stray","strip","strum","strut","stub","stud","study","stuff","stump","stunt","style","sub","suds","sugar","suit","suite","sum","sumer","sun","sung","super","surf","surge","sushi","sutra","swab","swag","swamp","swan","swap","swarm","sway","sweat","sweep","sweet","swell","swift","swim","swine","swing","swipe","swirl","swish","syrup","table","tack","taco","tact","tad","taffy","tag","tail","tails","take","taker","tale","talk","talks","tall","tally","talon","tan","tank","tap","tape","taps","tar","tarp","tart","task","taste","taunt","tax","taxer","taxi","taxis","tea","teach","teal","team","tear","tears","tease","teen","teens","teeth","tell","temp","tempo","ten","tense","tent","tenth","term","terms","test","text","thaw","theft","theme","then","there","theta","thick","thief","thigh","thing","think","third","thorn","three","throw","thud","thug","thumb","tick","tide","tidy","tie","tier","tiger","tilde","tile","till","time","timer","times","timid","tin","tint","tip","tire","titan","title","toad","toady","toast","today","toe","toil","token","toll","tomb","tome","ton","tone","toner","tongs","tonic","tons","tool","toon","toot","tooth","top","topic","torch","torso","toss","total","tote","totem","touch","tough","tour","tours","tow","towel","tower","town","towny","toxin","toy","trace","track","trade","trail","train","trait","trap","trash","tray","tread","treat","tree","trek","trend","triad","trial","trick","trim","trio","trip","troll","troop","trot","trout","truce","truck","true","trump","trunk","trust","truth","try","tub","tuba","tube","tuck","tug","tulip","tummy","tumor","tuna","tune","tuner","tunic","turf","turn","tush","tusk","tutor","twine","twins","twirl","twist","two","tying","type","typo","udder","ulcer","uncle","union","unit","unity","upper","upset","urn","usage","use","user","usher","using","valet","valor","value","valve","van","vase","vat","vault","vegan","veil","vein","venom","vent","venue","verb","verge","vest","vet","vial","vibe","vibes","vice","video","view","vigil","vine","vinyl","viola","viper","virgo","virus","visit","visor","vista","vocal","vodka","vogue","voice","void","volt","vote","voter","vow","vowel","wacko","wad","wade","wader","wads","wafer","waft","wag","wage","wager","wages","wagon","wail","wain","waist","wait","wake","walk","wall","waltz","wane","want","war","ward","ware","warp","wart","wash","wasp","waste","watch","water","watt","watts","wave","waver","wax","way","ways","wear","weave","web","wed","wedge","week","weird","well","wells","welsh","west","wet","whack","whale","wharf","wheat","wheel","whey","whiff","while","whim","whip","whirl","whisk","white","who","whole","whore","why","wick","widow","width","wife","wig","wild","will","wilt","wimp","win","wince","winch","wind","wine","wing","wings","wink","wipe","wiper","wire","wise","wish","wit","witch","wits","woe","wolf","woman","womb","won","wood","woods","woof","wool","word","words","work","works","world","worm","worry","worse","worst","wort","worth","wound","wow","wrack","wrap","wrath","wreck","wring","wrist","wrong","yam","yard","yarn","yawn","yay","year","years","yeast","yell","yes","yeti","yield","yoga","yolk","young","youth","zap","zebra","zinc","zing","zip","zit","zone","zoo","zoom","zero","whir","welt","whig","wand","twin","tribe","tilt","sword","spine","spear","site","shock","sent"],zn={0:"zero",1:"one",2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine"};function xs({config:e}){const n=St.useNavigate(),[t,r]=oe.useState(`${vi[Math.floor(Math.random()*vi.length)]}-${Ei[Math.floor(Math.random()*Ei.length)]}-${Math.floor(Math.random()*(99-0+1)+0)}`),[i,o]=oe.useState(e.minTeams),[l,a]=oe.useState(e.variants.length>0?e.variants[0]:null);oe.useEffect(()=>{async function u(){let c=await xi(e.host);(!c||c.status!==200)&&n("/status/down")}u()},[history]);async function s(u){u.preventDefault();let c=await bs(e.host,e.key,t,i,l);(c===201||c===400)&&n(`/${t}`)}return P.jsx("div",{children:P.jsxs("div",{className:"flex flex-col items-center m-8 md:m-12",children:[P.jsx("div",{className:"w-full max-w-2xl",children:P.jsxs("div",{className:"flex flex-col items-center fade-in",children:[P.jsx("div",{className:` text-5xl font-black font-['${e.font}'] text-${e.color} mb-1 cursor-pointer`,children:P.jsx("a",{href:`${window.location.protocol}//${window.location.host}`,children:e.key})}),P.jsxs("div",{className:"font-thin mb-3",children:["Play ",e.minTeams===e.maxTeams?`${zn[e.minTeams]}`:`${zn[e.minTeams]} to ${zn[e.maxTeams]}`," player ",e.key," online against friends. To create a game or join an existing one, enter a game ID and click 'Go'."]}),P.jsxs("form",{className:"w-full flex mb-3",onSubmit:s,children:[P.jsx("input",{className:"w-10/12 p-2 text-zinc-100 bg-zinc-800 rounded-none border border-zinc-100 text-3xl font-medium box-border focus:outline-dashed outline-blue-500 outline-2",autoFocus:!0,type:"text",value:t,onChange:u=>r(u.target.value)}),P.jsx("button",{className:"w-2/12 font-bold grow-0 bg-blue-500",children:"Go"})]}),P.jsxs("div",{className:"flex w-full justify-between flex-wrap",children:[P.jsxs("div",{className:"flex order-2 md:order-1",children:[P.jsx("button",{onClick:()=>n("/rules"),title:"how to play",className:"mr-3 md:mr-2 p-2 first-line:p-2 bg-blue-500 italic text-xs font-bold",children:"game rules"}),P.jsx("div",{className:"italic text-xs py-1 px-2 border-blue-500 border border-dashed text-blue-500",children:P.jsxs("a",{href:"https://quibbble.com",target:"_blank",children:["more ",P.jsx("span",{className:"text-zinc-100 font-['lobster'] text-sm not-italic",children:"quibbble"})," games"]})})]}),P.jsxs("div",{className:"flex items-center order-1 md:order-2 mb-3 md:mb-0",children:[l?P.jsxs(P.Fragment,{children:[P.jsx("div",{className:"mr-1 font-black text-blue-500",children:"VARIANT"}),P.jsx("select",{className:"mr-1 bg-zinc-800 text-xs h-6 border font-bold border-zinc-100 focus:outline-none",id:"players",onChange:u=>a(u.target.value.replace(/\s/g,"")),children:e.variants.map(u=>P.jsx("option",{value:u,children:u},u))})]}):null,e.minTeams!==e.maxTeams?P.jsxs(P.Fragment,{children:[P.jsx("div",{className:"mx-1 font-black text-blue-500",children:"PLAYERS"}),P.jsx("select",{className:"bg-zinc-800 text-xs h-6 border font-bold border-zinc-100 focus:outline-none",id:"players",onChange:u=>o(parseInt(u.target.value)),children:Array(e.maxTeams-e.minTeams+1).fill().map((u,c)=>e.minTeams+c).map(u=>P.jsx("option",{value:u,children:u},u))})]}):null]})]})]})}),P.jsx("div",{className:"absolute bottom-8 md:bottom-12",children:P.jsx(Ht,{})})]})})}var Si={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ci=oe.createContext&&oe.createContext(Si),rt=globalThis&&globalThis.__assign||function(){return rt=Object.assign||function(e){for(var n,t=1,r=arguments.length;t{e?setTimeout(()=>t(r=>r-1),1500):t(0)},[e,t]),P.jsxs("div",{className:`flex items-center ${e?"cursor-pointer":""}`,children:[n?null:P.jsx("div",{className:"px-1",children:e?"connected":"connecting"}),P.jsx("div",{onClick:()=>{e&&(t(0),setTimeout(()=>t(n-1),1500))},className:`rounded-full w-2 h-2 ${e?"bg-green-500":"bg-orange-500"}`,children:e?null:P.jsx("div",{className:"rounded-full w-2 h-2 bg-orange-500 animate-ping"})})]})}const Ps=oe.forwardRef((e,n)=>{const{config:t,ws:r,game:i,setGame:o,network:l,setNetwork:a,chat:s,setChat:u,connected:c,setConnected:f,error:m,setError:p,children:d}=e,{gameID:g}=St.useParams(),k=St.useNavigate(),[w,A]=oe.useState(!0);oe.useEffect(()=>{c&&l&&c[l.Name]&&localStorage.setItem(g,c[l.Name])},[l,c,g]),oe.useEffect(()=>{const v=async z=>{if(z<=0){k("/");return}let K=await ks(t.host,t.key,g);if(!K){k("/status/down");return}if(K.status!==200){k("/");return}r.current=new WebSocket(`${t.websocket}/game/join?GameKey=${t.key}&GameID=${g}`),r.current.onopen=()=>{A(!0);let Y=localStorage.getItem(g);Y&&C(Y)},r.current.onclose=()=>{A(!1),setTimeout(function(){v(z-1)},1e3+(3-z)*500)},r.current.onmessage=async Y=>{let B=JSON.parse(Y.data);B.Type==="Game"?o(B.Payload):B.Type==="Network"?a(B.Payload):B.Type==="Chat"?u(le=>le.concat([B.Payload])):B.Type==="Connected"?f(B.Payload):B.Type==="Error"&&p(B.Payload)},r.current.onerror=Y=>{console.error("Socket encountered error: ",Y.message,"Closing socket"),r.current.close()}};v(3)},[r,g,history]);const C=v=>{r.current&&r.current.send(JSON.stringify({ActionType:"SetTeam",MoreDetails:{Team:v}}))},I=()=>{if(!r.current)return;const v=i&&i.MoreData&&i.MoreData.Variant?i.MoreData.Variant:"";r.current.send(JSON.stringify({ActionType:"Reset",MoreDetails:{MoreOptions:{Seed:Date.now(),Variant:v}}}))},E=()=>{r.current&&(i&&c&&l&&i.Actions&&i.Actions.length>0&&i.Actions[i.Actions.length-1].Team!==c[l.Name]||r.current.send(JSON.stringify({ActionType:"Undo"})))},[x,N]=oe.useState(!0);oe.useEffect(()=>{const v=()=>N(!x);return window.addEventListener("resize",v),D=>window.removeEventListener("resize",v)});const[q,ee]=oe.useState(0);return oe.useEffect(()=>{q>0&&setTimeout(()=>ee(q-1),1e3)},[q]),P.jsx("div",{className:"min-h-screen flex flex-col items-center p-2 md:p-4 fade-in",children:P.jsxs("div",{ref:n,className:`h-full w-full ${t.gamePageMaxWidth} flex flex-col items-center grow`,children:[P.jsxs("div",{className:"flex justify-between items-center relative w-full mb-1 justfy-self-start font-thin text-sm",children:[P.jsxs("div",{children:["Share this link: ",P.jsx("span",{className:"underline cursor-pointer",onClick:()=>{ee(1),navigator.clipboard.writeText(`${window.location.protocol}//${window.location.host}/${g}`)},children:`${window.location.protocol}//${window.location.host}/${g}`}),q>0?P.jsxs("div",{className:"absolute mt-2 w-full flex justify-center",children:[P.jsx("div",{className:"absolute top-[-12px] w-6 overflow-hidden inline-block",children:P.jsx("div",{className:" h-4 w-4 bg-zinc-600 rotate-45 transform origin-bottom-left"})}),P.jsx("div",{className:"font-bold text-xs text-center bg-zinc-600 px-2 py-1",children:"copied!"})]}):null]}),P.jsx("div",{className:"px-1",children:P.jsx(As,{isConn:w})})]}),P.jsx("hr",{className:"w-full mb-2"}),P.jsxs("div",{className:"flex w-full justify-between items-center mb-4",children:[P.jsx("div",{className:"flex",children:i?i.Teams.map(v=>P.jsx("div",{className:`text-xs flex items-center justify-center font-bold cursor-pointer mr-1 w-6 h-6 rounded-full border-4 border-${v}-500 ${l&&c&&c[l.Name]===v?`bg-${c[l.Name]}-500`:""}`,onClick:()=>C(v),children:i&&i.MoreData&&i.MoreData.Points?i.MoreData.Points[v]:""},v)):null}),P.jsx("div",{className:`font-extrabold ${i&&c&&l&&c[l.Name]&&i.Winners.length===0?`text-${i.Turn}-500`:"text-zinc-100"} ${i&&l&&c&&c[l.Name]===i.Turn&&i.Winners.length===0?"animate-pulse":""}`,children:i&&c&&l&&c[l.Name]?i.Message:P.jsxs("div",{className:"flex items-center animate-pulse",children:[P.jsx(Ss,{className:"mr-1"}),P.jsx("div",{children:"select a team"})]})})]}),P.jsx("div",{className:"h-full w-full flex flex-col justify-center items-center grow",children:d}),P.jsx("hr",{className:"w-full mb-2"}),P.jsxs("div",{className:"w-full flex justify-between items-center",children:[P.jsx("div",{className:`leading-4 text-2xl font-black text-${t.color} cursor-pointer`,children:P.jsxs("button",{onClick:()=>{sessionStorage.setItem("gameID",""),k("/")},children:[P.jsx("span",{className:`font-['${t.font}']`,children:t.key}),P.jsx("span",{className:"ml-1 text-[0.5rem] md:text-xs text-zinc-100",children:i&&i.MoreData&&i.MoreData.Variant?i.MoreData.Variant:""})]})}),P.jsxs("div",{className:"flex",children:[P.jsx("button",{onClick:()=>I(),title:"reset game",className:`p-2 ${i&&i.Winners.length>0?"bg-blue-500":"bg-zinc-500"} mr-3 md:mr-2 rounded-full`,children:P.jsx(Cs,{})}),P.jsx("button",{onClick:()=>E(),title:"undo move",className:`p-2 ${i&&c&&l&&i.Actions&&i.Actions.length>0&&i.Actions[i.Actions.length-1].Team===c[l.Name]?"bg-amber-500":"bg-zinc-700 text-zinc-500 cursor-default"} mr-3 md:mr-2 rounded-full`,children:P.jsx(Ts,{})}),P.jsx("button",{onClick:()=>{sessionStorage.setItem("gameID",g),k("/rules")},title:"how to play",className:"p-2 bg-blue-500 italic text-xs font-bold",children:"game rules"}),P.jsx("div",{className:"hidden md:flex italic text-xs ml-2 py-1 px-2 border-blue-500 border border-dashed text-blue-500",children:P.jsxs("a",{href:"https://quibbble.com",target:"_blank",children:["more ",P.jsx("span",{className:"text-zinc-200 font-['lobster'] text-sm not-italic",children:"quibbble"})," games"]})})]})]})]})})}),Ai=["http","https","mailto","tel"];function Os(e){const n=(e||"").trim(),t=n.charAt(0);if(t==="#"||t==="/")return n;const r=n.indexOf(":");if(r===-1)return n;let i=-1;for(;++ii||(i=n.indexOf("#"),i!==-1&&r>i)?n:"javascript:void(0)"}/*! +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...t){const r=new this(n);return t.forEach(i=>r.set(i)),r}static accessor(n){const r=(this[fi]=this[fi]={accessors:{}}).accessors,i=this.prototype;function o(l){const a=Rt(l);r[a]||(os(i,l),r[a]=!0)}return T.isArray(n)?n.forEach(o):o(n),this}}Xt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),T.reduceDescriptors(Xt.prototype,({value:e},n)=>{let t=n[0].toUpperCase()+n.slice(1);return{get:()=>e,set(r){this[t]=r}}}),T.freezeMethods(Xt);const Ze=Xt;function Rn(e,n){const t=this||Pn,r=n||t,i=Ze.from(r.headers);let o=r.data;return T.forEach(e,function(a){o=a.call(t,o,i.normalize(),n?n.status:void 0)}),i.normalize(),o}function pi(e){return!!(e&&e.__CANCEL__)}function Ft(e,n,t){se.call(this,e??"canceled",se.ERR_CANCELED,n,t),this.name="CanceledError"}T.inherits(Ft,se,{__CANCEL__:!0});function ls(e,n,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?e(t):n(new se("Request failed with status code "+t.status,[se.ERR_BAD_REQUEST,se.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}const as=Ve.isStandardBrowserEnv?function(){return{write:function(t,r,i,o,l,a){const s=[];s.push(t+"="+encodeURIComponent(r)),T.isNumber(i)&&s.push("expires="+new Date(i).toGMTString()),T.isString(o)&&s.push("path="+o),T.isString(l)&&s.push("domain="+l),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){const r=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function ss(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function us(e,n){return n?e.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):e}function hi(e,n){return e&&!ss(n)?us(e,n):n}const cs=Ve.isStandardBrowserEnv?function(){const n=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function i(o){let l=o;return n&&(t.setAttribute("href",l),l=t.href),t.setAttribute("href",l),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return r=i(window.location.href),function(l){const a=T.isString(l)?i(l):l;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function fs(e){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return n&&n[1]||""}function ps(e,n){e=e||10;const t=new Array(e),r=new Array(e);let i=0,o=0,l;return n=n!==void 0?n:1e3,function(s){const u=Date.now(),c=r[o];l||(l=u),t[i]=s,r[i]=u;let f=o,m=0;for(;f!==i;)m+=t[f++],f=f%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),u-l{const o=i.loaded,l=i.lengthComputable?i.total:void 0,a=o-t,s=r(a),u=o<=l;t=o;const c={loaded:o,total:l,progress:l?o/l:void 0,bytes:a,rate:s||void 0,estimated:s&&l&&u?(l-o)/s:void 0,event:i};c[n?"download":"upload"]=!0,e(c)}}const Qt={http:$a,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(t,r){let i=e.data;const o=Ze.from(e.headers).normalize(),l=e.responseType;let a;function s(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}T.isFormData(i)&&(Ve.isStandardBrowserEnv||Ve.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let u=new XMLHttpRequest;if(e.auth){const p=e.auth.username||"",d=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(p+":"+d))}const c=hi(e.baseURL,e.url);u.open(e.method.toUpperCase(),ai(c,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function f(){if(!u)return;const p=Ze.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),g={data:!l||l==="text"||l==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:p,config:e,request:u};ls(function(w){t(w),s()},function(w){r(w),s()},g),u=null}if("onloadend"in u?u.onloadend=f:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(f)},u.onabort=function(){u&&(r(new se("Request aborted",se.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new se("Network Error",se.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let d=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const g=e.transitional||ui;e.timeoutErrorMessage&&(d=e.timeoutErrorMessage),r(new se(d,g.clarifyTimeoutError?se.ETIMEDOUT:se.ECONNABORTED,e,u)),u=null},Ve.isStandardBrowserEnv){const p=(e.withCredentials||cs(c))&&e.xsrfCookieName&&as.read(e.xsrfCookieName);p&&o.set(e.xsrfHeaderName,p)}i===void 0&&o.setContentType(null),"setRequestHeader"in u&&T.forEach(o.toJSON(),function(d,g){u.setRequestHeader(g,d)}),T.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),l&&l!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",di(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",di(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=p=>{u&&(r(!p||p.type?new Ft(null,e,u):p),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const m=fs(c);if(m&&Ve.protocols.indexOf(m)===-1){r(new se("Unsupported protocol "+m+":",se.ERR_BAD_REQUEST,e));return}u.send(i||null)})}};T.forEach(Qt,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{value:n})}catch{}Object.defineProperty(e,"adapterName",{value:n})}});const mi={getAdapter:e=>{e=T.isArray(e)?e:[e];const{length:n}=e;let t,r;for(let i=0;ie instanceof Ze?e.toJSON():e;function dt(e,n){n=n||{};const t={};function r(u,c,f){return T.isPlainObject(u)&&T.isPlainObject(c)?T.merge.call({caseless:f},u,c):T.isPlainObject(c)?T.merge({},c):T.isArray(c)?c.slice():c}function i(u,c,f){if(T.isUndefined(c)){if(!T.isUndefined(u))return r(void 0,u,f)}else return r(u,c,f)}function o(u,c){if(!T.isUndefined(c))return r(void 0,c)}function l(u,c){if(T.isUndefined(c)){if(!T.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,f){if(f in n)return r(u,c);if(f in e)return r(void 0,u)}const s={url:o,method:o,data:o,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:a,headers:(u,c)=>i(yi(u),yi(c),!0)};return T.forEach(Object.keys(Object.assign({},e,n)),function(c){const f=s[c]||i,m=f(e[c],n[c],c);T.isUndefined(m)&&f!==a||(t[c]=m)}),t}const bi="1.5.0",_n={};["object","boolean","number","function","string","symbol"].forEach((e,n)=>{_n[e]=function(r){return typeof r===e||"a"+(n<1?"n ":" ")+e}});const ki={};_n.transitional=function(n,t,r){function i(o,l){return"[Axios v"+bi+"] Transitional option '"+o+"'"+l+(r?". "+r:"")}return(o,l,a)=>{if(n===!1)throw new se(i(l," has been removed"+(t?" in "+t:"")),se.ERR_DEPRECATED);return t&&!ki[l]&&(ki[l]=!0,console.warn(i(l," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(o,l,a):!0}};function hs(e,n,t){if(typeof e!="object")throw new se("options must be an object",se.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],l=n[o];if(l){const a=e[o],s=a===void 0||l(a,o,e);if(s!==!0)throw new se("option "+o+" must be "+s,se.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new se("Unknown option "+o,se.ERR_BAD_OPTION)}}const In={assertOptions:hs,validators:_n},nt=In.validators;class Zt{constructor(n){this.defaults=n,this.interceptors={request:new si,response:new si}}request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=dt(this.defaults,t);const{transitional:r,paramsSerializer:i,headers:o}=t;r!==void 0&&In.assertOptions(r,{silentJSONParsing:nt.transitional(nt.boolean),forcedJSONParsing:nt.transitional(nt.boolean),clarifyTimeoutError:nt.transitional(nt.boolean)},!1),i!=null&&(T.isFunction(i)?t.paramsSerializer={serialize:i}:In.assertOptions(i,{encode:nt.function,serialize:nt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let l=o&&T.merge(o.common,o[t.method]);o&&T.forEach(["delete","get","head","post","put","patch","common"],d=>{delete o[d]}),t.headers=Ze.concat(l,o);const a=[];let s=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(t)===!1||(s=s&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,f=0,m;if(!s){const d=[gi.bind(this),void 0];for(d.unshift.apply(d,a),d.push.apply(d,u),m=d.length,c=Promise.resolve(t);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const l=new Promise(a=>{r.subscribe(a),o=a}).then(i);return l.cancel=function(){r.unsubscribe(o)},l},n(function(o,l,a){r.reason||(r.reason=new Ft(o,l,a),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const t=this._listeners.indexOf(n);t!==-1&&this._listeners.splice(t,1)}static source(){let n;return{token:new jn(function(i){n=i}),cancel:n}}}const ds=jn;function ms(e){return function(t){return e.apply(null,t)}}function gs(e){return T.isObject(e)&&e.isAxiosError===!0}const Dn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Dn).forEach(([e,n])=>{Dn[n]=e});const ys=Dn;function wi(e){const n=new en(e),t=Vr(en.prototype.request,n);return T.extend(t,en.prototype,n,{allOwnKeys:!0}),T.extend(t,n,null,{allOwnKeys:!0}),t.create=function(i){return wi(dt(e,i))},t}const Ce=wi(Pn);Ce.Axios=en,Ce.CanceledError=Ft,Ce.CancelToken=ds,Ce.isCancel=pi,Ce.VERSION=bi,Ce.toFormData=Jt,Ce.AxiosError=se,Ce.Cancel=Ce.CanceledError,Ce.all=function(n){return Promise.all(n)},Ce.spread=ms,Ce.isAxiosError=gs,Ce.mergeConfig=dt,Ce.AxiosHeaders=Ze,Ce.formToJSON=e=>ci(T.isHTMLForm(e)?new FormData(e):e),Ce.getAdapter=mi.getAdapter,Ce.HttpStatusCode=ys,Ce.default=Ce;const tn=Ce;tn.defaults.withCredentials=!0;const bs=async(e,n,t,r,i)=>{let o={method:"POST",url:`${e}/game/create`,headers:{"Content-Type":"application/json"},data:JSON.stringify({GameKey:n,GameID:t,Teams:r,TurnLength:null,MoreOptions:{Seed:Date.now(),Variant:i}})};return tn(o).catch(l=>l.response).then(l=>l.status)},ks=async(e,n,t)=>{let r={method:"GET",url:`${e}/game/snapshot?GameKey=${n}&GameID=${t}`};return tn(r).catch(i=>i.response)},xi=async e=>{let n={method:"GET",url:`${e}/health`};return tn(n).catch(t=>t.response)};function ws({config:e}){const n=St.useNavigate();return oe.useEffect(()=>{const t=async()=>{let i=await xi(e.host);i&&i.status===200&&n("/")};t();const r=setInterval(async()=>{t()},1e4);return()=>clearInterval(r)},[n]),P.jsxs("div",{className:"flex flex-col items-center my-8 md:my-12",children:[P.jsxs("div",{className:"w-full flex flex-col items-center mt-48",children:[P.jsx("p",{className:"font-black text-4xl italic",children:"We'll be right back!"}),P.jsxs("p",{className:"mb-1 font-thin",children:[P.jsx("span",{className:`text-3xl font-black font-['${e.font}'] text-${e.color} mr-1`,children:e.key})," is down for maintenance"]})]}),P.jsx("div",{className:"absolute bottom-8 md:bottom-12",children:P.jsx(Ht,{})})]})}const vi=["able","about","above","abuzz","ace","achy","acid","acned","acute","adept","adult","afire","afoot","afoul","aft","after","aged","agile","aging","aglow","ago","ahead","aided","airy","ajar","akin","alert","alien","alike","alive","alone","aloof","alpha","alto","amber","ample","angry","anti","antic","antsy","any","apart","apish","apt","arced","arch","arid","ashen","ashy","askew","astir","atrip","attic","avian","avid","awake","aware","awash","away","awed","awful","awing","awned","awry","axial","azure","back","bad","baggy","bald","balmy","bandy","bare","bared","basal","base","based","basic","bated","bats","batty","bay","beady","beamy","beat","beefy","beery","beige","bent","best","beta","bias","birch","bitty","black","blame","bland","blank","bleak","blear","blind","blond","blown","blue","bluff","blunt","boggy","bogus","bold","bone","boned","bonny","bony","boon","boozy","bored","born","boss","bossy","both","bound","bowed","boxed","boxy","brag","brash","brave","brief","briny","brisk","broad","broke","brown","brute","buff","buggy","built","bulgy","bulky","bully","bum","bumpy","burly","burnt","bush","bushy","bust","busty","busy","butch","calm","camp","campy","catty","cheap","chewy","chic","chief","civic","civil","clean","clear","cleft","close","cocky","cod","cold","color","comfy","comic","cool","coral","corny","cosy","coy","cozy","crazy","crisp","cross","cubic","cured","curly","curt","curvy","cushy","cut","cute","cyan","daft","daily","damp","dandy","dank","dark","dated","dazed","deaf","dear","deep","deft","deist","dense","dewy","dicey","dim","dingy","dinky","dire","dirty","dodgy","domed","done","dopey","dopy","dormy","down","downy","dozen","drab","drawn","dread","drear","dress","dried","droll","dry","dual","dud","due","dull","dumb","dummy","dusky","dusty","dyed","dying","each","eager","early","eased","east","easy","edged","edgy","eerie","eight","elder","elect","elfin","elite","empty","ended","epic","equal","even","every","evil","exact","extra","eyed","fab","faced","faded","faint","fair","fake","false","famed","fancy","far","fast","fat","fatal","fated","fazed","feral","few","fewer","fiery","fifth","fifty","filmy","final","fine","finer","fired","firm","first","fishy","fit","five","fixed","fizzy","flaky","flash","flat","fleet","flint","flip","fluid","flush","fly","foamy","focal","foggy","fond","fore","foul","found","four","foxy","frail","frank","free","fresh","fried","front","full","fumed","funky","funny","furry","fused","fussy","fuzzy","game","gaudy","gaunt","gawky","giant","giddy","gimpy","glad","glum","godly","going","gold","gone","good","gooey","goofy","grand","great","green","grey","grim","grimy","gross","grown","gruff","gummy","gushy","gusty","gutsy","hairy","hale","half","halt","hammy","handy","happy","hard","hardy","harsh","hasty","hazel","hazy","heard","heavy","hefty","held","here","hex","hexed","high","hilly","hind","hip","hired","hoar","hoary","hokey","holey","holy","home","homey","honey","horny","hot","huffy","huge","human","humid","hurt","husky","icky","icy","ideal","idle","iffy","ill","inert","inky","inner","ionic","irate","iron","jade","jaded","jaggy","jawed","jazzy","jet","joint","jolly","jowly","juicy","jumbo","jumpy","just","kempt","key","keyed","khaki","kin","kind","kinky","known","kooky","laced","lacy","laid","lame","lank","lanky","large","last","late","later","lax","lay","lazy","leafy","leaky","lean","least","left","legal","less","level","light","like","liked","limp","lined","lit","live","liver","livid","loamy","local","loco","lofty","lone","long","loony","loopy","loose","lossy","lost","loud","lousy","loved","low","lowly","loyal","lucid","lucky","lumpy","lunar","lurid","lush","lusty","lyric","macho","macro","mad","made","magic","main","major","male","mangy","manic","manly","many","mass","matt","matte","mauve","mealy","mean","meaty","meek","meet","mere","merry","messy","metal","micro","mild","milky","mimic","mined","mini","minor","mint","minty","minus","mired","mirky","misty","mixed","mock","mod","modal","model","moist","molar","moldy","mono","moody","moony","moot","moral","more","mossy","most","mothy","motor","mousy","moved","mown","much","mucky","muddy","muggy","mum","mural","murky","mushy","musky","must","musty","mute","muted","naive","nary","nasal","nasty","natal","natty","naval","near","neat","needy","nervy","new","newsy","next","nice","nifty","nigh","nine","ninth","noble","noisy","none","north","nosed","noted","novel","nubby","numb","nuts","nutty","oaken","oaten","obese","odd","oiled","oily","okay","old","olden","older","olive","one","only","oozy","open","optic","oral","other","out","outer","oval","over","overt","owing","own","owned","pagan","paid","pale","palmy","pass","past","pasty","pat","paved","peaky","peaty","pedal","pent","peppy","perky","pert","pesky","pet","petty","phony","piano","picky","pied","piggy","pilar","pink","plain","plane","plumb","plump","plus","plush","polar","poor","pop","port","posed","posh","potty","pricy","prim","prior","privy","prize","prone","proof","prosy","proud","pudgy","puff","puffy","pulpy","punk","puny","pupal","pure","pushy","quack","quasi","quick","quiet","rabid","radio","rainy","rapid","rare","rash","raspy","ratty","raw","ready","real","rear","red","regal","retro","rich","rife","right","rigid","riled","ripe","risen","risky","ritzy","roast","robed","rocky","roomy","ropey","rose","rosy","rough","round","rowdy","royal","ruby","rude","ruled","rum","rummy","runic","runny","runty","rural","rush","rushy","rust","rusty","rutty","sad","safe","sage","said","salt","salty","same","sandy","sane","sappy","sassy","saute","saved","scaly","scant","scary","scrub","seamy","sear","seedy","self","sent","seven","sewed","sewn","shady","shaky","sham","sharp","shed","sheer","shiny","short","shot","showy","shut","shy","sick","side","sign","silky","silly","silty","sissy","six","sixth","sixty","size","sized","skew","skim","slack","slain","slaty","slav","sleek","slick","slim","slimy","slow","sly","small","smart","smoky","smug","snaky","sneak","snide","snowy","snub","snuff","snug","soapy","sober","soft","soggy","solar","sold","sole","solid","solo","some","sooty","sore","sorry","sound","soupy","sour","south","sown","spare","spent","spicy","spiky","spiny","splay","split","spry","spumy","squab","squat","stagy","stale","star","stark","steep","stern","stiff","still","stock","stone","stony","stout","straw","stray","stuck","stung","suave","such","sudsy","sulky","sunk","sunny","super","sure","surly","sweet","swell","swept","swift","swish","sworn","tabby","taboo","tacky","taken","talky","tall","tame","tamed","tan","tangy","taped","tardy","tart","tasty","tawny","teal","ten","tenor","tense","tenth","tepid","terse","testy","thick","thin","third","three","tidal","tidy","tied","tight","tiled","timed","timid","tinny","tiny","tipsy","tired","toed","token","tonal","toned","tonic","top","tops","torn","total","tough","toxic","tried","trig","trim","trite","true","tubby","tubed","tumid","twee","twin","two","ugly","ultra","uncut","under","undue","unfed","unfit","union","unlit","unwed","upper","upset","urban","used","usual","utter","vague","vain","valid","vapid","vast","viral","vital","vivid","vocal","void","wacky","warm","wary","washy","waste","wavy","waxed","waxen","waxy","weak","weary","weedy","weeny","weepy","weird","well","welsh","west","wet","whiny","white","whole","wide","wild","wily","wimpy","windy","wired","wiry","wise","wispy","witty","wonky","woody","wooly","woozy","wordy","wormy","worn","worse","worst","worth","wound","woven","wrong","wroth","wry","young","yucky","yummy","zany","zero","zesty","zippy","zonal"],Ei=["ace","ache","acid","acme","acorn","acre","act","actor","add","adder","adept","advil","afro","agave","age","aged","agent","agony","ailey","aim","aioli","air","aisle","akron","alarm","album","ale","alert","algae","alias","alibi","alien","alley","alloy","ally","aloe","alpha","alps","altar","amber","amigo","amino","amish","ammo","amp","angel","anger","angle","angst","angus","anime","ankle","annex","anole","ant","ante","antic","anvil","ape","apex","aphid","apple","april","apron","aqua","arbor","arc","arch","area","arena","argon","argus","ark","arm","armor","arms","army","aroma","array","arrow","arson","art","ascot","aspen","asset","ate","atom","attic","audio","audit","auger","aunt","aunty","aura","auto","award","awe","awl","axe","axiom","axis","axle","azure","baby","back","bacon","badge","bag","bagel","bail","bait","baker","bale","balk","ball","balm","ban","band","bane","banjo","bank","banks","bar","barb","bard","barge","bark","barn","baron","bars","base","bash","basic","basil","basin","basis","bass","bat","batch","bath","baton","bay","bayou","beach","bead","beads","beak","beam","bean","bear","beard","beast","beat","beats","bed","bee","beech","beef","beep","beer","beet","begin","beige","being","belch","bell","belly","belt","bench","bend","bends","bent","beret","berry","bet","beta","bevel","bevy","bias","bib","bible","bid","bidet","bike","biker","bill","bin","bind","bingo","biome","biped","birch","bird","birth","bison","bit","bite","biter","black","blade","blame","blank","blast","blaze","blend","blimp","blind","bling","blink","blip","bliss","blitz","bloat","blob","block","blog","bloke","blond","blood","bloom","blow","blue","blues","bluff","blur","blurb","blush","boa","boar","board","boast","boat","bod","body","bog","bogey","boil","bold","bolt","bomb","bond","bone","boner","bones","bong","bongo","bonus","boo","book","boom","boon","boost","boot","booth","booty","booze","bore","borer","born","boss","bot","botch","bound","bow","bowel","bowl","bowls","box","boxer","boy","bra","brace","brag","braid","brail","brain","brake","bran","brand","brass","brat","brave","bravo","brawl","brawn","bread","break","breed","brew","briar","bribe","brick","bride","brie","brief","brim","brine","brink","brit","brits","britt","broad","broil","brood","brook","broom","broth","brow","brown","brunt","brush","brute","buck","bud","buddy","budge","buff","bug","buggy","bugle","build","bulb","bulge","bulk","bull","bully","bum","bump","bun","bunch","bung","bunk","bunny","buns","bunt","buoy","bur","burn","burns","burp","burst","bus","bush","bust","buy","buyer","buzz","bye","bylaw","byte","cab","cabin","cable","cabot","cache","caddy","cadet","cafe","cage","cager","cake","calf","call","calm","cam","camel","camp","can","canal","candy","cane","cap","cape","caper","car","carat","card","cards","care","caret","cargo","carp","carry","cart","case","cash","cask","cast","caste","cat","catch","caulk","cause","cave","cavil","caw","cease","cedar","cell","cello","cent","chaff","chain","chair","chalk","champ","chant","chaos","chap","chard","charm","chart","chase","chasm","chat","cheat","check","cheek","cheep","cheer","chef","chess","chest","chew","chic","chick","chief","child","chill","chime","chimp","chin","chip","chips","chirp","chit","chive","chock","choir","choke","choky","chomp","chop","chord","chore","chow","chuck","chug","chum","chump","chunk","churn","chute","cider","cigar","cinch","cite","city","clack","claim","clam","clamp","clams","clan","clang","clank","clap","clash","clasp","class","clay","clean","clear","cleat","cleft","clerk","click","cliff","climb","cling","clip","cloak","clock","clog","clone","close","clot","cloth","cloud","clout","clove","clown","club","cluck","clue","clump","clunk","coach","coal","coast","coat","cobra","cocoa","cod","code","cog","coil","coin","coke","cola","cold","colon","color","colt","coma","comb","combo","come","comet","comic","comma","conch","condo","cone","coney","conk","cook","cool","coot","cop","cope","copy","coral","cord","cords","core","cork","corn","corp","corps","cost","costs","cosy","cot","couch","cough","count","court","cove","coven","cover","cow","cowl","cows","cozy","crab","crabs","crack","craft","cramp","crane","crank","crash","crate","crawl","craze","crazy","creak","cream","cred","cree","creed","creek","creep","crepe","cress","crest","crew","crib","crime","crimp","crisp","croak","crock","crook","crop","cross","crow","crowd","crown","crud","crude","crumb","crush","crust","crux","cry","crypt","cub","cubby","cube","cubit","cue","cuff","cull","cult","cup","curb","curd","cure","curl","curry","curse","curve","cut","cyan","cycle","cynic","dab","daily","dairy","daisy","dame","damp","dance","dandy","dane","dare","dark","dart","darts","dash","data","date","dawn","day","days","daze","deaf","deal","dean","dear","debit","debt","debut","decal","decay","deck","decor","decoy","deed","deeds","deep","deer","delay","deli","delta","demo","demon","denim","dent","depot","depth","derby","desk","detox","deuce","devil","dew","dial","diary","dibs","dice","diet","dig","digit","digs","dill","dime","diner","ding","dip","dirt","disc","disco","dish","disk","ditch","ditto","dive","diver","dock","dodge","dog","dogma","doll","dolly","dolt","dome","donor","donut","doom","door","dope","dork","dorm","dot","doubt","dough","dove","dowel","down","dozen","dozer","draft","drag","drain","drama","drape","draw","dread","dream","dress","drew","drier","drift","drill","drink","drip","drive","drone","drool","drop","drove","drug","druid","drum","dry","dryer","duck","duct","due","duel","duet","dug","dunce","dune","dunk","dusk","dust","duty","dye","dyer","dying","eager","eagle","ear","earth","ease","easel","east","eater","eats","echo","edge","eel","egg","eggs","ego","eight","elbow","elder","elect","elf","elite","elk","elm","elves","email","ember","empty","emu","end","enemy","entry","envy","epic","epoxy","equal","era","error","essay","eve","even","event","evil","exam","exile","exit","extra","eye","eyes","fable","face","facet","fact","fad","fade","faint","fair","fairy","faith","fake","fall","falls","fame","fan","fancy","fang","far","farce","fare","farm","fast","fat","fate","fault","favor","fawn","fax","fear","feast","feat","fed","fee","feed","feel","felt","femur","fence","fern","ferry","fetch","feud","fever","few","fib","fiber","field","fiend","fifth","fifty","fig","fight","file","filet","fill","film","filth","final","finch","find","fine","fire","firm","first","fish","fist","fit","five","fiver","fives","fix","fixer","fizz","flag","flair","flak","flake","flame","flank","flap","flaps","flare","flash","flask","flat","flats","flaw","flea","fleet","flesh","flex","flick","flier","flies","fling","flint","flip","flirt","float","flock","flood","floor","flop","floss","flour","flow","flu","flub","fluff","fluid","fluke","flume","flush","flute","flux","fly","flyer","foam","focus","fog","foil","fold","folk","folks","folly","font","food","fool","foot","force","forge","fork","form","fort","forth","forty","forum","foul","found","four","fowl","fox","foyer","frail","frame","frat","fraud","fray","freak","free","freon","fret","friar","fries","frill","frisk","frizz","frog","front","frost","froth","frown","fruit","fry","fryer","fudge","fuel","full","fume","fumes","fun","fund","funds","fungi","funk","funny","fur","fury","fuse","fuss","futon","fuze","fuzz","gag","gage","gain","game","gamma","gap","gape","gas","gash","gasp","gate","gates","gator","gauge","gavel","gawk","gaze","gear","gecko","geek","gel","gem","gene","genie","genoa","genre","gent","germ","ghost","ghoul","giant","gift","gild","gimp","gin","gipsy","girl","gist","give","given","giver","gizmo","glad","glade","gland","glans","glare","glass","glaze","gleam","glee","glide","glint","globe","gloom","glory","gloss","glove","glow","glue","gnat","gnome","goal","goat","going","gold","golem","golf","goner","goo","good","goof","goofy","goon","goose","goth","gouge","gown","grab","grace","grad","grade","graft","grail","grain","gram","grand","grant","grape","graph","grasp","grass","grate","gravy","gray","graze","great","greed","green","grey","grid","grief","grill","grime","grin","grind","grip","gripe","grit","grits","groan","groom","gross","group","grove","growl","grub","gruel","grump","grunt","guard","guess","guest","guide","guild","guilt","gulch","gulf","gull","gulp","gum","gun","guppy","guru","gush","gust","gut","guts","guy","gym","habit","hack","hag","hail","hair","half","hall","halo","halt","ham","hand","hands","handy","hang","hare","harp","hash","haste","hat","hatch","hate","hater","haunt","have","haven","havoc","hawk","hay","haze","hazel","head","heap","heaps","heart","heat","heavy","hedge","heed","heel","heft","heir","helix","hell","hello","helm","help","hem","hemp","hen","herb","herd","here","hero","hex","hick","hide","high","hike","hiker","hill","hilt","hind","hinge","hint","hip","hippo","hippy","hire","hiss","hit","hitch","hive","hives","hoagy","hoard","hoax","hob","hobby","hobo","hog","hoist","hold","hole","home","honey","honk","honor","hoof","hook","hooks","hoop","hoops","hoot","hop","hope","hops","horde","horn","horse","hose","host","hotel","hound","hour","hours","house","howl","hub","hue","huff","hug","hula","hulk","hull","hum","human","humor","hump","humus","hunch","hunk","hunt","hurl","hurry","hurt","hush","husk","husky","hut","hydra","hyena","hymn","hype","ibis","ice","icing","icon","idea","ideal","idiom","idiot","idle","idler","idol","igloo","iglu","ill","image","imp","inch","index","info","ingot","ink","inlet","inn","input","intro","ion","iris","iron","irony","isle","issue","itch","ivory","ivy","jab","jack","jacks","jail","jam","jamb","jar","java","jaw","jay","jazz","jean","jeans","jeep","jeer","jello","jelly","jest","jet","jetty","jewel","jig","jive","job","jock","jog","join","joint","joist","joke","joker","jolly","jolt","joust","joy","judge","jug","juice","juke","jump","junk","junky","juror","jury","kale","kayak","kazoo","kebab","keen","keep","keg","kelp","key","kick","kid","kiddy","kiln","kilo","kilt","kin","kind","king","kiss","kit","kite","kitty","kiwi","knack","knee","kneel","knell","knife","knit","knob","knock","knot","know","koala","krill","lab","label","labor","lace","lack","lad","ladle","lady","lag","lair","lake","lamb","lame","lamp","lance","land","lane","lap","lapel","lapse","lard","large","larva","laser","lash","lass","lasso","last","lat","latch","latex","lathe","latte","laugh","lava","law","lawn","laws","lay","layer","layup","leach","lead","leaf","leak","lean","leap","lear","lease","leash","least","leave","ledge","leech","leeds","leek","leer","left","lefty","leg","lego","legs","lemon","lemur","lens","lent","let","level","lever","liar","libel","lick","lid","lie","lied","life","lift","light","like","lilac","limb","limbo","lime","limit","limp","line","linen","liner","link","links","lint","lion","lip","lisp","list","lit","liter","liver","llama","loach","load","loads","loaf","loan","lob","lobby","lobe","local","lock","lodge","loft","log","logic","logo","loner","look","loom","loon","loony","loop","loot","lord","loser","loss","lost","lot","lots","lotto","lotus","love","lover","low","lower","luck","lump","lunch","lung","lure","lush","lying","mace","macro","madam","mafia","magi","magic","magma","maid","mail","main","major","maker","male","malt","mam","mama","mamba","mambo","mamma","man","mane","mango","mania","manor","map","maple","march","mare","mark","marks","mars","marsh","mash","mask","mass","mast","mat","match","mate","mates","math","maths","max","maxim","may","mayo","mayor","maze","meal","mean","means","meat","medal","medic","meet","meld","melee","melon","melt","memo","men","mend","menu","meow","mercy","merit","mesh","mess","metal","meter","meth","metro","might","mile","milk","mill","mills","mimer","mimic","min","mince","mind","mine","miner","mini","mink","minor","mint","minus","miser","miss","mist","mite","miter","mitt","mix","mixer","moan","moat","mob","mocha","mock","mod","modal","mode","model","modem","mogul","mojo","molar","mold","mole","molt","mom","momma","mommy","money","monk","month","moo","mooch","mood","moody","moon","moose","mop","mope","moped","moral","morse","moss","motel","moth","motor","motto","mould","mound","mount","mouse","mouth","move","mover","movie","mow","mucus","mud","muff","mug","mulch","mule","mum","mummy","munch","mural","muse","mush","music","musk","must","mute","mutt","mylar","nacho","name","namer","names","nanna","nap","nasal","navy","neck","need","needy","neon","nepal","nerd","nerve","nest","net","news","newt","nick","niece","night","nine","niner","ninja","ninth","noble","nod","node","noise","nomad","none","nook","noon","noose","north","nose","notch","note","noun","nudge","nuke","nun","nurse","nut","nylon","oaf","oak","oar","oasis","oat","oates","oath","ocean","octet","odds","ode","odor","offer","ogre","oil","oiler","oink","okay","old","oldie","olive","omega","omen","one","onion","onset","ooze","open","optic","oral","orange","orb","orbit","orca","order","ore","oreo","organ","ounce","out","oval","oven","over","owl","owner","oxbow","oxen","ozone","pace","pacer","pack","pact","pad","page","pager","pail","pain","pains","paint","pair","pal","pale","palm","pan","panda","pane","panel","panic","pansy","pant","pants","papa","paper","par","park","parks","part","parts","party","pass","past","pasta","paste","pat","patch","path","patio","pause","pave","paw","pawn","pay","payer","peace","peach","peak","pear","pearl","pecan","pedal","peek","peel","peer","peg","pelt","pen","penny","perch","peril","perk","pesto","pet","petal","petty","phase","phone","photo","piano","pick","pie","piece","pier","pig","piggy","pigmy","pike","pile","piles","pill","pimp","pin","pinch","pine","ping","pink","pinky","pinot","pint","pipe","pit","pita","pitch","pitt","pity","pivot","pixel","pizza","place","plaid","plain","plan","plane","plank","plant","plate","play","plaza","plea","plier","plot","plow","ploy","pluck","plug","plum","plumb","plume","plump","plus","plush","plyer","pod","poem","poet","point","poke","poker","pole","poll","polls","pond","pong","pony","pooch","poof","pool","poor","pop","poppy","porch","pore","pork","port","pose","poser","post","pot","pouch","pound","power","prank","prawn","press","prey","price","pride","prime","prism","prize","pro","probe","prom","promo","proof","prop","props","prose","prowl","prune","pry","pub","puck","puff","pug","pull","pulp","pulse","puma","pump","pun","punch","punk","punks","punt","pup","pupil","puppy","purge","purse","push","put","putt","putty","quack","quad","quake","qualm","quart","queen","query","quest","quick","quid","quiet","quilt","quirk","quirt","quiz","quota","quote","race","racer","rad","radar","radio","raft","rafts","rag","rage","raid","rail","rails","rain","raise","rake","rally","ram","ramp","ranch","range","rank","rant","rap","rapid","rash","rat","rate","rates","ratio","raw","ray","razor","razz","reach","read","ready","real","realm","ream","rear","rebel","red","reed","reef","reek","reel","reign","relay","relic","rent","reply","reset","resin","rest","retro","revel","rhino","rhyme","rib","rice","ricer","rich","ride","rider","ridge","riff","rifle","rift","rig","right","rim","rind","ring","rings","rink","rinse","riot","rip","rise","riser","risk","rite","rival","river","roach","road","roads","roar","roast","robe","robin","robot","rock","rod","rodeo","rogue","role","roll","room","rooms","roost","root","roots","rope","rose","rot","rotor","rouge","rough","round","route","rover","row","rowdy","rower","royal","rub","rube","ruby","rug","rugby","ruin","rule","ruler","rum","rummy","rumor","run","rune","rung","runt","ruse","rush","rust","rut","saber","safe","sag","saga","sage","sail","saint","salad","sale","salem","sales","salon","salsa","salt","same","sand","sands","sang","sash","sass","sauce","sauna","save","saver","savor","saw","say","scale","scan","scar","scare","scarf","scene","scent","scold","scone","scoop","scope","score","scorn","scout","scrap","sea","seal","seam","seat","seats","sect","sedan","see","seed","seek","seer","self","sell","sense","serum","serve","servo","set","setup","seven","shack","shade","shake","sham","shame","shank","shape","shard","share","shark","sharp","shave","shawl","shed","sheep","sheet","shelf","shell","shift","shill","shim","shin","ship","shirt","shoe","shoes","shop","shore","shot","shove","show","shred","shrub","shrug","shy","sick","siege","sigh","sight","sign","silk","silks","silly","silo","sin","sink","sinus","sip","sir","siren","six","sixer","sixth","sixty","size","ski","skid","skier","skill","skim","skin","skip","skirt","skit","skull","skunk","sky","slab","slack","slag","slain","slam","slang","slant","slap","slash","slate","slave","slaw","sled","sleep","sleet","slew","slews","slice","slick","slide","slime","sling","slip","slit","slob","slope","slot","sloth","slug","slum","slump","slur","slush","smack","small","smart","smash","smear","smell","smelt","smile","smirk","smith","smock","smog","smoke","snack","snag","snail","snake","snap","snare","snarl","sneak","sniff","snipe","snore","snort","snot","snow","snug","soak","soap","soar","sob","sock","sofa","softy","soil","sole","solid","son","sonar","song","sonny","soot","sooth","sore","sort","soul","sound","soup","sour","south","spa","space","spade","spam","span","spar","spare","spark","spasm","spat","spawn","speed","spell","spelt","spice","spike","spill","spin","spit","spite","splat","split","spoil","spoke","spoof","spook","spool","spoon","spore","sport","spot","spots","spout","spray","spree","spud","spur","spurt","spy","squat","squid","stab","stack","staff","stag","stage","stain","stair","stake","stalk","stall","stamp","stand","star","stare","start","stash","state","stay","stays","steak","steal","steam","steed","steel","steer","stem","step","steps","stern","stew","stick","stiff","still","stilt","sting","stink","stint","stir","stock","stoic","stomp","stone","stool","stoop","stop","stops","store","stork","storm","story","stove","strap","straw","stray","strip","strum","strut","stub","stud","study","stuff","stump","stunt","style","sub","suds","sugar","suit","suite","sum","sumer","sun","sung","super","surf","surge","sushi","sutra","swab","swag","swamp","swan","swap","swarm","sway","sweat","sweep","sweet","swell","swift","swim","swine","swing","swipe","swirl","swish","syrup","table","tack","taco","tact","tad","taffy","tag","tail","tails","take","taker","tale","talk","talks","tall","tally","talon","tan","tank","tap","tape","taps","tar","tarp","tart","task","taste","taunt","tax","taxer","taxi","taxis","tea","teach","teal","team","tear","tears","tease","teen","teens","teeth","tell","temp","tempo","ten","tense","tent","tenth","term","terms","test","text","thaw","theft","theme","then","there","theta","thick","thief","thigh","thing","think","third","thorn","three","throw","thud","thug","thumb","tick","tide","tidy","tie","tier","tiger","tilde","tile","till","time","timer","times","timid","tin","tint","tip","tire","titan","title","toad","toady","toast","today","toe","toil","token","toll","tomb","tome","ton","tone","toner","tongs","tonic","tons","tool","toon","toot","tooth","top","topic","torch","torso","toss","total","tote","totem","touch","tough","tour","tours","tow","towel","tower","town","towny","toxin","toy","trace","track","trade","trail","train","trait","trap","trash","tray","tread","treat","tree","trek","trend","triad","trial","trick","trim","trio","trip","troll","troop","trot","trout","truce","truck","true","trump","trunk","trust","truth","try","tub","tuba","tube","tuck","tug","tulip","tummy","tumor","tuna","tune","tuner","tunic","turf","turn","tush","tusk","tutor","twine","twins","twirl","twist","two","tying","type","typo","udder","ulcer","uncle","union","unit","unity","upper","upset","urn","usage","use","user","usher","using","valet","valor","value","valve","van","vase","vat","vault","vegan","veil","vein","venom","vent","venue","verb","verge","vest","vet","vial","vibe","vibes","vice","video","view","vigil","vine","vinyl","viola","viper","virgo","virus","visit","visor","vista","vocal","vodka","vogue","voice","void","volt","vote","voter","vow","vowel","wacko","wad","wade","wader","wads","wafer","waft","wag","wage","wager","wages","wagon","wail","wain","waist","wait","wake","walk","wall","waltz","wane","want","war","ward","ware","warp","wart","wash","wasp","waste","watch","water","watt","watts","wave","waver","wax","way","ways","wear","weave","web","wed","wedge","week","weird","well","wells","welsh","west","wet","whack","whale","wharf","wheat","wheel","whey","whiff","while","whim","whip","whirl","whisk","white","who","whole","whore","why","wick","widow","width","wife","wig","wild","will","wilt","wimp","win","wince","winch","wind","wine","wing","wings","wink","wipe","wiper","wire","wise","wish","wit","witch","wits","woe","wolf","woman","womb","won","wood","woods","woof","wool","word","words","work","works","world","worm","worry","worse","worst","wort","worth","wound","wow","wrack","wrap","wrath","wreck","wring","wrist","wrong","yam","yard","yarn","yawn","yay","year","years","yeast","yell","yes","yeti","yield","yoga","yolk","young","youth","zap","zebra","zinc","zing","zip","zit","zone","zoo","zoom","zero","whir","welt","whig","wand","twin","tribe","tilt","sword","spine","spear","site","shock","sent"],zn={0:"zero",1:"one",2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine"};function xs({config:e}){const n=St.useNavigate(),[t,r]=oe.useState(`${vi[Math.floor(Math.random()*vi.length)]}-${Ei[Math.floor(Math.random()*Ei.length)]}-${Math.floor(Math.random()*(99-0+1)+0)}`),[i,o]=oe.useState(e.minTeams),[l,a]=oe.useState(e.variants.length>0?e.variants[0]:null);oe.useEffect(()=>{const u=async()=>{let f=await xi(e.host);(!f||f.status!==200)&&n("/status/down")};u();const c=setInterval(async()=>{u()},1e4);return()=>clearInterval(c)},[n]);async function s(u){u.preventDefault();let c=await bs(e.host,e.key,t,i,l);(c===201||c===400)&&n(`/${t}`)}return P.jsx("div",{children:P.jsxs("div",{className:"flex flex-col items-center m-8 md:m-12",children:[P.jsx("div",{className:"w-full max-w-2xl",children:P.jsxs("div",{className:"flex flex-col items-center fade-in",children:[P.jsx("div",{className:` text-5xl font-black font-['${e.font}'] text-${e.color} mb-1 cursor-pointer`,children:P.jsx("a",{href:`${window.location.protocol}//${window.location.host}`,children:e.key})}),P.jsxs("div",{className:"font-thin mb-3",children:["Play ",e.minTeams===e.maxTeams?`${zn[e.minTeams]}`:`${zn[e.minTeams]} to ${zn[e.maxTeams]}`," player ",e.key," online against friends. To create a game or join an existing one, enter a game ID and click 'Go'."]}),P.jsxs("form",{className:"w-full flex mb-3",onSubmit:s,children:[P.jsx("input",{className:"w-10/12 p-2 text-zinc-100 bg-zinc-800 rounded-none border border-zinc-100 text-3xl font-medium box-border focus:outline-dashed outline-blue-500 outline-2",autoFocus:!0,type:"text",value:t,onChange:u=>r(u.target.value)}),P.jsx("button",{className:"w-2/12 font-bold grow-0 bg-blue-500",children:"Go"})]}),P.jsxs("div",{className:"flex w-full justify-between flex-wrap",children:[P.jsxs("div",{className:"flex order-2 md:order-1",children:[P.jsx("button",{onClick:()=>n("/rules"),title:"how to play",className:"mr-3 md:mr-2 p-2 first-line:p-2 bg-blue-500 italic text-xs font-bold",children:"game rules"}),P.jsx("div",{className:"italic text-xs py-1 px-2 border-blue-500 border border-dashed text-blue-500",children:P.jsxs("a",{href:"https://quibbble.com",target:"_blank",children:["more ",P.jsx("span",{className:"text-zinc-100 font-['lobster'] text-sm not-italic",children:"quibbble"})," games"]})})]}),P.jsxs("div",{className:"flex items-center order-1 md:order-2 mb-3 md:mb-0",children:[l?P.jsxs(P.Fragment,{children:[P.jsx("div",{className:"mr-1 font-black text-blue-500",children:"VARIANT"}),P.jsx("select",{className:"mr-1 bg-zinc-800 text-xs h-6 border font-bold border-zinc-100 focus:outline-none",id:"players",onChange:u=>a(u.target.value.replace(/\s/g,"")),children:e.variants.map(u=>P.jsx("option",{value:u,children:u},u))})]}):null,e.minTeams!==e.maxTeams?P.jsxs(P.Fragment,{children:[P.jsx("div",{className:"mx-1 font-black text-blue-500",children:"PLAYERS"}),P.jsx("select",{className:"bg-zinc-800 text-xs h-6 border font-bold border-zinc-100 focus:outline-none",id:"players",onChange:u=>o(parseInt(u.target.value)),children:Array(e.maxTeams-e.minTeams+1).fill().map((u,c)=>e.minTeams+c).map(u=>P.jsx("option",{value:u,children:u},u))})]}):null]})]})]})}),P.jsx("div",{className:"absolute bottom-8 md:bottom-12",children:P.jsx(Ht,{})})]})})}var Si={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ci=oe.createContext&&oe.createContext(Si),rt=globalThis&&globalThis.__assign||function(){return rt=Object.assign||function(e){for(var n,t=1,r=arguments.length;t{e?setTimeout(()=>t(r=>r-1),1500):t(0)},[e,t]),P.jsxs("div",{className:`flex items-center ${e?"cursor-pointer":""}`,children:[n?null:P.jsx("div",{className:"px-1",children:e?"connected":"connecting"}),P.jsx("div",{onClick:()=>{e&&(t(0),setTimeout(()=>t(n-1),1500))},className:`rounded-full w-2 h-2 ${e?"bg-green-500":"bg-orange-500"}`,children:e?null:P.jsx("div",{className:"rounded-full w-2 h-2 bg-orange-500 animate-ping"})})]})}const Ps=oe.forwardRef((e,n)=>{const{config:t,ws:r,game:i,setGame:o,network:l,setNetwork:a,chat:s,setChat:u,connected:c,setConnected:f,error:m,setError:p,children:d}=e,{gameID:g}=St.useParams(),k=St.useNavigate(),[w,A]=oe.useState(!0);oe.useEffect(()=>{c&&l&&c[l.Name]&&localStorage.setItem(g,c[l.Name])},[l,c,g]),oe.useEffect(()=>{const v=async z=>{if(z<=0){k("/");return}let K=await ks(t.host,t.key,g);if(!K){k("/status/down");return}if(K.status!==200){k("/");return}r.current=new WebSocket(`${t.websocket}/game/join?GameKey=${t.key}&GameID=${g}`),r.current.onopen=()=>{A(!0);let Y=localStorage.getItem(g);Y&&C(Y)},r.current.onclose=()=>{A(!1),setTimeout(function(){v(z-1)},1e3+(3-z)*500)},r.current.onmessage=async Y=>{let B=JSON.parse(Y.data);B.Type==="Game"?o(B.Payload):B.Type==="Network"?a(B.Payload):B.Type==="Chat"?u(le=>le.concat([B.Payload])):B.Type==="Connected"?f(B.Payload):B.Type==="Error"&&p(B.Payload)},r.current.onerror=Y=>{console.error("Socket encountered error: ",Y.message,"Closing socket"),r.current.close()}};v(3)},[r,g,history]);const C=v=>{r.current&&r.current.send(JSON.stringify({ActionType:"SetTeam",MoreDetails:{Team:v}}))},I=()=>{if(!r.current)return;const v=i&&i.MoreData&&i.MoreData.Variant?i.MoreData.Variant:"";r.current.send(JSON.stringify({ActionType:"Reset",MoreDetails:{MoreOptions:{Seed:Date.now(),Variant:v}}}))},E=()=>{r.current&&(i&&c&&l&&i.Actions&&i.Actions.length>0&&i.Actions[i.Actions.length-1].Team!==c[l.Name]||r.current.send(JSON.stringify({ActionType:"Undo"})))},[x,N]=oe.useState(!0);oe.useEffect(()=>{const v=()=>N(!x);return window.addEventListener("resize",v),D=>window.removeEventListener("resize",v)});const[q,ee]=oe.useState(0);return oe.useEffect(()=>{q>0&&setTimeout(()=>ee(q-1),1e3)},[q]),P.jsx("div",{className:"min-h-screen flex flex-col items-center p-2 md:p-4 fade-in",children:P.jsxs("div",{ref:n,className:`h-full w-full ${t.gamePageMaxWidth} flex flex-col items-center grow`,children:[P.jsxs("div",{className:"flex justify-between items-center relative w-full mb-1 justfy-self-start font-thin text-sm",children:[P.jsxs("div",{children:["Share this link: ",P.jsx("span",{className:"underline cursor-pointer",onClick:()=>{ee(1),navigator.clipboard.writeText(`${window.location.protocol}//${window.location.host}/${g}`)},children:`${window.location.protocol}//${window.location.host}/${g}`}),q>0?P.jsxs("div",{className:"absolute mt-2 w-full flex justify-center",children:[P.jsx("div",{className:"absolute top-[-12px] w-6 overflow-hidden inline-block",children:P.jsx("div",{className:" h-4 w-4 bg-zinc-600 rotate-45 transform origin-bottom-left"})}),P.jsx("div",{className:"font-bold text-xs text-center bg-zinc-600 px-2 py-1",children:"copied!"})]}):null]}),P.jsx("div",{className:"px-1",children:P.jsx(As,{isConn:w})})]}),P.jsx("hr",{className:"w-full mb-2"}),P.jsxs("div",{className:"flex w-full justify-between items-center mb-4",children:[P.jsx("div",{className:"flex",children:i?i.Teams.map(v=>P.jsx("div",{className:`text-xs flex items-center justify-center font-bold cursor-pointer mr-1 w-6 h-6 rounded-full border-4 border-${v}-500 ${l&&c&&c[l.Name]===v?`bg-${c[l.Name]}-500`:""}`,onClick:()=>C(v),children:i&&i.MoreData&&i.MoreData.Points?i.MoreData.Points[v]:""},v)):null}),P.jsx("div",{className:`font-extrabold ${i&&c&&l&&c[l.Name]&&i.Winners.length===0?`text-${i.Turn}-500`:"text-zinc-100"} ${i&&l&&c&&c[l.Name]===i.Turn&&i.Winners.length===0?"animate-pulse":""}`,children:i&&c&&l&&c[l.Name]?i.Message:P.jsxs("div",{className:"flex items-center animate-pulse",children:[P.jsx(Ss,{className:"mr-1"}),P.jsx("div",{children:"select a team"})]})})]}),P.jsx("div",{className:"h-full w-full flex flex-col justify-center items-center grow",children:d}),P.jsx("hr",{className:"w-full mb-2"}),P.jsxs("div",{className:"w-full flex justify-between items-center",children:[P.jsx("div",{className:`leading-4 text-2xl font-black text-${t.color} cursor-pointer`,children:P.jsxs("button",{onClick:()=>{sessionStorage.setItem("gameID",""),k("/")},children:[P.jsx("span",{className:`font-['${t.font}']`,children:t.key}),P.jsx("span",{className:"ml-1 text-[0.5rem] md:text-xs text-zinc-100",children:i&&i.MoreData&&i.MoreData.Variant?i.MoreData.Variant:""})]})}),P.jsxs("div",{className:"flex",children:[P.jsx("button",{onClick:()=>I(),title:"reset game",className:`p-2 ${i&&i.Winners.length>0?"bg-blue-500":"bg-zinc-500"} mr-3 md:mr-2 rounded-full`,children:P.jsx(Cs,{})}),P.jsx("button",{onClick:()=>E(),title:"undo move",className:`p-2 ${i&&c&&l&&i.Actions&&i.Actions.length>0&&i.Actions[i.Actions.length-1].Team===c[l.Name]?"bg-amber-500":"bg-zinc-700 text-zinc-500 cursor-default"} mr-3 md:mr-2 rounded-full`,children:P.jsx(Ts,{})}),P.jsx("button",{onClick:()=>{sessionStorage.setItem("gameID",g),k("/rules")},title:"how to play",className:"p-2 bg-blue-500 italic text-xs font-bold",children:"game rules"}),P.jsx("div",{className:"hidden md:flex italic text-xs ml-2 py-1 px-2 border-blue-500 border border-dashed text-blue-500",children:P.jsxs("a",{href:"https://quibbble.com",target:"_blank",children:["more ",P.jsx("span",{className:"text-zinc-200 font-['lobster'] text-sm not-italic",children:"quibbble"})," games"]})})]})]})]})})}),Ai=["http","https","mailto","tel"];function Os(e){const n=(e||"").trim(),t=n.charAt(0);if(t==="#"||t==="/")return n;const r=n.indexOf(":");if(r===-1)return n;let i=-1;for(;++ii||(i=n.indexOf("#"),i!==-1&&r>i)?n:"javascript:void(0)"}/*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh diff --git a/package-lock.json b/package-lock.json index 0340619..6d9f3a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@quibbble/boardgame", - "version": "1.1.1", + "version": "1.1.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@quibbble/boardgame", - "version": "1.1.1", + "version": "1.1.2", "license": "MIT", "devDependencies": { "@tailwindcss/typography": "^0.5.10", diff --git a/package.json b/package.json index e2ad9cc..96e5789 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@quibbble/boardgame", "private": false, - "version": "1.1.1", + "version": "1.1.2", "description": "React component library for Quibbble boardgames.", "main": "dist/index.umd.js", "module": "dist/index.mjs", diff --git a/src/components/DownPage/DownPage.jsx b/src/components/DownPage/DownPage.jsx index 419acfc..19c51b4 100644 --- a/src/components/DownPage/DownPage.jsx +++ b/src/components/DownPage/DownPage.jsx @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useEffect } from "react"; import { useNavigate } from "react-router-dom"; import { Footer } from "../Footer" import { Health } from "../../api/API"; @@ -7,13 +7,18 @@ export function DownPage({ config }) { const navigate = useNavigate(); - setInterval(function () { - async function fetchHealth() { + useEffect(() => { + const checkHealth = async () => { let response = await Health(config.host); if (response && response.status === 200) navigate(`/`); } - fetchHealth() - }, 5000); + checkHealth(); + + const interval = setInterval(async () => { + checkHealth(); + }, 10000); + return () => clearInterval(interval); + }, [navigate]); return (
diff --git a/src/components/HomePage/HomePage.jsx b/src/components/HomePage/HomePage.jsx index 04fbc19..52efce8 100644 --- a/src/components/HomePage/HomePage.jsx +++ b/src/components/HomePage/HomePage.jsx @@ -15,12 +15,17 @@ export function HomePage({ config }) { const [variant, setVariant] = useState(config.variants.length > 0 ? config.variants[0] : null) useEffect(() => { - async function fetchHealth() { + const checkHealth = async () => { let response = await Health(config.host); if (!response || response.status !== 200) navigate(`/status/down`); } - fetchHealth() - }, [history]) + checkHealth(); + + const interval = setInterval(async () => { + checkHealth(); + }, 10000); + return () => clearInterval(interval); + }, [navigate]); async function handleGo(e) { e.preventDefault(); diff --git a/src/util/adjectives.js b/src/util/adjectives.js index 6aa9a91..cec1fbc 100644 --- a/src/util/adjectives.js +++ b/src/util/adjectives.js @@ -659,7 +659,6 @@ export const Adjectives = [ "proof", "prosy", "proud", - "pubic", "pudgy", "puff", "puffy",