PageSourceSearch

https://www.playfactile.com/mygames/Question.01-10--15-59-26.DfVub9r-.js

js playfactile.com collected 2026-10-01 13:11:58 UTC 27,464 bytes, 4 lines download raw bytes

1var Qe=Object.defineProperty;var je=(e,i,t)=>i in e?Qe(e,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[i]=t;var R=(e,i,t)=>je(e,typeof i!="symbol"?i+"":i,t);import{j as s}from"./bootstrapEtc.01-10--15-59-26.TDRmwVjv.js";import{r as T,R as $e,L as Oe,P as p}from"./react.01-10--15-59-26.RXCSs4lJ.js";import{f as be,aE as O,H as qe,dh as ke,bi as Fe,al as De,O as Ee,ck as Ne,dm as me,k as fe,dn as Be,dl as Ge,w as Pe,dp as Re,df as we}from"./redux.01-10--15-59-26.CJsG_uGv.js";import{j as N,h as He}from"./index.01-10--15-59-26.DMOBYHXJ.js";import{M as Le,h as Ue,e as Ve,t as We,i as Ye,F as Ze}from"./gamePlay.01-10--15-59-26.COkjf-ym.js";import{F as k}from"./FactileQuestion.01-10--15-59-26.8cG9vjr9.js";import{w as Xe,u as Ke}from"./utils.01-10--15-59-26.CMspICcW.js";import{f as ge,s as j,a as Je}from"./gamePlay.01-10--15-59-26.P7YyBswU.js";import"./questionFaceContent.01-10--15-59-26.DqRQcvjY.js";import"./PFKatex.01-10--15-59-26.D1muC4uB.js";import"./memoize-one.esm.01-10--15-59-26.Cbrq43TT.js";import"./Modal.01-10--15-59-26.BkjAf1BG.js";import"./hook.01-10--15-59-26.BQK0QPK5.js";import"./SafeAnchor.01-10--15-59-26.BIDDc1sN.js";function xe(e=[]){let i=0;return Array.isArray(e)&&e.forEach(t=>{(Object.hasOwnProperty.call(t,"markedAsCorrect")&&(t!=null&&t.markedAsCorrect)||t!=null&&t.isTrue)&&(i+=1)}),i}class et extends T.Component{constructor(t){var o,a;super(t);R(this,"answerSelected",()=>{const{questionTime:t,readingTime:o,questionTimeUp:a,playerBuzzedinOrAnswered:c,isGamePaused:u,selfPacedMode:n,isModerator:x}=this.props;typeof this.props.answerSelectHandler=="function"&&this.state.selectedOptionIndex.length===0&&t&&!o&&!a&&(c&&this.props.customizations.buzzerInChoice&&this.props.gameMode==="choice"||n==="choice"&&x||!c&&!this.props.customizations.buzzerInChoice||this.props.customizations.buzzerInChoice&&!c&&this.props.customizations.enter_final_answer&&!this.props.customizations.buzzerForFinalFactile&&this.props.gameStage===7||!c&&this.props.gameStage===8)&&!u&&this.setState(h=>{const{answers:f}=h;return{selectedOptionIndex:f}},()=>this.props.answerSelectHandler(this.state.selectedOptionIndex))});R(this,"selectAnswer",t=>{if(this.props.selfPacedMode==="choice"&&this.props.isModerator&&(this.props.isQuestionToggled||!this.props.questionTime)||this.props.gameMode==="choice"&&(this.props.isModerator||this.props.playerBuzzedinOrAnswered&&!this.props.customizations.buzzerInChoice||!this.props.playerBuzzedinOrAnswered&&this.props.customizations.buzzerInChoice&&(this.props.customizations.buzzerForFinalFactile&&this.props.gameStage===7||this.props.customizations.enter_final_answer&&this.props.gameStage!==7||!this.props.customizations.enter_final_answer&&this.props.gameStage!==8)||this.props.isModeratorMarked)||!this.props.currentQuestion||!this.props.currentQuestion.answers)return;let o=0;for(let n=0;n<this.props.currentQuestion.answers.length;n++)this.props.currentQuestion.answers[n].isSelected&&(o+=1);if(o===this.state.totalCorrectAnswer)return;const a=this.state.answers.find(n=>n===t);let c=[...this.state.answers],u=!1;a===void 0&&this.state.totalCorrectAnswer!==this.state.answers.length?c.push(t):c[0]!==t?(u=!0,c.pop(),c.push(t)):c=this.state.answers.filter(n=>n!==t),(c.length!==this.state.answers.length||u)&&this.setState({answers:c}
1,()=>{this.props.gameMode==="ic"&&!this.props.currentQuestion.playerAnswer?typeof this.props.answerSelectHandler=="function"&&this.props.answerSelectHandler(this.state.answers):this.props.gameMode!=="ic"&&this.state.answers.length===this.state.totalCorrectAnswer&&this.answerSelected()})});this.state={selectedOptionIndex:((o=t.selectedOptionIndex)==null?void 0:o.length)>0?t.selectedOptionIndex:[],totalCorrectAnswer:xe((a=t.question)==null?void 0:a.choiceAnswers),answers:[]}}componentDidMount(){window.memoryTimerInterval&&clearInterval(window.memoryTimerInterval),this.props.customizations&&this.props.customizations.automaticAudioPlayInQuestion&&setTimeout(()=>{if(O(".playAudio")[0])try{O(".playAudio")[0].pause()===void 0&&(O(".playAudio")[0].load(),O(".playAudio")[0].play())}catch(t){qe(t)}},500)}componentDidUpdate(t){var u;const{question:o,hintEnabled:a}=this.props,c={};((u=t.question)==null?void 0:u.choiceAnswers)!==(o==null?void 0:o.choiceAnswers)&&(c.totalCorrectAnswer=xe(o==null?void 0:o.choiceAnswers)),t.hintEnabled!==a&&(a||(c.answers=[])),Object.keys(c).length>0&&this.setState(c)}areAllTextOptions(){var o;return((o=this.props.question.choiceAnswers)==null?void 0:o.every(a=>a.answer_type===0))||!1}checkChoiceAnswerShow(){var a;let t=this.props.buzzerMode&&this.props.isModerator&&this.props.isQuestionActive?this.props.customizations.displayChoiceAnsInGameBoard:!0;const o=Array.isArray(this.props.question.choiceAnswers)&&this.props.question.choiceAnswers.length<=1;return t&&o&&this.props.gameMode!=="ic"&&(this.props.customizations.mixQuestionChoice||!this.props.customizations.mixQuestionChoice&&((a=this.props.currentQuestion)!=null&&a.isFFQuestion))&&(t=!1),t}choiceOption(t,o){var n,x;const a=()=>{const{gameMode:h,playerBuzzedinOrAnswered:f,answerSelectHandler:m,currentQuestion:v,readingTime:z,questionTime:A,onTimeExpire:q,questionTimeUp:y,oneTeamMemberAnswered:B,isModeratorMarked:G}=this.props;return h==="ic"?!q&&m&&!t.isSelected&&!v.playerAnswer:!y&&!q&&(!f&&!this.props.customizations.buzzerInChoice||this.props.selfPacedMode==="choice"&&this.props.isModerator||f&&this.props.customizations.buzzerInChoice&&this.props.gameMode==="choice"||!this.props.playerBuzzedinOrAnswered&&this.props.customizations.buzzerInChoice&&(this.props.customizations.enter_final_answer&&!this.props.customizations.buzzerForFinalFactile&&this.props.gameStage===7||this.props.gameStage===8))&&this.state.answers!==this.state.totalCorrectAnswer&&m&&A&&!z&&!B&&!G},c=()=>{const h=`Choice ${o+1}`,f=[],m=[];return t.answer&&t.answer.trim()&&f.push(t.answer),t.answer_images_gallery&&t.answer_images_gallery.length>0&&m.push("image"),t.video_answer_url&&m.push("video"),t.audio_url_answer&&m.push("audio"),t.math_answer_question&&m.push("math equation"),f.length>0&&m.length>0?`${h}: ${f[0]}, with ${m.join(" and ")}`:f.length>0?`${h}: ${f[0]}`:m.length>0?`${h}: ${m.join(" and ")}`:h};let u=a();return s.jsxs("div",{role:"button",tabIndex:u?0:-1,onClick:()=>{!this.props.readingTime&&!this.props.isGamePaused&&!this.props.onTimeExpire&&!this.props.oneTeamMemberAnswered&&this.selectAnswer(o)},onKeyDown:h=>{He(h,{enter:()=>{!this.props.readingTime&&!this.props.isGamePaused&&!this.props.onTimeExpire&&!this.props.oneTeamMemberAnswered&&this.selectAnswer(o)},space:()=>{!this.props.readingTime&&!this.props.isGamePaused&&!this.props.onTimeExpire&&!this.props.oneTeamMemberAnswered&&this.selectAnswer(o)}})},className:N("choice-option",{w100:this.props.question.choiceAnswers.length===1,w50:this.props.question.choiceAnswers.length===2,w33:this.props.question.choiceAnswers.length===3,w25:this.props.question.choiceAnswers.length===4,cursorAuto:this.props.customizations.buzzerInChoice&&!this.props.playerBuzzedinOrAnswered&&!this.props.isModerator&&!this.props.isRemoteViewPage&&this.props.gameStage!==8},this.props.isQuestionActive?{selectable:a(),isSelected:t.isSelected||this.state.answers.includes(o)&&!this.props.isRemoteViewPage,fifty_fiftyApplied:this.props.gameMode==="ic"&&t.fifty_fifty,selection:this.state.answers.length<=this.state.totalCorrectAnswer&&this.state.answers.includes(o)&&!this.props.isRemoteViewPage,rightSelection:t.isSelected&&(Object.hasOwnProperty.call(t,"isTrue")&&t.isTrue||Object.hasOwnProperty.call(t,"markedAsCorrect")&&t.markedAsCorrect)&&!((n=this.props.currentQuestion)!=null&&n.isFFQuestion),wrongSelection:t.isSelected&&!t.isTrue&&!t.markedAsCorrect&&!((x=this.props.currentQuestion)!=null&&x.isFFQuestion)}:""),title:c(),"aria-pressed":this.state.answers.includes(o),children:[s.jsx("div",{className:"answerLabel",children:t.label||`A${o+1}`}),s.jsx(k,{question:{type:t.answer_type,textQAndA:t.answer,imageGallery:t.answer_images_gallery,video:t.video_answer_url,mathEque:t.math_answer_question,hideVideoTitle:t.hideVideoTitleAns,audioUrl:t.audio_url_answer,videoThumbnail:!0,answerIndex:o},customizations:this.props.customizations,setActiveImageIndex:this.props.setActiveImageIndex})]},o)}displayAnswerContent(t){return this.props.question.choiceAnswers?s.jsx("div",{id:"responsive-choice-options",className:N("choice-options-section clearfix",{"h-100":t||!this.props.isQuestionActive,"mobile-device":ke==="mobile"&&this.areAllTextOptions()}),children:this.props.question.choiceAnswers.map((o,a)=>this.choiceOption(o,a))}):""}displayQuestionContent(){return s.jsxs(s.Fragment,{children:[this.props.hideChoiceQuestion?"":s.jsxs("div",{className:N("choice-question-section",{h100:!(this.props.question.choiceAnswers&&this.checkChoiceAnswerShow())}),children:[s.jsx("div",{className:"questionLabel",children:this.props.hintEnabled?"Question Hint":""}),s.jsx(k,{question:this.props.question,mainChoiceQues:!0,sharedGameAccess:this.props.sharedGameAccess,isPreviewActive:this.props.isModerator,customizations:this.props.customizations,setActiveImageIndex:this.props.setActiveImageIndex}),this.state.totalCorrectAnswer>1?s.jsx("span",{className:"select-options-count-label",children:s.jsxs("small",{children:["Select ",this.state.totalCorrectAnswer," options"]})}):""]}),this.checkChoiceAnswerShow()?this.displayAnswerContent(this.props.hideChoiceQuestion):""]})}render(){return s.jsx("div",{className:"choice-question-wrapper unselectable",onCopy:t=>(t.preventDefault(),!1),onCut:t=>(t.preventDefault(),!1),children:this.props.isQuestionActive?this.displayQuestionContent():this.displayAnswerContent()})}}const tt=({gamePlay:e},i)=>({questionTime:e.questionTime,onTimeExpire:e.onTimeExpire,questionTimeUp:e.questionTimeUp,isModerator:e.isModerator||i.preview,hintEnabled:e.hintEnabled,readingTime:e.readingTime,gameStage:e.gameStage,currentQuestion:e.currentQuestion,customizations:e.customizations,oneTeamMemberAnswered:e.oneTeamMemberAnswered,gameMode:i.gameMode||e.gameMode,buzzerMode:e.buzzerMode,isGamePaused:e.isGamePaused,playerBuzzedinOrAnswered:e.playerBuzzedinOrAnswered,isRemoteViewPage:e.isRemoteViewPage,isModeratorMarked:e.isModeratorMarked,selfPacedMode:e.selfPacedMode,isQuestionToggled:e.isQuestionToggled}),it=Xe("common")(et),ve=be(tt,null)(it),C="components.mainGameBoard.questionScreen.question",E=20,Ae=3,Me=e=>!!e&&(e.scrollWidth>e.offsetWidth+Ae||e.scrollHeight>e.offsetHeight+Ae);function ze(e){try{if(!e)return{element:"missing"};const i=window.getComputedStyle(e);let t=null,o=null;try{const a=e.style.fontSize;e.style.setProperty("font-size","88px"),o=window.getComputedStyle(e).fontSize,a?e.style.setProperty("font-size",a):e.style.removeProperty("font-size"),t=parseInt(o,10)===88}catch(a){o=`probe-error: ${a}`}return{prefersReducedMotion:typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,transitionProperty:i.transitionProperty,transitionDuration:i.transitionDuration,writeSticks:t,writeReadBack:o,offsetWidth:e.offsetWidth,offsetHeight:e.offsetHeight,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,clientWidth:e.clientWidth,clientHeight:e.clientHeight,computedFontSize:i.fontSize,inlineFontSize:e.style.fontSize||null,textLength:(e.textContent||"").trim().length,transform:i.transform,zoom:i.zoom,textSizeAdjust:i.webkitTextSizeAdjust||i.textSizeAdjust,devicePixelRatio:window.devicePixelRatio,viewport:`${window.innerWidth}x${window.innerHeight}`}}catch(i){return{diagnosticsError:String(i)}}}function Te(e="factile"){var o;const i=O,t=i("#responsive-question, #responsive-choice-options");try{t.addClass("font-fitting");const a=(u,n)=>Math.floor((u+n)/2),c=u=>{const n=parseInt(u.css("fontSize"),10);n>10&&u.css("fontSize",parseInt(n*.95,10))};if(e==="factile"||e==="choice"){const u=n=>{let x=3,h=e==="choice"?100:200,f=0;do{const m=i(`#responsive-question ${e==="choice"?".choice-question-section":""} ${n}`)[0],v=i(m),z=parseInt(v.css("fontSize"),10);Me(m)?h=z:x=z;const A=a(x,h);v.css("fontSize",A),i(`#responsive-question ${n} span.base`).css("fontSize",A+3),i(`#responsive-question ${n} span.fr-emoticon`).each(function(){i(this).css({width:A,height:A})})}while(h-x>1&&++f<E);if(f>=E){const m=i(`#responsive-question ${e==="choice"?".choice-question-section":""} ${n}`)[0],v=ze(m);we("resizeToFitQueAns: font-fit did not converge (loop cap hit)",{level:"warning",tags:{font_fit:"loop-cap-hit",font_fit_reduced_motion:String(v.prefersReducedMotion)},contexts:{resizeToFit:{questionType:e,wrapper:n,min:x,max:h,iterations:f,...v}}})}c(i(i(`#responsive-question ${n}`)[0]))};u(".text-content-wrapper"),u(".math-content-wrapper")}if(e==="choice"){const u=n=>{let x=3,h=100,f=0;const m=i(`#responsive-choice-options ${n}`);do{const v=parseInt(m.css("fontSize"),10);let z=!1;m.each(function(){z=z||Me(this)}),z?h=v:x=v;const A=a(x,h);m.css({fontSize:A}),m.each(function(){i(this).find("span.base").css("fontSize",A+3),i(this).find("span.fr-emoticon").each(function(){i(this).css({width:A,height:A})})})}while(h-x>1&&++f<E);if(f>=E){const v=ze(m[0]);we("resizeToFitQueAns: choice font-fit did not converge (loop cap hit)",{level:"warning",tags:{font_fit:"loop-cap-hit",font_fit_reduced_motion:String(v.prefersReducedMotion)},contexts:{resizeToFit:{questionType:e,wrapper:n,optionMin:x,optionMax:h,iterations:f,optionCount:m.length,...v}}})}c(i(`#responsive-choice-options ${n}`))};(o=i("#responsive-choice-options"))!=null&&o.hasClass("mobile-device")||(u(".text-content-wrapper"),u(".math-content-wrapper"))}}catch(a){qe(a,{contexts:{resizeToFit:{message:"Error in resizeToFitQueAns",questionType:e}}})}finally{t.removeClass("font-fitting")}i(".questionBoard a").css("color","#000"),i(".questionBoard a").attr("target","_blank")}const st=["responsive-question","responsive-choice-options"],pe=e=>st.forEach(i=>
1{var t;return(t=document.getElementById(i))==null?void 0:t.toggleAttribute("data-fit-pending",e)}),Se=(e,i,t)=>{let a=0,c=!1,u=()=>{};const n=()=>{c||(e(),a+=1,a<3?u=i(n,a):t&&(u=i(t,a)))};return u=i(n,0),()=>{c=!0,u()}};let $,H;function L(e){var Z,X,K,J,ee,te,ie,se,ne,oe;const[i]=Ke("common"),[t,o]=T.useState(!1),a=Fe(e.customizations),[c,u]=T.useState(!1),[n,x]=T.useState({width:0,height:0,depth:15}),h=T.useRef(null),f=n.depth*4,[m,v]=T.useState(""),z=()=>{if(h.current){const d=h.current,r=d.offsetWidth,l=d.offsetHeight,w=Math.min(r,l)*.05;x({width:r,height:l,depth:w})}};function A(){(e.gameMode==="choice"||e.selfPacedMode==="choice")&&(_()&&!c||!_()&&H>1)||e.gameMode==="ic"?Te("choice"):Te("factile")}T.useEffect(()=>{(e.gameMode==="choice"||e.selfPacedMode==="choice")&&e.updateGamePlayState({isChoiceGameMode:!0}),z();const d=De(()=>{z(),A()},500);return window.addEventListener("resize",d),()=>{e.toggleQuestionScreen(!1),window.removeEventListener("resize",d)}},[]),T.useEffect(()=>{var d;if(e.question&&((d=e.customizations)!=null&&d.textToSpeechSound)&&e.customizations.automaticTextToSpeech){let r=e.QAtype;e.gameMode!=="flashcards"&&(r=e.questionTime&&!e.customizations.answerFirstMode?y.question_type:y.answer_type),setTimeout(()=>{var l,w;Ee(r,e.gameMode,e.gameMode==="choice"?y.answers:!1,i,{volumeLevel:(l=e.customizations)==null?void 0:l.volumeLevel,speechVoice:(w=e.customizations)==null?void 0:w.speechVoice},()=>{e.updateGamePlayState({speechOn:!0})},!0)},1e3)}},[e.questionTime,e.question]);const{questionTime:q,question:y,questionType:B,gameMode:G,selfPacedMode:U}=e,V=typeof window<"u"&&!!window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,W=[t,q,y,B,G,c,e.customizations.mixQuestionChoice];T.useLayoutEffect(()=>{V&&pe(!0)},W),T.useEffect(()=>{if(V)return Se(A,r=>{const l=requestAnimationFrame(r);return()=>cancelAnimationFrame(l)},()=>pe(!1));const d=[0,10,1e3];Se(A,(r,l)=>{const w=setTimeout(r,d[l]);return()=>clearTimeout(w)})},W),T.useEffect(()=>{var d,r;o(!e.preview&&(e.gameMode==="choice"||e.selfPacedMode==="choice"||(d=e.question)!=null&&d.isFactileType&&!Ne((r=e.question)==null?void 0:r.wrong_answers)||e.gameMode==="ic")?!!e.reverseQuestionAnswer:e.gameMode!=="memory"&&!!e.reverseQuestionAnswer!=!!e.customizations.answerFirstMode)},[e.reverseQuestionAnswer,e.customizations.answerFirstMode]);const _=()=>t?!e.questionTime:e.questionTime,P=()=>{if(e.isSelfPacedMode&&!e.hasTeamScored&&e.isScoringTime){Re(i(`${C}.scoring_instructions`),i(`${C}.ok`));return}const d=window.location.pathname.toLowerCase().trim().includes("/playqbgame/");e.user&&!e.isEmbed&&!d&&!e.practiceMode&&!e.isSelfPacedMode&&e.saveGameInProgress(!0),typeof e.questionClosed=="function"&&(e.questionClosed(),fe.questionClosed())},ye=d=>{var r,l,w,F,M,g,I,S,D,Q,b,ae,re,ce,de,ue,le,he;return s.jsxs("div",{className:"playNowBox text-center w-100 align-self-center",children:[s.jsx("h2",{className:"playNowTitle marginB-10",children:d}),(((r=e==null?void 0:e.user)==null?void 0:r._id)===((F=(w=(l=e==null?void 0:e.game)==null?void 0:l.properties)==null?void 0:w.admin)==null?void 0:F._id)||Be((g=(M=e.game)==null?void 0:M.play)==null?void 0:g.categories)||((D=(S=(I=e==null?void 0:e.game)==null?void 0:I.properties)==null?void 0:S.admin)==null?void 0:D._id)&&((Q=e==null?void 0:e.user)==null?void 0:Q._id)!==((re=(ae=(b=e==null?void 0:e.game)==null?void 0:b.properties)==null?void 0:ae.admin)==null?void 0:re._id)&&((ce=Je(e==null?void 0:e.game,e==null?void 0:e.user))==null?void 0:ce.role)==="edit"||((le=(ue=(de=e==null?void 0:e.game)==null?void 0:de.properties)==null?void 0:ue.admin)==null?void 0:le._id)&&((he=e==null?void 0:e.user)==null?void 0:he.ownerId)&&Ge("editExistingGame"))&&s.jsx(Oe,{to:`/edit/${e.game.play.customurl}`,onClick:()=>{e.practiceMode?Pe({event:"changeRoute",route:`/edit/${e.game.play.customurl}`},!0):window.location.href=`/edit/${e.game.play.customurl}`},className:"addNowQuestionBtn",tabIndex:0,children:"Add Now"})]})},Y=()=>{var d;if($=ge(e.question,e.gameMode,_(),e.preview),e.previewMode)return s.jsx(k,{customizations:e.customizations,previewMode:e.previewMode,question:{textQAndA:"Question",type:0},isPreviewActive:e.preview,sharedGameAccess:j(e.game,e.user)});if($){if(e.gameMode==="choice"||e.gameMode==="ic"||U==="choice"){if(_())return s.jsx(ve,{question:$,answerSelectHandler:e.answerSelectHandler?e.answerSelectHandler:!1,selectedOptionIndex:e.selectedOptionIndex?e.selectedOptionIndex:[],hideChoiceQuestion:e.hideChoiceQuestion,preview:e.preview,gameMode:e.gameMode,isQuestionActive:!0,sharedGameAccess:j(e.game,e.user),setActiveImageIndex:e.setActiveImageIndex});const r=((d=$.choiceAnswers)==null?void 0:d.filter(w=>w.markedAsCorrect||w.isTrue))||[];
1if(H=r.length,H>1)return s.jsx(ve,{question:{choiceAnswers:r},sharedGameAccess:j(e.game,e.user),setActiveImageIndex:e.setActiveImageIndex});const l=r[0]||{};return s.jsx(k,{question:{type:l.answer_type||0,textQAndA:l.answer,imageGallery:l.answer_images_gallery,video:l.video_answer_url,mathEque:l.math_answer_question,hideVideoTitle:l.hideVideoTitleAns,audioUrl:l.audio_url_answer,videoThumbnail:!0},isPreviewActive:e.preview,sharedGameAccess:j(e.game,e.user),setImgModalOpen:e.setImgModalOpen,setActiveImageIndex:e.setActiveImageIndex})}return s.jsx(k,{question:$,gamePreviewIndex:e.gamePreviewIndex,isPreviewActive:e.preview,sharedGameAccess:j(e.game,e.user),setImgModalOpen:e.setImgModalOpen,setActiveImageIndex:e.setActiveImageIndex})}return s.jsx("span",{children:e.alt||ye(i(`${C}.no_content_added`))})},Ce=()=>{const{gameMode:d,isModerator:r,questionTime:l,isSelfPacedMode:w}=e;return r&&!l&&(d==="factile"||d==="choice"||w)?s.jsxs("button",{className:"backToBoard",onClick:()=>P(),tabIndex:0,children:[i(`${C}.continue`)," ",s.jsx("i",{className:"fa fa-angles-right","aria-hidden":"true"})]}):""},_e=()=>e.answerSkipped?s.jsx("div",{className:"memoryAnswerStatus",children:s.jsx("span",{className:"backToBoard skipped",children:i(`${C}.skipped`)})}):e.secondCardData?e.secondCardData.id===e.firstCardData.id?s.jsxs("div",{className:"memoryAnswerStatus",children:[s.jsx("i",{className:" animated animate fa fa-circle-check bounce"}),e.isModerator&&s.jsx("button",{className:"backToBoard",onClick:()=>P(),tabIndex:0,children:i(`${C}.continue`)})," "]}):s.jsxs("div",{className:"memoryAnswerStatus",children:[s.jsx("i",{className:"animated animate fa fa-circle-xmark bounce"}),e.isModerator&&s.jsx("button",{className:"backToBoard",onClick:()=>P(),tabIndex:0,children:i(`${C}.continue`)})," "]}):"",Ie=()=>{if(e.gameMode==="memory"){if(e.firstCardData&&!e.secondCardData)return"1";if(e.firstCardData&&e.secondCardData)return"2"}else if(!e.alt)return e.isQuestionActive||e.previewMode||e.questionTime&&!e.reverseQuestionAnswer||e.reverseQuestionAnswer&&!e.questionTime&&!((e.gameMode==="choice"||e.gameMode==="ic")&&e.preview)?"Q":"A";return""};return T.useEffect(()=>{var d;(d=e.question)!=null&&d.isDailyDouble&&(u(!0),z(),setTimeout(()=>{z()},100),setTimeout(()=>{u(!1)},3e3))},[(Z=e.question)==null?void 0:Z.isDailyDouble]),T.useEffect(()=>{if(v(""),!e.question)return;const d=_(),r=ge(e.question,e.gameMode,d,e.preview);if(!r)return;let l="";const w=e.gameMode==="choice"||e.gameMode==="ic"||U==="choice";if(e.customizations.automaticTextToSpeech){const M=new Set;r.video&&M.add("video"),r.audioUrl&&M.add("audio"),r.imageGallery&&r.imageGallery.length>0&&M.add("image"),r.mathEque&&M.add("equation"),d&&w&&r.choiceAnswers&&r.choiceAnswers.forEach(g=>{g.video_answer_url&&M.add("video"),g.audio_url_answer&&M.add("audio"),g.answer_images_gallery&&g.answer_images_gallery.length>0&&M.add("image"),g.math_answer_question&&M.add("equation")}),l=Array.from(M).map(g=>`Contains ${g}`).join(". ")}else{let M=me(r.textQAndA);const g=[];r.video&&g.push("has video"),r.audioUrl&&g.push("has audio"),r.imageGallery&&r.imageGallery.length>0&&g.push("has image"),r.mathEque&&g.push("has equation"),g.length>0&&(M+=` (${g.join(", ")})`);let I="";d&&w&&r.choiceAnswers&&(I=r.choiceAnswers.map((S,D)=>{let Q=me(S.answer);const b=[];return S.video_answer_url&&b.push("has video"),S.audio_url_answer&&b.push("has audio"),S.answer_images_gallery&&S.answer_images_gallery.length>0&&b.push("has image"),S.math_answer_question&&b.push("has equation"),b.length>0&&(Q+=` (${b.join(", ")})`),`Choice ${D+1}: ${Q}`}).join(". ")),l=[M,I].filter(Boolean).join(". ")}const F=setTimeout(()=>{v(l)},150);return()=>clearTimeout(F)},[e.question,e.questionTime,e.customizations.automaticTextToSpeech,e.gameMode,e.selfPacedMode,e.preview,t]),s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"sr-only",role:"status","aria-live":"polite","aria-atomic":"true",children:m}),s.jsxs("div",{className:N("questionBoard",{wagerTime:e.wagerTime,podiumHidden:e.isPodiumHidden,h100:e.questionTime&&e.isModerator&&e.gameMode!=="flashcards"&&e.gameMode!=="memory"||e.gameMode==="memory"&&!e.secondCardData||!e.isModerator}),children:[e.gameMode==="choice"||e.gameMode==="factile"||e.isSelfPacedMode?s.jsx("p",{className:"label",children:Ie()}):"",e.wagerTime?s.jsx("div",{className:"closeWgerQuestion",onClick:()=>e.showFFQuestion(!1),children:"X"}):"",s.jsxs("div",{id:"responsive-question",style:{...(X=e.question)!=null&&X.isDailyDouble?a.ddQuestionScreen:a.questionScreen,transformOrigin:`${(K=window.lastClickCoordinates)==null?void 0:K.clickX}px ${(J=window.lastClickCoordinates)==null?void 0:J.clickY}px`},className:`
2            questionScreen animated animate d-flex flex-wrap align-items-center justify-content-center 
3            ${(ee=e.question)!=null&&ee.isDailyDouble?"questionScreenDD":"zoomIn"}
4          `,onClick:typeof e.toggleScreen=="function"?e.toggleScreen:null,children:[((te=e.question)==null?void 0:te.isDailyDouble)&&c&&s.jsx("div",{className:"w-100 h-100",children:s.jsx("div",{className:"w-100 h-100 cubeContainer",ref:h,children:s.jsxs("div",{className:`${c?"text-content-wrapper":""} w-100 h-100 d-flex justify-content-center align-items-center cube`,style:{transformOrigin:c?`${(ie=window.lastClickCoordinates)==null?void 0:ie.clickX}px ${(se=window.lastClickCoordinates)==null?void 0:se.clickY}px`:"center center",animation:c?"flip-horizontal-bottom 1.2s linear both":"flip-cube-rl 1.2s linear both"},children:[s.jsxs("p",{className:"text-white daily-double-text front side",style:{...a.ddQuestionScreen,transform:`translateZ(${n.depth/2}px)`},children:["DAILY ",s.jsx("br",{}),"DOUBLE"]}),s.jsxs("p",{className:`${c?"text-white daily-double-text":"active"} back side`,style:{...a.ddQuestionScreen,transform:`rotateY(180deg) translateZ(${n.depth/2}px)`},children:["DAILY ",s.jsx("br",{}),"DOUBLE"]}),s.jsx("div",{className:"top side",style:{height:`${n.depth}px`,transform:`rotateX(90deg) translateZ(${n.height/2-n.depth/2}px)`}}),s.jsx("div",{className:"left side",style:{width:`${n.depth}px`,transform:`rotateY(-90deg) translateZ(${n.width/2-n.depth/2}px)`}}),s.jsx("div",{className:"bottom side",style:{height:`${n.depth}px`,transform:`rotateX(-90deg) translateZ(${n.height/2-n.depth/2}px)`}}),s.jsx("div",{className:"right side",style:{width:`${n.depth}px`,transform:`rotateY(90deg) translateZ(${n.width/2-n.depth/2}px)`}})]})})}),(!((ne=e.question)!=null&&ne.isDailyDouble)||!c)&&((oe=e.question)!=null&&oe.isDailyDouble?s.jsx("div",{className:"w-100 h-100 cubeContainer",ref:h,children:s.jsxs("div",{className:"w-100 h-100 d-flex justify-content-center align-items-center cube",style:{transformOrigin:"center center",animation:"flip-cube-rl 1.2s linear both",transformStyle:"preserve-3d"},children:[s.jsxs("p",{className:"text-white daily-double-text front side",style:{...a.ddQuestionScreen,fontSize:`${f}px`,transform:`translateZ(${n.depth/2}px)`},children:["DAILY ",s.jsx("br",{})," DOUBLE"]}),s.jsx("div",{className:"side w-100 h-100 d-flex justify-content-center align-items-center",style:{...a.ddQuestionScreen,transform:`rotateY(180deg) translateZ(${n.depth/2}px)`},children:Y()}),s.jsx("div",{className:"right side",style:{width:`${n.depth}px`,transform:`rotateY(90deg) translateZ(${n.width/2-n.depth/2}px)`}})]})}):Y())]})]}),e.gameMode==="memory"?_e():e.revealAnswerButton&&e.question.isFFQuestion&&e.isModerator?s.jsx("button",{className:"backToBoard mb-2",onClick:()=>{e.revealAnswer(),fe.answerRevealed(),e.updateGamePlayState({revealAnswerButton:!1})},tabIndex:0,children:"Reveal Answer"}):Ce()]})}L.defaultProps={question:{},isModerator:!1,gameMode:"factile",questionType:"factile",questionTime:!0,customizations:{},hideChoiceQuestion:!1,answerSkipped:!1,questionCloseHandler:()=>{},QAtype:0,preview:!1,previewMode:!1};L.propTypes={question:p.objectOf(),isModerator:p.bool,answerSkipped:p.bool,gameMode:p.string,questionType:p.string,questionTime:p.bool,customizations:p.objectOf(),hideChoiceQuestion:p.bool,questionCloseHandler:p.func,QAtype:p.number,preview:p.bool,previewMode:p.bool};const nt=({gamePlay:e,user:i},t)=>({reverseQuestionAnswer:e.isQuestionToggled,firstCardData:e.firstCardData,secondCardData:e.secondCardData,answerSkipped:e.answerSkipped,isModerator:e.isModerator,gameMode:e.gameMode,game:e.game,question:e.currentQuestion,questionType:t.questionType||e.questionType||"",questionTime:"questionTime"in t?!!t.questionTime:e.questionTime,customizations:e.customizations,user:i.userInfo,isEmbed:e.isEmbed,speechOn:e.speechOn,practiceMode:e.practiceMode,revealAnswerButton:e.revealAnswerButton,isSelfPacedMode:e.isSelfPacedMode,selfPacedMode:e.selfPacedMode,...t}),Mt=$e.memo(be(nt,{saveGameInProgress:Ze,questionClosed:Ye,toggleQuestionScreen:We,updateGamePlayState:Ve,revealAnswer:Ue,setActiveImageIndex:Le})(L));export{Mt as default};

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.