START
Can\'t hear the tone?Click the next numbered button.
Just barely hear it? Click SAVE below.
'},699:function(t){t.exports='
MAXIMUM VOLUME. HEADPHONES ON.
Starting at #1, click each numbered button until you can just barely hear the tone.
START
Can\'t hear the tone?Click the next numbered button.
Just barely hear it? Click SAVE below.
'},709:function(t){t.exports='
MAXIMUM VOLUME. HEADPHONES ON.
Starting at #1, click each numbered button until you can just barely hear the tone.
START
Can\'t hear the tone?Click the next numbered button.
Just barely hear it? Click SAVE below.
'},414:function(t){t.exports='
MAXIMUM VOLUME. HEADPHONES ON.
Starting at #1, click each numbered button until you can just barely hear the tone.
START
Can\'t hear the tone?Click the next numbered button.
Just barely hear it? Click SAVE below.
'},15:function(t){t.exports='
MAXIMUM VOLUME. HEADPHONES ON.
Starting at #1, click each numbered button until you can just barely hear the tone.
START
Can\'t hear the tone?Click the next numbered button.
Just barely hear it? Click SAVE below.
'},27:function(t){t.exports='
MAXIMUM VOLUME. HEADPHONES ON.
Starting at #1, click each numbered button until you can just barely hear the tone.
START
Can\'t hear the tone?Click the next numbered button.
Just barely hear it? Click SAVE below.
'},639:function(t){t.exports='
MAXIMUM VOLUME. HEADPHONES ON.
Starting at #1, click each numbered button until you can just barely hear the tone.
START
Can\'t hear the tone?Click the next numbered button.
Just barely hear it? Click SAVE below.
'},832:function(t){t.exports='
MAXIMUM VOLUME. HEADPHONES ON.
Starting at #1, click each numbered button until you can just barely hear the tone.
START
Can\'t hear the tone?Click the next numbered button.
Just barely hear it? Click SAVE below.
'},190:function(t){t.exports='
'},756:function(t,a,e){var n='
Put on your headphones and ensure you are in a quiet space
Background noises like AC, fridges, and street traffic can interfere with the test.
Sound check!
1 Set your device to its maximum volume
2Test that your headphones are working properly
3 Keep your device at full volume for the entire test
';t.exports=n},14:function(t){t.exports='
Welcome to the Jabra online hearing test
Grab your headphones and find a quiet space.
The test works with all headphone types, and takes less than five minutes.
Understanding the results of this test
The Jabra online hearing test isn\'t a substitute for a visit to a hearing care professional, and it doesn\'t constitute a medical diagnosis.
If you think you\'re experiencing hearing loss, we advise you to consult a hearing care professional for a more comprehensive examination.
When you click the button below you give us your consent to use the information provided by you in the test, to carry out the test and show you the result of the test. You are free to withdraw your consent at any time. See more in our privacy policy.
'},216:function(t){t.exports='
Now for the test
Let\'s start with your left ear
'},833:function(t){t.exports='
'},986:function(t){t.exports='
'},57:function(t){t.exports='
Do not forget to reduce the volume on your device
The score indicate that you have good hearing
Your results suggest you may have hearing loss
Your results suggest you may have hearing loss
Significant loss
Loss
Good
Left ear
Indication of good hearing.
Indication of hearing loss.
Indication of high levels of hearing loss.
Significant loss
Loss
Good
Right ear
Indication of good hearing.
Indication of hearing loss.
Indication of high levels of hearing loss.
Remember, this test isn\'t a substitute for a medical exam and these results are not a medical diagnosis.
However, if you still experience hearing difficulties in certain situations, we recommend you book an appointment with a professional.
Find a professional
Jabra Enhance Plus
- Hearing enhancement solution with medical-grade technology
- Situational use
- Improves speech clarity
- Discreet and comfortable
- Music, streaming and calls
- Up to 10 hours of battery per charge
- Set-up and personalization via the app
Learn more Learn more Find a professional
Jabra Enhance Pro PM
- Premium medical-grade hearing solution for all-day use
- Excellent speech clarity and hearing in noisy environments
- Durable, discreet design
- Direct streaming from compatible iOS® and Android™ devices
Learn more
Jabra Enhance Select
- Everything you need to hear better
- Premium, medical-grade hearing aids
- Convenient remote support included
- Excellent speech clarity
Jabra Enhance Pro 20
- Premium medical-grade hearing solution
- All-day use
- Excellent speech clarity
- Durable and discreet
Learn more
'},260:function(t){t.exports='
Excellent! You\'re done with the left ear
Let\'s move on the right ear
'},483:function(t){t.exports='
About you
Hearing test
Results
'},91:function(t){"use strict";t.exports=function(t,a){return a||(a={}),"string"!=typeof(t=t&&t.__esModule?t.default:t)?t:(a.hash&&(t+=a.hash),a.maybeNeedQuotes&&/[\t\n\f\r "'=<>`]/.test(t)?'"'.concat(t,'"'):t)}},411:function(){((t,a)=>{const e=t.BaseAudioContext;class n{constructor(t,a={pan:0}){this.context=t,this._input=this.context.createGain(),this._output=this.context.createGain();let e=a.pan;const n=this.context.createChannelSplitter(2),s=this.context.createGain(),o=this.context.createGain(),i=this.context.createGain(),r=this.context.createGain(),l=this.context.createChannelMerger(2),d=this.context.createChannelMerger(2),c=this.context.createChannelMerger(2);this._input.connect(n),n.connect(s,0),n.connect(o,0),n.connect(i,1),n.connect(r,1),s.connect(l,0,0),r.connect(l,0,0),i.connect(d,0,1),o.connect(d,0,1),l.connect(c,0,0),d.connect(c,0,1),c.connect(this._output),this.pan={get value(){return e},set value(t){s.gain.value=1-Math.max(t,0),r.gain.value=-Math.min(t,0),i.gain.value=1+Math.min(t,0),o.gain.value=Math.max(t,0),e=t}},this.pan.value=e}get _isStereoPannerNode(){return!0}connect(){this._output.connect.apply(this._output,arguments)}disconnect(){this._output.disconnect.apply(this._output,arguments)}toString(){return"StereoPannerNode"}}if(e&&!("createStereoPanner"in e.prototype)){Object.defineProperty(e.prototype,"createStereoPanner",{value:function(){return new n(this)},enumerable:!1,writable:!1,configurable:!0});var s=AudioNode.prototype.connect;AudioNode.prototype.connect=function(){var t=Array.prototype.slice.call(arguments);t[0]._isStereoPannerNode&&(t[0]=t[0]._input),s.apply(this,t)},"function"==typeof Symbol&&"symbol"==typeof Symbol.hasInstance&&Object.defineProperty(n,Symbol.hasInstance,{value:function(t){return t instanceof AudioNode&&t.pan instanceof AudioParam}}),void 0!==typeof t&&(t.StereoPannerNode=n)}})(window)},648:function(t){t.exports="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-music'%3e%3cpath d='M9 18V5l12-2v13'%3e%3c/path%3e%3ccircle cx='6' cy='18' r='3'%3e%3c/circle%3e%3ccircle cx='18' cy='16' r='3'%3e%3c/circle%3e%3c/svg%3e"}},a={};function e(n){var s=a[n];if(void 0!==s)return s.exports;var o=a[n]={exports:{}};return t[n](o,o.exports,e),o.exports}e.n=function(t){var a=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(a,{a:a}),a},e.d=function(t,a){for(var n in a)e.o(a,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:a[n]})},e.o=function(t,a){return Object.prototype.hasOwnProperty.call(t,a)},function(){"use strict";const t={profile:{gender:null,age:null,hearingLevel:null,environment:[],designScale:null,comfortScale:null,wearingSituation:null},test:{leftEarScores:[],rightEarScores:[]}};var a=e(14),n=e.n(a);const s=document.querySelector(".jht__container");var o=JSON.parse('{"en-us":"/-/media/D056B5E1E16B46BFB6EE9F7B947202E8.json?14","ja-jp":"/-/media/9CD11C3EAC3C4C6E8965E4188C3F4333.json?14","de-de":"/-/media/63C9D4A91A8A4A668CAE9BE2E32A5B74.json?14","de-ch":"/-/media/411F573F340C473EA053D75678142631.json?14"}');let i;const r=()=>{i||(i=(async()=>{const t=document.documentElement.dataset.marketLocale,a=await fetch(o[t]);if(!a.ok)throw new Error(`Error! status: ${a.status}`);return await a.json()})()),i.then((t=>{document.querySelectorAll("[data-translate]").forEach((a=>{((t,a)=>{const e=a[t.getAttribute("data-translate")];e&&(t.innerHTML=e)})(a,t)}))}))},l=window.dataLayer||[],d=(t,a)=>{l.push({event:"OHT-Interaction",eventCategory:"OHT",eventAction:t,eventLabel:a})},c={componentName:"intro",pageTemplate:n(),nextPageButtonClass:".jht-intro__go-next",loadComponent(t){s.innerHTML=n(),r(),c.attachEvents(t),d("Load Page","Introduction")},attachEvents(t){document.querySelector(this.nextPageButtonClass).addEventListener("click",(a=>{d("Click","Start test"),t(this.componentName)}))}};var u=e(57),p=e.n(u);const v=(t,a,e)=>(t-a)/(e-a),b=()=>JSON.parse(localStorage.getItem("eht-data")),h={componentName:"results",pageTemplate:p(),nextPageButtonClass:".jht-intro__go-next",loadComponent(a,e){s.innerHTML=p(),r(),this.attachEvents(a,e);const n=(()=>{const a=t.test.leftEarScores,e=t.test.rightEarScores;return{leftEarAverage:a.reduce(((t,a)=>t+a),0)/a.length,rightEarAverage:e.reduce(((t,a)=>t+a),0)/e.length}})();(t=>{let a="normal";const e=Math.max(t.leftEarAverage,t.rightEarAverage);a=e>8?"severe":e>3?"moderate":"normal",document.querySelector(".results-page").setAttribute("data-results-level",a)})(n),(t=>{const a=100*v(t.leftEarAverage,1,12),e=100*v(t.rightEarAverage,1,12);document.querySelector('.results-graph__pill[data-ear="left"] .results-graph__progress-bar').style.width=100-a+"%",document.querySelector('.results-graph__pill[data-ear="right"] .results-graph__progress-bar').style.width=100-e+"%"})(n),(t=>{const a=t=>t>9?"severe":t>3?"moderate":"normal";document.querySelector('.results-graph__pill[data-ear="left"]').setAttribute("data-level-single",a(t.leftEarAverage)),document.querySelector('.results-graph__pill[data-ear="right"]').setAttribute("data-level-single",a(t.rightEarAverage))})(n),b()||(t=>{localStorage.setItem("eht-data",JSON.stringify(t))})(t),d("Load Page","Results"),d("Left Ear Average Score",n.leftEarAverage),d("Right Ear Average Score",n.rightEarAverage)},attachEvents(a,e){document.querySelector(this.nextPageButtonClass).addEventListener("click",(()=>{localStorage.removeItem("eht-data"),t.test.leftEarScores=[],t.test.rightEarScores=[],d("Click","Restart Test"),a(this.componentName)})),document.addEventListener("click",(t=>{const a=t.target.closest("[data-action]");a&&d("Click Result Link",a.getAttribute("data-action"))}))}};var g=e(483),m=e.n(g);const k=document.querySelector(".jht__steps");var _=e(190),y=e.n(_);const f=()=>{const t=document.querySelectorAll(".range-slider-container");function a(t,a){let e,n;switch(e=a?a.target.value:t.value,e){case"1":n=0;break;case"2":n=33.3;break;case"3":n=66.6;break;case"4":n=100}return n}t.forEach((t=>{const e=a(t.querySelector("input"));t.querySelector(".range-slider__fill").style.width=e+"%"})),t.forEach((t=>{const e=t.querySelector("input");e.addEventListener("input",(n=>{const s=a(e,n);t.querySelector(".range-slider__fill").style.width=s+"%"}))}))},w={componentName:"generalQuestions",pageTemplate:y(),previousPageButtonClass:".jht-intro__go-back",nextPageButtonClass:".jht-intro__go-next",loadComponent(t,a){s.innerHTML=y(),r(),this.attachEvents(t,a),this.prefillFields(),f(),d("Load Page","Generic questions")},prefillFields(){t.profile.gender&&(document.querySelector(`input[value="${t.profile.gender}"]`).checked=!0),t.profile.age&&(document.querySelector(`option[value="${t.profile.age}"]`).selected="selected"),t.profile.hearingLevel&&(document.querySelector('input[name="hearingLevel"]').value=t.profile.hearingLevel);var a=new Event("change",{bubbles:!0});document.getElementById("form-questions").dispatchEvent(a)},attachEvents(a,e){const n=document.querySelector(this.nextPageButtonClass);document.querySelector(this.previousPageButtonClass).addEventListener("click",(t=>{e(this.componentName)}));const s=document.getElementById("form-questions");s.addEventListener("submit",(e=>{e.preventDefault();var n=new FormData(s);t.profile.gender=n.get("gender"),t.profile.age=n.get("age"),t.profile.hearingLevel=n.get("hearingLevel"),d("Select Gender",t.profile.gender),d("Select Age",t.profile.age),d("Select Hearing Level",t.profile.hearingLevel),d("Click","Start test"),a(this.componentName)})),s.addEventListener("change",(t=>{document.querySelectorAll("input:checked").length&&""!==document.querySelector("#age-select").value?n.removeAttribute("disabled"):n.setAttribute("disabled","")}))}};var S=e(756),E=e.n(S);const x={componentName:"howItWorks",pageTemplate:E(),previousPageButtonClass:".jht-intro__go-back",nextPageButtonClass:".jht-intro__go-next",audioFileUrl:"/-/media/1F879A3D8567433E97129FDAFB7CBB80.mp3",audioFile:null,loadComponent(t,a){s.innerHTML=E(),r(),this.audioFile=new Audio(this.audioFileUrl),this.audioFile.volume=.1,console.log(this.audioFile.volume),this.soundButton=document.querySelector('button[data-btn="test-sound"]'),this.attachEvents(t,a),d("Load Page","How it works")},stopSound(){this.audioFile.pause(),this.audioFile.currentTime=0,this.soundButton.classList.remove("playing")},playSound(){this.audioFile.play(),this.soundButton.classList.add("playing")},attachEvents(t,a){const e=document.querySelector(this.nextPageButtonClass),n=document.querySelector(this.previousPageButtonClass);e.addEventListener("click",(a=>{this.stopSound(),t(this.componentName)})),n.addEventListener("click",(t=>{this.stopSound(),a(this.componentName)})),this.soundButton.addEventListener("click",(t=>{this.audioFile.paused?(this.playSound(),d("Click","Play Sound Demo")):(this.stopSound(),d("Click","Pause Sound Demo"))})),this.audioFile.addEventListener("ended",(()=>{this.stopSound()}))},handleFormSubmit(){},unloadComponent(){}};var j=e(833),C=e.n(j);const P={componentName:"lifestyle1",pageTemplate:C(),previousPageButtonClass:".jht-intro__go-back",nextPageButtonClass:".jht-intro__go-next",loadComponent(t,a){s.innerHTML=C(),r(),this.attachEvents(t,a),this.prefillFields(),d("Load Page","Hearing Environment")},prefillFields(){t.profile.environment.length&&t.profile.environment.forEach((t=>{document.querySelector(`input[value="${t}"]`).checked=!0}));var a=new Event("change",{bubbles:!0});document.getElementById("form-questions").dispatchEvent(a)},attachEvents(a,e){const n=document.querySelector(this.nextPageButtonClass);document.querySelector(this.previousPageButtonClass).addEventListener("click",(t=>{e(this.componentName)}));const s=document.getElementById("form-questions");s.addEventListener("submit",(e=>{e.preventDefault();var n=new FormData(s);t.profile.environment=n.getAll("hearing-environment"),d("Select Hearing Environment",t.profile.environment.join()),a(this.componentName)})),s.addEventListener("change",(t=>{document.querySelectorAll("input:checked").length?n.removeAttribute("disabled"):n.setAttribute("disabled","")}))}};var L=e(986),B=e.n(L);const A={componentName:"lifestyle2",pageTemplate:B(),previousPageButtonClass:".jht-intro__go-back",nextPageButtonClass:".jht-intro__go-next",loadComponent(t,a){s.innerHTML=B(),r(),this.attachEvents(t,a),this.prefillFields(),f()},prefillFields(){t.profile.wearingSituation&&(document.querySelector(`input[value="${t.profile.wearingSituation}"]`).checked=!0),t.profile.comfortScale&&(document.querySelector('input[name="comfort"]').value=t.profile.comfortScale),t.profile.designScale&&(document.querySelector('input[name="design"]').value=t.profile.designScale);var a=new Event("change",{bubbles:!0});document.getElementById("form-questions").dispatchEvent(a)},attachEvents(a,e){const n=document.querySelector(this.nextPageButtonClass);document.querySelector(this.previousPageButtonClass).addEventListener("click",(t=>{e(this.componentName)}));const s=document.getElementById("form-questions");s.addEventListener("submit",(e=>{e.preventDefault();var n=new FormData(s);t.profile.designScale=n.get("design"),t.profile.comfortScale=n.get("comfort"),t.profile.wearingSituation=n.get("wearingSituation"),d("Select Design",t.profile.designScale),d("Select Comfort",t.profile.comfortScale),d("Select Wearing",t.profile.wearingSituation),a(this.componentName)})),s.addEventListener("change",(t=>{document.querySelectorAll("input:checked").length?n.removeAttribute("disabled"):n.setAttribute("disabled","")}))}};var N=e(832),F=e.n(N);e(411);const M=t=>{const a=document.querySelector(".map-spinner");"show"===t?a.classList.remove("d-none"):a.classList.add("d-none")},q=(t,a,e)=>{M("show");const n=new(window.AudioContext||window.webkitAudioContext),s=new Audio;s.crossOrigin="anonymous",s.loop=!0,s.src=t,s.load();const o=n.createMediaElementSource(s);let i;n.createStereoPanner?(i=n.createStereoPanner(),i.pan.value=e):(i=n.createPanner(),i.panningModel="equalpower",i.setPosition(e,0,1-Math.abs(e))),a.gainNode=n.createGain(),o.connect(i).connect(a.gainNode).connect(n.destination),a.audioFile=s,s.addEventListener("canplaythrough",(t=>{M("hide")}),{once:!0})},H=t=>(t.audioFile.play(),!0),T=(t,a,e)=>{const n={500:88.5562093,1e3:91.4321862,2e3:93.4206979,4e3:96.8948068}[e]-[0,10,15,20,30,35,40,50,55,60,70,80][t-1];a.gainNode.gain.value=Math.pow(10,-n/20)},D=t=>{document.querySelectorAll(".test-button").forEach((t=>{t.classList.remove("active")})),t.classList.add("active")},I=()=>{document.querySelector(".start-point").classList.add("d-none")},z=t=>{const a=document.querySelector(".testbuttons__tooltip");t.appendChild(a)},R=()=>{document.querySelector(".testbuttons__tooltip").classList.remove("d-none")},O={componentName:"componentR500",pageTemplate:F(),nextPageButtonClass:".jht-intro__go-next",previousPageButtonClass:".jht-intro__go-back",audioFileUrl:"/-/media/96C5B029D020472E8D0E44E79C21B88B.mp3",audioFile:null,playing:!1,currentScore:0,loadComponent(t,a){s.innerHTML=F(),r(),this.attachEvents(t,a),this.playing=!1,q(this.audioFileUrl,this,1),d("Load Page","Right 500Hz Page")},attachEvents(a,e){const n=document.querySelector(this.nextPageButtonClass);n.addEventListener("click",(e=>{this.audioFile.pause(),t.test.rightEarScores.push(this.currentScore),d("Right 500Hz Score",this.currentScore),a(this.componentName)}));document.querySelector(".test-buttons").addEventListener("click",(t=>{const a=t.target.closest(".test-button");a&&(this.playing||(this.playing=H(this),n.removeAttribute("disabled"),R()),T(a.dataset.val,this,"500"),D(a),this.currentScore=Number(a.dataset.val),I(),z(a.parentElement))}))}};var U=e(15),V=e.n(U);const J={componentName:"componentR1000",pageTemplate:V(),nextPageButtonClass:".jht-intro__go-next",previousPageButtonClass:".jht-intro__go-back",audioFileUrl:"/-/media/05EC25FB612449649CF4709F2C943911.mp3",audioFile:null,playing:!1,currentScore:0,loadComponent(t,a){s.innerHTML=V(),r(),this.attachEvents(t,a),this.playing=!1,q(this.audioFileUrl,this,1),d("Load Page","Right 1000Hz Page")},attachEvents(a,e){const n=document.querySelector(this.nextPageButtonClass);n.addEventListener("click",(e=>{this.audioFile.pause(),t.test.rightEarScores.push(this.currentScore),d("Right 1000Hz Score",this.currentScore),a(this.componentName)}));document.querySelector(".test-buttons").addEventListener("click",(t=>{const a=t.target.closest(".test-button");a&&(this.playing||(this.playing=H(this),n.removeAttribute("disabled"),R()),T(a.dataset.val,this,"1000"),D(a),this.currentScore=Number(a.dataset.val),I(),z(a.parentElement))}))}};var G=e(27),W=e.n(G);const X={componentName:"componentR2000",pageTemplate:W(),nextPageButtonClass:".jht-intro__go-next",previousPageButtonClass:".jht-intro__go-back",audioFileUrl:"/-/media/93D9E00ED8584EE2B1DF2DFF7ECD546B.mp3",audioFile:null,playing:!1,currentScore:0,loadComponent(t,a){s.innerHTML=W(),r(),this.attachEvents(t,a),this.playing=!1,q(this.audioFileUrl,this,1)},attachEvents(a,e){const n=document.querySelector(this.nextPageButtonClass);n.addEventListener("click",(e=>{this.audioFile.pause(),t.test.rightEarScores.push(this.currentScore),d("Right 2000Hz Score",this.currentScore),a(this.componentName)}));document.querySelector(".test-buttons").addEventListener("click",(t=>{const a=t.target.closest(".test-button");a&&(this.playing||(this.playing=H(this),n.removeAttribute("disabled"),R()),T(a.dataset.val,this,"2000"),D(a),this.currentScore=Number(a.dataset.val),I(),z(a.parentElement))}))}};var Y=e(639),$=e.n(Y);const Q={componentName:"componentR4000",pageTemplate:$(),nextPageButtonClass:".jht-intro__go-next",previousPageButtonClass:".jht-intro__go-back",audioFileUrl:"/-/media/427B820A8CED418CA50A4BEB37E2A262.mp3",audioFile:null,playing:!1,currentScore:0,loadComponent(t,a){s.innerHTML=$(),r(),this.attachEvents(t,a),this.playing=!1,q(this.audioFileUrl,this,1),d("Load Page","Right 4000Hz Page")},attachEvents(a,e){const n=document.querySelector(this.nextPageButtonClass);n.addEventListener("click",(e=>{this.audioFile.pause(),t.test.rightEarScores.push(this.currentScore),d("Right 4000Hz Score",this.currentScore),a(this.componentName)}));document.querySelector(".test-buttons").addEventListener("click",(t=>{const a=t.target.closest(".test-button");a&&(this.playing||(this.playing=H(this),n.removeAttribute("disabled"),R()),T(a.dataset.val,this,"4000"),D(a),this.currentScore=Number(a.dataset.val),I(),z(a.parentElement))}))}};var K=e(414),Z=e.n(K);const tt={componentName:"componentL500",pageTemplate:Z(),nextPageButtonClass:".jht-intro__go-next",previousPageButtonClass:".jht-intro__go-back",audioFileUrl:"/-/media/96C5B029D020472E8D0E44E79C21B88B.mp3",audioFile:null,playing:!1,currentScore:0,loadComponent(t,a){console.log("componentL500"),s.innerHTML=Z(),r(),this.attachEvents(t,a),this.playing=!1,q(this.audioFileUrl,this,-1),d("Load Page","Left 500Hz Page")},attachEvents(a,e){const n=document.querySelector(this.nextPageButtonClass);n.addEventListener("click",(e=>{this.audioFile.pause(),t.test.leftEarScores.push(this.currentScore),d("Left 500Hz Score",this.currentScore),a(this.componentName)}));document.querySelector(".test-buttons").addEventListener("click",(t=>{const a=t.target.closest(".test-button");a&&(this.playing||(this.playing=H(this),n.removeAttribute("disabled"),R()),T(a.dataset.val,this,"500"),D(a),this.currentScore=Number(a.dataset.val),I(),z(a.parentElement))}))}};var at=e(448),et=e.n(at);const nt={componentName:"componentL1000",pageTemplate:et(),nextPageButtonClass:".jht-intro__go-next",previousPageButtonClass:".jht-intro__go-back",audioFileUrl:"/-/media/05EC25FB612449649CF4709F2C943911.mp3",audioFile:null,playing:!1,currentScore:0,loadComponent(t,a){s.innerHTML=et(),r(),this.attachEvents(t,a),this.playing=!1,q(this.audioFileUrl,this,-1),d("Load Page","Left 1000Hz Page")},attachEvents(a,e){const n=document.querySelector(this.nextPageButtonClass);n.addEventListener("click",(e=>{this.audioFile.pause(),t.test.leftEarScores.push(this.currentScore),d("Left 1000Hz Score",this.currentScore),a(this.componentName)}));document.querySelector(".test-buttons").addEventListener("click",(t=>{const a=t.target.closest(".test-button");a&&(this.playing||(this.playing=H(this),n.removeAttribute("disabled"),R()),T(a.dataset.val,this,"1000"),D(a),this.currentScore=Number(a.dataset.val),I(),z(a.parentElement))}))}};var st=e(699),ot=e.n(st);const it={componentName:"componentL2000",pageTemplate:ot(),nextPageButtonClass:".jht-intro__go-next",previousPageButtonClass:".jht-intro__go-back",audioFileUrl:"/-/media/93D9E00ED8584EE2B1DF2DFF7ECD546B.mp3",audioFile:null,playing:!1,currentScore:0,loadComponent(t,a){s.innerHTML=ot(),r(),this.attachEvents(t,a),this.playing=!1,q(this.audioFileUrl,this,-1),d("Load Page","Left 2000Hz Page")},attachEvents(a,e){const n=document.querySelector(this.nextPageButtonClass);n.addEventListener("click",(e=>{this.audioFile.pause(),t.test.leftEarScores.push(this.currentScore),d("Left 2000Hz Score",this.currentScore),a(this.componentName)}));document.querySelector(".test-buttons").addEventListener("click",(t=>{const a=t.target.closest(".test-button");a&&(this.playing||(this.playing=H(this),n.removeAttribute("disabled"),R()),T(a.dataset.val,this,"2000"),D(a),this.currentScore=Number(a.dataset.val),I(),z(a.parentElement))}))}};var rt=e(709),lt=e.n(rt);const dt={componentName:"componentL4000",pageTemplate:lt(),nextPageButtonClass:".jht-intro__go-next",previousPageButtonClass:".jht-intro__go-back",audioFileUrl:"/-/media/427B820A8CED418CA50A4BEB37E2A262.mp3",audioFile:null,playing:!1,currentScore:0,loadComponent(t,a){s.innerHTML=lt(),r(),this.attachEvents(t,a),this.playing=!1,q(this.audioFileUrl,this,-1),d("Load Page","Left 4000Hz Page")},attachEvents(a,e){const n=document.querySelector(this.nextPageButtonClass);n.addEventListener("click",(e=>{this.audioFile.pause(),t.test.leftEarScores.push(this.currentScore),d("Left 4000Hz Score",this.currentScore),a(this.componentName)}));document.querySelector(".test-buttons").addEventListener("click",(t=>{const a=t.target.closest(".test-button");a&&(this.playing||(this.playing=H(this),n.removeAttribute("disabled"),R()),T(a.dataset.val,this,"4000"),D(a),this.currentScore=Number(a.dataset.val),I(),z(a.parentElement))}))}};var ct=e(216),ut=e.n(ct);const pt={componentName:"leftEarIntro",pageTemplate:ut(),previousPageButtonClass:".jht-intro__go-back",nextPageButtonClass:".jht-intro__go-next",loadComponent(t,a){s.innerHTML=ut(),r(),this.attachEvents(t,a),d("Load Page","Left Ear Intro")},attachEvents(t,a){const e=document.querySelector(this.nextPageButtonClass);document.querySelector(this.previousPageButtonClass).addEventListener("click",(t=>{a(this.componentName)})),e.addEventListener("click",(a=>{t(this.componentName)}))}};var vt=e(260),bt=e.n(vt);const ht={componentName:"rightEarIntro",pageTemplate:bt(),nextPageButtonClass:".jht-intro__go-next",loadComponent(t,a){s.innerHTML=bt(),r(),this.attachEvents(t,a),d("Load Page","Right Ear Intro")},attachEvents(t,a){document.querySelector(this.nextPageButtonClass).addEventListener("click",(a=>{t(this.componentName)}))}},gt=[{componentName:"intro",component:c,next:w,previous:null,step:0},{componentName:"generalQuestions",component:w,next:P,previous:c,step:1},{componentName:"lifestyle1",component:P,next:A,previous:w,step:2},{componentName:"lifestyle2",component:A,next:x,previous:P,step:3},{componentName:"howItWorks",component:x,next:pt,previous:A,step:4},{componentName:"leftEarIntro",component:pt,next:tt,previous:x,step:5},{componentName:"componentL500",component:tt,next:nt,previous:x,step:6},{componentName:"componentL1000",component:nt,next:it,previous:tt,step:7},{componentName:"componentL2000",component:it,next:dt,previous:nt,step:8},{componentName:"componentL4000",component:dt,next:ht,previous:it,step:9},{componentName:"rightEarIntro",component:ht,next:O,previous:dt,step:10},{componentName:"componentR500",component:O,next:J,previous:dt,step:11},{componentName:"componentR1000",component:J,next:X,previous:O,step:12},{componentName:"componentR2000",component:X,next:Q,previous:J,step:13},{componentName:"componentR4000",component:Q,next:h,previous:X,step:14},{componentName:"results",component:h,next:c,previous:Q,step:15}],mt={componentName:"steps",pageTemplate:m(),totalSteps:gt.length-1,loadComponent(){k.innerHTML=m(),r(),this.aboutBlock=document.querySelector(".jht__step-block--about .progress-bar__indicator"),this.testBlock=document.querySelector(".jht__step-block--test .progress-bar__indicator"),this.resultsBlock=document.querySelector(".jht__step-block--results .progress-bar__indicator")},updateSteps(t){const a=gt.filter((a=>a.componentName===t))[0].step;this.updatePercentages(a)},updatePercentages(t){0==t&&this.resetPercentages(),t<5&&(this.aboutBlock.style.width=100*this.normalizedPercentage(t,0,4)+"%"),t>=5&&t<15&&(this.testBlock.style.width=100*this.normalizedPercentage(t,5,14)+"%"),15===t&&(this.testBlock.style.width=this.aboutBlock.style.width=this.resultsBlock.style.width="100%")},resetPercentages(){this.testBlock.style.width=this.aboutBlock.style.width=this.resultsBlock.style.width="0%"},normalizedPercentage:(t,a,e)=>(t-a)/(e-a)},kt=()=>{const a=t=>{const n=gt.filter((a=>a.componentName===t))[0];n.next.loadComponent(a,e),mt.updateSteps(n.next.componentName),window.scrollTo(0,0)},e=t=>{const n=gt.filter((a=>a.componentName===t))[0];n.previous.loadComponent(a,e),mt.updateSteps(n.previous.componentName),window.scrollTo(0,0)};mt.loadComponent();const n=b();n?(t.profile=n.profile,t.test=n.test,h.loadComponent(a,e),mt.updateSteps(h.componentName)):c.loadComponent(a,e)};window.audioTest={init:kt()}}()}();});