PageSourceSearch

https://app.memrise.com/_next/static/chunks/1315-c96fb88806c2729e.js

js memrise.com collected 2026-09-24 08:29:39 UTC 24,307 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1315],{14135:(e,t,n)=>{n.d(t,{O:()=>o,Z:()=>r});var i=n(70610),o=function(e,t){void 0!==t&&t>0&&(e.future_learnables_offset=t)},r=function(e){if("string"==typeof e){var t=(0,i.oV)(e);if(!(t instanceof i.XR)&&!(t<0))return t}}},15785:(e,t,n)=>{n.d(t,{A:()=>i});let i="/_next/static/audios/be633aa1d63996dba16fba6c21d35297.mp3"},25022:(e,t,n)=>{n.d(t,{K:()=>c});var i=n(61542),o=n(2553),r=n(5646),s=r.Ay.div.withConfig({componentId:"sc-zjxmey-0"})(function(e){var t=e.theme,n=e.$disabled;return(0,r.AH)(["padding:0;display:flex;align-items:center;gap:",";",";cursor:pointer;color:",";"],t.sz.s2,t.typography.paragraph.m,n?t.co.secondary50:t.co.secondary0)}),a=r.Ay.button.withConfig({componentId:"sc-zjxmey-1"})(function(e){var t=e.theme,n=e.$disabled,i=e.$inverseColors,o=e.$pressed,s=e.$textInside;return(0,r.AH)(["cursor:pointer;border-radius:50%;border:none;width:",";height:",";padding:0;background-color:",";color:",";text-align:-webkit-center;&:hover{background-color:",";}"," ",";",";& svg{font-size:",";}"],t.sz.s8,t.sz.s8,t.co.neutral98,n?t.co.secondary50:t.co.secondary0,t.co.neutral95,i&&(0,r.AH)(["background-color:",";&:hover{background-color:",";}"],n?t.co.neutral98:t.co.primary20,n?t.co.neutral95:t.co.primary40),o&&(0,r.AH)(["background-color:",";border:"," solid ",";&:hover{background-color:",";}"],t.co.primary90,t.bo.thinWidth,t.co.primary20,t.co.primary90),s&&(0,r.AH)(["display:flex;align-items:center;width:auto;padding:",";gap:",";border-radius:",";border:"," solid ",";",";"],t.sz.s2,t.sz.s2,t.bo.medium,t.bo.thinWidth,o?t.co.primary20:t.co.neutral95,t.typography.paragraph.base),t.sz.s5)}),d=n(37876),c=function(e){var t=e.disabled,n=void 0!==t&&t,r=e.handleClick,c=e.ariaLabel,u=e.icon,l=e.text,h=e.className,p=e.inverseColors,g=e.pressed,f=void 0!==g&&g,m=e.children,b=function(){n||r()};return(0,d.jsxs)(s,{$disabled:n,onClick:b,children:[(0,d.jsxs)(a,{onClick:function(){return!l&&b},onKeyDown:function(e){n||("Enter"===e.key||" "===e.key)&&(e.preventDefault(),r())},"aria-label":c,"aria-disabled":n,"aria-pressed":f,disabled:n,className:h,$disabled:n,$inverseColors:void 0!==p&&p,$pressed:f,$textInside:!!m,children:[(0,i.Ay)(u)?(0,d.jsx)(o.A,{name:u}):u,m]}),l]})}},26642:(e,t,n)=>{n.d(t,{g:()=>b});var i=n(5720),o=n(61542),r=n(25022),s=n(90337),a=n(35311),d=n(23292),c=n(5646),u=c.Ay.header.withConfig({componentId:"sc-1tpj4rq-0"})(function(e){var t=e.theme;return(0,c.AH)(["display:flex;align-items:center;justify-content:space-between;width:100%;gap:",";padding:"," 0;"],t.sz.s3,t.sz.s3)}),l=c.Ay.div.withConfig({componentId:"sc-1tpj4rq-1"})(function(e){var t=e.theme,n=e.$align;return(0,c.AH)(["display:flex;align-items:center;justify-content:",";flex-wrap:wrap;gap:",";min-width:",";"],"end"===(void 0===n?"start":n)?"flex-end":"flex-start",t.sz.s3,t.sz.s10)}),h=c.Ay.div.withConfig({componentId:"sc-1tpj4rq-2"})(function(e){var t=e.theme;return(0,c.AH)(["display:flex;align-items:center;gap:",";"],t.sz.s2)}),p=c.Ay.span.withConfig({componentId:"sc-1tpj4rq-3"})(function(e){var t=e.theme;return(0,c.AH)(["",";color:",";font-weight:",";white-space:nowrap;"],t.typography.paragraph.s,t.co.neutral40,t.DEPRECATED_ty.semiBold)}),g=n(37876),f=(0,i.YK)({exit:{id:"text_comprehension_session_exit",defaultMessage:"Exit session"},showTargetLanguage:{id:"text_comprehension_session_show_target_language",defaultMessage:"Show questions in {targetLanguage}"},playAudio:{id:"text_comprehension_session_play_audio",defaultMessage:"Play audio"},stopAudio:{id:"text_comprehension_session_stop_audio",defaultMessage:"Stop audio"}}),m=function(e){var t=e.audioUrl,n=e.isLoading,r=(0,i.tz)(),s=(0,a.HO)(t),d=s.playing,c=s.play,u=s.stopAll,l=r.formatMessage(d?f.stopAudio:f.playAudio);return(0,g.jsx)(o.$n,{buttonType:"secondary",buttonSize:"extraSmall",icon:d?void 0:"playFilled",loading:n,disabled:!n&&!t,a11yText:l,"data-testid":"text-comprehe
1nsion-play-audio",noWrap:!0,onClick:function(){d?u():c()},children:l})},b=function(e){var t=e.hearts,n=e.targetLanguageName,o=e.showTargetLanguage,a=e.onShowTargetLanguageChange,c=e.onExit,b=e.playAudio,y=(0,i.tz)(),x=y.formatMessage(f.showTargetLanguage,{targetLanguage:n});return(0,g.jsxs)(u,{"data-testid":"text-comprehension-session-header",children:[(0,g.jsx)(l,{children:(0,g.jsx)(r.K,{icon:"close",ariaLabel:y.formatMessage(f.exit),handleClick:c})}),(0,g.jsxs)(l,{$align:"end",children:[b&&(0,g.jsx)(m,{audioUrl:b.url,isLoading:b.isLoading}),(0,g.jsxs)(h,{children:[(0,g.jsx)(p,{children:x}),(0,g.jsx)(s.d,{checked:o,onChange:function(e){a(null!=e&&e.target&&"checked"in e.target?e.target.checked:!o)},"aria-label":x,"data-testid":"text-comprehension-language-toggle"})]}),(0,g.jsx)(d.A,{numLives:t})]})]})}},35311:(e,t,n)=>{n.d(t,{Gy:()=>v,HO:()=>k,HZ:()=>z,d8:()=>A});var i=n(63857),o=n(59860),r=n(42969),s=n(60180),a=n.n(s),d=n(14232),c=n(97685),u=n(5720),l=n(37876),h=["audioObject"];function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach(function(t){(0,r.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var f=(0,u.YK)({audioLoadError:{id:"learning_session_media_error"}}),m={playingAudioUrl:null,audioObject:{}},b=g(g({},m),{},{dispatch:function(){return null}}),y=function(e,t){switch(t.type){case"ADD_AUDIO_URL":var n=t.url,i=e.audioObject,s=(0,o.A)(e,h);if(i[n])return e;return g(g({},s),{},{audioObject:g(g({},i),{},(0,r.A)({},n,new Audio(n)))});case"SET_PLAYING_AUDIO_URL":return g(g({},e),{},{playingAudioUrl:t.url});case"RESET_PLAYING_AUDIO_URL":return g(g({},e),{},{playingAudioUrl:null})}},x=(0,d.createContext)(b),w=x.Provider,v=function(e){var t=e.children,n=(0,d.useReducer)(y,m),i=n[0],o=n[1];return(0,d.useEffect)(function(){var e=function(){return o({type:"RESET_PLAYING_AUDIO_URL"})};return Object.values(i.audioObject).forEach(function(t){return null==t?void 0:t.addEventListener("ended",e)}),function(){Object.values(i.audioObject).forEach(function(t){return null==t?void 0:t.removeEventListener("ended",e)})}},[i.audioObject,o]),(0,l.jsx)(w,{value:g(g({},i),{},{dispatch:o}),children:t})};function A(){var e=(0,d.useContext)(x);if(!e)throw Error("You need to be inside a AudioProvider when using `useAudioContext`");return e}function z(e){var t=A(),n=t.audioObject,i=t.dispatch;if((0,d.useEffect)(function(){null!==e&&i({type:"ADD_AUDIO_URL",url:e})},[e,i]),!e)return null;var o=n[e];return o?1e3*o.duration:null}var j=function(e){var t=e.paused,n=e.ended,i=e.readyState;return!t&&!n&&i>2},O=function(e){e.pause(),e.currentTime=0},I=function(e){return Object.values(e).filter(function(e){return e&&j(e)}).forEach(function(e){return e&&O(e)})};function k(e){var t=A(),n=t.dispatch,o=t.audioObject,r=t.playingAudioUrl,s=(0,u.tz)();(0,d.useEffect)(function(){null!==e&&n({type:"ADD_AUDIO_URL",url:e})},[e,n]);var l=(0,d.useCallback)(function(){I(o),n({type:"RESET_PLAYING_AUDIO_URL"})},[o,n]);return{play:(0,d.useCallback)((0,i.A)(a().mark(function t(){var i,r,d,u;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==e){t.next=2;break}return t.abrupt("return");case 2:if(I(o),i=o[e]){t.next=6;break}return t.abrupt("return");case 6:return t.prev=6,t.next=9,i.play();case 9:n({type:"SET_PLAYING_AUDIO_URL",url:e}),t.next=22;break;case 12:if(t.prev=12,t.t0=t.catch(6),i.load(),d="AbortError"===(r=t.t0.name)||"NotSupportedError"===r,u="NotAllowedError"===r,!(d||u)){t.next=20;break}return t.abrupt("return");case 20:throw c.Ay.error(s.formatMessage(f.audioLoadError)),t.t0;case 22:case"end":return t.stop()}},t,null,[[6,12]])})),[o,n,e,s]),playing:!!e&&e===r,stopAll:l}}},36753:(e,t,n)=>{n.d(t,{QB:()=>s,UC:()=>r,VY:()=>d,hE:()=>a,wi:()=>o,yp:()=>c});var i=n(5646),o=i.Ay.div.withConfig({componentId:"sc-eschg5-0"})(function(e){var t=e.theme;return(0,i.AH)(["position:fixed;left:0;right:0;bottom:0;z-index:",";display:flex;justify-content:center;padding:",";background-color:",";border-top:"," solid ",";box-shadow:",";@media (min-width:","){padding:"," ",";}"],t.zi.z5,t.sz.s4,t.co.neutral99,t.bo.thinWidth,t.co.neutral90,t.sh.s2,t.sz.ml,t.sz.s5,t.sz.s10)}),r=i.Ay.div.withConfig({componentId:"sc-eschg5-1"})(function(e){var t=e.theme;return(0,i.AH)(["display:flex;flex-direction:column;align-items:center;gap:",";box-sizing:border-box;width:100%;max-width:",";text-align:center;@media (min-width:","){flex-direction:row;justify-content:space-between;text-align:start;}
1"],t.sz.s4,t.sz.xxxl,t.sz.ml)}),s=i.Ay.div.withConfig({componentId:"sc-eschg5-2"})(function(e){var t=e.theme;return(0,i.AH)(["display:flex;flex-direction:column;gap:",";"],t.sz.s1)}),a=i.Ay.h2.withConfig({componentId:"sc-eschg5-3"})(function(e){var t=e.theme;return(0,i.AH)(["max-width:none;",";color:",";margin:0;@media (max-width:","){",";}"],t.typography.heading.desktop.xs,t.co.neutral10,t.sz.lg,t.typography.heading.mobile.xs)}),d=i.Ay.p.withConfig({componentId:"sc-eschg5-4"})(function(e){var t=e.theme;return(0,i.AH)(["max-width:none;",";color:",";margin:0;"],t.typography.paragraph.m,t.co.neutral40)}),c=i.Ay.div.withConfig({componentId:"sc-eschg5-5"})(function(e){var t=e.theme;return(0,i.AH)(["display:flex;flex-direction:column;gap:",";width:100%;@media (min-width:","){flex-direction:row;width:auto;min-width:",";}"],t.sz.s3,t.sz.ml,t.sz.s64)})},43255:(e,t,n)=>{n.d(t,{L:()=>p});var i=n(79607),o=n(68112),r=n(5646),s=n(89032),a=r.Ay.div.withConfig({componentId:"sc-nviasw-0"})(function(e){var t=e.theme;return(0,r.AH)(["display:flex;flex-direction:column;gap:",";width:100%;box-sizing:border-box;"],t.sz.s5)}),d=r.Ay.section.withConfig({componentId:"sc-nviasw-1"})(function(e){var t=e.theme,n=e.$isCorrect,i=void 0!==n&&n,o=e.$isHighlighted,s=void 0!==o&&o;return(0,r.AH)(["max-width:none;display:flex;flex-direction:column;gap:",";width:100%;box-sizing:border-box;padding:",";background-color:",";border:"," solid ",";border-radius:",";box-shadow:",";cursor:pointer;transition:background-color 0.2s ease-in-out,border-color 0.2s ease-in-out,box-shadow 0.2s ease-in-out;@media (min-width:","){padding:",";}"],t.sz.s4,t.sz.s5,i?t.co.success95:t.co.neutral98,s?t.bo.mediumWidth:t.bo.thinWidth,s?t.co.secondary40:i?t.co.success90:t.co.neutral95,t.bo.medium,s?t.sh.s1:"none",t.sz.ml,t.sz.s6)}),c=r.Ay.h2.withConfig({componentId:"sc-nviasw-2"})(function(e){var t=e.theme;return(0,r.AH)(["max-width:none;",";color:",";margin:0;text-align:center;width:100%;@media (max-width:","){",";}"],t.typography.heading.desktop.xs,t.co.neutral10,t.sz.lg,t.typography.heading.mobile.xs)}),u=r.Ay.div.withConfig({componentId:"sc-nviasw-3"})(function(e){var t=e.theme;return(0,r.AH)(["display:flex;flex-direction:column;gap:",";width:100%;box-sizing:border-box;"],t.sz.s2)}),l=r.Ay.div.withConfig({componentId:"sc-nviasw-4"})(function(e){var t=e.theme;return(0,r.AH)(["width:100%;box-sizing:border-box;& > div{display:block !important;width:100% !important;max-width:none !important;flex-basis:auto !important;box-sizing:border-box;}button{box-sizing:border-box;width:100% !important;max-width:none !important;font-size:",";line-height:1.3;padding:"," ",";min-height:",";height:auto;border-radius:",";font-weight:",";-webkit-font-smoothing:antialiased;word-break:break-word;justify-content:center;text-align:center;}","{display:flex;align-items:center;justify-content:center;width:",";height:",";font-size:",";top:50%;left:",";transform:translateY(-50%);}","{flex-grow:1;margin-left:",";margin-right:",";text-align:center;@media (min-width:40rem){margin-left:",";margin-right:",";}}"],t.DEPRECATED_ty.medium,t.sz.s2,t.sz.s3,t.sz.s10,t.bo.mediumSmall,t.DEPRECATED_ty.mediumWeight,s.yC,t.sz.s5,t.sz.s5,t.DEPRECATED_ty.small,t.sz.s2,s.CL,t.sz.s7,t.sz.s7,t.sz.s7,t.sz.s7)}),h=n(37876),p=function(e){var t=e.questions,n=e.questionStates,r=e.highlightedQuestionId,s=e.showTargetLanguage,p=e.disabled,g=void 0!==p&&p,f=e.onHighlight,m=e.onSelect;
1return(0,h.jsx)(a,{"data-testid":"text-comprehension-questions",children:t.map(function(e,t){var a,p=null!=(a=n[e.id])?a:{wrongSelections:[],lockedOption:null},b=!!p.lockedOption,y=g||b,x=r===e.id,w=!s&&e.sourceOptions&&e.sourceOptions.length===e.options.length?e.sourceOptions:e.options,v=function(t,n){if(null==n||n.stopPropagation(),!(0,i.S)(n)){var o=e.options[t];!o||y||p.wrongSelections.includes(o)||m(e.id,o)}};return(0,h.jsxs)(d,{$isCorrect:b,$isHighlighted:x,"data-testid":"text-comprehension-question-".concat(t+1),"data-highlighted":x?"true":"false",onClick:function(){return f(e.id)},children:[(0,h.jsx)(c,{dir:"auto",children:!s&&e.questionSourceText?e.questionSourceText:e.questionText}),(0,h.jsx)(u,{children:w.map(function(n,i){var r,s=null!=(r=e.options[i])?r:n,a=p.wrongSelections.includes(s),d=p.lockedOption===s,c=d?o.m.GREEN:a?o.m.RED:o.m.GREY;return(0,h.jsx)(l,{children:(0,h.jsx)(o.v,{"data-testid":"text-comprehension-question-".concat(t+1,"-option-").concat(i+1),positionLabel:i+1,buttonColor:c,highlight:a||d,disabled:y||a,enableKeyboardShortcut:x&&!y,onClick:function(e){return v(i,e)},children:(0,h.jsx)("span",{dir:"auto",children:n})})},"".concat(e.id,"-").concat(s))})})]},e.id)})})}},48063:(e,t,n)=>{n.d(t,{T:()=>c});var i=n(5646),o=i.Ay.div.withConfig({componentId:"sc-4kucn7-0"})(function(e){var t=e.theme,n=e.$hasTranslation,o=void 0!==n&&n;return(0,i.AH)(["display:flex;flex-direction:",";flex-wrap:",";justify-content:stretch;align-items:stretch;gap:",";width:100%;box-sizing:border-box;",""],o?"row":"column",o?"wrap":"nowrap",t.sz.s2,o&&(0,i.AH)(["> *{flex:1 1 calc(50% - ",");min-width:min(100%,",");}"],t.sz.s1,t.sz.xl))}),r=i.Ay.section.withConfig({componentId:"sc-4kucn7-1"})(function(e){var t=e.theme;return(0,i.AH)(["max-width:none;box-sizing:border-box;width:100%;min-height:",";padding:"," ",";background-color:",";border-radius:",";@media (min-width:","){min-height:",";padding:",";}"],t.sz.s48,t.sz.s6,t.sz.s5,t.co.neutral95,t.bo.medium,t.sz.ml,t.sz.s64,t.sz.s8)}),s=i.Ay.p.withConfig({componentId:"sc-4kucn7-2"})(function(e){var t=e.theme;return(0,i.AH)(["max-width:none;",";font-weight:",";color:",";margin:0;text-align:start;white-space:pre-wrap;line-height:1.7;@media (max-width:","){",";font-weight:",";line-height:1.7;}"],t.typography.heading.desktop.s,t.DEPRECATED_ty.mediumWeight,t.co.neutral10,t.sz.lg,t.typography.heading.mobile.s,t.DEPRECATED_ty.mediumWeight)}),a=(0,i.Ay)(s).withConfig({componentId:"sc-4kucn7-3"})(function(e){var t=e.theme;return(0,i.AH)(["color:",";"],t.co.neutral30)}),d=n(37876),c=function(e){var t=e.text,n=e.translationText,i=void 0===n?null:n,c=!!i;return(0,d.jsxs)(o,{$hasTranslation:c,"data-testid":"text-comprehe
1nsion-passage",children:[(0,d.jsx)(r,{children:(0,d.jsx)(s,{dir:"auto",children:t})}),c&&(0,d.jsx)(r,{"data-testid":"text-comprehension-passage-translation",children:(0,d.jsx)(a,{dir:"auto",children:i})})]})}},52201:(e,t,n)=>{n.d(t,{$:()=>h});var i=n(5720),o=n(61542),r=n(5646),s=r.Ay.div.withConfig({componentId:"sc-1xzeswd-0"})(function(e){var t=e.theme;return(0,r.AH)(["display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:",";padding:"," ",";min-height:60vh;"],t.sz.s4,t.sz.s6,t.sz.s4)}),a=r.Ay.h1.withConfig({componentId:"sc-1xzeswd-1"})(function(e){var t=e.theme;return(0,r.AH)(["",";color:",";margin:0;@media (max-width:","){",";}"],t.typography.heading.desktop.m,t.co.neutral10,t.sz.lg,t.typography.heading.mobile.m)}),d=r.Ay.p.withConfig({componentId:"sc-1xzeswd-2"})(function(e){var t=e.theme;return(0,r.AH)(["",";color:",";margin:0;max-width:28rem;"],t.typography.paragraph.m,t.co.neutral40)}),c=r.Ay.div.withConfig({componentId:"sc-1xzeswd-3"})(function(e){var t=e.theme;return(0,r.AH)(["display:flex;flex-direction:column;gap:",";width:100%;max-width:20rem;margin-top:",";"],t.sz.s3,t.sz.s2)}),u=n(37876),l=(0,i.YK)({title:{id:"text_comprehension_session_failure_title",defaultMessage:"Out of hearts"},description:{id:"text_comprehension_session_failure_description",defaultMessage:"You ran out of hearts. Try again when you are ready."},retry:{id:"text_comprehension_session_failure_retry",defaultMessage:"Retry"},exit:{id:"text_comprehension_session_failure_exit",defaultMessage:"Exit"}}),h=function(e){var t=e.onRetry,n=e.onExit,r=(0,i.tz)();
1return(0,u.jsxs)(s,{"data-testid":"text-comprehension-failure",children:[(0,u.jsx)(a,{children:r.formatMessage(l.title)}),(0,u.jsx)(d,{children:r.formatMessage(l.description)}),(0,u.jsxs)(c,{children:[(0,u.jsx)(o.$n,{wide:!0,buttonType:"primary",buttonSize:"large",onClick:t,"data-testid":"text-comprehension-failure-retry",children:r.formatMessage(l.retry)}),(0,u.jsx)(o.$n,{wide:!0,buttonType:"secondary",buttonSize:"large",onClick:n,"data-testid":"text-comprehension-failure-exit",children:r.formatMessage(l.exit)})]})]})}},75817:(e,t,n)=>{n.d(t,{BJ:()=>a,UC:()=>r,bL:()=>o,nO:()=>s});var i=n(5646),o=i.Ay.div.withConfig({componentId:"sc-6f77lj-0"})(function(e){var t=e.theme;return(0,i.AH)(["box-sizing:border-box;min-height:100%;width:100%;background-color:",";color:",";"],t.co.neutral99,t.co.neutral20)}),r=i.Ay.div.withConfig({componentId:"sc-6f77lj-1"})(function(e){var t=e.theme;return(0,i.AH)(["box-sizing:border-box;width:100%;max-width:",";margin:0 auto;padding:",";@media (min-width:","){padding:"," ",";}"],t.sz.xxxl,t.sz.s4,t.sz.ml,t.sz.s6,t.sz.s8)}),s=i.Ay.div.withConfig({componentId:"sc-6f77lj-2"})(function(e){var t=e.theme,n=e.$hasSuccessFooter,o=e.$wide;return(0,i.AH)(["box-sizing:border-box;width:",";margin:"," auto 0;padding-bottom:",";"],void 0!==o&&o?"100%":"min(100%, ".concat(t.sz.xxl,")"),t.sz.s2,void 0!==n&&n?t.sz.s48:0)}),a=i.Ay.div.withConfig({componentId:"sc-6f77lj-3"})(function(e){var t=e.theme;return(0,i.AH)(["display:flex;flex-direction:column;gap:",";width:100%;"],t.sz.s8)})},79407:(e,t,n)=>{n.d(t,{VY:()=>a,aH:()=>d,hE:()=>s,mc:()=>r,yp:()=>c});var i=n(5646),o=n(90316),r=i.Ay.div.withConfig({componentId:"sc-rj5hlc-0"})(function(e){var t=e.theme;return(0,i.AH)(["display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:",";padding:"," ",";min-height:60vh;width:100%;"],t.sz.s4,t.sz.s6,t.sz.s4)}),s=i.Ay.h1.withConfig({componentId:"sc-rj5hlc-1"})(function(e){var t=e.theme;return(0,i.AH)(["",";color:",";margin:0;@media (max-width:","){",";}"],t.typography.heading.desktop.m,t.co.neutral10,t.sz.lg,t.typography.heading.mobile.m)}),a=i.Ay.p.withConfig({componentId:"sc-rj5hlc-2"})(function(e){var t=e.theme;return(0,i.AH)(["",";color:",";margin:0;max-width:28rem;"],t.typography.paragraph.m,t.co.neutral40)}),d=(0,i.Ay)(o.A).withConfig({componentId:"sc-rj5hlc-3"})(function(e){var t=e.theme;return(0,i.AH)(["width:",";"],t.sz.s12)}),c=i.Ay.div.withConfig({componentId:"sc-rj5hlc-4"})(function(e){var t=e.theme;return(0,i.AH)(["display:flex;flex-direction:column;gap:",";width:100%;max-width:20rem;margin-top:",";"],t.sz.s3,t.sz.s2)})},90337:(e,t,n)=>{n.d(t,{d:()=>h});var i=n(42969),o=n(14232),r=n(5646),s=r.Ay.label.withConfig({componentId:"sc-l8eass-0"})(function(){return(0,r.AH)(["position:relative;display:inline-block;"])}),a=r.Ay.input.attrs({type:"checkbox"}).withConfig({componentId:"sc-l8eass-1"})(function(){return(0,r.AH)(["opacity:0;width:0;height:0;position:absolute;"])}),d=r.Ay.div.withConfig({componentId:"sc-l8eass-2"})(function(e){var t=e.theme;return(0,r.AH)(["cursor:pointer;background-color:",";border-radius:",";transition:padding 0.2s,background-color 0.2s;padding-right:",";&::before{content:'';display:block;box-sizing:border-box;border-radius:",";height:",";width:",";border:"," solid transparent;background-color:",";background-clip:content-box;box-shadow:",";}input:disabled + &{background-color:",";cursor:not-allowed;&::before{box-shadow:unset;}}input:checked + &{background-color:",";padding-right:0;padding-left:",";}input:checked:disabled + &{background-color:",";}input:focus-visible + &{box-shadow:0 0 0 3px ",";}"],t.co.neutral90,t.bo.round,t.sz.s4,t.bo.round,t.sz.s8,t.sz.s8,t.bo.mediumWidth,t.co.neutral99,t.sh.s2,t.co.neutral95,t.co.success80,t.sz.s4,t.co.success95,t.co.information50)}),c=n(37876);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?u(Object(n),!0).forEach(function(t){(0,i.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var h=function(e){var t=(0,o.useCallback)(function(t){(null==t?void 0:t.key)==="Enter"&&e.onChange&&e.onChange()},[e]);return(0,c.jsxs)(s,{children:[(0,c.jsx)(a,l(l({},e),{},{onKeyUp:t})),(0,c.jsx)(d,{})]})}},90376:(e,t,n)=>{n.d(t,{RJ:()=>l});var i=n(44478),o=n(42969),r=n(14232);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){(0,o.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var d=function(e,t,n){if(0===e.length)return null;for(var i=n?Math.max(0,e.findIndex(function(e){return e.id===n})):0,o=i;o<e.length;o+=1){var r,s,a,d=e[o];if(d&&!(null!=(a=t[d.id])&&a.lockedOption))return d.id}for(var c=0;c<i;c+=1){var u,l=e[c];if(l&&!(null!=(u=t[l.id])&&u.lockedOption))return l.id}return null!=(r=null!=n?n:null==(s=e[0])?void 0:s.id)?r:null},c=function(e){var t,n;return{stage:"playing",hearts:3,questions:e,questionStates:Object.fromEntries(e.map(function(e){return[e.id,{wrongSelections:[],lockedOption:null}]})),highlightedQuestionId:null!=(t=null==(n=e[0])?void 0:n.id)?t:null}},u=function(e,t){switch(t.type){case"RETRY":return c(e.questions);case"HIGHLIGHT_QUESTION":if(!e.questions.some(function(e){return e.id===t.questionId}))return e;return a(a({},e),{},{highlightedQuestionId:t.questionId});case"SELECT_OPTION":if("playing"!==e.stage)return e;var n=e.questions.find(function(e){return e.id===t.questionId}),r=e.questionStates[t.questionId];if(!n||!r||r.lockedOption||r.wrongSelections.includes(t.option))return e;if(t.option===n.correctOption){var s=a(a({},e.questionStates),{},(0,o.A)({},t.questionId,a(a({},r),{},{lockedOption:t.option}))),u=a(a({},e),{},{questionStates:s,highlightedQuestionId:t.questionId}),l=u.questions.every(function(e){var t;return(null==(t=u.questionStates[e.id])?void 0:t.lockedOption)!=null});return a(a({},u),{},{stage:l?"success":"playing",highlightedQuestionId:l?t.questionId:d(u.questions,s,t.questionId)})}var h=e.hearts-1,p=a(a({},e.questionStates),{},(0,o.A)({},t.questionId,a(a({},r),{},{wrongSelections:[].concat((0,i.A)(r.wrongSelections),[t.option])})));return a(a({},e),{},{hearts:h,questionStates:p,highlightedQuestionId:t.questionId,stage:h<=0?"failure":"playing"});default:return e}},l=function(e){var t=(0,r.useReducer)(u,e,c),n=t[0],i=t[1],o=n.questions.map(function(e){var t,i;return{questionId:e.id,selectedOption:null!=(t=null==(i=n.questionStates[e.id])?void 0:i.lockedOption)?t:""}});return{stage:n.stage,hearts:n.hearts,questions:n.questions,questionStates:n.questionStates,highlightedQuestionId:n.highlightedQuestionId,lockedAnswers:o,lockedCount:n.questions.filter(function(e){var t;return(null==(t=n.questionStates[e.id])?void 0:t.lockedOption)!=null}).length,selectOption:function(e,t){return i({type:"SELECT_OPTION",questionId:e,option:t})},highlightQuestion:function(e){return i({type:"HIGHLIGHT_QUESTION",questionId:e})},retry:function(){return i({type:"RETRY"})}}}}}]);
2//# sourceMappingURL=1315-c96fb88806c2729e.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.