-
Notifications
You must be signed in to change notification settings - Fork 164
/
index.html
1 lines (1 loc) · 34.5 KB
/
index.html
1
<!DOCTYPE html><html lang="fr"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Tindeath</title><style>#bgo{position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}#bgw{position:absolute;top:-10%;left:0;width:110%;height:120%;filter:blur(15px);animation:bga 2s ease-out}@keyframes bga{0%{transform:translateX(100%)}100%{transform:translateX(0)}}#background{width:100%;height:100%;background:linear-gradient(180deg,#2e2541 0,#2f605f 15%,#59b7a1 34%,#e7bc65 56%,#7a1e38 100%);clip-path:polygon(100% 0,40% 0,41% 5%,40% 15%,45% 25%,42% 33%,50% 60%,40% 80%,46% 100%,100% 100%)}#bD{position:absolute;top:40px;left:calc(50% - 76px);width:152px;height:196px;border-radius:80px 80px 0 0;background:linear-gradient(80deg,#1c0a0a 40%,#9cedd9);box-shadow:inset 18px 10px 10px #d99d62,inset 0 0 0 20px #f99f79,inset 42px 10px 4px #813737,inset 0 0 0 40px #377c81,inset 46px 34px 0 rgba(0,0,0,.6)}#clouds svg{position:absolute;fill:rgba(255,255,255,.5);filter:drop-shadow(0 0 10px rgba(0, 0, 0, .5));animation:clouds 3s ease infinite alternate}#clouds svg:nth-child(-n+3){fill:rgba(50,0,0,.5)}#clouds svg:nth-child(2n){transform:scaleX(-1)}#clouds svg:nth-child(3n){transform:scale(.9)}@keyframes clouds{0%{transform:translateY(0)}100%{transform:translateY(-20%)}}*{margin:0;padding:0}*,::after,::before{box-sizing:border-box}html{font-family:Verdana,Geneva,Tahoma,sans-serif;line-height:1.2;color:#fff;height:100%;overflow:hidden}body{display:flex;background:linear-gradient(159deg,#311 0,#b83939 40%,#441515 80%);overflow:hidden;width:100%;height:100%;font-size:16px}body:before{content:"";position:fixed;top:0;left:0;width:100%;height:470px;background:linear-gradient(180deg,#111 0,transparent 57%);z-index:2}button{display:block;padding:16px;margin:24px auto 0;width:100%;max-width:400px;border:none;background-color:#2f9658;color:#fff;font-weight:700;font-size:24px;box-shadow:4px 4px 0 rgba(0,0,0,.5);border-radius:10px;cursor:pointer;transition:all 250ms ease}button:hover{background:#6db58a}#help{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);margin:0;z-index:9}#help ul{margin-top:12px}#help li{text-align:left;margin:8px 0}#help:not(.-active){display:none}#helpClose{position:absolute;top:0;right:0;padding:8px;font-size:20px;font-weight:700;cursor:pointer}#helpButton,#soundButton{position:fixed;bottom:10px;right:10px;padding:8px;font-size:30px;cursor:pointer;z-index:8}@media (min-width:768px){#helpButton,#soundButton{font-size:42px}}#helpButton{right:60px}#helpButton:not(.-active){display:none}#helpButton.-blink{animation:blink 1s infinite}@media (min-width:768px){#helpButton{right:80px}}@keyframes blink{50%{opacity:0}}#home{display:flex;flex-direction:column;justify-content:space-around;height:80vh}h1{display:flex;align-items:center;justify-content:center;font-size:48px;animation:logo 2s ease-out}h1 svg{margin-right:16px;width:60px}@keyframes logo{0%{transform:scale(0);opacity:0}100%{transform:scale(1);opacity:1}}.appear{opacity:0;animation:appear 1s ease-out 1.5s forwards;margin-bottom:12px}@keyframes appear{0%{transform:scale(0);opacity:0}100%{transform:scale(1);opacity:1}}#cardList{position:relative;width:100%;height:100%;max-height:470px;max-width:326px;margin:auto}.card{z-index:2;position:absolute;left:0;top:0;width:100%;font-size:18px;transform-origin:50% 100%;background:#fff;color:#00315f;border-bottom:5px solid #dadada;border-radius:12px;overflow:hidden;transition:all .2s ease;animation:append-card .2s ease}.card:nth-child(3){transform:translateY(12px) scale(.95)}.card:nth-child(2){transform:translateY(24px) scale(.9)}.card:first-child{transform:translateY(36px) scale(.85);opacity:0}.card.reset{transition:transform .3s;transform:translateX(0)!important}.card.reset .card__choice{transition:opacity .3s;opacity:0!important}.card.inactive{transition:transform .3s}.card.to-left{transform:translateX(-30rem) rotate(-30deg)!important}.card.to-right{transform:translate(30rem) rotate(30deg)!important}.card__drag{z-index:5;position:absolute;left:0;top:0;width:100%;height:100%;cursor:grab}.card p{padding-top:12px}.card b:not(:first-child){margin-left:8px}.card__content{position:relative;padding:8px 16px 16px}.card__race{position:absolute;top:0;right:16px;padding:8px 12px;transform:translateY(-50%);background:#00315f;border-radius:12px;color:#fff;font-size:20px}.card__race.-elf{background:#48848e}.card__race.-dwarf{background:#923f21}.card__race.-human{background:#ddae62}.card__race.-orc{background:#0c602d}.card__imageWrapper{width:100%;padding-top:93.5%;overflow:hidden}.card__image{position:relative}.card__image svg{position:absolute;bottom:0;left:0;width:100%}.card__name{font-size:22px}.card__choice{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0}.card__choice.-reject{background:rgba(208,110,109,.5)}.card__choice.-accept{background:rgba(47,150,88,.5)}#eM{position:fixed;bottom:20px;left:50%;width:300px;transform:translateX(-50%);padding:8px 60px 8px 8px;border-radius:4px;border:1px solid #e04545;background:rgba(224,69,69,.7);z-index:9;transition:all .2s ease;transform-origin:center}#eM .card__imageWrapper{position:absolute;right:0;bottom:0;transform:scale(.2);transform-origin:bottom right}#eM:not(.-shown){opacity:0;transform:translateX(-50%) scale(.5);transition:all 0s ease}.good{color:#6db58a}.wrong{color:#d06e6d}#ui{display:flex;justify-content:space-between;font-size:20px}#ui b{font-size:24px}#score{display:inline-block}#score.-success{animation:bump-score 250ms ease}#combo{position:absolute;top:0;left:50%;padding:12px 16px;background:#2f9658;color:#fff;font-size:16px;font-weight:700;box-shadow:0 4px 0 rgba(0,0,0,.3);border-radius:4px;opacity:0;transform:translateX(-50%) scale(.5);text-align:center}#combo.-success{opacity:1;transform:translateX(-50%) scale(1);transition:all .2s ease}@keyframes bump-score{0%{transform:scale(1)}100%{transform:scale(2)}}#gW{display:flex;flex-direction:column;justify-content:space-between;position:relative;width:88vw;max-width:600px;height:90vh;margin:auto;user-select:none;z-index:3}#gW:not([data-screen="0"]) #home{display:none}#gW:not([data-screen="1"]) #tutorial{display:none}#gW:not([data-screen="1"]) #tutorial{display:none}#gW:not([data-screen="2"]) #cardList,#gW:not([data-screen="2"]) #ui{display:none}#gW:not([data-screen="3"]) #end{display:none}#gW[data-tutorial="1"] #cardList,#gW[data-tutorial="1"] #t2,#gW[data-tutorial="1"] #t3,#gW[data-tutorial="1"] #t4,#gW[data-tutorial="1"] #ui{display:none}#gW[data-tutorial="2"] #t1,#gW[data-tutorial="2"] #t3,#gW[data-tutorial="2"] #t4,#gW[data-tutorial="2"] #ui{display:none}#gW[data-tutorial="2"] #cardList{display:block}#gW[data-tutorial="2"].-demo .card:last-child{animation:show-swipe-right 1.5s ease 1s infinite}#gW[data-tutorial="3"] #t1,#gW[data-tutorial="3"] #t2,#gW[data-tutorial="3"] #t4,#gW[data-tutorial="3"] #ui{display:none}#gW[data-tutorial="3"] #cardList{display:block}#gW[data-tutorial="3"].-demo .card:last-child{animation:show-swipe-left 1.5s ease 1s infinite}#gW[data-tutorial="4"] #cardList,#gW[data-tutorial="4"] #t1,#gW[data-tutorial="4"] #t2,#gW[data-tutorial="4"] #t3,#gW[data-tutorial="4"] #ui{display:none}@keyframes show-swipe-right{0%{transform:none}30%{transform:translate(80px) rotate(8deg)}50%{transform:none}}@keyframes show-swipe-left{0%{transform:none}30%{transform:translate(-80px) rotate(-8deg)}50%{transform:none}}.sB{background-color:#91cfda;color:#212226}.sB:hover{background:#bde2e9}#tutorial{font-family:Tahoma,sans-serif}.block{padding:24px;text-align:center;margin:10% auto;width:100%;max-width:326px;background:rgba(255,249,244,.9);box-shadow:0 4px 0 #ddd;border-radius:12px;color:#212226}.block h2{display:block;margin-bottom:8px;font-size:34px;color:#4d274d}.block .card__imageWrapper{margin:-24px 0 0 -24px;width:calc(100% + 48px);padding-top:105%}#bestScore,#tutorial-repeat{text-align:center}#bestScore b,#tutorial-repeat b{font-size:120%}#bestScore{font-size:120%}#tutorial-repeat{color:#fbd495;text-decoration:underline;cursor:pointer}#t1{padding-top:10px;font-size:24px}#t1>:not(:first-child){display:none}#t1 button{margin-top:24px}#t2,#t3{max-width:326px;margin:0 auto;text-align:center;font-size:24px}#t2 b,#t3 b{font-size:30px}i{font-style:normal}#t4{display:flex;flex-direction:column;justify-content:center;height:80vh}</style></head><body><div id="bgo"><div id="bgw"><div id="background"></div></div></div><div id="bD"></div><div id="clouds"></div><div id="gW" data-screen="0"><div id="ui"><p>Score<br><b id="score">0</b></p><p>Timer<br><b id="time"></b></p><p id="combo"></p></div><div id="home"><h1><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 46 53"><path d="M13 21h1-1C24 18 25 9 24 1l1-1c9 5 20 15 20 30 0 11-7 20-18 22V37h7v-7h-7v-8h-9v8h-6v7h6v15a21 21 0 0 1-8-39h1l2 8Z" fill="#d06e6d"/></svg> tindeath</h1><div><button class="sB appear">Play</button><p id="tutorial-repeat" class="appear">Replay tutorial</p><p id="bestScore" class="appear"></p></div></div><div id="tutorial"><div id="t1" class="block"><div><div class="card__imageWrapper"><div class="card__image"></div></div><h2>Welcome,</h2>dear minion! Here you are a new guardian of death, protecting gates access. <button class="next">Next ➡️</button></div><div><div class="card__imageWrapper"><div class="card__image"></div></div><h2>Your job</h2>Send the good guys to heaven and bring the liars down to hell! <button class="next">Next ➡️</button></div><div><div class="card__imageWrapper"><div class="card__image"></div></div><h2>Be careful</h2>Some will try to deceive you to avoid the flames of hell... <button id="tutorial1Button">Next ➡️</button></div><div><div class="card__imageWrapper"><div class="card__image"></div></div><h2>Nice!</h2>You are ready, guardian of death!<br>Check your 📖 for more details <button class="next">Yeah!</button></div><div><div class="card__imageWrapper"><div class="card__image"></div></div>But remember: your time is running out, and you'll be scored every day! <button id="tutorialEndButton">Start!</button></div></div><p id="t2"><b>Swipe right to <i class="good">accept</i> a soul.</b></p><p id="t3">A Human green like an Orc?! Impossible!<br><b>Swipe left to <i class="wrong">reject</i> this soul</b></p></div><div id="cardList"></div><div id="eM"></div><div id="end"><div class="block"><div class="card__imageWrapper"><div class="card__image"></div></div><h2>Time is over</h2>Great job, minion !<br>Your score for today: <b id="endscore"></b><br>But I'm sure you can do even better, right?<br>Restart to improve your score! <button class="sB">Restart!</button></div></div><div id="help" class="block"><p id="helpClose">❌</p><ul><li>Only Elves got pointy ears</li><li>Elves are 2m minimum, while Dwarves are 1.5m maximum</li><li>Elves weigh 80kg max, while Orcs minimum weight is 90kg</li><li>Human don't live after 100yo</li><li>Elves got purple skin, Orcs green skin</li><li>You'll soon have to check race names, like humans who got first name and last name</li><li>... and probably more inventive tricks you'll have to discover!</li></ul></div><p id="soundButton">🔊</p><p id="helpButton">📖</p></div><script>!function(){"use strict";let e=[{name:"human",display:"Human",minHeight:1.5,maxHeight:2,minWeight:50,maxWeight:90,minAge:42,maxAge:90},{name:"dwarf",minHeight:1,maxHeight:1.4,minWeight:70,maxWeight:100,minAge:42,maxAge:80},{name:"elf",minHeight:2,maxHeight:2.5,minWeight:55,maxWeight:80,minAge:100,maxAge:230},{name:"orc",minHeight:1.8,maxHeight:2.2,minWeight:90,maxWeight:140,minAge:60,maxAge:120}],t={human:"🧬 Human",dwarf:"🍄 Dwarf",elf:"🧝♂️ Elf",orc:"🫀 Orc"},a=["M222 168v-25.6c5.4-8.2 16.2-23.6 23.4-26.2 6.5-2.4 0 20.7-5.3 37A22.2 22.2 0 0 1 222 168ZM105.1 142.4v25.7a22.2 22.2 0 0 1-18-15c-5.3-16.2-11.9-39.3-5.4-37 7.2 2.7 18 18 23.4 26.3Z"],r=['{"d":"M158.2 181.8c-2.3.7-4.5 1.5-6.5 2.4-2.2-5.8 1.2-11.7 3.9-12.7 0 4.5.8 7.6 2.6 10.3ZM176 179.1h-5.5c2.5-1 4-2.3 4.8-5.4 1 .7 1.8 3.3.7 5.4Z", "fill":"#fff"}','{"d":"M150 185c10-7.5 25-7.5 29-5", "stroke":"#212226", "stroke-width":"2", "stroke-linecap":"round", "stroke-linejoin":"round"}'],n={face:["F5F2E7","FDE9DD","EEE3BB","F9CA9F","B9885B","4F3319"],hair:["D7D8D9","DDAE62","A82E2D","923F21","0C602D","4D274D","212226"],eye:["212226"],clothes:["DDAE62","48848E","A82E2D","923F21","0C602D","4D274D","212226"],background:["FBD495","91CFDA","D06E6D","BC6B4E","2F9658","874B87"],mouth:[],ear:[],eyebrow:[],beard:[],wrinkles:["212226"]},l=["AAA997","98AC5E","545119","354934"],i=["E1E6F3","8389C5","E9E4F3","B093CE"],o={background:[],clothes:[],face:[["M221.9 110a58.4 58.4 0 1 0-116.9 0v53.8a58.4 58.4 0 1 0 116.9 0V110Z","M163.8 51.5a58.5 58.5 0 0 1 48.6 57.6v53.5a58.4 58.4 0 0 1-58.5 58.4h-.3a58.4 58.4 0 0 0 68.3-57.6V110c0-32.2-26-58.3-58.1-58.4Z"],["M221.9 110a58.4 58.4 0 1 0-116.9 0v80.6a31.7 31.7 0 0 0 31.7 31.6h53.5a31.7 31.7 0 0 0 31.7-31.6V110Z","M163.8 51.5a58.5 58.5 0 0 1 48.6 57.6v80.3a31.6 31.6 0 0 1-31.6 31.6h-51.4c2.3.6 4.8.9 7.2.9h53.7a31.6 31.6 0 0 0 31.6-31.7V110c0-32.2-26-58.3-58.1-58.4Z"],["M221.9 110a58.4 58.4 0 1 0-116.9 0v61.8a25 25 0 0 0 10 20l29.2 22a32 32 0 0 0 38.5 0l29.3-22a25 25 0 0 0 9.9-20V110Z","M164.3 51.6a58.5 58.5 0 0 1 48 57.5v61.8a25 25 0 0 1-9.8 20l-29.3 22a32 32 0 0 1-17.5 6.3 32 32 0 0 0 27-5.4l29.3-22a25 25 0 0 0 9.9-20V110c0-32-25.7-58-57.6-58.4Z"]],wrinkles:[['{"d":"M205 135h11M205 138l10 1M205 141l9 3M122 135h-11M122 138l-10 1M122 141l-9 3M127 97l20 2h32l20-2M127 102l20 2h32l20-2M127 107l20 2h32l20-2", "stroke":"#212226", "stroke-linecap":"round", "stroke-opacity":"0.2", "fill-opacity":"0.2"}']],hair:[[""],["M257.8 78a36 36 0 0 0-63.2-19.3c-1.4-.9-2.9-1.7-4.4-2.4l-.3-.1-2.5-1.2-.7-.3-2.2-.9-.7-.2-2.8-.9-.7-.2-2.5-.7-.5-.1-2.5-.5a57.8 57.8 0 0 0-69.8 53.7 59.6 59.6 0 0 0 77.7-22.8 58.3 58.3 0 0 0 39.2 27.1v-2.3a55 55 0 0 0-5.8-24.6 39.4 39.4 0 0 1 16.8 32.3V306h25V78h-.1z","M251 102a36 36 0 0 0-45.5-34.7c4.4 4.4 8 9.4 10.7 14.9a39.4 39.4 0 0 1 16.8 32.3V305h18V102z"],["M207.6 57.8a47.7 47.7 0 0 0 5.8-22.8s-4.2 4.8-56.4 7c-32 1.3-58 27-58 59v37.5a6 6 0 0 0 6-6V111c0-13.6 11-24.6 24.6-24.6h67.3c13.6 0 24.6 11 24.6 24.6v21.5a6 6 0 0 0 6 6V94c-.1-15.2-8-28.5-19.9-36.2z","M207.6 57.8a48 48 0 0 1-37.4 24.8l-40.6 3.9H169l9.2-.9a47.6 47.6 0 0 0 36.1-22.5c-2-2-4.3-3.8-6.7-5.3z"],["M221.5 129c-4.4-7.2-14-41.3-8.5-45.6 5.5-4.3 13.4 8.2 15.3 15.1 2.9 10.5 3 29.5-6.8 30.5Zm-117-.4c4.4-7.2 14.4-41.3 9-45.6-5.6-4.3-13.5 8.2-15.4 15-2.9 10.6-3.4 29.6 6.4 30.6Z"],["M257.8 78a36 36 0 0 0-63.2-19.3c-1.4-.9-2.9-1.7-4.4-2.4l-.3-.1-2.5-1.2-.7-.3-2.2-.9-.7-.2-2.8-.9-.7-.2-2.5-.7-.5-.1-2.5-.5a59.8 59.8 0 0 0-44 8.6 35.8 35.8 0 0 0-64 18.2h-.2v228h25V114.5c0-14.9 8.2-27.8 20.4-34.6a55.1 55.1 0 0 0-6.9 24.8 59.6 59.6 0 0 0 77.7-22.8A58.3 58.3 0 0 0 222 109v-2.3a55 55 0 0 0-5.8-24.6 39.4 39.4 0 0 1 16.8 32.3V306h25V78h-.2z","M120.9 67.8A36 36 0 0 0 73.5 102v203h18V114.5c0-14.9 8.2-27.8 20.4-34.6 2.5-4.4 5.5-8.5 9-12.1zM251 102a36 36 0 0 0-45.5-34.7c4.4 4.4 8 9.4 10.7 14.9a39.4 39.4 0 0 1 16.8 32.3V305h18V102z"],["M225 63.4a22.5 22.5 0 0 0-39.4-14.9 57 57 0 0 0-30.3-4.1l-1.3.2-1.1.2-2.2.4-.7.1-2.9.7-.7.2-2.1.7-1 .4-1.8.7-1 .4-1.7.7-1 .5-1.7.9-.9.5-2.2 1.3-.3.2-2.4 1.6-.7.5-1.6 1.2-.9.7-1.4 1.1-.9.7-1.4 1.2-.8.7-1.4 1.4-.6.7a61.2 61.2 0 0 0-16 51.6 69.8 69.8 0 0 0 36.3-25 93.1 93.1 0 0 0 81 16.5v-1a62 62 0 0 0-4.8-24 22 22 0 0 0 7.9-17z","M217.2 80.4c1.4-1.2 2.6-2.5 3.7-4l.2-3a28.6 28.6 0 0 0-28.5-28.5l-3 .2a21 21 0 0 0-3.8 3.5 59.6 59.6 0 0 1 31.4 31.8z"],["M239.5 251.8a19.7 19.7 0 0 0 2.3-28.5 19.7 19.7 0 0 0 0-26.2 19.7 19.7 0 0 0 0-26.2 19.7 19.7 0 0 0 0-26.2 19.7 19.7 0 0 0-.9-27.2l.1-3.2a78.6 78.6 0 0 0-67.2-78.2l-2.8-.3h-.3l-3.2-.2h-.9l-3.6-.1-3.6.1h-.9l-3.2.2h-.3l-2.8.3a78 78 0 0 0-67.1 82.1 19.7 19.7 0 0 0 .1 26.2 19.7 19.7 0 0 0 0 26.2 19.7 19.7 0 0 0 0 26.2 19.7 19.7 0 0 0 0 26.2 19.7 19.7 0 0 0 2.3 28.5 26.4 26.4 0 0 0-12.1 22.2H115c0-9.4-4.9-17.6-12.2-22.3A19.8 19.8 0 0 0 105 223a19.7 19.7 0 0 0 0-26.2c3.1-3.5 5-8.1 5-13.1s-1.9-10.6-5-14.1v-49.4a95 95 0 0 0 57.9-46.7 95.4 95.4 0 0 0 59 47.1v49c-3.1 3.5-5 9.1-5 14.1s1.9 9.6 5 13.1a19.7 19.7 0 0 0 0 26.2 19.7 19.7 0 0 0 2.2 28.4 26.5 26.5 0 0 0-12.2 22.3h39.6c.1-9-4.7-17.2-12-21.9z","M243.4 247.4h-23a3.8 3.8 0 0 0-3.8 3.8v2.3l.1.8v.1l.2.6.1.2.2.4.2.2.3.3.2.2.3.3.2.2.4.2.3.1.5.1.2.1.7.1h22.9c2.1 0 3.8-1.7 3.8-3.8v-2.3c0-2.2-1.7-3.9-3.8-3.9zM110.4 251.2c0-2.1-1.7-3.8-3.8-3.8h-23a3.8 3.8 0 0 0-3.8 3.8v2.3c0 2.1 1.7 3.8 3.8 3.8h22.9l.7-.1.2-.1.4-.1.3-.1.4-.2.2-.2.3-.3.2-.2.3-.3.2-.2.2-.4.1-.2.2-.6v-.1l.1-.8v-2.2z"],["M220.4 98.8c-8.5 3.7-20.8 6.6-35.2 8-1.2-14.5-3.1-36-3.1-29.8 0 6-2 21-3.5 30.4-5.1.4-10.5.6-16 .6-23.5 0-44.3-3.5-57-8.9-.8 3.6-1.1 7.2-1.1 10.9v59l.5 1.6c1.6 4.2 6 16.2 2.7 22.4-4 7.5-23.7 6-23.7-22.5S93.5 91 93.5 91h.1l-.1-.2a70.3 70.3 0 0 1 69-55.8c34 0 62.4 24 69 56 0 0 10.4 51 10.4 79.5s-19.6 30-23.6 22.5c-3.3-6.2 1-18.2 2.6-22.4l.5-1.6v-59c0-3.8-.3-7.6-1-11.2Z"]],ear:[["M222 169a19 19 0 0 0 0-38v38ZM105.1 131v38H104a19 19 0 0 1 0-38h1.1Z","M222 164v-27a13.5 13.5 0 0 1 0 27ZM105.1 137v27h-.6a13.5 13.5 0 1 1 0-27h.6Z"],["M222 126.1v42.6a7.5 7.5 0 0 0 8.1-10.6l.7-.2a16.5 16.5 0 0 0-8.6-31.8h-.2ZM105.1 126.4l-1.3-.3a16.5 16.5 0 0 0-8.6 31.8l.7.2a7.5 7.5 0 0 0 9.2 10.3v-42Z","M222 155v-23.6l1.5-.4a11.4 11.4 0 0 1 6 22l-7.5 2ZM105.1 131.7v23.6l-8.6-2.3a11.4 11.4 0 0 1 6-22l2.6.7Z"]],eyebrow:[["M121 119a4 4 0 0 1 4-4c25.8.3 29.4 3.5 38 3.5 8.6 0 8.5-3.2 38-3.5a4 4 0 0 1 4 4 4 4 0 0 1-4 4c-27.7.2-29.9 2.5-38 2.5-8.1 0-10.3-2.3-38-2.5a4 4 0 0 1-4-4Z"],["M200.8 124.4a3.5 3.5 0 0 1-3.4-2.8c-.5-2.5-1.3-4-2.6-4.9a12.7 12.7 0 0 0-7.4-2.2c-2.8 0-5.5.8-7.4 2.2a3.5 3.5 0 0 1-4.9-.7 3.5 3.5 0 0 1 .7-4.9c3.1-2.3 7.3-3.6 11.6-3.6s8.5 1.3 11.6 3.6c3.6 2.7 4.8 6.5 5.3 9.2.4 1.9-.8 3.7-2.7 4.1h-.8zM122.8 124.4l-.7-.1a3.4 3.4 0 0 1-2.7-4.1c.5-2.7 1.7-6.5 5.3-9.2 3.1-2.3 7.3-3.6 11.6-3.6s8.5 1.3 11.6 3.6a3.4 3.4 0 0 1 .7 4.9 3.4 3.4 0 0 1-4.9.7c-1.9-1.4-4.6-2.2-7.4-2.2s-5.5.8-7.4 2.2c-1.3 1-2.1 2.5-2.6 4.9a3.5 3.5 0 0 1-3.5 2.9z"],["M172.3 116.9h29a4 4 0 0 1 4.1 4.1v.1a4 4 0 0 1-4.1 4.1h-29a4 4 0 0 1-4.1-4.1v-.1a4 4 0 0 1 4.1-4.1zM124.8 116.9h30.1a4 4 0 0 1 4.1 4.1v.1a4 4 0 0 1-4.1 4.1h-30.1a4 4 0 0 1-4.1-4.1v-.1a4 4 0 0 1 4.1-4.1z"],["M204 113.2a4.1 4.1 0 0 0-5.3-2.5l-27.2 9.9a4.2 4.2 0 0 0 2.8 7.9l27.3-9.9a4.3 4.3 0 0 0 2.4-5.4zM153.9 120.3l-27.3-9.9c-2.1-.8-4.5.3-5.3 2.5v.1c-.8 2.1.3 4.5 2.5 5.3l27.3 9.9c2.1.8 4.5-.3 5.3-2.5v-.1c.7-2.2-.4-4.5-2.5-5.3z"]],eye:[['{"cx":139.5, "cy":133.5, "r":3.5}','{"cx":186.5, "cy":133.5, "r":3.5}'],['{"d": "M178 133.5h19m-19 0 13.6-5.5m-13.6 5.5 13.6 5.5M148 133.5h-19m19 0-13.6-5.5m13.6 5.5-13.6 5.5", "stroke":"#222", "stroke-width":3, "stroke-linecap":"round"}'],['{"cx":138.5, "cy":136.5, "r":10.5, "fill":"#fff"}','{"cx":138.605, "cy":136.5, "r":5.5}','{"cx":185.5, "cy":136.5, "r":10.5, "fill":"#fff"}','{"cx":185.605, "cy":136.5, "r":5.5}'],["M125.3 136.4a15.3 15.3 0 0 1 27 0 15.3 15.3 0 0 1-27 0ZM200.1 136.4a15.3 15.3 0 0 0-27 0 15.3 15.3 0 0 0 27 0Z"],['{"d":"M125.3 136.4a15.3 15.3 0 0 1 27 0 15.3 15.3 0 0 1-27 0Z", "fill":"#fff"}','{"cx":138.6, "cy":136.5, "r":5.5, "fill": "#222"}','{"d":"M125.4 136.6c-2.7.6-5.5-1-6.4-2.4M126.6 133.7c-2.7-.4-5-1.8-5.8-4M129.6 131.1a6.6 6.6 0 0 1-3.4-4.1", "stroke":"#222", "stroke-linecap":"round"}','{"d":"M200.1 136.4a15.3 15.3 0 0 0-27 0 15.3 15.3 0 0 0 27 0Z", "fill":"#fff"}','{"cx":186.4, "cy":136.5, "r":"5.5", "fill":"#222"}','{"d":"M200 136.6c2.7.6 5.5-1 6.4-2.4M198.8 133.7c2.7-.4 4.9-1.8 5.8-4M195.8 131.1c2.4-1.3 3-2.8 3.4-4.1", "stroke":"#222", "stroke-linecap":"round"}']],beard:[[],["M152 164c3.4 0 6 .6 9 2.4.7.5.4 1.6-.5 1.6-2 .1-4.8.1-7.7-.1-6-.5-7.3-5.2-8.3-7.9-.1-.2.1-.3.3-.2 1.4 1.4 4.3 4.2 7.2 4.2ZM174 164c-3.4 0-6 .6-9 2.4-.7.5-.4 1.6.5 1.6 2 .1 4.8.1 7.7-.1 6-.5 7.3-5.2 8.3-7.9.1-.2-.1-.3-.3-.2-1.4 1.4-4.3 4.2-7.2 4.2Z"],["M118.6 179.2a48 48 0 0 1 42.8-26.2h2a48 48 0 0 1 44 29l3.6 8.2a45 45 0 0 1-41.3 62.8h-15.2a45 45 0 0 1-40.1-65.4l4.2-8.4Z"],["M128.8 184.3a34.9 34.9 0 0 1 69.4 0l.5 5c2.8 27.6-3.4 55.8-19.3 78.7-6.6 9.6-13 18-15.9 20-3.7-1.7-10.3-10.4-17.2-20.4a116 116 0 0 1-18-77.4l.5-5.9Z"],["M148.3 224.2c-5.8-4.6-1.8-13.8 5.5-13l4.6.7c3 .4 6.1.4 9.2 0l4.6-.6c7.3-1 11.3 8.3 5.5 13a23.5 23.5 0 0 1-29.4 0Z"]],mouth:[['{"d":"M158 172.6c9.6-5 19-2.3 20 4.1 1 8.7-11.2 7.6-17 9.2-5.7 1.5-10.8-9.3-3-13.3Z", "fill":"#A82E2D"}','{"fill-rule":"evenodd", "clip-rule":"evenodd", "d":"M164.6 170.3c-2.1.4-4.4 1.1-6.7 2.3-1 .6-2 1.3-2.5 2 .7 2.3 1.2 3.4 1.2 3.4s5.4-2.6 8.5-3.4l-.5-4.3Zm2-.3c3.9-.2 7.2.7 9.2 2.6l-1 5.5-2.7-.1-3.2-2.9-2.1 3.3s-.4-4-.2-8.4Z", "fill":"#fff"}'],['{"d":"M146.6 173c3.7 4 10 6.5 16.9 6.5 7 0 13.2-2.5 17-6.5", "stroke":"#212226", "stroke-width":"2", "stroke-linecap":"round"}'],['{"d":"M153 176c8-1.5 22 0 22 0", "stroke":"#212226", "stroke-width":"2", "stroke-linecap":"round"}'],['{"d":"M168.4 173c2.6 0 4.9 1.3 6.3 3.3l.2-.2c-.5 5-4.7 8.9-9.8 8.9H162a9.8 9.8 0 0 1-9.8-8.9l.2.2a7.6 7.6 0 0 1 11.2-1.5c1.3-1.1 3-1.8 5-1.8Z", "fill":"#D06E6D"}','{"d":"M146.6 173c3.7 4 10 6.5 16.9 6.5 7 0 13.2-2.5 17-6.5", "stroke":"#212226", "stroke-width":"2", "stroke-linecap":"round"}'],['{"d":"M183 176.9c-8 14.2-28.7 15.5-37 10-8.2-5.4-5.7-17.3 3-17.3 18 0 18.4.8 26.3-3.8 4.5-2.6 13.5 1 7.8 11Z", "fill":"#A82E2D"}','{"fill-rule":"evenodd", "clip-rule":"evenodd", "d":"M178.3 182.7a31.2 31.2 0 0 1-29 5.9c2.3-7.3 8-6.6 12.1-6 1.2 0 2.2.2 3 .1.7 0 1.6-.4 2.7-.8 3.3-1.2 7.8-3 11.2.8Z", "fill":"#D06E6D"}','{"fill-rule":"evenodd", "clip-rule":"evenodd", "d":"M145.7 170.2c.2 2.4.7 5.3 2 5.5 1.8.3 21.8-1.2 24.3-2.5.5 0 .8-4.5.8-4.5s2.4 3.8 2.9 3.7l1-.5c.7-.4 1.5-.7 2.3-2.4.8-1.7.7-3 0-4.5-1.3 0-2.7.2-3.7.8-6.7 4-8 3.9-19.3 3.8h-7c-1.3 0-2.3.2-3.3.6Z", "fill":"#fff"}']]},c=["starvation","snu snu","arrow in knee","laugh","spontaneous combustion","impaled by unicorn","eaten by blob","pitched ball","natural disaster","poison","hunger","fatal hilarity","elephant squash","idleness","disagreeable dragon","fireball spell","lighting bolt spell","necromancy","execution","magic curse","fell from horse"];var s=e=>document.getElementById(e),d=e=>document.querySelector(e),h=e=>document.querySelectorAll(e),u=e=>document.createElement(e),m=()=>Math.random(),f=e=>JSON.parse(window.localStorage.getItem(e)),v=(e,t)=>window.localStorage.setItem(e,JSON.stringify(t));function g(e){return e[~~(m()*e.length)]}function M(e,t){return~~(m()*(t-e+1))+e}function p(e,t){return~~(function e(){let t=0;let a=0;for(;0===t;)t=m();for(;0===a;)a=m();let r=Math.sqrt(-2*Math.log(t))*Math.cos(2*Math.PI*a);r=r/10+.5;if(r>1||r<0)return e();return r}()*(t-e))+e}function y(e,t,a,r={}){let n="";return Object.entries(r).forEach(([e,t])=>{n+=` ${e}="${t}"`}),`<svg width="${e}" height="${t}" viewBox="0 0 ${e} ${t}" ${n}>${a.map(b).join("")}</svg>`}function b(e){let t="";return Object.entries(e).forEach(([e,a])=>{t+=` ${e}="${a}"`}),`<${t.includes("cx=")?"circle":"path"} ${t}/>`}let L,k,w,E,$,C,x=[],D=0,A=0,Z=0,H=0,B=!1,S=!1,z=!1,T=s("gW"),W=s("cardList"),_=s("score"),V=s("combo"),F=s("eM"),O=(...e)=>{let t=N.createBufferSource(),a=N.createBuffer(e.length,e[0].length,I);return e.map((e,t)=>a.getChannelData(t).set(e)),t.buffer=a,t.connect(N.destination),t.start(),t},j=(e=1,t=.05,a=220,r=0,n=0,l=.1,i=0,o=1,c=0,s=0,d=0,h=0,u=0,m=0,f=0,v=0,g=0,M=1,p=0,y=0)=>{let b,L,k=2*Math.PI,w=c*=500*k/I**2,E=(0<f?1:-1)*k/4,$=a*=(1+2*t*Math.random()-t)*k/I,C=[],x=0,D=0,A=0,Z=1,H=0,B=0,S=0;for(s*=500*k/I**3,f*=k/I,d*=k/I,h*=I,u=I*u|0,L=(r=99+I*r)+(p*=I)+(n*=I)+(l*=I)+(g*=I)|0;A<L;C[A++]=S)++B%(100*v|0)||(S=i?1<i?2<i?3<i?Math.sin((x%k)**3):Math.max(Math.min(Math.tan(x),1),-1):1-(2*x/k%2+2)%2:1-4*Math.abs(Math.round(x/k)-x/k):Math.sin(x),S=(u?1-y+y*Math.sin(2*Math.PI*A/u):1)*(0<S?1:-1)*Math.abs(S)**o*e*q*(A<r?A/r:A<r+p?1-(A-r)/p*(1-M):A<r+p+n?M:A<L-g?(L-A-g)/l*M:0),S=g?S/2+(g>A?0:(A<L-g?1:(L-A)/g)*C[A-g|0]/2):S),x+=(b=(a+=c+=s)*Math.sin(D*f-E))-b*m*(1-1e9*(Math.sin(A)+1)%2),D+=b-b*m*(1-1e9*(Math.sin(A)**2+1)%2),Z&&++Z>h&&(a+=d,$+=d,Z=0),!u||++H%u||(a=$,c=w,Z=Z||1);return C},q=.3,I=44100,N=new(window.AudioContext||webkitAudioContext),P={elf:["Ara","Elis","Karo","Lego","Pali","Ria","Sil","Cyl","Lara","Lego","Lilis","Min","Phy","Rilli","Sil","Ur"],dwarf:["B","Bal","D","Dal","Dor","Kil","Mor","Ov","Thor","Nal","Thr"],orc:["Bar","Bo","Dur","Mur","Na","Ya","Sha","Shu","Yar","Du","Gro","Ur"],human:["Andre","Astien","Daric","Ernand","Arniel","Renald","Lucien","Thomas","Delphine","Mirabelle","Vivienne","Luciana"]},X={elf:["dell","driel","gorn","las","nis","nor","dra","fina","gina","landra","lerva","nia","sandra"],dwarf:["im","aim","in","ain","ar","or","ur","o","i","ak"],orc:["kul","zog","gob","groth","garg","log","bagg","gash","grolg","gorkh","zok","zarth"],human:["Beaufort","Dufond","Petit","Rielle","Motierre","Lachance","Bienne","Herrick"]};function R(e){return`${g(P[e])}${"human"==e?" ":""}${g(X[e])}`}function J(e){let t=R(e);return"dwarf"==e&&(t+=` ${R(e)}`),"orc"==e&&(t+=` ${g(["gro-","gra-"])}${R(e)}`),t}let U=((e,t,a,r=125)=>{let n,l,i,o,c,s,d,h,u,m,f,v,g,M,p,y=0,b=[],L=[],k=[],w=0,E=0,$=1,C={},x=I/r*60>>2;for(;$;w++)b=[$=h=f=g=0],a.map((r,f)=>{for(d=t[r][w]||[0,0,0],$|=!!t[r][w],p=g+(t[r][0].length-2-!h)*x,M=f==a.length-1,l=2,o=g;l<d.length+M;h=++l){for(c=d[l],u=l==d.length+M-1&&M||m!=(d[0]||0)|c|0,i=0;i<x&&h;i++>x-99&&u?v+=(v<1)/99:0)s=(1-v)*b[y++]/2||0,L[o]=(L[o]||0)-s*E+s,k[o]=(k[o++]||0)+s*E+s;c&&(v=c%1,E=d[1]||0,(c|=0)&&(b=C[[m=d[y=0]||0,c]]=C[[m,c]]||((n=[...e[m]])[2]*=2**((c-12)/12),c>0?j(...n):[])))}g=p});return[L,k]})(...[[[,0,110,,1.2,1,,2,,,1,,,,,,,.25,.2,1],[2,0,110,,2,1,,2,,,,,,,,,,.4,.2,1]],[[[,-.2,18,22,24,22,24,22,24,22,18,22,24,22,24,22,24,18,19,24,29,24,17,24,29,24,17,,,,,,,,],[,.2,,,29,,29,,29,,,,29,,29,,29,,,,,,,,,,24,,,,,,,,],[1,,,,,,,,,,,,,,,,,,19,,,,17,,,,15,,,,14,,,,]],[[,-.3,12,24,27,29,27,24,12,24,12,24,27,29,27,24,12,24,18,22,27,29,27,22,18,22,18,22,27,29,27,22,18,22,12,24,27,29,27,24,12,24,12,24,27,29,27,24,12,24,18,22,27,29,27,22,18,22,18,22,27,29,27,22,18,22,10,17,22,24,29,25,22,17,10,22,24,29,25,22,25,29,4,13,10,19,7,16,13,22,10,19,16,25,13,22,19,28,12,21,18,27,22,,,,,,,,29,,,,22,,,,,,,,,,,,,],[,.3,,,,,,,,,,,,,,,,,30,,,,,,30,,30,,,,,,30,,,,,,,,,,,,,,,,,,30,,,,,,30,,30,,,,,,30,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,34,,,,,,,,29,,,,34,,,,,,,,,,,,,],[1,,12,,,,14,,,,15,,,,19,,,,18,,,,,,,,,,,,,,,,12,,,,14,,,,15,,,,19,,,,18,,,,,,,,20,,,,,,,,10,,,,12,,,,13,,,,17,,,,16,,,,19,,,,22,,,,25,,,,24,,,,,,,,,,,,,,,,5,,,,,,,,,,,,,]],[[,-.2,10,22,25,29,22,25,5,17,10,22,25,29,22,25,5,17,5,20,24,12,24,20,29,20,5,20,29,20,17,24,17,5,12,22,24,22,20,17,20,22,24,22,20,17,24,22,20,17,30,29,24,21,30,29,24,21,29,29,24,21,29,29,24,21,10,22,25,29,22,25,5,17,10,22,25,29,22,25,5,17,5,20,24,12,24,20,29,20,5,20,24,20,17,24,17,5,12,,,,36,,,,36,,,,36,,,,31,31,28,23,31,31,28,23,31,31,28,23,31,31,28,23,31,31,31,31,31,31,31,31,31,31,30,31,27,31,26,31],[,.2,10,,,17,,,5,,10,,,17,,,5,,5,,,12,,,17,,5,,,12,,,,5,,,,,,17,,,,,,17,,,,17,18,,,,18,,,,17,,,,17,,,,10,,,17,,,5,,10,,,17,,,5,,5,,,12,,,17,,5,,29,12,,,,5,,,,,27,,,,27,,,,,,,,19,,,,19,,,,19,,,,19,,,,19,,19,,19,,19,,19,,18,,15,,14,,]]],[0,1,2,1],70,{title:"Diablo",Notes:"Unknown author",instruments:["Guitare","Violoncelle"],patterns:["Intro","Main","Second"]}]),Y=j(...[,,20,.04,,.6,,1.31,,,-990,.06,.17,,,.04,.07]),G=j(...[1.72,,75,.01,.09,.08,2,.07,-7.4,,,,,.6,,,.1,.71,.02,.41]);var K=0,Q=null,ee=0,te=80;function ae(e){e={...e,...e.error};let a=u("div");var r;return a.classList.add("card"),a.innerHTML=`\n<div class="card__imageWrapper" style="background: #${e.backgroundCol}"><div class="card__image" style="transform:translateY(${80*(2.2-e.height)}px) scaleX(${1+(e.weight-80)/200})">\n${oe(e)}\n</div></div>\n<div class="card__content">\n<b class="card__race -${e.race}">${t[e.race]}</b>\n <p class="card__name">${e.name}</p>\n <p>💀<b> ${e.deathCause}</b></p>\n <p><b>${e.height}</b>m\n <b>${e.weight}</b>kg\n <b>${e.age}</b>yo</p>\n</div>\n<div class="card__choice -accept"></div>\n<div class="card__choice -reject"></div>\n`,(r=a).addEventListener("mousedown",e=>re(r,e,"mouse")),r.addEventListener("touchstart",e=>re(r,e,"touch")),a}function re(e,t,a){Q=d("#cardList .card:last-child");var r=t.pageX||t.touches[0].pageX;let n=e=>{var t=e.pageX||e.touches[0].pageX;K=t-r,H&&(T.classList.remove("-demo"),K=Math[1===H?"max":"min"](0,K)),K&&function(){ee=K/10,Q.style.transform=`translateX(${K}px) rotate(${ee}deg)`;var e=K/100;Q.querySelector(".-reject").style.opacity=e>=0?0:Math.abs(e),Q.querySelector(".-accept").style.opacity=e<=0?0:e}()},l=e=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",l),K&&le()},i=e=>{document.removeEventListener("touchmove",n),document.removeEventListener("touchend",i),K&&le()};document.addEventListener(`${a}move`,n),"mouse"===a?document.addEventListener("mouseup",l):document.addEventListener("touchend",i)}function ne(e){B||(Q=d("#cardList .card:last-child"))&&(B=!0,Q.classList.add(e>0?"to-right":"to-left"),Q.classList.add("inactive"),clearTimeout(k),clearTimeout(w),function(e,t){if(e>0&&t.error||e<0&&!t.error){O(G),Z=0,L=1;let e=t.error?m()>.5?`🤨️ ${t.error.m}, really?`:`☠️️ Have you ever seen ${t.error.m}?`:"🤨️ why did you reject him?";e=e+=`<div class="card__imageWrapper"><div class="card__image">${oe({...t,...t.error})}</div></div>`,F.innerHTML=e,F.classList.remove("-shown"),F.offsetWidth,F.classList.add("-shown"),k=setTimeout(()=>{F.classList.remove("-shown")},5e3),V.classList.remove("-success")}else O(Y),A+=L,++Z,function(){let e=`${g(["🤘","🚀","🔥"])} Combo x${Z}!<br>`;if(Z%3==0){let t=Math.min(Z/3,5);E+=1e3*t,e+=` +${t}s`}Z%5==0&&(e+=` score x${++L}`);Z>1&&(V.innerHTML=e,V.classList.remove("-success"),V.offsetWidth,V.classList.add("-success"),w=setTimeout(()=>{V.classList.remove("-success")},2e3))}(),F.classList.remove("-shown");var a;A=Math.max(0,A),ce()}(e,x[D-4]),setTimeout(()=>{Q.remove(),B=!1,1===H?(T.dataset.tutorial=3,T.classList.add("-demo"),++H):2===H&&setTimeout(()=>{s("t1").removeChild(s("t1").firstChild),s("helpButton").classList.add("-active","-blink"),T.dataset.tutorial=1},500),ie()},300))}function le(){Math.abs(K)>=te?ne(K>=te?1:-1):Q.classList.add("reset"),setTimeout(()=>{Q.setAttribute("style",""),Q.classList.remove("reset"),Q.querySelector(".-reject").style.opacity=0,Q.querySelector(".-accept").style.opacity=0,K=0},300)}function ie(){x.push(function(){let t=H&&1===D,s=t?e[3]:g(e),d={race:s.name,name:J(s.name),deathCause:g(c),height:p(10*s.minHeight,10*s.maxHeight)/10,weight:p(s.minWeight,s.maxWeight),age:p(s.minAge,s.maxAge)};Object.keys(o).forEach(e=>{let t=M(0,o[e].length-1);d[e]=o[e][t],d[e+"Col"]=n[e][M(0,n[e].length-1)]}),"orc"==d.race&&(d.faceCol=g(l));"elf"==d.race&&(d.faceCol=g(i),d.ear=a);"orc"==d.race&&(d.mouth=r);d.age<s.maxAge-.3*(s.maxAge-42)&&(d.wrinkles=[]);t?d.error={race:e[0].name}:H||function(t){let r,c=t.race,s=A>15;if(m()<.35){var d=["elf","orc"].indexOf(t.race)>=0?e[M(0,1)]:e[M(2,3)];t.error={race:d.name,m:`a ${c} looking like ${d.name}`}}"dwarf"==c&&m()<.25&&(r={height:p(1.8,2.4),m:"a Dwarf taller than 1.5m"});if("elf"==c)m()<.25?r={height:p(1,1.4),m:"an Elf smaller than 1.9m"}:m()<.25&&(r={ear:g(o.ear),m:"an Elf without pointy ears"}),s&&m()<.2&&(r={weight:p(100,120),m:"an Elf weigh more than 100kg"});else if("orc"!=c&&m()<.25&&(r={ear:a,m:`a ${c} with pointy ears`}),s&&"orc"==c&&m()<.2&&(r={weight:p(50,70),m:"an Orc weigh less than 80kg"}),s&&"human"==c&&m()<.25&&(r={age:M(160,230),m:`a ${c} older than 150 years`}),s&&m()<.2){let e=g(["orc","elf"].indexOf(c)>=0?n.face:l.concat(i));r={faceCol:e,earCol:e,m:`a ${c} with this skin color`}}if(s&&m()<.2){let e=["orc","elf","human","dwarf"];e.splice(e.indexOf(c),1);let t=J(g(e));r={name:t,m:`a ${c} named ${t}`}}if(m<.6&&t.wrinkles.length&&(t.deathCause="old Age",s&&m<.5)){let e="elf"==c?120:55,t=M(40,e);r={age:t,m:`a ${c} dying from old age at ${t}`}}t.error=r}(d);return d.earCol=d.faceCol,d.eyebrowCol=d.hairCol,d.beardCol=d.hairCol,d}());let t=ae(x[D++]);W.insertBefore(t,W.firstChild)}function oe(e){let t=`\n ${y(326,305,[{d:"M116.7 214.8a61.7 61.7 0 0 1 46-19.3c18.8 0 35.4 7.6 46 19.3a40.3 40.3 0 0 1 34.6 39.7V305H82v-50.5a40.3 40.3 0 0 1 34.7-39.7Z",fill:`#${e.clothesCol}`}])}`;return Object.keys(o).forEach(a=>{for(var r in e[a]){let n={fill:"mouth"==a?"transparent":r<1||"eye"==a?`#${e[a+"Col"]}`:"rgba(0, 0 ,0, 0.1)"};e[a][r]&&(e[a][r].startsWith("M")?n.d=e[a][r]:n=Object.assign(n,JSON.parse(e[a][r])),t+=y(326,305,[n]))}}),t}function ce(){_.innerHTML=A,_.classList.remove("-success"),_.offsetWidth,_.classList.add("-success")}function se(){!function e(){$=10;let t=E/1e3;setTimeout(()=>{if(E>9999)var a=("0"+~~(t/60)).slice(-2)+":"+("0"+~~t%60).slice(-2);else var a=("0"+t.toFixed(2).replace(".",":")).slice(-5);s("time").textContent=a,(E-=$)<0?function(){let e=f("bestScore")||0;A>e&&v("bestScore",A);s("endscore").innerHTML=A,C.stop();let t=he();A<10&&(t.eye=o.eye[3]);A<15&&(t.eyebrow=o.eyebrow[3]);A<42&&(t.mouth=o.mouth[1]);A<25&&(t.mouth=o.mouth[2]);d("#end .card__image").innerHTML=oe(t),T.dataset.screen=3}():e()},10)}()}function de(){++H,T.dataset.screen=1,T.dataset.tutorial=1,s("tutorial1Button").addEventListener("click",ue),s("tutorialEndButton").addEventListener("click",me);let e=he();h("#t1 .card__image").forEach((t,a)=>{a>1&&(e.mouth=o.mouth[1]),4==a&&(e.eye=o.eye[3],e.mouth=o.mouth[2],e.eyebrow=o.eyebrow[3]),t.innerHTML=oe(e)}),[...h(".next")].forEach(e=>e.addEventListener("click",e=>{s("t1").removeChild(s("t1").firstChild)}))}function he(){return{face:o.face[2],faceCol:"ce3033",hair:o.hair[2],hairCol:"3a2e34",eye:o.eye[0],eyeCol:"fbbc0e",eyebrow:o.eyebrow[1],eyebrowCol:"3a2e34",mouth:o.mouth[4],ear:a,earCol:"ce3033",clothesCol:"3a2e34"}}function ue(){T.dataset.tutorial=2,T.classList.add("-demo"),ie(),ie(),ie(),ie()}function me(){delete T.dataset.tutorial,H=0,v("tutoWatched",!0),s("tutorial-repeat").style.display="block",ge()}function fe(){!S&&z&&((C=O(...U)).loop=!0)}function ve(){z=!0,fe(),f("tutoWatched")?ge():de()}function ge(){T.dataset.screen=2,x=[],W.innerHTML="",D=0,A=0,Z=0,L=1,E=6e4,ce(),ie(),ie(),ie(),ie(),se()}document.addEventListener("keydown",e=>{"ArrowLeft"==e.key&&1!==H?(H&&(T.classList.remove("-demo"),T.offsetWidth),ne(-1)):"ArrowRight"==e.key&&2!==H&&(H&&(T.classList.remove("-demo"),T.offsetWidth),ne(1))}),[...h(".sB")].forEach(e=>{e.addEventListener("click",ve)}),s("tutorial-repeat").addEventListener("click",de),s("helpClose").addEventListener("click",()=>{s("help").classList.remove("-active")}),s("helpButton").addEventListener("click",()=>{s("helpButton").classList.remove("-blink"),s("help").classList.add("-active")}),s("soundButton").addEventListener("click",()=>{S=!S,s("soundButton").innerHTML=S?"🔇":"🔊",S?C&&C.stop():fe()}),function(){let e="";[{t:130,l:30},{t:108,l:36},{t:164,l:41},{t:116,l:59},{t:92,l:53},{t:132,l:57}].forEach((t,a)=>{e+=y(122,78,[{d:"M107 48.4h-.5v-4.5c0-8-6.5-14.4-14.4-14.4-3 0-5.9.9-8.2 2.5.5-1.9.7-3.9.7-6C84.6 12 73.2.6 59.2.6S33.8 12 33.8 26c0 .7 0 1.3.1 2-2.7-1-5.5-1.5-8.5-1.5C11.4 26.5 0 37.8 0 51.9c0 14 11.4 25.4 25.4 25.4H107c8 0 14.4-6.5 14.4-14.4 0-8.1-6.5-14.5-14.4-14.5z"}],{style:`top: ${t.t}px; left: ${t.l}%; animation-delay: -${4*a}s; animation-duration: ${a%3*2+6}s;`})}),s("clouds").innerHTML=e}();let Me=f("bestScore");Me&&(s("bestScore").innerHTML=`Best score: <b id="bestSscore">${Me}</b>`),f("tutoWatched")?s("helpButton").classList.add("-active"):s("tutorial-repeat").style.display="none"}();</script></body></html>