createjs-libs
Version:
A createjs package that can be NPM installed
15 lines • 64.3 kB
JavaScript
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var s=t();for(var n in s)("object"==typeof exports?exports:e)[n]=s[n]}}("undefined"!=typeof self?self:this,function(){return function(e){function t(n){if(s[n])return s[n].exports;var r=s[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var s={};return t.m=e,t.c=s,t.d=function(e,s,n){t.o(e,s)||Object.defineProperty(e,s,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var s=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(s,"a",s),s},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=13)}({0:function(e,t){(function(){e.exports=window.createjs}).call(window)},13:function(e,t,s){e.exports=s(14)},14:function(e,t,s){s(15),e.exports=s(0)},15:function(e,t){(function(){/*!
* @license SoundJS
* Visit http://createjs.com/ for documentation, updates and examples.
*
* Copyright (c) 2011-2015 gskinner.com, inc.
*
* Distributed under the terms of the MIT license.
* http://www.opensource.org/licenses/mit-license.html
*
* This notice shall be included in all copies or substantial portions of the Software.
*/
/**!
* SoundJS FlashAudioPlugin also includes swfobject (http://code.google.com/p/swfobject/)
*/
this.createjs=this.createjs||{},function(){var e=createjs.SoundJS=createjs.SoundJS||{};e.version="1.0.0",e.buildDate="Thu, 12 Oct 2017 16:34:05 GMT"}(),this.createjs=this.createjs||{},createjs.extend=function(e,t){"use strict";function s(){this.constructor=e}return s.prototype=t.prototype,e.prototype=new s},this.createjs=this.createjs||{},createjs.promote=function(e,t){"use strict";var s=e.prototype,n=Object.getPrototypeOf&&Object.getPrototypeOf(s)||s.__proto__;if(n){s[(t+="_")+"constructor"]=n.constructor;for(var r in n)s.hasOwnProperty(r)&&"function"==typeof n[r]&&(s[t+r]=n[r])}return e},this.createjs=this.createjs||{},createjs.deprecate=function(e,t){"use strict";return function(){var s="Deprecated property or method '"+t+"'. See docs for info.";return console&&(console.warn?console.warn(s):console.log(s)),e&&e.apply(this,arguments)}},this.createjs=this.createjs||{},createjs.indexOf=function(e,t){"use strict";for(var s=0,n=e.length;n>s;s++)if(t===e[s])return s;return-1},this.createjs=this.createjs||{},function(){"use strict";createjs.proxy=function(e,t){var s=Array.prototype.slice.call(arguments,2);return function(){return e.apply(t,Array.prototype.slice.call(arguments,0).concat(s))}}}(),this.createjs=this.createjs||{},function(){"use strict";function e(){throw"BrowserDetect cannot be instantiated"}var t=e.agent=window.navigator.userAgent;e.isWindowPhone=t.indexOf("IEMobile")>-1||t.indexOf("Windows Phone")>-1,e.isFirefox=t.indexOf("Firefox")>-1,e.isOpera=null!=window.opera,e.isChrome=t.indexOf("Chrome")>-1,e.isIOS=(t.indexOf("iPod")>-1||t.indexOf("iPhone")>-1||t.indexOf("iPad")>-1)&&!e.isWindowPhone,e.isAndroid=t.indexOf("Android")>-1&&!e.isWindowPhone,e.isBlackberry=t.indexOf("Blackberry")>-1,createjs.BrowserDetect=e}(),this.createjs=this.createjs||{},function(){"use strict";function e(){this._listeners=null,this._captureListeners=null}var t=e.prototype;e.initialize=function(e){e.addEventListener=t.addEventListener,e.on=t.on,e.removeEventListener=e.off=t.removeEventListener,e.removeAllEventListeners=t.removeAllEventListeners,e.hasEventListener=t.hasEventListener,e.dispatchEvent=t.dispatchEvent,e._dispatchEvent=t._dispatchEvent,e.willTrigger=t.willTrigger},t.addEventListener=function(e,t,s){var n;n=s?this._captureListeners=this._captureListeners||{}:this._listeners=this._listeners||{};var r=n[e];return r&&this.removeEventListener(e,t,s),r=n[e],r?r.push(t):n[e]=[t],t},t.on=function(e,t,s,n,r,i){return t.handleEvent&&(s=s||t,t=t.handleEvent),s=s||this,this.addEventListener(e,function(e){t.call(s,e,r),n&&e.remove()},i)},t.removeEventListener=function(e,t,s){var n=s?this._captureListeners:this._listeners;if(n){var r=n[e];if(r)for(var i=0,a=r.length;a>i;i++)if(r[i]==t){1==a?delete n[e]:r.splice(i,1);break}}},t.off=t.removeEventListener,t.removeAllEventListeners=function(e){e?(this._listeners&&delete this._listeners[e],this._captureListeners&&delete this._captureListeners[e]):this._listeners=this._captureListeners=null},t.dispatchEvent=function(e,t,s){if("string"==typeof e){var n=this._listeners;if(!(t||n&&n[e]))return!0;e=new createjs.Event(e,t,s)}else e.target&&e.clone&&(e=e.clone());try{e.target=this}catch(e){}if(e.bubbles&&this.parent){for(var r=this,i=[r];r.parent;)i.push(r=r.parent);var a,o=i.length;for(a=o-1;a>=0&&!e.propagationStopped;a--)i[a]._dispatchEvent(e,1+(0==a));for(a=1;o>a&&!e.propagationStopped;a++)i[a]._dispatchEvent(e,3)}else this._dispatchEvent(e,2);return!e.defaultPrevented},t.hasEventListener=function(e){var t=this._listeners,s=this._captureListeners;return!!(t&&t[e]||s&&s[e])},t.willTrigger=function(e){for(var t=this;t;){if(t.hasEventListener(e))return!0;t=t.parent}return!1},t.toString=function(){return"[EventDispatcher]"},t._dispatchEvent=function(e,t){var s,n,r=2>=t?this._captureListeners:this._listeners;if(e&&r&&(n=r[e.type])&&(s=n.length)){try{e.currentTarget=this}catch(e){}try{e.eventPhase=0|t}catch(e){}e.removed=!1,n=n.slice();for(var i=0;s>i&&!e.immediatePropagationStopped;i++){var a=n[i];a.handleEvent?a.handleEvent(e):a(e),e.removed&&(this.off(e.type,a,1==t),e.removed=!1)}}2===t&&this._dispatchEvent(e,2.1)},createjs.EventDispatcher=e}(),this.createjs=this.createjs||{},function(){"use strict";function e(e,t,s){this.type=e,this.target=null,this.currentTarget=null,this.eventPhase=0,this.bubbles=!!t,this.cancelable=!!s,this.timeStamp=(new Date).getTime(),this.defaultPrevented=!1,this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.removed=!1}var t=e.prototype;t.preventDefault=function(){this.defaultPrevented=this.cancelable&&!0},t.stopPropagation=function(){this.propagationStopped=!0},t.stopImmediatePropagation=function(){this.immediatePropagationStopped=this.propagationStopped=!0},t.remove=function(){this.removed=!0},t.clone=function(){return new e(this.type,this.bubbles,this.cancelable)},t.set=function(e){for(var t in e)this[t]=e[t];return this},t.toString=function(){return"[Event (type="+this.type+")]"},createjs.Event=e}(),this.createjs=this.createjs||{},function(){"use strict";function e(e,t,s){this.Event_constructor("error"),this.title=e,this.message=t,this.data=s}createjs.extend(e,createjs.Event).clone=function(){return new createjs.ErrorEvent(this.title,this.message,this.data)},createjs.ErrorEvent=createjs.promote(e,"Event")}(),this.createjs=this.createjs||{},function(){"use strict";function e(e,t){this.Event_constructor("progress"),this.loaded=e,this.total=null==t?1:t,this.progress=0==t?0:this.loaded/this.total}createjs.extend(e,createjs.Event).clone=function(){return new createjs.ProgressEvent(this.loaded,this.total)},createjs.ProgressEvent=createjs.promote(e,"Event")}(window),this.createjs=this.createjs||{},function(){"use strict";function e(){this.src=null,this.type=null,this.id=null,this.maintainOrder=!1,this.callback=null,this.data=null,this.method=createjs.Methods.GET,this.values=null,this.headers=null,this.withCredentials=!1,this.mimeType=null,this.crossOrigin=null,this.loadTimeout=s.LOAD_TIMEOUT_DEFAULT}var t=e.prototype={},s=e;s.LOAD_TIMEOUT_DEFAULT=8e3,s.create=function(t){if("string"==typeof t){var n=new e;return n.src=t,n}if(t instanceof s)return t;if(t instanceof Object&&t.src)return null==t.loadTimeout&&(t.loadTimeout=s.LOAD_TIMEOUT_DEFAULT),t;throw new Error("Type not recognized.")},t.set=function(e){for(var t in e)this[t]=e[t];return this},createjs.LoadItem=s}(),this.createjs=this.createjs||{},function(){var e={};e.POST="POST",e.GET="GET",createjs.Methods=e}(),this.createjs=this.createjs||{},function(){var e={};e.BINARY="binary",e.CSS="css",e.FONT="font",e.FONTCSS="fontcss",e.IMAGE="image",e.JAVASCRIPT="javascript",e.JSON="json",e.JSONP="jsonp",e.MANIFEST="manifest",e.SOUND="sound",e.VIDEO="video",e.SPRITESHEET="spritesheet",e.SVG="svg",e.TEXT="text",e.XML="xml",createjs.Types=e}(),function(){var e={};e.a=function(){return e.el("a")},e.svg=function(){return e.el("svg")},e.object=function(){return e.el("object")},e.image=function(){return e.el("image")},e.img=function(){return e.el("img")},e.style=function(){return e.el("style")},e.link=function(){return e.el("link")},e.script=function(){return e.el("script")},e.audio=function(){return e.el("audio")},e.video=function(){return e.el("video")},e.text=function(e){return document.createTextNode(e)},e.el=function(e){return document.createElement(e)},createjs.Elements=e}(),function(){var e={container:null};e.appendToHead=function(t){e.getHead().appendChild(t)},e.appendToBody=function(t){if(null==e.container){e.container=document.createElement("div"),e.container.id="preloadjs-container";var s=e.container.style;s.visibility="hidden",s.position="absolute",s.width=e.container.style.height="10px",s.overflow="hidden",s.transform=s.msTransform=s.webkitTransform=s.oTransform="translate(-10px, -10px)",e.getBody().appendChild(e.container)}e.container.appendChild(t)},e.getHead=function(){return document.head||document.getElementsByTagName("head")[0]},e.getBody=function(){return document.body||document.getElementsByTagName("body")[0]},e.removeChild=function(e){e.parent&&e.parent.removeChild(e)},e.isImageTag=function(e){return e instanceof HTMLImageElement},e.isAudioTag=function(e){return!!window.HTMLAudioElement&&e instanceof HTMLAudioElement},e.isVideoTag=function(e){return!!window.HTMLVideoElement&&e instanceof HTMLVideoElement},createjs.DomUtils=e}(),function(){var e={};e.isBinary=function(e){switch(e){case createjs.Types.IMAGE:case createjs.Types.BINARY:return!0;default:return!1}},e.isText=function(e){switch(e){case createjs.Types.TEXT:case createjs.Types.JSON:case createjs.Types.MANIFEST:case createjs.Types.XML:case createjs.Types.CSS:case createjs.Types.SVG:case createjs.Types.JAVASCRIPT:case createjs.Types.SPRITESHEET:return!0;default:return!1}},e.getTypeByExtension=function(e){if(null==e)return createjs.Types.TEXT;switch(e.toLowerCase()){case"jpeg":case"jpg":case"gif":case"png":case"webp":case"bmp":return createjs.Types.IMAGE;case"ogg":case"mp3":case"webm":return createjs.Types.SOUND;case"mp4":case"webm":case"ts":return createjs.Types.VIDEO;case"json":return createjs.Types.JSON;case"xml":return createjs.Types.XML;case"css":return createjs.Types.CSS;case"js":return createjs.Types.JAVASCRIPT;case"svg":return createjs.Types.SVG;default:return createjs.Types.TEXT}},createjs.RequestUtils=e}(),function(){var e={};e.ABSOLUTE_PATT=/^(?:\w+:)?\/{2}/i,e.RELATIVE_PATT=/^[.\/]*?\//i,e.EXTENSION_PATT=/\/?[^\/]+\.(\w{1,5})$/i,e.parseURI=function(t){var s={absolute:!1,relative:!1,protocol:null,hostname:null,port:null,pathname:null,search:null,hash:null,host:null};if(null==t)return s;var n=createjs.Elements.a();n.href=t;for(var r in s)r in n&&(s[r]=n[r]);var i=t.indexOf("?");i>-1&&(t=t.substr(0,i));var a;return e.ABSOLUTE_PATT.test(t)?s.absolute=!0:e.RELATIVE_PATT.test(t)&&(s.relative=!0),(a=t.match(e.EXTENSION_PATT))&&(s.extension=a[1].toLowerCase()),s},e.formatQueryString=function(e,t){if(null==e)throw new Error("You must specify data.");var s=[];for(var n in e)s.push(n+"="+escape(e[n]));return t&&(s=s.concat(t)),s.join("&")},e.buildURI=function(e,t){if(null==t)return e;var s=[],n=e.indexOf("?");if(-1!=n){var r=e.slice(n+1);s=s.concat(r.split("&"))}return-1!=n?e.slice(0,n)+"?"+this.formatQueryString(t,s):e+"?"+this.formatQueryString(t,s)},e.isCrossDomain=function(e){var t=createjs.Elements.a();t.href=e.src;var s=createjs.Elements.a();return s.href=location.href,""!=t.hostname&&(t.port!=s.port||t.protocol!=s.protocol||t.hostname!=s.hostname)},e.isLocal=function(e){var t=createjs.Elements.a();return t.href=e.src,""==t.hostname&&"file:"==t.protocol},createjs.URLUtils=e}(),this.createjs=this.createjs||{},function(){"use strict";function e(e,t,s){this.EventDispatcher_constructor(),this.loaded=!1,this.canceled=!1,this.progress=0,this.type=s,this.resultFormatter=null,this._item=e?createjs.LoadItem.create(e):null,this._preferXHR=t,this._result=null,this._rawResult=null,this._loadedItems=null,this._tagSrcAttribute=null,this._tag=null}var t=createjs.extend(e,createjs.EventDispatcher),s=e;try{Object.defineProperties(s,{POST:{get:createjs.deprecate(function(){return createjs.Methods.POST},"AbstractLoader.POST")},GET:{get:createjs.deprecate(function(){return createjs.Methods.GET},"AbstractLoader.GET")},BINARY:{get:createjs.deprecate(function(){return createjs.Types.BINARY},"AbstractLoader.BINARY")},CSS:{get:createjs.deprecate(function(){return createjs.Types.CSS},"AbstractLoader.CSS")},FONT:{get:createjs.deprecate(function(){return createjs.Types.FONT},"AbstractLoader.FONT")},FONTCSS:{get:createjs.deprecate(function(){return createjs.Types.FONTCSS},"AbstractLoader.FONTCSS")},IMAGE:{get:createjs.deprecate(function(){return createjs.Types.IMAGE},"AbstractLoader.IMAGE")},JAVASCRIPT:{get:createjs.deprecate(function(){return createjs.Types.JAVASCRIPT},"AbstractLoader.JAVASCRIPT")},JSON:{get:createjs.deprecate(function(){return createjs.Types.JSON},"AbstractLoader.JSON")},JSONP:{get:createjs.deprecate(function(){return createjs.Types.JSONP},"AbstractLoader.JSONP")},MANIFEST:{get:createjs.deprecate(function(){return createjs.Types.MANIFEST},"AbstractLoader.MANIFEST")},SOUND:{get:createjs.deprecate(function(){return createjs.Types.SOUND},"AbstractLoader.SOUND")},VIDEO:{get:createjs.deprecate(function(){return createjs.Types.VIDEO},"AbstractLoader.VIDEO")},SPRITESHEET:{get:createjs.deprecate(function(){return createjs.Types.SPRITESHEET},"AbstractLoader.SPRITESHEET")},SVG:{get:createjs.deprecate(function(){return createjs.Types.SVG},"AbstractLoader.SVG")},TEXT:{get:createjs.deprecate(function(){return createjs.Types.TEXT},"AbstractLoader.TEXT")},XML:{get:createjs.deprecate(function(){return createjs.Types.XML},"AbstractLoader.XML")}})}catch(e){}t.getItem=function(){return this._item},t.getResult=function(e){return e?this._rawResult:this._result},t.getTag=function(){return this._tag},t.setTag=function(e){this._tag=e},t.load=function(){this._createRequest(),this._request.on("complete",this,this),this._request.on("progress",this,this),this._request.on("loadStart",this,this),this._request.on("abort",this,this),this._request.on("timeout",this,this),this._request.on("error",this,this);var e=new createjs.Event("initialize");e.loader=this._request,this.dispatchEvent(e),this._request.load()},t.cancel=function(){this.canceled=!0,this.destroy()},t.destroy=function(){this._request&&(this._request.removeAllEventListeners(),this._request.destroy()),this._request=null,this._item=null,this._rawResult=null,this._result=null,this._loadItems=null,this.removeAllEventListeners()},t.getLoadedItems=function(){return this._loadedItems},t._createRequest=function(){this._request=this._preferXHR?new createjs.XHRRequest(this._item):new createjs.TagRequest(this._item,this._tag||this._createTag(),this._tagSrcAttribute)},t._createTag=function(){return null},t._sendLoadStart=function(){this._isCanceled()||this.dispatchEvent("loadstart")},t._sendProgress=function(e){if(!this._isCanceled()){var t=null;"number"==typeof e?(this.progress=e,t=new createjs.ProgressEvent(this.progress)):(t=e,this.progress=e.loaded/e.total,t.progress=this.progress,(isNaN(this.progress)||1/0==this.progress)&&(this.progress=0)),this.hasEventListener("progress")&&this.dispatchEvent(t)}},t._sendComplete=function(){if(!this._isCanceled()){this.loaded=!0;var e=new createjs.Event("complete");e.rawResult=this._rawResult,null!=this._result&&(e.result=this._result),this.dispatchEvent(e)}},t._sendError=function(e){!this._isCanceled()&&this.hasEventListener("error")&&(null==e&&(e=new createjs.ErrorEvent("PRELOAD_ERROR_EMPTY")),this.dispatchEvent(e))},t._isCanceled=function(){return!(null!=window.createjs&&!this.canceled)},t.resultFormatter=null,t.handleEvent=function(e){switch(e.type){case"complete":this._rawResult=e.target._response;var t=this.resultFormatter&&this.resultFormatter(this);t instanceof Function?t.call(this,createjs.proxy(this._resultFormatSuccess,this),createjs.proxy(this._resultFormatFailed,this)):(this._result=t||this._rawResult,this._sendComplete());break;case"progress":this._sendProgress(e);break;case"error":this._sendError(e);break;case"loadstart":this._sendLoadStart();break;case"abort":case"timeout":this._isCanceled()||this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_"+e.type.toUpperCase()+"_ERROR"))}},t._resultFormatSuccess=function(e){this._result=e,this._sendComplete()},t._resultFormatFailed=function(e){this._sendError(e)},t.toString=function(){return"[PreloadJS AbstractLoader]"},createjs.AbstractLoader=createjs.promote(e,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function e(e,t,s){this.AbstractLoader_constructor(e,t,s),this.resultFormatter=this._formatResult,this._tagSrcAttribute="src",this.on("initialize",this._updateXHR,this)}var t=createjs.extend(e,createjs.AbstractLoader);t.load=function(){this._tag||(this._tag=this._createTag(this._item.src)),this._tag.preload="auto",this._tag.load(),this.AbstractLoader_load()},t._createTag=function(){},t._createRequest=function(){this._request=this._preferXHR?new createjs.XHRRequest(this._item):new createjs.MediaTagRequest(this._item,this._tag||this._createTag(),this._tagSrcAttribute)},t._updateXHR=function(e){e.loader.setResponseType&&e.loader.setResponseType("blob")},t._formatResult=function(e){if(this._tag.removeEventListener&&this._tag.removeEventListener("canplaythrough",this._loadedHandler),this._tag.onstalled=null,this._preferXHR){var t=window.URL||window.webkitURL,s=e.getResult(!0);e.getTag().src=t.createObjectURL(s)}return e.getTag()},createjs.AbstractMediaLoader=createjs.promote(e,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";var e=function(e){this._item=e},t=createjs.extend(e,createjs.EventDispatcher);t.load=function(){},t.destroy=function(){},t.cancel=function(){},createjs.AbstractRequest=createjs.promote(e,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function e(e,t,s){this.AbstractRequest_constructor(e),this._tag=t,this._tagSrcAttribute=s,this._loadedHandler=createjs.proxy(this._handleTagComplete,this),this._addedToDOM=!1}var t=createjs.extend(e,createjs.AbstractRequest);t.load=function(){this._tag.onload=createjs.proxy(this._handleTagComplete,this),this._tag.onreadystatechange=createjs.proxy(this._handleReadyStateChange,this),this._tag.onerror=createjs.proxy(this._handleError,this);var e=new createjs.Event("initialize");e.loader=this._tag,this.dispatchEvent(e),this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout),this._tag[this._tagSrcAttribute]=this._item.src,null==this._tag.parentNode&&(createjs.DomUtils.appendToBody(this._tag),this._addedToDOM=!0)},t.destroy=function(){this._clean(),this._tag=null,this.AbstractRequest_destroy()},t._handleReadyStateChange=function(){clearTimeout(this._loadTimeout);var e=this._tag;("loaded"==e.readyState||"complete"==e.readyState)&&this._handleTagComplete()},t._handleError=function(){this._clean(),this.dispatchEvent("error")},t._handleTagComplete=function(){this._rawResult=this._tag,this._result=this.resultFormatter&&this.resultFormatter(this)||this._rawResult,this._clean(),this.dispatchEvent("complete")},t._handleTimeout=function(){this._clean(),this.dispatchEvent(new createjs.Event("timeout"))},t._clean=function(){this._tag.onload=null,this._tag.onreadystatechange=null,this._tag.onerror=null,this._addedToDOM&&null!=this._tag.parentNode&&this._tag.parentNode.removeChild(this._tag),clearTimeout(this._loadTimeout)},t._handleStalled=function(){},createjs.TagRequest=createjs.promote(e,"AbstractRequest")}(),this.createjs=this.createjs||{},function(){"use strict";function e(e,t,s){this.AbstractRequest_constructor(e),this._tag=t,this._tagSrcAttribute=s,this._loadedHandler=createjs.proxy(this._handleTagComplete,this)}var t=createjs.extend(e,createjs.TagRequest);t.load=function(){var e=createjs.proxy(this._handleStalled,this);this._stalledCallback=e;var t=createjs.proxy(this._handleProgress,this);this._handleProgress=t,this._tag.addEventListener("stalled",e),this._tag.addEventListener("progress",t),this._tag.addEventListener&&this._tag.addEventListener("canplaythrough",this._loadedHandler,!1),this.TagRequest_load()},t._handleReadyStateChange=function(){clearTimeout(this._loadTimeout);var e=this._tag;("loaded"==e.readyState||"complete"==e.readyState)&&this._handleTagComplete()},t._handleStalled=function(){},t._handleProgress=function(e){if(e&&!(e.loaded>0&&0==e.total)){var t=new createjs.ProgressEvent(e.loaded,e.total);this.dispatchEvent(t)}},t._clean=function(){this._tag.removeEventListener&&this._tag.removeEventListener("canplaythrough",this._loadedHandler),this._tag.removeEventListener("stalled",this._stalledCallback),this._tag.removeEventListener("progress",this._progressCallback),this.TagRequest__clean()},createjs.MediaTagRequest=createjs.promote(e,"TagRequest")}(),this.createjs=this.createjs||{},function(){"use strict";function e(e){this.AbstractRequest_constructor(e),this._request=null,this._loadTimeout=null,this._xhrLevel=1,this._response=null,this._rawResponse=null,this._canceled=!1,this._handleLoadStartProxy=createjs.proxy(this._handleLoadStart,this),this._handleProgressProxy=createjs.proxy(this._handleProgress,this),this._handleAbortProxy=createjs.proxy(this._handleAbort,this),this._handleErrorProxy=createjs.proxy(this._handleError,this),this._handleTimeoutProxy=createjs.proxy(this._handleTimeout,this),this._handleLoadProxy=createjs.proxy(this._handleLoad,this),this._handleReadyStateChangeProxy=createjs.proxy(this._handleReadyStateChange,this),this._createXHR(e)}var t=createjs.extend(e,createjs.AbstractRequest);e.ACTIVEX_VERSIONS=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],t.getResult=function(e){return e&&this._rawResponse?this._rawResponse:this._response},t.cancel=function(){this.canceled=!0,this._clean(),this._request.abort()},t.load=function(){if(null==this._request)return void this._handleError();null!=this._request.addEventListener?(this._request.addEventListener("loadstart",this._handleLoadStartProxy,!1),this._request.addEventListener("progress",this._handleProgressProxy,!1),this._request.addEventListener("abort",this._handleAbortProxy,!1),this._request.addEventListener("error",this._handleErrorProxy,!1),this._request.addEventListener("timeout",this._handleTimeoutProxy,!1),this._request.addEventListener("load",this._handleLoadProxy,!1),this._request.addEventListener("readystatechange",this._handleReadyStateChangeProxy,!1)):(this._request.onloadstart=this._handleLoadStartProxy,this._request.onprogress=this._handleProgressProxy,this._request.onabort=this._handleAbortProxy,this._request.onerror=this._handleErrorProxy,this._request.ontimeout=this._handleTimeoutProxy,this._request.onload=this._handleLoadProxy,this._request.onreadystatechange=this._handleReadyStateChangeProxy),1==this._xhrLevel&&(this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout));try{this._item.values?this._request.send(createjs.URLUtils.formatQueryString(this._item.values)):this._request.send()}catch(e){this.dispatchEvent(new createjs.ErrorEvent("XHR_SEND",null,e))}},t.setResponseType=function(e){"blob"===e&&(e=window.URL?"blob":"arraybuffer",this._responseType=e),this._request.responseType=e},t.getAllResponseHeaders=function(){return this._request.getAllResponseHeaders instanceof Function?this._request.getAllResponseHeaders():null},t.getResponseHeader=function(e){return this._request.getResponseHeader instanceof Function?this._request.getResponseHeader(e):null},t._handleProgress=function(e){if(e&&!(e.loaded>0&&0==e.total)){var t=new createjs.ProgressEvent(e.loaded,e.total);this.dispatchEvent(t)}},t._handleLoadStart=function(){clearTimeout(this._loadTimeout),this.dispatchEvent("loadstart")},t._handleAbort=function(e){this._clean(),this.dispatchEvent(new createjs.ErrorEvent("XHR_ABORTED",null,e))},t._handleError=function(e){this._clean(),this.dispatchEvent(new createjs.ErrorEvent(e.message))},t._handleReadyStateChange=function(){4==this._request.readyState&&this._handleLoad()},t._handleLoad=function(){if(!this.loaded){this.loaded=!0;var e=this._checkError();if(e)return void this._handleError(e);if(this._response=this._getResponse(),"arraybuffer"===this._responseType)try{this._response=new Blob([this._response])}catch(e){if(window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,"TypeError"===e.name&&window.BlobBuilder){var t=new BlobBuilder;t.append(this._response),this._response=t.getBlob()}}this._clean(),this.dispatchEvent(new createjs.Event("complete"))}},t._handleTimeout=function(e){this._clean(),this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_TIMEOUT",null,e))},t._checkError=function(){var e=parseInt(this._request.status);return e>=400&&599>=e?new Error(e):0==e&&/^https?:/.test(location.protocol)?new Error(0):null},t._getResponse=function(){if(null!=this._response)return this._response;if(null!=this._request.response)return this._request.response;try{if(null!=this._request.responseText)return this._request.responseText}catch(e){}try{if(null!=this._request.responseXML)return this._request.responseXML}catch(e){}return null},t._createXHR=function(e){var t=createjs.URLUtils.isCrossDomain(e),n={},r=null;if(window.XMLHttpRequest)r=new XMLHttpRequest,t&&void 0===r.withCredentials&&window.XDomainRequest&&(r=new XDomainRequest);else{for(var i=0,a=s.ACTIVEX_VERSIONS.length;a>i;i++){var o=s.ACTIVEX_VERSIONS[i];try{r=new ActiveXObject(o);break}catch(e){}}if(null==r)return!1}null==e.mimeType&&createjs.RequestUtils.isText(e.type)&&(e.mimeType="text/plain; charset=utf-8"),e.mimeType&&r.overrideMimeType&&r.overrideMimeType(e.mimeType),this._xhrLevel="string"==typeof r.responseType?2:1;var u=null;if(u=e.method==createjs.Methods.GET?createjs.URLUtils.buildURI(e.src,e.values):e.src,r.open(e.method||createjs.Methods.GET,u,!0),t&&r instanceof XMLHttpRequest&&1==this._xhrLevel&&(n.Origin=location.origin),e.values&&e.method==createjs.Methods.POST&&(n["Content-Type"]="application/x-www-form-urlencoded"),t||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest"),e.headers)for(var c in e.headers)n[c]=e.headers[c];for(c in n)r.setRequestHeader(c,n[c]);return r instanceof XMLHttpRequest&&void 0!==e.withCredentials&&(r.withCredentials=e.withCredentials),this._request=r,!0},t._clean=function(){clearTimeout(this._loadTimeout),null!=this._request.removeEventListener?(this._request.removeEventListener("loadstart",this._handleLoadStartProxy),this._request.removeEventListener("progress",this._handleProgressProxy),this._request.removeEventListener("abort",this._handleAbortProxy),this._request.removeEventListener("error",this._handleErrorProxy),this._request.removeEventListener("timeout",this._handleTimeoutProxy),this._request.removeEventListener("load",this._handleLoadProxy),this._request.removeEventListener("readystatechange",this._handleReadyStateChangeProxy)):(this._request.onloadstart=null,this._request.onprogress=null,this._request.onabort=null,this._request.onerror=null,this._request.ontimeout=null,this._request.onload=null,this._request.onreadystatechange=null)},t.toString=function(){return"[PreloadJS XHRRequest]"},createjs.XHRRequest=createjs.promote(e,"AbstractRequest")}(),this.createjs=this.createjs||{},function(){"use strict";function e(e,t){this.AbstractMediaLoader_constructor(e,t,createjs.Types.SOUND),createjs.DomUtils.isAudioTag(e)?this._tag=e:createjs.DomUtils.isAudioTag(e.src)?this._tag=e:createjs.DomUtils.isAudioTag(e.tag)&&(this._tag=createjs.DomUtils.isAudioTag(e)?e:e.src),null!=this._tag&&(this._preferXHR=!1)}var t=createjs.extend(e,createjs.AbstractMediaLoader);e.canLoadItem=function(e){return e.type==createjs.Types.SOUND},t._createTag=function(e){var t=createjs.Elements.audio();return t.autoplay=!1,t.preload="none",t.src=e,t},createjs.SoundLoader=createjs.promote(e,"AbstractMediaLoader")}(),this.createjs=this.createjs||{},function(){"use strict";var e=function(){this.interrupt=null,this.delay=null,this.offset=null,this.loop=null,this.volume=null,this.pan=null,this.startTime=null,this.duration=null},t=e.prototype={},s=e;s.create=function(e){if("string"==typeof e)return console&&(console.warn||console.log)("Deprecated behaviour. Sound.play takes a configuration object instead of individual arguments. See docs for info."),(new createjs.PlayPropsConfig).set({interrupt:e});if(null==e||e instanceof s||e instanceof Object)return(new createjs.PlayPropsConfig).set(e);if(null==e)throw new Error("PlayProps configuration not recognized.")},t.set=function(e){if(null!=e)for(var t in e)this[t]=e[t];return this},t.toString=function(){return"[PlayPropsConfig]"},createjs.PlayPropsConfig=s}(),this.createjs=this.createjs||{},function(){"use strict";function e(){throw"Sound cannot be instantiated"}function t(e,t){this.init(e,t)}var s=e;s.INTERRUPT_ANY="any",s.INTERRUPT_EARLY="early",s.INTERRUPT_LATE="late",s.INTERRUPT_NONE="none",s.PLAY_INITED="playInited",s.PLAY_SUCCEEDED="playSucceeded",s.PLAY_INTERRUPTED="playInterrupted",s.PLAY_FINISHED="playFinished",s.PLAY_FAILED="playFailed",s.SUPPORTED_EXTENSIONS=["mp3","ogg","opus","mpeg","wav","m4a","mp4","aiff","wma","mid"],s.EXTENSION_MAP={m4a:"mp4"},s.FILE_PATTERN=/^(?:(\w+:)\/{2}(\w+(?:\.\w+)*\/?))?([\/.]*?(?:[^?]+)?\/)?((?:[^\/?]+)\.(\w+))(?:\?(\S+)?)?$/,s.defaultInterruptBehavior=s.INTERRUPT_NONE,s.alternateExtensions=[],s.activePlugin=null,s._masterVolume=1,s._getMasterVolume=function(){return this._masterVolume},s.getVolume=createjs.deprecate(s._getMasterVolume,"Sound.getVolume"),s._setMasterVolume=function(e){if(null!=Number(e)&&(e=Math.max(0,Math.min(1,e)),s._masterVolume=e,!this.activePlugin||!this.activePlugin.setVolume||!this.activePlugin.setVolume(e)))for(var t=this._instances,n=0,r=t.length;r>n;n++)t[n].setMasterVolume(e)},s.setVolume=createjs.deprecate(s._setMasterVolume,"Sound.setVolume"),s._masterMute=!1,s._getMute=function(){return this._masterMute},s.getMute=createjs.deprecate(s._getMute,"Sound.getMute"),s._setMute=function(e){if(null!=e&&(this._masterMute=e,!this.activePlugin||!this.activePlugin.setMute||!this.activePlugin.setMute(e)))for(var t=this._instances,s=0,n=t.length;n>s;s++)t[s].setMasterMute(e)},s.setMute=createjs.deprecate(s._setMute,"Sound.setMute"),s._getCapabilities=function(){return null==s.activePlugin?null:s.activePlugin._capabilities},s.getCapabilities=createjs.deprecate(s._getCapabilities,"Sound.getCapabilities"),Object.defineProperties(s,{volume:{get:s._getMasterVolume,set:s._setMasterVolume},muted:{get:s._getMute,set:s._setMute},capabilities:{get:s._getCapabilities}}),s._pluginsRegistered=!1,s._lastID=0,s._instances=[],s._idHash={},s._preloadHash={},s._defaultPlayPropsHash={},s.addEventListener=null,s.removeEventListener=null,s.removeAllEventListeners=null,s.dispatchEvent=null,s.hasEventListener=null,s._listeners=null,createjs.EventDispatcher.initialize(s),s.getPreloadHandlers=function(){return{callback:createjs.proxy(s.initLoad,s),types:["sound"],extensions:s.SUPPORTED_EXTENSIONS}},s._handleLoadComplete=function(e){var t=e.target.getItem().src;if(s._preloadHash[t])for(var n=0,r=s._preloadHash[t].length;r>n;n++){var i=s._preloadHash[t][n];if(s._preloadHash[t][n]=!0,s.hasEventListener("fileload")){var e=new createjs.Event("fileload");e.src=i.src,e.id=i.id,e.data=i.data,e.sprite=i.sprite,s.dispatchEvent(e)}}},s._handleLoadError=function(e){var t=e.target.getItem().src;if(s._preloadHash[t])for(var n=0,r=s._preloadHash[t].length;r>n;n++){var i=s._preloadHash[t][n];if(s._preloadHash[t][n]=!1,s.hasEventListener("fileerror")){var e=new createjs.Event("fileerror");e.src=i.src,e.id=i.id,e.data=i.data,e.sprite=i.sprite,s.dispatchEvent(e)}}},s._registerPlugin=function(e){return!!e.isSupported()&&(s.activePlugin=new e,!0)},s.registerPlugins=function(e){s._pluginsRegistered=!0;for(var t=0,n=e.length;n>t;t++)if(s._registerPlugin(e[t]))return!0;return!1},s.initializeDefaultPlugins=function(){return null!=s.activePlugin||!s._pluginsRegistered&&!!s.registerPlugins([createjs.WebAudioPlugin,createjs.HTMLAudioPlugin])},s.isReady=function(){return null!=s.activePlugin},s.initLoad=function(e){return"video"==e.type||s._registerSound(e)},s._registerSound=function(e){if(!s.initializeDefaultPlugins())return!1;var n;if(e.src instanceof Object?(n=s._parseSrc(e.src),n.src=e.path+n.src):n=s._parsePath(e.src),null==n)return!1;e.src=n.src,e.type="sound";var r=e.data,i=null;if(null!=r&&(isNaN(r.channels)?isNaN(r)||(i=parseInt(r)):i=parseInt(r.channels),r.audioSprite))for(var a,o=r.audioSprite.length;o--;)a=r.audioSprite[o],s._idHash[a.id]={src:e.src,startTime:parseInt(a.startTime),duration:parseInt(a.duration)},a.defaultPlayProps&&(s._defaultPlayPropsHash[a.id]=createjs.PlayPropsConfig.create(a.defaultPlayProps));null!=e.id&&(s._idHash[e.id]={src:e.src});var u=s.activePlugin.register(e);return t.create(e.src,i),null!=r&&isNaN(r)?e.data.channels=i||t.maxPerChannel():e.data=i||t.maxPerChannel(),u.type&&(e.type=u.type),e.defaultPlayProps&&(s._defaultPlayPropsHash[e.src]=createjs.PlayPropsConfig.create(e.defaultPlayProps)),u},s.registerSound=function(e,t,n,r,i){var a={src:e,id:t,data:n,defaultPlayProps:i};e instanceof Object&&e.src&&(r=t,a=e),a=createjs.LoadItem.create(a),a.path=r,null==r||a.src instanceof Object||(a.src=r+a.src);var o=s._registerSound(a);if(!o)return!1;if(s._preloadHash[a.src]||(s._preloadHash[a.src]=[]),s._preloadHash[a.src].push(a),1==s._preloadHash[a.src].length)o.on("complete",this._handleLoadComplete,this),o.on("error",this._handleLoadError,this),s.activePlugin.preload(o);else if(1==s._preloadHash[a.src][0])return!0;return a},s.registerSounds=function(e,t){var s=[];e.path&&(t?t+=e.path:t=e.path,e=e.manifest);for(var n=0,r=e.length;r>n;n++)s[n]=createjs.Sound.registerSound(e[n].src,e[n].id,e[n].data,t,e[n].defaultPlayProps);return s},s.removeSound=function(e,n){if(null==s.activePlugin)return!1;e instanceof Object&&e.src&&(e=e.src);var r;if(e instanceof Object?r=s._parseSrc(e):(e=s._getSrcById(e).src,r=s._parsePath(e)),null==r)return!1;e=r.src,null!=n&&(e=n+e);for(var i in s._idHash)s._idHash[i].src==e&&delete s._idHash[i];return t.removeSrc(e),delete s._preloadHash[e],s.activePlugin.removeSound(e),!0},s.removeSounds=function(e,t){var s=[];e.path&&(t?t+=e.path:t=e.path,e=e.manifest);for(var n=0,r=e.length;r>n;n++)s[n]=createjs.Sound.removeSound(e[n].src,t);return s},s.removeAllSounds=function(){s._idHash={},s._preloadHash={},t.removeAll(),s.activePlugin&&s.activePlugin.removeAllSounds()},s.loadComplete=function(e){if(!s.isReady())return!1;var t=s._parsePath(e);return e=t?s._getSrcById(t.src).src:s._getSrcById(e).src,void 0!=s._preloadHash[e]&&1==s._preloadHash[e][0]},s._parsePath=function(e){"string"!=typeof e&&(e=e.toString());var t=e.match(s.FILE_PATTERN);if(null==t)return!1;for(var n=t[4],r=t[5],i=s.capabilities,a=0;!i[r];)if(r=s.alternateExtensions[a++],a>s.alternateExtensions.length)return null;return e=e.replace("."+t[5],"."+r),{name:n,src:e,extension:r}},s._parseSrc=function(e){var t={name:void 0,src:void 0,extension:void 0},n=s.capabilities;for(var r in e)if(e.hasOwnProperty(r)&&n[r]){t.src=e[r],t.extension=r;break}if(!t.src)return!1;var i=t.src.lastIndexOf("/");return t.name=-1!=i?t.src.slice(i+1):t.src,t},s.play=function(e,t){var n=createjs.PlayPropsConfig.create(t),r=s.createInstance(e,n.startTime,n.duration);return s._playInstance(r,n)||r._playFailed(),r},s.createInstance=function(e,n,r){if(!s.initializeDefaultPlugins())return new createjs.DefaultSoundInstance(e,n,r);var i=s._defaultPlayPropsHash[e];e=s._getSrcById(e);var a=s._parsePath(e.src),o=null;return null!=a&&null!=a.src?(t.create(a.src),null==n&&(n=e.startTime),o=s.activePlugin.create(a.src,n,r||e.duration),(i=i||s._defaultPlayPropsHash[a.src])&&o.applyPlayProps(i)):o=new createjs.DefaultSoundInstance(e,n,r),o.uniqueId=s._lastID++,o},s.stop=function(){for(var e=this._instances,t=e.length;t--;)e[t].stop()},s.setDefaultPlayProps=function(e,t){e=s._getSrcById(e),s._defaultPlayPropsHash[s._parsePath(e.src).src]=createjs.PlayPropsConfig.create(t)},s.getDefaultPlayProps=function(e){return e=s._getSrcById(e),s._defaultPlayPropsHash[s._parsePath(e.src).src]},s._playInstance=function(e,t){var n=s._defaultPlayPropsHash[e.src]||{};if(null==t.interrupt&&(t.interrupt=n.interrupt||s.defaultInterruptBehavior),null==t.delay&&(t.delay=n.delay||0),null==t.offset&&(t.offset=e.position),null==t.loop&&(t.loop=e.loop),null==t.volume&&(t.volume=e.volume),null==t.pan&&(t.pan=e.pan),0==t.delay){if(!s._beginPlaying(e,t))return!1}else{var r=setTimeout(function(){s._beginPlaying(e,t)},t.delay);e.delayTimeoutId=r}return this._instances.push(e),!0},s._beginPlaying=function(e,s){if(!t.add(e,s.interrupt))return!1;if(!e._beginPlaying(s)){var n=createjs.indexOf(this._instances,e);return n>-1&&this._instances.splice(n,1),!1}return!0},s._getSrcById=function(e){return s._idHash[e]||{src:e}},s._playFinished=function(e){t.remove(e);var s=createjs.indexOf(this._instances,e);s>-1&&this._instances.splice(s,1)},createjs.Sound=e,t.channels={},t.create=function(e,s){return null==t.get(e)&&(t.channels[e]=new t(e,s),!0)},t.removeSrc=function(e){var s=t.get(e);return null!=s&&(s._removeAll(),delete t.channels[e],!0)},t.removeAll=function(){for(var e in t.channels)t.channels[e]._removeAll();t.channels={}},t.add=function(e,s){var n=t.get(e.src);return null!=n&&n._add(e,s)},t.remove=function(e){var s=t.get(e.src);return null!=s&&(s._remove(e),!0)},t.maxPerChannel=function(){return n.maxDefault},t.get=function(e){return t.channels[e]};var n=t.prototype;n.constructor=t,n.src=null,n.max=null,n.maxDefault=100,n.length=0,n.init=function(e,t){this.src=e,this.max=t||this.maxDefault,-1==this.max&&(this.max=this.maxDefault),this._instances=[]},n._get=function(e){return this._instances[e]},n._add=function(e,t){return!!this._getSlot(t,e)&&(this._instances.push(e),this.length++,!0)},n._remove=function(e){var t=createjs.indexOf(this._instances,e);return-1!=t&&(this._instances.splice(t,1),this.length--,!0)},n._removeAll=function(){for(var e=this.length-1;e>=0;e--)this._instances[e].stop()},n._getSlot=function(t){var s,n;if(t!=e.INTERRUPT_NONE&&null==(n=this._get(0)))return!0;for(var r=0,i=this.max;i>r;r++){if(null==(s=this._get(r)))return!0;if(s.playState==e.PLAY_FINISHED||s.playState==e.PLAY_INTERRUPTED||s.playState==e.PLAY_FAILED){n=s;break}t!=e.INTERRUPT_NONE&&(t==e.INTERRUPT_EARLY&&s.position<n.position||t==e.INTERRUPT_LATE&&s.position>n.position)&&(n=s)}return null!=n&&(n._interrupt(),this._remove(n),!0)},n.toString=function(){return"[Sound SoundChannel]"}}(),this.createjs=this.createjs||{},function(){"use strict";var e=function(e,t,s,n){this.EventDispatcher_constructor(),this.src=e,this.uniqueId=-1,this.playState=null,this.delayTimeoutId=null,this._volume=1,Object.defineProperty(this,"volume",{get:this._getVolume,set:this._setVolume}),this.getVolume=createjs.deprecate(this._getVolume,"AbstractSoundInstance.getVolume"),this.setVolume=createjs.deprecate(this._setVolume,"AbstractSoundInstance.setVolume"),this._pan=0,Object.defineProperty(this,"pan",{get:this._getPan,set:this._setPan}),this.getPan=createjs.deprecate(this._getPan,"AbstractSoundInstance.getPan"),this.setPan=createjs.deprecate(this._setPan,"AbstractSoundInstance.setPan"),this._startTime=Math.max(0,t||0),Object.defineProperty(this,"startTime",{get:this._getStartTime,set:this._setStartTime}),this.getStartTime=createjs.deprecate(this._getStartTime,"AbstractSoundInstance.getStartTime"),this.setStartTime=createjs.deprecate(this._setStartTime,"AbstractSoundInstance.setStartTime"),this._duration=Math.max(0,s||0),Object.defineProperty(this,"duration",{get:this._getDuration,set:this._setDuration}),this.getDuration=createjs.deprecate(this._getDuration,"AbstractSoundInstance.getDuration"),this.setDuration=createjs.deprecate(this._setDuration,"AbstractSoundInstance.setDuration"),this._playbackResource=null,Object.defineProperty(this,"playbackResource",{get:this._getPlaybackResource,set:this._setPlaybackResource}),!1!==n&&!0!==n&&this._setPlaybackResource(n),this.getPlaybackResource=createjs.deprecate(this._getPlaybackResource,"AbstractSoundInstance.getPlaybackResource"),this.setPlaybackResource=createjs.deprecate(this._setPlaybackResource,"AbstractSoundInstance.setPlaybackResource"),this._position=0,Object.defineProperty(this,"position",{get:this._getPosition,set:this._setPosition}),this.getPosition=createjs.deprecate(this._getPosition,"AbstractSoundInstance.getPosition"),this.setPosition=createjs.deprecate(this._setPosition,"AbstractSoundInstance.setPosition"),this._loop=0,Object.defineProperty(this,"loop",{get:this._getLoop,set:this._setLoop}),this.getLoop=createjs.deprecate(this._getLoop,"AbstractSoundInstance.getLoop"),this.setLoop=createjs.deprecate(this._setLoop,"AbstractSoundInstance.setLoop"),this._muted=!1,Object.defineProperty(this,"muted",{get:this._getMuted,set:this._setMuted}),this.getMuted=createjs.deprecate(this._getMuted,"AbstractSoundInstance.getMuted"),this.setMuted=createjs.deprecate(this._setMuted,"AbstractSoundInstance.setMuted"),this._paused=!1,Object.defineProperty(this,"paused",{get:this._getPaused,set:this._setPaused}),this.getPaused=createjs.deprecate(this._getPaused,"AbstractSoundInstance.getPaused"),this.setPaused=createjs.deprecate(this._setPaused,"AbstractSoundInstance.setPaused")},t=createjs.extend(e,createjs.EventDispatcher);t.play=function(e){var t=createjs.PlayPropsConfig.create(e);return this.playState==createjs.Sound.PLAY_SUCCEEDED?(this.applyPlayProps(t),void(this._paused&&this._setPaused(!1))):(this._cleanUp(),createjs.Sound._playInstance(this,t),this)},t.stop=function(){return this._position=0,this._paused=!1,this._handleStop(),this._cleanUp(),this.playState=createjs.Sound.PLAY_FINISHED,this},t.destroy=function(){this._cleanUp(),this.src=null,this.playbackResource=null,this.removeAllEventListeners()},t.applyPlayProps=function(e){return null!=e.offset&&this._setPosition(e.offset),null!=e.loop&&this._setLoop(e.loop),null!=e.volume&&this._setVolume(e.volume),null!=e.pan&&this._setPan(e.pan),null!=e.startTime&&(this._setStartTime(e.startTime),this._setDuration(e.duration)),this},t.toString=function(){return"[AbstractSoundInstance]"},t._getPaused=function(){return this._paused},t._setPaused=function(e){return!0!==e&&!1!==e||this._paused==e||1==e&&this.playState!=createjs.Sound.PLAY_SUCCEEDED?void 0:(this._paused=e,e?this._pause():this._resume(),clearTimeout(this.delayTimeoutId),this)},t._setVolume=function(e){return e==this._volume?this:(this._volume=Math.max(0,Math.min(1,e)),this._muted||this._updateVolume(),this)},t._getVolume=function(){return this._volume},t._setMuted=function(e){return!0===e||!1===e?(this._muted=e,this._updateVolume(),this):void 0},t._getMuted=function(){return this._muted},t._setPan=function(e){return e==this._pan?this:(this._pan=Math.max(-1,Math.min(1,e)),this._updatePan(),this)},t._getPan=function(){return this._pan},t._getPosition=function(){return this._paused||this.playState!=createjs.Sound.PLAY_SUCCEEDED||(this._position=this._calculateCurrentPosition()),this._position},t._setPosition=function(e){return this._position=Math.max(0,e),this.playState==createjs.Sound.PLAY_SUCCEEDED&&this._updatePosition(),this},t._getStartTime=function(){return this._startTime},t._setStartTime=function(e){return e==this._startTime?this:(this._startTime=Math.max(0,e||0),this._updateStartTime(),this)},t._getDuration=function(){return this._duration},t._setDuration=function(e){return e==this._duration?this:(this._duration=Math.max(0,e||0),this._updateDuration(),this)},t._setPlaybackResource=function(e){return this._playbackResource=e,0==this._duration&&this._playbackResource&&this._setDurationFromSource(),this},t._getPlaybackResource=function(){return this._playbackResource},t._getLoop=function(){return this._loop},t._setLoop=function(e){null!=this._playbackResource&&(0!=this._loop&&0==e?this._removeLooping(e):0==this._loop&&0!=e&&this._addLooping(e)),this._loop=e},t._sendEvent=function(e){var t=new createjs.Event(e);this.dispatchEvent(t)},t._cleanUp=function(){clearTimeout(this.delayTimeoutId),this._handleCleanUp(),this._paused=!1,createjs.Sound._playFinished(this)},t._interrupt=function(){this._cleanUp(),this.playState=createjs.Sound.PLAY_INTERRUPTED,this._sendEvent("interrupted")},t._beginPlaying=function(e){return this._setPosition(e.offset),this._setLoop(e.loop),this._setVolume(e.volume),this._setPan(e.pan),null!=e.startTime&&(this._setStartTime(e.startTime),this._setDuration(e.duration)),null!=this._playbackResource&&this._position<this._duration?(this._paused=!1,this._handleSoundReady(),this.playState=createjs.Sound.PLAY_SUCCEEDED,this._sendEvent("succeeded"),!0):(this._playFailed(),!1)},t._playFailed=function(){this._cleanUp(),this.playState=createjs.Sound.PLAY_FAILED,this._sendEvent("failed")},t._handleSoundComplete=function(){return this._position=0,0!=this._loop?(this._loop--,this._handleLoop(),void this._sendEvent("loop")):(this._cleanUp(),this.playState=createjs.Sound.PLAY_FINISHED,void this._sendEvent("complete"))},t._handleSoundReady=function(){},t._updateVolume=function(){},t._updatePan=function(){},t._updateStartTime=function(){},t._updateDuration=function(){},t._setDurationFromSource=function(){},t._calculateCurrentPosition=function(){},t._updatePosition=function(){},t._removeLooping=function(){},t._addLooping=function(){},t._pause=function(){},t._resume=function(){},t._handleStop=function(){},t._handleCleanUp=function(){},t._handleLoop=function(){},createjs.AbstractSoundInstance=createjs.promote(e,"EventDispatcher"),createjs.DefaultSoundInstance=createjs.AbstractSoundInstance}(),this.createjs=this.createjs||{},function(){"use strict";var e=function(){this._capabilities=null,this._loaders={},this._audioSources={},this._soundInstances={},this._volume=1,this._loaderClass,this._soundInstanceClass},t=e.prototype;e._capabilities=null,e.isSupported=function(){return!0},t.register=function(e){var t=this._loaders[e.src];return t&&!t.canceled?this._loaders[e.src]:(this._audioSources[e.src]=!0,this._soundInstances[e.src]=[],t=new this._loaderClass(e),t.on("complete",this._handlePreloadComplete,this),this._loaders[e.src]=t,t)},t.preload=function(e){e.on("error",this._handlePreloadError,this),e.load()},t.isPreloadStarted=function(e){return null!=this._audioSources[e]},t.isPreloadComplete=function(e){return!(null==this._audioSources[e]||1==this._audioSources[e])},t.removeSound=function(e){if(this._soundInstances[e]){for(var t=this._soundInstances[e].length;t--;){this._soundInstances[e][t].destroy()}delete this._soundInstances[e],delete this._audioSources[e],this._loaders[e]&&this._loaders[e].destroy(),delete this._loaders[e]}},t.removeAllSounds=function(){for(var e in this._audioSources)this.removeSound(e)},t.create=function(e,t,s){this.isPreloadStarted(e)||this.preload(this.register(e));var n=new this._soundInstanceClass(e,t,s,this._audioSources[e]);return this._soundInstances[e]&&this._soundInstances[e].push(n),n.setMasterVolume&&n.setMasterVolume(createjs.Sound.volume),n.setMasterMute&&n.setMasterMute(createjs.Sound.muted),n},t.setVolume=function(e){return this._volume=e,this._updateVolume(),!0},t.getVolume=function(){return this._volume},t.setMute=function(){return this._updateVolume(),!0},t.toString=function(){return"[AbstractPlugin]"},t._handlePreloadComplete=function(e){var t=e.target.getItem().src;this._audioSources[t]=e.result;for(var s=0,n=this._soundInstances[t].length;n>s;s++){this._soundInstances[t][s].playbackResource=this._audioSources[t],this._soundInstances[t]=null}},t._handlePreloadError=function(){},t._updateVolume=function(){},createjs.AbstractPlugin=e}(),this.createjs=this.createjs||{},function(){"use strict";function e(e){this.AbstractLoader_constructor(e,!0,createjs.Types.SOUND)}var t=createjs.extend(e,createjs.AbstractLoader);e.context=null,t.toString=function(){return"[WebAudioLoader]"},t._createRequest=function(){this._request=new createjs.XHRRequest(this._item,!1),this._request.setResponseType("arraybuffer")},t._sendComplete=function(){e.context.decodeAudioData(this._rawResult,createjs.proxy(this._handleAudioDecoded,this),createjs.proxy(this._sendError,this))},t._handleAudioDecoded=function(e){this._result=e,this.AbstractLoader__sendComplete()},createjs.WebAudioLoader=createjs.promote(e,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function e(e,t,n,r){this.AbstractSoundInstance_constructor(e,t,n,r),this.gainNode=s.context.createGain(),this.panNode=s.context.createPanner(),this.panNode.panningModel=s._panningModel,this.panNode.connect(this.gainNode),this._updatePan(),this.sourceNode=null,this._soundCompleteTimeout=null,this._sourceNodeNext=null,this._playbackStartTime=0,this._endedHandler=createjs.proxy(this._handleSoundComplete,this)}var t=createjs.extend(e,createjs.AbstractSoundInstance),s=e;s.context=null,s._scratchBuffer=null,s.destinationNode=null,s._panningModel="equalpower",t.destroy=function(){this.AbstractSoundInstance_destroy(),this.panNode.disconnect(0),this.panNode=null,this.gainNode.disconnect(0),this.gainNode=null},t.toString=function(){return"[WebAudioSoundInstance]"},t._updatePan=function(){this.panNode.setPosition(this._pan,0,-.5)},t._removeLooping=function(){this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext)},t._addLooping=function(){this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._sourceNodeNext=this._createAndPlayAudioNode(this._playbackStartTime,0))},t._setDurationFromSource=function(){this._duration=1e3*this.playbackResource.duration},t._handleCleanUp=function(){this.sourceNode&&this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this.sourceNode=this._cleanUp