@mblinkov/whats-missing 20.0.51 → 20.0.53
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/CHANGELOG.md +23 -0
- package/dist/themes.d.ts +1 -0
- package/dist/whats-missing.cjs.js +2 -2
- package/dist/whats-missing.es.js +124 -119
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog - Последние исправления
|
|
2
2
|
|
|
3
|
+
## Версия 20.0.51 - Точечный фикс 1280×720 и публикация
|
|
4
|
+
|
|
5
|
+
### 🔧 Исправления
|
|
6
|
+
|
|
7
|
+
- Добавлено специальное правило для разрешения 1280×720:
|
|
8
|
+
- gridTemplateColumns: `repeat(3, 130px)`
|
|
9
|
+
- gridAutoRows: `130px`
|
|
10
|
+
- Применяется только при точном совпадении размеров окна 1280×720.
|
|
11
|
+
|
|
12
|
+
### 🧪 Тест-песочницы
|
|
13
|
+
|
|
14
|
+
- Обновлены тестовые HTML:
|
|
15
|
+
- `test-game-full.html` — импорт ES-модуля из `dist`, панель статуса, расчёт контейнера/масштаба.
|
|
16
|
+
- `test-game.html` — UMD-React + динамический импорт `./dist/whats-missing.es.js`.
|
|
17
|
+
- Рекомендованный запуск: `python3 -m http.server 5174` и переход на `http://127.0.0.1:5174/test-game-full.html`.
|
|
18
|
+
|
|
19
|
+
### 📦 Публикация
|
|
20
|
+
|
|
21
|
+
- Версия поднята до `20.0.51` и опубликована в npm: `@mblinkov/whats-missing@20.0.51`.
|
|
22
|
+
- Для установки: `npm i @mblinkov/whats-missing@latest`.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
3
26
|
## Версия 20.0.48 - Критические исправления и оптимизация загрузки
|
|
4
27
|
|
|
5
28
|
### 🔧 Критические исправления
|
package/dist/themes.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),d=require("react"),Jn=window.origin+"/cloud/speakid/games/whatsmissing/",on=(r,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),d=require("react"),Jn=window.origin+"/cloud/speakid/games/whatsmissing/",on=(r,p)=>r.map(([g,s,...a])=>({src:`${Jn}${p}/${s.replace(/\s/g,"%20")}.png`,name:s,aliases:a?.length?a:void 0})),Qn=[["apple","apple"],["banana","banana"],["bread","bread"],["burger","burger"],["cake","cake"],["carrot","carrot"],["cheese","cheese"],["chicken","chicken"],["chocolate","chocolate"],["corn","corn"],["donut","donut"],["fish","fish"],["fries","fries"],["grapes","grapes"],["ice_cream","ice cream"],["milk","milk"],["orange","orange"],["pear","pear"],["pizza","pizza"],["rice","rice"],["sandwich","sandwich"],["soup","soup"],["strawberry","strawberry"],["tomato","tomato"],["watermelon","watermelon"]],Xn=[["bear","bear"],["cat","cat"],["crocodile","crocodile","alligator"],["dolphin","dolphin"],["elephant","elephant"],["fox","fox"],["giraffe","giraffe"],["horse","horse"],["kangaroo","kangaroo"],["lion","lion"],["monkey","monkey"],["owl","owl"],["panda","panda"],["penguin","penguin"],["squirrel","squirrel"],["tiger","tiger"],["tortoise","tortoise","turtle"],["wolf","wolf"],["zebra","zebra"]],ni=[["ball","ball"],["balloon","balloon"],["blocks","blocks"],["car","car"],["doll","doll"],["drum","drum"],["guitar","guitar"],["jump_rope","jump rope"],["kite","kite"],["paints","paints"],["plane","plane"],["puzzle","puzzle"],["rocket","rocket"],["scooter","scooter"],["skateboard","skateboard"],["slide","slide"],["teddy_bear","teddy bear"],["yo-yo","yo-yo"],["crayons","crayons"]],A={food:on(Qn,"food"),animals:on(Xn,"animals"),toys:on(ni,"toys")},ii=`
|
|
2
2
|
@keyframes spin {
|
|
3
3
|
from { transform: rotate(0deg); }
|
|
4
4
|
to { transform: rotate(360deg); }
|
|
@@ -29,4 +29,4 @@
|
|
|
29
29
|
height: 100% !important;
|
|
30
30
|
overflow: hidden !important;
|
|
31
31
|
}
|
|
32
|
-
`;const f=document.getElementById("whats-missing-reset");f&&f.remove(),document.head.appendChild(r)},wi=(r,f)=>{const g=Array.from({length:r.length+1},()=>Array(f.length+1).fill(0));for(let s=0;s<=r.length;s++)g[s][0]=s;for(let s=0;s<=f.length;s++)g[0][s]=s;for(let s=1;s<=r.length;s++)for(let a=1;a<=f.length;a++)g[s][a]=r[s-1]===f[a-1]?g[s-1][a-1]:Math.min(g[s-1][a-1],g[s][a-1],g[s-1][a])+1;return g[r.length][f.length]},di=r=>new Promise(f=>{const g=new Image;g.onload=()=>f(g),g.onerror=()=>f(g),g.src=r}),rn=async(r,f)=>{const g=new Map,s=r.map(async a=>{const E=await di(a);g.set(a,E)});return await Promise.allSettled(s),g};function oi({gameCubeSize:r,screenHeight:f,screenWidth:g}){const s=d.useRef(null);d.useEffect(()=>(ti(),()=>{document.documentElement.style.overflow="",document.body.style.overflow="";const e=document.getElementById("whats-missing-reset");e&&e.remove(),j.current&&j.current.abort()}),[]);const[a,E]=d.useState(null),[R,hn]=d.useState([]),[D,jn]=d.useState(4),[M,sn]=d.useState(!1),[G,gn]=d.useState(1),[P,In]=d.useState(null),[S,F]=d.useState("ready"),[an,pn]=d.useState(10),[O,V]=d.useState(10),[Z,ln]=d.useState(20),[vn,_]=d.useState(0),[U,K]=d.useState(!1),[Y,xn]=d.useState(""),[z,J]=d.useState(!1),[Q,cn]=d.useState(!1),[Hn,L]=d.useState(null),[Pn,X]=d.useState([]),[kn,Wn]=d.useState([]),[n,Tn]=d.useState(!1),[zn,$]=d.useState(1),[mn,q]=d.useState(null),[b,Rn]=d.useState(!1),[p,Mn]=d.useState(!1),[l,Ln]=d.useState(!1),[x,Bn]=d.useState(!1),[c,Cn]=d.useState(!1),[H,An]=d.useState(!1),[W,En]=d.useState(!1),[m,Dn]=d.useState(!1),[u,Gn]=d.useState(!1),[nn,Fn]=d.useState(!1),[I,Un]=d.useState(!1),en=d.useRef(new Set),N=d.useRef(new Map),j=d.useRef(null);d.useEffect(()=>{const e=()=>{const t=g??window.innerWidth,w=f??window.innerHeight,h=t<768||t===926&&w===428||t===932&&w===430,y=w<700,k=t/w>1.8,B=t===768&&w===1024,wn=t===1024&&w===768,C=t===820&&w===1180,v=t===1180&&w===820,T=t===540&&w===720,yn=t===720&&w===540,bn=t===1024&&w===1366,Sn=t===1366&&w===1024,Vn=t>=1200&&w>=600&&!h;Rn(Vn),Mn(B),Ln(wn),Bn(C),Cn(v),An(T),En(yn),Dn(bn),Gn(Sn),Un(k);const Zn=h&&t>w||h||w<700||k||t===1366&&w===766||t===1366&&w===768||t===1280&&w===720||t===1440&&w===900||B||wn||C||v||T||yn||bn||Sn||b;if(Fn(Zn),Tn(h),h)q(r&&r>=320?r:null),$(1);else if(y)q(r&&r>=400?r:null),$(1);else if(k){const dn=r?Math.max(400,Math.min(1200,r)):Math.min(1e3,Math.min(t,w)*.9);q(dn),$(.85)}else{const dn=r?Math.max(400,Math.min(1200,r)):Math.min(1e3,Math.min(t,w)*.9);q(dn),$(1)}};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[g,f,r]);const tn=e=>[...e].sort(()=>Math.random()-.5).slice(0,6),Yn=e=>{j.current&&j.current.abort(),j.current=new AbortController;const w=A[e].map(h=>h.src);rn(w,j.current.signal).then(h=>{w.forEach(y=>{en.current.add(y),h.has(y)&&N.current.set(y,h.get(y))})}).catch(()=>{})},un=()=>{if(!a)return;const e=tn(A[a]);hn(e),sn(!0),K(!1),gn(1),_(0),X([]),Wn([]);const t=e.map(w=>w.src);rn(t,j.current?.signal).then(w=>{t.forEach(h=>{en.current.add(h),w.has(h)&&N.current.set(h,w.get(h))})}).catch(()=>{}),fn(e,[],!0)},fn=(e=R,t=kn,w=!1)=>{const h=tn(e.length?e:A[a]);let y=Math.floor(Math.random()*h.length),k=h[y].name,B=0;for(;t.includes(k)&&B<20;)y=Math.floor(Math.random()*h.length),k=h[y].name,B++;if(hn(h),In(y),Wn([...t,k]),J(!1),xn(""),ln(20),L(null),a&&!w){const C=tn(A[a].filter(v=>!t.includes(v.name))).map(v=>v.src);rn(C,j.current?.signal).then(v=>{C.forEach(T=>{en.current.add(T),v.has(T)&&N.current.set(T,v.get(T))})}).catch(()=>{})}w?(F("ready"),pn(10),V(10)):(F("memorize"),V(10))};d.useEffect(()=>{if(!(!M||U||z)){if(S==="ready")if(an<=0)F("memorize");else{const e=setTimeout(()=>pn(t=>t-1),1e3);return()=>clearTimeout(e)}if(S==="memorize")if(O<=0)F("guess");else{const e=setTimeout(()=>V(t=>t-1),1e3);return()=>clearTimeout(e)}if(S==="guess"){if(Z<=0){J(!0),L("wrong");const t=R[P].name;X(w=>[...w,{round:G,answer:Y,correct:t,result:"wrong"}]);return}const e=setTimeout(()=>ln(t=>t-1),1e3);return()=>clearTimeout(e)}}},[S,an,O,Z,M,U,z,R,P,G,Y]);const $n=()=>{if(P===null||Q)return;const e=R[P].name,t=Y.toLowerCase().trim();let w="wrong";t===e?(_(h=>h+1),L("correct"),w="correct"):wi(t,e)===1?(_(h=>h+.5),L("almost"),w="almost"):(L("wrong"),w="wrong"),X(h=>[...h,{round:G,answer:t,correct:e,result:w}]),cn(!0),setTimeout(()=>{cn(!1),J(!0)},600)},qn=()=>G<D?(gn(e=>e+1),fn()):K(!0),Nn=()=>{j.current&&j.current.abort(),sn(!1),K(!1),E(null)},On=d.useMemo(()=>n&&window.innerWidth>window.innerHeight||window.innerHeight<700?null:i.jsx("div",{style:{...o.gmLogoFixed,position:"absolute",top:16,left:16,zIndex:30},children:i.jsxs("picture",{children:[i.jsx("source",{srcSet:window.origin+"/cloud/speakid/games/whatsmissing/logo.svg",type:"image/svg+xml"}),i.jsx("img",{src:window.origin+"/cloud/speakid/games/whatsmissing/logo.png",alt:"SPEAKID Logo",style:o.gmLogoImg,loading:"lazy"})]})}),[n]);return i.jsx("div",{ref:s,style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",background:"linear-gradient(to bottom, #fff8f8 0%, #f9fafb 100%)",transition:"background 0.3s ease",overflow:"hidden",position:"absolute",top:0,left:0,right:0,bottom:0},children:i.jsx("div",{style:{width:n?"100%":mn||r||1e3,height:n?"100%":mn||r||1e3,display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",borderRadius:n?0:"20px",background:"linear-gradient(to bottom, #fff8f8 0%, #f9fafb 100%)",boxShadow:n?"none":"0 0 40px rgba(0,0,0,0.1)",margin:n?"0 auto":"unset",position:"relative",transform:`scale(${zn})`},children:i.jsx("div",{style:{transform:"translateZ(0)",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:i.jsxs("div",{id:"whats-missing-root",children:[!n&&On,!a&&!M&&i.jsxs("div",{style:o.gmCenterScreen,children:[i.jsx("h1",{style:o.gmHeadline1,children:"WHAT'S MISSING?"}),i.jsx("p",{style:o.gmBodyM,children:"Select a theme:"}),i.jsx("div",{style:{display:"flex",gap:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"8px":"16px"},children:["animals","food","toys"].map(e=>i.jsx("button",{style:{...o.gmButton,padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"8px 12px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"12px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"70px":"auto"},onClick:()=>{E(e),Yn(e)},children:e==="animals"?"🐶 Animals":e==="food"?"🍎 Food":"🧸 Toys"},e))}),i.jsxs("div",{style:{marginTop:24},children:[i.jsx("p",{style:o.gmBodyS,children:"Choose number of rounds:"}),i.jsx("div",{style:{display:"flex",gap:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"6px":"12px",marginTop:8},children:[3,4,5].map(e=>i.jsx("button",{style:{...o.gmButton,...D===e?o.gmButtonActive:{},padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"6px 10px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"12px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"40px":"auto"},onClick:()=>jn(e),children:e},e))})]})]}),a&&!M&&i.jsxs("div",{style:o.gmCenterScreen,children:[i.jsxs("h1",{style:o.gmHeadline1,children:["Theme selected: ",a]}),i.jsxs("p",{style:o.gmBodyM,children:["Rounds: ",D]}),i.jsx("button",{style:{...o.gmButton,padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"8px 16px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"14px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"120px":"auto"},onClick:un,children:"▶ Start game"})]}),U&&i.jsxs("div",{style:o.gmCenterScreen,children:[i.jsx("h1",{style:{...o.gmHeadline1,marginTop:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||p||l||x||c||H||W||m||u?"0px":o.gmHeadline1.marginTop,marginBottom:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||p||l||x||c||H||W||m||u?"2px":o.gmHeadline1.marginBottom},children:"Results"}),i.jsxs("h2",{style:{...o.gmHeadline3,marginTop:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||p||l||x||c||H||W||m||u?"0px":o.gmHeadline3.marginTop,marginBottom:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||p||l||x||c||H||W||m||u?"2px":o.gmHeadline3.marginBottom},children:["Your score: ",vn," / ",D]}),i.jsx("p",{style:{...o.gmBodyM,color:"#10b981",marginTop:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||p||l||x||c||H||W||m||u?"0px":"12px",marginBottom:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||p||l||x||c||H||W||m||u?"2px":o.gmBodyM.marginBottom},children:"Yahoo! You did it! 🍬✨"}),i.jsxs("table",{style:{...o.gmTable,marginTop:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||p||l||x||c||H||W||m||u?"0px":"20px",marginBottom:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||p||l||x||c||H||W||m||u?"4px":"32px"},children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Round"}),i.jsx("th",{children:"Your Answer"}),i.jsx("th",{children:"Correct"}),i.jsx("th",{children:"Result"})]})}),i.jsx("tbody",{children:Pn.map((e,t)=>i.jsxs("tr",{children:[i.jsx("td",{style:o.gmTableCell,children:e.round}),i.jsx("td",{style:o.gmTableCell,children:e.answer||"—"}),i.jsx("td",{style:o.gmTableCell,children:e.correct}),i.jsx("td",{style:o.gmTableCell,children:e.result==="correct"?"✔ Correct":e.result==="almost"?"◐ Almost (0.5)":"✘ Wrong"})]},t))})]}),i.jsxs("div",{style:{display:"flex",gap:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"6px":"12px",marginTop:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"2px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||b?"12px":"24px"},children:[i.jsx("button",{style:{...o.gmButton,padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"6px 10px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"12px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"80px":"auto"},onClick:un,children:"🔁 Play again"}),i.jsx("button",{style:{...o.gmButton,padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"6px 10px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"12px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"80px":"auto"},onClick:Nn,children:"⬅️ Choose theme"})]})]}),M&&!U&&i.jsxs("div",{style:o.gmGameLayout,children:[i.jsxs("div",{style:{minHeight:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"45px":I||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"50px":n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"60px":"160px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",paddingTop:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||I||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"8px":n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"15px":"40px"},children:[S==="ready"&&i.jsxs(i.Fragment,{children:[i.jsx("h1",{style:{...o.gmHeadline1,color:"#ec4c44"},children:"GET READY"}),i.jsx("div",{style:o.gmHourglass,children:"⏳"})]}),S==="memorize"&&i.jsxs("p",{style:{...o.gmBodyM,color:"#10b981"},children:["MEMORIZE (",O,")"]}),S==="guess"&&!z&&i.jsxs("p",{style:o.gmBodyM,children:["⏳ Time left: ",Z,"s"]})]}),S!=="ready"&&i.jsx("div",{style:{...o.gmGrid,...I||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?{width:"100%"}:{},gridTemplateColumns:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667?"repeat(3, 1fr)":n?"repeat(2, 1fr)":window.innerHeight<700?"repeat(3, 1fr)":typeof window<"u"&&window.innerWidth===1280&&window.innerHeight===720?"repeat(3, 130px)":I||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"repeat(3, 150px)":"repeat(3, 210px)",gridAutoRows:n&&window.innerWidth>window.innerHeight?"120px":n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"100px":n?"150px":window.innerHeight<700?"140px":typeof window<"u"&&window.devicePixelRatio>=1.25&&window.devicePixelRatio<=1.5?"240px":typeof window<"u"&&window.innerWidth===1280&&window.innerHeight===720?"130px":I||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"150px":"210px",gap:n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"12px":n||window.innerHeight<700?"8px":typeof window<"u"&&window.devicePixelRatio>=1.25&&window.devicePixelRatio<=1.5?"24px":I||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"12px":"20px",justifyItems:"center",maxWidth:n&&window.innerWidth>window.innerHeight?"90%":n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"95%":"100%",padding:n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"8px":typeof window<"u"&&window.devicePixelRatio>=1.25&&window.devicePixelRatio<=1.5?"20px":I||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"10px":"16px"},children:R.map((e,t)=>{const w=P===t&&S==="guess"&&!z;return i.jsx("div",{style:{width:"100%",height:"100%",borderRadius:n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"6px":"12px",overflow:"hidden",boxShadow:n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"0 1px 4px rgba(0,0,0,0.1)":"0 4px 12px rgba(0,0,0,0.15)",transition:"all 0.3s ease",cursor:"pointer",...Hn==="correct"&&P===t?{boxShadow:n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"0 0 15px #10b981":"0 0 20px #10b981",transform:"scale(1.03)"}:{},...Hn==="wrong"&&P===t?{boxShadow:n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"0 0 15px #ef4444":"0 0 20px #ef4444",transform:"scale(1.03)"}:{}},children:!w&&(()=>{const h=N.current.get(e.src),y=h?.complete&&h.src?h.src:e.src;return i.jsx("img",{src:y,alt:e.name,fetchPriority:"high",loading:"eager",decoding:"async",style:{width:"100%",height:"100%",objectFit:"cover"}},`${e.src}-${h?.complete?"loaded":"pending"}`)})()},t)})}),i.jsxs("div",{style:{marginTop:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"1px":I||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"4px":"16px",height:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"40px":I||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"50px":"80px"},children:[S==="guess"&&!z&&i.jsx("div",{style:{display:"flex",flexDirection:nn?"row":"column",gap:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"3px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||b||p||l||x||c||H||W||m||u?"8px":n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"6px":"12px",alignItems:"center",justifyContent:"center",width:"100%",maxWidth:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"270px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||b||p||l||x||c||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"400px":"300px"},children:i.jsxs(i.Fragment,{children:[i.jsx("input",{type:"text",placeholder:"Type the missing word",value:Y,onChange:e=>xn(e.target.value),style:{...o.gmInput,width:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"170px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||b||p||l||x||c||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"250px":"auto",padding:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"5px 6px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||b||p||l||x||c||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"10px 12px":"12px 16px",fontSize:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428?"10px":window.innerWidth===896&&window.innerHeight===414?"11px":window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"10px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||b||p||l||x||c||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"14px":"16px",flex:nn?"1":"none"}}),i.jsx("button",{style:{...o.gmButton,marginLeft:nn?"8px":"0",padding:n&&window.innerWidth<=375&&window.innerHeight<=667?"5px 8px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"6px 10px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||b||p||l||x||c||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"10px 16px":"12px 24px",fontSize:n&&window.innerWidth<=375&&window.innerHeight<=667?"10px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"11px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||b||p||l||x||c||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"14px":"16px",minWidth:n&&window.innerWidth<=375&&window.innerHeight<=667?"45px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"55px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||b||p||l||x||c||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"80px":"100px",flexShrink:0},onClick:$n,disabled:Q,children:Q?"...":"Check"})]})}),z&&i.jsx("button",{style:{...o.gmButton,padding:n&&window.innerWidth<=375&&window.innerHeight<=667?"5px 8px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"6px 10px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||b||p||l||x||c||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"10px 16px":"12px 24px",fontSize:n&&window.innerWidth<=375&&window.innerHeight<=667?"10px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"11px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||b||p||l||x||c||H||W||m||u||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"14px":"16px"},onClick:qn,children:"Next round"})]})]})]})})})})}exports.Game=oi;exports.themes=A;
|
|
32
|
+
`;const p=document.getElementById("whats-missing-reset");p&&p.remove(),document.head.appendChild(r)},wi=(r,p)=>{const g=Array.from({length:r.length+1},()=>Array(p.length+1).fill(0));for(let s=0;s<=r.length;s++)g[s][0]=s;for(let s=0;s<=p.length;s++)g[0][s]=s;for(let s=1;s<=r.length;s++)for(let a=1;a<=p.length;a++)g[s][a]=r[s-1]===p[a-1]?g[s-1][a-1]:Math.min(g[s-1][a-1],g[s][a-1],g[s-1][a])+1;return g[r.length][p.length]},di=r=>new Promise(p=>{const g=new Image;g.onload=()=>p(g),g.onerror=()=>p(g),g.src=r}),rn=async(r,p)=>{const g=new Map,s=r.map(async a=>{const E=await di(a);g.set(a,E)});return await Promise.allSettled(s),g};function oi({gameCubeSize:r,screenHeight:p,screenWidth:g}){const s=d.useRef(null);d.useEffect(()=>(ti(),()=>{document.documentElement.style.overflow="",document.body.style.overflow="";const e=document.getElementById("whats-missing-reset");e&&e.remove(),I.current&&I.current.abort()}),[]);const[a,E]=d.useState(null),[z,hn]=d.useState([]),[D,jn]=d.useState(4),[L,sn]=d.useState(!1),[G,gn]=d.useState(1),[v,In]=d.useState(null),[j,F]=d.useState("ready"),[an,pn]=d.useState(10),[O,V]=d.useState(10),[Z,ln]=d.useState(20),[vn,_]=d.useState(0),[U,K]=d.useState(!1),[Y,xn]=d.useState(""),[M,J]=d.useState(!1),[Q,cn]=d.useState(!1),[Hn,B]=d.useState(null),[Pn,X]=d.useState([]),[kn,Wn]=d.useState([]),[n,Tn]=d.useState(!1),[zn,$]=d.useState(1),[mn,q]=d.useState(null),[S,Rn]=d.useState(!1),[l,Mn]=d.useState(!1),[x,Ln]=d.useState(!1),[c,Bn]=d.useState(!1),[H,Cn]=d.useState(!1),[W,An]=d.useState(!1),[m,En]=d.useState(!1),[u,Dn]=d.useState(!1),[f,Gn]=d.useState(!1),[nn,Fn]=d.useState(!1),[P,Un]=d.useState(!1),en=d.useRef(new Set),N=d.useRef(new Map),I=d.useRef(null);d.useEffect(()=>{const e=()=>{const t=g??window.innerWidth,w=p??window.innerHeight,h=t<768||t===926&&w===428||t===932&&w===430,y=w<700,k=t/w>1.8,b=t===768&&w===1024,wn=t===1024&&w===768,C=t===820&&w===1180,T=t===1180&&w===820,R=t===540&&w===720,yn=t===720&&w===540,bn=t===1024&&w===1366,Sn=t===1366&&w===1024,Vn=t>=1200&&w>=600&&!h;Rn(Vn),Mn(b),Ln(wn),Bn(C),Cn(T),An(R),En(yn),Dn(bn),Gn(Sn),Un(k);const Zn=h&&t>w||h||w<700||k||t===1366&&w===766||t===1366&&w===768||t===1280&&w===720||t===1440&&w===900||b||wn||C||T||R||yn||bn||Sn||S;if(Fn(Zn),Tn(h),h)q(r&&r>=320?r:null),$(1);else if(y)q(r&&r>=400?r:null),$(1);else if(k){const dn=r?Math.max(400,Math.min(1200,r)):Math.min(1e3,Math.min(t,w)*.9);q(dn),$(.85)}else{const dn=r?Math.max(400,Math.min(1200,r)):Math.min(1e3,Math.min(t,w)*.9);q(dn),$(1)}};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[g,p,r]);const tn=e=>[...e].sort(()=>Math.random()-.5).slice(0,6),Yn=e=>{I.current&&I.current.abort(),I.current=new AbortController;const w=A[e].map(h=>h.src);rn(w,I.current.signal).then(h=>{w.forEach(y=>{en.current.add(y),h.has(y)&&N.current.set(y,h.get(y))})}).catch(()=>{})},un=()=>{if(!a)return;const e=tn(A[a]);hn(e),sn(!0),K(!1),gn(1),_(0),X([]),Wn([]);const t=e.map(w=>w.src);rn(t,I.current?.signal).then(w=>{t.forEach(h=>{en.current.add(h),w.has(h)&&N.current.set(h,w.get(h))})}).catch(()=>{}),fn(e,[],!0)},fn=(e=z,t=kn,w=!1)=>{const h=tn(e.length?e:A[a]);let y=Math.floor(Math.random()*h.length),k=h[y].name,b=0;for(;t.includes(k)&&b<20;)y=Math.floor(Math.random()*h.length),k=h[y].name,b++;if(hn(h),In(y),Wn([...t,k]),J(!1),xn(""),ln(20),B(null),a&&!w){const C=tn(A[a].filter(T=>!t.includes(T.name))).map(T=>T.src);rn(C,I.current?.signal).then(T=>{C.forEach(R=>{en.current.add(R),T.has(R)&&N.current.set(R,T.get(R))})}).catch(()=>{})}w?(F("ready"),pn(10),V(10)):(F("memorize"),V(10))};d.useEffect(()=>{if(!(!L||U||M)){if(j==="ready")if(an<=0)F("memorize");else{const e=setTimeout(()=>pn(t=>t-1),1e3);return()=>clearTimeout(e)}if(j==="memorize")if(O<=0)F("guess");else{const e=setTimeout(()=>V(t=>t-1),1e3);return()=>clearTimeout(e)}if(j==="guess"){if(Z<=0){J(!0),B("wrong");const t=z[v].name,w=z[v].aliases,h=[t,...w||[]].join(", ");X(y=>[...y,{round:G,answer:Y,correct:h,result:"wrong"}]);return}const e=setTimeout(()=>ln(t=>t-1),1e3);return()=>clearTimeout(e)}}},[j,an,O,Z,L,U,M,z,v,G,Y]);const $n=()=>{if(v===null||Q)return;const e=z[v].name,t=z[v].aliases,w=Y.toLowerCase().trim();let h="wrong";const y=[e,...t||[]].map(b=>b.toLowerCase()),k=[e,...t||[]].join(", ");y.includes(w)?(_(b=>b+1),B("correct"),h="correct"):y.some(b=>wi(w,b)===1)?(_(b=>b+.5),B("almost"),h="almost"):(B("wrong"),h="wrong"),X(b=>[...b,{round:G,answer:w,correct:k,result:h}]),cn(!0),setTimeout(()=>{cn(!1),J(!0)},600)},qn=()=>G<D?(gn(e=>e+1),fn()):K(!0),Nn=()=>{I.current&&I.current.abort(),sn(!1),K(!1),E(null)},On=d.useMemo(()=>{const e=g??window.innerWidth,t=p??window.innerHeight,w=!n&&e>=1200&&e<=1400;return n&&e>t||t<700&&!w?null:i.jsx("div",{style:{...o.gmLogoFixed,position:"absolute",top:16,left:16,zIndex:30},children:i.jsxs("picture",{children:[i.jsx("source",{srcSet:window.origin+"/cloud/speakid/games/whatsmissing/logo.svg",type:"image/svg+xml"}),i.jsx("img",{src:window.origin+"/cloud/speakid/games/whatsmissing/logo.png",alt:"SPEAKID Logo",style:o.gmLogoImg,loading:"lazy"})]})})},[n,g,p]);return i.jsx("div",{ref:s,style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",background:"linear-gradient(to bottom, #fff8f8 0%, #f9fafb 100%)",transition:"background 0.3s ease",overflow:"hidden",position:"absolute",top:0,left:0,right:0,bottom:0},children:i.jsx("div",{style:{width:n?"100%":mn||r||1e3,height:n?"100%":mn||r||1e3,display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",borderRadius:n?0:"20px",background:"linear-gradient(to bottom, #fff8f8 0%, #f9fafb 100%)",boxShadow:n?"none":"0 0 40px rgba(0,0,0,0.1)",margin:n?"0 auto":"unset",position:"relative",transform:`scale(${zn})`},children:i.jsx("div",{style:{transform:"translateZ(0)",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:i.jsxs("div",{id:"whats-missing-root",children:[!n&&On,!a&&!L&&i.jsxs("div",{style:o.gmCenterScreen,children:[i.jsx("h1",{style:o.gmHeadline1,children:"WHAT'S MISSING?"}),i.jsx("p",{style:o.gmBodyM,children:"Select a theme:"}),i.jsx("div",{style:{display:"flex",gap:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"8px":"16px"},children:["animals","food","toys"].map(e=>i.jsx("button",{style:{...o.gmButton,padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"8px 12px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"12px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"70px":"auto"},onClick:()=>{E(e),Yn(e)},children:e==="animals"?"🐶 Animals":e==="food"?"🍎 Food":"🧸 Toys"},e))}),i.jsxs("div",{style:{marginTop:24},children:[i.jsx("p",{style:o.gmBodyS,children:"Choose number of rounds:"}),i.jsx("div",{style:{display:"flex",gap:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"6px":"12px",marginTop:8},children:[3,4,5].map(e=>i.jsx("button",{style:{...o.gmButton,...D===e?o.gmButtonActive:{},padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"6px 10px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"12px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"40px":"auto"},onClick:()=>jn(e),children:e},e))})]})]}),a&&!L&&i.jsxs("div",{style:o.gmCenterScreen,children:[i.jsxs("h1",{style:o.gmHeadline1,children:["Theme selected: ",a]}),i.jsxs("p",{style:o.gmBodyM,children:["Rounds: ",D]}),i.jsx("button",{style:{...o.gmButton,padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"8px 16px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"14px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"120px":"auto"},onClick:un,children:"▶ Start game"})]}),U&&i.jsxs("div",{style:o.gmCenterScreen,children:[i.jsx("h1",{style:{...o.gmHeadline1,marginTop:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||l||x||c||H||W||m||u||f?"0px":o.gmHeadline1.marginTop,marginBottom:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||l||x||c||H||W||m||u||f?"2px":o.gmHeadline1.marginBottom},children:"Results"}),i.jsxs("h2",{style:{...o.gmHeadline3,marginTop:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||l||x||c||H||W||m||u||f?"0px":o.gmHeadline3.marginTop,marginBottom:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||l||x||c||H||W||m||u||f?"2px":o.gmHeadline3.marginBottom},children:["Your score: ",vn," / ",D]}),i.jsx("p",{style:{...o.gmBodyM,color:"#10b981",marginTop:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||l||x||c||H||W||m||u||f?"0px":"12px",marginBottom:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||l||x||c||H||W||m||u||f?"2px":o.gmBodyM.marginBottom},children:"Yahoo! You did it! 🍬✨"}),i.jsxs("table",{style:{...o.gmTable,marginTop:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||l||x||c||H||W||m||u||f?"0px":"20px",marginBottom:n&&window.innerWidth>window.innerHeight||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430||l||x||c||H||W||m||u||f?"4px":"32px"},children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Round"}),i.jsx("th",{children:"Your Answer"}),i.jsx("th",{children:"Correct"}),i.jsx("th",{children:"Result"})]})}),i.jsx("tbody",{children:Pn.map((e,t)=>i.jsxs("tr",{children:[i.jsx("td",{style:o.gmTableCell,children:e.round}),i.jsx("td",{style:o.gmTableCell,children:e.answer||"—"}),i.jsx("td",{style:o.gmTableCell,children:e.correct}),i.jsx("td",{style:o.gmTableCell,children:e.result==="correct"?"✔ Correct":e.result==="almost"?"◐ Almost (0.5)":"✘ Wrong"})]},t))})]}),i.jsxs("div",{style:{display:"flex",gap:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"6px":"12px",marginTop:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"2px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||S?"12px":"24px"},children:[i.jsx("button",{style:{...o.gmButton,padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"6px 10px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"12px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"80px":"auto"},onClick:un,children:"🔁 Play again"}),i.jsx("button",{style:{...o.gmButton,padding:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"6px 10px":"12px 24px",fontSize:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"12px":"16px",minWidth:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||window.innerWidth===932&&window.innerHeight===430?"80px":"auto"},onClick:Nn,children:"⬅️ Choose theme"})]})]}),L&&!U&&i.jsxs("div",{style:o.gmGameLayout,children:[i.jsxs("div",{style:{minHeight:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"45px":P||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"50px":n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"60px":"160px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",paddingTop:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428||P||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"8px":n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"15px":"40px"},children:[j==="ready"&&i.jsxs(i.Fragment,{children:[i.jsx("h1",{style:{...o.gmHeadline1,color:"#ec4c44"},children:"GET READY"}),i.jsx("div",{style:o.gmHourglass,children:"⏳"})]}),j==="memorize"&&i.jsxs("p",{style:{...o.gmBodyM,color:"#10b981"},children:["MEMORIZE (",O,")"]}),j==="guess"&&!M&&i.jsxs("p",{style:o.gmBodyM,children:["⏳ Time left: ",Z,"s"]})]}),j!=="ready"&&i.jsx("div",{style:{...o.gmGrid,...P||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?{width:"100%"}:{},gridTemplateColumns:n&&window.innerWidth>window.innerHeight||n&&window.innerWidth<=375&&window.innerHeight<=667?"repeat(3, 1fr)":n?"repeat(2, 1fr)":window.innerHeight<700?"repeat(3, 1fr)":typeof window<"u"&&window.innerWidth===1280&&window.innerHeight===720?"repeat(3, 130px)":P||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"repeat(3, 150px)":"repeat(3, 210px)",gridAutoRows:n&&window.innerWidth>window.innerHeight?"120px":n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"100px":n?"150px":window.innerHeight<700?"140px":typeof window<"u"&&window.devicePixelRatio>=1.25&&window.devicePixelRatio<=1.5?"240px":typeof window<"u"&&window.innerWidth===1280&&window.innerHeight===720?"130px":P||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"150px":"210px",gap:n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"12px":n||window.innerHeight<700?"8px":typeof window<"u"&&window.devicePixelRatio>=1.25&&window.devicePixelRatio<=1.5?"24px":P||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"12px":"20px",justifyItems:"center",maxWidth:n&&window.innerWidth>window.innerHeight?"90%":n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"95%":"100%",padding:n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"8px":typeof window<"u"&&window.devicePixelRatio>=1.25&&window.devicePixelRatio<=1.5?"20px":P||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8?"10px":"16px"},children:z.map((e,t)=>{const w=v===t&&j==="guess"&&!M;return i.jsx("div",{style:{width:"100%",height:"100%",borderRadius:n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"6px":"12px",overflow:"hidden",boxShadow:n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"0 1px 4px rgba(0,0,0,0.1)":"0 4px 12px rgba(0,0,0,0.15)",transition:"all 0.3s ease",cursor:"pointer",...Hn==="correct"&&v===t?{boxShadow:n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"0 0 15px #10b981":"0 0 20px #10b981",transform:"scale(1.03)"}:{},...Hn==="wrong"&&v===t?{boxShadow:n&&window.innerWidth<=375&&window.innerHeight<=667||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"0 0 15px #ef4444":"0 0 20px #ef4444",transform:"scale(1.03)"}:{}},children:!w&&(()=>{const h=N.current.get(e.src),y=h?.complete&&h.src?h.src:e.src;return i.jsx("img",{src:y,alt:e.name,fetchPriority:"high",loading:"eager",decoding:"async",style:{width:"100%",height:"100%",objectFit:"cover"}},`${e.src}-${h?.complete?"loaded":"pending"}`)})()},t)})}),i.jsxs("div",{style:{marginTop:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"1px":P||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"4px":"16px",height:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"40px":P||typeof window<"u"&&window.innerWidth/window.innerHeight>1.8||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"50px":"80px"},children:[j==="guess"&&!M&&i.jsx("div",{style:{display:"flex",flexDirection:nn?"row":"column",gap:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"3px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||S||l||x||c||H||W||m||u||f?"8px":n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"6px":"12px",alignItems:"center",justifyContent:"center",width:"100%",maxWidth:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"270px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||S||l||x||c||H||W||m||u||f||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"400px":"300px"},children:i.jsxs(i.Fragment,{children:[i.jsx("input",{type:"text",placeholder:"Type the missing word",value:Y,onChange:e=>xn(e.target.value),style:{...o.gmInput,width:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"170px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||S||l||x||c||H||W||m||u||f||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"250px":"auto",padding:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"5px 6px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||S||l||x||c||H||W||m||u||f||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"10px 12px":"12px 16px",fontSize:n&&window.innerWidth<=375&&window.innerHeight<=667||n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428?"10px":window.innerWidth===896&&window.innerHeight===414?"11px":window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"10px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||S||l||x||c||H||W||m||u||f||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"14px":"16px",flex:nn?"1":"none"}}),i.jsx("button",{style:{...o.gmButton,marginLeft:nn?"8px":"0",padding:n&&window.innerWidth<=375&&window.innerHeight<=667?"5px 8px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"6px 10px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||S||l||x||c||H||W||m||u||f||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"10px 16px":"12px 24px",fontSize:n&&window.innerWidth<=375&&window.innerHeight<=667?"10px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"11px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||S||l||x||c||H||W||m||u||f||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"14px":"16px",minWidth:n&&window.innerWidth<=375&&window.innerHeight<=667?"45px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"55px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||S||l||x||c||H||W||m||u||f||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"80px":"100px",flexShrink:0},onClick:$n,disabled:Q,children:Q?"...":"Check"})]})}),M&&i.jsx("button",{style:{...o.gmButton,padding:n&&window.innerWidth<=375&&window.innerHeight<=667?"5px 8px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"6px 10px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||S||l||x||c||H||W||m||u||f||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"10px 16px":"12px 24px",fontSize:n&&window.innerWidth<=375&&window.innerHeight<=667?"10px":n&&window.innerWidth>window.innerHeight&&window.innerHeight<=428||window.innerWidth===896&&window.innerHeight===414||window.innerWidth===844&&window.innerHeight===390||window.innerWidth===926&&window.innerHeight===428?"11px":window.innerWidth===1366&&window.innerHeight===766||window.innerWidth===1366&&window.innerHeight===768||window.innerWidth===1280&&window.innerHeight===720||window.innerWidth===1440&&window.innerHeight===900||S||l||x||c||H||W||m||u||f||n&&window.innerWidth>window.innerHeight||window.innerHeight<700?"14px":"16px"},onClick:qn,children:"Next round"})]})]})]})})})})}exports.Game=oi;exports.themes=A;
|
package/dist/whats-missing.es.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as d, jsxs as p, Fragment as kn } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as Z, useEffect as hn, useState as h, useMemo as ii } from "react";
|
|
3
|
-
const ei = window.origin + "/cloud/speakid/games/whatsmissing/", gn = (o,
|
|
4
|
-
src: `${ei}${
|
|
5
|
-
name: g
|
|
3
|
+
const ei = window.origin + "/cloud/speakid/games/whatsmissing/", gn = (o, l) => o.map(([s, g, ...a]) => ({
|
|
4
|
+
src: `${ei}${l}/${g.replace(/\s/g, "%20")}.png`,
|
|
5
|
+
name: g,
|
|
6
|
+
aliases: a?.length ? a : void 0
|
|
6
7
|
})), ti = [
|
|
7
8
|
["apple", "apple"],
|
|
8
9
|
["banana", "banana"],
|
|
@@ -249,45 +250,45 @@ const ri = {
|
|
|
249
250
|
overflow: hidden !important;
|
|
250
251
|
}
|
|
251
252
|
`;
|
|
252
|
-
const
|
|
253
|
-
|
|
254
|
-
}, gi = (o,
|
|
255
|
-
const s = Array.from({ length: o.length + 1 }, () => Array(
|
|
253
|
+
const l = document.getElementById("whats-missing-reset");
|
|
254
|
+
l && l.remove(), document.head.appendChild(o);
|
|
255
|
+
}, gi = (o, l) => {
|
|
256
|
+
const s = Array.from({ length: o.length + 1 }, () => Array(l.length + 1).fill(0));
|
|
256
257
|
for (let g = 0; g <= o.length; g++) s[g][0] = g;
|
|
257
|
-
for (let g = 0; g <=
|
|
258
|
+
for (let g = 0; g <= l.length; g++) s[0][g] = g;
|
|
258
259
|
for (let g = 1; g <= o.length; g++)
|
|
259
|
-
for (let a = 1; a <=
|
|
260
|
-
s[g][a] = o[g - 1] ===
|
|
261
|
-
return s[o.length][
|
|
262
|
-
}, si = (o) => new Promise((
|
|
260
|
+
for (let a = 1; a <= l.length; a++)
|
|
261
|
+
s[g][a] = o[g - 1] === l[a - 1] ? s[g - 1][a - 1] : Math.min(s[g - 1][a - 1], s[g][a - 1], s[g - 1][a]) + 1;
|
|
262
|
+
return s[o.length][l.length];
|
|
263
|
+
}, si = (o) => new Promise((l) => {
|
|
263
264
|
const s = new Image();
|
|
264
|
-
s.onload = () =>
|
|
265
|
-
}), sn = async (o,
|
|
265
|
+
s.onload = () => l(s), s.onerror = () => l(s), s.src = o;
|
|
266
|
+
}), sn = async (o, l) => {
|
|
266
267
|
const s = /* @__PURE__ */ new Map(), g = o.map(async (a) => {
|
|
267
|
-
const
|
|
268
|
-
s.set(a,
|
|
268
|
+
const E = await si(a);
|
|
269
|
+
s.set(a, E);
|
|
269
270
|
});
|
|
270
271
|
return await Promise.allSettled(g), s;
|
|
271
272
|
};
|
|
272
273
|
function li({
|
|
273
274
|
gameCubeSize: o,
|
|
274
|
-
screenHeight:
|
|
275
|
+
screenHeight: l,
|
|
275
276
|
screenWidth: s
|
|
276
277
|
}) {
|
|
277
278
|
const g = Z(null);
|
|
278
279
|
hn(() => (hi(), () => {
|
|
279
280
|
document.documentElement.style.overflow = "", document.body.style.overflow = "";
|
|
280
281
|
const i = document.getElementById("whats-missing-reset");
|
|
281
|
-
i && i.remove(),
|
|
282
|
+
i && i.remove(), P.current && P.current.abort();
|
|
282
283
|
}), []);
|
|
283
|
-
const [a,
|
|
284
|
+
const [a, E] = h(null), [M, an] = h([]), [D, zn] = h(4), [C, pn] = h(!1), [G, ln] = h(1), [k, Tn] = h(null), [v, F] = h("ready"), [cn, xn] = h(10), [q, K] = h(10), [O, Hn] = h(20), [Ln, J] = h(0), [U, Q] = h(!1), [Y, Wn] = h(""), [B, X] = h(!1), [nn, mn] = h(!1), [fn, A] = h(null), [Mn, en] = h([]), [Rn, un] = h([]), [n, Bn] = h(!1), [Cn, $] = h(1), [yn, N] = h(null), [S, An] = h(!1), [c, jn] = h(!1), [x, En] = h(!1), [H, Dn] = h(!1), [W, Gn] = h(!1), [m, Fn] = h(!1), [f, Un] = h(!1), [u, Yn] = h(!1), [y, $n] = h(!1), [tn, Nn] = h(!1), [z, Vn] = h(!1), wn = Z(/* @__PURE__ */ new Set()), V = Z(/* @__PURE__ */ new Map()), P = Z(null);
|
|
284
285
|
hn(() => {
|
|
285
286
|
const i = () => {
|
|
286
|
-
const e = s ?? window.innerWidth, t =
|
|
287
|
-
An(Jn),
|
|
287
|
+
const e = s ?? window.innerWidth, t = l ?? window.innerHeight, r = e < 768 || e === 926 && t === 428 || e === 932 && t === 430, b = t < 700, T = e / t > 1.8, I = e === 768 && t === 1024, on = e === 1024 && t === 768, j = e === 820 && t === 1180, L = e === 1180 && t === 820, R = e === 540 && t === 720, Sn = e === 720 && t === 540, vn = e === 1024 && t === 1366, Pn = e === 1366 && t === 1024, Jn = e >= 1200 && t >= 600 && !r;
|
|
288
|
+
An(Jn), jn(I), En(on), Dn(j), Gn(L), Fn(R), Un(Sn), Yn(vn), $n(Pn), Vn(T);
|
|
288
289
|
const Qn = r && e > t || r || // ✅ ВСЕ мобильные устройства (включая portrait)
|
|
289
290
|
t < 700 || T || // ✅ Широкие экраны
|
|
290
|
-
e === 1366 && t === 766 || e === 1366 && t === 768 || e === 1280 && t === 720 || e === 1440 && t === 900 ||
|
|
291
|
+
e === 1366 && t === 766 || e === 1366 && t === 768 || e === 1280 && t === 720 || e === 1440 && t === 900 || I || on || j || L || R || Sn || vn || Pn || S;
|
|
291
292
|
if (Nn(Qn), Bn(r), r)
|
|
292
293
|
N(o && o >= 320 ? o : null), $(1);
|
|
293
294
|
else if (b)
|
|
@@ -301,11 +302,11 @@ function li({
|
|
|
301
302
|
}
|
|
302
303
|
};
|
|
303
304
|
return i(), window.addEventListener("resize", i), () => window.removeEventListener("resize", i);
|
|
304
|
-
}, [s,
|
|
305
|
+
}, [s, l, o]);
|
|
305
306
|
const dn = (i) => [...i].sort(() => Math.random() - 0.5).slice(0, 6), Zn = (i) => {
|
|
306
|
-
|
|
307
|
+
P.current && P.current.abort(), P.current = new AbortController();
|
|
307
308
|
const t = _[i].map((r) => r.src);
|
|
308
|
-
sn(t,
|
|
309
|
+
sn(t, P.current.signal).then((r) => {
|
|
309
310
|
t.forEach((b) => {
|
|
310
311
|
wn.current.add(b), r.has(b) && V.current.set(b, r.get(b));
|
|
311
312
|
});
|
|
@@ -316,49 +317,49 @@ function li({
|
|
|
316
317
|
const i = dn(_[a]);
|
|
317
318
|
an(i), pn(!0), Q(!1), ln(1), J(0), en([]), un([]);
|
|
318
319
|
const e = i.map((t) => t.src);
|
|
319
|
-
sn(e,
|
|
320
|
+
sn(e, P.current?.signal).then((t) => {
|
|
320
321
|
e.forEach((r) => {
|
|
321
322
|
wn.current.add(r), t.has(r) && V.current.set(r, t.get(r));
|
|
322
323
|
});
|
|
323
324
|
}).catch(() => {
|
|
324
325
|
}), In(i, [], !0);
|
|
325
|
-
}, In = (i =
|
|
326
|
+
}, In = (i = M, e = Rn, t = !1) => {
|
|
326
327
|
const r = dn(i.length ? i : _[a]);
|
|
327
|
-
let b = Math.floor(Math.random() * r.length), T = r[b].name,
|
|
328
|
-
for (; e.includes(T) &&
|
|
329
|
-
b = Math.floor(Math.random() * r.length), T = r[b].name,
|
|
330
|
-
if (an(r), Tn(b), un([...e, T]), X(!1), Wn(""), Hn(20),
|
|
331
|
-
const
|
|
332
|
-
sn(
|
|
333
|
-
|
|
334
|
-
wn.current.add(
|
|
328
|
+
let b = Math.floor(Math.random() * r.length), T = r[b].name, I = 0;
|
|
329
|
+
for (; e.includes(T) && I < 20; )
|
|
330
|
+
b = Math.floor(Math.random() * r.length), T = r[b].name, I++;
|
|
331
|
+
if (an(r), Tn(b), un([...e, T]), X(!1), Wn(""), Hn(20), A(null), a && !t) {
|
|
332
|
+
const j = dn(_[a].filter((L) => !e.includes(L.name))).map((L) => L.src);
|
|
333
|
+
sn(j, P.current?.signal).then((L) => {
|
|
334
|
+
j.forEach((R) => {
|
|
335
|
+
wn.current.add(R), L.has(R) && V.current.set(R, L.get(R));
|
|
335
336
|
});
|
|
336
337
|
}).catch(() => {
|
|
337
338
|
});
|
|
338
339
|
}
|
|
339
|
-
t ? (F("ready"),
|
|
340
|
+
t ? (F("ready"), xn(10), K(10)) : (F("memorize"), K(10));
|
|
340
341
|
};
|
|
341
342
|
hn(() => {
|
|
342
|
-
if (!(!
|
|
343
|
-
if (
|
|
344
|
-
if (
|
|
343
|
+
if (!(!C || U || B)) {
|
|
344
|
+
if (v === "ready")
|
|
345
|
+
if (cn <= 0) F("memorize");
|
|
345
346
|
else {
|
|
346
|
-
const i = setTimeout(() =>
|
|
347
|
+
const i = setTimeout(() => xn((e) => e - 1), 1e3);
|
|
347
348
|
return () => clearTimeout(i);
|
|
348
349
|
}
|
|
349
|
-
if (
|
|
350
|
+
if (v === "memorize")
|
|
350
351
|
if (q <= 0) F("guess");
|
|
351
352
|
else {
|
|
352
353
|
const i = setTimeout(() => K((e) => e - 1), 1e3);
|
|
353
354
|
return () => clearTimeout(i);
|
|
354
355
|
}
|
|
355
|
-
if (
|
|
356
|
+
if (v === "guess") {
|
|
356
357
|
if (O <= 0) {
|
|
357
|
-
X(!0),
|
|
358
|
-
const e =
|
|
359
|
-
en((
|
|
360
|
-
...
|
|
361
|
-
{ round: G, answer: Y, correct:
|
|
358
|
+
X(!0), A("wrong");
|
|
359
|
+
const e = M[k].name, t = M[k].aliases, r = [e, ...t || []].join(", ");
|
|
360
|
+
en((b) => [
|
|
361
|
+
...b,
|
|
362
|
+
{ round: G, answer: Y, correct: r, result: "wrong" }
|
|
362
363
|
]);
|
|
363
364
|
return;
|
|
364
365
|
}
|
|
@@ -366,39 +367,43 @@ function li({
|
|
|
366
367
|
return () => clearTimeout(i);
|
|
367
368
|
}
|
|
368
369
|
}
|
|
369
|
-
}, [
|
|
370
|
+
}, [v, cn, q, O, C, U, B, M, k, G, Y]);
|
|
370
371
|
const _n = () => {
|
|
371
|
-
if (
|
|
372
|
-
const i =
|
|
373
|
-
let
|
|
374
|
-
|
|
372
|
+
if (k === null || nn) return;
|
|
373
|
+
const i = M[k].name, e = M[k].aliases, t = Y.toLowerCase().trim();
|
|
374
|
+
let r = "wrong";
|
|
375
|
+
const b = [i, ...e || []].map((I) => I.toLowerCase()), T = [i, ...e || []].join(", ");
|
|
376
|
+
b.includes(t) ? (J((I) => I + 1), A("correct"), r = "correct") : b.some((I) => gi(t, I) === 1) ? (J((I) => I + 0.5), A("almost"), r = "almost") : (A("wrong"), r = "wrong"), en((I) => [...I, { round: G, answer: t, correct: T, result: r }]), mn(!0), setTimeout(() => {
|
|
375
377
|
mn(!1), X(!0);
|
|
376
378
|
}, 600);
|
|
377
379
|
}, qn = () => G < D ? (ln((i) => i + 1), In()) : Q(!0), Kn = () => {
|
|
378
|
-
|
|
380
|
+
P.current && P.current.abort(), pn(!1), Q(!1), E(null);
|
|
379
381
|
}, On = ii(
|
|
380
|
-
() =>
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
382
|
+
() => {
|
|
383
|
+
const i = s ?? window.innerWidth, e = l ?? window.innerHeight, t = !n && i >= 1200 && i <= 1400;
|
|
384
|
+
return n && i > e || e < 700 && !t ? null : (
|
|
385
|
+
// ensure logo is positioned inside the square container
|
|
386
|
+
/* @__PURE__ */ d("div", { style: { ...w.gmLogoFixed, position: "absolute", top: 16, left: 16, zIndex: 30 }, children: /* @__PURE__ */ p("picture", { children: [
|
|
387
|
+
/* @__PURE__ */ d(
|
|
388
|
+
"source",
|
|
389
|
+
{
|
|
390
|
+
srcSet: window.origin + "/cloud/speakid/games/whatsmissing/logo.svg",
|
|
391
|
+
type: "image/svg+xml"
|
|
392
|
+
}
|
|
393
|
+
),
|
|
394
|
+
/* @__PURE__ */ d(
|
|
395
|
+
"img",
|
|
396
|
+
{
|
|
397
|
+
src: window.origin + "/cloud/speakid/games/whatsmissing/logo.png",
|
|
398
|
+
alt: "SPEAKID Logo",
|
|
399
|
+
style: w.gmLogoImg,
|
|
400
|
+
loading: "lazy"
|
|
401
|
+
}
|
|
402
|
+
)
|
|
403
|
+
] }) })
|
|
404
|
+
);
|
|
405
|
+
},
|
|
406
|
+
[n, s, l]
|
|
402
407
|
);
|
|
403
408
|
return /* @__PURE__ */ d(
|
|
404
409
|
"div",
|
|
@@ -451,7 +456,7 @@ function li({
|
|
|
451
456
|
},
|
|
452
457
|
children: /* @__PURE__ */ p("div", { id: "whats-missing-root", children: [
|
|
453
458
|
!n && On,
|
|
454
|
-
!a && !
|
|
459
|
+
!a && !C && /* @__PURE__ */ p("div", { style: w.gmCenterScreen, children: [
|
|
455
460
|
/* @__PURE__ */ d("h1", { style: w.gmHeadline1, children: "WHAT'S MISSING?" }),
|
|
456
461
|
/* @__PURE__ */ d("p", { style: w.gmBodyM, children: "Select a theme:" }),
|
|
457
462
|
/* @__PURE__ */ d("div", { style: { display: "flex", gap: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "8px" : "16px" }, children: ["animals", "food", "toys"].map((i) => /* @__PURE__ */ d("button", { style: {
|
|
@@ -460,7 +465,7 @@ function li({
|
|
|
460
465
|
fontSize: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "12px" : "16px",
|
|
461
466
|
minWidth: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "70px" : "auto"
|
|
462
467
|
}, onClick: () => {
|
|
463
|
-
|
|
468
|
+
E(i), Zn(i);
|
|
464
469
|
}, children: i === "animals" ? "🐶 Animals" : i === "food" ? "🍎 Food" : "🧸 Toys" }, i)) }),
|
|
465
470
|
/* @__PURE__ */ p("div", { style: { marginTop: 24 }, children: [
|
|
466
471
|
/* @__PURE__ */ d("p", { style: w.gmBodyS, children: "Choose number of rounds:" }),
|
|
@@ -481,7 +486,7 @@ function li({
|
|
|
481
486
|
)) })
|
|
482
487
|
] })
|
|
483
488
|
] }),
|
|
484
|
-
a && !
|
|
489
|
+
a && !C && /* @__PURE__ */ p("div", { style: w.gmCenterScreen, children: [
|
|
485
490
|
/* @__PURE__ */ p("h1", { style: w.gmHeadline1, children: [
|
|
486
491
|
"Theme selected: ",
|
|
487
492
|
a
|
|
@@ -500,29 +505,29 @@ function li({
|
|
|
500
505
|
U && /* @__PURE__ */ p("div", { style: w.gmCenterScreen, children: [
|
|
501
506
|
/* @__PURE__ */ d("h1", { style: {
|
|
502
507
|
...w.gmHeadline1,
|
|
503
|
-
marginTop: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ||
|
|
504
|
-
marginBottom: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ||
|
|
508
|
+
marginTop: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || c || x || H || W || m || f || u || y ? "0px" : w.gmHeadline1.marginTop,
|
|
509
|
+
marginBottom: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || c || x || H || W || m || f || u || y ? "2px" : w.gmHeadline1.marginBottom
|
|
505
510
|
}, children: "Results" }),
|
|
506
511
|
/* @__PURE__ */ p("h2", { style: {
|
|
507
512
|
...w.gmHeadline3,
|
|
508
|
-
marginTop: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ||
|
|
509
|
-
marginBottom: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ||
|
|
513
|
+
marginTop: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || c || x || H || W || m || f || u || y ? "0px" : w.gmHeadline3.marginTop,
|
|
514
|
+
marginBottom: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || c || x || H || W || m || f || u || y ? "2px" : w.gmHeadline3.marginBottom
|
|
510
515
|
}, children: [
|
|
511
516
|
"Your score: ",
|
|
512
|
-
|
|
517
|
+
Ln,
|
|
513
518
|
" / ",
|
|
514
519
|
D
|
|
515
520
|
] }),
|
|
516
521
|
/* @__PURE__ */ d("p", { style: {
|
|
517
522
|
...w.gmBodyM,
|
|
518
523
|
color: "#10b981",
|
|
519
|
-
marginTop: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ||
|
|
520
|
-
marginBottom: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ||
|
|
524
|
+
marginTop: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || c || x || H || W || m || f || u || y ? "0px" : "12px",
|
|
525
|
+
marginBottom: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || c || x || H || W || m || f || u || y ? "2px" : w.gmBodyM.marginBottom
|
|
521
526
|
}, children: "Yahoo! You did it! 🍬✨" }),
|
|
522
527
|
/* @__PURE__ */ p("table", { style: {
|
|
523
528
|
...w.gmTable,
|
|
524
|
-
marginTop: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ||
|
|
525
|
-
marginBottom: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ||
|
|
529
|
+
marginTop: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || c || x || H || W || m || f || u || y ? "0px" : "20px",
|
|
530
|
+
marginBottom: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || c || x || H || W || m || f || u || y ? "4px" : "32px"
|
|
526
531
|
}, children: [
|
|
527
532
|
/* @__PURE__ */ d("thead", { children: /* @__PURE__ */ p("tr", { children: [
|
|
528
533
|
/* @__PURE__ */ d("th", { children: "Round" }),
|
|
@@ -530,7 +535,7 @@ function li({
|
|
|
530
535
|
/* @__PURE__ */ d("th", { children: "Correct" }),
|
|
531
536
|
/* @__PURE__ */ d("th", { children: "Result" })
|
|
532
537
|
] }) }),
|
|
533
|
-
/* @__PURE__ */ d("tbody", { children:
|
|
538
|
+
/* @__PURE__ */ d("tbody", { children: Mn.map((i, e) => /* @__PURE__ */ p("tr", { children: [
|
|
534
539
|
/* @__PURE__ */ d("td", { style: w.gmTableCell, children: i.round }),
|
|
535
540
|
/* @__PURE__ */ d("td", { style: w.gmTableCell, children: i.answer || "—" }),
|
|
536
541
|
/* @__PURE__ */ d("td", { style: w.gmTableCell, children: i.correct }),
|
|
@@ -540,7 +545,7 @@ function li({
|
|
|
540
545
|
/* @__PURE__ */ p("div", { style: {
|
|
541
546
|
display: "flex",
|
|
542
547
|
gap: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "6px" : "12px",
|
|
543
|
-
marginTop: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "2px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 ||
|
|
548
|
+
marginTop: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "2px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || S ? "12px" : "24px"
|
|
544
549
|
}, children: [
|
|
545
550
|
/* @__PURE__ */ d("button", { style: {
|
|
546
551
|
...w.gmButton,
|
|
@@ -556,29 +561,29 @@ function li({
|
|
|
556
561
|
}, onClick: Kn, children: "⬅️ Choose theme" })
|
|
557
562
|
] })
|
|
558
563
|
] }),
|
|
559
|
-
|
|
564
|
+
C && !U && /* @__PURE__ */ p("div", { style: w.gmGameLayout, children: [
|
|
560
565
|
/* @__PURE__ */ p(
|
|
561
566
|
"div",
|
|
562
567
|
{
|
|
563
568
|
style: {
|
|
564
|
-
minHeight: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "45px" :
|
|
569
|
+
minHeight: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "45px" : z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "50px" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "60px" : "160px",
|
|
565
570
|
display: "flex",
|
|
566
571
|
flexDirection: "column",
|
|
567
572
|
justifyContent: "center",
|
|
568
573
|
alignItems: "center",
|
|
569
|
-
paddingTop: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ||
|
|
574
|
+
paddingTop: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "8px" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "15px" : "40px"
|
|
570
575
|
},
|
|
571
576
|
children: [
|
|
572
|
-
|
|
577
|
+
v === "ready" && /* @__PURE__ */ p(kn, { children: [
|
|
573
578
|
/* @__PURE__ */ d("h1", { style: { ...w.gmHeadline1, color: "#ec4c44" }, children: "GET READY" }),
|
|
574
579
|
/* @__PURE__ */ d("div", { style: w.gmHourglass, children: "⏳" })
|
|
575
580
|
] }),
|
|
576
|
-
|
|
581
|
+
v === "memorize" && /* @__PURE__ */ p("p", { style: { ...w.gmBodyM, color: "#10b981" }, children: [
|
|
577
582
|
"MEMORIZE (",
|
|
578
583
|
q,
|
|
579
584
|
")"
|
|
580
585
|
] }),
|
|
581
|
-
|
|
586
|
+
v === "guess" && !B && /* @__PURE__ */ p("p", { style: w.gmBodyM, children: [
|
|
582
587
|
"⏳ Time left: ",
|
|
583
588
|
O,
|
|
584
589
|
"s"
|
|
@@ -586,24 +591,24 @@ function li({
|
|
|
586
591
|
]
|
|
587
592
|
}
|
|
588
593
|
),
|
|
589
|
-
|
|
594
|
+
v !== "ready" && /* @__PURE__ */ d(
|
|
590
595
|
"div",
|
|
591
596
|
{
|
|
592
597
|
style: {
|
|
593
598
|
...w.gmGrid,
|
|
594
|
-
...
|
|
599
|
+
...z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? { width: "100%" } : {},
|
|
595
600
|
// ✅ Широкие экраны: полная ширина грида
|
|
596
|
-
gridTemplateColumns: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "repeat(3, 1fr)" : n ? "repeat(2, 1fr)" : window.innerHeight < 700 ? "repeat(3, 1fr)" : typeof window < "u" && window.innerWidth === 1280 && window.innerHeight === 720 ? "repeat(3, 130px)" :
|
|
601
|
+
gridTemplateColumns: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "repeat(3, 1fr)" : n ? "repeat(2, 1fr)" : window.innerHeight < 700 ? "repeat(3, 1fr)" : typeof window < "u" && window.innerWidth === 1280 && window.innerHeight === 720 ? "repeat(3, 130px)" : z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "repeat(3, 150px)" : "repeat(3, 210px)",
|
|
597
602
|
// desktop: 3 колонки фиксированного размера
|
|
598
|
-
gridAutoRows: n && window.innerWidth > window.innerHeight ? "120px" : n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "100px" : n ? "150px" : window.innerHeight < 700 ? "140px" : typeof window < "u" && window.devicePixelRatio >= 1.25 && window.devicePixelRatio <= 1.5 ? "240px" : typeof window < "u" && window.innerWidth === 1280 && window.innerHeight === 720 ? "130px" :
|
|
603
|
+
gridAutoRows: n && window.innerWidth > window.innerHeight ? "120px" : n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "100px" : n ? "150px" : window.innerHeight < 700 ? "140px" : typeof window < "u" && window.devicePixelRatio >= 1.25 && window.devicePixelRatio <= 1.5 ? "240px" : typeof window < "u" && window.innerWidth === 1280 && window.innerHeight === 720 ? "130px" : z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "150px" : "210px",
|
|
599
604
|
// desktop: стандартная высота
|
|
600
|
-
gap: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "12px" : n || window.innerHeight < 700 ? "8px" : typeof window < "u" && window.devicePixelRatio >= 1.25 && window.devicePixelRatio <= 1.5 ? "24px" :
|
|
605
|
+
gap: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "12px" : n || window.innerHeight < 700 ? "8px" : typeof window < "u" && window.devicePixelRatio >= 1.25 && window.devicePixelRatio <= 1.5 ? "24px" : z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "12px" : "20px",
|
|
601
606
|
justifyItems: "center",
|
|
602
607
|
maxWidth: n && window.innerWidth > window.innerHeight ? "90%" : n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "95%" : "100%",
|
|
603
|
-
padding: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "8px" : typeof window < "u" && window.devicePixelRatio >= 1.25 && window.devicePixelRatio <= 1.5 ? "20px" :
|
|
608
|
+
padding: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "8px" : typeof window < "u" && window.devicePixelRatio >= 1.25 && window.devicePixelRatio <= 1.5 ? "20px" : z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "10px" : "16px"
|
|
604
609
|
},
|
|
605
|
-
children:
|
|
606
|
-
const t =
|
|
610
|
+
children: M.map((i, e) => {
|
|
611
|
+
const t = k === e && v === "guess" && !B;
|
|
607
612
|
return /* @__PURE__ */ d(
|
|
608
613
|
"div",
|
|
609
614
|
{
|
|
@@ -615,11 +620,11 @@ function li({
|
|
|
615
620
|
boxShadow: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "0 1px 4px rgba(0,0,0,0.1)" : "0 4px 12px rgba(0,0,0,0.15)",
|
|
616
621
|
transition: "all 0.3s ease",
|
|
617
622
|
cursor: "pointer",
|
|
618
|
-
...fn === "correct" &&
|
|
623
|
+
...fn === "correct" && k === e ? {
|
|
619
624
|
boxShadow: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "0 0 15px #10b981" : "0 0 20px #10b981",
|
|
620
625
|
transform: "scale(1.03)"
|
|
621
626
|
} : {},
|
|
622
|
-
...fn === "wrong" &&
|
|
627
|
+
...fn === "wrong" && k === e ? {
|
|
623
628
|
boxShadow: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "0 0 15px #ef4444" : "0 0 20px #ef4444",
|
|
624
629
|
transform: "scale(1.03)"
|
|
625
630
|
} : {}
|
|
@@ -650,17 +655,17 @@ function li({
|
|
|
650
655
|
}
|
|
651
656
|
),
|
|
652
657
|
/* @__PURE__ */ p("div", { style: {
|
|
653
|
-
marginTop: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "1px" :
|
|
654
|
-
height: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "40px" :
|
|
658
|
+
marginTop: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "1px" : z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "4px" : "16px",
|
|
659
|
+
height: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "40px" : z || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "50px" : "80px"
|
|
655
660
|
}, children: [
|
|
656
|
-
|
|
661
|
+
v === "guess" && !B && /* @__PURE__ */ d("div", { style: {
|
|
657
662
|
display: "flex",
|
|
658
663
|
flexDirection: tn ? "row" : "column",
|
|
659
|
-
gap: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "3px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 ||
|
|
664
|
+
gap: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "3px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || S || c || x || H || W || m || f || u || y ? "8px" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "6px" : "12px",
|
|
660
665
|
alignItems: "center",
|
|
661
666
|
justifyContent: "center",
|
|
662
667
|
width: "100%",
|
|
663
|
-
maxWidth: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "270px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 ||
|
|
668
|
+
maxWidth: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "270px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || S || c || x || H || W || m || f || u || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "400px" : "300px"
|
|
664
669
|
}, children: /* @__PURE__ */ p(kn, { children: [
|
|
665
670
|
/* @__PURE__ */ d(
|
|
666
671
|
"input",
|
|
@@ -671,9 +676,9 @@ function li({
|
|
|
671
676
|
onChange: (i) => Wn(i.target.value),
|
|
672
677
|
style: {
|
|
673
678
|
...w.gmInput,
|
|
674
|
-
width: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "170px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 ||
|
|
675
|
-
padding: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "5px 6px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 ||
|
|
676
|
-
fontSize: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 ? "10px" : window.innerWidth === 896 && window.innerHeight === 414 ? "11px" : window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "10px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 ||
|
|
679
|
+
width: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "170px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || S || c || x || H || W || m || f || u || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "250px" : "auto",
|
|
680
|
+
padding: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "5px 6px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || S || c || x || H || W || m || f || u || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "10px 12px" : "12px 16px",
|
|
681
|
+
fontSize: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 ? "10px" : window.innerWidth === 896 && window.innerHeight === 414 ? "11px" : window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "10px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || S || c || x || H || W || m || f || u || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "14px" : "16px",
|
|
677
682
|
flex: tn ? "1" : "none"
|
|
678
683
|
}
|
|
679
684
|
}
|
|
@@ -684,9 +689,9 @@ function li({
|
|
|
684
689
|
style: {
|
|
685
690
|
...w.gmButton,
|
|
686
691
|
marginLeft: tn ? "8px" : "0",
|
|
687
|
-
padding: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "5px 8px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "6px 10px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 ||
|
|
688
|
-
fontSize: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "10px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "11px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 ||
|
|
689
|
-
minWidth: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "45px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "55px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 ||
|
|
692
|
+
padding: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "5px 8px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "6px 10px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || S || c || x || H || W || m || f || u || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "10px 16px" : "12px 24px",
|
|
693
|
+
fontSize: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "10px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "11px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || S || c || x || H || W || m || f || u || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "14px" : "16px",
|
|
694
|
+
minWidth: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "45px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "55px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || S || c || x || H || W || m || f || u || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "80px" : "100px",
|
|
690
695
|
flexShrink: 0
|
|
691
696
|
},
|
|
692
697
|
onClick: _n,
|
|
@@ -695,10 +700,10 @@ function li({
|
|
|
695
700
|
}
|
|
696
701
|
)
|
|
697
702
|
] }) }),
|
|
698
|
-
|
|
703
|
+
B && /* @__PURE__ */ d("button", { style: {
|
|
699
704
|
...w.gmButton,
|
|
700
|
-
padding: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "5px 8px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "6px 10px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 ||
|
|
701
|
-
fontSize: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "10px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "11px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 ||
|
|
705
|
+
padding: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "5px 8px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "6px 10px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || S || c || x || H || W || m || f || u || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "10px 16px" : "12px 24px",
|
|
706
|
+
fontSize: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "10px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "11px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || S || c || x || H || W || m || f || u || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "14px" : "16px"
|
|
702
707
|
}, onClick: qn, children: "Next round" })
|
|
703
708
|
] })
|
|
704
709
|
] })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mblinkov/whats-missing",
|
|
3
|
-
"version": "20.0.
|
|
3
|
+
"version": "20.0.53",
|
|
4
4
|
"description": "A memory game component for React - Guess what's missing from a collection of images",
|
|
5
5
|
"main": "dist/whats-missing.cjs.js",
|
|
6
6
|
"module": "dist/whats-missing.es.js",
|