hopple 0.0.0 → 0.1.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/hopple.js ADDED
@@ -0,0 +1,2941 @@
1
+ #!/usr/bin/env node
2
+ import{spawn as Sr}from"node:child_process";import{relative as de}from"node:path";var M={name:"hopple",private:!0,version:"0.1.0-rc.2",license:"MIT",type:"module",description:"The SDK's command line. `hopple dev` runs a built game the way a real host runs it; publish and list join it.",engines:{node:">=22.18"},bin:{hopple:"./dist/hopple.js"},devDependencies:{"@hopple/host":"*","@hopple/manifest":"*","@hopple/sdk":"*","@hopple/shared":"*","@types/jsdom":"^27.0.0","@types/node":"^26.1.2",esbuild:"^0.25.0",jsdom:"^28.0.0",typescript:"~6.0.3",vite:"^8.3.1","vite-plugin-singlefile":"^2.3.3"},scripts:{build:"node build.ts",prepare:"node build.ts",typecheck:"tsc --noEmit",test:"NODE_COMPILE_CACHE=$npm_config_local_prefix/node_modules/.cache/node-compile node --test test/*.test.ts"}};import{execFile as it,spawn as st}from"node:child_process";import{readFile as lt,stat as ut}from"node:fs/promises";import{basename as W,dirname as w,extname as fe,join as pe,resolve as T}from"node:path";import{promisify as ct}from"node:util";var dt=ct(it),C=["hopple.config.ts","hopple.config.js","hopple.config.json"],me='{ "build": "npm run build", "page": "dist/index.html", "manifest": { \u2026 } }',pt=["$schema","build","page","manifest"];async function F(e){let t=T(e);if(await he(t)){if(C.includes(W(t)))return t;throw new Error(`${t} is not a hopple config. Name the game's project instead: its directory, or its ${C.join(", ")}.`)}for(let n=t;;n=w(n)){let r=[];for(let o of C)await he(pe(n,o))&&r.push(o);if(r.length>1)throw new Error(`${n} has ${r.join(" and ")}. Keep one: hopple can't tell which of them you mean.`);if(r.length===1)return pe(n,r[0]);if(w(n)===n)return null}}async function O(e){let t=W(e),n=await ht(e);if(typeof n!="object"||n===null||Array.isArray(n))throw new Error(`${t} must ${fe(e)===".json"?"be":"export as its default"} an object, like ${me}.`);let r=n,o=Object.keys(r).filter(u=>!pt.includes(u));if(o.length>0)throw new Error(`${t} has ${o.map(u=>`"${u}"`).join(", ")}, which hopple doesn't know. It takes "build", "page" and "manifest".`);let{build:a,page:i,manifest:s}=r;if(typeof i!="string"||!/\.html?$/i.test(i))throw new Error(`${t} needs "page": the built .html file, relative to it (like "dist/index.html").`);if(a!==void 0&&(typeof a!="string"||a.trim()===""))throw new Error(`${t}: "build" must be the command that builds the game (like "npm run build"), or left out.`);return{path:e,build:a,page:T(w(e),i),manifest:s}}async function H(e,t={}){let n=t.cwd??process.cwd(),r=await F(T(n,e??"."));if(r===null){if(e!==void 0)throw new Error(S(T(n,e)));return null}let o=await O(r);return o.build!==void 0&&t.build!==!1&&await ft(o.build,w(r)),o}function S(e){return`No game here: there is no ${C.join(", ")} in ${e} or above it. Start a game with \`hopple create\`, or add a hopple.config.json beside package.json: ${me}`}async function ht(e){let t=W(e);if(fe(e)===".json")try{return JSON.parse(await lt(e,"utf8"))}catch(r){throw new Error(`${t} is not valid JSON: ${r instanceof Error?r.message:String(r)}`)}let n=["const { pathToFileURL } = await import('node:url');","const loaded = await import(pathToFileURL(process.argv[1]).href);","if (!('default' in loaded)) { console.error('It has no default export.'); process.exit(2); }",'process.stdout.write(JSON.stringify(loaded.default) ?? "null");'].join(`
3
+ `);try{let{stdout:r}=await dt(process.execPath,["--disable-warning=ExperimentalWarning","--input-type=module","-e",n,e],{cwd:w(e),maxBuffer:16777216});return JSON.parse(r)}catch(r){let o=r.stderr?.trim();throw new Error(`${t} could not be loaded: ${o||(r instanceof Error?r.message:String(r))}`)}}function ft(e,t){return new Promise((n,r)=>{console.log(`
4
+ ${e}
5
+ `);let o=st(e,{cwd:t,shell:!0,stdio:"inherit"});o.on("error",r),o.on("exit",(a,i)=>{a===0?n():r(new Error(`The build failed (\`${e}\` ${i?`was killed by ${i}`:`exited with ${a}`}), so nothing else was done.`))})})}async function he(e){try{return(await ut(e)).isFile()}catch{return!1}}import{readFile as Ae}from"node:fs/promises";import{basename as J,dirname as Xt,relative as Ee,resolve as Yt}from"node:path";var z={type:"object",properties:{schema:{type:"number",const:1},id:{type:"string",pattern:"^[a-z0-9]+(?:-[a-z0-9]+)*$",maxLength:64,errorMessage:"must be lowercase letters, digits and hyphens"},owner:{type:"string",pattern:"^[a-z0-9]+(?:-[a-z0-9]+)*$",maxLength:64,errorMessage:"must be a handle: lowercase letters, digits and hyphens"},version:{type:"string",pattern:"^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$",errorMessage:"must look like 1.0.0"},title:{type:"string",pattern:"\\S",maxLength:60,errorMessage:"must not be blank"},description:{type:"string",pattern:"\\S",maxLength:500,errorMessage:"must not be blank"},cover:{type:"string",pattern:"^(?!/)(?!.*\\.\\.)[A-Za-z0-9._/-]+\\.(?:png|jpe?g|webp)$",maxLength:200,errorMessage:'must be the path of a .png, .jpg or .webp file beside the config, like "cover.png"'},orientation:{$ref:"#/definitions/Orientation"},sdk:{type:"string",pattern:"^[\\^~]?\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$",errorMessage:"must be a version like 1.0.0, ^1.0.0 or ~1.0.0"},layout:{$ref:"#/definitions/LayoutDeclaration"},analytics:{$ref:"#/definitions/AnalyticsDeclaration"},save:{$ref:"#/definitions/SaveDeclaration"},score:{$ref:"#/definitions/ScoreDeclaration"},achievements:{$ref:"#/definitions/AchievementDeclaration"},input:{$ref:"#/definitions/InputDeclaration"},audio:{anyOf:[{$ref:"#/definitions/AudioDeclaration"},{type:"null"}]}},required:["schema","id","version","title","orientation","sdk","audio"],additionalProperties:{}},mt={type:"string",enum:["portrait","landscape","any"]},gt={type:"object",properties:{insets:{$ref:"#/definitions/InsetMode"}},required:["insets"],additionalProperties:{}},bt={type:"string",enum:["draw-under","reserve"]},xt={type:"object",properties:{events:{type:"object",additionalProperties:{$ref:"#/definitions/AnalyticsShape"},maxProperties:64,propertyNames:{pattern:"^[a-z0-9]+(?:[._-][a-z0-9]+)*$",maxLength:48,not:{pattern:"^hopple\\."},errorMessage:'must be lowercase letters, digits, dots, hyphens and underscores, and must not start with "hopple.", which the host uses'}}},required:["events"],additionalProperties:{}},yt={type:"object",additionalProperties:{$ref:"#/definitions/AnalyticsType"},maxProperties:8,propertyNames:{pattern:"^[a-z0-9]+(?:[._-][a-z0-9]+)*$",maxLength:24,errorMessage:"must be a prop name of lowercase letters, digits, dots, hyphens and underscores"}},vt={type:"string",enum:["string","number","boolean"]},kt={type:"object",properties:{bytes:{type:"integer",exclusiveMinimum:0,maximum:1048576}},required:["bytes"],additionalProperties:{}},wt={type:"object",properties:{boards:{type:"object",additionalProperties:{$ref:"#/definitions/ScoreBoard"},minProperties:1,maxProperties:16,propertyNames:{pattern:"^[a-z0-9]+(?:[._-][a-z0-9]+)*$",maxLength:48,errorMessage:"must be lowercase letters, digits, dots, hyphens and underscores"}}},required:["boards"],additionalProperties:{}},St={type:"object",properties:{title:{type:"string",pattern:"\\S",maxLength:40,errorMessage:"must not be blank"},direction:{$ref:"#/definitions/ScoreDirection"},format:{$ref:"#/definitions/ScoreFormat"}},required:["title","direction"],additionalProperties:{}},jt={type:"string",enum:["asc","desc"]},At={type:"string",enum:["integer","decimal","duration-ms"]},Et={type:"object",properties:{list:{type:"object",additionalProperties:{$ref:"#/definitions/Achievement"},minProperties:1,maxProperties:128,propertyNames:{pattern:"^[a-z0-9]+(?:[._-][a-z0-9]+)*$",maxLength:48,errorMessage:"must be lowercase letters, digits, dots, hyphens and underscores"}}},required:["list"],additionalProperties:{}},Pt={type:"object",properties:{title:{type:"string",pattern:"\\S",maxLength:40,errorMessage:"must not be blank"},detail:{type:"string",pattern:"\\S",maxLength:120,errorMessage:"must not be blank"},icon:{type:"string",pattern:"\\S",maxLength:8,errorMessage:"must not be blank"},secret:{type:"boolean"},progress:{$ref:"#/definitions/AchievementProgress"}},required:["title"],additionalProperties:{}},B={type:"object",properties:{target:{type:"number",minimum:-9007199254740991,maximum:9007199254740991},direction:{$ref:"#/definitions/ScoreDirection"},format:{$ref:"#/definitions/ScoreFormat"},tiers:{type:"array",items:{$ref:"#/definitions/AchievementTier"},maxItems:8}},required:["target"],additionalProperties:{}},$t={type:"object",properties:{at:{type:"number",minimum:-9007199254740991,maximum:9007199254740991},title:{type:"string",pattern:"\\S",maxLength:40,errorMessage:"must not be blank"},icon:{type:"string",pattern:"\\S",maxLength:8,errorMessage:"must not be blank"}},required:["at","title"],additionalProperties:{}},Mt={type:"object",properties:{supported:{type:"array",items:{$ref:"#/definitions/InputDeviceSet"},minItems:1,maxItems:8},actions:{type:"object",additionalProperties:{$ref:"#/definitions/InputAction"},maxProperties:64,propertyNames:{pattern:"^[a-z0-9]+(?:[._-][a-z0-9]+)*$",maxLength:48,errorMessage:"must be lowercase letters, digits, dots, hyphens and underscores"}},controls:{type:"object",additionalProperties:{$ref:"#/definitions/ControlLayout"},maxProperties:8,propertyNames:{pattern:"^[a-z0-9]+(?:[._-][a-z0-9]+)*$",maxLength:48,errorMessage:"must be a layout name of lowercase letters, digits, dots, hyphens and underscores"}}},additionalProperties:{}},Ct={type:"array",items:{$ref:"#/definitions/InputDevice"},minItems:1,maxItems:8},Tt={type:"string",enum:["keyboard","mouse","touch","gamepad"]},Ot={type:"object",properties:{bind:{$ref:"#/definitions/InputBindings"},title:{type:"string",pattern:"\\S",maxLength:40,errorMessage:"must not be blank"},label:{type:"string",pattern:"\\S",maxLength:8,errorMessage:"must not be blank"}},required:["bind"],additionalProperties:{}},zt={type:"array",items:{$ref:"#/definitions/InputBinding"},minItems:1,maxItems:8},V={type:"string",pattern:"^(?:key\\.(?!Escape$)(?=.{1,48}$)[A-Za-z][A-Za-z0-9]*|pointer\\.(?:primary|secondary)|mouse\\.(?:left|middle|right)|touch\\.tap|controls\\.(?=.{1,48}$)[a-z0-9]+(?:[_-][a-z0-9]+)*|pad\\.(?:north|south|east|west|start|select)|pad\\.(?:left|right)\\.(?:north|south|east|west|bumper|trigger))$",errorMessage:"is not a binding this SDK knows (a thumbstick is read rather than bound, and Escape is the host's key)"},G={type:"object",properties:{left:{$ref:"#/definitions/ControlZoneSlots"},right:{$ref:"#/definitions/ControlZoneSlots"},full:{$ref:"#/definitions/ControlZoneSlots"}},additionalProperties:{}},It={type:"object",additionalProperties:{$ref:"#/definitions/ControlSlot"},maxProperties:8,propertyNames:{pattern:"^[a-z0-9]+(?:[._-][a-z0-9]+)*$",maxLength:48,errorMessage:"must be a control id of lowercase letters, digits, dots, hyphens and underscores"}},Rt={type:"object",properties:{type:{type:"string",enum:["buttons","thumbstick"]},buttons:{type:"array",items:{type:"string"},minItems:1,maxItems:8},shape:{$ref:"#/definitions/ControlShape"},as:{anyOf:[{$ref:"#/definitions/InputStick"},{type:"object",additionalProperties:{$ref:"#/definitions/InputBinding"}}]},axis:{$ref:"#/definitions/ControlAxis"}},required:["type"],additionalProperties:{},if:{properties:{type:{const:"buttons"}},required:["type"]},then:{required:["buttons"],properties:{as:{type:"object",additionalProperties:{$ref:"#/definitions/InputBinding"}},axis:{not:{},errorMessage:"is only for a thumbstick"}}},else:{properties:{as:{$ref:"#/definitions/InputStick"}}}},Nt={type:"string",enum:["row","column","diamond","cluster"]},U={type:"string",pattern:"^(?:controls\\.(?=.{1,48}$)[a-z0-9]+(?:[_-][a-z0-9]+)*|pad\\.stick|pad\\.(?:left|right)\\.stick)$",errorMessage:"must name a thumbstick, such as pad.left.stick"},Lt={type:"string",enum:["x","y"]},_t={type:"object",properties:{channels:{type:"object",additionalProperties:{$ref:"#/definitions/AudioChannel"},maxProperties:8,propertyNames:{pattern:"^[a-z0-9]+(?:[._-][a-z0-9]+)*$",maxLength:48,not:{const:"master"},errorMessage:'must be lowercase letters, digits, dots, hyphens and underscores, and must not be "master", which every host adds itself'}}},additionalProperties:{}},Dt={type:"object",properties:{title:{type:"string",pattern:"\\S",maxLength:40,errorMessage:"must not be blank"}},required:["title"],additionalProperties:{}},ge={GameManifest:z,Orientation:mt,LayoutDeclaration:gt,InsetMode:bt,AnalyticsDeclaration:xt,AnalyticsShape:yt,AnalyticsType:vt,SaveDeclaration:kt,ScoreDeclaration:wt,ScoreBoard:St,ScoreDirection:jt,ScoreFormat:At,AchievementDeclaration:Et,Achievement:Pt,AchievementProgress:B,AchievementTier:$t,InputDeclaration:Mt,InputDeviceSet:Ct,InputDevice:Tt,InputAction:Ot,InputBindings:zt,InputBinding:V,ControlLayout:G,ControlZoneSlots:It,ControlSlot:Rt,ControlShape:Nt,InputStick:U,ControlAxis:Lt,AudioDeclaration:_t,AudioChannel:Dt};var Q="game.manifest.json",I=1024*1024;function Z(e){let t=(n,...r)=>r.every((o,a)=>e[n+a]===o);return t(0,137,80,78,71,13,10,26,10)?"image/png":t(0,255,216,255)?"image/jpeg":t(0,82,73,70,70)&&t(8,87,69,66,80)?"image/webp":null}var Wt=Number.MAX_SAFE_INTEGER;var Ft=B.properties.target.maximum;var Ht=z.required,ve=Object.keys(G.properties),Ir=new RegExp(V.pattern),Rr=new RegExp(U.pattern);function j(e){let t=[],n=(r,o)=>{t.some(a=>a.field===r&&a.message===o)||t.push({field:r,message:o})};return m(z,e,"",n),t.length===0&&Ut(e,n),t.length>0?{ok:!1,problems:t}:{ok:!0,manifest:e}}function A(e){return e.map(t=>t.field===""?`the manifest ${t.message}`:`\`${t.field}\` ${t.message}`).join("; ")}var Bt="#/definitions/";function be(e){let t=e;for(;typeof t.$ref=="string";){let n=t.$ref.slice(Bt.length),r=ge[n];if(r===void 0)throw new Error(`the manifest schema has no definition ${n}`);t=r}return t}function X(e,t){let n=!0;return m(e,t,"",()=>{n=!1}),n}function ke(e){return Array.isArray(e)?"array":e===null?"null":typeof e=="number"?Number.isInteger(e)?"integer":"number":typeof e}function xe(e,t){let n=ke(e);return n===t||t==="number"&&n==="integer"}var ye={string:"a string",number:"a number",integer:"a whole number",boolean:"true or false",object:"an object",array:"a list",null:"null"};function Y(e,t,n=48){let r=[...t].length>n?`${[...t].slice(0,n).join("")}\u2026`:t;return e===""?r:`${e}.${r}`}function m(e,t,n,r){let o=be(e);if(Array.isArray(o.anyOf)){let i=o.anyOf.map(be);if(i.some(u=>X(u,t)))return;let s=i.find(u=>xe(t,u.type));s!==void 0?m(s,t,n,r):r(n,`must be ${i.map(u=>ye[String(u.type)]).join(" or ")}`);return}if(o.type!==void 0&&!xe(t,o.type)){r(n,`must be ${ye[String(o.type)]??String(o.type)}`);return}if("const"in o&&t!==o.const){r(n,`must be ${JSON.stringify(o.const)}`);return}if(Array.isArray(o.enum)&&!o.enum.includes(t)){r(n,`must be one of ${o.enum.join(", ")}`);return}let a=typeof o.errorMessage=="string"?o.errorMessage:void 0;if(typeof t=="string"){let i=[...t].length;typeof o.pattern=="string"&&!new RegExp(o.pattern,"u").test(t)?r(n,a??`must match ${o.pattern}`):typeof o.maxLength=="number"&&i>o.maxLength?r(n,`must be at most ${o.maxLength} characters`):typeof o.minLength=="number"&&i<o.minLength&&r(n,`must be at least ${o.minLength} characters`)}if(typeof t=="number"&&(typeof o.minimum=="number"&&t<o.minimum?r(n,`must be at least ${o.minimum}`):typeof o.exclusiveMinimum=="number"&&t<=o.exclusiveMinimum?r(n,`must be above ${o.exclusiveMinimum}`):typeof o.maximum=="number"&&t>o.maximum?r(n,`must be at most ${o.maximum}`):typeof o.exclusiveMaximum=="number"&&t>=o.exclusiveMaximum&&r(n,`must be below ${o.exclusiveMaximum}`)),o.not!==void 0&&X(o.not,t)&&r(n,a??"is not allowed"),Array.isArray(t)?Vt(o,t,n,r):ke(t)==="object"&&Gt(o,t,n,r),o.if!==void 0){let i=X(o.if,t)?o.then:o.else;i!==void 0&&m(i,t,n,r)}if(Array.isArray(o.allOf))for(let i of o.allOf)m(i,t,n,r)}function Vt(e,t,n,r){if(typeof e.minItems=="number"&&t.length<e.minItems?r(n,e.minItems===1?"must not be empty":`must hold at least ${e.minItems}`):typeof e.maxItems=="number"&&t.length>e.maxItems&&r(n,`must hold at most ${e.maxItems}`),e.items!==void 0)for(let[o,a]of t.entries())typeof a=="object"&&a!==null?m(e.items,a,`${n}[${o}]`,r):m(e.items,a,n,(i,s)=>{r(i,i===n?`${JSON.stringify(a)} ${s}`:s)})}function Gt(e,t,n,r){let o=Object.keys(t);typeof e.minProperties=="number"&&o.length<e.minProperties?r(n,e.minProperties===1?"must declare at least one":`must declare at least ${e.minProperties}`):typeof e.maxProperties=="number"&&o.length>e.maxProperties&&r(n,`must declare at most ${e.maxProperties}`);let a=e.propertyNames,i=typeof a?.maxLength=="number"?a.maxLength:void 0,s=e.properties??{},u=e.required??[];for(let[l,c]of Object.entries(s))l in t?m(c,t[l],Y(n,l),r):u.includes(l)&&r(Y(n,l),"is required");for(let l of o){if(l in s)continue;let c=Y(n,l,i);if(a!==void 0){let p;m(a,l,"",(h,f)=>{p??=f}),p!==void 0&&r(c,p)}typeof e.additionalProperties=="object"&&e.additionalProperties!==null&&m(e.additionalProperties,t[l],c,r)}}function Ut(e,t){let n=new Set(Object.keys(e.input?.actions??{}));for(let[r,o]of Object.entries(je(e)))for(let a of ve)for(let[i,s]of Object.entries(o[a]??{})){if(s.type!=="buttons"||s.buttons===void 0)continue;let u=`input.controls.${r}.${a}.${i}`;for(let l of s.buttons)n.has(l)||t(`${u}.buttons`,`names no declared action "${l}"`);if(typeof s.as=="object")for(let l of Object.keys(s.as))s.buttons.includes(l)||t(`${u}.as`,`names no button "${l}" in this control`)}for(let[r,o]of Object.entries(we(e))){let a=o.progress;if(a?.tiers===void 0)continue;let i=Se(o),s=null;for(let[u,l]of a.tiers.entries()){let c=`achievements.list.${r}.progress.tiers[${u}].at`;s!==null&&!K(i,l.at,s)&&t(c,`must be past ${s}, which is the tier before it`),K(i,l.at,a.target)&&t(c,`must be short of the target of ${a.target}`),s=l.at}}}function K(e,t,n){return e==="asc"?t<n:t>n}function we(e){return e.achievements?.list??{}}function Se(e){return e.progress?.direction??"desc"}function je(e){return e.input?.controls??{}}function k(e){let t=J(e.path);if(e.manifest===void 0)return{manifest:null,problem:`${t} has no "manifest": it is what says what the game is.`};let n=j(e.manifest);return n.ok?{manifest:n.manifest,problem:null}:{manifest:null,problem:`${t}, in the manifest: ${A(n.problems)}`}}async function R(e){let{manifest:t,problem:n}=k(e);if(t===null)throw new Error(n??`${e.path} has no usable manifest.`);let r;try{r=await Ae(e.page)}catch{throw new Error(ee(e))}let o=te(r.toString("utf8"));if(o.length>0)throw new Error(ne(e.page,o));let a=t.cover===void 0?null:await Kt(e,t.cover);return{manifest:t,text:`${JSON.stringify(t,null,2)}
6
+ `,page:e.page,bytes:r,cover:a}}async function Kt(e,t){let n=Yt(Xt(e.path),t),r=Ee(process.cwd(),n)||n,o;try{o=await Ae(n)}catch{throw new Error(`There is no ${r}, which is the "cover" in the manifest.`)}if(o.byteLength>I)throw new Error(`${r}, the cover, is over ${I/1024/1024} MB. Make it smaller: 1200 \xD7 630 is enough.`);let a=Z(o);if(a===null)throw new Error(`${r}, the cover, is not a PNG, JPEG or WebP image.`);return{path:n,type:a,bytes:o}}function ee(e){return`There is no ${Ee(process.cwd(),e.page)||e.page}, which is the "page" in ${J(e.path)}. Has the game been built?`}var Qt=/<(script|link|img|audio|video|source|track|embed|iframe|input)\b([^>]*)>/gi,Zt=/\b(src|href)\s*=\s*("[^"]*"|'[^']*'|[^\s"'>]+)/gi,Jt=/url\(\s*("[^"]*"|'[^']*'|[^)]*?)\s*\)/gi,en=/@import\s+("[^"]*"|'[^']*')/gi;function te(e){let t=new Set,n=o=>{let a=o.replace(/^["']|["']$/g,"").trim();a===""||/^(data:|blob:|#|about:)/i.test(a)||t.add(a)},r=e.replace(/<!--[\s\S]*?-->/g,"").replace(/(<script\b[^>]*>)[\s\S]*?<\/script\s*>/gi,"$1</script>");for(let[,,o]of r.matchAll(Qt))for(let[,,a]of(o??"").matchAll(Zt))n(a??"");for(let[,o]of r.matchAll(/<style\b[^>]*>([\s\S]*?)<\/style\s*>/gi)){for(let[,a]of(o??"").matchAll(Jt))n(a??"");for(let[,a]of(o??"").matchAll(en))n(a??"")}return[...t]}function ne(e,t){return`${J(e)} loads ${t.map(n=>`"${n}"`).join(", ")} from outside itself. Only the page is published, so everything it uses has to be inside it: inline scripts and styles, and data: URLs for images, sounds and fonts.`}import{chmodSync as tn,mkdirSync as nn,readFileSync as rn,writeFileSync as on}from"node:fs";import{homedir as an,hostname as sn}from"node:os";import{dirname as ln,join as re}from"node:path";var Pe="https://hopple.app",un="hopple-cli/0.1.0-rc.2";function cn(){let e=(process.env.DO_NOT_TRACK??"").trim().toLowerCase();return e!==""&&e!=="0"&&e!=="false"}var L="https://discord.gg/ggRVkrskG";function v(e){return(e??process.env.HOPPLE_SERVER??Pe).replace(/\/+$/,"")}function dn(e){return`${e.replace(/\/+$/,"")}/api`}function $e(){let e=process.env.HOPPLE_CONFIG_DIR??re(process.env.XDG_CONFIG_HOME??re(an(),".config"),"hopple");return re(e,"sessions.json")}function Me(){try{let e=JSON.parse(rn($e(),"utf8"));return typeof e=="object"&&e!==null?e:{}}catch{return{}}}function _(e){let t=Me()[e];return t!==void 0&&typeof t.token=="string"?t:null}function N(e,t){let n=Me();t===null?delete n[e]:n[e]=t;let r=$e();nn(ln(r),{recursive:!0}),on(r,`${JSON.stringify(n,null,2)}
7
+ `,{mode:384}),tn(r,384)}function Ce(e){return{token:e.token,username:e.me.username,signedIn:e.me.signedIn}}async function d(e,t,n={}){let{token:r,...o}=n,a={...o.headers??{},"user-agent":un};r!==void 0&&(a.authorization=`Bearer ${r}`),cn()&&(a["hopple-usage"]="off");let i;try{i=await fetch(`${dn(e)}${t}`,{...o,headers:a})}catch(u){let l=u.cause,c=typeof l?.code=="string"?l.code:typeof l?.message=="string"?l.message:"",p=e===Pe?` If it stays that way, tell us on the Hopple Discord: ${L}`:"";throw new Error(`${e} could not be reached${c?` (${c})`:""}. Is that the right address, and is the server up?${p}`)}let s=await i.json().catch(()=>({}));return{status:i.status,body:s}}function g(e,t){return typeof e.error=="string"?e.error:`${t} It did not say why. If it keeps happening, tell us on the Hopple Discord: ${L}`}async function b(e){let t=_(e);if(t!==null){let o=await d(e,"/me",{token:t.token});if(o.status===200){let a={token:t.token,username:String(o.body.username),signedIn:o.body.signedIn===!0};return N(e,a),a}if(o.status!==401)throw new Error(g(o.body,`${e} answered ${o.status}.`))}let n=await d(e,"/session",{method:"POST"});if(n.status!==200)throw new Error(g(n.body,`${e} would not start a session.`));let r=Ce(n.body);return N(e,r),r}var pn="hopple_device",hn=5;async function Te(e,t){let n=t.wait??(l=>new Promise(c=>setTimeout(c,l))),r=await b(e),o=await d(e,"/auth/device/start",{method:"POST",token:r.token,headers:{"content-type":"application/json"},body:JSON.stringify({label:`hopple CLI on ${sn()}`})});if(o.status===404)throw new Error(`${e} is a Hopple server from before it could sign a terminal in. It needs updating first.`);if(o.status!==200)throw new Error(g(o.body,"The sign-in could not be started."));let a=String(o.body.code),i=`${e}/#${pn}=${encodeURIComponent(a)}`;t.say(`Open this where you are signed in to ${e}, or can sign in:`),t.say(""),t.say(` ${i}`),t.say(""),t.say(`Check that it shows the code ${a}, then approve it there.`),t.say("Waiting\u2026"),t.open?.(i);let s=Number(o.body.interval)||2,u=Date.now()+(Number(o.body.expiresIn)||600)*1e3;for(;Date.now()<u;){await n(s*1e3);let l=await d(e,"/auth/device/collect",{method:"POST",token:r.token,headers:{"content-type":"application/json"},body:JSON.stringify({secret:o.body.secret})});if(l.status===202)continue;if(l.status===429){s+=hn;continue}if(l.status!==200)throw new Error(g(l.body,"The sign-in did not complete."));let c=Ce(l.body);return N(e,c),c}throw new Error("Nobody approved the sign-in in time. Run `hopple login` again for a new link.")}async function Oe(e){let t=_(e);return t===null?!1:(await d(e,"/auth/logout",{method:"POST",token:t.token}).catch(()=>{}),N(e,null),!0)}async function ze(e){let{server:t,project:n,change:r}=e,{manifest:o,problem:a}=k(n);if(o===null)throw new Error(a??"The project has no manifest.");let i=await b(t),s=o.owner??i.username,u=`/games/${encodeURIComponent(s)}/${encodeURIComponent(o.id)}/collaborators`,l=r===void 0?await d(t,u,{token:i.token}):"add"in r?await d(t,`${u}/${encodeURIComponent(r.add)}`,{method:"PUT",token:i.token}):await d(t,`${u}/${encodeURIComponent(r.remove)}`,{method:"DELETE",token:i.token});if(l.status===404&&r===void 0)throw new Error(`${s}/${o.id} is not on ${t} yet. Publish it first.`);if(l.status!==200)throw new Error(g(l.body,`${t} answered ${l.status}.`));let c=Array.isArray(l.body.collaborators)?l.body.collaborators:[];return{address:`${String(l.body.owner??s)}/${String(l.body.name??o.id)}`,handles:c.map(p=>String(p.handle))}}import{mkdir as fn,readdir as mn,writeFile as gn}from"node:fs/promises";import{basename as bn,dirname as xn,join as yn,resolve as vn}from"node:path";async function Ie(){return{".gitignore":`node_modules/
8
+ dist/
9
+ `,"README.md":"# {{title}}\n\nA [Hopple](https://hopple.app) game.\n\n```bash\nnpm install\nnpx hopple dev # build, then play it in the dev shell at http://localhost:5173\nnpm run watch # in another terminal: rebuild on every change, then reload the shell\nnpx hopple check # build, then check it can be published\nnpx hopple publish # build, check, then publish\n```\n\n- `src/game.ts` is the game.\n- `hopple.config.ts` is everything `hopple` needs: how to build the game\n (`build`), the built file that is the game (`page`), and what the game is\n and what it uses (`manifest`). Every `hopple` command builds first, so it\n works on a fresh build. Only the manifest and the page are uploaded.\n- `npm run build` typechecks, then bundles everything into `dist/index.html`.\n That one file is what gets published.\n- The files `hopple create` wrote are yours to use however you like, under\n the 0BSD license. The SDK inside your game is MIT: keep the `/*! \u2026 */`\n notice it carries, which `vite.config.ts` already does.\n","hopple.config.ts":`import type { HoppleConfig } from '@hopple/sdk';
10
+
11
+ /**
12
+ * Everything \`hopple\` needs to know about this game: how to build it, which
13
+ * built file is the game, and what the game is. Only \`manifest\` is uploaded.
14
+ */
15
+ export default {
16
+ build: 'npm run build',
17
+ page: 'dist/index.html',
18
+ manifest: {
19
+ schema: 1,
20
+ id: '{{id}}',
21
+ version: '0.1.0',
22
+ title: '{{title}}',
23
+ orientation: 'portrait',
24
+ sdk: '^{{version}}',
25
+ audio: null,
26
+ layout: { insets: 'draw-under' },
27
+ input: {
28
+ supported: [['touch'], ['mouse'], ['keyboard'], ['gamepad']],
29
+ actions: {
30
+ hop: { bind: ['pointer.primary', 'key.Space', 'pad.right.south'], title: 'Hop', label: '\u2191' },
31
+ },
32
+ },
33
+ },
34
+ } satisfies HoppleConfig;
35
+ `,"index.html":`<!doctype html>
36
+ <html lang="en">
37
+ <head>
38
+ <meta charset="utf-8" />
39
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
40
+ <title>{{title}}</title>
41
+ <style>
42
+ html,
43
+ body {
44
+ margin: 0;
45
+ height: 100%;
46
+ overflow: hidden;
47
+ background: #14161a;
48
+ }
49
+ canvas {
50
+ display: block;
51
+ width: 100%;
52
+ height: 100%;
53
+ touch-action: none;
54
+ }
55
+ </style>
56
+ </head>
57
+ <body>
58
+ <canvas></canvas>
59
+ <script type="module" src="/src/game.ts"></script>
60
+ </body>
61
+ </html>
62
+ `,"package.json":`{
63
+ "name": "{{id}}",
64
+ "private": true,
65
+ "type": "module",
66
+ "scripts": {
67
+ "build": "tsc && vite build",
68
+ "watch": "vite build --watch",
69
+ "dev": "hopple dev"
70
+ },
71
+ "dependencies": {
72
+ "@hopple/sdk": "^{{version}}"
73
+ },
74
+ "devDependencies": {
75
+ "hopple": "^{{version}}",
76
+ "typescript": "~6.0.3",
77
+ "vite": "^8.3.1",
78
+ "vite-plugin-singlefile": "^2.3.3"
79
+ }
80
+ }
81
+ `,"tsconfig.json":`{
82
+ "compilerOptions": {
83
+ "target": "ES2022",
84
+ "module": "ESNext",
85
+ "moduleResolution": "bundler",
86
+ "lib": ["ES2022", "DOM"],
87
+ "types": ["vite/client"],
88
+ "strict": true,
89
+ "noEmit": true,
90
+ "allowImportingTsExtensions": true,
91
+ "skipLibCheck": true
92
+ },
93
+ "include": ["src", "hopple.config.ts"]
94
+ }
95
+ `,"vite.config.ts":`import { defineConfig } from 'vite';
96
+ import { viteSingleFile } from 'vite-plugin-singlefile';
97
+
98
+ export default defineConfig({
99
+ // A published game is its one HTML file: every script, style and imported asset is inlined into it.
100
+ plugins: [viteSingleFile({ removeViteModuleLoader: true })],
101
+ // Minifying drops every comment unless told otherwise; this keeps the
102
+ // \`/*! \u2026 */\` notices the SDK and other libraries carry their license in.
103
+ build: { rolldownOptions: { output: { comments: { legal: true } } } },
104
+ });
105
+ `,"src/game.ts":`import { init } from '@hopple/sdk';
106
+
107
+ import type config from '../hopple.config.ts';
108
+
109
+ const GRAVITY = 2000; // px/s\xB2
110
+ const HOP = -750; // px/s
111
+ const RADIUS = 18;
112
+
113
+ const canvas = document.querySelector('canvas')!;
114
+ const context = canvas.getContext('2d')!;
115
+
116
+ // Typed by the manifest: an action, board or event the manifest doesn't declare is a compile error.
117
+ const sdk = await init<typeof config.manifest>();
118
+
119
+ let playing = false;
120
+ let paused = false;
121
+ let y = 0;
122
+ let speed = 0;
123
+ let hops = 0;
124
+ let best = 0;
125
+
126
+ /** Where the ball lands: above the host's buttons, which the game is allowed to draw under. */
127
+ const floor = () => innerHeight - sdk.layout.insets.bottom - RADIUS - 24;
128
+
129
+ function hop(): void {
130
+ if (paused) {
131
+ paused = false;
132
+ sdk.pause.set('running');
133
+ } else if (!playing) {
134
+ playing = true;
135
+ hops = 0;
136
+ y = floor();
137
+ sdk.pause.set('running');
138
+ }
139
+ speed = HOP;
140
+ hops += 1;
141
+ }
142
+
143
+ function land(): void {
144
+ playing = false;
145
+ best = Math.max(best, hops);
146
+ sdk.pause.set('unpausable');
147
+ }
148
+
149
+ function draw(): void {
150
+ const scale = devicePixelRatio;
151
+ if (canvas.width !== Math.round(innerWidth * scale) || canvas.height !== Math.round(innerHeight * scale)) {
152
+ canvas.width = Math.round(innerWidth * scale);
153
+ canvas.height = Math.round(innerHeight * scale);
154
+ }
155
+ context.setTransform(scale, 0, 0, scale, 0, 0);
156
+ context.clearRect(0, 0, innerWidth, innerHeight);
157
+
158
+ context.fillStyle = '#f2c14e';
159
+ context.beginPath();
160
+ context.arc(innerWidth / 2, playing ? y : floor(), RADIUS, 0, Math.PI * 2);
161
+ context.fill();
162
+
163
+ context.fillStyle = '#e7eae3';
164
+ context.textAlign = 'center';
165
+ context.font = '600 20px system-ui, sans-serif';
166
+ const top = sdk.layout.insets.top + 48;
167
+ const label = sdk.input.mapping.hop?.label ?? 'tap';
168
+ const text = playing ? (paused ? \`Paused: press \${label}\` : String(hops)) : \`Press \${label} to hop. Best: \${best}\`;
169
+ context.fillText(text, innerWidth / 2, top);
170
+ }
171
+
172
+ // Runs only while the host allows the loop; the player's own pause is ours, so the ball just holds still.
173
+ sdk.loop.tick((dt) => {
174
+ if (playing && !paused) {
175
+ speed += GRAVITY * dt;
176
+ y += speed * dt;
177
+ if (y >= floor()) land();
178
+ }
179
+ draw();
180
+ });
181
+
182
+ sdk.input.onAction('hop', (down) => {
183
+ if (down) hop();
184
+ });
185
+
186
+ // The host asks: its pause button, its panel opening, or the game being taken away mid-hop.
187
+ sdk.pause.on((wanted) => {
188
+ if (!playing) return;
189
+ paused = wanted;
190
+ sdk.pause.set(paused ? 'paused' : 'running');
191
+ });
192
+
193
+ // A stopped loop draws nothing, so redraw when the frame or the host's buttons move.
194
+ sdk.layout.on(() => draw());
195
+
196
+ draw();
197
+ sdk.lifecycle.ready();
198
+ `}}async function Re(e){let t=vn(e),n=bn(t);if(!j({...kn,id:n}).ok)throw new Error(`"${n}" can't be a game's id: use lowercase letters, digits and single hyphens, at most 64 characters (like "${Sn(n)}").`);let r=[];try{r=await mn(t)}catch{}if(r.length>0)throw new Error(`${t} is not empty. Pick a new directory for the game.`);let o={id:n,title:wn(n),version:M.version},a=await Ie();for(let[i,s]of Object.entries(a)){let u=yn(t,i);await fn(xn(u),{recursive:!0}),await gn(u,s.replace(/\{\{(\w+)\}\}/g,(l,c)=>o[c]??l))}return{dir:t,id:n,files:Object.keys(a).sort()}}var kn={schema:1,version:"0.1.0",title:"Probe",orientation:"any",sdk:"^0.0.0",audio:null};function wn(e){return e.split("-").filter(t=>t!=="").map(t=>t[0].toUpperCase()+t.slice(1)).join(" ")}function Sn(e){let t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,64);return t===""?"my-game":t}import{createReadStream as sr}from"node:fs";import{readFile as lr,stat as Je}from"node:fs/promises";import{createServer as ur}from"node:http";import{dirname as Qe,extname as cr,join as dr,normalize as pr,sep as hr}from"node:path";var oe=Object.freeze({muted:!1,master:1,channels:Object.freeze({})});var jn=Object.freeze({audio:!0,loop:!0,resources:!0});var ae=["uncaught","rejection","sdk"];function E(e){if(typeof e!="object"||e===null)return null;let t=e;if(!ae.includes(t.kind)||typeof t.message!="string"||t.stack!==void 0&&typeof t.stack!="string"||t.count!==void 0&&!(Number.isSafeInteger(t.count)&&t.count>=1))return null;let n={kind:t.kind,message:Ne(t.message,1e3)};return typeof t.stack=="string"&&t.stack!==""&&(n.stack=Ne(t.stack,8e3)),typeof t.count=="number"&&t.count>1&&(n.count=Math.min(t.count,1e6)),n}function Ne(e,t){return e.length>t?`${e.slice(0,t-1)}\u2026`:e}var mi=Object.freeze({isOpen:!1,page:null});var Yn=D();function D(e){let t=e===void 0?"data: blob:":`${e} data: blob:`;return["default-src 'none'",`script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval' ${t}`,`style-src 'unsafe-inline' ${t}`,`img-src ${t}`,`font-src ${t}`,`media-src ${t}`,`connect-src ${t}`,`worker-src ${t}`,"base-uri 'none'","form-action 'none'","webrtc 'block'"].join("; ")}var Ue="allow-scripts allow-pointer-lock";var Xe=['<link rel="preconnect" href="https://fonts.googleapis.com">','<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>','<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Manrope:wght@500;600;700&family=JetBrains+Mono:wght@400;500&display=swap">'].join(`
199
+ `);async function Ye(){return{script:'"use strict";(()=>{var Ww=Object.create;var rd=Object.defineProperty;var Yw=Object.getOwnPropertyDescriptor;var Fw=Object.getOwnPropertyNames;var Zw=Object.getPrototypeOf,Kw=Object.prototype.hasOwnProperty;var jn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Qw=(e,t)=>{for(var n in t)rd(e,n,{get:t[n],enumerable:!0})},Jw=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Fw(t))!Kw.call(e,r)&&r!==n&&rd(e,r,{get:()=>t[r],enumerable:!(o=Yw(t,r))||o.enumerable});return e};var F=(e,t,n)=>(n=e!=null?Ww(Zw(e)):{},Jw(t||!e||!e.__esModule?rd(n,"default",{value:e,enumerable:!0}):n,e));var ob=jn(te=>{"use strict";var Xf=Symbol.for("react.transitional.element"),U2=Symbol.for("react.portal"),B2=Symbol.for("react.fragment"),V2=Symbol.for("react.strict_mode"),X2=Symbol.for("react.profiler"),W2=Symbol.for("react.consumer"),Y2=Symbol.for("react.context"),F2=Symbol.for("react.forward_ref"),Z2=Symbol.for("react.suspense"),K2=Symbol.for("react.memo"),Kv=Symbol.for("react.lazy"),Q2=Symbol.for("react.activity"),Wv=Symbol.iterator;function J2(e){return e===null||typeof e!="object"?null:(e=Wv&&e[Wv]||e["@@iterator"],typeof e=="function"?e:null)}var Qv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Jv=Object.assign,eb={};function Ti(e,t,n){this.props=e,this.context=t,this.refs=eb,this.updater=n||Qv}Ti.prototype.isReactComponent={};Ti.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ti.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function tb(){}tb.prototype=Ti.prototype;function Wf(e,t,n){this.props=e,this.context=t,this.refs=eb,this.updater=n||Qv}var Yf=Wf.prototype=new tb;Yf.constructor=Wf;Jv(Yf,Ti.prototype);Yf.isPureReactComponent=!0;var Yv=Array.isArray;function Vf(){}var ze={H:null,A:null,T:null,S:null},nb=Object.prototype.hasOwnProperty;function Ff(e,t,n){var o=n.ref;return{$$typeof:Xf,type:e,key:t,ref:o!==void 0?o:null,props:n}}function eT(e,t){return Ff(e.type,t,e.props)}function Zf(e){return typeof e=="object"&&e!==null&&e.$$typeof===Xf}function tT(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Fv=/\\/+/g;function Bf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?tT(""+e.key):t.toString(36)}function nT(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Vf,Vf):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Mi(e,t,n,o,r){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Xf:case U2:a=!0;break;case Kv:return a=e._init,Mi(a(e._payload),t,n,o,r)}}if(a)return r=r(e),a=o===""?"."+Bf(e,0):o,Yv(r)?(n="",a!=null&&(n=a.replace(Fv,"$&/")+"/"),Mi(r,t,n,"",function(u){return u})):r!=null&&(Zf(r)&&(r=eT(r,n+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(Fv,"$&/")+"/")+a)),t.push(r)),1;a=0;var l=o===""?".":o+":";if(Yv(e))for(var s=0;s<e.length;s++)o=e[s],i=l+Bf(o,s),a+=Mi(o,t,n,i,r);else if(s=J2(e),typeof s=="function")for(e=s.call(e),s=0;!(o=e.next()).done;)o=o.value,i=l+Bf(o,s++),a+=Mi(o,t,n,i,r);else if(i==="object"){if(typeof e.then=="function")return Mi(nT(e),t,n,o,r);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return a}function Vs(e,t,n){if(e==null)return e;var o=[],r=0;return Mi(e,o,"","",function(i){return t.call(n,i,r++)}),o}function oT(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Zv=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},rT={map:Vs,forEach:function(e,t,n){Vs(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Vs(e,function(){t++}),t},toArray:function(e){return Vs(e,function(t){return t})||[]},only:function(e){if(!Zf(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};te.Activity=Q2;te.Children=rT;te.Component=Ti;te.Fragment=B2;te.Profiler=X2;te.PureComponent=Wf;te.StrictMode=V2;te.Suspense=Z2;te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ze;te.__COMPILER_RUNTIME={__proto__:null,c:function(e){return ze.H.useMemoCache(e)}};te.cache=function(e){return function(){return e.apply(null,arguments)}};te.cacheSignal=function(){return null};te.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=Jv({},e.props),r=e.key;if(t!=null)for(i in t.key!==void 0&&(r=""+t.key),t)!nb.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(o[i]=t[i]);var i=arguments.length-2;if(i===1)o.children=n;else if(1<i){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+2];o.children=a}return Ff(e.type,r,o)};te.createContext=function(e){return e={$$typeof:Y2,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:W2,_context:e},e};te.createElement=function(e,t,n){var o,r={},i=null;if(t!=null)for(o in t.key!==void 0&&(i=""+t.key),t)nb.call(t,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(r[o]=t[o]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+2];r.children=l}if(e&&e.defaultProps)for(o in a=e.defaultProps,a)r[o]===void 0&&(r[o]=a[o]);return Ff(e,i,r)};te.createRef=function(){return{current:null}};te.forwardRef=function(e){return{$$typeof:F2,render:e}};te.isValidElement=Zf;te.lazy=function(e){return{$$typeof:Kv,_payload:{_status:-1,_result:e},_init:oT}};te.memo=function(e,t){return{$$typeof:K2,type:e,compare:t===void 0?null:t}};te.startTransition=function(e){var t=ze.T,n={};ze.T=n;try{var o=e(),r=ze.S;r!==null&&r(n,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(Vf,Zv)}catch(i){Zv(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),ze.T=t}};te.unstable_useCacheRefresh=function(){return ze.H.useCacheRefresh()};te.use=function(e){return ze.H.use(e)};te.useActionState=function(e,t,n){return ze.H.useActionState(e,t,n)};te.useCallback=function(e,t){return ze.H.useCallback(e,t)};te.useContext=function(e){return ze.H.useContext(e)};te.useDebugValue=function(){};te.useDeferredValue=function(e,t){return ze.H.useDeferredValue(e,t)};te.useEffect=function(e,t){return ze.H.useEffect(e,t)};te.useEffectEvent=function(e){return ze.H.useEffectEvent(e)};te.useId=function(){return ze.H.useId()};te.useImperativeHandle=function(e,t,n){return ze.H.useImperativeHandle(e,t,n)};te.useInsertionEffect=function(e,t){return ze.H.useInsertionEffect(e,t)};te.useLayoutEffect=function(e,t){return ze.H.useLayoutEffect(e,t)};te.useMemo=function(e,t){return ze.H.useMemo(e,t)};te.useOptimistic=function(e,t){return ze.H.useOptimistic(e,t)};te.useReducer=function(e,t,n){return ze.H.useReducer(e,t,n)};te.useRef=function(e){return ze.H.useRef(e)};te.useState=function(e){return ze.H.useState(e)};te.useSyncExternalStore=function(e,t,n){return ze.H.useSyncExternalStore(e,t,n)};te.useTransition=function(){return ze.H.useTransition()};te.version="19.2.3"});var De=jn((sI,rb)=>{"use strict";rb.exports=ob()});var ab=jn(Xs=>{"use strict";var iT=Symbol.for("react.transitional.element"),aT=Symbol.for("react.fragment");function ib(e,t,n){var o=null;if(n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),"key"in t){n={};for(var r in t)r!=="key"&&(n[r]=t[r])}else n=t;return t=n.ref,{$$typeof:iT,type:e,key:o,ref:t!==void 0?t:null,props:n}}Xs.Fragment=aT;Xs.jsx=ib;Xs.jsxs=ib});var Ie=jn((cI,lb)=>{"use strict";lb.exports=ab()});var vx=jn(Pt=>{"use strict";var TR=De();function yx(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Zo(){}var Ct={d:{f:Zo,r:function(){throw Error(yx(522))},D:Zo,C:Zo,L:Zo,m:Zo,X:Zo,S:Zo,M:Zo},p:0,findDOMNode:null},OR=Symbol.for("react.portal");function RR(e,t,n){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:OR,key:o==null?null:""+o,children:e,containerInfo:t,implementation:n}}var ll=TR.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function gu(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Pt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ct;Pt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(yx(299));return RR(e,t,null,n)};Pt.flushSync=function(e){var t=ll.T,n=Ct.p;try{if(ll.T=null,Ct.p=2,e)return e()}finally{ll.T=t,Ct.p=n,Ct.d.f()}};Pt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Ct.d.C(e,t))};Pt.prefetchDNS=function(e){typeof e=="string"&&Ct.d.D(e)};Pt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,o=gu(n,t.crossOrigin),r=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Ct.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:o,integrity:r,fetchPriority:i}):n==="script"&&Ct.d.X(e,{crossOrigin:o,integrity:r,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Pt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=gu(t.as,t.crossOrigin);Ct.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Ct.d.M(e)};Pt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,o=gu(n,t.crossOrigin);Ct.d.L(e,n,{crossOrigin:o,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Pt.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=gu(t.as,t.crossOrigin);Ct.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Ct.d.m(e)};Pt.requestFormReset=function(e){Ct.d.r(e)};Pt.unstable_batchedUpdates=function(e,t){return e(t)};Pt.useFormState=function(e,t,n){return ll.H.useFormState(e,t,n)};Pt.useFormStatus=function(){return ll.H.useHostTransitionStatus()};Pt.version="19.2.3"});var Zp=jn((bq,xx)=>{"use strict";function bx(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(bx)}catch(e){console.error(e)}}bx(),xx.exports=vx()});var Cx=jn(qe=>{"use strict";function em(e,t){var n=e.length;e.push(t);e:for(;0<n;){var o=n-1>>>1,r=e[o];if(0<yu(r,t))e[o]=t,e[n]=r,n=o;else break e}}function Xn(e){return e.length===0?null:e[0]}function bu(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var o=0,r=e.length,i=r>>>1;o<i;){var a=2*(o+1)-1,l=e[a],s=a+1,u=e[s];if(0>yu(l,n))s<r&&0>yu(u,l)?(e[o]=u,e[s]=n,o=s):(e[o]=l,e[a]=n,o=a);else if(s<r&&0>yu(u,n))e[o]=u,e[s]=n,o=s;else break e}}return t}function yu(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}qe.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(kx=performance,qe.unstable_now=function(){return kx.now()}):(Kp=Date,Sx=Kp.now(),qe.unstable_now=function(){return Kp.now()-Sx});var kx,Kp,Sx,fo=[],Ko=[],CR=1,gn=null,Mt=3,tm=!1,sl=!1,ul=!1,nm=!1,Ex=typeof setTimeout=="function"?setTimeout:null,Mx=typeof clearTimeout=="function"?clearTimeout:null,wx=typeof setImmediate<"u"?setImmediate:null;function vu(e){for(var t=Xn(Ko);t!==null;){if(t.callback===null)bu(Ko);else if(t.startTime<=e)bu(Ko),t.sortIndex=t.expirationTime,em(fo,t);else break;t=Xn(Ko)}}function om(e){if(ul=!1,vu(e),!sl)if(Xn(fo)!==null)sl=!0,Di||(Di=!0,Li());else{var t=Xn(Ko);t!==null&&rm(om,t.startTime-e)}}var Di=!1,cl=-1,Tx=5,Ox=-1;function Rx(){return nm?!0:!(qe.unstable_now()-Ox<Tx)}function Qp(){if(nm=!1,Di){var e=qe.unstable_now();Ox=e;var t=!0;try{e:{sl=!1,ul&&(ul=!1,Mx(cl),cl=-1),tm=!0;var n=Mt;try{t:{for(vu(e),gn=Xn(fo);gn!==null&&!(gn.expirationTime>e&&Rx());){var o=gn.callback;if(typeof o=="function"){gn.callback=null,Mt=gn.priorityLevel;var r=o(gn.expirationTime<=e);if(e=qe.unstable_now(),typeof r=="function"){gn.callback=r,vu(e),t=!0;break t}gn===Xn(fo)&&bu(fo),vu(e)}else bu(fo);gn=Xn(fo)}if(gn!==null)t=!0;else{var i=Xn(Ko);i!==null&&rm(om,i.startTime-e),t=!1}}break e}finally{gn=null,Mt=n,tm=!1}t=void 0}}finally{t?Li():Di=!1}}}var Li;typeof wx=="function"?Li=function(){wx(Qp)}:typeof MessageChannel<"u"?(Jp=new MessageChannel,Ax=Jp.port2,Jp.port1.onmessage=Qp,Li=function(){Ax.postMessage(null)}):Li=function(){Ex(Qp,0)};var Jp,Ax;function rm(e,t){cl=Ex(function(){e(qe.unstable_now())},t)}qe.unstable_IdlePriority=5;qe.unstable_ImmediatePriority=1;qe.unstable_LowPriority=4;qe.unstable_NormalPriority=3;qe.unstable_Profiling=null;qe.unstable_UserBlockingPriority=2;qe.unstable_cancelCallback=function(e){e.callback=null};qe.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Tx=0<e?Math.floor(1e3/e):5};qe.unstable_getCurrentPriorityLevel=function(){return Mt};qe.unstable_next=function(e){switch(Mt){case 1:case 2:case 3:var t=3;break;default:t=Mt}var n=Mt;Mt=t;try{return e()}finally{Mt=n}};qe.unstable_requestPaint=function(){nm=!0};qe.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Mt;Mt=e;try{return t()}finally{Mt=n}};qe.unstable_scheduleCallback=function(e,t,n){var o=qe.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?o+n:o):n=o,e){case 1:var r=-1;break;case 2:r=250;break;case 5:r=1073741823;break;case 4:r=1e4;break;default:r=5e3}return r=n+r,e={id:CR++,callback:t,priorityLevel:e,startTime:n,expirationTime:r,sortIndex:-1},n>o?(e.sortIndex=n,em(Ko,e),Xn(fo)===null&&e===Xn(Ko)&&(ul?(Mx(cl),cl=-1):ul=!0,rm(om,n-o))):(e.sortIndex=r,em(fo,e),sl||tm||(sl=!0,Di||(Di=!0,Li()))),e};qe.unstable_shouldYield=Rx;qe.unstable_wrapCallback=function(e){var t=Mt;return function(){var n=Mt;Mt=t;try{return e.apply(this,arguments)}finally{Mt=n}}}});var _x=jn((kq,Px)=>{"use strict";Px.exports=Cx()});var B1=jn(Bc=>{"use strict";var ut=_x(),rS=De(),PR=Zp();function _(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function iS(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Zl(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function aS(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function lS(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function zx(e){if(Zl(e)!==e)throw Error(_(188))}function _R(e){var t=e.alternate;if(!t){if(t=Zl(e),t===null)throw Error(_(188));return t!==e?null:e}for(var n=e,o=t;;){var r=n.return;if(r===null)break;var i=r.alternate;if(i===null){if(o=r.return,o!==null){n=o;continue}break}if(r.child===i.child){for(i=r.child;i;){if(i===n)return zx(r),e;if(i===o)return zx(r),t;i=i.sibling}throw Error(_(188))}if(n.return!==o.return)n=r,o=i;else{for(var a=!1,l=r.child;l;){if(l===n){a=!0,n=r,o=i;break}if(l===o){a=!0,o=r,n=i;break}l=l.sibling}if(!a){for(l=i.child;l;){if(l===n){a=!0,n=i,o=r;break}if(l===o){a=!0,o=i,n=r;break}l=l.sibling}if(!a)throw Error(_(189))}}if(n.alternate!==o)throw Error(_(190))}if(n.tag!==3)throw Error(_(188));return n.stateNode.current===n?e:t}function sS(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=sS(e),t!==null)return t;e=e.sibling}return null}var Le=Object.assign,zR=Symbol.for("react.element"),xu=Symbol.for("react.transitional.element"),vl=Symbol.for("react.portal"),Ui=Symbol.for("react.fragment"),uS=Symbol.for("react.strict_mode"),Im=Symbol.for("react.profiler"),cS=Symbol.for("react.consumer"),xo=Symbol.for("react.context"),zh=Symbol.for("react.forward_ref"),jm=Symbol.for("react.suspense"),Hm=Symbol.for("react.suspense_list"),$h=Symbol.for("react.memo"),Qo=Symbol.for("react.lazy");Symbol.for("react.scope");var qm=Symbol.for("react.activity");Symbol.for("react.legacy_hidden");Symbol.for("react.tracing_marker");var $R=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var $x=Symbol.iterator;function dl(e){return e===null||typeof e!="object"?null:(e=$x&&e[$x]||e["@@iterator"],typeof e=="function"?e:null)}var NR=Symbol.for("react.client.reference");function Gm(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===NR?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ui:return"Fragment";case Im:return"Profiler";case uS:return"StrictMode";case jm:return"Suspense";case Hm:return"SuspenseList";case qm:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case vl:return"Portal";case xo:return e.displayName||"Context";case cS:return(e._context.displayName||"Context")+".Consumer";case zh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $h:return t=e.displayName||null,t!==null?t:Gm(e.type)||"Memo";case Qo:t=e._payload,e=e._init;try{return Gm(e(t))}catch{}}return null}var bl=Array.isArray,Y=rS.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,be=PR.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Kr={pending:!1,data:null,method:null,action:null},Um=[],Bi=-1;function Kn(e){return{current:e}}function ht(e){0>Bi||(e.current=Um[Bi],Um[Bi]=null,Bi--)}function Pe(e,t){Bi++,Um[Bi]=e.current,e.current=t}var Zn=Kn(null),Ll=Kn(null),ur=Kn(null),Ju=Kn(null);function ec(e,t){switch(Pe(ur,t),Pe(Ll,e),Pe(Zn,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?qk(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=qk(t),e=C1(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ht(Zn),Pe(Zn,e)}function sa(){ht(Zn),ht(Ll),ht(ur)}function Bm(e){e.memoizedState!==null&&Pe(Ju,e);var t=Zn.current,n=C1(t,e.type);t!==n&&(Pe(Ll,e),Pe(Zn,n))}function tc(e){Ll.current===e&&(ht(Zn),ht(Ll)),Ju.current===e&&(ht(Ju),Wl._currentValue=Kr)}var im,Nx;function Wr(e){if(im===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\\n( *(at )?)/);im=t&&t[1]||"",Nx=-1<n.stack.indexOf(`\n at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`\n`+im+e+Nx}var am=!1;function lm(e,t){if(!e||am)return"";am=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(t){var m=function(){throw Error()};if(Object.defineProperty(m.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(m,[])}catch(p){var c=p}Reflect.construct(e,[],m)}else{try{m.call()}catch(p){c=p}e.call(m.prototype)}}else{try{throw Error()}catch(p){c=p}(m=e())&&typeof m.catch=="function"&&m.catch(function(){})}}catch(p){if(p&&c&&typeof p.stack=="string")return[p.stack,c.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=o.DetermineComponentFrameRoot(),a=i[0],l=i[1];if(a&&l){var s=a.split(`\n`),u=l.split(`\n`);for(r=o=0;o<s.length&&!s[o].includes("DetermineComponentFrameRoot");)o++;for(;r<u.length&&!u[r].includes("DetermineComponentFrameRoot");)r++;if(o===s.length||r===u.length)for(o=s.length-1,r=u.length-1;1<=o&&0<=r&&s[o]!==u[r];)r--;for(;1<=o&&0<=r;o--,r--)if(s[o]!==u[r]){if(o!==1||r!==1)do if(o--,r--,0>r||s[o]!==u[r]){var f=`\n`+s[o].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=o&&0<=r);break}}}finally{am=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Wr(n):""}function LR(e,t){switch(e.tag){case 26:case 27:case 5:return Wr(e.type);case 16:return Wr("Lazy");case 13:return e.child!==t&&t!==null?Wr("Suspense Fallback"):Wr("Suspense");case 19:return Wr("SuspenseList");case 0:case 15:return lm(e.type,!1);case 11:return lm(e.type.render,!1);case 1:return lm(e.type,!0);case 31:return Wr("Activity");default:return""}}function Lx(e){try{var t="",n=null;do t+=LR(e,n),n=e,e=e.return;while(e);return t}catch(o){return`\nError generating stack: `+o.message+`\n`+o.stack}}var Vm=Object.prototype.hasOwnProperty,Nh=ut.unstable_scheduleCallback,sm=ut.unstable_cancelCallback,DR=ut.unstable_shouldYield,IR=ut.unstable_requestPaint,ln=ut.unstable_now,jR=ut.unstable_getCurrentPriorityLevel,dS=ut.unstable_ImmediatePriority,fS=ut.unstable_UserBlockingPriority,nc=ut.unstable_NormalPriority,HR=ut.unstable_LowPriority,pS=ut.unstable_IdlePriority,qR=ut.log,GR=ut.unstable_setDisableYieldValue,Kl=null,sn=null;function rr(e){if(typeof qR=="function"&&GR(e),sn&&typeof sn.setStrictMode=="function")try{sn.setStrictMode(Kl,e)}catch{}}var un=Math.clz32?Math.clz32:VR,UR=Math.log,BR=Math.LN2;function VR(e){return e>>>=0,e===0?32:31-(UR(e)/BR|0)|0}var ku=256,Su=262144,wu=4194304;function Yr(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Oc(e,t,n){var o=e.pendingLanes;if(o===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes;e=e.warmLanes;var l=o&134217727;return l!==0?(o=l&~i,o!==0?r=Yr(o):(a&=l,a!==0?r=Yr(a):n||(n=l&~e,n!==0&&(r=Yr(n))))):(l=o&~i,l!==0?r=Yr(l):a!==0?r=Yr(a):n||(n=o&~e,n!==0&&(r=Yr(n)))),r===0?0:t!==0&&t!==r&&(t&i)===0&&(i=r&-r,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:r}function Ql(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function XR(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function mS(){var e=wu;return wu<<=1,(wu&62914560)===0&&(wu=4194304),e}function um(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Jl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function WR(e,t,n,o,r,i){var a=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var l=e.entanglements,s=e.expirationTimes,u=e.hiddenUpdates;for(n=a&~n;0<n;){var f=31-un(n),m=1<<f;l[f]=0,s[f]=-1;var c=u[f];if(c!==null)for(u[f]=null,f=0;f<c.length;f++){var p=c[f];p!==null&&(p.lane&=-536870913)}n&=~m}o!==0&&hS(e,o,0),i!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=i&~(a&~t))}function hS(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-un(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|n&261930}function gS(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var o=31-un(n),r=1<<o;r&t|e[o]&t&&(e[o]|=t),n&=~r}}function yS(e,t){var n=t&-t;return n=(n&42)!==0?1:Lh(n),(n&(e.suspendedLanes|t))!==0?0:n}function Lh(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Dh(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function vS(){var e=be.p;return e!==0?e:(e=window.event,e===void 0?32:q1(e.type))}function Dx(e,t){var n=be.p;try{return be.p=e,t()}finally{be.p=n}}var Sr=Math.random().toString(36).slice(2),xt="__reactFiber$"+Sr,Wt="__reactProps$"+Sr,ba="__reactContainer$"+Sr,Xm="__reactEvents$"+Sr,YR="__reactListeners$"+Sr,FR="__reactHandles$"+Sr,Ix="__reactResources$"+Sr,es="__reactMarker$"+Sr;function Ih(e){delete e[xt],delete e[Wt],delete e[Xm],delete e[YR],delete e[FR]}function Vi(e){var t=e[xt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ba]||n[xt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Xk(e);e!==null;){if(n=e[xt])return n;e=Xk(e)}return t}e=n,n=e.parentNode}return null}function xa(e){if(e=e[xt]||e[ba]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function xl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(_(33))}function ta(e){var t=e[Ix];return t||(t=e[Ix]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function mt(e){e[es]=!0}var bS=new Set,xS={};function li(e,t){ua(e,t),ua(e+"Capture",t)}function ua(e,t){for(xS[e]=t,e=0;e<t.length;e++)bS.add(t[e])}var ZR=RegExp("^[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$"),jx={},Hx={};function KR(e){return Vm.call(Hx,e)?!0:Vm.call(jx,e)?!1:ZR.test(e)?Hx[e]=!0:(jx[e]=!0,!1)}function Iu(e,t,n){if(KR(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var o=t.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Au(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function po(e,t,n,o){if(o===null)e.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+o)}}function vn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function kS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function QR(e,t,n){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var r=o.get,i=o.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:o.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Wm(e){if(!e._valueTracker){var t=kS(e)?"checked":"value";e._valueTracker=QR(e,t,""+e[t])}}function SS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=kS(e)?e.checked?"true":"false":e.value),e=o,e!==n?(t.setValue(e),!0):!1}function oc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var JR=/[\\n"\\\\]/g;function kn(e){return e.replace(JR,function(t){return"\\\\"+t.charCodeAt(0).toString(16)+" "})}function Ym(e,t,n,o,r,i,a,l){e.name="",a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"?e.type=a:e.removeAttribute("type"),t!=null?a==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+vn(t)):e.value!==""+vn(t)&&(e.value=""+vn(t)):a!=="submit"&&a!=="reset"||e.removeAttribute("value"),t!=null?Fm(e,a,vn(t)):n!=null?Fm(e,a,vn(n)):o!=null&&e.removeAttribute("value"),r==null&&i!=null&&(e.defaultChecked=!!i),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.name=""+vn(l):e.removeAttribute("name")}function wS(e,t,n,o,r,i,a,l){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Wm(e);return}n=n!=null?""+vn(n):"",t=t!=null?""+vn(t):n,l||t===e.value||(e.value=t),e.defaultValue=t}o=o??r,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=l?e.checked:!!o,e.defaultChecked=!!o,a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.name=a),Wm(e)}function Fm(e,t,n){t==="number"&&oc(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function na(e,t,n,o){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&o&&(e[n].defaultSelected=!0)}else{for(n=""+vn(n),t=null,r=0;r<e.length;r++){if(e[r].value===n){e[r].selected=!0,o&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function AS(e,t,n){if(t!=null&&(t=""+vn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+vn(n):""}function ES(e,t,n,o){if(t==null){if(o!=null){if(n!=null)throw Error(_(92));if(bl(o)){if(1<o.length)throw Error(_(93));o=o[0]}n=o}n==null&&(n=""),t=n}n=vn(t),e.defaultValue=n,o=e.textContent,o===n&&o!==""&&o!==null&&(e.value=o),Wm(e)}function ca(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var eC=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function qx(e,t,n){var o=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,n):typeof n!="number"||n===0||eC.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function MS(e,t,n){if(t!=null&&typeof t!="object")throw Error(_(62));if(e=e.style,n!=null){for(var o in n)!n.hasOwnProperty(o)||t!=null&&t.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var r in t)o=t[r],t.hasOwnProperty(r)&&n[r]!==o&&qx(e,r,o)}else for(var i in t)t.hasOwnProperty(i)&&qx(e,i,t[i])}function jh(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tC=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),nC=/^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i;function ju(e){return nC.test(""+e)?"javascript:throw new Error(\'React has blocked a javascript: URL as a security precaution.\')":e}function ko(){}var Zm=null;function Hh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xi=null,oa=null;function Gx(e){var t=xa(e);if(t&&(e=t.stateNode)){var n=e[Wt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ym(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(\'input[name="\'+kn(""+t)+\'"][type="radio"]\'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var r=o[Wt]||null;if(!r)throw Error(_(90));Ym(o,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<n.length;t++)o=n[t],o.form===e.form&&SS(o)}break e;case"textarea":AS(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&na(e,!!n.multiple,t,!1)}}}var cm=!1;function TS(e,t,n){if(cm)return e(t,n);cm=!0;try{var o=e(t);return o}finally{if(cm=!1,(Xi!==null||oa!==null)&&(Hc(),Xi&&(t=Xi,e=oa,oa=Xi=null,Gx(t),e)))for(t=0;t<e.length;t++)Gx(e[t])}}function Dl(e,t){var n=e.stateNode;if(n===null)return null;var o=n[Wt]||null;if(o===null)return null;n=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(_(231,t,typeof n));return n}var Mo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Km=!1;if(Mo)try{Ii={},Object.defineProperty(Ii,"passive",{get:function(){Km=!0}}),window.addEventListener("test",Ii,Ii),window.removeEventListener("test",Ii,Ii)}catch{Km=!1}var Ii,ir=null,qh=null,Hu=null;function OS(){if(Hu)return Hu;var e,t=qh,n=t.length,o,r="value"in ir?ir.value:ir.textContent,i=r.length;for(e=0;e<n&&t[e]===r[e];e++);var a=n-e;for(o=1;o<=a&&t[n-o]===r[i-o];o++);return Hu=r.slice(e,1<o?1-o:void 0)}function qu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Eu(){return!0}function Ux(){return!1}function Yt(e){function t(n,o,r,i,a){this._reactName=n,this._targetInst=r,this.type=o,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Eu:Ux,this.isPropagationStopped=Ux,this}return Le(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Eu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Eu)},persist:function(){},isPersistent:Eu}),t}var si={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rc=Yt(si),ts=Le({},si,{view:0,detail:0}),oC=Yt(ts),dm,fm,fl,Cc=Le({},ts,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gh,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fl&&(fl&&e.type==="mousemove"?(dm=e.screenX-fl.screenX,fm=e.screenY-fl.screenY):fm=dm=0,fl=e),dm)},movementY:function(e){return"movementY"in e?e.movementY:fm}}),Bx=Yt(Cc),rC=Le({},Cc,{dataTransfer:0}),iC=Yt(rC),aC=Le({},ts,{relatedTarget:0}),pm=Yt(aC),lC=Le({},si,{animationName:0,elapsedTime:0,pseudoElement:0}),sC=Yt(lC),uC=Le({},si,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),cC=Yt(uC),dC=Le({},si,{data:0}),Vx=Yt(dC),fC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pC={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},mC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hC(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=mC[e])?!!t[e]:!1}function Gh(){return hC}var gC=Le({},ts,{key:function(e){if(e.key){var t=fC[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=qu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?pC[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gh,charCode:function(e){return e.type==="keypress"?qu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?qu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),yC=Yt(gC),vC=Le({},Cc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xx=Yt(vC),bC=Le({},ts,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gh}),xC=Yt(bC),kC=Le({},si,{propertyName:0,elapsedTime:0,pseudoElement:0}),SC=Yt(kC),wC=Le({},Cc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),AC=Yt(wC),EC=Le({},si,{newState:0,oldState:0}),MC=Yt(EC),TC=[9,13,27,32],Uh=Mo&&"CompositionEvent"in window,wl=null;Mo&&"documentMode"in document&&(wl=document.documentMode);var OC=Mo&&"TextEvent"in window&&!wl,RS=Mo&&(!Uh||wl&&8<wl&&11>=wl),Wx=" ",Yx=!1;function CS(e,t){switch(e){case"keyup":return TC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function PS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wi=!1;function RC(e,t){switch(e){case"compositionend":return PS(t);case"keypress":return t.which!==32?null:(Yx=!0,Wx);case"textInput":return e=t.data,e===Wx&&Yx?null:e;default:return null}}function CC(e,t){if(Wi)return e==="compositionend"||!Uh&&CS(e,t)?(e=OS(),Hu=qh=ir=null,Wi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return RS&&t.locale!=="ko"?null:t.data;default:return null}}var PC={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Fx(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!PC[e.type]:t==="textarea"}function _S(e,t,n,o){Xi?oa?oa.push(o):oa=[o]:Xi=o,t=kc(t,"onChange"),0<t.length&&(n=new Rc("onChange","change",null,n,o),e.push({event:n,listeners:t}))}var Al=null,Il=null;function _C(e){T1(e,0)}function Pc(e){var t=xl(e);if(SS(t))return e}function Zx(e,t){if(e==="change")return t}var zS=!1;Mo&&(Mo?(Tu="oninput"in document,Tu||(mm=document.createElement("div"),mm.setAttribute("oninput","return;"),Tu=typeof mm.oninput=="function"),Mu=Tu):Mu=!1,zS=Mu&&(!document.documentMode||9<document.documentMode));var Mu,Tu,mm;function Kx(){Al&&(Al.detachEvent("onpropertychange",$S),Il=Al=null)}function $S(e){if(e.propertyName==="value"&&Pc(Il)){var t=[];_S(t,Il,e,Hh(e)),TS(_C,t)}}function zC(e,t,n){e==="focusin"?(Kx(),Al=t,Il=n,Al.attachEvent("onpropertychange",$S)):e==="focusout"&&Kx()}function $C(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Pc(Il)}function NC(e,t){if(e==="click")return Pc(t)}function LC(e,t){if(e==="input"||e==="change")return Pc(t)}function DC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var dn=typeof Object.is=="function"?Object.is:DC;function jl(e,t){if(dn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(o=0;o<n.length;o++){var r=n[o];if(!Vm.call(t,r)||!dn(e[r],t[r]))return!1}return!0}function Qx(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jx(e,t){var n=Qx(e);e=0;for(var o;n;){if(n.nodeType===3){if(o=e+n.textContent.length,e<=t&&o>=t)return{node:n,offset:t-e};e=o}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Qx(n)}}function NS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?NS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function LS(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=oc(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=oc(e.document)}return t}function Bh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var IC=Mo&&"documentMode"in document&&11>=document.documentMode,Yi=null,Qm=null,El=null,Jm=!1;function ek(e,t,n){var o=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Jm||Yi==null||Yi!==oc(o)||(o=Yi,"selectionStart"in o&&Bh(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),El&&jl(El,o)||(El=o,o=kc(Qm,"onSelect"),0<o.length&&(t=new Rc("onSelect","select",null,t,n),e.push({event:t,listeners:o}),t.target=Yi)))}function Xr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Fi={animationend:Xr("Animation","AnimationEnd"),animationiteration:Xr("Animation","AnimationIteration"),animationstart:Xr("Animation","AnimationStart"),transitionrun:Xr("Transition","TransitionRun"),transitionstart:Xr("Transition","TransitionStart"),transitioncancel:Xr("Transition","TransitionCancel"),transitionend:Xr("Transition","TransitionEnd")},hm={},DS={};Mo&&(DS=document.createElement("div").style,"AnimationEvent"in window||(delete Fi.animationend.animation,delete Fi.animationiteration.animation,delete Fi.animationstart.animation),"TransitionEvent"in window||delete Fi.transitionend.transition);function ui(e){if(hm[e])return hm[e];if(!Fi[e])return e;var t=Fi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in DS)return hm[e]=t[n];return e}var IS=ui("animationend"),jS=ui("animationiteration"),HS=ui("animationstart"),jC=ui("transitionrun"),HC=ui("transitionstart"),qC=ui("transitioncancel"),qS=ui("transitionend"),GS=new Map,eh="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");eh.push("scrollEnd");function Nn(e,t){GS.set(e,t),li(t,[e])}var rc=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},yn=[],Zi=0,Vh=0;function _c(){for(var e=Zi,t=Vh=Zi=0;t<e;){var n=yn[t];yn[t++]=null;var o=yn[t];yn[t++]=null;var r=yn[t];yn[t++]=null;var i=yn[t];if(yn[t++]=null,o!==null&&r!==null){var a=o.pending;a===null?r.next=r:(r.next=a.next,a.next=r),o.pending=r}i!==0&&US(n,r,i)}}function zc(e,t,n,o){yn[Zi++]=e,yn[Zi++]=t,yn[Zi++]=n,yn[Zi++]=o,Vh|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Xh(e,t,n,o){return zc(e,t,n,o),ic(e)}function ci(e,t){return zc(e,null,null,t),ic(e)}function US(e,t,n){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n);for(var r=!1,i=e.return;i!==null;)i.childLanes|=n,o=i.alternate,o!==null&&(o.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(r=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,r&&t!==null&&(r=31-un(n),e=i.hiddenUpdates,o=e[r],o===null?e[r]=[t]:o.push(t),t.lane=n|536870912),i):null}function ic(e){if(50<$l)throw $l=0,kh=null,Error(_(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ki={};function GC(e,t,n,o){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rn(e,t,n,o){return new GC(e,t,n,o)}function Wh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function wo(e,t){var n=e.alternate;return n===null?(n=rn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function BS(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Gu(e,t,n,o,r,i){var a=0;if(o=e,typeof e=="function")Wh(e)&&(a=1);else if(typeof e=="string")a=V3(e,n,Zn.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case qm:return e=rn(31,n,t,r),e.elementType=qm,e.lanes=i,e;case Ui:return Qr(n.children,r,i,t);case uS:a=8,r|=24;break;case Im:return e=rn(12,n,t,r|2),e.elementType=Im,e.lanes=i,e;case jm:return e=rn(13,n,t,r),e.elementType=jm,e.lanes=i,e;case Hm:return e=rn(19,n,t,r),e.elementType=Hm,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xo:a=10;break e;case cS:a=9;break e;case zh:a=11;break e;case $h:a=14;break e;case Qo:a=16,o=null;break e}a=29,n=Error(_(130,e===null?"null":typeof e,"")),o=null}return t=rn(a,n,t,r),t.elementType=e,t.type=o,t.lanes=i,t}function Qr(e,t,n,o){return e=rn(7,e,o,t),e.lanes=n,e}function gm(e,t,n){return e=rn(6,e,null,t),e.lanes=n,e}function VS(e){var t=rn(18,null,null,0);return t.stateNode=e,t}function ym(e,t,n){return t=rn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var tk=new WeakMap;function Sn(e,t){if(typeof e=="object"&&e!==null){var n=tk.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Lx(t)},tk.set(e,t),t)}return{value:e,source:t,stack:Lx(t)}}var Qi=[],Ji=0,ac=null,Hl=0,bn=[],xn=0,vr=null,Wn=1,Yn="";function vo(e,t){Qi[Ji++]=Hl,Qi[Ji++]=ac,ac=e,Hl=t}function XS(e,t,n){bn[xn++]=Wn,bn[xn++]=Yn,bn[xn++]=vr,vr=e;var o=Wn;e=Yn;var r=32-un(o)-1;o&=~(1<<r),n+=1;var i=32-un(t)+r;if(30<i){var a=r-r%5;i=(o&(1<<a)-1).toString(32),o>>=a,r-=a,Wn=1<<32-un(t)+r|n<<r|o,Yn=i+e}else Wn=1<<i|n<<r|o,Yn=e}function Yh(e){e.return!==null&&(vo(e,1),XS(e,1,0))}function Fh(e){for(;e===ac;)ac=Qi[--Ji],Qi[Ji]=null,Hl=Qi[--Ji],Qi[Ji]=null;for(;e===vr;)vr=bn[--xn],bn[xn]=null,Yn=bn[--xn],bn[xn]=null,Wn=bn[--xn],bn[xn]=null}function WS(e,t){bn[xn++]=Wn,bn[xn++]=Yn,bn[xn++]=vr,Wn=t.id,Yn=t.overflow,vr=e}var kt=null,Ne=null,me=!1,cr=null,wn=!1,th=Error(_(519));function br(e){var t=Error(_(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ql(Sn(t,e)),th}function nk(e){var t=e.stateNode,n=e.type,o=e.memoizedProps;switch(t[xt]=e,t[Wt]=o,n){case"dialog":se("cancel",t),se("close",t);break;case"iframe":case"object":case"embed":se("load",t);break;case"video":case"audio":for(n=0;n<Vl.length;n++)se(Vl[n],t);break;case"source":se("error",t);break;case"img":case"image":case"link":se("error",t),se("load",t);break;case"details":se("toggle",t);break;case"input":se("invalid",t),wS(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":se("invalid",t);break;case"textarea":se("invalid",t),ES(t,o.value,o.defaultValue,o.children)}n=o.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||o.suppressHydrationWarning===!0||R1(t.textContent,n)?(o.popover!=null&&(se("beforetoggle",t),se("toggle",t)),o.onScroll!=null&&se("scroll",t),o.onScrollEnd!=null&&se("scrollend",t),o.onClick!=null&&(t.onclick=ko),t=!0):t=!1,t||br(e,!0)}function ok(e){for(kt=e.return;kt;)switch(kt.tag){case 5:case 31:case 13:wn=!1;return;case 27:case 3:wn=!0;return;default:kt=kt.return}}function ji(e){if(e!==kt)return!1;if(!me)return ok(e),me=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Mh(e.type,e.memoizedProps)),n=!n),n&&Ne&&br(e),ok(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(_(317));Ne=Vk(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(_(317));Ne=Vk(e)}else t===27?(t=Ne,wr(e.type)?(e=Ch,Ch=null,Ne=e):Ne=t):Ne=kt?En(e.stateNode.nextSibling):null;return!0}function ni(){Ne=kt=null,me=!1}function vm(){var e=cr;return e!==null&&(Vt===null?Vt=e:Vt.push.apply(Vt,e),cr=null),e}function ql(e){cr===null?cr=[e]:cr.push(e)}var nh=Kn(null),di=null,So=null;function er(e,t,n){Pe(nh,t._currentValue),t._currentValue=n}function Ao(e){e._currentValue=nh.current,ht(nh)}function oh(e,t,n){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===n)break;e=e.return}}function rh(e,t,n,o){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var i=r.dependencies;if(i!==null){var a=r.child;i=i.firstContext;e:for(;i!==null;){var l=i;i=r;for(var s=0;s<t.length;s++)if(l.context===t[s]){i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),oh(i.return,n,e),o||(a=null);break e}i=l.next}}else if(r.tag===18){if(a=r.return,a===null)throw Error(_(341));a.lanes|=n,i=a.alternate,i!==null&&(i.lanes|=n),oh(a,n,e),a=null}else a=r.child;if(a!==null)a.return=r;else for(a=r;a!==null;){if(a===e){a=null;break}if(r=a.sibling,r!==null){r.return=a.return,a=r;break}a=a.return}r=a}}function ka(e,t,n,o){e=null;for(var r=t,i=!1;r!==null;){if(!i){if((r.flags&524288)!==0)i=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var a=r.alternate;if(a===null)throw Error(_(387));if(a=a.memoizedProps,a!==null){var l=r.type;dn(r.pendingProps.value,a.value)||(e!==null?e.push(l):e=[l])}}else if(r===Ju.current){if(a=r.alternate,a===null)throw Error(_(387));a.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Wl):e=[Wl])}r=r.return}e!==null&&rh(t,e,n,o),t.flags|=262144}function lc(e){for(e=e.firstContext;e!==null;){if(!dn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function oi(e){di=e,So=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function St(e){return YS(di,e)}function Ou(e,t){return di===null&&oi(e),YS(e,t)}function YS(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},So===null){if(e===null)throw Error(_(308));So=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else So=So.next=t;return n}var UC=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,o){e.push(o)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},BC=ut.unstable_scheduleCallback,VC=ut.unstable_NormalPriority,rt={$$typeof:xo,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Zh(){return{controller:new UC,data:new Map,refCount:0}}function ns(e){e.refCount--,e.refCount===0&&BC(VC,function(){e.controller.abort()})}var Ml=null,ih=0,da=0,ra=null;function XC(e,t){if(Ml===null){var n=Ml=[];ih=0,da=kg(),ra={status:"pending",value:void 0,then:function(o){n.push(o)}}}return ih++,t.then(rk,rk),t}function rk(){if(--ih===0&&Ml!==null){ra!==null&&(ra.status="fulfilled");var e=Ml;Ml=null,da=0,ra=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function WC(e,t){var n=[],o={status:"pending",value:null,reason:null,then:function(r){n.push(r)}};return e.then(function(){o.status="fulfilled",o.value=t;for(var r=0;r<n.length;r++)(0,n[r])(t)},function(r){for(o.status="rejected",o.reason=r,r=0;r<n.length;r++)(0,n[r])(void 0)}),o}var ik=Y.S;Y.S=function(e,t){s1=ln(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&XC(e,t),ik!==null&&ik(e,t)};var Jr=Kn(null);function Kh(){var e=Jr.current;return e!==null?e:Re.pooledCache}function Uu(e,t){t===null?Pe(Jr,Jr.current):Pe(Jr,t.pool)}function FS(){var e=Kh();return e===null?null:{parent:rt._currentValue,pool:e}}var Sa=Error(_(460)),Qh=Error(_(474)),$c=Error(_(542)),sc={then:function(){}};function ak(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ZS(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(ko,ko),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sk(e),e;default:if(typeof t.status=="string")t.then(ko,ko);else{if(e=Re,e!==null&&100<e.shellSuspendCounter)throw Error(_(482));e=t,e.status="pending",e.then(function(o){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=o}},function(o){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=o}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sk(e),e}throw ei=t,Sa}}function Fr(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ei=n,Sa):n}}var ei=null;function lk(){if(ei===null)throw Error(_(459));var e=ei;return ei=null,e}function sk(e){if(e===Sa||e===$c)throw Error(_(483))}var ia=null,Gl=0;function Ru(e){var t=Gl;return Gl+=1,ia===null&&(ia=[]),ZS(ia,e,t)}function pl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Cu(e,t){throw t.$$typeof===zR?Error(_(525)):(e=Object.prototype.toString.call(t),Error(_(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function KS(e){function t(h,d){if(e){var v=h.deletions;v===null?(h.deletions=[d],h.flags|=16):v.push(d)}}function n(h,d){if(!e)return null;for(;d!==null;)t(h,d),d=d.sibling;return null}function o(h){for(var d=new Map;h!==null;)h.key!==null?d.set(h.key,h):d.set(h.index,h),h=h.sibling;return d}function r(h,d){return h=wo(h,d),h.index=0,h.sibling=null,h}function i(h,d,v){return h.index=v,e?(v=h.alternate,v!==null?(v=v.index,v<d?(h.flags|=67108866,d):v):(h.flags|=67108866,d)):(h.flags|=1048576,d)}function a(h){return e&&h.alternate===null&&(h.flags|=67108866),h}function l(h,d,v,b){return d===null||d.tag!==6?(d=gm(v,h.mode,b),d.return=h,d):(d=r(d,v),d.return=h,d)}function s(h,d,v,b){var T=v.type;return T===Ui?f(h,d,v.props.children,b,v.key):d!==null&&(d.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Qo&&Fr(T)===d.type)?(d=r(d,v.props),pl(d,v),d.return=h,d):(d=Gu(v.type,v.key,v.props,null,h.mode,b),pl(d,v),d.return=h,d)}function u(h,d,v,b){return d===null||d.tag!==4||d.stateNode.containerInfo!==v.containerInfo||d.stateNode.implementation!==v.implementation?(d=ym(v,h.mode,b),d.return=h,d):(d=r(d,v.children||[]),d.return=h,d)}function f(h,d,v,b,T){return d===null||d.tag!==7?(d=Qr(v,h.mode,b,T),d.return=h,d):(d=r(d,v),d.return=h,d)}function m(h,d,v){if(typeof d=="string"&&d!==""||typeof d=="number"||typeof d=="bigint")return d=gm(""+d,h.mode,v),d.return=h,d;if(typeof d=="object"&&d!==null){switch(d.$$typeof){case xu:return v=Gu(d.type,d.key,d.props,null,h.mode,v),pl(v,d),v.return=h,v;case vl:return d=ym(d,h.mode,v),d.return=h,d;case Qo:return d=Fr(d),m(h,d,v)}if(bl(d)||dl(d))return d=Qr(d,h.mode,v,null),d.return=h,d;if(typeof d.then=="function")return m(h,Ru(d),v);if(d.$$typeof===xo)return m(h,Ou(h,d),v);Cu(h,d)}return null}function c(h,d,v,b){var T=d!==null?d.key:null;if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return T!==null?null:l(h,d,""+v,b);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case xu:return v.key===T?s(h,d,v,b):null;case vl:return v.key===T?u(h,d,v,b):null;case Qo:return v=Fr(v),c(h,d,v,b)}if(bl(v)||dl(v))return T!==null?null:f(h,d,v,b,null);if(typeof v.then=="function")return c(h,d,Ru(v),b);if(v.$$typeof===xo)return c(h,d,Ou(h,v),b);Cu(h,v)}return null}function p(h,d,v,b,T){if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return h=h.get(v)||null,l(d,h,""+b,T);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case xu:return h=h.get(b.key===null?v:b.key)||null,s(d,h,b,T);case vl:return h=h.get(b.key===null?v:b.key)||null,u(d,h,b,T);case Qo:return b=Fr(b),p(h,d,v,b,T)}if(bl(b)||dl(b))return h=h.get(v)||null,f(d,h,b,T,null);if(typeof b.then=="function")return p(h,d,v,Ru(b),T);if(b.$$typeof===xo)return p(h,d,v,Ou(d,b),T);Cu(d,b)}return null}function g(h,d,v,b){for(var T=null,O=null,A=d,R=d=0,M=null;A!==null&&R<v.length;R++){A.index>R?(M=A,A=null):M=A.sibling;var E=c(h,A,v[R],b);if(E===null){A===null&&(A=M);break}e&&A&&E.alternate===null&&t(h,A),d=i(E,d,R),O===null?T=E:O.sibling=E,O=E,A=M}if(R===v.length)return n(h,A),me&&vo(h,R),T;if(A===null){for(;R<v.length;R++)A=m(h,v[R],b),A!==null&&(d=i(A,d,R),O===null?T=A:O.sibling=A,O=A);return me&&vo(h,R),T}for(A=o(A);R<v.length;R++)M=p(A,h,R,v[R],b),M!==null&&(e&&M.alternate!==null&&A.delete(M.key===null?R:M.key),d=i(M,d,R),O===null?T=M:O.sibling=M,O=M);return e&&A.forEach(function(L){return t(h,L)}),me&&vo(h,R),T}function S(h,d,v,b){if(v==null)throw Error(_(151));for(var T=null,O=null,A=d,R=d=0,M=null,E=v.next();A!==null&&!E.done;R++,E=v.next()){A.index>R?(M=A,A=null):M=A.sibling;var L=c(h,A,E.value,b);if(L===null){A===null&&(A=M);break}e&&A&&L.alternate===null&&t(h,A),d=i(L,d,R),O===null?T=L:O.sibling=L,O=L,A=M}if(E.done)return n(h,A),me&&vo(h,R),T;if(A===null){for(;!E.done;R++,E=v.next())E=m(h,E.value,b),E!==null&&(d=i(E,d,R),O===null?T=E:O.sibling=E,O=E);return me&&vo(h,R),T}for(A=o(A);!E.done;R++,E=v.next())E=p(A,h,R,E.value,b),E!==null&&(e&&E.alternate!==null&&A.delete(E.key===null?R:E.key),d=i(E,d,R),O===null?T=E:O.sibling=E,O=E);return e&&A.forEach(function(z){return t(h,z)}),me&&vo(h,R),T}function y(h,d,v,b){if(typeof v=="object"&&v!==null&&v.type===Ui&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case xu:e:{for(var T=v.key;d!==null;){if(d.key===T){if(T=v.type,T===Ui){if(d.tag===7){n(h,d.sibling),b=r(d,v.props.children),b.return=h,h=b;break e}}else if(d.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Qo&&Fr(T)===d.type){n(h,d.sibling),b=r(d,v.props),pl(b,v),b.return=h,h=b;break e}n(h,d);break}else t(h,d);d=d.sibling}v.type===Ui?(b=Qr(v.props.children,h.mode,b,v.key),b.return=h,h=b):(b=Gu(v.type,v.key,v.props,null,h.mode,b),pl(b,v),b.return=h,h=b)}return a(h);case vl:e:{for(T=v.key;d!==null;){if(d.key===T)if(d.tag===4&&d.stateNode.containerInfo===v.containerInfo&&d.stateNode.implementation===v.implementation){n(h,d.sibling),b=r(d,v.children||[]),b.return=h,h=b;break e}else{n(h,d);break}else t(h,d);d=d.sibling}b=ym(v,h.mode,b),b.return=h,h=b}return a(h);case Qo:return v=Fr(v),y(h,d,v,b)}if(bl(v))return g(h,d,v,b);if(dl(v)){if(T=dl(v),typeof T!="function")throw Error(_(150));return v=T.call(v),S(h,d,v,b)}if(typeof v.then=="function")return y(h,d,Ru(v),b);if(v.$$typeof===xo)return y(h,d,Ou(h,v),b);Cu(h,v)}return typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint"?(v=""+v,d!==null&&d.tag===6?(n(h,d.sibling),b=r(d,v),b.return=h,h=b):(n(h,d),b=gm(v,h.mode,b),b.return=h,h=b),a(h)):n(h,d)}return function(h,d,v,b){try{Gl=0;var T=y(h,d,v,b);return ia=null,T}catch(A){if(A===Sa||A===$c)throw A;var O=rn(29,A,null,h.mode);return O.lanes=b,O.return=h,O}finally{}}}var ri=KS(!0),QS=KS(!1),Jo=!1;function Jh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ah(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function dr(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function fr(e,t,n){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(ve&2)!==0){var r=o.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),o.pending=t,t=ic(e),US(e,null,n),t}return zc(e,o,t,n),ic(e)}function Tl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,gS(e,n)}}function bm(e,t){var n=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,n===o)){var r=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?r=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?r=i=t:i=i.next=t}else r=i=t;n={baseState:o.baseState,firstBaseUpdate:r,lastBaseUpdate:i,shared:o.shared,callbacks:o.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var lh=!1;function Ol(){if(lh){var e=ra;if(e!==null)throw e}}function Rl(e,t,n,o){lh=!1;var r=e.updateQueue;Jo=!1;var i=r.firstBaseUpdate,a=r.lastBaseUpdate,l=r.shared.pending;if(l!==null){r.shared.pending=null;var s=l,u=s.next;s.next=null,a===null?i=u:a.next=u,a=s;var f=e.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==a&&(l===null?f.firstBaseUpdate=u:l.next=u,f.lastBaseUpdate=s))}if(i!==null){var m=r.baseState;a=0,f=u=s=null,l=i;do{var c=l.lane&-536870913,p=c!==l.lane;if(p?(fe&c)===c:(o&c)===c){c!==0&&c===da&&(lh=!0),f!==null&&(f=f.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var g=e,S=l;c=t;var y=n;switch(S.tag){case 1:if(g=S.payload,typeof g=="function"){m=g.call(y,m,c);break e}m=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=S.payload,c=typeof g=="function"?g.call(y,m,c):g,c==null)break e;m=Le({},m,c);break e;case 2:Jo=!0}}c=l.callback,c!==null&&(e.flags|=64,p&&(e.flags|=8192),p=r.callbacks,p===null?r.callbacks=[c]:p.push(c))}else p={lane:c,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(u=f=p,s=m):f=f.next=p,a|=c;if(l=l.next,l===null){if(l=r.shared.pending,l===null)break;p=l,l=p.next,p.next=null,r.lastBaseUpdate=p,r.shared.pending=null}}while(!0);f===null&&(s=m),r.baseState=s,r.firstBaseUpdate=u,r.lastBaseUpdate=f,i===null&&(r.shared.lanes=0),kr|=a,e.lanes=a,e.memoizedState=m}}function JS(e,t){if(typeof e!="function")throw Error(_(191,e));e.call(t)}function e0(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)JS(n[e],t)}var fa=Kn(null),uc=Kn(0);function uk(e,t){e=Co,Pe(uc,e),Pe(fa,t),Co=e|t.baseLanes}function sh(){Pe(uc,Co),Pe(fa,fa.current)}function eg(){Co=uc.current,ht(fa),ht(uc)}var fn=Kn(null),An=null;function tr(e){var t=e.alternate;Pe(Ze,Ze.current&1),Pe(fn,e),An===null&&(t===null||fa.current!==null||t.memoizedState!==null)&&(An=e)}function uh(e){Pe(Ze,Ze.current),Pe(fn,e),An===null&&(An=e)}function t0(e){e.tag===22?(Pe(Ze,Ze.current),Pe(fn,e),An===null&&(An=e)):nr(e)}function nr(){Pe(Ze,Ze.current),Pe(fn,fn.current)}function on(e){ht(fn),An===e&&(An=null),ht(Ze)}var Ze=Kn(0);function cc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Oh(n)||Rh(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var To=0,ne=null,Te=null,nt=null,dc=!1,aa=!1,ii=!1,fc=0,Ul=0,la=null,YC=0;function We(){throw Error(_(321))}function tg(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!dn(e[n],t[n]))return!1;return!0}function ng(e,t,n,o,r,i){return To=i,ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Y.H=e===null||e.memoizedState===null?_0:pg,ii=!1,i=n(o,r),ii=!1,aa&&(i=o0(t,n,o,r)),n0(e),i}function n0(e){Y.H=Bl;var t=Te!==null&&Te.next!==null;if(To=0,nt=Te=ne=null,dc=!1,Ul=0,la=null,t)throw Error(_(300));e===null||it||(e=e.dependencies,e!==null&&lc(e)&&(it=!0))}function o0(e,t,n,o){ne=e;var r=0;do{if(aa&&(la=null),Ul=0,aa=!1,25<=r)throw Error(_(301));if(r+=1,nt=Te=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}Y.H=z0,i=t(n,o)}while(aa);return i}function FC(){var e=Y.H,t=e.useState()[0];return t=typeof t.then=="function"?os(t):t,e=e.useState()[0],(Te!==null?Te.memoizedState:null)!==e&&(ne.flags|=1024),t}function og(){var e=fc!==0;return fc=0,e}function rg(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ig(e){if(dc){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}dc=!1}To=0,nt=Te=ne=null,aa=!1,Ul=fc=0,la=null}function _t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nt===null?ne.memoizedState=nt=e:nt=nt.next=e,nt}function Ke(){if(Te===null){var e=ne.alternate;e=e!==null?e.memoizedState:null}else e=Te.next;var t=nt===null?ne.memoizedState:nt.next;if(t!==null)nt=t,Te=e;else{if(e===null)throw ne.alternate===null?Error(_(467)):Error(_(310));Te=e,e={memoizedState:Te.memoizedState,baseState:Te.baseState,baseQueue:Te.baseQueue,queue:Te.queue,next:null},nt===null?ne.memoizedState=nt=e:nt=nt.next=e}return nt}function Nc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function os(e){var t=Ul;return Ul+=1,la===null&&(la=[]),e=ZS(la,e,t),t=ne,(nt===null?t.memoizedState:nt.next)===null&&(t=t.alternate,Y.H=t===null||t.memoizedState===null?_0:pg),e}function Lc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return os(e);if(e.$$typeof===xo)return St(e)}throw Error(_(438,String(e)))}function ag(e){var t=null,n=ne.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var o=ne.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(t={data:o.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Nc(),ne.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),o=0;o<e;o++)n[o]=$R;return t.index++,n}function Oo(e,t){return typeof t=="function"?t(e):t}function Bu(e){var t=Ke();return lg(t,Te,e)}function lg(e,t,n){var o=e.queue;if(o===null)throw Error(_(311));o.lastRenderedReducer=n;var r=e.baseQueue,i=o.pending;if(i!==null){if(r!==null){var a=r.next;r.next=i.next,i.next=a}t.baseQueue=r=i,o.pending=null}if(i=e.baseState,r===null)e.memoizedState=i;else{t=r.next;var l=a=null,s=null,u=t,f=!1;do{var m=u.lane&-536870913;if(m!==u.lane?(fe&m)===m:(To&m)===m){var c=u.revertLane;if(c===0)s!==null&&(s=s.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),m===da&&(f=!0);else if((To&c)===c){u=u.next,c===da&&(f=!0);continue}else m={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(l=s=m,a=i):s=s.next=m,ne.lanes|=c,kr|=c;m=u.action,ii&&n(i,m),i=u.hasEagerState?u.eagerState:n(i,m)}else c={lane:m,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(l=s=c,a=i):s=s.next=c,ne.lanes|=m,kr|=m;u=u.next}while(u!==null&&u!==t);if(s===null?a=i:s.next=l,!dn(i,e.memoizedState)&&(it=!0,f&&(n=ra,n!==null)))throw n;e.memoizedState=i,e.baseState=a,e.baseQueue=s,o.lastRenderedState=i}return r===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function xm(e){var t=Ke(),n=t.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=e;var o=n.dispatch,r=n.pending,i=t.memoizedState;if(r!==null){n.pending=null;var a=r=r.next;do i=e(i,a.action),a=a.next;while(a!==r);dn(i,t.memoizedState)||(it=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,o]}function r0(e,t,n){var o=ne,r=Ke(),i=me;if(i){if(n===void 0)throw Error(_(407));n=n()}else n=t();var a=!dn((Te||r).memoizedState,n);if(a&&(r.memoizedState=n,it=!0),r=r.queue,sg(l0.bind(null,o,r,e),[e]),r.getSnapshot!==t||a||nt!==null&&nt.memoizedState.tag&1){if(o.flags|=2048,pa(9,{destroy:void 0},a0.bind(null,o,r,n,t),null),Re===null)throw Error(_(349));i||(To&127)!==0||i0(o,t,n)}return n}function i0(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ne.updateQueue,t===null?(t=Nc(),ne.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function a0(e,t,n,o){t.value=n,t.getSnapshot=o,s0(t)&&u0(e)}function l0(e,t,n){return n(function(){s0(t)&&u0(e)})}function s0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!dn(e,n)}catch{return!0}}function u0(e){var t=ci(e,2);t!==null&&Xt(t,e,2)}function ch(e){var t=_t();if(typeof e=="function"){var n=e;if(e=n(),ii){rr(!0);try{n()}finally{rr(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oo,lastRenderedState:e},t}function c0(e,t,n,o){return e.baseState=n,lg(e,Te,typeof o=="function"?o:Oo)}function ZC(e,t,n,o,r){if(Ic(e))throw Error(_(485));if(e=t.action,e!==null){var i={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(a){i.listeners.push(a)}};Y.T!==null?n(!0):i.isTransition=!1,o(i),n=t.pending,n===null?(i.next=t.pending=i,d0(t,i)):(i.next=n.next,t.pending=n.next=i)}}function d0(e,t){var n=t.action,o=t.payload,r=e.state;if(t.isTransition){var i=Y.T,a={};Y.T=a;try{var l=n(r,o),s=Y.S;s!==null&&s(a,l),ck(e,t,l)}catch(u){dh(e,t,u)}finally{i!==null&&a.types!==null&&(i.types=a.types),Y.T=i}}else try{i=n(r,o),ck(e,t,i)}catch(u){dh(e,t,u)}}function ck(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(o){dk(e,t,o)},function(o){return dh(e,t,o)}):dk(e,t,n)}function dk(e,t,n){t.status="fulfilled",t.value=n,f0(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,d0(e,n)))}function dh(e,t,n){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=n,f0(t),t=t.next;while(t!==o)}e.action=null}function f0(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function p0(e,t){return t}function fk(e,t){if(me){var n=Re.formState;if(n!==null){e:{var o=ne;if(me){if(Ne){t:{for(var r=Ne,i=wn;r.nodeType!==8;){if(!i){r=null;break t}if(r=En(r.nextSibling),r===null){r=null;break t}}i=r.data,r=i==="F!"||i==="F"?r:null}if(r){Ne=En(r.nextSibling),o=r.data==="F!";break e}}br(o)}o=!1}o&&(t=n[0])}}return n=_t(),n.memoizedState=n.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:p0,lastRenderedState:t},n.queue=o,n=R0.bind(null,ne,o),o.dispatch=n,o=ch(!1),i=fg.bind(null,ne,!1,o.queue),o=_t(),r={state:t,dispatch:null,action:e,pending:null},o.queue=r,n=ZC.bind(null,ne,r,i,n),r.dispatch=n,o.memoizedState=e,[t,n,!1]}function pk(e){var t=Ke();return m0(t,Te,e)}function m0(e,t,n){if(t=lg(e,t,p0)[0],e=Bu(Oo)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=os(t)}catch(a){throw a===Sa?$c:a}else o=t;t=Ke();var r=t.queue,i=r.dispatch;return n!==t.memoizedState&&(ne.flags|=2048,pa(9,{destroy:void 0},KC.bind(null,r,n),null)),[o,i,e]}function KC(e,t){e.action=t}function mk(e){var t=Ke(),n=Te;if(n!==null)return m0(t,n,e);Ke(),t=t.memoizedState,n=Ke();var o=n.queue.dispatch;return n.memoizedState=e,[t,o,!1]}function pa(e,t,n,o){return e={tag:e,create:n,deps:o,inst:t,next:null},t=ne.updateQueue,t===null&&(t=Nc(),ne.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(o=n.next,n.next=e,e.next=o,t.lastEffect=e),e}function h0(){return Ke().memoizedState}function Vu(e,t,n,o){var r=_t();ne.flags|=e,r.memoizedState=pa(1|t,{destroy:void 0},n,o===void 0?null:o)}function Dc(e,t,n,o){var r=Ke();o=o===void 0?null:o;var i=r.memoizedState.inst;Te!==null&&o!==null&&tg(o,Te.memoizedState.deps)?r.memoizedState=pa(t,i,n,o):(ne.flags|=e,r.memoizedState=pa(1|t,i,n,o))}function hk(e,t){Vu(8390656,8,e,t)}function sg(e,t){Dc(2048,8,e,t)}function QC(e){ne.flags|=4;var t=ne.updateQueue;if(t===null)t=Nc(),ne.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function g0(e){var t=Ke().memoizedState;return QC({ref:t,nextImpl:e}),function(){if((ve&2)!==0)throw Error(_(440));return t.impl.apply(void 0,arguments)}}function y0(e,t){return Dc(4,2,e,t)}function v0(e,t){return Dc(4,4,e,t)}function b0(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function x0(e,t,n){n=n!=null?n.concat([e]):null,Dc(4,4,b0.bind(null,t,e),n)}function ug(){}function k0(e,t){var n=Ke();t=t===void 0?null:t;var o=n.memoizedState;return t!==null&&tg(t,o[1])?o[0]:(n.memoizedState=[e,t],e)}function S0(e,t){var n=Ke();t=t===void 0?null:t;var o=n.memoizedState;if(t!==null&&tg(t,o[1]))return o[0];if(o=e(),ii){rr(!0);try{e()}finally{rr(!1)}}return n.memoizedState=[o,t],o}function cg(e,t,n){return n===void 0||(To&1073741824)!==0&&(fe&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=c1(),ne.lanes|=e,kr|=e,n)}function w0(e,t,n,o){return dn(n,t)?n:fa.current!==null?(e=cg(e,n,o),dn(e,t)||(it=!0),e):(To&42)===0||(To&1073741824)!==0&&(fe&261930)===0?(it=!0,e.memoizedState=n):(e=c1(),ne.lanes|=e,kr|=e,t)}function A0(e,t,n,o,r){var i=be.p;be.p=i!==0&&8>i?i:8;var a=Y.T,l={};Y.T=l,fg(e,!1,t,n);try{var s=r(),u=Y.S;if(u!==null&&u(l,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var f=WC(s,o);Cl(e,t,f,cn(e))}else Cl(e,t,o,cn(e))}catch(m){Cl(e,t,{then:function(){},status:"rejected",reason:m},cn())}finally{be.p=i,a!==null&&l.types!==null&&(a.types=l.types),Y.T=a}}function JC(){}function fh(e,t,n,o){if(e.tag!==5)throw Error(_(476));var r=E0(e).queue;A0(e,r,t,Kr,n===null?JC:function(){return M0(e),n(o)})}function E0(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Kr,baseState:Kr,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oo,lastRenderedState:Kr},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function M0(e){var t=E0(e);t.next===null&&(t=e.alternate.memoizedState),Cl(e,t.next.queue,{},cn())}function dg(){return St(Wl)}function T0(){return Ke().memoizedState}function O0(){return Ke().memoizedState}function e3(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=cn();e=dr(n);var o=fr(t,e,n);o!==null&&(Xt(o,t,n),Tl(o,t,n)),t={cache:Zh()},e.payload=t;return}t=t.return}}function t3(e,t,n){var o=cn();n={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ic(e)?C0(t,n):(n=Xh(e,t,n,o),n!==null&&(Xt(n,e,o),P0(n,t,o)))}function R0(e,t,n){var o=cn();Cl(e,t,n,o)}function Cl(e,t,n,o){var r={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ic(e))C0(t,r);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,l=i(a,n);if(r.hasEagerState=!0,r.eagerState=l,dn(l,a))return zc(e,t,r,0),Re===null&&_c(),!1}catch{}finally{}if(n=Xh(e,t,r,o),n!==null)return Xt(n,e,o),P0(n,t,o),!0}return!1}function fg(e,t,n,o){if(o={lane:2,revertLane:kg(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Ic(e)){if(t)throw Error(_(479))}else t=Xh(e,n,o,2),t!==null&&Xt(t,e,2)}function Ic(e){var t=e.alternate;return e===ne||t!==null&&t===ne}function C0(e,t){aa=dc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function P0(e,t,n){if((n&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,gS(e,n)}}var Bl={readContext:St,use:Lc,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useLayoutEffect:We,useInsertionEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useSyncExternalStore:We,useId:We,useHostTransitionStatus:We,useFormState:We,useActionState:We,useOptimistic:We,useMemoCache:We,useCacheRefresh:We};Bl.useEffectEvent=We;var _0={readContext:St,use:Lc,useCallback:function(e,t){return _t().memoizedState=[e,t===void 0?null:t],e},useContext:St,useEffect:hk,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Vu(4194308,4,b0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Vu(4194308,4,e,t)},useInsertionEffect:function(e,t){Vu(4,2,e,t)},useMemo:function(e,t){var n=_t();t=t===void 0?null:t;var o=e();if(ii){rr(!0);try{e()}finally{rr(!1)}}return n.memoizedState=[o,t],o},useReducer:function(e,t,n){var o=_t();if(n!==void 0){var r=n(t);if(ii){rr(!0);try{n(t)}finally{rr(!1)}}}else r=t;return o.memoizedState=o.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},o.queue=e,e=e.dispatch=t3.bind(null,ne,e),[o.memoizedState,e]},useRef:function(e){var t=_t();return e={current:e},t.memoizedState=e},useState:function(e){e=ch(e);var t=e.queue,n=R0.bind(null,ne,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ug,useDeferredValue:function(e,t){var n=_t();return cg(n,e,t)},useTransition:function(){var e=ch(!1);return e=A0.bind(null,ne,e.queue,!0,!1),_t().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var o=ne,r=_t();if(me){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),Re===null)throw Error(_(349));(fe&127)!==0||i0(o,t,n)}r.memoizedState=n;var i={value:n,getSnapshot:t};return r.queue=i,hk(l0.bind(null,o,i,e),[e]),o.flags|=2048,pa(9,{destroy:void 0},a0.bind(null,o,i,n,t),null),n},useId:function(){var e=_t(),t=Re.identifierPrefix;if(me){var n=Yn,o=Wn;n=(o&~(1<<32-un(o)-1)).toString(32)+n,t="_"+t+"R_"+n,n=fc++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=YC++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:dg,useFormState:fk,useActionState:fk,useOptimistic:function(e){var t=_t();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=fg.bind(null,ne,!0,n),n.dispatch=t,[e,t]},useMemoCache:ag,useCacheRefresh:function(){return _t().memoizedState=e3.bind(null,ne)},useEffectEvent:function(e){var t=_t(),n={impl:e};return t.memoizedState=n,function(){if((ve&2)!==0)throw Error(_(440));return n.impl.apply(void 0,arguments)}}},pg={readContext:St,use:Lc,useCallback:k0,useContext:St,useEffect:sg,useImperativeHandle:x0,useInsertionEffect:y0,useLayoutEffect:v0,useMemo:S0,useReducer:Bu,useRef:h0,useState:function(){return Bu(Oo)},useDebugValue:ug,useDeferredValue:function(e,t){var n=Ke();return w0(n,Te.memoizedState,e,t)},useTransition:function(){var e=Bu(Oo)[0],t=Ke().memoizedState;return[typeof e=="boolean"?e:os(e),t]},useSyncExternalStore:r0,useId:T0,useHostTransitionStatus:dg,useFormState:pk,useActionState:pk,useOptimistic:function(e,t){var n=Ke();return c0(n,Te,e,t)},useMemoCache:ag,useCacheRefresh:O0};pg.useEffectEvent=g0;var z0={readContext:St,use:Lc,useCallback:k0,useContext:St,useEffect:sg,useImperativeHandle:x0,useInsertionEffect:y0,useLayoutEffect:v0,useMemo:S0,useReducer:xm,useRef:h0,useState:function(){return xm(Oo)},useDebugValue:ug,useDeferredValue:function(e,t){var n=Ke();return Te===null?cg(n,e,t):w0(n,Te.memoizedState,e,t)},useTransition:function(){var e=xm(Oo)[0],t=Ke().memoizedState;return[typeof e=="boolean"?e:os(e),t]},useSyncExternalStore:r0,useId:T0,useHostTransitionStatus:dg,useFormState:mk,useActionState:mk,useOptimistic:function(e,t){var n=Ke();return Te!==null?c0(n,Te,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:ag,useCacheRefresh:O0};z0.useEffectEvent=g0;function km(e,t,n,o){t=e.memoizedState,n=n(o,t),n=n==null?t:Le({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ph={enqueueSetState:function(e,t,n){e=e._reactInternals;var o=cn(),r=dr(o);r.payload=t,n!=null&&(r.callback=n),t=fr(e,r,o),t!==null&&(Xt(t,e,o),Tl(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var o=cn(),r=dr(o);r.tag=1,r.payload=t,n!=null&&(r.callback=n),t=fr(e,r,o),t!==null&&(Xt(t,e,o),Tl(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=cn(),o=dr(n);o.tag=2,t!=null&&(o.callback=t),t=fr(e,o,n),t!==null&&(Xt(t,e,n),Tl(t,e,n))}};function gk(e,t,n,o,r,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,i,a):t.prototype&&t.prototype.isPureReactComponent?!jl(n,o)||!jl(r,i):!0}function yk(e,t,n,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,o),t.state!==e&&ph.enqueueReplaceState(t,t.state,null)}function ai(e,t){var n=t;if("ref"in t){n={};for(var o in t)o!=="ref"&&(n[o]=t[o])}if(e=e.defaultProps){n===t&&(n=Le({},n));for(var r in e)n[r]===void 0&&(n[r]=e[r])}return n}function $0(e){rc(e)}function N0(e){console.error(e)}function L0(e){rc(e)}function pc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function vk(e,t,n){try{var o=e.onCaughtError;o(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function mh(e,t,n){return n=dr(n),n.tag=3,n.payload={element:null},n.callback=function(){pc(e,t)},n}function D0(e){return e=dr(e),e.tag=3,e}function I0(e,t,n,o){var r=n.type.getDerivedStateFromError;if(typeof r=="function"){var i=o.value;e.payload=function(){return r(i)},e.callback=function(){vk(t,n,o)}}var a=n.stateNode;a!==null&&typeof a.componentDidCatch=="function"&&(e.callback=function(){vk(t,n,o),typeof r!="function"&&(pr===null?pr=new Set([this]):pr.add(this));var l=o.stack;this.componentDidCatch(o.value,{componentStack:l!==null?l:""})})}function n3(e,t,n,o,r){if(n.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=n.alternate,t!==null&&ka(t,n,r,!0),n=fn.current,n!==null){switch(n.tag){case 31:case 13:return An===null?vc():n.alternate===null&&Ye===0&&(Ye=3),n.flags&=-257,n.flags|=65536,n.lanes=r,o===sc?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([o]):t.add(o),_m(e,o,r)),!1;case 22:return n.flags|=65536,o===sc?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([o]):n.add(o)),_m(e,o,r)),!1}throw Error(_(435,n.tag))}return _m(e,o,r),vc(),!1}if(me)return t=fn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,o!==th&&(e=Error(_(422),{cause:o}),ql(Sn(e,n)))):(o!==th&&(t=Error(_(423),{cause:o}),ql(Sn(t,n))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,o=Sn(o,n),r=mh(e.stateNode,o,r),bm(e,r),Ye!==4&&(Ye=2)),!1;var i=Error(_(520),{cause:o});if(i=Sn(i,n),zl===null?zl=[i]:zl.push(i),Ye!==4&&(Ye=2),t===null)return!0;o=Sn(o,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=r&-r,n.lanes|=e,e=mh(n.stateNode,o,e),bm(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(pr===null||!pr.has(i))))return n.flags|=65536,r&=-r,n.lanes|=r,r=D0(r),I0(r,e,n,o),bm(n,r),!1}n=n.return}while(n!==null);return!1}var mg=Error(_(461)),it=!1;function bt(e,t,n,o){t.child=e===null?QS(t,null,n,o):ri(t,e.child,n,o)}function bk(e,t,n,o,r){n=n.render;var i=t.ref;if("ref"in o){var a={};for(var l in o)l!=="ref"&&(a[l]=o[l])}else a=o;return oi(t),o=ng(e,t,n,a,i,r),l=og(),e!==null&&!it?(rg(e,t,r),Ro(e,t,r)):(me&&l&&Yh(t),t.flags|=1,bt(e,t,o,r),t.child)}function xk(e,t,n,o,r){if(e===null){var i=n.type;return typeof i=="function"&&!Wh(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,j0(e,t,i,o,r)):(e=Gu(n.type,null,o,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!hg(e,r)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:jl,n(a,o)&&e.ref===t.ref)return Ro(e,t,r)}return t.flags|=1,e=wo(i,o),e.ref=t.ref,e.return=t,t.child=e}function j0(e,t,n,o,r){if(e!==null){var i=e.memoizedProps;if(jl(i,o)&&e.ref===t.ref)if(it=!1,t.pendingProps=o=i,hg(e,r))(e.flags&131072)!==0&&(it=!0);else return t.lanes=e.lanes,Ro(e,t,r)}return hh(e,t,n,o,r)}function H0(e,t,n,o){var r=o.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|n:n,e!==null){for(o=t.child=e.child,r=0;o!==null;)r=r|o.lanes|o.childLanes,o=o.sibling;o=r&~i}else o=0,t.child=null;return kk(e,t,i,n,o)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Uu(t,i!==null?i.cachePool:null),i!==null?uk(t,i):sh(),t0(t);else return o=t.lanes=536870912,kk(e,t,i!==null?i.baseLanes|n:n,n,o)}else i!==null?(Uu(t,i.cachePool),uk(t,i),nr(t),t.memoizedState=null):(e!==null&&Uu(t,null),sh(),nr(t));return bt(e,t,r,n),t.child}function kl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function kk(e,t,n,o,r){var i=Kh();return i=i===null?null:{parent:rt._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&Uu(t,null),sh(),t0(t),e!==null&&ka(e,t,o,!0),t.childLanes=r,null}function Xu(e,t){return t=mc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Sk(e,t,n){return ri(t,e.child,null,n),e=Xu(t,t.pendingProps),e.flags|=2,on(t),t.memoizedState=null,e}function o3(e,t,n){var o=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(me){if(o.mode==="hidden")return e=Xu(t,o),t.lanes=536870912,kl(null,e);if(uh(t),(e=Ne)?(e=_1(e,wn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:vr!==null?{id:Wn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},n=VS(e),n.return=t,t.child=n,kt=t,Ne=null)):e=null,e===null)throw br(t);return t.lanes=536870912,null}return Xu(t,o)}var i=e.memoizedState;if(i!==null){var a=i.dehydrated;if(uh(t),r)if(t.flags&256)t.flags&=-257,t=Sk(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(_(558));else if(it||ka(e,t,n,!1),r=(n&e.childLanes)!==0,it||r){if(o=Re,o!==null&&(a=yS(o,n),a!==0&&a!==i.retryLane))throw i.retryLane=a,ci(e,a),Xt(o,e,a),mg;vc(),t=Sk(e,t,n)}else e=i.treeContext,Ne=En(a.nextSibling),kt=t,me=!0,cr=null,wn=!1,e!==null&&WS(t,e),t=Xu(t,o),t.flags|=4096;return t}return e=wo(e.child,{mode:o.mode,children:o.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Wu(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(_(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function hh(e,t,n,o,r){return oi(t),n=ng(e,t,n,o,void 0,r),o=og(),e!==null&&!it?(rg(e,t,r),Ro(e,t,r)):(me&&o&&Yh(t),t.flags|=1,bt(e,t,n,r),t.child)}function wk(e,t,n,o,r,i){return oi(t),t.updateQueue=null,n=o0(t,o,n,r),n0(e),o=og(),e!==null&&!it?(rg(e,t,i),Ro(e,t,i)):(me&&o&&Yh(t),t.flags|=1,bt(e,t,n,i),t.child)}function Ak(e,t,n,o,r){if(oi(t),t.stateNode===null){var i=Ki,a=n.contextType;typeof a=="object"&&a!==null&&(i=St(a)),i=new n(o,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=ph,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=o,i.state=t.memoizedState,i.refs={},Jh(t),a=n.contextType,i.context=typeof a=="object"&&a!==null?St(a):Ki,i.state=t.memoizedState,a=n.getDerivedStateFromProps,typeof a=="function"&&(km(t,n,a,o),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(a=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),a!==i.state&&ph.enqueueReplaceState(i,i.state,null),Rl(t,o,i,r),Ol(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),o=!0}else if(e===null){i=t.stateNode;var l=t.memoizedProps,s=ai(n,l);i.props=s;var u=i.context,f=n.contextType;a=Ki,typeof f=="object"&&f!==null&&(a=St(f));var m=n.getDerivedStateFromProps;f=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function",l=t.pendingProps!==l,f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l||u!==a)&&yk(t,i,o,a),Jo=!1;var c=t.memoizedState;i.state=c,Rl(t,o,i,r),Ol(),u=t.memoizedState,l||c!==u||Jo?(typeof m=="function"&&(km(t,n,m,o),u=t.memoizedState),(s=Jo||gk(t,n,s,o,c,u,a))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=u),i.props=o,i.state=u,i.context=a,o=s):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{i=t.stateNode,ah(e,t),a=t.memoizedProps,f=ai(n,a),i.props=f,m=t.pendingProps,c=i.context,u=n.contextType,s=Ki,typeof u=="object"&&u!==null&&(s=St(u)),l=n.getDerivedStateFromProps,(u=typeof l=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==m||c!==s)&&yk(t,i,o,s),Jo=!1,c=t.memoizedState,i.state=c,Rl(t,o,i,r),Ol();var p=t.memoizedState;a!==m||c!==p||Jo||e!==null&&e.dependencies!==null&&lc(e.dependencies)?(typeof l=="function"&&(km(t,n,l,o),p=t.memoizedState),(f=Jo||gk(t,n,f,o,c,p,s)||e!==null&&e.dependencies!==null&&lc(e.dependencies))?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(o,p,s),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(o,p,s)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&c===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&c===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=p),i.props=o,i.state=p,i.context=s,o=f):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&c===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&c===e.memoizedState||(t.flags|=1024),o=!1)}return i=o,Wu(e,t),o=(t.flags&128)!==0,i||o?(i=t.stateNode,n=o&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&o?(t.child=ri(t,e.child,null,r),t.child=ri(t,null,n,r)):bt(e,t,n,r),t.memoizedState=i.state,e=t.child):e=Ro(e,t,r),e}function Ek(e,t,n,o){return ni(),t.flags|=256,bt(e,t,n,o),t.child}var Sm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wm(e){return{baseLanes:e,cachePool:FS()}}function Am(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=an),e}function q0(e,t,n){var o=t.pendingProps,r=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(Ze.current&2)!==0),a&&(r=!0,t.flags&=-129),a=(t.flags&32)!==0,t.flags&=-33,e===null){if(me){if(r?tr(t):nr(t),(e=Ne)?(e=_1(e,wn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:vr!==null?{id:Wn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},n=VS(e),n.return=t,t.child=n,kt=t,Ne=null)):e=null,e===null)throw br(t);return Rh(e)?t.lanes=32:t.lanes=536870912,null}var l=o.children;return o=o.fallback,r?(nr(t),r=t.mode,l=mc({mode:"hidden",children:l},r),o=Qr(o,r,n,null),l.return=t,o.return=t,l.sibling=o,t.child=l,o=t.child,o.memoizedState=wm(n),o.childLanes=Am(e,a,n),t.memoizedState=Sm,kl(null,o)):(tr(t),gh(t,l))}var s=e.memoizedState;if(s!==null&&(l=s.dehydrated,l!==null)){if(i)t.flags&256?(tr(t),t.flags&=-257,t=Em(e,t,n)):t.memoizedState!==null?(nr(t),t.child=e.child,t.flags|=128,t=null):(nr(t),l=o.fallback,r=t.mode,o=mc({mode:"visible",children:o.children},r),l=Qr(l,r,n,null),l.flags|=2,o.return=t,l.return=t,o.sibling=l,t.child=o,ri(t,e.child,null,n),o=t.child,o.memoizedState=wm(n),o.childLanes=Am(e,a,n),t.memoizedState=Sm,t=kl(null,o));else if(tr(t),Rh(l)){if(a=l.nextSibling&&l.nextSibling.dataset,a)var u=a.dgst;a=u,o=Error(_(419)),o.stack="",o.digest=a,ql({value:o,source:null,stack:null}),t=Em(e,t,n)}else if(it||ka(e,t,n,!1),a=(n&e.childLanes)!==0,it||a){if(a=Re,a!==null&&(o=yS(a,n),o!==0&&o!==s.retryLane))throw s.retryLane=o,ci(e,o),Xt(a,e,o),mg;Oh(l)||vc(),t=Em(e,t,n)}else Oh(l)?(t.flags|=192,t.child=e.child,t=null):(e=s.treeContext,Ne=En(l.nextSibling),kt=t,me=!0,cr=null,wn=!1,e!==null&&WS(t,e),t=gh(t,o.children),t.flags|=4096);return t}return r?(nr(t),l=o.fallback,r=t.mode,s=e.child,u=s.sibling,o=wo(s,{mode:"hidden",children:o.children}),o.subtreeFlags=s.subtreeFlags&65011712,u!==null?l=wo(u,l):(l=Qr(l,r,n,null),l.flags|=2),l.return=t,o.return=t,o.sibling=l,t.child=o,kl(null,o),o=t.child,l=e.child.memoizedState,l===null?l=wm(n):(r=l.cachePool,r!==null?(s=rt._currentValue,r=r.parent!==s?{parent:s,pool:s}:r):r=FS(),l={baseLanes:l.baseLanes|n,cachePool:r}),o.memoizedState=l,o.childLanes=Am(e,a,n),t.memoizedState=Sm,kl(e.child,o)):(tr(t),n=e.child,e=n.sibling,n=wo(n,{mode:"visible",children:o.children}),n.return=t,n.sibling=null,e!==null&&(a=t.deletions,a===null?(t.deletions=[e],t.flags|=16):a.push(e)),t.child=n,t.memoizedState=null,n)}function gh(e,t){return t=mc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function mc(e,t){return e=rn(22,e,null,t),e.lanes=0,e}function Em(e,t,n){return ri(t,e.child,null,n),e=gh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Mk(e,t,n){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),oh(e.return,t,n)}function Mm(e,t,n,o,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:n,tailMode:r,treeForkCount:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=o,a.tail=n,a.tailMode=r,a.treeForkCount=i)}function G0(e,t,n){var o=t.pendingProps,r=o.revealOrder,i=o.tail;o=o.children;var a=Ze.current,l=(a&2)!==0;if(l?(a=a&1|2,t.flags|=128):a&=1,Pe(Ze,a),bt(e,t,o,n),o=me?Hl:0,!l&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Mk(e,n,t);else if(e.tag===19)Mk(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(n=t.child,r=null;n!==null;)e=n.alternate,e!==null&&cc(e)===null&&(r=n),n=n.sibling;n=r,n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),Mm(t,!1,r,n,i,o);break;case"backwards":case"unstable_legacy-backwards":for(n=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&cc(e)===null){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}Mm(t,!0,n,null,i,o);break;case"together":Mm(t,!1,null,null,void 0,o);break;default:t.memoizedState=null}return t.child}function Ro(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),kr|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ka(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(_(153));if(t.child!==null){for(e=t.child,n=wo(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=wo(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function hg(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&lc(e)))}function r3(e,t,n){switch(t.tag){case 3:ec(t,t.stateNode.containerInfo),er(t,rt,e.memoizedState.cache),ni();break;case 27:case 5:Bm(t);break;case 4:ec(t,t.stateNode.containerInfo);break;case 10:er(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,uh(t),null;break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(tr(t),t.flags|=128,null):(n&t.child.childLanes)!==0?q0(e,t,n):(tr(t),e=Ro(e,t,n),e!==null?e.sibling:null);tr(t);break;case 19:var r=(e.flags&128)!==0;if(o=(n&t.childLanes)!==0,o||(ka(e,t,n,!1),o=(n&t.childLanes)!==0),r){if(o)return G0(e,t,n);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Pe(Ze,Ze.current),o)break;return null;case 22:return t.lanes=0,H0(e,t,n,t.pendingProps);case 24:er(t,rt,e.memoizedState.cache)}return Ro(e,t,n)}function U0(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)it=!0;else{if(!hg(e,n)&&(t.flags&128)===0)return it=!1,r3(e,t,n);it=(e.flags&131072)!==0}else it=!1,me&&(t.flags&1048576)!==0&&XS(t,Hl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var o=t.pendingProps;if(e=Fr(t.elementType),t.type=e,typeof e=="function")Wh(e)?(o=ai(e,o),t.tag=1,t=Ak(null,t,e,o,n)):(t.tag=0,t=hh(null,t,e,o,n));else{if(e!=null){var r=e.$$typeof;if(r===zh){t.tag=11,t=bk(null,t,e,o,n);break e}else if(r===$h){t.tag=14,t=xk(null,t,e,o,n);break e}}throw t=Gm(e)||e,Error(_(306,t,""))}}return t;case 0:return hh(e,t,t.type,t.pendingProps,n);case 1:return o=t.type,r=ai(o,t.pendingProps),Ak(e,t,o,r,n);case 3:e:{if(ec(t,t.stateNode.containerInfo),e===null)throw Error(_(387));o=t.pendingProps;var i=t.memoizedState;r=i.element,ah(e,t),Rl(t,o,null,n);var a=t.memoizedState;if(o=a.cache,er(t,rt,o),o!==i.cache&&rh(t,[rt],n,!0),Ol(),o=a.element,i.isDehydrated)if(i={element:o,isDehydrated:!1,cache:a.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Ek(e,t,o,n);break e}else if(o!==r){r=Sn(Error(_(424)),t),ql(r),t=Ek(e,t,o,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ne=En(e.firstChild),kt=t,me=!0,cr=null,wn=!0,n=QS(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(ni(),o===r){t=Ro(e,t,n);break e}bt(e,t,o,n)}t=t.child}return t;case 26:return Wu(e,t),e===null?(n=Yk(t.type,null,t.pendingProps,null))?t.memoizedState=n:me||(n=t.type,e=t.pendingProps,o=Sc(ur.current).createElement(n),o[xt]=t,o[Wt]=e,wt(o,n,e),mt(o),t.stateNode=o):t.memoizedState=Yk(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Bm(t),e===null&&me&&(o=t.stateNode=z1(t.type,t.pendingProps,ur.current),kt=t,wn=!0,r=Ne,wr(t.type)?(Ch=r,Ne=En(o.firstChild)):Ne=r),bt(e,t,t.pendingProps.children,n),Wu(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&me&&((r=o=Ne)&&(o=_3(o,t.type,t.pendingProps,wn),o!==null?(t.stateNode=o,kt=t,Ne=En(o.firstChild),wn=!1,r=!0):r=!1),r||br(t)),Bm(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,Mh(r,i)?o=null:a!==null&&Mh(r,a)&&(t.flags|=32),t.memoizedState!==null&&(r=ng(e,t,FC,null,null,n),Wl._currentValue=r),Wu(e,t),bt(e,t,o,n),t.child;case 6:return e===null&&me&&((e=n=Ne)&&(n=z3(n,t.pendingProps,wn),n!==null?(t.stateNode=n,kt=t,Ne=null,e=!0):e=!1),e||br(t)),null;case 13:return q0(e,t,n);case 4:return ec(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=ri(t,null,o,n):bt(e,t,o,n),t.child;case 11:return bk(e,t,t.type,t.pendingProps,n);case 7:return bt(e,t,t.pendingProps,n),t.child;case 8:return bt(e,t,t.pendingProps.children,n),t.child;case 12:return bt(e,t,t.pendingProps.children,n),t.child;case 10:return o=t.pendingProps,er(t,t.type,o.value),bt(e,t,o.children,n),t.child;case 9:return r=t.type._context,o=t.pendingProps.children,oi(t),r=St(r),o=o(r),t.flags|=1,bt(e,t,o,n),t.child;case 14:return xk(e,t,t.type,t.pendingProps,n);case 15:return j0(e,t,t.type,t.pendingProps,n);case 19:return G0(e,t,n);case 31:return o3(e,t,n);case 22:return H0(e,t,n,t.pendingProps);case 24:return oi(t),o=St(rt),e===null?(r=Kh(),r===null&&(r=Re,i=Zh(),r.pooledCache=i,i.refCount++,i!==null&&(r.pooledCacheLanes|=n),r=i),t.memoizedState={parent:o,cache:r},Jh(t),er(t,rt,r)):((e.lanes&n)!==0&&(ah(e,t),Rl(t,null,null,n),Ol()),r=e.memoizedState,i=t.memoizedState,r.parent!==o?(r={parent:o,cache:o},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),er(t,rt,o)):(o=i.cache,er(t,rt,o),o!==r.cache&&rh(t,[rt],n,!0))),bt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(_(156,t.tag))}function mo(e){e.flags|=4}function Tm(e,t,n,o,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(p1())e.flags|=8192;else throw ei=sc,Qh}else e.flags&=-16777217}function Tk(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!L1(t))if(p1())e.flags|=8192;else throw ei=sc,Qh}function Pu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?mS():536870912,e.lanes|=t,ma|=t)}function ml(e,t){if(!me)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function $e(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,o=0;if(t)for(var r=e.child;r!==null;)n|=r.lanes|r.childLanes,o|=r.subtreeFlags&65011712,o|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)n|=r.lanes|r.childLanes,o|=r.subtreeFlags,o|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=o,e.childLanes=n,t}function i3(e,t,n){var o=t.pendingProps;switch(Fh(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $e(t),null;case 1:return $e(t),null;case 3:return n=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),Ao(rt),sa(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ji(t)?mo(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,vm())),$e(t),null;case 26:var r=t.type,i=t.memoizedState;return e===null?(mo(t),i!==null?($e(t),Tk(t,i)):($e(t),Tm(t,r,null,o,n))):i?i!==e.memoizedState?(mo(t),$e(t),Tk(t,i)):($e(t),t.flags&=-16777217):(e=e.memoizedProps,e!==o&&mo(t),$e(t),Tm(t,r,e,o,n)),null;case 27:if(tc(t),n=ur.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&mo(t);else{if(!o){if(t.stateNode===null)throw Error(_(166));return $e(t),null}e=Zn.current,ji(t)?nk(t,e):(e=z1(r,o,n),t.stateNode=e,mo(t))}return $e(t),null;case 5:if(tc(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&mo(t);else{if(!o){if(t.stateNode===null)throw Error(_(166));return $e(t),null}if(i=Zn.current,ji(t))nk(t,i);else{var a=Sc(ur.current);switch(i){case 1:i=a.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:i=a.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":i=a.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":i=a.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":i=a.createElement("div"),i.innerHTML="<script><\\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof o.is=="string"?a.createElement("select",{is:o.is}):a.createElement("select"),o.multiple?i.multiple=!0:o.size&&(i.size=o.size);break;default:i=typeof o.is=="string"?a.createElement(r,{is:o.is}):a.createElement(r)}}i[xt]=t,i[Wt]=o;e:for(a=t.child;a!==null;){if(a.tag===5||a.tag===6)i.appendChild(a.stateNode);else if(a.tag!==4&&a.tag!==27&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}t.stateNode=i;e:switch(wt(i,r,o),r){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&mo(t)}}return $e(t),Tm(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&mo(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(_(166));if(e=ur.current,ji(t)){if(e=t.stateNode,n=t.memoizedProps,o=null,r=kt,r!==null)switch(r.tag){case 27:case 5:o=r.memoizedProps}e[xt]=t,e=!!(e.nodeValue===n||o!==null&&o.suppressHydrationWarning===!0||R1(e.nodeValue,n)),e||br(t,!0)}else e=Sc(e).createTextNode(o),e[xt]=t,t.stateNode=e}return $e(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(o=ji(t),n!==null){if(e===null){if(!o)throw Error(_(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(_(557));e[xt]=t}else ni(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;$e(t),e=!1}else n=vm(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(on(t),t):(on(t),null);if((t.flags&128)!==0)throw Error(_(558))}return $e(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=ji(t),o!==null&&o.dehydrated!==null){if(e===null){if(!r)throw Error(_(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(_(317));r[xt]=t}else ni(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;$e(t),r=!1}else r=vm(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(on(t),t):(on(t),null)}return on(t),(t.flags&128)!==0?(t.lanes=n,t):(n=o!==null,e=e!==null&&e.memoizedState!==null,n&&(o=t.child,r=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(r=o.alternate.memoizedState.cachePool.pool),i=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(i=o.memoizedState.cachePool.pool),i!==r&&(o.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Pu(t,t.updateQueue),$e(t),null);case 4:return sa(),e===null&&Sg(t.stateNode.containerInfo),$e(t),null;case 10:return Ao(t.type),$e(t),null;case 19:if(ht(Ze),o=t.memoizedState,o===null)return $e(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)ml(o,!1);else{if(Ye!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=cc(e),i!==null){for(t.flags|=128,ml(o,!1),e=i.updateQueue,t.updateQueue=e,Pu(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)BS(n,e),n=n.sibling;return Pe(Ze,Ze.current&1|2),me&&vo(t,o.treeForkCount),t.child}e=e.sibling}o.tail!==null&&ln()>gc&&(t.flags|=128,r=!0,ml(o,!1),t.lanes=4194304)}else{if(!r)if(e=cc(i),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Pu(t,e),ml(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!me)return $e(t),null}else 2*ln()-o.renderingStartTime>gc&&n!==536870912&&(t.flags|=128,r=!0,ml(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(e=o.last,e!==null?e.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=ln(),e.sibling=null,n=Ze.current,Pe(Ze,r?n&1|2:n&1),me&&vo(t,o.treeForkCount),e):($e(t),null);case 22:case 23:return on(t),eg(),o=t.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?(n&536870912)!==0&&(t.flags&128)===0&&($e(t),t.subtreeFlags&6&&(t.flags|=8192)):$e(t),n=t.updateQueue,n!==null&&Pu(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),o=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),o!==n&&(t.flags|=2048),e!==null&&ht(Jr),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ao(rt),$e(t),null;case 25:return null;case 30:return null}throw Error(_(156,t.tag))}function a3(e,t){switch(Fh(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ao(rt),sa(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return tc(t),null;case 31:if(t.memoizedState!==null){if(on(t),t.alternate===null)throw Error(_(340));ni()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(on(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));ni()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ht(Ze),null;case 4:return sa(),null;case 10:return Ao(t.type),null;case 22:case 23:return on(t),eg(),e!==null&&ht(Jr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ao(rt),null;case 25:return null;default:return null}}function B0(e,t){switch(Fh(t),t.tag){case 3:Ao(rt),sa();break;case 26:case 27:case 5:tc(t);break;case 4:sa();break;case 31:t.memoizedState!==null&&on(t);break;case 13:on(t);break;case 19:ht(Ze);break;case 10:Ao(t.type);break;case 22:case 23:on(t),eg(),e!==null&&ht(Jr);break;case 24:Ao(rt)}}function rs(e,t){try{var n=t.updateQueue,o=n!==null?n.lastEffect:null;if(o!==null){var r=o.next;n=r;do{if((n.tag&e)===e){o=void 0;var i=n.create,a=n.inst;o=i(),a.destroy=o}n=n.next}while(n!==r)}}catch(l){Ae(t,t.return,l)}}function xr(e,t,n){try{var o=t.updateQueue,r=o!==null?o.lastEffect:null;if(r!==null){var i=r.next;o=i;do{if((o.tag&e)===e){var a=o.inst,l=a.destroy;if(l!==void 0){a.destroy=void 0,r=t;var s=n,u=l;try{u()}catch(f){Ae(r,s,f)}}}o=o.next}while(o!==i)}}catch(f){Ae(t,t.return,f)}}function V0(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{e0(t,n)}catch(o){Ae(e,e.return,o)}}}function X0(e,t,n){n.props=ai(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(o){Ae(e,t,o)}}function Pl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof n=="function"?e.refCleanup=n(o):n.current=o}}catch(r){Ae(e,t,r)}}function Fn(e,t){var n=e.ref,o=e.refCleanup;if(n!==null)if(typeof o=="function")try{o()}catch(r){Ae(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(r){Ae(e,t,r)}else n.current=null}function W0(e){var t=e.type,n=e.memoizedProps,o=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&o.focus();break e;case"img":n.src?o.src=n.src:n.srcSet&&(o.srcset=n.srcSet)}}catch(r){Ae(e,e.return,r)}}function Om(e,t,n){try{var o=e.stateNode;M3(o,e.type,n,t),o[Wt]=t}catch(r){Ae(e,e.return,r)}}function Y0(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&wr(e.type)||e.tag===4}function Rm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Y0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&wr(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function yh(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ko));else if(o!==4&&(o===27&&wr(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(yh(e,t,n),e=e.sibling;e!==null;)yh(e,t,n),e=e.sibling}function hc(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(o!==4&&(o===27&&wr(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(hc(e,t,n),e=e.sibling;e!==null;)hc(e,t,n),e=e.sibling}function F0(e){var t=e.stateNode,n=e.memoizedProps;try{for(var o=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);wt(t,o,n),t[xt]=e,t[Wt]=n}catch(i){Ae(e,e.return,i)}}var bo=!1,ot=!1,Cm=!1,Ok=typeof WeakSet=="function"?WeakSet:Set,pt=null;function l3(e,t){if(e=e.containerInfo,Ah=Mc,e=LS(e),Bh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var o=n.getSelection&&n.getSelection();if(o&&o.rangeCount!==0){n=o.anchorNode;var r=o.anchorOffset,i=o.focusNode;o=o.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,l=-1,s=-1,u=0,f=0,m=e,c=null;t:for(;;){for(var p;m!==n||r!==0&&m.nodeType!==3||(l=a+r),m!==i||o!==0&&m.nodeType!==3||(s=a+o),m.nodeType===3&&(a+=m.nodeValue.length),(p=m.firstChild)!==null;)c=m,m=p;for(;;){if(m===e)break t;if(c===n&&++u===r&&(l=a),c===i&&++f===o&&(s=a),(p=m.nextSibling)!==null)break;m=c,c=m.parentNode}m=p}n=l===-1||s===-1?null:{start:l,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Eh={focusedElem:e,selectionRange:n},Mc=!1,pt=t;pt!==null;)if(t=pt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pt=e;else for(;pt!==null;){switch(t=pt,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)r=e[n],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,n=t,r=i.memoizedProps,i=i.memoizedState,o=n.stateNode;try{var g=ai(n.type,r);e=o.getSnapshotBeforeUpdate(g,i),o.__reactInternalSnapshotBeforeUpdate=e}catch(S){Ae(n,n.return,S)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Th(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Th(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(_(163))}if(e=t.sibling,e!==null){e.return=t.return,pt=e;break}pt=t.return}}function Z0(e,t,n){var o=n.flags;switch(n.tag){case 0:case 11:case 15:go(e,n),o&4&&rs(5,n);break;case 1:if(go(e,n),o&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(a){Ae(n,n.return,a)}else{var r=ai(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(a){Ae(n,n.return,a)}}o&64&&V0(n),o&512&&Pl(n,n.return);break;case 3:if(go(e,n),o&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{e0(e,t)}catch(a){Ae(n,n.return,a)}}break;case 27:t===null&&o&4&&F0(n);case 26:case 5:go(e,n),t===null&&o&4&&W0(n),o&512&&Pl(n,n.return);break;case 12:go(e,n);break;case 31:go(e,n),o&4&&J0(e,n);break;case 13:go(e,n),o&4&&e1(e,n),o&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=g3.bind(null,n),$3(e,n))));break;case 22:if(o=n.memoizedState!==null||bo,!o){t=t!==null&&t.memoizedState!==null||ot,r=bo;var i=ot;bo=o,(ot=t)&&!i?yo(e,n,(n.subtreeFlags&8772)!==0):go(e,n),bo=r,ot=i}break;case 30:break;default:go(e,n)}}function K0(e){var t=e.alternate;t!==null&&(e.alternate=null,K0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ih(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ge=null,Bt=!1;function ho(e,t,n){for(n=n.child;n!==null;)Q0(e,t,n),n=n.sibling}function Q0(e,t,n){if(sn&&typeof sn.onCommitFiberUnmount=="function")try{sn.onCommitFiberUnmount(Kl,n)}catch{}switch(n.tag){case 26:ot||Fn(n,t),ho(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ot||Fn(n,t);var o=Ge,r=Bt;wr(n.type)&&(Ge=n.stateNode,Bt=!1),ho(e,t,n),Nl(n.stateNode),Ge=o,Bt=r;break;case 5:ot||Fn(n,t);case 6:if(o=Ge,r=Bt,Ge=null,ho(e,t,n),Ge=o,Bt=r,Ge!==null)if(Bt)try{(Ge.nodeType===9?Ge.body:Ge.nodeName==="HTML"?Ge.ownerDocument.body:Ge).removeChild(n.stateNode)}catch(i){Ae(n,t,i)}else try{Ge.removeChild(n.stateNode)}catch(i){Ae(n,t,i)}break;case 18:Ge!==null&&(Bt?(e=Ge,Uk(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),va(e)):Uk(Ge,n.stateNode));break;case 4:o=Ge,r=Bt,Ge=n.stateNode.containerInfo,Bt=!0,ho(e,t,n),Ge=o,Bt=r;break;case 0:case 11:case 14:case 15:xr(2,n,t),ot||xr(4,n,t),ho(e,t,n);break;case 1:ot||(Fn(n,t),o=n.stateNode,typeof o.componentWillUnmount=="function"&&X0(n,t,o)),ho(e,t,n);break;case 21:ho(e,t,n);break;case 22:ot=(o=ot)||n.memoizedState!==null,ho(e,t,n),ot=o;break;default:ho(e,t,n)}}function J0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{va(e)}catch(n){Ae(t,t.return,n)}}}function e1(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{va(e)}catch(n){Ae(t,t.return,n)}}function s3(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ok),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ok),t;default:throw Error(_(435,e.tag))}}function _u(e,t){var n=s3(e);t.forEach(function(o){if(!n.has(o)){n.add(o);var r=y3.bind(null,e,o);o.then(r,r)}})}function Gt(e,t){var n=t.deletions;if(n!==null)for(var o=0;o<n.length;o++){var r=n[o],i=e,a=t,l=a;e:for(;l!==null;){switch(l.tag){case 27:if(wr(l.type)){Ge=l.stateNode,Bt=!1;break e}break;case 5:Ge=l.stateNode,Bt=!1;break e;case 3:case 4:Ge=l.stateNode.containerInfo,Bt=!0;break e}l=l.return}if(Ge===null)throw Error(_(160));Q0(i,a,r),Ge=null,Bt=!1,i=r.alternate,i!==null&&(i.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)t1(t,e),t=t.sibling}var $n=null;function t1(e,t){var n=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Gt(t,e),Ut(e),o&4&&(xr(3,e,e.return),rs(3,e),xr(5,e,e.return));break;case 1:Gt(t,e),Ut(e),o&512&&(ot||n===null||Fn(n,n.return)),o&64&&bo&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?o:n.concat(o))));break;case 26:var r=$n;if(Gt(t,e),Ut(e),o&512&&(ot||n===null||Fn(n,n.return)),o&4){var i=n!==null?n.memoizedState:null;if(o=e.memoizedState,n===null)if(o===null)if(e.stateNode===null){e:{o=e.type,n=e.memoizedProps,r=r.ownerDocument||r;t:switch(o){case"title":i=r.getElementsByTagName("title")[0],(!i||i[es]||i[xt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=r.createElement(o),r.head.insertBefore(i,r.querySelector("head > title"))),wt(i,o,n),i[xt]=e,mt(i),o=i;break e;case"link":var a=Zk("link","href",r).get(o+(n.href||""));if(a){for(var l=0;l<a.length;l++)if(i=a[l],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){a.splice(l,1);break t}}i=r.createElement(o),wt(i,o,n),r.head.appendChild(i);break;case"meta":if(a=Zk("meta","content",r).get(o+(n.content||""))){for(l=0;l<a.length;l++)if(i=a[l],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){a.splice(l,1);break t}}i=r.createElement(o),wt(i,o,n),r.head.appendChild(i);break;default:throw Error(_(468,o))}i[xt]=e,mt(i),o=i}e.stateNode=o}else Kk(r,e.type,e.stateNode);else e.stateNode=Fk(r,o,e.memoizedProps);else i!==o?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,o===null?Kk(r,e.type,e.stateNode):Fk(r,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Om(e,e.memoizedProps,n.memoizedProps)}break;case 27:Gt(t,e),Ut(e),o&512&&(ot||n===null||Fn(n,n.return)),n!==null&&o&4&&Om(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Gt(t,e),Ut(e),o&512&&(ot||n===null||Fn(n,n.return)),e.flags&32){r=e.stateNode;try{ca(r,"")}catch(g){Ae(e,e.return,g)}}o&4&&e.stateNode!=null&&(r=e.memoizedProps,Om(e,r,n!==null?n.memoizedProps:r)),o&1024&&(Cm=!0);break;case 6:if(Gt(t,e),Ut(e),o&4){if(e.stateNode===null)throw Error(_(162));o=e.memoizedProps,n=e.stateNode;try{n.nodeValue=o}catch(g){Ae(e,e.return,g)}}break;case 3:if(Zu=null,r=$n,$n=wc(t.containerInfo),Gt(t,e),$n=r,Ut(e),o&4&&n!==null&&n.memoizedState.isDehydrated)try{va(t.containerInfo)}catch(g){Ae(e,e.return,g)}Cm&&(Cm=!1,n1(e));break;case 4:o=$n,$n=wc(e.stateNode.containerInfo),Gt(t,e),Ut(e),$n=o;break;case 12:Gt(t,e),Ut(e);break;case 31:Gt(t,e),Ut(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,_u(e,o)));break;case 13:Gt(t,e),Ut(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(jc=ln()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,_u(e,o)));break;case 22:r=e.memoizedState!==null;var s=n!==null&&n.memoizedState!==null,u=bo,f=ot;if(bo=u||r,ot=f||s,Gt(t,e),ot=f,bo=u,Ut(e),o&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(n===null||s||bo||ot||Zr(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){s=n=t;try{if(i=s.stateNode,r)a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none";else{l=s.stateNode;var m=s.memoizedProps.style,c=m!=null&&m.hasOwnProperty("display")?m.display:null;l.style.display=c==null||typeof c=="boolean"?"":(""+c).trim()}}catch(g){Ae(s,s.return,g)}}}else if(t.tag===6){if(n===null){s=t;try{s.stateNode.nodeValue=r?"":s.memoizedProps}catch(g){Ae(s,s.return,g)}}}else if(t.tag===18){if(n===null){s=t;try{var p=s.stateNode;r?Bk(p,!0):Bk(s.stateNode,!1)}catch(g){Ae(s,s.return,g)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}o&4&&(o=e.updateQueue,o!==null&&(n=o.retryQueue,n!==null&&(o.retryQueue=null,_u(e,n))));break;case 19:Gt(t,e),Ut(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,_u(e,o)));break;case 30:break;case 21:break;default:Gt(t,e),Ut(e)}}function Ut(e){var t=e.flags;if(t&2){try{for(var n,o=e.return;o!==null;){if(Y0(o)){n=o;break}o=o.return}if(n==null)throw Error(_(160));switch(n.tag){case 27:var r=n.stateNode,i=Rm(e);hc(e,i,r);break;case 5:var a=n.stateNode;n.flags&32&&(ca(a,""),n.flags&=-33);var l=Rm(e);hc(e,l,a);break;case 3:case 4:var s=n.stateNode.containerInfo,u=Rm(e);yh(e,u,s);break;default:throw Error(_(161))}}catch(f){Ae(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function n1(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;n1(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function go(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Z0(e,t.alternate,t),t=t.sibling}function Zr(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:xr(4,t,t.return),Zr(t);break;case 1:Fn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&X0(t,t.return,n),Zr(t);break;case 27:Nl(t.stateNode);case 26:case 5:Fn(t,t.return),Zr(t);break;case 22:t.memoizedState===null&&Zr(t);break;case 30:Zr(t);break;default:Zr(t)}e=e.sibling}}function yo(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var o=t.alternate,r=e,i=t,a=i.flags;switch(i.tag){case 0:case 11:case 15:yo(r,i,n),rs(4,i);break;case 1:if(yo(r,i,n),o=i,r=o.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(u){Ae(o,o.return,u)}if(o=i,r=o.updateQueue,r!==null){var l=o.stateNode;try{var s=r.shared.hiddenCallbacks;if(s!==null)for(r.shared.hiddenCallbacks=null,r=0;r<s.length;r++)JS(s[r],l)}catch(u){Ae(o,o.return,u)}}n&&a&64&&V0(i),Pl(i,i.return);break;case 27:F0(i);case 26:case 5:yo(r,i,n),n&&o===null&&a&4&&W0(i),Pl(i,i.return);break;case 12:yo(r,i,n);break;case 31:yo(r,i,n),n&&a&4&&J0(r,i);break;case 13:yo(r,i,n),n&&a&4&&e1(r,i);break;case 22:i.memoizedState===null&&yo(r,i,n),Pl(i,i.return);break;case 30:break;default:yo(r,i,n)}t=t.sibling}}function gg(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ns(n))}function yg(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ns(e))}function zn(e,t,n,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)o1(e,t,n,o),t=t.sibling}function o1(e,t,n,o){var r=t.flags;switch(t.tag){case 0:case 11:case 15:zn(e,t,n,o),r&2048&&rs(9,t);break;case 1:zn(e,t,n,o);break;case 3:zn(e,t,n,o),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ns(e)));break;case 12:if(r&2048){zn(e,t,n,o),e=t.stateNode;try{var i=t.memoizedProps,a=i.id,l=i.onPostCommit;typeof l=="function"&&l(a,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(s){Ae(t,t.return,s)}}else zn(e,t,n,o);break;case 31:zn(e,t,n,o);break;case 13:zn(e,t,n,o);break;case 23:break;case 22:i=t.stateNode,a=t.alternate,t.memoizedState!==null?i._visibility&2?zn(e,t,n,o):_l(e,t):i._visibility&2?zn(e,t,n,o):(i._visibility|=2,qi(e,t,n,o,(t.subtreeFlags&10256)!==0||!1)),r&2048&&gg(a,t);break;case 24:zn(e,t,n,o),r&2048&&yg(t.alternate,t);break;default:zn(e,t,n,o)}}function qi(e,t,n,o,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,a=t,l=n,s=o,u=a.flags;switch(a.tag){case 0:case 11:case 15:qi(i,a,l,s,r),rs(8,a);break;case 23:break;case 22:var f=a.stateNode;a.memoizedState!==null?f._visibility&2?qi(i,a,l,s,r):_l(i,a):(f._visibility|=2,qi(i,a,l,s,r)),r&&u&2048&&gg(a.alternate,a);break;case 24:qi(i,a,l,s,r),r&&u&2048&&yg(a.alternate,a);break;default:qi(i,a,l,s,r)}t=t.sibling}}function _l(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,o=t,r=o.flags;switch(o.tag){case 22:_l(n,o),r&2048&&gg(o.alternate,o);break;case 24:_l(n,o),r&2048&&yg(o.alternate,o);break;default:_l(n,o)}t=t.sibling}}var Sl=8192;function Hi(e,t,n){if(e.subtreeFlags&Sl)for(e=e.child;e!==null;)r1(e,t,n),e=e.sibling}function r1(e,t,n){switch(e.tag){case 26:Hi(e,t,n),e.flags&Sl&&e.memoizedState!==null&&X3(n,$n,e.memoizedState,e.memoizedProps);break;case 5:Hi(e,t,n);break;case 3:case 4:var o=$n;$n=wc(e.stateNode.containerInfo),Hi(e,t,n),$n=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=Sl,Sl=16777216,Hi(e,t,n),Sl=o):Hi(e,t,n));break;default:Hi(e,t,n)}}function i1(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function hl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var o=t[n];pt=o,l1(o,e)}i1(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)a1(e),e=e.sibling}function a1(e){switch(e.tag){case 0:case 11:case 15:hl(e),e.flags&2048&&xr(9,e,e.return);break;case 3:hl(e);break;case 12:hl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Yu(e)):hl(e);break;default:hl(e)}}function Yu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var o=t[n];pt=o,l1(o,e)}i1(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:xr(8,t,t.return),Yu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Yu(t));break;default:Yu(t)}e=e.sibling}}function l1(e,t){for(;pt!==null;){var n=pt;switch(n.tag){case 0:case 11:case 15:xr(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var o=n.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:ns(n.memoizedState.cache)}if(o=n.child,o!==null)o.return=n,pt=o;else e:for(n=e;pt!==null;){o=pt;var r=o.sibling,i=o.return;if(K0(o),o===n){pt=null;break e}if(r!==null){r.return=i,pt=r;break e}pt=i}}}var u3={getCacheForType:function(e){var t=St(rt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return St(rt).controller.signal}},c3=typeof WeakMap=="function"?WeakMap:Map,ve=0,Re=null,ue=null,fe=0,we=0,nn=null,ar=!1,wa=!1,vg=!1,Co=0,Ye=0,kr=0,ti=0,bg=0,an=0,ma=0,zl=null,Vt=null,vh=!1,jc=0,s1=0,gc=1/0,yc=null,pr=null,st=0,mr=null,ha=null,Eo=0,bh=0,xh=null,u1=null,$l=0,kh=null;function cn(){return(ve&2)!==0&&fe!==0?fe&-fe:Y.T!==null?kg():vS()}function c1(){if(an===0)if((fe&536870912)===0||me){var e=Su;Su<<=1,(Su&3932160)===0&&(Su=262144),an=e}else an=536870912;return e=fn.current,e!==null&&(e.flags|=32),an}function Xt(e,t,n){(e===Re&&(we===2||we===9)||e.cancelPendingCommit!==null)&&(ga(e,0),lr(e,fe,an,!1)),Jl(e,n),((ve&2)===0||e!==Re)&&(e===Re&&((ve&2)===0&&(ti|=n),Ye===4&&lr(e,fe,an,!1)),Qn(e))}function d1(e,t,n){if((ve&6)!==0)throw Error(_(327));var o=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Ql(e,t),r=o?p3(e,t):Pm(e,t,!0),i=o;do{if(r===0){wa&&!o&&lr(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!d3(n)){r=Pm(e,t,!1),i=!1;continue}if(r===2){if(i=t,e.errorRecoveryDisabledLanes&i)var a=0;else a=e.pendingLanes&-536870913,a=a!==0?a:a&536870912?536870912:0;if(a!==0){t=a;e:{var l=e;r=zl;var s=l.current.memoizedState.isDehydrated;if(s&&(ga(l,a).flags|=256),a=Pm(l,a,!1),a!==2){if(vg&&!s){l.errorRecoveryDisabledLanes|=i,ti|=i,r=4;break e}i=Vt,Vt=r,i!==null&&(Vt===null?Vt=i:Vt.push.apply(Vt,i))}r=a}if(i=!1,r!==2)continue}}if(r===1){ga(e,0),lr(e,t,0,!0);break}e:{switch(o=e,i=r,i){case 0:case 1:throw Error(_(345));case 4:if((t&4194048)!==t)break;case 6:lr(o,t,an,!ar);break e;case 2:Vt=null;break;case 3:case 5:break;default:throw Error(_(329))}if((t&62914560)===t&&(r=jc+300-ln(),10<r)){if(lr(o,t,an,!ar),Oc(o,0,!0)!==0)break e;Eo=t,o.timeoutHandle=P1(Rk.bind(null,o,n,Vt,yc,vh,t,an,ti,ma,ar,i,"Throttled",-0,0),r);break e}Rk(o,n,Vt,yc,vh,t,an,ti,ma,ar,i,null,-0,0)}}break}while(!0);Qn(e)}function Rk(e,t,n,o,r,i,a,l,s,u,f,m,c,p){if(e.timeoutHandle=-1,m=t.subtreeFlags,m&8192||(m&16785408)===16785408){m={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ko},r1(t,i,m);var g=(i&62914560)===i?jc-ln():(i&4194048)===i?s1-ln():0;if(g=W3(m,g),g!==null){Eo=i,e.cancelPendingCommit=g(Pk.bind(null,e,t,i,n,o,r,a,l,s,f,m,null,c,p)),lr(e,i,a,!u);return}}Pk(e,t,i,n,o,r,a,l,s)}function d3(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var o=0;o<n.length;o++){var r=n[o],i=r.getSnapshot;r=r.value;try{if(!dn(i(),r))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function lr(e,t,n,o){t&=~bg,t&=~ti,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var r=t;0<r;){var i=31-un(r),a=1<<i;o[i]=-1,r&=~a}n!==0&&hS(e,n,t)}function Hc(){return(ve&6)===0?(is(0,!1),!1):!0}function xg(){if(ue!==null){if(we===0)var e=ue.return;else e=ue,So=di=null,ig(e),ia=null,Gl=0,e=ue;for(;e!==null;)B0(e.alternate,e),e=e.return;ue=null}}function ga(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,R3(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Eo=0,xg(),Re=e,ue=n=wo(e.current,null),fe=t,we=0,nn=null,ar=!1,wa=Ql(e,t),vg=!1,ma=an=bg=ti=kr=Ye=0,Vt=zl=null,vh=!1,(t&8)!==0&&(t|=t&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=t;0<o;){var r=31-un(o),i=1<<r;t|=e[r],o&=~i}return Co=t,_c(),n}function f1(e,t){ne=null,Y.H=Bl,t===Sa||t===$c?(t=lk(),we=3):t===Qh?(t=lk(),we=4):we=t===mg?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,nn=t,ue===null&&(Ye=1,pc(e,Sn(t,e.current)))}function p1(){var e=fn.current;return e===null?!0:(fe&4194048)===fe?An===null:(fe&62914560)===fe||(fe&536870912)!==0?e===An:!1}function m1(){var e=Y.H;return Y.H=Bl,e===null?Bl:e}function h1(){var e=Y.A;return Y.A=u3,e}function vc(){Ye=4,ar||(fe&4194048)!==fe&&fn.current!==null||(wa=!0),(kr&134217727)===0&&(ti&134217727)===0||Re===null||lr(Re,fe,an,!1)}function Pm(e,t,n){var o=ve;ve|=2;var r=m1(),i=h1();(Re!==e||fe!==t)&&(yc=null,ga(e,t)),t=!1;var a=Ye;e:do try{if(we!==0&&ue!==null){var l=ue,s=nn;switch(we){case 8:xg(),a=6;break e;case 3:case 2:case 9:case 6:fn.current===null&&(t=!0);var u=we;if(we=0,nn=null,ea(e,l,s,u),n&&wa){a=0;break e}break;default:u=we,we=0,nn=null,ea(e,l,s,u)}}f3(),a=Ye;break}catch(f){f1(e,f)}while(!0);return t&&e.shellSuspendCounter++,So=di=null,ve=o,Y.H=r,Y.A=i,ue===null&&(Re=null,fe=0,_c()),a}function f3(){for(;ue!==null;)g1(ue)}function p3(e,t){var n=ve;ve|=2;var o=m1(),r=h1();Re!==e||fe!==t?(yc=null,gc=ln()+500,ga(e,t)):wa=Ql(e,t);e:do try{if(we!==0&&ue!==null){t=ue;var i=nn;t:switch(we){case 1:we=0,nn=null,ea(e,t,i,1);break;case 2:case 9:if(ak(i)){we=0,nn=null,Ck(t);break}t=function(){we!==2&&we!==9||Re!==e||(we=7),Qn(e)},i.then(t,t);break e;case 3:we=7;break e;case 4:we=5;break e;case 7:ak(i)?(we=0,nn=null,Ck(t)):(we=0,nn=null,ea(e,t,i,7));break;case 5:var a=null;switch(ue.tag){case 26:a=ue.memoizedState;case 5:case 27:var l=ue;if(a?L1(a):l.stateNode.complete){we=0,nn=null;var s=l.sibling;if(s!==null)ue=s;else{var u=l.return;u!==null?(ue=u,qc(u)):ue=null}break t}}we=0,nn=null,ea(e,t,i,5);break;case 6:we=0,nn=null,ea(e,t,i,6);break;case 8:xg(),Ye=6;break e;default:throw Error(_(462))}}m3();break}catch(f){f1(e,f)}while(!0);return So=di=null,Y.H=o,Y.A=r,ve=n,ue!==null?0:(Re=null,fe=0,_c(),Ye)}function m3(){for(;ue!==null&&!DR();)g1(ue)}function g1(e){var t=U0(e.alternate,e,Co);e.memoizedProps=e.pendingProps,t===null?qc(e):ue=t}function Ck(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=wk(n,t,t.pendingProps,t.type,void 0,fe);break;case 11:t=wk(n,t,t.pendingProps,t.type.render,t.ref,fe);break;case 5:ig(t);default:B0(n,t),t=ue=BS(t,Co),t=U0(n,t,Co)}e.memoizedProps=e.pendingProps,t===null?qc(e):ue=t}function ea(e,t,n,o){So=di=null,ig(t),ia=null,Gl=0;var r=t.return;try{if(n3(e,r,t,n,fe)){Ye=1,pc(e,Sn(n,e.current)),ue=null;return}}catch(i){if(r!==null)throw ue=r,i;Ye=1,pc(e,Sn(n,e.current)),ue=null;return}t.flags&32768?(me||o===1?e=!0:wa||(fe&536870912)!==0?e=!1:(ar=e=!0,(o===2||o===9||o===3||o===6)&&(o=fn.current,o!==null&&o.tag===13&&(o.flags|=16384))),y1(t,e)):qc(t)}function qc(e){var t=e;do{if((t.flags&32768)!==0){y1(t,ar);return}e=t.return;var n=i3(t.alternate,t,Co);if(n!==null){ue=n;return}if(t=t.sibling,t!==null){ue=t;return}ue=t=e}while(t!==null);Ye===0&&(Ye=5)}function y1(e,t){do{var n=a3(e.alternate,e);if(n!==null){n.flags&=32767,ue=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ue=e;return}ue=e=n}while(e!==null);Ye=6,ue=null}function Pk(e,t,n,o,r,i,a,l,s){e.cancelPendingCommit=null;do Gc();while(st!==0);if((ve&6)!==0)throw Error(_(327));if(t!==null){if(t===e.current)throw Error(_(177));if(i=t.lanes|t.childLanes,i|=Vh,WR(e,n,i,a,l,s),e===Re&&(ue=Re=null,fe=0),ha=t,mr=e,Eo=n,bh=i,xh=r,u1=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,v3(nc,function(){return S1(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=Y.T,Y.T=null,r=be.p,be.p=2,a=ve,ve|=4;try{l3(e,t,n)}finally{ve=a,be.p=r,Y.T=o}}st=1,v1(),b1(),x1()}}function v1(){if(st===1){st=0;var e=mr,t=ha,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=Y.T,Y.T=null;var o=be.p;be.p=2;var r=ve;ve|=4;try{t1(t,e);var i=Eh,a=LS(e.containerInfo),l=i.focusedElem,s=i.selectionRange;if(a!==l&&l&&l.ownerDocument&&NS(l.ownerDocument.documentElement,l)){if(s!==null&&Bh(l)){var u=s.start,f=s.end;if(f===void 0&&(f=u),"selectionStart"in l)l.selectionStart=u,l.selectionEnd=Math.min(f,l.value.length);else{var m=l.ownerDocument||document,c=m&&m.defaultView||window;if(c.getSelection){var p=c.getSelection(),g=l.textContent.length,S=Math.min(s.start,g),y=s.end===void 0?S:Math.min(s.end,g);!p.extend&&S>y&&(a=y,y=S,S=a);var h=Jx(l,S),d=Jx(l,y);if(h&&d&&(p.rangeCount!==1||p.anchorNode!==h.node||p.anchorOffset!==h.offset||p.focusNode!==d.node||p.focusOffset!==d.offset)){var v=m.createRange();v.setStart(h.node,h.offset),p.removeAllRanges(),S>y?(p.addRange(v),p.extend(d.node,d.offset)):(v.setEnd(d.node,d.offset),p.addRange(v))}}}}for(m=[],p=l;p=p.parentNode;)p.nodeType===1&&m.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<m.length;l++){var b=m[l];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}Mc=!!Ah,Eh=Ah=null}finally{ve=r,be.p=o,Y.T=n}}e.current=t,st=2}}function b1(){if(st===2){st=0;var e=mr,t=ha,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=Y.T,Y.T=null;var o=be.p;be.p=2;var r=ve;ve|=4;try{Z0(e,t.alternate,t)}finally{ve=r,be.p=o,Y.T=n}}st=3}}function x1(){if(st===4||st===3){st=0,IR();var e=mr,t=ha,n=Eo,o=u1;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?st=5:(st=0,ha=mr=null,k1(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(pr=null),Dh(n),t=t.stateNode,sn&&typeof sn.onCommitFiberRoot=="function")try{sn.onCommitFiberRoot(Kl,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=Y.T,r=be.p,be.p=2,Y.T=null;try{for(var i=e.onRecoverableError,a=0;a<o.length;a++){var l=o[a];i(l.value,{componentStack:l.stack})}}finally{Y.T=t,be.p=r}}(Eo&3)!==0&&Gc(),Qn(e),r=e.pendingLanes,(n&261930)!==0&&(r&42)!==0?e===kh?$l++:($l=0,kh=e):$l=0,is(0,!1)}}function k1(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ns(t)))}function Gc(){return v1(),b1(),x1(),S1()}function S1(){if(st!==5)return!1;var e=mr,t=bh;bh=0;var n=Dh(Eo),o=Y.T,r=be.p;try{be.p=32>n?32:n,Y.T=null,n=xh,xh=null;var i=mr,a=Eo;if(st=0,ha=mr=null,Eo=0,(ve&6)!==0)throw Error(_(331));var l=ve;if(ve|=4,a1(i.current),o1(i,i.current,a,n),ve=l,is(0,!1),sn&&typeof sn.onPostCommitFiberRoot=="function")try{sn.onPostCommitFiberRoot(Kl,i)}catch{}return!0}finally{be.p=r,Y.T=o,k1(e,t)}}function _k(e,t,n){t=Sn(n,t),t=mh(e.stateNode,t,2),e=fr(e,t,2),e!==null&&(Jl(e,2),Qn(e))}function Ae(e,t,n){if(e.tag===3)_k(e,e,n);else for(;t!==null;){if(t.tag===3){_k(t,e,n);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(pr===null||!pr.has(o))){e=Sn(n,e),n=D0(2),o=fr(t,n,2),o!==null&&(I0(n,o,t,e),Jl(o,2),Qn(o));break}}t=t.return}}function _m(e,t,n){var o=e.pingCache;if(o===null){o=e.pingCache=new c3;var r=new Set;o.set(t,r)}else r=o.get(t),r===void 0&&(r=new Set,o.set(t,r));r.has(n)||(vg=!0,r.add(n),e=h3.bind(null,e,t,n),t.then(e,e))}function h3(e,t,n){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Re===e&&(fe&n)===n&&(Ye===4||Ye===3&&(fe&62914560)===fe&&300>ln()-jc?(ve&2)===0&&ga(e,0):bg|=n,ma===fe&&(ma=0)),Qn(e)}function w1(e,t){t===0&&(t=mS()),e=ci(e,t),e!==null&&(Jl(e,t),Qn(e))}function g3(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),w1(e,n)}function y3(e,t){var n=0;switch(e.tag){case 31:case 13:var o=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(_(314))}o!==null&&o.delete(t),w1(e,n)}function v3(e,t){return Nh(e,t)}var bc=null,Gi=null,Sh=!1,xc=!1,zm=!1,sr=0;function Qn(e){e!==Gi&&e.next===null&&(Gi===null?bc=Gi=e:Gi=Gi.next=e),xc=!0,Sh||(Sh=!0,x3())}function is(e,t){if(!zm&&xc){zm=!0;do for(var n=!1,o=bc;o!==null;){if(!t)if(e!==0){var r=o.pendingLanes;if(r===0)var i=0;else{var a=o.suspendedLanes,l=o.pingedLanes;i=(1<<31-un(42|e)+1)-1,i&=r&~(a&~l),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,zk(o,i))}else i=fe,i=Oc(o,o===Re?i:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(i&3)===0||Ql(o,i)||(n=!0,zk(o,i));o=o.next}while(n);zm=!1}}function b3(){A1()}function A1(){xc=Sh=!1;var e=0;sr!==0&&O3()&&(e=sr);for(var t=ln(),n=null,o=bc;o!==null;){var r=o.next,i=E1(o,t);i===0?(o.next=null,n===null?bc=r:n.next=r,r===null&&(Gi=n)):(n=o,(e!==0||(i&3)!==0)&&(xc=!0)),o=r}st!==0&&st!==5||is(e,!1),sr!==0&&(sr=0)}function E1(e,t){for(var n=e.suspendedLanes,o=e.pingedLanes,r=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var a=31-un(i),l=1<<a,s=r[a];s===-1?((l&n)===0||(l&o)!==0)&&(r[a]=XR(l,t)):s<=t&&(e.expiredLanes|=l),i&=~l}if(t=Re,n=fe,n=Oc(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,n===0||e===t&&(we===2||we===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&sm(o),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Ql(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(o!==null&&sm(o),Dh(n)){case 2:case 8:n=fS;break;case 32:n=nc;break;case 268435456:n=pS;break;default:n=nc}return o=M1.bind(null,e),n=Nh(n,o),e.callbackPriority=t,e.callbackNode=n,t}return o!==null&&o!==null&&sm(o),e.callbackPriority=2,e.callbackNode=null,2}function M1(e,t){if(st!==0&&st!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Gc()&&e.callbackNode!==n)return null;var o=fe;return o=Oc(e,e===Re?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(d1(e,o,t),E1(e,ln()),e.callbackNode!=null&&e.callbackNode===n?M1.bind(null,e):null)}function zk(e,t){if(Gc())return null;d1(e,t,!0)}function x3(){C3(function(){(ve&6)!==0?Nh(dS,b3):A1()})}function kg(){if(sr===0){var e=da;e===0&&(e=ku,ku<<=1,(ku&261888)===0&&(ku=256)),sr=e}return sr}function $k(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ju(""+e)}function Nk(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function k3(e,t,n,o,r){if(t==="submit"&&n&&n.stateNode===r){var i=$k((r[Wt]||null).action),a=o.submitter;a&&(t=(t=a[Wt]||null)?$k(t.formAction):a.getAttribute("formAction"),t!==null&&(i=t,a=null));var l=new Rc("action","action",null,o,r);e.push({event:l,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(sr!==0){var s=a?Nk(r,a):new FormData(r);fh(n,{pending:!0,data:s,method:r.method,action:i},null,s)}}else typeof i=="function"&&(l.preventDefault(),s=a?Nk(r,a):new FormData(r),fh(n,{pending:!0,data:s,method:r.method,action:i},i,s))},currentTarget:r}]})}}for(zu=0;zu<eh.length;zu++)$u=eh[zu],Lk=$u.toLowerCase(),Dk=$u[0].toUpperCase()+$u.slice(1),Nn(Lk,"on"+Dk);var $u,Lk,Dk,zu;Nn(IS,"onAnimationEnd");Nn(jS,"onAnimationIteration");Nn(HS,"onAnimationStart");Nn("dblclick","onDoubleClick");Nn("focusin","onFocus");Nn("focusout","onBlur");Nn(jC,"onTransitionRun");Nn(HC,"onTransitionStart");Nn(qC,"onTransitionCancel");Nn(qS,"onTransitionEnd");ua("onMouseEnter",["mouseout","mouseover"]);ua("onMouseLeave",["mouseout","mouseover"]);ua("onPointerEnter",["pointerout","pointerover"]);ua("onPointerLeave",["pointerout","pointerover"]);li("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));li("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));li("onBeforeInput",["compositionend","keypress","textInput","paste"]);li("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));li("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));li("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),S3=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vl));function T1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var o=e[n],r=o.event;o=o.listeners;e:{var i=void 0;if(t)for(var a=o.length-1;0<=a;a--){var l=o[a],s=l.instance,u=l.currentTarget;if(l=l.listener,s!==i&&r.isPropagationStopped())break e;i=l,r.currentTarget=u;try{i(r)}catch(f){rc(f)}r.currentTarget=null,i=s}else for(a=0;a<o.length;a++){if(l=o[a],s=l.instance,u=l.currentTarget,l=l.listener,s!==i&&r.isPropagationStopped())break e;i=l,r.currentTarget=u;try{i(r)}catch(f){rc(f)}r.currentTarget=null,i=s}}}}function se(e,t){var n=t[Xm];n===void 0&&(n=t[Xm]=new Set);var o=e+"__bubble";n.has(o)||(O1(t,e,2,!1),n.add(o))}function $m(e,t,n){var o=0;t&&(o|=4),O1(n,e,o,t)}var Nu="_reactListening"+Math.random().toString(36).slice(2);function Sg(e){if(!e[Nu]){e[Nu]=!0,bS.forEach(function(n){n!=="selectionchange"&&(S3.has(n)||$m(n,!1,e),$m(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Nu]||(t[Nu]=!0,$m("selectionchange",!1,t))}}function O1(e,t,n,o){switch(q1(t)){case 2:var r=Z3;break;case 8:r=K3;break;default:r=Mg}n=r.bind(null,t,n,e),r=void 0,!Km||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),o?r!==void 0?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):r!==void 0?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function Nm(e,t,n,o,r){var i=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var a=o.tag;if(a===3||a===4){var l=o.stateNode.containerInfo;if(l===r)break;if(a===4)for(a=o.return;a!==null;){var s=a.tag;if((s===3||s===4)&&a.stateNode.containerInfo===r)return;a=a.return}for(;l!==null;){if(a=Vi(l),a===null)return;if(s=a.tag,s===5||s===6||s===26||s===27){o=i=a;continue e}l=l.parentNode}}o=o.return}TS(function(){var u=i,f=Hh(n),m=[];e:{var c=GS.get(e);if(c!==void 0){var p=Rc,g=e;switch(e){case"keypress":if(qu(n)===0)break e;case"keydown":case"keyup":p=yC;break;case"focusin":g="focus",p=pm;break;case"focusout":g="blur",p=pm;break;case"beforeblur":case"afterblur":p=pm;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Bx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=iC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=xC;break;case IS:case jS:case HS:p=sC;break;case qS:p=SC;break;case"scroll":case"scrollend":p=oC;break;case"wheel":p=AC;break;case"copy":case"cut":case"paste":p=cC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Xx;break;case"toggle":case"beforetoggle":p=MC}var S=(t&4)!==0,y=!S&&(e==="scroll"||e==="scrollend"),h=S?c!==null?c+"Capture":null:c;S=[];for(var d=u,v;d!==null;){var b=d;if(v=b.stateNode,b=b.tag,b!==5&&b!==26&&b!==27||v===null||h===null||(b=Dl(d,h),b!=null&&S.push(Xl(d,b,v))),y)break;d=d.return}0<S.length&&(c=new p(c,g,null,n,f),m.push({event:c,listeners:S}))}}if((t&7)===0){e:{if(c=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",c&&n!==Zm&&(g=n.relatedTarget||n.fromElement)&&(Vi(g)||g[ba]))break e;if((p||c)&&(c=f.window===f?f:(c=f.ownerDocument)?c.defaultView||c.parentWindow:window,p?(g=n.relatedTarget||n.toElement,p=u,g=g?Vi(g):null,g!==null&&(y=Zl(g),S=g.tag,g!==y||S!==5&&S!==27&&S!==6)&&(g=null)):(p=null,g=u),p!==g)){if(S=Bx,b="onMouseLeave",h="onMouseEnter",d="mouse",(e==="pointerout"||e==="pointerover")&&(S=Xx,b="onPointerLeave",h="onPointerEnter",d="pointer"),y=p==null?c:xl(p),v=g==null?c:xl(g),c=new S(b,d+"leave",p,n,f),c.target=y,c.relatedTarget=v,b=null,Vi(f)===u&&(S=new S(h,d+"enter",g,n,f),S.target=v,S.relatedTarget=y,b=S),y=b,p&&g)t:{for(S=w3,h=p,d=g,v=0,b=h;b;b=S(b))v++;b=0;for(var T=d;T;T=S(T))b++;for(;0<v-b;)h=S(h),v--;for(;0<b-v;)d=S(d),b--;for(;v--;){if(h===d||d!==null&&h===d.alternate){S=h;break t}h=S(h),d=S(d)}S=null}else S=null;p!==null&&Ik(m,c,p,S,!1),g!==null&&y!==null&&Ik(m,y,g,S,!0)}}e:{if(c=u?xl(u):window,p=c.nodeName&&c.nodeName.toLowerCase(),p==="select"||p==="input"&&c.type==="file")var O=Zx;else if(Fx(c))if(zS)O=LC;else{O=$C;var A=zC}else p=c.nodeName,!p||p.toLowerCase()!=="input"||c.type!=="checkbox"&&c.type!=="radio"?u&&jh(u.elementType)&&(O=Zx):O=NC;if(O&&(O=O(e,u))){_S(m,O,n,f);break e}A&&A(e,c,u),e==="focusout"&&u&&c.type==="number"&&u.memoizedProps.value!=null&&Fm(c,"number",c.value)}switch(A=u?xl(u):window,e){case"focusin":(Fx(A)||A.contentEditable==="true")&&(Yi=A,Qm=u,El=null);break;case"focusout":El=Qm=Yi=null;break;case"mousedown":Jm=!0;break;case"contextmenu":case"mouseup":case"dragend":Jm=!1,ek(m,n,f);break;case"selectionchange":if(IC)break;case"keydown":case"keyup":ek(m,n,f)}var R;if(Uh)e:{switch(e){case"compositionstart":var M="onCompositionStart";break e;case"compositionend":M="onCompositionEnd";break e;case"compositionupdate":M="onCompositionUpdate";break e}M=void 0}else Wi?CS(e,n)&&(M="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(M="onCompositionStart");M&&(RS&&n.locale!=="ko"&&(Wi||M!=="onCompositionStart"?M==="onCompositionEnd"&&Wi&&(R=OS()):(ir=f,qh="value"in ir?ir.value:ir.textContent,Wi=!0)),A=kc(u,M),0<A.length&&(M=new Vx(M,e,null,n,f),m.push({event:M,listeners:A}),R?M.data=R:(R=PS(n),R!==null&&(M.data=R)))),(R=OC?RC(e,n):CC(e,n))&&(M=kc(u,"onBeforeInput"),0<M.length&&(A=new Vx("onBeforeInput","beforeinput",null,n,f),m.push({event:A,listeners:M}),A.data=R)),k3(m,e,u,n,f)}T1(m,t)})}function Xl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function kc(e,t){for(var n=t+"Capture",o=[];e!==null;){var r=e,i=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||i===null||(r=Dl(e,n),r!=null&&o.unshift(Xl(e,r,i)),r=Dl(e,t),r!=null&&o.push(Xl(e,r,i))),e.tag===3)return o;e=e.return}return[]}function w3(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ik(e,t,n,o,r){for(var i=t._reactName,a=[];n!==null&&n!==o;){var l=n,s=l.alternate,u=l.stateNode;if(l=l.tag,s!==null&&s===o)break;l!==5&&l!==26&&l!==27||u===null||(s=u,r?(u=Dl(n,i),u!=null&&a.unshift(Xl(n,u,s))):r||(u=Dl(n,i),u!=null&&a.push(Xl(n,u,s)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var A3=/\\r\\n?/g,E3=/\\u0000|\\uFFFD/g;function jk(e){return(typeof e=="string"?e:""+e).replace(A3,`\n`).replace(E3,"")}function R1(e,t){return t=jk(t),jk(e)===t}function Me(e,t,n,o,r,i){switch(n){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||ca(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&ca(e,""+o);break;case"className":Au(e,"class",o);break;case"tabIndex":Au(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Au(e,n,o);break;case"style":MS(e,o,i);break;case"data":if(t!=="object"){Au(e,"data",o);break}case"src":case"href":if(o===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(n);break}o=ju(""+o),e.setAttribute(n,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(n,"javascript:throw new Error(\'A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\\\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().\')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&Me(e,t,"name",r.name,r,null),Me(e,t,"formEncType",r.formEncType,r,null),Me(e,t,"formMethod",r.formMethod,r,null),Me(e,t,"formTarget",r.formTarget,r,null)):(Me(e,t,"encType",r.encType,r,null),Me(e,t,"method",r.method,r,null),Me(e,t,"target",r.target,r,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(n);break}o=ju(""+o),e.setAttribute(n,o);break;case"onClick":o!=null&&(e.onclick=ko);break;case"onScroll":o!=null&&se("scroll",e);break;case"onScrollEnd":o!=null&&se("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(_(61));if(n=o.__html,n!=null){if(r.children!=null)throw Error(_(60));e.innerHTML=n}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}n=ju(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,""+o):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":o===!0?e.setAttribute(n,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,o):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(n,o):e.removeAttribute(n);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(n):e.setAttribute(n,o);break;case"popover":se("beforetoggle",e),se("toggle",e),Iu(e,"popover",o);break;case"xlinkActuate":po(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":po(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":po(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":po(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":po(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":po(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":po(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":po(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":po(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Iu(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=tC.get(n)||n,Iu(e,n,o))}}function wh(e,t,n,o,r,i){switch(n){case"style":MS(e,o,i);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(_(61));if(n=o.__html,n!=null){if(r.children!=null)throw Error(_(60));e.innerHTML=n}}break;case"children":typeof o=="string"?ca(e,o):(typeof o=="number"||typeof o=="bigint")&&ca(e,""+o);break;case"onScroll":o!=null&&se("scroll",e);break;case"onScrollEnd":o!=null&&se("scrollend",e);break;case"onClick":o!=null&&(e.onclick=ko);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!xS.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(r=n.endsWith("Capture"),t=n.slice(2,r?n.length-7:void 0),i=e[Wt]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,r),typeof o=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,o,r);break e}n in e?e[n]=o:o===!0?e.setAttribute(n,""):Iu(e,n,o)}}}function wt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":se("error",e),se("load",e);var o=!1,r=!1,i;for(i in n)if(n.hasOwnProperty(i)){var a=n[i];if(a!=null)switch(i){case"src":o=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(_(137,t));default:Me(e,t,i,a,n,null)}}r&&Me(e,t,"srcSet",n.srcSet,n,null),o&&Me(e,t,"src",n.src,n,null);return;case"input":se("invalid",e);var l=i=a=r=null,s=null,u=null;for(o in n)if(n.hasOwnProperty(o)){var f=n[o];if(f!=null)switch(o){case"name":r=f;break;case"type":a=f;break;case"checked":s=f;break;case"defaultChecked":u=f;break;case"value":i=f;break;case"defaultValue":l=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(_(137,t));break;default:Me(e,t,o,f,n,null)}}wS(e,i,l,s,u,a,r,!1);return;case"select":se("invalid",e),o=a=i=null;for(r in n)if(n.hasOwnProperty(r)&&(l=n[r],l!=null))switch(r){case"value":i=l;break;case"defaultValue":a=l;break;case"multiple":o=l;default:Me(e,t,r,l,n,null)}t=i,n=a,e.multiple=!!o,t!=null?na(e,!!o,t,!1):n!=null&&na(e,!!o,n,!0);return;case"textarea":se("invalid",e),i=r=o=null;for(a in n)if(n.hasOwnProperty(a)&&(l=n[a],l!=null))switch(a){case"value":o=l;break;case"defaultValue":r=l;break;case"children":i=l;break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(_(91));break;default:Me(e,t,a,l,n,null)}ES(e,o,r,i);return;case"option":for(s in n)if(n.hasOwnProperty(s)&&(o=n[s],o!=null))switch(s){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:Me(e,t,s,o,n,null)}return;case"dialog":se("beforetoggle",e),se("toggle",e),se("cancel",e),se("close",e);break;case"iframe":case"object":se("load",e);break;case"video":case"audio":for(o=0;o<Vl.length;o++)se(Vl[o],e);break;case"image":se("error",e),se("load",e);break;case"details":se("toggle",e);break;case"embed":case"source":case"link":se("error",e),se("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(o=n[u],o!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(_(137,t));default:Me(e,t,u,o,n,null)}return;default:if(jh(t)){for(f in n)n.hasOwnProperty(f)&&(o=n[f],o!==void 0&&wh(e,t,f,o,n,void 0));return}}for(l in n)n.hasOwnProperty(l)&&(o=n[l],o!=null&&Me(e,t,l,o,n,null))}function M3(e,t,n,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,i=null,a=null,l=null,s=null,u=null,f=null;for(p in n){var m=n[p];if(n.hasOwnProperty(p)&&m!=null)switch(p){case"checked":break;case"value":break;case"defaultValue":s=m;default:o.hasOwnProperty(p)||Me(e,t,p,null,o,m)}}for(var c in o){var p=o[c];if(m=n[c],o.hasOwnProperty(c)&&(p!=null||m!=null))switch(c){case"type":i=p;break;case"name":r=p;break;case"checked":u=p;break;case"defaultChecked":f=p;break;case"value":a=p;break;case"defaultValue":l=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(_(137,t));break;default:p!==m&&Me(e,t,c,p,o,m)}}Ym(e,a,l,s,u,f,i,r);return;case"select":p=a=l=c=null;for(i in n)if(s=n[i],n.hasOwnProperty(i)&&s!=null)switch(i){case"value":break;case"multiple":p=s;default:o.hasOwnProperty(i)||Me(e,t,i,null,o,s)}for(r in o)if(i=o[r],s=n[r],o.hasOwnProperty(r)&&(i!=null||s!=null))switch(r){case"value":c=i;break;case"defaultValue":l=i;break;case"multiple":a=i;default:i!==s&&Me(e,t,r,i,o,s)}t=l,n=a,o=p,c!=null?na(e,!!n,c,!1):!!o!=!!n&&(t!=null?na(e,!!n,t,!0):na(e,!!n,n?[]:"",!1));return;case"textarea":p=c=null;for(l in n)if(r=n[l],n.hasOwnProperty(l)&&r!=null&&!o.hasOwnProperty(l))switch(l){case"value":break;case"children":break;default:Me(e,t,l,null,o,r)}for(a in o)if(r=o[a],i=n[a],o.hasOwnProperty(a)&&(r!=null||i!=null))switch(a){case"value":c=r;break;case"defaultValue":p=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(_(91));break;default:r!==i&&Me(e,t,a,r,o,i)}AS(e,c,p);return;case"option":for(var g in n)if(c=n[g],n.hasOwnProperty(g)&&c!=null&&!o.hasOwnProperty(g))switch(g){case"selected":e.selected=!1;break;default:Me(e,t,g,null,o,c)}for(s in o)if(c=o[s],p=n[s],o.hasOwnProperty(s)&&c!==p&&(c!=null||p!=null))switch(s){case"selected":e.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:Me(e,t,s,c,o,p)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var S in n)c=n[S],n.hasOwnProperty(S)&&c!=null&&!o.hasOwnProperty(S)&&Me(e,t,S,null,o,c);for(u in o)if(c=o[u],p=n[u],o.hasOwnProperty(u)&&c!==p&&(c!=null||p!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(_(137,t));break;default:Me(e,t,u,c,o,p)}return;default:if(jh(t)){for(var y in n)c=n[y],n.hasOwnProperty(y)&&c!==void 0&&!o.hasOwnProperty(y)&&wh(e,t,y,void 0,o,c);for(f in o)c=o[f],p=n[f],!o.hasOwnProperty(f)||c===p||c===void 0&&p===void 0||wh(e,t,f,c,o,p);return}}for(var h in n)c=n[h],n.hasOwnProperty(h)&&c!=null&&!o.hasOwnProperty(h)&&Me(e,t,h,null,o,c);for(m in o)c=o[m],p=n[m],!o.hasOwnProperty(m)||c===p||c==null&&p==null||Me(e,t,m,c,o,p)}function Hk(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function T3(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),o=0;o<n.length;o++){var r=n[o],i=r.transferSize,a=r.initiatorType,l=r.duration;if(i&&l&&Hk(a)){for(a=0,l=r.responseEnd,o+=1;o<n.length;o++){var s=n[o],u=s.startTime;if(u>l)break;var f=s.transferSize,m=s.initiatorType;f&&Hk(m)&&(s=s.responseEnd,a+=f*(s<l?1:(l-u)/(s-u)))}if(--o,t+=8*(i+a)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Ah=null,Eh=null;function Sc(e){return e.nodeType===9?e:e.ownerDocument}function qk(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function C1(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Mh(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Lm=null;function O3(){var e=window.event;return e&&e.type==="popstate"?e===Lm?!1:(Lm=e,!0):(Lm=null,!1)}var P1=typeof setTimeout=="function"?setTimeout:void 0,R3=typeof clearTimeout=="function"?clearTimeout:void 0,Gk=typeof Promise=="function"?Promise:void 0,C3=typeof queueMicrotask=="function"?queueMicrotask:typeof Gk<"u"?function(e){return Gk.resolve(null).then(e).catch(P3)}:P1;function P3(e){setTimeout(function(){throw e})}function wr(e){return e==="head"}function Uk(e,t){var n=t,o=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"||n==="/&"){if(o===0){e.removeChild(r),va(t);return}o--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")o++;else if(n==="html")Nl(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Nl(n);for(var i=n.firstChild;i;){var a=i.nextSibling,l=i.nodeName;i[es]||l==="SCRIPT"||l==="STYLE"||l==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=a}}else n==="body"&&Nl(e.ownerDocument.body);n=r}while(n);va(t)}function Bk(e,t){var n=e;e=0;do{var o=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=o}while(n)}function Th(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Th(n),Ih(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function _3(e,t,n,o){for(;e.nodeType===1;){var r=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[es])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=En(e.nextSibling),e===null)break}return null}function z3(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=En(e.nextSibling),e===null))return null;return e}function _1(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=En(e.nextSibling),e===null))return null;return e}function Oh(e){return e.data==="$?"||e.data==="$~"}function Rh(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function $3(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var o=function(){t(),n.removeEventListener("DOMContentLoaded",o)};n.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function En(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Ch=null;function Vk(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return En(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Xk(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function z1(e,t,n){switch(t=Sc(n),e){case"html":if(e=t.documentElement,!e)throw Error(_(452));return e;case"head":if(e=t.head,!e)throw Error(_(453));return e;case"body":if(e=t.body,!e)throw Error(_(454));return e;default:throw Error(_(451))}}function Nl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ih(e)}var Mn=new Map,Wk=new Set;function wc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Po=be.d;be.d={f:N3,r:L3,D:D3,C:I3,L:j3,m:H3,X:G3,S:q3,M:U3};function N3(){var e=Po.f(),t=Hc();return e||t}function L3(e){var t=xa(e);t!==null&&t.tag===5&&t.type==="form"?M0(t):Po.r(e)}var Aa=typeof document>"u"?null:document;function $1(e,t,n){var o=Aa;if(o&&typeof t=="string"&&t){var r=kn(t);r=\'link[rel="\'+e+\'"][href="\'+r+\'"]\',typeof n=="string"&&(r+=\'[crossorigin="\'+n+\'"]\'),Wk.has(r)||(Wk.add(r),e={rel:e,crossOrigin:n,href:t},o.querySelector(r)===null&&(t=o.createElement("link"),wt(t,"link",e),mt(t),o.head.appendChild(t)))}}function D3(e){Po.D(e),$1("dns-prefetch",e,null)}function I3(e,t){Po.C(e,t),$1("preconnect",e,t)}function j3(e,t,n){Po.L(e,t,n);var o=Aa;if(o&&e&&t){var r=\'link[rel="preload"][as="\'+kn(t)+\'"]\';t==="image"&&n&&n.imageSrcSet?(r+=\'[imagesrcset="\'+kn(n.imageSrcSet)+\'"]\',typeof n.imageSizes=="string"&&(r+=\'[imagesizes="\'+kn(n.imageSizes)+\'"]\')):r+=\'[href="\'+kn(e)+\'"]\';var i=r;switch(t){case"style":i=ya(e);break;case"script":i=Ea(e)}Mn.has(i)||(e=Le({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Mn.set(i,e),o.querySelector(r)!==null||t==="style"&&o.querySelector(as(i))||t==="script"&&o.querySelector(ls(i))||(t=o.createElement("link"),wt(t,"link",e),mt(t),o.head.appendChild(t)))}}function H3(e,t){Po.m(e,t);var n=Aa;if(n&&e){var o=t&&typeof t.as=="string"?t.as:"script",r=\'link[rel="modulepreload"][as="\'+kn(o)+\'"][href="\'+kn(e)+\'"]\',i=r;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Ea(e)}if(!Mn.has(i)&&(e=Le({rel:"modulepreload",href:e},t),Mn.set(i,e),n.querySelector(r)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ls(i)))return}o=n.createElement("link"),wt(o,"link",e),mt(o),n.head.appendChild(o)}}}function q3(e,t,n){Po.S(e,t,n);var o=Aa;if(o&&e){var r=ta(o).hoistableStyles,i=ya(e);t=t||"default";var a=r.get(i);if(!a){var l={loading:0,preload:null};if(a=o.querySelector(as(i)))l.loading=5;else{e=Le({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Mn.get(i))&&wg(e,n);var s=a=o.createElement("link");mt(s),wt(s,"link",e),s._p=new Promise(function(u,f){s.onload=u,s.onerror=f}),s.addEventListener("load",function(){l.loading|=1}),s.addEventListener("error",function(){l.loading|=2}),l.loading|=4,Fu(a,t,o)}a={type:"stylesheet",instance:a,count:1,state:l},r.set(i,a)}}}function G3(e,t){Po.X(e,t);var n=Aa;if(n&&e){var o=ta(n).hoistableScripts,r=Ea(e),i=o.get(r);i||(i=n.querySelector(ls(r)),i||(e=Le({src:e,async:!0},t),(t=Mn.get(r))&&Ag(e,t),i=n.createElement("script"),mt(i),wt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},o.set(r,i))}}function U3(e,t){Po.M(e,t);var n=Aa;if(n&&e){var o=ta(n).hoistableScripts,r=Ea(e),i=o.get(r);i||(i=n.querySelector(ls(r)),i||(e=Le({src:e,async:!0,type:"module"},t),(t=Mn.get(r))&&Ag(e,t),i=n.createElement("script"),mt(i),wt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},o.set(r,i))}}function Yk(e,t,n,o){var r=(r=ur.current)?wc(r):null;if(!r)throw Error(_(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=ya(n.href),n=ta(r).hoistableStyles,o=n.get(t),o||(o={type:"style",instance:null,count:0,state:null},n.set(t,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=ya(n.href);var i=ta(r).hoistableStyles,a=i.get(e);if(a||(r=r.ownerDocument||r,a={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,a),(i=r.querySelector(as(e)))&&!i._p&&(a.instance=i,a.state.loading=5),Mn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Mn.set(e,n),i||B3(r,e,n,a.state))),t&&o===null)throw Error(_(528,""));return a}if(t&&o!==null)throw Error(_(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ea(n),n=ta(r).hoistableScripts,o=n.get(t),o||(o={type:"script",instance:null,count:0,state:null},n.set(t,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(_(444,e))}}function ya(e){return\'href="\'+kn(e)+\'"\'}function as(e){return\'link[rel="stylesheet"][\'+e+"]"}function N1(e){return Le({},e,{"data-precedence":e.precedence,precedence:null})}function B3(e,t,n,o){e.querySelector(\'link[rel="preload"][as="style"][\'+t+"]")?o.loading=1:(t=e.createElement("link"),o.preload=t,t.addEventListener("load",function(){return o.loading|=1}),t.addEventListener("error",function(){return o.loading|=2}),wt(t,"link",n),mt(t),e.head.appendChild(t))}function Ea(e){return\'[src="\'+kn(e)+\'"]\'}function ls(e){return"script[async]"+e}function Fk(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector(\'style[data-href~="\'+kn(n.href)+\'"]\');if(o)return t.instance=o,mt(o),o;var r=Le({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),mt(o),wt(o,"style",r),Fu(o,n.precedence,e),t.instance=o;case"stylesheet":r=ya(n.href);var i=e.querySelector(as(r));if(i)return t.state.loading|=4,t.instance=i,mt(i),i;o=N1(n),(r=Mn.get(r))&&wg(o,r),i=(e.ownerDocument||e).createElement("link"),mt(i);var a=i;return a._p=new Promise(function(l,s){a.onload=l,a.onerror=s}),wt(i,"link",o),t.state.loading|=4,Fu(i,n.precedence,e),t.instance=i;case"script":return i=Ea(n.src),(r=e.querySelector(ls(i)))?(t.instance=r,mt(r),r):(o=n,(r=Mn.get(i))&&(o=Le({},n),Ag(o,r)),e=e.ownerDocument||e,r=e.createElement("script"),mt(r),wt(r,"link",o),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(_(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,Fu(o,n.precedence,e));return t.instance}function Fu(e,t,n){for(var o=n.querySelectorAll(\'link[rel="stylesheet"][data-precedence],style[data-precedence]\'),r=o.length?o[o.length-1]:null,i=r,a=0;a<o.length;a++){var l=o[a];if(l.dataset.precedence===t)i=l;else if(i!==r)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function wg(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Ag(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Zu=null;function Zk(e,t,n){if(Zu===null){var o=new Map,r=Zu=new Map;r.set(n,o)}else r=Zu,o=r.get(n),o||(o=new Map,r.set(n,o));if(o.has(e))return o;for(o.set(e,null),n=n.getElementsByTagName(e),r=0;r<n.length;r++){var i=n[r];if(!(i[es]||i[xt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var a=i.getAttribute(t)||"";a=e+a;var l=o.get(a);l?l.push(i):o.set(a,[i])}}return o}function Kk(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function V3(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function L1(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function X3(e,t,n,o){if(n.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var r=ya(o.href),i=t.querySelector(as(r));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ac.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,mt(i);return}i=t.ownerDocument||t,o=N1(o),(r=Mn.get(r))&&wg(o,r),i=i.createElement("link"),mt(i);var a=i;a._p=new Promise(function(l,s){a.onload=l,a.onerror=s}),wt(i,"link",o),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Ac.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Dm=0;function W3(e,t){return e.stylesheets&&e.count===0&&Ku(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var o=setTimeout(function(){if(e.stylesheets&&Ku(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Dm===0&&(Dm=62500*T3());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ku(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Dm?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(r)}}:null}function Ac(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ku(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ec=null;function Ku(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ec=new Map,t.forEach(Y3,e),Ec=null,Ac.call(e))}function Y3(e,t){if(!(t.state.loading&4)){var n=Ec.get(e);if(n)var o=n.get(null);else{n=new Map,Ec.set(e,n);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<r.length;i++){var a=r[i];(a.nodeName==="LINK"||a.getAttribute("media")!=="not all")&&(n.set(a.dataset.precedence,a),o=a)}o&&n.set(null,o)}r=t.instance,a=r.getAttribute("data-precedence"),i=n.get(a)||o,i===o&&n.set(null,r),n.set(a,r),this.count++,o=Ac.bind(this),r.addEventListener("load",o),r.addEventListener("error",o),i?i.parentNode.insertBefore(r,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Wl={$$typeof:xo,Provider:null,Consumer:null,_currentValue:Kr,_currentValue2:Kr,_threadCount:0};function F3(e,t,n,o,r,i,a,l,s){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=um(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=um(0),this.hiddenUpdates=um(null),this.identifierPrefix=o,this.onUncaughtError=r,this.onCaughtError=i,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.incompleteTransitions=new Map}function D1(e,t,n,o,r,i,a,l,s,u,f,m){return e=new F3(e,t,n,a,s,u,f,m,l),t=1,i===!0&&(t|=24),i=rn(3,null,null,t),e.current=i,i.stateNode=e,t=Zh(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:o,isDehydrated:n,cache:t},Jh(i),e}function I1(e){return e?(e=Ki,e):Ki}function j1(e,t,n,o,r,i){r=I1(r),o.context===null?o.context=r:o.pendingContext=r,o=dr(t),o.payload={element:n},i=i===void 0?null:i,i!==null&&(o.callback=i),n=fr(e,o,t),n!==null&&(Xt(n,e,t),Tl(n,e,t))}function Qk(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Eg(e,t){Qk(e,t),(e=e.alternate)&&Qk(e,t)}function H1(e){if(e.tag===13||e.tag===31){var t=ci(e,67108864);t!==null&&Xt(t,e,67108864),Eg(e,67108864)}}function Jk(e){if(e.tag===13||e.tag===31){var t=cn();t=Lh(t);var n=ci(e,t);n!==null&&Xt(n,e,t),Eg(e,t)}}var Mc=!0;function Z3(e,t,n,o){var r=Y.T;Y.T=null;var i=be.p;try{be.p=2,Mg(e,t,n,o)}finally{be.p=i,Y.T=r}}function K3(e,t,n,o){var r=Y.T;Y.T=null;var i=be.p;try{be.p=8,Mg(e,t,n,o)}finally{be.p=i,Y.T=r}}function Mg(e,t,n,o){if(Mc){var r=Ph(o);if(r===null)Nm(e,t,o,Tc,n),eS(e,o);else if(J3(r,e,t,n,o))o.stopPropagation();else if(eS(e,o),t&4&&-1<Q3.indexOf(e)){for(;r!==null;){var i=xa(r);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var a=Yr(i.pendingLanes);if(a!==0){var l=i;for(l.pendingLanes|=2,l.entangledLanes|=2;a;){var s=1<<31-un(a);l.entanglements[1]|=s,a&=~s}Qn(i),(ve&6)===0&&(gc=ln()+500,is(0,!1))}}break;case 31:case 13:l=ci(i,2),l!==null&&Xt(l,i,2),Hc(),Eg(i,2)}if(i=Ph(o),i===null&&Nm(e,t,o,Tc,n),i===r)break;r=i}r!==null&&o.stopPropagation()}else Nm(e,t,o,null,n)}}function Ph(e){return e=Hh(e),Tg(e)}var Tc=null;function Tg(e){if(Tc=null,e=Vi(e),e!==null){var t=Zl(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=aS(t),e!==null)return e;e=null}else if(n===31){if(e=lS(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Tc=e,null}function q1(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(jR()){case dS:return 2;case fS:return 8;case nc:case HR:return 32;case pS:return 268435456;default:return 32}default:return 32}}var _h=!1,hr=null,gr=null,yr=null,Yl=new Map,Fl=new Map,or=[],Q3="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function eS(e,t){switch(e){case"focusin":case"focusout":hr=null;break;case"dragenter":case"dragleave":gr=null;break;case"mouseover":case"mouseout":yr=null;break;case"pointerover":case"pointerout":Yl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fl.delete(t.pointerId)}}function gl(e,t,n,o,r,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:o,nativeEvent:i,targetContainers:[r]},t!==null&&(t=xa(t),t!==null&&H1(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function J3(e,t,n,o,r){switch(t){case"focusin":return hr=gl(hr,e,t,n,o,r),!0;case"dragenter":return gr=gl(gr,e,t,n,o,r),!0;case"mouseover":return yr=gl(yr,e,t,n,o,r),!0;case"pointerover":var i=r.pointerId;return Yl.set(i,gl(Yl.get(i)||null,e,t,n,o,r)),!0;case"gotpointercapture":return i=r.pointerId,Fl.set(i,gl(Fl.get(i)||null,e,t,n,o,r)),!0}return!1}function G1(e){var t=Vi(e.target);if(t!==null){var n=Zl(t);if(n!==null){if(t=n.tag,t===13){if(t=aS(n),t!==null){e.blockedOn=t,Dx(e.priority,function(){Jk(n)});return}}else if(t===31){if(t=lS(n),t!==null){e.blockedOn=t,Dx(e.priority,function(){Jk(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Qu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ph(e.nativeEvent);if(n===null){n=e.nativeEvent;var o=new n.constructor(n.type,n);Zm=o,n.target.dispatchEvent(o),Zm=null}else return t=xa(n),t!==null&&H1(t),e.blockedOn=n,!1;t.shift()}return!0}function tS(e,t,n){Qu(e)&&n.delete(t)}function eP(){_h=!1,hr!==null&&Qu(hr)&&(hr=null),gr!==null&&Qu(gr)&&(gr=null),yr!==null&&Qu(yr)&&(yr=null),Yl.forEach(tS),Fl.forEach(tS)}function Lu(e,t){e.blockedOn===t&&(e.blockedOn=null,_h||(_h=!0,ut.unstable_scheduleCallback(ut.unstable_NormalPriority,eP)))}var Du=null;function nS(e){Du!==e&&(Du=e,ut.unstable_scheduleCallback(ut.unstable_NormalPriority,function(){Du===e&&(Du=null);for(var t=0;t<e.length;t+=3){var n=e[t],o=e[t+1],r=e[t+2];if(typeof o!="function"){if(Tg(o||n)===null)continue;break}var i=xa(n);i!==null&&(e.splice(t,3),t-=3,fh(i,{pending:!0,data:r,method:n.method,action:o},o,r))}}))}function va(e){function t(s){return Lu(s,e)}hr!==null&&Lu(hr,e),gr!==null&&Lu(gr,e),yr!==null&&Lu(yr,e),Yl.forEach(t),Fl.forEach(t);for(var n=0;n<or.length;n++){var o=or[n];o.blockedOn===e&&(o.blockedOn=null)}for(;0<or.length&&(n=or[0],n.blockedOn===null);)G1(n),n.blockedOn===null&&or.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(o=0;o<n.length;o+=3){var r=n[o],i=n[o+1],a=r[Wt]||null;if(typeof i=="function")a||nS(n);else if(a){var l=null;if(i&&i.hasAttribute("formAction")){if(r=i,a=i[Wt]||null)l=a.formAction;else if(Tg(r)!==null)continue}else l=a.action;typeof l=="function"?n[o+1]=l:(n.splice(o,3),o-=3),nS(n)}}}function U1(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(a){return r=a})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),o||setTimeout(n,20)}function n(){if(!o&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function Og(e){this._internalRoot=e}Uc.prototype.render=Og.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(_(409));var n=t.current,o=cn();j1(n,o,e,t,null,null)};Uc.prototype.unmount=Og.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;j1(e.current,2,null,e,null,null),Hc(),t[ba]=null}};function Uc(e){this._internalRoot=e}Uc.prototype.unstable_scheduleHydration=function(e){if(e){var t=vS();e={blockedOn:null,target:e,priority:t};for(var n=0;n<or.length&&t!==0&&t<or[n].priority;n++);or.splice(n,0,e),n===0&&G1(e)}};var oS=rS.version;if(oS!=="19.2.3")throw Error(_(527,oS,"19.2.3"));be.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(_(188)):(e=Object.keys(e).join(","),Error(_(268,e)));return e=_R(t),e=e!==null?sS(e):null,e=e===null?null:e.stateNode,e};var tP={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:Y,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(yl=__REACT_DEVTOOLS_GLOBAL_HOOK__,!yl.isDisabled&&yl.supportsFiber))try{Kl=yl.inject(tP),sn=yl}catch{}var yl;Bc.createRoot=function(e,t){if(!iS(e))throw Error(_(299));var n=!1,o="",r=$0,i=N0,a=L0;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=D1(e,1,!1,null,null,n,o,null,r,i,a,U1),e[ba]=t.current,Sg(e),new Og(t)};Bc.hydrateRoot=function(e,t,n){if(!iS(e))throw Error(_(299));var o=!1,r="",i=$0,a=N0,l=L0,s=null;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(a=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(s=n.formState)),t=D1(e,1,!0,t,n??null,o,r,s,i,a,l,U1),t.context=I1(null),n=t.current,o=cn(),o=Lh(o),r=dr(o),r.callback=null,fr(n,r,o),n=o,t.current.lanes=n,Jl(t,n),Qn(t),e[ba]=t.current,Sg(e),new Uc(t)};Bc.version="19.2.3"});var W1=jn((wq,X1)=>{"use strict";function V1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(V1)}catch(e){console.error(e)}}V1(),X1.exports=B1()});var Qg=/^[a-z0-9]+(?:[._-][a-z0-9]+)*$/;function id(e){return typeof e=="string"&&e.length<=48&&Qg.test(e)}function ad(e){return typeof e=="number"&&Number.isFinite(e)&&Math.abs(e)<=9007199254740991}function ld(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;let t=e;return id(t.id)?{id:t.id}:null}function sd(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;let t=e;return!id(t.id)||!ad(t.progress)?null:{id:t.id,progress:t.progress}}var ey="hopple.",ud=/^[a-z0-9]+(?:[._-][a-z0-9]+)*$/;function ty(e){return typeof e=="string"&&!e.startsWith(ey)&&ud.test(e)}function gs(e,t,n){let o=typeof e=="string"?e:"";if(!ty(e))return{ok:!1,reason:"name",name:o};let r=n?.[e];if(n!==void 0&&r===void 0)return{ok:!1,reason:"undeclared",name:e};if(t!==void 0&&!Jg(t))return{ok:!1,reason:"props",name:e};let i={},a=[];for(let[l,s]of Object.entries(Jg(t)?t:{})){let u=r?.[l];if(r!==void 0&&u===void 0||!ud.test(l)||!eA(s,u)){a.push(l);continue}i[l]=s}return{ok:!0,name:e,props:i,dropped:a}}function Jg(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function eA(e,t){return typeof e=="string"?t===void 0||t==="string":typeof e=="number"?Number.isFinite(e)&&(t===void 0||t==="number"):typeof e=="boolean"?t===void 0||t==="boolean":!1}var Mr="master";var ny=/^[a-z0-9]+(?:[._-][a-z0-9]+)*$/;function ys(e){return typeof e=="string"&&e.length<=48&&ny.test(e)}var Nt=Object.freeze({muted:!1,master:1,channels:Object.freeze({})});function vi(e,t){return typeof e!="number"||!Number.isFinite(e)?t:Math.min(1,Math.max(0,e))}function Lo(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;let t=e,n={};if(typeof t.channels=="object"&&t.channels!==null&&!Array.isArray(t.channels))for(let[o,r]of Object.entries(t.channels))!ys(o)||o===Mr||typeof r!="number"||!Number.isFinite(r)||(n[o]=Math.min(1,Math.max(0,r)));return{muted:t.muted===!0,master:vi(t.master,Nt.master),channels:n}}function bi(e,t){if(e.muted!==t.muted||e.master!==t.master)return!1;let n=Object.keys(e.channels);return n.length!==Object.keys(t.channels).length?!1:n.every(o=>e.channels[o]===t.channels[o])}var tA=Object.freeze({audio:!0,loop:!0,resources:!0});function _a(e){if(typeof e!="object"||e===null)return!1;let t=e;if(t.p!==1)return!1;switch(t.kind){case"req":return typeof t.id=="string"&&typeof t.method=="string";case"res":return typeof t.id!="string"?!1:t.ok===!0?!0:t.ok===!1?nA(t.error):!1;case"evt":return typeof t.topic=="string";default:return!1}}function nA(e){if(typeof e!="object"||e===null)return!1;let t=e;return typeof t.code=="string"&&typeof t.message=="string"}var G=class extends Error{code;constructor(t){super(t.message),this.name="BridgeError",this.code=t.code}};function cd(e){return e instanceof G?{code:e.code,message:e.message}:{code:"internal",message:"The handler failed."}}var dd=["uncaught","rejection","sdk"];function vs(e){if(typeof e!="object"||e===null)return null;let t=e;if(!dd.includes(t.kind)||typeof t.message!="string"||t.stack!==void 0&&typeof t.stack!="string"||t.count!==void 0&&!(Number.isSafeInteger(t.count)&&t.count>=1))return null;let n={kind:t.kind,message:oy(t.message,1e3)};return typeof t.stack=="string"&&t.stack!==""&&(n.stack=oy(t.stack,8e3)),typeof t.count=="number"&&t.count>1&&(n.count=Math.min(t.count,1e6)),n}function oy(e,t){return e.length>t?`${e.slice(0,t-1)}\\u2026`:e}var ry=/^[a-z0-9]+(?:[._-][a-z0-9]+)*$/;function bs(e){return typeof e=="string"&&e.length<=48&&ry.test(e)}var Do={app:{id:"",version:"",surface:"web"},game:{id:"",version:""},player:{id:null,returning:!1,locale:"en"},device:{tier:"mid"}};function ct(e){let t=new Set;function n(o,r){try{return o.listener(...r)}catch(i){e(i);return}}return{on(o){let r={listener:o};return t.add(r),()=>{t.delete(r)}},emit(...o){for(let r of[...t]){if(!t.has(r))continue;let i=n(r,o);i instanceof Promise&&i.catch(e)}},async settle(...o){await Promise.all([...t].map(async r=>{if(t.has(r))try{await n(r,o)}catch(i){e(i)}}))},get size(){return t.size},clear(){t.clear()}}}var iy=/^[a-z0-9]+(?:[._-][a-z0-9]+)*$/;function xs(e){return typeof e=="string"&&e.length<=32&&iy.test(e)}function fd(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;let t=e;return xs(t.id)?{id:t.id}:null}var ks=["running","paused","unpausable"],Hn="unpausable";function ay(e){return ks.includes(e)}function Ss(e){if(typeof e!="object"||e===null||Array.isArray(e))return{state:Hn};let t=e;return{state:ay(t.state)?t.state:Hn}}function za(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;let t=e;if(typeof t.state!="string"||typeof t.version!="number"||!Number.isFinite(t.version)||t.encoding!=="json"&&t.encoding!=="text")return null;let n={version:t.version,encoding:t.encoding,state:t.state};return typeof t.rev=="string"&&(n.rev=t.rev),n}function ws(e){return new TextEncoder().encode(e).length}var ly=/^[a-z0-9]+(?:[._-][a-z0-9]+)*$/;function sy(e){return typeof e=="string"&&e.length<=48&&ly.test(e)}function pd(e){return typeof e=="number"&&Number.isFinite(e)&&Math.abs(e)<=9007199254740991}function md(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;let t=e;if(!pd(t.value))return null;let n={value:t.value};if(t.board!==void 0){if(!sy(t.board))return null;n.board=t.board}return n}function hd(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;let t=e,n={};typeof t.data=="string"&&(n.data=t.data);let o=gd(t.meta);return o!==null&&(n.meta=o),n}function gd(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;try{let t=JSON.parse(JSON.stringify(e));return typeof t=="object"&&t!==null&&!Array.isArray(t)?t:null}catch{return null}}function $a(e){return new TextEncoder().encode(typeof e=="string"?e:JSON.stringify(e)).length}var oA=1e4;function As(e){let{transport:t}=e,n=e.timeoutMs??oA,o=e.onError??(M=>console.error(M)),r=e.handlers,i=new Map,a=new Map,l=0,s=null,u=null,f=!1,m=t.receive(c);function c(M){f||(M.kind==="req"?p(M):M.kind==="res"?g(M):S(M))}async function p(M){if(A(M.id)){y({p:1,kind:"res",id:M.id,ok:!1,error:{code:"stale",message:"That conversation has ended; introduce yourself again."}});return}let E=r[M.method];if(!E){y({p:1,kind:"res",id:M.id,ok:!1,error:{code:"unknown_method",message:`No handler for "${M.method}".`}});return}try{let L=await E(M.params);if(f)return;y({p:1,kind:"res",id:M.id,ok:!0,value:L})}catch(L){if(f)return;y({p:1,kind:"res",id:M.id,ok:!1,error:cd(L)})}}function g(M){let E=i.get(M.id);E&&(i.delete(M.id),clearTimeout(E.timer),M.ok?E.resolve(M.value):E.reject(new G(M.error)))}function S(M){a.get(M.topic)?.emit(M.data)}function y(M){try{t.send(M)}catch(E){o(E)}}function h(M,E,L){if(f)return Promise.reject(new G({code:"disposed",message:`"${M}" was not sent: peer disposed.`}));l+=1;let z=s===null?String(l):`${s}-${l}`,B=L?.timeoutMs??n;return new Promise((Oe,Fe)=>{let _e=setTimeout(()=>{i.delete(z),Fe(new G({code:"timeout",message:`"${M}" got no reply within ${B}ms.`}))},B);i.set(z,{resolve:Oe,reject:Fe,timer:_e}),y({p:1,kind:"req",id:z,method:M,params:E})})}function d(M,E){f||y({p:1,kind:"evt",topic:M,data:E})}function v(M,E){let L=a.get(M);L===void 0&&(L=ct(o),a.set(M,L));let z=L.on(E),B=L;return()=>{z(),B.size===0&&a.get(M)===B&&a.delete(M)}}function b(M){for(let E of i.values())clearTimeout(E.timer),E.reject(M);i.clear()}function T(M){s=M}function O(M){f||(u=M,b(new G({code:"stale",message:"The other side started over; this call belonged to the conversation before it."})))}function A(M){if(u===null)return!1;let E=M.indexOf("-");return E===-1?!1:M.slice(0,E)!==u}function R(){f||(f=!0,m(),b(new G({code:"disposed",message:"The peer was disposed mid-call."})),a.clear(),t.close())}return{call:h,emit:d,on:v,useSession:T,expectSession:O,dispose:R}}var fy="This host has nowhere to keep an achievement.",SA={welcome:()=>{},unlock:()=>Promise.reject(new G({code:"unsupported",message:fy})),progress:()=>Promise.reject(new G({code:"unsupported",message:fy})),settle:()=>Promise.resolve()};function xd(e,t,n,o=()=>{}){if(!e)return SA;let r=e,i=r.declared,a=i===void 0?[]:Object.keys(i),l,s=null,u=new Set;function f(g){return u.add(g),g.catch(()=>{}).finally(()=>u.delete(g)),g}if(r.state!==void 0){let g;try{g=r.state()}catch{g=void 0}wA(g)?(s={},f(g).then(S=>{let y=s??{};if(s=null,S!==void 0){if(S===null&&Object.keys(y).length===0)l=null;else{let h={...S};for(let[d,v]of Object.entries(y)){let b=S?.[d]?.at;h[d]=v.unlocked&&b!==void 0?{...v,at:b}:v}l=h}o(l)}},()=>{s=null,l=void 0})):l=g}function m(g){if(i===void 0)return;let S=i[g];if(S===void 0)throw new G({code:"bad_params",message:`This game declares no achievement "${g}".`});return S}async function c(g){let S=r.refuse?.(g);if(typeof S=="string"&&S!=="")throw t.host("hopple.achievement.refused",{achievement:g.id,reason:S}),new G({code:"rate_limited",message:S});let y=await f(Promise.resolve(r.report(g)));if(l!==void 0||s!==null){let d=(l===void 0?s:l)??{},v=d[g.id],b={...d,[g.id]:{unlocked:y.unlocked,...y.unlocked?{at:v?.at??g.at}:{},...y.progress===void 0?{}:{progress:y.progress}}};l===void 0?s=b:l=b}t.host(y.earned?"hopple.achievement.unlocked":"hopple.achievement.progressed",{achievement:g.id,...y.progress===void 0?{}:{progress:y.progress}});let h={unlocked:y.unlocked,earned:y.earned};return y.progress!==void 0&&(h.progress=y.progress),h}return{welcome(){let g={ids:a};return l!==void 0&&(g.state=l),g},async unlock(g){let S=ld(g);if(S===null)throw new G({code:"bad_params",message:"An unlock names one achievement this game declares."});return m(S.id),c({id:S.id,unlock:!0,at:n()})},async progress(g){let S=sd(g);if(S===null)throw new G({code:"bad_params",message:"Progress is one achievement this game declares and a finite number."});let y=m(S.id);if(y!==void 0&&y.progress===void 0)throw new G({code:"bad_params",message:`"${S.id}" is unlocked outright and has no progress to report.`});return c({id:S.id,progress:S.progress,unlock:!1,at:n()})},async settle(){await Promise.allSettled([...u])}}}function wA(e){return typeof e?.then=="function"}var AA={active:!1,host:()=>{},event:()=>[]};function py(e){if(!e)return AA;let{sink:t}=e,n=e.now??Date.now,o=(i,a)=>{t({name:i,at:n(),source:"host",props:a})},r=(i,a)=>(o("hopple.refused",{name:i,reason:a}),{name:i,reason:a});return{active:!0,host(i,a={}){o(i,a)},event(i){let a=EA(i),l=gs(a.name,a.props,e.declared);if(!l.ok)return[r(l.name,l.reason)];let s={name:l.name,at:n(),source:"game",props:l.props},u=e.refuse?.(s);return typeof u=="string"?[r(s.name,u)]:(t(s),l.dropped.map(f=>r(`${s.name}.${f}`,"prop")))}}}function EA(e){return typeof e=="object"&&e!==null?e:{}}var MA={welcome:()=>{},revise:()=>{},current:()=>Nt,acked:()=>!0};function kd(e,t){if(!e)return MA;let n=e.channels??{},o=my(TA(e.state),n),r=null;return{welcome(){return r=o,r},current(){return r??=o,r},revise(i){let a={muted:i.muted??o.muted,master:vi(i.master,o.master),channels:{...o.channels,...i.channels??{}}};if(o=my(a,n),!(r!==null&&bi(r,o)))return r=o,o},acked(i,a){let l=Lo(a),s=l!==null&&bi(i,l);return s||t.host("hopple.audio.ignored",{muted:i.muted,master:i.master,answered:l!==null}),s}}}function TA(e){if(e===void 0)return Nt;try{let t=typeof e=="function"?e():e;return Lo(t)??Nt}catch{return Nt}}function my(e,t){let n={};for(let[o,r]of Object.entries(e.channels))o===Mr||!ys(o)||t[o]!==void 0&&(n[o]=vi(r,1));return{muted:e.muted===!0,master:vi(e.master,1),channels:n}}var OA={welcome:()=>{},revise:()=>{},current:()=>({mapping:{},scheme:"keyboard",controls:!1,sticks:"floating"})};function Sd(e,t){if(!e)return OA;let n=e.actions??{},o=e.layouts??{},r=e.labels??{},i=CA(e.mapping),a=e.scheme??"keyboard",l=e.controls===!0,s=e.sticks??"floating",u=null;function f(){let m={};for(let[c,p]of Object.entries(n)){if(!bs(c))continue;let g=i[c],S=Array.isArray(g)&&g.length>0?g:p.bind,y={bind:S};typeof p.title=="string"&&(y.title=p.title);let h=S.find(d=>typeof r[d]=="string");h!==void 0&&(y.label=r[h]),m[c]=y}return{mapping:m,scheme:a,controls:l,sticks:s}}return{welcome(){return u=f(),{actions:RA(n),layouts:o,...u}},current(){return u??=f(),u},revise(m,c){m.mapping!==void 0&&(i=PA(m.mapping,n)),m.scheme!==void 0&&(a=m.scheme),m.controls!==void 0&&(l=m.controls);let p=s;m.sticks!==void 0&&(s=m.sticks);let g=f();if(!(u!==null&&_A(u,g)))return u=g,c==="remap"&&t.host("hopple.input.remap",{actions:Object.keys(i).length}),c==="scheme"&&t.host("hopple.input.scheme",{scheme:a}),s!==p&&t.host("hopple.input.sticks",{sticks:s}),{...g,cause:c}}}}function RA(e){let t={};for(let[n,o]of Object.entries(e)){if(!bs(n))continue;let r={bind:o.bind};typeof o.title=="string"&&(r.title=o.title),typeof o.label=="string"&&(r.label=o.label),t[n]=r}return t}function CA(e){if(e===void 0)return{};try{return(typeof e=="function"?e():e)??{}}catch{return{}}}function PA(e,t){let n={};for(let[o,r]of Object.entries(e)){if(t[o]===void 0||!Array.isArray(r))continue;let i=r.filter(a=>typeof a=="string");i.length>0&&(n[o]=i)}return n}function _A(e,t){if(e.scheme!==t.scheme||e.controls!==t.controls||e.sticks!==t.sticks)return!1;let n=Object.keys(e.mapping);return n.length!==Object.keys(t.mapping).length?!1:n.every(o=>{let r=e.mapping[o],i=t.mapping[o];return r===void 0||i===void 0||r.title!==i.title||r.label!==i.label?!1:r.bind.length===i.bind.length&&r.bind.every((a,l)=>a===i.bind[l])})}var zA="This host has no panel of its own to open.";function $A(){return Promise.reject(new G({code:"unsupported",message:zA}))}var wd=Object.freeze({isOpen:!1,page:null});function hy(e){let t=e!==void 0&&xs(e.page)?e.page:null;return Object.freeze({isOpen:e?.isOpen===!0||t!==null,page:t})}var gy={welcome:()=>{},open:$A,current:()=>wd,revise:()=>{}};function Ad(e,t,n,o){if(!e)return gy;let r=e,i=wd;function a(l){let s=hy(l);s.isOpen===i.isOpen&&s.page===i.page||(i=s,t.host("hopple.panel.change",{open:s.isOpen,page:s.page??""}),o(s))}return{welcome(){let l={ids:[...r.ids()]};return i=hy(r.state?.()??wd),i.isOpen&&(l.isOpen=!0),i.page!==null&&(l.page=i.page),l},current(){return i},revise:a,async open(l){let s=n(),u=fd(l);if(u===null)throw new G({code:"bad_params",message:"Opening the panel takes an object with an `id` naming a page."});if(!r.ids().includes(u.id))throw t.host("hopple.panel.refused",{page:u.id,reason:"no such page"}),new G({code:"unsupported",message:`This host does not draw a ${u.id} page for this game.`});let f=r.refuse?.(u.id);if(typeof f=="string")throw t.host("hopple.panel.refused",{page:u.id,reason:f}),new G({code:"rate_limited",message:f});return await r.open(u.id),t.host("hopple.panel.open",{page:u.id,ms:n()-s}),a({isOpen:!0,page:u.id}),{}}}}function Ed(e){let t=Hn;function n(o){if(o.state!==t)return t=o.state,t}return{state:()=>t,announced(o){return n(Ss(o))},answered(o,r){let i=Ss(r);return n(i),i.state!==(o?"paused":"running")&&e.host("hopple.pause.declined",{asked:o,state:i.state}),t},silent(o){return e.host("hopple.pause.silent",{asked:o}),t}}}var NA="This host has nowhere to keep a save.";function Md(){return Promise.reject(new G({code:"unsupported",message:NA}))}var LA={welcome:()=>{},read:Md,write:Md,clear:Md,settle:()=>Promise.resolve()};function yy(e,t,n){if(!e)return LA;let o=e,r=Math.max(65536,o.bytes??65536),i,a=new Set,l=u();l.catch(()=>{});function s(c){return a.add(c),c.catch(()=>{}).finally(()=>a.delete(c)),c}function u(){let c;try{c=o.read()}catch(p){return i=void 0,Promise.reject(p)}return DA(c)?s(c).then(f,p=>{throw i=void 0,p}):Promise.resolve(f(c))}function f(c){let p=c==null?null:za(c);return p===null?(i=null,null):(i={at:typeof c?.at=="number"&&Number.isFinite(c.at)?c.at:n(),version:p.version,bytes:m(p)},p)}function m(c){return ws(c.state)}return{welcome(){let c={bytes:r};return i!==void 0&&(c.stored=i),c},async read(){let c=n(),p=l??u();l=null;let g=await p;return t.host("hopple.save.read",{found:g!==null,bytes:g===null?0:m(g),ms:n()-c}),i===void 0?{record:g}:{record:g,stored:i}},async write(c){let p=n(),g=za(c);if(g===null)throw new G({code:"bad_params",message:"A save needs a numeric version, a known encoding and a string state."});let S=m(g);if(S>r)throw t.host("hopple.save.refused",{reason:"too large",bytes:S}),new G({code:"too_large",message:`This host takes ${r} bytes and that save is ${S}.`});let y=o.refuse?.(g);if(typeof y=="string")throw t.host("hopple.save.refused",{reason:y,bytes:S}),new G({code:"rate_limited",message:y});let h=await s(Promise.resolve(o.write(g))),d=IA(h);return l=null,i={at:n(),version:g.version,bytes:S},t.host("hopple.save.write",{bytes:S,ms:n()-p}),d===void 0?{}:{rev:d}},async clear(){let c=n();return await s(Promise.resolve(o.clear())),l=null,i=null,t.host("hopple.save.clear",{ms:n()-c}),{}},async settle(){for(;a.size>0;)await Promise.allSettled([...a])}}}function DA(e){return typeof e?.then=="function"}function IA(e){if(typeof e!="object"||e===null)return;let t=e.rev;return typeof t=="string"?t:void 0}var jA="This host has nowhere to keep a score.",HA={welcome:()=>{},submit:()=>Promise.reject(new G({code:"unsupported",message:jA})),settle:()=>Promise.resolve()};function Td(e,t,n,o=()=>{}){if(!e)return HA;let r=e,i=r.boards,a=i===void 0?[]:Object.keys(i),l,s=null,u=new Set;function f(p){return u.add(p),p.catch(()=>{}).finally(()=>u.delete(p)),p}if(r.standing!==void 0){let p;try{p=r.standing()}catch{p=void 0}UA(p)?(s=new Map,f(p).then(g=>{let S=s??new Map;s=null,g!==void 0&&(l=S.size===0?g:GA(g,S),o(l))},()=>{s=null,l=void 0})):l=p}function m(p){return p!==void 0?p:a.length===1?a[0]:null}return{welcome(){let p={boards:a};return l!==void 0&&(p.standing=l),p},async submit(p){let g=md(p);if(g===null)throw new G({code:"bad_params",message:"A score is a finite number, and a board id if this game has more than one."});let S=m(g.board);if(S===null)throw new G({code:"bad_params",message:`This game declares ${a.length} boards; name the one you mean.`});if(i!==void 0&&i[S]===void 0)throw new G({code:"bad_params",message:`This game declares no board "${S}".`});let y={board:S,value:g.value,at:n()},h=r.refuse?.(y);if(typeof h=="string"&&h!=="")throw t.host("hopple.score.refused",{board:S,reason:h}),new G({code:"rate_limited",message:h});let d=await f(Promise.resolve(r.submit(y)));if(l!==void 0)l=qA(l,S,d,y.at);else if(s!==null){let b=s.get(S);s.set(S,{answered:d,runs:(b?.runs??0)+1,improvedAt:d.improved?y.at:b?.improvedAt,firstAt:b?.firstAt??y.at})}t.host("hopple.score.submitted",{board:S,value:y.value,improved:d.improved});let v={improved:d.improved,best:d.best};return d.rank!==void 0&&(v.rank=d.rank),d.of!==void 0&&(v.of=d.of),v},async settle(){await Promise.allSettled([...u])}}}function qA(e,t,n,o){let r=e??{},i=r[t];return{...r,[t]:{best:n.best,at:n.improved||i===void 0?o:i.at,runs:(i?.runs??0)+1,...n.rank===void 0?{}:{rank:n.rank},...n.of===void 0?{}:{of:n.of}}}}function GA(e,t){let n={...e??{}};for(let[o,r]of t){let i=n[o],{answered:a}=r;n[o]={best:a.best,at:r.improvedAt??i?.at??r.firstAt,runs:(i?.runs??0)+r.runs,...a.rank===void 0?{}:{rank:a.rank},...a.of===void 0?{}:{of:a.of}}}return n}function UA(e){return typeof e?.then=="function"}var BA=["shared","copied","dismissed"],VA="This host has no link to this game to offer.";function vy(){return Promise.reject(new G({code:"unsupported",message:VA}))}var XA={welcome:()=>({offers:!1}),offer:vy};function by(e,t,n){if(!e)return XA;let o=e,r=Math.max(512,o.bytes??512),i=Math.max(1024,o.metaBytes??1024),a=!1;async function l(s,u,f){let m=n();try{let c=await s(u),p=BA.includes(c)?c:"shared";t.host("hopple.share.offer",{outcome:p,bytes:f,ms:n()-m})}catch{t.host("hopple.share.failed",{bytes:f,ms:n()-m})}finally{a=!1}}return{welcome(){let s=o.offer!==void 0,u=o.data;if(u===void 0||u==="")return{offers:s};let f=$a(u);return f>r?(t.host("hopple.share.opened",{bytes:f,kept:!1}),{offers:s}):(t.host("hopple.share.opened",{bytes:f,kept:!0}),{offers:s,data:u})},async offer(s){if(!o.offer)return vy();let u=hd(s);if(u===null)throw new G({code:"bad_params",message:"A share takes an object, with a string `data` or nothing at all."});let f=u.data===void 0?0:$a(u.data);if(f>r)throw t.host("hopple.share.refused",{reason:"too large",bytes:f}),new G({code:"too_large",message:`This host carries ${r} bytes in a link and that data is ${f}.`});let m=u.meta===void 0?0:$a(u.meta);if(m>i)throw t.host("hopple.share.refused",{reason:"meta too large",bytes:m}),new G({code:"too_large",message:`This host keeps ${i} bytes of meta with a link and that meta is ${m}.`});if(a)return t.host("hopple.share.refused",{reason:"already open",bytes:f}),{};let c=o.refuse?.(u);if(typeof c=="string")throw t.host("hopple.share.refused",{reason:c,bytes:f}),new G({code:"rate_limited",message:c});return a=!0,l(o.offer,u,f),{}}}}function Od(e,t={}){let n=t.scope??window;return{send(o){e.contentWindow?.postMessage(o,"*")},receive(o){let r=i=>{i.source===e.contentWindow&&_a(i.data)&&o(i.data)};return n.addEventListener("message",r),()=>n.removeEventListener("message",r)},close(){}}}var WA=xy();function xy(e){let t=e===void 0?"data: blob:":`${e} data: blob:`;return["default-src \'none\'",`script-src \'unsafe-inline\' \'unsafe-eval\' \'wasm-unsafe-eval\' ${t}`,`style-src \'unsafe-inline\' ${t}`,`img-src ${t}`,`font-src ${t}`,`media-src ${t}`,`connect-src ${t}`,`worker-src ${t}`,"base-uri \'none\'","form-action \'none\'","webrtc \'block\'"].join("; ")}var ky=[1];function Sy(e){switch(e){case"active":return{audio:!0,loop:!0,resources:!0};case"passive":return{audio:!1,loop:!1,resources:!0};case"hidden":return{audio:!1,loop:!1,resources:!1}}}var YA={audio:"audio.allow",loop:"loop.allow",resources:"resources.allow"},wy=["audio","loop","resources"],FA="allow-scripts allow-pointer-lock",ZA=1e4,KA=5e3,QA=500;function JA(e,t={}){let n=t.ackMs??QA,o=t.loadMs??KA,r=0,i="booting",a=t.placement??"active",l=Sy(a),s=t.layout??{frame:{width:0,height:0},obstructions:[]},u=eE(t.info),f=ct(N=>console.error(N)),m=py(t.analytics),c=t.analytics?.now??Date.now,p=yy(t.save,m,c),g=by(t.share,m,c),S=Ad(t.panel,m,c,N=>{i!=="booting"&&xe.emit("panel.change",N)}),y=Td(t.score,m,c,N=>{i!=="booting"&&xe.emit("score.change",{standing:N})}),h=xd(t.achievements,m,c,N=>{i!=="booting"&&xe.emit("achievement.change",{state:N})}),d=Sd(t.input,m),v=kd(t.audio,m),b=Ed(m),T=c(),O=!1,A=t.schedule??tE,R=!1,M=()=>{},E=()=>{},L=new Promise((N,Q)=>{M=N,E=Q});L.catch(()=>{});let z=t.bootMs??ZA,B=Ay(z,()=>{m.host("hopple.boot.failed",{ms:z}),E(new G({code:"timeout",message:"The game never introduced itself: its bundle did not run."}))}),Oe=Ay(null,()=>_e("ready","timeout"));function Fe(N,Q){let Ce={phase:i,placement:a};f.emit(Ce,N,Q)}function _e(N,Q){if(N===i)return;let Ce={phase:i,placement:a};i=N,m.host("hopple.phase",{phase:N,cause:Q}),Fe(Ce,Q)}function he(N){if(N===a)return;let Q={phase:i,placement:a};a=N,Fe(Q,"host")}function Ft(N){let Q=N instanceof G?N.code:"internal",Ce=N instanceof Error?N.message:String(N);m.host("hopple.boot.refused",{code:Q,reason:Ce}),!(r>0)&&(B.stop(),E(N))}let xe=As({transport:e,handlers:{"system.hello":N=>{let Q;try{Q=rE(N)}catch(Pa){throw Ft(Pa),Pa}let Ce=(r++).toString(36);if(xe.expectSession(Ce),r===1){let Pa=oE(N);m.host("hopple.session.start",{protocol:Q,...Pa!==void 0&&{sdk:Pa},peer:Ce,surface:u.app.surface,tier:u.device.tier,game:u.game.id,version:u.game.version,returning:u.player.returning})}else m.host("hopple.session.reload",{peer:Ce});B.stop(),_e("loading","game"),Oe.restart(o),M({peer:Ce,protocol:Q});let Qe={protocol:Q,peer:Ce,allowed:l,layout:s,info:u},gi=p.welcome();gi!==void 0&&(Qe.save=gi),Qe.share=g.welcome();let yi=y.welcome();yi!==void 0&&(Qe.score=yi);let hs=h.welcome();hs!==void 0&&(Qe.achievements=hs);let Ca=d.welcome();Ca!==void 0&&(Qe.input=Ca);let Er=v.welcome();Er!==void 0&&(Qe.audio=Er);let Kg=S.welcome();return Kg!==void 0&&(Qe.panel=Kg),Qe},"system.ping":N=>({nonce:N.nonce}),"lifecycle.ready":()=>(Oe.stop(),_e("ready","game"),{}),"save.read":()=>p.read(),"save.write":N=>p.write(N),"save.clear":()=>p.clear(),"score.submit":N=>y.submit(N),"achievement.unlock":N=>h.unlock(N),"achievement.progress":N=>h.progress(N),"share.offer":N=>g.offer(N),"panel.open":N=>S.open(N)},timeoutMs:t.timeoutMs});m.active&&xe.on("analytics.event",N=>{for(let Q of m.event(N))xe.emit("analytics.refused",Q)});let Ot=t.errors;Ot!==void 0&&xe.on("error.report",N=>{let Q=vs(N);Q!==null&&Ot({...Q,count:Q.count??1,at:c()})});let zt=ct(N=>console.error(N));function ke(N){zt.emit(N)}xe.on("pause.change",N=>{let Q=b.announced(N);Q!==void 0&&ke(Q)});async function $(N){let Q=a,Ce=c(),Qe=Sy(N);he(N);let gi=l;if(l=Qe,i==="booting")return!0;let yi=[];Q==="active"&&N!=="active"&&b.state()==="running"&&yi.push(hi(!0).then(()=>!0));let hs=N==="active"?[...wy].reverse():wy;for(let Er of hs)Qe[Er]!==gi[Er]&&yi.push(j(Er,Qe[Er]));let Ca=(await Promise.all(yi)).every(Boolean);return m.host("hopple.placement",{placement:N,from:Q,acked:Ca,ms:c()-Ce}),Ca}async function j(N,Q){try{return(await xe.call(YA[N],{allowed:Q},{timeoutMs:n})).allowed===Q}catch{return!1}}let oe=!1,ce=null,$t=[];async function On(N){if(oe)return ce=N,new Promise(Qe=>$t.push(Qe));oe=!0;let Q=!1;try{let Qe=await xe.call("audio.set",N,{timeoutMs:n});Q=v.acked(N,Qe)}catch{Q=!1}finally{oe=!1}let Ce=ce;if(ce=null,Ce===null){let Qe=$t;$t=[];for(let gi of Qe)gi(Q);return Q}return On(Ce)}async function hi(N){let Q=b.state(),Ce;try{let Qe=await xe.call("pause.set",{paused:N},{timeoutMs:n});Ce=b.answered(N,Qe)}catch{Ce=b.silent(N)}return Ce!==Q&&ke(Ce),Ce}function ms(N){s=N,!(i==="booting"||R)&&(R=!0,A(()=>{R=!1,xe.emit("layout.change",s)}))}function No(){B.stop(),Oe.stop(),O||(O=!0,m.host("hopple.session.end",{ms:c()-T})),xe.dispose()}return{connected:L,lifecycle:{get phase(){return i},get placement(){return a},get allowed(){return l},place:$,on:f.on},layout:{get current(){return s},set:ms},audio:{get current(){return v.current()},async set(N){let Q=v.revise(N);return Q===void 0||i==="booting"?!0:On(Q)}},pause:{get state(){return b.state()},set(N){return i==="booting"||b.state()===Hn?Promise.resolve(b.state()):hi(N)},on:zt.on},input:{get current(){return d.current()},set(N,Q="host"){let Ce=d.revise(N,Q);Ce===void 0||i==="booting"||xe.emit("input.change",Ce)}},panel:{get isOpen(){return S.current().isOpen},get page(){return S.current().page},set:S.revise},info:u,ping:()=>iE(xe),async close(){let N=i!=="booting";_e("disposed","host"),N&&await xe.call("lifecycle.dispose",{},{timeoutMs:n}).catch(()=>{}),await p.settle(),await y.settle(),await h.settle(),No()},dispose:No}}function eE(e){return{app:{...Do.app,...e?.app},game:{...Do.game,...e?.game},player:{...Do.player,...e?.player},device:{...Do.device,...e?.device}}}function tE(e){typeof globalThis.requestAnimationFrame=="function"?globalThis.requestAnimationFrame(e):setTimeout(e,0)}function Ay(e,t){let n=null,o=r=>{n&&clearTimeout(n),n=setTimeout(t,r)};return e!==null&&o(e),{restart:o,stop(){n&&clearTimeout(n),n=null}}}function nE(e,t={}){return{frame:e,...JA(Od(e,{scope:t.scope}),t)}}function Ey(e,t,n={}){let r=e.ownerDocument.createElement("iframe");r.setAttribute("sandbox",n.sandbox??FA),r.setAttribute("title",n.title??"Game"),n.allow!==void 0&&r.setAttribute("allow",n.allow),r.style.border="0",r.style.display="block",r.src=t;let i=new Promise(l=>{r.addEventListener("load",()=>l(),{once:!0})});e.appendChild(r);let a=nE(r,n);return{...a,loaded:i,async close(){await a.close(),r.remove()},dispose(){a.dispose(),r.remove()}}}function oE(e){let t=e,n=typeof t=="object"&&t!==null?t.sdk:void 0;return typeof n=="string"&&n.length>0&&n.length<=64?n:void 0}function rE(e){let t=e,n=typeof t=="object"&&t!==null?t.protocol:void 0;if(typeof n!="number")throw new G({code:"bad_params",message:"A hello must say which protocol version the game speaks."});if(!ky.includes(n))throw new G({code:"unsupported_version",message:`This host speaks protocol ${ky.join(" and ")}, not ${n}.`});return n}async function iE(e){let t=aE(),n=performance.now(),o=await e.call("system.ping",{nonce:t}),r=performance.now()-n;if(o.nonce!==t)throw new Error(`The game answered a different ping: sent ${t}, got ${o.nonce}.`);return r}function aE(){return Math.random().toString(36).slice(2,10)}var Ms={type:"object",properties:{schema:{type:"number",const:1},id:{type:"string",pattern:"^[a-z0-9]+(?:-[a-z0-9]+)*$",maxLength:64,errorMessage:"must be lowercase letters, digits and hyphens"},owner:{type:"string",pattern:"^[a-z0-9]+(?:-[a-z0-9]+)*$",maxLength:64,errorMessage:"must be a handle: lowercase letters, digits and hyphens"},version:{type:"string",pattern:"^\\\\d+\\\\.\\\\d+\\\\.\\\\d+(?:-[0-9A-Za-z.-]+)?$",errorMessage:"must look like 1.0.0"},title:{type:"string",pattern:"\\\\S",maxLength:60,errorMessage:"must not be blank"},description:{type:"string",pattern:"\\\\S",maxLength:500,errorMessage:"must not be blank"},cover:{type:"string",pattern:"^(?!/)(?!.*\\\\.\\\\.)[A-Za-z0-9._/-]+\\\\.(?:png|jpe?g|webp)$",maxLength:200,errorMessage:\'must be the path of a .png, .jpg or .webp file beside the config, like "cover.png"\'},orientation:{$ref:"#/definitions/Orientation"},sdk:{type:"string",pattern:"^[\\\\^~]?\\\\d+\\\\.\\\\d+\\\\.\\\\d+(?:-[0-9A-Za-z.-]+)?$",errorMessage:"must be a version like 1.0.0, ^1.0.0 or ~1.0.0"},layout:{$ref:"#/definitions/LayoutDeclaration"},analytics:{$ref:"#/definitions/AnalyticsDeclaration"},save:{$ref:"#/definitions/SaveDeclaration"},score:{$ref:"#/definitions/ScoreDeclaration"},achievements:{$ref:"#/definitions/AchievementDeclaration"},input:{$ref:"#/definitions/InputDeclaration"},audio:{anyOf:[{$ref:"#/definitions/AudioDeclaration"},{type:"null"}]}},required:["schema","id","version","title","orientation","sdk","audio"],additionalProperties:{}},lE={type:"string",enum:["portrait","landscape","any"]},sE={type:"object",properties:{insets:{$ref:"#/definitions/InsetMode"}},required:["insets"],additionalProperties:{}},uE={type:"string",enum:["draw-under","reserve"]},cE={type:"object",properties:{events:{type:"object",additionalProperties:{$ref:"#/definitions/AnalyticsShape"},maxProperties:64,propertyNames:{pattern:"^[a-z0-9]+(?:[._-][a-z0-9]+)*$",maxLength:48,not:{pattern:"^hopple\\\\."},errorMessage:\'must be lowercase letters, digits, dots, hyphens and underscores, and must not start with "hopple.", which the host uses\'}}},required:["events"],additionalProperties:{}},dE={type:"object",additionalProperties:{$ref:"#/definitions/AnalyticsType"},maxProperties:8,propertyNames:{pattern:"^[a-z0-9]+(?:[._-][a-z0-9]+)*$",maxLength:24,errorMessage:"must be a prop name of lowercase letters, digits, dots, hyphens and underscores"}},fE={type:"string",enum:["string","number","boolean"]},pE={type:"object",properties:{bytes:{type:"integer",exclusiveMinimum:0,maximum:1048576}},required:["bytes"],additionalProperties:{}},mE={type:"object",properties:{boards:{type:"object",additionalProperties:{$ref:"#/definitions/ScoreBoard"},minProperties:1,maxProperties:16,propertyNames:{pattern:"^[a-z0-9]+(?:[._-][a-z0-9]+)*$",maxLength:48,errorMessage:"must be lowercase letters, digits, dots, hyphens and underscores"}}},required:["boards"],additionalProperties:{}},hE={type:"object",properties:{title:{type:"string",pattern:"\\\\S",maxLength:40,errorMessage:"must not be blank"},direction:{$ref:"#/definitions/ScoreDirection"},format:{$ref:"#/definitions/ScoreFormat"}},required:["title","direction"],additionalProperties:{}},gE={type:"string",enum:["asc","desc"]},yE={type:"string",enum:["integer","decimal","duration-ms"]},vE={type:"object",properties:{list:{type:"object",additionalProperties:{$ref:"#/definitions/Achievement"},minProperties:1,maxProperties:128,propertyNames:{pattern:"^[a-z0-9]+(?:[._-][a-z0-9]+)*$",maxLength:48,errorMessage:"must be lowercase letters, digits, dots, hyphens and underscores"}}},required:["list"],additionalProperties:{}},bE={type:"object",properties:{title:{type:"string",pattern:"\\\\S",maxLength:40,errorMessage:"must not be blank"},detail:{type:"string",pattern:"\\\\S",maxLength:120,errorMessage:"must not be blank"},icon:{type:"string",pattern:"\\\\S",maxLength:8,errorMessage:"must not be blank"},secret:{type:"boolean"},progress:{$ref:"#/definitions/AchievementProgress"}},required:["title"],additionalProperties:{}},Rd={type:"object",properties:{target:{type:"number",minimum:-9007199254740991,maximum:9007199254740991},direction:{$ref:"#/definitions/ScoreDirection"},format:{$ref:"#/definitions/ScoreFormat"},tiers:{type:"array",items:{$ref:"#/definitions/AchievementTier"},maxItems:8}},required:["target"],additionalProperties:{}},xE={type:"object",properties:{at:{type:"number",minimum:-9007199254740991,maximum:9007199254740991},title:{type:"string",pattern:"\\\\S",maxLength:40,errorMessage:"must not be blank"},icon:{type:"string",pattern:"\\\\S",maxLength:8,errorMessage:"must not be blank"}},required:["at","title"],additionalProperties:{}},kE={type:"object",properties:{supported:{type:"array",items:{$ref:"#/definitions/InputDeviceSet"},minItems:1,maxItems:8},actions:{type:"object",additionalProperties:{$ref:"#/definitions/InputAction"},maxProperties:64,propertyNames:{pattern:"^[a-z0-9]+(?:[._-][a-z0-9]+)*$",maxLength:48,errorMessage:"must be lowercase letters, digits, dots, hyphens and underscores"}},controls:{type:"object",additionalProperties:{$ref:"#/definitions/ControlLayout"},maxProperties:8,propertyNames:{pattern:"^[a-z0-9]+(?:[._-][a-z0-9]+)*$",maxLength:48,errorMessage:"must be a layout name of lowercase letters, digits, dots, hyphens and underscores"}}},additionalProperties:{}},SE={type:"array",items:{$ref:"#/definitions/InputDevice"},minItems:1,maxItems:8},wE={type:"string",enum:["keyboard","mouse","touch","gamepad"]},AE={type:"object",properties:{bind:{$ref:"#/definitions/InputBindings"},title:{type:"string",pattern:"\\\\S",maxLength:40,errorMessage:"must not be blank"},label:{type:"string",pattern:"\\\\S",maxLength:8,errorMessage:"must not be blank"}},required:["bind"],additionalProperties:{}},EE={type:"array",items:{$ref:"#/definitions/InputBinding"},minItems:1,maxItems:8},Cd={type:"string",pattern:"^(?:key\\\\.(?!Escape$)(?=.{1,48}$)[A-Za-z][A-Za-z0-9]*|pointer\\\\.(?:primary|secondary)|mouse\\\\.(?:left|middle|right)|touch\\\\.tap|controls\\\\.(?=.{1,48}$)[a-z0-9]+(?:[_-][a-z0-9]+)*|pad\\\\.(?:north|south|east|west|start|select)|pad\\\\.(?:left|right)\\\\.(?:north|south|east|west|bumper|trigger))$",errorMessage:"is not a binding this SDK knows (a thumbstick is read rather than bound, and Escape is the host\'s key)"},Pd={type:"object",properties:{left:{$ref:"#/definitions/ControlZoneSlots"},right:{$ref:"#/definitions/ControlZoneSlots"},full:{$ref:"#/definitions/ControlZoneSlots"}},additionalProperties:{}},ME={type:"object",additionalProperties:{$ref:"#/definitions/ControlSlot"},maxProperties:8,propertyNames:{pattern:"^[a-z0-9]+(?:[._-][a-z0-9]+)*$",maxLength:48,errorMessage:"must be a control id of lowercase letters, digits, dots, hyphens and underscores"}},TE={type:"object",properties:{type:{type:"string",enum:["buttons","thumbstick"]},buttons:{type:"array",items:{type:"string"},minItems:1,maxItems:8},shape:{$ref:"#/definitions/ControlShape"},as:{anyOf:[{$ref:"#/definitions/InputStick"},{type:"object",additionalProperties:{$ref:"#/definitions/InputBinding"}}]},axis:{$ref:"#/definitions/ControlAxis"}},required:["type"],additionalProperties:{},if:{properties:{type:{const:"buttons"}},required:["type"]},then:{required:["buttons"],properties:{as:{type:"object",additionalProperties:{$ref:"#/definitions/InputBinding"}},axis:{not:{},errorMessage:"is only for a thumbstick"}}},else:{properties:{as:{$ref:"#/definitions/InputStick"}}}},OE={type:"string",enum:["row","column","diamond","cluster"]},_d={type:"string",pattern:"^(?:controls\\\\.(?=.{1,48}$)[a-z0-9]+(?:[_-][a-z0-9]+)*|pad\\\\.stick|pad\\\\.(?:left|right)\\\\.stick)$",errorMessage:"must name a thumbstick, such as pad.left.stick"},RE={type:"string",enum:["x","y"]},CE={type:"object",properties:{channels:{type:"object",additionalProperties:{$ref:"#/definitions/AudioChannel"},maxProperties:8,propertyNames:{pattern:"^[a-z0-9]+(?:[._-][a-z0-9]+)*$",maxLength:48,not:{const:"master"},errorMessage:\'must be lowercase letters, digits, dots, hyphens and underscores, and must not be "master", which every host adds itself\'}}},additionalProperties:{}},PE={type:"object",properties:{title:{type:"string",pattern:"\\\\S",maxLength:40,errorMessage:"must not be blank"}},required:["title"],additionalProperties:{}},My={GameManifest:Ms,Orientation:lE,LayoutDeclaration:sE,InsetMode:uE,AnalyticsDeclaration:cE,AnalyticsShape:dE,AnalyticsType:fE,SaveDeclaration:pE,ScoreDeclaration:mE,ScoreBoard:hE,ScoreDirection:gE,ScoreFormat:yE,AchievementDeclaration:vE,Achievement:bE,AchievementProgress:Rd,AchievementTier:xE,InputDeclaration:kE,InputDeviceSet:SE,InputDevice:wE,InputAction:AE,InputBindings:EE,InputBinding:Cd,ControlLayout:Pd,ControlZoneSlots:ME,ControlSlot:TE,ControlShape:OE,InputStick:_d,ControlAxis:RE,AudioDeclaration:CE,AudioChannel:PE};var zE=1024*1024;var $E=Number.MAX_SAFE_INTEGER;var NE=Rd.properties.target.maximum;var Nd=Ms.required,Ts=Object.keys(Pd.properties),LE=new RegExp(Cd.pattern),Kz=new RegExp(_d.pattern);function Ld(e){return typeof e=="string"&&LE.test(e)}function Dd(e){return e.startsWith("key.")?"keyboard":e.startsWith("mouse.")?"mouse":e.startsWith("touch.")?"touch":e.startsWith("pad.")?"gamepad":null}function Id(e){let t=[],n=(o,r)=>{t.some(i=>i.field===o&&i.message===r)||t.push({field:o,message:r})};return Gn(Ms,e,"",n),t.length===0&&HE(e,n),t.length>0?{ok:!1,problems:t}:{ok:!0,manifest:e}}function jd(e){return e.map(t=>t.field===""?`the manifest ${t.message}`:`\\`${t.field}\\` ${t.message}`).join("; ")}var DE="#/definitions/";function Ty(e){let t=e;for(;typeof t.$ref=="string";){let n=t.$ref.slice(DE.length),o=My[n];if(o===void 0)throw new Error(`the manifest schema has no definition ${n}`);t=o}return t}function zd(e,t){let n=!0;return Gn(e,t,"",()=>{n=!1}),n}function Cy(e){return Array.isArray(e)?"array":e===null?"null":typeof e=="number"?Number.isInteger(e)?"integer":"number":typeof e}function Oy(e,t){let n=Cy(e);return n===t||t==="number"&&n==="integer"}var Ry={string:"a string",number:"a number",integer:"a whole number",boolean:"true or false",object:"an object",array:"a list",null:"null"};function $d(e,t,n=48){let o=[...t].length>n?`${[...t].slice(0,n).join("")}\\u2026`:t;return e===""?o:`${e}.${o}`}function Gn(e,t,n,o){let r=Ty(e);if(Array.isArray(r.anyOf)){let a=r.anyOf.map(Ty);if(a.some(s=>zd(s,t)))return;let l=a.find(s=>Oy(t,s.type));l!==void 0?Gn(l,t,n,o):o(n,`must be ${a.map(s=>Ry[String(s.type)]).join(" or ")}`);return}if(r.type!==void 0&&!Oy(t,r.type)){o(n,`must be ${Ry[String(r.type)]??String(r.type)}`);return}if("const"in r&&t!==r.const){o(n,`must be ${JSON.stringify(r.const)}`);return}if(Array.isArray(r.enum)&&!r.enum.includes(t)){o(n,`must be one of ${r.enum.join(", ")}`);return}let i=typeof r.errorMessage=="string"?r.errorMessage:void 0;if(typeof t=="string"){let a=[...t].length;typeof r.pattern=="string"&&!new RegExp(r.pattern,"u").test(t)?o(n,i??`must match ${r.pattern}`):typeof r.maxLength=="number"&&a>r.maxLength?o(n,`must be at most ${r.maxLength} characters`):typeof r.minLength=="number"&&a<r.minLength&&o(n,`must be at least ${r.minLength} characters`)}if(typeof t=="number"&&(typeof r.minimum=="number"&&t<r.minimum?o(n,`must be at least ${r.minimum}`):typeof r.exclusiveMinimum=="number"&&t<=r.exclusiveMinimum?o(n,`must be above ${r.exclusiveMinimum}`):typeof r.maximum=="number"&&t>r.maximum?o(n,`must be at most ${r.maximum}`):typeof r.exclusiveMaximum=="number"&&t>=r.exclusiveMaximum&&o(n,`must be below ${r.exclusiveMaximum}`)),r.not!==void 0&&zd(r.not,t)&&o(n,i??"is not allowed"),Array.isArray(t)?IE(r,t,n,o):Cy(t)==="object"&&jE(r,t,n,o),r.if!==void 0){let a=zd(r.if,t)?r.then:r.else;a!==void 0&&Gn(a,t,n,o)}if(Array.isArray(r.allOf))for(let a of r.allOf)Gn(a,t,n,o)}function IE(e,t,n,o){if(typeof e.minItems=="number"&&t.length<e.minItems?o(n,e.minItems===1?"must not be empty":`must hold at least ${e.minItems}`):typeof e.maxItems=="number"&&t.length>e.maxItems&&o(n,`must hold at most ${e.maxItems}`),e.items!==void 0)for(let[r,i]of t.entries())typeof i=="object"&&i!==null?Gn(e.items,i,`${n}[${r}]`,o):Gn(e.items,i,n,(a,l)=>{o(a,a===n?`${JSON.stringify(i)} ${l}`:l)})}function jE(e,t,n,o){let r=Object.keys(t);typeof e.minProperties=="number"&&r.length<e.minProperties?o(n,e.minProperties===1?"must declare at least one":`must declare at least ${e.minProperties}`):typeof e.maxProperties=="number"&&r.length>e.maxProperties&&o(n,`must declare at most ${e.maxProperties}`);let i=e.propertyNames,a=typeof i?.maxLength=="number"?i.maxLength:void 0,l=e.properties??{},s=e.required??[];for(let[u,f]of Object.entries(l))u in t?Gn(f,t[u],$d(n,u),o):s.includes(u)&&o($d(n,u),"is required");for(let u of r){if(u in l)continue;let f=$d(n,u,a);if(i!==void 0){let m;Gn(i,u,"",(c,p)=>{m??=p}),m!==void 0&&o(f,m)}typeof e.additionalProperties=="object"&&e.additionalProperties!==null&&Gn(e.additionalProperties,t[u],f,o)}}function HE(e,t){let n=new Set(Object.keys(e.input?.actions??{}));for(let[o,r]of Object.entries(Cr(e)))for(let i of Ts)for(let[a,l]of Object.entries(r[i]??{})){if(l.type!=="buttons"||l.buttons===void 0)continue;let s=`input.controls.${o}.${i}.${a}`;for(let u of l.buttons)n.has(u)||t(`${s}.buttons`,`names no declared action "${u}"`);if(typeof l.as=="object")for(let u of Object.keys(l.as))l.buttons.includes(u)||t(`${s}.as`,`names no button "${u}" in this control`)}for(let[o,r]of Object.entries(ja(e))){let i=r.progress;if(i?.tiers===void 0)continue;let a=Or(r),l=null;for(let[s,u]of i.tiers.entries()){let f=`achievements.list.${o}.progress.tiers[${s}].at`;l!==null&&!Tr(a,u.at,l)&&t(f,`must be past ${l}, which is the tier before it`),Tr(a,u.at,i.target)&&t(f,`must be short of the target of ${i.target}`),l=u.at}}}function Da(e){return e.layout?.insets??"reserve"}function Ia(e){return e.analytics?.events??{}}function Hd(e){let t=e.save?.bytes;return typeof t=="number"?{bytes:t}:null}function ki(e){return e.score?.boards??{}}function Py(e,t,n){return e==="asc"?Math.min(t,n):Math.max(t,n)}function Tr(e,t,n){return e==="asc"?t<n:t>n}function Si(e){return e.audio?.channels??{}}function ja(e){return e.achievements?.list??{}}function Or(e){return e.progress?.direction??"desc"}function qd(e,t){let n=e.progress?.target;return n===void 0?!1:Or(e)==="asc"?t<=n:t>=n}function Gd(e,t,n){return t===void 0?n:Py(Or(e),t,n)}function Ud(e,t){let n=e.progress?.tiers??[];if(t===void 0)return 0;let o=Or(e),r=0;for(let i of n){if(!(o==="asc"?t<=i.at:t>=i.at))break;r+=1}return r}function Rr(e){let t=e.input?.actions;if(t===void 0)return{};let n={};for(let[o,r]of Object.entries(t))typeof r!="object"||r===null||!Array.isArray(r.bind)||(n[o]=r);return n}function Cr(e){return e.input?.controls??{}}var Bd=["auto","on","off"];var Ha={previous:["M15 5 L8.5 12 L15 19"],next:["M9 5 L15.5 12 L9 19"],up:["M5 15 L12 8.5 L19 15"],down:["M5 9 L12 15.5 L19 9"],pin:["M14.5 3 L21 9.5 L15 13.5 L14.4 21 L3 9.6 L10.5 9 Z","M8.7 15.3 L3.2 20.8"],expand:["M4 9 V4 H9 M20 9 V4 H15 M4 15 V20 H9 M20 15 V20 H15"],collapse:["M9.5 4 V9.5 H4 M14.5 4 V9.5 H20 M9.5 20 V14.5 H4 M14.5 20 V14.5 H20"],heart:["M12 20 C12 20 4 15.1 4 9.8 A4.1 4.1 0 0 1 12 7.9 A4.1 4.1 0 0 1 20 9.8 C20 15.1 12 20 12 20 Z"],share:["M21 3 L14.6 21 L10.6 12.9 M21 3 L3 10.5 L10.6 12.9 M21 3 L10.6 12.9"],pause:["M9.6 6.6 V17.4 M14.4 6.6 V17.4"],play:["M9.2 6.1 L18.2 12 L9.2 17.9 Z"],speaker:["M4 9.5 H7.5 L12.5 5.5 V18.5 L7.5 14.5 H4 Z"],sounding:["M16 9.4 A4.2 4.2 0 0 1 16 14.6"],muted:["M16 9.5 L20.5 14.5 M20.5 9.5 L16 14.5"],mixer:["M4 8 H20 M4 12 H20 M4 16 H20"],check:["M5 12.5 L9.5 17 L19 7"],remove:["M7 7 L17 17 M17 7 L7 17"],plus:["M12 5 V19 M5 12 H19"],back:["M14.5 5 L8 12 L14.5 19"],forward:["M9.5 5 L16 12 L9.5 19"],caret:["M6 9.5 L12 15.5 L18 9.5"],thumb:["M7 21 V10.4 L11.6 3.4 C12.9 3.7 13.6 4.7 13.6 6.1 L13.1 10.2 H18.6 C19.9 10.2 20.8 11.4 20.5 12.7 L19 19.4 C18.8 20.4 17.9 21 16.9 21 Z","M3.4 21 H7 V10.4 H3.4 Z"],bookmark:["M6.4 3.6 H17.6 V20.4 L12 16.2 L6.4 20.4 Z"],nodes:["M17.5 3.4 A2.6 2.6 0 1 0 17.5 8.6 A2.6 2.6 0 1 0 17.5 3.4 Z","M6.5 9.4 A2.6 2.6 0 1 0 6.5 14.6 A2.6 2.6 0 1 0 6.5 9.4 Z","M17.5 15.4 A2.6 2.6 0 1 0 17.5 20.6 A2.6 2.6 0 1 0 17.5 15.4 Z","M8.9 10.8 L15.1 7.2 M8.9 13.2 L15.1 16.8"],upload:["M12 19 V5 M6.5 10.5 L12 5 L17.5 10.5","M4 20.5 H20"],game:["M12 3.4 A8.6 8.6 0 1 0 12 20.6 A8.6 8.6 0 1 0 12 3.4 Z","M10.2 8.4 L16 12 L10.2 15.6 Z"],inbox:["M6.2 5.4 H17.8 A2.6 2.6 0 0 1 20.4 8 V16 A2.6 2.6 0 0 1 17.8 18.6 H6.2 A2.6 2.6 0 0 1 3.6 16 V8 A2.6 2.6 0 0 1 6.2 5.4 Z","M3.9 7.2 L12 13 L20.1 7.2"],search:["M10.6 4.4 A6.2 6.2 0 1 0 10.6 16.8 A6.2 6.2 0 1 0 10.6 4.4 Z","M15.2 15.2 L20 20"],you:["M12 4 A3.8 3.8 0 1 0 12 11.6 A3.8 3.8 0 1 0 12 4 Z","M4.8 20 A7.2 7.2 0 0 1 19.2 20"],keyboard:["M5 6 H19 A2 2 0 0 1 21 8 V16 A2 2 0 0 1 19 18 H5 A2 2 0 0 1 3 16 V8 A2 2 0 0 1 5 6 Z","M7 10 H7.01 M10.3 10 H10.31 M13.7 10 H13.71 M17 10 H17.01 M8 14 H16"],phone:["M8.5 3 H15.5 A2 2 0 0 1 17.5 5 V19 A2 2 0 0 1 15.5 21 H8.5 A2 2 0 0 1 6.5 19 V5 A2 2 0 0 1 8.5 3 Z","M11 18 H13"],gamepad:["M7.5 7 H16.5 A4.5 4.5 0 0 1 20.9 10.6 L21.8 15.6 A2.6 2.6 0 0 1 17.3 17.7 L15.6 15.5 H8.4 L6.7 17.7 A2.6 2.6 0 0 1 2.2 15.6 L3.1 10.6 A4.5 4.5 0 0 1 7.5 7 Z","M7.5 9.6 V12.8 M5.9 11.2 H9.1 M15.6 10.4 H15.61 M17.6 12.4 H17.61"],settings:["M12 8.8 A3.2 3.2 0 1 0 12 15.2 A3.2 3.2 0 1 0 12 8.8 Z","M12 5 A7 7 0 1 0 12 19 A7 7 0 1 0 12 5 Z","M19 12 H21.2 M16.6 4 L15.5 5.9 M7.4 4 L8.5 5.9 M5 12 H2.8 M7.4 20 L8.5 18.1 M16.6 20 L15.5 18.1"]},_y={discord:"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"};var qa=["pad.right.south","pad.right.east","pad.right.west","pad.right.north","pad.left.bumper","pad.right.bumper","pad.left.trigger","pad.right.trigger","pad.select","pad.start",null,null,"pad.left.north","pad.left.south","pad.left.west","pad.left.east"];function Lt(e,t){if(e.startsWith("key."))return VE(e.slice(4));if(e==="mouse.left")return"Click";if(e==="mouse.right")return"Right click";if(e==="mouse.middle")return"Middle click";if(e==="touch.tap")return"Tap";if(e==="pointer.primary")return t==="touch"?"Tap":"Click";if(e==="pointer.secondary")return"Right click";if(!e.startsWith("pad."))return"";let n=e.slice(4).split("."),[o,r]=n;if(n.length===1)return o==="start"?"Start":o==="select"?"Select":zy[o]??"";if(o==="left"&&r!==void 0){let i=BE[r];return i!==void 0?i:r==="bumper"?"LB":r==="trigger"?"LT":""}if(o==="right"&&r!==void 0){let i=zy[r];return i!==void 0?i:r==="bumper"?"RB":r==="trigger"?"RT":""}return""}var zy={south:"A",east:"B",west:"X",north:"Y"},BE={north:"\\u2191",south:"\\u2193",west:"\\u2190",east:"\\u2192"};function VE(e){return e.startsWith("Key")&&e.length===4?e.slice(3):e.startsWith("Digit")&&e.length===6?e.slice(5):e.startsWith("Numpad")?`Num ${e.slice(6)}`:{ArrowUp:"\\u2191",ArrowDown:"\\u2193",ArrowLeft:"\\u2190",ArrowRight:"\\u2192",Space:"Space",Enter:"Enter",Tab:"Tab",Backspace:"Backspace",ShiftLeft:"Shift",ShiftRight:"Shift",ControlLeft:"Ctrl",ControlRight:"Ctrl",AltLeft:"Alt",AltRight:"Alt"}[e]??e}var YE={top:0,right:0,bottom:0,left:0};function Rs(e,t,n={}){let o={...YE};if(t.width<=0||t.height<=0)return o;let r=n.only==="strips";for(let i of e){if(!i.reserved)continue;let a=ZE(i.rect,t);if(a===null||r&&!FE(a,t))continue;let l=[["top",a.y+a.height,t.width],["bottom",t.height-a.y,t.width],["left",a.x+a.width,t.height],["right",t.width-a.x,t.height]],s=l[0];for(let u of l)u[1]*u[2]<s[1]*s[2]&&(s=u);o[s[0]]=Math.max(o[s[0]],s[1])}return o}var Os=1;function FE(e,t){return e.x<=Os&&e.x+e.width>=t.width-Os||e.y<=Os&&e.y+e.height>=t.height-Os}function ZE(e,t){let n=Math.max(0,e.x),o=Math.max(0,e.y),r=Math.min(t.width,e.x+e.width),i=Math.min(t.height,e.y+e.height);return r<=n||i<=o?null:{x:n,y:o,width:r-n,height:i-o}}var o$=Object.freeze({isOpen:!1,page:null});var c$=Object.freeze({known:!1});var p$=Object.freeze({known:!1});var tM={top:0,right:0,bottom:0,left:0};function Cs(e,t){let n=[];t.rail&&n.push({rect:t.rail,kind:"chrome",reserved:!0}),t.bar&&n.push({rect:t.bar,kind:"chrome",reserved:!1}),t.cutout&&n.push({rect:t.cutout,kind:"cutout",reserved:!0}),t.panel&&n.push({rect:t.panel,kind:"overlay",reserved:!1});let o={width:e.width,height:e.height},r=t.reserve?Rs(n,o):tM,i={x:e.x+r.left,y:e.y+r.top,width:e.width-r.left-r.right,height:e.height-r.top-r.bottom};return{box:i,insets:r,layout:{frame:{width:Math.round(i.width),height:Math.round(i.height)},obstructions:n.map(a=>({...a,rect:{x:a.rect.x-i.x,y:a.rect.y-i.y,width:a.rect.width,height:a.rect.height}}))}}}var TN=9/19.5;function Xd(e,t){let n=2166136261;for(let o of`${e}:${t}`)n=Math.imul(n^o.charCodeAt(0),16777619);return`p-${(n>>>0).toString(16).padStart(8,"0")}`}function Wd(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",n="",o=0,r=0;for(let i of e)for(o=o<<8|i,r+=8;r>=6;)r-=6,n+=t[o>>r&63];return r>0&&(n+=t[o<<6-r&63]),n}var Yd=12,Ps="Link copied";function Fd(e,t){if(Math.abs(e.dx)<8&&Math.abs(e.dy)<8)return{kind:"press"};if(t===null)return{kind:"none"};let n=t==="x"?e.dx:e.dy,o=t==="x"?e.dy:e.dx,r=t==="x"?e.vx:e.vy;if(Math.abs(o)>Math.abs(n)*1.5)return o<=-40?{kind:"open"}:{kind:"none"};let i=Math.abs(n)>40,a=Math.abs(r)>350;return!i&&!a?{kind:"none"}:{kind:"travel",by:(i?n:r)<0?1:-1}}function _s(e){let{size:t,precise:n,hovers:o}=e;return n&&o&&t.width>=900?"desktop":t.height>=t.width?"portrait":"landscape"}function Ga(e){return e==="portrait"?"x":e==="landscape"?"y":null}var Rn=[.44,.72],Zd=[0,...Rn],Iy=26,zs=.32,Kd=1.9,Qd=.995,Jd=.03,ef=.19,jy=170,Hy=420,qy=450,tf=24;function nf(e,t,n){if(n<=0)return 0;let o=e-t*ef,r=Zd[0];for(let i of Zd)Math.abs(i*n-o)<Math.abs(r*n-o)&&(r=i);return r}function $s(e,t){let n=Math.max(Math.abs(t),qy);return Math.max(jy,Math.min(Hy,Math.abs(e)/n*1e3))}function of(e,t,n){return e+t*ef>n/2}function Ua(e,t){return Math.min(Iy,e+t*zs)}function Ns(e,t){let n=Math.min(t,e/zs);return{spent:n,left:e-n*zs}}function rf(e,t){return t?"hidden":e}var Gy={38:["#6e3f30","#522c20"],96:["#584d1b","#41380d"],152:["#2d583a","#1d4128"],155:["#2a583c","#1b412a"],205:["#05585f","#004147"],265:["#3a4c73","#293757"],288:["#4b4771","#363355"],330:["#633f5f","#492c47"]},Pr=155;function _r(e){return Gy[e]??Gy[265]}function zr(e,t){return`repeating-linear-gradient(135deg, ${e} 0 7px, ${t} 7px 14px)`}function $r(e){return new Intl.NumberFormat("en",e<1e4?{}:{notation:"compact",maximumFractionDigits:1}).format(e)}function Dt(e,t,n=`${t}s`){return`${$r(e)} ${e===1?t:n}`}function Zt(e,t){if(t==="duration-ms"){let n=Math.max(0,Math.round(e)),o=Math.floor(n/6e4),r=Math.floor(n%6e4/1e3),i=Math.floor(n%1e3/10),a=`${String(r).padStart(2,"0")}.${String(i).padStart(2,"0")}`;return o>0?`${o}:${a}`:a}return t==="decimal"?e.toFixed(2):Math.round(e).toLocaleString()}var af=["daily","weekly","monthly"],lf={follow:!0,game:!0,record:!0,recap:"weekly"};function sf(e){let t=e.actor===null?"Someone":`@${e.actor.handle}`;switch(e.kind){case"follow":{let n=e.count-1,o=n===0?"":` and ${n} ${n===1?"other":"others"}`;return{title:`${t}${o} followed you`,body:null}}case"game":return{title:`${t} published ${e.game?.title??"a game"}`,body:"You follow this creator."};case"collaborator":return{title:`${t} added you to ${e.game?.title??"a game"}`,body:"You can publish new versions of it."};case"recap":return nM(e.recap);case"record":{let n=e.game?.title??"a game",o=e.record;return o===null?{title:`${t} passed you on ${n}`,body:null}:{title:`${t} passed you on ${n}`,body:`${Zt(o.value,o.format)} on ${o.title} \\u2014 you\'re now ${Uy(o.rank)}.`}}}}function Ls(e){return e.cadence==="daily"?"Yesterday\\u2019s top games":e.cadence==="weekly"?"Last week\\u2019s top games":`${new Date(e.starts).toLocaleString("en-GB",{month:"long",timeZone:"UTC"})}\\u2019s top games`}function nM(e){if(e===null)return{title:"Top games",body:null};let t=e.games.map(i=>i.title),n=t.slice(0,2),o=t.length-n.length,r=t.length===0?null:o===0?`${n.join(" and ")}.`:`${n.join(", ")} and ${o} more.`;return{title:Ls(e),body:r}}function Uy(e){let t=e%100,n=t>=11&&t<=13?"th":{1:"st",2:"nd",3:"rd"}[e%10]??"th";return`${e}${n}`}function uf(e){switch(e.kind){case"follow":return e.count===1&&e.actor!==null?{creator:e.actor.handle}:{you:!0};case"game":case"collaborator":return e.game===null?{you:!0}:{game:e.game.id};case"recap":return e.recap===null?{you:!0}:{recap:e.recap.id};case"record":return e.game===null?{you:!0}:e.record===null?{game:e.game.id}:{game:e.game.id,board:e.record.board}}}var cf=["broken","offensive","spam","other"],df={broken:"It doesn\\u2019t work",offensive:"Offensive or inappropriate",spam:"Spam or misleading",other:"Something else"},ff=500;var By="Hopple",Ds={path:"/og.png",width:1200,height:630},rM={title:By,description:"A scrolling feed of small web games. Swipe, and the next game is already running.",image:Ds.path,imageAlt:"The Hopple logo",imageSize:{width:Ds.width,height:Ds.height}};function wi(e){return e.slice(0,100).toLowerCase().split(/\\s+/).filter(t=>t!=="").slice(0,8)}function jo(e,t=Object.is){let n=e,o=new Set;return{get:()=>n,set(r){if(!t(r,n)){n=r;for(let i of[...o])i()}},on(r){return o.add(r),()=>o.delete(r)}}}function iM(e){let t=r=>new Date(e-r).toISOString(),n=r=>({handle:r,displayName:null,avatar:null}),o=(r,i,a)=>({id:r,owner:i,name:r,title:a});return[{id:"fixture-record",kind:"record",at:t(4*6e4),read:!1,count:1,actor:n("fennwick"),game:o("tidal-drift","moonbuoy","Tidal Drift"),record:{board:"main",title:"High score",value:18905,format:"integer",rank:2},recap:null},{id:"fixture-game",kind:"game",at:t(3*36e5),read:!1,count:1,actor:n("hako.studio"),game:o("nine-lanterns-ii","hako.studio","Nine Lanterns II"),record:null,recap:null},{id:"fixture-follow",kind:"follow",at:t(5*36e5),read:!1,count:3,actor:n("moonbuoy"),game:null,record:null,recap:null},{id:"fixture-recap",kind:"recap",at:t(2*864e5),read:!0,count:1,actor:null,game:null,record:null,recap:{id:"fixture-recap",cadence:"weekly",starts:t(9*864e5),ends:t(2*864e5),games:[{...o("nine-lanterns","hako.studio","Nine Lanterns"),plays:1204},{...o("tidal-drift","moonbuoy","Tidal Drift"),plays:860},{...o("kiln","sorrel","Kiln"),plays:412}]}},{id:"fixture-follow-older",kind:"follow",at:t(5*864e5),read:!0,count:1,actor:n("field.notes"),game:null,record:null,recap:null}]}function Vy(){let e=iM(Date.now()),t={...lf},n=()=>e.filter(r=>!r.read).length,o=jo(n());return{page:()=>Promise.resolve({entries:e,next:null}),markRead(r){return e=e.map(i=>i.id===r?{...i,read:!0}:i),o.set(n()),Promise.resolve()},markAllRead(){return e=e.map(r=>({...r,read:!0})),o.set(n()),Promise.resolve()},unread:o,prefs:()=>Promise.resolve(t),setPrefs(r){return t={...t,...r},Promise.resolve(t)}}}var pf=[{id:"fixture-lanterns",title:"Nine Lanterns",owner:"hako.studio",name:"nine-lanterns",plays:1204e3,likes:48e3,publishedAt:"2024-03-02T00:00:00.000Z",picture:null},{id:"fixture-kiln",title:"Kiln",owner:"sorrelworks",name:"kiln",plays:88e3,likes:3100,publishedAt:"2024-05-11T00:00:00.000Z",picture:null},{id:"fixture-relay",title:"Relay",owner:"field.notes",name:"relay",plays:36e3,likes:900,publishedAt:"2024-06-20T00:00:00.000Z",picture:null},{id:"fixture-drift",title:"Tidal Drift",owner:"moonbuoy",name:"tidal-drift",plays:412e3,likes:12e3,publishedAt:"2023-12-01T00:00:00.000Z",picture:null},{id:"fixture-paper-kite",title:"Paper Kite",owner:"you",name:"paper-kite",plays:2100,likes:140,publishedAt:"2024-07-04T00:00:00.000Z",picture:null},{id:"fixture-undertow",title:"Undertow",owner:"quill",name:"undertow",plays:640,likes:22,publishedAt:"2024-08-15T00:00:00.000Z",picture:null}],aM=[{handle:"hako.studio",name:"Hako Studio",picture:null,followed:!0},{handle:"sorrelworks",name:"Sorrel Works",picture:null,followed:!1},{handle:"field.notes",name:null,picture:null,followed:!1},{handle:"moonbuoy",name:"Moon Buoy",picture:null,followed:!0},{handle:"quill",name:null,picture:null,followed:!1}];async function mf(e){let t=wi(e),n=(...i)=>{let a=i.join(" ").toLowerCase();return t.length>0&&t.every(l=>a.includes(l))},o=pf.filter(i=>n(i.title,i.name,i.owner)).sort((i,a)=>Number(n(a.title))-Number(n(i.title))||a.plays-i.plays),r=aM.filter(i=>n(i.handle,i.name??""));return{games:o,people:r,next:null}}var Xy=[["Paper Kite","2.1k plays \\xB7 4.3 rating","live"],["Undertow","\\u2014","draft"]],Wy=[["Tidal Drift","@moonbuoy \\xB7 played 4m ago"],["Kiln","@sorrelworks \\xB7 played 1h ago"],["Nine Lanterns","@hako.studio \\xB7 played 3h ago"]],Yy=[{name:"Public profile",hint:"Let others see what you have played.",on:!0},{name:"Show my handle on boards",hint:"Off means you appear as a player number.",on:!0}],Is=[["312","followers"],["47","badges"],["9","records"]],Fy="Small games about water, released when they are done.";function gt(e){return[205,38,288,152,96,330][e%6]}var Zy={email:"Email",google:"Google",github:"GitHub",apple:"Apple"};function Ky(e){return[...e.joinedAt==null?[]:[`joined ${new Date(e.joinedAt).getUTCFullYear()}`],...e.played==null?[]:[`${Dt(e.played.games,"game")} played`]]}var Qy={live:"Live",waiting:"Waiting for review",rejected:"Turned down",offline:"Not in the feed"};function lM(e){return e.name??`@${e.handle}`}function Jy(e){let t=e.people.slice(0,e.count===3&&e.people.length===3?3:2).map(lM),n=e.count-t.length;return n>0?`Followed by ${t.join(", ")} and ${Dt(n,"other")}`:t.length<=1?`Followed by ${t.join("")}`:`Followed by ${t.slice(0,-1).join(", ")} and ${t.at(-1)}`}var ev=5,Ba=20;function hf(e,t=ev){return[...e].sort((n,o)=>(o.score??-1/0)-(n.score??-1/0)||o.plays-n.plays||o.likes-n.likes||Date.parse(o.publishedAt)-Date.parse(n.publishedAt)).slice(0,t)}function gf(e){let t=e.trim().split(/\\s+/),n=t.at(-1)??"",o=n.replace(/[^\\p{Letter}\\p{Number}]/gu,"").length;return t.length<2||o<3?[e,null]:[t.slice(0,-1).join(" "),n]}function tv(e){let t=Object.keys(e),n=new Map,o={declared:e,report(i){let a=e[i.id],l=n.get(i.id),s=i.unlock?a?.progress?.target:i.progress,u=a===void 0||s===void 0?l?.progress:Gd(a,l?.progress,s),f=l?.unlocked===!0,m=f||i.unlock||a!==void 0&&u!==void 0&&qd(a,u);return n.set(i.id,{unlocked:m,...m?{at:l?.at??i.at}:{},...u===void 0?{}:{progress:u}}),{unlocked:m,earned:m&&!f,...u===void 0?{}:{progress:u}}},state:()=>r()};function r(){let i={};for(let[a,l]of n)i[a]=l;return i}return{store:o,reset:()=>n.clear(),state:r,ids:()=>t,entries(){return t.map(i=>{let a=n.get(i);return{id:i,declared:e[i],unlocked:a?.unlocked===!0,...a?.at===void 0?{}:{at:new Date(a.at).toISOString()},...a?.progress===void 0?{}:{progress:a.progress}}})},tally(){let i=0;for(let a of t)n.get(a)?.unlocked===!0&&(i+=1);return{have:i,of:t.length}}}}var js=40,nv=["pixel","turbo","neon","quiet","lucky","brass","velvet","rapid","amber","hollow","silver","crooked","rusty","polar","gentle","iron"],ov=["fox","comet","otter","anvil","moth","harbour","lantern","sparrow","thistle","compass","ferret","beacon","walnut","kestrel","domino","pylon"];function uM(e){for(let t=0;t<40;t+=1){let n=`${nv[Math.floor(Math.random()*nv.length)]}-${ov[Math.floor(Math.random()*ov.length)]}`;if(!e.has(n))return e.add(n),n}return`player-${e.size+1}`}function rv(e,t){let n=Object.keys(e),o=new Map,r=new Map;function i(p){return e[p]?.direction??"desc"}function a(p){o.clear();for(let g of n){let S=Math.min(p.low,p.high),y=Math.max(p.low,p.high),h=new Set,d=[];for(let v=0;v<js;v+=1)d.push({value:Math.round(S+Math.random()*(y-S)),name:uM(h)});o.set(g,d)}}a(t);function l(p){let g=r.get(p);if(g===void 0||g.length===0)return null;let S=i(p);return g.reduce((y,h)=>Tr(S,h,y)?h:y,g[0])}function s(p,g){let S=o.get(p)??[],y=i(p);return{rank:S.filter(d=>Tr(y,d.value,g)).length+1,of:S.length+1}}function u(p){let g=l(p);return g===null?null:{best:g,at:Date.now(),runs:r.get(p)?.length??0,...s(p,g)}}let f={boards:e,submit(p){let g=r.get(p.board)??[],S=l(p.board);g.push(p.value),r.set(p.board,g);let y=l(p.board)??p.value;return{improved:S===null||Tr(i(p.board),p.value,S),best:y,...s(p.board,y)}},standing(){return m()}};function m(){let p={};for(let g of n){let S=u(g);S!==null&&(p[g]=S)}return p}function c(p){let g=i(p),S=(o.get(p)??[]).map(b=>({value:b.value,you:!1,name:b.name})),y=l(p);y!==null&&S.push({value:y,you:!0}),S.sort((b,T)=>g==="asc"?b.value-T.value:T.value-b.value);let h=0,d=0,v=null;return S.map(b=>(d+=1,(v===null||b.value!==v)&&(h=d),v=b.value,{rank:h,value:b.value,you:b.you,...b.name===void 0?{}:{name:b.name,handle:b.name}}))}return{store:f,reroll:a,clearMine:()=>r.clear(),standing:m,boards:()=>n,table:c}}function Rt(e){let t=typeof e=="number"?e:Date.parse(e);if(Number.isNaN(t))return"";let n=Math.max(0,Math.round((Date.now()-t)/1e3));if(n<60)return"just now";let o=Math.round(n/60);if(o<60)return`${o}m ago`;let r=Math.round(o/60);if(r<24)return`${r}h ago`;let i=Math.round(r/24);return i<7?`${i}d ago`:i<30?`${Math.floor(i/7)}w ago`:i<365?`${Math.max(1,Math.floor(i/30.44))}mo ago`:`${Math.floor(i/365.25)}y ago`}var vf=[{id:"all",label:"All time"},{id:"week",label:"This week"},{id:"day",label:"Today"}];function iv(e){return e.of<=1?"first here":`#${e.rank.toLocaleString()} of ${e.of.toLocaleString()}`}var bf=[{id:"global",label:"Global"},{id:"friends",label:"Friends"},{id:"country",label:"Your country"},{id:"near",label:"Around me"}];function Hs(e){return e===void 0||e===""?"\\u2014":e}function av(e){return e>0?`No score yet. ${e.toLocaleString()} ${e===1?"person has":"people have"} played.`:"No score yet. Be the first."}function lv(e){let t=Rt(e.at);return`${e.runs.toLocaleString()} run${e.runs===1?"":"s"}`+(t===""?"":` \\xB7 best ${t}`)}var xf=[{id:"all",label:"All",keep:()=>!0},{id:"unlocked",label:"Unlocked",keep:e=>e.unlocked},{id:"left",label:"In progress",keep:e=>!e.unlocked}];function sv(e){let t=e.filter(o=>o.unlocked),n=e.filter(o=>!o.unlocked);return t.sort((o,r)=>Date.parse(r.at??"")-Date.parse(o.at??"")||0),[...t,...n]}function uv(e,t){if(e.progress===void 0)return 0;if(t===0)return e.progress===0?1:0;let n=Or(e.declared)==="asc"?e.progress===0?1:t/e.progress:e.progress/t;return Math.max(0,Math.min(1,n))}function cv(e){let t=e.declared.progress;return e.unlocked?"unlocked":t===void 0?"locked":`${Math.round(Math.min(e.progress??0,t.target)/t.target*100)}%`}function dv(e,t){let n=e.declared.progress?.format??"integer",o=Ud(e.declared,e.progress),r=e.declared.progress?.tiers?.[o-1];return(e.progress===void 0?`not started \\xB7 ${Zt(t,n)} to go`:`${Zt(e.progress,n)} / ${Zt(t,n)}`)+(r===void 0?"":` \\xB7 ${r.title}`)}function fv(e){return e.length===0?0:e.filter(t=>t.unlocked).length/e.length}function pv(e){let t=e?.title??"";return t===""?"Achievement unlocked":`Achievement \\u2014 ${t}`}function qs(e,t){return e?.icon??(t?"\\u2605":"\\u2606")}function kf(e,t){return{...e,report(n){let o=e.report(n),r=i=>{if(i.earned)try{let a=e.declared?.[n.id];t(pv(a),qs(a,!0))}catch{}return i};return o instanceof Promise?o.then(r):r(o)}}}var mv="http://www.w3.org/2000/svg";function Jn(e,t,n={}){let o=n.size??20,r=e.createElementNS(mv,"svg");r.setAttribute("width",String(o)),r.setAttribute("height",String(o)),r.setAttribute("viewBox","0 0 24 24"),r.setAttribute("fill","none"),r.setAttribute("stroke","currentColor"),r.setAttribute("stroke-width","1.7"),r.setAttribute("stroke-linecap","round"),r.setAttribute("stroke-linejoin","round"),r.setAttribute("aria-hidden","true"),r.classList.add("gb-icon");for(let[i,a]of Ha[t].entries()){let l=e.createElementNS(mv,"path");l.setAttribute("d",a),i===0&&n.filled===!0&&l.setAttribute("fill","currentColor"),r.appendChild(l)}return r}function Sf(e,t,n={}){let o=e.ownerDocument,r=Jn(o,t,n);return e.querySelector("svg.gb-icon")?.remove(),e.insertBefore(r,e.firstChild),r}function Kt(e,t){let n=e.createElement("button");n.type="button",n.className="gb-button",n.dataset.size=t.size??"touch",n.title=t.label,n.appendChild(Jn(e,t.icon,cM(t))),n.dataset.glyph=`${t.icon}${t.filled===!0?":filled":""}`;let o=e.createElement("span");return o.className="gb-sr-only",o.textContent=t.label,n.appendChild(o),t.pressed!==void 0&&Va(n,t.pressed),t.expanded!==void 0&&hv(n,t.expanded),n.disabled=t.disabled??!1,n.addEventListener("click",()=>t.onClick()),n}function eo(e,t){if(t.label!==void 0){e.title=t.label;let r=e.querySelector(".gb-sr-only");r!==null&&(r.textContent=t.label)}if(t.icon===void 0)return;let n=e.dataset.glyph,o=`${t.icon}${t.filled===!0?":filled":""}`;n!==o&&(e.dataset.glyph=o,Sf(e,t.icon,{size:dM(e),...t.filled===void 0?{}:{filled:t.filled}}))}function Va(e,t){e.setAttribute("aria-pressed",String(t))}function hv(e,t){e.setAttribute("aria-expanded",String(t))}var gv={touch:20,hint:20,fine:17};function cM(e){return{size:gv[e.size??"touch"],...e.filled===void 0?{}:{filled:e.filled}}}function dM(e){return gv[e.dataset.size??"touch"]}function wf(e,t={}){let n=t.msOf??(a=>fM(e,a)),o=new Set,r=new Map;function i(a){if(r.delete(a),!(r.size>0))for(let l of[...o])l()}return{get moving(){return r.size>0},moves(a){let l=r.get(a);l!==void 0&&e.clearTimeout(l),r.set(a,e.setTimeout(()=>i(a),Math.max(0,n(a))))},on(a){return o.add(a),()=>o.delete(a)},dispose(){for(let a of r.values())e.clearTimeout(a);r.clear(),o.clear()}}}function fM(e,t){let n=e.getComputedStyle(t);return yv(n.transitionDuration)+yv(n.transitionDelay)}function yv(e){let t=0;for(let n of e.split(",")){let o=n.trim();if(o==="")continue;let r=Number.parseFloat(o);Number.isFinite(r)&&(t=Math.max(t,o.endsWith("ms")?r:r*1e3))}return t}var pM={holdMs:600,repeatDelayMs:400,repeatMs:110},mM=0,hM=1,gM=4,yM=5,vM=6,bM=7,Af=9,xM=12,kM=13,SM=14,wM=15,AM=16,EM=.5,vv=.2,bv=1400,MM=50;function Sv(e=pM){let t=[],n=null,o=null,r=0,i=null;return{read(a,l,s){let u=TM(a),f=p=>u[p]===!0&&t[p]!==!0,m=[],c=i===null?0:Math.min(l-i,MM);if(i=l,f(AM)&&m.push({kind:"toggle"}),u[Af]!==!0?n=null:s==="open"?(f(Af)&&m.push({kind:"close"}),n=null):f(Af)?n=l:n!==null&&l-n>=e.holdMs&&(m.push({kind:"toggle"}),n=null),s==="open"){f(mM)&&m.push({kind:"activate"}),f(hM)&&m.push({kind:"back"}),f(gM)&&m.push({kind:"tab",by:-1}),f(yM)&&m.push({kind:"tab",by:1}),f(vM)&&m.push({kind:"part",by:-1}),f(bM)&&m.push({kind:"part",by:1});let p=OM(u,xv(a,0));p===null?o=null:p!==o?(o=p,r=l+e.repeatDelayMs,m.push({kind:"move",to:p})):l>=r&&(r=l+e.repeatMs,m.push({kind:"move",to:p}));let[g,S]=xv(a,1),y=kv(g)*bv*(c/1e3),h=kv(S)*bv*(c/1e3);(y!==0||h!==0)&&m.push({kind:"scroll",x:y,y:h})}else o=null;return t=u,m}}}function TM(e){let t=[];for(let n of e)for(let[o,r]of n.buttons.entries())r&&(t[o]=!0);return t}function xv(e,t){let n=[0,0];for(let o of e){let r=o.axes[t*2]??0,i=o.axes[t*2+1]??0;Math.hypot(r,i)>Math.hypot(n[0],n[1])&&(n=[r,i])}return n}function OM(e,[t,n]){return e[xM]===!0?"up":e[kM]===!0?"down":e[SM]===!0?"left":e[wM]===!0?"right":Math.max(Math.abs(t),Math.abs(n))<EM?null:Math.abs(t)>Math.abs(n)?t<0?"left":"right":n<0?"up":"down"}function kv(e){let t=Math.abs(e)-vv;if(t<=0)return 0;let n=t/(1-vv);return Math.sign(e)*n*n}var wv=\'button, a[href], input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"]), [contenteditable="true"]\',RM=1e3,CM=[[[Lt("pad.right.south","gamepad")],"Select"],[[Lt("pad.right.east","gamepad")],"Back"],[[Lt("pad.left.bumper","gamepad"),Lt("pad.right.bumper","gamepad")],"Tabs"],[[Lt("pad.left.trigger","gamepad"),Lt("pad.right.trigger","gamepad")],"Views"],[[Lt("pad.start","gamepad")],"Close"]];function Av(e){let{scope:t,sheet:n}=e,o=t,r=t.document,i=r.body,a=Sv(),l=[],s=null,u=null,f=!1,m=!1,c=null,p=null,g=_M(r);n.element.appendChild(g);function S($,j,oe,ce=!1){$.addEventListener(j,oe,ce),l.push(()=>$.removeEventListener(j,oe,ce))}function y(){if(m)return[];try{return(t.navigator.getGamepads?.()??[]).filter($=>$!==null&&$.connected)}catch{return m=!0,[]}}function h($){return{buttons:$.mapping==="standard"?$.buttons.map(oe=>oe.pressed):[],axes:$.axes}}function d($){s=null;let j=y();if(j.length===0){b();return}p!==null&&n.isOpen&&Oe();for(let oe of a.read(j.map(h),$,n.isOpen?"open":"shut"))T(oe);s=t.requestAnimationFrame(d)}function v(){u!==null&&t.clearInterval(u),u=null,!f&&!n.isOpen&&(f=!0,e.hint(`Hold ${Lt("pad.start","gamepad")} for Hopple`)),s===null&&(s=t.requestAnimationFrame(d))}function b(){s!==null&&t.cancelAnimationFrame(s),s=null,!(m||u!==null)&&(u=t.setInterval(()=>{y().length>0?v():m&&u!==null&&(t.clearInterval(u),u=null)},RM))}function T($){let j=M();if(j==="gamepad"){$.kind==="toggle"&&E();return}if(j!==null){($.kind==="toggle"||$.kind==="back")&&E();return}switch($.kind!=="scroll"&&he(!0),$.kind){case"toggle":n.isOpen?n.close():(p="resume",e.open());return;case"close":n.close();return;case"back":E();return;case"activate":{let oe=A();oe===null?p="resume":oe.click();return}case"move":L($.to);return;case"tab":_e(n.foot.querySelector(\'[role="tablist"]\'),$.by)&&(p="top");return;case"part":_e(O(),$.by)&&(p="part");return;case"scroll":zt(A()??n.body).scrollBy({left:$.x,top:$.y});return}}function O(){return n.head.querySelector(\'[role="tablist"]\')??n.body.querySelector(\'[role="tablist"]\')}function A(){let $=r.activeElement;return $===null||$===n.element?null:R($)&&Ai($)?$:null}function R($){return e.parts().some(j=>j.contains($))}function M(){return n.element.querySelector("[data-gb-capture]")?.getAttribute("data-gb-capture")??null}function E(){(A()??(r.activeElement===n.element?n.element:r.body)).dispatchEvent(new o.KeyboardEvent("keydown",{key:"Escape",code:"Escape",bubbles:!0,cancelable:!0}))}function L($){let j=A();if(j===null){p="resume";return}if(j.tagName==="INPUT"&&j.type==="range"&&($==="left"||$==="right")){z(j,$==="right"?1:-1);return}let oe=xe(j,$,B());oe!==null&&Fe(oe)}function z($,j){let oe=Number($.max||100)-Number($.min||0),ce=Math.max(1,Math.round(oe/20/Number($.step||1)));j>0?$.stepUp(ce):$.stepDown(ce),$.dispatchEvent(new o.Event("input",{bubbles:!0})),$.dispatchEvent(new o.Event("change",{bubbles:!0}))}function B(){let $=[];for(let j of e.parts()){j.matches(wv)&&Ai(j)&&$.push(j);for(let oe of j.querySelectorAll(wv))Ai(oe)&&$.push(oe)}return $}function Oe(){let $=p,j=B();if(j.length===0)return;if(p=null,$==="part"){let ce=O()?.querySelector(\'[role="tab"][aria-selected="true"]\')??null;if(ce!==null&&Ai(ce))return Fe(ce)}if($==="resume"&&c!==null&&c.isConnected&&Ai(c)&&R(c))return Fe(c);let oe=j.find(ce=>n.body.contains(ce)&&ke(ce,null)!==null);Fe(oe??j[0])}function Fe($){$.focus({preventScroll:!0}),$.scrollIntoView?.({block:"nearest",inline:"nearest"})}function _e($,j){if($===null)return!1;let oe=[...$.querySelectorAll(\'[role="tab"]\')].filter(Ai),ce=oe.findIndex(On=>On.getAttribute("aria-selected")==="true"),$t=oe[ce+j];return ce<0||$t===void 0?!1:($t.click(),!0)}function he($){$?i.dataset.pad="on":delete i.dataset.pad}let Ft=$=>{$.isTrusted&&he(!1)};return S(r,"keydown",Ft,!0),S(r,"pointerdown",Ft,!0),S(r,"focusin",$=>{let j=$.target;j!==null&&j!==n.element&&R(j)&&(c=j)}),S(t,"gamepadconnected",()=>v()),S(t,"gamepaddisconnected",()=>{y().length===0&&b()}),y().length>0?v():b(),{dispose(){s!==null&&t.cancelAnimationFrame(s),s=null,u!==null&&t.clearInterval(u),u=null;for(let $ of l.splice(0))$();he(!1),g.remove()}};function xe($,j,oe){let ce=new Set([$]);for(let $t of[...Ot($),null]){let On=ke($,$t)??$.getBoundingClientRect(),hi=null,ms=1/0;for(let No of oe){if(ce.has(No)||$t!==null&&!$t.contains(No))continue;ce.add(No);let N=ke(No,$t);if(N===null)continue;let Q=PM(On,N,j);Q<ms&&(ms=Q,hi=No)}if(hi!==null)return hi}return null}function Ot($){let j=[];for(let oe=$.parentElement;oe!==null&&oe!==i;oe=oe.parentElement){let ce=t.getComputedStyle(oe);if(/(auto|scroll)/.test(`${ce.overflowX} ${ce.overflowY}`)&&j.push(oe),e.parts().includes(oe))break}return j}function zt($){return Ot($).find(j=>j.scrollHeight>j.clientHeight)??n.body}function ke($,j){let oe=$.getBoundingClientRect(),ce={left:oe.left,top:oe.top,right:oe.right,bottom:oe.bottom};for(let $t of Ot($)){if($t===j)break;let On=$t.getBoundingClientRect();ce={left:Math.max(ce.left,On.left),top:Math.max(ce.top,On.top),right:Math.min(ce.right,On.right),bottom:Math.min(ce.bottom,On.bottom)}}return ce.right-ce.left>0&&ce.bottom-ce.top>0?ce:null}}function PM(e,t,n){let o=n==="up"||n==="down",r=o?(e.top+e.bottom)/2:(e.left+e.right)/2,i=o?(t.top+t.bottom)/2:(t.left+t.right)/2,a=n==="down"||n==="right"?1:-1;if((i-r)*a<=.5)return 1/0;let l=n==="down"?t.top-e.bottom:n==="up"?e.top-t.bottom:n==="right"?t.left-e.right:e.left-t.right,s=o?Math.max(0,t.left-e.right,e.left-t.right):Math.max(0,t.top-e.bottom,e.top-t.bottom),u=Math.abs(o?(t.left+t.right)/2-(e.left+e.right)/2:(t.top+t.bottom)/2-(e.top+e.bottom)/2);return Math.max(l,0)+s*2+u/100}function Ai(e){if(e.disabled===!0||e.closest(\'[hidden], [inert], [aria-hidden="true"]\')!==null)return!1;let t=e.checkVisibility;if(typeof t=="function"&&!t.call(e,{visibilityProperty:!0}))return!1;let n=e.getBoundingClientRect();return n.width>0&&n.height>0}function _M(e){let t=e.createElement("div");t.className="gb-padhint",t.setAttribute("aria-hidden","true");for(let[n,o]of CM){let r=e.createElement("span");r.className="gb-padhint-item";for(let i of n){let a=e.createElement("span");a.className="gb-padhint-key",a.textContent=i,r.appendChild(a)}r.appendChild(e.createTextNode(o)),t.appendChild(r)}return t}var Ef=170,Ev=44,zM=3600,$M=.87,NM=.004;function Mf(e,t,n){let o=e.defaultView,r=e.createElement("div");r.className="gb-playback";let i=t.pause.state,a=t.audio.state,l=null,s=null,u=!1,f=Kt(e,{label:"Pause",icon:"pause",onClick:()=>{n?.({event:"rail_clicked",control:i==="paused"?"resume":"pause"}),t.pause.onToggle(i!=="paused")}});f.classList.add("gb-playback-pause");let m=e.createElement("div");m.className="gb-volume";let c=e.createElement("button");c.type="button",c.className="gb-volume-fader",c.dataset.gbDrag="true",c.setAttribute("role","slider"),c.setAttribute("aria-valuemin","0"),c.setAttribute("aria-valuemax","100");let p=e.createElement("div");p.className="gb-volume-fill",p.setAttribute("aria-hidden","true");let g=e.createElement("span");g.className="gb-volume-cap",g.setAttribute("aria-hidden","true"),c.append(p,g);let S=e.createElement("span");S.className="gb-volume-readout",S.setAttribute("aria-hidden","true");let y=Kt(e,{label:"Open the mixer",icon:"mixer",size:"fine",onClick:()=>{T(),n?.({event:"rail_clicked",control:"mixer"}),t.onMixer()}});y.classList.add("gb-volume-mixer"),m.append(c,y,S),r.append(f,m);let h=[];return d(),v(),R(),{element:r,get pause(){return i},setPause(E){i=E,d()},setAudio(E){a=E,v()},dispose(){s!==null&&clearTimeout(s);for(let E of h)E();h.length=0,r.remove()}};function d(){let E=i==="paused";f.hidden=i==="unpausable",eo(f,{label:E?"Resume":"Pause",icon:E?"play":"pause"})}function v(){let E=a.muted?0:a.master,L=l!==null;m.dataset.open=String(L),c.style.setProperty("--gb-volume",String(E)),c.dataset.loud=String(L&&E>=$M),c.setAttribute("aria-valuenow",String(Math.round(E*100))),c.setAttribute("aria-valuetext",a.muted?"Muted":`${Math.round(E*100)}%`),c.title=a.muted?"Unmute":"Mute";let z=c.querySelector(".gb-sr-only");z!==null&&(z.textContent="Volume"),g.replaceChildren(Jn(e,"speaker",{size:20}),Jn(e,a.muted?"muted":"sounding",{size:20})),S.textContent=a.muted?"muted":`${Math.round(E*100)}%`}function b(E){l!==E&&(l=E,v())}function T(){s!==null&&clearTimeout(s),s=null,l!==null&&(l=null,v())}function O(){s!==null&&clearTimeout(s),s=setTimeout(T,zM)}function A(E){let L=Math.min(1,Math.max(0,E)),z=L<=NM;a={...a,master:L,muted:z},v(),t.audio.onChange({master:L,muted:z})}function R(){M(m,"pointerenter",L=>{L.pointerType!=="touch"&&b("pointer")}),M(m,"pointerleave",L=>{L.pointerType!=="touch"&&(u||T())}),M(c,"pointerdown",L=>{let z=L;if(z.button!==0)return;z.preventDefault(),z.stopPropagation();let B=z.pointerType==="touch",Oe=l!==null,Fe=c.getBoundingClientRect(),_e=Fe.width/Ev||1,he=Fe.top+Ef*_e,Ft=z.clientY<Fe.top+Ev*_e,xe=!1;u=!0,b(B?"touch":"pointer"),s!==null&&clearTimeout(s);let Ot=ke=>{let $=ke;$.pointerId===z.pointerId&&(!xe&&Math.abs($.clientY-z.clientY)>4&&(xe=!0),xe&&A((he-$.clientY)/(Ef*_e)))},zt=ke=>{let $=ke;if($.pointerId===z.pointerId){if(u=!1,!xe&&(!B||Oe))if(Ft){let j=!a.muted;a={...a,muted:j},v(),n?.({event:"rail_clicked",control:j?"mute":"unmute"}),t.audio.onChange({muted:j})}else A((he-$.clientY)/(Ef*_e));B&&O(),o?.removeEventListener("pointermove",Ot),o?.removeEventListener("pointerup",zt),o?.removeEventListener("pointercancel",zt)}};o?.addEventListener("pointermove",Ot),o?.addEventListener("pointerup",zt),o?.addEventListener("pointercancel",zt)}),M(c,"keydown",L=>{let z=L.key,B=z==="ArrowUp"||z==="ArrowRight"?.05:z==="ArrowDown"||z==="ArrowLeft"?-.05:null;B===null&&z!=="Home"&&z!=="End"||(L.preventDefault(),b("pointer"),A(z==="Home"?0:z==="End"?1:(a.muted?0:a.master)+(B??0)))}),M(c,"focus",()=>b("pointer")),M(c,"blur",()=>{u||T()});let E=L=>{if(l!=="touch"||u)return;let z=L.target;z!==null&&m.contains(z)||T()};o?.addEventListener("pointerdown",E,!0),h.push(()=>o?.removeEventListener("pointerdown",E,!0))}function M(E,L,z){E.addEventListener(L,z),h.push(()=>E.removeEventListener(L,z))}}function Tf(e){let t=e.createElement("span");return t.className="gb-logo",t.setAttribute("aria-hidden","true"),t}var LM=90,DM=4e3;function Of(e,t){let n=e.createElement("nav");n.className="gb-rail",n.setAttribute("aria-label","Host");let o=e.createElement("div");o.className="gb-rail-group",o.dataset.end="lead";let r=e.createElement("div");r.className="gb-rail-group",r.dataset.end="trail";let i=e.createElement("div");i.className="gb-rail-slot";let a=e.createElement("div");a.className="gb-rail-rest",a.setAttribute("aria-hidden","true");let l=e.createElement("p");l.className="gb-rail-hint",l.hidden=!0;let s=Kt(e,{label:"Details",icon:"mixer",size:"touch",expanded:!1,onClick:()=>t.onToggle()});s.classList.add("gb-rail-trigger"),s.querySelector("svg")?.remove(),s.insertBefore(Tf(e),s.firstChild),n.append(o,r);let u="portrait",f=!1,m=!1,c=!1,p=!1,g=null,S=!0,y=null,h=new Set,d=new Set,v=[];function b(){let z=u!=="desktop"||c||p||f||m||g!==null;if(z!==S){S=z,n.dataset.out=String(S),T();for(let B of[...h])B(S)}}function T(){l.hidden=!(u==="desktop"&&S&&!c&&!p)}function O(z){z.pointerType!=="touch"&&(y!==null&&clearTimeout(y),y=null,f=!0,b())}function A(z){z.pointerType!=="touch"&&(y!==null&&clearTimeout(y),y=setTimeout(()=>{y=null,f=!1,b()},LM))}function R(){if(u==="desktop"){let z=n.parentElement;z!==null&&s.parentElement!==z&&z.insertBefore(s,a.nextSibling);return}s.parentElement!==i&&i.appendChild(s)}function M(z){g!==null&&clearTimeout(g),g=z&&!c?setTimeout(()=>M(!1),DM):null,n.dataset.nudge=String(g!==null),b()}function E(z){z.addEventListener("pointerenter",O),z.addEventListener("pointerleave",A),z.addEventListener("focusin",()=>{m=!0,b()}),z.addEventListener("focusout",B=>{let Oe=B.relatedTarget;Oe!==null&&(n.contains(Oe)||s.contains(Oe))||(m=!1,b())}),v.push(()=>{z.removeEventListener("pointerenter",O),z.removeEventListener("pointerleave",A)})}E(n),E(s);let L={element:n,trigger:s,slot:i,lead:o,trail:r,get isNudging(){return g!==null},get isOut(){return S},get isPinned(){return p},mount(z){z.append(n,a,l),R()},setMode(z){z!==u&&(u=z,n.dataset.mode=u,s.dataset.mode=u,R(),f=!1,m=!1,b(),T())},setHint(z){l.textContent=z??"",l.dataset.has=String(z!==null&&z!=="")},hold(z){z!==c&&(c=z,c&&g!==null&&M(!1),b(),T())},pin(z){if(z!==p){p=z,n.dataset.pinned=String(p),b(),T();for(let B of[...d])B(p)}},onPin(z){return d.add(z),()=>d.delete(z)},nudge:M,on(z){return h.add(z),()=>h.delete(z)},measure(){return Mv(n)},restMeasure(){return Mv(u==="desktop"&&!p?a:n)},dispose(){y!==null&&clearTimeout(y),g!==null&&clearTimeout(g);for(let z of v)z();v.length=0,h.clear(),d.clear();for(let z of[n,a,s,i,l])z.remove()}};return L.setMode("portrait"),n.dataset.mode="portrait",n.dataset.out="true",n.dataset.nudge="false",n.dataset.pinned="false",s.dataset.mode="portrait",i.parentElement===null&&r.appendChild(i),i.appendChild(s),L}function Mv(e){let t=e.getBoundingClientRect();return{x:Math.round(t.left),y:Math.round(t.top),width:Math.round(t.width),height:Math.round(t.height)}}var IM=90;function Rf(e){let t=e.rail.element,n=t.ownerDocument.defaultView,o=null,r=!1,i=!1,a=null,l=[];function s(y,h){return o!==null?!1:(o={from:y,was:y,now:y,dragging:!1},r=h?.closest?.("button")!=null,i=!1,!0)}function u(y){if(o===null)return!1;g(o,y);let h=S(o);if(!o.dragging){if(Math.abs(h.dx)<=8&&Math.abs(h.dy)<=8)return!1;o.dragging=!0}let d=Ga(e.modeOf());return d!==null&&e.travel?.move(-(d==="x"?h.dx:h.dy)),!0}function f(y){if(o===null)return;g(o,y);let h=S(o),d=o.dragging;o=null;let v=Fd(h,Ga(e.modeOf()));if(d&&(e.travel?.land(v.kind==="travel"?v.by:0),i=!0),v.kind==="press"){r||e.onPress();return}v.kind==="open"&&e.onOpen()}function m(){if(o===null)return;let y=o.dragging;o=null,y&&e.travel?.land(0)}function c(){a?.(),a=null}return p(t,"touchstart",y=>{let h=y.changedTouches[0];if(h===void 0||!s(Xa(h,y.timeStamp),y.target))return;let d=h.identifier,v=A=>{let R=[...A.changedTouches].find(M=>M.identifier===d);return R===void 0?null:Xa(R,A.timeStamp)},b=A=>{let R=v(A);R!==null&&u(R)&&A.cancelable&&A.preventDefault()},T=A=>{let R=v(A);R!==null&&(c(),f(R))},O=A=>{v(A)!==null&&(c(),m())};c(),n?.addEventListener("touchmove",b,{passive:!1}),n?.addEventListener("touchend",T),n?.addEventListener("touchcancel",O),a=()=>{n?.removeEventListener("touchmove",b),n?.removeEventListener("touchend",T),n?.removeEventListener("touchcancel",O)}}),p(t,"pointerdown",y=>{let h=y;if(h.pointerType==="touch"||!s(Xa(h,h.timeStamp),h.target))return;let d=O=>{let A=O;return A.pointerId===h.pointerId?A:null},v=O=>{let A=d(O);A!==null&&u(Xa(A,A.timeStamp))},b=O=>{let A=d(O);A!==null&&(c(),f(Xa(A,A.timeStamp)))},T=O=>{d(O)!==null&&(c(),m())};c(),n?.addEventListener("pointermove",v),n?.addEventListener("pointerup",b),n?.addEventListener("pointercancel",T),a=()=>{n?.removeEventListener("pointermove",v),n?.removeEventListener("pointerup",b),n?.removeEventListener("pointercancel",T)}}),p(t,"click",y=>{i&&(i=!1,y.preventDefault(),y.stopPropagation())},!0),()=>{c(),o=null;for(let y of l)y();l.length=0};function p(y,h,d,v=!1){y.addEventListener(h,d,v),l.push(()=>y.removeEventListener(h,d,v))}function g(y,h){h.t-y.now.t>0&&y.now.t-y.was.t>IM&&(y.was=y.now),y.now=h}function S(y){let h=Math.max(y.now.t-y.was.t,1)/1e3;return{dx:y.now.x-y.from.x,dy:y.now.y-y.from.y,vx:(y.now.x-y.was.x)/h,vy:(y.now.y-y.was.y)/h}}}function Xa(e,t){return{x:e.clientX,y:e.clientY,t}}var Tv=6,Ov=340,Gs=140,jM=40,Rv=280,Cf=220;function Pf(e){let{scope:t,sheet:n}=e,o=t.document,r=[],i=null,a=!1,l=null;return p(n.element,"pointerdown",g=>{let S=g,y=qM(S.target)?"handle":"content";e.modeOf()==="portrait"?s(S,y):u(S,y)}),p(o,"pointerdown",g=>{let S=g;n.isOpen||e.modeOf()!=="landscape"||S.clientX<t.innerWidth-tf||u(S,"edge")}),()=>{c(),l?.(),l=null;for(let g of r)g();r.length=0};function s(g,S){if(a||!n.isOpen||g.pointerType==="mouse"&&g.button!==0||S==="content"&&Cv(g.target))return;c();let y=t.innerHeight,h=Rn[1]*y,d=S==="content"?GM(g.target):null,v=g.timeStamp,b=Math.min(n.detent*y,h),T=0,O=g.clientY,A=v,R=null,M=!1,E=0,L=0,z=0,B=0;f(g,Oe,Fe,_e);function Oe(he){if(R===null){let ke=Math.abs(he.clientX-g.clientX),$=Math.abs(he.clientY-g.clientY);if(Math.max(ke,$)<Tv)return;R=$>ke?"y":"dead",O=he.clientY,A=he.timeStamp,R==="y"&&Pv(n.element,he.pointerId);return}if(R==="dead")return;let Ft=he.clientY-O,xe=Math.max(1,he.timeStamp-A);if(O=he.clientY,A=he.timeStamp,Ft===0)return;M=!0;let Ot=d!==null&&d.scrollHeight>d.clientHeight+1,zt=Ft/xe*1e3;if(Ft<0){let ke=-Ft;if(b<h-.5){let $=Math.min(ke,h-b);b+=$,ke-=$,E=zt,L=he.timeStamp}if(ke>0&&Ot&&d!==null){let $=d.scrollTop;d.scrollTop=$+ke;let j=d.scrollTop-$;ke-=j,j>0&&(z=j/xe*1e3,B=he.timeStamp)}ke>0&&(T=Ua(T,ke))}else{let ke=Ft;if(T>0){let $=Ns(T,ke);T=$.left,ke-=$.spent}if(ke>0&&Ot&&d!==null&&d.scrollTop>0){let $=d.scrollTop;d.scrollTop=Math.max(0,$-ke);let j=$-d.scrollTop;ke-=j,j>0&&(z=-(j/xe)*1e3,B=he.timeStamp)}ke>0&&(b=Math.max(jM,b-ke),E=zt,L=he.timeStamp)}n.drive({height:b+T})}function Fe(he){if(Us(n.element,he.pointerId),R!=="y"){if(S==="handle"&&!M&&he.timeStamp-v<Ov){let zt=(Rn[0]+Rn[1])/2;n.settle(n.detent>=zt?Rn[0]:Rn[1],Rv),e.onMoved?.(n.element)}else n.drive({height:null});return}if(!(L>=B&&he.timeStamp-L<Gs)&&d!==null&&B>0&&he.timeStamp-B<Gs){n.settle(n.detent,Cf),e.onMoved?.(n.element),m(d,z);return}let xe=he.timeStamp-L<Gs?E:0,Ot=nf(b,xe,y);n.settle(Ot,$s(Ot*y-b,xe)),e.onMoved?.(n.element)}function _e(he){Us(n.element,he.pointerId),R==="y"&&(n.settle(n.detent,Cf),e.onMoved?.(n.element))}}function u(g,S){if(a||e.modeOf()!=="landscape"||S!=="edge"&&!n.isOpen||g.pointerType==="mouse"&&g.button!==0||S==="content"&&Cv(g.target))return;let y=g.timeStamp,h=n.element.getBoundingClientRect().width||HM(t),d=S==="edge"?h:0,v=0,b=g.clientX,T=y,O=null,A=!1,R=0,M=0;S==="edge"&&(n.open(),n.drive({offset:d})),f(g,E,L,z);function E(B){if(O===null){let _e=Math.abs(B.clientX-g.clientX),he=Math.abs(B.clientY-g.clientY);if(Math.max(_e,he)<Tv)return;O=_e>he||S!=="content"?"x":"dead",b=B.clientX,T=B.timeStamp,O==="x"?Pv(n.element,B.pointerId):S==="edge"&&(n.close(),n.drive({offset:null}));return}if(O==="dead")return;let Oe=B.clientX-b,Fe=Math.max(1,B.timeStamp-T);if(b=B.clientX,T=B.timeStamp,Oe!==0){if(A=!0,R=Oe/Fe*1e3,M=B.timeStamp,Oe>0){let _e=Ns(v,Oe);v=_e.left,d=Math.min(h,d+(Oe-_e.spent))}else if(d>0){let _e=Math.min(-Oe,d);d-=_e,v=Ua(v,-Oe-_e)}else v=Ua(v,-Oe);n.drive({offset:d-v})}}function L(B){if(Us(n.element,B.pointerId),O!=="x"){S==="handle"&&!A&&B.timeStamp-y<Ov?(n.release(!n.isOpen,Rv),e.onMoved?.(n.element)):n.drive({offset:null});return}let Oe=B.timeStamp-M<Gs?R:0,Fe=of(d,Oe,h);n.release(!Fe,$s(Fe?h-d:d,Oe)),e.onMoved?.(n.element)}function z(B){Us(n.element,B.pointerId),O==="x"&&(n.release(n.isOpen,Cf),e.onMoved?.(n.element))}}function f(g,S,y,h){a=!0;let d=R=>{let M=R;return M.pointerId===g.pointerId?M:null},v=R=>{let M=d(R);M!==null&&S(M)},b=R=>M=>{let E=d(M);E!==null&&(A(),R(E))},T=b(y),O=b(h),A=()=>{a=!1,l=null,t.removeEventListener("pointermove",v),t.removeEventListener("pointerup",T),t.removeEventListener("pointercancel",O)};t.addEventListener("pointermove",v),t.addEventListener("pointerup",T),t.addEventListener("pointercancel",O),l=A}function m(g,S){let y=Math.max(-6,Math.min(6,S/1e3*Kd)),h=t.performance.now(),d=v=>{let b=Math.min(34,v-h);h=v;let T=g.scrollHeight-g.clientHeight,O=g.scrollTop+y*b;if(g.scrollTop=Math.max(0,Math.min(T,O)),y*=Math.pow(Qd,b),Math.abs(y)<Jd||O<0||O>T){i=null;return}i=t.requestAnimationFrame(d)};i=t.requestAnimationFrame(d)}function c(){i!==null&&(t.cancelAnimationFrame(i),i=null)}function p(g,S,y){g.addEventListener(S,y),r.push(()=>g.removeEventListener(S,y))}}function HM(e){return Math.min(400,e.innerWidth*.58)}function qM(e){return(_f(e)?.closest("[data-grab]")??null)!==null}function GM(e){let t=_f(e);for(;t!==null;){if(t.classList.contains("gb-scroll")&&t.scrollHeight>t.clientHeight+2)return t;t=t.parentElement}return null}function Cv(e){return _f(e)?.closest("[data-gb-drag], input, select, textarea, [contenteditable]")!==null}function _f(e){let t=e;return t!==null&&typeof t.closest=="function"?t:null}function Pv(e,t){try{e.setPointerCapture?.(t)}catch{}}function Us(e,t){try{e.hasPointerCapture?.(t)&&e.releasePointerCapture?.(t)}catch{}}var UM=80;function zf(e,t){let n=e.createElement("aside");n.className="gb-sheet",n.dataset.open="false",n.dataset.mode="portrait",n.setAttribute("role","dialog"),n.setAttribute("aria-label","Details"),n.tabIndex=-1;let o=e.createElement("div");o.className="gb-sheet-grab",o.dataset.grab="true";let r=e.createElement("div");r.className="gb-sheet-grip",r.setAttribute("aria-hidden","true"),o.appendChild(r);let i=e.createElement("div");i.className="gb-sheet-head";let a=e.createElement("div");a.className="gb-sheet-body gb-scroll";let l=e.createElement("div");l.className="gb-sheet-foot",n.append(o,i,a,l);let s="portrait",u=!1,f=Rn[1],m=null,c=new Set;function p(){t.style.setProperty("--gb-detent",`${(f*100).toFixed(2)}dvh`),t.style.setProperty("--gb-sheet",u?"var(--gb-sheet-now)":"0px")}let g={element:n,head:i,body:a,foot:l,get isOpen(){return u},get detent(){return f},open(){u||(u=!0,n.dataset.open="true",p(),S())},close(){u&&(u=!1,n.dataset.open="false",p(),S())},toggle(){u?g.close():g.open()},on(y){return c.add(y),()=>c.delete(y)},setMode(y){y!==s&&(s=y,n.dataset.mode=s,g.drive({height:null,offset:null}),p())},setSections(y){a.replaceChildren(),i.replaceChildren(),l.replaceChildren();for(let h of y){let d=e.createElement("div");d.className="gb-sheet-section",h.render(d),a.appendChild(d)}a.scrollTop=0},drive(y){let h=y.height!=null||y.offset!=null;n.dataset.dragging=String(h),y.height!==void 0&&(y.height===null?t.style.removeProperty("--gb-sheet-drag"):t.style.setProperty("--gb-sheet-drag",`${y.height}px`)),y.offset!==void 0&&(y.offset===null?t.style.removeProperty("--gb-sheet-off"):t.style.setProperty("--gb-sheet-off",`${y.offset}px`)),h||p()},settle(y,h){if(t.style.setProperty("--gb-settle",`${Math.round(h)}ms`),n.dataset.dragging="false",t.style.removeProperty("--gb-sheet-off"),y>0){f=y,t.style.removeProperty("--gb-sheet-drag"),u?p():g.open();return}let d=n.getBoundingClientRect().height;t.style.setProperty("--gb-sheet-drag",`${d}px`),g.close(),m!==null&&clearTimeout(m),m=setTimeout(()=>{m=null,!u&&(f=Rn[1],t.style.setProperty("--gb-settle","0ms"),t.style.removeProperty("--gb-sheet-drag"),p())},h+UM)},release(y,h){t.style.setProperty("--gb-settle",`${Math.round(h)}ms`),n.dataset.dragging="false",t.style.removeProperty("--gb-sheet-off"),y?g.open():g.close()},measure(){let y=n.getBoundingClientRect();return{x:Math.round(y.left),y:Math.round(y.top),width:Math.round(y.width),height:Math.round(y.height)}},dispose(){m!==null&&clearTimeout(m),c.clear(),n.remove();for(let y of["--gb-sheet","--gb-sheet-now","--gb-detent","--gb-sheet-drag","--gb-sheet-off","--gb-settle"])t.style.removeProperty(y)}};function S(){for(let y of[...c])y(u)}return t.style.setProperty("--gb-sheet-now","var(--gb-sheet-drag, var(--gb-detent))"),p(),g}function $f(e,t={}){let n=e.createElement("div");n.className="gb-title";let o=e.createElement("h2");o.className="gb-title-name";let r=e.createElement("button");r.type="button",r.className="gb-title-sub",t.onCreator!==void 0&&r.addEventListener("click",t.onCreator);let i=e.createElement("p");return i.className="gb-title-note",n.append(o,r,i),{element:n,set(a){let[l,s]=gf(a.title);o.replaceChildren(e.createTextNode(l)),s!==null&&(o.appendChild(e.createElement("br")),o.appendChild(e.createTextNode(s)));let u=a.sub??"";r.textContent=u,r.hidden=u==="",r.disabled=t.onCreator===void 0,i.textContent=a.note??"",i.hidden=i.textContent===""}}}function Nf(e,t){let{scope:n}=t,o=t.dwellMs??3600,r=e.createElement("div");r.className="gb-toast",r.dataset.shown="false",r.setAttribute("role","status");let i=[],a=null,l=!1;function s(){a!==null&&n.clearTimeout(a),a=null}function u(c){c===void 0||c===""?delete r.dataset.icon:r.dataset.icon=c}function f(){if(l)return;let c=i.shift();c!==void 0&&(l=!0,r.textContent=c.text,u(c.icon),r.dataset.shown="true",a=n.setTimeout(m,o))}function m(){r.dataset.shown="false",a=n.setTimeout(()=>{l=!1,i.length===0&&(r.textContent="",u(void 0)),f()},280)}return{element:r,show(c,p){c!==""&&(i.push({text:c,icon:p}),i.length>3&&i.splice(0,i.length-3),f())},clear(){s(),i.length=0,l=!1,r.dataset.shown="false",r.textContent="",u(void 0)},dispose(){s(),i.length=0,r.remove()}}}var Df="hopple.rail.pinned";function If(e){let{host:t,scope:n}=e,o=t.ownerDocument,r=o.body,i="portrait",a=E=>e.onUse?.(E),l="other",s=0;function u(E,L){l=E;try{L()}finally{l="other"}}function f(){a({event:"rail_clicked",control:"panel"}),u("rail",()=>c.toggle())}let m=o.createElement("div");m.className="gb-scrim",m.setAttribute("aria-hidden","true");let c=zf(o,t),p=Of(o,{onToggle:f}),g=e.onCreator,S=$f(o,{...g===void 0?{}:{onCreator:()=>{a({event:"rail_clicked",control:"creator"}),g()}}}),y=e.playback,h=y===void 0?null:Mf(o,{...y,onMixer:()=>u("mixer",()=>y.onMixer())},e.onUse),d=Nf(o,{scope:n,...e.toastMs===void 0?{}:{dwellMs:e.toastMs}});t.append(m,S.element,c.element,d.element),h!==null&&t.appendChild(h.element),p.mount(t),p.pin(BM(n));let v=wf(n);v.on(()=>e.onLayout());let b=[Rf({rail:p,modeOf:()=>i,onPress:f,onOpen:()=>u("drag",()=>c.open()),...e.travel===void 0?{}:{travel:e.travel}}),Pf({scope:n,sheet:c,modeOf:()=>i,onMoved:E=>v.moves(E)})];M(m,"click",()=>c.close()),M(n,"keydown",E=>{E.key!=="Escape"||!c.isOpen||e.back?.()!==!0&&c.close()});let T=Av({scope:n,sheet:c,parts:()=>[c.element,p.element,p.trigger,S.element,...h===null?[]:[h.element]],open:()=>u("pad",()=>c.open()),hint:E=>d.show(E)});M(o,"pointerdown",E=>{if(!c.isOpen)return;let L=E.target;if(L!==null){for(let z of[c.element,p.element,p.trigger,S.element])if(z.contains(L))return;h?.element.contains(L)!==!0&&c.close()}},!0),M(n,"blur",()=>{c.isOpen&&o.activeElement?.tagName==="IFRAME"&&c.close()}),c.on(E=>{v.moves(c.element),r.dataset.sheet=E?"open":"shut",p.trigger.setAttribute("aria-expanded",String(E)),p.hold(E),E?(A(),h?.pause==="running"&&y?.pause.onToggle(!0),s=Date.now(),a({event:"panel_opened",from:l})):a({event:"panel_closed",ms:Date.now()-s}),e.onLayout(),E||e.onShut?.()}),p.on(E=>{v.moves(p.element),r.dataset.rail=E?"out":"in"}),b.push(p.onPin(E=>{VM(n,E),e.onLayout()}));let O=null;function A(){O!==null&&n.cancelAnimationFrame(O),O=n.requestAnimationFrame(()=>{O=null,c.isOpen&&(c.element.contains(o.activeElement)||c.element.focus({preventScroll:!0}))})}let R={};return{rail:p,sheet:c,motion:v,title:S,playback:h,toaster:d,announce(E,L){d.show(E,L)},open(E){u(E,()=>c.open())},get mode(){return i},setMode(E){E!==i&&v.moves(p.element),i=E,r.dataset.mode=i,r.dataset.sheet=c.isOpen?"open":"shut",r.dataset.rail=p.isOut?"out":"in",p.setMode(i),c.setMode(i)},railRect(){return Lf(p.restMeasure(),e.originOf())},over(){if(v.moving)return R;let E=e.originOf(),L=i==="desktop"&&p.isOut&&!p.isPinned&&!c.isOpen?p.measure():void 0;return R={...c.isOpen?_v("panel",Lf(c.measure(),E)):{},...L===void 0?{}:_v("bar",Lf(L,E))},R},destroy(){O!==null&&n.cancelAnimationFrame(O),O=null,c.close();for(let E of b)E();b.length=0,T.dispose(),v.dispose(),d.dispose(),p.dispose(),c.dispose(),h?.dispose(),m.remove(),S.element.remove()}};function M(E,L,z,B=!1){E.addEventListener(L,z,B),b.push(()=>E.removeEventListener(L,z,B))}}function BM(e){try{return e.localStorage.getItem(Df)==="true"}catch{return!1}}function VM(e,t){try{t?e.localStorage.setItem(Df,"true"):e.localStorage.removeItem(Df)}catch{}}function Lf(e,t){if(!(e.width===0||e.height===0))return{x:e.x-t.x,y:e.y-t.y,width:e.width,height:e.height}}function _v(e,t){return t===void 0?{}:{[e]:t}}var XM="input, select, textarea, [contenteditable]";function jf(e){let{host:t,chrome:n}=e,o=(e.selectable??[]).join(", ");function r(s){let u=s;return u===null||typeof u.closest!="function"?!1:u.closest(XM)!==null?!0:o!==""&&u.closest(o)!==null}function i(s){n.sheet.isOpen||r(s.target)||s.preventDefault()}function a(s){n.sheet.isOpen||r(s.target)||l.hand()}t.addEventListener("mousedown",i),t.addEventListener("pointerdown",a);let l={hand(){n.sheet.isOpen||e.frameOf()?.focus({preventScroll:!0})},dispose(){t.removeEventListener("mousedown",i),t.removeEventListener("pointerdown",a)}};return l}function Hf(e,t,n={}){let o=e.lead.ownerDocument,r=R=>t.onUse?.(R),i=R=>r({event:"rail_clicked",control:R,...e.isNudging&&R!=="you"?{lit:!0}:{}}),a=Kt(o,{label:"Previous game",icon:"previous",size:"hint",onClick:()=>{r({event:"rail_clicked",control:"previous"}),t.travel(-1)},disabled:!0}),l=Kt(o,{label:"Next game",icon:"next",size:"hint",onClick:()=>{r({event:"rail_clicked",control:"next"}),t.travel(1)},disabled:!0}),s=Kt(o,{label:"Fullscreen",icon:"expand",onClick:()=>{r({event:"rail_clicked",control:"fullscreen"}),t.fullscreen()}}),u=Kt(o,{label:"Like",icon:"heart",pressed:!1,onClick:()=>{i(t.liked()?"unlike":"like"),t.like(),A.showLiked(t.liked())}}),f=Kt(o,{label:"Share",icon:"share",onClick:()=>{i("share"),t.share()}}),m=Kt(o,{label:"Pin the rail",icon:"pin",pressed:!1,onClick:()=>{r({event:"rail_clicked",control:e.isPinned?"unpin":"pin"}),e.pin(!e.isPinned)}});function c(R){Va(m,R),eo(m,{label:R?"Unpin the rail":"Pin the rail",icon:"pin",filled:R})}c(e.isPinned),e.onPin(c);let p=o.createElement("button");p.type="button",p.className="gb-button gb-rail-word";let g=o.createElement("span");g.className="gb-rail-word-text";let S=o.createElement("span");S.className="gb-rail-face",S.setAttribute("aria-hidden","true");let[y,h]=_r(Pr);S.style.backgroundColor=y,S.style.backgroundImage=zr(y,h);let d=Jn(o,"you",{size:18});p.append(d,g);let v=!1;p.addEventListener("click",()=>{i(v?"you":"sign-in"),t.account?.()});for(let R of[f,u])R.classList.add("gb-rail-invite");let b={portrait:{edge:[a],lead:[s,p],trail:[f,u,e.slot,l]},landscape:{edge:[a],lead:[u,f],trail:[s,p,e.slot,l]},desktop:{edge:[],lead:[],trail:[a,l,f,u,s,p,e.slot,m]}};function T(R){let M=b[R];return{lead:[...M.edge,...n.lead??[],...M.lead],trail:[...n.trail??[],...M.trail]}}let O=null,A={feed(R,M){a.disabled=R<2,l.disabled=R<2,A.showLiked(t.liked())},showFullscreen(R){eo(s,{label:R?"Leave fullscreen":"Fullscreen",icon:R?"collapse":"expand"})},showLiked(R){Va(u,R),eo(u,{label:R?"Unlike":"Like",icon:"heart",filled:R})},setMode(R){let M=R==="portrait";eo(a,{icon:M?"previous":"up"}),eo(l,{icon:M?"next":"down"});let E=R==="desktop"?"touch":"hint";if(a.dataset.size=E,l.dataset.size=E,R===O)return;O=R;let L=T(R);e.lead.replaceChildren(...L.lead),e.trail.replaceChildren(...L.trail)},showPlayer(R){v=R.signedIn,p.hidden=t.account===void 0,g.textContent=v?"You":"Sign in",p.classList.toggle("gb-rail-invite",!v),p.replaceChildren(v?S:d,g);let M=S.querySelector("img");if((M?.getAttribute("src")??null)===R.picture||(M?.remove(),R.picture===null))return;let E=o.createElement("img");E.alt="",E.decoding="async",E.src=R.picture,S.appendChild(E)},paused(R,M){M==="running"?e.nudge(!1):R==="running"&&e.nudge(!0)}};return A.setMode("portrait"),A.showPlayer(t.player?.()??{signedIn:!1,picture:null}),A}function zv(e,t){let n=o=>{try{return e.matchMedia?.(o).matches===!0}catch{return!1}};return{size:t,precise:n("(pointer: fine)"),hovers:n("(hover: hover)")}}function qf(e,t){return _s(zv(e,t))}function Gf(e){let t=e.createElement("div");t.className="gb-boot",t.setAttribute("aria-hidden","true");let n=e.createElement("div");return n.className="gb-boot-spinner",t.appendChild(n),{element:t,setReady(o){t.hidden=o},dispose(){t.remove()}}}var Bs={};Qw(Bs,{create:()=>Lv,createTheme:()=>Dv,defineConsts:()=>YM,defineVars:()=>Iv,firstThatWorks:()=>jv,keyframes:()=>Hv,legacyMerge:()=>FM,positionTry:()=>qv,props:()=>Gv,types:()=>Bv,viewTransitionClass:()=>Uv});var Wa={},$v;function WM(){if($v)return Wa;$v=1,Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.styleq=void 0;var e=new WeakMap,t="$$css";function n(r){var i,a,l;return r!=null&&(i=r.disableCache===!0,a=r.disableMix===!0,l=r.transform),function(){for(var u=[],f="",m=null,c="",p=i?null:e,g=new Array(arguments.length),S=0;S<arguments.length;S++)g[S]=arguments[S];for(;g.length>0;){var y=g.pop();if(!(y==null||y===!1)){if(Array.isArray(y)){for(var h=0;h<y.length;h++)g.push(y[h]);continue}var d=l!=null?l(y):y;if(d.$$css!=null){var v="";if(p!=null&&p.has(d)){var b=p.get(d);b!=null&&(v=b[0],c=b[2],u.push.apply(u,b[1]),p=b[3])}else{var T=[];for(var O in d){var A=d[O];if(O===t){var R=d[O];R!==!0&&(c=c?R+"; "+c:R);continue}typeof A=="string"||A===null?u.includes(O)||(u.push(O),p!=null&&T.push(O),typeof A=="string"&&(v+=v?" "+A:A)):console.error("styleq: ".concat(O," typeof ").concat(String(A),\' is not "string" or "null".\'))}if(p!=null){var M=new WeakMap;p.set(d,[v,T,c,M]),p=M}}v&&(f=f?v+" "+f:v)}else if(a)m==null&&(m={}),m=Object.assign({},d,m);else{var E=null;for(var L in d){var z=d[L];z!==void 0&&(u.includes(L)||(z!=null&&(m==null&&(m={}),E==null&&(E={}),E[L]=z),u.push(L),p=null))}E!=null&&(m=Object.assign(E,m))}}}var B=[f,m,c];return B}}var o=Wa.styleq=n();return o.factory=n,Wa}var Nv=WM(),to=e=>new Error(`Unexpected \'stylex.${e}\' call at runtime. Styles must be compiled by \'@stylexjs/babel-plugin\'.`),Qt=e=>to(`types.${e}`),Lv=function(t){throw to("create")},Dv=(e,t)=>{throw to("createTheme")},YM=function(t){throw to("defineConsts")},Iv=function(t){throw to("defineVars")},jv=(...e)=>{throw to("firstThatWorks")},Hv=e=>{throw to("keyframes")},qv=e=>{throw to("positionTry")};function Gv(...e){let[t,n,o]=Nv.styleq(e),r={};return t!=null&&t!==""&&(r.className=t),n!=null&&Object.keys(n).length>0&&(r.style=n),o!=null&&o!==""&&(r["data-style-src"]=o),r}var Uv=e=>{throw to("viewTransitionClass")},Bv={angle:e=>{throw Qt("angle")},color:e=>{throw Qt("color")},url:e=>{throw Qt("url")},image:e=>{throw Qt("image")},integer:e=>{throw Qt("integer")},lengthPercentage:e=>{throw Qt("lengthPercentage")},length:e=>{throw Qt("length")},percentage:e=>{throw Qt("percentage")},number:e=>{throw Qt("number")},resolution:e=>{throw Qt("resolution")},time:e=>{throw Qt("time")},transformFunction:e=>{throw Qt("transformFunction")},transformList:e=>{throw Qt("transformList")}};function Un(...e){let[t]=Nv.styleq(e);return t}Un.create=Lv;Un.createTheme=Dv;Un.defineVars=Iv;Un.firstThatWorks=jv;Un.keyframes=Hv;Un.positionTry=qv;Un.props=Gv;Un.types=Bv;Un.viewTransitionClass=Uv;var FM=Un;var Uf={};Object.defineProperty(Uf,"__esModule",{value:!0});var Vv=Uf.styleq=void 0,ZM=new WeakMap,KM="$$css";function Xv(e){var t,n,o;return e!=null&&(t=e.disableCache===!0,n=e.disableMix===!0,o=e.transform),function(){for(var i=[],a="",l=null,s="",u=t?null:ZM,f=new Array(arguments.length),m=0;m<arguments.length;m++)f[m]=arguments[m];for(;f.length>0;){var c=f.pop();if(!(c==null||c===!1)){if(Array.isArray(c)){for(var p=0;p<c.length;p++)f.push(c[p]);continue}var g=o!=null?o(c):c;if(g.$$css!=null){var S="";if(u!=null&&u.has(g)){var y=u.get(g);y!=null&&(S=y[0],s=y[2],i.push.apply(i,y[1]),u=y[3])}else{var h=[];for(var d in g){var v=g[d];if(d===KM){var b=g[d];b!==!0&&(s=s?b+"; "+s:b);continue}typeof v=="string"||v===null?i.includes(d)||(i.push(d),u!=null&&h.push(d),typeof v=="string"&&(S+=S?" "+v:v)):console.error("styleq: ".concat(d," typeof ").concat(String(v),\' is not "string" or "null".\'))}if(u!=null){var T=new WeakMap;u.set(g,[S,h,s,T]),u=T}}S&&(a=a?S+" "+a:S)}else if(n)l==null&&(l={}),l=Object.assign({},g,l);else{var O=null;for(var A in g){var R=g[A];R!==void 0&&(i.includes(A)||(R!=null&&(l==null&&(l={}),O==null&&(O={}),O[A]=R),i.push(A),u=null))}O!=null&&(l=Object.assign(O,l))}}}var M=[a,l,s];return M}}var QM=Vv=Uf.styleq=Xv();QM.factory=Xv;var JM=Vv.factory({disableMix:!0});function x(...e){let[t,n,o]=JM(e),r={};if(t!=null&&t!==""&&(r.className=t),n!=null&&(r.style=n),o!=null&&o!==""){let i=o.split(";"),a={};for(let l of i){let s=l.trim(),[u,f]=s.split(":");f!=null&&(a[u]=a[u]!=null?`${a[u]},${f}`:f)}r["data-style-src"]=Object.keys(a).map(l=>`${l}:${a[l]}`).join("; ")}return r}var Z={block:{kogj98:"x1ghz6dp",kmVPX3:"x1717udv",$$css:!0},inline:{kogj98:"x1ghz6dp",kmVPX3:"x1717udv",kybGjl:"x1hl2dhg",k9WMMc:"x16tdsg8",kD5eJx:"x1vvkbs",$$css:!0},inlineblock:{ksu8eU:"x1y0btm7",kogj98:"x1ghz6dp",kmVPX3:"x1717udv",$$css:!0},button:{kMzoRj:"xmkeg23",$$css:!0},codePre:{kMv6JI:"x1lxnp44",kGuDYH:"xrv4cvt",kVQacm:"xysyzu8",$$css:!0},heading:{kGuDYH:"xngnso2",kD5eJx:"x1vvkbs",$$css:!0},hr:{kWkggS:"x42x0ya",ksu8eU:"xng3xce",kMzoRj:"xc342km",kB7OPa:"x9f619",kZKoxP:"xjm9jq1",$$css:!0},img:{kOBAk4:"xuw900x",kZKoxP:"xt7dq6l",ks0D6T:"x193iq5w",$$css:!0},input:{kMzoRj:"xmkeg23",ksu8eU:"x1y0btm7",$$css:!0},list:{kB88ic:"xe8uvvx",$$css:!0},strong:{k63SB2:"x117nqv4",$$css:!0},textarea:{kMzoRj:"xmkeg23",ksu8eU:"x1y0btm7",kHenm0:"x288g5",$$css:!0}},e2=Z.inline,t2=Z.block,n2=Z.block,o2=Z.inline,r2=Z.inline,i2=Z.inline,a2=Z.block,l2=null,s2=[Z.inlineblock,Z.button],u2=[Z.inline,Z.codePre],c2=null,d2=Z.block,f2=Z.inline,p2=Z.block,m2=Z.block,h2=Z.block,Ei=[Z.block,Z.heading],g2=Z.block,y2=[Z.block,Z.hr],v2=Z.inline,b2=Z.img,x2=[Z.inlineblock,Z.input],k2=null,S2=null,w2=Z.inline,A2=Z.block,E2=Z.block,M2=Z.inline,T2=Z.block,O2=[Z.list,Z.block],R2=null,C2=null,P2=Z.block,_2=[Z.block,Z.codePre],z2=null,$2=Z.block,N2=Z.inlineblock,L2=Z.inline,D2=[Z.inline,Z.strong],I2=Z.inline,j2=Z.inline,H2=[Z.inlineblock,Z.textarea],q2=null,G2=[Z.list,Z.block],k={a:e2,article:t2,aside:n2,b:o2,bdi:r2,bdo:i2,blockquote:a2,br:l2,button:s2,code:u2,del:c2,div:d2,em:f2,fieldset:p2,footer:m2,form:h2,h1:Ei,h2:Ei,h3:Ei,h4:Ei,h5:Ei,h6:Ei,header:g2,hr:y2,i:v2,img:b2,input:x2,ins:k2,kbd:S2,label:w2,li:A2,main:E2,mark:M2,nav:T2,ol:O2,optgroup:R2,option:C2,p:P2,pre:_2,s:z2,section:$2,select:N2,span:L2,strong:D2,sub:I2,sup:j2,textarea:H2,u:q2,ul:G2};var io=F(De(),1);var ub=F(Ie());var sb={};function lT(e){sb[e]||(sb[e]=!0,console.error(`[error] React Strict DOM: ${e}`))}var sT=new Set(["alt","aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colindextext","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowindextext","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","autoCapitalize","autoComplete","autoFocus","checked","children","crossOrigin","decoding","defaultChecked","defaultValue","dir","disabled","download","draggable","elementTiming","enterKeyHint","fetchPriority","for","height","hidden","href","id","inert","inputMode","label","lang","loading","max","maxLength","min","minLength","multiple","name","onAuxClick","onBeforeInput","onBlur","onChange","onClick","onContextMenu","onCopy","onCut","onError","onFocus","onFocusIn","onFocusOut","onFullscreenChange","onFullscreenError","onGotPointerCapture","onInput","onInvalid","onKeyDown","onKeyUp","onLoad","onLostPointerCapture","onPaste","onPointerCancel","onPointerDown","onPointerEnter","onPointerLeave","onPointerMove","onPointerOut","onPointerOver","onPointerUp","onScroll","onSelect","onSelectionChange","onWheel","placeholder","readOnly","referrerPolicy","rel","required","role","rows","selected","spellCheck","src","srcSet","step","style","tabIndex","target","type","value","width","suppressHydrationWarning","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"]);function uT(e){return sT.has(e)||e.indexOf("data-")>-1}var Kf={};Object.defineProperty(Kf,"__esModule",{value:!0});var cb=Kf.styleq=void 0,cT=new WeakMap,dT="$$css";function db(e){var t,n,o;return e!=null&&(t=e.disableCache===!0,n=e.disableMix===!0,o=e.transform),function(){for(var i=[],a="",l=null,s="",u=t?null:cT,f=new Array(arguments.length),m=0;m<arguments.length;m++)f[m]=arguments[m];for(;f.length>0;){var c=f.pop();if(!(c==null||c===!1)){if(Array.isArray(c)){for(var p=0;p<c.length;p++)f.push(c[p]);continue}var g=o!=null?o(c):c;if(g.$$css!=null){var S="";if(u!=null&&u.has(g)){var y=u.get(g);y!=null&&(S=y[0],s=y[2],i.push.apply(i,y[1]),u=y[3])}else{var h=[];for(var d in g){var v=g[d];if(d===dT){var b=g[d];b!==!0&&(s=s?b+"; "+s:b);continue}typeof v=="string"||v===null?i.includes(d)||(i.push(d),u!=null&&h.push(d),typeof v=="string"&&(S+=S?" "+v:v)):console.error("styleq: ".concat(d," typeof ").concat(String(v),\' is not "string" or "null".\'))}if(u!=null){var T=new WeakMap;u.set(g,[S,h,s,T]),u=T}}S&&(a=a?S+" "+a:S)}else if(n)l==null&&(l={}),l=Object.assign({},g,l);else{var O=null;for(var A in g){var R=g[A];R!==void 0&&(i.includes(A)||(R!=null&&(l==null&&(l={}),O==null&&(O={}),O[A]=R),i.push(A),u=null))}O!=null&&(l=Object.assign(O,l))}}}var M=[a,l,s];return M}}var fT=cb=Kf.styleq=db();fT.factory=db;var pT=cb.factory({disableMix:!0});function mT(...e){let[t,n,o]=pT(e),r={};if(t!=null&&t!==""&&(r.className=t),n!=null&&(r.style=n),o!=null&&o!==""){let i=o.split(";"),a={};for(let l of i){let s=l.trim(),[u,f]=s.split(":");f!=null&&(a[u]=a[u]!=null?`${a[u]},${f}`:f)}r["data-style-src"]=Object.keys(a).map(l=>`${l}:${a[l]}`).join("; ")}return r}function hT(e){Object.keys(e).forEach(t=>{uT(t)||(lT(`invalid prop "${t}"`),delete e[t])})}function X(e,t){let n={$$css:!0,"debug::name":`html-${e}`};function o({ref:r,...i}){let{for:a,style:l,...s}=i,u=s;hT(u),a!=null&&(u.htmlFor=a),i.role!=null&&(u.role=i.role==="none"?"presentation":i.role),e==="button"?u.type=u.type?u.type:"button":(e==="input"||e==="textarea")&&(u.dir=u.dir?u.dir:"auto");let f=mT([n,t,l]);return(0,ub.jsx)(e,{...u,...f,ref:r})}return o.displayName=`html.${e}`,o}var K={block:{kogj98:"x1ghz6dp",kmVPX3:"x1717udv",$$css:!0},inline:{kogj98:"x1ghz6dp",kmVPX3:"x1717udv",kybGjl:"x1hl2dhg",k9WMMc:"x16tdsg8",kD5eJx:"x1vvkbs",$$css:!0},inlineblock:{ksu8eU:"x1y0btm7",kogj98:"x1ghz6dp",kmVPX3:"x1717udv",$$css:!0},button:{kMzoRj:"xmkeg23",$$css:!0},codePre:{kMv6JI:"x1lxnp44",kGuDYH:"xrv4cvt",kVQacm:"xysyzu8",$$css:!0},heading:{kGuDYH:"xngnso2",kD5eJx:"x1vvkbs",$$css:!0},hr:{kWkggS:"x42x0ya",ksu8eU:"xng3xce",kMzoRj:"xc342km",kB7OPa:"x9f619",kZKoxP:"xjm9jq1",$$css:!0},img:{kOBAk4:"xuw900x",kZKoxP:"xt7dq6l",ks0D6T:"x193iq5w",$$css:!0},input:{kMzoRj:"xmkeg23",ksu8eU:"x1y0btm7",$$css:!0},list:{kB88ic:"xe8uvvx",$$css:!0},strong:{k63SB2:"x117nqv4",$$css:!0},textarea:{kMzoRj:"xmkeg23",ksu8eU:"x1y0btm7",kHenm0:"x288g5",$$css:!0}},gT=K.inline,yT=K.block,vT=K.block,bT=K.inline,xT=K.inline,kT=K.inline,ST=K.block,wT=null,AT=[K.inlineblock,K.button],ET=[K.inline,K.codePre],MT=null,TT=K.block,OT=K.inline,RT=K.block,CT=K.block,PT=K.block,Oi=[K.block,K.heading],_T=K.block,zT=[K.block,K.hr],$T=K.inline,NT=K.img,LT=[K.inlineblock,K.input],DT=null,IT=null,jT=K.inline,HT=K.block,qT=K.block,GT=K.inline,UT=K.block,BT=[K.list,K.block],VT=null,XT=null,WT=K.block,YT=[K.block,K.codePre],FT=null,ZT=K.block,KT=K.inlineblock,QT=K.inline,JT=[K.inline,K.strong],eO=K.inline,tO=K.inline,nO=[K.inlineblock,K.textarea],oO=null,rO=[K.list,K.block],W={a:gT,article:yT,aside:vT,b:bT,bdi:xT,bdo:kT,blockquote:ST,br:wT,button:AT,code:ET,del:MT,div:TT,em:OT,fieldset:RT,footer:CT,form:PT,h1:Oi,h2:Oi,h3:Oi,h4:Oi,h5:Oi,h6:Oi,header:_T,hr:zT,i:$T,img:NT,input:LT,ins:DT,kbd:IT,label:jT,li:HT,main:qT,mark:GT,nav:UT,ol:BT,optgroup:VT,option:XT,p:WT,pre:YT,s:FT,section:ZT,select:KT,span:QT,strong:JT,sub:eO,sup:tO,textarea:nO,u:oO,ul:rO},dI=X("a",W.a),fI=X("article",W.article),pI=X("aside",W.aside),mI=X("b",W.b),hI=X("bdi",W.bdi),gI=X("bdo",W.bdo),yI=X("blockquote",W.blockquote),vI=X("br",W.br),bI=X("button",W.button),xI=X("code",W.code),kI=X("del",W.del),SI=X("div",W.div),wI=X("em",W.em),AI=X("fieldset",W.fieldset),EI=X("footer",W.footer),MI=X("form",W.form),TI=X("h1",W.h1),OI=X("h2",W.h2),RI=X("h3",W.h3),CI=X("h4",W.h4),PI=X("h5",W.h5),_I=X("h6",W.h6),zI=X("header",W.header),$I=X("hr",W.hr),NI=X("i",W.i),LI=X("img",W.img),DI=X("input",W.input),II=X("ins",W.ins),jI=X("kbd",W.kbd),HI=X("label",W.label),qI=X("li",W.li),GI=X("main",W.main),UI=X("mark",W.mark),BI=X("nav",W.nav),VI=X("ol",W.ol),XI=X("optgroup",W.optgroup),WI=X("option",W.option),YI=X("p",W.p),FI=X("pre",W.pre),ZI=X("s",W.s),KI=X("section",W.section),QI=X("select",W.select),JI=X("span",W.span),e7=X("strong",W.strong),t7=X("sub",W.sub),n7=X("sup",W.sup),o7=X("textarea",W.textarea),r7=X("u",W.u),i7=X("ul",W.ul);var qo=F(De(),1);var Ya=F(Ie(),1);function je(e){let t=e.size??20;return(0,Ya.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:e.weight??1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",style:{flexShrink:0},...e.look===void 0?{}:Bs.props(e.look),children:Ha[e.name].map((n,o)=>(0,Ya.jsx)("path",{d:n,fill:o===0&&e.filled===!0?"currentColor":void 0},o))})}function Ws(e){let t=e.size??20;return(0,Ya.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",style:{flexShrink:0},children:(0,Ya.jsx)("path",{d:_y[e.name]})})}var C=F(Ie(),1),ae={base:{kysU6D:"xjyslct",kogj98:"x1ghz6dp",kmVPX3:"x1717udv",kMzoRj:"xc342km",ksu8eU:"x1y0btm7",kWkggS:"xjbqb8w",kMwMTN:"x6gl9h3",kMv6JI:"x19979ed",kGuDYH:"xif65rj",kLWn49:"x1evy7pa",k9WMMc:"xdpxx8g",kkrTdU:"x1ypdohk",k3XXqK:"x1t137rt x9v5kkp",kMeerF:"x1de99jn",kjBf7l:"xfn9q2g",kInvED:"x1hl8ikr",$$css:!0},disabled:{kSiTet:"xbyyjgo",kkrTdU:"xt0e3qv",$$css:!0}};var Jf={root:{kMv6JI:"x19979ed",kGuDYH:"xif65rj",kLWn49:"x1evy7pa",kMwMTN:"x6gl9h3",$$css:!0}},ep={column:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",k7Eaqz:"xeuugli",$$css:!0}};function le(e){return(0,C.jsx)("div",{...x(k.div,ep.column,Zs[`g${e.gap}`],e.parted===!0&&Zs.parted),children:e.children})}var Zs={g6:{kOIVth:"x17d4w8g",$$css:!0},g8:{kOIVth:"x167g77z",$$css:!0},g10:{kOIVth:"x883omv",$$css:!0},g11:{kOIVth:"x15gj94b",$$css:!0},g12:{kOIVth:"x1v2ro7d",$$css:!0},g16:{kOIVth:"xou54vl",$$css:!0},g18:{kOIVth:"xaobbuh",$$css:!0},g20:{kOIVth:"x1c1vhfx",$$css:!0},parted:{kLKAdn:"xyamay9",kEafiO:"x178xt8z",kPef9Z:"x13fuv20",kLZC3w:"x35e4z7",$$css:!0}},pn={eyebrow:{kMv6JI:"x1j8uvit",kGuDYH:"x1j6dyjg",kb6lSQ:"xv2r5ts",kP9fke:"xtvhhri",kMwMTN:"xupo0id",$$css:!0},accent:{kMwMTN:"x1et08zh",$$css:!0},prose:{kGuDYH:"x1jvydc1",kLWn49:"x1jjo3f5",kMwMTN:"x6yhm7j",kN2L0X:"x1fzhlzt",$$css:!0},small:{kGuDYH:"x4z9k3i",kLWn49:"x1evy7pa",$$css:!0},heading:{kGuDYH:"xwsyq91",k63SB2:"x1s688f",kb6lSQ:"x1tup8yo",kLWn49:"x1evy7pa",kMwMTN:"x6gl9h3",$$css:!0},note:{kGuDYH:"x4z9k3i",kMwMTN:"xupo0id",kN2L0X:"x1fzhlzt",$$css:!0},empty:{k8WAf4:"xhyosrm",kGuDYH:"x4z9k3i",kMwMTN:"xupo0id",k9WMMc:"x2b8uid",kN2L0X:"x1fzhlzt",$$css:!0},bad:{kMwMTN:"xff9hfd",$$css:!0},good:{kMwMTN:"xyify0s",$$css:!0}};function Ka(e){return(0,C.jsx)("p",{...x(k.p,pn.eyebrow,e.accent===!0&&pn.accent),children:e.children})}function dt(e){return(0,C.jsx)("p",{...x(k.p,pn.prose,e.small===!0&&pn.small),children:e.children})}function Nr(e){return e.level===2?(0,C.jsx)("h2",{...x(k.h2,pn.heading),children:e.children}):(0,C.jsx)("h3",{...x(k.h3,pn.heading),children:e.children})}function H(e){return(0,C.jsx)("p",{role:e.role,"aria-live":e.live===!0?"polite":void 0,...x(k.p,pn.note,e.tone==="bad"&&pn.bad,e.tone==="good"&&pn.good),children:e.children})}function Jt(e){return(0,C.jsx)("p",{...x(k.p,pn.empty),children:e.children})}function Ci(e){return(0,C.jsx)("button",{onClick:()=>e.onPress?.(),disabled:e.disabled,"data-strong":e.strong===!0?"true":void 0,...x(k.button,ae.base,Za.action,e.strong===!0&&Za.strong,e.disabled===!0&&Za.off,e.end===!0&&Za.end),type:"button",children:(0,C.jsx)("span",{...x(k.span),children:e.label})})}var Za={action:{kmuXW:"x2lah0s",kMv6JI:"x1j8uvit",kGuDYH:"x1j6dyjg",kLWn49:"xggjnk3",kb6lSQ:"xmk7bfn",kP9fke:"xtvhhri",kMwMTN:"x1et08zh x7xx714",$$css:!0},strong:{k8WAf4:"x1vvogim",kg3NbH:"x1hr3lfm",kaIpWk:"xq1n3g1",kWkggS:"xcbcf2q xbw9g77",kMv6JI:"x19979ed",kGuDYH:"x4z9k3i",k63SB2:"x1s688f",kb6lSQ:"x12oo3zp",kP9fke:"x6mezaz",kMwMTN:"x7lcjf2 x1pa849f",k1ekBW:"x15406qy",kIyJzY:"x198w77l",$$css:!0},off:{kkrTdU:"xt0e3qv",kMwMTN:"xplcgjq x1u37qj2",$$css:!0},end:{kSGwAc:"xpvyfi4",keoZOQ:"x1hmvnq2",$$css:!0}};function Lr(e){return(0,C.jsxs)("div",{...x(k.div,Ks.row,e.action?.strong===!0&&Ks.centred),children:[(0,C.jsx)(Nr,{children:e.title}),e.action===void 0?null:(0,C.jsx)(Ci,{label:e.action.label,onPress:e.action.onPress,strong:e.action.strong??!1})]})}function jt(e){return(0,C.jsxs)("section",{...x(k.section,ep.column,Zs.g11),children:[(0,C.jsxs)("div",{...x(k.div,Ks.row,e.action?.strong===!0&&Ks.centred),children:[(0,C.jsx)(Ka,{children:e.title}),e.action===void 0?null:(0,C.jsx)(Ci,{label:e.action.label,onPress:e.action.onPress,strong:e.action.strong??!1})]}),e.children]})}var Ks={row:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x1pha0wt",kjj79g:"x1qughib",kOIVth:"x1v2ro7d",$$css:!0},centred:{kGNEyG:"x6s0dn4",$$css:!0}};function Pi(e){return(0,C.jsx)("div",{...x(k.div,no.row),children:e.entries.map(([t,n,o])=>e.pressable===!0?(0,C.jsxs)("button",{onClick:()=>o?.(),...x(k.button,ae.base,no.tile),type:"button",children:[(0,C.jsx)("span",{...x(k.span,no.value),children:t}),(0,C.jsxs)("span",{...x(k.span,no.label),children:[(0,C.jsx)("span",{...x(k.span,no.labelWord),children:n}),(0,C.jsx)("span",{...x(k.span,no.chevron),children:(0,C.jsx)(je,{name:"forward",size:12})})]})]},n):(0,C.jsxs)("div",{...x(k.div,no.tile),children:[(0,C.jsx)("p",{...x(k.p,no.value),children:t}),(0,C.jsx)("p",{...x(k.p,no.labelWord),children:n})]},n))})}var no={row:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kOIVth:"x883omv",$$css:!0},tile:{kzQI83:"x1iyjqo2",kmuXW:"xs83m0k",kCS8Yb:"x1r8uery",k7Eaqz:"xeuugli",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x195vfkc",k8WAf4:"x10dr8xq",kg3NbH:"xqin4a2",kaIpWk:"x2jfb3a",kWkggS:"x10bqf5p",$$css:!0},value:{kGuDYH:"xosj86m",k63SB2:"x1s688f",kcqcaj:"xss6m8b",kMwMTN:"x6gl9h3",$$css:!0},label:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kOIVth:"x1jnr06f",$$css:!0},labelWord:{kGuDYH:"xfifm61",kMwMTN:"x2g0jyv",$$css:!0},chevron:{k1xSpc:"x78zum5",kMwMTN:"x1et08zh",$$css:!0}};function Qs(e){return(0,C.jsx)("button",{onClick:()=>e.onPress?.(),disabled:e.disabled,...x(k.button,ae.base,Ee.cta,e.disabled===!0&&ae.disabled),type:"button",children:(0,C.jsx)("span",{...x(k.span,Ee.ctaWord),children:e.label})})}function Dr(e){let t=e.lit??e.pressed;return(0,C.jsxs)("button",{"aria-pressed":e.pressed,onClick:()=>e.onPress?.(),...x(k.button,ae.base,Ee.pill,t&&Ee.pillOn,e.danger===!0&&Ee.pillDanger),type:"button",children:[e.icon===void 0?null:(0,C.jsx)(je,{name:e.icon,size:20}),(0,C.jsx)("span",{...x(k.span,Ee.pillWord,t&&Ee.pillWordOn,e.danger===!0&&Ee.pillWordDanger),children:e.label})]})}function Js(e){return(0,C.jsx)("div",{...x(k.div,Ee.pills),children:e.children})}function Go(e){return(0,C.jsx)("button",{"aria-pressed":e.pressed,onClick:()=>e.onPress?.(),...x(k.button,ae.base,Ee.chip,e.pressed===!0&&Ee.chipOn),type:"button",children:(0,C.jsx)("span",{...x(k.span,Ee.chipWord,e.pressed===!0&&Ee.chipWordOn),children:e.label})})}function Uo(e){return(0,C.jsx)("div",{role:e.label===void 0?void 0:"group","aria-label":e.label,...x(k.div,Ee.chips),children:e.children})}function ro(e){return(0,C.jsx)("button",{onClick:()=>e.onPress?.(),...x(k.button,ae.base,Ee.wide,e.danger===!0&&Ee.wideDanger),type:"button",children:(0,C.jsx)("span",{...x(k.span,Ee.wideWord,e.danger===!0&&Ee.wideWordDanger),children:e.label})})}function eu(e){return(0,C.jsx)("div",{...x(k.div,Ee.quietRow),children:e.words.map(t=>{let n=typeof t=="string"?null:t,o=n?.word??t;return(0,C.jsx)("button",{"aria-pressed":n?.pressed,onClick:()=>n?.onPress(),...x(k.button,ae.base,Ee.quietButton,n?.pressed===!0&&Ee.quietButtonOn),type:"button",children:(0,C.jsx)("span",{...x(k.span,Ee.quietWord,n?.pressed===!0&&Ee.quietWordOn),children:o})},o)})})}function Cn(e){return(0,C.jsxs)("button",{onClick:()=>e.onPress?.(),...x(k.button,ae.base,Za.action,Ee.back),type:"button",children:[(0,C.jsx)(je,{name:"back",size:14}),(0,C.jsx)("span",{...x(k.span),children:e.label})]})}var Ee={cta:{kzqmXN:"xh8yej3",kAzted:"x1gg8mnh",k8WAf4:"x99dwph",kg3NbH:"x12j899k",kaIpWk:"xq1n3g1",kWkggS:"xcbcf2q xbw9g77",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",k9WMMc:"x2b8uid",k1ekBW:"x15406qy",kIyJzY:"x198w77l",$$css:!0},ctaWord:{kGuDYH:"xif65rj",k63SB2:"x1s688f",kMwMTN:"x7lcjf2",$$css:!0},pills:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kOIVth:"x167g77z",$$css:!0},pill:{kzQI83:"x1iyjqo2",kmuXW:"xs83m0k",kCS8Yb:"x1r8uery",k7Eaqz:"xeuugli",kAzted:"x1gg8mnh",k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kOIVth:"x1j9xkj6",kg3NbH:"xaope02",kMzoRj:"xmkeg23",kVAM5u:"x1bezp6c",kaIpWk:"xq1n3g1",kMwMTN:"xjmdwvf",k1ekBW:"x1eaenvl",kIyJzY:"x198w77l",$$css:!0},pillOn:{kVAM5u:"x17drv8y",kWkggS:"x1pq2xy2",kMwMTN:"xyify0s",$$css:!0},pillDanger:{kVAM5u:"x1gs0kgd",kMwMTN:"xff9hfd",kWkggS:"xjbqb8w x19w7lg2",$$css:!0},pillWord:{kGuDYH:"x2ouz8m",k63SB2:"xk50ysn",khDVqt:"xuxw1ft",kMwMTN:"xjmdwvf",$$css:!0},pillWordOn:{kMwMTN:"xyify0s",$$css:!0},pillWordDanger:{kMwMTN:"xff9hfd",$$css:!0},small:{kmuXW:"x2lah0s",kAzted:"x21xpn4",k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kg3NbH:"xqin4a2",kMzoRj:"xmkeg23",kVAM5u:"x1bezp6c",kaIpWk:"xq1n3g1",$$css:!0},smallWord:{kGuDYH:"x4z9k3i",k63SB2:"xk50ysn",khDVqt:"xuxw1ft",kMwMTN:"xjmdwvf",$$css:!0},chips:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kwnvtZ:"x1a02dak",kOIVth:"x1j9xkj6",$$css:!0},chip:{k8WAf4:"xknfcqp",kg3NbH:"x1l730wp",kMzoRj:"xmkeg23",kVAM5u:"x1bezp6c",kaIpWk:"xq1n3g1",$$css:!0},chipOn:{kVAM5u:"x17drv8y",kWkggS:"x1pq2xy2",$$css:!0},chipWord:{kGuDYH:"x4z9k3i",kMwMTN:"x6yhm7j",$$css:!0},chipWordOn:{kMwMTN:"xyify0s",$$css:!0},wide:{kzqmXN:"xh8yej3",kAzted:"x1gg8mnh",kg3NbH:"x1hr3lfm",kMzoRj:"xmkeg23",kVAM5u:"x1bezp6c",kaIpWk:"x2jfb3a",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",k9WMMc:"x2b8uid",kWkggS:"xjbqb8w x34vq80",k1ekBW:"x15406qy",kIyJzY:"x198w77l",$$css:!0},wideDanger:{kVAM5u:"x1gs0kgd",kWkggS:"xjbqb8w x19w7lg2",$$css:!0},wideWord:{kGuDYH:"xif65rj",k63SB2:"xk50ysn",kMwMTN:"x6gl9h3",$$css:!0},wideWordDanger:{kMwMTN:"xff9hfd",$$css:!0},quietRow:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kOIVth:"x167g77z",kLKAdn:"xyinxu5",kEafiO:"x178xt8z",kPef9Z:"x13fuv20",kLZC3w:"x35e4z7",$$css:!0},quietButton:{kzQI83:"x1iyjqo2",kCS8Yb:"x1r8uery",k8WAf4:"x1m7iz9m",kg3NbH:"x1awh872",kaIpWk:"xur7f20",kWkggS:"x1accutn",kGNEyG:"x6s0dn4",k9WMMc:"x2b8uid",$$css:!0},quietButtonOn:{kWkggS:"x1pq2xy2",$$css:!0},quietWord:{kGuDYH:"x1ct8sxb",kMwMTN:"xf58yzy",$$css:!0},quietWordOn:{kMwMTN:"xyify0s",$$css:!0},back:{kSGwAc:"xqcrz7y",k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kOIVth:"x17d4w8g",kAzted:"xu97haq",kZCmMZ:"x25sj25",kwRFfy:"x2vl965",keTefX:"xw01apr",kaIpWk:"xq1n3g1",kWkggS:"xjbqb8w x6ikqrn",$$css:!0}};function fb(e){return(0,C.jsx)("div",{...x(k.div,V.group),children:e.children})}function _i(e){let t=(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("span",{...x(k.span,V.key),children:e.name}),(0,C.jsx)("span",{...x(k.span,V.value,e.accent===!0&&pn.accent),children:e.value})]});return e.onPress===void 0?(0,C.jsx)("div",{...x(k.div,V.detail),children:t}):(0,C.jsx)("button",{onClick:()=>e.onPress?.(),...x(k.button,ae.base,V.detail),type:"button",children:t})}function At(e){return(0,C.jsx)("ul",{...x(k.ul,V.list),children:e.children})}function mn(e){let t=e.end??{};return(0,C.jsxs)("li",{"data-state":e.state,...x(k.li,V.item),children:[(0,C.jsx)(zi,{hue:e.hue,shape:"thumb",picture:e.picture??null}),(0,C.jsxs)("div",{...x(k.div,V.itemText),children:[(0,C.jsx)("p",{...x(k.p,V.itemTitle),children:e.title}),(0,C.jsx)("p",{...x(k.p,V.itemNote),children:e.meta})]}),t.state!==void 0?(0,C.jsx)("span",{"data-state":t.state.kind,...x(k.span,V.state,t.state.kind==="live"&&V.stateLive,t.state.kind==="rejected"&&V.stateBad),children:t.state.word}):t.action!==void 0?(0,C.jsx)(Ci,{label:t.action.label,onPress:t.action.onPress}):null]})}function pb(e){let t=(0,C.jsx)(zi,{hue:e.hue,shape:"face",picture:e.picture}),n=e.end;return(0,C.jsxs)("li",{...x(k.li,V.item),children:[e.onPress===void 0?(0,C.jsxs)("div",{...x(k.div,V.person),children:[t,(0,C.jsxs)("div",{...x(k.div,V.itemText),children:[(0,C.jsx)("p",{...x(k.p,V.itemTitle),children:e.name}),e.note===""?null:(0,C.jsx)("p",{...x(k.p,V.itemNote),children:e.note})]})]}):(0,C.jsxs)("button",{onClick:()=>e.onPress?.(),...x(k.button,ae.base,V.person),type:"button",children:[t,(0,C.jsxs)("span",{...x(k.span,V.itemText),children:[(0,C.jsx)("span",{...x(k.span,V.itemTitle),children:e.name}),e.note===""?null:(0,C.jsx)("span",{...x(k.span,V.itemNote),children:e.note})]})]}),n===void 0?null:(0,C.jsx)("button",{"aria-pressed":n.pressed,onClick:()=>n.onPress?.(),...x(k.button,ae.base,Ee.small,n.lit&&Ee.pillOn),type:"button",children:(0,C.jsx)("span",{...x(k.span,Ee.smallWord,n.lit&&Ee.pillWordOn),children:n.label})})]})}function mb(e){return(0,C.jsxs)("button",{onClick:()=>e.onPress?.(),...x(k.button,ae.base,Fa.row),type:"button",children:[(0,C.jsx)("span",{...x(k.span,Fa.stack),children:e.faces.map((t,n)=>(0,C.jsx)("span",{...x(k.span,Fa.ring,n>0&&Fa.under),children:(0,C.jsx)(zi,{hue:t.hue,shape:"mini",picture:t.picture})},n))}),(0,C.jsx)("span",{...x(k.span,Fa.words),children:e.words})]})}var Fa={row:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kOIVth:"x883omv",kSGwAc:"xqcrz7y",ks0D6T:"x193iq5w",$$css:!0},stack:{kmuXW:"x2lah0s",k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",$$css:!0},ring:{k1xSpc:"x78zum5",kMzoRj:"xdh2fpr",ksu8eU:"x1y0btm7",kVAM5u:"xyudh7a",kaIpWk:"xq1n3g1",$$css:!0},under:{keTefX:"x1qfufaz",$$css:!0},words:{kmuXW:"xs83m0k",k7Eaqz:"xeuugli",kGuDYH:"x4z9k3i",kLWn49:"x37zpob",kMwMTN:"xupo0id",$$css:!0}};function hb(e){let t=(0,C.jsx)("span",{"data-live":String(e.live),...x(k.span,V.dot,e.live&&V.dotLive)});if(e.onPress===void 0)return(0,C.jsxs)("li",{...x(k.li,V.item,V.stacked),children:[t,(0,C.jsxs)("div",{...x(k.div,V.itemText,V.stackedText),children:[(0,C.jsx)("p",{...x(k.p,V.itemTitle,V.stackedTitle),children:e.title}),e.body==null?null:(0,C.jsx)("p",{...x(k.p,V.itemNote,V.stackedNote),children:e.body})]}),(0,C.jsx)("p",{...x(k.p,V.when),children:e.when})]});let n=e.action;return(0,C.jsxs)("li",{...x(k.li,V.holder,n!==void 0&&V.split),children:[(0,C.jsxs)("button",{onClick:()=>e.onPress?.(),...x(k.button,ae.base,V.item,V.stacked,V.pressed,n!==void 0&&V.shared),type:"button",children:[t,(0,C.jsxs)("span",{...x(k.span,V.itemText,V.stackedText),children:[(0,C.jsx)("span",{...x(k.span,V.itemTitle,V.stackedTitle),children:e.title}),e.body==null?null:(0,C.jsx)("span",{...x(k.span,V.itemNote,V.stackedNote),children:e.body})]}),n===void 0?(0,C.jsx)("span",{...x(k.span,V.when),children:e.when}):null]}),n===void 0?null:(0,C.jsxs)("div",{...x(k.div,V.actionEnd),children:[(0,C.jsx)("p",{...x(k.p,V.when,V.whenOver),children:e.when}),(0,C.jsx)(Ci,{label:n.label,onPress:n.onPress})]})]})}var V={group:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x12mrbbr",kaIpWk:"x2jfb3a",kVQacm:"xb3r6kr",$$css:!0},detail:{kzqmXN:"xh8yej3",k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kjj79g:"x1qughib",kOIVth:"x1v2ro7d",k8WAf4:"xrii95j",kg3NbH:"xqin4a2",kWkggS:"xvqquxf",kaIpWk:"x2u8bby",$$css:!0},key:{kmuXW:"x2lah0s",kGuDYH:"x4z9k3i",kMwMTN:"x2g0jyv",$$css:!0},value:{k7Eaqz:"xeuugli",kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",kGuDYH:"x4z9k3i",k63SB2:"xk50ysn",k9WMMc:"x1hr2gdg",kMwMTN:"x6gl9h3",$$css:!0},list:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x167g77z",kB88ic:"xe8uvvx",$$css:!0},item:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kOIVth:"x1v2ro7d",k8WAf4:"x1m7iz9m",kZCmMZ:"x7coems",kwRFfy:"xpdmqnj",kaIpWk:"x2jfb3a",kWkggS:"xvqquxf x34vq80",$$css:!0},stacked:{kGNEyG:"x1cy8zhl",k8WAf4:"x99dwph",kg3NbH:"xqin4a2",$$css:!0},holder:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",$$css:!0},split:{kXwgrk:"x1q0g3np",kGNEyG:"x1qjc9v5",kaIpWk:"x2jfb3a",kWkggS:"xvqquxf x34vq80",$$css:!0},shared:{kzQI83:"x1iyjqo2",kmuXW:"xs83m0k",k7Eaqz:"xeuugli",kzqmXN:"x14atkfc",kwRFfy:"xyri2b",kWkggS:"xjbqb8w",$$css:!0},actionEnd:{kmuXW:"x2lah0s",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kGNEyG:"xuk3077",kjj79g:"x1qughib",kOIVth:"x167g77z",k8WAf4:"x99dwph",kZCmMZ:"x1g0dm76",kwRFfy:"x1pic42t",$$css:!0},whenOver:{kSGwAc:"xpvyfi4",$$css:!0},person:{kzQI83:"x1iyjqo2",kmuXW:"xs83m0k",k7Eaqz:"xeuugli",k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kOIVth:"x1v2ro7d",$$css:!0},pressed:{kzqmXN:"xh8yej3",$$css:!0},itemText:{kzQI83:"x1iyjqo2",kmuXW:"xs83m0k",k7Eaqz:"xeuugli",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x195vfkc",$$css:!0},stackedText:{kOIVth:"x1ed6fcf",$$css:!0},itemTitle:{kGuDYH:"xif65rj",k63SB2:"xk50ysn",kLWn49:"x1xfvgam",kMwMTN:"x6gl9h3",kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",$$css:!0},stackedTitle:{khDVqt:"xeaf4i8",kN2L0X:"x1fzhlzt",$$css:!0},itemNote:{kGuDYH:"xfifm61",kLWn49:"x37zpob",kMwMTN:"x2g0jyv",$$css:!0},stackedNote:{kGuDYH:"x4z9k3i",kLWn49:"xfrs9s4",kMwMTN:"xupo0id",kN2L0X:"x1fzhlzt",$$css:!0},when:{kmuXW:"x2lah0s",kSGwAc:"xqcrz7y",kMv6JI:"x1j8uvit",kGuDYH:"x1j6dyjg",kMwMTN:"xupo0id",$$css:!0},dot:{kmuXW:"x2lah0s",kSGwAc:"xqcrz7y",keoZOQ:"x1k70j0n",kzqmXN:"xci0xqf",kZKoxP:"x1hagigm",kaIpWk:"xq1n3g1",kWkggS:"xgrp9kk",$$css:!0},dotLive:{kWkggS:"xcbcf2q",$$css:!0},state:{kmuXW:"x2lah0s",kSGwAc:"xqcrz7y",k8WAf4:"xj8oexa",kg3NbH:"xdqyycr",kMzoRj:"xmkeg23",ksu8eU:"x1y0btm7",kVAM5u:"x1hobkz3",kaIpWk:"xq1n3g1",kMv6JI:"x1j8uvit",kGuDYH:"x1s31vzs",kb6lSQ:"x4ozb64",kP9fke:"xtvhhri",kMwMTN:"xupo0id",$$css:!0},stateLive:{kVAM5u:"x1ekxq7s",kMwMTN:"x1et08zh",$$css:!0},stateBad:{kVAM5u:"x1gs0kgd",kMwMTN:"xff9hfd",$$css:!0}};function zi(e){let[t,n]=_r(e.hue);return(0,C.jsx)("div",{"aria-hidden":!0,...x(k.div,Ys.base,Ys[e.shape],Ys.stripes(t,zr(t,n))),children:e.picture==null?null:(0,C.jsx)("img",{src:e.picture,alt:"",decoding:"async",...x(k.img,Ys.picture)})})}var Ys={base:{kmuXW:"x2lah0s",kaIpWk:"xu4hgxq",kVQacm:"xb3r6kr",$$css:!0},thumb:{kzqmXN:"x187nhsf",kZKoxP:"xn3w4p2",$$css:!0},avatar:{kzqmXN:"x1u78mur",kZKoxP:"xwa7hi",kaIpWk:"xq1n3g1",$$css:!0},face:{kzqmXN:"x100vrsf",kZKoxP:"x1vqgdyp",kaIpWk:"xq1n3g1",$$css:!0},mini:{kzqmXN:"x17z2i9w",kZKoxP:"x17rw0jw",kaIpWk:"xq1n3g1",$$css:!0},stripes:(e,t)=>[{kWkggS:e!=null?"xl8spv7":e,kKwaWg:t!=null?"x1e87kdn":t,$$css:!0},{"--x-backgroundColor":e??void 0,"--x-backgroundImage":t??void 0}],picture:{k1xSpc:"x1lliihq",kzqmXN:"xh8yej3",kZKoxP:"x5yr21d",kVIFPx:"xl1xv1r",$$css:!0}};function tu(e){return(0,C.jsxs)("div",{...x(k.div,Fs.row),children:[(0,C.jsx)(zi,{hue:e.hue,shape:"avatar",picture:e.picture??null}),(0,C.jsxs)("div",{...x(k.div,V.itemText),children:[(0,C.jsx)("h3",{...x(k.h3,pn.heading,Fs.name),children:e.name}),e.note===""?null:(0,C.jsx)("p",{...x(k.p,Fs.note),children:e.note})]}),e.end===void 0?null:(0,C.jsx)("div",{...x(k.div,Fs.end),children:e.end})]})}var Fs={row:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kOIVth:"x1af02g3",$$css:!0},end:{kSGwAc:"xqcrz7y",kmuXW:"x2lah0s",keTefX:"xvc5jky",$$css:!0},name:{kGuDYH:"x1q7jzdg",$$css:!0},note:{kGuDYH:"x4z9k3i",kLWn49:"x37zpob",kMwMTN:"xupo0id",$$css:!0}};function tp(e){let t=Math.round(Math.max(0,Math.min(1,e.share))*100),n=`${t}%`;return(0,C.jsx)("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":t,...x(k.div,Ri.track,e.size==="large"&&Ri.large,e.quiet===!0&&Ri.quietTrack),children:(0,C.jsx)("div",{...x(k.div,Ri.fill,e.kind==="level"&&Ri.level,Ri.width(n))})})}var Ri={track:{kZKoxP:"xqu0tyb",kaIpWk:"xq1n3g1",kWkggS:"xl5a5w2",kVQacm:"xb3r6kr",$$css:!0},quietTrack:{kWkggS:"x1qg24v8",$$css:!0},large:{kZKoxP:"x1ycjhwn",$$css:!0},fill:{kZKoxP:"x5yr21d",kaIpWk:"xq1n3g1",kWkggS:"xcbcf2q",k1ekBW:"xxrbq2n",kIyJzY:"xppnxx3",$$css:!0},level:{kWkggS:"xxgsjm4",$$css:!0},width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function iO(e){return(0,C.jsx)("button",{"aria-pressed":e.on,"aria-label":e.label,disabled:e.disabled,onClick:()=>e.onPress?.(),...x(k.button,ae.base,oo.track,e.on&&oo.trackOn,e.disabled===!0&&ae.disabled),type:"button",children:(0,C.jsx)("span",{...x(k.span,oo.knob,e.on&&oo.knobOn)})})}function Bo(e){let[t,n]=(0,qo.useState)(e.initially??!1),o=e.on??t;return(0,C.jsxs)("div",{...x(k.div,oo.row,e.disabled===!0&&oo.rowFixed),children:[(0,C.jsxs)("div",{...x(k.div,oo.text),children:[(0,C.jsx)("p",{...x(k.p,oo.name),children:e.name}),(0,C.jsx)("p",{...x(k.p,oo.hint),children:e.hint})]}),(0,C.jsx)(iO,{on:o,label:e.name,disabled:e.disabled,onPress:()=>{e.disabled!==!0&&(e.on===void 0&&n(!o),e.onChange?.(!o))}})]})}function Ir(e){return(0,C.jsx)("div",{...x(k.div,ep.column,Zs.g6),children:e.children})}var oo={track:{kmuXW:"x2lah0s",kzqmXN:"x1guw455",kZKoxP:"x17rw0jw",kmVPX3:"x9ms5i6",kaIpWk:"xq1n3g1",kWkggS:"x14oy2qj",k1ekBW:"x15406qy",kIyJzY:"xppnxx3",$$css:!0},trackOn:{kWkggS:"xcbcf2q",$$css:!0},knob:{k1xSpc:"x1lliihq",kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",kaIpWk:"xq1n3g1",kWkggS:"x18o6w94",k1ekBW:"x18dpk69",kIyJzY:"xppnxx3",$$css:!0},knobOn:{kWkggS:"x1imo5h9",k3aq6I:"x1psfjxj",$$css:!0},row:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kjj79g:"x1qughib",kOIVth:"x1af02g3",k8WAf4:"xrii95j",kg3NbH:"xqin4a2",kaIpWk:"x2jfb3a",kWkggS:"xvqquxf x34vq80",kkrTdU:"x1ypdohk",$$css:!0},rowFixed:{kWkggS:"xvqquxf",kkrTdU:"xt0e3qv",$$css:!0},text:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x195vfkc",k7Eaqz:"xeuugli",$$css:!0},name:{kGuDYH:"xif65rj",k63SB2:"xk50ysn",kMwMTN:"x6gl9h3",$$css:!0},hint:{kGuDYH:"xfifm61",kMwMTN:"xupo0id",kN2L0X:"x1fzhlzt",$$css:!0}},It={input:{kzqmXN:"xh8yej3",k7Eaqz:"xeuugli",kAzted:"x1gg8mnh",k8WAf4:"xt970qd",kg3NbH:"xaope02",kMzoRj:"xmkeg23",ksu8eU:"x1y0btm7",kVAM5u:"xy8xi9c x1ob2h3n",kaIpWk:"x2jfb3a",kWkggS:"x10bqf5p",kMwMTN:"x6gl9h3",kMv6JI:"x19979ed",kGuDYH:"xif65rj",k3XXqK:"x1t137rt x9v5kkp",kMeerF:"x1de99jn",kjBf7l:"xfn9q2g",kInvED:"x1hl8ikr",k8Qsv1:"x1ts6uyu",$$css:!0},danger:{kVAM5u:"x1gs0kgd",kjBf7l:"xbcy99i",$$css:!0},label:{kGuDYH:"x4z9k3i",kMwMTN:"xupo0id",$$css:!0}};function nu(e){let[t,n]=(0,qo.useState)(!1),[o,r]=(0,qo.useState)(""),[i,a]=(0,qo.useState)(null),[l,s]=(0,qo.useState)(!1),u=(0,qo.useId)(),f=()=>{n(!1),r(""),a(null)},m=()=>{if(o.trim()!==e.phrase){a(e.ask);return}s(!0),e.onConfirm().then(c=>{s(!1),c===null?f():a(c)})};return(0,C.jsx)(le,{gap:8,parted:!0,children:t?(0,C.jsxs)("div",{"data-step":"delete",...x(k.div,Qf.box),children:[(0,C.jsx)("label",{htmlFor:u,...x(k.label,Qf.ask),children:e.ask}),(0,C.jsx)("input",{id:u,name:"confirm",type:"text",autoComplete:"off",spellCheck:!1,autoFocus:!0,placeholder:e.phrase,value:o,onInput:c=>r(c.target.value),onChange:()=>{},onKeyDown:c=>{c.key==="Enter"&&m()},...x(k.input,It.input,It.danger),dir:"auto"}),i===null?null:(0,C.jsx)(H,{role:"alert",tone:"bad",children:i}),(0,C.jsxs)("div",{...x(k.div,Qf.row),children:[(0,C.jsx)(Se,{label:"Cancel",kind:"quiet",onPress:f}),(0,C.jsx)(Se,{label:e.label,kind:"danger",disabled:l,onPress:m})]})]}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(ro,{label:e.label,danger:!0,onPress:()=>n(!0)}),(0,C.jsx)(Jt,{children:e.note})]})})}var Qf={box:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x167g77z",kmVPX3:"xc7ga6q",kMzoRj:"xmkeg23",ksu8eU:"x1y0btm7",kVAM5u:"x1gs0kgd",kaIpWk:"x2jfb3a",kWkggS:"x16pgvrn",$$css:!0},ask:{kGuDYH:"x4z9k3i",kMwMTN:"xff9hfd",$$css:!0},row:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kOIVth:"x167g77z",$$css:!0}};function Se(e){return(0,C.jsx)("button",{onClick:()=>e.onPress?.(),disabled:e.disabled,"data-action":e.data?.action,"data-provider":e.data?.provider,"data-quiet":e.kind==="quiet"?"true":void 0,"data-danger":e.kind==="danger"?"true":void 0,...x(k.button,ae.base,Ho.base,e.kind==="quiet"&&Ho.quiet,e.kind==="danger"&&Ho.danger,e.disabled===!0&&ae.disabled,e.even===!0&&Ho.even),type:"button",children:(0,C.jsx)("span",{...x(k.span,Ho.word,e.kind==="quiet"&&Ho.quietWord,e.kind==="danger"&&Ho.dangerWord),children:e.label})})}function ou(e){return(0,C.jsx)("div",{...x(k.div,Ho.row),children:e.children})}var Ho={row:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kOIVth:"x167g77z",$$css:!0},even:{kzQI83:"x1iyjqo2",kmuXW:"xs83m0k",kCS8Yb:"x1r8uery",k7Eaqz:"xeuugli",$$css:!0},base:{kmuXW:"x2lah0s",kAzted:"x1gg8mnh",kg3NbH:"x12j899k",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kaIpWk:"xq1n3g1",kWkggS:"xcbcf2q",$$css:!0},quiet:{kWkggS:"xjbqb8w",kMzoRj:"xmkeg23",kVAM5u:"x1bezp6c",$$css:!0},danger:{kWkggS:"xjbqb8w",kMzoRj:"xmkeg23",kVAM5u:"x1gs0kgd",$$css:!0},word:{kGuDYH:"xif65rj",k63SB2:"x1s688f",kMwMTN:"x7lcjf2",$$css:!0},quietWord:{kMwMTN:"x6gl9h3",$$css:!0},dangerWord:{kMwMTN:"xff9hfd",$$css:!0}};var Ht=F(De(),1);var gb={query:"",part:"games"},np=600,Bn="game",jr="you",Hr="create",Qa="settings";function op(e,t){let n={tab:e[0]?.id??Bn,segments:t,segment:t[0]?.id??null,creator:null,recap:null,upload:!1,visit:0},o=new Set,r=()=>`Back to ${(e.find(f=>f.id===n.tab)?.label??"Game").toLowerCase()}`,i=new Set,a=jo(gb,(f,m)=>f.query===m.query&&f.part===m.part),l=new Set;function s(f,m=!0){let c=u.showing();n={...f,visit:n.visit+(m?1:0)};for(let g of[...o])g();let p=u.showing();if(p!==c)for(let g of[...i])g(p)}let u={state:()=>n,subscribe(f){return o.add(f),()=>o.delete(f)},selectTab(f){e.some(m=>m.id===f)&&(a.set(gb),s({...n,tab:f,creator:null,recap:null,upload:!1}))},setSegments(f){let m=f.some(c=>c.id===n.segment)?n.segment:f[0]?.id??null;s({...n,segments:f,segment:m},u.showing()!==null)},show(f){return n.segments.some(m=>m.id===f)?(s({...n,tab:Bn,segment:f,creator:null,recap:null,upload:!1}),!0):!1},refresh(f){n.creator!==null||n.recap!==null||n.tab!==Bn||n.segment!==f||s(n)},openCreator(f){s({...n,creator:{handle:f,from:r()},recap:null})},closeCreator(){n.creator!==null&&s({...n,creator:null})},openRecap(f){s({...n,recap:{recap:f,from:r()},creator:null})},closeRecap(){n.recap!==null&&s({...n,recap:null})},openUpload(){e.some(f=>f.id===jr)&&s({...n,tab:jr,creator:null,recap:null,upload:!0})},back(){return n.creator===null&&n.recap===null?!1:(s({...n,creator:null,recap:null}),!0)},showing(){return n.creator!==null||n.recap!==null||n.tab!==Bn?null:n.segment},on(f){return i.add(f),()=>i.delete(f)},search:a,nearEnd(){for(let f of[...l])f()},onNearEnd(f){return l.add(f),()=>l.delete(f)}};return u}var Ja=(0,Ht.createContext)(void 0),ru=(0,Ht.createContext)({tab:Bn});function yt(){let e=(0,Ht.useContext)(Ja);return t=>e?.(t)}function iu(){return(0,Ht.useContext)(ru)}var rp=(0,Ht.createContext)(void 0);function yb(){return(0,Ht.useContext)(rp)}var ip=(0,Ht.createContext)(void 0);function vb(e){let t=(0,Ht.useContext)(ip),n=(0,Ht.useRef)(e);n.current=e,(0,Ht.useEffect)(()=>t?.(()=>n.current()),[t])}var ge=F(Ie(),1);function ap(e){let t=e.view,n=yt(),[o,r]=(0,io.useState)(!1),[i,a]=(0,io.useState)(!1),l=t.reported||i,s=(u,f)=>()=>{n({event:"about_clicked",control:u}),f()};return(0,ge.jsxs)(le,{gap:20,children:[t.tagline===null?null:(0,ge.jsx)(Ka,{accent:!0,children:t.tagline}),t.description===null||t.description===""?null:(0,ge.jsx)(dt,{children:t.description}),(0,ge.jsx)(Pi,{entries:[[t.plays,"plays"],[String(t.badges),"badges"]]}),(0,ge.jsxs)(le,{gap:8,children:[(0,ge.jsx)(Qs,{label:"Play again",onPress:s("play",t.onPlay)}),(0,ge.jsxs)(Js,{children:[(0,ge.jsx)(Dr,{icon:"thumb",label:t.likes,pressed:t.liked,onPress:s(t.liked?"unlike":"like",t.onLike)}),(0,ge.jsx)(Dr,{icon:"bookmark",label:t.bookmarked?"Saved":"Save",pressed:t.bookmarked,onPress:s(t.bookmarked?"unsave":"save",t.onBookmark)}),(0,ge.jsx)(Dr,{icon:"nodes",label:"Share",pressed:!1,onPress:s("share",t.onShare)})]})]}),(0,ge.jsx)(jt,{title:"Details",children:(0,ge.jsxs)(fb,{children:[(0,ge.jsx)(_i,{name:"Creator",value:`@${t.owner}`,accent:!0,onPress:s("creator",t.onCreator)}),(0,ge.jsx)(_i,{name:"Identifier",value:t.id}),t.version===null?null:(0,ge.jsx)(_i,{name:"Version",value:t.version}),(0,ge.jsx)(_i,{name:"Released",value:Rt(t.publishedAt)}),t.input===null?null:(0,ge.jsx)(_i,{name:"Input",value:t.input})]})}),(0,ge.jsx)(eu,{words:[{word:t.disliked?"Disliked":"Dislike",pressed:t.disliked,onPress:s(t.disliked?"undislike":"dislike",t.onDislike)},...t.onReport===null?[]:[{word:l?"Reported":"Report",pressed:l||o,onPress:()=>{o||n({event:"about_clicked",control:"report"}),a(!1),r(!o)}}]]}),o&&t.onReport!==null?(0,ge.jsx)(aO,{onSend:async u=>{let f=await t.onReport(u);return f&&(n({event:"about_clicked",control:"report_sent"}),r(!1),a(!0)),f},onCancel:()=>r(!1)}):null,i?(0,ge.jsx)(H,{role:"status",tone:"good",live:!0,children:"Thanks for telling us. We\\u2019ll take a look."}):null]})}function aO(e){let[t,n]=(0,io.useState)(null),[o,r]=(0,io.useState)(""),[i,a]=(0,io.useState)(!1),[l,s]=(0,io.useState)(!1),u=(0,io.useId)(),f=()=>{t===null||i||(a(!0),s(!1),e.onSend({reason:t,note:o.trim()}).then(m=>{a(!1),m||s(!0)}))};return(0,ge.jsxs)(le,{gap:10,children:[(0,ge.jsx)(Uo,{label:"Why are you reporting this game?",children:cf.map(m=>(0,ge.jsx)(Go,{label:df[m],pressed:t===m,onPress:()=>n(m)},m))}),(0,ge.jsx)("label",{htmlFor:u,...x(k.label,It.label),children:"Anything to add? (optional)"}),(0,ge.jsx)("input",{id:u,name:"note",type:"text",maxLength:ff,value:o,onInput:m=>r(m.target.value),onChange:()=>{},onKeyDown:m=>{m.key==="Enter"&&f()},...x(k.input,It.input),dir:"auto"}),l?(0,ge.jsx)(H,{role:"alert",tone:"bad",children:"That report didn\\u2019t reach us. Try again."}):null,(0,ge.jsxs)(ou,{children:[(0,ge.jsx)(Se,{label:"Cancel",kind:"quiet",even:!0,onPress:e.onCancel}),(0,ge.jsx)(Se,{label:i?"Sending\\u2026":"Send report",even:!0,disabled:t===null||i,onPress:f})]})]})}var U=F(De(),1);var bb=F(Ie(),1);function au(e){return(0,bb.jsx)("input",{id:e.id,type:"file",accept:e.accept,"aria-label":e.label,disabled:e.disabled,onChange:t=>e.onPick(t.currentTarget.files?.[0]??null),className:"xh8yej3 xeuugli x1gg8mnh xt970qd xaope02 xmkeg23 x1y0btm7 xy8xi9c x2jfb3a x10bqf5p x6gl9h3 x19979ed xif65rj"})}var lp=!0;var _b=F(De(),1);var qr=(e=>(e[e.Border=-1]="Border",e[e.Data=0]="Data",e[e.Function=1]="Function",e[e.Position=2]="Position",e[e.Timing=3]="Timing",e[e.Alignment=4]="Alignment",e))(qr||{}),lO=[0,1],kb=[1,0],Sb=[2,3],wb=[3,2],sO={L:lO,M:kb,Q:Sb,H:wb},uO=/^\\d*$/,cO=/^[A-Z0-9 $%*+./:-]*$/,sp="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",fp=1,pp=40,xb=3,dO=3,lu=40,fO=10,Ab=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],Eb=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],up=class{constructor(t,n,o,r){if(this.version=t,this.ecc=n,t<fp||t>pp)throw new RangeError("Version value out of range");if(r<-1||r>7)throw new RangeError("Mask value out of range");this.size=t*4+17;let i=Array.from({length:this.size}).fill(!1);for(let l=0;l<this.size;l++)this.modules.push(i.slice()),this.types.push(i.map(()=>0));this.drawFunctionPatterns();let a=this.addEccAndInterleave(o);if(this.drawCodewords(a),r===-1){let l=1e9;for(let s=0;s<8;s++){this.applyMask(s),this.drawFormatBits(s);let u=this.getPenaltyScore();u<l&&(r=s,l=u),this.applyMask(s)}}this.mask=r,this.applyMask(r),this.drawFormatBits(r)}size;mask;modules=[];types=[];getModule(t,n){return t>=0&&t<this.size&&n>=0&&n<this.size&&this.modules[n][t]}drawFunctionPatterns(){for(let o=0;o<this.size;o++)this.setFunctionModule(6,o,o%2===0,qr.Timing),this.setFunctionModule(o,6,o%2===0,qr.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let t=this.getAlignmentPatternPositions(),n=t.length;for(let o=0;o<n;o++)for(let r=0;r<n;r++)o===0&&r===0||o===0&&r===n-1||o===n-1&&r===0||this.drawAlignmentPattern(t[o],t[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){let n=this.ecc[1]<<3|t,o=n;for(let i=0;i<10;i++)o=o<<1^(o>>>9)*1335;let r=(n<<10|o)^21522;for(let i=0;i<=5;i++)this.setFunctionModule(8,i,ao(r,i));this.setFunctionModule(8,7,ao(r,6)),this.setFunctionModule(8,8,ao(r,7)),this.setFunctionModule(7,8,ao(r,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,ao(r,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,ao(r,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,ao(r,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let o=0;o<12;o++)t=t<<1^(t>>>11)*7973;let n=this.version<<12|t;for(let o=0;o<18;o++){let r=ao(n,o),i=this.size-11+o%3,a=Math.floor(o/3);this.setFunctionModule(i,a,r),this.setFunctionModule(a,i,r)}}drawFinderPattern(t,n){for(let o=-4;o<=4;o++)for(let r=-4;r<=4;r++){let i=Math.max(Math.abs(r),Math.abs(o)),a=t+r,l=n+o;a>=0&&a<this.size&&l>=0&&l<this.size&&this.setFunctionModule(a,l,i!==2&&i!==4,qr.Position)}}drawAlignmentPattern(t,n){for(let o=-2;o<=2;o++)for(let r=-2;r<=2;r++)this.setFunctionModule(t+r,n+o,Math.max(Math.abs(r),Math.abs(o))!==1,qr.Alignment)}setFunctionModule(t,n,o,r=qr.Function){this.modules[n][t]=o,this.types[n][t]=r}addEccAndInterleave(t){let n=this.version,o=this.ecc;if(t.length!==su(n,o))throw new RangeError("Invalid argument");let r=Eb[o[0]][n],i=Ab[o[0]][n],a=Math.floor(cp(n)/8),l=r-a%r,s=Math.floor(a/r),u=[],f=kO(i);for(let c=0,p=0;c<r;c++){let g=t.slice(p,p+s-i+(c<l?0:1));p+=g.length;let S=SO(g,f);c<l&&g.push(0),u.push(g.concat(S))}let m=[];for(let c=0;c<u[0].length;c++)u.forEach((p,g)=>{(c!==s-i||g>=l)&&m.push(p[c])});return m}drawCodewords(t){if(t.length!==Math.floor(cp(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let o=this.size-1;o>=1;o-=2){o===6&&(o=5);for(let r=0;r<this.size;r++)for(let i=0;i<2;i++){let a=o-i,s=(o+1&2)===0?this.size-1-r:r;!this.types[s][a]&&n<t.length*8&&(this.modules[s][a]=ao(t[n>>>3],7-(n&7)),n++)}}}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let n=0;n<this.size;n++)for(let o=0;o<this.size;o++){let r;switch(t){case 0:r=(o+n)%2===0;break;case 1:r=n%2===0;break;case 2:r=o%3===0;break;case 3:r=(o+n)%3===0;break;case 4:r=(Math.floor(o/3)+Math.floor(n/2))%2===0;break;case 5:r=o*n%2+o*n%3===0;break;case 6:r=(o*n%2+o*n%3)%2===0;break;case 7:r=((o+n)%2+o*n%3)%2===0;break;default:throw new Error("Unreachable")}!this.types[n][o]&&r&&(this.modules[n][o]=!this.modules[n][o])}}getPenaltyScore(){let t=0;for(let i=0;i<this.size;i++){let a=!1,l=0,s=[0,0,0,0,0,0,0];for(let u=0;u<this.size;u++)this.modules[i][u]===a?(l++,l===5?t+=xb:l>5&&t++):(this.finderPenaltyAddHistory(l,s),a||(t+=this.finderPenaltyCountPatterns(s)*lu),a=this.modules[i][u],l=1);t+=this.finderPenaltyTerminateAndCount(a,l,s)*lu}for(let i=0;i<this.size;i++){let a=!1,l=0,s=[0,0,0,0,0,0,0];for(let u=0;u<this.size;u++)this.modules[u][i]===a?(l++,l===5?t+=xb:l>5&&t++):(this.finderPenaltyAddHistory(l,s),a||(t+=this.finderPenaltyCountPatterns(s)*lu),a=this.modules[u][i],l=1);t+=this.finderPenaltyTerminateAndCount(a,l,s)*lu}for(let i=0;i<this.size-1;i++)for(let a=0;a<this.size-1;a++){let l=this.modules[i][a];l===this.modules[i][a+1]&&l===this.modules[i+1][a]&&l===this.modules[i+1][a+1]&&(t+=dO)}let n=0;for(let i of this.modules)n=i.reduce((a,l)=>a+(l?1:0),n);let o=this.size*this.size,r=Math.ceil(Math.abs(n*20-o*10)/o)-1;return t+=r*fO,t}getAlignmentPatternPositions(){if(this.version===1)return[];{let t=Math.floor(this.version/7)+2,n=this.version===32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,o=[6];for(let r=this.size-7;o.length<t;r-=n)o.splice(1,0,r);return o}}finderPenaltyCountPatterns(t){let n=t[1],o=n>0&&t[2]===n&&t[3]===n*3&&t[4]===n&&t[5]===n;return(o&&t[0]>=n*4&&t[6]>=n?1:0)+(o&&t[6]>=n*4&&t[0]>=n?1:0)}finderPenaltyTerminateAndCount(t,n,o){return t&&(this.finderPenaltyAddHistory(n,o),n=0),n+=this.size,this.finderPenaltyAddHistory(n,o),this.finderPenaltyCountPatterns(o)}finderPenaltyAddHistory(t,n){n[0]===0&&(t+=this.size),n.pop(),n.unshift(t)}};function lo(e,t,n){if(t<0||t>31||e>>>t)throw new RangeError("Value out of range");for(let o=t-1;o>=0;o--)n.push(e>>>o&1)}function ao(e,t){return(e>>>t&1)!==0}var el=class{constructor(t,n,o){if(this.mode=t,this.numChars=n,this.bitData=o,n<0)throw new RangeError("Invalid argument");this.bitData=o.slice()}getData(){return this.bitData.slice()}},pO=[1,10,12,14],mO=[2,9,11,13],hO=[4,8,16,16];function Mb(e,t){return e[Math.floor((t+7)/17)+1]}function Tb(e){let t=[];for(let n of e)lo(n,8,t);return new el(hO,e.length,t)}function gO(e){if(!Ob(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let n=0;n<e.length;){let o=Math.min(e.length-n,3);lo(Number.parseInt(e.substring(n,n+o),10),o*3+1,t),n+=o}return new el(pO,e.length,t)}function yO(e){if(!Rb(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t=[],n;for(n=0;n+2<=e.length;n+=2){let o=sp.indexOf(e.charAt(n))*45;o+=sp.indexOf(e.charAt(n+1)),lo(o,11,t)}return n<e.length&&lo(sp.indexOf(e.charAt(n)),6,t),new el(mO,e.length,t)}function vO(e){return e===""?[]:Ob(e)?[gO(e)]:Rb(e)?[yO(e)]:[Tb(xO(e))]}function Ob(e){return uO.test(e)}function Rb(e){return cO.test(e)}function bO(e,t){let n=0;for(let o of e){let r=Mb(o.mode,t);if(o.numChars>=1<<r)return Number.POSITIVE_INFINITY;n+=4+r+o.bitData.length}return n}function xO(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)e.charAt(n)!=="%"?t.push(e.charCodeAt(n)):(t.push(Number.parseInt(e.substring(n+1,n+3),16)),n+=2);return t}function cp(e){if(e<fp||e>pp)throw new RangeError("Version number out of range");let t=(16*e+128)*e+64;if(e>=2){let n=Math.floor(e/7)+2;t-=(25*n-10)*n-55,e>=7&&(t-=36)}return t}function su(e,t){return Math.floor(cp(e)/8)-Ab[t[0]][e]*Eb[t[0]][e]}function kO(e){if(e<1||e>255)throw new RangeError("Degree out of range");let t=[];for(let o=0;o<e-1;o++)t.push(0);t.push(1);let n=1;for(let o=0;o<e;o++){for(let r=0;r<t.length;r++)t[r]=dp(t[r],n),r+1<t.length&&(t[r]^=t[r+1]);n=dp(n,2)}return t}function SO(e,t){let n=t.map(o=>0);for(let o of e){let r=o^n.shift();n.push(0),t.forEach((i,a)=>n[a]^=dp(i,r))}return n}function dp(e,t){if(e>>>8||t>>>8)throw new RangeError("Byte out of range");let n=0;for(let o=7;o>=0;o--)n=n<<1^(n>>>7)*285,n^=(t>>>o&1)*e;return n}function wO(e,t,n=1,o=40,r=-1,i=!0){if(!(fp<=n&&n<=o&&o<=pp)||r<-1||r>7)throw new RangeError("Invalid value");let a,l;for(a=n;;a++){let m=su(a,t)*8,c=bO(e,a);if(c<=m){l=c;break}if(a>=o)throw new RangeError("Data too long")}for(let m of[kb,Sb,wb])i&&l<=su(a,m)*8&&(t=m);let s=[];for(let m of e){lo(m.mode[0],4,s),lo(m.numChars,Mb(m.mode,a),s);for(let c of m.getData())s.push(c)}let u=su(a,t)*8;lo(0,Math.min(4,u-s.length),s),lo(0,(8-s.length%8)%8,s);for(let m=236;s.length<u;m^=253)lo(m,8,s);let f=Array.from({length:Math.ceil(s.length/8)},()=>0);return s.forEach((m,c)=>f[c>>>3]|=m<<7-(c&7)),new up(a,t,f,r)}function Cb(e,t){let{ecc:n="L",boostEcc:o=!1,minVersion:r=1,maxVersion:i=40,maskPattern:a=-1,border:l=1}=t||{},s=typeof e=="string"?vO(e):Array.isArray(e)?[Tb(e)]:void 0;if(!s)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);let u=wO(s,sO[n],r,i,a,o),f=AO({version:u.version,maskPattern:u.mask,size:u.size,data:u.modules,types:u.types},l);return t?.invert&&(f.data=f.data.map(m=>m.map(c=>!c))),t?.onEncoded?.(f),f}function AO(e,t=1){if(!t)return e;let{size:n}=e,o=n+t*2;e.size=o,e.data.forEach(i=>{for(let a=0;a<t;a++)i.unshift(!1),i.push(!1)});for(let i=0;i<t;i++)e.data.unshift(Array.from({length:o},a=>!1)),e.data.push(Array.from({length:o},a=>!1));let r=qr.Border;e.types.forEach(i=>{for(let a=0;a<t;a++)i.unshift(r),i.push(r)});for(let i=0;i<t;i++)e.types.unshift(Array.from({length:o},a=>r)),e.types.push(Array.from({length:o},a=>r));return e}var EO=4;function Pb(e){let{size:t,data:n}=Cb(e,{ecc:"M",border:EO}),o="";for(let r=0;r<t;r+=1){let i=n[r];for(let a=0;a<t;a+=1){if(!i[a])continue;let l=a+1;for(;l<t&&i[l];)l+=1;o+=`M${a} ${r}h${l-a}v1h${a-l}z`,a=l}}return{size:t,path:o,dark:(r,i)=>n[i]?.[r]===!0}}var tl=F(Ie(),1);function mp(e){let t=(0,_b.useMemo)(()=>Pb(e.text),[e.text]),n=e.size??200;return(0,tl.jsxs)("svg",{width:n,height:n,viewBox:`0 0 ${t.size} ${t.size}`,role:"img","aria-label":e.label,shapeRendering:"crispEdges",style:{flexShrink:0,borderRadius:8},children:[(0,tl.jsx)("rect",{width:t.size,height:t.size,fill:"#ffffff"}),(0,tl.jsx)("path",{d:t.path,fill:"#000000"})]})}var so=F(De(),1);var Gr=F(De(),1);function uu(e,t,n,o,r){let i=yt(),a=iu(),[l,s]=(0,Gr.useState)(null),u=t===null?null:l!==null&&l.about===n?l.standing:t,f=(0,Gr.useRef)({last:0,queue:Promise.resolve()}),m=(0,Gr.useRef)(!0);if((0,Gr.useEffect)(()=>(m.current=!0,()=>{m.current=!1}),[]),o===void 0||u===null)return{standing:u,toggle:void 0};let c=g=>s({about:n,standing:g});return{standing:u,toggle:()=>{let g=u,S=!g.following;i({event:"follow_clicked",action:S?"follow":"unfollow",from:r,...a}),c({following:S,followers:Math.max(0,g.followers+(S?1:-1))});let y=++f.current.last;f.current.queue=f.current.queue.then(()=>o(e,S).catch(()=>null)).then(h=>{m.current&&y===f.current.last&&c(h??g)})}}}var $b=F(De(),1);var Xo=F(De(),1);var Vo=F(Ie(),1);function zb(e){let t=(0,Xo.useRef)(null),n=(0,Xo.useRef)(null),[o,r]=(0,Xo.useState)({before:!1,after:!1}),[i,a]=(0,Xo.useState)(!1);(0,Xo.useEffect)(()=>{let s=n.current,u=t.current;if(s===null||u===null)return;let f=()=>{let g=s.scrollLeft>1,S=s.scrollLeft+s.clientWidth<s.scrollWidth-1;r(y=>y.before===g&&y.after===S?y:{before:g,after:S})},m=g=>{g.pointerType!=="touch"&&(f(),a(!0))},c=()=>a(!1);f(),s.addEventListener("scroll",f,{passive:!0}),u.addEventListener("pointerenter",m),u.addEventListener("pointerleave",c);let p=typeof ResizeObserver>"u"?null:new ResizeObserver(f);return p?.observe(s),()=>{s.removeEventListener("scroll",f),u.removeEventListener("pointerenter",m),u.removeEventListener("pointerleave",c),p?.disconnect()}},[]);let l=s=>{let u=n.current;u?.scrollBy({left:s*u.clientWidth*.7,behavior:"smooth"})};return(0,Vo.jsxs)("div",{ref:t,...x(k.div,$i.holder),children:[(0,Vo.jsx)("div",{ref:n,...x(k.div,$i.row),children:e.children}),i&&o.before?(0,Vo.jsx)("button",{"aria-label":`Scroll ${e.label} back`,onClick:()=>l(-1),...x(k.button,$i.arrow,$i.before),type:"button",children:(0,Vo.jsx)(je,{name:"back",size:14})}):null,i&&o.after?(0,Vo.jsx)("button",{"aria-label":`Scroll ${e.label} on`,onClick:()=>l(1),...x(k.button,$i.arrow,$i.after),type:"button",children:(0,Vo.jsx)(je,{name:"forward",size:14})}):null]})}var $i={holder:{kVAEAm:"x1n2onr6",k7Eaqz:"xeuugli",$$css:!0},row:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kXHlph:"xw2csxc",kvh3hx:"x7p5m3t",k5wCbM:"x1rohswg",kOuLrU:"xfk6m8",$$css:!0},arrow:{kVAEAm:"x10l6tqk",k87sOh:"xwa60dl",k3aq6I:"x1cb1t30",kzqmXN:"xgd8bvy",kZKoxP:"x1fgtraw",kogj98:"x1ghz6dp",kmVPX3:"x1717udv",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kMzoRj:"xmkeg23",ksu8eU:"x1y0btm7",kVAM5u:"x1q6l3k1",kaIpWk:"xq1n3g1",kWkggS:"x1w0y00m x8uoi4y",kGVxlE:"x1973jxo",kMwMTN:"x6gl9h3",kkrTdU:"x1ypdohk",$$css:!0},before:{kbCHJM:"x54rlcq",$$css:!0},after:{kCIrl2:"x3lmqil",$$css:!0}};var vt=F(Ie(),1);function MO(e){return e.filter(t=>t.under===void 0&&t.hidden!==!0)}function hp(e){let t=yt(),n=MO(e.tabs);if(n.length<2)return null;let o=e.tabs.find(r=>r.id===e.current)?.under??e.current;return(0,vt.jsx)("div",{role:"tablist",...x(k.div,Je.bar),children:n.map(r=>{let i=r.id===o,a=e.badges?.[r.id]??0,l=a>0&&!i;return(0,vt.jsxs)("button",{role:"tab","aria-selected":i,"aria-label":l?`${r.label}, ${a} unread`:void 0,onClick:()=>{t({event:"tab_opened",tab:r.id}),e.onSelect(r.id)},...x(k.button,ae.base,Je.tab,i&&Je.tabOn),type:"button",children:[r.face===!0?(0,vt.jsx)(TO,{picture:e.picture??null,active:i}):(0,vt.jsx)(je,{name:r.icon,size:19}),(0,vt.jsx)("span",{...x(k.span,Je.label,i&&Je.labelOn),children:r.label}),l?(0,vt.jsx)("span",{"aria-hidden":!0,...x(k.span,Je.badge),children:String(a)}):null]},r.id)})})}function TO(e){let[t,n]=_r(Pr);return(0,vt.jsx)("span",{"aria-hidden":!0,...x(k.span,Je.face,Je.stripes(t,zr(t,n)),e.active&&Je.faceOn),children:e.picture===null?null:(0,vt.jsx)("img",{src:e.picture,alt:"",decoding:"async",...x(k.img,Je.picture)})})}function Wo(e){let t=yt(),n=iu();if(e.segments.length<2)return null;let o=e.fit===!0,r=(0,vt.jsx)("div",{role:"tablist",...x(k.div,Je.track,o&&Je.trackFit),children:e.segments.map(i=>{let a=i.id===e.current;return(0,vt.jsx)("button",{role:"tab","aria-selected":a,onClick:()=>{t({event:"tab_opened",...n,part:i.id}),e.onSelect(i.id)},...x(k.button,ae.base,Je.segment,o&&Je.segmentFit,a&&Je.segmentOn),type:"button",children:(0,vt.jsx)("span",{...x(k.span,Je.segmentWord,o&&Je.segmentWordFit,a&&Je.segmentWordOn),children:i.label})},i.id)})});return o?(0,vt.jsx)(zb,{label:"tabs",children:r}):r}function nl(e){let{parts:t}=e,[n,o]=(0,$b.useState)(()=>t.some(i=>i.id===e.initial)?e.initial:t[0]?.id??null),r=t.find(i=>i.id===n);return(0,vt.jsxs)("div",{...x(k.div,Je.parted),children:[(0,vt.jsx)(Wo,{segments:t,current:n,fit:e.fit===!0,onSelect:i=>{o(i),e.onSelect?.(i)}}),(0,vt.jsx)("div",{role:"tabpanel",...x(k.div,Je.part),children:r?.view()},n??void 0)]})}var Je={bar:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kOIVth:"x195vfkc",kLKAdn:"x123j3cw",kGO01o:"x10b6aqq",kg3NbH:"xqin4a2",kEafiO:"x178xt8z",kPef9Z:"x13fuv20",kLZC3w:"x1em74e8",$$css:!0},tab:{kVAEAm:"x1n2onr6",kzQI83:"x1iyjqo2",kCS8Yb:"x1r8uery",k7Eaqz:"xeuugli",kAzted:"x1gg8mnh",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kOIVth:"x1jnr06f",k8WAf4:"x12ulsxz",kg3NbH:"x5k8d2m",kaIpWk:"xhpnuu7",kMwMTN:"xupo0id",kInvED:"x2ssjo2",k1ekBW:"xs2xxs2",kIyJzY:"xppnxx3",$$css:!0},tabOn:{kWkggS:"x1qg24v8",kMwMTN:"x1et08zh",$$css:!0},face:{k1xSpc:"x1lliihq",kmuXW:"x2lah0s",kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",kaIpWk:"xq1n3g1",kVQacm:"xb3r6kr",kGVxlE:"x13nud3b",$$css:!0},faceOn:{kGVxlE:"xcs8m75",$$css:!0},stripes:(e,t)=>[{kWkggS:e!=null?"xl8spv7":e,kKwaWg:t!=null?"x1e87kdn":t,$$css:!0},{"--x-backgroundColor":e??void 0,"--x-backgroundImage":t??void 0}],picture:{k1xSpc:"x1lliihq",kzqmXN:"xh8yej3",kZKoxP:"x5yr21d",kVIFPx:"xl1xv1r",$$css:!0},label:{kMv6JI:"x1j8uvit",kGuDYH:"x1s31vzs",kb6lSQ:"x4ozb64",kP9fke:"xtvhhri",khDVqt:"xuxw1ft",kMwMTN:"xcvfrpn",k1ekBW:"xt3l3uh",kIyJzY:"xppnxx3",$$css:!0},labelOn:{kMwMTN:"x6gl9h3",$$css:!0},badge:{kVAEAm:"x10l6tqk",k87sOh:"xnfr1j",kbCHJM:"x1nrll8i",keTefX:"xdwrcjd",k7Eaqz:"x1wu2mox",kZKoxP:"x1v9usgg",kg3NbH:"x1g15tvd",kaIpWk:"xq1n3g1",kWkggS:"xcbcf2q",kMwMTN:"x7lcjf2",kMv6JI:"x1j8uvit",kGuDYH:"x1k6wstc",kLWn49:"x1xxsxie",k63SB2:"xk50ysn",k9WMMc:"x2b8uid",$$css:!0},track:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kOIVth:"x1jnr06f",kmVPX3:"x9ms5i6",kaIpWk:"x2jfb3a",kWkggS:"x10bqf5p",$$css:!0},segment:{kzQI83:"x1iyjqo2",kCS8Yb:"x1r8uery",k7Eaqz:"xeuugli",kAzted:"xu97haq",kg3NbH:"xfn1xvj",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kaIpWk:"xur7f20",kInvED:"x2ssjo2",k1ekBW:"x15406qy",kIyJzY:"xppnxx3",$$css:!0},trackFit:{kmuXW:"x2lah0s",$$css:!0},segmentFit:{kzQI83:"x1c4vz4f",kmuXW:"x2lah0s",kCS8Yb:"xdl72j9",kg3NbH:"xaope02",$$css:!0},segmentOn:{kWkggS:"x1atu9ce",$$css:!0},segmentWord:{kMv6JI:"x1j8uvit",kGuDYH:"x1j6dyjg",kb6lSQ:"x2gto2c",kP9fke:"xtvhhri",khDVqt:"xuxw1ft",kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",kMwMTN:"xupo0id",$$css:!0},segmentWordFit:{kVQacm:"x1rea2x4",kg5iWk:"xbrixnn",$$css:!0},segmentWordOn:{kMwMTN:"x6gl9h3",$$css:!0},parted:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x1c1vhfx",k7Eaqz:"xeuugli",$$css:!0},part:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",k7Eaqz:"xeuugli",$$css:!0}};var at=F(Ie(),1),Nb=[{id:"followers",label:"Followers"},{id:"known",label:"Followers you know"},{id:"following",label:"Following"}];function OO(e,t){switch(e){case"known":return"Nobody you follow follows them yet.";case"following":return t?"You do not follow anybody yet.":"They do not follow anybody yet.";default:return t?"Nobody follows you yet.":"Nobody follows them yet."}}function ol(e){let t=e.self===!0,n=t?Nb.filter(l=>l.id!=="known"):Nb,[o,r]=(0,so.useState)(n.some(l=>l.id===e.initial)?e.initial:"followers"),{handle:i,people:a}=e;return(0,at.jsxs)(le,{gap:20,children:[(0,at.jsx)(Cn,{label:e.back,onPress:e.onBack}),(0,at.jsx)(Lr,{title:e.title}),(0,at.jsx)(Wo,{segments:n,current:o,onSelect:l=>r(l),fit:!0}),(0,at.jsx)(RO,{none:OO(o,t),load:l=>a(i,{kind:o,cursor:l}),follow:e.follow,onPerson:e.onPerson},o)]})}function RO(e){let[t,n]=(0,so.useState)("loading"),[o,r]=(0,so.useState)("idle"),i=(0,so.useRef)(!0),a=(0,so.useRef)(e.load);a.current=e.load,(0,so.useEffect)(()=>(i.current=!0,a.current(null).then(s=>i.current&&n(s??"failed"),()=>i.current&&n("failed")),()=>{i.current=!1}),[]);let l=()=>{if(typeof t=="string"||t.next===null||o==="loading")return;let s=t;r("loading"),a.current(s.next).then(u=>{if(i.current){if(u===null)return r("failed");r("idle"),n({people:[...s.people,...u.people],next:u.next,count:u.count})}},()=>i.current&&r("failed"))};return t==="loading"?(0,at.jsx)("p",{...x(k.p),children:"Loading\\u2026"}):t==="failed"?(0,at.jsx)(H,{children:"Could not reach the list just now."}):t.people.length===0?(0,at.jsx)(Jt,{children:e.none}):(0,at.jsxs)(at.Fragment,{children:[(0,at.jsx)(H,{children:Dt(t.count,"person","people")}),(0,at.jsx)(At,{children:t.people.map((s,u)=>(0,at.jsx)(gp,{person:s,hue:gt(u),follow:e.follow,onPerson:e.onPerson},s.handle))}),o==="failed"?(0,at.jsx)(H,{children:"Could not reach the rest just now."}):null,t.next===null?null:(0,at.jsx)(ro,{label:o==="loading"?"Loading\\u2026":"Show more",onPress:l})]})}function gp(e){let{person:t}=e,{standing:n,toggle:o}=uu(t.handle,t.followed===null?null:{following:t.followed,followers:0},t,e.follow,e.from??"people");return(0,at.jsx)(pb,{name:t.name??`@${t.handle}`,note:t.name===null?"":`@${t.handle}`,hue:e.hue,picture:t.picture,onPress:e.onPerson===void 0?void 0:()=>e.onPerson?.(t.handle),end:e.follow===void 0||n===null?void 0:{label:n.following?"Following":"Follow",pressed:n.following,lit:!n.following,onPress:o}})}var en=F(Ie(),1);function cu(e){let{who:t,followers:n,following:o}=e,r=a=>a==null?"\\u2014":$r(a),i=e.onSettings===void 0?void 0:(0,en.jsx)(du,{onPress:e.onSettings});return(0,en.jsxs)(en.Fragment,{children:[t===null?e.onSettings===void 0?null:(0,en.jsx)(yp,{onPress:e.onSettings}):(0,en.jsx)(tu,{name:t.name??`@${t.handle}`,note:[...t.name===null?t.unnamed===void 0?[]:[t.unnamed]:[`@${t.handle}`],...t.facts].join(" \\xB7 "),hue:t.hue,picture:t.picture,end:i}),e.children,(0,en.jsx)(Pi,{entries:[[r(n.count),"followers",n.onPress],...o===void 0?[]:[[r(o.count),"following",o.onPress]],...e.tiles],pressable:!0})]})}function du(e){let t=yt();return(0,en.jsx)("button",{"aria-label":"Settings",onClick:()=>{t({event:"tab_opened",tab:"settings"}),e.onPress()},...x(k.button,ae.base,Lb.gear),type:"button",children:(0,en.jsx)(je,{name:"settings",size:20})})}function yp(e){return(0,en.jsx)("div",{...x(k.div,Lb.alone),children:(0,en.jsx)(du,{onPress:e.onPress})})}var Lb={alone:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kjj79g:"x13a6bvl",$$css:!0},gear:{kzqmXN:"x100vrsf",kZKoxP:"x1vqgdyp",keoZOQ:"xifccgj",k71WvV:"x1w5wx5t",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kaIpWk:"xq1n3g1",kMwMTN:"xupo0id x1kc931m",kWkggS:"xjbqb8w x6ikqrn",kInvED:"x2ssjo2",k1ekBW:"xs2xxs2",kIyJzY:"x198w77l",$$css:!0}};var w=F(Ie(),1);function vp(e){let[t,n]=(0,U.useState)(e.upload===!0?"upload":"you"),[o,r]=(0,U.useState)(0),i=()=>{n("you"),r(o+1)};if(t==="upload")return(0,w.jsxs)(le,{gap:20,children:[(0,w.jsx)(Cn,{label:"Back to you",onPress:i}),(0,w.jsx)(Db,{title:"Upload a game",sub:"One .html file, and the manifest beside it if your game has one. It goes live once an admin has looked at it."}),(0,w.jsx)(GO,{source:e.source})]});if(t==="profile")return(0,w.jsxs)(le,{gap:20,children:[(0,w.jsx)(Cn,{label:"Back to you",onPress:i}),(0,w.jsx)(Db,{title:"Edit profile",sub:"How other players see you."}),(0,w.jsx)(UO,{source:e.source})]});let a=e.people;return typeof t=="object"&&a!==void 0?(0,w.jsx)(ol,{title:t.name,handle:t.peopleOf,initial:t.kind,self:!0,back:"Back to you",onBack:i,people:a,follow:e.follow,onPerson:e.onCreator}):(0,w.jsx)(CO,{source:e.source,onGame:e.onGame,onSaved:e.onSaved,again:i,go:n,onShare:e.onShare,onSettings:e.onSettings,onCreate:e.onCreate,onPeople:a===void 0?void 0:(l,s,u)=>n({peopleOf:l,name:s,kind:u})},o)}function CO(e){let t=xp(e.source),n=e.onSettings===void 0?null:(0,w.jsx)(yp,{onPress:e.onSettings});if(t.kind==="loading")return(0,w.jsxs)(le,{gap:12,children:[n,(0,w.jsx)("p",{...x(k.p),children:"Loading\\u2026"})]});if(t.kind==="failed")return(0,w.jsxs)(le,{gap:12,children:[n,(0,w.jsx)(H,{children:"Could not reach your account just now."})]});let o=t.view;if(o.signedIn&&o.alias===null)return(0,w.jsx)(PO,{view:o,source:e.source,again:e.again,corner:n});let r=(i,a)=>i==null||e.onPeople===void 0?void 0:()=>e.onPeople?.(o.username,o.displayName??`@${o.username}`,a);return(0,w.jsxs)("div",{"data-part":"account",...x(k.div,He.page),children:[(0,w.jsx)(Ib,{view:o,source:e.source,again:e.again}),(0,w.jsx)(_O,{view:o,source:e.source,again:e.again}),(0,w.jsx)(cu,{who:o.signedIn?{handle:o.username,name:o.displayName,picture:o.avatar,hue:Pr,facts:Ky(o),unnamed:`Signed in as @${o.username}`}:null,followers:{count:o.followers,onPress:r(o.followers,"followers")},following:{count:o.following,onPress:r(o.following,"following")},tiles:Is.slice(1),onSettings:e.onSettings,children:o.signedIn?(0,w.jsxs)(ou,{children:[(0,w.jsx)(Se,{label:"Edit profile",kind:"quiet",even:!0,data:{action:"edit-profile"},onPress:()=>e.go("profile")}),e.onShare===void 0?null:(0,w.jsx)(Se,{label:"Share profile",kind:"quiet",even:!0,onPress:()=>e.onShare?.(o.username)})]}):(0,w.jsxs)(Vn,{title:"Claim your account",children:[(0,w.jsx)(H,{children:"You are playing as a guest. Your scores, achievements and games are being kept on a temporary account that may be deleted. Sign up to make it yours \\u2014 nothing you have done so far is lost."}),(0,w.jsx)(jb,{view:o,source:e.source,again:e.again}),(0,w.jsx)(zO,{view:o,source:e.source,again:e.again})]})}),o.flash?(0,w.jsx)("p",{role:"status",...x(k.p,He.flash),children:o.flash}):null,(0,w.jsx)(jt,{title:"Your games",action:e.onCreate===void 0?{label:"Upload",strong:!0,onPress:()=>e.go("upload")}:{label:"Create",strong:!0,onPress:e.onCreate},children:(0,w.jsx)(jO,{source:e.source})}),(0,w.jsx)(HO,{source:e.source,onSaved:e.onSaved}),(0,w.jsx)(qO,{played:o.played??null,onGame:e.onGame})]})}function PO(e){let[t,n]=(0,U.useState)(e.view.suggestedHandle??""),[o,r]=(0,U.useState)(!1),[i,a]=(0,U.useState)(null),l=()=>{let s=t.trim().replace(/^@/,"").toLowerCase();if(s==="")return a("Type the handle you want.");r(!0),e.source.editProfile({handle:s}).then(u=>{if(u.ok)return e.again();r(!1),a(u.message)})};return(0,w.jsxs)("div",{"data-part":"account",...x(k.div,He.page),children:[e.corner,(0,w.jsxs)(Vn,{title:"Choose your handle",children:[(0,w.jsx)(H,{children:"You are signed in. Choose the handle other players find you by: it is the address of your page and the first half of the address of every game you publish."}),(0,w.jsxs)(uo,{step:"choose-handle",children:[(0,w.jsx)(Yo,{label:"Handle",name:"handle",autoComplete:"username",autoCapitalize:"none",spellCheck:!1,autoFocus:!0,maxLength:30,value:t,onInput:s=>{n(s),a(null)},onEnter:l,children:(0,w.jsx)(Se,{label:"Choose handle",data:{action:"choose-handle"},disabled:o,onPress:l})}),(0,w.jsx)(H,{children:"3 to 30 lowercase letters and digits, with single dashes between them. You can correct it once straight away; after that it can be changed once every 30 days."}),i===null?null:(0,w.jsx)(hn,{text:i})]}),(0,w.jsx)(Se,{label:"Sign out",kind:"quiet",disabled:o,onPress:()=>{r(!0),e.source.signOut().finally(e.again)}})]})]})}function Ib(e){let[t,n]=(0,U.useState)(!1),[o,r]=(0,U.useState)(null),{asking:i,signedIn:a,username:l}=e.view;if(i==null||e.source.answerDevice===void 0)return null;let s=e.view.alias!==null,u=f=>()=>{n(!0),e.source.answerDevice?.(f).then(m=>{if(m.ok)return e.again();n(!1),r(m.message)})};return(0,w.jsx)("div",{"data-part":"device",...x(k.div,He.asking),children:(0,w.jsxs)(Vn,{title:"Sign in another device",children:[(0,w.jsx)(H,{children:a?s?`\\u201C${i.label}\\u201D is asking to be signed in as @${l}.`:`\\u201C${i.label}\\u201D is asking to be signed in. Choose your handle on the You tab first, then approve it.`:`\\u201C${i.label}\\u201D is asking to be signed in. Sign in here first, then approve it.`}),(0,w.jsx)(H,{children:"Approve only if you started this yourself, and it is showing this code:"}),(0,w.jsx)("p",{"data-code":"true",...x(k.p,He.code),children:i.code}),(0,w.jsxs)("div",{...x(k.div,He.row),children:[a&&s?(0,w.jsx)(Se,{label:"Approve",data:{action:"approve-device"},disabled:t,onPress:u(!0)}):null,(0,w.jsx)(Se,{label:"Refuse",kind:"quiet",data:{action:"refuse-device"},disabled:t,onPress:u(!1)})]}),o===null?null:(0,w.jsx)(hn,{text:o})]})})}function _O(e){let{source:t,again:n}=e,o=e.view.requesting??null,r=o!==null;return(0,U.useEffect)(()=>{if(!r)return;let i=!0;return t.deviceRequestEnded?.().then(()=>i&&n()),()=>{i=!1}},[r,t]),o===null?null:(0,w.jsx)("div",{"data-part":"request",...x(k.div,He.asking),children:(0,w.jsxs)(Vn,{title:"Sign in with another device",children:[o.link===null?(0,w.jsx)(H,{children:"Approve this on the device whose code you scanned. Check that it shows this code:"}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(H,{children:"Scan this with a device that is signed in, then approve it there."}),(0,w.jsx)(mp,{text:o.link,label:"QR code that signs this device in"}),(0,w.jsx)(H,{children:"It will ask you to check this code. Without a camera, enter the code in Settings on that device."})]}),(0,w.jsx)("p",{"data-code":"true",...x(k.p,He.code),children:o.code}),(0,w.jsx)("div",{...x(k.div,He.row),children:(0,w.jsx)(Se,{label:"Cancel",kind:"quiet",data:{action:"cancel-device"},onPress:()=>t.cancelDevice?.()})})]})})}function zO(e){let[t,n]=(0,U.useState)(!1),[o,r]=(0,U.useState)(null);return e.source.requestDevice===void 0||e.view.requesting!=null?null:(0,w.jsxs)("div",{...x(k.div,He.providers),children:[(0,w.jsx)(Se,{label:"Sign in with another device",kind:"quiet",data:{action:"request-device"},disabled:t,onPress:()=>{n(!0),e.source.requestDevice?.().then(i=>{if(i.ok)return e.again();n(!1),r(i.message)})}}),o===null?null:(0,w.jsx)(hn,{text:o})]})}function $O(e){let{source:t,again:n}=e,o=e.view.inviting??null,r=o!==null,[i,a]=(0,U.useState)(!1),[l,s]=(0,U.useState)(null);return(0,U.useEffect)(()=>{if(!r)return;let u=!0;return t.deviceInviteEnded?.().then(()=>u&&n()),()=>{u=!1}},[r,t]),t.inviteDevice===void 0&&t.enterDevice===void 0?null:o!==null?(0,w.jsxs)(Vn,{title:"Sign in another device",children:[(0,w.jsx)(H,{children:"Scan this with the device you want to sign in. You will be asked to approve it here."}),(0,w.jsx)(mp,{text:o.link,label:"QR code that signs another device in"}),(0,w.jsx)("div",{...x(k.div,He.row),children:(0,w.jsx)(Se,{label:"Cancel",kind:"quiet",data:{action:"cancel-invite"},onPress:()=>t.cancelInvite?.()})})]}):(0,w.jsxs)(Vn,{title:"Sign in another device",children:[t.inviteDevice===void 0?null:(0,w.jsxs)("div",{...x(k.div,He.providers),children:[(0,w.jsx)(Se,{label:"Show a QR code",kind:"quiet",data:{action:"invite-device"},disabled:i,onPress:()=>{a(!0),t.inviteDevice?.().then(u=>{if(u.ok)return n();a(!1),s(u.message)})}}),l===null?null:(0,w.jsx)(hn,{text:l})]}),(0,w.jsx)(NO,{source:t,again:n,second:t.inviteDevice!==void 0})]})}function NO(e){let[t,n]=(0,U.useState)(""),[o,r]=(0,U.useState)(!1),[i,a]=(0,U.useState)(null);if(e.source.enterDevice===void 0)return null;let l=()=>{o||t.trim()===""||(r(!0),e.source.enterDevice?.(t).then(s=>{if(s.ok)return e.again();r(!1),a(s.message)}))};return(0,w.jsxs)(uo,{step:"device",children:[(0,w.jsx)(H,{children:`${e.second?"Or, on":"On"} the other device, open the You tab and choose \\u201CSign in with another device\\u201D.`}),(0,w.jsx)(Yo,{label:"The code it shows",name:"device-code",value:t,onInput:n,onEnter:l,autoCapitalize:"none",spellCheck:!1,maxLength:32,placeholder:"XXXX-XXXX",children:(0,w.jsx)(Se,{label:"Continue",disabled:o,onPress:l})}),i===null?null:(0,w.jsx)(hn,{text:i})]})}function bp(e){let[t,n]=(0,U.useState)(0);return(0,w.jsx)(LO,{source:e.source,privacy:e.privacy,again:()=>n(t+1)},t)}function LO(e){let t=xp(e.source),n=(0,w.jsx)(Vn,{title:"Privacy",children:e.privacy});if(t.kind==="loading")return(0,w.jsx)("p",{...x(k.p),children:"Loading\\u2026"});if(t.kind==="failed")return(0,w.jsxs)("div",{"data-part":"account",...x(k.div,He.page),children:[(0,w.jsx)(H,{children:"Could not reach your account just now."}),n]});let o=t.view;return(0,w.jsxs)("div",{"data-part":"account",...x(k.div,He.page),children:[o.flash?(0,w.jsx)("p",{role:"status",...x(k.p,He.flash),children:o.flash}):null,o.signedIn?(0,w.jsx)(DO,{view:o,source:e.source,again:e.again}):null,n,(0,w.jsx)(Vn,{title:"Delete your account",children:(0,w.jsx)(nu,{label:"Delete account",phrase:o.username,ask:`Type ${o.username} to confirm.`,note:"Deletes this account, your scores and achievements, and every game you have uploaded \\u2014 for good.",onConfirm:()=>e.source.deleteAccount(o.username).then(r=>r.ok?(e.again(),null):r.message)})})]})}function DO(e){let[t,n]=(0,U.useState)(!1);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(Vn,{title:"Signed in with",children:[(0,w.jsx)("ul",{...x(k.ul,He.ways),children:e.view.identities.map(o=>{let r=Zy[o.provider]??o.provider;return(0,w.jsx)("li",{...x(k.li,He.way),children:o.email?`${r} \\xB7 ${o.email}`:r},`${o.provider}:${o.email??""}`)})}),(0,w.jsx)(Se,{label:"Sign out",kind:"quiet",disabled:t,onPress:()=>{n(!0),e.source.signOut().finally(e.again)}})]}),e.view.asking==null?(0,w.jsx)($O,{view:e.view,source:e.source,again:e.again}):(0,w.jsx)(Ib,{view:e.view,source:e.source,again:e.again}),(0,w.jsx)(Vn,{title:"Add another way in",children:(0,w.jsx)(jb,{view:e.view,source:e.source,again:e.again})})]})}function jb(e){let t=new Set(e.view.identities.map(l=>l.provider)),n=e.view.providers.filter(l=>!t.has(l.id)),[o,r]=(0,U.useState)(null),[i,a]=(0,U.useState)(null);return(0,w.jsxs)(w.Fragment,{children:[e.view.email?(0,w.jsx)(IO,{source:e.source,again:e.again}):null,n.length===0?null:(0,w.jsxs)("div",{...x(k.div,He.providers),children:[n.map(l=>(0,w.jsx)(Se,{label:`Continue with ${l.label}`,kind:"quiet",data:{provider:l.id},disabled:o===l.id,onPress:()=>{r(l.id),e.source.connect(l.id).then(s=>{s.ok||(r(null),a(s.message))})}},l.id)),i===null?null:(0,w.jsx)(hn,{text:i})]}),!e.view.email&&n.length===0&&!e.view.signedIn?(0,w.jsx)(H,{children:"This server has no way to sign in yet."}):null]})}function IO(e){let[t,n]=(0,U.useState)(null),[o,r]=(0,U.useState)(""),[i,a]=(0,U.useState)(!1),[l,s]=(0,U.useState)(null);if(t===null){let f=()=>{let m=o.trim();if(m==="")return s("Enter your email address.");a(!0),e.source.sendCode(m).then(c=>{if(a(!1),!c.ok)return s(c.message);s(null),r(""),n(m)})};return(0,w.jsxs)(uo,{step:"email",children:[(0,w.jsx)(Yo,{label:"Email",name:"email",type:"email",autoComplete:"email",value:o,onInput:r,onEnter:f,children:(0,w.jsx)(Se,{label:"Send a code",disabled:i,onPress:f})}),l===null?null:(0,w.jsx)(hn,{text:l})]})}let u=()=>{a(!0),e.source.verifyCode(o.trim()).then(f=>{a(!1),f.ok?e.again():s(f.message)})};return(0,w.jsxs)(uo,{step:"code",children:[(0,w.jsx)(H,{children:`A six-digit code is on its way to ${t}.`}),(0,w.jsx)(Yo,{label:"Code",name:"code",autoComplete:"one-time-code",inputMode:"numeric",maxLength:6,autoFocus:!0,value:o,onInput:r,onEnter:u,children:(0,w.jsx)(Se,{label:"Sign in",disabled:i,onPress:u})}),l===null?null:(0,w.jsx)(hn,{text:l}),(0,w.jsx)(Se,{label:"Use a different address",kind:"quiet",onPress:()=>{n(null),r(""),s(null)}})]})}function jO(e){let[t,n]=(0,U.useState)({kind:"loading"});return(0,U.useEffect)(()=>{let o=!0;return e.source.games().then(r=>o&&n({kind:"done",games:r}),()=>o&&n({kind:"failed"})),()=>{o=!1}},[e.source]),t.kind==="loading"?(0,w.jsx)(H,{children:"Loading\\u2026"}):t.kind==="failed"?(0,w.jsx)(H,{children:"Could not reach your games just now."}):t.games.length===0?(0,w.jsx)(H,{children:"Nothing uploaded yet."}):(0,w.jsx)(At,{children:t.games.map((o,r)=>(0,w.jsx)(mn,{title:o.title,meta:o.detail?`${o.address} \\xB7 ${o.detail}`:o.address,hue:gt(r),state:o.state,end:{state:{word:Qy[o.state],kind:o.state}}},o.address))})}function HO(e){let[t,n]=(0,U.useState)({kind:"loading"}),o=e.source.saved!==void 0;if((0,U.useEffect)(()=>{let i=e.source.saved?.();if(i===void 0)return;let a=!0;return i.then(l=>a&&n({kind:"done",games:l}),()=>a&&n({kind:"failed"})),()=>{a=!1}},[e.source]),!o)return null;let{onSaved:r}=e;return(0,w.jsx)(jt,{title:"Saved",children:t.kind==="loading"?(0,w.jsx)(H,{children:"Loading\\u2026"}):t.kind==="failed"?(0,w.jsx)(H,{children:"Could not reach what you have saved just now."}):t.games.length===0?(0,w.jsx)(H,{children:"Nothing saved yet. Press Save on a game\\u2019s About tab to keep it here."}):(0,w.jsx)(At,{children:t.games.map((i,a)=>(0,w.jsx)(mn,{title:i.title,meta:`@${i.owner}`,hue:gt(a),end:{action:{label:"Play",onPress:r===void 0?void 0:()=>r(i)}}},i.id))})})}function qO(e){let{played:t,onGame:n}=e;return(0,w.jsx)(jt,{title:"Recently played",children:t===null?(0,w.jsx)(H,{children:"Could not reach what you have played just now."}):t.recent.length===0?(0,w.jsx)(H,{children:"Nothing played yet."}):(0,w.jsx)(At,{children:t.recent.map((o,r)=>(0,w.jsx)(mn,{title:o.title,meta:`@${o.owner} \\xB7 played ${Rt(o.playedAt)}`,hue:gt(r),end:{action:{label:"Play",onPress:n===void 0?void 0:()=>n(o.id)}}},o.id))})})}function GO(e){let[t,n]=(0,U.useState)(""),[o,r]=(0,U.useState)(""),[i,a]=(0,U.useState)(null),[l,s]=(0,U.useState)(null),[u,f]=(0,U.useState)(0),[m,c]=(0,U.useState)(!1),[p,g]=(0,U.useState)(null),S=(0,U.useId)(),y=(0,U.useId)();if(!lp)return(0,w.jsx)(H,{children:"Uploading a game needs the site, for now."});let h=()=>{if(i===null)return g({text:"Choose the game\\u2019s .html file.",ok:!1});c(!0),e.source.upload({title:t.trim(),description:o.trim(),file:i,manifest:l}).then(d=>{if(c(!1),!d.ok)return g({text:d.message,ok:!1});n(""),r(""),a(null),s(null),f(u+1),g({text:d.message??"Uploaded.",ok:!0})})};return(0,w.jsxs)(uo,{step:"upload",children:[(0,w.jsx)(Yo,{label:"Title",name:"title",value:t,onInput:n,onEnter:h}),(0,w.jsx)("label",{htmlFor:S,...x(k.label,It.label),children:"Game \\u2014 one .html file"}),(0,w.jsx)(au,{id:S,accept:".html,.htm,text/html",label:"Game",onPick:a},`game-${u}`),(0,w.jsx)("label",{htmlFor:y,...x(k.label,It.label),children:"Manifest \\u2014 optional, game.manifest.json"}),(0,w.jsx)(au,{id:y,accept:".json,application/json",label:"Manifest",onPick:s},`manifest-${u}`),(0,w.jsx)(Yo,{label:"Description \\u2014 optional",name:"description",value:o,onInput:r,onEnter:h}),(0,w.jsx)(Se,{label:"Upload",disabled:m,onPress:h}),p===null?null:(0,w.jsx)(hn,{text:p.text,ok:p.ok})]})}function UO(e){let[t,n]=(0,U.useState)(0);return(0,w.jsx)(BO,{source:e.source,again:()=>n(t+1)},t)}function BO(e){let t=xp(e.source);return t.kind==="loading"?(0,w.jsx)(H,{children:"Loading\\u2026"}):t.kind==="failed"?(0,w.jsx)(H,{children:"Could not reach your account just now."}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(VO,{view:t.view,source:e.source,again:e.again}),(0,w.jsx)(XO,{view:t.view,source:e.source}),(0,w.jsx)(WO,{view:t.view,source:e.source,again:e.again})]})}function VO(e){let[t,n]=(0,U.useState)(!1),[o,r]=(0,U.useState)(null),i=(0,U.useId)(),a=l=>{n(!1),l.ok?e.again():r(l.message??"")};return(0,w.jsxs)(uo,{step:"picture",children:[(0,w.jsx)("label",{htmlFor:i,...x(k.label,It.label),children:"Picture"}),(0,w.jsxs)("div",{...x(k.div,He.row),children:[(0,w.jsx)(zi,{hue:Pr,shape:"avatar",picture:e.view.avatar}),lp?(0,w.jsx)(au,{id:i,accept:"image/png,image/jpeg,image/gif,image/webp",label:"Picture",disabled:t,onPick:l=>{l!==null&&(n(!0),e.source.setPicture(l).then(a))}}):null]}),e.view.avatar===null?null:(0,w.jsx)(Se,{label:"Remove picture",kind:"quiet",disabled:t,onPress:()=>{n(!0),e.source.removePicture().then(a)}}),o===null?null:(0,w.jsx)(hn,{text:o})]})}function XO(e){let[t,n]=(0,U.useState)(e.view.displayName??""),[o,r]=(0,U.useState)(!1),[i,a]=(0,U.useState)(null),l=()=>{r(!0),e.source.editProfile({displayName:t.trim()}).then(s=>{r(!1),a(s.ok?{text:s.message??"Saved.",ok:!0}:{text:s.message,ok:!1})})};return(0,w.jsxs)(uo,{step:"name",children:[(0,w.jsx)(Yo,{label:"Display name",name:"displayName",autoComplete:"nickname",maxLength:50,placeholder:`@${e.view.username}`,value:t,onInput:n,onEnter:l,children:(0,w.jsx)(Se,{label:"Save",disabled:o,onPress:l})}),i===null?null:(0,w.jsx)(hn,{text:i.text,ok:i.ok})]})}function WO(e){let[t,n]=(0,U.useState)(e.view.username),[o,r]=(0,U.useState)(null),[i,a]=(0,U.useState)(!1),[l,s]=(0,U.useState)(null),u=e.view.handleChangeableAt??null;if(u!==null&&Date.parse(u)>Date.now())return(0,w.jsxs)(uo,{step:"handle",children:[(0,w.jsx)("p",{...x(k.p,It.label),children:"Handle"}),(0,w.jsx)(H,{children:`You go by @${e.view.username}. You changed your handle recently, and can change it again on ${YO(u)}. The handles you had before still lead to you.`})]});let f=()=>{let m=t.trim().replace(/^@/,"").toLowerCase();if(m===""||m===e.view.username)return s("Type the handle you want instead.");if(o!==m)return r(m),s(`@${m} will be your handle from now on, and you will not be able to change it again for 30 days. Press once more to go ahead.`);a(!0),e.source.editProfile({handle:m}).then(c=>{if(a(!1),c.ok)return e.again();r(null),s(c.message)})};return(0,w.jsxs)(uo,{step:"handle",children:[(0,w.jsx)(Yo,{label:"Handle",name:"handle",autoComplete:"username",autoCapitalize:"none",spellCheck:!1,maxLength:30,value:t,onInput:m=>{n(m),r(null),s(null)},onEnter:f,children:(0,w.jsx)(Se,{label:o===null?"Change handle":"Change it",disabled:i,onPress:f})}),(0,w.jsx)(H,{children:`@${e.view.username} will keep working as another name for you, so links you have already shared still lead here.`}),l===null?null:(0,w.jsx)(hn,{text:l})]})}function YO(e){return new Date(e).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"})}function xp(e){let[t,n]=(0,U.useState)({kind:"loading"});return(0,U.useEffect)(()=>{let o=!0;return e.view().then(r=>o&&n({kind:"done",view:r}),()=>o&&n({kind:"failed"})),()=>{o=!1}},[e]),t}function Db(e){return(0,w.jsxs)("header",{...x(k.header,He.block),children:[(0,w.jsx)(Nr,{level:2,children:e.title}),(0,w.jsx)(H,{children:e.sub})]})}function Vn(e){return(0,w.jsxs)("section",{...x(k.section,He.block),children:[(0,w.jsx)("h3",{...x(k.h3,He.heading),children:(0,w.jsx)(Ka,{children:e.title})}),e.children]})}function uo(e){return(0,w.jsx)("div",{"data-step":e.step,...x(k.div,He.form),children:e.children})}function hn(e){return(0,w.jsx)(H,{role:"alert",tone:e.ok===!0?"good":"bad",children:e.text})}function Yo(e){let t=(0,U.useId)(),n=(0,w.jsx)("input",{id:t,name:e.name,type:e.type??"text",autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,inputMode:e.inputMode,spellCheck:e.spellCheck,autoFocus:e.autoFocus,maxLength:e.maxLength,placeholder:e.placeholder,value:e.value,onInput:o=>e.onInput(o.target.value),onChange:()=>{},onKeyDown:o=>{o.key==="Enter"&&e.onEnter?.()},...x(k.input,It.input),dir:"auto"});return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)("label",{htmlFor:t,...x(k.label,It.label),children:e.label}),e.children===void 0?n:(0,w.jsxs)("div",{...x(k.div,He.row),children:[n,e.children]})]})}var He={page:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",k7Eaqz:"xeuugli",kOIVth:"x1c1vhfx",$$css:!0},block:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x883omv",$$css:!0},heading:{kogj98:"x1ghz6dp",$$css:!0},form:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x167g77z",$$css:!0},row:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kOIVth:"x167g77z",$$css:!0},providers:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x167g77z",$$css:!0},ways:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x1jnr06f",kB88ic:"xe8uvvx",$$css:!0},way:{kGuDYH:"x4z9k3i",kMwMTN:"x6yhm7j",$$css:!0},asking:{k8WAf4:"xxlmvz2",kg3NbH:"xqin4a2",kMzoRj:"xmkeg23",ksu8eU:"x1y0btm7",kVAM5u:"x17drv8y",kaIpWk:"xur7f20",$$css:!0},code:{kogj98:"x1ghz6dp",kMv6JI:"x1j8uvit",kGuDYH:"x1pvqxga",kb6lSQ:"xl5zsmt",kMwMTN:"x6gl9h3",$$css:!0},flash:{k8WAf4:"xrii95j",kg3NbH:"xqin4a2",kZ1KPB:"x19sr0n1",k4WBpm:"x19ypqd9",kaZRDh:"x3l8lo6",kaIpWk:"xur7f20",kWkggS:"x5il0le",kGuDYH:"x4z9k3i",kMwMTN:"x6gl9h3",$$css:!0}};var rl=F(De(),1);var ye=F(Ie(),1);function kp(e){let[t,n]=(0,rl.useState)({kind:"loading"});return(0,rl.useEffect)(()=>{let o=!0;return e.source.view().then(r=>o&&n({kind:"done",view:r}),()=>o&&n({kind:"failed"})),()=>{o=!1}},[e.source]),(0,ye.jsx)("div",{"data-part":"achievements",...x(k.div,et.body),children:t.kind==="loading"?(0,ye.jsx)("p",{...x(k.p),children:"Loading\\u2026"}):t.kind==="failed"?(0,ye.jsx)(H,{children:"Could not reach your achievements just now."}):t.view===null||t.view.entries.length===0?(0,ye.jsx)(H,{children:"This game has no achievements."}):(0,ye.jsx)(FO,{view:t.view})})}function FO(e){let t=e.view.entries,[n,o]=(0,rl.useState)("all"),r=t.filter(s=>s.unlocked).length,i=fv(t),a=xf.find(s=>s.id===n)?.keep??(()=>!0),l=sv(t).filter(a);return(0,ye.jsxs)(ye.Fragment,{children:[(0,ye.jsxs)("div",{...x(k.div,et.headline),children:[(0,ye.jsxs)("div",{...x(k.div,et.summary),children:[(0,ye.jsx)("p",{...x(k.p,et.count),children:`${r} of ${t.length} unlocked`}),(0,ye.jsx)(tp,{share:i,size:"large"})]}),(0,ye.jsx)("p",{...x(k.p,et.percent),children:`${Math.round(i*100)}%`})]}),(0,ye.jsx)(Uo,{label:"Show",children:xf.map(s=>(0,ye.jsx)(Go,{label:s.label,pressed:s.id===n,onPress:()=>o(s.id)},s.id))}),l.length===0?(0,ye.jsx)(Jt,{children:"Nothing here yet."}):(0,ye.jsx)("ol",{...x(k.ol,et.list),children:l.map(s=>(0,ye.jsx)(ZO,{entry:s},s.id))})]})}function ZO(e){let{entry:t}=e,n=t.declared.secret===!0&&!t.unlocked,o=n?"Keep playing to find this one.":t.declared.detail,r=t.declared.progress?.target,i=t.unlocked&&t.at!==void 0?Rt(t.at):"";return(0,ye.jsxs)("li",{"data-unlocked":String(t.unlocked),"data-secret":n?"true":void 0,...x(k.li,et.row,!t.unlocked&&et.locked),children:[(0,ye.jsx)("span",{"aria-hidden":!0,...x(k.span,et.icon,t.unlocked&&et.iconOn),children:n?"?":qs(t.declared,t.unlocked)}),(0,ye.jsxs)("div",{...x(k.div,et.text),children:[(0,ye.jsxs)("div",{...x(k.div,et.line),children:[(0,ye.jsx)("span",{...x(k.span,et.title,n&&et.secret),children:n?"Secret":t.declared.title}),(0,ye.jsx)("span",{"data-done":String(t.unlocked),...x(k.span,et.status,t.unlocked&&et.statusDone),children:cv(t)})]}),o===void 0||o===""?null:(0,ye.jsx)("span",{...x(k.span,et.detail),children:o}),r!==void 0&&!t.unlocked&&!n?(0,ye.jsxs)("div",{...x(k.div,et.meter),children:[(0,ye.jsx)(tp,{share:uv(t,r),quiet:!0}),(0,ye.jsx)("span",{...x(k.span,et.progress),children:dv(t,r)})]}):null]}),i===""?null:(0,ye.jsx)("span",{...x(k.span,et.when),children:i})]})}var et={body:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"xou54vl",$$css:!0},headline:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kOIVth:"x1af02g3",k8WAf4:"x99dwph",kg3NbH:"x1hr3lfm",kaIpWk:"xydzhu4",kWkggS:"x10bqf5p",$$css:!0},summary:{kzQI83:"x1iyjqo2",kmuXW:"xs83m0k",k7Eaqz:"xeuugli",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x17d4w8g",$$css:!0},count:{kGuDYH:"xif65rj",k63SB2:"xk50ysn",kMwMTN:"x6gl9h3",$$css:!0},percent:{kmuXW:"x2lah0s",kMv6JI:"x1j8uvit",kGuDYH:"xosj86m",k63SB2:"xk50ysn",kcqcaj:"xss6m8b",kMwMTN:"x6gl9h3",$$css:!0},list:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x167g77z",kB88ic:"xe8uvvx",$$css:!0},row:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x1cy8zhl",kOIVth:"x1v2ro7d",k8WAf4:"x10dr8xq",kg3NbH:"xqin4a2",kaIpWk:"xydzhu4",kWkggS:"xvqquxf",$$css:!0},locked:{kSiTet:"x19s9pn4",$$css:!0},icon:{kmuXW:"x2lah0s",kzqmXN:"x100vrsf",kZKoxP:"x1vqgdyp",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kMzoRj:"xmkeg23",ksu8eU:"x1y0btm7",kVAM5u:"x1hobkz3",kaIpWk:"x2jfb3a",kWkggS:"x1qg24v8",kMwMTN:"xplcgjq",kGuDYH:"xosj86m",kLWn49:"xo5v014",k9WMMc:"x2b8uid",$$css:!0},iconOn:{kVAM5u:"x1ekxq7s",kWkggS:"x101z6j2",kMwMTN:"x1et08zh",$$css:!0},text:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x1nejdyq",k7Eaqz:"xeuugli",kzQI83:"x1iyjqo2",kmuXW:"xs83m0k",kCS8Yb:"xdl72j9",$$css:!0},line:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x1pha0wt",kOIVth:"x167g77z",$$css:!0},title:{kzQI83:"x1iyjqo2",kmuXW:"xs83m0k",k7Eaqz:"xeuugli",kGuDYH:"xif65rj",k63SB2:"xk50ysn",kMwMTN:"x6gl9h3",$$css:!0},secret:{kKX8nH:"x1k4tb9n",kMwMTN:"xupo0id",$$css:!0},status:{kmuXW:"x2lah0s",kMv6JI:"x1j8uvit",kGuDYH:"x1j6dyjg",kcqcaj:"xss6m8b",kMwMTN:"xplcgjq",$$css:!0},statusDone:{kMwMTN:"xyify0s",$$css:!0},detail:{kGuDYH:"x1ct8sxb",kLWn49:"xfrs9s4",kMwMTN:"xupo0id",kN2L0X:"x1fzhlzt",$$css:!0},meter:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x1ed6fcf",keoZOQ:"x1gslohp",$$css:!0},progress:{kMv6JI:"x1j8uvit",kGuDYH:"x1j6dyjg",kcqcaj:"xss6m8b",kMwMTN:"xupo0id",$$css:!0},when:{kmuXW:"x2lah0s",kSGwAc:"xqcrz7y",kMv6JI:"x1j8uvit",kGuDYH:"x1j6dyjg",khDVqt:"xuxw1ft",kMwMTN:"xupo0id",$$css:!0}};var Bb=F(De(),1);var qb=F(Ie(),1),Sp=100;function Gb(e){return(0,qb.jsx)("input",{type:"range",min:0,max:Sp,step:1,value:String(Math.round(e.value*Sp)),"aria-label":e.label,"data-gb-drag":"true",onInput:t=>e.onChange(Number(t.target.value)/Sp),onChange:()=>{},...x(k.input,Hb.range,e.dim===!0&&Hb.dim),dir:"auto"})}var Hb={range:{kysU6D:"xjyslct",kzQI83:"x1iyjqo2",kmuXW:"xs83m0k",kCS8Yb:"xdl72j9",kzqmXN:"xh8yej3",k7Eaqz:"xeuugli",kZKoxP:"xmix8c7",kogj98:"x1ghz6dp",kMzoRj:"xc342km",kWkggS:"xjbqb8w",kkrTdU:"x1ypdohk",kFalU9:"x5ve5x3",kLEcq7:"x13m05e8",kPN2sh:"x1frnmxr",krh22I:"x1v99137",k1Yvi:"xagyqcp",kIj00r:"x1wreb4n",kz0EQ2:"xy7mfwe",kVm9qV:"xibs45w",ko8Lax:"xe55cdc",knPAaj:"xjfutqj",kOL7W1:"x3cp4ko",kVGLri:"xcvrw5r",kYtk0k:"xfiu4hc",kdolh7:"xj0hoj",kNVurx:"x2pfokl",kTiEMQ:"xaxxyxf",ktJ751:"x1ai2ryv",kODhZs:"x1wwh93d",kOc70j:"x1pvkr6q",k8jLhU:"xjjq0d0",k2EGEa:"x1bue4x7",$$css:!0},dim:{kSiTet:"xyd83as",kdolh7:"x1fmniu7",k8jLhU:"x1ax6aqf",$$css:!0}};var tn=F(Ie(),1);function wp(e){let t=(0,Bb.useSyncExternalStore)(e.mix.on,e.mix.get),n=(i,a)=>{e.mix.set(i),e.onChange(a)},o=i=>t.muted?"off":`${Math.round(i*100)}%`,r=Object.entries(e.channels);return(0,tn.jsxs)("section",{"aria-label":"Sound","data-muted":String(t.muted),...x(k.section,co.audio),children:[(0,tn.jsxs)("div",{...x(k.div,co.line),children:[(0,tn.jsx)("button",{"aria-label":"Mute this game","aria-pressed":t.muted,onClick:()=>n({...t,muted:!t.muted},{muted:!t.muted}),...x(k.button,ae.base,co.mute,t.muted&&co.muteOn),type:"button",children:(0,tn.jsx)(je,{name:"speaker",size:17})}),(0,tn.jsx)(Ub,{title:"Volume",master:!0,level:t.master,muted:t.muted,readout:o(t.master),onChange:i=>n({...t,master:i},{master:i})})]}),r.length===0?null:(0,tn.jsx)("div",{...x(k.div,co.channels),children:r.map(([i,a])=>{let l=t.channels[i]??1;return(0,tn.jsx)(Ub,{title:a.title,level:l,muted:t.muted,readout:o(l),onChange:s=>n({...t,channels:{...t.channels,[i]:s}},{channels:{[i]:s}})},i)})})]})}function Ub(e){return(0,tn.jsxs)("label",{...x(k.label,co.line),children:[(0,tn.jsx)("span",{...x(k.span,co.name,e.master===!0&&co.master),children:e.title}),(0,tn.jsx)(Gb,{label:e.title,value:e.level,dim:e.muted,onChange:e.onChange}),(0,tn.jsx)("span",{"aria-hidden":!0,...x(k.span,co.value),children:e.readout})]})}var co={audio:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x1v2ro7d",$$css:!0},channels:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x883omv",$$css:!0},line:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kOIVth:"x1v2ro7d",k7Eaqz:"xeuugli",$$css:!0},mute:{kmuXW:"x2lah0s",kzqmXN:"x1691je0",kZKoxP:"x90ne7k",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kaIpWk:"xhpnuu7",kWkggS:"x1qg24v8",kMwMTN:"x6gl9h3 x10waejh",k1ekBW:"x1gbuem2",kIyJzY:"x198w77l",$$css:!0},muteOn:{kMwMTN:"xplcgjq x10waejh",$$css:!0},name:{kmuXW:"x2lah0s",kzqmXN:"x29ncy0",kGuDYH:"x4z9k3i",kMwMTN:"x6yhm7j",kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",$$css:!0},master:{k63SB2:"xk50ysn",kMwMTN:"x6gl9h3",$$css:!0},value:{kmuXW:"x2lah0s",k7Eaqz:"x900493",k9WMMc:"x1hr2gdg",kMv6JI:"x1j8uvit",kGuDYH:"x1j6dyjg",kcqcaj:"xss6m8b",kMwMTN:"xupo0id",$$css:!0}};var Vb=F(De(),1);var qt=F(Ie(),1);function Ap(e){let{closed:t}=e.community,n=(0,Vb.useSyncExternalStore)(t.on,t.get,t.get),o=yt();return n?null:(0,qt.jsxs)("div",{"data-part":"community",...x(k.div,Pn.strip),children:[(0,qt.jsxs)("a",{href:e.community.discord,target:"_blank",rel:"noopener",onClick:()=>o({event:"community_clicked",target:"discord"}),...x(k.a,Pn.half,Pn.discord),children:[(0,qt.jsx)("span",{...x(k.span,Pn.label),children:"Join the Discord"}),(0,qt.jsx)("span",{...x(k.span,Pn.discordMark),children:(0,qt.jsx)(Ws,{name:"discord",size:20})})]}),(0,qt.jsxs)("button",{onClick:()=>{o({event:"community_clicked",target:"create"}),e.onCreate()},...x(k.button,ae.base,Pn.half,Pn.create),type:"button",children:[(0,qt.jsx)("span",{...x(k.span,Pn.label),children:"Create a Game"}),(0,qt.jsx)("span",{...x(k.span,Pn.plus),children:(0,qt.jsx)(je,{name:"plus",size:18,weight:2})})]}),(0,qt.jsx)("button",{"aria-label":"Close",onClick:()=>{o({event:"community_clicked",target:"close"}),t.set(!0)},...x(k.button,ae.base,Pn.close),type:"button",children:(0,qt.jsx)("span",{...x(k.span,Pn.closeDisc),children:(0,qt.jsx)(je,{name:"remove",size:10,weight:2.6})})})]})}var Pn={strip:{kVAEAm:"x1n2onr6",k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kEafiO:"x178xt8z",kPef9Z:"x13fuv20",kLZC3w:"x1em74e8",$$css:!0},half:{kzQI83:"x1iyjqo2",kCS8Yb:"x1r8uery",k7Eaqz:"xeuugli",kAzted:"x1wiwyrm",k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kOIVth:"x883omv",kg3NbH:"xqin4a2",kMwMTN:"x6gl9h3",kybGjl:"x1hl2dhg",kkrTdU:"x1ypdohk",kfSwDN:"x87ps6o",kInvED:"x2ssjo2",k1ekBW:"x15406qy",kIyJzY:"x198w77l",$$css:!0},discord:{kWkggS:"x19rgrjr xykbdm0",$$css:!0},create:{kZ1KPB:"xe0pwq",k4WBpm:"x19ypqd9",kaZRDh:"xj1ku99",kWkggS:"x385mod x1izjn8v",$$css:!0},label:{kmuXW:"xs83m0k",k7Eaqz:"xeuugli",kMv6JI:"x19979ed",kGuDYH:"x2ouz8m",k63SB2:"xk50ysn",kMwMTN:"x6gl9h3",khDVqt:"xuxw1ft",kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",$$css:!0},discordMark:{k1xSpc:"x78zum5",kmuXW:"x2lah0s",kMwMTN:"x1udkhtm",$$css:!0},plus:{k1xSpc:"x78zum5",kmuXW:"x2lah0s",kMwMTN:"x1et08zh",$$css:!0},close:{kVAEAm:"x10l6tqk",kCIrl2:"x3lmqil",k87sOh:"x1lg0oad",kY2c9j:"x1vjfegm",kzqmXN:"x14qfxbe",kZKoxP:"xc9qbxq",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kMwMTN:"x6yhm7j x1kc931m",$$css:!0},closeDisc:{kzqmXN:"x17z2i9w",kZKoxP:"x17rw0jw",kaIpWk:"x1ctf4ec",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kMzoRj:"xmkeg23",ksu8eU:"x1y0btm7",kVAM5u:"x1bezp6c",kWkggS:"xtxhkq7 xl8wwv7",kGVxlE:"xa8ncz1",k1ekBW:"x15406qy",kIyJzY:"x198w77l",$$css:!0}};var _n=F(De(),1);var Ep=[{id:"keyboard",label:"Keyboard and mouse",icon:"keyboard"},{id:"touch",label:"Touch",icon:"phone"},{id:"gamepad",label:"Controller",icon:"gamepad"}];function Xb(e,t){let n=Object.values(e).flat(),o=Ep.map(r=>r.id).filter(r=>r==="touch"&&t.length>0||n.some(i=>fu(i)?.includes(r)===!0));return o.length>0?o:["keyboard"]}function Wb(e,t,n){if(n!==void 0&&e.includes(n))return n;let o=KO(t??"keyboard");return e.includes(o)?o:e[0]}function KO(e){return e==="touch"?"touch":e==="gamepad"?"gamepad":"keyboard"}function fu(e){if(e==="pointer.primary")return["keyboard","touch"];if(e==="pointer.secondary")return["keyboard"];switch(Op(e)){case"keyboard":case"mouse":return["keyboard"];case"gamepad":return["gamepad"];case"touch":return["touch"];default:return e.startsWith("controls.")?["touch"]:null}}function Yb(e){return e==="keyboard"||e==="gamepad"?e:null}var Fb=4;function QO(e,t){if(e===t)return!0;if(!e.startsWith("pad.")||!t.startsWith("pad."))return!1;let[n,o]=[e.slice(4).split("."),t.slice(4).split(".")];return n.length===1&&o.length===2?o[1]===n[0]:n.length===2&&o.length===1?n[1]===o[0]:!1}function Mp(e,t){let n={};for(let[o,r]of Object.entries(e)){let i=t[o];if(i===void 0)continue;i.length===r.bind.length&&i.every((l,s)=>l===r.bind[s])||(n[o]=[...i])}return n}function Tp(e,t){return e.startsWith("controls.")?"On screen":Lt(e,t)||e}function Op(e){return Dd(e)??"pointer"}function Zb(e,t){return t?.label??e.slice(0,1).toUpperCase()}var JO=["row","column","diamond","cluster"];function Kb(e){return JO.includes(e)?e:"column"}function Rp(e,t,n,o){let r=e[n]?.bind??[],i=[];for(let[a,l]of Object.entries(e)){if(a===n)continue;let s=(t[a]??[]).filter(f=>QO(f,o));if(s.length===0)continue;r.includes(o)&&s.every(f=>l.bind.includes(f))||i.push(l.title??a)}return i}function Qb(e,t,n){let o=new Set,r=[];for(let[i,a]of Object.entries(e))for(let l of t[i]??[]){if(!(fu(l)?.includes(n)??!0))continue;let s=Rp(e,t,i,l),u=Tp(l,n);s.length===0||o.has(u)||(o.add(u),r.push(`${u} presses both ${[a.title??i,...s].join(" and ")}.`))}return r.join(" ")}function Jb(e,t,n){let o=e,r=o?.ownerDocument;if(o==null||r==null)return()=>{};let i=r.defaultView,a=null;o.dataset.gbCapture=t;let l=p=>{delete o.dataset.gbCapture,n(p)};function s(p){if(!o.isConnected)return c();if(p.repeat)return;if(p.code==="Escape")return p.preventDefault(),p.stopPropagation(),l(null);if(t!=="keyboard")return;let g=`key.${p.code}`;p.preventDefault(),p.stopPropagation(),Ld(g)&&l(g)}function u(p){if(!o.isConnected)return c();p.composedPath().includes(o)||l(null)}let f=new Map;function m(){if(a=null,!o.isConnected)return c();for(let p of i?.navigator.getGamepads?.()??[]){if(p===null||p.mapping!=="standard")continue;let g=f.get(p.index),S=p.buttons.map(y=>y.pressed);if(f.set(p.index,S),g!==void 0)for(let[y,h]of S.entries()){let d=qa[y];if(h&&g[y]!==!0&&typeof d=="string")return l(d)}}a=i?.requestAnimationFrame(m)??null}function c(){delete o.dataset.gbCapture,r.removeEventListener("keydown",s,!0),r.removeEventListener("pointerdown",u,!0),a!==null&&i?.cancelAnimationFrame(a),a=null}return r.addEventListener("keydown",s,!0),r.addEventListener("pointerdown",u,!0),t==="gamepad"&&typeof i?.requestAnimationFrame=="function"&&m(),c}var ee=F(Ie(),1),ex;function Cp(e){let t=Object.entries(e.actions),n=Object.entries(e.layouts),[o,r]=(0,_n.useState)(()=>{let b={};for(let[T,O]of t)b[T]=[...e.mapping?.[T]?.bind??O.bind];return b}),i=Xb(o,n),[a,l]=(0,_n.useState)(()=>Wb(i,e.scheme,ex)),[s,u]=(0,_n.useState)(null),f=(0,_n.useRef)(new Map),m=(0,_n.useRef)(null);if((0,_n.useEffect)(()=>{let b=m.current;if(b!==null){m.current=null;for(let T of b){let O=f.current.get(T);if(O?.focus!==void 0){O.focus();return}}}}),(0,_n.useEffect)(()=>{if(s===null)return;let b=`${s.id}|${s.index===null?"+":o[s.id]?.[s.index]??""}`;return Jb(f.current.get(b),s.on,T=>{u(null),T!==null&&g(s.id,s.index,T)})},[s]),t.length===0&&n.length===0)return(0,ee.jsx)(H,{children:"This game does not say how it is played."});let c=e.rebind!==void 0;function p(b){r(b),e.rebind?.(Mp(e.actions,b))}function g(b,T,O){let A=[...o[b]??[]];T===null?A.push(O):A[T]=O;let R=T??A.length-1;p({...o,[b]:A.filter((M,E)=>M!==O||E===R)}),m.current=[`${b}|${O}`]}function S(b,T){let O=[...o[b]??[]];O.splice(T,1),p({...o,[b]:O}),m.current=[...O.slice(T).map(A=>`${b}|${A}`),`${b}|+`,...O.map(A=>`${b}|${A}`).reverse()]}function y(b){s!==null&&s.id===b.id&&s.index===b.index?u(null):u(b)}let h=c?Yb(a):null,d=(b,T)=>Rp(e.actions,o,b,T),v=a==="touch"&&n.length>0?"":Qb(e.actions,o,a);return(0,ee.jsxs)("div",{"data-part":"input",...x(k.div,q.body),children:[(0,ee.jsxs)("div",{...x(k.div,q.section),children:[(0,ee.jsxs)("div",{...x(k.div,q.head),children:[(0,ee.jsx)("h4",{...x(k.h4,q.heading),children:"Controls"}),i.length>1?(0,ee.jsx)("div",{role:"group","aria-label":"Show the controls for",...x(k.div,q.devices),children:Ep.filter(b=>i.includes(b.id)).map(b=>(0,ee.jsx)("button",{"aria-label":b.label,"aria-pressed":b.id===a,"data-hands":b.id,onClick:()=>{ex=b.id,u(null),l(b.id)},...x(k.button,ae.base,q.device,b.id===a&&q.deviceOn),type:"button",children:(0,ee.jsx)(je,{name:b.icon,size:17,look:q.deviceIcon})},b.id))}):null]}),a==="touch"&&n.length>0?n.map(([b,T],O)=>(0,ee.jsx)(nR,{name:n.length>1?b:null,after:O>0,layout:T,actions:e.actions},b)):(0,ee.jsx)("ul",{...x(k.ul,q.actions),children:t.map(([b,T])=>(0,ee.jsx)(eR,{id:b,declared:T,bindings:o[b]??T.bind,hands:a,capture:h,listening:s?.id===b?s:null,clashes:d,chip:(O,A)=>{A===null?f.current.delete(O):f.current.set(O,A)},onListen:O=>h!==null&&y({id:b,index:O,on:h}),onRemove:O=>S(b,O)},b))}),v===""?null:(0,ee.jsx)(H,{role:"status",tone:"bad",children:v}),s===null?null:(0,ee.jsx)(H,{live:!0,children:s.on==="keyboard"?"Press a key, or Esc to cancel.":"Press a button on the controller, or Esc to cancel."})]}),c?(0,ee.jsx)(Ci,{label:"Reset to defaults",end:!0,disabled:Object.keys(Mp(e.actions,o)).length===0,onPress:()=>{let b={};for(let[T,O]of t)b[T]=[...O.bind];u(null),r(b),e.rebind?.({})}}):null]})}function eR(e){let{id:t,declared:n,hands:o,capture:r}=e,i=n.title??t,a=0,l=e.bindings.flatMap((u,f)=>{let m=fu(u);if(m!==null&&!m.includes(o))return[];let c=Op(u),p=e.clashes(t,u),g=p.length===0?"":` \\u2014 also presses ${p.join(" and ")}`,S=Tp(u,o);if(r===null||c!==r)return[(0,ee.jsx)("span",{"data-device":c,"data-clash":p.length>0?"true":void 0,...x(k.span,pu({device:c,clash:p.length>0})),children:S},u)];a+=1;let y=e.listening?.index===f,h=(0,ee.jsx)("button",{ref:d=>e.chip(`${t}|${u}`,d),"aria-label":`Change ${S} for ${i}${g}`,"aria-pressed":y,"data-action":t,"data-binding":u,"data-device":c,"data-clash":p.length>0?"true":void 0,"data-capturing":y?"true":void 0,onClick:()=>e.onListen(f),...x(k.button,ae.base,...pu({device:c,clash:p.length>0,pressable:!0,capturing:y})),type:"button",children:y?"\\u2026":S},u);return e.bindings.length<2?[h]:[(0,ee.jsx)(tR,{hidden:y,label:`Remove ${S} from ${i}`,onRemove:()=>e.onRemove(f),children:h},u)]}),s=null;if(r!==null&&a<Fb){let u=r==="keyboard"?"a key":"a button",f=e.listening?.index===null;s=(0,ee.jsx)("button",{ref:m=>e.chip(`${t}|+`,m),"aria-label":`${a===0?"Bind":"Add"} ${u} to ${i}`,"aria-pressed":f,"data-action":t,"data-add":"true","data-capturing":f?"true":void 0,onClick:()=>e.onListen(null),...x(k.button,ae.base,...pu({device:r,pressable:!0,capturing:f,add:!0})),type:"button",children:f?"\\u2026":"+"})}else l.length===0&&(s=(0,ee.jsx)("span",{"data-empty":"true",...x(k.span,pu({device:"none",empty:!0})),children:"\\u2014"}));return(0,ee.jsxs)("li",{...x(k.li,q.action),children:[(0,ee.jsx)("span",{...x(k.span,q.name),children:i}),(0,ee.jsxs)("div",{...x(k.div,q.keys,a>0&&e.bindings.length>=2&&q.keysSpaced),children:[l,s]})]})}function tR(e){let[t,n]=(0,_n.useState)(!1);return(0,ee.jsxs)("span",{onPointerEnter:()=>n(!0),onPointerLeave:()=>n(!1),onFocus:()=>n(!0),onBlur:()=>n(!1),...x(k.span,q.slot),children:[e.children,e.hidden?null:(0,ee.jsx)("button",{"aria-label":e.label,onClick:e.onRemove,...x(k.button,ae.base,q.remove,t&&q.removeShown),type:"button",children:(0,ee.jsx)(je,{name:"remove",size:10,weight:3.4})})]})}function pu(e){let t=e.device==="gamepad",n=e.device==="touch"||e.device==="pointer"||e.device==="mouse";return[q.key,e.empty===!0&&q.empty,e.pressable===!0&&q.pressable,e.capturing===!0&&q.capturing,t&&q.pad,n&&q.quietKey,e.clash===!0&&q.clash,e.add===!0&&q.add,e.pressable===!0&&e.clash!==!0&&(t?q.edgePad:e.capturing===!0?q.edgeWaiting:q.edgeKey)]}function nR(e){let t=(0,ee.jsx)("div",{...x(k.div,q.pad2),children:Ts.map(n=>{let o=e.layout[n];return o===void 0?null:(0,ee.jsx)("div",{"data-zone":n,...x(k.div,q.zone,n==="right"&&q.zoneRight,n==="full"&&q.zoneFull),children:Object.entries(o).map(([r,i])=>(0,ee.jsx)(oR,{id:r,slot:i,actions:e.actions},r))},n)})});return e.name===null?t:(0,ee.jsxs)("div",{...x(k.div,q.layout,e.after&&q.layoutAfter),children:[(0,ee.jsx)("p",{...x(k.p,q.layoutName),children:e.name}),t]})}function oR(e){if(e.slot.type==="thumbstick"){let o=typeof e.slot.as=="string"?e.slot.as:`controls.${e.id}`,r=e.slot.axis;if(r==="x"||r==="y"){let i=r==="x";return(0,ee.jsxs)("div",{role:"img","aria-label":o,"data-axis":r,...x(k.div,q.track,i?q.trackX:q.trackY),children:[(0,ee.jsx)("span",{...x(k.span,q.chevron,i?q.chevronLeft:q.chevronUp)}),(0,ee.jsx)("div",{...x(k.div,q.trackKnob)}),(0,ee.jsx)("span",{...x(k.span,q.chevron,i?q.chevronRight:q.chevronDown)})]})}return(0,ee.jsx)("div",{role:"img","aria-label":o,...x(k.div,q.stick),children:(0,ee.jsx)("div",{...x(k.div,q.knob)})})}let t=Kb(e.slot.shape),n=(e.slot.buttons??[]).map(o=>(0,ee.jsx)("span",{"aria-label":e.actions[o]?.title??o,...x(k.span,q.face),children:Zb(o,e.actions[o])},o));if(t==="diamond"){let[o,r,i,a]=n;return(0,ee.jsxs)("div",{"data-shape":t,...x(k.div,q.buttons),children:[(0,ee.jsx)("div",{...x(k.div,q.diamondRow),children:o}),(0,ee.jsxs)("div",{...x(k.div,q.diamondRow,q.diamondMiddle),children:[r,i]}),(0,ee.jsx)("div",{...x(k.div,q.diamondRow),children:a})]})}return(0,ee.jsx)("div",{"data-shape":t,...x(k.div,q.buttons,t==="row"&&q.row,t==="cluster"&&q.cluster),children:n})}var q={body:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",$$css:!0},section:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x167g77z",$$css:!0},head:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kjj79g:"x1qughib",kOIVth:"x167g77z",$$css:!0},heading:{kMv6JI:"x1j8uvit",kGuDYH:"x1j6dyjg",kb6lSQ:"xv2r5ts",kP9fke:"xtvhhri",kMwMTN:"xupo0id",$$css:!0},devices:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kOIVth:"x195vfkc",$$css:!0},device:{kzqmXN:"x1td3qas x18s75z6",kZKoxP:"x10w6t97 x63sfu2",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kaIpWk:"xur7f20 x10ih02v",kMwMTN:"xplcgjq x1ti8bc7",k1ekBW:"x1gbuem2",kIyJzY:"x198w77l",$$css:!0},deviceIcon:{kzqmXN:"x1se2ifz x1kkwbli",kZKoxP:"x1ta3ar0 xizhjz2",$$css:!0},deviceOn:{kWkggS:"xcbcf2q xbw9g77",kMwMTN:"x7lcjf2 x1pa849f",$$css:!0},actions:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x17d4w8g",kB88ic:"xe8uvvx",$$css:!0},action:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kOIVth:"x1v2ro7d",k7Eaqz:"xeuugli",k8WAf4:"x1m7iz9m",kZCmMZ:"x1onr9mi",kwRFfy:"x2vl965",kaIpWk:"x2jfb3a",kWkggS:"xvqquxf",$$css:!0},name:{kzQI83:"x1iyjqo2",kmuXW:"xs83m0k",kCS8Yb:"xdl72j9",k7Eaqz:"xeuugli",kGuDYH:"xif65rj",kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",kMwMTN:"x6gl9h3",$$css:!0},keys:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kOIVth:"x1jnr06f",kmuXW:"x2lah0s",$$css:!0},keysSpaced:{kOIVth:"x167g77z x1auhu43",$$css:!0},key:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kB7OPa:"x9f619",k7Eaqz:"x17s4nb9",kZKoxP:"x1gnnpzl",k8WAf4:"xt970qd",kg3NbH:"xlkn9b3",kMzoRj:"xmkeg23",kt9PQ7:"x2x41l1",ksu8eU:"x1y0btm7",kVAM5u:"x1pq9f60",kaIpWk:"x12oqio5",kWkggS:"x1qg24v8",kMwMTN:"x6gl9h3",kMv6JI:"x1j8uvit",kGuDYH:"xfifm61",kLWn49:"xo5v014",khDVqt:"xuxw1ft",$$css:!0},empty:{kVAM5u:"x1hobkz3",kWkggS:"xjbqb8w",kMwMTN:"xplcgjq",$$css:!0},pressable:{kkrTdU:"x1ypdohk",k1ekBW:"xshfolx",kIyJzY:"x198w77l",$$css:!0},capturing:{kVAM5u:"x17drv8y",kWkggS:"x101z6j2",kMwMTN:"xyify0s",$$css:!0},pad:{kt9PQ7:"xso031l",kaIpWk:"xq1n3g1",kVAM5u:"x1ekxq7s",kMwMTN:"x1et08zh",$$css:!0},quietKey:{kMwMTN:"xupo0id",$$css:!0},clash:{kVAM5u:"x1etxd99",kWkggS:"x7es4if",kMwMTN:"x1bedcge",$$css:!0},add:{ksu8eU:"xbsl7fq",kt9PQ7:"xso031l",$$css:!0},edgeKey:{kVAM5u:"x1pq9f60 xu360h0",$$css:!0},edgeWaiting:{kVAM5u:"x17drv8y xu360h0",$$css:!0},edgePad:{kVAM5u:"x1ekxq7s xu360h0",$$css:!0},slot:{kVAEAm:"x1n2onr6",k1xSpc:"x78zum5",$$css:!0},remove:{kVAEAm:"x10l6tqk",k87sOh:"xtu2xtp x1ncqbut",kCIrl2:"xgzdjil x1pw0nqh",kzqmXN:"x1kky2od x1kkwbli",kZKoxP:"xlup9mm xizhjz2",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kaIpWk:"xq1n3g1",kWkggS:"x2v42ul",kMwMTN:"x141ken1",kSiTet:"xg01cxk xqzx146 x25t5g8",k1ekBW:"x19991ni",kIyJzY:"x198w77l",kgeoSG:"x1cpjm7i",kEoFBp:"x1hmns74",kFcpXp:"x1658mo5",$$css:!0},removeShown:{kSiTet:"x1hc1fzr",$$css:!0},layout:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x17d4w8g",$$css:!0},layoutAfter:{keoZOQ:"x1k70j0n",$$css:!0},layoutName:{kMv6JI:"x1j8uvit",kGuDYH:"x1j6dyjg",kMwMTN:"xupo0id",$$css:!0},pad2:{kVAEAm:"x1n2onr6",k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"xuk3077",kjj79g:"x1qughib",kOIVth:"x883omv",kAzted:"x6lgdlw",kmVPX3:"xc7ga6q",kMzoRj:"xmkeg23",ksu8eU:"x1y0btm7",kVAM5u:"x1hobkz3",kaIpWk:"x2jfb3a",kWkggS:"xvqquxf",$$css:!0},zone:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"xuk3077",kOIVth:"x17d4w8g",$$css:!0},zoneRight:{keTefX:"xvc5jky",kXwgrk:"x15zctf7",$$css:!0},zoneFull:{kVAEAm:"x10l6tqk",kbCHJM:"xu96u03",kCIrl2:"x3m8u43",krVfgx:"xn0vg7t",kjj79g:"xl56j7k",$$css:!0},buttons:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x1jnr06f",$$css:!0},row:{kXwgrk:"x1q0g3np",$$css:!0},cluster:{kXwgrk:"x1q0g3np",kwnvtZ:"x1a02dak",kzqmXN:"x15yg21f",$$css:!0},diamondRow:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kjj79g:"xl56j7k",$$css:!0},diamondMiddle:{kOIVth:"xqj3so6",$$css:!0},face:{kzqmXN:"x23j0i4",kZKoxP:"xd7y6wv",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kMzoRj:"xmkeg23",ksu8eU:"x1y0btm7",kVAM5u:"x1bezp6c",kaIpWk:"xq1n3g1",kMv6JI:"x1j8uvit",kGuDYH:"x1j6dyjg",kLWn49:"xo5v014",kMwMTN:"xupo0id",$$css:!0},stick:{kzqmXN:"x3x2bpi",kZKoxP:"xwvwv9b",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kMzoRj:"xmkeg23",ksu8eU:"x1y0btm7",kVAM5u:"x1bezp6c",kaIpWk:"xq1n3g1",$$css:!0},knob:{kzqmXN:"x1t0fkks",kZKoxP:"x1add0xu",kaIpWk:"xq1n3g1",kWkggS:"x4r4f8x",$$css:!0},track:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"x1qughib",kMzoRj:"xmkeg23",ksu8eU:"x1y0btm7",kVAM5u:"x1bezp6c",kaIpWk:"xq1n3g1",$$css:!0},trackX:{kzqmXN:"x1fu8urw",kZKoxP:"xd7y6wv",kXwgrk:"x1q0g3np",kg3NbH:"x1xijbu4",$$css:!0},trackY:{kzqmXN:"x23j0i4",kZKoxP:"x1peatla",kXwgrk:"xdt5ytf",k8WAf4:"x1t0vds8",$$css:!0},trackKnob:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",kaIpWk:"xq1n3g1",kWkggS:"x4r4f8x",$$css:!0},chevron:{kzqmXN:"x1ftt334",kZKoxP:"x1ycjhwn",ksu8eU:"x1y0btm7",kVAM5u:"x12rif8h",kEafiO:"x972fbf",kWqL5O:"xgfja2r",kt9PQ7:"x1pzews7",kZ1KPB:"xaqn3yn",$$css:!0},chevronLeft:{k3aq6I:"x1158fpu",$$css:!0},chevronRight:{k3aq6I:"x1a60rdm",$$css:!0},chevronUp:{k3aq6I:"x11t6m9b",$$css:!0},chevronDown:{k3aq6I:"x1rr8tx7",$$css:!0}};var Ur=F(De(),1);var tx=F(De(),1);function nx(e,t,n){(0,tx.useEffect)(()=>{if(!t)return;let o=e.current,r=o?.ownerDocument;if(o==null||r==null)return;let i=a=>{let l=a.target;l!==null&&o.contains(l)||n()};return r.addEventListener("pointerdown",i,!0),()=>r.removeEventListener("pointerdown",i,!0)},[e,t,n])}var lt=F(Ie(),1);function il(e){let[t,n]=(0,Ur.useState)(!1),o=(0,Ur.useRef)(null),r=(0,Ur.useRef)(null),i=(0,Ur.useCallback)(()=>n(!1),[]);nx(o,t,i);let a=e.options.find(s=>s.id===e.selected)??e.options[0],l=e.size==="large";return(0,lt.jsxs)("div",{ref:o,onKeyDown:s=>{s.key!=="Escape"||!t||(s.stopPropagation?.(),n(!1),r.current?.focus?.())},...x(k.div,ft.menu),children:[(0,lt.jsxs)("button",{ref:r,"aria-haspopup":"listbox","aria-expanded":t,"aria-label":`${e.label}: ${a?.label??""}`,onClick:()=>n(!t),...x(k.button,ae.base,ft.trigger,t&&ft.triggerOpen),type:"button",children:[(0,lt.jsxs)("span",{...x(k.span,ft.words),children:[(0,lt.jsx)("span",{...x(k.span,ft.name,l&&ft.nameLarge),children:a?.label??e.label}),a?.hint===void 0||a.hint===""?null:(0,lt.jsx)("span",{...x(k.span,ft.hint),children:a.hint})]}),(0,lt.jsx)("span",{...x(k.span,ft.caret,t&&ft.caretOpen),children:(0,lt.jsx)(je,{name:"caret",size:16})})]}),t?(0,lt.jsx)("ul",{role:"listbox","aria-label":e.label,...x(k.ul,ft.list),children:e.options.map(s=>{let u=s.id===e.selected;return(0,lt.jsx)("li",{...x(k.li),children:(0,lt.jsxs)("button",{role:"option","aria-selected":u,onClick:()=>{n(!1),e.onPick(s.id)},...x(k.button,ae.base,ft.option,u&&ft.optionOn),type:"button",children:[(0,lt.jsxs)("span",{...x(k.span,ft.words),children:[(0,lt.jsx)("span",{...x(k.span,ft.optionName),children:s.label}),s.hint===void 0||s.hint===""?null:(0,lt.jsx)("span",{...x(k.span,ft.hint),children:s.hint})]}),u?(0,lt.jsx)("span",{...x(k.span,ft.tick),children:(0,lt.jsx)(je,{name:"check",size:15})}):null]})},s.id)})}):null]})}function ox(e){return(0,lt.jsx)("div",{...x(k.div,ft.pair),children:e.children.map((t,n)=>(0,lt.jsx)("div",{...x(k.div,ft.half),children:t},n))})}var ft={menu:{kVAEAm:"x1n2onr6",k7Eaqz:"xeuugli",$$css:!0},trigger:{kzqmXN:"xh8yej3",kAzted:"x1gg8mnh",k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kjj79g:"x1qughib",kOIVth:"x167g77z",k8WAf4:"xp59q4u",kZCmMZ:"x1onr9mi",kwRFfy:"xpdmqnj",kMzoRj:"xmkeg23",kVAM5u:"x1hobkz3",kaIpWk:"x2jfb3a",kWkggS:"x10bqf5p",k1ekBW:"xq90yva",kIyJzY:"xppnxx3",$$css:!0},triggerOpen:{kVAM5u:"x17drv8y",kWkggS:"x1atu9ce",$$css:!0},words:{kzQI83:"x1iyjqo2",kmuXW:"xs83m0k",k7Eaqz:"xeuugli",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x195vfkc",$$css:!0},name:{kGuDYH:"xif65rj",kMwMTN:"x6gl9h3",kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",$$css:!0},nameLarge:{kGuDYH:"x1jvydc1",k63SB2:"x1s688f",$$css:!0},hint:{kGuDYH:"xfifm61",kMwMTN:"x2g0jyv",kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",$$css:!0},caret:{k1xSpc:"x78zum5",kmuXW:"x2lah0s",kMwMTN:"xupo0id",k1ekBW:"x11xpdln",kIyJzY:"xppnxx3",$$css:!0},caretOpen:{k3aq6I:"x19jd1h0",$$css:!0},list:{kVAEAm:"x10l6tqk",k87sOh:"xi4zq41",kbCHJM:"xu96u03",kCIrl2:"x3m8u43",kY2c9j:"x1355qak",kmVPX3:"xfawy5m",kB88ic:"xe8uvvx",kaIpWk:"xydzhu4",kWkggS:"x1w0y00m",kGVxlE:"x56jxql",$$css:!0},option:{kzqmXN:"xh8yej3",k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kjj79g:"x1qughib",kOIVth:"x167g77z",kAzted:"x1gg8mnh",k8WAf4:"x1vvogim",kZCmMZ:"x1g0dm76",kwRFfy:"x2vl965",kaIpWk:"xur7f20",kWkggS:"xjbqb8w x6ikqrn",$$css:!0},optionOn:{kWkggS:"x1wonsr",$$css:!0},optionName:{kGuDYH:"x4z9k3i",kMwMTN:"x6gl9h3",kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",$$css:!0},tick:{k1xSpc:"x78zum5",kmuXW:"x2lah0s",kMwMTN:"x1et08zh",$$css:!0},pair:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kOIVth:"x167g77z",$$css:!0},half:{kzQI83:"x1iyjqo2",kmuXW:"xs83m0k",kCS8Yb:"x1r8uery",k7Eaqz:"xeuugli",$$css:!0}};var Ni=F(De(),1);var mu=F(De(),1);async function rx(e){let t=window.navigator.clipboard;if(t===void 0)return!1;try{return await t.writeText(e),!0}catch{return!1}}var ix=!0;var Pp=`I\'d like to make web game with Hopple and publish it (https://hopple.app).\n\nFirst, set up Hopple. If I have npm, install its skill: \\`npx skills add https://docs.hopple.app -g\\`\nIf not, read https://docs.hopple.app/skill.md and follow it.\n\nThen build the game with the Hopple SDK, test it, and publish it with the hopple CLI. Check with me before you publish, and give me the game\'s link when it\'s up.\n\nMy game: [USER: describe your game here. AI AGENT: if you see this text, ask the user what game they want to develop]\n`;var tt=F(Ie(),1),rR=2e3;function ax(e){let t=yt(),[n,o]=(0,mu.useState)(null);(0,mu.useEffect)(()=>{if(n!=="copied")return;let i=setTimeout(()=>o(null),rR);return()=>clearTimeout(i)},[n]);let r=async()=>{let i=await rx(Pp)?"copied":"failed";t({event:"create_clicked",target:"copy",outcome:i}),o(i)};return(0,tt.jsxs)(le,{gap:20,children:[(0,tt.jsx)(Nr,{children:"Create a game"}),(0,tt.jsx)(dt,{children:"Build it on your own machine with the tools you already use \\u2014 plain JavaScript, a framework, your own engine \\u2014 and publish it with the hopple CLI when it\'s ready."}),(0,tt.jsx)(dt,{children:"Working with an AI coding agent? Paste this prompt into Claude Code, Codex, Cursor or any other, say what game you want, and it builds, tests and publishes it for you."}),(0,tt.jsxs)(le,{gap:12,children:[(0,tt.jsx)("pre",{"data-part":"prompt",...x(k.pre,Br.prompt),children:Pp.trim()}),ix?(0,tt.jsx)(Qs,{label:n==="copied"?"Copied":"Copy prompt",onPress:()=>void r()}):null,n==="failed"?(0,tt.jsx)(H,{tone:"bad",role:"alert",children:"Could not copy it here. Select the prompt and copy it yourself."}):null]}),(0,tt.jsx)(jt,{title:"Already made one?",action:{label:"Upload",onPress:()=>{t({event:"create_clicked",target:"upload"}),e.onUpload()}},children:(0,tt.jsx)(dt,{small:!0,children:"One .html file, and the manifest beside it if your game has one."})}),e.discord===void 0?null:(0,tt.jsxs)("a",{href:e.discord,target:"_blank",rel:"noopener",onClick:()=>t({event:"create_clicked",target:"discord"}),...x(k.a,Br.discord),children:[(0,tt.jsx)("span",{...x(k.span,Br.discordMark),children:(0,tt.jsx)(Ws,{name:"discord",size:22})}),(0,tt.jsxs)("span",{...x(k.span,Br.discordText),children:[(0,tt.jsx)("span",{...x(k.span,Br.discordTitle),children:"Join the Discord"}),(0,tt.jsx)("span",{...x(k.span,Br.discordNote),children:"Get unstuck, share what you made, and see what others are making."})]}),(0,tt.jsx)("span",{...x(k.span,Br.discordGo),children:(0,tt.jsx)(je,{name:"forward",size:16})})]})]})}var Br={prompt:{kogj98:"x1ghz6dp",k8WAf4:"xxlmvz2",kg3NbH:"x1hr3lfm",kaIpWk:"x2jfb3a",kMzoRj:"xmkeg23",ksu8eU:"x1y0btm7",kVAM5u:"x1hobkz3",kWkggS:"x10bqf5p",kMv6JI:"x1j8uvit",kGuDYH:"x1ct8sxb",kLWn49:"x1dbl2gt",kMwMTN:"x6yhm7j",khDVqt:"x126k92a",kHjlTd:"xj0a0fe",kfSwDN:"x1hx0egp",$$css:!0},discord:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kOIVth:"x1af02g3",k8WAf4:"xxlmvz2",kg3NbH:"x1hr3lfm",kaIpWk:"x2jfb3a",kWkggS:"x19rgrjr xykbdm0",kybGjl:"x1hl2dhg",kInvED:"x2ssjo2",k1ekBW:"x15406qy",kIyJzY:"x198w77l",$$css:!0},discordMark:{k1xSpc:"x78zum5",kmuXW:"x2lah0s",kMwMTN:"x1udkhtm",$$css:!0},discordText:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x1ed6fcf",kzQI83:"x1iyjqo2",k7Eaqz:"xeuugli",$$css:!0},discordTitle:{kMv6JI:"x19979ed",kGuDYH:"xif65rj",k63SB2:"x1s688f",kMwMTN:"x6gl9h3",$$css:!0},discordNote:{kMv6JI:"x19979ed",kGuDYH:"x4z9k3i",kLWn49:"xfrs9s4",kMwMTN:"xupo0id",$$css:!0},discordGo:{k1xSpc:"x78zum5",kmuXW:"x2lah0s",kMwMTN:"xupo0id",$$css:!0}};var Et=F(De(),1);var re=F(Ie(),1);function zp(e){let{source:t}=e,[n,o]=(0,Et.useState)([]),[r,i]=(0,Et.useState)(null),[a,l]=(0,Et.useState)("loading"),[s,u]=(0,Et.useState)(!1),f=(0,Et.useRef)(!0);(0,Et.useEffect)(()=>(f.current=!0,t.page(null).then(y=>{f.current&&(o(y.entries),i(y.next),l("ready"))},()=>f.current&&l("failed")),()=>{f.current=!1}),[t]);let m=()=>{r===null||s||(u(!0),t.page(r).then(y=>{f.current&&(o(h=>[...h,...y.entries.filter(d=>!h.some(v=>v.id===d.id))]),i(y.next),u(!1))},()=>f.current&&u(!1)))},c=y=>{y.read||(o(h=>h.map(d=>d.id===y.id?{...d,read:!0}:d)),t.markRead(y.id).catch(()=>{}))},p=y=>{c(y),e.onOpen(uf(y),y)},g=y=>{let{onPlay:h}=e,d=y.game;if(!(h===void 0||y.kind!=="record"||d===null))return{label:"Play",onPress:()=>{c(y),h(d,y)}}};return(0,re.jsxs)(le,{gap:20,children:[(0,re.jsx)(Lr,{title:"Inbox",action:{label:"Mark all read",onPress:()=>{o(y=>y.map(h=>h.read?h:{...h,read:!0})),t.markAllRead(n[0]?.at).catch(()=>{})}}}),e.alerts===void 0?null:(0,re.jsx)(iR,{alerts:e.alerts}),a==="loading"?(0,re.jsx)(Jt,{children:"Loading\\u2026"}):a==="failed"?(0,re.jsx)(H,{children:"Could not reach your inbox just now."}):n.length===0?(0,re.jsx)(Jt,{children:"Nothing yet. New followers, games from creators you follow, and anybody passing you on a board show up here."}):(0,re.jsxs)(le,{gap:12,children:[(0,re.jsx)(At,{children:n.map(y=>{let h=sf(y);return(0,re.jsx)(hb,{title:h.title,body:h.body,when:Rt(y.at),live:!y.read,onPress:()=>p(y),action:g(y)},y.id)})}),r===null?null:(0,re.jsx)(ro,{label:s?"Loading\\u2026":"Show more",onPress:m})]})]})}function sx(e){return(0,Et.useSyncExternalStore)(e.on,e.get,e.get)}function iR(e){let{alerts:t}=e,n=sx(t.state);return n==="off"?(0,re.jsxs)(le,{gap:10,children:[(0,re.jsx)(dt,{small:!0,children:"Get an alert when somebody passes you or a creator you follow puts a game out, even with Hopple closed."}),(0,re.jsx)(Se,{label:"Turn on alerts",onPress:()=>void t.turnOn()})]}):n!=="denied"?null:(0,re.jsxs)(le,{gap:10,children:[(0,re.jsx)(dt,{small:!0,children:"Alerts are blocked for Hopple in this browser."}),(0,re.jsx)(ux,{alerts:t})]})}function ux(e){let[t,n]=(0,Et.useState)(!1);return t?(0,re.jsx)(le,{gap:6,children:e.alerts.howToAllow.map((o,r)=>(0,re.jsx)(dt,{small:!0,children:`${r+1}. ${o}`},o))}):(0,re.jsx)(Se,{label:"How to turn them back on",onPress:()=>n(!0)})}var aR={off:"Off",daily:"Daily",weekly:"Weekly",monthly:"Monthly"},lx={on:"Shown even when Hopple is closed.",off:"Shown even when Hopple is closed.",denied:"Blocked in this browser\\u2019s settings for this site. Allow notifications there and they come on.",unsupported:"This browser cannot show them.",install:"Add Hopple to your Home Screen and open it from there to get them."};function lR(e){let{alerts:t}=e,n=sx(t.state);return n==="on"||n==="off"?(0,re.jsx)(Bo,{name:"Alerts on this device",hint:lx[n],on:n==="on",onChange:o=>void(o?t.turnOn():t.turnOff())}):(0,re.jsxs)(le,{gap:8,children:[(0,re.jsx)(H,{children:`Alerts on this device: ${lx[n]}`}),n==="denied"?(0,re.jsx)(ux,{alerts:t}):null]})}var sR=[{kind:"follow",name:"Followers",hint:"When somebody follows you."},{kind:"game",name:"New games",hint:"From creators you follow."},{kind:"record",name:"Records",hint:"When somebody passes you near the top of a board."}];function $p(e){let{source:t}=e,[n,o]=(0,Et.useState)(null),[r,i]=(0,Et.useState)(!1),a=(0,Et.useRef)(!0);(0,Et.useEffect)(()=>(a.current=!0,t.prefs().then(u=>a.current&&o(u),()=>a.current&&i(!0)),()=>{a.current=!1}),[t]);let l=yt(),s=(u,f)=>{if(n===null)return;l(typeof f=="boolean"?{event:"notification_kind_changed",kind:u,on:f}:{event:"notification_kind_changed",kind:u,on:f!=="off",cadence:String(f)});let m=n;o({...m,[u]:f}),t.setPrefs({[u]:f}).then(c=>a.current&&o(c),()=>a.current&&o(m))};return n===null?r?(0,re.jsx)(H,{children:"Could not reach your notification settings just now."}):null:(0,re.jsxs)(Ir,{children:[e.alerts===void 0?null:(0,re.jsx)(lR,{alerts:e.alerts}),sR.map(u=>(0,re.jsx)(Bo,{name:u.name,hint:u.hint,on:n[u.kind],onChange:f=>s(u.kind,f)},u.kind)),(0,re.jsxs)(le,{gap:8,children:[(0,re.jsx)(dt,{small:!0,children:"A recap of the games played most, as often as you like."}),(0,re.jsx)(Uo,{label:"Top games recap",children:["off",...af].map(u=>(0,re.jsx)(Go,{label:aR[u],pressed:n.recap===u,onPress:()=>s("recap",u)},u))})]})]})}function Np(e){let{recap:t}=e,n=Date.parse(t.ends)-1,o=t.cadence==="daily"?_p(Date.parse(t.starts)):`${_p(Date.parse(t.starts))} \\u2013 ${_p(n)}`;return(0,re.jsxs)(le,{gap:20,children:[(0,re.jsx)(Cn,{label:e.from,onPress:e.onBack}),(0,re.jsxs)(le,{gap:6,children:[(0,re.jsx)(Lr,{title:Ls(t)}),(0,re.jsx)(dt,{small:!0,children:o})]}),t.games.length===0?(0,re.jsx)(Jt,{children:"None of these games are here any more."}):(0,re.jsx)(At,{children:t.games.map((r,i)=>(0,re.jsx)(mn,{title:r.title,meta:`@${r.owner} \\xB7 ${Dt(r.plays,"play")}`,hue:gt(i),end:{action:{label:"Play",onPress:e.onGame===void 0?void 0:()=>e.onGame?.(r)}}},r.id))})]})}function _p(e){return new Date(e).toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric",timeZone:"UTC"})}var Ve=F(De(),1);var D=F(Ie(),1),px=250,uR=[{id:"games",label:"Games"},{id:"creators",label:"Creators"}];function mx(e){return(0,Ve.useSyncExternalStore)(e.on,e.get,e.get)}function Lp(e){let{search:t}=e,{query:n,part:o}=mx(t);return(0,D.jsxs)(le,{gap:12,children:[(0,D.jsx)("input",{type:"search",name:"search",placeholder:"Search games, creators","aria-label":"Search games, creators",autoComplete:"off",spellCheck:!1,value:n,onInput:r=>t.set({...t.get(),query:r.target.value}),onChange:()=>{},...x(k.input,It.input),dir:"auto"}),wi(n).length===0?null:(0,D.jsx)(Wo,{segments:uR,current:o,onSelect:r=>t.set({...t.get(),part:r})})]})}function Dp(e){let t=yt(),{search:n}=e,{query:o,part:r}=mx(n),[i,a]=(0,Ve.useState)(null),[l,s]=(0,Ve.useState)("idle"),[u,f]=(0,Ve.useState)(Ba),m=(0,Ve.useRef)(e.find??mf);m.current=e.find??mf;let c=(0,Ve.useRef)(i);c.current=i;let p=(0,Ve.useRef)(null),g=wi(o).join(" ");(0,Ve.useEffect)(()=>{if(g==="")return s("idle"),a(null);let d=!0,v=setTimeout(()=>{m.current(g).then(b=>{if(!d||(s("idle"),a({query:g,found:b}),b===null))return;t({event:"search_made",games:b.games.length,people:b.people.length});let T=n.get(),O=T.part==="games"?"creators":"games",A={games:b.games.length,creators:b.people.length};A[T.part]===0&&A[O]>0&&n.set({...T,part:O})},()=>{d&&(s("idle"),a({query:g,found:null}))})},px);return()=>{d=!1,clearTimeout(v)}},[g]);let S=(0,Ve.useMemo)(()=>hf(e.games??pf,1/0),[e.games]),y=()=>{let d=c.current;if(d===null||d.found===null||d.found.next===null||p.current===d)return;let{found:v}=d;p.current=d,s("loading");let b=()=>{p.current===d&&(p.current=null),c.current===d&&s("failed")};m.current(d.query,v.next??void 0).then(T=>{if(T===null)return b();if(c.current!==d)return;let O=new Set(v.games.map(A=>A.id));s("idle"),a({query:d.query,found:{...v,games:[...v.games,...T.games.filter(A=>!O.has(A.id))],next:T.next}})},b)};if(vb(()=>{g===""?f(d=>d<S.length?d+Ba:d):r==="games"&&y()}),g==="")return(0,D.jsxs)(jt,{title:"Top games",children:[S.length===0?(0,D.jsx)(dt,{children:"Nothing in the feed yet."}):(0,D.jsx)(At,{children:S.slice(0,u).map((d,v)=>(0,D.jsx)(mn,{title:d.title,meta:`@${d.owner} \\xB7 ${Dt(d.plays,"play")}`,hue:gt(v),picture:d.picture,end:{action:{label:"Play",onPress:e.onGame===void 0?void 0:()=>{t({event:"search_clicked",pick:"top",position:v}),e.onGame?.(d.id)}}}},d.id))}),u<S.length?(0,D.jsx)(ro,{label:"Show more",onPress:()=>f(u+Ba)}):null]});if(i===null)return(0,D.jsx)(H,{live:!0,children:"Searching\\u2026"});let{found:h}=i;return h===null?(0,D.jsx)(H,{children:"Could not search just now."}):h.games.length===0&&h.people.length===0?(0,D.jsxs)(Jt,{children:["Nothing matches \\u201C",i.query,"\\u201D."]}):r==="creators"?h.people.length===0?(0,D.jsxs)(Jt,{children:["No creators match \\u201C",i.query,"\\u201D."]}):(0,D.jsx)(At,{children:h.people.map((d,v)=>(0,D.jsx)(gp,{person:d,hue:gt(v),follow:e.follow,onPerson:e.onPerson===void 0?void 0:b=>{t({event:"search_clicked",pick:"creator",position:v}),e.onPerson?.(b)},from:"search"},d.handle))}):h.games.length===0?(0,D.jsxs)(Jt,{children:["No games match \\u201C",i.query,"\\u201D."]}):(0,D.jsxs)(le,{gap:11,children:[(0,D.jsx)(At,{children:h.games.map((d,v)=>(0,D.jsx)(mn,{title:d.title,meta:`@${d.owner} \\xB7 ${Dt(d.plays,"play")}`,hue:gt(v),picture:d.picture,end:{action:{label:"Play",onPress:e.onFound===void 0?void 0:()=>{t({event:"search_clicked",pick:"game",position:v}),e.onFound?.(d)}}}},d.id))}),l==="failed"?(0,D.jsx)(H,{children:"Could not reach the rest just now."}):null,h.next===null?null:(0,D.jsx)(ro,{label:l==="loading"?"Loading\\u2026":"Show more",onPress:y})]})}function Ip(e={}){let[t,n]=(0,Ve.useState)(e.upload===!0);return t?(0,D.jsxs)(le,{gap:20,children:[(0,D.jsx)(Cn,{label:"Back to you",onPress:()=>n(!1)}),(0,D.jsx)(Lr,{title:"Upload a game"}),(0,D.jsx)(dt,{children:"One .html file, and the manifest beside it if your game has one. This host has nowhere to send it \\u2014 open the site to put a game up."})]}):(0,D.jsxs)(le,{gap:20,children:[(0,D.jsx)(tu,{name:"@you",note:"Joined 2024 \\xB7 214 games played",hue:155,end:e.onSettings===void 0?void 0:(0,D.jsx)(du,{onPress:e.onSettings})}),(0,D.jsx)(Pi,{entries:Is,pressable:!0}),(0,D.jsx)(jt,{title:"Your games",action:e.onCreate===void 0?{label:"Upload",strong:!0,onPress:()=>n(!0)}:{label:"Create",strong:!0,onPress:e.onCreate},children:(0,D.jsx)(At,{children:Xy.map(([o,r,i],a)=>(0,D.jsx)(mn,{title:o,meta:r,hue:gt(a),end:{state:{word:i,kind:i}}},o))})}),(0,D.jsx)(jt,{title:"Recently played",children:(0,D.jsx)(vR,{entries:Wy,action:"Play"})})]})}function jp(e){let t=e.privacy??(0,D.jsx)(Ir,{children:Yy.map(n=>(0,D.jsx)(Bo,{name:n.name,hint:n.hint,initially:n.on},n.name))});return(0,D.jsxs)(le,{gap:20,children:[(0,D.jsx)(Cn,{label:"Back to you",onPress:e.onBack}),(0,D.jsx)(Nr,{children:"Settings"}),(0,D.jsx)(nl,{parts:[{id:"notifications",label:"Notifications",view:()=>e.notifications},...e.controls===void 0?[]:[{id:"controls",label:"Controls",view:()=>e.controls}],{id:"account",label:"Account",view:()=>e.account?.(t)??(0,D.jsx)(yR,{privacy:t})}]})]})}var cx="Share usage data",dx="Which games you play, what happens in them, how you use the site, and your device type. Never your name or email.";function Hp(e){let{sharing:t,refused:n}=e.consent,o=(0,Ve.useSyncExternalStore)(t.on,t.get,t.get);return n!==null?(0,D.jsx)(Ir,{children:(0,D.jsx)(Bo,{name:cx,hint:`${n} ${dx}`,on:!1,disabled:!0})}):(0,D.jsx)(Ir,{children:(0,D.jsx)(Bo,{name:cx,hint:dx,on:o,onChange:r=>t.set(r)})})}var cR="On-screen controls",dR="Automatic shows them on a touchscreen. On or Off decides for every game.",fR={auto:"Automatic",on:"On",off:"Off"},pR="Thumbstick follows your thumb",mR="Touch anywhere on its side of the screen and the stick comes to your thumb, and goes with it. Off, it stays where it is drawn.";function qp(e){return(0,D.jsxs)(Ir,{children:[e.choice===void 0?null:(0,D.jsx)(hR,{choice:e.choice}),e.sticks===void 0?null:(0,D.jsx)(gR,{sticks:e.sticks})]})}function hR(e){let{choice:t}=e,n=(0,Ve.useSyncExternalStore)(t.on,t.get,t.get);return(0,D.jsxs)(le,{gap:8,children:[(0,D.jsx)(dt,{small:!0,children:dR}),(0,D.jsx)(Uo,{label:cR,children:Bd.map(o=>(0,D.jsx)(Go,{label:fR[o],pressed:n===o,onPress:()=>t.set(o)},o))})]})}function gR(e){let{sticks:t}=e,n=(0,Ve.useSyncExternalStore)(t.on,t.get,t.get);return(0,D.jsx)(Bo,{name:pR,hint:mR,on:n==="floating",onChange:o=>t.set(o?"floating":"fixed")})}function yR(e){return(0,D.jsxs)(le,{gap:20,children:[(0,D.jsx)(ro,{label:"Log out"}),(0,D.jsx)(jt,{title:"Privacy",children:e.privacy}),(0,D.jsx)(nu,{label:"Delete account",phrase:"you",ask:"Type you to confirm.",note:"Deleting removes your games, scores and badges permanently.",onConfirm:()=>Promise.resolve("This host has no account to delete \\u2014 open the site.")})]})}function vR(e){return(0,D.jsx)(At,{children:e.entries.map(([t,n],o)=>(0,D.jsx)(mn,{title:t,meta:n,hue:gt(o),end:{action:{label:e.action}}},t))})}function Gp(e){let[t,n]=(0,Ve.useState)(null),[o,r]=(0,Ve.useState)(null),{handle:i}=e,a=(0,Ve.useRef)(e.profile);a.current=e.profile,(0,Ve.useEffect)(()=>{let S=!0;return n(null),a.current?.().then(y=>S&&y!==null&&n(y),()=>{}),()=>{S=!1}},[i]);let{standing:l,toggle:s}=uu(t?.handle??i,t===null||t.followed===null?null:{following:t.followed,followers:t.followers},t,e.follow,"profile"),u=t?.games.reduce((S,y)=>S+y.plays,0),f=l?.followers??t?.followers,m=e.people,c=t?.handle??i;if(o!==null&&m!==void 0)return(0,D.jsx)(ol,{title:t?.name??`@${c}`,handle:c,initial:o,self:t?.followed===null,back:`Back to @${c}`,onBack:()=>r(null),people:m,follow:e.follow,onPerson:e.onCreator});let p=l?.following??t?.followed,g=t!==null&&p===!1&&t.knownFollowers.count>0?t.knownFollowers:null;return(0,D.jsxs)(le,{gap:20,children:[(0,D.jsx)(Cn,{label:e.from,onPress:e.onBack}),(0,D.jsxs)(cu,{who:t===null?{handle:i,name:null,picture:null,hue:205,facts:[]}:{handle:t.handle,name:t.name,picture:t.picture,hue:205,facts:[`Joined ${new Date(t.joinedAt).getUTCFullYear()}`,Dt(t.games.length,"game")]},followers:{count:f,onPress:m===void 0||t===null?void 0:()=>r("followers")},tiles:[[t===null?"\\u2014":String(t.games.length),"games"],[u===void 0?"\\u2014":$r(u),"plays"]],children:[(0,D.jsx)(dt,{children:Fy}),g===null?null:(0,D.jsx)(mb,{faces:g.people.map((S,y)=>({hue:gt(y),picture:S.picture})),words:Jy(g),onPress:m===void 0?void 0:()=>r("known")})]}),(0,D.jsxs)(Js,{children:[e.follow===void 0?(0,D.jsx)(fx,{label:"Follow"}):t?.followed===null?null:(0,D.jsx)(Dr,{label:l?.following===!0?"Following":"Follow",pressed:l?.following===!0,lit:l?.following!==!0,onPress:s}),(0,D.jsx)(fx,{label:"Message"})]}),(0,D.jsx)(jt,{title:"Games",children:t===null?null:t.games.length===0?(0,D.jsx)(dt,{children:"Nothing in the feed yet."}):(0,D.jsx)(At,{children:t.games.map((S,y)=>(0,D.jsx)(mn,{title:S.title,meta:`${Dt(S.plays,"play")} \\xB7 Released ${Rt(S.publishedAt)}`,hue:gt(y),picture:S.picture,end:{action:{label:"Play",onPress:e.onGame===void 0?void 0:()=>e.onGame?.(S.id)}}},S.id))})}),(0,D.jsx)(eu,{words:["Report","Block"]})]})}function fx(e){let[t,n]=(0,Ve.useState)(!1);return(0,D.jsx)(Dr,{label:e.label,pressed:t,onPress:()=>n(!t)})}var Vr=F(De(),1);var de=F(Ie(),1);function Up(e){let t=e.source.boards(),[n,o]=(0,Vr.useState)(t.find(u=>u.id===e.board)?.id??t[0]?.id??null),[r,i]=(0,Vr.useState)("all"),[a,l]=(0,Vr.useState)(bf[0].id),s=bR(n,r,e.source);return n===null?null:(0,de.jsxs)(le,{gap:18,children:[(0,de.jsxs)(le,{gap:8,children:[t.length>=2?(0,de.jsx)(il,{label:"Board",size:"large",selected:n,options:t.map(u=>({id:u.id,label:u.title})),onPick:o}):null,(0,de.jsxs)(ox,{children:[(0,de.jsx)(il,{label:"Scope",selected:a,options:bf,onPick:l}),(0,de.jsx)(il,{label:"Period",selected:r,options:vf,onPick:u=>i(u)})]})]}),(0,de.jsx)("div",{"data-part":"score-body",...x(k.div,Xe.body),children:s.kind==="loading"?(0,de.jsx)("p",{...x(k.p),children:"Loading\\u2026"}):s.kind==="failed"?(0,de.jsx)("p",{...x(k.p,Xe.note),children:"Could not reach the scores just now."}):s.view===null?(0,de.jsx)("p",{...x(k.p,Xe.note),children:"No scores on this board yet."}):(0,de.jsx)(xR,{view:s.view})})]})}function bR(e,t,n){let[o,r]=(0,Vr.useState)({kind:"loading"});return(0,Vr.useEffect)(()=>{if(e===null)return;let i=!0;return r({kind:"loading"}),n.view(e,t).then(a=>i&&r({kind:"done",view:a}),()=>i&&r({kind:"failed"})),()=>{i=!1}},[e,t,n]),o}function xR(e){let{view:t}=e;return t.you===null?(0,de.jsxs)(de.Fragment,{children:[(0,de.jsx)("p",{...x(k.p,Xe.note),children:av(t.players)}),(0,de.jsx)(hx,{view:t})]}):(0,de.jsxs)(de.Fragment,{children:[(0,de.jsxs)("div",{"data-part":"standing",...x(k.div,Xe.standing),children:[(0,de.jsx)("p",{...x(k.p,Xe.sub),children:lv(t.you)}),(0,de.jsxs)("div",{...x(k.div,Xe.headline),children:[(0,de.jsx)("p",{...x(k.p,Xe.rank),children:iv(t.you)}),(0,de.jsx)("p",{...x(k.p,Xe.best),children:Zt(t.you.best,t.format)})]})]}),(0,de.jsx)(hx,{view:t}),t.recent.length>0?(0,de.jsx)("ul",{"data-part":"runs",...x(k.ul,Xe.runs),children:t.recent.map((n,o)=>(0,de.jsxs)("li",{...x(k.li,Xe.run),children:[(0,de.jsx)("span",{...x(k.span,Xe.runValue),children:Zt(n.value,t.format)}),(0,de.jsx)("span",{...x(k.span,Xe.runWhen),children:Rt(n.at)})]},o))}):null]})}function hx(e){let t=e.view.rows??[],n=yb();return t.length===0?null:(0,de.jsx)("ol",{"data-part":"table",...x(k.ol,Xe.table),children:t.map(o=>{let r=o.you||n===void 0?void 0:o.handle;return(0,de.jsxs)("li",{"data-you":o.you?"true":void 0,...x(k.li,Xe.row,o.you&&Xe.rowYou),children:[(0,de.jsx)("span",{...x(k.span,Xe.cellRank,o.you&&Xe.accent),children:String(o.rank)}),r===void 0||r===""?(0,de.jsx)("span",{...x(k.span,Xe.cellName,o.you&&Xe.cellNameYou),children:o.you?"You":Hs(o.name)}):(0,de.jsx)("button",{"aria-label":`${Hs(o.name)}, @${r}`,onClick:()=>n?.(r),...x(k.button,ae.base,Xe.cellName,Xe.cellNamePressable),type:"button",children:Hs(o.name)}),(0,de.jsx)("span",{...x(k.span,Xe.cellValue),children:Zt(o.value,e.view.format)})]},`${o.rank}:${o.value}`)})})}var Xe={body:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"xou54vl",$$css:!0},standing:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kjj79g:"x1qughib",kOIVth:"x1af02g3",k8WAf4:"xxlmvz2",kg3NbH:"x1hr3lfm",kMzoRj:"xmkeg23",ksu8eU:"x1y0btm7",kVAM5u:"x1ekxq7s",kaIpWk:"xydzhu4",kWkggS:"x5il0le",$$css:!0},sub:{k7Eaqz:"xeuugli",kmuXW:"xs83m0k",kGuDYH:"xif65rj",kMwMTN:"xupo0id",kN2L0X:"x1fzhlzt",$$css:!0},note:{kGuDYH:"xif65rj",kMwMTN:"xupo0id",kN2L0X:"x1fzhlzt",$$css:!0},headline:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kGNEyG:"xuk3077",kOIVth:"x195vfkc",kmuXW:"x2lah0s",$$css:!0},best:{kMv6JI:"x1j8uvit",kGuDYH:"xwsyq91",k63SB2:"xk50ysn",kLWn49:"x1159mfc",kcqcaj:"xss6m8b",kMwMTN:"x6gl9h3",$$css:!0},rank:{kMv6JI:"x1j8uvit",kGuDYH:"x1j6dyjg",kb6lSQ:"xv2r5ts",kP9fke:"xtvhhri",kMwMTN:"x1et08zh",$$css:!0},table:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x17d4w8g",kB88ic:"xe8uvvx",$$css:!0},row:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kOIVth:"x1v2ro7d",k8WAf4:"xknfcqp",kg3NbH:"x1awh872",kMzoRj:"xmkeg23",ksu8eU:"x1y0btm7",kVAM5u:"x9r1u3d",kaIpWk:"x2jfb3a",$$css:!0},rowYou:{kVAM5u:"x1ekxq7s",kWkggS:"x5il0le",$$css:!0},cellRank:{kmuXW:"x2lah0s",k7Eaqz:"xnei2rj",kMv6JI:"x1j8uvit",kGuDYH:"xfifm61",kcqcaj:"xss6m8b",kMwMTN:"xupo0id",$$css:!0},accent:{kMwMTN:"x1et08zh",$$css:!0},cellName:{kzQI83:"x1iyjqo2",kmuXW:"xs83m0k",k7Eaqz:"xeuugli",kGuDYH:"xif65rj",kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",kMwMTN:"x6yhm7j",$$css:!0},cellNameYou:{kMwMTN:"x6gl9h3",k63SB2:"xk50ysn",$$css:!0},cellNamePressable:{kMwMTN:"x6yhm7j x1kc931m",$$css:!0},cellValue:{keTefX:"xvc5jky",kMv6JI:"x1j8uvit",kGuDYH:"x4z9k3i",kcqcaj:"xss6m8b",kMwMTN:"x6gl9h3",$$css:!0},runs:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x12mrbbr",kaIpWk:"x2jfb3a",kVQacm:"xb3r6kr",kB88ic:"xe8uvvx",$$css:!0},run:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kjj79g:"x1qughib",kOIVth:"xou54vl",k8WAf4:"x1m7iz9m",kg3NbH:"xqin4a2",kWkggS:"xvqquxf",$$css:!0},runValue:{kMv6JI:"x1j8uvit",kGuDYH:"x4z9k3i",kcqcaj:"xss6m8b",kMwMTN:"x6gl9h3",$$css:!0},runWhen:{kMv6JI:"x1j8uvit",kGuDYH:"x1j6dyjg",kMwMTN:"xupo0id",$$css:!0}};var ie=F(Ie(),1),gx=new WeakMap;function Bp(e){if(e.inbox!==void 0)return e.inbox.source;let t=gx.get(e);return t===void 0&&(t=Vy(),gx.set(e,t)),t}function kR(e){return[{id:"inbox",label:"Inbox",icon:"inbox"},{id:Hr,label:"Create",icon:"plus",...e?{}:{hidden:!0}},{id:"search",label:"Search",icon:"search"}]}var SR=[{id:jr,label:"You",icon:"you",face:!0},{id:Qa,label:"Settings",icon:"settings",under:jr}];function Vp(e){return[{id:Bn,label:"Game",icon:"game"},...kR(e.create===!0),...(e.extra??[]).map(({id:t,label:n,icon:o})=>({id:t,label:n,icon:o})),...SR]}function Xp(e){return op(Vp(e),e.segments)}function hu(e){return(0,Ni.useSyncExternalStore)(e.subscribe,e.state,e.state)}function Wp(e){let{controller:t,spec:n}=e,o=hu(t),r=o.recap!==null?"recap":o.creator!==null?"creator":null,i=(0,Ni.useMemo)(()=>r===null?{tab:o.tab}:{tab:r,under:o.tab},[r,o.tab]);return(0,ie.jsx)(Ja.Provider,{value:n.onUse,children:(0,ie.jsx)(ru.Provider,{value:i,children:(0,ie.jsx)(rp.Provider,{value:t.openCreator,children:(0,ie.jsx)(ip.Provider,{value:t.onNearEnd,children:(0,ie.jsx)(wR,{controller:t,spec:n})})})})})}function wR(e){let{controller:t,spec:n}=e,o=hu(t);return(0,ie.jsx)("div",{role:"tabpanel",...x(k.div,Jf.root,al.body),children:o.recap!==null?(0,ie.jsx)(Np,{recap:o.recap.recap,from:o.recap.from,onBack:t.closeRecap,onGame:n.inbox?.openGame===void 0?void 0:r=>n.inbox?.openGame?.(r,void 0)},o.visit):o.creator!==null?(0,ie.jsx)(Gp,{handle:o.creator.handle,from:o.creator.from,profile:n.creator===void 0?void 0:()=>n.creator(o.creator.handle),onBack:t.closeCreator,onGame:n.play,follow:n.follow,people:n.people,onCreator:r=>t.openCreator(r)},o.visit):o.tab===Bn?(0,ie.jsxs)("div",{...x(k.div,al.body),children:[(0,ie.jsx)(Wo,{segments:o.segments,current:o.segment,onSelect:r=>t.show(r)}),(0,ie.jsx)("div",{role:"tabpanel","data-view":o.segment??void 0,...x(k.div,al.view),children:o.segments.find(r=>r.id===o.segment)?.view()},o.visit)]}):(0,ie.jsx)("div",{...x(k.div,al.view),children:(0,ie.jsx)(AR,{tab:o.tab,upload:o.upload,spec:n,controller:t})},o.visit)})}function AR(e){let{spec:t,controller:n}=e;switch(e.tab){case"inbox":return(0,ie.jsx)(zp,{source:Bp(t),alerts:t.inbox?.alerts,onOpen:(o,r)=>{"creator"in o?n.openCreator(o.creator):"you"in o?n.selectTab("you"):"recap"in o?r.recap!==null&&n.openRecap(r.recap):r.game!==null&&t.inbox?.openGame?.(r.game,o.board)},onPlay:t.inbox?.openGame===void 0?void 0:o=>t.inbox?.openGame?.(o,void 0)});case Hr:return(0,ie.jsx)(ax,{discord:t.community?.discord,onUpload:()=>n.openUpload()});case"search":return(0,ie.jsx)(Dp,{search:n.search,games:t.games?.(),onGame:t.games===void 0?void 0:t.play,find:t.search?.find,onFound:t.search?.open,follow:t.follow,onPerson:o=>n.openCreator(o)});case jr:return t.account===void 0?(0,ie.jsx)(Ip,{upload:e.upload,onSettings:()=>n.selectTab(Qa),onCreate:()=>n.selectTab(Hr)}):(0,ie.jsx)(vp,{source:t.account.source,onGame:t.account.onGame,onSaved:t.account.onSaved,people:t.people,follow:t.follow,onCreator:o=>n.openCreator(o),upload:e.upload,onShare:t.account.share,onSettings:()=>n.selectTab(Qa),onCreate:()=>n.selectTab(Hr)});case Qa:return(0,ie.jsx)(jp,{onBack:()=>n.selectTab(jr),notifications:(0,ie.jsx)($p,{source:Bp(t),alerts:t.inbox?.alerts}),controls:t.controls===void 0&&t.sticks===void 0?void 0:(0,ie.jsx)(qp,{choice:t.controls,sticks:t.sticks}),privacy:t.usage===void 0?void 0:(0,ie.jsx)(Hp,{consent:t.usage}),account:t.account===void 0?void 0:o=>(0,ie.jsx)(bp,{source:t.account.source,privacy:o})});default:return(0,ie.jsx)(ie.Fragment,{children:t.extra?.find(o=>o.id===e.tab)?.view()})}}var ER={tab:"search"};function Yp(e){let t=hu(e.controller);return t.tab!=="search"||t.creator!==null||t.recap!==null?null:(0,ie.jsx)(Ja.Provider,{value:e.spec.onUse,children:(0,ie.jsx)(ru.Provider,{value:ER,children:(0,ie.jsx)("div",{...x(k.div,Jf.root,al.head),children:(0,ie.jsx)(Lp,{search:e.controller.search})})})})}var MR={get:()=>null,set:()=>{},on:()=>()=>{}};function Fp(e){let t=hu(e.controller),{unread:n}=Bp(e.spec),o=(0,Ni.useSyncExternalStore)(n.on,n.get,n.get),r=e.spec.picture??MR,i=(0,Ni.useSyncExternalStore)(r.on,r.get,r.get),{community:a}=e.spec;return(0,ie.jsxs)(Ja.Provider,{value:e.spec.onUse,children:[a===void 0?null:(0,ie.jsx)(Ap,{community:a,onCreate:()=>e.controller.selectTab(Hr)}),(0,ie.jsx)(hp,{tabs:Vp(e.spec),current:t.tab,picture:i,badges:{inbox:o},onSelect:l=>e.controller.selectTab(l)})]})}var Fo={about:e=>(0,ie.jsx)(ap,{view:e}),scoreboard:(e,t)=>(0,ie.jsx)(Up,{source:e,board:t}),achievements:e=>(0,ie.jsx)(kp,{source:e}),input:e=>(0,ie.jsx)(Cp,{...e}),parted:(e,t={})=>(0,ie.jsx)(nl,{parts:e,initial:t.initial,onSelect:t.onSelect,fit:t.fit}),mixer:(e,t,n)=>(0,ie.jsx)(wp,{channels:e,mix:t,onChange:n})},al={body:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x1c1vhfx",k7Eaqz:"xeuugli",$$css:!0},view:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",k7Eaqz:"xeuugli",$$css:!0},head:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",k7Eaqz:"xeuugli",kLKAdn:"x1cnzs8",$$css:!0}};var Xc=F(De(),1),F1=F(Zp(),1),Vc=F(W1(),1);var Ma=F(Ie(),1),Y1=new WeakMap;function Z1(e){let t=Xp(e);return{controller:t,mount(n,o){let{head:r,body:i,foot:a}=o,l=Y1.get(a);l!==void 0&&queueMicrotask(l);let[s,u]=[r,a].map(p=>p.appendChild(p.ownerDocument.createElement("div"))),f=[(0,Vc.createRoot)(s),(0,Vc.createRoot)(n),(0,Vc.createRoot)(u)];(0,F1.flushSync)(()=>{f[0].render((0,Ma.jsx)(Yp,{controller:t,spec:e})),f[1].render((0,Ma.jsx)(Wp,{controller:t,spec:e})),f[2].render((0,Ma.jsx)(Fp,{controller:t,spec:e}))});let m=()=>{i.scrollHeight-i.scrollTop-i.clientHeight<np&&t.nearEnd()};i.addEventListener("scroll",m,{passive:!0});let c=t.search.on(()=>{i.scrollTop=0});Y1.set(a,()=>{i.removeEventListener("scroll",m),c();for(let p of f)p.unmount()})},show:n=>t.show(n),showTab:n=>t.selectTab(n),showing:()=>t.showing(),on:n=>t.on(n),refresh:n=>t.refresh(n),setSegments:n=>t.setSegments(n),openCreator:n=>t.openCreator(n),openRecap:n=>t.openRecap(n),back:()=>t.back()}}function ss(e,t){return(0,Ma.jsx)(nP,{element:e,home:t})}function nP(e){let t=(0,Xc.useRef)(null);return(0,Xc.useLayoutEffect)(()=>{let{element:n,home:o}=e;return t.current?.appendChild(n),()=>{o.appendChild(n)}},[e.element,e.home]),(0,Ma.jsx)("div",{ref:t})}function J(e){let t=document.querySelector(e);if(!t)throw new Error(`The dev shell is missing ${e}.`);return t}var Oa=J("#stage"),Ar=J("#frame"),lw=J("#cutout"),us=J("#sheet"),Yc=Gf(document);Ar.appendChild(Yc.element);var Be=If({host:Oa,originOf:()=>Zg(Oa),scope:window,onLayout:()=>mi(),onShut:()=>Yg(),back:()=>Ln.back(),playback:{pause:{state:"unpausable",onToggle:e=>{I(e?"asking the game to pause\\u2026":"asking the game to carry on\\u2026"),Ue?.pause.set(e).then(t=>{Be.playback?.setPause(t),qw(t)})}},audio:{state:{master:1,muted:!1,channels:{}},onChange:e=>Hw(e)},onMixer:()=>{Ln.show("audio"),Be.sheet.open()}}}),sw=jf({host:Oa,chrome:Be,frameOf:()=>Ue?.frame??null,selectable:["#log","#facts","#problem","#notice","#errors",".gb-title"]});Be.sheet.on(()=>Bw());var td=document.createElement("span");td.id="status";td.textContent="booting \\xB7 active";var Wc=!1,nd=Hf(Be.rail,{travel:()=>I("there is one game here, so there is nowhere to travel"),fullscreen:()=>oP(),liked:()=>Wc,like:()=>{Wc=!Wc,I(Wc?"liked \\xB7 nobody was told":"unliked \\xB7 nobody was told")},share:()=>void rP(),account:()=>{I("sign in pressed \\xB7 there is no server here, so the You tab is a made-up player"),Ln.showTab("you"),Be.sheet.open()},player:()=>({signedIn:!1,picture:null})},{lead:[td]});nd.feed(1,0);function oP(){document.fullscreenElement?document.exitFullscreen?.():Oa.requestFullscreen?.()}document.addEventListener("fullscreenchange",()=>{nd.showFullscreen(!!document.fullscreenElement),mi()});async function rP(){let e=_w(zw("rail",{}));I(`share offered \\xB7 ${e}`);let t=await Lw(e);I(t?"the link is on the clipboard":"the clipboard refused \\u2014 the link is above",t?"ok":"bad"),t&&Be.announce(Ps),sw.hand()}var pi=J("#ping"),uw=J("#log"),K1=J("#problem"),Q1=J("#notice"),iP=J("#facts"),cs=J("#errors"),Zc=J("#close"),cw=J("#unaware"),dw=J("#notch"),fw=J("#returning"),aP=J("#stranger"),Rg=J("#stored"),_g=J("#forget"),Cg=J("#link"),pw=J("#unlink"),lP=J("#standing"),zg=J("#score-low"),$g=J("#score-high"),mw=J("#reroll"),hw=J("#drop-score"),Ng=J("#no-scores"),J1=J("#pressing"),gw=J("#no-input"),sP=J("#channels"),Lg=J("#no-audio"),uP=J("#pausing"),Dg=J("#no-pause"),ew=J("#earned"),yw=J("#reset-achievements"),Ig=J("#no-achievements"),jg=J("#no-panels"),cP=J("#about"),vw=[{id:"input",label:"Input",element:J("#dev-input")},{id:"sound",label:"Sound",element:J("#dev-sound")},{id:"pause",label:"Pause",element:J("#dev-pause")},{id:"save",label:"Save",element:J("#dev-save")},{id:"score",label:"Score",element:J("#dev-score")},{id:"achievements",label:"Achievements",element:J("#dev-achievements")},{id:"share",label:"Share",element:J("#dev-share")}],bw=J("#dev-device"),xw=J("#dev-log");function $o(e){return[bw,...vw.map(t=>t.element),xw].flatMap(t=>[...t.querySelectorAll(e)])}us.hidden=!0;var Bg=jo(Nt),Kc=jo("floating"),Ln=Z1({segments:[],sticks:Kc,extra:[{id:"dev",label:"Dev",icon:"mixer",view:()=>Fo.parted([{id:"device",label:"Device",view:()=>ss(bw,us)},{id:"features",label:"Features",view:()=>Fo.parted(vw.map(({id:e,label:t,element:n})=>({id:e,label:t,view:()=>ss(n,us)})),{initial:P.devFeature,onSelect:e=>Ug({devFeature:e}),fit:!0})},{id:"log",label:"Log",view:()=>ss(xw,us)}],{initial:P.devPart,onSelect:e=>Ug({devPart:e})})}]});Be.sheet.setSections([{render:e=>Ln.mount(e,Be.sheet)}]);Ln.on(()=>Bw());function tw(e){if(typeof e!="object"||e===null)return!1;let t=e;return typeof t.id=="string"&&typeof t.url=="string"}var kw=["auto","portrait","landscape","window"];function dP(){return P.shape!=="auto"?P.shape:"window"}var Sw=["auto","rail","dots"],fP=["ok","none","full","slow"],ww=2e3,nw=[{ms:1e3,events:10},{ms:15e3,events:15},{ms:6e4,events:30}],Aw="hopple.dev.shell",Hg="hopple.dev.install",pP="hopple.dev.save",Ew="hopple.dev.input",Vg="share",Mw="hopple.dev.shares",mP=100,P=FP();Kc.set(P.sticks);Kc.on(()=>{P.sticks=Kc.get(),In(),Ue?.input.set({sticks:P.sticks},"setting"),I(P.sticks==="floating"?"input sticks: floating \\u2014 a thumbstick comes to wherever a thumb lands on its side, and is pulled along past its rim":"input sticks: fixed \\u2014 a thumbstick stays where it is drawn")});var Ue=null,Xg="active",Wg=()=>rf(Xg,document.visibilityState==="hidden"),ds=new URLSearchParams(location.search).get(Vg),qg=ds===null?null:OP(ds),zo=qg?.data??null,Gg=!1,fs={src:"",manifest:null,label:"",name:null,problem:null},pe=null,Tt=null,Tn=null,Qc="reserve",Tw=0,Fc=0,fi=null,hP=Xw().printsErrors;ps();gP();function gP(){let e=vP();if(e===null){Pg(yP(Xw()));return}let t=`${e.game} \\xB7 ${e.server}`;Ow("game",t),I(`asking ${e.server} for ${e.game}\\u2026`),bP(e).then(Pg,n=>{Pg({src:"",manifest:null,label:t,name:null,problem:n instanceof Error?n.message:String(n)})})}function Ow(e,t){Be.title.set({title:e,sub:t})}function Pg(e){fs=e,pe=e.manifest,Qc=pe?Da(pe):"reserve",Ow(pe?.title??e.name??"game",e.label),K1.textContent=e.problem??"",K1.hidden=e.problem===null,Q1.textContent=e.problem??"",Q1.hidden=e.problem===null,YP(pe,e.problem),zP(),ps(),Rw()}function yP(e){return e.root===""?{src:"",manifest:null,label:"no game",name:null,problem:"This dev server was started without a game. Open a stored game from the admin page, or run `hopple dev` in a game\'s project."}:{src:"./game/",manifest:e.manifest,label:e.root,name:null,problem:e.problem}}function vP(){let e=new URLSearchParams(location.search),t=e.get("server")??"",n=e.get("game")??"";return t===""||n===""?null:{server:t,game:n}}async function bP(e){let t=`${e.game} \\xB7 ${e.server}`,n;try{n=new URL(e.server.endsWith("/")?e.server:`${e.server}/`)}catch{throw new Error(`${e.server} is not a URL.`)}if(n.protocol!=="http:"&&n.protocol!=="https:")throw new Error(`${e.server} is not an http server.`);let o=/^([^/@]+)\\/([^/@]+)(?:@([0-9]+))?$/.exec(e.game),r;if(o!==null){let[,s="",u="",f]=o,m=`games/${encodeURIComponent(s)}/${encodeURIComponent(u)}${f?`/${f}`:""}`,c=await fetch(new URL(m,n).toString());if(!c.ok)throw new Error(`${e.server} has no ${e.game}.`);r=await c.json()}else{let s=await fetch(new URL("feed",n).toString());if(!s.ok)throw new Error(`${e.server} answered ${s.status} for its feed.`);let u=await s.json(),f=typeof u=="object"&&u!==null?u.games:null;if(!Array.isArray(f))throw new Error(`${e.server} did not answer with a feed.`);r=f.find(m=>tw(m)&&m.id===e.game)}if(!tw(r))throw new Error(`${e.server} has no game called ${e.game}.`);let i=/^[a-z][a-z0-9+.-]*:/i.test(r.url)?r.url:new URL(r.url.replace(/^\\/+/,""),n).toString(),a=typeof r.title=="string"?r.title:null;if(r.manifest===null||r.manifest===void 0)return{src:i,manifest:null,label:t,name:a,problem:null};let l=Id(r.manifest);return l.ok?{src:i,manifest:l.manifest,label:t,name:a,problem:null}:{src:i,manifest:null,label:t,name:a,problem:`${e.game}: ${jd(l.problems)}`}}function Rw(){Ue?.dispose(),Ue=null;let e=wP(),t=AP(),n=EP();if(qP(),LP(),Be.playback?.setPause("unpausable"),ed("unpausable"),Fg(),Ra(),od(),TP(),Vw(),Tw+=1,fs.src===""){Zc.disabled=!0,pi.disabled=!0,Yc.setReady(!0);return}Yc.setReady(!1),Xg="active",Ue=Ey(Ar,fs.src,{placement:Wg(),layout:Dw(),info:kP(),analytics:{...pe?{declared:Ia(pe)}:{},sink:BP,refuse:XP()},errors:GP,...e===void 0?{}:{save:e},share:MP(),...t===void 0?{}:{score:t},...n===void 0?{}:{achievements:n},...rw()===void 0?{}:{input:rw()},...iw()===void 0?{}:{audio:iw()},...aw()===void 0?{}:{panel:aw()}}),Zc.disabled=!1,pi.disabled=!0,zo!==null&&I(`the link carries ${zo.length} characters: ${zo}`),I("mounting the game\\u2026"),Ue.loaded.then(()=>{I("frame loaded","ok"),pi.disabled=!1,Be.sheet.isOpen||Yg()}),Ue.connected.then(i=>I(`game connected as peer ${i.peer}`,"ok"),i=>{I(i instanceof Error?i.message:String(i),"bad"),i instanceof G&&i.code==="timeout"&&I("anything it threw before calling init() is in the browser console","bad")});let o=Ue.pause.state;Ue.pause.on(i=>{let a=o;o=i,!P.noPause&&(Be.playback?.setPause(i),nd.paused(a,i),ed(i),qw(i))});let r=Ue;r.lifecycle.on((i,a,l)=>{Yc.setReady(i.phase==="ready"),td.textContent=`${i.phase} \\xB7 ${i.placement}`;let s=i.phase===a.phase?`${a.placement} \\u2192 ${i.placement}: ${xP(r.lifecycle.allowed)}`:`${a.phase} \\u2192 ${i.phase}`;I(`${s}${l==="host"?"":` (${WP(l)})`}`)})}function xP(e){let t=n=>n?"on":"off";return`sound ${t(e.audio)}, loop ${t(e.loop)}, resources ${e.resources?"kept":"freed"}`}function Yg(){sw.hand()}function kP(){return{app:{id:"hopple.dev",version:"",surface:"dev"},game:{id:pe?.id??"",version:pe?.version??""},player:{id:Cw(),returning:P.returning,locale:P.locale},device:{tier:P.tier}}}function Cw(){return Xd(SP(),pe?.id??"")}function SP(){try{let e=localStorage.getItem(Hg);if(e!==null)return e;let t=Math.random().toString(36).slice(2);return localStorage.setItem(Hg,t),t}catch{return Math.random().toString(36).slice(2)}}function Jc(){return`${pP}.${Cw()}`}function Pw(){try{let e=JSON.parse(localStorage.getItem(Jc())??"null");if(typeof e!="object"||e===null)return null;let t=e;return typeof t.at!="number"||typeof t.record!="object"||t.record===null?null:{at:t.at,record:t.record}}catch{return null}}function wP(){if(P.store==="none")return;let e=async t=>(P.store!=="slow"||await new Promise(n=>setTimeout(n,ww)),t());return{read:()=>e(()=>{let t=Pw();return t===null?null:{...t.record,at:t.at}}),write:t=>e(()=>{if(P.store==="full")throw I("the store refused the save: it is full","bad"),new Error("the store is full");let n={at:Date.now(),record:t};localStorage.setItem(Jc(),JSON.stringify(n))}),clear:()=>e(()=>{localStorage.removeItem(Jc())})}}function AP(){if(P.noScores){Tt=null;return}let e=pe?ki(pe):{};if(Object.keys(e).length===0){Tt=null;return}return Tt=rv(e,{low:P.scoreLow,high:P.scoreHigh}),{...Tt.store,submit:t=>{let n=Tt?.store.submit(t);return I(`score \\xB7 ${t.board} \\xB7 ${t.value}`+(n&&"improved"in n&&n.improved?" \\xB7 a new best":""),"ok"),Ra(),n??{improved:!1,best:t.value}}}}function Ra(){let e=Tt?.boards()??[];mw.disabled=Tt===null,hw.disabled=Tt===null,lP.textContent=Tt===null?P.noScores?"this host keeps no scores":"this game declares no boards":`${e.length} board${e.length===1?"":"s"}, against ${js} invented players \\u2014 see the Scores tab`,Ln.refresh("scores")}function EP(){if(P.noAchievements){Tn=null;return}let e=pe?ja(pe):{};if(Object.keys(e).length===0){Tn=null;return}return Tn=tv(e),kf({...Tn.store,report:t=>{let n=Tn?.store.report(t),o=n&&"earned"in n&&n.earned?" \\xB7 earned":n&&"progress"in n&&n.progress!==void 0?` \\xB7 at ${String(n.progress)}`:"";return I(`achievement \\xB7 ${t.id}${t.unlock?" \\xB7 unlock":""}${o}`,"ok"),od(),n??{unlocked:t.unlock,earned:t.unlock}}},(t,n)=>Be.announce(t,n))}function od(){if(yw.disabled=Tn===null,Tn===null)ew.textContent=P.noAchievements?"this host keeps no achievements":"this game declares no achievements";else{let{have:e,of:t}=Tn.tally();ew.textContent=`${e} of ${t} unlocked \\u2014 see the Achievements tab`}Ln.refresh("achievements")}function MP(){return{...zo===null?{}:{data:zo},offer:async e=>{let t=_w(zw("game",e));I(`share offered \\xB7 ${t}`),e.data!==void 0&&I(`the game put ${e.data.length} characters in it: ${e.data}`),e.meta!==void 0&&I(`and said why: ${JSON.stringify(e.meta)}`);let n=await Lw(t);return I(n?"the link is on the clipboard":"the clipboard refused \\u2014 the link is in the line above",n?"ok":"bad"),n&&Be.announce(Ps),Yg(),n?"copied":"dismissed"}}}function TP(){pw.disabled=ds===null||Gg,ds===null||Gg?Cg.textContent="not opened from a link":qg===null?Cg.textContent=`opened from a link this shell never made \\xB7 ${ds}`:Cg.textContent=`opened from a link made from the ${qg.via} \\xB7 `+(zo===null?"carrying nothing":`${zo.length} characters \\xB7 ${zo}`)}pw.addEventListener("click",()=>{zo=null,Gg=!0;let e=new URL(location.href);e.searchParams.delete(Vg),history.replaceState(null,"",e.toString()),I("the link was dropped \\u2014 restarting the game without it"),Dn()});function _w(e){let t=new URL(location.href),n=t.searchParams.get("game");return n!==null&&t.searchParams.set("game",n.replace(/@[0-9]+$/,"")),t.searchParams.set(Vg,e),t.toString()}function zw(e,t){let n={id:Wd(crypto.getRandomValues(new Uint8Array(Yd))),game:new URL(location.href).searchParams.get("game")?.replace(/@[0-9]+$/,"")??fs.name??fs.label,via:e,channel:"clipboard",...t.data===void 0?{}:{data:t.data},...t.meta===void 0?{}:{meta:t.meta},createdAt:new Date().toISOString(),opens:0},o=$w();o[n.id]=n,Nw(o);let{id:r,...i}=n;return I(`share ${r} filed \\xB7 ${JSON.stringify(i)}`),r}function OP(e){let t=$w(),n=t[e];return n===void 0?null:(n.opens+=1,Nw(t),n)}function $w(){try{let e=JSON.parse(localStorage.getItem(Mw)??"{}");return typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{}}catch{return{}}}function Nw(e){let t=Object.values(e).sort((n,o)=>n.createdAt.localeCompare(o.createdAt)).slice(-mP);try{localStorage.setItem(Mw,JSON.stringify(Object.fromEntries(t.map(n=>[n.id,n]))))}catch{}}async function Lw(e){try{return await navigator.clipboard.writeText(e),!0}catch{return RP(e)}}function RP(e){let t=document.createElement("textarea");t.value=e,t.setAttribute("aria-hidden","true"),t.style.position="fixed",t.style.top="-100vh",t.style.opacity="0",document.body.append(t);try{return t.focus({preventScroll:!0}),t.select(),document.execCommand("copy")}catch{return!1}finally{t.remove()}}function Fg(){if(P.store==="none"){Rg.textContent="this host has no save store",_g.disabled=!0;return}let e=Pw();if(_g.disabled=e===null,e===null){Rg.textContent="nothing stored";return}let t=new TextEncoder().encode(e.record.state).length;Rg.textContent=`v${e.record.version} \\xB7 ${e.record.encoding} \\xB7 ${t} bytes \\xB7 ${CP(e.at)}`}function CP(e){let t=Math.max(0,Math.round((Date.now()-e)/1e3));if(t<60)return`${t}s ago`;let n=Math.round(t/60);return n<60?`${n}m ago`:`${Math.round(n/60)}h ago`}function Dw(){let e=Zg(Oa),t={...ow("rail",Be.railRect()),...P.cutout?ow("cutout",PP(lw,e)):{},...Be.over(),reserve:P.unaware||Qc==="reserve"},n=Cs({x:0,y:0,width:e.width,height:e.height},t);return Ar.style.setProperty("--frame-top",`${n.insets.top}px`),Ar.style.setProperty("--frame-right",`${n.insets.right}px`),Ar.style.setProperty("--frame-bottom",`${n.insets.bottom}px`),Ar.style.setProperty("--frame-left",`${n.insets.left}px`),{frame:{width:Ar.clientWidth,height:Ar.clientHeight},obstructions:n.layout.obstructions}}function Zg(e){let t=e.getBoundingClientRect();return{x:t.left,y:t.top,width:t.width,height:t.height}}function PP(e,t){let n=Zg(e);if(!(n.width===0||n.height===0))return{x:n.x-t.x,y:n.y-t.y,width:n.width,height:n.height}}function ow(e,t){return t===void 0?{}:{[e]:t}}function mi(){ps();let e=Dw();Ue?.layout.set(e),In()}function ps(){let e=document.body;e.dataset.shape=dP();let t=Iw();e.dataset.rail=t.height>=t.width?"bottom":"right";let n=_P();Be.setMode(n),nd.setMode(n),lw.hidden=!P.cutout,cw.setAttribute("aria-pressed",String(P.unaware)),dw.setAttribute("aria-pressed",String(P.cutout)),fw.setAttribute("aria-pressed",String(P.returning)),Ta("[data-shape]",P.shape),Ta("[data-chrome]",P.chrome),Ta("[data-tier]",P.tier),Ta("[data-locale]",P.locale),Ta("[data-store]",P.store),Ta("[data-scheme]",P.scheme),gw.setAttribute("aria-pressed",String(P.noInput)),DP(),Lg.setAttribute("aria-pressed",String(P.noAudio)),Dg.setAttribute("aria-pressed",String(P.noPause)),ed(Ue?.pause.state??"unpausable"),Ng.setAttribute("aria-pressed",String(P.noScores)),zg.value=String(P.scoreLow),$g.value=String(P.scoreHigh),Ra(),Ig.setAttribute("aria-pressed",String(P.noAchievements)),jg.setAttribute("aria-pressed",String(P.noPanels)),od()}function _P(){let e=Iw();return P.chrome==="auto"?qf(window,e):P.chrome==="dots"?"desktop":e.height>=e.width?"portrait":"landscape"}function Iw(){let e=Oa.getBoundingClientRect();return{width:e.width,height:e.height}}function Ta(e,t){for(let n of $o(e)){let o=n.dataset,r=o.shape??o.chrome??o.tier??o.locale??o.store;n.setAttribute("aria-pressed",String(r===t))}}function zP(){let e=pe?.orientation??"any";for(let t of $o("[data-shape]")){let n=t.dataset.shape;e==="any"||n==="auto"||n==="window"||n===e||(t.dataset.unsupported="",t.title=`This game asks to be held in ${e}.`)}}for(let e of $o("[data-shape]"))e.addEventListener("click",()=>{let t=e.dataset.shape;t===void 0||!kw.includes(t)||(e.dataset.unsupported!==void 0&&I(`${t}: not a shape this game asked for`,"bad"),P.shape=t,mi())});for(let e of $o("[data-chrome]"))e.addEventListener("click",()=>{let t=e.dataset.chrome;t===void 0||!Sw.includes(t)||(P.chrome=t,mi())});cw.addEventListener("click",()=>{P.unaware=!P.unaware;let e=P.unaware?"reserve":Qc;I(`insets: ${e}${e===Qc?" (as declared)":""}`),mi()});dw.addEventListener("click",()=>{P.cutout=!P.cutout,mi()});for(let e of $o("[data-store]"))e.addEventListener("click",()=>{let t=e.dataset.store;!fP.includes(t)||t==="ok"||(P.store=P.store===t?"ok":t,I(`save store: ${$P()} \\u2014 restarting the game`),Dn())});_g.addEventListener("click",()=>{try{localStorage.removeItem(Jc())}catch{}Fg(),I("the save was forgotten \\u2014 the running game has not been told")});function $P(){return P.store==="none"?"none at all":P.store==="full"?"full":P.store==="slow"?`slow (${ww/1e3}s)`:"localStorage"}function rw(){if(!P.noInput)return{...pe?{actions:Rr(pe),layouts:Cr(pe)}:{},scheme:P.scheme,controls:P.scheme==="touch",sticks:P.sticks,mapping:jw}}function jw(){try{let e=JSON.parse(localStorage.getItem(`${Ew}.${pe?.id??""}`)??"null");if(typeof e!="object"||e===null||Array.isArray(e))return{};let t={};for(let[n,o]of Object.entries(e)){if(!Array.isArray(o))continue;let r=o.filter(i=>typeof i=="string");r.length>0&&(t[n]=r)}return t}catch{return{}}}function NP(e){try{localStorage.setItem(`${Ew}.${pe?.id??""}`,JSON.stringify(e))}catch{}Ue?.input.set({mapping:e},"remap");let t=Object.keys(e);I(t.length===0?"input remap: back to the manifest":`input remap: ${t.map(n=>`${n} \\u2192 ${e[n]?.join(", ")}`).join("; ")}`)}function iw(){if(!P.noAudio)return{...pe?{channels:Si(pe)}:{},state:P.audio}}function LP(){let e=pe?Si(pe):{},t=Object.keys(e);sP.textContent=P.noAudio?"this host says nothing about audio":t.length===0?"this game declares no audio channels \\u2014 the master fader is all there is":`${t.length} channels: ${t.join(", ")}`,Be.playback?.setAudio(P.audio),Bg.set(P.audio)}function Hw(e){P.audio={muted:e.muted??P.audio.muted,master:e.master??P.audio.master,channels:{...P.audio.channels,...e.channels??{}}},In(),Bg.set(P.audio),Be.playback?.setAudio(P.audio),Ue?.audio.set(e).then(t=>{t||I("the game did not answer with the volume it was asked for","bad")})}function qw(e){I(e==="unpausable"?"the game says there is nothing to pause just now":`the game says it is ${e}`)}function ed(e){uP.textContent=P.noPause?"this host never asks a game to pause":e==="unpausable"?"the game has not said there is anything to pause \\u2014 the control never appears":`the game says it is ${e}`}Dg.addEventListener("click",()=>{P.noPause=!P.noPause,In(),Dg.setAttribute("aria-pressed",String(P.noPause)),I(P.noPause?"this host will no longer ask the game to pause":"this host can ask the game to pause again");let e=P.noPause?"unpausable":Ue?.pause.state??"unpausable";Be.playback?.setPause(e),ed(e)});Lg.addEventListener("click",()=>{P.noAudio=!P.noAudio,Lg.setAttribute("aria-pressed",String(P.noAudio)),I(P.noAudio?"this host now says nothing about audio \\u2014 restarting the game":"this host states the volume again \\u2014 restarting the game"),Dn()});function DP(){if(P.noInput){J1.textContent="this host says nothing about input, so the game has no actions";return}let e=Object.keys(pe?Rr(pe):{});J1.textContent=e.length===0?"this game declares no actions":`${e.length} actions: ${e.join(", ")}`}for(let e of $o("[data-scheme]"))e.addEventListener("click",()=>{let t=e.dataset.scheme;IP.includes(t)&&(P.scheme=t,Ue?.input.set({scheme:P.scheme,controls:P.scheme==="touch"},"scheme"),I(P.scheme==="touch"?"input scheme: touch \\u2014 on-screen controls now apply":`input scheme: ${P.scheme}`),ps(),In())});var IP=["keyboard","mouse","touch","gamepad"];gw.addEventListener("click",()=>{P.noInput=!P.noInput,I(P.noInput?"this host now says nothing about input \\u2014 restarting the game":"this host describes input again \\u2014 restarting the game"),Dn()});for(let e of $o("[data-tier]"))e.addEventListener("click",()=>{let t=e.dataset.tier;t!=="low"&&t!=="mid"&&t!=="high"||(P.tier=t,I(`device tier: ${t} \\u2014 restarting the game`),Dn())});for(let e of $o("[data-locale]"))e.addEventListener("click",()=>{let t=e.dataset.locale;t!==void 0&&(P.locale=t,I(`locale: ${t} \\u2014 restarting the game`),Dn())});fw.addEventListener("click",()=>{P.returning=!P.returning,I(`${P.returning?"a player who has been here":"a first run"} \\u2014 restarting`),Dn()});aP.addEventListener("click",()=>{try{localStorage.removeItem(Hg)}catch{}P.returning=!1,I("a new player \\u2014 restarting the game"),Dn()});function Dn(){In(),ps(),Rw()}for(let e of[zg,$g])e.addEventListener("change",()=>{P.scoreLow=Math.round(Number(zg.value)||0),P.scoreHigh=Math.round(Number($g.value)||0),In(),Tt?.reroll({low:P.scoreLow,high:P.scoreHigh}),Ra(),I(`the invented field is now between ${P.scoreLow} and ${P.scoreHigh}`)});mw.addEventListener("click",()=>{Tt?.reroll({low:P.scoreLow,high:P.scoreHigh}),Ra(),I("re-randomised the invented field")});hw.addEventListener("click",()=>{Tt?.clearMine(),Ra(),I("removed this player\\u2019s scores; the invented field is untouched")});yw.addEventListener("click",()=>{Tn?.reset(),od(),I("achievements reset \\u2014 the running game has not been told")});Ig.addEventListener("click",()=>{P.noAchievements=!P.noAchievements,Ig.setAttribute("aria-pressed",String(P.noAchievements)),In(),I(P.noAchievements?"this host now keeps no achievements":"this host keeps achievements again"),Dn()});jg.addEventListener("click",()=>{P.noPanels=!P.noPanels,jg.setAttribute("aria-pressed",String(P.noPanels)),In(),I(P.noPanels?"this host now has no panels to open":"this host opens its own panels again"),Dn()});Ng.addEventListener("click",()=>{P.noScores=!P.noScores,Ng.setAttribute("aria-pressed",String(P.noScores)),In(),I(P.noScores?"this host now keeps no scores":"this host keeps scores again"),Dn()});function jP(){return{boards:()=>(Tt?.boards()??[]).map(e=>({id:e,title:(pe?ki(pe)[e]?.title:void 0)??e})),view:e=>{let t=pe?ki(pe)[e]:void 0,n=Tt?.standing()[e];if(t===void 0)return Promise.resolve(null);let o={board:e,title:t.title,direction:t.direction,format:t.format??"integer",you:n===void 0?null:{best:n.best,at:new Date(n.at).toISOString(),runs:n.runs,rank:n.rank??1,of:n.of??1},players:n?.of??js,recent:[],rows:Tt?.table(e)??[]};return Promise.resolve(o)}}}function HP(){return{view:()=>Promise.resolve(Tn===null?null:{entries:Tn.entries()})}}function Gw(){let e=[{id:"about",label:"About",view:()=>ss(cP,us)}];(Tt?.boards().length??0)>0&&e.push({id:"scores",label:"Board",view:()=>Fo.scoreboard(jP())}),(Tn?.ids().length??0)>0&&e.push({id:"achievements",label:"Badges",view:()=>Fo.achievements(HP())});let t=pe?Rr(pe):{},n=pe?Cr(pe):{};return(Object.keys(t).length>0||Object.keys(n).length>0)&&e.push({id:"input",label:"Input",view:()=>Fo.input({actions:t,layouts:n,...P.noInput?{}:{mapping:Ue===null?Object.fromEntries(Object.entries(jw()).map(([o,r])=>[o,{bind:r}])):Ue.input.current.mapping,rebind:NP},scheme:P.scheme})}),P.noAudio||e.push({id:"audio",label:"Audio",view:()=>Fo.mixer(pe?Si(pe):{},Bg,o=>Hw(o))}),e}function qP(){Ln.setSegments(Gw())}function aw(){if(!P.noPanels)return{ids:()=>Gw().map(e=>e.id),open(e){Ln.show(e),Be.sheet.open(),I(`the game asked for the panel\'s ${e} page`)},state:()=>Uw()}}function Uw(){return Be.sheet.isOpen?{isOpen:!0,page:Ln.showing()}:{isOpen:!1,page:null}}function Bw(){Ue?.panel.set(Uw())}addEventListener("resize",mi);for(let e of $o("[data-place]"))e.addEventListener("click",()=>{(async()=>{let t=e.dataset.place;if(t!=="active"&&t!=="passive"&&t!=="hidden")return;Xg=t,await Ue?.lifecycle.place(Wg())===!1&&I(`the game did not obey every order for ${t}`,"bad")})()});document.addEventListener("visibilitychange",()=>{Ue?.lifecycle.place(Wg())});cs.addEventListener("click",()=>{Vw(),Ug({devPart:"log"}),Ln.showTab("dev"),Be.sheet.open()});function GP(e){hP&&UP(e);let n=`${e.kind==="rejection"?"unhandled rejection":e.kind==="sdk"?"caught by the SDK":"uncaught"} \\xB7 ${e.message}`;Fc+=e.count,cs.querySelector(".first").textContent=n,cs.querySelector(".then").textContent=`${Fc===1?"1 error":`${Fc} errors`} \\xB7 open the log`,cs.hidden=!1;let o=`${n}\n${e.stack??""}`;if(fi!==null&&fi.key===o&&uw.firstElementChild===fi.line){fi.times+=e.count,fi.count.textContent=`\\xD7${fi.times}`;return}let r=document.createElement("details"),i=document.createElement("summary");i.textContent=n;let a=document.createElement("span");if(a.className="times",e.count>1&&(a.textContent=`\\xD7${e.count}`),i.append(a),r.append(i),e.stack!==void 0){let s=document.createElement("pre");s.textContent=e.stack,r.append(s)}let l=I(r);fi={key:o,line:l,times:e.count,count:a}}function Vw(){Fc=0,cs.hidden=!0}function UP(e){let{kind:t,message:n,stack:o,count:r}=e;fetch("/errors",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({run:Tw,kind:t,message:n,...o===void 0?{}:{stack:o},count:r})}).catch(()=>{})}Zc.addEventListener("click",()=>{Zc.disabled=!0,pi.disabled=!0,Ue?.close().then(()=>I("bridge closed","ok"))});function BP(e){let t=Object.entries(e.props).map(([n,o])=>`${n}=${String(o)}`).join(" ");e.source==="game"?I(`event ${e.name}${t?` ${t}`:""}`):e.name==="hopple.refused"?I(`refused ${t}`,"bad"):e.name.startsWith("hopple.save.")?VP(e):e.name==="hopple.share.refused"?I(`share refused \\xB7 ${String(e.props.reason??"no reason given")}`,"bad"):e.name==="hopple.share.opened"&&e.props.kept===!1&&I(`the link carried ${String(e.props.bytes)} bytes \\u2014 too many to pass on`,"bad")}function VP(e){let t=Number(e.props.bytes??0),n=Number(e.props.ms??0),o=n>=1?` \\xB7 ${Math.round(n)}ms`:"";if(e.name==="hopple.save.read"){let r=e.props.found===!0;I(r?`save read \\xB7 ${t} bytes${o}`:`save read \\xB7 nothing stored${o}`,"ok")}else e.name==="hopple.save.write"?I(`save written \\xB7 ${t} bytes${o}`,"ok"):e.name==="hopple.save.clear"?I(`save cleared by the game${o}`):e.name==="hopple.save.refused"&&I(`save refused \\xB7 ${String(e.props.reason??"no reason given")}`,"bad");Fg()}function XP(){let e=[],t=nw.reduce((n,o)=>Math.max(n,o.ms),0);return({at:n})=>{for(;e.length>0&&n-(e[0]??0)>=t;)e.shift();for(let o of nw)if(e.filter(i=>n-i<o.ms).length>=o.events)return`more than ${o.events} events in ${o.ms/1e3}s`;e.push(n)}}function WP(e){return e==="game"?"the game said so":"the host stopped waiting"}pi.addEventListener("click",()=>{pi.disabled=!0,(async()=>{try{let e=await Ue?.ping();I(e===void 0?"no game":`game answered in ${e.toFixed(1)} ms`,"ok")}catch(e){I(e instanceof Error?e.message:String(e),"bad")}finally{pi.disabled=!1}})()});function YP(e,t){if(!e){_o("manifest",t?"not usable \\u2014 see above":"none");return}_o("id",e.id),_o("version",e.version),_o("orientation",e.orientation),_o("insets",Da(e)),_o("sdk",e.sdk);let n=Object.keys(e).filter(i=>!Nd.includes(i));_o("declares",n.length>0?n.join(", "):"nothing beyond the core");let o=Object.keys(Ia(e));o.length>0&&_o("events",o.join(", "));let r=Hd(e);r!==null&&_o("save",`${r.bytes} bytes wanted \\xB7 ${65536} here`)}function _o(e,t){let n=document.createElement("dt");n.textContent=e;let o=document.createElement("dd");o.textContent=t,iP.append(n,o)}function Xw(){let e={root:"",manifest:null,problem:null,printsErrors:!1},t=document.querySelector("#hopple-config");if(!t?.textContent)return e;let n=JSON.parse(t.textContent);if(typeof n!="object"||n===null)return e;let o=n;return{root:typeof o.root=="string"?o.root:"",manifest:o.manifest??null,problem:typeof o.problem=="string"?o.problem:null,printsErrors:o.printsErrors===!0}}function FP(){let e={shape:"auto",chrome:"auto",unaware:!1,cutout:!1,tier:"high",locale:"en",returning:!1,store:"ok",noScores:!1,scheme:"keyboard",noInput:!1,sticks:"floating",audio:Nt,noAudio:!1,noPause:!1,scoreLow:0,scoreHigh:1e4,noAchievements:!1,noPanels:!1,devPart:"device",devFeature:"input"};try{let t=JSON.parse(localStorage.getItem(Aw)??"null");if(typeof t!="object"||t===null)return e;let n={...e,...t};return Sw.includes(n.chrome)||(n.chrome="auto"),kw.includes(n.shape)||(n.shape="auto"),n.sticks!=="fixed"&&(n.sticks="floating"),Number.isFinite(n.scoreLow)||(n.scoreLow=e.scoreLow),Number.isFinite(n.scoreHigh)||(n.scoreHigh=e.scoreHigh),n.audio=Lo(n.audio)??Nt,n}catch{return e}}function Ug(e){Object.assign(P,e),In()}function In(){try{localStorage.setItem(Aw,JSON.stringify(P))}catch{}}function I(e,t){let n=document.createElement("li"),o=document.createElement("span");o.className="at",o.textContent=(performance.now()/1e3).toFixed(3);let r;return typeof e=="string"?(r=document.createElement("span"),r.textContent=e):r=e,t&&r.classList.add(t),n.append(o,r),uw.prepend(n),n}})();\n/*! @hopple/sdk | Copyright (c) 2026 The Hopple authors | MIT License */\n/*! Bundled license information:\n\nreact/cjs/react.production.js:\n (**\n * @license React\n * react.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *)\n\nreact/cjs/react-jsx-runtime.production.js:\n (**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *)\n\nreact-dom/cjs/react-dom.production.js:\n (**\n * @license React\n * react-dom.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *)\n\nscheduler/cjs/scheduler.production.js:\n (**\n * @license React\n * scheduler.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *)\n\nreact-dom/cjs/react-dom-client.production.js:\n (**\n * @license React\n * react-dom-client.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *)\n\nreact-strict-dom/dist/web/runtime.js:\nreact-strict-dom/dist/web/index.js:\n (**\n * @license react-strict-dom\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *)\n*/\n',template:`<!doctype html>
200
+ <html lang="en">
201
+ <head>
202
+ <meta charset="utf-8" />
203
+ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
204
+ <meta name="color-scheme" content="dark" />
205
+ <title>Hopple dev</title>
206
+ <!--gb-favicon-->
207
+ <!--gb-fonts-->
208
+ <!--gb-chrome-css-->
209
+ <style>
210
+ /*
211
+ * What the shared chrome layer needs from the host that renders it, and
212
+ * the whole of it: whether the rail is pinned to the window or to a box
213
+ * the host draws inside, and what is behind the device. This shell draws
214
+ * a simulated device in the middle of a monitor, so its chrome is pinned
215
+ * to that box rather than to the window.
216
+ *
217
+ * Everything else \u2014 the box model, a document that does not scroll, the
218
+ * type this shell's own words are set in, the palette, the thickness of
219
+ * the rail, the width of the sheet, the shape of a button \u2014 is
220
+ * \`host.css\`'s and \`theme.css\`'s, inlined above. This shell used to hold
221
+ * its own set, and what that produced was a scoreboard a game author
222
+ * could not recognise when they later saw it on the site. Showing them
223
+ * the site is the entire job of this page.
224
+ */
225
+ body {
226
+ --gb-anchor: absolute;
227
+ /* The monitor around the simulated device, which is the one thing here
228
+ that is not part of any host. */
229
+ background: #000;
230
+ display: grid;
231
+ place-items: center;
232
+ }
233
+
234
+ /* The device: everything the game could possibly see, and the only thing
235
+ the host draws inside. On a phone it is the screen; on a desktop asked
236
+ for a phone it is a phone-shaped box in the middle of the window, which
237
+ is the only way to look at a portrait rail without device emulation. */
238
+ #stage {
239
+ position: relative;
240
+ /* \`clip\` rather than \`hidden\`: a game's \`scrollIntoView\` or \`focus()\`
241
+ crosses its iframe and scrolls any scroll container above it, and a
242
+ \`hidden\` box is one. \`clip\` is not. */
243
+ overflow: hidden;
244
+ overflow: clip;
245
+ background: #000;
246
+ box-shadow: 0 0 0 1px var(--gb-rule);
247
+ }
248
+ /* Sized from the shorter constraint in both, so the device always fits
249
+ the window it is drawn in: a portrait phone on a window wider than it
250
+ is tall is bounded by the height, and the same phone on a narrow one is
251
+ bounded by the width. Without both bounds a shape that no longer suits
252
+ the window \u2014 a phone held upright and then turned over \u2014 is a device
253
+ hanging off the edge of it. */
254
+ [data-shape='portrait'] #stage {
255
+ height: min(100dvh, 100vw * 19.5 / 9);
256
+ aspect-ratio: 9 / 19.5;
257
+ }
258
+ [data-shape='landscape'] #stage {
259
+ width: min(100vw, 100dvh * 19.5 / 9);
260
+ aspect-ratio: 19.5 / 9;
261
+ }
262
+ [data-shape='window'] #stage {
263
+ width: 100vw;
264
+ height: 100dvh;
265
+ }
266
+
267
+ /* Positioned rather than sized, because what a developer comes here to see
268
+ is whether the host is over the game or beside it. The numbers come from
269
+ the same projection the game's SDK would have made. */
270
+ #frame {
271
+ position: absolute;
272
+ top: var(--frame-top, 0);
273
+ right: var(--frame-right, 0);
274
+ bottom: var(--frame-bottom, 0);
275
+ left: var(--frame-left, 0);
276
+ overflow: hidden;
277
+ overflow: clip;
278
+ }
279
+ #frame iframe {
280
+ width: 100%;
281
+ height: 100%;
282
+ display: block;
283
+ border: 0;
284
+ }
285
+
286
+ /* The status line: dev-shell furniture on the shared rail, handed to
287
+ \`fillRailControls\` as an extra and carried between the three
288
+ arrangements by the same code that carries the buttons. It rides
289
+ wherever the strip currently is, without this file knowing which. */
290
+ #status {
291
+ font: 500 11px/1 var(--gb-font-mono);
292
+ letter-spacing: 0.02em;
293
+ color: var(--gb-accent);
294
+ white-space: nowrap;
295
+ filter: var(--gb-glyph);
296
+ /* It shares the strip with the controls every host draws, and those
297
+ come first: a status line long enough to push a travel arrow off a
298
+ narrow bar is this shell breaking the thing it exists to show. */
299
+ overflow: hidden;
300
+ text-overflow: ellipsis;
301
+ max-width: 12ch;
302
+ }
303
+ /* A rail down the side is only a few characters wide, so the line that
304
+ runs along it has to turn with it. */
305
+ body[data-mode='landscape'] #status,
306
+ body[data-mode='desktop'] #status {
307
+ writing-mode: vertical-rl;
308
+ }
309
+
310
+ /* A notch, on purpose. There is no real one to borrow in a browser, and a
311
+ game that has never been run against one has never been tested.
312
+
313
+ Outlined on all four sides, the way this shell's rail deliberately is
314
+ not: the cutout is invented furniture that exists only here, so drawing
315
+ its whole rectangle costs a game author no illusion about the site. Two
316
+ lines rather than one, and the same trick the glyphs use \u2014 the light
317
+ border draws the rectangle over a dark game, the dark line just inside
318
+ it draws the same rectangle over a bright one. */
319
+ #cutout {
320
+ position: absolute;
321
+ border: 1px solid var(--gb-edge);
322
+ box-shadow: inset 0 0 0 1px var(--gb-inner);
323
+ top: 0;
324
+ left: 50%;
325
+ transform: translateX(-50%);
326
+ width: 8rem;
327
+ height: 1.9rem;
328
+ background: #00000080;
329
+ }
330
+ #cutout[hidden] {
331
+ display: none;
332
+ }
333
+ [data-rail='right'] #cutout {
334
+ top: 50%;
335
+ left: 0;
336
+ transform: translateY(-50%);
337
+ width: 1.9rem;
338
+ height: 8rem;
339
+ }
340
+
341
+ /* Scoped, every one of them. A bare \`h2\`, \`button\` or \`input\` selector in
342
+ a host page reaches into the shared chrome the host also renders, and a
343
+ rule the shared layer never anticipated is exactly how two hosts end up
344
+ drawing one component two ways. This shell says what its own furniture
345
+ looks like and says nothing at all about the sheet's. */
346
+ .dev h2,
347
+ #sheet > h2 {
348
+ font: 600 0.64rem/1 var(--gb-font-mono);
349
+ letter-spacing: 0.14em;
350
+ text-transform: uppercase;
351
+ color: var(--gb-dim);
352
+ margin: 1.2rem 0 0.6rem;
353
+ }
354
+ /* The track over a part already parts it from what is above. */
355
+ .dev > :first-child {
356
+ margin-top: 0;
357
+ }
358
+ .buttons button,
359
+ #ping {
360
+ font: 600 0.82rem/1 var(--gb-font);
361
+ padding: 0.5rem 0.7rem;
362
+ border-radius: 4px;
363
+ border: 1px solid var(--gb-rule);
364
+ background: var(--gb-bg);
365
+ color: var(--gb-fg);
366
+ cursor: pointer;
367
+ }
368
+ .buttons button:hover:not(:disabled),
369
+ #ping:hover:not(:disabled) {
370
+ border-color: var(--gb-bad);
371
+ color: var(--gb-bad);
372
+ }
373
+ .buttons button:disabled,
374
+ #ping:disabled {
375
+ opacity: 0.4;
376
+ cursor: default;
377
+ }
378
+ .buttons button[aria-pressed='true'] {
379
+ border-color: var(--gb-accent);
380
+ color: var(--gb-accent);
381
+ }
382
+ .buttons {
383
+ display: flex;
384
+ flex-wrap: wrap;
385
+ gap: 0.35rem;
386
+ }
387
+ /* The two ends of the invented population, on one line. */
388
+ .range {
389
+ display: flex;
390
+ align-items: center;
391
+ flex-wrap: wrap;
392
+ gap: 0.35rem;
393
+ margin: 0.4rem 0;
394
+ font: 400 0.72rem/1.4 var(--gb-font-mono);
395
+ color: var(--gb-dim);
396
+ }
397
+ .range input {
398
+ width: 5.5rem;
399
+ font: 600 0.75rem/1 var(--gb-font-mono);
400
+ padding: 0.35rem 0.4rem;
401
+ border-radius: 4px;
402
+ border: 1px solid var(--gb-rule);
403
+ background: var(--gb-bg);
404
+ color: var(--gb-fg);
405
+ }
406
+ /* What the app would never do to a game, offered anyway: this is a mock
407
+ host, and the failures worth seeing are the ones nobody arranges. */
408
+ .misbehave button[aria-pressed='true'] {
409
+ border-color: var(--gb-bad);
410
+ color: var(--gb-bad);
411
+ }
412
+ #close {
413
+ margin-left: auto;
414
+ }
415
+ .note {
416
+ margin: 0.5rem 0 0;
417
+ font: 400 0.68rem/1.5 var(--gb-font-mono);
418
+ color: var(--gb-dim);
419
+ }
420
+ /* Offered, not withheld: \`orientation\` is what a game asks for, and a
421
+ player rotating a phone is not bound by it. */
422
+ .buttons button[data-unsupported] {
423
+ border-style: dashed;
424
+ color: var(--gb-dim);
425
+ }
426
+
427
+ #facts {
428
+ margin: 0;
429
+ display: grid;
430
+ grid-template-columns: auto 1fr;
431
+ gap: 0.2rem 0.8rem;
432
+ font: 400 0.72rem/1.6 var(--gb-font-mono);
433
+ }
434
+ #facts dt {
435
+ color: var(--gb-dim);
436
+ }
437
+ #facts dd {
438
+ margin: 0;
439
+ overflow-wrap: anywhere;
440
+ }
441
+
442
+ #log {
443
+ margin: 0.6rem 0 0;
444
+ padding: 0;
445
+ list-style: none;
446
+ font: 400 0.72rem/1.7 var(--gb-font-mono);
447
+ max-height: 16rem;
448
+ overflow-y: auto;
449
+ }
450
+ #log li {
451
+ display: flex;
452
+ gap: 0.6rem;
453
+ border-bottom: 1px solid var(--gb-rule);
454
+ padding: 0.15rem 0;
455
+ }
456
+ #log li:last-child {
457
+ border-bottom: 0;
458
+ }
459
+ /* Seconds since the shell loaded. Fixed width and tabular figures so the
460
+ column reads as a column, and a gap between two lines is visible
461
+ without having to subtract anything. */
462
+ .at {
463
+ flex: none;
464
+ min-width: 3.2rem;
465
+ text-align: right;
466
+ color: var(--gb-dim);
467
+ font-variant-numeric: tabular-nums;
468
+ }
469
+ .ok {
470
+ color: var(--gb-accent);
471
+ }
472
+ .bad {
473
+ color: var(--gb-bad);
474
+ }
475
+ /* An error from the game: its first line, and the stack under it on
476
+ request, since a log of stacks is a log nobody can scan. */
477
+ #log details {
478
+ min-width: 0;
479
+ color: var(--gb-bad);
480
+ }
481
+ #log summary {
482
+ cursor: pointer;
483
+ overflow-wrap: anywhere;
484
+ }
485
+ #log details pre {
486
+ margin: 0.3rem 0 0.2rem;
487
+ font: inherit;
488
+ font-size: 0.66rem;
489
+ line-height: 1.5;
490
+ white-space: pre-wrap;
491
+ overflow-wrap: anywhere;
492
+ color: var(--gb-dim);
493
+ }
494
+ #log .times {
495
+ margin-left: 0.5rem;
496
+ color: var(--gb-dim);
497
+ }
498
+ #problem {
499
+ margin: 0 0 0.8rem;
500
+ padding: 0.6rem 0.7rem;
501
+ border: 1px solid var(--gb-bad);
502
+ border-radius: 4px;
503
+ color: var(--gb-bad);
504
+ font: 400 0.72rem/1.5 var(--gb-font-mono);
505
+ }
506
+ #problem[hidden] {
507
+ display: none;
508
+ }
509
+ /* What is wrong, on the stage rather than in the sheet \u2014 seen whether or
510
+ not the sheet is ever opened. Above the rail and the sheet both,
511
+ because a developer chasing this is the one time it must not be the
512
+ thing hidden behind another control. Stacked, so a broken manifest and
513
+ a game that threw are both readable at once. */
514
+ #notes {
515
+ position: absolute;
516
+ left: 0.5rem;
517
+ right: 0.5rem;
518
+ top: 0.5rem;
519
+ display: flex;
520
+ flex-direction: column;
521
+ gap: 0.4rem;
522
+ z-index: 4;
523
+ pointer-events: none;
524
+ }
525
+ #notice,
526
+ #errors {
527
+ margin: 0;
528
+ padding: 0.5rem 0.7rem;
529
+ border: 1px solid var(--gb-bad);
530
+ border-radius: 4px;
531
+ background: var(--gb-bg);
532
+ color: var(--gb-bad);
533
+ font: 400 0.72rem/1.5 var(--gb-font-mono);
534
+ pointer-events: auto;
535
+ }
536
+ #errors {
537
+ display: flex;
538
+ flex-direction: column;
539
+ align-items: flex-start;
540
+ gap: 0.15rem;
541
+ text-align: left;
542
+ cursor: pointer;
543
+ }
544
+ #errors .first {
545
+ overflow-wrap: anywhere;
546
+ display: -webkit-box;
547
+ -webkit-box-orient: vertical;
548
+ -webkit-line-clamp: 3;
549
+ overflow: hidden;
550
+ }
551
+ #errors .then {
552
+ color: var(--gb-dim);
553
+ }
554
+ #notice[hidden],
555
+ #errors[hidden] {
556
+ display: none;
557
+ }
558
+ </style>
559
+ </head>
560
+ <body data-shape="portrait" data-rail="bottom" data-mode="portrait">
561
+ <div id="stage">
562
+ <div id="frame"></div>
563
+
564
+ <div id="cutout" hidden></div>
565
+
566
+ <div id="notes">
567
+ <!-- The same fact as #problem, on the stage rather than in the sheet, so
568
+ it is seen without opening it: a broken manifest falls back to
569
+ \`reserve\`, shows no id and refuses every declared event, and every
570
+ one of those looks exactly like a host bug until this is read. -->
571
+ <p id="notice" hidden></p>
572
+
573
+ <!-- The game threw: the latest error, how many there have been, and a
574
+ way to the log that has each one with its stack. A game that
575
+ stopped moving looks exactly like a game that is thinking. -->
576
+ <button id="errors" hidden>
577
+ <span class="first"></span>
578
+ <span class="then"></span>
579
+ </button>
580
+ </div>
581
+
582
+ <!-- The rail, the sheet it opens, the veil between them, the game's name
583
+ riding on the sheet and the pause and volume controls beside it are
584
+ all built by \`createChrome\` in @hopple/shared/dom \u2014 the same
585
+ furniture the site puts on a game \u2014 and what goes inside the sheet is
586
+ the site's panel, from @hopple/shared/panel. -->
587
+
588
+ <!-- This shell's own views \u2014 its About view and its switches \u2014 wait
589
+ here, hidden, and shell.ts hands each to the sheet's panel as the
590
+ view it belongs to. In the markup so every id stays in one document
591
+ and nothing has to be built by hand. -->
592
+ <div id="sheet">
593
+ <!-- The Dev tab, a part at a time: what the device and the host are,
594
+ each feature a game can ask the host for, and what passed between
595
+ them. -->
596
+ <div class="dev" id="dev-device">
597
+ <h2>Shape</h2>
598
+ <div class="buttons" id="shapes">
599
+ <button data-shape="auto">auto</button>
600
+ <button data-shape="portrait">portrait</button>
601
+ <button data-shape="landscape">landscape</button>
602
+ <button data-shape="window">window</button>
603
+ </div>
604
+
605
+ <h2>Host chrome</h2>
606
+ <div class="buttons" id="chromes">
607
+ <button data-chrome="auto">auto</button>
608
+ <button data-chrome="rail">rail</button>
609
+ <button data-chrome="dots">dots</button>
610
+ </div>
611
+
612
+ <h2>Lifecycle</h2>
613
+ <div class="buttons">
614
+ <button data-place="active">active</button>
615
+ <button data-place="passive">passive</button>
616
+ <button data-place="hidden">hidden</button>
617
+ <button id="close">close</button>
618
+ </div>
619
+
620
+ <h2>Info</h2>
621
+ <div class="buttons" id="tiers">
622
+ <button data-tier="low">low</button>
623
+ <button data-tier="mid">mid</button>
624
+ <button data-tier="high">high</button>
625
+ </div>
626
+ <div class="buttons" id="locales">
627
+ <button data-locale="en">en</button>
628
+ <button data-locale="it">it</button>
629
+ <button data-locale="ja">ja</button>
630
+ </div>
631
+ <div class="buttons">
632
+ <button id="returning">returning player</button>
633
+ <button id="stranger">a player who has never played this</button>
634
+ </div>
635
+
636
+ <h2>Make the host misbehave</h2>
637
+ <div class="buttons misbehave">
638
+ <button id="unaware">ignore the manifest, reserve anyway</button>
639
+ <button id="notch">simulate a cutout</button>
640
+ <button id="no-panels">no panels of my own</button>
641
+ </div>
642
+ </div>
643
+
644
+ <!-- The Features part, a sub-tab per thing a game can ask its host
645
+ for. Each is named by its tab, so none carries a heading. -->
646
+ <div class="dev" id="dev-input">
647
+ <p class="note" id="pressing">this game declares no actions</p>
648
+ <div class="buttons" id="schemes">
649
+ <button data-scheme="keyboard">keyboard</button>
650
+ <button data-scheme="mouse">mouse</button>
651
+ <button data-scheme="touch">touch</button>
652
+ <button data-scheme="gamepad">gamepad</button>
653
+ </div>
654
+ <div class="buttons misbehave">
655
+ <button id="no-input">say nothing about input</button>
656
+ </div>
657
+ </div>
658
+
659
+ <div class="dev" id="dev-sound">
660
+ <p class="note" id="channels">this game declares no audio channels</p>
661
+ <div class="buttons misbehave">
662
+ <button id="no-audio">say nothing about audio</button>
663
+ </div>
664
+ </div>
665
+
666
+ <div class="dev" id="dev-pause">
667
+ <p class="note" id="pausing">the game has said nothing about pausing</p>
668
+ <div class="buttons misbehave">
669
+ <button id="no-pause">never ask the game to pause</button>
670
+ </div>
671
+ <p class="note">
672
+ The control is above, in the corner opposite the game's name, because that is where
673
+ every host draws it. It is the one thing a host <em>asks</em> a game rather than tells
674
+ it: the game may answer that it is paused, that it is running, or that there is nothing
675
+ to stop just now \u2014 a title screen, the gap between rounds \u2014 and that third answer is
676
+ why the corner sometimes has no button in it at all rather than a dead one.
677
+ </p>
678
+ <p class="note">
679
+ Nothing is declared up front: a game that never says where it stands is
680
+ <em>unpausable</em> and is never asked, which is what every game written before this API
681
+ gets. The line above says whether this one has spoken yet. The demo's own
682
+ <b>no balls</b> button is the fastest way to watch a running game go
683
+ <em>unpausable</em> and the corner empty itself.
684
+ </p>
685
+ <p class="note">
686
+ <b>Never ask the game to pause</b> is what every host older than pausing looks like: the
687
+ corner stays empty and the game is never asked. It should cost a pausable game nothing,
688
+ and the game plays on.
689
+ </p>
690
+ </div>
691
+
692
+ <div class="dev" id="dev-save">
693
+ <p class="note" id="stored">nothing stored</p>
694
+ <div class="buttons">
695
+ <button id="forget">forget this save</button>
696
+ </div>
697
+ <div class="buttons misbehave" id="stores">
698
+ <button data-store="none">no save store</button>
699
+ <button data-store="full">a store that is full</button>
700
+ <button data-store="slow">a slow store</button>
701
+ </div>
702
+ </div>
703
+
704
+ <div class="dev" id="dev-score">
705
+ <p class="note" id="standing">this game declares no boards</p>
706
+ <div class="range">
707
+ <input
708
+ id="score-low"
709
+ type="number"
710
+ step="1"
711
+ value="0"
712
+ aria-label="Lowest mocked score"
713
+ title="Lowest mocked score"
714
+ />
715
+ <input
716
+ id="score-high"
717
+ type="number"
718
+ step="1"
719
+ value="10000"
720
+ aria-label="Highest mocked score"
721
+ title="Highest mocked score"
722
+ />
723
+ </div>
724
+ <div class="buttons">
725
+ <button id="reroll">re-randomise the field</button>
726
+ <button id="drop-score">remove my scores</button>
727
+ <button id="no-scores">no score store</button>
728
+ </div>
729
+ </div>
730
+
731
+ <div class="dev" id="dev-achievements">
732
+ <p class="note" id="earned">this game declares no achievements</p>
733
+ <div class="buttons">
734
+ <button id="reset-achievements">reset achievements</button>
735
+ <button id="no-achievements">no achievement store</button>
736
+ </div>
737
+ </div>
738
+
739
+ <div class="dev" id="dev-share">
740
+ <p class="note" id="link">not opened from a link</p>
741
+ <div class="buttons">
742
+ <button id="unlink" disabled>open without the link</button>
743
+ </div>
744
+ </div>
745
+
746
+ <!-- The traffic between this host and the game, which is the shell's
747
+ own instrumentation rather than anything about the game: it belongs
748
+ behind the Dev tab with every other switch here. -->
749
+ <div class="dev" id="dev-log">
750
+ <h2>Host \u2192 game \xB7 s since load</h2>
751
+ <button id="ping" disabled>Ping the game</button>
752
+ <ul id="log"></ul>
753
+ </div>
754
+
755
+ <div id="about">
756
+ <p id="problem" hidden></p>
757
+ <dl id="facts"></dl>
758
+ </div>
759
+ </div>
760
+ </div>
761
+
762
+ <script src="./shell.js"></script>
763
+ </body>
764
+ </html>
765
+ `,css:`/**
766
+ * The page around the chrome, for every DOM host.
767
+ *
768
+ * \`chrome.css\` draws the rail and the sheet, the panel's extracted stylesheet
769
+ * draws what is inside the sheet, and \`theme.css\` says what the chrome is made
770
+ * of. This is the smallest of them: the document the rest are rendered into.
771
+ *
772
+ * It exists because both hosts had written the same reset, and had written it
773
+ * slightly differently \u2014 the same box model and the same scroll locking, but
774
+ * the site set its own text in \`--gb-font\` and the dev shell set the same text
775
+ * in \`ui-sans-serif\`. That is not a layout bug, it is the kind of difference
776
+ * that makes a game author read the dev shell as a different product from the
777
+ * site their players will see, which is the one thing the dev shell must never
778
+ * be.
779
+ *
780
+ * ## What is here and what is not
781
+ *
782
+ * Only what is true of *any* page that renders a game under this chrome: the
783
+ * box model, a document that does not scroll or bounce, and the voice the
784
+ * host's own words are set in. Everything a host draws of its own \u2014 the site's
785
+ * feed and its slots, the dev shell's simulated device \u2014 is that host's, and
786
+ * stays in that host's page.
787
+ *
788
+ * The one thing a host must still say for itself is \`--gb-anchor\`: whether the
789
+ * chrome is pinned to the window or to a box the host draws inside. See
790
+ * \`theme.css\`.
791
+ */
792
+
793
+ *,
794
+ *::before,
795
+ *::after {
796
+ box-sizing: border-box;
797
+ }
798
+
799
+ /*
800
+ * \`body\` and never \`html\`, which is a rule with a reason rather than a habit:
801
+ * the chrome is sized in \`rem\`, and a \`rem\` resolves against the root font
802
+ * size \u2014 which is the size the *reader* asked their browser for. A shared
803
+ * stylesheet that reached the root could take that away from them in every
804
+ * host at once, so it does not reach the root at all. Everything below
805
+ * propagates from the body on its own: \`overflow\` and \`overscroll-behavior\`
806
+ * become the viewport's when the root leaves them alone, which it does.
807
+ */
808
+ body {
809
+ /* \`dvh\` rather than a percentage of a root this file will not touch, and the
810
+ better answer anyway: on a phone it is the viewport that is actually
811
+ visible, bars and all. */
812
+ height: 100dvh;
813
+ margin: 0;
814
+ /*
815
+ * Nothing on a host page scrolls. The rail is the only way to travel, so the
816
+ * browser's own pull-to-refresh and swipe-back are both gestures competing
817
+ * with it \u2014 and a document that scrolled under a game would move the frame
818
+ * the game has just been told the size of.
819
+ */
820
+ overflow: hidden;
821
+ overscroll-behavior: none;
822
+ /* A phone that decided to grow the host's labels would push them off a rail
823
+ whose thickness is stated in \`theme.css\`. */
824
+ -webkit-text-size-adjust: 100%;
825
+ font: 400 14px/1.5 var(--gb-font);
826
+ color: var(--gb-fg);
827
+ }
828
+
829
+ /**
830
+ * The chrome layer, drawn.
831
+ *
832
+ * The arrangement of the rail, the sheet, the veil between them and everything
833
+ * inside \u2014 shared by every DOM host, the same way \`chrome.ts\` shares the wiring
834
+ * that moves them. What is *not* here is what any of it is made of: the
835
+ * palette, the type and the sizes live beside this in \`theme.css\`, which every
836
+ * host also renders. The split is between a bug that breaks a layout and a bug
837
+ * that makes two hosts look like two products \u2014 not between what is shared and
838
+ * what is not, because both files are.
839
+ *
840
+ * Keyed entirely on \`body[data-mode]\`, \`body[data-sheet]\` and \`body[data-rail]\`,
841
+ * which \`createChrome\` writes. There is no second contract: a host that renders
842
+ * this stylesheet and runs that wiring gets the arrangement, and one that
843
+ * invents its own attributes gets nothing.
844
+ *
845
+ * ## Three arrangements
846
+ *
847
+ * \`portrait\` is a bar across the bottom and a sheet that comes up from it with
848
+ * two detents. \`landscape\` is that bar stood on its end down the right and a
849
+ * sheet that slides in from it. \`desktop\` is a rail that is a corner until a
850
+ * pointer goes near it, and a panel that sits beside the game. They are three
851
+ * pieces of furniture rather than three sizes of one, which is why each has its
852
+ * own block below rather than a shared block with three sets of overrides.
853
+ *
854
+ * ## The stack
855
+ *
856
+ * scrim 2 \xB7 title 3 \xB7 rail 4 \xB7 trigger 5 \xB7 sheet 6 \xB7 notice 7 \xB7 playback 8.
857
+ * The sheet is above the rail in every mode: an open sheet covers the rail it
858
+ * came out of, because it carries its own way back \u2014 a tab bar, a handle, the
859
+ * scrim and Escape \u2014 and a rail poking out from under a panel is a second set
860
+ * of controls competing with the first.
861
+ *
862
+ * ## What a host defines
863
+ *
864
+ * \`--gb-anchor\`, and nothing else: \`fixed\` for a host that is the window, and
865
+ * \`absolute\` for one drawing inside a box of its own.
866
+ */
867
+
868
+ /* ---------------------------------------------------------------- the page */
869
+
870
+ body {
871
+ /*
872
+ * What the host has taken along each edge, for everything that has to keep
873
+ * clear of it without measuring it. Derived from the one \`data-mode\` the rail
874
+ * itself reads, so there is one fact here rather than two.
875
+ */
876
+ --gb-taken-right: 0px;
877
+ --gb-taken-bottom: 0px;
878
+
879
+ /*
880
+ * Where the sheet is when it is shut, which is the direction it slides in
881
+ * from. Held on the body rather than on the sheet so that the mode that
882
+ * decides it and the open state that cancels it are not two selectors of the
883
+ * same weight fighting over one property.
884
+ */
885
+ --gb-park: translateX(101%);
886
+ }
887
+
888
+ body[data-mode='portrait'] {
889
+ --gb-taken-bottom: calc(var(--gb-rail) + env(safe-area-inset-bottom, 0px));
890
+ --gb-park: translateY(101%);
891
+ }
892
+
893
+ body[data-mode='landscape'] {
894
+ --gb-taken-right: calc(var(--gb-rail) + env(safe-area-inset-right, 0px));
895
+ }
896
+
897
+ /* The desktop rail is a corner most of the time, so what a game permanently
898
+ pays for is that corner rather than a strip down the whole side. */
899
+ body[data-mode='desktop'] {
900
+ --gb-taken-right: var(--gb-rail-fine);
901
+ }
902
+
903
+ /* ------------------------------------------------------------------- scrim */
904
+
905
+ /*
906
+ * What makes the sheet read as over the game rather than beside it, and the
907
+ * most obvious way anybody ever puts a sheet away.
908
+ *
909
+ * Two jobs, and only one of them is the dimming. The other is catching the
910
+ * press: an open sheet is modal, so while it is up the host has the input and
911
+ * the game does not get a stray click meant for a panel. That half matters most
912
+ * exactly where the dimming is wrong \u2014 see the desktop rule below.
913
+ */
914
+ .gb-scrim {
915
+ position: var(--gb-anchor, fixed);
916
+ inset: 0;
917
+ z-index: 2;
918
+ background: var(--gb-veil);
919
+ opacity: 0;
920
+ pointer-events: none;
921
+ transition: opacity var(--gb-sliding) ease;
922
+ }
923
+
924
+ body[data-sheet='open'] .gb-scrim {
925
+ opacity: 0.5;
926
+ pointer-events: auto;
927
+ }
928
+
929
+ /*
930
+ * On a desktop the panel sits *beside* the game rather than over it, so there
931
+ * is nothing to veil: dimming a game somebody is still watching while they read
932
+ * a leaderboard next to it would be the host turning the lights off.
933
+ *
934
+ * **Undimmed, not absent.** It used to be \`display: none\`, and what went with
935
+ * the dimming was the catching: a press on the game was delivered inside a
936
+ * frame on an opaque origin and never reached this document at all, so the only
937
+ * evidence the host ever had was the window losing focus \u2014 which it can only
938
+ * lose if it had it. A sheet whose first press went to the game was a sheet
939
+ * that could not be closed by pressing the game. Invisible and still there is
940
+ * both halves: the lights stay on, the press arrives, and the sheet goes.
941
+ */
942
+ body[data-mode='desktop'] .gb-scrim {
943
+ background: none;
944
+ backdrop-filter: none;
945
+ }
946
+
947
+ /* -------------------------------------------------------- the booting game */
948
+
949
+ /* Over a game until it says it is ready \u2014 see \`boot.ts\`. Not the scrim above,
950
+ which is between the sheet and a game somebody is already playing. Absolute rather than
951
+ \`--gb-anchor\`'d, because this one is pinned to the game's own box rather than
952
+ to the host's surface: a site with three of them in flight has one per slot,
953
+ and a dev shell has one over its simulated device. Whoever appends it owns a
954
+ positioned box to append it to. */
955
+ .gb-boot {
956
+ position: absolute;
957
+ inset: 0;
958
+ z-index: 1;
959
+ display: grid;
960
+ place-items: center;
961
+ background: var(--gb-bg);
962
+ transition: opacity 120ms linear;
963
+ }
964
+
965
+ .gb-boot[hidden] {
966
+ display: none;
967
+ }
968
+
969
+ .gb-boot-spinner {
970
+ width: 18px;
971
+ height: 18px;
972
+ border: 2px solid color-mix(in srgb, var(--gb-accent) 30%, transparent);
973
+ border-top-color: var(--gb-accent);
974
+ border-radius: 50%;
975
+ animation: gb-boot-spin 700ms linear infinite;
976
+ }
977
+
978
+ @keyframes gb-boot-spin {
979
+ to {
980
+ transform: rotate(1turn);
981
+ }
982
+ }
983
+
984
+ /* Slowed rather than stopped: a spinner that does not move is a page that has
985
+ hung, which is the opposite of what it is there to say. */
986
+ @media (prefers-reduced-motion: reduce) {
987
+ .gb-boot-spinner {
988
+ animation-duration: 2.4s;
989
+ }
990
+ }
991
+
992
+ /* -------------------------------------------------------------------- rail */
993
+
994
+ .gb-rail {
995
+ position: var(--gb-anchor, fixed);
996
+ z-index: 4;
997
+ display: flex;
998
+ align-items: center;
999
+ /*
1000
+ * The rail is a gesture surface and the browser gets no say in what a drag
1001
+ * along it means: \`pan-x\` on a bottom bar would hand the travel gesture to a
1002
+ * scroll with nowhere to go, and the drag would arrive as one move and a
1003
+ * cancel. Nothing on the rail scrolls, so nothing is lost. The selection is
1004
+ * the same fact from the other side \u2014 a drag along a row of controls must not
1005
+ * paint them blue.
1006
+ */
1007
+ touch-action: none;
1008
+ user-select: none;
1009
+ -webkit-user-select: none;
1010
+ }
1011
+
1012
+ .gb-rail-group {
1013
+ display: flex;
1014
+ align-items: center;
1015
+ gap: 2px;
1016
+ flex: none;
1017
+ }
1018
+
1019
+ /* A bar across the bottom of a device held upright, under the thumb. Two lines
1020
+ where it faces the game: the light border draws the edge over a dark game,
1021
+ and the dark one just inside draws the same edge over a bright one. Inset, so
1022
+ what is drawn is exactly the rectangle the game was told about. */
1023
+ .gb-rail[data-mode='portrait'] {
1024
+ left: 0;
1025
+ right: 0;
1026
+ bottom: 0;
1027
+ height: calc(var(--gb-rail) + env(safe-area-inset-bottom, 0px));
1028
+ padding: 0 var(--gb-pad) env(safe-area-inset-bottom, 0px);
1029
+ justify-content: space-between;
1030
+ cursor: grab;
1031
+ border-top: 1px solid var(--gb-line-4);
1032
+ box-shadow: inset 0 1px 0 0 oklch(0 0 0 / 0.5);
1033
+ /* Transparent until it has something to say, and then only just: the bar is
1034
+ furniture over a game, and a permanent band of host along the bottom of
1035
+ every game is a band of game nobody gets to see. */
1036
+ background: oklch(0.13 0.008 265 / 0);
1037
+ transition: background 450ms ease;
1038
+ }
1039
+
1040
+ /* The same bar stood on its end. */
1041
+ .gb-rail[data-mode='landscape'] {
1042
+ top: 0;
1043
+ right: 0;
1044
+ bottom: 0;
1045
+ width: calc(var(--gb-rail) + env(safe-area-inset-right, 0px));
1046
+ padding: var(--gb-pad) env(safe-area-inset-right, 0px) var(--gb-pad) 0;
1047
+ flex-direction: column;
1048
+ justify-content: space-between;
1049
+ cursor: grab;
1050
+ border-left: 1px solid var(--gb-line-4);
1051
+ box-shadow: inset 1px 0 0 0 oklch(0 0 0 / 0.5);
1052
+ background: oklch(0.13 0.008 265 / 0);
1053
+ transition: background 450ms ease;
1054
+ }
1055
+
1056
+ .gb-rail[data-mode='landscape'] .gb-rail-group {
1057
+ flex-direction: column;
1058
+ }
1059
+
1060
+ /*
1061
+ * The desktop rail: a 56px corner at rest, the full height of the window while
1062
+ * a pointer is on it, the sheet is holding it out, or the player has pinned it.
1063
+ *
1064
+ * The two states are one element at two heights rather than two elements,
1065
+ * because the logo trigger has to stay exactly where it is through the whole
1066
+ * movement \u2014 it is a layer of its own, and the rail slides out from underneath
1067
+ * it. That stillness is the entire reason the expansion reads as a panel
1068
+ * arriving rather than as the corner jumping.
1069
+ */
1070
+ .gb-rail[data-mode='desktop'] {
1071
+ right: 0;
1072
+ bottom: 27px;
1073
+ width: var(--gb-rail-fine);
1074
+ height: var(--gb-rail-fine);
1075
+ flex-direction: column;
1076
+ justify-content: center;
1077
+ padding: 0;
1078
+ cursor: default;
1079
+ background: var(--gb-glass-soft);
1080
+ backdrop-filter: blur(6px);
1081
+ border-radius: 12px 0 0 12px;
1082
+ transition:
1083
+ height var(--gb-sliding) var(--gb-spatial),
1084
+ bottom var(--gb-sliding) var(--gb-spatial),
1085
+ background var(--gb-sliding) ease,
1086
+ border-radius var(--gb-sliding) ease,
1087
+ padding var(--gb-sliding) ease;
1088
+ }
1089
+
1090
+ .gb-rail[data-mode='desktop'][data-out='true'] {
1091
+ bottom: 0;
1092
+ height: 100%;
1093
+ justify-content: space-between;
1094
+ padding: 7px 0;
1095
+ background: var(--gb-glass-firm);
1096
+ border-left: 1px solid var(--gb-line-3);
1097
+ border-radius: 0;
1098
+ }
1099
+
1100
+ /* Nothing on the rail exists until it is out: the corner is the trigger and
1101
+ three dots, and a row of half-visible controls behind them would be a corner
1102
+ that looks broken rather than closed. */
1103
+ .gb-rail[data-mode='desktop'] .gb-rail-group {
1104
+ flex-direction: column;
1105
+ gap: 7px;
1106
+ display: none;
1107
+ }
1108
+
1109
+ .gb-rail[data-mode='desktop'][data-out='true'] .gb-rail-group {
1110
+ display: flex;
1111
+ }
1112
+
1113
+ /* A mouse is doing the aiming here, so every control on the rail is the
1114
+ design's 30px square with a 17px drawing in it rather than the 44px one a
1115
+ thumb needs. One rule rather than a second set of controls: which surface a
1116
+ control is on is the stylesheet's business. */
1117
+ .gb-rail[data-mode='desktop'] .gb-button {
1118
+ width: 30px;
1119
+ height: 30px;
1120
+ }
1121
+
1122
+ .gb-rail[data-mode='desktop'] .gb-button .gb-icon {
1123
+ width: 17px;
1124
+ height: 17px;
1125
+ }
1126
+
1127
+ /*
1128
+ * A 30px drawing with the whole rail's worth of target around it.
1129
+ *
1130
+ * The rail is a switch as well as a shelf \u2014 a press on it that is not on a
1131
+ * control opens the sheet \u2014 so every pixel of it that is *nearly* a button is a
1132
+ * press that does the other thing. Aiming at "next game" and opening the panel
1133
+ * instead is the failure, and it happened on the 13px either side of a 30px
1134
+ * button in a 56px rail, on the 7px between one button and the next, and on the
1135
+ * 7px of padding under the last one.
1136
+ *
1137
+ * So the drawings keep the design's 30px square and the *targets* tile the
1138
+ * rail: each one claims half the gap above and below it, the full width, and \u2014
1139
+ * for the button at each end \u2014 the padding out to the rail's own edge. A
1140
+ * pseudo-element rather than a bigger button, because the 30px box is what the
1141
+ * spacing between the icons is made of and the geometry of the logo's hole depends
1142
+ * on it to the pixel. Presses on it arrive at the button, which is all a target
1143
+ * has to do.
1144
+ */
1145
+ .gb-rail[data-mode='desktop'][data-out='true'] .gb-rail-group .gb-button {
1146
+ position: relative;
1147
+ }
1148
+
1149
+ .gb-rail[data-mode='desktop'][data-out='true'] .gb-rail-group .gb-button::after {
1150
+ content: '';
1151
+ position: absolute;
1152
+ /* Half the group's 7px gap at each end, so two neighbours meet and leave
1153
+ nothing between them. */
1154
+ top: -4px;
1155
+ bottom: -3px;
1156
+ /* Out to both edges of the 56px rail from a 30px button centred in it. */
1157
+ left: calc((var(--gb-rail-fine) - 30px) / -2);
1158
+ right: calc((var(--gb-rail-fine) - 30px) / -2);
1159
+ }
1160
+
1161
+ /* And the outermost at each end reaches the rail's own edge, past the 7px of
1162
+ padding: the bottom of the screen is where a mouse aiming at the last control
1163
+ stops, and it should still be aiming at it when it gets there. */
1164
+ .gb-rail[data-mode='desktop'][data-out='true'] .gb-rail-group[data-end='lead'] > .gb-button:first-child::after {
1165
+ top: -7px;
1166
+ }
1167
+
1168
+ .gb-rail[data-mode='desktop'][data-out='true'] .gb-rail-group[data-end='trail'] > .gb-button:last-child::after {
1169
+ bottom: -7px;
1170
+ }
1171
+
1172
+ /*
1173
+ * A thumb's controls are 44px squares with an 18px drawing in them, and the
1174
+ * travel arrows are smaller squares with a *larger* glyph \u2014 34 and 20. That
1175
+ * inversion is the design's and it is deliberate: the arrows are affordances
1176
+ * saying which way the bar goes, so they read as big marks in small boxes,
1177
+ * while the controls beside them are things to hit.
1178
+ */
1179
+ .gb-rail .gb-button[data-size='touch'] .gb-icon {
1180
+ width: 18px;
1181
+ height: 18px;
1182
+ }
1183
+
1184
+ /*
1185
+ * The player: a silhouette over "Sign in" for somebody who has not, and their
1186
+ * face as the You tab draws it \u2014 their picture over the stripes, or the
1187
+ * stripes alone \u2014 over "You" once they have. The one control on the rail that
1188
+ * needs a picture and words both. Set in the controls' own ink with the glyphs' own shadow,
1189
+ * so it reads as one more control rather than as a banner, and as tall a
1190
+ * target as the buttons beside it \u2014 a little wider, because the words are.
1191
+ *
1192
+ * Against \`.gb-rail-group\` as well as its own class, so it outweighs the
1193
+ * desktop rail's rule that makes every control there a 30px square.
1194
+ */
1195
+ .gb-rail .gb-rail-group .gb-button.gb-rail-word {
1196
+ flex-direction: column;
1197
+ gap: 2px;
1198
+ width: auto;
1199
+ min-width: 44px;
1200
+ height: 44px;
1201
+ padding: 0 4px;
1202
+ }
1203
+
1204
+ .gb-rail-face {
1205
+ display: block;
1206
+ width: 18px;
1207
+ height: 18px;
1208
+ border-radius: 50%;
1209
+ overflow: hidden;
1210
+ }
1211
+
1212
+ .gb-rail-face img {
1213
+ display: block;
1214
+ width: 100%;
1215
+ height: 100%;
1216
+ object-fit: cover;
1217
+ }
1218
+
1219
+ .gb-rail[data-mode='desktop'] .gb-rail-face {
1220
+ width: 16px;
1221
+ height: 16px;
1222
+ }
1223
+
1224
+ .gb-rail-word-text {
1225
+ font: 600 10px/1 var(--gb-font);
1226
+ letter-spacing: 0.02em;
1227
+ white-space: nowrap;
1228
+ }
1229
+
1230
+ .gb-rail[data-mode='desktop'] .gb-rail-group .gb-button.gb-rail-word {
1231
+ min-width: 30px;
1232
+ height: 36px;
1233
+ padding: 0;
1234
+ }
1235
+
1236
+ .gb-rail-word[hidden] {
1237
+ display: none;
1238
+ }
1239
+
1240
+ /*
1241
+ * What the rail lights while it speaks up after a game has stopped: sign in,
1242
+ * share and like. A thick white glow fading in around the mark, which
1243
+ * itself keeps its ink \u2014 the glow is what says "this one", and a mark that
1244
+ * changed colour as well would be saying it twice.
1245
+ *
1246
+ * The same three shadows at rest, transparent, so the glow fades rather than
1247
+ * appears: a filter only animates between lists of the same functions.
1248
+ */
1249
+ .gb-rail .gb-rail-invite .gb-icon,
1250
+ .gb-rail .gb-rail-face,
1251
+ .gb-rail .gb-rail-word-text {
1252
+ filter: var(--gb-glyph) drop-shadow(0 0 2px transparent) drop-shadow(0 0 10px transparent);
1253
+ transition: filter 600ms ease;
1254
+ }
1255
+
1256
+ .gb-rail[data-nudge='true'] .gb-rail-invite .gb-icon,
1257
+ .gb-rail[data-nudge='true'] .gb-rail-invite .gb-rail-face,
1258
+ .gb-rail[data-nudge='true'] .gb-rail-invite .gb-rail-word-text {
1259
+ filter: var(--gb-glyph) drop-shadow(0 0 2px white) drop-shadow(0 0 10px white);
1260
+ }
1261
+
1262
+ /* And the strip itself a quarter less see-through while it does, so the glow
1263
+ has something to sit on over a busy game. */
1264
+ .gb-rail[data-nudge='true']:not([data-mode='desktop']) {
1265
+ background: oklch(0.13 0.008 265 / 0.25);
1266
+ }
1267
+
1268
+ .gb-rail[data-mode='desktop'][data-nudge='true'] {
1269
+ background: oklch(0.15 0.008 265 / 0.66);
1270
+ }
1271
+
1272
+ /* The logo's place in the strip, wherever the host put it in its own order. */
1273
+ .gb-rail-slot {
1274
+ display: flex;
1275
+ align-items: center;
1276
+ justify-content: center;
1277
+ flex: none;
1278
+ }
1279
+
1280
+ /*
1281
+ * On a desktop it holds nothing: the trigger is a layer over the rail and this
1282
+ * is the hole it is drawn in. 30 \xD7 22 with the group's 7px gaps either side is
1283
+ * what puts that hole exactly where the floating logo is \u2014 7px of rail padding, the
1284
+ * 30px pin and one gap below it leaves this spanning 44px to 66px off the
1285
+ * bottom, whose centre is the trigger's own. Get this wrong and the rail
1286
+ * appears to jump as it grows, which is the one thing the split exists to
1287
+ * prevent.
1288
+ */
1289
+ .gb-rail[data-mode='desktop'] .gb-rail-slot {
1290
+ width: 30px;
1291
+ height: 22px;
1292
+ }
1293
+
1294
+ /* The footprint a game pays for whatever the pointer is doing \u2014 the corner the
1295
+ collapsed rail occupies. Measured by \`rail.restMeasure()\` rather than
1296
+ restated in TypeScript, which is why it is an element at all. */
1297
+ .gb-rail-rest {
1298
+ position: var(--gb-anchor, fixed);
1299
+ right: 0;
1300
+ bottom: 27px;
1301
+ width: var(--gb-rail-fine);
1302
+ height: var(--gb-rail-fine);
1303
+ pointer-events: none;
1304
+ visibility: hidden;
1305
+ }
1306
+
1307
+ body:not([data-mode='desktop']) .gb-rail-rest {
1308
+ display: none;
1309
+ }
1310
+
1311
+ /* ----------------------------------------------------------- the logo trigger */
1312
+
1313
+ /*
1314
+ * On a desktop it is its own layer over the rail and never moves.
1315
+ *
1316
+ * Written against \`.gb-button\` as well as its own class on purpose: without it
1317
+ * this rule and \`.gb-button[data-size='touch']\` weigh the same and the later
1318
+ * one in this file wins, which drew the logo as a 44px square anchored to the
1319
+ * right edge \u2014 six pixels off the axis every other control on the rail sits on,
1320
+ * and five pixels above the centre of the corner it is supposed to be the face
1321
+ * of. The one control that must not move was the one that was in the wrong
1322
+ * place.
1323
+ */
1324
+ .gb-button.gb-rail-trigger[data-mode='desktop'] {
1325
+ position: var(--gb-anchor, fixed);
1326
+ right: 0;
1327
+ bottom: 38px;
1328
+ z-index: 5;
1329
+ width: var(--gb-rail-fine);
1330
+ height: 34px;
1331
+ border-radius: 0;
1332
+ }
1333
+
1334
+ /*
1335
+ * And nowhere at all in the other two.
1336
+ *
1337
+ * The design has no logo on a phone: the bar *is* the control \u2014 a tap anywhere
1338
+ * along it opens the sheet \u2014 and a button drawn on top of a surface that is
1339
+ * already the button is one affordance too many on the smallest screen there
1340
+ * is. It stays in the markup because a bar is not something a keyboard can
1341
+ * press or a screen reader can announce, and it comes back the moment it is
1342
+ * focused, which is the only time anybody reaching for it can see it.
1343
+ *
1344
+ * Out of the flow rather than merely narrow, so it takes no room along either
1345
+ * axis and no gap beside it: a slot that was only zero wide still stood a
1346
+ * button tall in the rail down the side, a hole between the fullscreen button
1347
+ * and the arrow under it.
1348
+ */
1349
+ .gb-rail:not([data-mode='desktop']) .gb-rail-slot {
1350
+ position: absolute;
1351
+ width: 0;
1352
+ height: 0;
1353
+ overflow: hidden;
1354
+ }
1355
+
1356
+ .gb-rail:not([data-mode='desktop']) .gb-rail-trigger {
1357
+ width: 0;
1358
+ opacity: 0;
1359
+ pointer-events: none;
1360
+ }
1361
+
1362
+ .gb-rail:not([data-mode='desktop']) .gb-rail-slot:focus-within {
1363
+ position: static;
1364
+ width: auto;
1365
+ height: auto;
1366
+ overflow: visible;
1367
+ }
1368
+
1369
+ .gb-rail:not([data-mode='desktop']) .gb-rail-trigger:focus-visible {
1370
+ width: 44px;
1371
+ opacity: 1;
1372
+ pointer-events: auto;
1373
+ }
1374
+
1375
+ .gb-rail-trigger .gb-logo {
1376
+ width: 22px;
1377
+ height: 22px;
1378
+ }
1379
+
1380
+ /*
1381
+ * The logo's dots, painted through \`logo.svg\` as a mask. On a pseudo-element
1382
+ * so the glyph shadow below, which is a filter on the mark itself, lands
1383
+ * around the dots rather than being masked away with everything else.
1384
+ */
1385
+ .gb-logo {
1386
+ display: inline-block;
1387
+ }
1388
+
1389
+ .gb-logo::before {
1390
+ content: '';
1391
+ display: block;
1392
+ width: 100%;
1393
+ height: 100%;
1394
+ background: var(--gb-logo-fg);
1395
+ mask: var(--gb-logo-mark) center / contain no-repeat;
1396
+ }
1397
+
1398
+ /* ------------------------------------------------------- toast, and a hint */
1399
+
1400
+ /*
1401
+ * One line that appeared without anybody asking for it.
1402
+ *
1403
+ * The same pill in all three arrangements, clear of whatever the rail has taken
1404
+ * along the right-hand edge. It used to be inline down the middle of the
1405
+ * portrait bar \u2014 see \`toast.ts\` for why the news a game makes does not belong
1406
+ * in the strip a thumb travels with.
1407
+ */
1408
+ .gb-toast {
1409
+ position: var(--gb-anchor, fixed);
1410
+ z-index: 7;
1411
+ top: calc(22px + env(safe-area-inset-top, 0px));
1412
+ right: calc(var(--gb-taken-right) + 12px);
1413
+ display: flex;
1414
+ align-items: center;
1415
+ gap: 9px;
1416
+ max-width: min(360px, calc(100% - var(--gb-taken-right) - 44px));
1417
+ padding: 9px 14px;
1418
+ border-radius: var(--gb-round-pill);
1419
+ background: var(--gb-toast);
1420
+ border: 1px solid var(--gb-line-3);
1421
+ backdrop-filter: var(--gb-blur);
1422
+ font-size: 13px;
1423
+ font-weight: 500;
1424
+ white-space: nowrap;
1425
+ overflow: hidden;
1426
+ text-overflow: ellipsis;
1427
+ /* Never takes a press: it arrives unasked over a game somebody is playing. */
1428
+ pointer-events: none;
1429
+ opacity: 0;
1430
+ transform: translateX(10px);
1431
+ transition:
1432
+ opacity 280ms ease,
1433
+ transform 280ms ease;
1434
+ }
1435
+
1436
+ .gb-toast[data-shown='true'] {
1437
+ opacity: 1;
1438
+ transform: none;
1439
+ }
1440
+
1441
+ /* The dot is the whole of the decoration: an accent full stop in front of the
1442
+ line, drawn rather than shipped. */
1443
+ .gb-toast::before {
1444
+ content: '';
1445
+ flex: none;
1446
+ width: 7px;
1447
+ height: 7px;
1448
+ border-radius: 50%;
1449
+ background: var(--gb-accent);
1450
+ }
1451
+
1452
+ /* An achievement's own picture in place of the dot, in the badge its row in the
1453
+ list is drawn in once it is earned. Drawn from the attribute rather than put
1454
+ in the text, so what a screen reader is told is still just the line; the
1455
+ empty alternative after the slash keeps it out of the announcement. */
1456
+ .gb-toast[data-icon] {
1457
+ padding-left: 6px;
1458
+ }
1459
+
1460
+ .gb-toast[data-icon]::before {
1461
+ content: attr(data-icon);
1462
+ content: attr(data-icon) / '';
1463
+ width: 26px;
1464
+ height: 26px;
1465
+ display: flex;
1466
+ align-items: center;
1467
+ justify-content: center;
1468
+ box-sizing: border-box;
1469
+ border: 1px solid var(--gb-accent-edge);
1470
+ border-radius: 50%;
1471
+ background: var(--gb-accent-tint);
1472
+ color: var(--gb-accent);
1473
+ font-size: 14px;
1474
+ line-height: 1;
1475
+ }
1476
+
1477
+ /* Nothing at all while there is nothing to read, rather than an empty pill. */
1478
+ .gb-toast:empty {
1479
+ display: none;
1480
+ }
1481
+
1482
+ /* One line of advice, bottom left, while there is a rail out and nothing over
1483
+ it. Only on a desktop: it describes the keyboard and the pointer, which are
1484
+ the two things the other arrangements do not have. */
1485
+ .gb-rail-hint {
1486
+ position: var(--gb-anchor, fixed);
1487
+ left: 22px;
1488
+ bottom: 18px;
1489
+ z-index: 3;
1490
+ margin: 0;
1491
+ font-family: var(--gb-font-mono);
1492
+ font-size: 11px;
1493
+ letter-spacing: 0.06em;
1494
+ color: oklch(0.98 0 0 / 0.45);
1495
+ pointer-events: none;
1496
+ transition: opacity 250ms ease;
1497
+ }
1498
+
1499
+ .gb-rail-hint[hidden],
1500
+ .gb-rail-hint[data-has='false'] {
1501
+ display: none;
1502
+ }
1503
+
1504
+ /* ---------------------------------------------------------------- controls */
1505
+
1506
+ .gb-button {
1507
+ appearance: none;
1508
+ display: flex;
1509
+ align-items: center;
1510
+ justify-content: center;
1511
+ flex: none;
1512
+ padding: 0;
1513
+ background: none;
1514
+ border: 0;
1515
+ border-radius: 8px;
1516
+ color: oklch(0.98 0 0 / 0.6);
1517
+ font: inherit;
1518
+ cursor: pointer;
1519
+ transition:
1520
+ color var(--gb-quick) ease,
1521
+ background var(--gb-quick) ease;
1522
+ }
1523
+
1524
+ .gb-button[data-size='touch'] {
1525
+ width: 44px;
1526
+ height: 44px;
1527
+ }
1528
+
1529
+ .gb-button[data-size='hint'] {
1530
+ width: 34px;
1531
+ height: 34px;
1532
+ }
1533
+
1534
+ .gb-button[data-size='fine'] {
1535
+ width: 30px;
1536
+ height: 30px;
1537
+ }
1538
+
1539
+ .gb-button:hover:not(:disabled),
1540
+ .gb-button[aria-pressed='true'] {
1541
+ color: oklch(0.98 0 0 / 0.92);
1542
+ }
1543
+
1544
+ .gb-button:disabled {
1545
+ opacity: 0.35;
1546
+ cursor: default;
1547
+ }
1548
+
1549
+ .gb-button:focus-visible {
1550
+ outline: 2px solid var(--gb-accent);
1551
+ outline-offset: 2px;
1552
+ }
1553
+
1554
+ /* The trigger stays lit while the sheet it opens is. */
1555
+ .gb-button[aria-expanded='true'] {
1556
+ color: var(--gb-accent);
1557
+ }
1558
+
1559
+ /*
1560
+ * A glyph that survives whatever the game draws behind it: its own soft
1561
+ * shadow, so the contrast belongs to the symbol rather than to the background
1562
+ * it happens to be over. Only out here \u2014 inside the sheet there is a known
1563
+ * surface underneath, and a shadow on every icon there would be grime.
1564
+ */
1565
+ .gb-rail .gb-icon,
1566
+ .gb-playback .gb-icon,
1567
+ .gb-rail-trigger .gb-logo {
1568
+ filter: var(--gb-glyph);
1569
+ }
1570
+
1571
+ .gb-sr-only {
1572
+ position: absolute;
1573
+ width: 1px;
1574
+ height: 1px;
1575
+ padding: 0;
1576
+ margin: -1px;
1577
+ overflow: hidden;
1578
+ clip-path: inset(50%);
1579
+ white-space: nowrap;
1580
+ }
1581
+
1582
+ /* ------------------------------------------------------------------- sheet */
1583
+
1584
+ .gb-sheet {
1585
+ position: var(--gb-anchor, fixed);
1586
+ z-index: 6;
1587
+ display: flex;
1588
+ flex-direction: column;
1589
+ overflow: hidden;
1590
+ background: var(--gb-surface);
1591
+ backdrop-filter: var(--gb-blur-sheet);
1592
+ border: 1px solid var(--gb-line-2);
1593
+ /*
1594
+ * Shut is off the edge it is docked to, not \`display: none\`: there is no
1595
+ * sliding out of a box that does not exist. \`visibility\` transitions in one
1596
+ * discrete step that lands at the end, so the sheet stays visible for the
1597
+ * whole of its way out and appears at the start of its way in \u2014 which is what
1598
+ * lets something that is \`visibility: hidden\` at rest slide at all. It also
1599
+ * does the rest of what \`hidden\` did: nothing inside a shut sheet can be read
1600
+ * out or tabbed to.
1601
+ */
1602
+ visibility: hidden;
1603
+ transform: var(--gb-park);
1604
+ transition:
1605
+ transform var(--gb-settle) var(--gb-spatial),
1606
+ height var(--gb-settle) var(--gb-spatial),
1607
+ visibility var(--gb-settle),
1608
+ box-shadow var(--gb-sliding) ease;
1609
+ }
1610
+
1611
+ .gb-sheet[data-open='true'] {
1612
+ visibility: visible;
1613
+ transform: translateX(var(--gb-sheet-off, 0px));
1614
+ box-shadow: 0 0 90px 12px oklch(0.06 0.01 265 / 0.6);
1615
+ }
1616
+
1617
+ /* Under a finger the sheet is wherever the finger is: the height and the offset
1618
+ are written frame by frame from \`sheet-drag.ts\`, and a transition on either
1619
+ would put the sheet a fifth of a second behind the thumb pushing it. It comes
1620
+ back the moment the drag ends, which is what animates the rest of the way out
1621
+ \u2014 or the snap back. */
1622
+ .gb-sheet[data-dragging='true'] {
1623
+ transition: none;
1624
+ }
1625
+
1626
+ /* A bottom sheet, the full width, with a height that is whatever the detent or
1627
+ the finger says. */
1628
+ .gb-sheet[data-mode='portrait'] {
1629
+ left: 0;
1630
+ right: 0;
1631
+ bottom: 0;
1632
+ height: var(--gb-sheet-now, 72dvh);
1633
+ border-radius: var(--gb-round-sheet) var(--gb-round-sheet) 0 0;
1634
+ border-bottom: 0;
1635
+ }
1636
+
1637
+ .gb-sheet[data-mode='portrait'][data-open='true'] {
1638
+ transform: translateY(0);
1639
+ }
1640
+
1641
+ /* A side sheet: the whole height, a width that never takes the majority of a
1642
+ small screen. */
1643
+ .gb-sheet[data-mode='landscape'] {
1644
+ top: 0;
1645
+ bottom: 0;
1646
+ right: 0;
1647
+ width: var(--gb-sheet-w);
1648
+ border-right: 0;
1649
+ }
1650
+
1651
+ .gb-sheet[data-mode='desktop'] {
1652
+ top: 0;
1653
+ bottom: 0;
1654
+ right: 0;
1655
+ width: var(--gb-sheet-w-fine);
1656
+ border-right: 0;
1657
+ }
1658
+
1659
+ @media (prefers-reduced-motion: reduce) {
1660
+ .gb-sheet,
1661
+ .gb-scrim,
1662
+ .gb-rail,
1663
+ .gb-title,
1664
+ .gb-playback {
1665
+ transition: none;
1666
+ }
1667
+ }
1668
+
1669
+ /* Something to hold, and only on the sheet you can throw away downwards. A bar
1670
+ across the top of a panel docked to the side is a handle pointing the wrong
1671
+ way, and that sheet is pushed sideways. */
1672
+ .gb-sheet-grab {
1673
+ flex: none;
1674
+ height: 28px;
1675
+ display: grid;
1676
+ place-items: center;
1677
+ cursor: grab;
1678
+ touch-action: none;
1679
+ }
1680
+
1681
+ .gb-sheet:not([data-mode='portrait']) .gb-sheet-grab {
1682
+ display: none;
1683
+ }
1684
+
1685
+ .gb-sheet-grip {
1686
+ width: 44px;
1687
+ height: 4px;
1688
+ border-radius: 2px;
1689
+ background: oklch(0.98 0 0 / 0.3);
1690
+ transition:
1691
+ width var(--gb-quick) ease,
1692
+ background var(--gb-quick) ease;
1693
+ }
1694
+
1695
+ /* Wider and brighter under a finger: the handle acknowledging the hand, which
1696
+ is the only feedback a drag that has not moved anything yet can give. */
1697
+ .gb-sheet[data-dragging='true'] .gb-sheet-grip {
1698
+ width: 52px;
1699
+ background: oklch(0.98 0 0 / 0.55);
1700
+ }
1701
+
1702
+ /* What stays in sight over the body: nothing, until what is showing puts
1703
+ something there. As far in from the sides as the body. */
1704
+ .gb-sheet-head {
1705
+ flex: none;
1706
+ padding: 0 var(--gb-pad-sheet);
1707
+ }
1708
+
1709
+ .gb-sheet-body {
1710
+ flex: 1;
1711
+ min-height: 0;
1712
+ overflow-y: auto;
1713
+ overflow-x: hidden;
1714
+ overscroll-behavior: contain;
1715
+ display: flex;
1716
+ flex-direction: column;
1717
+ gap: 22px;
1718
+ padding: 20px var(--gb-pad-sheet) 14px;
1719
+ }
1720
+
1721
+ /*
1722
+ * In portrait we drive the scrolling ourselves, so the browser must not also
1723
+ * pan the list: \`touch-action: none\` on an ancestor does *not* stop a
1724
+ * descendant scroll container from panning natively, and when it does the
1725
+ * browser takes the gesture and cancels our pointer stream mid-drag. Every
1726
+ * scroller inside the sheet has to opt out itself, which is what \`.gb-scroll\`
1727
+ * is for \u2014 a class rather than a computed-style walk, so the set of things that
1728
+ * scroll is something somebody declares. The sheet's own body carries it too:
1729
+ * it is a scroller like any other, and the drag finds it the same way.
1730
+ */
1731
+ .gb-sheet[data-mode='portrait'] .gb-scroll {
1732
+ touch-action: none;
1733
+ }
1734
+
1735
+ .gb-scroll {
1736
+ overflow-y: auto;
1737
+ overscroll-behavior: contain;
1738
+ }
1739
+
1740
+ .gb-sheet-section {
1741
+ display: flex;
1742
+ flex-direction: column;
1743
+ gap: 20px;
1744
+ }
1745
+
1746
+ /* The tab bar, pinned under the body and never scrolling. */
1747
+ .gb-sheet-foot {
1748
+ flex: none;
1749
+ }
1750
+
1751
+ /* ------------------------------------------------------------- controller */
1752
+
1753
+ /*
1754
+ * A controller in hand: \`dom/pad.ts\` marks the body while one is what somebody
1755
+ * is using, and clears it at the next real key or pointer.
1756
+ *
1757
+ * The ring is drawn on whatever has focus, not only on what the browser thinks
1758
+ * is \`:focus-visible\`: a pad is neither a keyboard nor a pointer to a browser,
1759
+ * and its guess about focus moved by a script is made on what came before \u2014 a
1760
+ * click a minute ago, and no ring at all.
1761
+ *
1762
+ * \`!important\` on the style alone, and only because nothing else reaches: the
1763
+ * panel's compiled styles are scoped at the specificity of three ids, and each
1764
+ * of its controls says \`outline-style: none\` until \`:focus-visible\`. The
1765
+ * colour, width and offset are left to lose to theirs, which are the same.
1766
+ */
1767
+ body[data-pad='on'] :is(.gb-sheet, .gb-rail, .gb-rail-trigger, .gb-title, .gb-playback) :focus:not(.gb-sheet) {
1768
+ outline-style: solid !important;
1769
+ outline-width: 2px;
1770
+ outline-color: var(--gb-accent);
1771
+ outline-offset: 2px;
1772
+ }
1773
+
1774
+ /* What the buttons do, under the tab bar, only while a pad is in hand. */
1775
+ .gb-padhint {
1776
+ display: none;
1777
+ flex: none;
1778
+ flex-wrap: wrap;
1779
+ justify-content: center;
1780
+ gap: 4px 14px;
1781
+ padding: 6px var(--gb-pad-sheet) 10px;
1782
+ font: 500 10.5px/1.4 var(--gb-font-mono);
1783
+ letter-spacing: 0.04em;
1784
+ text-transform: uppercase;
1785
+ color: var(--gb-dim);
1786
+ }
1787
+
1788
+ body[data-pad='on'] .gb-padhint {
1789
+ display: flex;
1790
+ }
1791
+
1792
+ .gb-padhint-item {
1793
+ display: inline-flex;
1794
+ align-items: center;
1795
+ gap: 5px;
1796
+ }
1797
+
1798
+ .gb-padhint-key {
1799
+ min-width: 18px;
1800
+ padding: 1px 4px;
1801
+ border: 1px solid var(--gb-line-2);
1802
+ border-radius: 5px;
1803
+ text-align: center;
1804
+ color: var(--gb-fg-2);
1805
+ }
1806
+
1807
+ /* ------------------------------------------------------------------- title */
1808
+
1809
+ /*
1810
+ * The game's name, over the game rather than inside the sheet, riding on top of
1811
+ * it as it is dragged.
1812
+ *
1813
+ * Only while the sheet is open: a title permanently stamped over a game is a
1814
+ * host that will not get out of the way, and one that arrives with the sheet is
1815
+ * the host answering the question the sheet was opened to ask.
1816
+ *
1817
+ * Shut, it is \`visibility: hidden\` as well as transparent, the same way the
1818
+ * sheet is: the creator line under the name takes presses, and an invisible
1819
+ * button over a game is a patch of screen the game silently stops answering.
1820
+ * \`visibility\` is the one property a descendant's \`pointer-events: auto\` cannot
1821
+ * reach past, and it takes the button out of the tab order with it. The 340ms
1822
+ * is the fade's delay plus its length, so it goes out after the fade does.
1823
+ */
1824
+ .gb-title {
1825
+ position: var(--gb-anchor, fixed);
1826
+ z-index: 3;
1827
+ display: flex;
1828
+ flex-direction: column;
1829
+ gap: 3px;
1830
+ align-items: flex-start;
1831
+ color: oklch(0.98 0 0);
1832
+ text-shadow: 0 1px 14px oklch(0.06 0.01 265 / 0.8);
1833
+ opacity: 0;
1834
+ visibility: hidden;
1835
+ transform: translateY(8px);
1836
+ pointer-events: none;
1837
+ transition:
1838
+ opacity 280ms ease 60ms,
1839
+ transform 280ms ease 60ms,
1840
+ visibility 340ms,
1841
+ bottom var(--gb-settle) var(--gb-spatial);
1842
+ }
1843
+
1844
+ body[data-sheet='open'] .gb-title {
1845
+ opacity: 1;
1846
+ visibility: visible;
1847
+ transform: none;
1848
+ }
1849
+
1850
+ /* While a finger is on the sheet the title is wherever the sheet is, so the
1851
+ easing has to go the same way the sheet's does. */
1852
+ .gb-sheet[data-dragging='true'] ~ .gb-title {
1853
+ transition:
1854
+ opacity 280ms ease 60ms,
1855
+ transform 280ms ease 60ms,
1856
+ visibility 340ms;
1857
+ }
1858
+
1859
+ body[data-mode='portrait'] .gb-title {
1860
+ left: var(--gb-pad-sheet);
1861
+ right: 118px;
1862
+ bottom: calc(var(--gb-sheet, 0px) + 16px);
1863
+ }
1864
+
1865
+ body:not([data-mode='portrait']) .gb-title {
1866
+ right: calc(var(--gb-sheet-w) + var(--gb-pad-sheet));
1867
+ bottom: 22px;
1868
+ max-width: 45vw;
1869
+ align-items: flex-end;
1870
+ text-align: right;
1871
+ }
1872
+
1873
+ body[data-mode='desktop'] .gb-title {
1874
+ right: calc(var(--gb-sheet-w-fine) + 24px);
1875
+ }
1876
+
1877
+ .gb-title-name {
1878
+ margin: 0;
1879
+ font-family: var(--gb-font-title);
1880
+ font-weight: 600;
1881
+ font-size: 38px;
1882
+ letter-spacing: -0.025em;
1883
+ line-height: 1.02;
1884
+ }
1885
+
1886
+ body[data-mode='landscape'] .gb-title-name {
1887
+ font-size: 34px;
1888
+ }
1889
+
1890
+ body[data-mode='desktop'] .gb-title-name {
1891
+ font-size: 52px;
1892
+ }
1893
+
1894
+ /* The one thing in the title block that answers a press. */
1895
+ .gb-title-sub {
1896
+ appearance: none;
1897
+ align-self: inherit;
1898
+ margin: 0;
1899
+ padding: 0;
1900
+ background: none;
1901
+ border: 0;
1902
+ font: inherit;
1903
+ font-size: 15px;
1904
+ color: oklch(0.98 0 0 / 0.72);
1905
+ cursor: pointer;
1906
+ pointer-events: auto;
1907
+ transition: color var(--gb-quick) ease;
1908
+ }
1909
+
1910
+ .gb-title-sub:hover:not(:disabled) {
1911
+ color: oklch(0.98 0 0);
1912
+ }
1913
+
1914
+ .gb-title-sub:disabled {
1915
+ cursor: default;
1916
+ pointer-events: none;
1917
+ }
1918
+
1919
+ .gb-title-sub[hidden] {
1920
+ display: none;
1921
+ }
1922
+
1923
+ .gb-title-note {
1924
+ margin: 4px 0 0;
1925
+ font-size: 13px;
1926
+ color: oklch(0.98 0 0 / 0.56);
1927
+ }
1928
+
1929
+ .gb-title-note[hidden] {
1930
+ display: none;
1931
+ }
1932
+
1933
+ /* ---------------------------------------------------------------- playback */
1934
+
1935
+ /* Pause and volume, over the game, beside the sheet, and only while the sheet
1936
+ is open. Both are things a player reaches for while something is happening \u2014
1937
+ see \`playback.ts\` \u2014 which is why they are out here rather than behind a tab.
1938
+ Hidden rather than only transparent while it is shut, for the reason the
1939
+ title is: the mixer under a fader left open would otherwise still answer. */
1940
+ .gb-playback {
1941
+ position: var(--gb-anchor, fixed);
1942
+ z-index: 8;
1943
+ display: flex;
1944
+ align-items: flex-start;
1945
+ gap: 12px;
1946
+ opacity: 0;
1947
+ visibility: hidden;
1948
+ pointer-events: none;
1949
+ transition:
1950
+ opacity 280ms ease 60ms,
1951
+ visibility 340ms,
1952
+ bottom var(--gb-settle) var(--gb-spatial);
1953
+ }
1954
+
1955
+ body[data-sheet='open'] .gb-playback {
1956
+ opacity: 1;
1957
+ visibility: visible;
1958
+ pointer-events: auto;
1959
+ }
1960
+
1961
+ body[data-mode='portrait'] .gb-playback {
1962
+ right: 20px;
1963
+ bottom: calc(var(--gb-sheet, 0px) + 16px);
1964
+ }
1965
+
1966
+ body:not([data-mode='portrait']) .gb-playback {
1967
+ right: calc(var(--gb-sheet-w) + var(--gb-pad-sheet));
1968
+ top: 16px;
1969
+ }
1970
+
1971
+ body[data-mode='desktop'] .gb-playback {
1972
+ right: calc(var(--gb-sheet-w-fine) + 24px);
1973
+ }
1974
+
1975
+ /* The glass both controls are made of. */
1976
+ .gb-playback-pause,
1977
+ .gb-volume-fader,
1978
+ .gb-volume-mixer,
1979
+ .gb-volume-readout {
1980
+ background: var(--gb-glass);
1981
+ border: 1px solid var(--gb-line-6);
1982
+ backdrop-filter: var(--gb-blur-glass);
1983
+ color: oklch(0.98 0 0 / 0.9);
1984
+ }
1985
+
1986
+ .gb-playback-pause {
1987
+ border-radius: 50%;
1988
+ }
1989
+
1990
+ .gb-playback-pause[hidden] {
1991
+ display: none;
1992
+ }
1993
+
1994
+ .gb-volume {
1995
+ position: relative;
1996
+ flex: none;
1997
+ width: 44px;
1998
+ height: 44px;
1999
+ }
2000
+
2001
+ /*
2002
+ * The bridge between the fader and the mixer button under it.
2003
+ *
2004
+ * The stack is a 44px square and everything in it is absolutely positioned out
2005
+ * of that box, so the only thing keeping a mouse "on" the control is whichever
2006
+ * child it happens to be over \u2014 and between the foot of the open track and the
2007
+ * top of the mixer there are eight pixels of neither. Crossing them fired
2008
+ * \`pointerleave\` on the stack, which shut the fader and took the mixer with it:
2009
+ * the one button under the fader was the one button you could not reach.
2010
+ *
2011
+ * A pseudo-element rather than a taller stack, because the stack's 44px square
2012
+ * is what puts the pill in the corner it belongs in; and behind its children,
2013
+ * so the mixer underneath still answers the press this is only here to let you
2014
+ * arrive at. Only while the fader is out, so a closed control is the 44px of
2015
+ * game it costs and not a column of it.
2016
+ */
2017
+ .gb-volume[data-open='true']::after {
2018
+ content: '';
2019
+ position: absolute;
2020
+ z-index: -1;
2021
+ left: 0;
2022
+ width: 44px;
2023
+ /* From the top of the pill to the foot of the mixer: 44 + 170 of track, and
2024
+ the 36px button that starts 8px under it. */
2025
+ top: 0;
2026
+ height: 214px;
2027
+ }
2028
+
2029
+ /*
2030
+ * A 44px pill that becomes a 170px fader downwards.
2031
+ *
2032
+ * The level is a fill rising from the bottom rather than a thumb on a line,
2033
+ * because the collapsed state has to read as a button and a thumb parked
2034
+ * halfway up a 44px square reads as a broken slider.
2035
+ */
2036
+ .gb-volume-fader {
2037
+ position: absolute;
2038
+ top: 0;
2039
+ left: 0;
2040
+ width: 44px;
2041
+ height: 44px;
2042
+ padding: 0;
2043
+ border-radius: 22px;
2044
+ overflow: hidden;
2045
+ cursor: pointer;
2046
+ touch-action: none;
2047
+ transition: height 220ms var(--gb-spatial);
2048
+ }
2049
+
2050
+ .gb-volume[data-open='true'] .gb-volume-fader {
2051
+ height: 170px;
2052
+ }
2053
+
2054
+ .gb-volume-fill {
2055
+ position: absolute;
2056
+ left: 0;
2057
+ right: 0;
2058
+ bottom: 0;
2059
+ height: calc(var(--gb-volume, 0) * 170px);
2060
+ background: var(--gb-accent);
2061
+ opacity: 0;
2062
+ transition: opacity var(--gb-quick) ease;
2063
+ }
2064
+
2065
+ .gb-volume[data-open='true'] .gb-volume-fill {
2066
+ opacity: 1;
2067
+ }
2068
+
2069
+ /* The speaker stays pinned to the top 44px whatever the fader is doing, so the
2070
+ control keeps one fixed thing to aim at. */
2071
+ .gb-volume-cap {
2072
+ position: absolute;
2073
+ top: 0;
2074
+ left: 0;
2075
+ right: 0;
2076
+ height: 44px;
2077
+ display: grid;
2078
+ place-items: center;
2079
+ pointer-events: none;
2080
+ transition: color 150ms ease;
2081
+ }
2082
+
2083
+ /* Two paths, one glyph: the cone, and the arc or cross beside it. */
2084
+ .gb-volume-cap .gb-icon {
2085
+ grid-area: 1 / 1;
2086
+ }
2087
+
2088
+ /* Once the fill has reached the speaker, the ink moves rather than gaining a
2089
+ shadow: a haloed glyph on a solid accent reads as a rendering artefact. */
2090
+ .gb-volume-fader[data-loud='true'] .gb-volume-cap {
2091
+ color: var(--gb-accent-on);
2092
+ }
2093
+
2094
+ .gb-volume-mixer {
2095
+ position: absolute;
2096
+ left: 4px;
2097
+ top: 44px;
2098
+ width: 36px;
2099
+ height: 36px;
2100
+ border-radius: 50%;
2101
+ opacity: 0;
2102
+ pointer-events: none;
2103
+ transform: scale(0.8);
2104
+ transition:
2105
+ opacity var(--gb-quick) ease,
2106
+ transform var(--gb-quick) ease,
2107
+ top 220ms var(--gb-spatial);
2108
+ }
2109
+
2110
+ .gb-volume[data-open='true'] .gb-volume-mixer {
2111
+ top: 178px;
2112
+ opacity: 1;
2113
+ pointer-events: auto;
2114
+ transform: none;
2115
+ }
2116
+
2117
+ .gb-volume-readout {
2118
+ position: absolute;
2119
+ right: 54px;
2120
+ top: 62px;
2121
+ padding: 4px 9px;
2122
+ border-radius: 7px;
2123
+ font-family: var(--gb-font-mono);
2124
+ font-size: 11px;
2125
+ white-space: nowrap;
2126
+ color: var(--gb-fg);
2127
+ opacity: 0;
2128
+ pointer-events: none;
2129
+ transition: opacity var(--gb-quick) ease;
2130
+ }
2131
+
2132
+ .gb-volume[data-open='true'] .gb-volume-readout {
2133
+ opacity: 1;
2134
+ }
2135
+
2136
+
2137
+ @property --x-backgroundColor { syntax: "*"; inherits: false;}
2138
+ @property --x-backgroundImage { syntax: "*"; inherits: false;}
2139
+ @property --x-width { syntax: "*"; inherits: false;}
2140
+ :root, .xlhqiyk{--x3csamf:#edeef2;--x17d56wi:#c1c4cb;--x1f86yoy:#9b9ea6;--x56miam:#9598a0;--x1twi2an:#808693;--xtf1eik:#6cd092;--xb4jn1s:#87e2a8;--xpzsk44:rgba(108, 208, 146, 0.16);--xaizo4t:rgba(108, 208, 146, 0.14);--x9qwclm:rgba(108, 208, 146, 0.18);--x1f9oy80:rgba(108, 208, 146, 0.4);--xq5deje:#06150c;--x1sfspnj:#c5e8d0;--x1m05w09:rgba(108, 208, 146, 0.1);--x1ul68qg:#9fb0ff;--x16v7fz2:#b1bfff;--xycsf2s:rgba(159, 176, 255, 0.1);--xnnt3is:rgba(159, 176, 255, 0.18);--x163ujek:#8eb5ff;--x1tjs6xz:rgba(248, 248, 248, 0.12);--xxpnr0j:#f97770;--x9ykgcm:rgba(213, 87, 83, 0.45);--xdhh81n:rgba(249, 119, 112, 0.16);--xkvfkrb:rgba(213, 87, 83, 0.12);--x1hm7wt7:rgba(213, 87, 83, 0.07);--x1meqssl:#fed2cd;--x5z0hc3:#1d0c0b;--xk8zdji:#181b20;--x1qeaz6f:rgba(1, 2, 3, 0.6);--x1us3bai:#21242a;--x143bs8d:#303339;--xx30mt6:#e2e5ea;--x1royhk9:#8f929a;--x10w8wl9:#a7abb3;--xdsrhau:rgba(248, 248, 248, 0.55);--x1xmcr5t:rgba(248, 248, 248, 0.6);--xgbahh8:rgba(248, 248, 248, 0.92);--x1ewntng:rgba(248, 248, 248, 0.03);--xktrtkq:rgba(248, 248, 248, 0.04);--x1kfx7ag:rgba(248, 248, 248, 0.05);--x1jzmftv:rgba(248, 248, 248, 0.06);--xt88uxu:rgba(248, 248, 248, 0.07);--x1pfqa3j:rgba(248, 248, 248, 0.1);--x1wh3c29:rgba(248, 248, 248, 0.08);--xprmnsk:rgba(248, 248, 248, 0.1);--x1sxemmo:rgba(248, 248, 248, 0.14);--x1shfm1h:rgba(248, 248, 248, 0.16);--x1lhqjgo:rgba(248, 248, 248, 0.18);--x2cgqyo:rgba(248, 248, 248, 0.2);}
2141
+ :root, .x1ve9k4s{--xrsie8f:180ms;--x9jq40m:200ms;}
2142
+ :root, .x1ljz40q{--xtrxc2e:10px;--x1yolzw4:11px;--xbc7rks:999px;}
2143
+ :root, .xev45w3{--xun0g8y:'Space Grotesk', ui-sans-serif, system-ui, sans-serif;--xog8ksx:'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;}
2144
+ .x1ghz6dp:not(#\\#){margin:0}
2145
+ .x1717udv:not(#\\#){padding:0}
2146
+ .xc7ga6q:not(#\\#){padding:12px}
2147
+ .x9ms5i6:not(#\\#){padding:3px}
2148
+ .xfawy5m:not(#\\#){padding:4px}
2149
+ .x9r1u3d:not(#\\#):not(#\\#){border-color:transparent}
2150
+ .x12rif8h:not(#\\#):not(#\\#){border-color:var(--x1f86yoy)}
2151
+ .x1ekxq7s:not(#\\#):not(#\\#){border-color:var(--x1f9oy80)}
2152
+ .x1bezp6c:not(#\\#):not(#\\#){border-color:var(--x1lhqjgo)}
2153
+ .xy8xi9c:not(#\\#):not(#\\#){border-color:var(--x1shfm1h)}
2154
+ .x1q6l3k1:not(#\\#):not(#\\#){border-color:var(--x1sxemmo)}
2155
+ .x1pq9f60:not(#\\#):not(#\\#){border-color:var(--x2cgqyo)}
2156
+ .x1gs0kgd:not(#\\#):not(#\\#){border-color:var(--x9ykgcm)}
2157
+ .xyudh7a:not(#\\#):not(#\\#){border-color:var(--xk8zdji)}
2158
+ .x1hobkz3:not(#\\#):not(#\\#){border-color:var(--xprmnsk)}
2159
+ .x17drv8y:not(#\\#):not(#\\#){border-color:var(--xtf1eik)}
2160
+ .x1etxd99:not(#\\#):not(#\\#){border-color:var(--xxpnr0j)}
2161
+ .x2u8bby:not(#\\#):not(#\\#){border-radius:0}
2162
+ .x1ctf4ec:not(#\\#):not(#\\#){border-radius:11px}
2163
+ .x12oqio5:not(#\\#):not(#\\#){border-radius:4px}
2164
+ .xu4hgxq:not(#\\#):not(#\\#){border-radius:7px}
2165
+ .xur7f20:not(#\\#):not(#\\#){border-radius:8px}
2166
+ .xhpnuu7:not(#\\#):not(#\\#){border-radius:9px}
2167
+ .xydzhu4:not(#\\#):not(#\\#){border-radius:var(--x1yolzw4)}
2168
+ .xq1n3g1:not(#\\#):not(#\\#){border-radius:var(--xbc7rks)}
2169
+ .x2jfb3a:not(#\\#):not(#\\#){border-radius:var(--xtrxc2e)}
2170
+ .xbsl7fq:not(#\\#):not(#\\#){border-style:dashed}
2171
+ .xng3xce:not(#\\#):not(#\\#){border-style:none}
2172
+ .x1y0btm7:not(#\\#):not(#\\#){border-style:solid}
2173
+ .xc342km:not(#\\#):not(#\\#){border-width:0}
2174
+ .xmkeg23:not(#\\#):not(#\\#){border-width:1px}
2175
+ .xdh2fpr:not(#\\#):not(#\\#){border-width:2px}
2176
+ .x883omv:not(#\\#):not(#\\#){gap:10px}
2177
+ .x15gj94b:not(#\\#):not(#\\#){gap:11px}
2178
+ .x1v2ro7d:not(#\\#):not(#\\#){gap:12px}
2179
+ .x1af02g3:not(#\\#):not(#\\#){gap:14px}
2180
+ .xou54vl:not(#\\#):not(#\\#){gap:16px}
2181
+ .xaobbuh:not(#\\#):not(#\\#){gap:18px}
2182
+ .x12mrbbr:not(#\\#):not(#\\#){gap:1px}
2183
+ .x1c1vhfx:not(#\\#):not(#\\#){gap:20px}
2184
+ .x195vfkc:not(#\\#):not(#\\#){gap:2px}
2185
+ .xqj3so6:not(#\\#):not(#\\#){gap:34px}
2186
+ .x1ed6fcf:not(#\\#):not(#\\#){gap:3px}
2187
+ .x1jnr06f:not(#\\#):not(#\\#){gap:4px}
2188
+ .x1nejdyq:not(#\\#):not(#\\#){gap:5px}
2189
+ .x17d4w8g:not(#\\#):not(#\\#){gap:6px}
2190
+ .x1j9xkj6:not(#\\#):not(#\\#){gap:7px}
2191
+ .x167g77z:not(#\\#):not(#\\#){gap:8px}
2192
+ .xe8uvvx:not(#\\#):not(#\\#){list-style:none}
2193
+ .xysyzu8:not(#\\#):not(#\\#){overflow:auto}
2194
+ .xb3r6kr:not(#\\#):not(#\\#){overflow:hidden}
2195
+ .x1rea2x4:not(#\\#):not(#\\#){overflow:visible}
2196
+ .xt970qd:not(#\\#):not(#\\#){padding-block:0}
2197
+ .xp59q4u:not(#\\#):not(#\\#){padding-block:10px}
2198
+ .xrii95j:not(#\\#):not(#\\#){padding-block:11px}
2199
+ .x10dr8xq:not(#\\#):not(#\\#){padding-block:12px}
2200
+ .x99dwph:not(#\\#):not(#\\#){padding-block:13px}
2201
+ .xxlmvz2:not(#\\#):not(#\\#){padding-block:14px}
2202
+ .xhyosrm:not(#\\#):not(#\\#){padding-block:18px}
2203
+ .xj8oexa:not(#\\#):not(#\\#){padding-block:2px}
2204
+ .x12ulsxz:not(#\\#):not(#\\#){padding-block:4px}
2205
+ .x1t0vds8:not(#\\#):not(#\\#){padding-block:6px}
2206
+ .xknfcqp:not(#\\#):not(#\\#){padding-block:7px}
2207
+ .x1vvogim:not(#\\#):not(#\\#){padding-block:8px}
2208
+ .x1m7iz9m:not(#\\#):not(#\\#){padding-block:9px}
2209
+ .x1awh872:not(#\\#):not(#\\#){padding-inline:10px}
2210
+ .xaope02:not(#\\#):not(#\\#){padding-inline:12px}
2211
+ .x1l730wp:not(#\\#):not(#\\#){padding-inline:13px}
2212
+ .xqin4a2:not(#\\#):not(#\\#){padding-inline:14px}
2213
+ .x1hr3lfm:not(#\\#):not(#\\#){padding-inline:16px}
2214
+ .x12j899k:not(#\\#):not(#\\#){padding-inline:18px}
2215
+ .x5k8d2m:not(#\\#):not(#\\#){padding-inline:2px}
2216
+ .x1g15tvd:not(#\\#):not(#\\#){padding-inline:3.5px}
2217
+ .xfn1xvj:not(#\\#):not(#\\#){padding-inline:4px}
2218
+ .x1xijbu4:not(#\\#):not(#\\#){padding-inline:6px}
2219
+ .xlkn9b3:not(#\\#):not(#\\#){padding-inline:7px}
2220
+ .xdqyycr:not(#\\#):not(#\\#){padding-inline:8px}
2221
+ .x1hl2dhg:not(#\\#):not(#\\#){text-decoration:none}
2222
+ .x1ob2h3n:focus-visible:not(#\\#):not(#\\#){border-color:var(--xtf1eik)}
2223
+ .xu360h0:hover:not(#\\#):not(#\\#){border-color:var(--x1f9oy80)}
2224
+ @media (pointer: coarse){.x10ih02v.x10ih02v:not(#\\#):not(#\\#){border-radius:10px}}
2225
+ @media (pointer: coarse){.x1auhu43.x1auhu43:not(#\\#):not(#\\#){gap:12px}}
2226
+ .x1pha0wt:not(#\\#):not(#\\#):not(#\\#){align-items:baseline}
2227
+ .x6s0dn4:not(#\\#):not(#\\#):not(#\\#){align-items:center}
2228
+ .xuk3077:not(#\\#):not(#\\#):not(#\\#){align-items:flex-end}
2229
+ .x1cy8zhl:not(#\\#):not(#\\#):not(#\\#){align-items:flex-start}
2230
+ .x1qjc9v5:not(#\\#):not(#\\#):not(#\\#){align-items:stretch}
2231
+ .xpvyfi4:not(#\\#):not(#\\#):not(#\\#){align-self:flex-end}
2232
+ .xqcrz7y:not(#\\#):not(#\\#):not(#\\#){align-self:flex-start}
2233
+ .xjyslct:not(#\\#):not(#\\#):not(#\\#){appearance:none}
2234
+ .xuw900x:not(#\\#):not(#\\#):not(#\\#){aspect-ratio:attr(width) / attr(height)}
2235
+ .x42x0ya:not(#\\#):not(#\\#):not(#\\#){background-color:black}
2236
+ .xjbqb8w:not(#\\#):not(#\\#):not(#\\#){background-color:transparent}
2237
+ .xl8spv7:not(#\\#):not(#\\#):not(#\\#){background-color:var(--x-backgroundColor)}
2238
+ .xxgsjm4:not(#\\#):not(#\\#):not(#\\#){background-color:var(--x163ujek)}
2239
+ .x1accutn:not(#\\#):not(#\\#):not(#\\#){background-color:var(--x1ewntng)}
2240
+ .x16pgvrn:not(#\\#):not(#\\#):not(#\\#){background-color:var(--x1hm7wt7)}
2241
+ .x1qg24v8:not(#\\#):not(#\\#):not(#\\#){background-color:var(--x1jzmftv)}
2242
+ .x10bqf5p:not(#\\#):not(#\\#):not(#\\#){background-color:var(--x1kfx7ag)}
2243
+ .xgrp9kk:not(#\\#):not(#\\#):not(#\\#){background-color:var(--x1lhqjgo)}
2244
+ .x385mod:not(#\\#):not(#\\#):not(#\\#){background-color:var(--x1m05w09)}
2245
+ .x1atu9ce:not(#\\#):not(#\\#):not(#\\#){background-color:var(--x1pfqa3j)}
2246
+ .x14oy2qj:not(#\\#):not(#\\#):not(#\\#){background-color:var(--x1sxemmo)}
2247
+ .xl5a5w2:not(#\\#):not(#\\#):not(#\\#){background-color:var(--x1tjs6xz)}
2248
+ .xtxhkq7:not(#\\#):not(#\\#):not(#\\#){background-color:var(--x1us3bai)}
2249
+ .x4r4f8x:not(#\\#):not(#\\#):not(#\\#){background-color:var(--x2cgqyo)}
2250
+ .x101z6j2:not(#\\#):not(#\\#):not(#\\#){background-color:var(--x9qwclm)}
2251
+ .x5il0le:not(#\\#):not(#\\#):not(#\\#){background-color:var(--xaizo4t)}
2252
+ .x7es4if:not(#\\#):not(#\\#):not(#\\#){background-color:var(--xdhh81n)}
2253
+ .x18o6w94:not(#\\#):not(#\\#):not(#\\#){background-color:var(--xdsrhau)}
2254
+ .x1w0y00m:not(#\\#):not(#\\#):not(#\\#){background-color:var(--xk8zdji)}
2255
+ .xvqquxf:not(#\\#):not(#\\#):not(#\\#){background-color:var(--xktrtkq)}
2256
+ .x1pq2xy2:not(#\\#):not(#\\#):not(#\\#){background-color:var(--xpzsk44)}
2257
+ .x1imo5h9:not(#\\#):not(#\\#):not(#\\#){background-color:var(--xq5deje)}
2258
+ .x1wonsr:not(#\\#):not(#\\#):not(#\\#){background-color:var(--xt88uxu)}
2259
+ .xcbcf2q:not(#\\#):not(#\\#):not(#\\#){background-color:var(--xtf1eik)}
2260
+ .x2v42ul:not(#\\#):not(#\\#):not(#\\#){background-color:var(--xxpnr0j)}
2261
+ .x19rgrjr:not(#\\#):not(#\\#):not(#\\#){background-color:var(--xycsf2s)}
2262
+ .x1e87kdn:not(#\\#):not(#\\#):not(#\\#){background-image:var(--x-backgroundImage)}
2263
+ .x13nud3b:not(#\\#):not(#\\#):not(#\\#){box-shadow:0 0 0 1.5px var(--xprmnsk)}
2264
+ .xcs8m75:not(#\\#):not(#\\#):not(#\\#){box-shadow:0 0 0 1.5px var(--xtf1eik)}
2265
+ .x56jxql:not(#\\#):not(#\\#):not(#\\#){box-shadow:0 18px 40px var(--x1qeaz6f)}
2266
+ .x1973jxo:not(#\\#):not(#\\#):not(#\\#){box-shadow:0 1px 6px var(--x1qeaz6f)}
2267
+ .xa8ncz1:not(#\\#):not(#\\#):not(#\\#){box-shadow:0 2px 8px var(--x1qeaz6f)}
2268
+ .x9f619:not(#\\#):not(#\\#):not(#\\#){box-sizing:border-box}
2269
+ .xcvfrpn:not(#\\#):not(#\\#):not(#\\#){color:var(--x10w8wl9)}
2270
+ .x1udkhtm:not(#\\#):not(#\\#):not(#\\#){color:var(--x16v7fz2)}
2271
+ .x6yhm7j:not(#\\#):not(#\\#):not(#\\#){color:var(--x17d56wi)}
2272
+ .xupo0id:not(#\\#):not(#\\#):not(#\\#){color:var(--x1f86yoy)}
2273
+ .x1bedcge:not(#\\#):not(#\\#):not(#\\#){color:var(--x1meqssl)}
2274
+ .xf58yzy:not(#\\#):not(#\\#):not(#\\#){color:var(--x1royhk9)}
2275
+ .xyify0s:not(#\\#):not(#\\#):not(#\\#){color:var(--x1sfspnj)}
2276
+ .xplcgjq:not(#\\#):not(#\\#):not(#\\#){color:var(--x1twi2an)}
2277
+ .x6gl9h3:not(#\\#):not(#\\#):not(#\\#){color:var(--x3csamf)}
2278
+ .x2g0jyv:not(#\\#):not(#\\#):not(#\\#){color:var(--x56miam)}
2279
+ .x141ken1:not(#\\#):not(#\\#):not(#\\#){color:var(--x5z0hc3)}
2280
+ .x7lcjf2:not(#\\#):not(#\\#):not(#\\#){color:var(--xq5deje)}
2281
+ .x1et08zh:not(#\\#):not(#\\#):not(#\\#){color:var(--xtf1eik)}
2282
+ .xjmdwvf:not(#\\#):not(#\\#):not(#\\#){color:var(--xx30mt6)}
2283
+ .xff9hfd:not(#\\#):not(#\\#):not(#\\#){color:var(--xxpnr0j)}
2284
+ .xt0e3qv:not(#\\#):not(#\\#):not(#\\#){cursor:default}
2285
+ .x1ypdohk:not(#\\#):not(#\\#):not(#\\#){cursor:pointer}
2286
+ .x1lliihq:not(#\\#):not(#\\#):not(#\\#){display:block}
2287
+ .x78zum5:not(#\\#):not(#\\#):not(#\\#){display:flex}
2288
+ .x1r8uery:not(#\\#):not(#\\#):not(#\\#){flex-basis:0}
2289
+ .xdl72j9:not(#\\#):not(#\\#):not(#\\#){flex-basis:auto}
2290
+ .xdt5ytf:not(#\\#):not(#\\#):not(#\\#){flex-direction:column}
2291
+ .x15zctf7:not(#\\#):not(#\\#):not(#\\#){flex-direction:row-reverse}
2292
+ .x1q0g3np:not(#\\#):not(#\\#):not(#\\#){flex-direction:row}
2293
+ .x1c4vz4f:not(#\\#):not(#\\#):not(#\\#){flex-grow:0}
2294
+ .x1iyjqo2:not(#\\#):not(#\\#):not(#\\#){flex-grow:1}
2295
+ .x2lah0s:not(#\\#):not(#\\#):not(#\\#){flex-shrink:0}
2296
+ .xs83m0k:not(#\\#):not(#\\#):not(#\\#){flex-shrink:1}
2297
+ .x1a02dak:not(#\\#):not(#\\#):not(#\\#){flex-wrap:wrap}
2298
+ .x1lxnp44:not(#\\#):not(#\\#):not(#\\#){font-family:monospace,"monospace"}
2299
+ .x1j8uvit:not(#\\#):not(#\\#):not(#\\#){font-family:var(--xog8ksx)}
2300
+ .x19979ed:not(#\\#):not(#\\#):not(#\\#){font-family:var(--xun0g8y)}
2301
+ .xngnso2:not(#\\#):not(#\\#):not(#\\#){font-size:1.5rem}
2302
+ .x1s31vzs:not(#\\#):not(#\\#):not(#\\#){font-size:10.5px}
2303
+ .x1k6wstc:not(#\\#):not(#\\#):not(#\\#){font-size:10px}
2304
+ .x1j6dyjg:not(#\\#):not(#\\#):not(#\\#){font-size:11px}
2305
+ .x1ct8sxb:not(#\\#):not(#\\#):not(#\\#){font-size:12.5px}
2306
+ .xfifm61:not(#\\#):not(#\\#):not(#\\#){font-size:12px}
2307
+ .x2ouz8m:not(#\\#):not(#\\#):not(#\\#){font-size:13.5px}
2308
+ .x4z9k3i:not(#\\#):not(#\\#):not(#\\#){font-size:13px}
2309
+ .xif65rj:not(#\\#):not(#\\#):not(#\\#){font-size:14px}
2310
+ .x1jvydc1:not(#\\#):not(#\\#):not(#\\#){font-size:15px}
2311
+ .xosj86m:not(#\\#):not(#\\#):not(#\\#){font-size:18px}
2312
+ .x1q7jzdg:not(#\\#):not(#\\#):not(#\\#){font-size:19px}
2313
+ .xrv4cvt:not(#\\#):not(#\\#):not(#\\#){font-size:1em}
2314
+ .xwsyq91:not(#\\#):not(#\\#):not(#\\#){font-size:20px}
2315
+ .x1pvqxga:not(#\\#):not(#\\#):not(#\\#){font-size:24px}
2316
+ .x1k4tb9n:not(#\\#):not(#\\#):not(#\\#){font-style:italic}
2317
+ .xss6m8b:not(#\\#):not(#\\#):not(#\\#){font-variant-numeric:tabular-nums}
2318
+ .xk50ysn:not(#\\#):not(#\\#):not(#\\#){font-weight:500}
2319
+ .x1s688f:not(#\\#):not(#\\#):not(#\\#){font-weight:600}
2320
+ .x117nqv4:not(#\\#):not(#\\#):not(#\\#){font-weight:bold}
2321
+ .xl56j7k:not(#\\#):not(#\\#):not(#\\#){justify-content:center}
2322
+ .x13a6bvl:not(#\\#):not(#\\#):not(#\\#){justify-content:flex-end}
2323
+ .x1qughib:not(#\\#):not(#\\#):not(#\\#){justify-content:space-between}
2324
+ .x1tup8yo:not(#\\#):not(#\\#):not(#\\#){letter-spacing:-0.3px}
2325
+ .x2gto2c:not(#\\#):not(#\\#):not(#\\#){letter-spacing:.44px}
2326
+ .x4ozb64:not(#\\#):not(#\\#):not(#\\#){letter-spacing:.63px}
2327
+ .xmk7bfn:not(#\\#):not(#\\#):not(#\\#){letter-spacing:.66px}
2328
+ .x12oo3zp:not(#\\#):not(#\\#):not(#\\#){letter-spacing:0}
2329
+ .xv2r5ts:not(#\\#):not(#\\#):not(#\\#){letter-spacing:1.32px}
2330
+ .xl5zsmt:not(#\\#):not(#\\#):not(#\\#){letter-spacing:2px}
2331
+ .x1159mfc:not(#\\#):not(#\\#):not(#\\#){line-height:1.1}
2332
+ .x1xfvgam:not(#\\#):not(#\\#):not(#\\#){line-height:1.35}
2333
+ .x37zpob:not(#\\#):not(#\\#):not(#\\#){line-height:1.4}
2334
+ .xfrs9s4:not(#\\#):not(#\\#):not(#\\#){line-height:1.45}
2335
+ .x1evy7pa:not(#\\#):not(#\\#):not(#\\#){line-height:1.5}
2336
+ .x1jjo3f5:not(#\\#):not(#\\#):not(#\\#){line-height:1.55}
2337
+ .x1dbl2gt:not(#\\#):not(#\\#):not(#\\#){line-height:1.6}
2338
+ .xo5v014:not(#\\#):not(#\\#):not(#\\#){line-height:1}
2339
+ .x1xxsxie:not(#\\#):not(#\\#):not(#\\#){line-height:14px}
2340
+ .xggjnk3:not(#\\#):not(#\\#):not(#\\#){line-height:normal}
2341
+ .x1w5wx5t:not(#\\#):not(#\\#):not(#\\#){margin-inline-end:-8px}
2342
+ .xw01apr:not(#\\#):not(#\\#):not(#\\#){margin-inline-start:-6px}
2343
+ .x1qfufaz:not(#\\#):not(#\\#):not(#\\#){margin-inline-start:-8px}
2344
+ .xdwrcjd:not(#\\#):not(#\\#):not(#\\#){margin-inline-start:4px}
2345
+ .xvc5jky:not(#\\#):not(#\\#):not(#\\#){margin-inline-start:auto}
2346
+ .xl1xv1r:not(#\\#):not(#\\#):not(#\\#){object-fit:cover}
2347
+ .xyd83as:not(#\\#):not(#\\#):not(#\\#){opacity:.45}
2348
+ .xbyyjgo:not(#\\#):not(#\\#):not(#\\#){opacity:.5}
2349
+ .x19s9pn4:not(#\\#):not(#\\#):not(#\\#){opacity:.82}
2350
+ .xg01cxk:not(#\\#):not(#\\#):not(#\\#){opacity:0}
2351
+ .x1hc1fzr:not(#\\#):not(#\\#):not(#\\#){opacity:1}
2352
+ .xfn9q2g:not(#\\#):not(#\\#):not(#\\#){outline-color:var(--xtf1eik)}
2353
+ .xbcy99i:not(#\\#):not(#\\#):not(#\\#){outline-color:var(--xxpnr0j)}
2354
+ .x2ssjo2:not(#\\#):not(#\\#):not(#\\#){outline-offset:-2px}
2355
+ .x1hl8ikr:not(#\\#):not(#\\#):not(#\\#){outline-offset:2px}
2356
+ .x1t137rt:not(#\\#):not(#\\#):not(#\\#){outline-style:none}
2357
+ .x1de99jn:not(#\\#):not(#\\#):not(#\\#){outline-width:2px}
2358
+ .xj0a0fe:not(#\\#):not(#\\#):not(#\\#){overflow-wrap:anywhere}
2359
+ .xyri2b:not(#\\#):not(#\\#):not(#\\#){padding-inline-end:0}
2360
+ .x2vl965:not(#\\#):not(#\\#):not(#\\#){padding-inline-end:10px}
2361
+ .xpdmqnj:not(#\\#):not(#\\#):not(#\\#){padding-inline-end:12px}
2362
+ .x1pic42t:not(#\\#):not(#\\#):not(#\\#){padding-inline-end:14px}
2363
+ .x1g0dm76:not(#\\#):not(#\\#):not(#\\#){padding-inline-start:12px}
2364
+ .x1onr9mi:not(#\\#):not(#\\#):not(#\\#){padding-inline-start:14px}
2365
+ .x25sj25:not(#\\#):not(#\\#):not(#\\#){padding-inline-start:6px}
2366
+ .x7coems:not(#\\#):not(#\\#):not(#\\#){padding-inline-start:9px}
2367
+ .x10l6tqk:not(#\\#):not(#\\#):not(#\\#){position:absolute}
2368
+ .x1n2onr6:not(#\\#):not(#\\#):not(#\\#){position:relative}
2369
+ .x288g5:not(#\\#):not(#\\#):not(#\\#){resize:vertical}
2370
+ .x1rohswg:not(#\\#):not(#\\#):not(#\\#){scrollbar-width:none}
2371
+ .x2b8uid:not(#\\#):not(#\\#):not(#\\#){text-align:center}
2372
+ .x16tdsg8:not(#\\#):not(#\\#):not(#\\#){text-align:inherit}
2373
+ .xdpxx8g:not(#\\#):not(#\\#):not(#\\#){text-align:left}
2374
+ .x1hr2gdg:not(#\\#):not(#\\#):not(#\\#){text-align:right}
2375
+ .xbrixnn:not(#\\#):not(#\\#):not(#\\#){text-overflow:clip}
2376
+ .xlyipyv:not(#\\#):not(#\\#):not(#\\#){text-overflow:ellipsis}
2377
+ .x6mezaz:not(#\\#):not(#\\#):not(#\\#){text-transform:none}
2378
+ .xtvhhri:not(#\\#):not(#\\#):not(#\\#){text-transform:uppercase}
2379
+ .x1fzhlzt:not(#\\#):not(#\\#):not(#\\#){text-wrap:pretty}
2380
+ .x5ve5x3:not(#\\#):not(#\\#):not(#\\#){touch-action:none}
2381
+ .x1a60rdm:not(#\\#):not(#\\#):not(#\\#){transform:rotate(-135deg)}
2382
+ .x1rr8tx7:not(#\\#):not(#\\#):not(#\\#){transform:rotate(-45deg)}
2383
+ .x11t6m9b:not(#\\#):not(#\\#):not(#\\#){transform:rotate(135deg)}
2384
+ .x19jd1h0:not(#\\#):not(#\\#):not(#\\#){transform:rotate(180deg)}
2385
+ .x1158fpu:not(#\\#):not(#\\#):not(#\\#){transform:rotate(45deg)}
2386
+ .x1psfjxj:not(#\\#):not(#\\#):not(#\\#){transform:translateX(16px)}
2387
+ .x1cb1t30:not(#\\#):not(#\\#):not(#\\#){transform:translateY(-50%)}
2388
+ .xppnxx3:not(#\\#):not(#\\#):not(#\\#){transition-duration:var(--x9jq40m)}
2389
+ .x198w77l:not(#\\#):not(#\\#):not(#\\#){transition-duration:var(--xrsie8f)}
2390
+ .x1eaenvl:not(#\\#):not(#\\#):not(#\\#){transition-property:background-color,border-color,color}
2391
+ .xs2xxs2:not(#\\#):not(#\\#):not(#\\#){transition-property:background-color,color}
2392
+ .x15406qy:not(#\\#):not(#\\#):not(#\\#){transition-property:background-color}
2393
+ .xq90yva:not(#\\#):not(#\\#):not(#\\#){transition-property:border-color,background-color}
2394
+ .xshfolx:not(#\\#):not(#\\#):not(#\\#){transition-property:border-color}
2395
+ .x1gbuem2:not(#\\#):not(#\\#):not(#\\#){transition-property:color,background-color}
2396
+ .xt3l3uh:not(#\\#):not(#\\#):not(#\\#){transition-property:color}
2397
+ .x19991ni:not(#\\#):not(#\\#):not(#\\#){transition-property:opacity}
2398
+ .x18dpk69:not(#\\#):not(#\\#):not(#\\#){transition-property:transform,background-color}
2399
+ .x11xpdln:not(#\\#):not(#\\#):not(#\\#){transition-property:transform}
2400
+ .xxrbq2n:not(#\\#):not(#\\#):not(#\\#){transition-property:width}
2401
+ .x87ps6o:not(#\\#):not(#\\#):not(#\\#){user-select:none}
2402
+ .x1hx0egp:not(#\\#):not(#\\#):not(#\\#){user-select:text}
2403
+ .xeaf4i8:not(#\\#):not(#\\#):not(#\\#){white-space:normal}
2404
+ .xuxw1ft:not(#\\#):not(#\\#):not(#\\#){white-space:nowrap}
2405
+ .x126k92a:not(#\\#):not(#\\#):not(#\\#){white-space:pre-wrap}
2406
+ .x1vvkbs:not(#\\#):not(#\\#):not(#\\#){word-wrap:break-word}
2407
+ .x1vjfegm:not(#\\#):not(#\\#):not(#\\#){z-index:1}
2408
+ .x1355qak:not(#\\#):not(#\\#):not(#\\#){z-index:20}
2409
+ .x25t5g8:focus-visible:not(#\\#):not(#\\#):not(#\\#){opacity:1}
2410
+ .x9v5kkp:focus-visible:not(#\\#):not(#\\#):not(#\\#){outline-style:solid}
2411
+ .xl8wwv7:hover:not(#\\#):not(#\\#):not(#\\#){background-color:var(--x143bs8d)}
2412
+ .x6ikqrn:hover:not(#\\#):not(#\\#):not(#\\#){background-color:var(--x1jzmftv)}
2413
+ .x8uoi4y:hover:not(#\\#):not(#\\#):not(#\\#){background-color:var(--x1pfqa3j)}
2414
+ .x1izjn8v:hover:not(#\\#):not(#\\#):not(#\\#){background-color:var(--x9qwclm)}
2415
+ .xbw9g77:hover:not(#\\#):not(#\\#):not(#\\#){background-color:var(--xb4jn1s)}
2416
+ .x19w7lg2:hover:not(#\\#):not(#\\#):not(#\\#){background-color:var(--xkvfkrb)}
2417
+ .xykbdm0:hover:not(#\\#):not(#\\#):not(#\\#){background-color:var(--xnnt3is)}
2418
+ .x34vq80:hover:not(#\\#):not(#\\#):not(#\\#){background-color:var(--xt88uxu)}
2419
+ .x1ti8bc7:hover:not(#\\#):not(#\\#):not(#\\#){color:var(--x17d56wi)}
2420
+ .x1u37qj2:hover:not(#\\#):not(#\\#):not(#\\#){color:var(--x1twi2an)}
2421
+ .x1kc931m:hover:not(#\\#):not(#\\#):not(#\\#){color:var(--x3csamf)}
2422
+ .x7xx714:hover:not(#\\#):not(#\\#):not(#\\#){color:var(--xb4jn1s)}
2423
+ .x10waejh:hover:not(#\\#):not(#\\#):not(#\\#){color:var(--xgbahh8)}
2424
+ .x1pa849f:hover:not(#\\#):not(#\\#):not(#\\#){color:var(--xq5deje)}
2425
+ @media (hover: none){.xqzx146.xqzx146:not(#\\#):not(#\\#):not(#\\#){opacity:1}}
2426
+ .x1pzews7:not(#\\#):not(#\\#):not(#\\#):not(#\\#){border-bottom-width:1.5px}
2427
+ .xso031l:not(#\\#):not(#\\#):not(#\\#):not(#\\#){border-bottom-width:1px}
2428
+ .x2x41l1:not(#\\#):not(#\\#):not(#\\#):not(#\\#){border-bottom-width:3px}
2429
+ .xj1ku99:not(#\\#):not(#\\#):not(#\\#):not(#\\#){border-left-color:var(--xprmnsk)}
2430
+ .x3l8lo6:not(#\\#):not(#\\#):not(#\\#):not(#\\#){border-left-color:var(--xtf1eik)}
2431
+ .x19ypqd9:not(#\\#):not(#\\#):not(#\\#):not(#\\#){border-left-style:solid}
2432
+ .xaqn3yn:not(#\\#):not(#\\#):not(#\\#):not(#\\#){border-left-width:1.5px}
2433
+ .xe0pwq:not(#\\#):not(#\\#):not(#\\#):not(#\\#){border-left-width:1px}
2434
+ .x19sr0n1:not(#\\#):not(#\\#):not(#\\#):not(#\\#){border-left-width:2px}
2435
+ .xgfja2r:not(#\\#):not(#\\#):not(#\\#):not(#\\#){border-right-width:0}
2436
+ .x35e4z7:not(#\\#):not(#\\#):not(#\\#):not(#\\#){border-top-color:var(--x1wh3c29)}
2437
+ .x1em74e8:not(#\\#):not(#\\#):not(#\\#):not(#\\#){border-top-color:var(--xprmnsk)}
2438
+ .x13fuv20:not(#\\#):not(#\\#):not(#\\#):not(#\\#){border-top-style:solid}
2439
+ .x972fbf:not(#\\#):not(#\\#):not(#\\#):not(#\\#){border-top-width:0}
2440
+ .x178xt8z:not(#\\#):not(#\\#):not(#\\#):not(#\\#){border-top-width:1px}
2441
+ .xn0vg7t:not(#\\#):not(#\\#):not(#\\#):not(#\\#){bottom:12px}
2442
+ .x5yr21d:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:100%}
2443
+ .x1v9usgg:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:14px}
2444
+ .xlup9mm:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:16px}
2445
+ .x1ta3ar0:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:17px}
2446
+ .xmix8c7:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:18px}
2447
+ .xjm9jq1:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:1px}
2448
+ .x1qx5ct2:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:20px}
2449
+ .x17rw0jw:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:22px}
2450
+ .xd7y6wv:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:26px}
2451
+ .x1fgtraw:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:28px}
2452
+ .x1gnnpzl:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:30px}
2453
+ .x10w6t97:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:32px}
2454
+ .x90ne7k:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:34px}
2455
+ .xc9qbxq:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:36px}
2456
+ .x1vqgdyp:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:40px}
2457
+ .x1add0xu:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:44%}
2458
+ .xn3w4p2:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:44px}
2459
+ .xwvwv9b:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:46px}
2460
+ .xqu0tyb:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:4px}
2461
+ .xwa7hi:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:58px}
2462
+ .x1ycjhwn:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:5px}
2463
+ .x1peatla:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:64px}
2464
+ .x1hagigm:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:7px}
2465
+ .xt7dq6l:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:auto}
2466
+ .xu96u03:not(#\\#):not(#\\#):not(#\\#):not(#\\#){left:0}
2467
+ .x54rlcq:not(#\\#):not(#\\#):not(#\\#):not(#\\#){left:2px}
2468
+ .x1nrll8i:not(#\\#):not(#\\#):not(#\\#):not(#\\#){left:50%}
2469
+ .xifccgj:not(#\\#):not(#\\#):not(#\\#):not(#\\#){margin-top:-6px}
2470
+ .x1hmvnq2:not(#\\#):not(#\\#):not(#\\#):not(#\\#){margin-top:14px}
2471
+ .x1gslohp:not(#\\#):not(#\\#):not(#\\#):not(#\\#){margin-top:4px}
2472
+ .x1k70j0n:not(#\\#):not(#\\#):not(#\\#):not(#\\#){margin-top:6px}
2473
+ .x193iq5w:not(#\\#):not(#\\#):not(#\\#):not(#\\#){max-width:100%}
2474
+ .x6lgdlw:not(#\\#):not(#\\#):not(#\\#):not(#\\#){min-height:112px}
2475
+ .x21xpn4:not(#\\#):not(#\\#):not(#\\#):not(#\\#){min-height:32px}
2476
+ .xu97haq:not(#\\#):not(#\\#):not(#\\#):not(#\\#){min-height:34px}
2477
+ .x1gg8mnh:not(#\\#):not(#\\#):not(#\\#):not(#\\#){min-height:44px}
2478
+ .x1wiwyrm:not(#\\#):not(#\\#):not(#\\#):not(#\\#){min-height:52px}
2479
+ .xeuugli:not(#\\#):not(#\\#):not(#\\#):not(#\\#){min-width:0}
2480
+ .x1wu2mox:not(#\\#):not(#\\#):not(#\\#):not(#\\#){min-width:14px}
2481
+ .xnei2rj:not(#\\#):not(#\\#):not(#\\#):not(#\\#){min-width:24px}
2482
+ .x17s4nb9:not(#\\#):not(#\\#):not(#\\#):not(#\\#){min-width:30px}
2483
+ .x900493:not(#\\#):not(#\\#):not(#\\#):not(#\\#){min-width:48px}
2484
+ .xw2csxc:not(#\\#):not(#\\#):not(#\\#):not(#\\#){overflow-x:auto}
2485
+ .x7p5m3t:not(#\\#):not(#\\#):not(#\\#):not(#\\#){overscroll-behavior-x:contain}
2486
+ .x10b6aqq:not(#\\#):not(#\\#):not(#\\#):not(#\\#){padding-bottom:6px}
2487
+ .xyinxu5:not(#\\#):not(#\\#):not(#\\#):not(#\\#){padding-top:14px}
2488
+ .xyamay9:not(#\\#):not(#\\#):not(#\\#):not(#\\#){padding-top:16px}
2489
+ .x1cnzs8:not(#\\#):not(#\\#):not(#\\#):not(#\\#){padding-top:20px}
2490
+ .x123j3cw:not(#\\#):not(#\\#):not(#\\#):not(#\\#){padding-top:5px}
2491
+ .xgzdjil:not(#\\#):not(#\\#):not(#\\#):not(#\\#){right:-6px}
2492
+ .x3m8u43:not(#\\#):not(#\\#):not(#\\#):not(#\\#){right:0}
2493
+ .x3lmqil:not(#\\#):not(#\\#):not(#\\#):not(#\\#){right:2px}
2494
+ .x1lg0oad:not(#\\#):not(#\\#):not(#\\#):not(#\\#){top:-18px}
2495
+ .xtu2xtp:not(#\\#):not(#\\#):not(#\\#):not(#\\#){top:-6px}
2496
+ .xnfr1j:not(#\\#):not(#\\#):not(#\\#):not(#\\#){top:1px}
2497
+ .xwa60dl:not(#\\#):not(#\\#):not(#\\#):not(#\\#){top:50%}
2498
+ .xi4zq41:not(#\\#):not(#\\#):not(#\\#):not(#\\#){top:calc(100% + 5px)}
2499
+ .xh8yej3:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:100%}
2500
+ .x1kky2od:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:16px}
2501
+ .x1se2ifz:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:17px}
2502
+ .xw4jnvo:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:20px}
2503
+ .x17z2i9w:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:22px}
2504
+ .x23j0i4:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:26px}
2505
+ .xgd8bvy:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:28px}
2506
+ .x1td3qas:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:32px}
2507
+ .x1691je0:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:34px}
2508
+ .x14qfxbe:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:36px}
2509
+ .x1guw455:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:38px}
2510
+ .x100vrsf:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:40px}
2511
+ .x1t0fkks:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:44%}
2512
+ .x187nhsf:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:44px}
2513
+ .x3x2bpi:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:46px}
2514
+ .x15yg21f:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:56px}
2515
+ .x1u78mur:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:58px}
2516
+ .x1ftt334:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:5px}
2517
+ .x1fu8urw:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:64px}
2518
+ .xci0xqf:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:7px}
2519
+ .x29ncy0:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:88px}
2520
+ .x14atkfc:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:auto}
2521
+ .x5lhr3w:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:var(--x-width)}
2522
+ @media (pointer: coarse){.xizhjz2.xizhjz2:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:20px}}
2523
+ @media (pointer: coarse){.x63sfu2.x63sfu2:not(#\\#):not(#\\#):not(#\\#):not(#\\#){height:44px}}
2524
+ @media (pointer: coarse){.x1pw0nqh.x1pw0nqh:not(#\\#):not(#\\#):not(#\\#):not(#\\#){right:-8px}}
2525
+ @media (pointer: coarse){.x1ncqbut.x1ncqbut:not(#\\#):not(#\\#):not(#\\#):not(#\\#){top:-8px}}
2526
+ @media (pointer: coarse){.x1kkwbli.x1kkwbli:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:20px}}
2527
+ @media (pointer: coarse){.x18s75z6.x18s75z6:not(#\\#):not(#\\#):not(#\\#):not(#\\#){width:44px}}
2528
+ .x1658mo5:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::before{inset:-4px}
2529
+ .xfiu4hc:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::-webkit-slider-thumb{border-radius:50%}
2530
+ .x1pvkr6q:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::-moz-range-thumb{border-radius:50%}
2531
+ .x1frnmxr:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::-webkit-slider-runnable-track{border-radius:var(--xbc7rks)}
2532
+ .x1wreb4n:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::-moz-range-track{border-radius:var(--xbc7rks)}
2533
+ .xcvrw5r:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::-webkit-slider-thumb{border-width:0}
2534
+ .x1wwh93d:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::-moz-range-thumb{border-width:0}
2535
+ .xibs45w:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::-webkit-slider-thumb{appearance:none}
2536
+ .x1v99137:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::-webkit-slider-runnable-track{background-color:var(--x1jzmftv)}
2537
+ .xy7mfwe:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::-moz-range-track{background-color:var(--x1jzmftv)}
2538
+ .x1fmniu7:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::-webkit-slider-thumb{background-color:var(--x2cgqyo)}
2539
+ .x1ax6aqf:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::-moz-range-thumb{background-color:var(--x2cgqyo)}
2540
+ .xj0hoj:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::-webkit-slider-thumb{background-color:var(--xtf1eik)}
2541
+ .xjjq0d0:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::-moz-range-thumb{background-color:var(--xtf1eik)}
2542
+ .x2pfokl:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::-webkit-slider-thumb{box-shadow:0 1px 6px var(--x1qeaz6f)}
2543
+ .x1bue4x7:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::-moz-range-thumb{box-shadow:0 1px 6px var(--x1qeaz6f)}
2544
+ .x1ts6uyu:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::placeholder{color:var(--x1twi2an)}
2545
+ .x1cpjm7i:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::before{content:""}
2546
+ .xfk6m8:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::-webkit-scrollbar{display:none}
2547
+ .x1hmns74:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::before{position:absolute}
2548
+ .xjfutqj:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::-webkit-slider-thumb{height:14px}
2549
+ .x1ai2ryv:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::-moz-range-thumb{height:14px}
2550
+ .x13m05e8:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::-webkit-slider-runnable-track{height:4px}
2551
+ .xagyqcp:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::-moz-range-track{height:4px}
2552
+ .x3cp4ko:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::-webkit-slider-thumb{margin-top:-5px}
2553
+ .xe55cdc:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::-webkit-slider-thumb{width:14px}
2554
+ .xaxxyxf:not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#):not(#\\#)::-moz-range-thumb{width:14px}
2555
+ /**
2556
+ * The chrome layer, coloured and sized.
2557
+ *
2558
+ * \`chrome.css\` is the arrangement \u2014 which element is where, what moves when,
2559
+ * what the document has to say for any of it to work. This is what that
2560
+ * arrangement is *made of*: the palette, the type, the thickness of the rail,
2561
+ * the width of the sheet, the shape of a control. The two files split along the
2562
+ * line between a bug that breaks a layout and a bug that makes two hosts look
2563
+ * like two products.
2564
+ *
2565
+ * **Both files, in both hosts, always.** The site and the dev shell used to
2566
+ * each define this set for themselves, and what that produced was a scoreboard
2567
+ * a developer could not recognise when they saw it on the site. A dev shell
2568
+ * exists to show a game author what their game will look like in front of a
2569
+ * player; one with its own taste shows them something nobody will ever see.
2570
+ *
2571
+ * **Inlined at build time, not fetched.** \`chromeCss()\` reads both files and
2572
+ * whoever renders a host's page pours them into a \`<style>\`. Nothing here costs
2573
+ * a request, and no host ships a second copy that can drift from this one. The
2574
+ * three typefaces are the one exception, and they are a \`<link>\` in each host's
2575
+ * page \u2014 see \`--gb-font\` below.
2576
+ *
2577
+ * ## OKLCH, on purpose
2578
+ *
2579
+ * Every colour here is OKLCH and the neutrals are one hue ramp at 265. That is
2580
+ * not a notation preference: it is what makes "the same grey, one step
2581
+ * lighter" a single number away, and it is why the six translucent fills below
2582
+ * are one colour at six alphas rather than six colours somebody picked. A
2583
+ * palette in hex drifts because nothing in hex says which of two greys is
2584
+ * lighter without reading all six digits.
2585
+ *
2586
+ * ## What a host still owns
2587
+ *
2588
+ * \`--gb-anchor\`, and only that. It says whether the chrome is pinned to the
2589
+ * window (\`fixed\` \u2014 the site, which *is* the window) or to a box the host draws
2590
+ * inside (\`absolute\` \u2014 the dev shell's simulated device). That is a fact about
2591
+ * where a host lives, not about what it looks like.
2592
+ *
2593
+ * A host is free to use the palette below for its own furniture, and both do,
2594
+ * so that a page around the chrome is the same colour as the chrome.
2595
+ */
2596
+
2597
+ body {
2598
+ /* ------------------------------------------------------------------ type */
2599
+
2600
+ /*
2601
+ * Three families, each with a job, loaded by each host's page from Google
2602
+ * Fonts. The stacks behind them are not decoration: a \`<link>\` is a network
2603
+ * request, and a page that has painted before it lands has to be readable in
2604
+ * whatever the machine already has.
2605
+ *
2606
+ * Space Grotesk is the voice. Manrope is for game titles only, where the
2607
+ * point is a tight, large, confident setting. JetBrains Mono is for anything
2608
+ * that is a label rather than a sentence \u2014 eyebrows, key chips, timestamps,
2609
+ * numbers in a column \u2014 where a fixed advance is what makes a list scannable.
2610
+ */
2611
+ --gb-font: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
2612
+ --gb-font-title: 'Manrope', ui-sans-serif, system-ui, sans-serif;
2613
+ --gb-font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
2614
+
2615
+ /* ---------------------------------------------------------------- colour */
2616
+
2617
+ /* The ground a game is drawn on, and the ground the host's own pages are. */
2618
+ --gb-black: oklch(0 0 0);
2619
+ --gb-bg: oklch(0.13 0.008 265);
2620
+
2621
+ /* Four weights of ink, and one for text that is deliberately quiet. */
2622
+ --gb-fg: oklch(0.95 0.005 265);
2623
+ --gb-fg-2: oklch(0.82 0.01 265);
2624
+ --gb-dim: oklch(0.7 0.012 265);
2625
+ --gb-dimmer: oklch(0.68 0.012 265);
2626
+ --gb-quiet: oklch(0.62 0.02 265);
2627
+
2628
+ /*
2629
+ * The logo: six dots on a square, in one colour on one ground, with a pair
2630
+ * for each kind of page it can sit on. Ink \u2014 black and white \u2014 so the mark
2631
+ * carries no hue of its own and never argues with the accent.
2632
+ *
2633
+ * The chrome is dark-only today, so the light pair is ready rather than used:
2634
+ * a light theme points the two live tokens at it.
2635
+ */
2636
+ --gb-logo-dark-fg: oklch(1 0 0);
2637
+ --gb-logo-dark-bg: oklch(0.21 0.016 285);
2638
+ --gb-logo-light-fg: oklch(0.21 0.016 285);
2639
+ --gb-logo-light-bg: oklch(1 0 0);
2640
+ --gb-logo-fg: var(--gb-logo-dark-fg);
2641
+ --gb-logo-bg: var(--gb-logo-dark-bg);
2642
+
2643
+ /*
2644
+ * One accent, and the four things it has to be able to do: sit on a dark
2645
+ * ground, sit on a dark ground under a pointer, be a surface with dark ink on
2646
+ * it, and be ink on a tinted version of itself. All of them are derived from
2647
+ * the one colour, so none of them can be left behind when it changes.
2648
+ */
2649
+ --gb-accent: oklch(0.78 0.13 155);
2650
+ --gb-accent-hi: oklch(from var(--gb-accent) calc(l + 0.06) calc(c - 0.01) h);
2651
+ --gb-accent-tint: oklch(from var(--gb-accent) l c h / 0.16);
2652
+ --gb-accent-wash: oklch(from var(--gb-accent) l c h / 0.14);
2653
+ --gb-accent-edge: oklch(from var(--gb-accent) l c h / 0.4);
2654
+ --gb-accent-on: oklch(from var(--gb-accent) 0.18 0.03 h);
2655
+ --gb-accent-fg: oklch(from var(--gb-accent) 0.9 0.05 h);
2656
+ --gb-accent-veil: oklch(from var(--gb-accent) l c h / 0.1);
2657
+ --gb-accent-glow: oklch(from var(--gb-accent) l c h / 0.18);
2658
+
2659
+ /* Discord's own violet, for the one place that sends a player there: a
2660
+ brand, not a third hue for the design to use. */
2661
+ --gb-discord: oklch(0.78 0.13 275);
2662
+ --gb-discord-ink: oklch(from var(--gb-discord) 0.82 0.1 h);
2663
+ --gb-discord-veil: oklch(from var(--gb-discord) l c h / 0.1);
2664
+ --gb-discord-glow: oklch(from var(--gb-discord) l c h / 0.18);
2665
+
2666
+ /* A second hue, and the only one: levels, which are a different kind of
2667
+ progress from the accent's and must not read as the same thing. */
2668
+ --gb-level: oklch(0.78 0.13 265);
2669
+ /*
2670
+ * The groove a progress bar is drawn in.
2671
+ *
2672
+ * Its own token rather than one of the fills, because it is the one surface
2673
+ * that has to read against another surface: a 4px bar sits on a card that is
2674
+ * already \`/0.05\`, and a track at \`/0.06\` is invisible against it \u2014 the fill
2675
+ * looks like it is floating on nothing and the card looks like it has a
2676
+ * smudge. The design says \`/0.12\` and the reason is contrast, not taste.
2677
+ */
2678
+ --gb-track: oklch(0.98 0 0 / 0.12);
2679
+
2680
+ /* What went wrong, and what cannot be taken back. Never load-bearing on its
2681
+ own \u2014 always beside words. */
2682
+ --gb-bad: oklch(0.72 0.16 25);
2683
+ --gb-bad-edge: oklch(0.62 0.16 25 / 0.45);
2684
+ /* The same three jobs the accent's derivations do, for the same reason: a
2685
+ surface tinted with it, ink on that tint, and ink on it at full strength. */
2686
+ --gb-bad-tint: oklch(from var(--gb-bad) l c h / 0.16);
2687
+ --gb-bad-fg: oklch(from var(--gb-bad) 0.9 0.05 h);
2688
+ --gb-bad-on: oklch(from var(--gb-bad) 0.18 0.03 h);
2689
+
2690
+ /* -------------------------------------------------------------- surfaces */
2691
+
2692
+ /* The sheet. Nearly opaque and still not opaque: what shows through is the
2693
+ game, which is what keeps a panel over a game reading as a panel over a
2694
+ game rather than as a different screen. */
2695
+ --gb-surface: oklch(0.18 0.01 265 / 0.96);
2696
+ /* A menu, which is over the sheet and therefore cannot be transparent too. */
2697
+ --gb-menu: oklch(0.22 0.012 265);
2698
+ /* A small control standing off the sheet's edge, over whatever is under it. */
2699
+ --gb-raised: oklch(0.26 0.012 265);
2700
+ --gb-raised-hi: oklch(0.32 0.012 265);
2701
+ /* A line that appeared without being asked for. */
2702
+ --gb-toast: oklch(0.2 0.012 265 / 0.92);
2703
+ /* The host's furniture over a game the host knows nothing about. Barely
2704
+ there on purpose: what shows through is the game rather than a bar. */
2705
+ --gb-glass: oklch(0.15 0.008 265 / 0.5);
2706
+ --gb-glass-soft: oklch(0.15 0.008 265 / 0.42);
2707
+ --gb-glass-firm: oklch(0.15 0.008 265 / 0.55);
2708
+ /* The veil between the sheet and the game, and the one over a paused one. */
2709
+ --gb-veil: oklch(0.1 0.01 265);
2710
+
2711
+ /*
2712
+ * Six fills and six hairlines: one white at six alphas each, which is what
2713
+ * makes a tile, the tile inside it and the line between them obviously
2714
+ * related rather than three shades somebody sampled.
2715
+ */
2716
+ --gb-fill-1: oklch(0.98 0 0 / 0.03);
2717
+ --gb-fill-2: oklch(0.98 0 0 / 0.04);
2718
+ --gb-fill-3: oklch(0.98 0 0 / 0.05);
2719
+ --gb-fill-4: oklch(0.98 0 0 / 0.06);
2720
+ --gb-fill-5: oklch(0.98 0 0 / 0.07);
2721
+ --gb-fill-6: oklch(0.98 0 0 / 0.1);
2722
+
2723
+ --gb-line-1: oklch(0.98 0 0 / 0.08);
2724
+ --gb-line-2: oklch(0.98 0 0 / 0.1);
2725
+ --gb-line-3: oklch(0.98 0 0 / 0.14);
2726
+ --gb-line-4: oklch(0.98 0 0 / 0.16);
2727
+ --gb-line-5: oklch(0.98 0 0 / 0.18);
2728
+ --gb-line-6: oklch(0.98 0 0 / 0.2);
2729
+
2730
+ /* The names the hosts' own stylesheets were already written against. Kept,
2731
+ and pointed at the new palette, so a host's furniture moves with the
2732
+ chrome instead of being left behind at the old greens. */
2733
+ --gb-edge: var(--gb-line-6);
2734
+ --gb-rule: var(--gb-line-2);
2735
+ --gb-inner: var(--gb-fill-2);
2736
+ --gb-chrome: var(--gb-glass-soft);
2737
+
2738
+ --gb-blur: blur(10px);
2739
+ --gb-blur-sheet: blur(22px);
2740
+ --gb-blur-glass: blur(8px);
2741
+
2742
+ /*
2743
+ * A glyph that survives whatever is behind it.
2744
+ *
2745
+ * A light symbol on a dark bar needs nothing; the same symbol over a game
2746
+ * drawing a white sky is invisible, and which of those a player gets is not
2747
+ * ours to know. Only the controls actually over the game carry this \u2014 inside
2748
+ * the sheet there is a known surface underneath and a shadow on every icon
2749
+ * would be grime.
2750
+ */
2751
+ --gb-glyph: drop-shadow(0 1px 3px oklch(0.06 0.01 265 / 0.85));
2752
+
2753
+ /* ---------------------------------------------------------------- metric */
2754
+
2755
+ /* The rail's thickness. The docked bar is thicker than the desktop rail
2756
+ because one is under a thumb and the other under a cursor. */
2757
+ --gb-rail: 64px;
2758
+ --gb-rail-fine: 56px;
2759
+ /* The side sheet, capped in viewport units so a narrow window still has a
2760
+ game behind it, and a fixed 400 on a desktop where it always fits. */
2761
+ --gb-sheet-w: min(400px, 58vw);
2762
+ --gb-sheet-w-fine: 400px;
2763
+
2764
+ --gb-gap: 10px;
2765
+ --gb-pad: 14px;
2766
+ --gb-pad-sheet: 22px;
2767
+
2768
+ --gb-round: 10px;
2769
+ --gb-round-lg: 11px;
2770
+ --gb-round-sheet: 22px;
2771
+ --gb-round-pill: 999px;
2772
+
2773
+ /* ---------------------------------------------------------------- motion */
2774
+
2775
+ /*
2776
+ * One curve for anything that moves through space, and plain easing for
2777
+ * anything that only changes colour or opacity. A colour that eases out of a
2778
+ * spatial curve reads as a colour that is late.
2779
+ */
2780
+ --gb-spatial: cubic-bezier(0.22, 1, 0.36, 1);
2781
+
2782
+ /*
2783
+ * How long the sheet and the rail take, and therefore how long a host holds
2784
+ * its tongue: \`createMotion\` reads this back off the element rather than
2785
+ * being told, so the number lives here and nowhere else.
2786
+ */
2787
+ --gb-sliding: 300ms;
2788
+ /* What a drag that has just been let go of overrides it with, per release. */
2789
+ --gb-settle: var(--gb-sliding);
2790
+ --gb-quick: 180ms;
2791
+ --gb-state: 200ms;
2792
+ }
2793
+
2794
+ /*
2795
+ * The type the chrome is set in, stated rather than inherited.
2796
+ *
2797
+ * Everything inside the sheet used to take its size from whatever the host had
2798
+ * put on \`body\`, so the same scoreboard came out two sizes and nobody had
2799
+ * written a rule saying so. These are where a host's page stops and the chrome
2800
+ * layer starts, and where the inheritance is cut.
2801
+ */
2802
+ .gb-sheet,
2803
+ .gb-rail,
2804
+ .gb-playback,
2805
+ .gb-title,
2806
+ .gb-toast,
2807
+ .gb-rail-hint,
2808
+ .gb-rail-trigger {
2809
+ font: 400 14px/1.5 var(--gb-font);
2810
+ color: var(--gb-fg);
2811
+ }
2812
+
2813
+ body {
2814
+ --gb-logo-mark: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%22128.8%2073%20330.59999999999997%20366%22%3E%0A%20%20%3Cg%20class%3D%22dots%22%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22179.8%22%20cy%3D%22124%22%20r%3D%2251%22%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22179.8%22%20cy%3D%22256%22%20r%3D%2251%22%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22179.8%22%20cy%3D%22388%22%20r%3D%2251%22%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22294.1%22%20cy%3D%22190%22%20r%3D%2251%22%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22294.1%22%20cy%3D%22322%22%20r%3D%2251%22%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22408.4%22%20cy%3D%22256%22%20r%3D%2251%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E");
2815
+ }
2816
+ `,favicon:'<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cstyle%3E.ground%7Bfill%3A%23FFFFFF%7D.dots%7Bfill%3A%2317171F%7D%40media%20(prefers-color-scheme%3Adark)%7B.ground%7Bfill%3A%2317171F%7D.dots%7Bfill%3A%23FFFFFF%7D%7D%3C%2Fstyle%3E%0A%20%20%3Crect%20class%3D%22ground%22%20width%3D%22512%22%20height%3D%22512%22%20rx%3D%22116%22%2F%3E%0A%20%20%3Cg%20class%3D%22dots%22%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22179.8%22%20cy%3D%22124%22%20r%3D%2251%22%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22179.8%22%20cy%3D%22256%22%20r%3D%2251%22%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22179.8%22%20cy%3D%22388%22%20r%3D%2251%22%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22294.1%22%20cy%3D%22190%22%20r%3D%2251%22%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22294.1%22%20cy%3D%22322%22%20r%3D%2251%22%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22408.4%22%20cy%3D%22256%22%20r%3D%2251%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E">'}}var se=12,rr=200;function Ke(e){let t=new Map;return n=>{let r=E(n),o=typeof n=="object"&&n!==null?n.run:void 0;if(r===null||typeof o!="number")return;let a=`${o}
2817
+ ${r.kind}
2818
+ ${r.message}
2819
+ ${r.stack??""}`,i=t.get(a)??0,s=i+(r.count??1);t.delete(a),t.set(a,s),t.size>rr&&t.delete(t.keys().next().value);let u=or[r.kind];if(i===0){e(`The game threw (${u}): ${r.message}${s>1?` (\xD7${s})`:""}`);for(let c of ar(r))e(` ${c}`);return}let l=ir(i,s);l!==null&&e(`The game threw it again (${u}, \xD7${l} so far): ${r.message}`)}}var or={uncaught:"uncaught",rejection:"unhandled rejection",sdk:"caught by the SDK"};function ar(e){if(e.stack===void 0)return[];let t=e.stack.split(`
2820
+ `).map(n=>n.trim()).filter(n=>n!=="");return t[0]===e.message&&t.shift(),t.length<=se?t:[...t.slice(0,se),`\u2026 ${t.length-se} more`]}function ir(e,t){let n=null;for(let r=10;r<=t;r*=10)r>e&&(n=r);return n}var le={".html":"text/html; charset=utf-8",".js":"text/javascript; charset=utf-8",".mjs":"text/javascript; charset=utf-8",".css":"text/css; charset=utf-8",".json":"application/json; charset=utf-8",".map":"application/json; charset=utf-8",".svg":"image/svg+xml",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".avif":"image/avif",".woff2":"font/woff2",".mp3":"audio/mpeg",".ogg":"audio/ogg",".wav":"audio/wav"},et={"access-control-allow-origin":"*","access-control-allow-methods":"GET, HEAD, OPTIONS","access-control-allow-headers":"*","access-control-max-age":"86400"};function fr(e){let t=e!==void 0&&/^[A-Za-z0-9.\-]+(:[0-9]+)?$/.test(e)?`http://${e}`:void 0;return{"content-security-policy":`${D(t)}; sandbox ${Ue}`,"x-dns-prefetch-control":"off",...et}}var Ze="/errors",mr=64*1024;async function tt(e){let t=null;if(e.project!==void 0&&(t=await F(e.project),t===null))throw new Error(S(e.project));let n=t===null?null:await O(t);n!==null&&await gr(n);let r=await Ye(),o=r.script,a=async()=>{if(t===null)return{project:null,declared:{manifest:null,problem:null}};try{return n=await O(t),{project:n,declared:k(n)}}catch(l){return{project:n,declared:{manifest:null,problem:l instanceof Error?l.message:String(l)}}}},i=e.log,s=i===void 0?null:Ke(i);if(i&&n!==null){let{problem:l}=k(n);l&&i(l);let c=te(await lr(n.page,"utf8"));c.length>0&&i(`Not publishable as it is: ${ne(n.page,c)}`)}let u=ur((l,c)=>{i&&l.url!==Ze&&c.on("finish",()=>{i(`${l.method??"GET"} ${l.url??"/"} \u2192 ${c.statusCode}`)}),(async()=>{let p=new URL(l.url??"/",`http://localhost:${e.port}`),h=decodeURIComponent(p.pathname);if(h==="/"||h==="/index.html"){let f=await a(),$=f.project===null?null:Qe(f.project.path);P(c,200,le[".html"]??"text/html",br(r,$,f.declared,{printsErrors:s!==null}));return}if(h===Ze&&l.method==="POST"&&s!==null){if(!(l.headers["content-type"]??"").startsWith("application/json")){P(c,415,"text/plain; charset=utf-8",`JSON only.
2821
+ `);return}let f=await vr(l,mr);if(f!==null)try{s(JSON.parse(f))}catch{}c.writeHead(204,{"cache-control":"no-store"}),c.end();return}if(h==="/shell.js"){P(c,200,le[".js"]??"text/javascript",o);return}if(h==="/game"||h.startsWith("/game/")){if(l.method==="OPTIONS"){c.writeHead(204,et),c.end();return}if(n===null){P(c,404,"text/plain; charset=utf-8",`This dev server was started without a game.
2822
+ `);return}let f=h==="/game"?"":h.slice(6),$=Qe(n.page);await yr(c,f===""?n.page:dr($,f),$,fr(l.headers.host));return}P(c,404,"text/plain; charset=utf-8","Not found")})()});return await new Promise(l=>u.listen(e.port,l)),u}async function gr(e){let t;try{t=await Je(e.page)}catch{throw new Error(ee(e))}if(!t.isFile())throw new Error(`${e.page} is not a file.`)}function br(e,t,n,r={printsErrors:!1}){let o=JSON.stringify({root:t??"",...n,printsErrors:r.printsErrors});return e.template.replace("<!--gb-favicon-->",e.favicon).replace("<!--gb-fonts-->",Xe).replace("<!--gb-chrome-css-->",`<style>
2823
+ ${e.css} </style>`).replace('<script src="./shell.js"></script>',`<script type="application/json" id="hopple-config">${xr(o)}</script>
2824
+ <script src="./shell.js"></script>`)}function xr(e){return e.replace(/<\//g,"<\\/")}async function yr(e,t,n,r){let o=pr(t);if(o!==n&&!o.startsWith(n+hr)){e.writeHead(403,{"content-type":"text/plain; charset=utf-8",...r}),e.end("Forbidden");return}try{if(!(await Je(o)).isFile())throw new Error("not a file");e.writeHead(200,{"content-type":le[cr(o)]??"application/octet-stream","cache-control":"no-store",...r}),sr(o).pipe(e)}catch{e.writeHead(404,{"content-type":"text/plain; charset=utf-8","cache-control":"no-store",...r}),e.end("Not found")}}async function vr(e,t){let n=[],r=0;for await(let o of e){if(r+=o.length,r>t)return null;n.push(o)}return Buffer.concat(n).toString("utf8")}function P(e,t,n,r){e.writeHead(t,{"content-type":n,"cache-control":"no-store"}),e.end(r)}function q(e,t,n){let r=t.split("/").map(encodeURIComponent).join("/");return`${e.replace(/\/+$/,"")}/${r}${n===void 0?"":`/${n}`}`}async function nt(e){let t=e.server,n=await b(t),r=await d(t,"/me/games",{token:n.token});if(r.status!==200)throw new Error(g(r.body,`${t} answered ${r.status}.`));return(Array.isArray(r.body.games)?r.body.games:[]).map(a=>{let i=typeof a.live=="number"?a.live:null,s=`${String(a.owner??"")}/${String(a.name??"")}`,u=(Array.isArray(a.versions)?a.versions:[]).map(l=>{let c=Number(l.version);return{version:c,status:String(l.status??"pending"),live:i!==null&&c===i,link:q(t,s,c)}});return{address:s,title:String(a.title??a.name??""),versions:u,link:i===null?u[0]?.link??"":q(t,s)}})}import{basename as ue}from"node:path";async function rt(e){let{text:t,page:n,bytes:r,cover:o}=await R(e.project),a=await b(e.server),i=new FormData;i.append("file",new Blob([new Uint8Array(r)],{type:"text/html"}),ue(n)),i.append("manifest",new Blob([t],{type:"application/json"}),Q),o!==null&&i.append("cover",new Blob([new Uint8Array(o.bytes)],{type:o.type}),ue(o.path));let s=await d(e.server,"/games",{method:"POST",token:a.token,body:i});if(s.status!==201){let p=kr(s.body);throw p!==null?new Error(wr(e.server,e.project,p)):new Error(g(s.body,`${e.server} answered ${s.status}.`))}let u=s.body.game,l=s.body.version,c=`${u.owner}/${u.name}`;return{address:c,version:l.version,live:s.body.live===!0,link:q(e.server,c,l.version),as:{username:a.username,signedIn:a.signedIn}}}function kr(e){let t=e.problems;if(Array.isArray(t)&&t.length>0)return A(t);let n=typeof e.error=="string"?e.error:"";return/^That manifest is not valid: (.+?)\.?$/.exec(n)?.[1]??null}function wr(e,t,n){return`${e} refused the manifest in ${ue(t.path)}: ${n}.
2825
+
2826
+ This hopple checked the same manifest and found nothing wrong, so it and the server disagree about what a manifest holds: one of them is out of date. Update hopple (npm install hopple@latest) and publish again. If the server still refuses it, the server is the one behind: tell us on the Hopple Discord, ${L}`}var ot=`
2827
+ hopple create <dir>
2828
+
2829
+ Start a new game in <dir>, whose name becomes the game's id: Vite, the
2830
+ SDK, a hopple.config.ts and a small working game.
2831
+ Optional: a game built any other way is played and published the same way.
2832
+
2833
+ [project] in the commands below is the directory of a game's project, or its
2834
+ hopple config (hopple.config.ts, .js or .json); left out, it is this
2835
+ directory. The nearest config at or above it says how to build the game
2836
+ ("build"), which built file is the game ("page") and what the game is
2837
+ ("manifest"). The build runs first, unless --no-build.
2838
+
2839
+ hopple dev [project] [--port <n>] [--no-build]
2840
+
2841
+ Serve the game the way the app runs it: in a sandboxed frame, behind the
2842
+ real host SDK. Reload the page to see a rebuilt game or an edited manifest.
2843
+
2844
+ With no project to be found the shell starts empty and waits to be pointed
2845
+ at a game stored on a Hopple server \u2014 which is what the admin page's "Dev
2846
+ shell" button on each uploaded game does.
2847
+
2848
+ hopple check [project] [--no-build]
2849
+
2850
+ Everything publish checks before it uploads, without uploading: the
2851
+ manifest is valid, and the page exists and holds the whole game.
2852
+
2853
+ hopple publish [project] [--server <url>] [--no-build]
2854
+
2855
+ Check, then upload the game: its page and its manifest. It is filed as
2856
+ <owner>/<manifest id>, where the owner is the manifest's "owner", or you
2857
+ when it names none; only the owner and the game's collaborators may
2858
+ publish it. It is listed with the manifest's title and description, and goes
2859
+ into the feed at once for a trusted account, or once an admin has looked
2860
+ at it for anybody else. A machine that has not signed in uploads
2861
+ anonymously: the upload is kept, but nothing is published for an
2862
+ anonymous account, and publish says so \u2014 run \`hopple login\` first, or
2863
+ after, which moves the game into your account. The link it prints opens
2864
+ the site on the version just uploaded, whether or not it is in the feed
2865
+ yet: it is the one to send to whoever should try it.
2866
+
2867
+ hopple collaborators [add <handle> | remove <handle>] [project] [--server <url>]
2868
+
2869
+ Show, add or remove who besides its owner may publish the game. The game
2870
+ is <owner>/<manifest id>, where the owner is the manifest's "owner", or
2871
+ you when it names none. Only the owner adds and removes; a collaborator
2872
+ may remove themselves. A collaborator publishes the game by setting the
2873
+ manifest's "owner" to the owner's handle.
2874
+
2875
+ hopple list [--server <url>]
2876
+
2877
+ Show the games this machine's account owns or collaborates on: what each
2878
+ is called, where each version stands, and the link that opens it.
2879
+
2880
+ hopple login [--server <url>] Sign this machine in: it prints a link to approve in your browser.
2881
+ hopple logout [--server <url>] Sign it out, and forget the session.
2882
+ hopple whoami [--server <url>] Say who it publishes as.
2883
+
2884
+ hopple --version Print this CLI's version.
2885
+
2886
+ The server is --server, then $HOPPLE_SERVER, then https://hopple.app: a
2887
+ site, whose API is under /api.
2888
+
2889
+ The server counts games published and sign-ins from the CLI in its usage
2890
+ analytics; DO_NOT_TRACK=1 leaves this machine's out.
2891
+ `;function x(e,t,n=[]){let r=[],o={},a=new Set;for(let i=0;i<e.length;i+=1){let s=e[i];if(!s.startsWith("-")){r.push(s);continue}let u=s==="-p"?"port":s.replace(/^--?/,"");if(n.includes(u)){a.add(u);continue}if(!t.includes(u))throw new Error(`Unknown option "${s}".`);let l=e[i+1];if(l===void 0||l.startsWith("--"))throw new Error(`${s} needs a value.`);o[u]=l,i+=1}return{positional:r,flags:o,switches:a}}function jr(e){if(!process.stdout.isTTY||process.env.SSH_CONNECTION!==void 0)return;let[t,n]=process.platform==="darwin"?["open",[e]]:process.platform==="win32"?["rundll32",["url.dll,FileProtocolHandler",e]]:["xdg-open",[e]];try{Sr(t,n,{stdio:"ignore",detached:!0}).on("error",()=>{}).unref()}catch{}}async function Ar(e){let[t,...n]=e;if(t===void 0||t==="--help"||t==="-h")return console.log(ot),t===void 0?1:0;if(t==="--version"||t==="-v")return console.log(M.version),0;switch(t){case"create":{let{positional:r}=x(n,[]),[o]=r;if(o===void 0||r.length>1)throw new Error("Give me the one directory to make the game in.");let a=await Re(o),i=de(process.cwd(),a.dir)||".";return console.log(`
2892
+ Made ${a.id} in ${i}. Next:
2893
+
2894
+ cd ${i}
2895
+ npm install
2896
+ npx hopple dev # build, then play it in the dev shell
2897
+ npx hopple publish # build, check, then publish it
2898
+ `),0}case"dev":return Pr(n);case"check":{let{positional:r,switches:o}=x(n,[],["no-build"]),a=await ce(r,o),i=await R(a),s=de(process.cwd(),i.page)||i.page;return console.log(`
2899
+ ${i.manifest.id} ${i.manifest.version} is ready to publish: ${s}, ${Math.ceil(i.bytes.length/1024)} KiB.
2900
+ `),0}case"publish":{let{positional:r,flags:o,switches:a}=x(n,["server"],["no-build"]),i=v(o.server),s=await ce(r,a),u=await rt({server:i,project:s});u.as.signedIn||console.warn(`
2901
+ Warning: this machine is not signed in to ${i}, and nothing is published for an anonymous account.
2902
+ The upload is kept. Run \`hopple login\` to sign in: the game moves into your account, where an admin can publish it.`);let l=u.as.signedIn?u.as.username:`${u.as.username}, anonymously`;return console.log(`
2903
+ ${u.address}@${u.version}, as ${l}.
2904
+ `+(u.live?` Live now, on ${i}.
2905
+ `:(u.as.signedIn?` Waiting for review: it goes into the feed once an admin has published it.
2906
+ `:` Not in the feed, and not going into it until you sign in.
2907
+ `)+` Until then, whoever has this link can play it:
2908
+ `)+` ${u.link}
2909
+ `),0}case"list":{let{positional:r,flags:o}=x(n,["server"]);if(r.length>0)throw new Error("`list` takes no arguments.");let a=v(o.server),i=await nt({server:a});return console.log(i.length===0?`
2910
+ Nothing published to ${a} yet.
2911
+ `:`
2912
+ ${Er(i)}
2913
+ `),0}case"collaborators":{let{positional:r,flags:o}=x(n,["server"]),a=v(o.server),[i,s,...u]=r,l,c=r;if(i==="add"||i==="remove"){if(s===void 0)throw new Error(`\`collaborators ${i}\` needs the handle of an account.`);l=i==="add"?{add:s.replace(/^@/,"")}:{remove:s.replace(/^@/,"")},c=u}let p=await ce(c,new Set(["no-build"])),h=await ze({server:a,project:p,...l===void 0?{}:{change:l}});return console.log(h.handles.length===0?`
2914
+ Only its owner publishes ${h.address}.
2915
+ `:`
2916
+ ${h.address} is also published by:
2917
+ ${h.handles.map(f=>` ${f}`).join(`
2918
+ `)}
2919
+ `),0}case"login":{let r=v(x(n,["server"]).flags.server);console.log("");let o=await Te(r,{say:a=>console.log(` ${a}`),open:jr});return console.log(`
2920
+ Signed in to ${r} as ${o.username}.
2921
+ `),0}case"logout":{let r=v(x(n,["server"]).flags.server);return console.log(await Oe(r)?`
2922
+ Signed out of ${r}.
2923
+ `:`
2924
+ Not signed in to ${r}.
2925
+ `),0}case"whoami":{let r=v(x(n,["server"]).flags.server);if(_(r)===null)return console.log(`
2926
+ Nobody on ${r} yet: the first publish starts a session.
2927
+ `),0;let o=await b(r),a=await d(r,"/me",{token:o.token}),i=Array.isArray(a.body.identities)?a.body.identities.map(s=>s.email?`${s.provider} (${s.email})`:s.provider).join(", "):"";return console.log(`
2928
+ ${o.username} on ${r}${i?`, signed in with ${i}`:", anonymously"}.
2929
+ `),0}default:return console.error(`Unknown command "${t}".
2930
+ ${ot}`),1}}function Er(e){let t={pending:"waiting for review",approved:"approved",rejected:"turned down"};return e.map(n=>{let r=n.versions.find(s=>s.live),o=n.versions[0],i=[r,o===r?void 0:o].filter(s=>s!==void 0).map(s=>` v${s.version} ${s.live?"live":t[s.status]??s.status}
2931
+ ${s.link}`);return` ${n.title} \u2014 ${n.address}
2932
+ ${i.join(`
2933
+ `)}`}).join(`
2934
+
2935
+ `)}async function ce(e,t){if(e.length>1)throw new Error("Give me one project, not several.");let n=await H(e[0],{build:!t.has("no-build")});if(n===null)throw new Error(S(process.cwd()));return n}async function Pr(e){let{positional:t,flags:n,switches:r}=x(e,["port"],["no-build"]);if(t.length>1)throw new Error("Give me one project, not several.");let o=5173;if(n.port!==void 0){let c=Number(n.port);if(!Number.isInteger(c)||c<0||c>65535)throw new Error(`--port needs a port number, got "${n.port}".`);o=c}let a=await H(t[0],{build:!r.has("no-build")}),s=(await tt({...a===null?{}:{project:a.path},port:o,log:c=>console.log(` ${c}`)})).address(),u=typeof s=="object"&&s!==null?s.port:o,l=a===null?'no game here (no hopple config) \u2014 open one from the admin page\u2019s "Dev shell" button':de(process.cwd(),a.page)||a.page;return console.log(`
2936
+ ${l}
2937
+ \u2192 http://localhost:${u}
2938
+ `),0}try{let e=await Ar(process.argv.slice(2));e!==0&&(process.exitCode=e)}catch(e){console.error(`
2939
+ ${e instanceof Error?e.message:String(e)}
2940
+ `),process.exitCode=1}
2941
+ /*! hopple | Copyright (c) 2026 The Hopple authors | MIT License */