@mblinkov/whats-missing 20.0.52 → 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/dist/whats-missing.cjs.js +2 -2
- package/dist/whats-missing.es.js +87 -84
- package/package.json +1 -1
|
@@ -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 y=document.getElementById("whats-missing-reset");y&&y.remove(),document.head.appendChild(r)},wi=(r,y)=>{const a=Array.from({length:r.length+1},()=>Array(y.length+1).fill(0));for(let s=0;s<=r.length;s++)a[s][0]=s;for(let s=0;s<=y.length;s++)a[0][s]=s;for(let s=1;s<=r.length;s++)for(let g=1;g<=y.length;g++)a[s][g]=r[s-1]===y[g-1]?a[s-1][g-1]:Math.min(a[s-1][g-1],a[s][g-1],a[s-1][g])+1;return a[r.length][y.length]},di=r=>new Promise(y=>{const a=new Image;a.onload=()=>y(a),a.onerror=()=>y(a),a.src=r}),rn=async(r,y)=>{const a=new Map,s=r.map(async g=>{const E=await di(g);a.set(g,E)});return await Promise.allSettled(s),a};function oi({gameCubeSize:r,screenHeight:y,screenWidth:a}){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[g,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),[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),[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=a??window.innerWidth,w=y??window.innerHeight,h=t<768||t===926&&w===428||t===932&&w===430,f=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(f)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)},[a,y,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(f=>{en.current.add(f),h.has(f)&&N.current.set(f,h.get(f))})}).catch(()=>{})},un=()=>{if(!g)return;const e=tn(A[g]);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[g]);let f=Math.floor(Math.random()*h.length),k=h[f].name,b=0;for(;t.includes(k)&&b<20;)f=Math.floor(Math.random()*h.length),k=h[f].name,b++;if(hn(h),In(f),Wn([...t,k]),J(!1),xn(""),ln(20),B(null),g&&!w){const C=tn(A[g].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(f=>[...f,{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 f=[e,...t||[]].map(b=>b.toLowerCase()),k=[e,...t||[]].join(", ");f.includes(w)?(_(b=>b+1),B("correct"),h="correct"):f.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(()=>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,!g&&!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))})]})]}),g&&!L&&i.jsxs("div",{style:o.gmCenterScreen,children:[i.jsxs("h1",{style:o.gmHeadline1,children:["Theme selected: ",g]}),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||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),f=h?.complete&&h.src?h.src:e.src;return i.jsx("img",{src:f,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||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||S||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||S||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||S||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||S||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||S||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||S||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||S||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"})]})}),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||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||S||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,9 +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}${
|
|
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
5
|
name: g,
|
|
6
|
-
aliases:
|
|
6
|
+
aliases: a?.length ? a : void 0
|
|
7
7
|
})), ti = [
|
|
8
8
|
["apple", "apple"],
|
|
9
9
|
["banana", "banana"],
|
|
@@ -250,30 +250,30 @@ const ri = {
|
|
|
250
250
|
overflow: hidden !important;
|
|
251
251
|
}
|
|
252
252
|
`;
|
|
253
|
-
const
|
|
254
|
-
|
|
255
|
-
}, gi = (o,
|
|
256
|
-
const
|
|
257
|
-
for (let g = 0; g <= o.length; g++)
|
|
258
|
-
for (let g = 0; g <=
|
|
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));
|
|
257
|
+
for (let g = 0; g <= o.length; g++) s[g][0] = g;
|
|
258
|
+
for (let g = 0; g <= l.length; g++) s[0][g] = g;
|
|
259
259
|
for (let g = 1; g <= o.length; g++)
|
|
260
|
-
for (let
|
|
261
|
-
|
|
262
|
-
return
|
|
263
|
-
}, si = (o) => new Promise((
|
|
264
|
-
const
|
|
265
|
-
|
|
266
|
-
}), sn = async (o,
|
|
267
|
-
const
|
|
268
|
-
const E = await si(
|
|
269
|
-
|
|
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) => {
|
|
264
|
+
const s = new Image();
|
|
265
|
+
s.onload = () => l(s), s.onerror = () => l(s), s.src = o;
|
|
266
|
+
}), sn = async (o, l) => {
|
|
267
|
+
const s = /* @__PURE__ */ new Map(), g = o.map(async (a) => {
|
|
268
|
+
const E = await si(a);
|
|
269
|
+
s.set(a, E);
|
|
270
270
|
});
|
|
271
|
-
return await Promise.allSettled(g),
|
|
271
|
+
return await Promise.allSettled(g), s;
|
|
272
272
|
};
|
|
273
273
|
function li({
|
|
274
274
|
gameCubeSize: o,
|
|
275
|
-
screenHeight:
|
|
276
|
-
screenWidth:
|
|
275
|
+
screenHeight: l,
|
|
276
|
+
screenWidth: s
|
|
277
277
|
}) {
|
|
278
278
|
const g = Z(null);
|
|
279
279
|
hn(() => (hi(), () => {
|
|
@@ -281,17 +281,17 @@ function li({
|
|
|
281
281
|
const i = document.getElementById("whats-missing-reset");
|
|
282
282
|
i && i.remove(), P.current && P.current.abort();
|
|
283
283
|
}), []);
|
|
284
|
-
const [
|
|
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);
|
|
285
285
|
hn(() => {
|
|
286
286
|
const i = () => {
|
|
287
|
-
const e =
|
|
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
288
|
An(Jn), jn(I), En(on), Dn(j), Gn(L), Fn(R), Un(Sn), Yn(vn), $n(Pn), Vn(T);
|
|
289
289
|
const Qn = r && e > t || r || // ✅ ВСЕ мобильные устройства (включая portrait)
|
|
290
290
|
t < 700 || T || // ✅ Широкие экраны
|
|
291
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;
|
|
292
292
|
if (Nn(Qn), Bn(r), r)
|
|
293
293
|
N(o && o >= 320 ? o : null), $(1);
|
|
294
|
-
else if (
|
|
294
|
+
else if (b)
|
|
295
295
|
N(o && o >= 400 ? o : null), $(1);
|
|
296
296
|
else if (T) {
|
|
297
297
|
const rn = o ? Math.max(400, Math.min(1200, o)) : Math.min(1e3, Math.min(e, t) * 0.9);
|
|
@@ -302,19 +302,19 @@ function li({
|
|
|
302
302
|
}
|
|
303
303
|
};
|
|
304
304
|
return i(), window.addEventListener("resize", i), () => window.removeEventListener("resize", i);
|
|
305
|
-
}, [
|
|
305
|
+
}, [s, l, o]);
|
|
306
306
|
const dn = (i) => [...i].sort(() => Math.random() - 0.5).slice(0, 6), Zn = (i) => {
|
|
307
307
|
P.current && P.current.abort(), P.current = new AbortController();
|
|
308
308
|
const t = _[i].map((r) => r.src);
|
|
309
309
|
sn(t, P.current.signal).then((r) => {
|
|
310
|
-
t.forEach((
|
|
311
|
-
wn.current.add(
|
|
310
|
+
t.forEach((b) => {
|
|
311
|
+
wn.current.add(b), r.has(b) && V.current.set(b, r.get(b));
|
|
312
312
|
});
|
|
313
313
|
}).catch(() => {
|
|
314
314
|
});
|
|
315
315
|
}, bn = () => {
|
|
316
|
-
if (!
|
|
317
|
-
const i = dn(_[
|
|
316
|
+
if (!a) return;
|
|
317
|
+
const i = dn(_[a]);
|
|
318
318
|
an(i), pn(!0), Q(!1), ln(1), J(0), en([]), un([]);
|
|
319
319
|
const e = i.map((t) => t.src);
|
|
320
320
|
sn(e, P.current?.signal).then((t) => {
|
|
@@ -324,12 +324,12 @@ function li({
|
|
|
324
324
|
}).catch(() => {
|
|
325
325
|
}), In(i, [], !0);
|
|
326
326
|
}, In = (i = M, e = Rn, t = !1) => {
|
|
327
|
-
const r = dn(i.length ? i : _[
|
|
328
|
-
let
|
|
327
|
+
const r = dn(i.length ? i : _[a]);
|
|
328
|
+
let b = Math.floor(Math.random() * r.length), T = r[b].name, I = 0;
|
|
329
329
|
for (; e.includes(T) && I < 20; )
|
|
330
|
-
|
|
331
|
-
if (an(r), Tn(
|
|
332
|
-
const j = dn(_[
|
|
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
333
|
sn(j, P.current?.signal).then((L) => {
|
|
334
334
|
j.forEach((R) => {
|
|
335
335
|
wn.current.add(R), L.has(R) && V.current.set(R, L.get(R));
|
|
@@ -357,8 +357,8 @@ function li({
|
|
|
357
357
|
if (O <= 0) {
|
|
358
358
|
X(!0), A("wrong");
|
|
359
359
|
const e = M[k].name, t = M[k].aliases, r = [e, ...t || []].join(", ");
|
|
360
|
-
en((
|
|
361
|
-
...
|
|
360
|
+
en((b) => [
|
|
361
|
+
...b,
|
|
362
362
|
{ round: G, answer: Y, correct: r, result: "wrong" }
|
|
363
363
|
]);
|
|
364
364
|
return;
|
|
@@ -372,35 +372,38 @@ function li({
|
|
|
372
372
|
if (k === null || nn) return;
|
|
373
373
|
const i = M[k].name, e = M[k].aliases, t = Y.toLowerCase().trim();
|
|
374
374
|
let r = "wrong";
|
|
375
|
-
const
|
|
376
|
-
|
|
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(() => {
|
|
377
377
|
mn(!1), X(!0);
|
|
378
378
|
}, 600);
|
|
379
379
|
}, qn = () => G < D ? (ln((i) => i + 1), In()) : Q(!0), Kn = () => {
|
|
380
380
|
P.current && P.current.abort(), pn(!1), Q(!1), E(null);
|
|
381
381
|
}, On = ii(
|
|
382
|
-
() =>
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
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]
|
|
404
407
|
);
|
|
405
408
|
return /* @__PURE__ */ d(
|
|
406
409
|
"div",
|
|
@@ -453,7 +456,7 @@ function li({
|
|
|
453
456
|
},
|
|
454
457
|
children: /* @__PURE__ */ p("div", { id: "whats-missing-root", children: [
|
|
455
458
|
!n && On,
|
|
456
|
-
!
|
|
459
|
+
!a && !C && /* @__PURE__ */ p("div", { style: w.gmCenterScreen, children: [
|
|
457
460
|
/* @__PURE__ */ d("h1", { style: w.gmHeadline1, children: "WHAT'S MISSING?" }),
|
|
458
461
|
/* @__PURE__ */ d("p", { style: w.gmBodyM, children: "Select a theme:" }),
|
|
459
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: {
|
|
@@ -483,10 +486,10 @@ function li({
|
|
|
483
486
|
)) })
|
|
484
487
|
] })
|
|
485
488
|
] }),
|
|
486
|
-
|
|
489
|
+
a && !C && /* @__PURE__ */ p("div", { style: w.gmCenterScreen, children: [
|
|
487
490
|
/* @__PURE__ */ p("h1", { style: w.gmHeadline1, children: [
|
|
488
491
|
"Theme selected: ",
|
|
489
|
-
|
|
492
|
+
a
|
|
490
493
|
] }),
|
|
491
494
|
/* @__PURE__ */ p("p", { style: w.gmBodyM, children: [
|
|
492
495
|
"Rounds: ",
|
|
@@ -502,13 +505,13 @@ function li({
|
|
|
502
505
|
U && /* @__PURE__ */ p("div", { style: w.gmCenterScreen, children: [
|
|
503
506
|
/* @__PURE__ */ d("h1", { style: {
|
|
504
507
|
...w.gmHeadline1,
|
|
505
|
-
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 ||
|
|
506
|
-
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
|
|
507
510
|
}, children: "Results" }),
|
|
508
511
|
/* @__PURE__ */ p("h2", { style: {
|
|
509
512
|
...w.gmHeadline3,
|
|
510
|
-
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 ||
|
|
511
|
-
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
|
|
512
515
|
}, children: [
|
|
513
516
|
"Your score: ",
|
|
514
517
|
Ln,
|
|
@@ -518,13 +521,13 @@ function li({
|
|
|
518
521
|
/* @__PURE__ */ d("p", { style: {
|
|
519
522
|
...w.gmBodyM,
|
|
520
523
|
color: "#10b981",
|
|
521
|
-
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 ||
|
|
522
|
-
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
|
|
523
526
|
}, children: "Yahoo! You did it! 🍬✨" }),
|
|
524
527
|
/* @__PURE__ */ p("table", { style: {
|
|
525
528
|
...w.gmTable,
|
|
526
|
-
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 ||
|
|
527
|
-
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"
|
|
528
531
|
}, children: [
|
|
529
532
|
/* @__PURE__ */ d("thead", { children: /* @__PURE__ */ p("tr", { children: [
|
|
530
533
|
/* @__PURE__ */ d("th", { children: "Round" }),
|
|
@@ -627,11 +630,11 @@ function li({
|
|
|
627
630
|
} : {}
|
|
628
631
|
},
|
|
629
632
|
children: !t && (() => {
|
|
630
|
-
const r = V.current.get(i.src),
|
|
633
|
+
const r = V.current.get(i.src), b = r?.complete && r.src ? r.src : i.src;
|
|
631
634
|
return /* @__PURE__ */ d(
|
|
632
635
|
"img",
|
|
633
636
|
{
|
|
634
|
-
src:
|
|
637
|
+
src: b,
|
|
635
638
|
alt: i.name,
|
|
636
639
|
fetchPriority: "high",
|
|
637
640
|
loading: "eager",
|
|
@@ -658,11 +661,11 @@ function li({
|
|
|
658
661
|
v === "guess" && !B && /* @__PURE__ */ d("div", { style: {
|
|
659
662
|
display: "flex",
|
|
660
663
|
flexDirection: tn ? "row" : "column",
|
|
661
|
-
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 ||
|
|
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",
|
|
662
665
|
alignItems: "center",
|
|
663
666
|
justifyContent: "center",
|
|
664
667
|
width: "100%",
|
|
665
|
-
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 ||
|
|
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"
|
|
666
669
|
}, children: /* @__PURE__ */ p(kn, { children: [
|
|
667
670
|
/* @__PURE__ */ d(
|
|
668
671
|
"input",
|
|
@@ -673,9 +676,9 @@ function li({
|
|
|
673
676
|
onChange: (i) => Wn(i.target.value),
|
|
674
677
|
style: {
|
|
675
678
|
...w.gmInput,
|
|
676
|
-
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 ||
|
|
677
|
-
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 ||
|
|
678
|
-
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 ||
|
|
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",
|
|
679
682
|
flex: tn ? "1" : "none"
|
|
680
683
|
}
|
|
681
684
|
}
|
|
@@ -686,9 +689,9 @@ function li({
|
|
|
686
689
|
style: {
|
|
687
690
|
...w.gmButton,
|
|
688
691
|
marginLeft: tn ? "8px" : "0",
|
|
689
|
-
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 ||
|
|
690
|
-
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 ||
|
|
691
|
-
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 ||
|
|
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",
|
|
692
695
|
flexShrink: 0
|
|
693
696
|
},
|
|
694
697
|
onClick: _n,
|
|
@@ -699,8 +702,8 @@ function li({
|
|
|
699
702
|
] }) }),
|
|
700
703
|
B && /* @__PURE__ */ d("button", { style: {
|
|
701
704
|
...w.gmButton,
|
|
702
|
-
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 ||
|
|
703
|
-
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 ||
|
|
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"
|
|
704
707
|
}, onClick: qn, children: "Next round" })
|
|
705
708
|
] })
|
|
706
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",
|