1import{s as d,E as n,D as l,k as h,A,m as E,d as _,f as T,C as O,n as g}from"./index-DiEydHLj.js";import{I as i,T as N}from"./View-BNK5Vt5p.js";import{C as m}from"./Camera-CNP5GVcB.js";import{S as y}from"./Scene-B4SNVToz.js";import{P as u}from"./Prop-ciauDdv4.js";import{W as I}from"./Watch-jYNLlYki.js";function f(t,e){const s={answerCount:d.getters.answerHistory.length,characterHead:d.getters.head,characterLegs:d.getters.legs,characterTorso:d.getters.torso,...e};console.log("â¬ï¸ Tracking:",t,s),window.gtag&&window.gtag("event",t,s)}var C=Object.defineProperty,S=Object.getOwnPropertyDescriptor,o=(t,e,s,c)=>{for(var a=c>1?void 0:c?S(e,s):e,p=t.length-1,w;p>=0;p--)(w=t[p])&&(a=(c?w(e,s,a):w(a))||a);return c&&a&&C(e,s,a),a};let r=class extends y{constructor(){super(...arguments),this.answerType="",this.state=i.QUESTION,this.targetPhrases=[]}get isQuestioning(){return this.state==i.QUESTION}get isAnswering(){return this.state==i.ANSWER}get isWaiting(){return this.state==i.WAIT}get questionText(){return this.question.tracks[0].text}attachEvents(){document.addEventListener(n.KEYDOWN,this.Handle_OnPressKey)}detachEvents(){document.removeEventListener(n.KEYDOWN,this.Handle_OnPressKey)}selectAnswer(t){this.answerType=t,this.state=i.ANSWER,this.targetPhrases=[],this.$emit(n.INTERACTION_ANSWER,this.answerType),l.dispatch(n.INTERACTION_ANSWER,this.answerType),f(N.RESPONSE,{answer:this.answers[this.answerType],answerA:this.answers.a,answerB:this.answers.b,answerType:this.answerType,question:this.questionText})}async Handle_OnClick(){l.dispatch(n.CHARACTER_ACTION)}async Handle_OnClickAnswer(t,e){t.preventDefault(),this.$store.dispatch("changeAnimation",h.EMPHASIS),setTimeout(()=>{this.$store.dispatch("changeAnimation",h.TALKING)},1500),this.selectAnswer(e)}async Handle_OnEndedAnswer(){l.dispatch(n.INTERACTION_ANSWEREND,this.answerType),this.$emit(n.INTERACTION_ANSWEREND,this.answerType),this.$store.dispatch("changeAnimation",h.IDLE),this.answerType=""}async Handle_OnEndedQuestion(){l.dispatch(n.INTERACTION_QUESTIONEND),this.$emit(n.INTERACTION_QUESTIONEND),this.$store.dispatch("changeAnimation",h.IDLE),this.targetPhrases=Object.values(this.answers)}async Handle_OnPressKey(t){if(this.state===i.QUESTION)switch(t.code){case"Digit1":case"KeyA":case"ArrowUp":this.selectAnswer("a");break;case"Digit2":case"KeyB":case"ArrowDown":this.selectAnswer("b");break}}async Handle_OnSpeechAnswer(t){this.selectAnswer(t)}async Handle_OnStateChange(t,e){switch(this.state){case i.QUESTION:m.enterInteraction(),A.playEffect("zoomout-quick"),A.playEffect("button-animatein"),this.$store.dispatch("changeAnimation",h.TALKING),this.$emit(n.INTERACTION_QUESTION),l.dispatch(n.INTERACTION_QUESTION);break;case i.WAIT:this.$store.dispatch("changeAnimation",h.IDLE);break;case i.ANSWER:break}}};o([u()],r.prototype,"answers",2);o([u()],r.prototype,"question",2);o([u()],r.prototype,"responses",2);o([E],r.prototype,"attachEvents",1);o([_],r.prototype,"detachEvents",1);o([T],r.prototype,"Handle_OnPressKey",1);o([I("state",{immediate:!0})],r.prototype,"Handle_OnStateChange",1);r=o([O],r);var v=function(){var e=this,s=e._self._c;return e._self._setupProxy,s("section",{staticClass:"scene-interaction",on:{click:e.Handle_OnClick}},[e.isAnswering?s("ViewUiDialogueResponse",{attrs:{answerType:e.answerType,responses:e.responses},on:{ended:e.Handle_OnEndedAnswer}}):e.isQuestioning?s("ViewUiDialogueQuestion",{attrs:{manifest:e.question},on:{"question:ended":e.Handle_OnEndedQuestion}}):e._e(),s("ViewContainerAction",{staticClass:"stacked"},[e._l(e.answers,function(c,a){return s("ViewButtonUserAnswer",{key:c,ref:"answer",refInFor:!0,attrs:{selectedAnswer:e.answerType,type:a},on:{click:function(p){return e.Handle_OnClickAnswer(p,a)}}},[e._v(" "+e._s(c)+" ")])}),e.config.App.USE_VOICE_CONTROL?s("ViewSpeechRecognition",{attrs:{targetPhrases:e.targetPhrases},on:{answer:e.Handle_OnSpeechAnswer}}):e._e()],2)],1)},R=[],D=g(r,v,R,!1,null,null,null,null);const U=D.exports;export{U 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.