From 027dcf812c4d2548718e78b3a4fdefdd453b16da Mon Sep 17 00:00:00 2001 From: blmage Date: Thu, 9 Jul 2020 10:59:48 +0200 Subject: [PATCH] Update the production build --- dist/src/ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/src/ui.js b/dist/src/ui.js index b7b07d1..70412b6 100644 --- a/dist/src/ui.js +++ b/dist/src/ui.js @@ -1 +1 @@ -!function(){"use strict";var t,n,e,o,r,l,_={},i=[],u=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function a(t,n){for(var e in n)t[e]=n[e];return t}function c(t){var n=t.parentNode;n&&n.removeChild(t)}function s(t,n,e){var o,r=arguments,l={};for(o in n)"key"!==o&&"ref"!==o&&(l[o]=n[o]);if(arguments.length>3)for(e=[e],o=3;o1&&void 0!==arguments[1]?arguments[1]:null;t instanceof Element&&("none"===t.style.display?!1!==n&&(t.style.display=""):!0!==n&&(t.style.display="none"))}var D,P,W,O=0,F=[],q=t.__r,B=t.diffed,R=t.__c,V=t.unmount;function $(n,e){t.__h&&t.__h(P,n,O||e),O=0;var o=P.__H||(P.__H={__:[],__h:[]});return n>=o.__.length&&o.__.push({}),o.__[n]}function Q(t){return O=1,function(t,n,e){var o=$(D++,2);return o.t=t,o.__c||(o.__c=P,o.__=[e?e(n):nt(void 0,n),function(t){var n=o.t(o.__[0],t);o.__[0]!==n&&(o.__[0]=n,o.__c.setState({}))}]),o.__}(nt,t)}function X(n,e){var o=$(D++,3);!t.__s&&tt(o.__H,e)&&(o.__=n,o.__H=e,P.__H.__h.push(o))}function Z(t){return O=5,J((function(){return{current:t}}),[])}function J(t,n){var e=$(D++,7);return tt(e.__H,n)?(e.__H=n,e.__h=t,e.__=t()):e.__}function z(t,n){return O=8,J((function(){return t}),n)}function G(){F.some((function(n){if(n.__P)try{n.__H.__h.forEach(K),n.__H.__h.forEach(Y),n.__H.__h=[]}catch(e){return n.__H.__h=[],t.__e(e,n.__v),!0}})),F=[]}function K(t){"function"==typeof t.u&&t.u()}function Y(t){t.u=t.__()}function tt(t,n){return!t||n.some((function(n,e){return n!==t[e]}))}function nt(t,n){return"function"==typeof n?n(t):n}t.__r=function(t){q&&q(t),D=0;var n=(P=t.__c).__H;n&&(n.__h.forEach(K),n.__h.forEach(Y),n.__h=[])},t.diffed=function(n){B&&B(n);var e=n.__c;e&&e.__H&&e.__H.__h.length&&(1!==F.push(e)&&W===t.requestAnimationFrame||((W=t.requestAnimationFrame)||function(t){var n,e=function(){clearTimeout(o),cancelAnimationFrame(n),setTimeout(t)},o=setTimeout(e,100);"undefined"!=typeof window&&(n=requestAnimationFrame(e))})(G))},t.__c=function(n,e){e.some((function(n){try{n.__h.forEach(K),n.__h=n.__h.filter((function(t){return!t.__||Y(t)}))}catch(o){e.some((function(t){t.__h&&(t.__h=[])})),e=[],t.__e(o,n.__v)}})),R&&R(n,e)},t.unmount=function(n){V&&V(n);var e=n.__c;if(e&&e.__H)try{e.__H.__.forEach(K)}catch(n){t.__e(n,e.__v)}};var et="normal";function ot(t){return"slow"===t?1:.5}function rt(t){return"slow"===t?2.5:2}function lt(t,n){return Math.max(ot(t),Math.min(n,rt(t)))}function _t(t,n){return Math.max(.1,Math.min(n,1))}function it(t){return"".concat("_duo-ttsc_","tts_rate_").concat(t)}function ut(t){return"".concat("_duo-ttsc_","tts_volume_").concat(t)}function at(t){return lt(t,Number(localStorage.getItem(it(t)))||1)}function ct(t){return _t(0,Number(localStorage.getItem(ut(t)))||1)}function st(t){if("loaded"!==t.state())return 0;var n=!!t._playLock;n&&(t._playLock=!1);var e=Number(t.seek());return n&&(t._playLock=!0),isNaN(e)?0:e}function ft(t,n,e){if(e.rate(t),e.volume(n>1?1:n),n>1&&e._webAudio&&e._getSoundIds&&e._soundById&&Howler&&Howler.ctx)for(var o=e._getSoundIds(),r=0;r=n||e<0||s&&t-a>=l}function v(){var t=Nt();if(h(t))return y(t);i=setTimeout(v,function(t){var e=n-(t-u);return s?St(e,l-(t-a)):e}(t))}function y(t){return i=void 0,f&&o?p(t):(o=r=void 0,_)}function m(){var t=Nt(),e=h(t);if(o=arguments,r=this,u=t,e){if(void 0===i)return d(u);if(s)return i=setTimeout(v,n),p(u)}return void 0===i&&(i=setTimeout(v,n)),_}return n=Ht(n)||0,Ct(e)&&(c=!!e.leading,l=(s="maxWait"in e)?Et(Ht(e.maxWait)||0,n):l,f="trailing"in e?!!e.trailing:f),m.cancel=function(){void 0!==i&&clearTimeout(i),a=0,o=u=r=i=void 0},m.flush=function(){return void 0===i?_:y(Nt())},m}function Ct(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function Ht(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==xt.call(t)}(t))return NaN;if(Ct(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=Ct(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(ht,"");var e=yt.test(t);return e||mt.test(t)?gt(t.slice(2),e?2:8):vt.test(t)?NaN:+t}var It=function(t,n,e){var o=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return Ct(e)&&(o="leading"in e?!!e.leading:o,r="trailing"in e?!!e.trailing:r),Tt(t,n,{leading:o,maxWait:n,trailing:r})},Lt=Symbol("base"),At=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return z(e=>(U(e)?e:[e]).flatMap(e=>{var o=[];return t[Lt]&&t[Lt][e]&&o.push(...t[Lt][e]),n.forEach(n=>{n&&t[n]&&t[n][e]&&o.push(...t[n][e])}),o}).join(" "),n.concat([t]))},Mt=["pause","pin","play","stop"],Ut=t=>{var{type:n,disabled:e=!1,onClick:o=A}=t,r=At(Wt,[n]);return s("div",{className:r(jt)},s("button",{disabled:e,onClick:o,className:r(Dt)},s("span",{className:r(Pt)})))},jt="wrapper",Dt="button",Pt="icon",Wt={[Lt]:{[jt]:["_10S_q"],[Dt]:["_2dfXt","_3ZQ9H","_3lE5Q","_18se6","vy3TL","_3iIWE","_1Mkpg","_1Dtxl","_1sVAI","sweRn","_1BWZU","_1LIf4","QVrnU","".concat("_duo-ttsc_","control-button")],[Pt]:["D9gQ7","".concat("_duo-ttsc_","control-button-icon")]}};Mt.forEach(t=>{Wt[t]={[Dt]:["".concat("_duo-ttsc_","control-button-").concat(t)]}});var Ot=["position","rate","volume"],Ft=t=>{var{type:n,value:e=1,min:o=e,max:r=e,step:l=.1,hint:_="",disabled:i=!1,onChangeStart:u=A,onChange:a=A,onChangeEnd:c=A}=t,[f,p]=Q(!1),d=At(Xt,[n]),h=z(t=>{var n=t.target.value;f?a(n):(u(n),p(!0))},[u,a,f,p]),v=z(t=>{c(t.target.value),p(!1)},[c,p]);return s("div",{className:d(qt)},s("span",{onClick:()=>c(o),className:d([Bt,Rt])}),s("input",{type:"range",min:o,max:r,step:l,value:e,disabled:i,onInput:h,onChange:v,className:d($t)}),s("span",{onClick:()=>c(r),className:d([Bt,Vt])}),""!==_&&s("span",{className:d(Qt)},_))},qt="wrapper",Bt="button",Rt="min_button",Vt="max_button",$t="input",Qt="hint",Xt={[Lt]:{[qt]:["".concat("_duo-ttsc_","slider")],[Bt]:["_104UW","".concat("_duo-ttsc_","slider-button")],[Rt]:["".concat("_duo-ttsc_","slider-min-button")],[Vt]:["".concat("_duo-ttsc_","slider-max-button")],[$t]:["_2iSv6","_7gXTk","".concat("_duo-ttsc_","slider-input")],[Qt]:["D9gQ7","".concat("_duo-ttsc_","slider-hint")]}};Ot.forEach(t=>{Xt[t]={[qt]:["".concat("_duo-ttsc_","slider-").concat(t)]}});var Zt=It((t,n,e)=>ft(t,n,e),50),Jt=t=>{var n,e,o,{ttsType:r=et,howl:l=null}=t,[_,i]=(t=>{var[n,e]=Q(at(t));return[n,z(n=>{var o=lt(t,Number(n)||1);e(o),localStorage.setItem(it(t),String(o))},[t,e])]})(r),[u,a]=(t=>{var[n,e]=Q(ct(t));return[n,z(n=>{var o=_t(0,Number(n)||1);e(o),localStorage.setItem(ut(t),String(o))},[t,e])]})(r),[c,f]=Q(0),[p,d]=Q(0),[h,v]=Q(0),[y,m]=Q(!1),[g,b]=Q(!1),[k,w]=Q(!1),x=At(Gt),E=z(t=>{var n=Math.round(10*Number(t))/10;return!isNaN(n)&&n>=0&&n<=c?n:null},[c]),S=z(t=>{i(t),l&&Zt(t,u,l)},[l,u,i]),N=z(t=>{a(t),l&&Zt(_,t,l)},[l,_,a]),T=z(t=>{var n=E(t);return null!==n&&d(n),n},[E,d]),C=z(t=>{T(t),l&&y&&(w(!0),l.pause())},[l,y,w,T]),H=z(t=>{var n=T(t);l&&(null!==n&&l.seek(n),k&&l.play(),w(!1))},[l,k,w,T]),I=z(()=>{l&&l.play()},[l]),L=z(()=>{l&&l.pause()},[l]),A=z(()=>{l&&l.stop()},[l]),U=z(()=>{var t=E(p);null!==t&&v(t)},[p,E,v]);X(()=>{if(l){var t=l.playing(),n=st(l);f(l.duration()),d(n||0),m(t),b(!t&&n>0);var e=()=>{m(!0),b(!1)},o=()=>b(!0);return l.on("play",e),l.on("pause",o),()=>{l&&(l.off("play",e),l.off("pause",o))}}},[l,f,d,m,b]),X(()=>{if(l){var t=()=>{d(h),m(!1),l.seek(h)};return l.on("end",t),l.on("stop",t),()=>{l.off("end",t),l.off("stop",t)}}},[l,h,d,m]),dt(()=>{l&&(l.stop(),l.seek(0),l.once("play",()=>l.seek(0)))}),n=()=>{if(l){var t=st(l);null!==t&&d(t)}},e=y&&!g?75:null,o=Z((function(){})),X((function(){o.current=n})),X((function(){if(null!==e){var t=setInterval((function(){return o.current()}),e||0);return function(){return clearInterval(t)}}}),[e]);var j=M(l),D=j?"".concat(p.toFixed(1),"s / ").concat(c.toFixed(1),"s"):"? / ?";return s("div",null,s(Ft,{type:"rate",value:_,min:ot(r),max:rt(r),step:.1,hint:"".concat(_,"x"),onChange:S,onChangeEnd:S}),s(Ft,{type:"volume",value:u,min:.1,max:1,step:.1,hint:"".concat(Math.round(100*u),"%"),onChange:N,onChangeEnd:N}),s(Ft,{type:"position",value:p,min:0,max:c,step:.1,hint:D,disabled:!j,onChangeStart:C,onChange:T,onChangeEnd:H}),s("div",{className:x(zt)},s(Ut,!y||g?{type:"play",disabled:!j,onClick:I}:{type:"pause",disabled:!j,onClick:L}),s(Ut,{type:"stop",disabled:!j||!y,onClick:A}),s(Ut,{type:"pin",disabled:!j,onClick:U})))},zt="button_wrapper",Gt={[Lt]:{[zt]:["_2mM1T","".concat("_duo-ttsc_","controls-buttons")]}},Kt=[],Yt=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(t,n,e,o,r){return n.match(L)&&(!0,this.addEventListener("load",()=>{try{!1;var t=M(this.response)?this.response:JSON.parse(this.responseText);M(t)&&U(t.challenges)&&(Kt=[],t.challenges.forEach((t,n)=>{I.indexOf(t.type)>=0&&(t.tts&&Kt.push({ttsType:et,soundUrl:String(t.tts).trim(),challengeIndex:n}),t.slowTts&&Kt.push({ttsType:"slow",soundUrl:String(t.slowTts).trim(),challengeIndex:n}))}))}catch(t){}})),Yt.call(this,t,n,e,o,r)};var tn={},nn=null;setInterval(()=>{if(window.Howl&&nn!==Howl.prototype){nn=Howl.prototype;var t=Howl.prototype.init,n=Howl.prototype.play;Howl.prototype.init=function(n){try{[n.src].flat().forEach(t=>tn[t]=this)}catch(t){}return t.call(this,n)},Howl.prototype.play=function(t){try{if(!t){var e=String(this._src||this._parent&&this._parent._src||"").trim(),o=Kt.find(t=>e===t.soundUrl);M(o)&&function(t){var n=document.querySelector(an);if(n!==en){if(en=n,Object.values(rn).forEach(t=>H("",t)),rn={},null===n)return;var e=n.querySelectorAll(sn);if(0===e.length)return;var o={};e.forEach(t=>{var e=t.matches(fn)?"slow":et,r=document.createElement("div");r.classList.add(...pn),r.style.display="none",n.append(r);var l=document.createElement("button");l.classList.add(...dn),t.parentNode.classList.add(cn),t.after(l),rn[e]=r,o[e]=l}),on={},Kt.filter(n=>n.challengeIndex===t).map(t=>[t.ttsType,tn[t.soundUrl]]).filter(t=>M(t[1])).forEach(t=>{var[e,o]=t,r=()=>{n===en&&(!function(t,n){ft(at(t),ct(t),n)}(e,o),on[e]=o,ln(e))};"loaded"===o.state()?r():o.once("loaded",r)});var r=Object.entries(o);r.forEach(t=>{var[n,e]=t;e.addEventListener("click",t=>{if(function(t){t.preventDefault(),t.stopPropagation()}(t),rn[n]&&rn[n].isConnected){var o=!1;r.forEach(t=>{var[r,l]=t;l.classList.contains(hn)?rn[r]&&(j(rn[r],!1),l.classList.remove(hn)):e===l&&(ln(n),j(rn[n],!0),e.classList.add(hn),o=!0)});var l=document.querySelector(_n);l&&(o?l.classList.add(un):l.classList.remove(un))}})})}}(o.challengeIndex)}}catch(t){}return n.call(this,t)}}},50),setInterval(()=>{tn=Object.fromEntries(Object.entries(tn).filter(t=>"unloaded"!==t[1].state()))},6e4);var en=null,on={},rn={};function ln(t){rn[t]&&rn[t].isConnected&&H(s(Jt,{key:"controls-".concat(t),ttsType:t,howl:on[t]}),rn[t])}var _n="._3Mkmw",un="".concat("_duo-ttsc_","challenge-form-wrapper-with-controls"),an="._3msZN",cn="".concat("_duo-ttsc_","playback-button-wrapper-with-controls"),sn="._2dIjg",fn=".gJtFB",pn=["".concat("_duo-ttsc_","controls-form")],dn=["_2dIjg","XepLJ","_1bJB-","vy3TL","_3iIWE","_1Mkpg","_1Dtxl","_1sVAI","sweRn","_1BWZU","_2bW5I","_3ZpUo","_2odwU","".concat("_duo-ttsc_","controls-form-toggle-button")],hn="".concat("_duo-ttsc_","active")}(); +!function(){"use strict";var t,n,e,o,r,l,_={},i=[],u=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function a(t,n){for(var e in n)t[e]=n[e];return t}function c(t){var n=t.parentNode;n&&n.removeChild(t)}function s(t,n,e){var o,r=arguments,l={};for(o in n)"key"!==o&&"ref"!==o&&(l[o]=n[o]);if(arguments.length>3)for(e=[e],o=3;o1&&void 0!==arguments[1]?arguments[1]:null;t instanceof Element&&("none"===t.style.display?!1!==n&&(t.style.display=""):!0!==n&&(t.style.display="none"))}var D,P,W,O=0,F=[],q=t.__r,B=t.diffed,R=t.__c,V=t.unmount;function $(n,e){t.__h&&t.__h(P,n,O||e),O=0;var o=P.__H||(P.__H={__:[],__h:[]});return n>=o.__.length&&o.__.push({}),o.__[n]}function Q(t){return O=1,function(t,n,e){var o=$(D++,2);return o.t=t,o.__c||(o.__c=P,o.__=[e?e(n):nt(void 0,n),function(t){var n=o.t(o.__[0],t);o.__[0]!==n&&(o.__[0]=n,o.__c.setState({}))}]),o.__}(nt,t)}function X(n,e){var o=$(D++,3);!t.__s&&tt(o.__H,e)&&(o.__=n,o.__H=e,P.__H.__h.push(o))}function Z(t){return O=5,J((function(){return{current:t}}),[])}function J(t,n){var e=$(D++,7);return tt(e.__H,n)?(e.__H=n,e.__h=t,e.__=t()):e.__}function z(t,n){return O=8,J((function(){return t}),n)}function G(){F.some((function(n){if(n.__P)try{n.__H.__h.forEach(K),n.__H.__h.forEach(Y),n.__H.__h=[]}catch(e){return n.__H.__h=[],t.__e(e,n.__v),!0}})),F=[]}function K(t){"function"==typeof t.u&&t.u()}function Y(t){t.u=t.__()}function tt(t,n){return!t||n.some((function(n,e){return n!==t[e]}))}function nt(t,n){return"function"==typeof n?n(t):n}t.__r=function(t){q&&q(t),D=0;var n=(P=t.__c).__H;n&&(n.__h.forEach(K),n.__h.forEach(Y),n.__h=[])},t.diffed=function(n){B&&B(n);var e=n.__c;e&&e.__H&&e.__H.__h.length&&(1!==F.push(e)&&W===t.requestAnimationFrame||((W=t.requestAnimationFrame)||function(t){var n,e=function(){clearTimeout(o),cancelAnimationFrame(n),setTimeout(t)},o=setTimeout(e,100);"undefined"!=typeof window&&(n=requestAnimationFrame(e))})(G))},t.__c=function(n,e){e.some((function(n){try{n.__h.forEach(K),n.__h=n.__h.filter((function(t){return!t.__||Y(t)}))}catch(o){e.some((function(t){t.__h&&(t.__h=[])})),e=[],t.__e(o,n.__v)}})),R&&R(n,e)},t.unmount=function(n){V&&V(n);var e=n.__c;if(e&&e.__H)try{e.__H.__.forEach(K)}catch(n){t.__e(n,e.__v)}};var et="normal";function ot(t){return"slow"===t?1:.5}function rt(t){return"slow"===t?2.5:2}function lt(t,n){return Math.max(ot(t),Math.min(n,rt(t)))}function _t(t){return Math.max(.1,Math.min(t,1))}function it(t){return"".concat("_duo-ttsc_","tts_rate_").concat(t)}function ut(t){return"".concat("_duo-ttsc_","tts_volume_").concat(t)}function at(t){var n=localStorage.getItem(it(t));return lt(t,Number(n)||1)}function ct(t){var n=localStorage.getItem(ut(t));return _t(Number(n)||1)}function st(t){if("loaded"!==t.state())return 0;var n=!!t._playLock;n&&(t._playLock=!1);var e=Number(t.seek());return n&&(t._playLock=!0),isNaN(e)?0:e}function ft(t,n,e){if(e.rate(t),e.volume(n>1?1:n),n>1&&e._webAudio&&e._getSoundIds&&e._soundById&&Howler&&Howler.ctx)for(var o=e._getSoundIds(),r=0;r=n||e<0||s&&t-a>=l}function v(){var t=Nt();if(h(t))return y(t);i=setTimeout(v,function(t){var e=n-(t-u);return s?St(e,l-(t-a)):e}(t))}function y(t){return i=void 0,f&&o?p(t):(o=r=void 0,_)}function m(){var t=Nt(),e=h(t);if(o=arguments,r=this,u=t,e){if(void 0===i)return d(u);if(s)return i=setTimeout(v,n),p(u)}return void 0===i&&(i=setTimeout(v,n)),_}return n=Ht(n)||0,Ct(e)&&(c=!!e.leading,l=(s="maxWait"in e)?Et(Ht(e.maxWait)||0,n):l,f="trailing"in e?!!e.trailing:f),m.cancel=function(){void 0!==i&&clearTimeout(i),a=0,o=u=r=i=void 0},m.flush=function(){return void 0===i?_:y(Nt())},m}function Ct(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function Ht(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==xt.call(t)}(t))return NaN;if(Ct(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=Ct(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(ht,"");var e=yt.test(t);return e||mt.test(t)?gt(t.slice(2),e?2:8):vt.test(t)?NaN:+t}var It=function(t,n,e){var o=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return Ct(e)&&(o="leading"in e?!!e.leading:o,r="trailing"in e?!!e.trailing:r),Tt(t,n,{leading:o,maxWait:n,trailing:r})},Lt=Symbol("base"),At=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return z(e=>(U(e)?e:[e]).flatMap(e=>{var o=[];return t[Lt]&&t[Lt][e]&&o.push(...t[Lt][e]),n.forEach(n=>{n&&t[n]&&t[n][e]&&o.push(...t[n][e])}),o}).join(" "),n.concat([t]))},Mt=["pause","pin","play","stop"],Ut=t=>{var{type:n,disabled:e=!1,onClick:o=A}=t,r=At(Wt,[n]);return s("div",{className:r(jt)},s("button",{disabled:e,onClick:o,className:r(Dt)},s("span",{className:r(Pt)})))},jt="wrapper",Dt="button",Pt="icon",Wt={[Lt]:{[jt]:["_10S_q"],[Dt]:["_2dfXt","_3ZQ9H","_3lE5Q","_18se6","vy3TL","_3iIWE","_1Mkpg","_1Dtxl","_1sVAI","sweRn","_1BWZU","_1LIf4","QVrnU","".concat("_duo-ttsc_","control-button")],[Pt]:["D9gQ7","".concat("_duo-ttsc_","control-button-icon")]}};Mt.forEach(t=>{Wt[t]={[Dt]:["".concat("_duo-ttsc_","control-button-").concat(t)]}});var Ot=["position","rate","volume"],Ft=t=>{var{type:n,value:e=1,min:o=e,max:r=e,step:l=.1,hint:_="",disabled:i=!1,onChangeStart:u=A,onChange:a=A,onChangeEnd:c=A}=t,[f,p]=Q(!1),d=At(Xt,[n]),h=z(t=>{var n=t.target.value;f?a(n):(u(n),p(!0))},[u,a,f,p]),v=z(t=>{c(t.target.value),p(!1)},[c,p]);return s("div",{className:d(qt)},s("span",{onClick:()=>c(o),className:d([Bt,Rt])}),s("input",{type:"range",min:o,max:r,step:l,value:e,disabled:i,onInput:h,onChange:v,className:d($t)}),s("span",{onClick:()=>c(r),className:d([Bt,Vt])}),""!==_&&s("span",{className:d(Qt)},_))},qt="wrapper",Bt="button",Rt="min_button",Vt="max_button",$t="input",Qt="hint",Xt={[Lt]:{[qt]:["".concat("_duo-ttsc_","slider")],[Bt]:["_104UW","".concat("_duo-ttsc_","slider-button")],[Rt]:["".concat("_duo-ttsc_","slider-min-button")],[Vt]:["".concat("_duo-ttsc_","slider-max-button")],[$t]:["_2iSv6","_7gXTk","".concat("_duo-ttsc_","slider-input")],[Qt]:["D9gQ7","".concat("_duo-ttsc_","slider-hint")]}};Ot.forEach(t=>{Xt[t]={[qt]:["".concat("_duo-ttsc_","slider-").concat(t)]}});var Zt=It((t,n,e)=>ft(t,n,e),50),Jt=t=>{var n,e,o,{ttsType:r=et,howl:l=null}=t,[_,i]=(t=>{var[n,e]=Q(at(t));return[n,z(n=>{var o=lt(t,Number(n)||1);e(o),localStorage.setItem(it(t),String(o))},[t,e])]})(r),[u,a]=(t=>{var[n,e]=Q(ct(t));return[n,z(n=>{var o=_t(Number(n)||1);e(o),localStorage.setItem(ut(t),String(o))},[t,e])]})(r),[c,f]=Q(0),[p,d]=Q(0),[h,v]=Q(0),[y,m]=Q(!1),[g,b]=Q(!1),[k,w]=Q(!1),x=At(Gt),E=z(t=>{var n=Math.round(10*Number(t))/10;return!isNaN(n)&&n>=0&&n<=c?n:null},[c]),S=z(t=>{i(t),l&&Zt(t,u,l)},[l,u,i]),N=z(t=>{a(t),l&&Zt(_,t,l)},[l,_,a]),T=z(t=>{var n=E(t);return null!==n&&d(n),n},[E,d]),C=z(t=>{T(t),l&&y&&(w(!0),l.pause())},[l,y,w,T]),H=z(t=>{var n=T(t);l&&(null!==n&&l.seek(n),k&&l.play(),w(!1))},[l,k,w,T]),I=z(()=>{l&&l.play()},[l]),L=z(()=>{l&&l.pause()},[l]),A=z(()=>{l&&l.stop()},[l]),U=z(()=>{var t=E(p);null!==t&&v(t)},[p,E,v]);X(()=>{if(l){var t=l.playing(),n=st(l);f(l.duration()),d(n||0),m(t),b(!t&&n>0);var e=()=>{m(!0),b(!1)},o=()=>b(!0);return l.on("play",e),l.on("pause",o),()=>{l&&(l.off("play",e),l.off("pause",o))}}},[l,f,d,m,b]),X(()=>{if(l){var t=()=>{d(h),m(!1),l.seek(h)};return l.on("end",t),l.on("stop",t),()=>{l.off("end",t),l.off("stop",t)}}},[l,h,d,m]),dt(()=>{l&&(l.stop(),l.seek(0),l.once("play",()=>l.seek(0)))}),n=()=>{l&&d(st(l))},e=y&&!g?75:null,o=Z((function(){})),X((function(){o.current=n})),X((function(){if(null!==e){var t=setInterval((function(){return o.current()}),e||0);return function(){return clearInterval(t)}}}),[e]);var j=M(l),D=j?"".concat(p.toFixed(1),"s / ").concat(c.toFixed(1),"s"):"? / ?";return s("div",null,s(Ft,{type:"rate",value:_,min:ot(r),max:rt(r),step:.1,hint:"".concat(_,"x"),onChange:S,onChangeEnd:S}),s(Ft,{type:"volume",value:u,min:.1,max:1,step:.1,hint:"".concat(Math.round(100*u),"%"),onChange:N,onChangeEnd:N}),s(Ft,{type:"position",value:p,min:0,max:c,step:.1,hint:D,disabled:!j,onChangeStart:C,onChange:T,onChangeEnd:H}),s("div",{className:x(zt)},s(Ut,!y||g?{type:"play",disabled:!j,onClick:I}:{type:"pause",disabled:!j,onClick:L}),s(Ut,{type:"stop",disabled:!j||!y,onClick:A}),s(Ut,{type:"pin",disabled:!j,onClick:U})))},zt="button_wrapper",Gt={[Lt]:{[zt]:["_2mM1T","".concat("_duo-ttsc_","controls-buttons")]}},Kt=[],Yt=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(t,n,e,o,r){return n.match(L)&&(!0,this.addEventListener("load",()=>{try{!1;var t=M(this.response)?this.response:JSON.parse(this.responseText);M(t)&&U(t.challenges)&&(Kt=[],t.challenges.forEach((t,n)=>{I.indexOf(t.type)>=0&&(t.tts&&Kt.push({ttsType:et,soundUrl:String(t.tts).trim(),challengeIndex:n}),t.slowTts&&Kt.push({ttsType:"slow",soundUrl:String(t.slowTts).trim(),challengeIndex:n}))}))}catch(t){}})),Yt.call(this,t,n,e,o,r)};var tn={},nn=null;setInterval(()=>{if(window.Howl&&nn!==Howl.prototype){nn=Howl.prototype;var t=Howl.prototype.init,n=Howl.prototype.play;Howl.prototype.init=function(n){try{[n.src].flat().forEach(t=>tn[t]=this)}catch(t){}return t.call(this,n)},Howl.prototype.play=function(t){try{if(!t){var e=String(this._src||this._parent&&this._parent._src||"").trim(),o=Kt.find(t=>e===t.soundUrl);M(o)&&function(t){var n=document.querySelector(an);if(n!==en){if(en=n,Object.values(rn).forEach(t=>H("",t)),rn={},null===n)return;var e=n.querySelectorAll(sn);if(0===e.length)return;var o={};e.forEach(t=>{var e=t.matches(fn)?"slow":et,r=document.createElement("div");r.classList.add(...pn),r.style.display="none",n.append(r);var l=document.createElement("button");l.classList.add(...dn),t.parentNode.classList.add(cn),t.after(l),rn[e]=r,o[e]=l}),on={},Kt.filter(n=>n.challengeIndex===t).map(t=>[t.ttsType,tn[t.soundUrl]]).filter(t=>M(t[1])).forEach(t=>{var[e,o]=t,r=()=>{n===en&&(!function(t,n){ft(at(t),ct(t),n)}(e,o),on[e]=o,ln(e))};"loaded"===o.state()?r():o.once("load",r)});var r=Object.entries(o);r.forEach(t=>{var[n,e]=t;e.addEventListener("click",t=>{if(function(t){t.preventDefault(),t.stopPropagation()}(t),rn[n]&&rn[n].isConnected){var o=!1;r.forEach(t=>{var[r,l]=t;l.classList.contains(hn)?rn[r]&&(j(rn[r],!1),l.classList.remove(hn)):e===l&&(ln(n),j(rn[n],!0),e.classList.add(hn),o=!0)});var l=document.querySelector(_n);l&&(o?l.classList.add(un):l.classList.remove(un))}})})}}(o.challengeIndex)}}catch(t){}return n.call(this,t)}}},50),setInterval(()=>{tn=Object.fromEntries(Object.entries(tn).filter(t=>"unloaded"!==t[1].state()))},6e4);var en=null,on={},rn={};function ln(t){rn[t]&&rn[t].isConnected&&H(s(Jt,{key:"control-panel-".concat(t),ttsType:t,howl:on[t]}),rn[t])}var _n="._3Mkmw",un="".concat("_duo-ttsc_","challenge-form-wrapper-with-controls"),an="._3msZN",cn="".concat("_duo-ttsc_","playback-button-wrapper-with-controls"),sn="._2dIjg",fn=".gJtFB",pn=["".concat("_duo-ttsc_","controls-form")],dn=["_2dIjg","XepLJ","_1bJB-","vy3TL","_3iIWE","_1Mkpg","_1Dtxl","_1sVAI","sweRn","_1BWZU","_2bW5I","_3ZpUo","_2odwU","".concat("_duo-ttsc_","controls-form-toggle-button")],hn="".concat("_duo-ttsc_","active")}();