@internetarchive/bookreader 5.0.0-102 → 5.0.0-103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/BookReader/BookReader.js +1 -1
  2. package/BookReader/BookReader.js.map +1 -1
  3. package/BookReader/ia-bookreader-bundle.js +141 -102
  4. package/BookReader/ia-bookreader-bundle.js.LICENSE.txt +6 -0
  5. package/BookReader/ia-bookreader-bundle.js.map +1 -1
  6. package/BookReader/plugins/plugin.chapters.js +1 -1
  7. package/BookReader/plugins/plugin.chapters.js.map +1 -1
  8. package/BookReader/plugins/plugin.experiments.js +1 -1
  9. package/BookReader/plugins/plugin.experiments.js.map +1 -1
  10. package/BookReader/plugins/plugin.search.js +1 -1
  11. package/BookReader/plugins/plugin.search.js.map +1 -1
  12. package/BookReader/plugins/plugin.text_selection.js +1 -1
  13. package/BookReader/plugins/plugin.text_selection.js.map +1 -1
  14. package/BookReader/plugins/plugin.translate.js +2 -2
  15. package/BookReader/plugins/plugin.translate.js.map +1 -1
  16. package/BookReader/plugins/plugin.tts.js +1 -1
  17. package/BookReader/plugins/plugin.tts.js.map +1 -1
  18. package/package.json +2 -2
  19. package/src/BookNavigator/assets/button-base.js +0 -1
  20. package/src/BookNavigator/bookmarks/bookmarks-provider.js +1 -1
  21. package/src/BookNavigator/downloads/downloads-provider.js +1 -1
  22. package/src/BookNavigator/search/search-provider.js +5 -1
  23. package/src/BookNavigator/visual-adjustments/visual-adjustments-provider.js +1 -1
  24. package/src/BookReader/Navbar/Navbar.js +10 -5
  25. package/src/plugins/plugin.chapters.js +1 -1
  26. package/src/plugins/plugin.experiments.js +1 -1
  27. package/src/plugins/translate/TranslationManager.js +6 -4
  28. package/src/plugins/tts/utils.js +43 -17
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see plugin.tts.js.LICENSE.txt */
2
- (self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[51],{706:function(e,t,n){"use strict";var o=n(350).PROPER,r=n(9039),i=n(7452);e.exports=function(e){return r(function(){return!!i[e]()||"​…᠎"!=="​…᠎"[e]()||o&&i[e].name!==e})}},1041:function(e,t,n){"use strict";function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function r(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,i(o.key),o)}}function i(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}n.d(t,{S:function(){return a}}),n(2675),n(9463),n(2259),n(5700),n(3792),n(9572),n(8130),n(9085),n(6099),n(7764),n(2953);var a=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.br=t,this.options},(t=[{key:"setup",value:function(e){this.options=Object.assign({},this.options,e)}},{key:"init",value:function(){}},{key:"_configurePageContainer",value:function(e){}},{key:"_configureToolbar",value:function(e){}},{key:"_bindNavigationHandlers",value:function(){}},{key:"extendNavBar",value:function(e){}}])&&r(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},1792:function(e,t,n){var o,r;o=[n(1669)],void 0===(r=function(e){return function(e){"use strict";function t(e){void 0===e&&(e=window.navigator.userAgent),e=e.toLowerCase();var t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[],n=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(silk)/.exec(e)||/(android)/.exec(e)||/(win)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||/(playbook)/.exec(e)||/(bb)/.exec(e)||/(blackberry)/.exec(e)||[],o={},r={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",versionNumber:t[4]||t[2]||"0",platform:n[0]||""};if(r.browser&&(o[r.browser]=!0,o.version=r.version,o.versionNumber=parseInt(r.versionNumber,10)),r.platform&&(o[r.platform]=!0),(o.android||o.bb||o.blackberry||o.ipad||o.iphone||o.ipod||o.kindle||o.playbook||o.silk||o["windows phone"])&&(o.mobile=!0),(o.cros||o.mac||o.linux||o.win)&&(o.desktop=!0),(o.chrome||o.opr||o.safari)&&(o.webkit=!0),o.rv||o.iemobile){var i="msie";r.browser=i,o[i]=!0}if(o.edge){delete o.edge;var a="msedge";r.browser=a,o[a]=!0}if(o.safari&&o.blackberry){var s="blackberry";r.browser=s,o[s]=!0}if(o.safari&&o.playbook){var u="playbook";r.browser=u,o[u]=!0}if(o.bb){var l="blackberry";r.browser=l,o[l]=!0}if(o.opr){var c="opera";r.browser=c,o[c]=!0}if(o.safari&&o.android){var f="android";r.browser=f,o[f]=!0}if(o.safari&&o.kindle){var d="kindle";r.browser=d,o[d]=!0}if(o.safari&&o.silk){var h="silk";r.browser=h,o[h]=!0}return o.name=r.browser,o.platform=r.platform,o}return window.jQBrowser=t(window.navigator.userAgent),window.jQBrowser.uaMatch=t,e&&(e.browser=window.jQBrowser),window.jQBrowser}(e)}.apply(t,o))||(e.exports=r)},2443:function(e,t,n){var o;e=n.nmd(e),function(r,i){"use strict";if(!r||!r.document)throw new Error("SoundManager requires a browser with window and document objects.");var a=null;function s(e,t){this.setupOptions={url:e||null,flashVersion:8,debugMode:!0,debugFlash:!1,useConsole:!0,consoleOnly:!0,waitForWindowLoad:!1,bgColor:"#ffffff",useHighPerformance:!1,flashPollingInterval:null,html5PollingInterval:null,flashLoadTimeout:1e3,wmode:null,allowScriptAccess:"always",useFlashBlock:!1,useHTML5Audio:!0,forceUseGlobalHTML5Audio:!1,ignoreMobileRestrictions:!1,html5Test:/^(probably|maybe)$/i,preferFlash:!1,noSWFCache:!1,idPrefix:"sound"},this.defaultOptions={autoLoad:!1,autoPlay:!1,from:null,loops:1,onid3:null,onerror:null,onload:null,whileloading:null,onplay:null,onpause:null,onresume:null,whileplaying:null,onposition:null,onstop:null,onfinish:null,multiShot:!0,multiShotEvents:!1,position:null,pan:0,playbackRate:1,stream:!0,to:null,type:null,usePolicyFile:!1,volume:100},this.flash9Options={onfailure:null,isMovieStar:null,usePeakData:!1,useWaveformData:!1,useEQData:!1,onbufferchange:null,ondataerror:null},this.movieStarOptions={bufferTime:3,serverURL:null,onconnect:null,duration:null},this.audioFormats={mp3:{type:['audio/mpeg; codecs="mp3"',"audio/mpeg","audio/mp3","audio/MPA","audio/mpa-robust"],required:!0},mp4:{related:["aac","m4a","m4b"],type:['audio/mp4; codecs="mp4a.40.2"',"audio/aac","audio/x-m4a","audio/MP4A-LATM","audio/mpeg4-generic"],required:!1},ogg:{type:["audio/ogg; codecs=vorbis"],required:!1},opus:{type:["audio/ogg; codecs=opus","audio/opus"],required:!1},wav:{type:['audio/wav; codecs="1"',"audio/wav","audio/wave","audio/x-wav"],required:!1},flac:{type:["audio/flac"],required:!1}},this.movieID="sm2-container",this.id=t||"sm2movie",this.debugID="soundmanager-debug",this.debugURLParam=/([#?&])debug=1/i,this.versionNumber="V2.97a.20170601",this.version=null,this.movieURL=null,this.altURL=null,this.swfLoaded=!1,this.enabled=!1,this.oMC=null,this.sounds={},this.soundIDs=[],this.muted=!1,this.didFlashBlock=!1,this.filePattern=null,this.filePatterns={flash8:/\.mp3(\?.*)?$/i,flash9:/\.mp3(\?.*)?$/i},this.features={buffering:!1,peakData:!1,waveformData:!1,eqData:!1,movieStar:!1},this.sandbox={type:null,types:{remote:"remote (domain-based) rules",localWithFile:"local with file access (no internet access)",localWithNetwork:"local with network (internet access only, no local access)",localTrusted:"local, trusted (local+internet access)"},description:null,noRemote:null,noLocal:null},this.html5={usingFlash:null},this.flash={},this.html5Only=!1,this.ignoreFlash=!1;var n,o,a,s,u,l,c,f,d,h,p,m,g,y,v,A,b,w,_,k,S,O,P,E,M,T,I,D,L,C,q,F,R,j,x,V,B,H,U,N,G,Q,K,W,z,J,Z,Y,X,$,ee,te,ne,oe,re,ie,ae,se,ue,le,ce,fe,de,he,pe,me=this,ge=null,ye=null,ve="soundManager",Ae=ve+": ",be=navigator.userAgent,we=r.location.href.toString(),_e=document,ke=[],Se=!0,Oe=!1,Pe=!1,Ee=!1,Me=!1,Te=!1,Ie=0,De=["log","info","warn","error"],Le=null,Ce=null,qe=!1,Fe=!1,Re=0,je=null,xe=[],Ve=null,Be=Array.prototype.slice,He=!1,Ue=0,Ne=1e3,Ge=be.match(/(ipad|iphone|ipod)/i),Qe=be.match(/android/i),Ke=be.match(/msie|trident/i),We=be.match(/webkit/i),ze=be.match(/safari/i)&&!be.match(/chrome/i),Je=be.match(/opera/i),Ze=be.match(/(mobile|pre\/|xoom)/i)||Ge||Qe,Ye=!we.match(/usehtml5audio/i)&&!we.match(/sm2-ignorebadua/i)&&ze&&!be.match(/silk/i)&&be.match(/OS\sX\s10_6_([3-7])/i),Xe=r.console!==i&&console.log!==i,$e=_e.hasFocus!==i?_e.hasFocus():null,et=ze&&(_e.hasFocus===i||!_e.hasFocus()),tt=!et,nt=/(mp3|mp4|mpa|m4a|m4b)/i,ot="about:blank",rt=_e.location?_e.location.protocol.match(/http/i):null,it=rt?"":"//",at=/^\s*audio\/(?:x-)?(?:mpeg4|aac|flv|mov|mp4|m4v|m4a|m4b|mp4v|3gp|3g2)\s*(?:$|;)/i,st=["mpeg4","aac","flv","mov","mp4","m4v","f4v","m4a","m4b","mp4v","3gp","3g2"],ut=new RegExp("\\.("+st.join("|")+")(\\?.*)?$","i");function lt(e){return me.preferFlash&&se&&!me.ignoreFlash&&me.flash[e]!==i&&me.flash[e]}function ct(e){return function(t){var n,o=this._s;return o&&o._a?n=e.call(this,t):(o&&o.id?me._wD(o.id+": Ignoring "+t.type):me._wD("HTML5::Ignoring "+t.type),n=null),n}}this.mimePattern=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i,this.useAltURL=!rt,B={swfBox:"sm2-object-box",swfDefault:"movieContainer",swfError:"swf_error",swfTimedout:"swf_timedout",swfLoaded:"swf_loaded",swfUnblocked:"swf_unblocked",sm2Debug:"sm2_debug",highPerf:"high_performance",flashDebug:"flash_debug"},ee=[null,"MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED"],this.hasHTML5=function(){try{return Audio!==i&&(Je&&opera!==i&&opera.version()<10?new Audio(null):new Audio).canPlayType!==i}catch(e){return!1}}(),this.setup=function(e){var t=!me.url;return e!==i&&Ee&&Ve&&me.ok()&&(e.flashVersion!==i||e.url!==i||e.html5Test!==i)&&G(j("setupLate")),p(e),He||(Ze?me.setupOptions.ignoreMobileRestrictions&&!me.setupOptions.forceUseGlobalHTML5Audio||(xe.push(S.globalHTML5),He=!0):me.setupOptions.forceUseGlobalHTML5Audio&&(xe.push(S.globalHTML5),He=!0)),!pe&&Ze&&(me.setupOptions.ignoreMobileRestrictions?xe.push(S.ignoreMobile):(me.setupOptions.useHTML5Audio&&!me.setupOptions.preferFlash||me._wD(S.mobileUA),me.setupOptions.useHTML5Audio=!0,me.setupOptions.preferFlash=!1,Ge?me.ignoreFlash=!0:(Qe&&!be.match(/android\s2\.3/i)||!Qe)&&(me._wD(S.globalHTML5),He=!0))),e&&(t&&M&&e.url!==i&&me.beginDelayedInit(),M||e.url===i||"complete"!==_e.readyState||setTimeout(P,1)),pe=!0,me},this.ok=function(){return Ve?Ee&&!Me:me.useHTML5Audio&&me.hasHTML5},this.supported=this.ok,this.getMovie=function(e){return o(e)||_e[e]||r[e]},this.createSound=function(e,t){var o,r,a,s=null;if(r=(o=ve+".createSound(): ")+j(Ee?"notOK":"notReady"),!Ee||!me.ok())return G(r),!1;if(t!==i&&(e={id:e,url:t}),(a=h(e)).url=J(a.url),a.id===i&&(a.id=me.setupOptions.idPrefix+Ue++),a.id.toString().charAt(0).match(/^[0-9]$/)&&me._wD(o+j("badID",a.id),2),me._wD(o+a.id+(a.url?" ("+a.url+")":""),1),Q(a.id,!0))return me._wD(o+a.id+" exists",1),me.sounds[a.id];function u(){return a=U(a),me.sounds[a.id]=new n(a),me.soundIDs.push(a.id),me.sounds[a.id]}if(X(a))s=u(),me.html5Only||me._wD(a.id+": Using HTML5"),s._setup_html5(a);else{if(me.html5Only)return me._wD(a.id+": No HTML5 support for this sound, and no Flash. Exiting."),u();if(me.html5.usingFlash&&a.url&&a.url.match(/data:/i))return me._wD(a.id+": data: URIs not supported via Flash. Exiting."),u();l>8&&(null===a.isMovieStar&&(a.isMovieStar=!!(a.serverURL||a.type&&a.type.match(at)||a.url&&a.url.match(ut))),a.isMovieStar&&(me._wD(o+"using MovieStar handling"),a.loops>1&&f("noNSLoop"))),a=N(a,o),s=u(),8===l?ye._createSound(a.id,a.loops||1,a.usePolicyFile):(ye._createSound(a.id,a.url,a.usePeakData,a.useWaveformData,a.useEQData,a.isMovieStar,!!a.isMovieStar&&a.bufferTime,a.loops||1,a.serverURL,a.duration||null,a.autoPlay,!0,a.autoLoad,a.usePolicyFile),a.serverURL||(s.connected=!0,a.onconnect&&a.onconnect.apply(s))),a.serverURL||!a.autoLoad&&!a.autoPlay||s.load(a)}return!a.serverURL&&a.autoPlay&&s.play(),s},this.destroySound=function(e,t){if(!Q(e))return!1;var n,o=me.sounds[e];for(o.stop(),o._iO={},o.unload(),n=0;n<me.soundIDs.length;n++)if(me.soundIDs[n]===e){me.soundIDs.splice(n,1);break}return t||o.destruct(!0),o=null,delete me.sounds[e],!0},this.load=function(e,t){return!!Q(e)&&me.sounds[e].load(t)},this.unload=function(e){return!!Q(e)&&me.sounds[e].unload()},this.onPosition=function(e,t,n,o){return!!Q(e)&&me.sounds[e].onposition(t,n,o)},this.onposition=this.onPosition,this.clearOnPosition=function(e,t,n){return!!Q(e)&&me.sounds[e].clearOnPosition(t,n)},this.play=function(e,t){var n=null,o=t&&!(t instanceof Object);if(!Ee||!me.ok())return G(ve+".play(): "+j(Ee?"notOK":"notReady")),!1;if(Q(e,o))o&&(t={url:t});else{if(!o)return!1;o&&(t={url:t}),t&&t.url&&(me._wD(ve+'.play(): Attempting to create "'+e+'"',1),t.id=e,n=me.createSound(t).play())}return null===n&&(n=me.sounds[e].play(t)),n},this.start=this.play,this.setPlaybackRate=function(e,t,n){return!!Q(e)&&me.sounds[e].setPlaybackRate(t,n)},this.setPosition=function(e,t){return!!Q(e)&&me.sounds[e].setPosition(t)},this.stop=function(e){return!!Q(e)&&(me._wD(ve+".stop("+e+")",1),me.sounds[e].stop())},this.stopAll=function(){var e;for(e in me._wD(ve+".stopAll()",1),me.sounds)me.sounds.hasOwnProperty(e)&&me.sounds[e].stop()},this.pause=function(e){return!!Q(e)&&me.sounds[e].pause()},this.pauseAll=function(){var e;for(e=me.soundIDs.length-1;e>=0;e--)me.sounds[me.soundIDs[e]].pause()},this.resume=function(e){return!!Q(e)&&me.sounds[e].resume()},this.resumeAll=function(){var e;for(e=me.soundIDs.length-1;e>=0;e--)me.sounds[me.soundIDs[e]].resume()},this.togglePause=function(e){return!!Q(e)&&me.sounds[e].togglePause()},this.setPan=function(e,t){return!!Q(e)&&me.sounds[e].setPan(t)},this.setVolume=function(e,t){var n,o;if(e!==i&&!isNaN(e)&&t===i){for(n=0,o=me.soundIDs.length;n<o;n++)me.sounds[me.soundIDs[n]].setVolume(e);return!1}return!!Q(e)&&me.sounds[e].setVolume(t)},this.mute=function(e){var t=0;if(e instanceof String&&(e=null),e)return!!Q(e)&&(me._wD(ve+'.mute(): Muting "'+e+'"'),me.sounds[e].mute());for(me._wD(ve+".mute(): Muting all sounds"),t=me.soundIDs.length-1;t>=0;t--)me.sounds[me.soundIDs[t]].mute();return me.muted=!0,!0},this.muteAll=function(){me.mute()},this.unmute=function(e){var t;if(e instanceof String&&(e=null),e)return!!Q(e)&&(me._wD(ve+'.unmute(): Unmuting "'+e+'"'),me.sounds[e].unmute());for(me._wD(ve+".unmute(): Unmuting all sounds"),t=me.soundIDs.length-1;t>=0;t--)me.sounds[me.soundIDs[t]].unmute();return me.muted=!1,!0},this.unmuteAll=function(){me.unmute()},this.toggleMute=function(e){return!!Q(e)&&me.sounds[e].toggleMute()},this.getMemoryUse=function(){var e=0;return ye&&8!==l&&(e=parseInt(ye._getMemoryUse(),10)),e},this.disable=function(e){var t;if(e===i&&(e=!1),Me)return!1;for(Me=!0,f("shutdown",1),t=me.soundIDs.length-1;t>=0;t--)q(me.sounds[me.soundIDs[t]]);return q(me),d(e),ie.remove(r,"load",v),!0},this.canPlayMIME=function(e){var t;return me.hasHTML5&&(t=$({type:e})),!t&&Ve&&(t=e&&me.ok()?!!(l>8&&e.match(at)||e.match(me.mimePattern)):null),t},this.canPlayURL=function(e){var t;return me.hasHTML5&&(t=$({url:e})),!t&&Ve&&(t=e&&me.ok()?!!e.match(me.filePattern):null),t},this.canPlayLink=function(e){return!(e.type===i||!e.type||!me.canPlayMIME(e.type))||me.canPlayURL(e.href)},this.getSoundById=function(e,t){if(!e)return null;var n=me.sounds[e];return n||t||me._wD(ve+'.getSoundById(): Sound "'+e+'" not found.',2),n},this.onready=function(e,t){var n="onready";if("function"!=typeof e)throw j("needFunction",n);return Ee&&me._wD(j("queue",n)),t||(t=r),g(n,e,t),y(),!0},this.ontimeout=function(e,t){var n="ontimeout";if("function"!=typeof e)throw j("needFunction",n);return Ee&&me._wD(j("queue",n)),t||(t=r),g(n,e,t),y({type:n}),!0},this._writeDebug=function(e,t){var n,r;return!(!me.setupOptions.debugMode||!(Xe&&me.useConsole&&(t&&"object"==typeof t?console.log(e,t):De[t]!==i?console[De[t]](e):console.log(e),me.consoleOnly))&&(!(n=o("soundmanager-debug"))||(r=_e.createElement("div"),++Ie%2==0&&(r.className="sm2-alt"),t=t===i?0:parseInt(t,10),r.appendChild(_e.createTextNode(e)),t&&(t>=2&&(r.style.fontWeight="bold"),3===t&&(r.style.color="#ff3333")),n.insertBefore(r,n.firstChild),n=null,0)))},-1!==we.indexOf("sm2-debug=alert")&&(this._writeDebug=function(e){r.alert(e)}),this._wD=this._writeDebug,this._debug=function(){var e,t;for(f("currentObj",1),e=0,t=me.soundIDs.length;e<t;e++)me.sounds[me.soundIDs[e]]._debug()},this.reboot=function(e,t){var n,o,i;for(me.soundIDs.length&&me._wD("Destroying "+me.soundIDs.length+" SMSound object"+(1!==me.soundIDs.length?"s":"")+"..."),n=me.soundIDs.length-1;n>=0;n--)me.sounds[me.soundIDs[n]].destruct();if(ye)try{Ke&&(Ce=ye.innerHTML),Le=ye.parentNode.removeChild(ye)}catch(e){f("badRemove",2)}if(Ce=Le=Ve=ye=null,me.enabled=M=Ee=qe=Fe=Oe=Pe=Me=He=me.swfLoaded=!1,me.soundIDs=[],me.sounds={},Ue=0,pe=!1,e)ke=[];else for(n in ke)if(ke.hasOwnProperty(n))for(o=0,i=ke[n].length;o<i;o++)ke[n][o].fired=!1;return t||me._wD(ve+": Rebooting..."),me.html5={usingFlash:null},me.flash={},me.html5Only=!1,me.ignoreFlash=!1,r.setTimeout(function(){t||me.beginDelayedInit()},20),me},this.reset=function(){return f("reset"),me.reboot(!0,!0)},this.getMoviePercent=function(){return ye&&"PercentLoaded"in ye?ye.PercentLoaded():null},this.beginDelayedInit=function(){Te=!0,P(),setTimeout(function(){return!Fe&&(I(),O(),Fe=!0,!0)},20),A()},this.destruct=function(){me._wD(ve+".destruct()"),me.disable(!0)},n=function(e){var t,n,o,r,a,s,u,d,p,m,g=this,y=!1,v=[],A=0,b=null;p={duration:null,time:null},this.id=e.id,this.sID=this.id,this.url=e.url,this.options=h(e),this.instanceOptions=this.options,this._iO=this.instanceOptions,this.pan=this.options.pan,this.volume=this.options.volume,this.isHTML5=!1,this._a=null,m=!this.url,this.id3={},this._debug=function(){me._wD(g.id+": Merged options:",g.options)},this.load=function(e){var t;if(e!==i?g._iO=h(e,g.options):(e=g.options,g._iO=e,b&&b!==g.url&&(f("manURL"),g._iO.url=g.url,g.url=null)),g._iO.url||(g._iO.url=g.url),g._iO.url=J(g._iO.url),g.instanceOptions=g._iO,t=g._iO,me._wD(g.id+": load ("+t.url+")"),!t.url&&!g.url)return me._wD(g.id+": load(): url is unassigned. Exiting.",2),g;if(g.isHTML5||8!==l||g.url||t.autoPlay||me._wD(g.id+": Flash 8 load() limitation: Wait for onload() before calling play().",1),t.url===g.url&&0!==g.readyState&&2!==g.readyState)return f("onURL",1),3===g.readyState&&t.onload&&he(g,function(){t.onload.apply(g,[!!g.duration])}),g;if(g.loaded=!1,g.readyState=1,g.playState=0,g.id3={},X(t))g._setup_html5(t)._called_load?me._wD(g.id+": Ignoring request to load again"):(g._html5_canplay=!1,g.url!==t.url&&(me._wD(f("manURL")+": "+t.url),g._a.src=t.url,g.setPosition(0)),g._a.autobuffer="auto",g._a.preload="auto",g._a._called_load=!0);else{if(me.html5Only)return me._wD(g.id+": No flash support. Exiting."),g;if(g._iO.url&&g._iO.url.match(/data:/i))return me._wD(g.id+": data: URIs not supported via Flash. Exiting."),g;try{g.isHTML5=!1,g._iO=N(U(t)),g._iO.autoPlay&&(g._iO.position||g._iO.from)&&(me._wD(g.id+": Disabling autoPlay because of non-zero offset case"),g._iO.autoPlay=!1),t=g._iO,8===l?ye._load(g.id,t.url,t.stream,t.autoPlay,t.usePolicyFile):ye._load(g.id,t.url,!!t.stream,!!t.autoPlay,t.loops||1,!!t.autoLoad,t.usePolicyFile)}catch(e){f("smError",2),c("onload",!1),D({type:"SMSOUND_LOAD_JS_EXCEPTION",fatal:!0})}}return g.url=t.url,g},this.unload=function(){return 0!==g.readyState&&(me._wD(g.id+": unload()"),g.isHTML5?(r(),g._a&&(g._a.pause(),b=ne(g._a))):8===l?ye._unload(g.id,ot):ye._unload(g.id),t()),g},this.destruct=function(e){me._wD(g.id+": Destruct"),g.isHTML5?(r(),g._a&&(g._a.pause(),ne(g._a),He||o(),g._a._s=null,g._a=null)):(g._iO.onfailure=null,ye._destroySound(g.id)),e||me.destroySound(g.id,!0)},this.play=function(e,t){var n,o,r,u,c,f,p=!0;if(n=g.id+": play(): ",t=t===i||t,e||(e={}),g.url&&(g._iO.url=g.url),g._iO=h(g._iO,g.options),g._iO=h(e,g._iO),g._iO.url=J(g._iO.url),g.instanceOptions=g._iO,!g.isHTML5&&g._iO.serverURL&&!g.connected)return g.getAutoPlay()||(me._wD(n+" Netstream not connected yet - setting autoPlay"),g.setAutoPlay(!0)),g;if(X(g._iO)&&(g._setup_html5(g._iO),a()),1===g.playState&&!g.paused){if(!g._iO.multiShot)return me._wD(n+"Already playing (one-shot)",1),g.isHTML5&&g.setPosition(g._iO.position),g;me._wD(n+"Already playing (multi-shot)",1)}if(e.url&&e.url!==g.url&&(g.readyState||g.isHTML5||8!==l||!m?g.load(g._iO):m=!1),g.loaded)me._wD(n.substr(0,n.lastIndexOf(":")));else if(0===g.readyState){if(me._wD(n+"Attempting to load"),g.isHTML5||me.html5Only){if(!g.isHTML5)return me._wD(n+"Unsupported type. Exiting."),g;g.load(g._iO)}else g._iO.autoPlay=!0,g.load(g._iO);g.instanceOptions=g._iO}else{if(2===g.readyState)return me._wD(n+"Could not load - exiting",2),g;me._wD(n+"Loading - attempting to play...")}return!g.isHTML5&&9===l&&g.position>0&&g.position===g.duration&&(me._wD(n+"Sound at end, resetting to position: 0"),e.position=0),g.paused&&g.position>=0&&(!g._iO.serverURL||g.position>0)?(me._wD(n+"Resuming from paused state",1),g.resume()):(g._iO=h(e,g._iO),(!g.isHTML5&&null!==g._iO.position&&g._iO.position>0||null!==g._iO.from&&g._iO.from>0||null!==g._iO.to)&&0===g.instanceCount&&0===g.playState&&!g._iO.serverURL&&(r=function(){g._iO=h(e,g._iO),g.play(g._iO)},g.isHTML5&&!g._html5_canplay?(me._wD(n+"Beginning load for non-zero offset case"),g.load({_oncanplay:r})):g.isHTML5||g.loaded||g.readyState&&2===g.readyState||(me._wD(n+"Preloading for non-zero offset case"),g.load({onload:r})),g._iO=d()),(!g.instanceCount||g._iO.multiShotEvents||g.isHTML5&&g._iO.multiShot&&!He||!g.isHTML5&&l>8&&!g.getAutoPlay())&&g.instanceCount++,g._iO.onposition&&0===g.playState&&s(g),g.playState=1,g.paused=!1,g.position=g._iO.position===i||isNaN(g._iO.position)?0:g._iO.position,g.isHTML5||(g._iO=N(U(g._iO))),g._iO.onplay&&t&&(g._iO.onplay.apply(g),y=!0),g.setVolume(g._iO.volume,!0),g.setPan(g._iO.pan,!0),1!==g._iO.playbackRate&&g.setPlaybackRate(g._iO.playbackRate),g.isHTML5?g.instanceCount<2?(a(),o=g._setup_html5(),g.setPosition(g._iO.position),o.play()):(me._wD(g.id+": Cloning Audio() for instance #"+g.instanceCount+"..."),u=new Audio(g._iO.url),c=function(){ie.remove(u,"ended",c),g._onfinish(g),ne(u),u=null},f=function(){ie.remove(u,"canplay",f);try{u.currentTime=g._iO.position/Ne}catch(e){G(g.id+": multiShot play() failed to apply position of "+g._iO.position/Ne)}u.play()},ie.add(u,"ended",c),g._iO.volume!==i&&(u.volume=Math.max(0,Math.min(1,g._iO.volume/100))),g.muted&&(u.muted=!0),g._iO.position?ie.add(u,"canplay",f):u.play()):(p=ye._start(g.id,g._iO.loops||1,9===l?g.position:g.position/Ne,g._iO.multiShot||!1),9!==l||p||(me._wD(n+"No sound hardware, or 32-sound ceiling hit",2),g._iO.onplayerror&&g._iO.onplayerror.apply(g)))),g},this.start=this.play,this.stop=function(e){var t,n=g._iO;return 1===g.playState&&(me._wD(g.id+": stop()"),g._onbufferchange(0),g._resetOnPosition(0),g.paused=!1,g.isHTML5||(g.playState=0),u(),n.to&&g.clearOnPosition(n.to),g.isHTML5?g._a&&(t=g.position,g.setPosition(0),g.position=t,g._a.pause(),g.playState=0,g._onTimer(),r()):(ye._stop(g.id,e),n.serverURL&&g.unload()),g.instanceCount=0,g._iO={},n.onstop&&n.onstop.apply(g)),g},this.setAutoPlay=function(e){me._wD(g.id+": Autoplay turned "+(e?"on":"off")),g._iO.autoPlay=e,g.isHTML5||(ye._setAutoPlay(g.id,e),e&&(g.instanceCount||1!==g.readyState||(g.instanceCount++,me._wD(g.id+": Incremented instance count to "+g.instanceCount))))},this.getAutoPlay=function(){return g._iO.autoPlay},this.setPlaybackRate=function(e){var t=Math.max(.5,Math.min(4,e));if(t!==e&&me._wD(g.id+": setPlaybackRate("+e+"): limiting rate to "+t,2),g.isHTML5)try{g._iO.playbackRate=t,g._a.playbackRate=t}catch(e){me._wD(g.id+": setPlaybackRate("+t+") failed: "+e.message,2)}return g},this.setPosition=function(e){e===i&&(e=0);var t,n,o=g.isHTML5?Math.max(e,0):Math.min(g.duration||g._iO.duration,Math.max(e,0));if(g.position=o,n=g.position/Ne,g._resetOnPosition(g.position),g._iO.position=o,g.isHTML5){if(g._a){if(g._html5_canplay){if(g._a.currentTime.toFixed(3)!==n.toFixed(3)){me._wD(g.id+": setPosition("+n+")");try{g._a.currentTime=n,(0===g.playState||g.paused)&&g._a.pause()}catch(e){me._wD(g.id+": setPosition("+n+") failed: "+e.message,2)}}}else if(n)return me._wD(g.id+": setPosition("+n+"): Cannot seek yet, sound not ready",2),g;g.paused&&g._onTimer(!0)}}else t=9===l?g.position:n,g.readyState&&2!==g.readyState&&ye._setPosition(g.id,t,g.paused||!g.playState,g._iO.multiShot);return g},this.pause=function(e){return g.paused||0===g.playState&&1!==g.readyState||(me._wD(g.id+": pause()"),g.paused=!0,g.isHTML5?(g._setup_html5().pause(),r()):(e||e===i)&&ye._pause(g.id,g._iO.multiShot),g._iO.onpause&&g._iO.onpause.apply(g)),g},this.resume=function(){var e=g._iO;return g.paused?(me._wD(g.id+": resume()"),g.paused=!1,g.playState=1,g.isHTML5?(g._setup_html5().play(),a()):(e.isMovieStar&&!e.serverURL&&g.setPosition(g.position),ye._pause(g.id,e.multiShot)),!y&&e.onplay?(e.onplay.apply(g),y=!0):e.onresume&&e.onresume.apply(g),g):g},this.togglePause=function(){return me._wD(g.id+": togglePause()"),0===g.playState?(g.play({position:9!==l||g.isHTML5?g.position/Ne:g.position}),g):(g.paused?g.resume():g.pause(),g)},this.setPan=function(e,t){return e===i&&(e=0),t===i&&(t=!1),g.isHTML5||ye._setPan(g.id,e),g._iO.pan=e,t||(g.pan=e,g.options.pan=e),g},this.setVolume=function(e,t){return e===i&&(e=100),t===i&&(t=!1),g.isHTML5?g._a&&(me.muted&&!g.muted&&(g.muted=!0,g._a.muted=!0),g._a.volume=Math.max(0,Math.min(1,e/100))):ye._setVolume(g.id,me.muted&&!g.muted||g.muted?0:e),g._iO.volume=e,t||(g.volume=e,g.options.volume=e),g},this.mute=function(){return g.muted=!0,g.isHTML5?g._a&&(g._a.muted=!0):ye._setVolume(g.id,0),g},this.unmute=function(){g.muted=!1;var e=g._iO.volume!==i;return g.isHTML5?g._a&&(g._a.muted=!1):ye._setVolume(g.id,e?g._iO.volume:g.options.volume),g},this.toggleMute=function(){return g.muted?g.unmute():g.mute()},this.onPosition=function(e,t,n){return v.push({position:parseInt(e,10),method:t,scope:n!==i?n:g,fired:!1}),g},this.onposition=this.onPosition,this.clearOnPosition=function(e,t){var n;if(e=parseInt(e,10),!isNaN(e))for(n=0;n<v.length;n++)e===v[n].position&&(t&&t!==v[n].method||(v[n].fired&&A--,v.splice(n,1)))},this._processOnPosition=function(){var e,t,n=v.length;if(!n||!g.playState||A>=n)return!1;for(e=n-1;e>=0;e--)!(t=v[e]).fired&&g.position>=t.position&&(t.fired=!0,A++,t.method.apply(t.scope,[t.position]),n=v.length);return!0},this._resetOnPosition=function(e){var t,n,o=v.length;if(!o)return!1;for(t=o-1;t>=0;t--)(n=v[t]).fired&&e<=n.position&&(n.fired=!1,A--);return!0},d=function(){var e,t,n=g._iO,o=n.from,r=n.to;return t=function(){me._wD(g.id+': "To" time of '+r+" reached."),g.clearOnPosition(r,t),g.stop()},e=function(){me._wD(g.id+': Playing "from" '+o),null===r||isNaN(r)||g.onPosition(r,t)},null===o||isNaN(o)||(n.position=o,n.multiShot=!1,e()),n},s=function(){var e,t=g._iO.onposition;if(t)for(e in t)t.hasOwnProperty(e)&&g.onPosition(parseInt(e,10),t[e])},u=function(){var e,t=g._iO.onposition;if(t)for(e in t)t.hasOwnProperty(e)&&g.clearOnPosition(parseInt(e,10))},a=function(){g.isHTML5&&K(g)},r=function(){g.isHTML5&&W(g)},(t=function(e){e||(v=[],A=0),y=!1,g._hasTimer=null,g._a=null,g._html5_canplay=!1,g.bytesLoaded=null,g.bytesTotal=null,g.duration=g._iO&&g._iO.duration?g._iO.duration:null,g.durationEstimate=null,g.buffered=[],g.eqData=[],g.eqData.left=[],g.eqData.right=[],g.failures=0,g.isBuffering=!1,g.instanceOptions={},g.instanceCount=0,g.loaded=!1,g.metadata={},g.readyState=0,g.muted=!1,g.paused=!1,g.peakData={left:0,right:0},g.waveformData={left:[],right:[]},g.playState=0,g.position=null,g.id3={}})(),this._onTimer=function(e){var t,n,o=!1,r={};return(g._hasTimer||e)&&g._a&&(e||(g.playState>0||1===g.readyState)&&!g.paused)&&((t=g._get_html5_duration())!==p.duration&&(p.duration=t,g.duration=t,o=!0),g.durationEstimate=g.duration,(n=g._a.currentTime*Ne||0)!==p.time&&(p.time=n,o=!0),(o||e)&&g._whileplaying(n,r,r,r,r)),o},this._get_html5_duration=function(){var e=g._iO,t=g._a&&g._a.duration?g._a.duration*Ne:e&&e.duration?e.duration:null;return t&&!isNaN(t)&&t!==1/0?t:null},this._apply_loop=function(e,t){!e.loop&&t>1&&me._wD("Note: Native HTML5 looping is infinite.",1),e.loop=t>1?"loop":""},this._setup_html5=function(e){var o,r=h(g._iO,e),i=He?ge:g._a,a=decodeURI(r.url);if(He?a===decodeURI(ae)&&(o=!0):a===decodeURI(b)&&(o=!0),i){if(i._s)if(He)i._s&&i._s.playState&&!o&&i._s.stop();else if(!He&&a===decodeURI(b))return g._apply_loop(i,r.loops),i;o||(b&&t(!1),i.src=r.url,g.url=r.url,b=r.url,ae=r.url,i._called_load=!1)}else r.autoLoad||r.autoPlay?(g._a=new Audio(r.url),g._a.load()):g._a=Je&&opera.version()<10?new Audio(null):new Audio,(i=g._a)._called_load=!1,He&&(ge=i);return g.isHTML5=!0,g._a=i,i._s=g,n(),g._apply_loop(i,r.loops),r.autoLoad||r.autoPlay?g.load():(i.autobuffer=!1,i.preload="auto"),i},n=function(){if(g._a._added_events)return!1;var e;function t(e,t,n){return g._a?g._a.addEventListener(e,t,n||!1):null}for(e in g._a._added_events=!0,ce)ce.hasOwnProperty(e)&&t(e,ce[e]);return!0},o=function(){var e;function t(e,t,n){return g._a?g._a.removeEventListener(e,t,n||!1):null}for(e in me._wD(g.id+": Removing event listeners"),g._a._added_events=!1,ce)ce.hasOwnProperty(e)&&t(e,ce[e])},this._onload=function(e){var t,n=!!e||!g.isHTML5&&8===l&&g.duration;return t=g.id+": ",me._wD(t+(n?"onload()":"Failed to load / invalid sound?"+(g.duration?" -":" Zero-length duration reported.")+" ("+g.url+")"),n?1:2),n||g.isHTML5||(!0===me.sandbox.noRemote&&me._wD(t+j("noNet"),1),!0===me.sandbox.noLocal&&me._wD(t+j("noLocal"),1)),g.loaded=n,g.readyState=n?3:2,g._onbufferchange(0),n||g.isHTML5||g._onerror(),g._iO.onload&&he(g,function(){g._iO.onload.apply(g,[n])}),!0},this._onerror=function(e,t){g._iO.onerror&&he(g,function(){g._iO.onerror.apply(g,[e,t])})},this._onbufferchange=function(e){return!(0===g.playState||e&&g.isBuffering||!e&&!g.isBuffering||(g.isBuffering=1===e,g._iO.onbufferchange&&(me._wD(g.id+": Buffer state change: "+e),g._iO.onbufferchange.apply(g,[e])),0))},this._onsuspend=function(){return g._iO.onsuspend&&(me._wD(g.id+": Playback suspended"),g._iO.onsuspend.apply(g)),!0},this._onfailure=function(e,t,n){g.failures++,me._wD(g.id+": Failure ("+g.failures+"): "+e),g._iO.onfailure&&1===g.failures?g._iO.onfailure(e,t,n):me._wD(g.id+": Ignoring failure")},this._onwarning=function(e,t,n){g._iO.onwarning&&g._iO.onwarning(e,t,n)},this._onfinish=function(){var e=g._iO.onfinish;g._onbufferchange(0),g._resetOnPosition(0),g.instanceCount&&(g.instanceCount--,g.instanceCount||(u(),g.playState=0,g.paused=!1,g.instanceCount=0,g.instanceOptions={},g._iO={},r(),g.isHTML5&&(g.position=0)),g.instanceCount&&!g._iO.multiShotEvents||e&&(me._wD(g.id+": onfinish()"),he(g,function(){e.apply(g)})))},this._whileloading=function(e,t,n,o){var r=g._iO;g.bytesLoaded=e,g.bytesTotal=t,g.duration=Math.floor(n),g.bufferLength=o,g.isHTML5||r.isMovieStar?g.durationEstimate=g.duration:r.duration?g.durationEstimate=g.duration>r.duration?g.duration:r.duration:g.durationEstimate=parseInt(g.bytesTotal/g.bytesLoaded*g.duration,10),g.isHTML5||(g.buffered=[{start:0,end:g.duration}]),(3!==g.readyState||g.isHTML5)&&r.whileloading&&r.whileloading.apply(g)},this._whileplaying=function(e,t,n,o,r){var a,s=g._iO;return!isNaN(e)&&null!==e&&(g.position=Math.max(0,e),g._processOnPosition(),!g.isHTML5&&l>8&&(s.usePeakData&&t!==i&&t&&(g.peakData={left:t.leftPeak,right:t.rightPeak}),s.useWaveformData&&n!==i&&n&&(g.waveformData={left:n.split(","),right:o.split(",")}),s.useEQData&&r!==i&&r&&r.leftEQ&&(a=r.leftEQ.split(","),g.eqData=a,g.eqData.left=a,r.rightEQ!==i&&r.rightEQ&&(g.eqData.right=r.rightEQ.split(",")))),1===g.playState&&(g.isHTML5||8!==l||g.position||!g.isBuffering||g._onbufferchange(0),s.whileplaying&&s.whileplaying.apply(g)),!0)},this._oncaptiondata=function(e){me._wD(g.id+": Caption data received."),g.captiondata=e,g._iO.oncaptiondata&&g._iO.oncaptiondata.apply(g,[e])},this._onmetadata=function(e,t){me._wD(g.id+": Metadata received.");var n,o,r={};for(n=0,o=e.length;n<o;n++)r[e[n]]=t[n];g.metadata=r,g._iO.onmetadata&&g._iO.onmetadata.call(g,g.metadata)},this._onid3=function(e,t){me._wD(g.id+": ID3 data received.");var n,o,r=[];for(n=0,o=e.length;n<o;n++)r[e[n]]=t[n];g.id3=h(g.id3,r),g._iO.onid3&&g._iO.onid3.apply(g)},this._onconnect=function(e){e=1===e,me._wD(g.id+": "+(e?"Connected.":"Failed to connect? - "+g.url),e?1:2),g.connected=e,e&&(g.failures=0,Q(g.id)&&(g.getAutoPlay()?g.play(i,g.getAutoPlay()):g._iO.autoLoad&&g.load()),g._iO.onconnect&&g._iO.onconnect.apply(g,[e]))},this._ondataerror=function(e){g.playState>0&&(me._wD(g.id+": Data error: "+e),g._iO.ondataerror&&g._iO.ondataerror.apply(g))},this._debug()},T=function(){return _e.body||_e.getElementsByTagName("div")[0]},o=function(e){return _e.getElementById(e)},h=function(e,t){var n,o,r=e||{};for(o in n=t===i?me.defaultOptions:t)n.hasOwnProperty(o)&&r[o]===i&&("object"!=typeof n[o]||null===n[o]?r[o]=n[o]:r[o]=h(r[o],n[o]));return r},he=function(e,t){e.isHTML5||8!==l?t():r.setTimeout(t,0)},m={onready:1,ontimeout:1,defaultOptions:1,flash9Options:1,movieStarOptions:1},p=function(e,t){var n,o=!0,r=t!==i,a=me.setupOptions,s=m;if(e===i){for(n in o=[],a)a.hasOwnProperty(n)&&o.push(n);for(n in s)s.hasOwnProperty(n)&&("object"==typeof me[n]?o.push(n+": {...}"):me[n]instanceof Function?o.push(n+": function() {...}"):o.push(n));return me._wD(j("setup",o.join(", "))),!1}for(n in e)if(e.hasOwnProperty(n))if("object"!=typeof e[n]||null===e[n]||e[n]instanceof Array||e[n]instanceof RegExp)r&&s[t]!==i?me[t][n]=e[n]:a[n]!==i?(me.setupOptions[n]=e[n],me[n]=e[n]):s[n]===i?(G(j(me[n]===i?"setupUndef":"setupError",n),2),o=!1):me[n]instanceof Function?me[n].apply(me,e[n]instanceof Array?e[n]:[e[n]]):me[n]=e[n];else{if(s[n]!==i)return p(e[n],n);G(j(me[n]===i?"setupUndef":"setupError",n),2),o=!1}return o},ie=function(){var e=r.attachEvent,t={add:e?"attachEvent":"addEventListener",remove:e?"detachEvent":"removeEventListener"};function n(t){var n=Be.call(t),o=n.length;return e?(n[1]="on"+n[1],o>3&&n.pop()):3===o&&n.push(!1),n}function o(n,o){var r=n.shift(),i=[t[o]];e?r[i](n[0],n[1]):r[i].apply(r,n)}return{add:function(){o(n(arguments),"add")},remove:function(){o(n(arguments),"remove")}}}(),ce={abort:ct(function(){me._wD(this._s.id+": abort")}),canplay:ct(function(){var e,t=this._s;if(!t._html5_canplay){if(t._html5_canplay=!0,me._wD(t.id+": canplay"),t._onbufferchange(0),e=t._iO.position===i||isNaN(t._iO.position)?null:t._iO.position/Ne,this.currentTime!==e){me._wD(t.id+": canplay: Setting position to "+e);try{this.currentTime=e}catch(n){me._wD(t.id+": canplay: Setting position of "+e+" failed: "+n.message,2)}}t._iO._oncanplay&&t._iO._oncanplay()}}),canplaythrough:ct(function(){var e=this._s;e.loaded||(e._onbufferchange(0),e._whileloading(e.bytesLoaded,e.bytesTotal,e._get_html5_duration()),e._onload(!0))}),durationchange:ct(function(){var e,t=this._s;e=t._get_html5_duration(),isNaN(e)||e===t.duration||(me._wD(this._s.id+": durationchange ("+e+")"+(t.duration?", previously "+t.duration:"")),t.durationEstimate=t.duration=e)}),ended:ct(function(){var e=this._s;me._wD(e.id+": ended"),e._onfinish()}),error:ct(function(){var e=ee[this.error.code]||null;me._wD(this._s.id+": HTML5 error, code "+this.error.code+(e?" ("+e+")":"")),this._s._onload(!1),this._s._onerror(this.error.code,e)}),loadeddata:ct(function(){var e=this._s;me._wD(e.id+": loadeddata"),e._loaded||ze||(e.duration=e._get_html5_duration())}),loadedmetadata:ct(function(){me._wD(this._s.id+": loadedmetadata")}),loadstart:ct(function(){me._wD(this._s.id+": loadstart"),this._s._onbufferchange(1)}),play:ct(function(){this._s._onbufferchange(0)}),playing:ct(function(){me._wD(this._s.id+": playing "+String.fromCharCode(9835)),this._s._onbufferchange(0)}),progress:ct(function(e){var t,n,o,r=this._s,i=0,a="progress"===e.type,s=e.target.buffered,u=e.loaded||0,l=e.total||1;if(r.buffered=[],s&&s.length){for(t=0,n=s.length;t<n;t++)r.buffered.push({start:s.start(t)*Ne,end:s.end(t)*Ne});if(i=(s.end(0)-s.start(0))*Ne,u=Math.min(1,i/(e.target.duration*Ne)),a&&s.length>1){for(o=[],n=s.length,t=0;t<n;t++)o.push(e.target.buffered.start(t)*Ne+"-"+e.target.buffered.end(t)*Ne);me._wD(this._s.id+": progress, timeRanges: "+o.join(", "))}a&&!isNaN(u)&&me._wD(this._s.id+": progress, "+Math.floor(100*u)+"% loaded")}isNaN(u)||(r._whileloading(u,l,r._get_html5_duration()),u&&l&&u===l&&ce.canplaythrough.call(this,e))}),ratechange:ct(function(){me._wD(this._s.id+": ratechange")}),suspend:ct(function(e){var t=this._s;me._wD(this._s.id+": suspend"),ce.progress.call(this,e),t._onsuspend()}),stalled:ct(function(){me._wD(this._s.id+": stalled")}),timeupdate:ct(function(){this._s._onTimer()}),waiting:ct(function(){var e=this._s;me._wD(this._s.id+": waiting"),e._onbufferchange(1)})},X=function(e){return!(!e||!(e.type||e.url||e.serverURL))&&!(e.serverURL||e.type&&lt(e.type))&&(e.type?$({type:e.type}):$({url:e.url})||me.html5Only||e.url.match(/data:/i))},ne=function(e){var t;return e&&(t=ze?ot:me.html5.canPlayType("audio/wav")?"data:audio/wave;base64,/UklGRiYAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQIAAAD//w==":ot,e.src=t,e._called_unload!==i&&(e._called_load=!1)),He&&(ae=null),t},$=function(e){if(!me.useHTML5Audio||!me.hasHTML5)return!1;var t,n,o,r,a=e.url||null,s=e.type||null,u=me.audioFormats;if(s&&me.html5[s]!==i)return me.html5[s]&&!lt(s);if(!te){for(r in te=[],u)u.hasOwnProperty(r)&&(te.push(r),u[r].related&&(te=te.concat(u[r].related)));te=new RegExp("\\.("+te.join("|")+")(\\?.*)?$","i")}return(o=a?a.toLowerCase().match(te):null)&&o.length?o=o[1]:s?o=(-1!==(n=s.indexOf(";"))?s.substr(0,n):s).substr(6):t=!1,o&&me.html5[o]!==i?t=me.html5[o]&&!lt(o):(s="audio/"+o,t=me.html5.canPlayType({type:s}),me.html5[o]=t,t=t&&me.html5[s]&&!lt(s)),t},re=function(){if(!me.useHTML5Audio||!me.hasHTML5)return me.html5.usingFlash=!0,Ve=!0,!1;var e,t,n,o,r=Audio!==i?Je&&opera.version()<10?new Audio(null):new Audio:null,a={};function s(e){var t,n,i=!1,a=!1;if(!r||"function"!=typeof r.canPlayType)return i;if(e instanceof Array){for(o=0,n=e.length;o<n;o++)(me.html5[e[o]]||r.canPlayType(e[o]).match(me.html5Test))&&(a=!0,me.html5[e[o]]=!0,me.flash[e[o]]=!!e[o].match(nt));i=a}else i=!(!(t=!(!r||"function"!=typeof r.canPlayType)&&r.canPlayType(e))||!t.match(me.html5Test));return i}for(e in n=me.audioFormats)if(n.hasOwnProperty(e)&&(t="audio/"+e,a[e]=s(n[e].type),a[t]=a[e],e.match(nt)?(me.flash[e]=!0,me.flash[t]=!0):(me.flash[e]=!1,me.flash[t]=!1),n[e]&&n[e].related))for(o=n[e].related.length-1;o>=0;o--)a["audio/"+n[e].related[o]]=a[e],me.html5[n[e].related[o]]=a[e],me.flash[n[e].related[o]]=a[e];return a.canPlayType=r?s:null,me.html5=h(me.html5,a),me.html5.usingFlash=Y(),Ve=me.html5.usingFlash,!0},S={notReady:"Unavailable - wait until onready() has fired.",notOK:"Audio support is not available.",domError:ve+"exception caught while appending SWF to DOM.",spcWmode:"Removing wmode, preventing known SWF loading issue(s)",swf404:Ae+"Verify that %s is a valid path.",tryDebug:"Try "+ve+".debugFlash = true for more security details (output goes to SWF.)",checkSWF:"See SWF output for more debug info.",localFail:Ae+"Non-HTTP page ("+_e.location.protocol+" URL?) Review Flash player security settings for this special case:\nhttp://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html\nMay need to add/allow path, eg. c:/sm2/ or /users/me/sm2/",waitFocus:Ae+"Special case: Waiting for SWF to load with window focus...",waitForever:Ae+"Waiting indefinitely for Flash (will recover if unblocked)...",waitSWF:Ae+"Waiting for 100% SWF load...",needFunction:Ae+"Function object expected for %s",badID:'Sound ID "%s" should be a string, starting with a non-numeric character',currentObj:Ae+"_debug(): Current sound objects",waitOnload:Ae+"Waiting for window.onload()",docLoaded:Ae+"Document already loaded",onload:Ae+"initComplete(): calling soundManager.onload()",onloadOK:ve+".onload() complete",didInit:Ae+"init(): Already called?",secNote:"Flash security note: Network/internet URLs will not load due to security restrictions. Access can be configured via Flash Player Global Security Settings Page: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html",badRemove:Ae+"Failed to remove Flash node.",shutdown:ve+".disable(): Shutting down",queue:Ae+"Queueing %s handler",smError:"SMSound.load(): Exception: JS-Flash communication failed, or JS error.",fbTimeout:"No flash response, applying ."+B.swfTimedout+" CSS...",fbLoaded:"Flash loaded",fbHandler:Ae+"flashBlockHandler()",manURL:"SMSound.load(): Using manually-assigned URL",onURL:ve+".load(): current URL already assigned.",badFV:ve+'.flashVersion must be 8 or 9. "%s" is invalid. Reverting to %s.',as2loop:"Note: Setting stream:false so looping can work (flash 8 limitation)",noNSLoop:"Note: Looping not implemented for MovieStar formats",needfl9:"Note: Switching to flash 9, required for MP4 formats.",mfTimeout:"Setting flashLoadTimeout = 0 (infinite) for off-screen, mobile flash case",needFlash:Ae+"Fatal error: Flash is needed to play some required formats, but is not available.",gotFocus:Ae+"Got window focus.",policy:"Enabling usePolicyFile for data access",setup:ve+".setup(): allowed parameters: %s",setupError:ve+'.setup(): "%s" cannot be assigned with this method.',setupUndef:ve+'.setup(): Could not find option "%s"',setupLate:ve+".setup(): url, flashVersion and html5Test property changes will not take effect until reboot().",noURL:Ae+"Flash URL required. Call soundManager.setup({url:...}) to get started.",sm2Loaded:"SoundManager 2: Ready. "+String.fromCharCode(10003),reset:ve+".reset(): Removing event callbacks",mobileUA:"Mobile UA detected, preferring HTML5 by default.",globalHTML5:"Using singleton HTML5 Audio() pattern for this device.",ignoreMobile:"Ignoring mobile restrictions for this device."},j=function(){var e,t,n,o,r;if(o=(e=Be.call(arguments)).shift(),(r=S&&S[o]?S[o]:"")&&e&&e.length)for(t=0,n=e.length;t<n;t++)r=r.replace("%s",e[t]);return r},U=function(e){return 8===l&&e.loops>1&&e.stream&&(f("as2loop"),e.stream=!1),e},N=function(e,t){return e&&!e.usePolicyFile&&(e.onid3||e.usePeakData||e.useWaveformData||e.useEQData)&&(me._wD((t||"")+j("policy")),e.usePolicyFile=!0),e},G=function(e){Xe&&console.warn!==i?console.warn(e):me._wD(e)},a=function(){return!1},q=function(e){var t;for(t in e)e.hasOwnProperty(t)&&"function"==typeof e[t]&&(e[t]=a);t=null},F=function(e){e===i&&(e=!1),(Me||e)&&me.disable(e)},R=function(e){var t;if(e)if(e.match(/\.swf(\?.*)?$/i)){if(e.substr(e.toLowerCase().lastIndexOf(".swf?")+4))return e}else e.lastIndexOf("/")!==e.length-1&&(e+="/");return t=(e&&-1!==e.lastIndexOf("/")?e.substr(0,e.lastIndexOf("/")+1):"./")+me.movieURL,me.noSWFCache&&(t+="?ts="+(new Date).getTime()),t},_=function(){8!==(l=parseInt(me.flashVersion,10))&&9!==l&&(me._wD(j("badFV",l,8)),me.flashVersion=l=8);var e=me.debugMode||me.debugFlash?"_debug.swf":".swf";me.useHTML5Audio&&!me.html5Only&&me.audioFormats.mp4.required&&l<9&&(me._wD(j("needfl9")),me.flashVersion=l=9),me.version=me.versionNumber+(me.html5Only?" (HTML5-only mode)":9===l?" (AS3/Flash 9)":" (AS2/Flash 8)"),l>8?(me.defaultOptions=h(me.defaultOptions,me.flash9Options),me.features.buffering=!0,me.defaultOptions=h(me.defaultOptions,me.movieStarOptions),me.filePatterns.flash9=new RegExp("\\.(mp3|"+st.join("|")+")(\\?.*)?$","i"),me.features.movieStar=!0):me.features.movieStar=!1,me.filePattern=me.filePatterns[8!==l?"flash9":"flash8"],me.movieURL=(8===l?"soundmanager2.swf":"soundmanager2_flash9.swf").replace(".swf",e),me.features.peakData=me.features.waveformData=me.features.eqData=l>8},L=function(e,t){ye&&ye._setPolling(e,t)},C=function(){if(me.debugURLParam.test(we)&&(me.setupOptions.debugMode=me.debugMode=!0),!o(me.debugID)){var e,t,n,r,i;if(me.debugMode&&!o(me.debugID)&&(!Xe||!me.useConsole||!me.consoleOnly)){for(i in(e=_e.createElement("div")).id=me.debugID+"-toggle",r={position:"fixed",bottom:"0px",right:"0px",width:"1.2em",height:"1.2em",lineHeight:"1.2em",margin:"2px",textAlign:"center",border:"1px solid #999",cursor:"pointer",background:"#fff",color:"#333",zIndex:10001},e.appendChild(_e.createTextNode("-")),e.onclick=H,e.title="Toggle SM2 debug console",be.match(/msie 6/i)&&(e.style.position="absolute",e.style.cursor="hand"),r)r.hasOwnProperty(i)&&(e.style[i]=r[i]);if((t=_e.createElement("div")).id=me.debugID,t.style.display=me.debugMode?"block":"none",me.debugMode&&!o(e.id)){try{(n=T()).appendChild(e)}catch(e){throw new Error(j("domError")+" \n"+e.toString())}n.appendChild(t)}}n=null}},Q=this.getSoundById,f=function(e,t){return e?me._wD(j(e),t):""},H=function(){var e=o(me.debugID),t=o(me.debugID+"-toggle");e&&(Se?(t.innerHTML="+",e.style.display="none"):(t.innerHTML="-",e.style.display="block"),Se=!Se)},c=function(e,t,n){if(r.sm2Debugger!==i)try{sm2Debugger.handleEvent(e,t,n)}catch(e){return!1}return!0},V=function(){var e=[];return me.debugMode&&e.push(B.sm2Debug),me.debugFlash&&e.push(B.flashDebug),me.useHighPerformance&&e.push(B.highPerf),e.join(" ")},x=function(){var e=j("fbHandler"),t=me.getMoviePercent(),n=B,o={type:"FLASHBLOCK"};me.html5Only||(me.ok()?(me.didFlashBlock&&me._wD(e+": Unblocked"),me.oMC&&(me.oMC.className=[V(),n.swfDefault,n.swfLoaded+(me.didFlashBlock?" "+n.swfUnblocked:"")].join(" "))):(Ve&&(me.oMC.className=V()+" "+n.swfDefault+" "+(null===t?n.swfTimedout:n.swfError),me._wD(e+": "+j("fbTimeout")+(t?" ("+j("fbLoaded")+")":""))),me.didFlashBlock=!0,y({type:"ontimeout",ignoreInit:!0,error:o}),D(o)))},g=function(e,t,n){ke[e]===i&&(ke[e]=[]),ke[e].push({method:t,scope:n||null,fired:!1})},y=function(e){if(e||(e={type:me.ok()?"onready":"ontimeout"}),!Ee&&e&&!e.ignoreInit)return!1;if("ontimeout"===e.type&&(me.ok()||Me&&!e.ignoreInit))return!1;var t,n,o={success:e&&e.ignoreInit?me.ok():!Me},r=e&&e.type&&ke[e.type]||[],i=[],a=[o],s=Ve&&!me.ok();for(e.error&&(a[0].error=e.error),t=0,n=r.length;t<n;t++)!0!==r[t].fired&&i.push(r[t]);if(i.length)for(t=0,n=i.length;t<n;t++)i[t].scope?i[t].method.apply(i[t].scope,a):i[t].method.apply(this,a),s||(i[t].fired=!0);return!0},v=function(){r.setTimeout(function(){me.useFlashBlock&&x(),y(),"function"==typeof me.onload&&(f("onload",1),me.onload.apply(r),f("onloadOK",1)),me.waitForWindowLoad&&ie.add(r,"load",v)},1)},ue=function(){if(se!==i)return se;var e,t,n,o,a=!1,s=navigator,u=r.ActiveXObject;try{o=s.plugins}catch(e){o=void 0}if(o&&o.length)t="application/x-shockwave-flash",(n=s.mimeTypes)&&n[t]&&n[t].enabledPlugin&&n[t].enabledPlugin.description&&(a=!0);else if(u!==i&&!be.match(/MSAppHost/i)){try{e=new u("ShockwaveFlash.ShockwaveFlash")}catch(t){e=null}a=!!e,e=null}return se=a,a},Y=function(){var e,t,n=me.audioFormats;if(Ge&&be.match(/os (1|2|3_0|3_1)\s/i)?(me.hasHTML5=!1,me.html5Only=!0,me.oMC&&(me.oMC.style.display="none")):me.useHTML5Audio&&(me.html5&&me.html5.canPlayType||(me._wD("SoundManager: No HTML5 Audio() support detected."),me.hasHTML5=!1),Ye&&me._wD(Ae+"Note: Buggy HTML5 Audio in Safari on this OS X release, see https://bugs.webkit.org/show_bug.cgi?id=32159 - "+(se?"will use flash fallback for MP3/MP4, if available":" would use flash fallback for MP3/MP4, but none detected."),1)),me.useHTML5Audio&&me.hasHTML5)for(t in Z=!0,n)n.hasOwnProperty(t)&&n[t].required&&(me.html5.canPlayType(n[t].type)?me.preferFlash&&(me.flash[t]||me.flash[n[t].type])&&(e=!0):(Z=!1,e=!0));return me.ignoreFlash&&(e=!1,Z=!0),me.html5Only=me.hasHTML5&&me.useHTML5Audio&&!e,!me.html5Only},J=function(e){var t,n,o,r=0;if(e instanceof Array){for(t=0,n=e.length;t<n;t++)if(e[t]instanceof Object){if(me.canPlayMIME(e[t].type)){r=t;break}}else if(me.canPlayURL(e[t])){r=t;break}e[r].url&&(e[r]=e[r].url),o=e[r]}else o=e;return o},K=function(e){e._hasTimer||(e._hasTimer=!0,!Ze&&me.html5PollingInterval&&(null===je&&0===Re&&(je=setInterval(z,me.html5PollingInterval)),Re++))},W=function(e){e._hasTimer&&(e._hasTimer=!1,!Ze&&me.html5PollingInterval&&Re--)},z=function(){var e;if(null!==je&&!Re)return clearInterval(je),void(je=null);for(e=me.soundIDs.length-1;e>=0;e--)me.sounds[me.soundIDs[e]].isHTML5&&me.sounds[me.soundIDs[e]]._hasTimer&&me.sounds[me.soundIDs[e]]._onTimer()},D=function(e){e=e!==i?e:{},"function"==typeof me.onerror&&me.onerror.apply(r,[{type:e.type!==i?e.type:null}]),e.fatal!==i&&e.fatal&&me.disable()},le=function(){if(Ye&&ue()){var e,t,n=me.audioFormats;for(t in n)if(n.hasOwnProperty(t)&&("mp3"===t||"mp4"===t)&&(me._wD(ve+": Using flash fallback for "+t+" format"),me.html5[t]=!1,n[t]&&n[t].related))for(e=n[t].related.length-1;e>=0;e--)me.html5[n[t].related[e]]=!1}},this._setSandboxType=function(e){var t=me.sandbox;t.type=e,t.description=t.types[t.types[e]!==i?e:"unknown"],"localWithFile"===t.type?(t.noRemote=!0,t.noLocal=!1,f("secNote",2)):"localWithNetwork"===t.type?(t.noRemote=!1,t.noLocal=!0):"localTrusted"===t.type&&(t.noRemote=!1,t.noLocal=!1)},this._externalInterfaceOK=function(e){if(!me.swfLoaded){var t;if(c("swf",!0),c("flashtojs",!0),me.swfLoaded=!0,et=!1,Ye&&le(),!e||e.replace(/\+dev/i,"")!==me.versionNumber.replace(/\+dev/i,""))return t=ve+': Fatal: JavaScript file build "'+me.versionNumber+'" does not match Flash SWF build "'+e+'" at '+me.url+". Ensure both are up-to-date.",void setTimeout(function(){throw new Error(t)},0);setTimeout(u,Ke?100:1)}},I=function(e,t){if(Oe&&Pe)return!1;function n(){var e,t=[],n=[];e="SoundManager "+me.version+(!me.html5Only&&me.useHTML5Audio?me.hasHTML5?" + HTML5 audio":", no HTML5 audio support":""),me.html5Only?me.html5PollingInterval&&t.push("html5PollingInterval ("+me.html5PollingInterval+"ms)"):(me.preferFlash&&t.push("preferFlash"),me.useHighPerformance&&t.push("useHighPerformance"),me.flashPollingInterval&&t.push("flashPollingInterval ("+me.flashPollingInterval+"ms)"),me.html5PollingInterval&&t.push("html5PollingInterval ("+me.html5PollingInterval+"ms)"),me.wmode&&t.push("wmode ("+me.wmode+")"),me.debugFlash&&t.push("debugFlash"),me.useFlashBlock&&t.push("flashBlock")),t.length&&(n=n.concat([t.join(" + ")])),me._wD(e+(n.length?" + "+n.join(", "):""),1),fe()}if(me.html5Only)return _(),n(),me.oMC=o(me.movieID),u(),Oe=!0,Pe=!0,!1;var r,a,s,l,c,f,d,h,p,m=t||me.url,g=me.altURL||m,y=T(),v=V(),A=_e.getElementsByTagName("html")[0];function b(e,t){return'<param name="'+e+'" value="'+t+'" />'}if(r=A&&A.dir&&A.dir.match(/rtl/i),e=e===i?me.id:e,_(),me.url=R(rt?m:g),t=me.url,me.wmode=!me.wmode&&me.useHighPerformance?"transparent":me.wmode,null!==me.wmode&&(be.match(/msie 8/i)||!Ke&&!me.useHighPerformance)&&navigator.platform.match(/win32|win64/i)&&(xe.push(S.spcWmode),me.wmode=null),a={name:e,id:e,src:t,quality:"high",allowScriptAccess:me.allowScriptAccess,bgcolor:me.bgColor,pluginspage:it+"www.macromedia.com/go/getflashplayer",title:"JS/Flash audio component (SoundManager 2)",type:"application/x-shockwave-flash",wmode:me.wmode,hasPriority:"true"},me.debugFlash&&(a.FlashVars="debug=1"),me.wmode||delete a.wmode,Ke)s=_e.createElement("div"),c=['<object id="'+e+'" data="'+t+'" type="'+a.type+'" title="'+a.title+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0">',b("movie",t),b("AllowScriptAccess",me.allowScriptAccess),b("quality",a.quality),me.wmode?b("wmode",me.wmode):"",b("bgcolor",me.bgColor),b("hasPriority","true"),me.debugFlash?b("FlashVars",a.FlashVars):"","</object>"].join("");else for(l in s=_e.createElement("embed"),a)a.hasOwnProperty(l)&&s.setAttribute(l,a[l]);if(C(),v=V(),y=T())if(me.oMC=o(me.movieID)||_e.createElement("div"),me.oMC.id)p=me.oMC.className,me.oMC.className=(p?p+" ":B.swfDefault)+(v?" "+v:""),me.oMC.appendChild(s),Ke&&((f=me.oMC.appendChild(_e.createElement("div"))).className=B.swfBox,f.innerHTML=c),Pe=!0;else{if(me.oMC.id=me.movieID,me.oMC.className=B.swfDefault+" "+v,d=null,f=null,me.useFlashBlock||(me.useHighPerformance?d={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"}:(d={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"},r&&(d.left=Math.abs(parseInt(d.left,10))+"px"))),We&&(me.oMC.style.zIndex=1e4),!me.debugFlash)for(h in d)d.hasOwnProperty(h)&&(me.oMC.style[h]=d[h]);try{Ke||me.oMC.appendChild(s),y.appendChild(me.oMC),Ke&&((f=me.oMC.appendChild(_e.createElement("div"))).className=B.swfBox,f.innerHTML=c),Pe=!0}catch(e){throw new Error(j("domError")+" \n"+e.toString())}}return Oe=!0,n(),!0},O=function(){return me.html5Only?(I(),!1):!ye&&(me.url?((ye=me.getMovie(me.id))||(Le?(Ke?me.oMC.innerHTML=Ce:me.oMC.appendChild(Le),Le=null,Oe=!0):I(me.id,me.url),ye=me.getMovie(me.id)),"function"==typeof me.oninitmovie&&setTimeout(me.oninitmovie,1),de(),!0):(f("noURL"),!1))},A=function(){setTimeout(b,1e3)},w=function(){r.setTimeout(function(){G(Ae+"useFlashBlock is false, 100% HTML5 mode is possible. Rebooting with preferFlash: false..."),me.setup({preferFlash:!1}).reboot(),me.didFlashBlock=!0,me.beginDelayedInit()},1)},b=function(){var e,t=!1;me.url&&(qe||(qe=!0,ie.remove(r,"load",A),se&&et&&!$e?f("waitFocus"):(Ee||(e=me.getMoviePercent())>0&&e<100&&(t=!0),setTimeout(function(){if(e=me.getMoviePercent(),t)return qe=!1,me._wD(j("waitSWF")),void r.setTimeout(A,1);Ee||(me._wD(ve+": No Flash response within expected time. Likely causes: "+(0===e?"SWF load failed, ":"")+"Flash blocked or JS-Flash security error."+(me.debugFlash?" "+j("checkSWF"):""),2),!rt&&e&&(f("localFail",2),me.debugFlash||f("tryDebug",2)),0===e&&me._wD(j("swf404",me.url),1),c("flashtojs",!1,": Timed out"+(rt?" (Check flash security or flash blockers)":" (No plugin/missing SWF?)"))),!Ee&&tt&&(null===e?me.useFlashBlock||0===me.flashLoadTimeout?(me.useFlashBlock&&x(),f("waitForever")):!me.useFlashBlock&&Z?w():(f("waitForever"),y({type:"ontimeout",ignoreInit:!0,error:{type:"INIT_FLASHBLOCK"}})):0===me.flashLoadTimeout?f("waitForever"):!me.useFlashBlock&&Z?w():F(!0))},me.flashLoadTimeout))))},k=function(){function e(){ie.remove(r,"focus",k)}return $e||!et?(e(),!0):(tt=!0,$e=!0,f("gotFocus"),qe=!1,A(),e(),!0)},de=function(){xe.length&&(me._wD("SoundManager 2: "+xe.join(" "),1),xe=[])},fe=function(){de();var e,t=[];if(me.useHTML5Audio&&me.hasHTML5){for(e in me.audioFormats)me.audioFormats.hasOwnProperty(e)&&t.push(e+" = "+me.html5[e]+(!me.html5[e]&&Ve&&me.flash[e]?" (using flash)":me.preferFlash&&me.flash[e]&&Ve?" (preferring flash)":me.html5[e]?"":" ("+(me.audioFormats[e].required?"required, ":"")+"and no flash support)"));me._wD("SoundManager 2 HTML5 support: "+t.join(", "),1)}},d=function(e){if(Ee)return!1;if(me.html5Only)return f("sm2Loaded",1),Ee=!0,v(),c("onload",!0),!0;var t,n=!0;return me.useFlashBlock&&me.flashLoadTimeout&&!me.getMoviePercent()||(Ee=!0),t={type:!se&&Ve?"NO_FLASH":"INIT_TIMEOUT"},me._wD("SoundManager 2 "+(Me?"failed to load":"loaded")+" ("+(Me?"Flash security/load error":"OK")+") "+String.fromCharCode(Me?10006:10003),Me?2:1),Me||e?(me.useFlashBlock&&me.oMC&&(me.oMC.className=V()+" "+(null===me.getMoviePercent()?B.swfTimedout:B.swfError)),y({type:"ontimeout",error:t,ignoreInit:!0}),c("onload",!1),D(t),n=!1):c("onload",!0),Me||(me.waitForWindowLoad&&!Te?(f("waitOnload"),ie.add(r,"load",v)):(me.waitForWindowLoad&&Te&&f("docLoaded"),v())),n},s=function(){var e,t=me.setupOptions;for(e in t)t.hasOwnProperty(e)&&(me[e]===i?me[e]=t[e]:me[e]!==t[e]&&(me.setupOptions[e]=me[e]))},u=function(){if(Ee)return f("didInit"),!1;function e(){ie.remove(r,"load",me.beginDelayedInit)}if(me.html5Only)return Ee||(e(),me.enabled=!0,d()),!0;O();try{ye._externalInterfaceTest(!1),L(!0,me.flashPollingInterval||(me.useHighPerformance?10:50)),me.debugMode||ye._disableDebug(),me.enabled=!0,c("jstoflash",!0),me.html5Only||ie.add(r,"unload",a)}catch(e){return me._wD("js/flash exception: "+e.toString()),c("jstoflash",!1),D({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),F(!0),d(),!1}return d(),e(),!0},P=function(){return!M&&(M=!0,s(),C(),!se&&me.hasHTML5&&(me._wD("SoundManager 2: No Flash detected"+(me.useHTML5Audio?". Trying HTML5-only mode.":", enabling HTML5."),1),me.setup({useHTML5Audio:!0,preferFlash:!1})),re(),!se&&Ve&&(xe.push(S.needFlash),me.setup({flashLoadTimeout:1})),_e.removeEventListener&&_e.removeEventListener("DOMContentLoaded",P,!1),O(),!0)},oe=function(){return"complete"===_e.readyState&&(P(),_e.detachEvent("onreadystatechange",oe)),!0},E=function(){Te=!0,P(),ie.remove(r,"load",E)},ue(),ie.add(r,"focus",k),ie.add(r,"load",A),ie.add(r,"load",E),_e.addEventListener?_e.addEventListener("DOMContentLoaded",P,!1):_e.attachEvent?_e.attachEvent("onreadystatechange",oe):(c("onload",!1),D({type:"NO_DOM2_EVENTS",fatal:!0}))}r.SM2_DEFER!==i&&SM2_DEFER||(a=new s),e&&"object"==typeof e.exports?(e.exports.SoundManager=s,e.exports.soundManager=a):void 0===(o=function(){return{constructor:s,getInstance:function(e){if(!r.soundManager&&e instanceof Function){var t=e(s);t instanceof s&&(r.soundManager=t)}return r.soundManager}}}.call(t,n,t,e))||(e.exports=o),r.SoundManager=s,r.soundManager=a}(window)},2762:function(e,t,n){"use strict";var o=n(6518),r=n(3802).trim;o({target:"String",proto:!0,forced:n(706)("trim")},{trim:function(){return r(this)}})},3638:function(e,t,n){"use strict";n(2675),n(9463),n(2259),n(5700),n(8706),n(2008),n(113),n(3418),n(3792),n(8598),n(2062),n(4782),n(6910),n(9572),n(2010),n(8130),n(9085),n(5506),n(3851),n(1278),n(875),n(9432),n(6099),n(8459),n(3362),n(825),n(888),n(7495),n(8781),n(7764),n(1761),n(1392),n(3500),n(2953),n(5440);var o=n(9073),r=n(1669);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var a=o&&o.prototype instanceof l?o:l,c=Object.create(a.prototype);return s(c,"_invoke",function(n,o,r){var i,a,s,l=0,c=r||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,a=0,s=e,d.n=n,u}};function h(n,o){for(a=n,s=o,t=0;!f&&l&&!r&&t<c.length;t++){var r,i=c[t],h=d.p,p=i[2];n>3?(r=p===o)&&(s=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=h&&((r=n<2&&h<i[1])?(a=0,d.v=o,d.n=i[1]):h<p&&(r=n<3||i[0]>o||o>p)&&(i[4]=n,i[5]=o,d.n=p,a=0))}if(r||n>1)return u;throw f=!0,o}return function(r,c,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&h(c,p),a=c,s=p;(t=a<2?e:s)||!f;){i||(a?a<3?(a>1&&(d.n=-1),h(a,s)):d.n=s:d.v=s);try{if(l=2,i){if(a||(r="next"),t=i[r]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,a<2&&(a=0)}else 1===a&&(t=i.return)&&t.call(i),a<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),a=1);i=e}else if((t=(f=d.n<0)?s:n.call(o,d))!==u)break}catch(t){i=e,a=1,s=t}finally{l=1}}return{value:t,done:f}}}(n,r,i),!0),c}var u={};function l(){}function c(){}function f(){}t=Object.getPrototypeOf;var d=[][o]?t(t([][o]())):(s(t={},o,function(){return this}),t),h=f.prototype=l.prototype=Object.create(d);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,s(e,r,"GeneratorFunction")),e.prototype=Object.create(h),e}return c.prototype=f,s(h,"constructor",f),s(f,"constructor",c),c.displayName="GeneratorFunction",s(f,r,"GeneratorFunction"),s(h),s(h,r,"Generator"),s(h,o,function(){return this}),s(h,"toString",function(){return"[object Generator]"}),(a=function(){return{w:i,m:p}})()}function s(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}s=function(e,t,n,o){function i(t,n){s(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},s(e,t,n,o)}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,s=[],u=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(o=i.call(n)).done)&&(s.push(o.value),s.length!==t);u=!0);}catch(e){l=!0,r=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw r}}return s}}(e,t)||c(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=c(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function c(e,t){if(e){if("string"==typeof e)return f(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function d(e,t,n,o,r,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(o,r)}function h(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,p(o.key),o)}}function p(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}var m=function(){function e(t,n,o,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.leafIndex=t,this.chunkIndex=n,this.text=o,this.lineRects=r}return t=e,n=[{key:"fetch",value:(i=a().m(function t(n,i){var s,c,f,d,h,p,m,g,y,v,A,b;return a().w(function(t){for(;;)switch(t.n){case 0:if(null===(s=window.br.plugins.translate)||void 0===s||!s.translationManager.active){t.n=2;break}return t.n=1,window.br.plugins.translate.getTranslateLayers(i);case 1:c=t.v,f=Array.from(c[0].childNodes),d=[],h=l(f.entries());try{for(h.s();!(p=h.n()).done;)m=u(p.value,2),g=m[0],(y=m[1]).classList.contains("ocr-role-header-footer")||(v=new e(i,g,y.textContent,[]),d.push(v))}catch(e){h.e(e)}finally{h.f()}return 0===d.length&&(A=new e(i,0,"",[]),d.push(A)),t.a(2,d);case 2:return t.n=3,r.ajax({type:"GET",url:(0,o.g)(n,{pageIndex:i}),cache:!0,xhrFields:{withCredentials:window.br.protected}});case 3:return b=t.v,t.a(2,e._fromTextWrapperResponse(i,b));case 4:return t.a(2)}},t)}),s=function(){var e=this,t=arguments;return new Promise(function(n,o){var r=i.apply(e,t);function a(e){d(r,n,o,a,s,"next",e)}function s(e){d(r,n,o,a,s,"throw",e)}a(void 0)})},function(e,t){return s.apply(this,arguments)})},{key:"_fromTextWrapperResponse",value:function(t,n){return n.map(function(n,o){var r=e._fixChunkRects(n.slice(1)),i=e._removeDanglingHyphens(n[0]);return new e(t,o,i,r)})}},{key:"_fixChunkRects",value:function(e){if(e.length<2)return e;var t=u(e,2),n=t[0],o=t[1],r=u(n,3),i=r[0],a=r[1],s=r[2]-i,l=o[1]-o[3],c=o[2]-o[0],f=o[2];return s>30*c&&(n[2]=f,n[3]=a-l),e}},{key:"_removeDanglingHyphens",value:function(e){return e.replace(/[-¬]\s+/g,"")}}],n&&h(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,i,s}();function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function y(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var u=o&&o.prototype instanceof s?o:s,l=Object.create(u.prototype);return v(l,"_invoke",function(n,o,r){var i,s,u,l=0,c=r||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,s=0,u=e,d.n=n,a}};function h(n,o){for(s=n,u=o,t=0;!f&&l&&!r&&t<c.length;t++){var r,i=c[t],h=d.p,p=i[2];n>3?(r=p===o)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((r=n<2&&h<i[1])?(s=0,d.v=o,d.n=i[1]):h<p&&(r=n<3||i[0]>o||o>p)&&(i[4]=n,i[5]=o,d.n=p,s=0))}if(r||n>1)return a;throw f=!0,o}return function(r,c,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&h(c,p),s=c,u=p;(t=s<2?e:u)||!f;){i||(s?s<3?(s>1&&(d.n=-1),h(s,u)):d.n=u:d.v=u);try{if(l=2,i){if(s||(r="next"),t=i[r]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),s=1);i=e}else if((t=(f=d.n<0)?u:n.call(o,d))!==a)break}catch(t){i=e,s=1,u=t}finally{l=1}}return{value:t,done:f}}}(n,r,i),!0),l}var a={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(v(t={},o,function(){return this}),t),f=l.prototype=s.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,v(e,r,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=l,v(f,"constructor",l),v(l,"constructor",u),u.displayName="GeneratorFunction",v(l,r,"GeneratorFunction"),v(f),v(f,r,"Generator"),v(f,o,function(){return this}),v(f,"toString",function(){return"[object Generator]"}),(y=function(){return{w:i,m:d}})()}function v(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}v=function(e,t,n,o){function i(t,n){v(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},v(e,t,n,o)}function A(e,t,n,o,r,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(o,r)}function b(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,w(o.key),o)}}function w(e){var t=function(e){if("object"!=g(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=g(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==g(t)?t:t+""}var _=function(){function e(t,n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.pageCount=t,this.opts=Object.assign({},k,o),this._cursor={page:n,chunk:0},this._bufferedPages={},this._bufferingPages={},this._cursorLock=Promise.resolve()}return t=e,n=[{key:"next",value:function(){var e=this;return this._cursorLock=this._cursorLock.then(function(){return e._nextUncontrolled()})}},{key:"decrement",value:function(){var e=this;return this._cursorLock=this._cursorLock.then(function(){return e._decrementUncontrolled()})}},{key:"_nextUncontrolled",value:(o=y().m(function t(){var n;return y().w(function(t){for(;;)switch(t.n){case 0:if(this._cursor.page!=this.pageCount){t.n=1;break}return t.a(2,Promise.resolve(e.AT_END));case 1:return this._recenterBuffer(this._cursor.page),t.n=2,this._fetchPageChunks(this._cursor.page);case 2:if(n=t.v,this._cursor.chunk!=n.length){t.n=3;break}return this._cursor.page++,this._cursor.chunk=0,t.a(2,this._nextUncontrolled());case 3:return t.a(2,n[this._cursor.chunk++])}},t,this)}),r=function(){var e=this,t=arguments;return new Promise(function(n,r){var i=o.apply(e,t);function a(e){A(i,n,r,a,s,"next",e)}function s(e){A(i,n,r,a,s,"throw",e)}a(void 0)})},function(){return r.apply(this,arguments)})},{key:"_decrementUncontrolled",value:function(){var e=this,t=Promise.resolve();return this._cursor.chunk>0?this._cursor.chunk--:this._cursor.page>0&&(this._cursor.page--,t=this._fetchPageChunks(this._cursor.page).then(function(t){if(0==t.length)return e._decrementUncontrolled();e._cursor.chunk=t.length-1})),t.then(function(){return e._fetchPageChunks(e._cursor.page)})}},{key:"_recenterBuffer",value:function(e){for(var t=Math.max(0,e-this.opts.pageBufferSize),n=Math.min(this.pageCount,e+this.opts.pageBufferSize+1),o=t;o<n;o++)this._fetchPageChunks(o);this._removePageFromBuffer(t-1),this._removePageFromBuffer(n+1)}},{key:"_removePageFromBuffer",value:function(e){delete this._bufferingPages[e],delete this._bufferedPages[e]}},{key:"_fetchPageChunks",value:function(e){var t=this;return e in this._bufferingPages?this._bufferingPages[e]:e in this._bufferedPages?Promise.resolve(this._bufferedPages[e]):(this._bufferingPages[e]=this._fetchPageChunksDirect(e).then(function(n){return delete t._bufferingPages[e],t._bufferedPages[e]=n,n}),this._bufferingPages[e])}},{key:"_fetchPageChunksDirect",value:function(e){return m.fetch(this.opts.pageChunkUrl,e)}}],n&&b(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,o,r}();_.AT_END="__PageChunkIterator.AT_END__";var k={pageChunkUrl:null,pageBufferSize:2},S=n(4160),O=n(1669);function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function M(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var u=o&&o.prototype instanceof s?o:s,l=Object.create(u.prototype);return T(l,"_invoke",function(n,o,r){var i,s,u,l=0,c=r||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,s=0,u=e,d.n=n,a}};function h(n,o){for(s=n,u=o,t=0;!f&&l&&!r&&t<c.length;t++){var r,i=c[t],h=d.p,p=i[2];n>3?(r=p===o)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((r=n<2&&h<i[1])?(s=0,d.v=o,d.n=i[1]):h<p&&(r=n<3||i[0]>o||o>p)&&(i[4]=n,i[5]=o,d.n=p,s=0))}if(r||n>1)return a;throw f=!0,o}return function(r,c,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&h(c,p),s=c,u=p;(t=s<2?e:u)||!f;){i||(s?s<3?(s>1&&(d.n=-1),h(s,u)):d.n=u:d.v=u);try{if(l=2,i){if(s||(r="next"),t=i[r]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),s=1);i=e}else if((t=(f=d.n<0)?u:n.call(o,d))!==a)break}catch(t){i=e,s=1,u=t}finally{l=1}}return{value:t,done:f}}}(n,r,i),!0),l}var a={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(T(t={},o,function(){return this}),t),f=l.prototype=s.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,T(e,r,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=l,T(f,"constructor",l),T(l,"constructor",u),u.displayName="GeneratorFunction",T(l,r,"GeneratorFunction"),T(f),T(f,r,"Generator"),T(f,o,function(){return this}),T(f,"toString",function(){return"[object Generator]"}),(M=function(){return{w:i,m:d}})()}function T(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}T=function(e,t,n,o){function i(t,n){T(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},T(e,t,n,o)}function I(e,t,n,o,r,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(o,r)}function D(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function a(e){I(i,o,r,a,s,"next",e)}function s(e){I(i,o,r,a,s,"throw",e)}a(void 0)})}}function L(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,C(o.key),o)}}function C(e){var t=function(e){if("object"!=P(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=P(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==P(t)?t:t+""}var q=function(){function e(t){var n,o,r,i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n=this,r=function(){i.voice=e.getBestBookVoice(i.getVoices(),i.opts.bookLanguage)},(o=C(o="updateBestVoice"))in n?Object.defineProperty(n,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[o]=r,this.playing=!1,this.paused=!1,this.opts=t,this._chunkIterator=null,this.activeSound=null,this.playbackRate=1,this.events=O({}),this.voice=null,this.events.on("voiceschanged",this.updateBestVoice),this.events.trigger("voiceschanged")}return t=e,n=[{key:"getVoices",value:function(){throw new Error("Unimplemented abstract class")}},{key:"init",value:function(){return null}},{key:"start",value:function(e,t){this.playing=!0,this.paused=!1,this.opts.onLoadingStart(),this._chunkIterator=new _(t,e,{pageChunkUrl:this.opts.pageChunkUrl,pageBufferSize:3}),this.step(),this.events.trigger("start")}},{key:"stop",value:function(){this.activeSound&&this.activeSound.stop(),this.playing=!1,this.paused=!0,this._chunkIterator=null,this.activeSound=null,this.events.trigger("stop")}},{key:"pause",value:function(){var e=!this.paused&&this.activeSound;this.paused=!0,this.activeSound&&this.activeSound.pause(),e&&this.events.trigger("pause")}},{key:"resume",value:function(){var e=this.paused&&this.activeSound;this.paused=!1,this.activeSound&&this.activeSound.resume(),e&&this.events.trigger("resume")}},{key:"togglePlayPause",value:function(){this.paused?this.resume():this.pause()}},{key:"jumpForward",value:function(){this.activeSound&&this.activeSound.finish()}},{key:"jumpBackward",value:(i=D(M().m(function e(){var t=this;return M().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Promise.all([this.activeSound.stop(),this._chunkIterator.decrement().then(function(){return t._chunkIterator.decrement()})]);case 1:this.step();case 2:return e.a(2)}},e,this)})),function(){return i.apply(this,arguments)})},{key:"setVoice",value:function(e){this.events.off("voiceschanged",this.updateBestVoice),this.voice=this.getVoices().find(function(t){return t.voiceURI===e}),this.opts.bookLanguage&&(0,S.ND)()&&localStorage.setItem("BRtts-voice-".concat(this.opts.bookLanguage),this.voice.voiceURI),this.activeSound&&this.activeSound.setVoice(this.voice)}},{key:"setPlaybackRate",value:function(e){this.playbackRate=e,this.activeSound&&this.activeSound.setPlaybackRate(e)}},{key:"step",value:(r=D(M().m(function e(){var t,n,o,r=this;return M().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._chunkIterator.next();case 1:if((t=e.v)!=_.AT_END){e.n=2;break}return this.stop(),this.opts.onDone(),e.a(2);case 2:return this.opts.onLoadingStart(),(n=this.createSound(t)).chunk=t,n.rate=this.playbackRate,n.voice=this.voice,n.load(function(){return r.opts.onLoadingComplete()}),this.opts.onLoadingComplete(),e.n=3,this.opts.beforeChunkPlay(t);case 3:if(this.playing){e.n=4;break}return e.a(2);case 4:return e.n=5,this.playSound(n).then(function(){return r.opts.afterChunkPlay(n.chunk)});case 5:return o=e.v,this.paused&&this.pause(),e.n=6,o;case 6:if(!this.playing){e.n=7;break}return e.a(2,this.step());case 7:return e.a(2)}},e,this)})),function(){return r.apply(this,arguments)})},{key:"createSound",value:function(e){throw new Error("Unimplemented abstract class")}},{key:"playSound",value:function(e){return this.activeSound=e,this.activeSound.loaded||this.opts.onLoadingStart(),this.activeSound.play()}},{key:"getBestVoice",value:function(t){return e.getBestBookVoice(this.getVoices(),t||this.opts.bookLanguage)}}],o=[{key:"isSupported",value:function(){throw new Error("Unimplemented abstract class")}},{key:"getBestBookVoice",value:function(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:navigator.languages,r=t.filter(function(e){return e.lang.startsWith(n)}),i=(o=o||(navigator.language?[navigator.language]:[])).filter(function(e){return e.startsWith(n)});return e.getMatchingStoredVoice(r,n)||e.getMatchingVoice(i,r)||r.find(function(e){return e.default})||r[0]||e.getMatchingVoice(o,t)||t.find(function(e){return e.default})||t[0]}},{key:"getMatchingStoredVoice",value:function(e,t){var n=(0,S.ND)()&&localStorage.getItem("BRtts-voice-".concat(t));return n?e.find(function(e){return e.voiceURI===n}):void 0}},{key:"getMatchingVoice",value:function(e,t){var n,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return E(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(e);try{var r,i=function(){var e=n.value,o=t.filter(function(t){return t.lang.replace("_","-").startsWith(e)});if(o.length)return{v:o.find(function(e){return e.default})||o[0]}};for(o.s();!(n=o.n()).done;)if(r=i())return r.v}catch(e){o.e(e)}finally{o.f()}}}],n&&L(t.prototype,n),o&&L(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,o,r,i}(),F=n(8004),R=(n(2443),n(1792),n(1669));function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function x(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var u=o&&o.prototype instanceof s?o:s,l=Object.create(u.prototype);return V(l,"_invoke",function(n,o,r){var i,s,u,l=0,c=r||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,s=0,u=e,d.n=n,a}};function h(n,o){for(s=n,u=o,t=0;!f&&l&&!r&&t<c.length;t++){var r,i=c[t],h=d.p,p=i[2];n>3?(r=p===o)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((r=n<2&&h<i[1])?(s=0,d.v=o,d.n=i[1]):h<p&&(r=n<3||i[0]>o||o>p)&&(i[4]=n,i[5]=o,d.n=p,s=0))}if(r||n>1)return a;throw f=!0,o}return function(r,c,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&h(c,p),s=c,u=p;(t=s<2?e:u)||!f;){i||(s?s<3?(s>1&&(d.n=-1),h(s,u)):d.n=u:d.v=u);try{if(l=2,i){if(s||(r="next"),t=i[r]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),s=1);i=e}else if((t=(f=d.n<0)?u:n.call(o,d))!==a)break}catch(t){i=e,s=1,u=t}finally{l=1}}return{value:t,done:f}}}(n,r,i),!0),l}var a={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(V(t={},o,function(){return this}),t),f=l.prototype=s.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,V(e,r,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=l,V(f,"constructor",l),V(l,"constructor",u),u.displayName="GeneratorFunction",V(l,r,"GeneratorFunction"),V(f),V(f,r,"Generator"),V(f,o,function(){return this}),V(f,"toString",function(){return"[object Generator]"}),(x=function(){return{w:i,m:d}})()}function V(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}V=function(e,t,n,o){function i(t,n){V(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},V(e,t,n,o)}function B(e,t,n,o,r,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(o,r)}function H(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function a(e){B(i,o,r,a,s,"next",e)}function s(e){B(i,o,r,a,s,"throw",e)}a(void 0)})}}function U(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function N(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Q(o.key),o)}}function G(e,t,n){return t&&N(e.prototype,t),n&&N(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Q(e){var t=function(e){if("object"!=j(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==j(t)?t:t+""}function K(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(K=function(){return!!e})()}function W(){return W="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=z(e)););return e}(e,t);if(o){var r=Object.getOwnPropertyDescriptor(o,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},W.apply(null,arguments)}function z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},z(e)}function J(e,t){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},J(e,t)}var Z=function(e){function t(e){var n,o,r,i,a;return U(this,t),(r=this,i=t,a=[e],i=z(i),o=function(e,t){if(t&&("object"==j(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,K()?Reflect.construct(i,a||[],z(r).constructor):i.apply(r,a))).audioFormat=null!==(n=R.browser)&&void 0!==n&&n.mozilla?"ogg":"mp3",o.festivalUrl=e.festivalUrl,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&J(e,t)}(t,e),G(t,[{key:"getVoices",value:function(){return[{default:!0,lang:"en-US",localService:!1,name:"Festival - English (US)",voiceURI:null}]}},{key:"init",value:function(){soundManager.setup({debugMode:!1,preferFlash:!0,url:"/bookreader/BookReader/soundmanager/swf",useHTML5Audio:!0,flashVersion:9})}},{key:"start",value:function(e,n){var o=this,r=null;navigator.userAgent.match(/mobile/i)&&(r=this.iOSCaptureUserIntentHack()),(r=r||Promise.resolve()).then(function(){return(r=t,i=o,"function"==typeof(a=W(z(1&3?r.prototype:r),"start",i))?function(e){return a.apply(i,e)}:a)([e,n]);var r,i,a})}},{key:"createSound",value:function(e){return new Y((0,o.g)(this.festivalUrl,{text:e.text,format:this.audioFormat}))}},{key:"iOSCaptureUserIntentHack",value:(n=H(x().m(function e(){var t;return x().w(function(e){for(;;)switch(e.n){case 0:return t=soundManager.createSound({url:X[this.audioFormat]}),e.n=1,new Promise(function(e){return t.play({onfinish:e})});case 1:t.destruct();case 2:return e.a(2)}},e,this)})),function(){return n.apply(this,arguments)})}],[{key:"isSupported",value:function(){return"undefined"!=typeof soundManager&&soundManager.supported()}}]);var n}(q),Y=function(){return G(function e(t){U(this,e),this.soundUrl=t,this.sound=null,this.rate=1,this._finishResolver=null},[{key:"loaded",get:function(){return this.sound&&this.sound.loaded}},{key:"load",value:function(e){var t,n=this;return this.sound=soundManager.createSound({url:this.soundUrl,onload:function(){1!=n.rate&&n.sound.setPlaybackRate(n.rate),e()},onresume:(t=H(x().m(function e(){return x().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,(0,F.sleep)(25);case 1:1!=n.rate&&n.sound.setPlaybackRate(n.rate);case 2:return e.a(2)}},e)})),function(){return t.apply(this,arguments)})}),this.sound.load()}},{key:"play",value:(e=H(x().m(function e(){var t=this;return x().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,new Promise(function(e){t._finishResolver=e,t.sound.play({onfinish:e})});case 1:this.sound.destruct();case 2:return e.a(2)}},e,this)})),function(){return e.apply(this,arguments)})},{key:"stop",value:function(){return this.sound.stop(),Promise.resolve()}},{key:"pause",value:function(){this.sound.pause()}},{key:"resume",value:function(){this.sound.resume()}},{key:"setPlaybackRate",value:function(e){this.rate=e,this.sound.setPlaybackRate(e)}},{key:"finish",value:function(){this.sound.stop(),this._finishResolver()}}]);var e}(),X={mp3:"data:audio/mp3;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAACAAACcQCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA//////////////////////////////////////////////////////////////////8AAAAeTEFNRTMuOTlyBJwAAAAAAAAAADUgJAaUQQABrgAAAnHIf8sZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//sQxAADwlwBKGAAACAAAD/AAAAEAAAAH///////////////+UBAMExBTUUzLjk5LjOqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xDEIAPAAAGkAAAAIAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqg==",ogg:"data:audio/ogg;base64,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"},$=n(7583);function ee(e){return ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ee(e)}function te(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var u=o&&o.prototype instanceof s?o:s,l=Object.create(u.prototype);return ne(l,"_invoke",function(n,o,r){var i,s,u,l=0,c=r||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,s=0,u=e,d.n=n,a}};function h(n,o){for(s=n,u=o,t=0;!f&&l&&!r&&t<c.length;t++){var r,i=c[t],h=d.p,p=i[2];n>3?(r=p===o)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((r=n<2&&h<i[1])?(s=0,d.v=o,d.n=i[1]):h<p&&(r=n<3||i[0]>o||o>p)&&(i[4]=n,i[5]=o,d.n=p,s=0))}if(r||n>1)return a;throw f=!0,o}return function(r,c,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&h(c,p),s=c,u=p;(t=s<2?e:u)||!f;){i||(s?s<3?(s>1&&(d.n=-1),h(s,u)):d.n=u:d.v=u);try{if(l=2,i){if(s||(r="next"),t=i[r]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),s=1);i=e}else if((t=(f=d.n<0)?u:n.call(o,d))!==a)break}catch(t){i=e,s=1,u=t}finally{l=1}}return{value:t,done:f}}}(n,r,i),!0),l}var a={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(ne(t={},o,function(){return this}),t),f=l.prototype=s.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,ne(e,r,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=l,ne(f,"constructor",l),ne(l,"constructor",u),u.displayName="GeneratorFunction",ne(l,r,"GeneratorFunction"),ne(f),ne(f,r,"Generator"),ne(f,o,function(){return this}),ne(f,"toString",function(){return"[object Generator]"}),(te=function(){return{w:i,m:d}})()}function ne(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}ne=function(e,t,n,o){function i(t,n){ne(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},ne(e,t,n,o)}function oe(e,t,n,o,r,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(o,r)}function re(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function a(e){oe(i,o,r,a,s,"next",e)}function s(e){oe(i,o,r,a,s,"throw",e)}a(void 0)})}}function ie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ae(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,ue(o.key),o)}}function se(e,t,n){return t&&ae(e.prototype,t),n&&ae(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ue(e){var t=function(e){if("object"!=ee(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ee(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ee(t)?t:t+""}function le(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(le=function(){return!!e})()}function ce(){return ce="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=fe(e)););return e}(e,t);if(o){var r=Object.getOwnPropertyDescriptor(o,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},ce.apply(null,arguments)}function fe(e){return fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fe(e)}function de(e,t){return de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},de(e,t)}var he=function(e){function t(e){var n,o,r,i;return ie(this,t),o=this,i=[e],r=fe(r=t),n=function(e,t){if(t&&("object"==ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(o,le()?Reflect.construct(r,i||[],fe(o).constructor):r.apply(o,i)),speechSynthesis.addEventListener&&speechSynthesis.addEventListener("voiceschanged",function(){return n.events.trigger("voiceschanged")}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&de(e,t)}(t,e),se(t,[{key:"start",value:function(e,n){var o,r,i,a=this;if("mediaSession"in navigator){var s=new Audio(br.options.imagesBaseURL+"../silence.mp3");s.loop=!0,this.events.on("pause",function(){return s.pause()}),this.events.on("resume",function(){return s.play()}),this.events.on("stop",function(){return s.src=""}),s.play().then(function(){navigator.mediaSession.metadata=new MediaMetadata({title:br.bookTitle,artist:br.options.metadata.filter(function(e){return"Author"==e.label}).map(function(e){return e.value})[0],artwork:[{src:br.options.thumbnail,type:"image/jpg"}]}),navigator.mediaSession.setPositionState({duration:1/0}),navigator.mediaSession.setActionHandler("play",function(){s.play(),a.resume()}),navigator.mediaSession.setActionHandler("pause",function(){s.pause(),a.pause()}),navigator.mediaSession.setActionHandler("previoustrack",function(){return a.jumpBackward()}),navigator.mediaSession.setActionHandler("nexttrack",function(){return a.jumpForward()})})}return(o=t,r=this,"function"==typeof(i=ce(fe(1&3?o.prototype:o),"start",r))?function(e){return i.apply(r,e)}:i)([e,n])}},{key:"getVoices",value:function(){var e=speechSynthesis.getVoices();return 1!=e.filter(function(e){return e.default}).length&&e.unshift({voiceURI:"bookreader.SystemDefault",name:"System Default",lang:navigator.language,default:!0,localService:!0}),e}},{key:"createSound",value:function(e){return new pe(e.text)}}],[{key:"isSupported",value:function(){return void 0!==window.speechSynthesis}}])}(q),pe=function(){return se(function e(t){ie(this,e),this.text=t,this.loaded=!1,this.paused=!1,this.started=!1,this.stopped=!1,this.rate=1,this.utterance=null,this.voice=null,this._lastEvents={pause:null,boundary:null,start:null},this._charIndex=0,this._finishResolver=null,this._finishPromise=null},[{key:"load",value:function(e){var t,n=this;this.loaded=!1,this.started=!1,this.utterance=new SpeechSynthesisUtterance(this.text.slice(this._charIndex)),"bookreader.SystemDefault"!==(null===(t=this.voice)||void 0===t?void 0:t.voiceURI)&&(this.utterance.voice=this.voice),this.voice&&(this.utterance.lang=this.voice.lang),this.utterance.rate=this.rate,S.$x&&(this.utterance.addEventListener("pause",function(){return console.log("pause")}),this.utterance.addEventListener("resume",function(){return console.log("resume")}),this.utterance.addEventListener("start",function(){return console.log("start")}),this.utterance.addEventListener("end",function(){return console.log("end")}),this.utterance.addEventListener("error",function(e){return console.log("error",e)}),this.utterance.addEventListener("boundary",function(){return console.log("boundary")}),this.utterance.addEventListener("mark",function(){return console.log("mark")}),this.utterance.addEventListener("finish",function(){return console.log("finish")})),this.utterance.addEventListener("start",function(e){return n._lastEvents.start=e}),this.utterance.addEventListener("boundary",function(e){return n._lastEvents.boundary=e}),this.utterance.addEventListener("pause",function(e){return n._lastEvents.pause=e}),this.utterance.addEventListener("start",function(){n.started=!0,n.stopped=!1,n.paused=!1}),this.utterance.addEventListener("pause",function(){return n.paused=!0}),this.utterance.addEventListener("resume",function(){return n.paused=!1}),this.utterance.addEventListener("end",function(e){n.paused||n.stopped||n.utterance.dispatchEvent(new CustomEvent("finish",e))}),this.loaded=!0,e&&e()}},{key:"reload",value:(r=re(te().m(function e(){var t,n;return te().w(function(e){for(;;)switch(e.n){case 0:return t=this.paused,(n=this._lastEvents.boundary||this._lastEvents.pause)&&(this._charIndex=this.text.indexOf(n.target.text)+n.charIndex),e.n=1,this.stop();case 1:this.load(),t||this.play();case 2:return e.a(2)}},e,this)})),function(){return r.apply(this,arguments)})},{key:"play",value:function(){var e=this;this._finishPromise=this._finishPromise||new Promise(function(t){return e._finishResolver=t}),this.utterance.addEventListener("finish",this._finishResolver),speechSynthesis.cancel(),speechSynthesis.resume(),speechSynthesis.speak(this.utterance);var t=this.utterance.voice&&this.utterance.voice.localService;return(0,$.H8)()&&!t&&this._chromePausingBugFix(),this._finishPromise}},{key:"stop",value:function(){var e=Promise.resolve();return this.stopped||(e=Promise.race([(0,F.promisifyEvent)(this.utterance,"end"),(0,F.promisifyEvent)(this.utterance,"error")])),this.stopped=!0,speechSynthesis.cancel(),e}},{key:"finish",value:(o=re(te().m(function e(){return te().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.stop();case 1:this.utterance.dispatchEvent(new Event("finish"));case 2:return e.a(2)}},e,this)})),function(){return o.apply(this,arguments)})},{key:"pause",value:(n=re(te().m(function e(){var t,n;return te().w(function(e){for(;;)switch(e.n){case 0:if(!this.paused){e.n=1;break}return e.a(2);case 1:return t=(0,F.promisifyEvent)(this.utterance,"pause"),speechSynthesis.pause(),n=(0,$.gm)()&&(0,S.m0)(),e.n=2,Promise.race([t,(0,F.sleep)(100).then(function(){return"timeout"})]);case 2:if("timeout"==e.v){e.n=3;break}return e.a(2);case 3:S.$x&&console.log("TTS: Firing pause event manually"),this.utterance.dispatchEvent(new CustomEvent("pause",this._lastEvents.start)),n&&this.stop();case 4:return e.a(2)}},e,this)})),function(){return n.apply(this,arguments)})},{key:"resume",value:(t=re(te().m(function e(){var t,n;return te().w(function(e){for(;;)switch(e.n){case 0:if(this.started&&!this.stopped){e.n=1;break}return this.play(),e.a(2);case 1:if(this.paused){e.n=2;break}return e.a(2);case 2:return t=(0,$.H8)()&&(0,S.m0)()||(0,$.gm)()&&(0,S.m0)(),n=(0,F.promisifyEvent)(this.utterance,"resume"),speechSynthesis.resume(),e.n=3,Promise.race([n,(0,F.sleep)(100).then(function(){return"timeout"})]);case 3:if("timeout"==e.v){e.n=4;break}return e.a(2);case 4:if(S.$x&&console.log("TTS: Firing resume event manually"),this.utterance.dispatchEvent(new CustomEvent("resume",{})),!t){e.n=6;break}return e.n=5,this.reload();case 5:this.play();case 6:return e.a(2)}},e,this)})),function(){return t.apply(this,arguments)})},{key:"setPlaybackRate",value:function(e){this.rate=e,this.reload()}},{key:"setVoice",value:function(e){this.voice=e,this.reload()}},{key:"_chromePausingBugFix",value:(e=re(te().m(function e(){var t;return te().w(function(e){for(;;)switch(e.n){case 0:return S.$x&&console.log("CHROME-PAUSE-HACK: starting"),e.n=1,Promise.race([(0,F.sleep)(14e3).then(function(){return"timeout"}),(0,F.promisifyEvent)(this.utterance,"pause").then(function(){return"pause"}),(0,F.promisifyEvent)(this.utterance,"end").then(function(){return"end"}),(0,F.promisifyEvent)(this.utterance,"error").then(function(){return"error"})]);case 1:if(t=e.v,S.$x&&console.log("CHROME-PAUSE-HACK: ".concat(t)),"end"!=t&&"error"!=t){e.n=2;break}S.$x&&console.log("CHROME-PAUSE-HACK: stopped (end/error)"),e.n=6;break;case 2:if("pause"!=t){e.n=4;break}return e.n=3,Promise.race([(0,F.promisifyEvent)(this.utterance,"resume").then(function(){return"resume"}),(0,F.sleep)(14e3).then(function(){return"timeout"})]);case 3:"timeout"==e.v?(S.$x&&console.log("CHROME-PAUSE-HACK: stopped (timed out while paused)"),this.stop()):this._chromePausingBugFix(),e.n=6;break;case 4:if("timeout"!=t){e.n=6;break}return speechSynthesis.pause(),e.n=5,(0,F.sleep)(25);case 5:speechSynthesis.resume(),this._chromePausingBugFix();case 6:return e.a(2)}},e,this)})),function(){return e.apply(this,arguments)})}]);var e,t,n,o,r}(),me="Read this book aloud",ge=n(4907),ye=n(1041),ve=n(1669);function Ae(e){return Ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ae(e)}function be(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,s=[],u=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(o=i.call(n)).done)&&(s.push(o.value),s.length!==t);u=!0);}catch(e){l=!0,r=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return we(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?we(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function we(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function _e(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var u=o&&o.prototype instanceof s?o:s,l=Object.create(u.prototype);return ke(l,"_invoke",function(n,o,r){var i,s,u,l=0,c=r||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,s=0,u=e,d.n=n,a}};function h(n,o){for(s=n,u=o,t=0;!f&&l&&!r&&t<c.length;t++){var r,i=c[t],h=d.p,p=i[2];n>3?(r=p===o)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((r=n<2&&h<i[1])?(s=0,d.v=o,d.n=i[1]):h<p&&(r=n<3||i[0]>o||o>p)&&(i[4]=n,i[5]=o,d.n=p,s=0))}if(r||n>1)return a;throw f=!0,o}return function(r,c,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&h(c,p),s=c,u=p;(t=s<2?e:u)||!f;){i||(s?s<3?(s>1&&(d.n=-1),h(s,u)):d.n=u:d.v=u);try{if(l=2,i){if(s||(r="next"),t=i[r]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),s=1);i=e}else if((t=(f=d.n<0)?u:n.call(o,d))!==a)break}catch(t){i=e,s=1,u=t}finally{l=1}}return{value:t,done:f}}}(n,r,i),!0),l}var a={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(ke(t={},o,function(){return this}),t),f=l.prototype=s.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,ke(e,r,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=l,ke(f,"constructor",l),ke(l,"constructor",u),u.displayName="GeneratorFunction",ke(l,r,"GeneratorFunction"),ke(f),ke(f,r,"Generator"),ke(f,o,function(){return this}),ke(f,"toString",function(){return"[object Generator]"}),(_e=function(){return{w:i,m:d}})()}function ke(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}ke=function(e,t,n,o){function i(t,n){ke(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},ke(e,t,n,o)}function Se(e,t,n,o,r,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(o,r)}function Oe(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function a(e){Se(i,o,r,a,s,"next",e)}function s(e){Se(i,o,r,a,s,"throw",e)}a(void 0)})}}function Pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Ee(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Ce(o.key),o)}}function Me(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Me=function(){return!!e})()}function Te(){return Te="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ie(e)););return e}(e,t);if(o){var r=Object.getOwnPropertyDescriptor(o,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},Te.apply(null,arguments)}function Ie(e){return Ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ie(e)}function De(e,t){return De=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},De(e,t)}function Le(e,t,n){return(t=Ce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ce(e){var t=function(e){if("object"!=Ae(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ae(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ae(t)?t:t+""}var qe=window.BookReader,Fe=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return Le(e=function(e,t,n){return t=Ie(t),function(e,t){if(t&&("object"==Ae(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Me()?Reflect.construct(t,n||[],Ie(e).constructor):t.apply(e,n))}(this,t,[].concat(o)),"options",{enabled:!0,pageChunkUrl:"https://{{server}}/BookReader/BookReaderGetTextWrapper.php?path={{bookPath|urlencode}}_djvu.xml&page={{pageIndex}}&callback=false",remoteTtsUrl:"https://{{server}}/BookReader/BookReaderGetTTS.php?string={{text|urlencode}}&format={{format}}"}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&De(e,t)}(t,e),n=t,r=[{key:"setup",value:function(e){var n,r,i;if((n=t,r=this,"function"==typeof(i=Te(Ie(1&3?n.prototype:n),"setup",r))?function(e){return i.apply(r,e)}:i)([Object.assign({server:this.br.options.server,bookPath:this.br.options.bookPath},e)]),this.options.enabled){this._ttsBoxesByIndex={};var a=he.isSupported()?he:Z.isSupported()?Z:null;if(/_forceTTSEngine=(festival|web)/.test(location.toString())){var s=location.toString().match(/_forceTTSEngine=(festival|web)/)[1];a={festival:Z,web:he}[s]}a&&(this.ttsEngine=new a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(n),!0).forEach(function(t){Le(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({pageChunkUrl:(0,o.g)(this.options.pageChunkUrl,this.br.options.vars),bookLanguage:(0,S.YH)(this.br.options.bookLanguage),onLoadingStart:this.br.showProgressPopup.bind(this.br,"Loading audio..."),onLoadingComplete:this.br.removeProgressPopup.bind(this.br),onDone:this.stop.bind(this),beforeChunkPlay:this.beforeChunkPlay.bind(this),afterChunkPlay:this.sendChunkFinishedAnalyticsEvent.bind(this)},a===Z?{festivalUrl:(0,o.g)(this.options.remoteTtsUrl,this.br.options.vars)}:{})))}}},{key:"init",value:function(){var e=this;this.options.enabled&&this.br.bind(qe.eventNames.PostInit,function(){e.br.$(".BRicon.read").click(function(){return e.toggle(),!1}),e.ttsEngine&&(e.ttsEngine.init(),/[?&]_autoReadAloud=show/.test(location.toString())&&e.start(!1))})}},{key:"_configurePageContainer",value:function(e){if(this.options.enabled&&e.page&&e.page.index in this._ttsBoxesByIndex){var t=e.page.index;(0,ge.KL)("ttsHiliteLayer",this._ttsBoxesByIndex[t],e.page,e.$container[0])}}},{key:"extendNavBar",value:function(e){var t=this;if(this.options.enabled&&this.ttsEngine){this.br.refs.$BRReadAloudToolbar=ve('\n <ul class="read-aloud">\n <li>\n <select class="playback-speed" name="playback-speed" title="'.concat("Playback speed",'">\n <option value="0.25">0.25x</option>\n <option value="0.5">0.5x</option>\n <option value="0.75">0.75x</option>\n <option value="1.0" selected>1.0x</option>\n <option value="1.25">1.25x</option>\n <option value="1.5">1.5x</option>\n <option value="1.75">1.75x</option>\n <option value="2">2x</option>\n </select>\n </li>\n <li>\n <button type="button" name="review" title="').concat("Review 10 seconds",'">\n <div class="icon icon-review"></div>\n </button>\n </li>\n <li>\n <button type="button" name="play" title="').concat("Play",'">\n <div class="icon icon-play"></div>\n <div class="icon icon-pause"></div>\n </button>\n </li>\n <li>\n <button type="button" name="advance" title="').concat("Advance 10 seconds",'">\n <div class="icon icon-advance"></div>\n </button>\n </li>\n <li>\n <select class="playback-voices" name="playback-voice" style="display: none" title="Change read aloud voices">\n </select>\n </li>\n </ul>\n ')),e.find(".BRcontrols").prepend(this.br.refs.$BRReadAloudToolbar);var n=function(e){return e.map(function(e){return'<option value="'.concat(e.voiceURI,'">').concat(e.lang," - ").concat(e.name,"</option>")}).join("")},o=function(e,t){return"".concat(e.lang," - ").concat(e.name).localeCompare("".concat(t.lang," - ").concat(t.name))},r=function(e){var r;e.empty();var i=t.ttsEngine.opts.bookLanguage;null!==(r=t.br.plugins.translate)&&void 0!==r&&null!==(r=r.translationManager)&&void 0!==r&&r.active&&(i=t.br.plugins.translate.langFromCode);var a=t.ttsEngine.getVoices().filter(function(e){return e.lang.startsWith(i)}).sort(o),s=t.ttsEngine.getVoices().filter(function(e){return!e.lang.startsWith(i)}).sort(o);if(t.ttsEngine.getVoices().length>1){var u;if(null!==(u=t.br.plugins.translate)&&void 0!==u&&null!==(u=u.translationManager)&&void 0!==u&&u.active){var l=t.br.plugins.translate.langToCode,c=t.ttsEngine.getVoices().filter(function(e){return e.lang.startsWith(l)}).sort(o);e.append(ve('<optgroup label="Book Language, Translated From ('.concat(i,')"> ').concat(n(a)," </optgroup>"))),e.append(ve('<optgroup label="Book Language, Translated To ('.concat(l,')"> ').concat(n(c)," </optgroup>"))),e.append(ve('<optgroup label="Other Languages"> '.concat(n(s.filter(function(e){return!e.lang.startsWith(l)}).sort(o)))))}else e.append(ve('<optgroup label="Book Language ('.concat(i,')"> ').concat(n(a)," </optgroup>"))),e.append(ve('<optgroup label="Other Languages"> '.concat(n(s)," </optgroup>")));e.val(t.ttsEngine.voice.voiceURI),e.show()}else e.hide()},i=this.br.refs.$BRReadAloudToolbar.find("[name=playback-voice]");r(i),i.on("change",function(e){return t.ttsEngine.setVoice(i.val())}),this.ttsEngine.events.on("pause resume start",function(){return t.updateState()}),this.ttsEngine.events.on("voiceschanged",function(){return r(i)}),this.br.on("translationEnabled",function(){return r(i)}),this.br.on("translationDisabled",function(){return r(i)}),this.br.refs.$BRReadAloudToolbar.find("[name=play]").on("click",this.playPause.bind(this)),this.br.refs.$BRReadAloudToolbar.find("[name=advance]").on("click",this.jumpForward.bind(this)),this.br.refs.$BRReadAloudToolbar.find("[name=review]").on("click",this.jumpBackward.bind(this));var a=this.br.refs.$BRReadAloudToolbar.find('select[name="playback-speed"]');a.on("change",function(e){return t.ttsEngine.setPlaybackRate(parseFloat(a.val()))}),ve('<li>\n <button class="BRicon read js-tooltip" title="'.concat(me,'">\n <div class="icon icon-read-aloud"></div>\n <span class="BRtooltip">').concat(me,"</span>\n </button>\n </li>")).insertBefore(e.find(".BRcontrols .BRicon.zoom_out").closest("li"))}}},{key:"toggle",value:function(){var e;null===(e=this.br.plugins.autoplay)||void 0===e||e.stop(),this.ttsEngine.playing?this.stop():this.start()}},{key:"start",value:function(){var e,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=null!==(e=this.br.plugins.translate)&&void 0!==e&&null!==(e=e.translationManager)&&void 0!==e&&e.active?(0,S.YH)(this.br.plugins.translate.langToCode):"",o=this.ttsEngine.getBestVoice(n),r=this.br.refs.$BRReadAloudToolbar.find("[name=playback-voice");this.ttsEngine.setVoice(o.voiceURI),r.val(o.voiceURI),this.br.constModeThumb==this.br.mode&&this.br.switchMode(this.br.constMode1up),this.br.refs.$BRReadAloudToolbar.addClass("visible"),this.br.$(".BRicon.read").addClass("unread active"),this.sendAnalyticsEvent("Start"),t&&this.ttsEngine.start(this.br.currentIndex(),this.br.book.getNumLeafs())}},{key:"jumpForward",value:function(){this.ttsEngine.paused&&this.ttsEngine.resume(),this.ttsEngine.jumpForward()}},{key:"jumpBackward",value:function(){this.ttsEngine.paused&&this.ttsEngine.resume(),this.ttsEngine.jumpBackward()}},{key:"updateState",value:function(){var e=!(this.ttsEngine.paused||!this.ttsEngine.playing);this.br.$(".read-aloud [name=play]").toggleClass("playing",e)}},{key:"playPause",value:function(){this.ttsEngine.playing?(this.ttsEngine.togglePlayPause(),this.updateState()):this.toggle()}},{key:"stop",value:function(){this.br.refs.$BRReadAloudToolbar.removeClass("visible"),this.br.$(".BRicon.read").removeClass("unread active"),this.sendAnalyticsEvent("Stop"),this.ttsEngine.stop(),this.removeHilites(),this.br.removeProgressPopup()}},{key:"beforeChunkPlay",value:(a=Oe(_e().m(function e(t){return _e().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.maybeFlipToIndex(t.leafIndex);case 1:this.highlightChunk(t),this.scrollToChunk(t);case 2:return e.a(2)}},e,this)})),function(e){return a.apply(this,arguments)})},{key:"sendChunkFinishedAnalyticsEvent",value:function(e){this.sendAnalyticsEvent("ChunkFinished-Words",(0,S.EF)(e.text))}},{key:"maybeFlipToIndex",value:(i=Oe(_e().m(function e(t){return _e().w(function(e){for(;;)switch(e.n){case 0:this.br._isIndexDisplayed(t)||this.br.jumpToIndex(t);case 1:return e.a(2)}},e,this)})),function(e){return i.apply(this,arguments)})},{key:"highlightChunk",value:function(e){var t,n=this,o=e.leafIndex;if(this.removeHilites(),null!==(t=this.br.plugins.translate)&&void 0!==t&&t.translationManager.active){var r=this.br.getActivePageContainerElementsForIndex(o),i=e.chunkIndex;r.forEach(function(e){var t=e.querySelector(".BRtranslateLayer"),r=Array.from(t.childNodes)[i];if(r){var a=[r.offsetHeight,r.offsetTop,r.offsetWidth,r.offsetLeft],s=a[1],u=a[3],l={pageIndex:[{l:u,r:u+a[2],b:s+a[0],t:s}]};(0,ge.KL)("ttsHiliteLayer",l.pageIndex,n.br.book.getPage(o),t)}})}else{this._ttsBoxesByIndex=Le({},o,e.lineRects.map(function(e){var t=be(e,4),n=t[0],o=t[1];return{l:n,r:t[2],b:o,t:t[3]}}));for(var a=function(){var e=be(u[s],2),t=e[0],o=e[1],r=parseFloat(t),i=n.br.book.getPage(r);n.br.getActivePageContainerElementsForIndex(r).forEach(function(e){return(0,ge.KL)("ttsHiliteLayer",o,i,e)})},s=0,u=Object.entries(this._ttsBoxesByIndex);s<u.length;s++)a()}}},{key:"scrollToChunk",value:function(e){var t;this.br.constModeThumb!=this.br.mode&&(null===(t=ve(".pagediv".concat(e.leafIndex," .ttsHiliteLayer rect")).last())||void 0===t||null===(t=t[0])||void 0===t||t.scrollIntoView({block:this.br.constMode1up==this.br.mode||this.br.isFullscreenActive?"center":"nearest",inline:"center",behavior:"smooth"}))}},{key:"removeHilites",value:function(){ve(this.br.getActivePageContainerElements()).find(".ttsHiliteLayer").remove(),this._ttsBoxesByIndex={}}},{key:"sendAnalyticsEvent",value:function(e,t){if(this.br.plugins.archiveAnalytics){var n={},o=this.ttsEngine.opts.bookLanguage;o&&(n.mediaLanguage=o),this.br.plugins.archiveAnalytics.sendEvent("BRReadAloud",e,t,n)}}}],r&&Ee(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,a}(ye.S);null==qe||qe.registerPlugin("tts",Fe)},4160:function(e,t,n){"use strict";n.d(t,{$x:function(){return g},EF:function(){return c},ND:function(){return m},m0:function(){return f},YH:function(){return h}}),n(2675),n(9463),n(2259),n(8706),n(3418),n(3792),n(2062),n(4782),n(2010),n(875),n(6099),n(3362),n(7495),n(8781),n(7764),n(1761),n(2953);var o=[],r={},i={},a={};[["Serbian","српски језик","sr","srp","srp"],["Romanian, Moldavian, Moldovan","Română","ro","ron","rum"],["Sichuan Yi, Nuosu","ꆈꌠ꒿ Nuosuhxop","ii","iii","iii"],["Tahitian","Reo Tahiti","ty","tah","tah"],["Tagalog","Wikang Tagalog","tl","tgl","tgl"],["Yiddish","ייִדיש","yi","yid","yid"],["Akan","Akan","ak","aka","aka"],["Malay","Bahasa Melayu, بهاس ملايو","ms","msa","may"],["Arabic","العربية","ar","ara","ara"],["Norwegian","Norsk","no","nor","nor"],["Ojibwa","ᐊᓂᔑᓈᐯᒧᐎᓐ","oj","oji","oji"],["Fulah","Fulfulde, Pulaar, Pular","ff","ful","ful"],["Persian","فارسی","fa","fas","per"],["Albanian","Shqip","sq","sqi","alb"],["Aymara","aymar aru","ay","aym","aym"],["Azerbaijani","azərbaycan dili","az","aze","aze"],["Chinese","中文 (Zhōngwén), 汉语, 漢語","zh","zho","chi"],["Cree","ᓀᐦᐃᔭᐍᐏᐣ","cr","cre","cre"],["Estonian","eesti, eesti keel","et","est","est"],["Guaraní","Avañe'ẽ","gn","grn","grn"],["Inupiaq","Iñupiaq, Iñupiatun","ik","ipk","ipk"],["Inuktitut","ᐃᓄᒃᑎᑐᑦ","iu","iku","iku"],["Kanuri","Kanuri","kr","kau","kau"],["Komi","коми кыв","kv","kom","kom"],["Kongo","Kikongo","kg","kon","kon"],["Kurdish","Kurdî, أۇزبېك","ku","kur","kur"],["Latvian","latviešu valoda","lv","lav","lav"],["Malagasy","fiteny malagasy","mg","mlg","mlg"],["Mongolian","Монгол хэл","mn","mon","mon"],["Oromo","Afaan Oromoo","om","orm","orm"],["Pashto, Pushto","پښتو","ps","pus","pus"],["Quechua","Runa Simi, Kichwa","qu","que","que"],["Sardinian","sardu","sc","srd","srd"],["Swahili","Kiswahili","sw","swa","swa"],["Uzbek","Oʻzbek, Ўзбек, ","uz","uzb","uzb"],["Zhuang, Chuang","Saɯ cueŋƅ, Saw cuengh","za","zha","zha"],["Bislama","Bislama","bi","bis","bis"],["Norwegian Bokmål","Norsk Bokmål","nb","nob","nob"],["Norwegian Nynorsk","Norsk Nynorsk","nn","nno","nno"],["Indonesian","Bahasa Indonesia","id","ind","ind"],["Twi","Twi","tw","twi","twi"],["Esperanto","Esperanto","eo","epo","epo"],["Interlingua","Interlingua","ia","ina","ina"],["Interlingue","Originally called Occidental; then Interlingue after WWII","ie","ile","ile"],["Ido","Ido","io","ido","ido"],["Volapük","Volapük","vo","vol","vol"],["Bihari languages","भोजपुरी","bh","bih","bih"],["Hebrew (modern)","עברית","he","heb","heb"],["Sanskrit","संस्कृतम्","sa","san","san"],["Church Slavic, Church Slavonic, Old Church Slavonic, Old Slavonic, Old Bulgarian","ѩзыкъ словѣньскъ","cu","chu","chu"],["Pali","पाऴि","pi","pli","pli"],["Avestan","avesta","ae","ave","ave"],["Latin","latine, lingua latina","la","lat","lat"],["Armenian","Հայերեն","hy","hye","arm"],["Swati","SiSwati","ss","ssw","ssw"],["Tibetan","བོད་ཡིག","bo","bod","tib"],["South Ndebele","isiNdebele","nr","nbl","nbl"],["Slovene","Slovenski Jezik, Slovenščina","sl","slv","slv"],["Oriya","ଓଡ଼ିଆ","or","ori","ori"],["North Ndebele","isiNdebele","nd","nde","nde"],["Nauru","Dorerin Naoero","na","nau","nau"],["Maori","te reo Māori","mi","mri","mao"],["Marathi","मराठी","mr","mar","mar"],["Luba-Katanga","Kiluba","lu","lub","lub"],["Rundi","Ikirundi","rn","run","run"],["Central Khmer","ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ","km","khm","khm"],["Western Frisian","Frysk","fy","fry","fry"],["Bengali","বাংলা","bn","ben","ben"],["Avaric","авар мацӀ, магӀарул мацӀ","av","ava","ava"],["Abkhazian","аҧсуа бызшәа, аҧсшәа","ab","abk","abk"],["Afar","Afaraf","aa","aar","aar"],["Afrikaans","Afrikaans","af","afr","afr"],["Amharic","አማርኛ","am","amh","amh"],["Aragonese","aragonés","an","arg","arg"],["Assamese","অসমীয়া","as","asm","asm"],["Bambara","bamanankan","bm","bam","bam"],["Bashkir","башҡорт теле","ba","bak","bak"],["Basque","euskara, euskera","eu","eus","baq"],["Belarusian","беларуская мова","be","bel","bel"],["Bosnian","bosanski jezik","bs","bos","bos"],["Breton","brezhoneg","br","bre","bre"],["Bulgarian","български език","bg","bul","bul"],["Burmese","ဗမာစာ","my","mya","bur"],["Catalan, Valencian","català, valencià","ca","cat","cat"],["Chamorro","Chamoru","ch","cha","cha"],["Chechen","нохчийн мотт","ce","che","che"],["Chichewa, Chewa, Nyanja","chiCheŵa, chinyanja","ny","nya","nya"],["Chuvash","чӑваш чӗлхи","cv","chv","chv"],["Cornish","Kernewek","kw","cor","cor"],["Corsican","corsu, lingua corsa","co","cos","cos"],["Croatian","hrvatski jezik","hr","hrv","hrv"],["Czech","čeština, český jazyk","cs","ces","cze"],["Danish","dansk","da","dan","dan"],["Divehi, Dhivehi, Maldivian","ދިވެހި","dv","div","div"],["Dutch, Flemish","Nederlands, Vlaams","nl","nld","dut"],["Dzongkha","རྫོང་ཁ","dz","dzo","dzo"],["English","English","en","eng","eng"],["Ewe","Eʋegbe","ee","ewe","ewe"],["Faroese","føroyskt","fo","fao","fao"],["Fijian","vosa Vakaviti","fj","fij","fij"],["Finnish","suomi, suomen kieli","fi","fin","fin"],["French","français, langue française","fr","fra","fre"],["Galician","Galego","gl","glg","glg"],["Georgian","ქართული","ka","kat","geo"],["German","Deutsch","de","deu","ger"],["Greek (modern)","ελληνικά","el","ell","gre"],["Gujarati","ગુજરાતી","gu","guj","guj"],["Haitian, Haitian Creole","Kreyòl ayisyen","ht","hat","hat"],["Hausa","(Hausa) هَوُسَ","ha","hau","hau"],["Herero","Otjiherero","hz","her","her"],["Hindi","हिन्दी, हिंदी","hi","hin","hin"],["Hiri Motu","Hiri Motu","ho","hmo","hmo"],["Hungarian","magyar","hu","hun","hun"],["Irish","Gaeilge","ga","gle","gle"],["Igbo","Asụsụ Igbo","ig","ibo","ibo"],["Icelandic","Íslenska","is","isl","ice"],["Italian","Italiano","it","ita","ita"],["Japanese","日本語 (にほんご)","ja","jpn","jpn"],["Javanese","ꦧꦱꦗꦮ, Basa Jawa","jv","jav","jav"],["Kalaallisut, Greenlandic","kalaallisut, kalaallit oqaasii","kl","kal","kal"],["Kannada","ಕನ್ನಡ","kn","kan","kan"],["Kashmiri","कश्मीरी, كشميري","ks","kas","kas"],["Kazakh","қазақ тілі","kk","kaz","kaz"],["Kikuyu, Gikuyu","Gĩkũyũ","ki","kik","kik"],["Kinyarwanda","Ikinyarwanda","rw","kin","kin"],["Kirghiz, Kyrgyz","Кыргызча, Кыргыз тили","ky","kir","kir"],["Korean","한국어","ko","kor","kor"],["Kuanyama, Kwanyama","Kuanyama","kj","kua","kua"],["Luxembourgish, Letzeburgesch","Lëtzebuergesch","lb","ltz","ltz"],["Ganda","Luganda","lg","lug","lug"],["Limburgan, Limburger, Limburgish","Limburgs","li","lim","lim"],["Lingala","Lingála","ln","lin","lin"],["Lao","ພາສາລາວ","lo","lao","lao"],["Lithuanian","lietuvių kalba","lt","lit","lit"],["Manx","Gaelg, Gailck","gv","glv","glv"],["Macedonian","македонски јазик","mk","mkd","mac"],["Malayalam","മലയാളം","ml","mal","mal"],["Maltese","Malti","mt","mlt","mlt"],["Marshallese","Kajin M̧ajeļ","mh","mah","mah"],["Navajo, Navaho","Diné bizaad","nv","nav","nav"],["Nepali","नेपाली","ne","nep","nep"],["Ndonga","Owambo","ng","ndo","ndo"],["Occitan","occitan, lenga d'òc","oc","oci","oci"],["Ossetian, Ossetic","ирон æвзаг","os","oss","oss"],["Panjabi, Punjabi","ਪੰਜਾਬੀ","pa","pan","pan"],["Polish","język polski, polszczyzna","pl","pol","pol"],["Portuguese","Português","pt","por","por"],["Romansh","Rumantsch Grischun","rm","roh","roh"],["Russian","русский","ru","rus","rus"],["Sindhi","सिन्धी, سنڌي، سندھی","sd","snd","snd"],["Northern Sami","Davvisámegiella","se","sme","sme"],["Samoan","gagana fa'a Samoa","sm","smo","smo"],["Sango","yângâ tî sängö","sg","sag","sag"],["Gaelic, Scottish Gaelic","Gàidhlig","gd","gla","gla"],["Shona","chiShona","sn","sna","sna"],["Sinhala, Sinhalese","සිංහල","si","sin","sin"],["Slovak","Slovenčina, Slovenský Jazyk","sk","slk","slo"],["Somali","Soomaaliga, af Soomaali","so","som","som"],["Southern Sotho","Sesotho","st","sot","sot"],["Spanish, Castilian","Español","es","spa","spa"],["Sundanese","Basa Sunda","su","sun","sun"],["Swedish","Svenska","sv","swe","swe"],["Tamil","தமிழ்","ta","tam","tam"],["Telugu","తెలుగు","te","tel","tel"],["Tajik","тоҷикӣ, toçikī, تاجیکی","tg","tgk","tgk"],["Thai","ไทย","th","tha","tha"],["Tigrinya","ትግርኛ","ti","tir","tir"],["Turkmen","Türkmen, Түркмен","tk","tuk","tuk"],["Tswana","Setswana","tn","tsn","tsn"],["Tongan (Tonga Islands)","Faka Tonga","to","ton","ton"],["Turkish","Türkçe","tr","tur","tur"],["Tsonga","Xitsonga","ts","tso","tso"],["Tatar","татар теле, tatar tele","tt","tat","tat"],["Uighur, Uyghur","ئۇيغۇرچە, Uyghurche","ug","uig","uig"],["Ukrainian","Українська","uk","ukr","ukr"],["Urdu","اردو","ur","urd","urd"],["Venda","Tshivenḓa","ve","ven","ven"],["Vietnamese","Tiếng Việt","vi","vie","vie"],["Walloon","Walon","wa","wln","wln"],["Welsh","Cymraeg","cy","cym","wel"],["Wolof","Wollof","wo","wol","wol"],["Xhosa","isiXhosa","xh","xho","xho"],["Yoruba","Yorùbá","yo","yor","yor"],["Zulu","isiZulu","zu","zul","zul"]].forEach(e=>{var t={name:e[0],nativeName:e[1],iso639_1:e[2],iso639_2T:e[3],iso639_2B:e[4]};r[e[2]]=i[e[3]]=a[e[4]]=t,o.push(t)});var s=o;function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function c(e){var t=e.match(/\S+/g);return t?t.length:0}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/android/i.test(e)}var d={"zh-hans":"中文 (Zhōngwén)"};function h(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?p(e=e.toLowerCase(),["iso639_1"],t)||p(e,["iso639_2T"],t)||p(e,["iso639_2B","nativeName","name"],t):null}function p(e,t,n){var o,r=u(s);try{for(r.s();!(o=r.n()).done;){var i,a=o.value,l=u(t);try{for(l.s();!(i=l.n()).done;)if(-1!=a[i.value].split(", ").map(function(e){return e.toLowerCase()}).indexOf(e))return n?"".concat(a.nativeName.split(", ")[0]," (").concat(a.iso639_1,")"):a.iso639_1}catch(e){l.e(e)}finally{l.f()}}}catch(e){r.e(e)}finally{r.f()}return d[e]?"".concat(d[e]," (").concat(e,")"):null}function m(){try{return!!window.localStorage}catch(e){return!1}}var g=-1!=location.toString().indexOf("_debugReadAloud=true")},9073:function(e,t,n){"use strict";function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i;return null==e?void 0:e.replace(/\{\{([^}]*?)\}\}/g,function(e,i){if(!i)return e;var a,s=function(e){if(Array.isArray(e))return e}(a=i.split("|").map(function(e){return e.trim()}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),u=s[0],l=o(s).slice(1);if(!(u in n)&&!(u in t))return e;var c=u in n?n[u]:u in t?t[u]:null;return l.map(function(e){return r[e]}).reduce(function(e,t){return t(e)},c&&c.toString())})}n.d(t,{g:function(){return r}}),n(2675),n(9463),n(2259),n(3418),n(3792),n(2062),n(2712),n(4782),n(2010),n(6099),n(7495),n(8781),n(7764),n(5440),n(2762),n(2953);var i={urlencode:encodeURIComponent}}},function(e){e(e.s=3638)}]);
2
+ (self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[51],{706:function(e,t,n){"use strict";var o=n(350).PROPER,r=n(9039),i=n(7452);e.exports=function(e){return r(function(){return!!i[e]()||"​…᠎"!=="​…᠎"[e]()||o&&i[e].name!==e})}},1041:function(e,t,n){"use strict";function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function r(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,i(o.key),o)}}function i(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}n.d(t,{S:function(){return a}}),n(2675),n(9463),n(2259),n(5700),n(3792),n(9572),n(8130),n(9085),n(6099),n(7764),n(2953);var a=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.br=t,this.options},(t=[{key:"setup",value:function(e){this.options=Object.assign({},this.options,e)}},{key:"init",value:function(){}},{key:"_configurePageContainer",value:function(e){}},{key:"_configureToolbar",value:function(e){}},{key:"_bindNavigationHandlers",value:function(){}},{key:"extendNavBar",value:function(e){}}])&&r(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},1792:function(e,t,n){var o,r;o=[n(1669)],void 0===(r=function(e){return function(e){"use strict";function t(e){void 0===e&&(e=window.navigator.userAgent),e=e.toLowerCase();var t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[],n=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(silk)/.exec(e)||/(android)/.exec(e)||/(win)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||/(playbook)/.exec(e)||/(bb)/.exec(e)||/(blackberry)/.exec(e)||[],o={},r={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",versionNumber:t[4]||t[2]||"0",platform:n[0]||""};if(r.browser&&(o[r.browser]=!0,o.version=r.version,o.versionNumber=parseInt(r.versionNumber,10)),r.platform&&(o[r.platform]=!0),(o.android||o.bb||o.blackberry||o.ipad||o.iphone||o.ipod||o.kindle||o.playbook||o.silk||o["windows phone"])&&(o.mobile=!0),(o.cros||o.mac||o.linux||o.win)&&(o.desktop=!0),(o.chrome||o.opr||o.safari)&&(o.webkit=!0),o.rv||o.iemobile){var i="msie";r.browser=i,o[i]=!0}if(o.edge){delete o.edge;var a="msedge";r.browser=a,o[a]=!0}if(o.safari&&o.blackberry){var s="blackberry";r.browser=s,o[s]=!0}if(o.safari&&o.playbook){var u="playbook";r.browser=u,o[u]=!0}if(o.bb){var l="blackberry";r.browser=l,o[l]=!0}if(o.opr){var c="opera";r.browser=c,o[c]=!0}if(o.safari&&o.android){var f="android";r.browser=f,o[f]=!0}if(o.safari&&o.kindle){var d="kindle";r.browser=d,o[d]=!0}if(o.safari&&o.silk){var h="silk";r.browser=h,o[h]=!0}return o.name=r.browser,o.platform=r.platform,o}return window.jQBrowser=t(window.navigator.userAgent),window.jQBrowser.uaMatch=t,e&&(e.browser=window.jQBrowser),window.jQBrowser}(e)}.apply(t,o))||(e.exports=r)},2443:function(e,t,n){var o;e=n.nmd(e),function(r,i){"use strict";if(!r||!r.document)throw new Error("SoundManager requires a browser with window and document objects.");var a=null;function s(e,t){this.setupOptions={url:e||null,flashVersion:8,debugMode:!0,debugFlash:!1,useConsole:!0,consoleOnly:!0,waitForWindowLoad:!1,bgColor:"#ffffff",useHighPerformance:!1,flashPollingInterval:null,html5PollingInterval:null,flashLoadTimeout:1e3,wmode:null,allowScriptAccess:"always",useFlashBlock:!1,useHTML5Audio:!0,forceUseGlobalHTML5Audio:!1,ignoreMobileRestrictions:!1,html5Test:/^(probably|maybe)$/i,preferFlash:!1,noSWFCache:!1,idPrefix:"sound"},this.defaultOptions={autoLoad:!1,autoPlay:!1,from:null,loops:1,onid3:null,onerror:null,onload:null,whileloading:null,onplay:null,onpause:null,onresume:null,whileplaying:null,onposition:null,onstop:null,onfinish:null,multiShot:!0,multiShotEvents:!1,position:null,pan:0,playbackRate:1,stream:!0,to:null,type:null,usePolicyFile:!1,volume:100},this.flash9Options={onfailure:null,isMovieStar:null,usePeakData:!1,useWaveformData:!1,useEQData:!1,onbufferchange:null,ondataerror:null},this.movieStarOptions={bufferTime:3,serverURL:null,onconnect:null,duration:null},this.audioFormats={mp3:{type:['audio/mpeg; codecs="mp3"',"audio/mpeg","audio/mp3","audio/MPA","audio/mpa-robust"],required:!0},mp4:{related:["aac","m4a","m4b"],type:['audio/mp4; codecs="mp4a.40.2"',"audio/aac","audio/x-m4a","audio/MP4A-LATM","audio/mpeg4-generic"],required:!1},ogg:{type:["audio/ogg; codecs=vorbis"],required:!1},opus:{type:["audio/ogg; codecs=opus","audio/opus"],required:!1},wav:{type:['audio/wav; codecs="1"',"audio/wav","audio/wave","audio/x-wav"],required:!1},flac:{type:["audio/flac"],required:!1}},this.movieID="sm2-container",this.id=t||"sm2movie",this.debugID="soundmanager-debug",this.debugURLParam=/([#?&])debug=1/i,this.versionNumber="V2.97a.20170601",this.version=null,this.movieURL=null,this.altURL=null,this.swfLoaded=!1,this.enabled=!1,this.oMC=null,this.sounds={},this.soundIDs=[],this.muted=!1,this.didFlashBlock=!1,this.filePattern=null,this.filePatterns={flash8:/\.mp3(\?.*)?$/i,flash9:/\.mp3(\?.*)?$/i},this.features={buffering:!1,peakData:!1,waveformData:!1,eqData:!1,movieStar:!1},this.sandbox={type:null,types:{remote:"remote (domain-based) rules",localWithFile:"local with file access (no internet access)",localWithNetwork:"local with network (internet access only, no local access)",localTrusted:"local, trusted (local+internet access)"},description:null,noRemote:null,noLocal:null},this.html5={usingFlash:null},this.flash={},this.html5Only=!1,this.ignoreFlash=!1;var n,o,a,s,u,l,c,f,d,h,p,m,g,y,v,A,b,w,_,k,S,O,P,E,T,M,I,D,L,C,q,F,R,j,x,V,B,H,U,N,G,Q,K,W,z,J,Z,Y,X,$,ee,te,ne,oe,re,ie,ae,se,ue,le,ce,fe,de,he,pe,me=this,ge=null,ye=null,ve="soundManager",Ae=ve+": ",be=navigator.userAgent,we=r.location.href.toString(),_e=document,ke=[],Se=!0,Oe=!1,Pe=!1,Ee=!1,Te=!1,Me=!1,Ie=0,De=["log","info","warn","error"],Le=null,Ce=null,qe=!1,Fe=!1,Re=0,je=null,xe=[],Ve=null,Be=Array.prototype.slice,He=!1,Ue=0,Ne=1e3,Ge=be.match(/(ipad|iphone|ipod)/i),Qe=be.match(/android/i),Ke=be.match(/msie|trident/i),We=be.match(/webkit/i),ze=be.match(/safari/i)&&!be.match(/chrome/i),Je=be.match(/opera/i),Ze=be.match(/(mobile|pre\/|xoom)/i)||Ge||Qe,Ye=!we.match(/usehtml5audio/i)&&!we.match(/sm2-ignorebadua/i)&&ze&&!be.match(/silk/i)&&be.match(/OS\sX\s10_6_([3-7])/i),Xe=r.console!==i&&console.log!==i,$e=_e.hasFocus!==i?_e.hasFocus():null,et=ze&&(_e.hasFocus===i||!_e.hasFocus()),tt=!et,nt=/(mp3|mp4|mpa|m4a|m4b)/i,ot="about:blank",rt=_e.location?_e.location.protocol.match(/http/i):null,it=rt?"":"//",at=/^\s*audio\/(?:x-)?(?:mpeg4|aac|flv|mov|mp4|m4v|m4a|m4b|mp4v|3gp|3g2)\s*(?:$|;)/i,st=["mpeg4","aac","flv","mov","mp4","m4v","f4v","m4a","m4b","mp4v","3gp","3g2"],ut=new RegExp("\\.("+st.join("|")+")(\\?.*)?$","i");function lt(e){return me.preferFlash&&se&&!me.ignoreFlash&&me.flash[e]!==i&&me.flash[e]}function ct(e){return function(t){var n,o=this._s;return o&&o._a?n=e.call(this,t):(o&&o.id?me._wD(o.id+": Ignoring "+t.type):me._wD("HTML5::Ignoring "+t.type),n=null),n}}this.mimePattern=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i,this.useAltURL=!rt,B={swfBox:"sm2-object-box",swfDefault:"movieContainer",swfError:"swf_error",swfTimedout:"swf_timedout",swfLoaded:"swf_loaded",swfUnblocked:"swf_unblocked",sm2Debug:"sm2_debug",highPerf:"high_performance",flashDebug:"flash_debug"},ee=[null,"MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED"],this.hasHTML5=function(){try{return Audio!==i&&(Je&&opera!==i&&opera.version()<10?new Audio(null):new Audio).canPlayType!==i}catch(e){return!1}}(),this.setup=function(e){var t=!me.url;return e!==i&&Ee&&Ve&&me.ok()&&(e.flashVersion!==i||e.url!==i||e.html5Test!==i)&&G(j("setupLate")),p(e),He||(Ze?me.setupOptions.ignoreMobileRestrictions&&!me.setupOptions.forceUseGlobalHTML5Audio||(xe.push(S.globalHTML5),He=!0):me.setupOptions.forceUseGlobalHTML5Audio&&(xe.push(S.globalHTML5),He=!0)),!pe&&Ze&&(me.setupOptions.ignoreMobileRestrictions?xe.push(S.ignoreMobile):(me.setupOptions.useHTML5Audio&&!me.setupOptions.preferFlash||me._wD(S.mobileUA),me.setupOptions.useHTML5Audio=!0,me.setupOptions.preferFlash=!1,Ge?me.ignoreFlash=!0:(Qe&&!be.match(/android\s2\.3/i)||!Qe)&&(me._wD(S.globalHTML5),He=!0))),e&&(t&&T&&e.url!==i&&me.beginDelayedInit(),T||e.url===i||"complete"!==_e.readyState||setTimeout(P,1)),pe=!0,me},this.ok=function(){return Ve?Ee&&!Te:me.useHTML5Audio&&me.hasHTML5},this.supported=this.ok,this.getMovie=function(e){return o(e)||_e[e]||r[e]},this.createSound=function(e,t){var o,r,a,s=null;if(r=(o=ve+".createSound(): ")+j(Ee?"notOK":"notReady"),!Ee||!me.ok())return G(r),!1;if(t!==i&&(e={id:e,url:t}),(a=h(e)).url=J(a.url),a.id===i&&(a.id=me.setupOptions.idPrefix+Ue++),a.id.toString().charAt(0).match(/^[0-9]$/)&&me._wD(o+j("badID",a.id),2),me._wD(o+a.id+(a.url?" ("+a.url+")":""),1),Q(a.id,!0))return me._wD(o+a.id+" exists",1),me.sounds[a.id];function u(){return a=U(a),me.sounds[a.id]=new n(a),me.soundIDs.push(a.id),me.sounds[a.id]}if(X(a))s=u(),me.html5Only||me._wD(a.id+": Using HTML5"),s._setup_html5(a);else{if(me.html5Only)return me._wD(a.id+": No HTML5 support for this sound, and no Flash. Exiting."),u();if(me.html5.usingFlash&&a.url&&a.url.match(/data:/i))return me._wD(a.id+": data: URIs not supported via Flash. Exiting."),u();l>8&&(null===a.isMovieStar&&(a.isMovieStar=!!(a.serverURL||a.type&&a.type.match(at)||a.url&&a.url.match(ut))),a.isMovieStar&&(me._wD(o+"using MovieStar handling"),a.loops>1&&f("noNSLoop"))),a=N(a,o),s=u(),8===l?ye._createSound(a.id,a.loops||1,a.usePolicyFile):(ye._createSound(a.id,a.url,a.usePeakData,a.useWaveformData,a.useEQData,a.isMovieStar,!!a.isMovieStar&&a.bufferTime,a.loops||1,a.serverURL,a.duration||null,a.autoPlay,!0,a.autoLoad,a.usePolicyFile),a.serverURL||(s.connected=!0,a.onconnect&&a.onconnect.apply(s))),a.serverURL||!a.autoLoad&&!a.autoPlay||s.load(a)}return!a.serverURL&&a.autoPlay&&s.play(),s},this.destroySound=function(e,t){if(!Q(e))return!1;var n,o=me.sounds[e];for(o.stop(),o._iO={},o.unload(),n=0;n<me.soundIDs.length;n++)if(me.soundIDs[n]===e){me.soundIDs.splice(n,1);break}return t||o.destruct(!0),o=null,delete me.sounds[e],!0},this.load=function(e,t){return!!Q(e)&&me.sounds[e].load(t)},this.unload=function(e){return!!Q(e)&&me.sounds[e].unload()},this.onPosition=function(e,t,n,o){return!!Q(e)&&me.sounds[e].onposition(t,n,o)},this.onposition=this.onPosition,this.clearOnPosition=function(e,t,n){return!!Q(e)&&me.sounds[e].clearOnPosition(t,n)},this.play=function(e,t){var n=null,o=t&&!(t instanceof Object);if(!Ee||!me.ok())return G(ve+".play(): "+j(Ee?"notOK":"notReady")),!1;if(Q(e,o))o&&(t={url:t});else{if(!o)return!1;o&&(t={url:t}),t&&t.url&&(me._wD(ve+'.play(): Attempting to create "'+e+'"',1),t.id=e,n=me.createSound(t).play())}return null===n&&(n=me.sounds[e].play(t)),n},this.start=this.play,this.setPlaybackRate=function(e,t,n){return!!Q(e)&&me.sounds[e].setPlaybackRate(t,n)},this.setPosition=function(e,t){return!!Q(e)&&me.sounds[e].setPosition(t)},this.stop=function(e){return!!Q(e)&&(me._wD(ve+".stop("+e+")",1),me.sounds[e].stop())},this.stopAll=function(){var e;for(e in me._wD(ve+".stopAll()",1),me.sounds)me.sounds.hasOwnProperty(e)&&me.sounds[e].stop()},this.pause=function(e){return!!Q(e)&&me.sounds[e].pause()},this.pauseAll=function(){var e;for(e=me.soundIDs.length-1;e>=0;e--)me.sounds[me.soundIDs[e]].pause()},this.resume=function(e){return!!Q(e)&&me.sounds[e].resume()},this.resumeAll=function(){var e;for(e=me.soundIDs.length-1;e>=0;e--)me.sounds[me.soundIDs[e]].resume()},this.togglePause=function(e){return!!Q(e)&&me.sounds[e].togglePause()},this.setPan=function(e,t){return!!Q(e)&&me.sounds[e].setPan(t)},this.setVolume=function(e,t){var n,o;if(e!==i&&!isNaN(e)&&t===i){for(n=0,o=me.soundIDs.length;n<o;n++)me.sounds[me.soundIDs[n]].setVolume(e);return!1}return!!Q(e)&&me.sounds[e].setVolume(t)},this.mute=function(e){var t=0;if(e instanceof String&&(e=null),e)return!!Q(e)&&(me._wD(ve+'.mute(): Muting "'+e+'"'),me.sounds[e].mute());for(me._wD(ve+".mute(): Muting all sounds"),t=me.soundIDs.length-1;t>=0;t--)me.sounds[me.soundIDs[t]].mute();return me.muted=!0,!0},this.muteAll=function(){me.mute()},this.unmute=function(e){var t;if(e instanceof String&&(e=null),e)return!!Q(e)&&(me._wD(ve+'.unmute(): Unmuting "'+e+'"'),me.sounds[e].unmute());for(me._wD(ve+".unmute(): Unmuting all sounds"),t=me.soundIDs.length-1;t>=0;t--)me.sounds[me.soundIDs[t]].unmute();return me.muted=!1,!0},this.unmuteAll=function(){me.unmute()},this.toggleMute=function(e){return!!Q(e)&&me.sounds[e].toggleMute()},this.getMemoryUse=function(){var e=0;return ye&&8!==l&&(e=parseInt(ye._getMemoryUse(),10)),e},this.disable=function(e){var t;if(e===i&&(e=!1),Te)return!1;for(Te=!0,f("shutdown",1),t=me.soundIDs.length-1;t>=0;t--)q(me.sounds[me.soundIDs[t]]);return q(me),d(e),ie.remove(r,"load",v),!0},this.canPlayMIME=function(e){var t;return me.hasHTML5&&(t=$({type:e})),!t&&Ve&&(t=e&&me.ok()?!!(l>8&&e.match(at)||e.match(me.mimePattern)):null),t},this.canPlayURL=function(e){var t;return me.hasHTML5&&(t=$({url:e})),!t&&Ve&&(t=e&&me.ok()?!!e.match(me.filePattern):null),t},this.canPlayLink=function(e){return!(e.type===i||!e.type||!me.canPlayMIME(e.type))||me.canPlayURL(e.href)},this.getSoundById=function(e,t){if(!e)return null;var n=me.sounds[e];return n||t||me._wD(ve+'.getSoundById(): Sound "'+e+'" not found.',2),n},this.onready=function(e,t){var n="onready";if("function"!=typeof e)throw j("needFunction",n);return Ee&&me._wD(j("queue",n)),t||(t=r),g(n,e,t),y(),!0},this.ontimeout=function(e,t){var n="ontimeout";if("function"!=typeof e)throw j("needFunction",n);return Ee&&me._wD(j("queue",n)),t||(t=r),g(n,e,t),y({type:n}),!0},this._writeDebug=function(e,t){var n,r;return!(!me.setupOptions.debugMode||!(Xe&&me.useConsole&&(t&&"object"==typeof t?console.log(e,t):De[t]!==i?console[De[t]](e):console.log(e),me.consoleOnly))&&(!(n=o("soundmanager-debug"))||(r=_e.createElement("div"),++Ie%2==0&&(r.className="sm2-alt"),t=t===i?0:parseInt(t,10),r.appendChild(_e.createTextNode(e)),t&&(t>=2&&(r.style.fontWeight="bold"),3===t&&(r.style.color="#ff3333")),n.insertBefore(r,n.firstChild),n=null,0)))},-1!==we.indexOf("sm2-debug=alert")&&(this._writeDebug=function(e){r.alert(e)}),this._wD=this._writeDebug,this._debug=function(){var e,t;for(f("currentObj",1),e=0,t=me.soundIDs.length;e<t;e++)me.sounds[me.soundIDs[e]]._debug()},this.reboot=function(e,t){var n,o,i;for(me.soundIDs.length&&me._wD("Destroying "+me.soundIDs.length+" SMSound object"+(1!==me.soundIDs.length?"s":"")+"..."),n=me.soundIDs.length-1;n>=0;n--)me.sounds[me.soundIDs[n]].destruct();if(ye)try{Ke&&(Ce=ye.innerHTML),Le=ye.parentNode.removeChild(ye)}catch(e){f("badRemove",2)}if(Ce=Le=Ve=ye=null,me.enabled=T=Ee=qe=Fe=Oe=Pe=Te=He=me.swfLoaded=!1,me.soundIDs=[],me.sounds={},Ue=0,pe=!1,e)ke=[];else for(n in ke)if(ke.hasOwnProperty(n))for(o=0,i=ke[n].length;o<i;o++)ke[n][o].fired=!1;return t||me._wD(ve+": Rebooting..."),me.html5={usingFlash:null},me.flash={},me.html5Only=!1,me.ignoreFlash=!1,r.setTimeout(function(){t||me.beginDelayedInit()},20),me},this.reset=function(){return f("reset"),me.reboot(!0,!0)},this.getMoviePercent=function(){return ye&&"PercentLoaded"in ye?ye.PercentLoaded():null},this.beginDelayedInit=function(){Me=!0,P(),setTimeout(function(){return!Fe&&(I(),O(),Fe=!0,!0)},20),A()},this.destruct=function(){me._wD(ve+".destruct()"),me.disable(!0)},n=function(e){var t,n,o,r,a,s,u,d,p,m,g=this,y=!1,v=[],A=0,b=null;p={duration:null,time:null},this.id=e.id,this.sID=this.id,this.url=e.url,this.options=h(e),this.instanceOptions=this.options,this._iO=this.instanceOptions,this.pan=this.options.pan,this.volume=this.options.volume,this.isHTML5=!1,this._a=null,m=!this.url,this.id3={},this._debug=function(){me._wD(g.id+": Merged options:",g.options)},this.load=function(e){var t;if(e!==i?g._iO=h(e,g.options):(e=g.options,g._iO=e,b&&b!==g.url&&(f("manURL"),g._iO.url=g.url,g.url=null)),g._iO.url||(g._iO.url=g.url),g._iO.url=J(g._iO.url),g.instanceOptions=g._iO,t=g._iO,me._wD(g.id+": load ("+t.url+")"),!t.url&&!g.url)return me._wD(g.id+": load(): url is unassigned. Exiting.",2),g;if(g.isHTML5||8!==l||g.url||t.autoPlay||me._wD(g.id+": Flash 8 load() limitation: Wait for onload() before calling play().",1),t.url===g.url&&0!==g.readyState&&2!==g.readyState)return f("onURL",1),3===g.readyState&&t.onload&&he(g,function(){t.onload.apply(g,[!!g.duration])}),g;if(g.loaded=!1,g.readyState=1,g.playState=0,g.id3={},X(t))g._setup_html5(t)._called_load?me._wD(g.id+": Ignoring request to load again"):(g._html5_canplay=!1,g.url!==t.url&&(me._wD(f("manURL")+": "+t.url),g._a.src=t.url,g.setPosition(0)),g._a.autobuffer="auto",g._a.preload="auto",g._a._called_load=!0);else{if(me.html5Only)return me._wD(g.id+": No flash support. Exiting."),g;if(g._iO.url&&g._iO.url.match(/data:/i))return me._wD(g.id+": data: URIs not supported via Flash. Exiting."),g;try{g.isHTML5=!1,g._iO=N(U(t)),g._iO.autoPlay&&(g._iO.position||g._iO.from)&&(me._wD(g.id+": Disabling autoPlay because of non-zero offset case"),g._iO.autoPlay=!1),t=g._iO,8===l?ye._load(g.id,t.url,t.stream,t.autoPlay,t.usePolicyFile):ye._load(g.id,t.url,!!t.stream,!!t.autoPlay,t.loops||1,!!t.autoLoad,t.usePolicyFile)}catch(e){f("smError",2),c("onload",!1),D({type:"SMSOUND_LOAD_JS_EXCEPTION",fatal:!0})}}return g.url=t.url,g},this.unload=function(){return 0!==g.readyState&&(me._wD(g.id+": unload()"),g.isHTML5?(r(),g._a&&(g._a.pause(),b=ne(g._a))):8===l?ye._unload(g.id,ot):ye._unload(g.id),t()),g},this.destruct=function(e){me._wD(g.id+": Destruct"),g.isHTML5?(r(),g._a&&(g._a.pause(),ne(g._a),He||o(),g._a._s=null,g._a=null)):(g._iO.onfailure=null,ye._destroySound(g.id)),e||me.destroySound(g.id,!0)},this.play=function(e,t){var n,o,r,u,c,f,p=!0;if(n=g.id+": play(): ",t=t===i||t,e||(e={}),g.url&&(g._iO.url=g.url),g._iO=h(g._iO,g.options),g._iO=h(e,g._iO),g._iO.url=J(g._iO.url),g.instanceOptions=g._iO,!g.isHTML5&&g._iO.serverURL&&!g.connected)return g.getAutoPlay()||(me._wD(n+" Netstream not connected yet - setting autoPlay"),g.setAutoPlay(!0)),g;if(X(g._iO)&&(g._setup_html5(g._iO),a()),1===g.playState&&!g.paused){if(!g._iO.multiShot)return me._wD(n+"Already playing (one-shot)",1),g.isHTML5&&g.setPosition(g._iO.position),g;me._wD(n+"Already playing (multi-shot)",1)}if(e.url&&e.url!==g.url&&(g.readyState||g.isHTML5||8!==l||!m?g.load(g._iO):m=!1),g.loaded)me._wD(n.substr(0,n.lastIndexOf(":")));else if(0===g.readyState){if(me._wD(n+"Attempting to load"),g.isHTML5||me.html5Only){if(!g.isHTML5)return me._wD(n+"Unsupported type. Exiting."),g;g.load(g._iO)}else g._iO.autoPlay=!0,g.load(g._iO);g.instanceOptions=g._iO}else{if(2===g.readyState)return me._wD(n+"Could not load - exiting",2),g;me._wD(n+"Loading - attempting to play...")}return!g.isHTML5&&9===l&&g.position>0&&g.position===g.duration&&(me._wD(n+"Sound at end, resetting to position: 0"),e.position=0),g.paused&&g.position>=0&&(!g._iO.serverURL||g.position>0)?(me._wD(n+"Resuming from paused state",1),g.resume()):(g._iO=h(e,g._iO),(!g.isHTML5&&null!==g._iO.position&&g._iO.position>0||null!==g._iO.from&&g._iO.from>0||null!==g._iO.to)&&0===g.instanceCount&&0===g.playState&&!g._iO.serverURL&&(r=function(){g._iO=h(e,g._iO),g.play(g._iO)},g.isHTML5&&!g._html5_canplay?(me._wD(n+"Beginning load for non-zero offset case"),g.load({_oncanplay:r})):g.isHTML5||g.loaded||g.readyState&&2===g.readyState||(me._wD(n+"Preloading for non-zero offset case"),g.load({onload:r})),g._iO=d()),(!g.instanceCount||g._iO.multiShotEvents||g.isHTML5&&g._iO.multiShot&&!He||!g.isHTML5&&l>8&&!g.getAutoPlay())&&g.instanceCount++,g._iO.onposition&&0===g.playState&&s(g),g.playState=1,g.paused=!1,g.position=g._iO.position===i||isNaN(g._iO.position)?0:g._iO.position,g.isHTML5||(g._iO=N(U(g._iO))),g._iO.onplay&&t&&(g._iO.onplay.apply(g),y=!0),g.setVolume(g._iO.volume,!0),g.setPan(g._iO.pan,!0),1!==g._iO.playbackRate&&g.setPlaybackRate(g._iO.playbackRate),g.isHTML5?g.instanceCount<2?(a(),o=g._setup_html5(),g.setPosition(g._iO.position),o.play()):(me._wD(g.id+": Cloning Audio() for instance #"+g.instanceCount+"..."),u=new Audio(g._iO.url),c=function(){ie.remove(u,"ended",c),g._onfinish(g),ne(u),u=null},f=function(){ie.remove(u,"canplay",f);try{u.currentTime=g._iO.position/Ne}catch(e){G(g.id+": multiShot play() failed to apply position of "+g._iO.position/Ne)}u.play()},ie.add(u,"ended",c),g._iO.volume!==i&&(u.volume=Math.max(0,Math.min(1,g._iO.volume/100))),g.muted&&(u.muted=!0),g._iO.position?ie.add(u,"canplay",f):u.play()):(p=ye._start(g.id,g._iO.loops||1,9===l?g.position:g.position/Ne,g._iO.multiShot||!1),9!==l||p||(me._wD(n+"No sound hardware, or 32-sound ceiling hit",2),g._iO.onplayerror&&g._iO.onplayerror.apply(g)))),g},this.start=this.play,this.stop=function(e){var t,n=g._iO;return 1===g.playState&&(me._wD(g.id+": stop()"),g._onbufferchange(0),g._resetOnPosition(0),g.paused=!1,g.isHTML5||(g.playState=0),u(),n.to&&g.clearOnPosition(n.to),g.isHTML5?g._a&&(t=g.position,g.setPosition(0),g.position=t,g._a.pause(),g.playState=0,g._onTimer(),r()):(ye._stop(g.id,e),n.serverURL&&g.unload()),g.instanceCount=0,g._iO={},n.onstop&&n.onstop.apply(g)),g},this.setAutoPlay=function(e){me._wD(g.id+": Autoplay turned "+(e?"on":"off")),g._iO.autoPlay=e,g.isHTML5||(ye._setAutoPlay(g.id,e),e&&(g.instanceCount||1!==g.readyState||(g.instanceCount++,me._wD(g.id+": Incremented instance count to "+g.instanceCount))))},this.getAutoPlay=function(){return g._iO.autoPlay},this.setPlaybackRate=function(e){var t=Math.max(.5,Math.min(4,e));if(t!==e&&me._wD(g.id+": setPlaybackRate("+e+"): limiting rate to "+t,2),g.isHTML5)try{g._iO.playbackRate=t,g._a.playbackRate=t}catch(e){me._wD(g.id+": setPlaybackRate("+t+") failed: "+e.message,2)}return g},this.setPosition=function(e){e===i&&(e=0);var t,n,o=g.isHTML5?Math.max(e,0):Math.min(g.duration||g._iO.duration,Math.max(e,0));if(g.position=o,n=g.position/Ne,g._resetOnPosition(g.position),g._iO.position=o,g.isHTML5){if(g._a){if(g._html5_canplay){if(g._a.currentTime.toFixed(3)!==n.toFixed(3)){me._wD(g.id+": setPosition("+n+")");try{g._a.currentTime=n,(0===g.playState||g.paused)&&g._a.pause()}catch(e){me._wD(g.id+": setPosition("+n+") failed: "+e.message,2)}}}else if(n)return me._wD(g.id+": setPosition("+n+"): Cannot seek yet, sound not ready",2),g;g.paused&&g._onTimer(!0)}}else t=9===l?g.position:n,g.readyState&&2!==g.readyState&&ye._setPosition(g.id,t,g.paused||!g.playState,g._iO.multiShot);return g},this.pause=function(e){return g.paused||0===g.playState&&1!==g.readyState||(me._wD(g.id+": pause()"),g.paused=!0,g.isHTML5?(g._setup_html5().pause(),r()):(e||e===i)&&ye._pause(g.id,g._iO.multiShot),g._iO.onpause&&g._iO.onpause.apply(g)),g},this.resume=function(){var e=g._iO;return g.paused?(me._wD(g.id+": resume()"),g.paused=!1,g.playState=1,g.isHTML5?(g._setup_html5().play(),a()):(e.isMovieStar&&!e.serverURL&&g.setPosition(g.position),ye._pause(g.id,e.multiShot)),!y&&e.onplay?(e.onplay.apply(g),y=!0):e.onresume&&e.onresume.apply(g),g):g},this.togglePause=function(){return me._wD(g.id+": togglePause()"),0===g.playState?(g.play({position:9!==l||g.isHTML5?g.position/Ne:g.position}),g):(g.paused?g.resume():g.pause(),g)},this.setPan=function(e,t){return e===i&&(e=0),t===i&&(t=!1),g.isHTML5||ye._setPan(g.id,e),g._iO.pan=e,t||(g.pan=e,g.options.pan=e),g},this.setVolume=function(e,t){return e===i&&(e=100),t===i&&(t=!1),g.isHTML5?g._a&&(me.muted&&!g.muted&&(g.muted=!0,g._a.muted=!0),g._a.volume=Math.max(0,Math.min(1,e/100))):ye._setVolume(g.id,me.muted&&!g.muted||g.muted?0:e),g._iO.volume=e,t||(g.volume=e,g.options.volume=e),g},this.mute=function(){return g.muted=!0,g.isHTML5?g._a&&(g._a.muted=!0):ye._setVolume(g.id,0),g},this.unmute=function(){g.muted=!1;var e=g._iO.volume!==i;return g.isHTML5?g._a&&(g._a.muted=!1):ye._setVolume(g.id,e?g._iO.volume:g.options.volume),g},this.toggleMute=function(){return g.muted?g.unmute():g.mute()},this.onPosition=function(e,t,n){return v.push({position:parseInt(e,10),method:t,scope:n!==i?n:g,fired:!1}),g},this.onposition=this.onPosition,this.clearOnPosition=function(e,t){var n;if(e=parseInt(e,10),!isNaN(e))for(n=0;n<v.length;n++)e===v[n].position&&(t&&t!==v[n].method||(v[n].fired&&A--,v.splice(n,1)))},this._processOnPosition=function(){var e,t,n=v.length;if(!n||!g.playState||A>=n)return!1;for(e=n-1;e>=0;e--)!(t=v[e]).fired&&g.position>=t.position&&(t.fired=!0,A++,t.method.apply(t.scope,[t.position]),n=v.length);return!0},this._resetOnPosition=function(e){var t,n,o=v.length;if(!o)return!1;for(t=o-1;t>=0;t--)(n=v[t]).fired&&e<=n.position&&(n.fired=!1,A--);return!0},d=function(){var e,t,n=g._iO,o=n.from,r=n.to;return t=function(){me._wD(g.id+': "To" time of '+r+" reached."),g.clearOnPosition(r,t),g.stop()},e=function(){me._wD(g.id+': Playing "from" '+o),null===r||isNaN(r)||g.onPosition(r,t)},null===o||isNaN(o)||(n.position=o,n.multiShot=!1,e()),n},s=function(){var e,t=g._iO.onposition;if(t)for(e in t)t.hasOwnProperty(e)&&g.onPosition(parseInt(e,10),t[e])},u=function(){var e,t=g._iO.onposition;if(t)for(e in t)t.hasOwnProperty(e)&&g.clearOnPosition(parseInt(e,10))},a=function(){g.isHTML5&&K(g)},r=function(){g.isHTML5&&W(g)},(t=function(e){e||(v=[],A=0),y=!1,g._hasTimer=null,g._a=null,g._html5_canplay=!1,g.bytesLoaded=null,g.bytesTotal=null,g.duration=g._iO&&g._iO.duration?g._iO.duration:null,g.durationEstimate=null,g.buffered=[],g.eqData=[],g.eqData.left=[],g.eqData.right=[],g.failures=0,g.isBuffering=!1,g.instanceOptions={},g.instanceCount=0,g.loaded=!1,g.metadata={},g.readyState=0,g.muted=!1,g.paused=!1,g.peakData={left:0,right:0},g.waveformData={left:[],right:[]},g.playState=0,g.position=null,g.id3={}})(),this._onTimer=function(e){var t,n,o=!1,r={};return(g._hasTimer||e)&&g._a&&(e||(g.playState>0||1===g.readyState)&&!g.paused)&&((t=g._get_html5_duration())!==p.duration&&(p.duration=t,g.duration=t,o=!0),g.durationEstimate=g.duration,(n=g._a.currentTime*Ne||0)!==p.time&&(p.time=n,o=!0),(o||e)&&g._whileplaying(n,r,r,r,r)),o},this._get_html5_duration=function(){var e=g._iO,t=g._a&&g._a.duration?g._a.duration*Ne:e&&e.duration?e.duration:null;return t&&!isNaN(t)&&t!==1/0?t:null},this._apply_loop=function(e,t){!e.loop&&t>1&&me._wD("Note: Native HTML5 looping is infinite.",1),e.loop=t>1?"loop":""},this._setup_html5=function(e){var o,r=h(g._iO,e),i=He?ge:g._a,a=decodeURI(r.url);if(He?a===decodeURI(ae)&&(o=!0):a===decodeURI(b)&&(o=!0),i){if(i._s)if(He)i._s&&i._s.playState&&!o&&i._s.stop();else if(!He&&a===decodeURI(b))return g._apply_loop(i,r.loops),i;o||(b&&t(!1),i.src=r.url,g.url=r.url,b=r.url,ae=r.url,i._called_load=!1)}else r.autoLoad||r.autoPlay?(g._a=new Audio(r.url),g._a.load()):g._a=Je&&opera.version()<10?new Audio(null):new Audio,(i=g._a)._called_load=!1,He&&(ge=i);return g.isHTML5=!0,g._a=i,i._s=g,n(),g._apply_loop(i,r.loops),r.autoLoad||r.autoPlay?g.load():(i.autobuffer=!1,i.preload="auto"),i},n=function(){if(g._a._added_events)return!1;var e;function t(e,t,n){return g._a?g._a.addEventListener(e,t,n||!1):null}for(e in g._a._added_events=!0,ce)ce.hasOwnProperty(e)&&t(e,ce[e]);return!0},o=function(){var e;function t(e,t,n){return g._a?g._a.removeEventListener(e,t,n||!1):null}for(e in me._wD(g.id+": Removing event listeners"),g._a._added_events=!1,ce)ce.hasOwnProperty(e)&&t(e,ce[e])},this._onload=function(e){var t,n=!!e||!g.isHTML5&&8===l&&g.duration;return t=g.id+": ",me._wD(t+(n?"onload()":"Failed to load / invalid sound?"+(g.duration?" -":" Zero-length duration reported.")+" ("+g.url+")"),n?1:2),n||g.isHTML5||(!0===me.sandbox.noRemote&&me._wD(t+j("noNet"),1),!0===me.sandbox.noLocal&&me._wD(t+j("noLocal"),1)),g.loaded=n,g.readyState=n?3:2,g._onbufferchange(0),n||g.isHTML5||g._onerror(),g._iO.onload&&he(g,function(){g._iO.onload.apply(g,[n])}),!0},this._onerror=function(e,t){g._iO.onerror&&he(g,function(){g._iO.onerror.apply(g,[e,t])})},this._onbufferchange=function(e){return!(0===g.playState||e&&g.isBuffering||!e&&!g.isBuffering||(g.isBuffering=1===e,g._iO.onbufferchange&&(me._wD(g.id+": Buffer state change: "+e),g._iO.onbufferchange.apply(g,[e])),0))},this._onsuspend=function(){return g._iO.onsuspend&&(me._wD(g.id+": Playback suspended"),g._iO.onsuspend.apply(g)),!0},this._onfailure=function(e,t,n){g.failures++,me._wD(g.id+": Failure ("+g.failures+"): "+e),g._iO.onfailure&&1===g.failures?g._iO.onfailure(e,t,n):me._wD(g.id+": Ignoring failure")},this._onwarning=function(e,t,n){g._iO.onwarning&&g._iO.onwarning(e,t,n)},this._onfinish=function(){var e=g._iO.onfinish;g._onbufferchange(0),g._resetOnPosition(0),g.instanceCount&&(g.instanceCount--,g.instanceCount||(u(),g.playState=0,g.paused=!1,g.instanceCount=0,g.instanceOptions={},g._iO={},r(),g.isHTML5&&(g.position=0)),g.instanceCount&&!g._iO.multiShotEvents||e&&(me._wD(g.id+": onfinish()"),he(g,function(){e.apply(g)})))},this._whileloading=function(e,t,n,o){var r=g._iO;g.bytesLoaded=e,g.bytesTotal=t,g.duration=Math.floor(n),g.bufferLength=o,g.isHTML5||r.isMovieStar?g.durationEstimate=g.duration:r.duration?g.durationEstimate=g.duration>r.duration?g.duration:r.duration:g.durationEstimate=parseInt(g.bytesTotal/g.bytesLoaded*g.duration,10),g.isHTML5||(g.buffered=[{start:0,end:g.duration}]),(3!==g.readyState||g.isHTML5)&&r.whileloading&&r.whileloading.apply(g)},this._whileplaying=function(e,t,n,o,r){var a,s=g._iO;return!isNaN(e)&&null!==e&&(g.position=Math.max(0,e),g._processOnPosition(),!g.isHTML5&&l>8&&(s.usePeakData&&t!==i&&t&&(g.peakData={left:t.leftPeak,right:t.rightPeak}),s.useWaveformData&&n!==i&&n&&(g.waveformData={left:n.split(","),right:o.split(",")}),s.useEQData&&r!==i&&r&&r.leftEQ&&(a=r.leftEQ.split(","),g.eqData=a,g.eqData.left=a,r.rightEQ!==i&&r.rightEQ&&(g.eqData.right=r.rightEQ.split(",")))),1===g.playState&&(g.isHTML5||8!==l||g.position||!g.isBuffering||g._onbufferchange(0),s.whileplaying&&s.whileplaying.apply(g)),!0)},this._oncaptiondata=function(e){me._wD(g.id+": Caption data received."),g.captiondata=e,g._iO.oncaptiondata&&g._iO.oncaptiondata.apply(g,[e])},this._onmetadata=function(e,t){me._wD(g.id+": Metadata received.");var n,o,r={};for(n=0,o=e.length;n<o;n++)r[e[n]]=t[n];g.metadata=r,g._iO.onmetadata&&g._iO.onmetadata.call(g,g.metadata)},this._onid3=function(e,t){me._wD(g.id+": ID3 data received.");var n,o,r=[];for(n=0,o=e.length;n<o;n++)r[e[n]]=t[n];g.id3=h(g.id3,r),g._iO.onid3&&g._iO.onid3.apply(g)},this._onconnect=function(e){e=1===e,me._wD(g.id+": "+(e?"Connected.":"Failed to connect? - "+g.url),e?1:2),g.connected=e,e&&(g.failures=0,Q(g.id)&&(g.getAutoPlay()?g.play(i,g.getAutoPlay()):g._iO.autoLoad&&g.load()),g._iO.onconnect&&g._iO.onconnect.apply(g,[e]))},this._ondataerror=function(e){g.playState>0&&(me._wD(g.id+": Data error: "+e),g._iO.ondataerror&&g._iO.ondataerror.apply(g))},this._debug()},M=function(){return _e.body||_e.getElementsByTagName("div")[0]},o=function(e){return _e.getElementById(e)},h=function(e,t){var n,o,r=e||{};for(o in n=t===i?me.defaultOptions:t)n.hasOwnProperty(o)&&r[o]===i&&("object"!=typeof n[o]||null===n[o]?r[o]=n[o]:r[o]=h(r[o],n[o]));return r},he=function(e,t){e.isHTML5||8!==l?t():r.setTimeout(t,0)},m={onready:1,ontimeout:1,defaultOptions:1,flash9Options:1,movieStarOptions:1},p=function(e,t){var n,o=!0,r=t!==i,a=me.setupOptions,s=m;if(e===i){for(n in o=[],a)a.hasOwnProperty(n)&&o.push(n);for(n in s)s.hasOwnProperty(n)&&("object"==typeof me[n]?o.push(n+": {...}"):me[n]instanceof Function?o.push(n+": function() {...}"):o.push(n));return me._wD(j("setup",o.join(", "))),!1}for(n in e)if(e.hasOwnProperty(n))if("object"!=typeof e[n]||null===e[n]||e[n]instanceof Array||e[n]instanceof RegExp)r&&s[t]!==i?me[t][n]=e[n]:a[n]!==i?(me.setupOptions[n]=e[n],me[n]=e[n]):s[n]===i?(G(j(me[n]===i?"setupUndef":"setupError",n),2),o=!1):me[n]instanceof Function?me[n].apply(me,e[n]instanceof Array?e[n]:[e[n]]):me[n]=e[n];else{if(s[n]!==i)return p(e[n],n);G(j(me[n]===i?"setupUndef":"setupError",n),2),o=!1}return o},ie=function(){var e=r.attachEvent,t={add:e?"attachEvent":"addEventListener",remove:e?"detachEvent":"removeEventListener"};function n(t){var n=Be.call(t),o=n.length;return e?(n[1]="on"+n[1],o>3&&n.pop()):3===o&&n.push(!1),n}function o(n,o){var r=n.shift(),i=[t[o]];e?r[i](n[0],n[1]):r[i].apply(r,n)}return{add:function(){o(n(arguments),"add")},remove:function(){o(n(arguments),"remove")}}}(),ce={abort:ct(function(){me._wD(this._s.id+": abort")}),canplay:ct(function(){var e,t=this._s;if(!t._html5_canplay){if(t._html5_canplay=!0,me._wD(t.id+": canplay"),t._onbufferchange(0),e=t._iO.position===i||isNaN(t._iO.position)?null:t._iO.position/Ne,this.currentTime!==e){me._wD(t.id+": canplay: Setting position to "+e);try{this.currentTime=e}catch(n){me._wD(t.id+": canplay: Setting position of "+e+" failed: "+n.message,2)}}t._iO._oncanplay&&t._iO._oncanplay()}}),canplaythrough:ct(function(){var e=this._s;e.loaded||(e._onbufferchange(0),e._whileloading(e.bytesLoaded,e.bytesTotal,e._get_html5_duration()),e._onload(!0))}),durationchange:ct(function(){var e,t=this._s;e=t._get_html5_duration(),isNaN(e)||e===t.duration||(me._wD(this._s.id+": durationchange ("+e+")"+(t.duration?", previously "+t.duration:"")),t.durationEstimate=t.duration=e)}),ended:ct(function(){var e=this._s;me._wD(e.id+": ended"),e._onfinish()}),error:ct(function(){var e=ee[this.error.code]||null;me._wD(this._s.id+": HTML5 error, code "+this.error.code+(e?" ("+e+")":"")),this._s._onload(!1),this._s._onerror(this.error.code,e)}),loadeddata:ct(function(){var e=this._s;me._wD(e.id+": loadeddata"),e._loaded||ze||(e.duration=e._get_html5_duration())}),loadedmetadata:ct(function(){me._wD(this._s.id+": loadedmetadata")}),loadstart:ct(function(){me._wD(this._s.id+": loadstart"),this._s._onbufferchange(1)}),play:ct(function(){this._s._onbufferchange(0)}),playing:ct(function(){me._wD(this._s.id+": playing "+String.fromCharCode(9835)),this._s._onbufferchange(0)}),progress:ct(function(e){var t,n,o,r=this._s,i=0,a="progress"===e.type,s=e.target.buffered,u=e.loaded||0,l=e.total||1;if(r.buffered=[],s&&s.length){for(t=0,n=s.length;t<n;t++)r.buffered.push({start:s.start(t)*Ne,end:s.end(t)*Ne});if(i=(s.end(0)-s.start(0))*Ne,u=Math.min(1,i/(e.target.duration*Ne)),a&&s.length>1){for(o=[],n=s.length,t=0;t<n;t++)o.push(e.target.buffered.start(t)*Ne+"-"+e.target.buffered.end(t)*Ne);me._wD(this._s.id+": progress, timeRanges: "+o.join(", "))}a&&!isNaN(u)&&me._wD(this._s.id+": progress, "+Math.floor(100*u)+"% loaded")}isNaN(u)||(r._whileloading(u,l,r._get_html5_duration()),u&&l&&u===l&&ce.canplaythrough.call(this,e))}),ratechange:ct(function(){me._wD(this._s.id+": ratechange")}),suspend:ct(function(e){var t=this._s;me._wD(this._s.id+": suspend"),ce.progress.call(this,e),t._onsuspend()}),stalled:ct(function(){me._wD(this._s.id+": stalled")}),timeupdate:ct(function(){this._s._onTimer()}),waiting:ct(function(){var e=this._s;me._wD(this._s.id+": waiting"),e._onbufferchange(1)})},X=function(e){return!(!e||!(e.type||e.url||e.serverURL))&&!(e.serverURL||e.type&&lt(e.type))&&(e.type?$({type:e.type}):$({url:e.url})||me.html5Only||e.url.match(/data:/i))},ne=function(e){var t;return e&&(t=ze?ot:me.html5.canPlayType("audio/wav")?"data:audio/wave;base64,/UklGRiYAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQIAAAD//w==":ot,e.src=t,e._called_unload!==i&&(e._called_load=!1)),He&&(ae=null),t},$=function(e){if(!me.useHTML5Audio||!me.hasHTML5)return!1;var t,n,o,r,a=e.url||null,s=e.type||null,u=me.audioFormats;if(s&&me.html5[s]!==i)return me.html5[s]&&!lt(s);if(!te){for(r in te=[],u)u.hasOwnProperty(r)&&(te.push(r),u[r].related&&(te=te.concat(u[r].related)));te=new RegExp("\\.("+te.join("|")+")(\\?.*)?$","i")}return(o=a?a.toLowerCase().match(te):null)&&o.length?o=o[1]:s?o=(-1!==(n=s.indexOf(";"))?s.substr(0,n):s).substr(6):t=!1,o&&me.html5[o]!==i?t=me.html5[o]&&!lt(o):(s="audio/"+o,t=me.html5.canPlayType({type:s}),me.html5[o]=t,t=t&&me.html5[s]&&!lt(s)),t},re=function(){if(!me.useHTML5Audio||!me.hasHTML5)return me.html5.usingFlash=!0,Ve=!0,!1;var e,t,n,o,r=Audio!==i?Je&&opera.version()<10?new Audio(null):new Audio:null,a={};function s(e){var t,n,i=!1,a=!1;if(!r||"function"!=typeof r.canPlayType)return i;if(e instanceof Array){for(o=0,n=e.length;o<n;o++)(me.html5[e[o]]||r.canPlayType(e[o]).match(me.html5Test))&&(a=!0,me.html5[e[o]]=!0,me.flash[e[o]]=!!e[o].match(nt));i=a}else i=!(!(t=!(!r||"function"!=typeof r.canPlayType)&&r.canPlayType(e))||!t.match(me.html5Test));return i}for(e in n=me.audioFormats)if(n.hasOwnProperty(e)&&(t="audio/"+e,a[e]=s(n[e].type),a[t]=a[e],e.match(nt)?(me.flash[e]=!0,me.flash[t]=!0):(me.flash[e]=!1,me.flash[t]=!1),n[e]&&n[e].related))for(o=n[e].related.length-1;o>=0;o--)a["audio/"+n[e].related[o]]=a[e],me.html5[n[e].related[o]]=a[e],me.flash[n[e].related[o]]=a[e];return a.canPlayType=r?s:null,me.html5=h(me.html5,a),me.html5.usingFlash=Y(),Ve=me.html5.usingFlash,!0},S={notReady:"Unavailable - wait until onready() has fired.",notOK:"Audio support is not available.",domError:ve+"exception caught while appending SWF to DOM.",spcWmode:"Removing wmode, preventing known SWF loading issue(s)",swf404:Ae+"Verify that %s is a valid path.",tryDebug:"Try "+ve+".debugFlash = true for more security details (output goes to SWF.)",checkSWF:"See SWF output for more debug info.",localFail:Ae+"Non-HTTP page ("+_e.location.protocol+" URL?) Review Flash player security settings for this special case:\nhttp://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html\nMay need to add/allow path, eg. c:/sm2/ or /users/me/sm2/",waitFocus:Ae+"Special case: Waiting for SWF to load with window focus...",waitForever:Ae+"Waiting indefinitely for Flash (will recover if unblocked)...",waitSWF:Ae+"Waiting for 100% SWF load...",needFunction:Ae+"Function object expected for %s",badID:'Sound ID "%s" should be a string, starting with a non-numeric character',currentObj:Ae+"_debug(): Current sound objects",waitOnload:Ae+"Waiting for window.onload()",docLoaded:Ae+"Document already loaded",onload:Ae+"initComplete(): calling soundManager.onload()",onloadOK:ve+".onload() complete",didInit:Ae+"init(): Already called?",secNote:"Flash security note: Network/internet URLs will not load due to security restrictions. Access can be configured via Flash Player Global Security Settings Page: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html",badRemove:Ae+"Failed to remove Flash node.",shutdown:ve+".disable(): Shutting down",queue:Ae+"Queueing %s handler",smError:"SMSound.load(): Exception: JS-Flash communication failed, or JS error.",fbTimeout:"No flash response, applying ."+B.swfTimedout+" CSS...",fbLoaded:"Flash loaded",fbHandler:Ae+"flashBlockHandler()",manURL:"SMSound.load(): Using manually-assigned URL",onURL:ve+".load(): current URL already assigned.",badFV:ve+'.flashVersion must be 8 or 9. "%s" is invalid. Reverting to %s.',as2loop:"Note: Setting stream:false so looping can work (flash 8 limitation)",noNSLoop:"Note: Looping not implemented for MovieStar formats",needfl9:"Note: Switching to flash 9, required for MP4 formats.",mfTimeout:"Setting flashLoadTimeout = 0 (infinite) for off-screen, mobile flash case",needFlash:Ae+"Fatal error: Flash is needed to play some required formats, but is not available.",gotFocus:Ae+"Got window focus.",policy:"Enabling usePolicyFile for data access",setup:ve+".setup(): allowed parameters: %s",setupError:ve+'.setup(): "%s" cannot be assigned with this method.',setupUndef:ve+'.setup(): Could not find option "%s"',setupLate:ve+".setup(): url, flashVersion and html5Test property changes will not take effect until reboot().",noURL:Ae+"Flash URL required. Call soundManager.setup({url:...}) to get started.",sm2Loaded:"SoundManager 2: Ready. "+String.fromCharCode(10003),reset:ve+".reset(): Removing event callbacks",mobileUA:"Mobile UA detected, preferring HTML5 by default.",globalHTML5:"Using singleton HTML5 Audio() pattern for this device.",ignoreMobile:"Ignoring mobile restrictions for this device."},j=function(){var e,t,n,o,r;if(o=(e=Be.call(arguments)).shift(),(r=S&&S[o]?S[o]:"")&&e&&e.length)for(t=0,n=e.length;t<n;t++)r=r.replace("%s",e[t]);return r},U=function(e){return 8===l&&e.loops>1&&e.stream&&(f("as2loop"),e.stream=!1),e},N=function(e,t){return e&&!e.usePolicyFile&&(e.onid3||e.usePeakData||e.useWaveformData||e.useEQData)&&(me._wD((t||"")+j("policy")),e.usePolicyFile=!0),e},G=function(e){Xe&&console.warn!==i?console.warn(e):me._wD(e)},a=function(){return!1},q=function(e){var t;for(t in e)e.hasOwnProperty(t)&&"function"==typeof e[t]&&(e[t]=a);t=null},F=function(e){e===i&&(e=!1),(Te||e)&&me.disable(e)},R=function(e){var t;if(e)if(e.match(/\.swf(\?.*)?$/i)){if(e.substr(e.toLowerCase().lastIndexOf(".swf?")+4))return e}else e.lastIndexOf("/")!==e.length-1&&(e+="/");return t=(e&&-1!==e.lastIndexOf("/")?e.substr(0,e.lastIndexOf("/")+1):"./")+me.movieURL,me.noSWFCache&&(t+="?ts="+(new Date).getTime()),t},_=function(){8!==(l=parseInt(me.flashVersion,10))&&9!==l&&(me._wD(j("badFV",l,8)),me.flashVersion=l=8);var e=me.debugMode||me.debugFlash?"_debug.swf":".swf";me.useHTML5Audio&&!me.html5Only&&me.audioFormats.mp4.required&&l<9&&(me._wD(j("needfl9")),me.flashVersion=l=9),me.version=me.versionNumber+(me.html5Only?" (HTML5-only mode)":9===l?" (AS3/Flash 9)":" (AS2/Flash 8)"),l>8?(me.defaultOptions=h(me.defaultOptions,me.flash9Options),me.features.buffering=!0,me.defaultOptions=h(me.defaultOptions,me.movieStarOptions),me.filePatterns.flash9=new RegExp("\\.(mp3|"+st.join("|")+")(\\?.*)?$","i"),me.features.movieStar=!0):me.features.movieStar=!1,me.filePattern=me.filePatterns[8!==l?"flash9":"flash8"],me.movieURL=(8===l?"soundmanager2.swf":"soundmanager2_flash9.swf").replace(".swf",e),me.features.peakData=me.features.waveformData=me.features.eqData=l>8},L=function(e,t){ye&&ye._setPolling(e,t)},C=function(){if(me.debugURLParam.test(we)&&(me.setupOptions.debugMode=me.debugMode=!0),!o(me.debugID)){var e,t,n,r,i;if(me.debugMode&&!o(me.debugID)&&(!Xe||!me.useConsole||!me.consoleOnly)){for(i in(e=_e.createElement("div")).id=me.debugID+"-toggle",r={position:"fixed",bottom:"0px",right:"0px",width:"1.2em",height:"1.2em",lineHeight:"1.2em",margin:"2px",textAlign:"center",border:"1px solid #999",cursor:"pointer",background:"#fff",color:"#333",zIndex:10001},e.appendChild(_e.createTextNode("-")),e.onclick=H,e.title="Toggle SM2 debug console",be.match(/msie 6/i)&&(e.style.position="absolute",e.style.cursor="hand"),r)r.hasOwnProperty(i)&&(e.style[i]=r[i]);if((t=_e.createElement("div")).id=me.debugID,t.style.display=me.debugMode?"block":"none",me.debugMode&&!o(e.id)){try{(n=M()).appendChild(e)}catch(e){throw new Error(j("domError")+" \n"+e.toString())}n.appendChild(t)}}n=null}},Q=this.getSoundById,f=function(e,t){return e?me._wD(j(e),t):""},H=function(){var e=o(me.debugID),t=o(me.debugID+"-toggle");e&&(Se?(t.innerHTML="+",e.style.display="none"):(t.innerHTML="-",e.style.display="block"),Se=!Se)},c=function(e,t,n){if(r.sm2Debugger!==i)try{sm2Debugger.handleEvent(e,t,n)}catch(e){return!1}return!0},V=function(){var e=[];return me.debugMode&&e.push(B.sm2Debug),me.debugFlash&&e.push(B.flashDebug),me.useHighPerformance&&e.push(B.highPerf),e.join(" ")},x=function(){var e=j("fbHandler"),t=me.getMoviePercent(),n=B,o={type:"FLASHBLOCK"};me.html5Only||(me.ok()?(me.didFlashBlock&&me._wD(e+": Unblocked"),me.oMC&&(me.oMC.className=[V(),n.swfDefault,n.swfLoaded+(me.didFlashBlock?" "+n.swfUnblocked:"")].join(" "))):(Ve&&(me.oMC.className=V()+" "+n.swfDefault+" "+(null===t?n.swfTimedout:n.swfError),me._wD(e+": "+j("fbTimeout")+(t?" ("+j("fbLoaded")+")":""))),me.didFlashBlock=!0,y({type:"ontimeout",ignoreInit:!0,error:o}),D(o)))},g=function(e,t,n){ke[e]===i&&(ke[e]=[]),ke[e].push({method:t,scope:n||null,fired:!1})},y=function(e){if(e||(e={type:me.ok()?"onready":"ontimeout"}),!Ee&&e&&!e.ignoreInit)return!1;if("ontimeout"===e.type&&(me.ok()||Te&&!e.ignoreInit))return!1;var t,n,o={success:e&&e.ignoreInit?me.ok():!Te},r=e&&e.type&&ke[e.type]||[],i=[],a=[o],s=Ve&&!me.ok();for(e.error&&(a[0].error=e.error),t=0,n=r.length;t<n;t++)!0!==r[t].fired&&i.push(r[t]);if(i.length)for(t=0,n=i.length;t<n;t++)i[t].scope?i[t].method.apply(i[t].scope,a):i[t].method.apply(this,a),s||(i[t].fired=!0);return!0},v=function(){r.setTimeout(function(){me.useFlashBlock&&x(),y(),"function"==typeof me.onload&&(f("onload",1),me.onload.apply(r),f("onloadOK",1)),me.waitForWindowLoad&&ie.add(r,"load",v)},1)},ue=function(){if(se!==i)return se;var e,t,n,o,a=!1,s=navigator,u=r.ActiveXObject;try{o=s.plugins}catch(e){o=void 0}if(o&&o.length)t="application/x-shockwave-flash",(n=s.mimeTypes)&&n[t]&&n[t].enabledPlugin&&n[t].enabledPlugin.description&&(a=!0);else if(u!==i&&!be.match(/MSAppHost/i)){try{e=new u("ShockwaveFlash.ShockwaveFlash")}catch(t){e=null}a=!!e,e=null}return se=a,a},Y=function(){var e,t,n=me.audioFormats;if(Ge&&be.match(/os (1|2|3_0|3_1)\s/i)?(me.hasHTML5=!1,me.html5Only=!0,me.oMC&&(me.oMC.style.display="none")):me.useHTML5Audio&&(me.html5&&me.html5.canPlayType||(me._wD("SoundManager: No HTML5 Audio() support detected."),me.hasHTML5=!1),Ye&&me._wD(Ae+"Note: Buggy HTML5 Audio in Safari on this OS X release, see https://bugs.webkit.org/show_bug.cgi?id=32159 - "+(se?"will use flash fallback for MP3/MP4, if available":" would use flash fallback for MP3/MP4, but none detected."),1)),me.useHTML5Audio&&me.hasHTML5)for(t in Z=!0,n)n.hasOwnProperty(t)&&n[t].required&&(me.html5.canPlayType(n[t].type)?me.preferFlash&&(me.flash[t]||me.flash[n[t].type])&&(e=!0):(Z=!1,e=!0));return me.ignoreFlash&&(e=!1,Z=!0),me.html5Only=me.hasHTML5&&me.useHTML5Audio&&!e,!me.html5Only},J=function(e){var t,n,o,r=0;if(e instanceof Array){for(t=0,n=e.length;t<n;t++)if(e[t]instanceof Object){if(me.canPlayMIME(e[t].type)){r=t;break}}else if(me.canPlayURL(e[t])){r=t;break}e[r].url&&(e[r]=e[r].url),o=e[r]}else o=e;return o},K=function(e){e._hasTimer||(e._hasTimer=!0,!Ze&&me.html5PollingInterval&&(null===je&&0===Re&&(je=setInterval(z,me.html5PollingInterval)),Re++))},W=function(e){e._hasTimer&&(e._hasTimer=!1,!Ze&&me.html5PollingInterval&&Re--)},z=function(){var e;if(null!==je&&!Re)return clearInterval(je),void(je=null);for(e=me.soundIDs.length-1;e>=0;e--)me.sounds[me.soundIDs[e]].isHTML5&&me.sounds[me.soundIDs[e]]._hasTimer&&me.sounds[me.soundIDs[e]]._onTimer()},D=function(e){e=e!==i?e:{},"function"==typeof me.onerror&&me.onerror.apply(r,[{type:e.type!==i?e.type:null}]),e.fatal!==i&&e.fatal&&me.disable()},le=function(){if(Ye&&ue()){var e,t,n=me.audioFormats;for(t in n)if(n.hasOwnProperty(t)&&("mp3"===t||"mp4"===t)&&(me._wD(ve+": Using flash fallback for "+t+" format"),me.html5[t]=!1,n[t]&&n[t].related))for(e=n[t].related.length-1;e>=0;e--)me.html5[n[t].related[e]]=!1}},this._setSandboxType=function(e){var t=me.sandbox;t.type=e,t.description=t.types[t.types[e]!==i?e:"unknown"],"localWithFile"===t.type?(t.noRemote=!0,t.noLocal=!1,f("secNote",2)):"localWithNetwork"===t.type?(t.noRemote=!1,t.noLocal=!0):"localTrusted"===t.type&&(t.noRemote=!1,t.noLocal=!1)},this._externalInterfaceOK=function(e){if(!me.swfLoaded){var t;if(c("swf",!0),c("flashtojs",!0),me.swfLoaded=!0,et=!1,Ye&&le(),!e||e.replace(/\+dev/i,"")!==me.versionNumber.replace(/\+dev/i,""))return t=ve+': Fatal: JavaScript file build "'+me.versionNumber+'" does not match Flash SWF build "'+e+'" at '+me.url+". Ensure both are up-to-date.",void setTimeout(function(){throw new Error(t)},0);setTimeout(u,Ke?100:1)}},I=function(e,t){if(Oe&&Pe)return!1;function n(){var e,t=[],n=[];e="SoundManager "+me.version+(!me.html5Only&&me.useHTML5Audio?me.hasHTML5?" + HTML5 audio":", no HTML5 audio support":""),me.html5Only?me.html5PollingInterval&&t.push("html5PollingInterval ("+me.html5PollingInterval+"ms)"):(me.preferFlash&&t.push("preferFlash"),me.useHighPerformance&&t.push("useHighPerformance"),me.flashPollingInterval&&t.push("flashPollingInterval ("+me.flashPollingInterval+"ms)"),me.html5PollingInterval&&t.push("html5PollingInterval ("+me.html5PollingInterval+"ms)"),me.wmode&&t.push("wmode ("+me.wmode+")"),me.debugFlash&&t.push("debugFlash"),me.useFlashBlock&&t.push("flashBlock")),t.length&&(n=n.concat([t.join(" + ")])),me._wD(e+(n.length?" + "+n.join(", "):""),1),fe()}if(me.html5Only)return _(),n(),me.oMC=o(me.movieID),u(),Oe=!0,Pe=!0,!1;var r,a,s,l,c,f,d,h,p,m=t||me.url,g=me.altURL||m,y=M(),v=V(),A=_e.getElementsByTagName("html")[0];function b(e,t){return'<param name="'+e+'" value="'+t+'" />'}if(r=A&&A.dir&&A.dir.match(/rtl/i),e=e===i?me.id:e,_(),me.url=R(rt?m:g),t=me.url,me.wmode=!me.wmode&&me.useHighPerformance?"transparent":me.wmode,null!==me.wmode&&(be.match(/msie 8/i)||!Ke&&!me.useHighPerformance)&&navigator.platform.match(/win32|win64/i)&&(xe.push(S.spcWmode),me.wmode=null),a={name:e,id:e,src:t,quality:"high",allowScriptAccess:me.allowScriptAccess,bgcolor:me.bgColor,pluginspage:it+"www.macromedia.com/go/getflashplayer",title:"JS/Flash audio component (SoundManager 2)",type:"application/x-shockwave-flash",wmode:me.wmode,hasPriority:"true"},me.debugFlash&&(a.FlashVars="debug=1"),me.wmode||delete a.wmode,Ke)s=_e.createElement("div"),c=['<object id="'+e+'" data="'+t+'" type="'+a.type+'" title="'+a.title+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0">',b("movie",t),b("AllowScriptAccess",me.allowScriptAccess),b("quality",a.quality),me.wmode?b("wmode",me.wmode):"",b("bgcolor",me.bgColor),b("hasPriority","true"),me.debugFlash?b("FlashVars",a.FlashVars):"","</object>"].join("");else for(l in s=_e.createElement("embed"),a)a.hasOwnProperty(l)&&s.setAttribute(l,a[l]);if(C(),v=V(),y=M())if(me.oMC=o(me.movieID)||_e.createElement("div"),me.oMC.id)p=me.oMC.className,me.oMC.className=(p?p+" ":B.swfDefault)+(v?" "+v:""),me.oMC.appendChild(s),Ke&&((f=me.oMC.appendChild(_e.createElement("div"))).className=B.swfBox,f.innerHTML=c),Pe=!0;else{if(me.oMC.id=me.movieID,me.oMC.className=B.swfDefault+" "+v,d=null,f=null,me.useFlashBlock||(me.useHighPerformance?d={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"}:(d={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"},r&&(d.left=Math.abs(parseInt(d.left,10))+"px"))),We&&(me.oMC.style.zIndex=1e4),!me.debugFlash)for(h in d)d.hasOwnProperty(h)&&(me.oMC.style[h]=d[h]);try{Ke||me.oMC.appendChild(s),y.appendChild(me.oMC),Ke&&((f=me.oMC.appendChild(_e.createElement("div"))).className=B.swfBox,f.innerHTML=c),Pe=!0}catch(e){throw new Error(j("domError")+" \n"+e.toString())}}return Oe=!0,n(),!0},O=function(){return me.html5Only?(I(),!1):!ye&&(me.url?((ye=me.getMovie(me.id))||(Le?(Ke?me.oMC.innerHTML=Ce:me.oMC.appendChild(Le),Le=null,Oe=!0):I(me.id,me.url),ye=me.getMovie(me.id)),"function"==typeof me.oninitmovie&&setTimeout(me.oninitmovie,1),de(),!0):(f("noURL"),!1))},A=function(){setTimeout(b,1e3)},w=function(){r.setTimeout(function(){G(Ae+"useFlashBlock is false, 100% HTML5 mode is possible. Rebooting with preferFlash: false..."),me.setup({preferFlash:!1}).reboot(),me.didFlashBlock=!0,me.beginDelayedInit()},1)},b=function(){var e,t=!1;me.url&&(qe||(qe=!0,ie.remove(r,"load",A),se&&et&&!$e?f("waitFocus"):(Ee||(e=me.getMoviePercent())>0&&e<100&&(t=!0),setTimeout(function(){if(e=me.getMoviePercent(),t)return qe=!1,me._wD(j("waitSWF")),void r.setTimeout(A,1);Ee||(me._wD(ve+": No Flash response within expected time. Likely causes: "+(0===e?"SWF load failed, ":"")+"Flash blocked or JS-Flash security error."+(me.debugFlash?" "+j("checkSWF"):""),2),!rt&&e&&(f("localFail",2),me.debugFlash||f("tryDebug",2)),0===e&&me._wD(j("swf404",me.url),1),c("flashtojs",!1,": Timed out"+(rt?" (Check flash security or flash blockers)":" (No plugin/missing SWF?)"))),!Ee&&tt&&(null===e?me.useFlashBlock||0===me.flashLoadTimeout?(me.useFlashBlock&&x(),f("waitForever")):!me.useFlashBlock&&Z?w():(f("waitForever"),y({type:"ontimeout",ignoreInit:!0,error:{type:"INIT_FLASHBLOCK"}})):0===me.flashLoadTimeout?f("waitForever"):!me.useFlashBlock&&Z?w():F(!0))},me.flashLoadTimeout))))},k=function(){function e(){ie.remove(r,"focus",k)}return $e||!et?(e(),!0):(tt=!0,$e=!0,f("gotFocus"),qe=!1,A(),e(),!0)},de=function(){xe.length&&(me._wD("SoundManager 2: "+xe.join(" "),1),xe=[])},fe=function(){de();var e,t=[];if(me.useHTML5Audio&&me.hasHTML5){for(e in me.audioFormats)me.audioFormats.hasOwnProperty(e)&&t.push(e+" = "+me.html5[e]+(!me.html5[e]&&Ve&&me.flash[e]?" (using flash)":me.preferFlash&&me.flash[e]&&Ve?" (preferring flash)":me.html5[e]?"":" ("+(me.audioFormats[e].required?"required, ":"")+"and no flash support)"));me._wD("SoundManager 2 HTML5 support: "+t.join(", "),1)}},d=function(e){if(Ee)return!1;if(me.html5Only)return f("sm2Loaded",1),Ee=!0,v(),c("onload",!0),!0;var t,n=!0;return me.useFlashBlock&&me.flashLoadTimeout&&!me.getMoviePercent()||(Ee=!0),t={type:!se&&Ve?"NO_FLASH":"INIT_TIMEOUT"},me._wD("SoundManager 2 "+(Te?"failed to load":"loaded")+" ("+(Te?"Flash security/load error":"OK")+") "+String.fromCharCode(Te?10006:10003),Te?2:1),Te||e?(me.useFlashBlock&&me.oMC&&(me.oMC.className=V()+" "+(null===me.getMoviePercent()?B.swfTimedout:B.swfError)),y({type:"ontimeout",error:t,ignoreInit:!0}),c("onload",!1),D(t),n=!1):c("onload",!0),Te||(me.waitForWindowLoad&&!Me?(f("waitOnload"),ie.add(r,"load",v)):(me.waitForWindowLoad&&Me&&f("docLoaded"),v())),n},s=function(){var e,t=me.setupOptions;for(e in t)t.hasOwnProperty(e)&&(me[e]===i?me[e]=t[e]:me[e]!==t[e]&&(me.setupOptions[e]=me[e]))},u=function(){if(Ee)return f("didInit"),!1;function e(){ie.remove(r,"load",me.beginDelayedInit)}if(me.html5Only)return Ee||(e(),me.enabled=!0,d()),!0;O();try{ye._externalInterfaceTest(!1),L(!0,me.flashPollingInterval||(me.useHighPerformance?10:50)),me.debugMode||ye._disableDebug(),me.enabled=!0,c("jstoflash",!0),me.html5Only||ie.add(r,"unload",a)}catch(e){return me._wD("js/flash exception: "+e.toString()),c("jstoflash",!1),D({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),F(!0),d(),!1}return d(),e(),!0},P=function(){return!T&&(T=!0,s(),C(),!se&&me.hasHTML5&&(me._wD("SoundManager 2: No Flash detected"+(me.useHTML5Audio?". Trying HTML5-only mode.":", enabling HTML5."),1),me.setup({useHTML5Audio:!0,preferFlash:!1})),re(),!se&&Ve&&(xe.push(S.needFlash),me.setup({flashLoadTimeout:1})),_e.removeEventListener&&_e.removeEventListener("DOMContentLoaded",P,!1),O(),!0)},oe=function(){return"complete"===_e.readyState&&(P(),_e.detachEvent("onreadystatechange",oe)),!0},E=function(){Me=!0,P(),ie.remove(r,"load",E)},ue(),ie.add(r,"focus",k),ie.add(r,"load",A),ie.add(r,"load",E),_e.addEventListener?_e.addEventListener("DOMContentLoaded",P,!1):_e.attachEvent?_e.attachEvent("onreadystatechange",oe):(c("onload",!1),D({type:"NO_DOM2_EVENTS",fatal:!0}))}r.SM2_DEFER!==i&&SM2_DEFER||(a=new s),e&&"object"==typeof e.exports?(e.exports.SoundManager=s,e.exports.soundManager=a):void 0===(o=function(){return{constructor:s,getInstance:function(e){if(!r.soundManager&&e instanceof Function){var t=e(s);t instanceof s&&(r.soundManager=t)}return r.soundManager}}}.call(t,n,t,e))||(e.exports=o),r.SoundManager=s,r.soundManager=a}(window)},2762:function(e,t,n){"use strict";var o=n(6518),r=n(3802).trim;o({target:"String",proto:!0,forced:n(706)("trim")},{trim:function(){return r(this)}})},3638:function(e,t,n){"use strict";n(2675),n(9463),n(2259),n(5700),n(8706),n(2008),n(113),n(3418),n(3792),n(8598),n(2062),n(4782),n(6910),n(9572),n(2010),n(8130),n(9085),n(5506),n(3851),n(1278),n(875),n(9432),n(6099),n(8459),n(3362),n(825),n(888),n(7495),n(8781),n(7764),n(1761),n(1392),n(3500),n(2953),n(5440);var o=n(9073),r=n(1669);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var a=o&&o.prototype instanceof l?o:l,c=Object.create(a.prototype);return s(c,"_invoke",function(n,o,r){var i,a,s,l=0,c=r||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,a=0,s=e,d.n=n,u}};function h(n,o){for(a=n,s=o,t=0;!f&&l&&!r&&t<c.length;t++){var r,i=c[t],h=d.p,p=i[2];n>3?(r=p===o)&&(s=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=h&&((r=n<2&&h<i[1])?(a=0,d.v=o,d.n=i[1]):h<p&&(r=n<3||i[0]>o||o>p)&&(i[4]=n,i[5]=o,d.n=p,a=0))}if(r||n>1)return u;throw f=!0,o}return function(r,c,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&h(c,p),a=c,s=p;(t=a<2?e:s)||!f;){i||(a?a<3?(a>1&&(d.n=-1),h(a,s)):d.n=s:d.v=s);try{if(l=2,i){if(a||(r="next"),t=i[r]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,a<2&&(a=0)}else 1===a&&(t=i.return)&&t.call(i),a<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),a=1);i=e}else if((t=(f=d.n<0)?s:n.call(o,d))!==u)break}catch(t){i=e,a=1,s=t}finally{l=1}}return{value:t,done:f}}}(n,r,i),!0),c}var u={};function l(){}function c(){}function f(){}t=Object.getPrototypeOf;var d=[][o]?t(t([][o]())):(s(t={},o,function(){return this}),t),h=f.prototype=l.prototype=Object.create(d);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,s(e,r,"GeneratorFunction")),e.prototype=Object.create(h),e}return c.prototype=f,s(h,"constructor",f),s(f,"constructor",c),c.displayName="GeneratorFunction",s(f,r,"GeneratorFunction"),s(h),s(h,r,"Generator"),s(h,o,function(){return this}),s(h,"toString",function(){return"[object Generator]"}),(a=function(){return{w:i,m:p}})()}function s(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}s=function(e,t,n,o){function i(t,n){s(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},s(e,t,n,o)}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,s=[],u=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(o=i.call(n)).done)&&(s.push(o.value),s.length!==t);u=!0);}catch(e){l=!0,r=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw r}}return s}}(e,t)||c(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=c(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function c(e,t){if(e){if("string"==typeof e)return f(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function d(e,t,n,o,r,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(o,r)}function h(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,p(o.key),o)}}function p(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}var m=function(){function e(t,n,o,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.leafIndex=t,this.chunkIndex=n,this.text=o,this.lineRects=r}return t=e,n=[{key:"fetch",value:(i=a().m(function t(n,i){var s,c,f,d,h,p,m,g,y,v,A,b;return a().w(function(t){for(;;)switch(t.n){case 0:if(null===(s=window.br.plugins.translate)||void 0===s||!s.translationManager.active){t.n=2;break}return t.n=1,window.br.plugins.translate.getTranslateLayers(i);case 1:c=t.v,f=Array.from(c[0].childNodes),d=[],h=l(f.entries());try{for(h.s();!(p=h.n()).done;)m=u(p.value,2),g=m[0],(y=m[1]).classList.contains("ocr-role-header-footer")||(v=new e(i,g,y.textContent,[]),d.push(v))}catch(e){h.e(e)}finally{h.f()}return 0===d.length&&(A=new e(i,0,"",[]),d.push(A)),t.a(2,d);case 2:return t.n=3,r.ajax({type:"GET",url:(0,o.g)(n,{pageIndex:i}),cache:!0,xhrFields:{withCredentials:window.br.protected}});case 3:return b=t.v,t.a(2,e._fromTextWrapperResponse(i,b));case 4:return t.a(2)}},t)}),s=function(){var e=this,t=arguments;return new Promise(function(n,o){var r=i.apply(e,t);function a(e){d(r,n,o,a,s,"next",e)}function s(e){d(r,n,o,a,s,"throw",e)}a(void 0)})},function(e,t){return s.apply(this,arguments)})},{key:"_fromTextWrapperResponse",value:function(t,n){return n.map(function(n,o){var r=e._fixChunkRects(n.slice(1)),i=e._removeDanglingHyphens(n[0]);return new e(t,o,i,r)})}},{key:"_fixChunkRects",value:function(e){if(e.length<2)return e;var t=u(e,2),n=t[0],o=t[1],r=u(n,3),i=r[0],a=r[1],s=r[2]-i,l=o[1]-o[3],c=o[2]-o[0],f=o[2];return s>30*c&&(n[2]=f,n[3]=a-l),e}},{key:"_removeDanglingHyphens",value:function(e){return e.replace(/[-¬]\s+/g,"")}}],n&&h(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,i,s}();function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function y(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var u=o&&o.prototype instanceof s?o:s,l=Object.create(u.prototype);return v(l,"_invoke",function(n,o,r){var i,s,u,l=0,c=r||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,s=0,u=e,d.n=n,a}};function h(n,o){for(s=n,u=o,t=0;!f&&l&&!r&&t<c.length;t++){var r,i=c[t],h=d.p,p=i[2];n>3?(r=p===o)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((r=n<2&&h<i[1])?(s=0,d.v=o,d.n=i[1]):h<p&&(r=n<3||i[0]>o||o>p)&&(i[4]=n,i[5]=o,d.n=p,s=0))}if(r||n>1)return a;throw f=!0,o}return function(r,c,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&h(c,p),s=c,u=p;(t=s<2?e:u)||!f;){i||(s?s<3?(s>1&&(d.n=-1),h(s,u)):d.n=u:d.v=u);try{if(l=2,i){if(s||(r="next"),t=i[r]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),s=1);i=e}else if((t=(f=d.n<0)?u:n.call(o,d))!==a)break}catch(t){i=e,s=1,u=t}finally{l=1}}return{value:t,done:f}}}(n,r,i),!0),l}var a={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(v(t={},o,function(){return this}),t),f=l.prototype=s.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,v(e,r,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=l,v(f,"constructor",l),v(l,"constructor",u),u.displayName="GeneratorFunction",v(l,r,"GeneratorFunction"),v(f),v(f,r,"Generator"),v(f,o,function(){return this}),v(f,"toString",function(){return"[object Generator]"}),(y=function(){return{w:i,m:d}})()}function v(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}v=function(e,t,n,o){function i(t,n){v(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},v(e,t,n,o)}function A(e,t,n,o,r,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(o,r)}function b(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,w(o.key),o)}}function w(e){var t=function(e){if("object"!=g(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=g(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==g(t)?t:t+""}var _=function(){function e(t,n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.pageCount=t,this.opts=Object.assign({},k,o),this._cursor={page:n,chunk:0},this._bufferedPages={},this._bufferingPages={},this._cursorLock=Promise.resolve()}return t=e,n=[{key:"next",value:function(){var e=this;return this._cursorLock=this._cursorLock.then(function(){return e._nextUncontrolled()})}},{key:"decrement",value:function(){var e=this;return this._cursorLock=this._cursorLock.then(function(){return e._decrementUncontrolled()})}},{key:"_nextUncontrolled",value:(o=y().m(function t(){var n;return y().w(function(t){for(;;)switch(t.n){case 0:if(this._cursor.page!=this.pageCount){t.n=1;break}return t.a(2,Promise.resolve(e.AT_END));case 1:return this._recenterBuffer(this._cursor.page),t.n=2,this._fetchPageChunks(this._cursor.page);case 2:if(n=t.v,this._cursor.chunk!=n.length){t.n=3;break}return this._cursor.page++,this._cursor.chunk=0,t.a(2,this._nextUncontrolled());case 3:return t.a(2,n[this._cursor.chunk++])}},t,this)}),r=function(){var e=this,t=arguments;return new Promise(function(n,r){var i=o.apply(e,t);function a(e){A(i,n,r,a,s,"next",e)}function s(e){A(i,n,r,a,s,"throw",e)}a(void 0)})},function(){return r.apply(this,arguments)})},{key:"_decrementUncontrolled",value:function(){var e=this,t=Promise.resolve();return this._cursor.chunk>0?this._cursor.chunk--:this._cursor.page>0&&(this._cursor.page--,t=this._fetchPageChunks(this._cursor.page).then(function(t){if(0==t.length)return e._decrementUncontrolled();e._cursor.chunk=t.length-1})),t.then(function(){return e._fetchPageChunks(e._cursor.page)})}},{key:"_recenterBuffer",value:function(e){for(var t=Math.max(0,e-this.opts.pageBufferSize),n=Math.min(this.pageCount,e+this.opts.pageBufferSize+1),o=t;o<n;o++)this._fetchPageChunks(o);this._removePageFromBuffer(t-1),this._removePageFromBuffer(n+1)}},{key:"_removePageFromBuffer",value:function(e){delete this._bufferingPages[e],delete this._bufferedPages[e]}},{key:"_fetchPageChunks",value:function(e){var t=this;return e in this._bufferingPages?this._bufferingPages[e]:e in this._bufferedPages?Promise.resolve(this._bufferedPages[e]):(this._bufferingPages[e]=this._fetchPageChunksDirect(e).then(function(n){return delete t._bufferingPages[e],t._bufferedPages[e]=n,n}),this._bufferingPages[e])}},{key:"_fetchPageChunksDirect",value:function(e){return m.fetch(this.opts.pageChunkUrl,e)}}],n&&b(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,o,r}();_.AT_END="__PageChunkIterator.AT_END__";var k={pageChunkUrl:null,pageBufferSize:2},S=n(4160),O=n(1669);function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function T(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var u=o&&o.prototype instanceof s?o:s,l=Object.create(u.prototype);return M(l,"_invoke",function(n,o,r){var i,s,u,l=0,c=r||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,s=0,u=e,d.n=n,a}};function h(n,o){for(s=n,u=o,t=0;!f&&l&&!r&&t<c.length;t++){var r,i=c[t],h=d.p,p=i[2];n>3?(r=p===o)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((r=n<2&&h<i[1])?(s=0,d.v=o,d.n=i[1]):h<p&&(r=n<3||i[0]>o||o>p)&&(i[4]=n,i[5]=o,d.n=p,s=0))}if(r||n>1)return a;throw f=!0,o}return function(r,c,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&h(c,p),s=c,u=p;(t=s<2?e:u)||!f;){i||(s?s<3?(s>1&&(d.n=-1),h(s,u)):d.n=u:d.v=u);try{if(l=2,i){if(s||(r="next"),t=i[r]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),s=1);i=e}else if((t=(f=d.n<0)?u:n.call(o,d))!==a)break}catch(t){i=e,s=1,u=t}finally{l=1}}return{value:t,done:f}}}(n,r,i),!0),l}var a={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(M(t={},o,function(){return this}),t),f=l.prototype=s.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,M(e,r,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=l,M(f,"constructor",l),M(l,"constructor",u),u.displayName="GeneratorFunction",M(l,r,"GeneratorFunction"),M(f),M(f,r,"Generator"),M(f,o,function(){return this}),M(f,"toString",function(){return"[object Generator]"}),(T=function(){return{w:i,m:d}})()}function M(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}M=function(e,t,n,o){function i(t,n){M(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},M(e,t,n,o)}function I(e,t,n,o,r,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(o,r)}function D(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function a(e){I(i,o,r,a,s,"next",e)}function s(e){I(i,o,r,a,s,"throw",e)}a(void 0)})}}function L(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,C(o.key),o)}}function C(e){var t=function(e){if("object"!=P(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=P(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==P(t)?t:t+""}var q=function(){function e(t){var n,o,r,i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n=this,r=function(){i.voice=e.getBestBookVoice(i.getVoices(),i.opts.bookLanguage)},(o=C(o="updateBestVoice"))in n?Object.defineProperty(n,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[o]=r,this.playing=!1,this.paused=!1,this.opts=t,this._chunkIterator=null,this.activeSound=null,this.playbackRate=1,this.events=O({}),this.voice=null,this.events.on("voiceschanged",this.updateBestVoice),this.events.trigger("voiceschanged")}return t=e,n=[{key:"getVoices",value:function(){throw new Error("Unimplemented abstract class")}},{key:"init",value:function(){return null}},{key:"start",value:function(e,t){this.playing=!0,this.paused=!1,this.opts.onLoadingStart(),this._chunkIterator=new _(t,e,{pageChunkUrl:this.opts.pageChunkUrl,pageBufferSize:3}),this.step(),this.events.trigger("start")}},{key:"stop",value:function(){this.activeSound&&this.activeSound.stop(),this.playing=!1,this.paused=!0,this._chunkIterator=null,this.activeSound=null,this.events.trigger("stop")}},{key:"pause",value:function(){var e=!this.paused&&this.activeSound;this.paused=!0,this.activeSound&&this.activeSound.pause(),e&&this.events.trigger("pause")}},{key:"resume",value:function(){var e=this.paused&&this.activeSound;this.paused=!1,this.activeSound&&this.activeSound.resume(),e&&this.events.trigger("resume")}},{key:"togglePlayPause",value:function(){this.paused?this.resume():this.pause()}},{key:"jumpForward",value:function(){this.activeSound&&this.activeSound.finish()}},{key:"jumpBackward",value:(i=D(T().m(function e(){var t=this;return T().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Promise.all([this.activeSound.stop(),this._chunkIterator.decrement().then(function(){return t._chunkIterator.decrement()})]);case 1:this.step();case 2:return e.a(2)}},e,this)})),function(){return i.apply(this,arguments)})},{key:"setVoice",value:function(e){this.events.off("voiceschanged",this.updateBestVoice),this.voice=this.getVoices().find(function(t){return t.voiceURI===e}),this.opts.bookLanguage&&(0,S.ND)()&&localStorage.setItem("BRtts-voice-".concat(this.opts.bookLanguage),this.voice.voiceURI),this.activeSound&&this.activeSound.setVoice(this.voice)}},{key:"setPlaybackRate",value:function(e){this.playbackRate=e,this.activeSound&&this.activeSound.setPlaybackRate(e)}},{key:"step",value:(r=D(T().m(function e(){var t,n,o,r=this;return T().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._chunkIterator.next();case 1:if((t=e.v)!=_.AT_END){e.n=2;break}return this.stop(),this.opts.onDone(),e.a(2);case 2:return this.opts.onLoadingStart(),(n=this.createSound(t)).chunk=t,n.rate=this.playbackRate,n.voice=this.voice,n.load(function(){return r.opts.onLoadingComplete()}),this.opts.onLoadingComplete(),e.n=3,this.opts.beforeChunkPlay(t);case 3:if(this.playing){e.n=4;break}return e.a(2);case 4:return e.n=5,this.playSound(n).then(function(){return r.opts.afterChunkPlay(n.chunk)});case 5:return o=e.v,this.paused&&this.pause(),e.n=6,o;case 6:if(!this.playing){e.n=7;break}return e.a(2,this.step());case 7:return e.a(2)}},e,this)})),function(){return r.apply(this,arguments)})},{key:"createSound",value:function(e){throw new Error("Unimplemented abstract class")}},{key:"playSound",value:function(e){return this.activeSound=e,this.activeSound.loaded||this.opts.onLoadingStart(),this.activeSound.play()}},{key:"getBestVoice",value:function(t){return e.getBestBookVoice(this.getVoices(),t||this.opts.bookLanguage)}}],o=[{key:"isSupported",value:function(){throw new Error("Unimplemented abstract class")}},{key:"getBestBookVoice",value:function(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:navigator.languages,r=t.filter(function(e){return e.lang.startsWith(n)}),i=(o=o||(navigator.language?[navigator.language]:[])).filter(function(e){return e.startsWith(n)});return e.getMatchingStoredVoice(r,n)||e.getMatchingVoice(i,r)||r.find(function(e){return e.default})||r[0]||e.getMatchingVoice(o,t)||t.find(function(e){return e.default})||t[0]}},{key:"getMatchingStoredVoice",value:function(e,t){var n=(0,S.ND)()&&localStorage.getItem("BRtts-voice-".concat(t));return n?e.find(function(e){return e.voiceURI===n}):void 0}},{key:"getMatchingVoice",value:function(e,t){var n,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return E(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(e);try{var r,i=function(){var e=n.value,o=t.filter(function(t){return t.lang.replace("_","-").startsWith(e)});if(o.length)return{v:o.find(function(e){return e.default})||o[0]}};for(o.s();!(n=o.n()).done;)if(r=i())return r.v}catch(e){o.e(e)}finally{o.f()}}}],n&&L(t.prototype,n),o&&L(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,o,r,i}(),F=n(8004),R=(n(2443),n(1792),n(1669));function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function x(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var u=o&&o.prototype instanceof s?o:s,l=Object.create(u.prototype);return V(l,"_invoke",function(n,o,r){var i,s,u,l=0,c=r||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,s=0,u=e,d.n=n,a}};function h(n,o){for(s=n,u=o,t=0;!f&&l&&!r&&t<c.length;t++){var r,i=c[t],h=d.p,p=i[2];n>3?(r=p===o)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((r=n<2&&h<i[1])?(s=0,d.v=o,d.n=i[1]):h<p&&(r=n<3||i[0]>o||o>p)&&(i[4]=n,i[5]=o,d.n=p,s=0))}if(r||n>1)return a;throw f=!0,o}return function(r,c,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&h(c,p),s=c,u=p;(t=s<2?e:u)||!f;){i||(s?s<3?(s>1&&(d.n=-1),h(s,u)):d.n=u:d.v=u);try{if(l=2,i){if(s||(r="next"),t=i[r]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),s=1);i=e}else if((t=(f=d.n<0)?u:n.call(o,d))!==a)break}catch(t){i=e,s=1,u=t}finally{l=1}}return{value:t,done:f}}}(n,r,i),!0),l}var a={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(V(t={},o,function(){return this}),t),f=l.prototype=s.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,V(e,r,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=l,V(f,"constructor",l),V(l,"constructor",u),u.displayName="GeneratorFunction",V(l,r,"GeneratorFunction"),V(f),V(f,r,"Generator"),V(f,o,function(){return this}),V(f,"toString",function(){return"[object Generator]"}),(x=function(){return{w:i,m:d}})()}function V(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}V=function(e,t,n,o){function i(t,n){V(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},V(e,t,n,o)}function B(e,t,n,o,r,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(o,r)}function H(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function a(e){B(i,o,r,a,s,"next",e)}function s(e){B(i,o,r,a,s,"throw",e)}a(void 0)})}}function U(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function N(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Q(o.key),o)}}function G(e,t,n){return t&&N(e.prototype,t),n&&N(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Q(e){var t=function(e){if("object"!=j(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==j(t)?t:t+""}function K(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(K=function(){return!!e})()}function W(){return W="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=z(e)););return e}(e,t);if(o){var r=Object.getOwnPropertyDescriptor(o,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},W.apply(null,arguments)}function z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},z(e)}function J(e,t){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},J(e,t)}var Z=function(e){function t(e){var n,o,r,i,a;return U(this,t),(r=this,i=t,a=[e],i=z(i),o=function(e,t){if(t&&("object"==j(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,K()?Reflect.construct(i,a||[],z(r).constructor):i.apply(r,a))).audioFormat=null!==(n=R.browser)&&void 0!==n&&n.mozilla?"ogg":"mp3",o.festivalUrl=e.festivalUrl,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&J(e,t)}(t,e),G(t,[{key:"getVoices",value:function(){return[{default:!0,lang:"en-US",localService:!1,name:"Festival - English (US)",voiceURI:null}]}},{key:"init",value:function(){soundManager.setup({debugMode:!1,preferFlash:!0,url:"/bookreader/BookReader/soundmanager/swf",useHTML5Audio:!0,flashVersion:9})}},{key:"start",value:function(e,n){var o=this,r=null;navigator.userAgent.match(/mobile/i)&&(r=this.iOSCaptureUserIntentHack()),(r=r||Promise.resolve()).then(function(){return(r=t,i=o,"function"==typeof(a=W(z(1&3?r.prototype:r),"start",i))?function(e){return a.apply(i,e)}:a)([e,n]);var r,i,a})}},{key:"createSound",value:function(e){return new Y((0,o.g)(this.festivalUrl,{text:e.text,format:this.audioFormat}))}},{key:"iOSCaptureUserIntentHack",value:(n=H(x().m(function e(){var t;return x().w(function(e){for(;;)switch(e.n){case 0:return t=soundManager.createSound({url:X[this.audioFormat]}),e.n=1,new Promise(function(e){return t.play({onfinish:e})});case 1:t.destruct();case 2:return e.a(2)}},e,this)})),function(){return n.apply(this,arguments)})}],[{key:"isSupported",value:function(){return"undefined"!=typeof soundManager&&soundManager.supported()}}]);var n}(q),Y=function(){return G(function e(t){U(this,e),this.soundUrl=t,this.sound=null,this.rate=1,this._finishResolver=null},[{key:"loaded",get:function(){return this.sound&&this.sound.loaded}},{key:"load",value:function(e){var t,n=this;return this.sound=soundManager.createSound({url:this.soundUrl,onload:function(){1!=n.rate&&n.sound.setPlaybackRate(n.rate),e()},onresume:(t=H(x().m(function e(){return x().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,(0,F.sleep)(25);case 1:1!=n.rate&&n.sound.setPlaybackRate(n.rate);case 2:return e.a(2)}},e)})),function(){return t.apply(this,arguments)})}),this.sound.load()}},{key:"play",value:(e=H(x().m(function e(){var t=this;return x().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,new Promise(function(e){t._finishResolver=e,t.sound.play({onfinish:e})});case 1:this.sound.destruct();case 2:return e.a(2)}},e,this)})),function(){return e.apply(this,arguments)})},{key:"stop",value:function(){return this.sound.stop(),Promise.resolve()}},{key:"pause",value:function(){this.sound.pause()}},{key:"resume",value:function(){this.sound.resume()}},{key:"setPlaybackRate",value:function(e){this.rate=e,this.sound.setPlaybackRate(e)}},{key:"finish",value:function(){this.sound.stop(),this._finishResolver()}}]);var e}(),X={mp3:"data:audio/mp3;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAACAAACcQCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA//////////////////////////////////////////////////////////////////8AAAAeTEFNRTMuOTlyBJwAAAAAAAAAADUgJAaUQQABrgAAAnHIf8sZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//sQxAADwlwBKGAAACAAAD/AAAAEAAAAH///////////////+UBAMExBTUUzLjk5LjOqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xDEIAPAAAGkAAAAIAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqg==",ogg:"data:audio/ogg;base64,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"},$=n(7583);function ee(e){return ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ee(e)}function te(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var u=o&&o.prototype instanceof s?o:s,l=Object.create(u.prototype);return ne(l,"_invoke",function(n,o,r){var i,s,u,l=0,c=r||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,s=0,u=e,d.n=n,a}};function h(n,o){for(s=n,u=o,t=0;!f&&l&&!r&&t<c.length;t++){var r,i=c[t],h=d.p,p=i[2];n>3?(r=p===o)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((r=n<2&&h<i[1])?(s=0,d.v=o,d.n=i[1]):h<p&&(r=n<3||i[0]>o||o>p)&&(i[4]=n,i[5]=o,d.n=p,s=0))}if(r||n>1)return a;throw f=!0,o}return function(r,c,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&h(c,p),s=c,u=p;(t=s<2?e:u)||!f;){i||(s?s<3?(s>1&&(d.n=-1),h(s,u)):d.n=u:d.v=u);try{if(l=2,i){if(s||(r="next"),t=i[r]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),s=1);i=e}else if((t=(f=d.n<0)?u:n.call(o,d))!==a)break}catch(t){i=e,s=1,u=t}finally{l=1}}return{value:t,done:f}}}(n,r,i),!0),l}var a={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(ne(t={},o,function(){return this}),t),f=l.prototype=s.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,ne(e,r,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=l,ne(f,"constructor",l),ne(l,"constructor",u),u.displayName="GeneratorFunction",ne(l,r,"GeneratorFunction"),ne(f),ne(f,r,"Generator"),ne(f,o,function(){return this}),ne(f,"toString",function(){return"[object Generator]"}),(te=function(){return{w:i,m:d}})()}function ne(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}ne=function(e,t,n,o){function i(t,n){ne(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},ne(e,t,n,o)}function oe(e,t,n,o,r,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(o,r)}function re(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function a(e){oe(i,o,r,a,s,"next",e)}function s(e){oe(i,o,r,a,s,"throw",e)}a(void 0)})}}function ie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ae(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,ue(o.key),o)}}function se(e,t,n){return t&&ae(e.prototype,t),n&&ae(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ue(e){var t=function(e){if("object"!=ee(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ee(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ee(t)?t:t+""}function le(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(le=function(){return!!e})()}function ce(){return ce="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=fe(e)););return e}(e,t);if(o){var r=Object.getOwnPropertyDescriptor(o,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},ce.apply(null,arguments)}function fe(e){return fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fe(e)}function de(e,t){return de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},de(e,t)}var he=function(e){function t(e){var n,o,r,i;return ie(this,t),o=this,i=[e],r=fe(r=t),n=function(e,t){if(t&&("object"==ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(o,le()?Reflect.construct(r,i||[],fe(o).constructor):r.apply(o,i)),speechSynthesis.addEventListener&&speechSynthesis.addEventListener("voiceschanged",function(){return n.events.trigger("voiceschanged")}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&de(e,t)}(t,e),se(t,[{key:"start",value:function(e,n){var o,r,i,a=this;if("mediaSession"in navigator){var s=new Audio(br.options.imagesBaseURL+"../silence.mp3");s.loop=!0,this.events.on("pause",function(){return s.pause()}),this.events.on("resume",function(){return s.play()}),this.events.on("stop",function(){return s.src=""}),s.play().then(function(){navigator.mediaSession.metadata=new MediaMetadata({title:br.bookTitle,artist:br.options.metadata.filter(function(e){return"Author"==e.label}).map(function(e){return e.value})[0],artwork:[{src:br.options.thumbnail,type:"image/jpg"}]}),navigator.mediaSession.setPositionState({duration:1/0}),navigator.mediaSession.setActionHandler("play",function(){s.play(),a.resume()}),navigator.mediaSession.setActionHandler("pause",function(){s.pause(),a.pause()}),navigator.mediaSession.setActionHandler("previoustrack",function(){return a.jumpBackward()}),navigator.mediaSession.setActionHandler("nexttrack",function(){return a.jumpForward()})})}return(o=t,r=this,"function"==typeof(i=ce(fe(1&3?o.prototype:o),"start",r))?function(e){return i.apply(r,e)}:i)([e,n])}},{key:"getVoices",value:function(){var e=speechSynthesis.getVoices();return 1!=e.filter(function(e){return e.default}).length&&e.unshift({voiceURI:"bookreader.SystemDefault",name:"System Default",lang:navigator.language,default:!0,localService:!0}),e}},{key:"createSound",value:function(e){return new pe(e.text)}}],[{key:"isSupported",value:function(){return void 0!==window.speechSynthesis}}])}(q),pe=function(){return se(function e(t){ie(this,e),this.text=t,this.loaded=!1,this.paused=!1,this.started=!1,this.stopped=!1,this.rate=1,this.utterance=null,this.voice=null,this._lastEvents={pause:null,boundary:null,start:null},this._charIndex=0,this._finishResolver=null,this._finishPromise=null},[{key:"load",value:function(e){var t,n=this;this.loaded=!1,this.started=!1,this.utterance=new SpeechSynthesisUtterance(this.text.slice(this._charIndex)),"bookreader.SystemDefault"!==(null===(t=this.voice)||void 0===t?void 0:t.voiceURI)&&(this.utterance.voice=this.voice),this.voice&&(this.utterance.lang=this.voice.lang),this.utterance.rate=this.rate,S.$x&&(this.utterance.addEventListener("pause",function(){return console.log("pause")}),this.utterance.addEventListener("resume",function(){return console.log("resume")}),this.utterance.addEventListener("start",function(){return console.log("start")}),this.utterance.addEventListener("end",function(){return console.log("end")}),this.utterance.addEventListener("error",function(e){return console.log("error",e)}),this.utterance.addEventListener("boundary",function(){return console.log("boundary")}),this.utterance.addEventListener("mark",function(){return console.log("mark")}),this.utterance.addEventListener("finish",function(){return console.log("finish")})),this.utterance.addEventListener("start",function(e){return n._lastEvents.start=e}),this.utterance.addEventListener("boundary",function(e){return n._lastEvents.boundary=e}),this.utterance.addEventListener("pause",function(e){return n._lastEvents.pause=e}),this.utterance.addEventListener("start",function(){n.started=!0,n.stopped=!1,n.paused=!1}),this.utterance.addEventListener("pause",function(){return n.paused=!0}),this.utterance.addEventListener("resume",function(){return n.paused=!1}),this.utterance.addEventListener("end",function(e){n.paused||n.stopped||n.utterance.dispatchEvent(new CustomEvent("finish",e))}),this.loaded=!0,e&&e()}},{key:"reload",value:(r=re(te().m(function e(){var t,n;return te().w(function(e){for(;;)switch(e.n){case 0:return t=this.paused,(n=this._lastEvents.boundary||this._lastEvents.pause)&&(this._charIndex=this.text.indexOf(n.target.text)+n.charIndex),e.n=1,this.stop();case 1:this.load(),t||this.play();case 2:return e.a(2)}},e,this)})),function(){return r.apply(this,arguments)})},{key:"play",value:function(){var e=this;this._finishPromise=this._finishPromise||new Promise(function(t){return e._finishResolver=t}),this.utterance.addEventListener("finish",this._finishResolver),speechSynthesis.cancel(),speechSynthesis.resume(),speechSynthesis.speak(this.utterance);var t=this.utterance.voice&&this.utterance.voice.localService;return(0,$.H8)()&&!t&&this._chromePausingBugFix(),this._finishPromise}},{key:"stop",value:function(){var e=Promise.resolve();return this.stopped||(e=Promise.race([(0,F.promisifyEvent)(this.utterance,"end"),(0,F.promisifyEvent)(this.utterance,"error")])),this.stopped=!0,speechSynthesis.cancel(),e}},{key:"finish",value:(o=re(te().m(function e(){return te().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.stop();case 1:this.utterance.dispatchEvent(new Event("finish"));case 2:return e.a(2)}},e,this)})),function(){return o.apply(this,arguments)})},{key:"pause",value:(n=re(te().m(function e(){var t,n;return te().w(function(e){for(;;)switch(e.n){case 0:if(!this.paused){e.n=1;break}return e.a(2);case 1:return t=(0,F.promisifyEvent)(this.utterance,"pause"),speechSynthesis.pause(),n=(0,$.gm)()&&(0,S.m0)(),e.n=2,Promise.race([t,(0,F.sleep)(100).then(function(){return"timeout"})]);case 2:if("timeout"==e.v){e.n=3;break}return e.a(2);case 3:S.$x&&console.log("TTS: Firing pause event manually"),this.utterance.dispatchEvent(new CustomEvent("pause",this._lastEvents.start)),n&&this.stop();case 4:return e.a(2)}},e,this)})),function(){return n.apply(this,arguments)})},{key:"resume",value:(t=re(te().m(function e(){var t,n;return te().w(function(e){for(;;)switch(e.n){case 0:if(this.started&&!this.stopped){e.n=1;break}return this.play(),e.a(2);case 1:if(this.paused){e.n=2;break}return e.a(2);case 2:return t=(0,$.H8)()&&(0,S.m0)()||(0,$.gm)()&&(0,S.m0)(),n=(0,F.promisifyEvent)(this.utterance,"resume"),speechSynthesis.resume(),e.n=3,Promise.race([n,(0,F.sleep)(100).then(function(){return"timeout"})]);case 3:if("timeout"==e.v){e.n=4;break}return e.a(2);case 4:if(S.$x&&console.log("TTS: Firing resume event manually"),this.utterance.dispatchEvent(new CustomEvent("resume",{})),!t){e.n=6;break}return e.n=5,this.reload();case 5:this.play();case 6:return e.a(2)}},e,this)})),function(){return t.apply(this,arguments)})},{key:"setPlaybackRate",value:function(e){this.rate=e,this.reload()}},{key:"setVoice",value:function(e){this.voice=e,this.reload()}},{key:"_chromePausingBugFix",value:(e=re(te().m(function e(){var t;return te().w(function(e){for(;;)switch(e.n){case 0:return S.$x&&console.log("CHROME-PAUSE-HACK: starting"),e.n=1,Promise.race([(0,F.sleep)(14e3).then(function(){return"timeout"}),(0,F.promisifyEvent)(this.utterance,"pause").then(function(){return"pause"}),(0,F.promisifyEvent)(this.utterance,"end").then(function(){return"end"}),(0,F.promisifyEvent)(this.utterance,"error").then(function(){return"error"})]);case 1:if(t=e.v,S.$x&&console.log("CHROME-PAUSE-HACK: ".concat(t)),"end"!=t&&"error"!=t){e.n=2;break}S.$x&&console.log("CHROME-PAUSE-HACK: stopped (end/error)"),e.n=6;break;case 2:if("pause"!=t){e.n=4;break}return e.n=3,Promise.race([(0,F.promisifyEvent)(this.utterance,"resume").then(function(){return"resume"}),(0,F.sleep)(14e3).then(function(){return"timeout"})]);case 3:"timeout"==e.v?(S.$x&&console.log("CHROME-PAUSE-HACK: stopped (timed out while paused)"),this.stop()):this._chromePausingBugFix(),e.n=6;break;case 4:if("timeout"!=t){e.n=6;break}return speechSynthesis.pause(),e.n=5,(0,F.sleep)(25);case 5:speechSynthesis.resume(),this._chromePausingBugFix();case 6:return e.a(2)}},e,this)})),function(){return e.apply(this,arguments)})}]);var e,t,n,o,r}(),me="Read this book aloud",ge=n(4907),ye=n(1041),ve=n(1669);function Ae(e){return Ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ae(e)}function be(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,s=[],u=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(o=i.call(n)).done)&&(s.push(o.value),s.length!==t);u=!0);}catch(e){l=!0,r=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return we(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?we(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function we(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function _e(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var u=o&&o.prototype instanceof s?o:s,l=Object.create(u.prototype);return ke(l,"_invoke",function(n,o,r){var i,s,u,l=0,c=r||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,s=0,u=e,d.n=n,a}};function h(n,o){for(s=n,u=o,t=0;!f&&l&&!r&&t<c.length;t++){var r,i=c[t],h=d.p,p=i[2];n>3?(r=p===o)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((r=n<2&&h<i[1])?(s=0,d.v=o,d.n=i[1]):h<p&&(r=n<3||i[0]>o||o>p)&&(i[4]=n,i[5]=o,d.n=p,s=0))}if(r||n>1)return a;throw f=!0,o}return function(r,c,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&h(c,p),s=c,u=p;(t=s<2?e:u)||!f;){i||(s?s<3?(s>1&&(d.n=-1),h(s,u)):d.n=u:d.v=u);try{if(l=2,i){if(s||(r="next"),t=i[r]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),s=1);i=e}else if((t=(f=d.n<0)?u:n.call(o,d))!==a)break}catch(t){i=e,s=1,u=t}finally{l=1}}return{value:t,done:f}}}(n,r,i),!0),l}var a={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(ke(t={},o,function(){return this}),t),f=l.prototype=s.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,ke(e,r,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=l,ke(f,"constructor",l),ke(l,"constructor",u),u.displayName="GeneratorFunction",ke(l,r,"GeneratorFunction"),ke(f),ke(f,r,"Generator"),ke(f,o,function(){return this}),ke(f,"toString",function(){return"[object Generator]"}),(_e=function(){return{w:i,m:d}})()}function ke(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}ke=function(e,t,n,o){function i(t,n){ke(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},ke(e,t,n,o)}function Se(e,t,n,o,r,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(o,r)}function Oe(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function a(e){Se(i,o,r,a,s,"next",e)}function s(e){Se(i,o,r,a,s,"throw",e)}a(void 0)})}}function Pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Ee(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Ce(o.key),o)}}function Te(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Te=function(){return!!e})()}function Me(){return Me="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ie(e)););return e}(e,t);if(o){var r=Object.getOwnPropertyDescriptor(o,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},Me.apply(null,arguments)}function Ie(e){return Ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ie(e)}function De(e,t){return De=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},De(e,t)}function Le(e,t,n){return(t=Ce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ce(e){var t=function(e){if("object"!=Ae(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ae(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ae(t)?t:t+""}var qe=window.BookReader,Fe=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return Le(e=function(e,t,n){return t=Ie(t),function(e,t){if(t&&("object"==Ae(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Te()?Reflect.construct(t,n||[],Ie(e).constructor):t.apply(e,n))}(this,t,[].concat(o)),"options",{enabled:!0,pageChunkUrl:"https://{{server}}/BookReader/BookReaderGetTextWrapper.php?path={{bookPath|urlencode}}_djvu.xml&page={{pageIndex}}&callback=false",remoteTtsUrl:"https://{{server}}/BookReader/BookReaderGetTTS.php?string={{text|urlencode}}&format={{format}}"}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&De(e,t)}(t,e),n=t,r=[{key:"setup",value:function(e){var n,r,i;if((n=t,r=this,"function"==typeof(i=Me(Ie(1&3?n.prototype:n),"setup",r))?function(e){return i.apply(r,e)}:i)([Object.assign({server:this.br.options.server,bookPath:this.br.options.bookPath},e)]),this.options.enabled){this._ttsBoxesByIndex={};var a=he.isSupported()?he:Z.isSupported()?Z:null;if(/_forceTTSEngine=(festival|web)/.test(location.toString())){var s=location.toString().match(/_forceTTSEngine=(festival|web)/)[1];a={festival:Z,web:he}[s]}a&&(this.ttsEngine=new a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(n),!0).forEach(function(t){Le(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({pageChunkUrl:(0,o.g)(this.options.pageChunkUrl,this.br.options.vars),bookLanguage:(0,S.YH)(this.br.options.bookLanguage),onLoadingStart:this.br.showProgressPopup.bind(this.br,"Loading audio..."),onLoadingComplete:this.br.removeProgressPopup.bind(this.br),onDone:this.stop.bind(this),beforeChunkPlay:this.beforeChunkPlay.bind(this),afterChunkPlay:this.sendChunkFinishedAnalyticsEvent.bind(this)},a===Z?{festivalUrl:(0,o.g)(this.options.remoteTtsUrl,this.br.options.vars)}:{})))}}},{key:"init",value:function(){var e=this;this.options.enabled&&this.br.bind(qe.eventNames.PostInit,function(){e.br.$(".BRicon.read").click(function(){return e.toggle(),!1}),e.ttsEngine&&(e.ttsEngine.init(),/[?&]_autoReadAloud=show/.test(location.toString())&&e.start(!1))})}},{key:"_configurePageContainer",value:function(e){if(this.options.enabled&&e.page&&e.page.index in this._ttsBoxesByIndex){var t=e.page.index;(0,ge.KL)("ttsHiliteLayer",this._ttsBoxesByIndex[t],e.page,e.$container[0])}}},{key:"extendNavBar",value:function(e){var t=this;if(this.options.enabled&&this.ttsEngine){this.br.refs.$BRReadAloudToolbar=ve('\n <ul class="read-aloud">\n <li>\n <select class="playback-speed" name="playback-speed" title="'.concat("Playback speed",'">\n <option value="0.25">0.25x</option>\n <option value="0.5">0.5x</option>\n <option value="0.75">0.75x</option>\n <option value="1.0" selected>1.0x</option>\n <option value="1.25">1.25x</option>\n <option value="1.5">1.5x</option>\n <option value="1.75">1.75x</option>\n <option value="2">2x</option>\n </select>\n </li>\n <li>\n <button type="button" name="review" title="').concat("Review 10 seconds",'">\n <div class="icon icon-review"></div>\n </button>\n </li>\n <li>\n <button type="button" name="play" title="').concat("Play",'">\n <div class="icon icon-play"></div>\n <div class="icon icon-pause"></div>\n </button>\n </li>\n <li>\n <button type="button" name="advance" title="').concat("Advance 10 seconds",'">\n <div class="icon icon-advance"></div>\n </button>\n </li>\n <li>\n <select class="playback-voices" name="playback-voice" style="display: none" title="Change read aloud voices">\n </select>\n </li>\n </ul>\n ')),e.find(".BRcontrols").prepend(this.br.refs.$BRReadAloudToolbar);var n=function(e){return e.map(function(e){return'<option value="'.concat(e.voiceURI,'">').concat(e.lang," - ").concat(e.name,"</option>")}).join("")},o=function(e,t){return"".concat(e.lang," - ").concat(e.name).localeCompare("".concat(t.lang," - ").concat(t.name))},r=function(e){var r;e.empty();var i=t.ttsEngine.opts.bookLanguage;null!==(r=t.br.plugins.translate)&&void 0!==r&&null!==(r=r.translationManager)&&void 0!==r&&r.active&&(i=t.br.plugins.translate.langFromCode);var a=t.ttsEngine.getVoices().filter(function(e){return e.lang.startsWith(i)}).sort(o),s=t.ttsEngine.getVoices().filter(function(e){return!e.lang.startsWith(i)}).sort(o);if(t.ttsEngine.getVoices().length>1){var u;if(null!==(u=t.br.plugins.translate)&&void 0!==u&&null!==(u=u.translationManager)&&void 0!==u&&u.active){var l=t.br.plugins.translate.langToCode,c=t.ttsEngine.getVoices().filter(function(e){return e.lang.startsWith(l)}).sort(o);e.append(ve('<optgroup label="Book Language, Translated From ('.concat(i,')"> ').concat(n(a)," </optgroup>"))),e.append(ve('<optgroup label="Book Language, Translated To ('.concat(l,')"> ').concat(n(c)," </optgroup>"))),e.append(ve('<optgroup label="Other Languages"> '.concat(n(s.filter(function(e){return!e.lang.startsWith(l)}).sort(o)))))}else e.append(ve('<optgroup label="Book Language ('.concat(i,')"> ').concat(n(a)," </optgroup>"))),e.append(ve('<optgroup label="Other Languages"> '.concat(n(s)," </optgroup>")));e.val(t.ttsEngine.voice.voiceURI),e.show()}else e.hide()},i=this.br.refs.$BRReadAloudToolbar.find("[name=playback-voice]");r(i),i.on("change",function(e){return t.ttsEngine.setVoice(i.val())}),this.ttsEngine.events.on("pause resume start",function(){return t.updateState()}),this.ttsEngine.events.on("voiceschanged",function(){return r(i)}),this.br.on("translationEnabled",function(){return r(i)}),this.br.on("translationDisabled",function(){return r(i)}),this.br.refs.$BRReadAloudToolbar.find("[name=play]").on("click",this.playPause.bind(this)),this.br.refs.$BRReadAloudToolbar.find("[name=advance]").on("click",this.jumpForward.bind(this)),this.br.refs.$BRReadAloudToolbar.find("[name=review]").on("click",this.jumpBackward.bind(this));var a=this.br.refs.$BRReadAloudToolbar.find('select[name="playback-speed"]');a.on("change",function(e){return t.ttsEngine.setPlaybackRate(parseFloat(a.val()))}),ve('<li>\n <button class="BRicon read js-tooltip" title="'.concat(me,'">\n <div class="icon icon-read-aloud"></div>\n <span class="BRtooltip">').concat(me,"</span>\n </button>\n </li>")).insertBefore(e.find(".BRcontrols .BRicon.zoom_out").closest("li"))}}},{key:"toggle",value:function(){var e;null===(e=this.br.plugins.autoplay)||void 0===e||e.stop(),this.ttsEngine.playing?this.stop():this.start()}},{key:"start",value:function(){var e,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=null!==(e=this.br.plugins.translate)&&void 0!==e&&null!==(e=e.translationManager)&&void 0!==e&&e.active?(0,S.YH)(this.br.plugins.translate.langToCode):"",o=this.ttsEngine.getBestVoice(n),r=this.br.refs.$BRReadAloudToolbar.find("[name=playback-voice");this.ttsEngine.setVoice(o.voiceURI),r.val(o.voiceURI),this.br.constModeThumb==this.br.mode&&this.br.switchMode(this.br.constMode1up),this.br.refs.$BRReadAloudToolbar.addClass("visible"),this.br.$(".BRicon.read").addClass("unread active"),this.sendAnalyticsEvent("Start"),t&&this.ttsEngine.start(this.br.currentIndex(),this.br.book.getNumLeafs())}},{key:"jumpForward",value:function(){this.ttsEngine.paused&&this.ttsEngine.resume(),this.ttsEngine.jumpForward()}},{key:"jumpBackward",value:function(){this.ttsEngine.paused&&this.ttsEngine.resume(),this.ttsEngine.jumpBackward()}},{key:"updateState",value:function(){var e=!(this.ttsEngine.paused||!this.ttsEngine.playing);this.br.$(".read-aloud [name=play]").toggleClass("playing",e)}},{key:"playPause",value:function(){this.ttsEngine.playing?(this.ttsEngine.togglePlayPause(),this.updateState()):this.toggle()}},{key:"stop",value:function(){this.br.refs.$BRReadAloudToolbar.removeClass("visible"),this.br.$(".BRicon.read").removeClass("unread active"),this.sendAnalyticsEvent("Stop"),this.ttsEngine.stop(),this.removeHilites(),this.br.removeProgressPopup()}},{key:"beforeChunkPlay",value:(a=Oe(_e().m(function e(t){return _e().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.maybeFlipToIndex(t.leafIndex);case 1:this.highlightChunk(t),this.scrollToChunk(t);case 2:return e.a(2)}},e,this)})),function(e){return a.apply(this,arguments)})},{key:"sendChunkFinishedAnalyticsEvent",value:function(e){this.sendAnalyticsEvent("ChunkFinished-Words",(0,S.EF)(e.text))}},{key:"maybeFlipToIndex",value:(i=Oe(_e().m(function e(t){return _e().w(function(e){for(;;)switch(e.n){case 0:this.br._isIndexDisplayed(t)||this.br.jumpToIndex(t);case 1:return e.a(2)}},e,this)})),function(e){return i.apply(this,arguments)})},{key:"highlightChunk",value:function(e){var t,n=this,o=e.leafIndex;if(this.removeHilites(),null!==(t=this.br.plugins.translate)&&void 0!==t&&t.translationManager.active){var r=this.br.getActivePageContainerElementsForIndex(o),i=e.chunkIndex;r.forEach(function(e){var t=e.querySelector(".BRtranslateLayer"),r=Array.from(t.childNodes)[i];if(r){var a=[r.offsetHeight,r.offsetTop,r.offsetWidth,r.offsetLeft],s=a[1],u=a[3],l={pageIndex:[{l:u,r:u+a[2],b:s+a[0],t:s}]};(0,ge.KL)("ttsHiliteLayer",l.pageIndex,n.br.book.getPage(o),t)}})}else{this._ttsBoxesByIndex=Le({},o,e.lineRects.map(function(e){var t=be(e,4),n=t[0],o=t[1];return{l:n,r:t[2],b:o,t:t[3]}}));for(var a=function(){var e=be(u[s],2),t=e[0],o=e[1],r=parseFloat(t),i=n.br.book.getPage(r);n.br.getActivePageContainerElementsForIndex(r).forEach(function(e){return(0,ge.KL)("ttsHiliteLayer",o,i,e)})},s=0,u=Object.entries(this._ttsBoxesByIndex);s<u.length;s++)a()}}},{key:"scrollToChunk",value:function(e){var t;this.br.constModeThumb!=this.br.mode&&(null===(t=ve(".pagediv".concat(e.leafIndex," .ttsHiliteLayer rect")).last())||void 0===t||null===(t=t[0])||void 0===t||t.scrollIntoView({block:this.br.constMode1up==this.br.mode||this.br.isFullscreenActive?"center":"nearest",inline:"center",behavior:"smooth"}))}},{key:"removeHilites",value:function(){ve(this.br.getActivePageContainerElements()).find(".ttsHiliteLayer").remove(),this._ttsBoxesByIndex={}}},{key:"sendAnalyticsEvent",value:function(e,t){if(this.br.plugins.archiveAnalytics){var n={},o=this.ttsEngine.opts.bookLanguage;o&&(n.mediaLanguage=o),this.br.plugins.archiveAnalytics.sendEvent("BRReadAloud",e,t,n)}}}],r&&Ee(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,a}(ye.S);null==qe||qe.registerPlugin("tts",Fe)},4160:function(e,t,n){"use strict";n.d(t,{$x:function(){return y},EF:function(){return c},ND:function(){return g},m0:function(){return f},YH:function(){return h},_4:function(){return p}}),n(2675),n(9463),n(2259),n(3418),n(4423),n(3792),n(4782),n(2010),n(875),n(6099),n(3362),n(7495),n(8781),n(1699),n(7764),n(1761),n(2953);var o=[],r={},i={},a={};[["Serbian","српски језик","sr","srp","srp"],["Romanian, Moldavian, Moldovan","Română","ro","ron","rum"],["Sichuan Yi, Nuosu","ꆈꌠ꒿ Nuosuhxop","ii","iii","iii"],["Tahitian","Reo Tahiti","ty","tah","tah"],["Tagalog","Wikang Tagalog","tl","tgl","tgl"],["Yiddish","ייִדיש","yi","yid","yid"],["Akan","Akan","ak","aka","aka"],["Malay","Bahasa Melayu, بهاس ملايو","ms","msa","may"],["Arabic","العربية","ar","ara","ara"],["Norwegian","Norsk","no","nor","nor"],["Ojibwa","ᐊᓂᔑᓈᐯᒧᐎᓐ","oj","oji","oji"],["Fulah","Fulfulde, Pulaar, Pular","ff","ful","ful"],["Persian","فارسی","fa","fas","per"],["Albanian","Shqip","sq","sqi","alb"],["Aymara","aymar aru","ay","aym","aym"],["Azerbaijani","azərbaycan dili","az","aze","aze"],["Chinese","中文 (Zhōngwén), 汉语, 漢語","zh","zho","chi"],["Cree","ᓀᐦᐃᔭᐍᐏᐣ","cr","cre","cre"],["Estonian","eesti, eesti keel","et","est","est"],["Guaraní","Avañe'ẽ","gn","grn","grn"],["Inupiaq","Iñupiaq, Iñupiatun","ik","ipk","ipk"],["Inuktitut","ᐃᓄᒃᑎᑐᑦ","iu","iku","iku"],["Kanuri","Kanuri","kr","kau","kau"],["Komi","коми кыв","kv","kom","kom"],["Kongo","Kikongo","kg","kon","kon"],["Kurdish","Kurdî, أۇزبېك","ku","kur","kur"],["Latvian","latviešu valoda","lv","lav","lav"],["Malagasy","fiteny malagasy","mg","mlg","mlg"],["Mongolian","Монгол хэл","mn","mon","mon"],["Oromo","Afaan Oromoo","om","orm","orm"],["Pashto, Pushto","پښتو","ps","pus","pus"],["Quechua","Runa Simi, Kichwa","qu","que","que"],["Sardinian","sardu","sc","srd","srd"],["Swahili","Kiswahili","sw","swa","swa"],["Uzbek","Oʻzbek, Ўзбек, ","uz","uzb","uzb"],["Zhuang, Chuang","Saɯ cueŋƅ, Saw cuengh","za","zha","zha"],["Bislama","Bislama","bi","bis","bis"],["Norwegian Bokmål","Norsk Bokmål","nb","nob","nob"],["Norwegian Nynorsk","Norsk Nynorsk","nn","nno","nno"],["Indonesian","Bahasa Indonesia","id","ind","ind"],["Twi","Twi","tw","twi","twi"],["Esperanto","Esperanto","eo","epo","epo"],["Interlingua","Interlingua","ia","ina","ina"],["Interlingue","Originally called Occidental; then Interlingue after WWII","ie","ile","ile"],["Ido","Ido","io","ido","ido"],["Volapük","Volapük","vo","vol","vol"],["Bihari languages","भोजपुरी","bh","bih","bih"],["Hebrew (modern)","עברית","he","heb","heb"],["Sanskrit","संस्कृतम्","sa","san","san"],["Church Slavic, Church Slavonic, Old Church Slavonic, Old Slavonic, Old Bulgarian","ѩзыкъ словѣньскъ","cu","chu","chu"],["Pali","पाऴि","pi","pli","pli"],["Avestan","avesta","ae","ave","ave"],["Latin","latine, lingua latina","la","lat","lat"],["Armenian","Հայերեն","hy","hye","arm"],["Swati","SiSwati","ss","ssw","ssw"],["Tibetan","བོད་ཡིག","bo","bod","tib"],["South Ndebele","isiNdebele","nr","nbl","nbl"],["Slovene","Slovenski Jezik, Slovenščina","sl","slv","slv"],["Oriya","ଓଡ଼ିଆ","or","ori","ori"],["North Ndebele","isiNdebele","nd","nde","nde"],["Nauru","Dorerin Naoero","na","nau","nau"],["Maori","te reo Māori","mi","mri","mao"],["Marathi","मराठी","mr","mar","mar"],["Luba-Katanga","Kiluba","lu","lub","lub"],["Rundi","Ikirundi","rn","run","run"],["Central Khmer","ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ","km","khm","khm"],["Western Frisian","Frysk","fy","fry","fry"],["Bengali","বাংলা","bn","ben","ben"],["Avaric","авар мацӀ, магӀарул мацӀ","av","ava","ava"],["Abkhazian","аҧсуа бызшәа, аҧсшәа","ab","abk","abk"],["Afar","Afaraf","aa","aar","aar"],["Afrikaans","Afrikaans","af","afr","afr"],["Amharic","አማርኛ","am","amh","amh"],["Aragonese","aragonés","an","arg","arg"],["Assamese","অসমীয়া","as","asm","asm"],["Bambara","bamanankan","bm","bam","bam"],["Bashkir","башҡорт теле","ba","bak","bak"],["Basque","euskara, euskera","eu","eus","baq"],["Belarusian","беларуская мова","be","bel","bel"],["Bosnian","bosanski jezik","bs","bos","bos"],["Breton","brezhoneg","br","bre","bre"],["Bulgarian","български език","bg","bul","bul"],["Burmese","ဗမာစာ","my","mya","bur"],["Catalan, Valencian","català, valencià","ca","cat","cat"],["Chamorro","Chamoru","ch","cha","cha"],["Chechen","нохчийн мотт","ce","che","che"],["Chichewa, Chewa, Nyanja","chiCheŵa, chinyanja","ny","nya","nya"],["Chuvash","чӑваш чӗлхи","cv","chv","chv"],["Cornish","Kernewek","kw","cor","cor"],["Corsican","corsu, lingua corsa","co","cos","cos"],["Croatian","hrvatski jezik","hr","hrv","hrv"],["Czech","čeština, český jazyk","cs","ces","cze"],["Danish","dansk","da","dan","dan"],["Divehi, Dhivehi, Maldivian","ދިވެހި","dv","div","div"],["Dutch, Flemish","Nederlands, Vlaams","nl","nld","dut"],["Dzongkha","རྫོང་ཁ","dz","dzo","dzo"],["English","English","en","eng","eng"],["Ewe","Eʋegbe","ee","ewe","ewe"],["Faroese","føroyskt","fo","fao","fao"],["Fijian","vosa Vakaviti","fj","fij","fij"],["Finnish","suomi, suomen kieli","fi","fin","fin"],["French","français, langue française","fr","fra","fre"],["Galician","Galego","gl","glg","glg"],["Georgian","ქართული","ka","kat","geo"],["German","Deutsch","de","deu","ger"],["Greek (modern)","ελληνικά","el","ell","gre"],["Gujarati","ગુજરાતી","gu","guj","guj"],["Haitian, Haitian Creole","Kreyòl ayisyen","ht","hat","hat"],["Hausa","(Hausa) هَوُسَ","ha","hau","hau"],["Herero","Otjiherero","hz","her","her"],["Hindi","हिन्दी, हिंदी","hi","hin","hin"],["Hiri Motu","Hiri Motu","ho","hmo","hmo"],["Hungarian","magyar","hu","hun","hun"],["Irish","Gaeilge","ga","gle","gle"],["Igbo","Asụsụ Igbo","ig","ibo","ibo"],["Icelandic","Íslenska","is","isl","ice"],["Italian","Italiano","it","ita","ita"],["Japanese","日本語 (にほんご)","ja","jpn","jpn"],["Javanese","ꦧꦱꦗꦮ, Basa Jawa","jv","jav","jav"],["Kalaallisut, Greenlandic","kalaallisut, kalaallit oqaasii","kl","kal","kal"],["Kannada","ಕನ್ನಡ","kn","kan","kan"],["Kashmiri","कश्मीरी, كشميري","ks","kas","kas"],["Kazakh","қазақ тілі","kk","kaz","kaz"],["Kikuyu, Gikuyu","Gĩkũyũ","ki","kik","kik"],["Kinyarwanda","Ikinyarwanda","rw","kin","kin"],["Kirghiz, Kyrgyz","Кыргызча, Кыргыз тили","ky","kir","kir"],["Korean","한국어","ko","kor","kor"],["Kuanyama, Kwanyama","Kuanyama","kj","kua","kua"],["Luxembourgish, Letzeburgesch","Lëtzebuergesch","lb","ltz","ltz"],["Ganda","Luganda","lg","lug","lug"],["Limburgan, Limburger, Limburgish","Limburgs","li","lim","lim"],["Lingala","Lingála","ln","lin","lin"],["Lao","ພາສາລາວ","lo","lao","lao"],["Lithuanian","lietuvių kalba","lt","lit","lit"],["Manx","Gaelg, Gailck","gv","glv","glv"],["Macedonian","македонски јазик","mk","mkd","mac"],["Malayalam","മലയാളം","ml","mal","mal"],["Maltese","Malti","mt","mlt","mlt"],["Marshallese","Kajin M̧ajeļ","mh","mah","mah"],["Navajo, Navaho","Diné bizaad","nv","nav","nav"],["Nepali","नेपाली","ne","nep","nep"],["Ndonga","Owambo","ng","ndo","ndo"],["Occitan","occitan, lenga d'òc","oc","oci","oci"],["Ossetian, Ossetic","ирон æвзаг","os","oss","oss"],["Panjabi, Punjabi","ਪੰਜਾਬੀ","pa","pan","pan"],["Polish","język polski, polszczyzna","pl","pol","pol"],["Portuguese","Português","pt","por","por"],["Romansh","Rumantsch Grischun","rm","roh","roh"],["Russian","русский","ru","rus","rus"],["Sindhi","सिन्धी, سنڌي، سندھی","sd","snd","snd"],["Northern Sami","Davvisámegiella","se","sme","sme"],["Samoan","gagana fa'a Samoa","sm","smo","smo"],["Sango","yângâ tî sängö","sg","sag","sag"],["Gaelic, Scottish Gaelic","Gàidhlig","gd","gla","gla"],["Shona","chiShona","sn","sna","sna"],["Sinhala, Sinhalese","සිංහල","si","sin","sin"],["Slovak","Slovenčina, Slovenský Jazyk","sk","slk","slo"],["Somali","Soomaaliga, af Soomaali","so","som","som"],["Southern Sotho","Sesotho","st","sot","sot"],["Spanish, Castilian","Español","es","spa","spa"],["Sundanese","Basa Sunda","su","sun","sun"],["Swedish","Svenska","sv","swe","swe"],["Tamil","தமிழ்","ta","tam","tam"],["Telugu","తెలుగు","te","tel","tel"],["Tajik","тоҷикӣ, toçikī, تاجیکی","tg","tgk","tgk"],["Thai","ไทย","th","tha","tha"],["Tigrinya","ትግርኛ","ti","tir","tir"],["Turkmen","Türkmen, Түркмен","tk","tuk","tuk"],["Tswana","Setswana","tn","tsn","tsn"],["Tongan (Tonga Islands)","Faka Tonga","to","ton","ton"],["Turkish","Türkçe","tr","tur","tur"],["Tsonga","Xitsonga","ts","tso","tso"],["Tatar","татар теле, tatar tele","tt","tat","tat"],["Uighur, Uyghur","ئۇيغۇرچە, Uyghurche","ug","uig","uig"],["Ukrainian","Українська","uk","ukr","ukr"],["Urdu","اردو","ur","urd","urd"],["Venda","Tshivenḓa","ve","ven","ven"],["Vietnamese","Tiếng Việt","vi","vie","vie"],["Walloon","Walon","wa","wln","wln"],["Welsh","Cymraeg","cy","cym","wel"],["Wolof","Wollof","wo","wol","wol"],["Xhosa","isiXhosa","xh","xho","xho"],["Yoruba","Yorùbá","yo","yor","yor"],["Zulu","isiZulu","zu","zul","zul"]].forEach(e=>{var t={name:e[0],nativeName:e[1],iso639_1:e[2],iso639_2T:e[3],iso639_2B:e[4]};r[e[2]]=i[e[3]]=a[e[4]]=t,o.push(t)});var s=o;function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function c(e){var t=e.match(/\S+/g);return t?t.length:0}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/android/i.test(e)}var d={"zh-hans":"中文 (Zhōngwén)"};function h(e){if(!e)return null;if(e=e.toLocaleLowerCase(),d[e])return e;var t=m(e,["iso639_1"])||m(e,["iso639_2T"])||m(e,["iso639_2B","name","nativeName"]);return t?t.iso639_1:null}function p(e){if(!e)return null;if(e=e.toLocaleLowerCase(),d[e])return d[e];var t=m(e,["iso639_1"])||m(e,["iso639_2T"])||m(e,["iso639_2B","name","nativeName"]);return null!=t&&t.nativeName?t.nativeName.split(", ")[0]:null}function m(e,t){if(!e)return null;e=e.toLowerCase();var n,o=u(s);try{for(o.s();!(n=o.n()).done;){var r,i=n.value,a=u(t);try{for(a.s();!(r=a.n()).done;){var l;if(null!==(l=i[r.value])&&void 0!==l&&l.toLowerCase().split(", ").includes(e))return i}}catch(e){a.e(e)}finally{a.f()}}}catch(e){o.e(e)}finally{o.f()}return null}function g(){try{return!!window.localStorage}catch(e){return!1}}var y=-1!=location.toString().indexOf("_debugReadAloud=true")},9073:function(e,t,n){"use strict";function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i;return null==e?void 0:e.replace(/\{\{([^}]*?)\}\}/g,function(e,i){if(!i)return e;var a,s=function(e){if(Array.isArray(e))return e}(a=i.split("|").map(function(e){return e.trim()}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),u=s[0],l=o(s).slice(1);if(!(u in n)&&!(u in t))return e;var c=u in n?n[u]:u in t?t[u]:null;return l.map(function(e){return r[e]}).reduce(function(e,t){return t(e)},c&&c.toString())})}n.d(t,{g:function(){return r}}),n(2675),n(9463),n(2259),n(3418),n(3792),n(2062),n(2712),n(4782),n(2010),n(6099),n(7495),n(8781),n(7764),n(5440),n(2762),n(2953);var i={urlencode:encodeURIComponent}}},function(e){e(e.s=3638)}]);
3
3
  //# sourceMappingURL=plugin.tts.js.map