{"version":3,"sources":["createjs.js","rmlibrary.js","main.js"],"names":["this","createjs","extend","subclass","superclass","o","constructor","prototype","promote","prefix","subP","supP","Object","getPrototypeOf","__proto__","n","hasOwnProperty","indexOf","array","searchElement","i","l","length","UID","_nextID","get","deprecate","fallbackMethod","name","msg","console","warn","log","apply","arguments","Event","type","bubbles","cancelable","target","currentTarget","eventPhase","timeStamp","Date","getTime","defaultPrevented","propagationStopped","immediatePropagationStopped","removed","p","preventDefault","stopPropagation","stopImmediatePropagation","remove","clone","set","props","toString","EventDispatcher","_listeners","_captureListeners","initialize","addEventListener","on","removeEventListener","off","removeAllEventListeners","hasEventListener","dispatchEvent","_dispatchEvent","willTrigger","listener","useCapture","listeners","arr","push","scope","once","data","handleEvent","evt","call","splice","eventObj","e","parent","top","list","captureListeners","slice","Ticker","RAF_SYNCHED","RAF","TIMEOUT","timingMode","maxDelta","paused","_addEventListener","_inited","init","_startTime","_pausedTime","_ticks","_pausedTicks","_interval","_lastTime","_times","_tickTimes","_timerId","_raf","_setInterval","interval","_setupTick","setInterval","_getInterval","getInterval","_setFPS","value","setFPS","_getFPS","getFPS","defineProperties","framerate","_getTime","reset","f","window","cancelAnimationFrame","webkitCancelAnimationFrame","mozCancelAnimationFrame","oCancelAnimationFrame","msCancelAnimationFrame","clearTimeout","getMeasuredTickTime","ticks","ttl","times","Math","min","getMeasuredFPS","runTime","getEventTime","getTicks","pauseable","_handleSynch","_tick","_handleRAF","_handleTimeout","mode","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","setTimeout","event","time","elapsedTime","delta","unshift","pop","w","now","performance","mozNow","msNow","oNow","webkitNow","VideoBuffer","video","readyState","_video","_canvas","_videoReady","bind","getImage","canvas","ctx","createCanvas","document","createElement","width","videoWidth","height","videoHeight","currentTime","getContext","clearRect","drawImage","MouseEvent","stageX","stageY","nativeEvent","pointerID","primary","rawX","rawY","relatedTarget","Event_constructor","_get_localX","globalToLocal","x","_get_localY","y","_get_isTouch","localX","localY","isTouch","Matrix2D","a","b","c","d","tx","ty","setValues","DEG_TO_RAD","PI","identity","append","a1","b1","c1","d1","prepend","tx1","appendMatrix","matrix","prependMatrix","appendTransform","scaleX","scaleY","rotation","skewX","skewY","regX","regY","cos","sin","r","prependTransform","rotate","angle","skew","scale","translate","invert","isIdentity","equals","transformPoint","pt","decompose","sqrt","atan2","abs","copy","DisplayProps","visible","alpha","shadow","compositeOperation","Point","point","Rectangle","pad","left","bottom","right","rectangle","contains","union","rect","intersection","x1","y1","x2","y2","intersects","isEmpty","ButtonHelper","outLabel","overLabel","downLabel","play","hitArea","hitLabel","_isPressed","_isOver","_enabled","mouseChildren","enabled","actionsEnabled","gotoAndStop","_setEnabled","cursor","_reset","__reset","setEnabled","_getEnabled","getEnabled","t","label","gotoAndPlay","Shadow","color","offsetX","offsetY","blur","SpriteSheet","EventDispatcher_constructor","complete","_animations","_frames","_images","_data","_loadCount","_frameHeight","_frameWidth","_numFrames","_regX","_regY","_spacing","_margin","_parseData","_getAnimations","getAnimations","animations","getNumFrames","animation","frames","getAnimation","getFrame","frameIndex","frame","getFrameBounds","images","src","img","naturalWidth","onload","_handleImageLoad","onerror","_handleImageError","Array","isArray","image","spacing","margin","count","_calculateFrames","anim","obj","speed","next","undefined","errorEvent","maxFrames","frameCount","frameWidth","frameHeight","imgLoop","imgs","imgW","imgH","naturalHeight","Graphics","command","_stroke","_strokeStyle","_oldStrokeStyle","_strokeDash","_oldStrokeDash","_strokeIgnoreScale","_fill","_instructions","_commitIndex","_activeInstructions","_dirty","_storeIndex","clear","G","getRGB","g","getHSL","hue","saturation","lightness","BASE_64","A","B","C","D","E","F","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","h","j","k","m","q","s","u","v","z","0","1","2","3","4","5","6","7","8","9","+","/","STROKE_CAPS_MAP","STROKE_JOINTS_MAP","_ctx","_getInstructions","_updateInstructions","getInstructions","instructions","draw","instr","exec","drawAsPath","instrs","path","moveTo","MoveTo","lineTo","LineTo","arcTo","radius","ArcTo","arc","startAngle","endAngle","anticlockwise","Arc","quadraticCurveTo","cpx","cpy","QuadraticCurveTo","bezierCurveTo","cp1x","cp1y","cp2x","cp2y","BezierCurveTo","Rect","closePath","ClosePath","beginFill","_setFill","Fill","beginLinearGradientFill","colors","ratios","x0","y0","linearGradient","beginRadialGradientFill","r0","r1","radialGradient","beginBitmapFill","repetition","bitmap","endFill","setStrokeStyle","thickness","caps","joints","miterLimit","ignoreScale","StrokeStyle","setStrokeDash","segments","offset","StrokeDash","beginStroke","_setStroke","Stroke","beginLinearGradientStroke","beginRadialGradientStroke","beginBitmapStroke","endStroke","curveTo","drawRect","drawRoundRect","drawRoundRectComplex","radiusTL","radiusTR","radiusBR","radiusBL","RoundRect","drawCircle","Circle","drawEllipse","Ellipse","drawPolyStar","sides","pointSize","PolyStar","clean","decodePath","str","paramCount","params","base64","charAt","fi","pl","charCount","sign","num","store","unstore","mt","lt","at","bt","qt","cp","lf","rf","bf","ef","ss","sd","ls","rs","bs","es","dr","rr","rc","dc","de","dp","commit","active","commitIndex","beginCmd","ll","fill","stroke","BeginPath","beginPath","style","mtx","fillStyle","save","transform","restore","createLinearGradient","addColorStop","createRadialGradient","createPattern","strokeStyle","setTransform","lineWidth","lineCap","isNaN","lineJoin","setLineDash","EMPTY_SEGMENTS","lineDashOffset","max","mTL","mTR","mBR","mBL","rTL","rTR","rBR","rBL","ox","oy","xe","ye","xm","ym","ps","DisplayObject","cacheCanvas","bitmapCache","id","mouseEnabled","tickEnabled","transformMatrix","snapToPixel","filters","mask","_props","_rectangle","_bounds","_webGLRenderStyle","_StageGL_NONE","_MOUSE_EVENTS","suppressCrossDomainErrors","_snapToPixelEnabled","_StageGL_SPRITE","_StageGL_BITMAP","_hitTestCanvas","_hitTestContext","_getStage","_Stage","getStage","stage","cacheID","isVisible","ignoreCache","cache","updateContext","graphics","getMatrix","clip","globalAlpha","globalCompositeOperation","_applyShadow","options","BitmapCache","define","updateCache","update","uncache","release","getCacheDataURL","getDataURL","localToGlobal","getConcatenatedMatrix","localToLocal","getConcatenatedDisplayProps","hitTest","hit","_testHit","getBounds","_cacheScale","_cacheOffsetX","_cacheOffsetY","getTransformedBounds","_getBounds","setBounds","_cloneProps","_updateState","shadowColor","shadowOffsetX","shadowOffsetY","shadowBlur","evtObj","getImageData","ignoreTransform","_transformBounds","bounds","x_a","x_b","y_c","y_d","minX","maxX","minY","maxY","_hasMouseEventListener","evts","Container","DisplayObject_constructor","children","tickChildren","_getNumChildren","getNumChildren","numChildren","hasContent","DisplayObject_draw","child","addChild","par","silent","_removeChildAt","addChildAt","index","indx","removeChild","good","removeChildAt","sort","removeAllChildren","kids","getChildAt","getChildByName","sortChildren","sortFunction","getChildIndex","swapChildrenAt","index1","index2","o1","o2","swapChildren","child1","child2","setChildIndex","getObjectUnderPoint","getObjectsUnderPoint","_getObjectsUnderPoint","recursive","_cloneChildren","DisplayObject__tick","mouse","activeListener","currentDepth","_testMask","result","DisplayObject_getBounds","Stage","Container_constructor","autoClear","getElementById","mouseX","mouseY","snapToPixelEnabled","mouseInBounds","tickOnUpdate","mouseMoveOutside","preventSelection","_pointerData","_pointerCount","_primaryPointerID","_mouseOverIntervalID","_nextStage","_prevStage","enableDOMEvents","_get_nextStage","_set_nextStage","nextStage","tick","toDataURL","backgroundColor","mimeType","dataURL","fillRect","putImageData","enableMouseOver","frequency","clearInterval","_testMouseOver","enable","_eventListeners","_this","_handleMouseUp","_handleMouseMove","_handleDoubleClick","_handleMouseDown","_getElementRect","getBoundingClientRect","err","offsetTop","offsetLeft","offsetWidth","offsetHeight","offX","pageXOffset","scrollLeft","clientLeft","body","offY","pageYOffset","scrollTop","clientTop","styles","getComputedStyle","currentStyle","padL","parseInt","paddingLeft","borderLeftWidth","padT","paddingTop","borderTopWidth","padR","paddingRight","borderRightWidth","padB","paddingBottom","borderBottomWidth","_getPointerData","_handlePointerMove","pageX","pageY","owner","inBounds","_updatePointerPosition","_dispatchMouseEvent","posEvtObj","_handlePointerUp","oTarget","down","_handlePointerDown","eventTarget","_mouseOverX","_mouseOverY","isEventTarget","common","oldList","_mouseOverTarget","oldTarget","pointerId","StageGL","Stage_constructor","premultiply","transparent","antialias","preserveBuffer","autoPurge","vocalDebug","_preserveBuffer","_antialias","_transparent","_premultiply","_autoPurge","_viewportWidth","_viewportHeight","_projectionMatrix","_webGLContext","_clearColor","_maxCardsPerBatch","DEFAULT_MAX_BATCH_SIZE","_activeShader","_vertices","_vertexPositionBuffer","_uvs","_uvPositionBuffer","_indices","_textureIndexBuffer","_alphas","_alphaBuffer","_textureDictionary","_textureIDs","_batchTextures","_baseTextures","_batchTextureCount","_lastTextureInsert","_batchID","_drawID","_slotBlacklist","_isDrawing","_lastTrackedCanvas","isCacheControlled","_cacheContainer","_initializeWebGL","buildUVRects","spritesheet","onlyTarget","end","uvRect","isWebGLActive","WebGLRenderingContext","VERTEX_PROPERTY_COUNT","INDICIES_PER_CARD","WEBGL_MAX_INDEX_NUM","pow","UV_RECT","COVER_VERT","Float32Array","COVER_UV","COVER_UV_FLIP","REGULAR_VERTEX_HEADER","REGULAR_VARYING_HEADER","REGULAR_FRAGMENT_HEADER","REGULAR_VERTEX_BODY","REGULAR_FRAGMENT_BODY","REGULAR_FRAG_COLOR_NORMAL","REGULAR_FRAG_COLOR_PREMULTIPLY","PARTICLE_VERTEX_BODY","PARTICLE_FRAGMENT_BODY","COVER_VERTEX_HEADER","COVER_VARYING_HEADER","COVER_FRAGMENT_HEADER","COVER_VERTEX_BODY","COVER_FRAGMENT_BODY","_get_isWebGL","_set_autoPurge","_get_autoPurge","Number","isWebGL","depth","stencil","premultipliedAlpha","preserveDrawingBuffer","gl","_fetchWebGLContext","updateSimultaneousTextureCount","getParameter","MAX_TEXTURE_IMAGE_UNITS","_maxTextureSlots","MAX_COMBINED_TEXTURE_IMAGE_UNITS","_createBuffers","_initTextures","disable","DEPTH_TEST","BLEND","blendFuncSeparate","SRC_ALPHA","ONE_MINUS_SRC_ALPHA","ONE","pixelStorei","UNPACK_PREMULTIPLY_ALPHA_WEBGL","clearColor","updateViewport","_batchDraw","purgeTextures","cc","adjust","COLOR_BUFFER_BIT","Stage_clear","context","Stage_draw","cacheDraw","manager","_cacheDraw","protectTextureSlot","lock","getTargetRenderTexture","toggle","__lastRT","__rtA","__rtB","getRenderBufferTexture","_width","_height","resizeTexture","setTextureParams","releaseTexture","item","foundImage","_storeID","_killTextureObject","spriteSheet","dict","success","_fetchShaderProgram","viewport","_projectionMatrixFlip","getFilterShader","filter","targetShader","_builtShader","shaderParamSetup","useProgram","VTX_SHADER_BODY","FRAG_SHADER_BODY","_name","getBaseTexture","ceil","texture","createTexture","bindTexture","TEXTURE_2D","texImage2D","RGBA","UNSIGNED_BYTE","renderTexture","frameBuffer","createFramebuffer","bindFramebuffer","FRAMEBUFFER","framebufferTexture2D","COLOR_ATTACHMENT0","_renderTexture","_frameBuffer","isPOT","texParameteri","TEXTURE_MIN_FILTER","LINEAR","TEXTURE_MAG_FILTER","NEAREST","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","setClearColor","output","split","viewportWidth","viewportHeight","error","shaderName","customVTX","customFRAG","targetFrag","targetVtx","vertexShader","_createShader","VERTEX_SHADER","fragmentShader","FRAGMENT_SHADER","shaderProgram","createProgram","attachShader","linkProgram","_type","getProgramParameter","LINK_STATUS","getProgramInfoLog","vertexPositionAttribute","getAttribLocation","enableVertexAttribArray","uvPositionAttribute","samplerUniform","getUniformLocation","uniform1i","uprightUniform","uniform1f","textureIndexAttribute","alphaAttribute","samplers","samplerData","uniform1iv","pMatrixUniform","replace","insert","shader","createShader","shaderSource","compileShader","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","groupSize","groupCount","vertexPositionBuffer","createBuffer","vertices","bindBuffer","ARRAY_BUFFER","bufferData","DYNAMIC_DRAW","itemSize","numItems","uvPositionBuffer","uvs","textureIndexBuffer","indices","alphaBuffer","alphas","tex","_loadTextureImage","storeID","_isCanvas","_imageData","_insertTextureInBatch","_updateTextureImageData","isNPOT","activeTexture","TEXTURE0","_activeIndex","errString","_invalid","_w","_h","MAX_TEXTURE_SIZE","found","start","look","batchReason","_drawBuffers","batchCardCount","deleteFramebuffer","deleteTexture","_backupBatchTextures","_backupTextures","sceneGraph","_appendToBatchGroup","shaderBackup","blackListBackup","lastTextureSlot","wBackup","hBackup","container","_drawFilters","_drawWidth","_drawHeight","filterCount","flipY","_drawCover","_multiPass","concatMtx","concatAlpha","_glMtx","subL","subT","subR","subB","cMtx","iMtx","useCache","currentFrame","texI","texIndex","offV1","sourceRect","_uvRect","_filterOffX","_filterOffY","offV2","vertexAttribPointer","FLOAT","bufferSubData","uniformMatrix4fv","FALSE","drawArrays","TRIANGLES","Bitmap","imageOrUri","node","cloneNode","Sprite","frameOrAnimation","currentAnimation","currentAnimationFrame","_animation","_currentFrame","_skipAdvance","_normalizeFrame","stop","_goto","advance","fps","DisplayObject__cloneProps","frameDelta","animFrame","_dispatchAnimationEnd","changed","Shape","Text","text","font","textAlign","textBaseline","maxWidth","outline","lineHeight","_workingContext","H_OFFSETS","center","V_OFFSETS","hanging","middle","alphabetic","ideographic","col","_drawText","_prepContext","getMeasuredWidth","_getMeasuredWidth","getMeasuredLineHeight","getMeasuredHeight","getMetrics","lines","vOffset","substr","paint","maxW","hardLines","String","measureText","words","jl","wordW","_drawTextLine","strokeText","fillText","BitmapText","letterSpacing","spaceWidth","_oldProps","_oldStage","_drawAction","maxPoolSize","_spritePool","Container_draw","_updateText","Container_getBounds","Container__cloneProps","_getFrameIndex","character","toUpperCase","toLowerCase","_getFrame","_getLineHeight","_getSpaceWidth","sprite","change","spaceW","lineH","pool","childIndex","numKids","hasSpace","MovieClip","startPosition","loop","labels","inited","INDEPENDENT","autoReset","frameBounds","useTicks","timeline","Timeline","_synchOffset","_rawPosition","_bound_resolveState","_resolveState","_t","_managed","SINGLE_FRAME","SYNCHED","MovieClipPlugin","install","_getLabels","getLabels","_getCurrentLabel","currentLabel","getCurrentLabel","_getDuration","duration","getDuration","totalFrames","positionOrLabel","independent","_framerate","_updateTimeline","Container__tick","pos","resolve","rawPosition","jump","synced","tl","setPosition","_renderFirstFrame","position","tweens","tween","passive","_stepPosition","_addManagedChild","_setState","state","_off","Container__getBounds","priority","ID","Tween","_installPlugin","prop","_addPlugin","step","ratio","prev","SpriteSheetUtils","_workingCanvas","extractFrame","addFlippedFrames","mergeAlpha","_flip","il","__tmp","fl","sfx","names","al","SpriteSheetBuilder","maxHeight","padding","timeSlice","progress","_nextFrameIndex","_index","_timerID","_scale","ERR_DIMENSIONS","ERR_RUNNING","addFrame","source","setupFunction","setupData","nominalBounds","funct","addAnimation","addMovieClip","labelFunction","rects","baseFrameIndex","_setupMovieClipFrame","_labels","lbls","build","_startBuild","_drawNext","_endBuild","buildAsync","_run","stopAsync","dataFrames","_fillRow","_getSize","ae","size","sc","rx","floor","ry","rh","rw","round","ts","DOMElement","htmlElement","transformOrigin","WebkitTransformOrigin","msTransformOrigin","MozTransformOrigin","OTransformOrigin","_handleDrawEnd","oldProps","visibility","oldMtx","WebkitTransform","OTransform","msTransform","MozTransform","opacity","Filter","usesContext","applyFilter","targetCtx","targetX","targetY","imageData","_applyFilter","_cacheDataURLID","_cacheDataURL","getFilterBounds","test","_options","filterBounds","surface","_updateSurface","_drawToCache","_webGLCache","useGL","stageGL","webGL","_applyFilters","BlurFilter","blurX","blurY","quality","Filter_constructor","_blurX","_blurXTable","_lastBlurX","_blurY","_blurYTable","_lastBlurY","_quality","_lastQuality","FRAG_SHADER_TEMPLATE","setQuality","getBlurX","getBlurY","setBlurX","setBlurY","getQuality","_getShader","xChange","yChange","qChange","_getTable","_updateShader","_compiledShader","_setShader","spread","factor","reduce","map","currentValue","toFixed","uniform1fv","uniform2f","MUL_TABLE","SHG_TABLE","radiusX","radiusY","iterations","px","yp","yi","yw","pr","pg","pb","pa","divx","divy","w1","h1","rxp1","ryp1","ssx","sx","ssy","sy","si","stx","mty","sty","ms","AlphaMapFilter","alphaMap","_alphaMap","_mapData","_mapTexture","TEXTURE1","_prepAlphaMap","HTMLCanvasElement","imgData","AlphaMaskFilter","ColorFilter","redMultiplier","greenMultiplier","blueMultiplier","alphaMultiplier","redOffset","greenOffset","blueOffset","alphaOffset","uniform4f","ColorMatrix","brightness","contrast","setColor","DELTA_INDEX","LENGTH","IDENTITY_MATRIX","adjustColor","adjustHue","adjustContrast","adjustBrightness","adjustSaturation","_cleanValue","_multiplyMatrix","cosVal","sinVal","lumR","lumG","lumB","concat","_fixMatrix","toArray","val","limit","ColorMatrixFilter","mat","colorMatrix","m0","m1","m2","m3","m4","m5","m6","m7","m8","m9","m10","m11","m12","m13","m14","m15","m16","m17","m18","m19","Touch","isSupported","navigator","singleTouch","allowDefault","__touch","pointers","multitouch","_IOS_enable","_IE_enable","_IOS_disable","_IE_disable","_IOS_handleEvent","touches","changedTouches","touch","identifier","_handleStart","_handleMove","_handleEnd","_IE_handleEvent","msTouchAction","touchAction","activeIDs","ids","srcElement","EaselJS","version","buildDate","PreloadJS","proxy","method","aArgs","ErrorEvent","title","message","ProgressEvent","loaded","total","nativeJSON","previousJSON","isRestored","JSON3","isLoader","amd","objectTypes","function","object","freeExports","exports","nodeType","root","freeGlobal","module","global","runInContext","isProperty","forEach","undef","functionClass","numberClass","stringClass","arrayClass","charIndexBuggy","Months","getDay","Escapes","leadingZeroes","toPaddedString","unicodePrefix","quote","serialize","fromCharCode","Unescapes","Index","Source","abort","lex","walk","SyntaxError","TypeError","objectProto","stringify","parse","getClass","isExtended","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","exception","has","serialized","stringifySupported","toJSON","parseSupported","year","month","property","members","original","callback","Properties","valueOf","isFunction","isConstructor","hasProperty","92","34","12","10","13","useCharIndex","symbols","charCode","charCodeAt","properties","whitespace","indentation","stack","className","date","minutes","seconds","milliseconds","results","element","hours","join","47","98","116","110","102","114","begin","isSigned","hasMembers","JSON","noConflict","el","svg","link","script","audio","createTextNode","Elements","ABSOLUTE_PATT","RELATIVE_PATT","EXTENSION_PATT","parseURI","info","absolute","relative","protocol","hostname","port","pathname","search","hash","host","parser","href","queryIndex","match","extension","formatQueryString","query","Error","escape","buildURI","idx","isCrossDomain","location","isLocal","URLUtils","appendToHead","getHead","appendChild","appendToBody","overflow","webkitTransform","oTransform","getBody","head","getElementsByTagName","isImageTag","HTMLImageElement","isAudioTag","HTMLAudioElement","isVideoTag","HTMLVideoElement","DomUtils","parseXML","xml","DOMParser","parseFromString","ActiveXObject","async","loadXML","parseJSON","DataUtils","BINARY","CSS","FONT","FONTCSS","IMAGE","JAVASCRIPT","JSONP","MANIFEST","SOUND","VIDEO","SPRITESHEET","SVG","TEXT","XML","Types","POST","GET","Methods","LoadItem","maintainOrder","values","headers","withCredentials","crossOrigin","loadTimeout","LOAD_TIMEOUT_DEFAULT","create","isBinary","isText","getTypeByExtension","RequestUtils","AbstractLoader","loadItem","preferXHR","canceled","resultFormatter","_item","_preferXHR","_result","_rawResult","_loadedItems","_tagSrcAttribute","_tag","getItem","getResult","raw","getTag","setTag","tag","load","_createRequest","_request","loader","cancel","destroy","_loadItems","getLoadedItems","XHRRequest","TagRequest","_createTag","_sendLoadStart","_isCanceled","_sendProgress","Infinity","_sendComplete","rawResult","_sendError","_response","Function","_resultFormatSuccess","_resultFormatFailed","AbstractMediaLoader","AbstractLoader_constructor","_formatResult","_updateXHR","preload","AbstractLoader_load","MediaTagRequest","setResponseType","URL","_loadedHandler","onstalled","webkitURL","createObjectURL","AbstractRequest","srcAttribute","AbstractRequest_constructor","_handleTagComplete","_addedToDOM","onreadystatechange","_handleReadyStateChange","_handleError","_loadTimeout","parentNode","_clean","AbstractRequest_destroy","_handleStalled","pc","_stalledCallback","_handleProgress","TagRequest_load","newEvent","_progressCallback","TagRequest__clean","_xhrLevel","_rawResponse","_canceled","_handleLoadStartProxy","_handleLoadStart","_handleProgressProxy","_handleAbortProxy","_handleAbort","_handleErrorProxy","_handleTimeoutProxy","_handleLoadProxy","_handleLoad","_handleReadyStateChangeProxy","_createXHR","ACTIVEX_VERSIONS","onloadstart","onprogress","onabort","ontimeout","send","_responseType","responseType","getAllResponseHeaders","getResponseHeader","header","_checkError","_getResponse","Blob","BlobBuilder","WebKitBlobBuilder","MozBlobBuilder","MSBlobBuilder","builder","getBlob","status","response","responseText","responseXML","crossdomain","req","XMLHttpRequest","XDomainRequest","axVersion","overrideMimeType","open","origin","setRequestHeader","LoadQueue","basePath","_plugins","_typeCallbacks","_extensionCallbacks","maintainScriptOrder","stopOnError","_maxConnections","_availableLoaders","FontLoader","ImageLoader","JavaScriptLoader","CSSLoader","JSONLoader","JSONPLoader","SoundLoader","ManifestLoader","SpriteSheetLoader","XMLLoader","SVGLoader","BinaryLoader","VideoLoader","TextLoader","_defaultLoaderLength","setPreferXHR","_paused","_basePath","_crossOrigin","_loadStartWasDispatched","_currentlyLoadingScript","_currentLoads","_loadQueue","_loadQueueBackup","_loadItemsById","_loadItemsBySrc","_loadedResults","_loadedRawResults","_numItems","_numItemsLoaded","_scriptOrder","_loadedScripts","_lastProgress","NaN","registerLoader","canLoadItem","unregisterLoader","removeAll","idsOrUrls","args","itemsWereRemoved","_disposeItem","_loadNext","close","loadManifest","installPlugin","plugin","getPreloadHandlers","types","extensions","setMaxConnections","loadFile","file","loadNow","_addItem","setPaused","manifest","fileList","getItems","loadStartWasDispatched","_itemCount","_createLoadItem","_createLoader","plugins","_loader","_updateProgress","bp","useBasePath","pathMatch","autoId","ext","customHandler","_canStartLoad","_loadItem","_handleFileLoad","_handleFileComplete","_handleFileError","_sendFileStart","_finishOrderedItem","_removeLoadItem","_cleanLoadItem","_saveLoadedItems","_processFinishedLoad","loadFailed","_checkScriptLoadOrder","_sendFileComplete","_sendFileProgress","remaining","chunk","completeHandler","rel","styleSheet","cssText","textNode","_faces","_watched","_count","_watchInterval","_injectCSS","injectCSS","sampleText","_referenceFonts","WEIGHT_REGEX","STYLE_REGEX","FONT_FORMAT","woff2","woff","ttf","otf","FONT_WEIGHT","thin","extralight","ultralight","light","semilight","demilight","book","regular","semibold","demibold","extrabold","ultrabold","black","heavy","WATCH_DURATION","def","_watchCSS","_watchFontArray","_defFromSrc","_watchFont","_injectStyleTag","_cssFromDef","_stopWatching","_parseCSS","AbstractLoader_handleEvent","HTMLStyleElement","textContent","css","regex","_parseFontFace","_defFromObj","styleTag","family","_getCSSValue","weight","_calculateReferenceSizes","_startWatching","_watch","defs","refFonts","refs","_getTextWidth","re","lastIndexOf","cssSrc","format","propName","RegExp","_formatImage","successCallback","errorCallback","objURL","_cleanUpURL","revokeObjectURL","json","AbstractLoader_cancel","_dispose","_manifestQueue","MANIFEST_PROGRESS","_loadManifest","AbstractLoader_destroy","queue","_handleManifestFileLoad","_handleManifestProgress","_handleManifestComplete","_handleManifestError","AbstractMediaLoader_constructor","autoplay","SPRITESHEET_PROGRESS","documentElement","importNode","SoundJS","BrowserDetect","agent","userAgent","isWindowPhone","isFirefox","isOpera","opera","isChrome","isIOS","isAndroid","isBlackberry","PlayPropsConfig","interrupt","delay","volume","pan","startTime","Sound","SoundChannel","INTERRUPT_ANY","INTERRUPT_EARLY","INTERRUPT_LATE","INTERRUPT_NONE","PLAY_INITED","PLAY_SUCCEEDED","PLAY_INTERRUPTED","PLAY_FINISHED","PLAY_FAILED","SUPPORTED_EXTENSIONS","EXTENSION_MAP","m4a","FILE_PATTERN","defaultInterruptBehavior","alternateExtensions","activePlugin","_masterVolume","_getMasterVolume","getVolume","_setMasterVolume","setVolume","instances","_instances","setMasterVolume","_masterMute","_getMute","getMute","_setMute","setMute","setMasterMute","_getCapabilities","_capabilities","getCapabilities","muted","capabilities","_pluginsRegistered","_lastID","_idHash","_preloadHash","_defaultPlayPropsHash","initLoad","_handleLoadComplete","_handleLoadError","_registerPlugin","registerPlugins","initializeDefaultPlugins","WebAudioPlugin","HTMLAudioPlugin","isReady","_registerSound","details","_parseSrc","_parsePath","numChannels","channels","audioSprite","sp","defaultPlayProps","register","maxPerChannel","registerSound","registerSounds","sounds","returnValues","removeSound","_getSrcById","removeSrc","removeSounds","removeAllSounds","loadComplete","ret","playProps","instance","createInstance","_playInstance","_playFailed","DefaultSoundInstance","applyPlayProps","uniqueId","setDefaultPlayProps","getDefaultPlayProps","_beginPlaying","delayTimeoutId","add","_playFinished","channel","_removeAll","_add","_remove","maxDefault","_get","_getSlot","replacement","playState","_interrupt","AbstractSoundInstance","playbackResource","_volume","defineProperty","_getVolume","_setVolume","_pan","_getPan","_setPan","_getStartTime","_setStartTime","_duration","_setDuration","_playbackResource","_getPlaybackResource","_setPlaybackResource","_position","_getPosition","_setPosition","_loop","_getLoop","_setLoop","_muted","_getMuted","_setMuted","_getPaused","_setPaused","_cleanUp","_handleStop","_pause","_resume","_updateVolume","_updatePan","_calculateCurrentPosition","_updatePosition","_updateStartTime","_updateDuration","_setDurationFromSource","_removeLooping","_addLooping","_sendEvent","_handleCleanUp","_handleSoundReady","_handleSoundComplete","_handleLoop","AbstractPlugin","_loaders","_audioSources","_soundInstances","_loaderClass","_soundInstanceClass","_handlePreloadComplete","_handlePreloadError","isPreloadStarted","isPreloadComplete","key","setPlaybackResource","Loader","decodeAudioData","_handleAudioDecoded","decodedAudio","AbstractLoader__sendComplete","WebAudioLoader","WebAudioSoundInstance","AbstractSoundInstance_constructor","gainNode","createGain","panNode","createPanner","panningModel","_panningModel","connect","sourceNode","_soundCompleteTimeout","_sourceNodeNext","_playbackStartTime","_endedHandler","_scratchBuffer","destinationNode","AbstractSoundInstance_destroy","disconnect","_cleanUpAudioNode","_createAndPlayAudioNode","numberOfOutputs","audioNode","buffer","dur","createBufferSource","newVolume","gain","AbstractPlugin_constructor","dynamicsCompressorNode","createDynamicsCompressor","destination","_addPropsToClasses","_unlocked","DEFAULT_SAMPLE_RATE","isMobilePhoneGap","_isFileXHRSupported","_generateCapabilities","playEmptySound","supported","xhr","canPlayType","_createAudioContext","_compatibilitySetUp","_unlock","panning","tracks","supportedExtensions","extensionMap","playType","numberOfChannels","AudioCtor","AudioContext","webkitAudioContext","dummy","sampleRate","createGainNode","noteGrainOn","noteOff","HTMLAudioTagPool","TagPool","_tags","_tagPool","_tagUsed","HTMLAudioSoundInstance","_audioSpriteStopTime","_delayTimeoutId","_readyHandler","_handleTagReady","_stalledHandler","_audioSpriteEndHandler","_handleAudioSpriteLoop","_loopHandler","isMuted","_AUDIO_SEEKED","pause","_AUDIO_ENDED","_AUDIO_READY","_AUDIO_STALLED","_TIME_UPDATE","AbstractSoundInstance__beginPlaying","_handleSetPositionSeek","MAX_INSTANCES","AbstractPlugin_register","AbstractPlugin_removeSound","AbstractPlugin_create","AbstractTween","ignoreGlobalPause","reversed","bounce","timeScale","_next","_prev","_parent","_labelList","onChange","onComplete","_register","getPaused","ignoreActions","loopCount","prevRawPos","_runActions","calculatePosition","setLabels","addLabel","_init","startRawPos","endRawPos","includeStart","_actionHead","loop0","loop1","t0","t1","_runActionsRange","dir","rev","startPos","endPos","AbstractTween_constructor","pluginData","_stepHead","TweenStep","_stepTail","_actionTail","_pluginIds","_injected","override","removeTweens","ease","TweenAction","IGNORE","_tweens","_tweenHead","_tweenTail","tweenjs_count","removeAllTweens","hasActiveTweens","tail","wait","_addStep","to","_appendProps","_addAction","_set","stepNext","_updateTargetProps","v0","v1","p0","p1","proploop","action","ePos","sPos","stepPlugins","initValue","initProps","oldStep","stepProps","cleanProps","inject","_injectProp","addTween","removeTween","updateDuration","Ease","none","linear","amount","getPowIn","getPowOut","getPowInOut","quadIn","quadOut","quadInOut","cubicIn","cubicOut","cubicInOut","quartIn","quartOut","quartInOut","quintIn","quintOut","quintInOut","sineIn","sineOut","sineInOut","backIn","getBackIn","backOut","getBackOut","backInOut","getBackInOut","circIn","circOut","circInOut","bounceIn","bounceOut","bounceInOut","elasticIn","getElasticIn","amplitude","period","pi2","asin","elasticOut","getElasticOut","elasticInOut","getElasticInOut","MotionGuidePlugin","guideData","guide","_solveGuideData","valid","endData","orient","initRot","startOffsetRot","startData","endAbsRot","deltaRotation","finalRot","deltaRot","modRot","_ratioToPositionData","debug","higlight","_findPathProblems","pathLength","hiCount","tempStore","tempLook","storage","subLines","totalLength","animSpan","temp","cx","cy","ex","ey","subLine","weightings","estLength","portion","subX","subY","_getParamsForCurve","dx","dy","len","startRatio","endRatio","lineSegments","effRatio","pathData","inv","valueCount","TweenJS","__rmAmd","__loader","replaceChildren","newChildren","from","lastChild","loadDeps","deps","current","arrayMap","cb","loadMod","default","newArr","curr","parts","currentParts","backstack","resolvePath","modInfo","factory","inArray","loading","globalThis","_global","self","arrayLike","of","find","fn","thisObj","findIndex","flat","flatMap","includes","valueToFind","fromIndex","Set","assign","entries","oProps","keys","resArr","is","parseFloat","isFinite","isInteger","Promise","IDENTITY","THROWER","STATE_PENDING","STATE_FULFILLED","STATE_REJECTED","makeIterator","done","enqueueJob","timer","runQueue","shift","func","promiseReactionJob","reaction","argument","handlerResult","promiseCapability","handler","throws","reject","promiseResolveThenableJob","promiseToResolve","thenable","then","resolvingFunctions","createResolvingFunctions","triggerPromiseReactions","reactions","rejectPromise","promise","reason","fulfillPromise","alreadyResolved","resolution","newPromiseCapability","res","rej","isPromise","PromiseReaction","executor","performPromiseAll","iteratorRecord","resultCapability","remainingElementsCount","iterator","nextPromise","resolveElement","remainingElements","alreadyCalled","promiseAllResolveElement","all","iterable","race","performPromiseRace","onFulfilled","onRejected","fulfillReaction","rejectReaction","writable","PolyfillPromise","trimEnd","trimRight","trimStart","trimLeft","endsWith","this_len","substring","repeat","ostr","RangeError","padEnd","strLen","padStr","padStart","startsWith","searchStr","Map","Element","matches","msMatchesSelector","webkitMatchesSelector","closest","selector","parentElement","Document","DocumentFragment","defineAmd","dependancies","mod","dependencies","require","i18n","lookupKey","lang","strings","acc","arg","part","jQuery","AnimateVideoComponent","extendStatics","__extends","setPrototypeOf","__","createjs_1","_super","upgrade","mc","videoSrc","_this_1","updateDom","getContainer","domOverlay","cancelStageListener","videoElem","querySelector","bitmapFrame","parentTime","oldParentFrame","videoTime","playbackRate","tolerance","videoSource","__rm_upgraded__","handleRemoved","AnimateHtmlComponent","html","pointerEvents","attachShadow","innerHTML","offsetParent","updatePosition","setProperty","shadowRoot","querySelectorAll","watch","registerInput","__spreadArray","pack","ar","html_component_js_1","video_component_js_1","enumerable","rm","upgradeClip","addVideo","animate","input","watcherMap","WeakMap","watcher","lastValue","watched","fixProp","desc","getOwnPropertyDescriptor","HTMLElement","appVersion","__rm_ie11_innerhtml_fixed__","setWatchAttributes","queueElement","tagNameLookup","NativeHTMLElement","upgradeQueue","watchAttributes","tagName","deregisterElement","registerElement","HTMLCustomElement","HTMLElement_js_1","configurable","BASE_OBSSERVER_OPTIONS","childList","subtree","isUpgraded","attributeChangedCallback","MutationObserver","mutations","mutation","attributeName","oldValue","getAttribute","observe","attributes","attributeOldValue","attributeFilter","observedAttributes","newObserver","alreadyRemoved","alreadyAdded","removedNodes","Node","ELEMENT_NODE","checkRemovedElement","deep","disconnectedCallback","addedNodes","checkAddedElement","tagname","connectedCallback","delete","removeFocusListener","isHidden","addFocusListener","hidden","visibilityChange","msHidden","webkitHidden","isTabbable","tabbableElements","elementType","hasAttribute","tabIndex","throttle","immediate","lastArgs","arguments$1","_i","noTimer","timeoutFn","isIE","getStringFromObject","formatTimeA11y","formatTime","cloneElement","newElement","numberOfSeconds","string","separator","MSInputMethodContext","documentMode","IOSFix","bytes","atob","blankAudio","arrayBuffer","ArrayBuffer","uintArray","Uint8Array","blob","blobURL","NoSleep","videoElement","setAttribute","randomNumber","Uint32Array","crypto","msCrypto","getRandomValues","RichText","_color","getMaxHeight","_a","textBlocks","listOfWords","textBlock","prepareContext","word","lineOfWords","lineCount","wordWidth","drawLineOfWords","convertMarkupToTextBlocks","markupChunks","_markup","token","getToken","oldColor","previousChunk","getColor","_font","trimLineOfWords","totalWidth","drawText","markup","trim","getMaxWidth","metrics","reverse","__awaiter","thisArg","_arguments","generator","fulfilled","rejected","__generator","_","sent","trys","ops","verb","throw","return","Symbol","op","iframeFix","doc","cpControls","logPrefix","otherOrigin","pendingFullscreenElement","savedScrollPosition","initFromChild","postMessage","aspectRatio","player","iframe","contentWindow","scrollingElement","zIndex","handleResizeDebounced","fullscreenEnabled","mozFullScreenEnabled","webkitFullscreenEnabled","msFullscreenEnabled","requestFullscreen","exitFullscreen","fullScreenSupported","isFullscreenSupported","fullScreenBtn","classList","fullscreenElement","event_1","event_2","rmDebounce","customEventPolyFill","CustomEvent","typeArg","eventInitDict","detail","createEvent","initCustomEvent","isEnhancedRootMovieClip","clearAllSoundStreams","__assign","__createBinding","k2","__esModule","__exportStar","Interfaces","CanvasPlayer","ios_fix_js_1","noSleep_js_1","rich_text_js_1","customevent_ie_js_1","debounce_js_1","iframe_fix_js_1","createJSFixed","animationCache","exportRoot","implementCreateJSFix","prepContext_1","appleTextFix","isChromeGreaterThanOrEqualTo71","versionNumber","createJSTextPrototype","workingContext","measuredWidth","implementIOSFix","iosFixed","initializeOptions","preloadImages","containerWidth","animationProperties","rootName","animationLibrary","ended","pixelDensity","audioClips","asset","totalNumFiles","containerHeight","widthFactor","heightFactor","viewWidth","viewHeight","videoSize","enableCC","captions","captionGrabCompleted","descriptions","descriptionGrabCompleted","backgroundMusic","soundClipID","backgroundMusicSoundClipID","createTemplate","fonts","fragment","createDocumentFragment","div","canvasHTML","overlayHTML","fontHTML","createFontTemplate","firstChild","handleFileLoad","animationImages","handleAnimationLoad","promises","composition","getImages","library","getLibrary","imagesArray","soundsArray","handleComplete","createStage","webgl","display","TIMING","tickHandler","stageVars","initExportRoot","updateStage","soundInstance","loadChildrenLibraries","childrenLibraries","dynamicTimeline","sceneIds","scene","meta","TITLE","anim1","anim2","childLib","generateLibForDynamicTimelines","handleResize","handlePlayerResize","_forceResize","fontSize","createExportRoot","main","dynamicScenes","grabAudio","grabCaptionsFromAnimation","grabDescriptions","inst","startFrame","hasDynamicTimeline","ccPropNames_2","firstStartFrame_1","ccPropNames_1","some","captionTween","cur","ccpropName","caption1","caption2","descPropNames_2","firstStartFrame_2","descPropNames_1","descTween","desc1","desc2","generateTranscript","movieClipProp","nativeAudio","idString","audioClip","includeClip","backgroundMusicSoundClip","filterSoundClip","fullScreenChange","fullScreenElement","mozFullScreenElement","webkitFullscreenElement","msFullscreenElement","fullScreenEnabled","fullScreen","updateStageVars","newVars","resizeFunc","fullScreenFunc","loopThroughAudio","frameNum","seeking","frameDuration","played","fadeOutBackgroundMusic","fadeOut","fadeOutDuration","getTotalFrames","noSleepInstance","goToFrame","movieClipFrame","dynamicScene","background","currentCaptionsReference","restart","getCurrentTime","toggleFullscreen","requestFullScreen","exitFullScreen","mozRequestFullScreen","msRequestFullscreen","webkitRequestFullscreen","mozCancelFullScreen","msExitFullscreen","webkitExitFullscreen","isFullscreen","isCC","getProgress","goToScene","sceneId","reflow","sceneList","canAutoPlay","getAudioById","newLibrary","childClips","totalDuration","dynamicLabels","childClip","getExportRoot","__off","_asset","_getStartFrame","_startFrame","movingBackwards","fakeSynced","this_1","endTime","_loop_1","startStreamSoundsForTargetedFrame","handleSoundTick","stopSoundStreams","childLibrary","getRootName","libKeys","loadAnimation","url","modName","base","baseURI","newURL","scriptSrc","preloadFonts","currentCaptionIndex","lastReportedTime","noSleep","TextFormatterFrench","roundNumber","decPlaces","addTrailingZeroes","numStr","parseNumber","sanitizedInput","_formatNumber","formattedNumber","decPointIndex","decimalIndex","integerPart","digits","currentDigit","currentIndex","fractionalPart","formatter","number","currency","currencySymbol","percentage","formatNumber","formatCurrency","formatPercentage","TextFormatterEnglish","formatter_language_js_1","DateFormatterFrench","today","getMonthDays","getFullYear","monthNum","getMonth","isLeapYear","monthsList","days","isValidDate","day","getMonthName","abbreviated","shortName","fullName","getDateSuffix","getDate","parseDate","parsedDate","monthInput","content","yearInput","dayInput","formatParts","strToArr","formatToArr","currentYear","futureYear","pastYear","setFullYear","setMonth","setDate","formatDate","padWithZeroes","testingArr","entry","completedParts","DateFormatterEnglish","dateNum","dateSuffix","removeLanguage","registerLanguage","getLangModule","text_formatting_en_js_1","date_formatting_en_js_1","text_formatting_fr_js_1","date_formatting_fr_js_1","zeroes","langModule","en","fr","docLang","implementation","EventEmitter","trigger","handlers","getHandlers","handlers_1","addHandler","clearAllHandlers","Slider","SliderOptions","SliderOrientation","event_emitter_1","documentScollingElement","_sections","_steps","_value","_orientation","_snap","_keyStep","_valueText","_ariaLabel","_ariaLabelledBy","_hasValuesArray","valueToNumber","numberToValue","ind","sections","steps","orientation","Horizontal","snap","keyStep","valueText","ariaLabel","ariaLabelledBy","elements","handle","handleDown","handleBgDown","handleKeyDown","handleKeyUp","setOptions","VerticalReverse","removeAttribute","setValue","suppressValueError","vNum","numSections","setAria","setPositionPercent","percent","otherProp","wProp","wOtherProp","trackBefore","trackAfter","currentSection","stepMin","getPos","isVertical","TouchEvent","getValueFromPercent","stepMax","roundTo","roundFn","gotoStart","gotoEnd","isJump","newValue","stepInSection","Vertical","_handleLock","_evtValues","startX","startLeft","startTop","focus","handleMove","handleUp","track","evtValues","maxPosition","vMin","vMax","downKey","which","RMSliderElement","custom_elements_1","index_js_1","getAttributeOptions","savedOptions","slider","handleSliderChange","handleSliderUp","handleSliderDown","handleInit","initEvent","numberValue","Focus","utilities_js_1","accessibility_js_1","throttle_js_1","RMCPControlsElement","cpContainer","overlay","preloader","playIndicator","pauseIndicator","lrgPlayBtn","lrgReplayBtn","controlsContainer","playerControls","playBtn","replayBtn","pauseBtn","currentTimeText","durationText","seekBar","showCaptionsBtn","hideCaptionsBtn","transcriptBtn","exitFullScreenBtn","seekBarHandle","captionsEmpty","innerText","toggleIndicators","allowIndicators","resetIndicator","togglePlay","preventFocus","showIndicator","toggleVisibility","element1","element2","updateCurrentTimeText","currentTimeA11y","onEnd","endAction","replay","updateEndAction","updateSeekBarHandleARIAValueText","ariaValueText","positionCaptions","hideControlsOnTimeout","playerControlsTimer","hideControls","playerControlsTimeout","showControls","handleControlsKeyDown","handleTouchStart","touchDevice","handleRmSliderDown","isSeeking","resumePlay","handleRMSliderChange","newCurrentTime","frameStop","throttleGoToFrame","handleRMSliderUp","handleMouseMove","activeElement","handleMouseLeave","handleFocusIn","handleFocusOut","handleDblClick","clickActionTimer","preventClickAction","handleClick","features","loadTranscriptContent_1","loadTranscript_1","nodeName","clickActionDelay","transcriptWindowFeatures","screen","availHeight","availWidth","resizable","scrollbars","screenTop","outerHeight","screenLeft","outerWidth","transcriptLoaded","transcriptHTMLUrl","transcriptHTMLRef","transcriptWindow","formatTranscript","transcriptHTMLContainerSelector","updateTranscript","buildHTML","HTMLContainer","HTMLUrl","windowFeatures","attachCanvasPlayer","sliderOptions","seekValue","showCaptions","clearFrameLimit","removeEventListeners","direction","getVideoData","clipsToReset","sanitizeDescriptions","hasQueryStringInURL","getLanguage","getDevicePixelRatio","buildTranscriptHTML","description","paragraph","devicePixelRatio","queryString","decodeURIComponent","uniqueDescriptions","currentDescription","descriptionA","descriptionB","loadAnimations","utilities_1","language","section","filename","cacheKey","canvas_player_1","animation_1","timelineSceneData","RMDynamicVideo","getElementsByClassName","controls","largePlayButton","largeReplayButton","pauseButton","playButton","replayButton","videoElemAlt","_b","initVideo","embedMode","initialLoad","handleLoadedAnimations","updateAnimationTimeline","startScene","playVideo","ready","resetVideo","_c","_d","_e","_f","isSingleFrame","updateVideoData","loadBgMusic","stringRemapper","varName","varFound","objectRemaps","objectRemapsEn","objectRemapsFr","showHideFocus","lastEvent","nextLockedFrame","bgSound","updatedTimeline","chapterData","stoppedAtFrame","videosSwapped","onSelectionScreen","preloadVideo","sceneName","resetVideoSources","activeElem","videoObjs","videoIntro","videoPreQ2","videoGoalLegacy","videoGoalHome","videoGoalTravel","videoGoalChildren","videoGoalExpandbusiness","videoGoalLifestyle","videoGoalNest","videoGoalParents","videoGoalStartbusiness","videoGoalSuccession","videoQ2C1","videoQ2C2","videoQ2C3","videoQ2C4","videoQ3C1","videoQ3C2","videoQ3C3","videoQ3C4","videoPreOutro","videoOutro","scotia-intro-image","scotia-intro","scotia-q1","scotia-goal-legacy","scotia-goal-home","scotia-goal-travel","scotia-goal-children","scotia-goal-expand-business","scotia-goal-lifestyle","scotia-goal-parents","scotia-goal-start-business","scotia-goal-succession","scotia-goal-nest","scotia-pre-q2","scotia-q2","scotia-q2-choice-1","scotia-q2-choice-2","scotia-q2-choice-3","scotia-q2-choice-4","scotia-q3","scotia-q3-choice-1","scotia-q3-choice-2","scotia-q3-choice-3","scotia-q3-choice-4","scotia-q4","scotia-q4-choice-1","scotia-outro","scotia-outro-image","goalObjs","selectedGoals","selectedScenario","selectedFunding","proceedStates","proceedBtn1Active","proceedBtn2Active","proceedBtn3Active","defaultAnimations","introArray","q2Array","q3Array","outroArray","defaultGoal","defaultScenario","defaultFunding","canvasPlayer","pauseForInputs","_j","currentScene","nextScene","swapVideoSources","_g","continueVideo","_targetP","_targetB","setupChapters","unlockChapter","isPreloading","sendDataResponse","customIVTopPriority","customIVPlanningPriority","customIVHealthcareCosts","formParams","MDM","Components","ModularContactForm","PresetForms","mdRichMedia","Instances","ModalHost","modalFormButtonActivate","resetStageVars","$","frameLimit","chapterFrame","fadeOutBGMusic","vol","fadeout","getVideoToPlay","videoFound","isScrubbing","updateGoals","checkbox","checked","proceed_btn","childNodes","updateScenario","checkboxes","updateFunding","setupButtonListener","pausedForLoading","setupScrubbingListener","activated","chapter","setupChapterFrames","stopFrames","ariaWord","removeChapters","seekbar","animationDuration","chapters","chapterContainer","chapterBtn","totalTime","isVideo","i_1","bgSoundInstance","wasBgSound","wasVideoPlaying","gettingSceneInfo","animationCurrentTime","videoPath","oneFrameLength","condition1","condition2","sanitizedDescriptions","htmlURL","logic_1","videoContainer","videoData","transcript"],"mappings":"AA4BAA,KAAAC,SAAAD,KAAAC,UAAA,GA6BAA,SAAAC,OAAA,SAAAC,EAAAC,gBAGA,SAAAC,IAAAL,KAAAM,YAAAH,EAEA,OADAE,EAAAE,UAAAH,EAAAG,UACAJ,EAAAI,UAAA,IAAAF,GAgDAJ,SAAAO,QAAA,SAAAL,EAAAM,gBAGA,I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ACAA,GACAnwG,iBAAA,UAAA,SAAAwqF,GAEA,OADAA,EAAAxpF,KAAA1C,MAEA,IAAA,aACA28G,EAAAzK,YACA,MAEA,IAAA,cACAyK,EAAAvK,aACA,MAEA,IAAA,oBACA,IAAAwK,GAAA,EAAAF,EAAAjN,gBACAkN,EAAAjK,gBAAAkK,QAOA36B,EAAAG,QAAA,CACAy6B,WAAA,CACAha,GAAA,aACAC,GAAA,kBAKA9gB,EAAA,CAAA,YACAzI,EAz0CA,CA00CA7zE,OAAA4zE","file":"rich-media.min.js","sourcesContent":["/*!\r\n* CreateJS\r\n* Visit http://createjs.com/ for documentation, updates and examples.\r\n*\r\n* Copyright (c) 2010 gskinner.com, inc.\r\n*\r\n* Permission is hereby granted, free of charge, to any person\r\n* obtaining a copy of this software and associated documentation\r\n* files (the \"Software\"), to deal in the Software without\r\n* restriction, including without limitation the rights to use,\r\n* copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n* copies of the Software, and to permit persons to whom the\r\n* Software is furnished to do so, subject to the following\r\n* conditions:\r\n*\r\n* The above copyright notice and this permission notice shall be\r\n* included in all copies or substantial portions of the Software.\r\n*\r\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\n* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\r\n* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r\n* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\r\n* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\r\n* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r\n* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\r\n* OTHER DEALINGS IN THE SOFTWARE.\r\n*/\r\n\r\nthis.createjs = this.createjs||{};\r\n\r\n\r\n//##############################################################################\r\n// extend.js\r\n//##############################################################################\r\n\r\n/**\r\n * @class Utility Methods\r\n */\r\n\r\n/**\r\n * Sets up the prototype chain and constructor property for a new class.\r\n *\r\n * This should be called right after creating the class constructor.\r\n *\r\n * \tfunction MySubClass() {}\r\n * \tcreatejs.extend(MySubClass, MySuperClass);\r\n * \tMySubClass.prototype.doSomething = function() { }\r\n *\r\n * \tvar foo = new MySubClass();\r\n * \tconsole.log(foo instanceof MySuperClass); // true\r\n * \tconsole.log(foo.prototype.constructor === MySubClass); // true\r\n *\r\n * @method extend\r\n * @param {Function} subclass The subclass.\r\n * @param {Function} superclass The superclass to extend.\r\n * @return {Function} Returns the subclass's new prototype.\r\n */\r\ncreatejs.extend = function(subclass, superclass) {\r\n\t\"use strict\";\r\n\r\n\tfunction o() { this.constructor = subclass; }\r\n\to.prototype = superclass.prototype;\r\n\treturn (subclass.prototype = new o());\r\n};\r\n\r\n//##############################################################################\r\n// promote.js\r\n//##############################################################################\r\n\r\n/**\r\n * @class Utility Methods\r\n */\r\n\r\n/**\r\n * Promotes any methods on the super class that were overridden, by creating an alias in the format `prefix_methodName`.\r\n * It is recommended to use the super class's name as the prefix.\r\n * An alias to the super class's constructor is always added in the format `prefix_constructor`.\r\n * This allows the subclass to call super class methods without using `function.call`, providing better performance.\r\n *\r\n * For example, if `MySubClass` extends `MySuperClass`, and both define a `draw` method, then calling `promote(MySubClass, \"MySuperClass\")`\r\n * would add a `MySuperClass_constructor` method to MySubClass and promote the `draw` method on `MySuperClass` to the\r\n * prototype of `MySubClass` as `MySuperClass_draw`.\r\n *\r\n * This should be called after the class's prototype is fully defined.\r\n *\r\n * \tfunction ClassA(name) {\r\n * \t\tthis.name = name;\r\n * \t}\r\n * \tClassA.prototype.greet = function() {\r\n * \t\treturn \"Hello \"+this.name;\r\n * \t}\r\n *\r\n * \tfunction ClassB(name, punctuation) {\r\n * \t\tthis.ClassA_constructor(name);\r\n * \t\tthis.punctuation = punctuation;\r\n * \t}\r\n * \tcreatejs.extend(ClassB, ClassA);\r\n * \tClassB.prototype.greet = function() {\r\n * \t\treturn this.ClassA_greet()+this.punctuation;\r\n * \t}\r\n * \tcreatejs.promote(ClassB, \"ClassA\");\r\n *\r\n * \tvar foo = new ClassB(\"World\", \"!?!\");\r\n * \tconsole.log(foo.greet()); // Hello World!?!\r\n *\r\n * @method promote\r\n * @param {Function} subclass The class to promote super class methods on.\r\n * @param {String} prefix The prefix to add to the promoted method names. Usually the name of the superclass.\r\n * @return {Function} Returns the subclass.\r\n */\r\ncreatejs.promote = function(subclass, prefix) {\r\n\t\"use strict\";\r\n\r\n\tvar subP = subclass.prototype, supP = (Object.getPrototypeOf&&Object.getPrototypeOf(subP))||subP.__proto__;\r\n\tif (supP) {\r\n\t\tsubP[(prefix+=\"_\") + \"constructor\"] = supP.constructor; // constructor is not always innumerable\r\n\t\tfor (var n in supP) {\r\n\t\t\tif (subP.hasOwnProperty(n) && (typeof supP[n] == \"function\")) { subP[prefix + n] = supP[n]; }\r\n\t\t}\r\n\t}\r\n\treturn subclass;\r\n};\r\n\r\n//##############################################################################\r\n// indexOf.js\r\n//##############################################################################\r\n\r\n/**\r\n * @class Utility Methods\r\n */\r\n\r\n/**\r\n * Finds the first occurrence of a specified value searchElement in the passed in array, and returns the index of\r\n * that value. Returns -1 if value is not found.\r\n *\r\n * var i = createjs.indexOf(myArray, myElementToFind);\r\n *\r\n * @method indexOf\r\n * @param {Array} array Array to search for searchElement\r\n * @param searchElement Element to find in array.\r\n * @return {Number} The first index of searchElement in array.\r\n */\r\ncreatejs.indexOf = function (array, searchElement){\r\n\t\"use strict\";\r\n\r\n\tfor (var i = 0,l=array.length; i < l; i++) {\r\n\t\tif (searchElement === array[i]) {\r\n\t\t\treturn i;\r\n\t\t}\r\n\t}\r\n\treturn -1;\r\n};\r\n\r\n//##############################################################################\r\n// UID.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * Global utility for generating sequential unique ID numbers. The UID class uses a static interface (ex. UID.get())\r\n\t * and should not be instantiated.\r\n\t * @class UID\r\n\t * @static\r\n\t **/\r\n\tfunction UID() {\r\n\t\tthrow \"UID cannot be instantiated\";\r\n\t}\r\n\r\n\r\n// private static properties:\r\n\t/**\r\n\t * @property _nextID\r\n\t * @type Number\r\n\t * @protected\r\n\t **/\r\n\tUID._nextID = 0;\r\n\r\n\r\n// public static methods:\r\n\t/**\r\n\t * Returns the next unique id.\r\n\t * @method get\r\n\t * @return {Number} The next unique id\r\n\t * @static\r\n\t **/\r\n\tUID.get = function() {\r\n\t\treturn UID._nextID++;\r\n\t};\r\n\r\n\r\n\tcreatejs.UID = UID;\r\n}());\r\n\r\n//##############################################################################\r\n// deprecate.js\r\n//##############################################################################\r\n\r\n/**\r\n * @class Utility Methods\r\n */\r\n\r\n/**\r\n * Wraps deprecated methods so they still be used, but throw warnings to developers.\r\n *\r\n *\tobj.deprecatedMethod = createjs.deprecate(\"Old Method Name\", obj._fallbackMethod);\r\n *\r\n * The recommended approach for deprecated properties is:\r\n *\r\n *\ttry {\r\n *\t\tObj\tect.defineProperties(object, {\r\n *\t\t\treadyOnlyProp: { get: createjs.deprecate(\"readOnlyProp\", function() { return this.alternateProp; }) },\r\n *\t\t\treadWriteProp: {\r\n *\t\t\t\tget: createjs.deprecate(\"readOnlyProp\", function() { return this.alternateProp; }),\r\n *\t\t\t\tset: createjs.deprecate(\"readOnlyProp\", function(val) { this.alternateProp = val; })\r\n *\t\t});\r\n *\t} catch (e) {}\r\n *\r\n * @method deprecate\r\n * @param {Function} [fallbackMethod=null] A method to call when the deprecated method is used. See the example for how\r\n * @param {String} [name=null] The name of the method or property to display in the console warning.\r\n * to deprecate properties.\r\n * @return {Function} If a fallbackMethod is supplied, returns a closure that will call the fallback method after\r\n * logging the warning in the console.\r\n */\r\ncreatejs.deprecate = function(fallbackMethod, name) {\r\n\t\"use strict\";\r\n\treturn function() {\r\n\t\tvar msg = \"Deprecated property or method '\"+name+\"'. See docs for info.\";\r\n\t\tconsole && (console.warn ? console.warn(msg) : console.log(msg));\r\n\t\treturn fallbackMethod && fallbackMethod.apply(this, arguments);\r\n\t}\r\n};\r\n\r\n//##############################################################################\r\n// Event.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n// constructor:\r\n\t/**\r\n\t * Contains properties and methods shared by all events for use with\r\n\t * {{#crossLink \"EventDispatcher\"}}{{/crossLink}}.\r\n\t * \r\n\t * Note that Event objects are often reused, so you should never\r\n\t * rely on an event object's state outside of the call stack it was received in.\r\n\t * @class Event\r\n\t * @param {String} type The event type.\r\n\t * @param {Boolean} bubbles Indicates whether the event will bubble through the display list.\r\n\t * @param {Boolean} cancelable Indicates whether the default behaviour of this event can be cancelled.\r\n\t * @constructor\r\n\t **/\r\n\tfunction Event(type, bubbles, cancelable) {\r\n\t\t\r\n\t\r\n\t// public properties:\r\n\t\t/**\r\n\t\t * The type of event.\r\n\t\t * @property type\r\n\t\t * @type String\r\n\t\t **/\r\n\t\tthis.type = type;\r\n\t\r\n\t\t/**\r\n\t\t * The object that generated an event.\r\n\t\t * @property target\r\n\t\t * @type Object\r\n\t\t * @default null\r\n\t\t * @readonly\r\n\t\t*/\r\n\t\tthis.target = null;\r\n\t\r\n\t\t/**\r\n\t\t * The current target that a bubbling event is being dispatched from. For non-bubbling events, this will\r\n\t\t * always be the same as target. For example, if childObj.parent = parentObj, and a bubbling event\r\n\t\t * is generated from childObj, then a listener on parentObj would receive the event with\r\n\t\t * target=childObj (the original target) and currentTarget=parentObj (where the listener was added).\r\n\t\t * @property currentTarget\r\n\t\t * @type Object\r\n\t\t * @default null\r\n\t\t * @readonly\r\n\t\t*/\r\n\t\tthis.currentTarget = null;\r\n\t\r\n\t\t/**\r\n\t\t * For bubbling events, this indicates the current event phase:
    \r\n\t\t * \t
  1. capture phase: starting from the top parent to the target
  2. \r\n\t\t * \t
  3. at target phase: currently being dispatched from the target
  4. \r\n\t\t * \t
  5. bubbling phase: from the target to the top parent
  6. \r\n\t\t *
\r\n\t\t * @property eventPhase\r\n\t\t * @type Number\r\n\t\t * @default 0\r\n\t\t * @readonly\r\n\t\t*/\r\n\t\tthis.eventPhase = 0;\r\n\t\r\n\t\t/**\r\n\t\t * Indicates whether the event will bubble through the display list.\r\n\t\t * @property bubbles\r\n\t\t * @type Boolean\r\n\t\t * @default false\r\n\t\t * @readonly\r\n\t\t*/\r\n\t\tthis.bubbles = !!bubbles;\r\n\t\r\n\t\t/**\r\n\t\t * Indicates whether the default behaviour of this event can be cancelled via\r\n\t\t * {{#crossLink \"Event/preventDefault\"}}{{/crossLink}}. This is set via the Event constructor.\r\n\t\t * @property cancelable\r\n\t\t * @type Boolean\r\n\t\t * @default false\r\n\t\t * @readonly\r\n\t\t*/\r\n\t\tthis.cancelable = !!cancelable;\r\n\t\r\n\t\t/**\r\n\t\t * The epoch time at which this event was created.\r\n\t\t * @property timeStamp\r\n\t\t * @type Number\r\n\t\t * @default 0\r\n\t\t * @readonly\r\n\t\t*/\r\n\t\tthis.timeStamp = (new Date()).getTime();\r\n\t\r\n\t\t/**\r\n\t\t * Indicates if {{#crossLink \"Event/preventDefault\"}}{{/crossLink}} has been called\r\n\t\t * on this event.\r\n\t\t * @property defaultPrevented\r\n\t\t * @type Boolean\r\n\t\t * @default false\r\n\t\t * @readonly\r\n\t\t*/\r\n\t\tthis.defaultPrevented = false;\r\n\t\r\n\t\t/**\r\n\t\t * Indicates if {{#crossLink \"Event/stopPropagation\"}}{{/crossLink}} or\r\n\t\t * {{#crossLink \"Event/stopImmediatePropagation\"}}{{/crossLink}} has been called on this event.\r\n\t\t * @property propagationStopped\r\n\t\t * @type Boolean\r\n\t\t * @default false\r\n\t\t * @readonly\r\n\t\t*/\r\n\t\tthis.propagationStopped = false;\r\n\t\r\n\t\t/**\r\n\t\t * Indicates if {{#crossLink \"Event/stopImmediatePropagation\"}}{{/crossLink}} has been called\r\n\t\t * on this event.\r\n\t\t * @property immediatePropagationStopped\r\n\t\t * @type Boolean\r\n\t\t * @default false\r\n\t\t * @readonly\r\n\t\t*/\r\n\t\tthis.immediatePropagationStopped = false;\r\n\t\t\r\n\t\t/**\r\n\t\t * Indicates if {{#crossLink \"Event/remove\"}}{{/crossLink}} has been called on this event.\r\n\t\t * @property removed\r\n\t\t * @type Boolean\r\n\t\t * @default false\r\n\t\t * @readonly\r\n\t\t*/\r\n\t\tthis.removed = false;\r\n\t}\r\n\tvar p = Event.prototype;\r\n\r\n// public methods:\r\n\t/**\r\n\t * Sets {{#crossLink \"Event/defaultPrevented\"}}{{/crossLink}} to true if the event is cancelable.\r\n\t * Mirrors the DOM level 2 event standard. In general, cancelable events that have `preventDefault()` called will\r\n\t * cancel the default behaviour associated with the event.\r\n\t * @method preventDefault\r\n\t **/\r\n\tp.preventDefault = function() {\r\n\t\tthis.defaultPrevented = this.cancelable&&true;\r\n\t};\r\n\r\n\t/**\r\n\t * Sets {{#crossLink \"Event/propagationStopped\"}}{{/crossLink}} to true.\r\n\t * Mirrors the DOM event standard.\r\n\t * @method stopPropagation\r\n\t **/\r\n\tp.stopPropagation = function() {\r\n\t\tthis.propagationStopped = true;\r\n\t};\r\n\r\n\t/**\r\n\t * Sets {{#crossLink \"Event/propagationStopped\"}}{{/crossLink}} and\r\n\t * {{#crossLink \"Event/immediatePropagationStopped\"}}{{/crossLink}} to true.\r\n\t * Mirrors the DOM event standard.\r\n\t * @method stopImmediatePropagation\r\n\t **/\r\n\tp.stopImmediatePropagation = function() {\r\n\t\tthis.immediatePropagationStopped = this.propagationStopped = true;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Causes the active listener to be removed via removeEventListener();\r\n\t * \r\n\t * \t\tmyBtn.addEventListener(\"click\", function(evt) {\r\n\t * \t\t\t// do stuff...\r\n\t * \t\t\tevt.remove(); // removes this listener.\r\n\t * \t\t});\r\n\t * \r\n\t * @method remove\r\n\t **/\r\n\tp.remove = function() {\r\n\t\tthis.removed = true;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Returns a clone of the Event instance.\r\n\t * @method clone\r\n\t * @return {Event} a clone of the Event instance.\r\n\t **/\r\n\tp.clone = function() {\r\n\t\treturn new Event(this.type, this.bubbles, this.cancelable);\r\n\t};\r\n\t\r\n\t/**\r\n\t * Provides a chainable shortcut method for setting a number of properties on the instance.\r\n\t *\r\n\t * @method set\r\n\t * @param {Object} props A generic object containing properties to copy to the instance.\r\n\t * @return {Event} Returns the instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t*/\r\n\tp.set = function(props) {\r\n\t\tfor (var n in props) { this[n] = props[n]; }\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a string representation of this object.\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t **/\r\n\tp.toString = function() {\r\n\t\treturn \"[Event (type=\"+this.type+\")]\";\r\n\t};\r\n\r\n\tcreatejs.Event = Event;\r\n}());\r\n\r\n//##############################################################################\r\n// EventDispatcher.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * EventDispatcher provides methods for managing queues of event listeners and dispatching events.\r\n\t *\r\n\t * You can either extend EventDispatcher or mix its methods into an existing prototype or instance by using the\r\n\t * EventDispatcher {{#crossLink \"EventDispatcher/initialize\"}}{{/crossLink}} method.\r\n\t * \r\n\t * Together with the CreateJS Event class, EventDispatcher provides an extended event model that is based on the\r\n\t * DOM Level 2 event model, including addEventListener, removeEventListener, and dispatchEvent. It supports\r\n\t * bubbling / capture, preventDefault, stopPropagation, stopImmediatePropagation, and handleEvent.\r\n\t * \r\n\t * EventDispatcher also exposes a {{#crossLink \"EventDispatcher/on\"}}{{/crossLink}} method, which makes it easier\r\n\t * to create scoped listeners, listeners that only run once, and listeners with associated arbitrary data. The \r\n\t * {{#crossLink \"EventDispatcher/off\"}}{{/crossLink}} method is merely an alias to\r\n\t * {{#crossLink \"EventDispatcher/removeEventListener\"}}{{/crossLink}}.\r\n\t * \r\n\t * Another addition to the DOM Level 2 model is the {{#crossLink \"EventDispatcher/removeAllEventListeners\"}}{{/crossLink}}\r\n\t * method, which can be used to listeners for all events, or listeners for a specific event. The Event object also \r\n\t * includes a {{#crossLink \"Event/remove\"}}{{/crossLink}} method which removes the active listener.\r\n\t *\r\n\t *

Example

\r\n\t * Add EventDispatcher capabilities to the \"MyClass\" class.\r\n\t *\r\n\t * EventDispatcher.initialize(MyClass.prototype);\r\n\t *\r\n\t * Add an event (see {{#crossLink \"EventDispatcher/addEventListener\"}}{{/crossLink}}).\r\n\t *\r\n\t * instance.addEventListener(\"eventName\", handlerMethod);\r\n\t * function handlerMethod(event) {\r\n\t * console.log(event.target + \" Was Clicked\");\r\n\t * }\r\n\t *\r\n\t * Maintaining proper scope
\r\n\t * Scope (ie. \"this\") can be be a challenge with events. Using the {{#crossLink \"EventDispatcher/on\"}}{{/crossLink}}\r\n\t * method to subscribe to events simplifies this.\r\n\t *\r\n\t * instance.addEventListener(\"click\", function(event) {\r\n\t * console.log(instance == this); // false, scope is ambiguous.\r\n\t * });\r\n\t * \r\n\t * instance.on(\"click\", function(event) {\r\n\t * console.log(instance == this); // true, \"on\" uses dispatcher scope by default.\r\n\t * });\r\n\t * \r\n\t * If you want to use addEventListener instead, you may want to use function.bind() or a similar proxy to manage\r\n\t * scope.\r\n\t *\r\n\t * Browser support\r\n\t * The event model in CreateJS can be used separately from the suite in any project, however the inheritance model\r\n\t * requires modern browsers (IE9+).\r\n\t * \r\n\t *\r\n\t * @class EventDispatcher\r\n\t * @constructor\r\n\t **/\r\n\tfunction EventDispatcher() {\r\n\t\r\n\t\r\n\t// private properties:\r\n\t\t/**\r\n\t\t * @protected\r\n\t\t * @property _listeners\r\n\t\t * @type Object\r\n\t\t **/\r\n\t\tthis._listeners = null;\r\n\t\t\r\n\t\t/**\r\n\t\t * @protected\r\n\t\t * @property _captureListeners\r\n\t\t * @type Object\r\n\t\t **/\r\n\t\tthis._captureListeners = null;\r\n\t}\r\n\tvar p = EventDispatcher.prototype;\r\n\r\n// static public methods:\r\n\t/**\r\n\t * Static initializer to mix EventDispatcher methods into a target object or prototype.\r\n\t * \r\n\t * \t\tEventDispatcher.initialize(MyClass.prototype); // add to the prototype of the class\r\n\t * \t\tEventDispatcher.initialize(myObject); // add to a specific instance\r\n\t * \r\n\t * @method initialize\r\n\t * @static\r\n\t * @param {Object} target The target object to inject EventDispatcher methods into. This can be an instance or a\r\n\t * prototype.\r\n\t **/\r\n\tEventDispatcher.initialize = function(target) {\r\n\t\ttarget.addEventListener = p.addEventListener;\r\n\t\ttarget.on = p.on;\r\n\t\ttarget.removeEventListener = target.off = p.removeEventListener;\r\n\t\ttarget.removeAllEventListeners = p.removeAllEventListeners;\r\n\t\ttarget.hasEventListener = p.hasEventListener;\r\n\t\ttarget.dispatchEvent = p.dispatchEvent;\r\n\t\ttarget._dispatchEvent = p._dispatchEvent;\r\n\t\ttarget.willTrigger = p.willTrigger;\r\n\t};\r\n\t\r\n\r\n// public methods:\r\n\t/**\r\n\t * Adds the specified event listener. Note that adding multiple listeners to the same function will result in\r\n\t * multiple callbacks getting fired.\r\n\t *\r\n\t *

Example

\r\n\t *\r\n\t * displayObject.addEventListener(\"click\", handleClick);\r\n\t * function handleClick(event) {\r\n\t * // Click happened.\r\n\t * }\r\n\t *\r\n\t * @method addEventListener\r\n\t * @param {String} type The string type of the event.\r\n\t * @param {Function | Object} listener An object with a handleEvent method, or a function that will be called when\r\n\t * the event is dispatched.\r\n\t * @param {Boolean} [useCapture] For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.\r\n\t * @return {Function | Object} Returns the listener for chaining or assignment.\r\n\t **/\r\n\tp.addEventListener = function(type, listener, useCapture) {\r\n\t\tvar listeners;\r\n\t\tif (useCapture) {\r\n\t\t\tlisteners = this._captureListeners = this._captureListeners||{};\r\n\t\t} else {\r\n\t\t\tlisteners = this._listeners = this._listeners||{};\r\n\t\t}\r\n\t\tvar arr = listeners[type];\r\n\t\tif (arr) { this.removeEventListener(type, listener, useCapture); }\r\n\t\tarr = listeners[type]; // remove may have deleted the array\r\n\t\tif (!arr) { listeners[type] = [listener]; }\r\n\t\telse { arr.push(listener); }\r\n\t\treturn listener;\r\n\t};\r\n\t\r\n\t/**\r\n\t * A shortcut method for using addEventListener that makes it easier to specify an execution scope, have a listener\r\n\t * only run once, associate arbitrary data with the listener, and remove the listener.\r\n\t * \r\n\t * This method works by creating an anonymous wrapper function and subscribing it with addEventListener.\r\n\t * The wrapper function is returned for use with `removeEventListener` (or `off`).\r\n\t * \r\n\t * IMPORTANT: To remove a listener added with `on`, you must pass in the returned wrapper function as the listener, or use\r\n\t * {{#crossLink \"Event/remove\"}}{{/crossLink}}. Likewise, each time you call `on` a NEW wrapper function is subscribed, so multiple calls\r\n\t * to `on` with the same params will create multiple listeners.\r\n\t * \r\n\t *

Example

\r\n\t * \r\n\t * \t\tvar listener = myBtn.on(\"click\", handleClick, null, false, {count:3});\r\n\t * \t\tfunction handleClick(evt, data) {\r\n\t * \t\t\tdata.count -= 1;\r\n\t * \t\t\tconsole.log(this == myBtn); // true - scope defaults to the dispatcher\r\n\t * \t\t\tif (data.count == 0) {\r\n\t * \t\t\t\talert(\"clicked 3 times!\");\r\n\t * \t\t\t\tmyBtn.off(\"click\", listener);\r\n\t * \t\t\t\t// alternately: evt.remove();\r\n\t * \t\t\t}\r\n\t * \t\t}\r\n\t * \r\n\t * @method on\r\n\t * @param {String} type The string type of the event.\r\n\t * @param {Function | Object} listener An object with a handleEvent method, or a function that will be called when\r\n\t * the event is dispatched.\r\n\t * @param {Object} [scope] The scope to execute the listener in. Defaults to the dispatcher/currentTarget for function listeners, and to the listener itself for object listeners (ie. using handleEvent).\r\n\t * @param {Boolean} [once=false] If true, the listener will remove itself after the first time it is triggered.\r\n\t * @param {*} [data] Arbitrary data that will be included as the second parameter when the listener is called.\r\n\t * @param {Boolean} [useCapture=false] For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.\r\n\t * @return {Function} Returns the anonymous function that was created and assigned as the listener. This is needed to remove the listener later using .removeEventListener.\r\n\t **/\r\n\tp.on = function(type, listener, scope, once, data, useCapture) {\r\n\t\tif (listener.handleEvent) {\r\n\t\t\tscope = scope||listener;\r\n\t\t\tlistener = listener.handleEvent;\r\n\t\t}\r\n\t\tscope = scope||this;\r\n\t\treturn this.addEventListener(type, function(evt) {\r\n\t\t\t\tlistener.call(scope, evt, data);\r\n\t\t\t\tonce&&evt.remove();\r\n\t\t\t}, useCapture);\r\n\t};\r\n\r\n\t/**\r\n\t * Removes the specified event listener.\r\n\t *\r\n\t * Important Note: that you must pass the exact function reference used when the event was added. If a proxy\r\n\t * function, or function closure is used as the callback, the proxy/closure reference must be used - a new proxy or\r\n\t * closure will not work.\r\n\t *\r\n\t *

Example

\r\n\t *\r\n\t * displayObject.removeEventListener(\"click\", handleClick);\r\n\t *\r\n\t * @method removeEventListener\r\n\t * @param {String} type The string type of the event.\r\n\t * @param {Function | Object} listener The listener function or object.\r\n\t * @param {Boolean} [useCapture] For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.\r\n\t **/\r\n\tp.removeEventListener = function(type, listener, useCapture) {\r\n\t\tvar listeners = useCapture ? this._captureListeners : this._listeners;\r\n\t\tif (!listeners) { return; }\r\n\t\tvar arr = listeners[type];\r\n\t\tif (!arr) { return; }\r\n\t\tfor (var i=0,l=arr.length; iIMPORTANT: To remove a listener added with `on`, you must pass in the returned wrapper function as the listener. See \r\n\t * {{#crossLink \"EventDispatcher/on\"}}{{/crossLink}} for an example.\r\n\t *\r\n\t * @method off\r\n\t * @param {String} type The string type of the event.\r\n\t * @param {Function | Object} listener The listener function or object.\r\n\t * @param {Boolean} [useCapture] For events that bubble, indicates whether to listen for the event in the capture or bubbling/target phase.\r\n\t **/\r\n\tp.off = p.removeEventListener;\r\n\r\n\t/**\r\n\t * Removes all listeners for the specified type, or all listeners of all types.\r\n\t *\r\n\t *

Example

\r\n\t *\r\n\t * // Remove all listeners\r\n\t * displayObject.removeAllEventListeners();\r\n\t *\r\n\t * // Remove all click listeners\r\n\t * displayObject.removeAllEventListeners(\"click\");\r\n\t *\r\n\t * @method removeAllEventListeners\r\n\t * @param {String} [type] The string type of the event. If omitted, all listeners for all types will be removed.\r\n\t **/\r\n\tp.removeAllEventListeners = function(type) {\r\n\t\tif (!type) { this._listeners = this._captureListeners = null; }\r\n\t\telse {\r\n\t\t\tif (this._listeners) { delete(this._listeners[type]); }\r\n\t\t\tif (this._captureListeners) { delete(this._captureListeners[type]); }\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Dispatches the specified event to all listeners.\r\n\t *\r\n\t *

Example

\r\n\t *\r\n\t * // Use a string event\r\n\t * this.dispatchEvent(\"complete\");\r\n\t *\r\n\t * // Use an Event instance\r\n\t * var event = new createjs.Event(\"progress\");\r\n\t * this.dispatchEvent(event);\r\n\t *\r\n\t * @method dispatchEvent\r\n\t * @param {Object | String | Event} eventObj An object with a \"type\" property, or a string type.\r\n\t * While a generic object will work, it is recommended to use a CreateJS Event instance. If a string is used,\r\n\t * dispatchEvent will construct an Event instance if necessary with the specified type. This latter approach can\r\n\t * be used to avoid event object instantiation for non-bubbling events that may not have any listeners.\r\n\t * @param {Boolean} [bubbles] Specifies the `bubbles` value when a string was passed to eventObj.\r\n\t * @param {Boolean} [cancelable] Specifies the `cancelable` value when a string was passed to eventObj.\r\n\t * @return {Boolean} Returns false if `preventDefault()` was called on a cancelable event, true otherwise.\r\n\t **/\r\n\tp.dispatchEvent = function(eventObj, bubbles, cancelable) {\r\n\t\tif (typeof eventObj == \"string\") {\r\n\t\t\t// skip everything if there's no listeners and it doesn't bubble:\r\n\t\t\tvar listeners = this._listeners;\r\n\t\t\tif (!bubbles && (!listeners || !listeners[eventObj])) { return true; }\r\n\t\t\teventObj = new createjs.Event(eventObj, bubbles, cancelable);\r\n\t\t} else if (eventObj.target && eventObj.clone) {\r\n\t\t\t// redispatching an active event object, so clone it:\r\n\t\t\teventObj = eventObj.clone();\r\n\t\t}\r\n\t\t\r\n\t\t// TODO: it would be nice to eliminate this. Maybe in favour of evtObj instanceof Event? Or !!evtObj.createEvent\r\n\t\ttry { eventObj.target = this; } catch (e) {} // try/catch allows redispatching of native events\r\n\r\n\t\tif (!eventObj.bubbles || !this.parent) {\r\n\t\t\tthis._dispatchEvent(eventObj, 2);\r\n\t\t} else {\r\n\t\t\tvar top=this, list=[top];\r\n\t\t\twhile (top.parent) { list.push(top = top.parent); }\r\n\t\t\tvar i, l=list.length;\r\n\r\n\t\t\t// capture & atTarget\r\n\t\t\tfor (i=l-1; i>=0 && !eventObj.propagationStopped; i--) {\r\n\t\t\t\tlist[i]._dispatchEvent(eventObj, 1+(i==0));\r\n\t\t\t}\r\n\t\t\t// bubbling\r\n\t\t\tfor (i=1; iExample\r\n\t *\r\n\t * createjs.Ticker.addEventListener(\"tick\", handleTick);\r\n\t * function handleTick(event) {\r\n\t * // Actions carried out each tick (aka frame)\r\n\t * if (!event.paused) {\r\n\t * // Actions carried out when the Ticker is not paused.\r\n\t * }\r\n\t * }\r\n\t *\r\n\t * @class Ticker\r\n\t * @uses EventDispatcher\r\n\t * @static\r\n\t **/\r\n\tfunction Ticker() {\r\n\t\tthrow \"Ticker cannot be instantiated.\";\r\n\t}\r\n\r\n\r\n// constants:\r\n\t/**\r\n\t * In this mode, Ticker uses the requestAnimationFrame API, but attempts to synch the ticks to target framerate. It\r\n\t * uses a simple heuristic that compares the time of the RAF return to the target time for the current frame and\r\n\t * dispatches the tick when the time is within a certain threshold.\r\n\t *\r\n\t * This mode has a higher variance for time between frames than {{#crossLink \"Ticker/TIMEOUT:property\"}}{{/crossLink}},\r\n\t * but does not require that content be time based as with {{#crossLink \"Ticker/RAF:property\"}}{{/crossLink}} while\r\n\t * gaining the benefits of that API (screen synch, background throttling).\r\n\t *\r\n\t * Variance is usually lowest for framerates that are a divisor of the RAF frequency. This is usually 60, so\r\n\t * framerates of 10, 12, 15, 20, and 30 work well.\r\n\t *\r\n\t * Falls back to {{#crossLink \"Ticker/TIMEOUT:property\"}}{{/crossLink}} if the requestAnimationFrame API is not\r\n\t * supported.\r\n\t * @property RAF_SYNCHED\r\n\t * @static\r\n\t * @type {String}\r\n\t * @default \"synched\"\r\n\t * @readonly\r\n\t **/\r\n\tTicker.RAF_SYNCHED = \"synched\";\r\n\r\n\t/**\r\n\t * In this mode, Ticker passes through the requestAnimationFrame heartbeat, ignoring the target framerate completely.\r\n\t * Because requestAnimationFrame frequency is not deterministic, any content using this mode should be time based.\r\n\t * You can leverage {{#crossLink \"Ticker/getTime\"}}{{/crossLink}} and the {{#crossLink \"Ticker/tick:event\"}}{{/crossLink}}\r\n\t * event object's \"delta\" properties to make this easier.\r\n\t *\r\n\t * Falls back on {{#crossLink \"Ticker/TIMEOUT:property\"}}{{/crossLink}} if the requestAnimationFrame API is not\r\n\t * supported.\r\n\t * @property RAF\r\n\t * @static\r\n\t * @type {String}\r\n\t * @default \"raf\"\r\n\t * @readonly\r\n\t **/\r\n\tTicker.RAF = \"raf\";\r\n\r\n\t/**\r\n\t * In this mode, Ticker uses the setTimeout API. This provides predictable, adaptive frame timing, but does not\r\n\t * provide the benefits of requestAnimationFrame (screen synch, background throttling).\r\n\t * @property TIMEOUT\r\n\t * @static\r\n\t * @type {String}\r\n\t * @default \"timeout\"\r\n\t * @readonly\r\n\t **/\r\n\tTicker.TIMEOUT = \"timeout\";\r\n\r\n\r\n// static events:\r\n\t/**\r\n\t * Dispatched each tick. The event will be dispatched to each listener even when the Ticker has been paused using\r\n\t * {{#crossLink \"Ticker/paused:property\"}}{{/crossLink}}.\r\n\t *\r\n\t *

Example

\r\n\t *\r\n\t * createjs.Ticker.addEventListener(\"tick\", handleTick);\r\n\t * function handleTick(event) {\r\n\t * console.log(\"Paused:\", event.paused, event.delta);\r\n\t * }\r\n\t *\r\n\t * @event tick\r\n\t * @param {Object} target The object that dispatched the event.\r\n\t * @param {String} type The event type.\r\n\t * @param {Boolean} paused Indicates whether the ticker is currently paused.\r\n\t * @param {Number} delta The time elapsed in ms since the last tick.\r\n\t * @param {Number} time The total time in ms since Ticker was initialized.\r\n\t * @param {Number} runTime The total time in ms that Ticker was not paused since it was initialized. For example,\r\n\t * \tyou could determine the amount of time that the Ticker has been paused since initialization with `time-runTime`.\r\n\t * @since 0.6.0\r\n\t */\r\n\r\n\r\n// public static properties:\r\n\t/**\r\n\t * Specifies the timing api (setTimeout or requestAnimationFrame) and mode to use. See\r\n\t * {{#crossLink \"Ticker/TIMEOUT:property\"}}{{/crossLink}}, {{#crossLink \"Ticker/RAF:property\"}}{{/crossLink}}, and\r\n\t * {{#crossLink \"Ticker/RAF_SYNCHED:property\"}}{{/crossLink}} for mode details.\r\n\t * @property timingMode\r\n\t * @static\r\n\t * @type {String}\r\n\t * @default Ticker.TIMEOUT\r\n\t **/\r\n\tTicker.timingMode = null;\r\n\r\n\t/**\r\n\t * Specifies a maximum value for the delta property in the tick event object. This is useful when building time\r\n\t * based animations and systems to prevent issues caused by large time gaps caused by background tabs, system sleep,\r\n\t * alert dialogs, or other blocking routines. Double the expected frame duration is often an effective value\r\n\t * (ex. maxDelta=50 when running at 40fps).\r\n\t * \r\n\t * This does not impact any other values (ex. time, runTime, etc), so you may experience issues if you enable maxDelta\r\n\t * when using both delta and other values.\r\n\t * \r\n\t * If 0, there is no maximum.\r\n\t * @property maxDelta\r\n\t * @static\r\n\t * @type {number}\r\n\t * @default 0\r\n\t */\r\n\tTicker.maxDelta = 0;\r\n\t\r\n\t/**\r\n\t * When the ticker is paused, all listeners will still receive a tick event, but the paused property\r\n\t * of the event will be `true`. Also, while paused the `runTime` will not increase. See {{#crossLink \"Ticker/tick:event\"}}{{/crossLink}},\r\n\t * {{#crossLink \"Ticker/getTime\"}}{{/crossLink}}, and {{#crossLink \"Ticker/getEventTime\"}}{{/crossLink}} for more\r\n\t * info.\r\n\t *\r\n\t *

Example

\r\n\t *\r\n\t * createjs.Ticker.addEventListener(\"tick\", handleTick);\r\n\t * createjs.Ticker.paused = true;\r\n\t * function handleTick(event) {\r\n\t * console.log(event.paused,\r\n\t * \tcreatejs.Ticker.getTime(false),\r\n\t * \tcreatejs.Ticker.getTime(true));\r\n\t * }\r\n\t *\r\n\t * @property paused\r\n\t * @static\r\n\t * @type {Boolean}\r\n\t * @default false\r\n\t **/\r\n\tTicker.paused = false;\r\n\r\n\r\n// mix-ins:\r\n\t// EventDispatcher methods:\r\n\tTicker.removeEventListener = null;\r\n\tTicker.removeAllEventListeners = null;\r\n\tTicker.dispatchEvent = null;\r\n\tTicker.hasEventListener = null;\r\n\tTicker._listeners = null;\r\n\tcreatejs.EventDispatcher.initialize(Ticker); // inject EventDispatcher methods.\r\n\tTicker._addEventListener = Ticker.addEventListener;\r\n\tTicker.addEventListener = function() {\r\n\t\t!Ticker._inited&&Ticker.init();\r\n\t\treturn Ticker._addEventListener.apply(Ticker, arguments);\r\n\t};\r\n\r\n\r\n// private static properties:\r\n\t/**\r\n\t * @property _inited\r\n\t * @static\r\n\t * @type {Boolean}\r\n\t * @private\r\n\t **/\r\n\tTicker._inited = false;\r\n\r\n\t/**\r\n\t * @property _startTime\r\n\t * @static\r\n\t * @type {Number}\r\n\t * @private\r\n\t **/\r\n\tTicker._startTime = 0;\r\n\r\n\t/**\r\n\t * @property _pausedTime\r\n\t * @static\r\n\t * @type {Number}\r\n\t * @private\r\n\t **/\r\n\tTicker._pausedTime=0;\r\n\r\n\t/**\r\n\t * The number of ticks that have passed\r\n\t * @property _ticks\r\n\t * @static\r\n\t * @type {Number}\r\n\t * @private\r\n\t **/\r\n\tTicker._ticks = 0;\r\n\r\n\t/**\r\n\t * The number of ticks that have passed while Ticker has been paused\r\n\t * @property _pausedTicks\r\n\t * @static\r\n\t * @type {Number}\r\n\t * @private\r\n\t **/\r\n\tTicker._pausedTicks = 0;\r\n\r\n\t/**\r\n\t * @property _interval\r\n\t * @static\r\n\t * @type {Number}\r\n\t * @private\r\n\t **/\r\n\tTicker._interval = 50;\r\n\r\n\t/**\r\n\t * @property _lastTime\r\n\t * @static\r\n\t * @type {Number}\r\n\t * @private\r\n\t **/\r\n\tTicker._lastTime = 0;\r\n\r\n\t/**\r\n\t * @property _times\r\n\t * @static\r\n\t * @type {Array}\r\n\t * @private\r\n\t **/\r\n\tTicker._times = null;\r\n\r\n\t/**\r\n\t * @property _tickTimes\r\n\t * @static\r\n\t * @type {Array}\r\n\t * @private\r\n\t **/\r\n\tTicker._tickTimes = null;\r\n\r\n\t/**\r\n\t * Stores the timeout or requestAnimationFrame id.\r\n\t * @property _timerId\r\n\t * @static\r\n\t * @type {Number}\r\n\t * @private\r\n\t **/\r\n\tTicker._timerId = null;\r\n\t\r\n\t/**\r\n\t * True if currently using requestAnimationFrame, false if using setTimeout. This may be different than timingMode\r\n\t * if that property changed and a tick hasn't fired.\r\n\t * @property _raf\r\n\t * @static\r\n\t * @type {Boolean}\r\n\t * @private\r\n\t **/\r\n\tTicker._raf = true;\r\n\t\r\n\r\n// static getter / setters:\r\n\t/**\r\n\t * Use the {{#crossLink \"Ticker/interval:property\"}}{{/crossLink}} property instead.\r\n\t * @method _setInterval\r\n\t * @private\r\n\t * @static\r\n\t * @param {Number} interval\r\n\t **/\r\n\tTicker._setInterval = function(interval) {\r\n\t\tTicker._interval = interval;\r\n\t\tif (!Ticker._inited) { return; }\r\n\t\tTicker._setupTick();\r\n\t};\r\n\t// Ticker.setInterval is @deprecated. Remove for 1.1+\r\n\tTicker.setInterval = createjs.deprecate(Ticker._setInterval, \"Ticker.setInterval\");\r\n\r\n\t/**\r\n\t * Use the {{#crossLink \"Ticker/interval:property\"}}{{/crossLink}} property instead.\r\n\t * @method _getInterval\r\n\t * @private\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tTicker._getInterval = function() {\r\n\t\treturn Ticker._interval;\r\n\t};\r\n\t// Ticker.getInterval is @deprecated. Remove for 1.1+\r\n\tTicker.getInterval = createjs.deprecate(Ticker._getInterval, \"Ticker.getInterval\");\r\n\r\n\t/**\r\n\t * Use the {{#crossLink \"Ticker/framerate:property\"}}{{/crossLink}} property instead.\r\n\t * @method _setFPS\r\n\t * @private\r\n\t * @static\r\n\t * @param {Number} value\r\n\t **/\r\n\tTicker._setFPS = function(value) {\r\n\t\tTicker._setInterval(1000/value);\r\n\t};\r\n\t// Ticker.setFPS is @deprecated. Remove for 1.1+\r\n\tTicker.setFPS = createjs.deprecate(Ticker._setFPS, \"Ticker.setFPS\");\r\n\r\n\t/**\r\n\t * Use the {{#crossLink \"Ticker/framerate:property\"}}{{/crossLink}} property instead.\r\n\t * @method _getFPS\r\n\t * @static\r\n\t * @private\r\n\t * @return {Number}\r\n\t **/\r\n\tTicker._getFPS = function() {\r\n\t\treturn 1000/Ticker._interval;\r\n\t};\r\n\t// Ticker.getFPS is @deprecated. Remove for 1.1+\r\n\tTicker.getFPS = createjs.deprecate(Ticker._getFPS, \"Ticker.getFPS\");\r\n\r\n\t/**\r\n\t * Indicates the target time (in milliseconds) between ticks. Default is 50 (20 FPS).\r\n\t * Note that actual time between ticks may be more than specified depending on CPU load.\r\n\t * This property is ignored if the ticker is using the `RAF` timing mode.\r\n\t * @property interval\r\n\t * @static\r\n\t * @type {Number}\r\n\t **/\r\n\t \r\n\t/**\r\n\t * Indicates the target frame rate in frames per second (FPS). Effectively just a shortcut to `interval`, where\r\n\t * `framerate == 1000/interval`.\r\n\t * @property framerate\r\n\t * @static\r\n\t * @type {Number}\r\n\t **/\r\n\ttry {\r\n\t\tObject.defineProperties(Ticker, {\r\n\t\t\tinterval: { get: Ticker._getInterval, set: Ticker._setInterval },\r\n\t\t\tframerate: { get: Ticker._getFPS, set: Ticker._setFPS }\r\n\t\t});\r\n\t} catch (e) { console.log(e); }\r\n\r\n\r\n// public static methods:\r\n\t/**\r\n\t * Starts the tick. This is called automatically when the first listener is added.\r\n\t * @method init\r\n\t * @static\r\n\t **/\r\n\tTicker.init = function() {\r\n\t\tif (Ticker._inited) { return; }\r\n\t\tTicker._inited = true;\r\n\t\tTicker._times = [];\r\n\t\tTicker._tickTimes = [];\r\n\t\tTicker._startTime = Ticker._getTime();\r\n\t\tTicker._times.push(Ticker._lastTime = 0);\r\n\t\tTicker.interval = Ticker._interval;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Stops the Ticker and removes all listeners. Use init() to restart the Ticker.\r\n\t * @method reset\r\n\t * @static\r\n\t **/\r\n\tTicker.reset = function() {\r\n\t\tif (Ticker._raf) {\r\n\t\t\tvar f = window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || window.msCancelAnimationFrame;\r\n\t\t\tf&&f(Ticker._timerId);\r\n\t\t} else {\r\n\t\t\tclearTimeout(Ticker._timerId);\r\n\t\t}\r\n\t\tTicker.removeAllEventListeners(\"tick\");\r\n\t\tTicker._timerId = Ticker._times = Ticker._tickTimes = null;\r\n\t\tTicker._startTime = Ticker._lastTime = Ticker._ticks = Ticker._pausedTime = 0;\r\n\t\tTicker._inited = false;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns the average time spent within a tick. This can vary significantly from the value provided by getMeasuredFPS\r\n\t * because it only measures the time spent within the tick execution stack. \r\n\t * \r\n\t * Example 1: With a target FPS of 20, getMeasuredFPS() returns 20fps, which indicates an average of 50ms between \r\n\t * the end of one tick and the end of the next. However, getMeasuredTickTime() returns 15ms. This indicates that \r\n\t * there may be up to 35ms of \"idle\" time between the end of one tick and the start of the next.\r\n\t *\r\n\t * Example 2: With a target FPS of 30, {{#crossLink \"Ticker/framerate:property\"}}{{/crossLink}} returns 10fps, which\r\n\t * indicates an average of 100ms between the end of one tick and the end of the next. However, {{#crossLink \"Ticker/getMeasuredTickTime\"}}{{/crossLink}}\r\n\t * returns 20ms. This would indicate that something other than the tick is using ~80ms (another script, DOM\r\n\t * rendering, etc).\r\n\t * @method getMeasuredTickTime\r\n\t * @static\r\n\t * @param {Number} [ticks] The number of previous ticks over which to measure the average time spent in a tick.\r\n\t * Defaults to the number of ticks per second. To get only the last tick's time, pass in 1.\r\n\t * @return {Number} The average time spent in a tick in milliseconds.\r\n\t **/\r\n\tTicker.getMeasuredTickTime = function(ticks) {\r\n\t\tvar ttl=0, times=Ticker._tickTimes;\r\n\t\tif (!times || times.length < 1) { return -1; }\r\n\r\n\t\t// by default, calculate average for the past ~1 second:\r\n\t\tticks = Math.min(times.length, ticks||(Ticker._getFPS()|0));\r\n\t\tfor (var i=0; i= (Ticker._interval-1)*0.97) {\r\n\t\t\tTicker._tick();\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * @method _handleRAF\r\n\t * @static\r\n\t * @private\r\n\t **/\r\n\tTicker._handleRAF = function() {\r\n\t\tTicker._timerId = null;\r\n\t\tTicker._setupTick();\r\n\t\tTicker._tick();\r\n\t};\r\n\r\n\t/**\r\n\t * @method _handleTimeout\r\n\t * @static\r\n\t * @private\r\n\t **/\r\n\tTicker._handleTimeout = function() {\r\n\t\tTicker._timerId = null;\r\n\t\tTicker._setupTick();\r\n\t\tTicker._tick();\r\n\t};\r\n\r\n\t/**\r\n\t * @method _setupTick\r\n\t * @static\r\n\t * @private\r\n\t **/\r\n\tTicker._setupTick = function() {\r\n\t\tif (Ticker._timerId != null) { return; } // avoid duplicates\r\n\r\n\t\tvar mode = Ticker.timingMode;\r\n\t\tif (mode == Ticker.RAF_SYNCHED || mode == Ticker.RAF) {\r\n\t\t\tvar f = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame;\r\n\t\t\tif (f) {\r\n\t\t\t\tTicker._timerId = f(mode == Ticker.RAF ? Ticker._handleRAF : Ticker._handleSynch);\r\n\t\t\t\tTicker._raf = true;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tTicker._raf = false;\r\n\t\tTicker._timerId = setTimeout(Ticker._handleTimeout, Ticker._interval);\r\n\t};\r\n\r\n\t/**\r\n\t * @method _tick\r\n\t * @static\r\n\t * @private\r\n\t **/\r\n\tTicker._tick = function() {\r\n\t\tvar paused = Ticker.paused;\r\n\t\tvar time = Ticker._getTime();\r\n\t\tvar elapsedTime = time-Ticker._lastTime;\r\n\t\tTicker._lastTime = time;\r\n\t\tTicker._ticks++;\r\n\t\t\r\n\t\tif (paused) {\r\n\t\t\tTicker._pausedTicks++;\r\n\t\t\tTicker._pausedTime += elapsedTime;\r\n\t\t}\r\n\t\t\r\n\t\tif (Ticker.hasEventListener(\"tick\")) {\r\n\t\t\tvar event = new createjs.Event(\"tick\");\r\n\t\t\tvar maxDelta = Ticker.maxDelta;\r\n\t\t\tevent.delta = (maxDelta && elapsedTime > maxDelta) ? maxDelta : elapsedTime;\r\n\t\t\tevent.paused = paused;\r\n\t\t\tevent.time = time;\r\n\t\t\tevent.runTime = time-Ticker._pausedTime;\r\n\t\t\tTicker.dispatchEvent(event);\r\n\t\t}\r\n\t\t\r\n\t\tTicker._tickTimes.unshift(Ticker._getTime()-time);\r\n\t\twhile (Ticker._tickTimes.length > 100) { Ticker._tickTimes.pop(); }\r\n\r\n\t\tTicker._times.unshift(time);\r\n\t\twhile (Ticker._times.length > 100) { Ticker._times.pop(); }\r\n\t};\r\n\r\n\t/**\r\n\t * @method _getTime\r\n\t * @static\r\n\t * @private\r\n\t **/\r\n\tvar w=window, now=w.performance.now || w.performance.mozNow || w.performance.msNow || w.performance.oNow || w.performance.webkitNow;\r\n\tTicker._getTime = function() {\r\n\t\treturn ((now&&now.call(w.performance))||(new Date().getTime())) - Ticker._startTime;\r\n\t};\r\n\r\n\r\n\tcreatejs.Ticker = Ticker;\r\n}());\r\n\r\n//##############################################################################\r\n// VideoBuffer.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * When an HTML video seeks, including when looping, there is an indeterminate period before a new frame is available.\r\n\t * This can result in the video blinking or flashing when it is drawn to a canvas. The VideoBuffer class resolves\r\n\t * this issue by drawing each frame to an off-screen canvas and preserving the prior frame during a seek.\r\n\t * \r\n\t * \tvar myBuffer = new createjs.VideoBuffer(myVideo);\r\n\t * \tvar myBitmap = new Bitmap(myBuffer);\r\n\t * \r\n\t * @class VideoBuffer\r\n\t * @param {HTMLVideoElement} video The HTML video element to buffer.\r\n\t * @constructor\r\n\t **/\r\n\tfunction VideoBuffer(video) {\r\n\t\t\r\n\t// private properties:\r\n\t\t/**\r\n\t\t * Used by Bitmap to determine when the video buffer is ready to be drawn. Not intended for general use.\r\n\t\t * @property readyState\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis.readyState = video.readyState;\r\n\t\t\r\n\t\t/**\r\n\t\t * @property _video\r\n\t\t * @protected\r\n\t\t * @type {HTMLVideoElement}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis._video = video;\r\n\t\t\r\n\t\t/**\r\n\t\t * @property _canvas\r\n\t\t * @protected\r\n\t\t * @type {HTMLCanvasElement}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis._canvas = null;\r\n\t\t\r\n\t\t/**\r\n\t\t * @property _lastTime\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default -1\r\n\t\t **/\r\n\t\tthis._lastTime = -1;\r\n\t\t\r\n\t\tif (this.readyState < 2) { video.addEventListener(\"canplaythrough\", this._videoReady.bind(this)); } //once:true isn't supported everywhere, but its a non-critical optimization here.\r\n\t}\r\n\tvar p = VideoBuffer.prototype;\r\n\t\r\n\t\r\n// public methods:\r\n\t/**\r\n\t * Gets an HTML canvas element showing the current video frame, or the previous frame if in a seek / loop.\r\n\t * Primarily for use by {{#crossLink \"Bitmap\"}}{{/crossLink}}.\r\n\t * @method getImage\r\n\t **/\r\n\tp.getImage = function() {\r\n\t\tif (this.readyState < 2) { return; }\r\n\t\tvar canvas=this._canvas, video = this._video;\r\n\t\tif (!canvas) {\r\n\t\t\tcanvas = this._canvas = createjs.createCanvas?createjs.createCanvas():document.createElement(\"canvas\");\r\n\t\t\tcanvas.width = video.videoWidth;\r\n\t\t\tcanvas.height = video.videoHeight;\r\n\t\t}\r\n\t\tif (video.readyState >= 2 && video.currentTime !== this._lastTime) {\r\n\t\t\tvar ctx = canvas.getContext(\"2d\");\r\n\t\t\tctx.clearRect(0,0,canvas.width,canvas.height);\r\n\t\t\tctx.drawImage(video,0,0,canvas.width,canvas.height);\r\n\t\t\tthis._lastTime = video.currentTime;\r\n\t\t}\r\n\t\treturn canvas;\r\n\t};\r\n\t\r\n// private methods:\r\n\t/**\r\n\t * @method _videoReady\r\n\t * @protected\r\n\t **/\r\n\tp._videoReady = function() {\r\n\t\tthis.readyState = 2;\r\n\t};\r\n\r\n\r\n\tcreatejs.VideoBuffer = VideoBuffer;\r\n}());\r\n\r\n//##############################################################################\r\n// MouseEvent.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * Passed as the parameter to all mouse/pointer/touch related events. For a listing of mouse events and their properties,\r\n\t * see the {{#crossLink \"DisplayObject\"}}{{/crossLink}} and {{#crossLink \"Stage\"}}{{/crossLink}} event listings.\r\n\t * @class MouseEvent\r\n\t * @param {String} type The event type.\r\n\t * @param {Boolean} bubbles Indicates whether the event will bubble through the display list.\r\n\t * @param {Boolean} cancelable Indicates whether the default behaviour of this event can be cancelled.\r\n\t * @param {Number} stageX The normalized x position relative to the stage.\r\n\t * @param {Number} stageY The normalized y position relative to the stage.\r\n\t * @param {MouseEvent} nativeEvent The native DOM event related to this mouse event.\r\n\t * @param {Number} pointerID The unique id for the pointer.\r\n\t * @param {Boolean} primary Indicates whether this is the primary pointer in a multitouch environment.\r\n\t * @param {Number} rawX The raw x position relative to the stage.\r\n\t * @param {Number} rawY The raw y position relative to the stage.\r\n\t * @param {DisplayObject} relatedTarget The secondary target for the event.\r\n\t * @extends Event\r\n\t * @constructor\r\n\t **/\r\n\tfunction MouseEvent(type, bubbles, cancelable, stageX, stageY, nativeEvent, pointerID, primary, rawX, rawY, relatedTarget) {\r\n\t\tthis.Event_constructor(type, bubbles, cancelable);\r\n\t\t\r\n\t\t\r\n\t// public properties:\r\n\t\t/**\r\n\t\t * The normalized x position on the stage. This will always be within the range 0 to stage width.\r\n\t\t * @property stageX\r\n\t\t * @type Number\r\n\t\t*/\r\n\t\tthis.stageX = stageX;\r\n\t\r\n\t\t/**\r\n\t\t * The normalized y position on the stage. This will always be within the range 0 to stage height.\r\n\t\t * @property stageY\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis.stageY = stageY;\r\n\t\r\n\t\t/**\r\n\t\t * The raw x position relative to the stage. Normally this will be the same as the stageX value, unless\r\n\t\t * stage.mouseMoveOutside is true and the pointer is outside of the stage bounds.\r\n\t\t * @property rawX\r\n\t\t * @type Number\r\n\t\t*/\r\n\t\tthis.rawX = (rawX==null)?stageX:rawX;\r\n\t\r\n\t\t/**\r\n\t\t * The raw y position relative to the stage. Normally this will be the same as the stageY value, unless\r\n\t\t * stage.mouseMoveOutside is true and the pointer is outside of the stage bounds.\r\n\t\t * @property rawY\r\n\t\t * @type Number\r\n\t\t*/\r\n\t\tthis.rawY = (rawY==null)?stageY:rawY;\r\n\t\r\n\t\t/**\r\n\t\t * The native MouseEvent generated by the browser. The properties and API for this\r\n\t\t * event may differ between browsers. This property will be null if the\r\n\t\t * EaselJS property was not directly generated from a native MouseEvent.\r\n\t\t * @property nativeEvent\r\n\t\t * @type HtmlMouseEvent\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis.nativeEvent = nativeEvent;\r\n\t\r\n\t\t/**\r\n\t\t * The unique id for the pointer (touch point or cursor). This will be either -1 for the mouse, or the system\r\n\t\t * supplied id value.\r\n\t\t * @property pointerID\r\n\t\t * @type {Number}\r\n\t\t */\r\n\t\tthis.pointerID = pointerID;\r\n\t\r\n\t\t/**\r\n\t\t * Indicates whether this is the primary pointer in a multitouch environment. This will always be true for the mouse.\r\n\t\t * For touch pointers, the first pointer in the current stack will be considered the primary pointer.\r\n\t\t * @property primary\r\n\t\t * @type {Boolean}\r\n\t\t */\r\n\t\tthis.primary = !!primary;\r\n\t\t\r\n\t\t/**\r\n\t\t * The secondary target for the event, if applicable. This is used for mouseout/rollout\r\n\t\t * events to indicate the object that the mouse entered from, mouseover/rollover for the object the mouse exited,\r\n\t\t * and stagemousedown/stagemouseup events for the object that was the under the cursor, if any.\r\n\t\t * \r\n\t\t * Only valid interaction targets will be returned (ie. objects with mouse listeners or a cursor set).\r\n\t\t * @property relatedTarget\r\n\t\t * @type {DisplayObject}\r\n\t\t */\r\n\t\tthis.relatedTarget = relatedTarget;\r\n\t}\r\n\tvar p = createjs.extend(MouseEvent, createjs.Event);\r\n\r\n\t// TODO: deprecated\r\n\t// p.initialize = function() {}; // searchable for devs wondering where it is. REMOVED. See docs for details.\r\n\t\r\n\t\r\n// getter / setters:\r\n\t/**\r\n\t * Returns the x position of the mouse in the local coordinate system of the current target (ie. the dispatcher).\r\n\t * @property localX\r\n\t * @type {Number}\r\n\t * @readonly\r\n\t */\r\n\tp._get_localX = function() {\r\n\t\treturn this.currentTarget.globalToLocal(this.rawX, this.rawY).x;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Returns the y position of the mouse in the local coordinate system of the current target (ie. the dispatcher).\r\n\t * @property localY\r\n\t * @type {Number}\r\n\t * @readonly\r\n\t */\r\n\tp._get_localY = function() {\r\n\t\treturn this.currentTarget.globalToLocal(this.rawX, this.rawY).y;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Indicates whether the event was generated by a touch input (versus a mouse input).\r\n\t * @property isTouch\r\n\t * @type {Boolean}\r\n\t * @readonly\r\n\t */\r\n\tp._get_isTouch = function() {\r\n\t\treturn this.pointerID !== -1;\r\n\t};\r\n\t\r\n\t\r\n\ttry {\r\n\t\tObject.defineProperties(p, {\r\n\t\t\tlocalX: { get: p._get_localX },\r\n\t\t\tlocalY: { get: p._get_localY },\r\n\t\t\tisTouch: { get: p._get_isTouch }\r\n\t\t});\r\n\t} catch (e) {} // TODO: use Log\r\n\r\n\r\n// public methods:\r\n\t/**\r\n\t * Returns a clone of the MouseEvent instance.\r\n\t * @method clone\r\n\t * @return {MouseEvent} a clone of the MouseEvent instance.\r\n\t **/\r\n\tp.clone = function() {\r\n\t\treturn new MouseEvent(this.type, this.bubbles, this.cancelable, this.stageX, this.stageY, this.nativeEvent, this.pointerID, this.primary, this.rawX, this.rawY);\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a string representation of this object.\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t **/\r\n\tp.toString = function() {\r\n\t\treturn \"[MouseEvent (type=\"+this.type+\" stageX=\"+this.stageX+\" stageY=\"+this.stageY+\")]\";\r\n\t};\r\n\r\n\r\n\tcreatejs.MouseEvent = createjs.promote(MouseEvent, \"Event\");\r\n}());\r\n\r\n//##############################################################################\r\n// Matrix2D.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * Represents an affine transformation matrix, and provides tools for constructing and concatenating matrices.\r\n\t *\r\n\t * This matrix can be visualized as:\r\n\t *\r\n\t * \t[ a c tx\r\n\t * \t b d ty\r\n\t * \t 0 0 1 ]\r\n\t *\r\n\t * Note the locations of b and c.\r\n\t *\r\n\t * @class Matrix2D\r\n\t * @param {Number} [a=1] Specifies the a property for the new matrix.\r\n\t * @param {Number} [b=0] Specifies the b property for the new matrix.\r\n\t * @param {Number} [c=0] Specifies the c property for the new matrix.\r\n\t * @param {Number} [d=1] Specifies the d property for the new matrix.\r\n\t * @param {Number} [tx=0] Specifies the tx property for the new matrix.\r\n\t * @param {Number} [ty=0] Specifies the ty property for the new matrix.\r\n\t * @constructor\r\n\t **/\r\n\tfunction Matrix2D(a, b, c, d, tx, ty) {\r\n\t\tthis.setValues(a,b,c,d,tx,ty);\r\n\t\t\r\n\t// public properties:\r\n\t\t// assigned in the setValues method.\r\n\t\t/**\r\n\t\t * Position (0, 0) in a 3x3 affine transformation matrix.\r\n\t\t * @property a\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\r\n\t\t/**\r\n\t\t * Position (0, 1) in a 3x3 affine transformation matrix.\r\n\t\t * @property b\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\r\n\t\t/**\r\n\t\t * Position (1, 0) in a 3x3 affine transformation matrix.\r\n\t\t * @property c\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\r\n\t\t/**\r\n\t\t * Position (1, 1) in a 3x3 affine transformation matrix.\r\n\t\t * @property d\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\r\n\t\t/**\r\n\t\t * Position (2, 0) in a 3x3 affine transformation matrix.\r\n\t\t * @property tx\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\r\n\t\t/**\r\n\t\t * Position (2, 1) in a 3x3 affine transformation matrix.\r\n\t\t * @property ty\r\n\t\t * @type Number\r\n\t\t **/\r\n\t}\r\n\tvar p = Matrix2D.prototype;\r\n\r\n// constants:\r\n\t/**\r\n\t * Multiplier for converting degrees to radians. Used internally by Matrix2D.\r\n\t * @property DEG_TO_RAD\r\n\t * @static\r\n\t * @final\r\n\t * @type Number\r\n\t * @readonly\r\n\t **/\r\n\tMatrix2D.DEG_TO_RAD = Math.PI/180;\r\n\r\n\r\n// static public properties:\r\n\t/**\r\n\t * An identity matrix, representing a null transformation.\r\n\t * @property identity\r\n\t * @static\r\n\t * @type Matrix2D\r\n\t * @readonly\r\n\t **/\r\n\tMatrix2D.identity = null; // set at bottom of class definition.\r\n\t\r\n\r\n// public methods:\r\n\t/**\r\n\t * Sets the specified values on this instance. \r\n\t * @method setValues\r\n\t * @param {Number} [a=1] Specifies the a property for the new matrix.\r\n\t * @param {Number} [b=0] Specifies the b property for the new matrix.\r\n\t * @param {Number} [c=0] Specifies the c property for the new matrix.\r\n\t * @param {Number} [d=1] Specifies the d property for the new matrix.\r\n\t * @param {Number} [tx=0] Specifies the tx property for the new matrix.\r\n\t * @param {Number} [ty=0] Specifies the ty property for the new matrix.\r\n\t * @return {Matrix2D} This instance. Useful for chaining method calls.\r\n\t*/\r\n\tp.setValues = function(a, b, c, d, tx, ty) {\r\n\t\t// don't forget to update docs in the constructor if these change:\r\n\t\tthis.a = (a == null) ? 1 : a;\r\n\t\tthis.b = b || 0;\r\n\t\tthis.c = c || 0;\r\n\t\tthis.d = (d == null) ? 1 : d;\r\n\t\tthis.tx = tx || 0;\r\n\t\tthis.ty = ty || 0;\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Appends the specified matrix properties to this matrix. All parameters are required.\r\n\t * This is the equivalent of multiplying `(this matrix) * (specified matrix)`.\r\n\t * @method append\r\n\t * @param {Number} a\r\n\t * @param {Number} b\r\n\t * @param {Number} c\r\n\t * @param {Number} d\r\n\t * @param {Number} tx\r\n\t * @param {Number} ty\r\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\r\n\t **/\r\n\tp.append = function(a, b, c, d, tx, ty) {\r\n\t\tvar a1 = this.a;\r\n\t\tvar b1 = this.b;\r\n\t\tvar c1 = this.c;\r\n\t\tvar d1 = this.d;\r\n\t\tif (a != 1 || b != 0 || c != 0 || d != 1) {\r\n\t\t\tthis.a = a1*a+c1*b;\r\n\t\t\tthis.b = b1*a+d1*b;\r\n\t\t\tthis.c = a1*c+c1*d;\r\n\t\t\tthis.d = b1*c+d1*d;\r\n\t\t}\r\n\t\tthis.tx = a1*tx+c1*ty+this.tx;\r\n\t\tthis.ty = b1*tx+d1*ty+this.ty;\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Prepends the specified matrix properties to this matrix.\r\n\t * This is the equivalent of multiplying `(specified matrix) * (this matrix)`.\r\n\t * All parameters are required.\r\n\t * @method prepend\r\n\t * @param {Number} a\r\n\t * @param {Number} b\r\n\t * @param {Number} c\r\n\t * @param {Number} d\r\n\t * @param {Number} tx\r\n\t * @param {Number} ty\r\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\r\n\t **/\r\n\tp.prepend = function(a, b, c, d, tx, ty) {\r\n\t\tvar a1 = this.a;\r\n\t\tvar c1 = this.c;\r\n\t\tvar tx1 = this.tx;\r\n\r\n\t\tthis.a = a*a1+c*this.b;\r\n\t\tthis.b = b*a1+d*this.b;\r\n\t\tthis.c = a*c1+c*this.d;\r\n\t\tthis.d = b*c1+d*this.d;\r\n\t\tthis.tx = a*tx1+c*this.ty+tx;\r\n\t\tthis.ty = b*tx1+d*this.ty+ty;\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Appends the specified matrix to this matrix.\r\n\t * This is the equivalent of multiplying `(this matrix) * (specified matrix)`.\r\n\t * @method appendMatrix\r\n\t * @param {Matrix2D} matrix\r\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\r\n\t **/\r\n\tp.appendMatrix = function(matrix) {\r\n\t\treturn this.append(matrix.a, matrix.b, matrix.c, matrix.d, matrix.tx, matrix.ty);\r\n\t};\r\n\r\n\t/**\r\n\t * Prepends the specified matrix to this matrix.\r\n\t * This is the equivalent of multiplying `(specified matrix) * (this matrix)`.\r\n\t * For example, you could calculate the combined transformation for a child object using:\r\n\t * \r\n\t * \tvar o = myDisplayObject;\r\n\t * \tvar mtx = o.getMatrix();\r\n\t * \twhile (o = o.parent) {\r\n\t * \t\t// prepend each parent's transformation in turn:\r\n\t * \t\to.prependMatrix(o.getMatrix());\r\n\t * \t}\r\n\t * @method prependMatrix\r\n\t * @param {Matrix2D} matrix\r\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\r\n\t **/\r\n\tp.prependMatrix = function(matrix) {\r\n\t\treturn this.prepend(matrix.a, matrix.b, matrix.c, matrix.d, matrix.tx, matrix.ty);\r\n\t};\r\n\r\n\t/**\r\n\t * Generates matrix properties from the specified display object transform properties, and appends them to this matrix.\r\n\t * For example, you can use this to generate a matrix representing the transformations of a display object:\r\n\t * \r\n\t * \tvar mtx = new createjs.Matrix2D();\r\n\t * \tmtx.appendTransform(o.x, o.y, o.scaleX, o.scaleY, o.rotation);\r\n\t * @method appendTransform\r\n\t * @param {Number} x\r\n\t * @param {Number} y\r\n\t * @param {Number} scaleX\r\n\t * @param {Number} scaleY\r\n\t * @param {Number} rotation\r\n\t * @param {Number} skewX\r\n\t * @param {Number} skewY\r\n\t * @param {Number} regX Optional.\r\n\t * @param {Number} regY Optional.\r\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\r\n\t **/\r\n\tp.appendTransform = function(x, y, scaleX, scaleY, rotation, skewX, skewY, regX, regY) {\r\n\t\tif (rotation%360) {\r\n\t\t\tvar r = rotation*Matrix2D.DEG_TO_RAD;\r\n\t\t\tvar cos = Math.cos(r);\r\n\t\t\tvar sin = Math.sin(r);\r\n\t\t} else {\r\n\t\t\tcos = 1;\r\n\t\t\tsin = 0;\r\n\t\t}\r\n\r\n\t\tif (skewX || skewY) {\r\n\t\t\t// TODO: can this be combined into a single append operation?\r\n\t\t\tskewX *= Matrix2D.DEG_TO_RAD;\r\n\t\t\tskewY *= Matrix2D.DEG_TO_RAD;\r\n\t\t\tthis.append(Math.cos(skewY), Math.sin(skewY), -Math.sin(skewX), Math.cos(skewX), x, y);\r\n\t\t\tthis.append(cos*scaleX, sin*scaleX, -sin*scaleY, cos*scaleY, 0, 0);\r\n\t\t} else {\r\n\t\t\tthis.append(cos*scaleX, sin*scaleX, -sin*scaleY, cos*scaleY, x, y);\r\n\t\t}\r\n\t\t\r\n\t\tif (regX || regY) {\r\n\t\t\t// append the registration offset:\r\n\t\t\tthis.tx -= regX*this.a+regY*this.c; \r\n\t\t\tthis.ty -= regX*this.b+regY*this.d;\r\n\t\t}\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Generates matrix properties from the specified display object transform properties, and prepends them to this matrix.\r\n\t * For example, you could calculate the combined transformation for a child object using:\r\n\t * \r\n\t * \tvar o = myDisplayObject;\r\n\t * \tvar mtx = new createjs.Matrix2D();\r\n\t * \tdo {\r\n\t * \t\t// prepend each parent's transformation in turn:\r\n\t * \t\tmtx.prependTransform(o.x, o.y, o.scaleX, o.scaleY, o.rotation, o.skewX, o.skewY, o.regX, o.regY);\r\n\t * \t} while (o = o.parent);\r\n\t * \t\r\n\t * \tNote that the above example would not account for {{#crossLink \"DisplayObject/transformMatrix:property\"}}{{/crossLink}}\r\n\t * \tvalues. See {{#crossLink \"Matrix2D/prependMatrix\"}}{{/crossLink}} for an example that does.\r\n\t * @method prependTransform\r\n\t * @param {Number} x\r\n\t * @param {Number} y\r\n\t * @param {Number} scaleX\r\n\t * @param {Number} scaleY\r\n\t * @param {Number} rotation\r\n\t * @param {Number} skewX\r\n\t * @param {Number} skewY\r\n\t * @param {Number} regX Optional.\r\n\t * @param {Number} regY Optional.\r\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\r\n\t **/\r\n\tp.prependTransform = function(x, y, scaleX, scaleY, rotation, skewX, skewY, regX, regY) {\r\n\t\tif (rotation%360) {\r\n\t\t\tvar r = rotation*Matrix2D.DEG_TO_RAD;\r\n\t\t\tvar cos = Math.cos(r);\r\n\t\t\tvar sin = Math.sin(r);\r\n\t\t} else {\r\n\t\t\tcos = 1;\r\n\t\t\tsin = 0;\r\n\t\t}\r\n\r\n\t\tif (regX || regY) {\r\n\t\t\t// prepend the registration offset:\r\n\t\t\tthis.tx -= regX; this.ty -= regY;\r\n\t\t}\r\n\t\tif (skewX || skewY) {\r\n\t\t\t// TODO: can this be combined into a single prepend operation?\r\n\t\t\tskewX *= Matrix2D.DEG_TO_RAD;\r\n\t\t\tskewY *= Matrix2D.DEG_TO_RAD;\r\n\t\t\tthis.prepend(cos*scaleX, sin*scaleX, -sin*scaleY, cos*scaleY, 0, 0);\r\n\t\t\tthis.prepend(Math.cos(skewY), Math.sin(skewY), -Math.sin(skewX), Math.cos(skewX), x, y);\r\n\t\t} else {\r\n\t\t\tthis.prepend(cos*scaleX, sin*scaleX, -sin*scaleY, cos*scaleY, x, y);\r\n\t\t}\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Applies a clockwise rotation transformation to the matrix.\r\n\t * @method rotate\r\n\t * @param {Number} angle The angle to rotate by, in degrees. To use a value in radians, multiply it by `180/Math.PI`.\r\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\r\n\t **/\r\n\tp.rotate = function(angle) {\r\n\t\tangle = angle*Matrix2D.DEG_TO_RAD;\r\n\t\tvar cos = Math.cos(angle);\r\n\t\tvar sin = Math.sin(angle);\r\n\r\n\t\tvar a1 = this.a;\r\n\t\tvar b1 = this.b;\r\n\r\n\t\tthis.a = a1*cos+this.c*sin;\r\n\t\tthis.b = b1*cos+this.d*sin;\r\n\t\tthis.c = -a1*sin+this.c*cos;\r\n\t\tthis.d = -b1*sin+this.d*cos;\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Applies a skew transformation to the matrix.\r\n\t * @method skew\r\n\t * @param {Number} skewX The amount to skew horizontally in degrees. To use a value in radians, multiply it by `180/Math.PI`.\r\n\t * @param {Number} skewY The amount to skew vertically in degrees.\r\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\r\n\t*/\r\n\tp.skew = function(skewX, skewY) {\r\n\t\tskewX = skewX*Matrix2D.DEG_TO_RAD;\r\n\t\tskewY = skewY*Matrix2D.DEG_TO_RAD;\r\n\t\tthis.append(Math.cos(skewY), Math.sin(skewY), -Math.sin(skewX), Math.cos(skewX), 0, 0);\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Applies a scale transformation to the matrix.\r\n\t * @method scale\r\n\t * @param {Number} x The amount to scale horizontally. E.G. a value of 2 will double the size in the X direction, and 0.5 will halve it.\r\n\t * @param {Number} y The amount to scale vertically.\r\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\r\n\t **/\r\n\tp.scale = function(x, y) {\r\n\t\tthis.a *= x;\r\n\t\tthis.b *= x;\r\n\t\tthis.c *= y;\r\n\t\tthis.d *= y;\r\n\t\t//this.tx *= x;\r\n\t\t//this.ty *= y;\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Translates the matrix on the x and y axes.\r\n\t * @method translate\r\n\t * @param {Number} x\r\n\t * @param {Number} y\r\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\r\n\t **/\r\n\tp.translate = function(x, y) {\r\n\t\tthis.tx += this.a*x + this.c*y;\r\n\t\tthis.ty += this.b*x + this.d*y;\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Sets the properties of the matrix to those of an identity matrix (one that applies a null transformation).\r\n\t * @method identity\r\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\r\n\t **/\r\n\tp.identity = function() {\r\n\t\tthis.a = this.d = 1;\r\n\t\tthis.b = this.c = this.tx = this.ty = 0;\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Inverts the matrix, causing it to perform the opposite transformation.\r\n\t * @method invert\r\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\r\n\t **/\r\n\tp.invert = function() {\r\n\t\tvar a1 = this.a;\r\n\t\tvar b1 = this.b;\r\n\t\tvar c1 = this.c;\r\n\t\tvar d1 = this.d;\r\n\t\tvar tx1 = this.tx;\r\n\t\tvar n = a1*d1-b1*c1;\r\n\r\n\t\tthis.a = d1/n;\r\n\t\tthis.b = -b1/n;\r\n\t\tthis.c = -c1/n;\r\n\t\tthis.d = a1/n;\r\n\t\tthis.tx = (c1*this.ty-d1*tx1)/n;\r\n\t\tthis.ty = -(a1*this.ty-b1*tx1)/n;\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns true if the matrix is an identity matrix.\r\n\t * @method isIdentity\r\n\t * @return {Boolean}\r\n\t **/\r\n\tp.isIdentity = function() {\r\n\t\treturn this.tx === 0 && this.ty === 0 && this.a === 1 && this.b === 0 && this.c === 0 && this.d === 1;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Returns true if this matrix is equal to the specified matrix (all property values are equal).\r\n\t * @method equals\r\n\t * @param {Matrix2D} matrix The matrix to compare.\r\n\t * @return {Boolean}\r\n\t **/\r\n\tp.equals = function(matrix) {\r\n\t\treturn this.tx === matrix.tx && this.ty === matrix.ty && this.a === matrix.a && this.b === matrix.b && this.c === matrix.c && this.d === matrix.d;\r\n\t};\r\n\r\n\t/**\r\n\t * Transforms a point according to this matrix.\r\n\t * @method transformPoint\r\n\t * @param {Number} x The x component of the point to transform.\r\n\t * @param {Number} y The y component of the point to transform.\r\n\t * @param {Point | Object} [pt] An object to copy the result into. If omitted a generic object with x/y properties will be returned.\r\n\t * @return {Point} This matrix. Useful for chaining method calls.\r\n\t **/\r\n\tp.transformPoint = function(x, y, pt) {\r\n\t\tpt = pt||{};\r\n\t\tpt.x = x*this.a+y*this.c+this.tx;\r\n\t\tpt.y = x*this.b+y*this.d+this.ty;\r\n\t\treturn pt;\r\n\t};\r\n\r\n\t/**\r\n\t * Decomposes the matrix into transform properties (x, y, scaleX, scaleY, and rotation). Note that these values\r\n\t * may not match the transform properties you used to generate the matrix, though they will produce the same visual\r\n\t * results.\r\n\t * @method decompose\r\n\t * @param {Object} target The object to apply the transform properties to. If null, then a new object will be returned.\r\n\t * @return {Object} The target, or a new generic object with the transform properties applied.\r\n\t*/\r\n\tp.decompose = function(target) {\r\n\t\t// TODO: it would be nice to be able to solve for whether the matrix can be decomposed into only scale/rotation even when scale is negative\r\n\t\tif (target == null) { target = {}; }\r\n\t\ttarget.x = this.tx;\r\n\t\ttarget.y = this.ty;\r\n\t\ttarget.scaleX = Math.sqrt(this.a * this.a + this.b * this.b);\r\n\t\ttarget.scaleY = Math.sqrt(this.c * this.c + this.d * this.d);\r\n\r\n\t\tvar skewX = Math.atan2(-this.c, this.d);\r\n\t\tvar skewY = Math.atan2(this.b, this.a);\r\n\r\n\t\tvar delta = Math.abs(1-skewX/skewY);\r\n\t\tif (delta < 0.00001) { // effectively identical, can use rotation:\r\n\t\t\ttarget.rotation = skewY/Matrix2D.DEG_TO_RAD;\r\n\t\t\tif (this.a < 0 && this.d >= 0) {\r\n\t\t\t\ttarget.rotation += (target.rotation <= 0) ? 180 : -180;\r\n\t\t\t}\r\n\t\t\ttarget.skewX = target.skewY = 0;\r\n\t\t} else {\r\n\t\t\ttarget.skewX = skewX/Matrix2D.DEG_TO_RAD;\r\n\t\t\ttarget.skewY = skewY/Matrix2D.DEG_TO_RAD;\r\n\t\t}\r\n\t\treturn target;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Copies all properties from the specified matrix to this matrix.\r\n\t * @method copy\r\n\t * @param {Matrix2D} matrix The matrix to copy properties from.\r\n\t * @return {Matrix2D} This matrix. Useful for chaining method calls.\r\n\t*/\r\n\tp.copy = function(matrix) {\r\n\t\treturn this.setValues(matrix.a, matrix.b, matrix.c, matrix.d, matrix.tx, matrix.ty);\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a clone of the Matrix2D instance.\r\n\t * @method clone\r\n\t * @return {Matrix2D} a clone of the Matrix2D instance.\r\n\t **/\r\n\tp.clone = function() {\r\n\t\treturn new Matrix2D(this.a, this.b, this.c, this.d, this.tx, this.ty);\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a string representation of this object.\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t **/\r\n\tp.toString = function() {\r\n\t\treturn \"[Matrix2D (a=\"+this.a+\" b=\"+this.b+\" c=\"+this.c+\" d=\"+this.d+\" tx=\"+this.tx+\" ty=\"+this.ty+\")]\";\r\n\t};\r\n\r\n\t// this has to be populated after the class is defined:\r\n\tMatrix2D.identity = new Matrix2D();\r\n\r\n\r\n\tcreatejs.Matrix2D = Matrix2D;\r\n}());\r\n\r\n//##############################################################################\r\n// DisplayProps.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\t/**\r\n\t * Used for calculating and encapsulating display related properties.\r\n\t * @class DisplayProps\r\n\t * @param {Number} [visible=true] Visible value.\r\n\t * @param {Number} [alpha=1] Alpha value.\r\n\t * @param {Number} [shadow=null] A Shadow instance or null.\r\n\t * @param {Number} [compositeOperation=null] A compositeOperation value or null.\r\n\t * @param {Number} [matrix] A transformation matrix. Defaults to a new identity matrix.\r\n\t * @constructor\r\n\t **/\r\n\tfunction DisplayProps(visible, alpha, shadow, compositeOperation, matrix) {\r\n\t\tthis.setValues(visible, alpha, shadow, compositeOperation, matrix);\r\n\t\t\r\n\t// public properties:\r\n\t\t// assigned in the setValues method.\r\n\t\t/**\r\n\t\t * Property representing the alpha that will be applied to a display object.\r\n\t\t * @property alpha\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\r\n\t\t/**\r\n\t\t * Property representing the shadow that will be applied to a display object.\r\n\t\t * @property shadow\r\n\t\t * @type Shadow\r\n\t\t **/\r\n\t\r\n\t\t/**\r\n\t\t * Property representing the compositeOperation that will be applied to a display object.\r\n\t\t * You can find a list of valid composite operations at:\r\n\t\t * https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Compositing\r\n\t\t * @property compositeOperation\r\n\t\t * @type String\r\n\t\t **/\r\n\t\t\r\n\t\t/**\r\n\t\t * Property representing the value for visible that will be applied to a display object.\r\n\t\t * @property visible\r\n\t\t * @type Boolean\r\n\t\t **/\r\n\t\t\r\n\t\t/**\r\n\t\t * The transformation matrix that will be applied to a display object.\r\n\t\t * @property matrix\r\n\t\t * @type Matrix2D\r\n\t\t **/\r\n\t}\r\n\tvar p = DisplayProps.prototype;\r\n\r\n// initialization:\r\n\t/**\r\n\t * Reinitializes the instance with the specified values.\r\n\t * @method setValues\r\n\t * @param {Number} [visible=true] Visible value.\r\n\t * @param {Number} [alpha=1] Alpha value.\r\n\t * @param {Number} [shadow=null] A Shadow instance or null.\r\n\t * @param {Number} [compositeOperation=null] A compositeOperation value or null.\r\n\t * @param {Number} [matrix] A transformation matrix. Defaults to an identity matrix.\r\n\t * @return {DisplayProps} This instance. Useful for chaining method calls.\r\n\t * @chainable\r\n\t*/\r\n\tp.setValues = function (visible, alpha, shadow, compositeOperation, matrix) {\r\n\t\tthis.visible = visible == null ? true : !!visible;\r\n\t\tthis.alpha = alpha == null ? 1 : alpha;\r\n\t\tthis.shadow = shadow;\r\n\t\tthis.compositeOperation = compositeOperation;\r\n\t\tthis.matrix = matrix || (this.matrix&&this.matrix.identity()) || new createjs.Matrix2D();\r\n\t\treturn this;\r\n\t};\r\n\r\n// public methods:\r\n\t/**\r\n\t * Appends the specified display properties. This is generally used to apply a child's properties its parent's.\r\n\t * @method append\r\n\t * @param {Boolean} visible desired visible value\r\n\t * @param {Number} alpha desired alpha value\r\n\t * @param {Shadow} shadow desired shadow value\r\n\t * @param {String} compositeOperation desired composite operation value\r\n\t * @param {Matrix2D} [matrix] a Matrix2D instance\r\n\t * @return {DisplayProps} This instance. Useful for chaining method calls.\r\n\t * @chainable\r\n\t*/\r\n\tp.append = function(visible, alpha, shadow, compositeOperation, matrix) {\r\n\t\tthis.alpha *= alpha;\r\n\t\tthis.shadow = shadow || this.shadow;\r\n\t\tthis.compositeOperation = compositeOperation || this.compositeOperation;\r\n\t\tthis.visible = this.visible && visible;\r\n\t\tmatrix&&this.matrix.appendMatrix(matrix);\r\n\t\treturn this;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Prepends the specified display properties. This is generally used to apply a parent's properties to a child's.\r\n\t * For example, to get the combined display properties that would be applied to a child, you could use:\r\n\t * \r\n\t * \tvar o = myDisplayObject;\r\n\t * \tvar props = new createjs.DisplayProps();\r\n\t * \tdo {\r\n\t * \t\t// prepend each parent's props in turn:\r\n\t * \t\tprops.prepend(o.visible, o.alpha, o.shadow, o.compositeOperation, o.getMatrix());\r\n\t * \t} while (o = o.parent);\r\n\t * \t\r\n\t * @method prepend\r\n\t * @param {Boolean} visible desired visible value\r\n\t * @param {Number} alpha desired alpha value\r\n\t * @param {Shadow} shadow desired shadow value\r\n\t * @param {String} compositeOperation desired composite operation value\r\n\t * @param {Matrix2D} [matrix] a Matrix2D instance\r\n\t * @return {DisplayProps} This instance. Useful for chaining method calls.\r\n\t * @chainable\r\n\t*/\r\n\tp.prepend = function(visible, alpha, shadow, compositeOperation, matrix) {\r\n\t\tthis.alpha *= alpha;\r\n\t\tthis.shadow = this.shadow || shadow;\r\n\t\tthis.compositeOperation = this.compositeOperation || compositeOperation;\r\n\t\tthis.visible = this.visible && visible;\r\n\t\tmatrix&&this.matrix.prependMatrix(matrix);\r\n\t\treturn this;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Resets this instance and its matrix to default values.\r\n\t * @method identity\r\n\t * @return {DisplayProps} This instance. Useful for chaining method calls.\r\n\t * @chainable\r\n\t*/\r\n\tp.identity = function() {\r\n\t\tthis.visible = true;\r\n\t\tthis.alpha = 1;\r\n\t\tthis.shadow = this.compositeOperation = null;\r\n\t\tthis.matrix.identity();\r\n\t\treturn this;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Returns a clone of the DisplayProps instance. Clones the associated matrix.\r\n\t * @method clone\r\n\t * @return {DisplayProps} a clone of the DisplayProps instance.\r\n\t **/\r\n\tp.clone = function() {\r\n\t\treturn new DisplayProps(this.alpha, this.shadow, this.compositeOperation, this.visible, this.matrix.clone());\r\n\t};\r\n\r\n// private methods:\r\n\r\n\tcreatejs.DisplayProps = DisplayProps;\r\n})();\r\n\r\n//##############################################################################\r\n// Point.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * Represents a point on a 2 dimensional x / y coordinate system.\r\n\t *\r\n\t *

Example

\r\n\t * \r\n\t * var point = new createjs.Point(0, 100);\r\n\t * \r\n\t * @class Point\r\n\t * @param {Number} [x=0] X position.\r\n\t * @param {Number} [y=0] Y position.\r\n\t * @constructor\r\n\t **/\r\n\tfunction Point(x, y) {\r\n\t \tthis.setValues(x, y);\r\n\t \t\r\n\t \t\r\n\t// public properties:\r\n\t\t// assigned in the setValues method.\r\n\t\t/**\r\n\t\t * X position.\r\n\t\t * @property x\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\r\n\t\t/**\r\n\t\t * Y position.\r\n\t\t * @property y\r\n\t\t * @type Number\r\n\t\t **/\r\n\t}\r\n\tvar p = Point.prototype;\r\n\t\r\n// public methods:\r\n\t/** \r\n\t * Sets the specified values on this instance.\r\n\t * @method setValues\r\n\t * @param {Number} [x=0] X position.\r\n\t * @param {Number} [y=0] Y position.\r\n\t * @return {Point} This instance. Useful for chaining method calls.\r\n\t * @chainable\r\n\t*/\r\n\tp.setValues = function(x, y) {\r\n\t\tthis.x = x||0;\r\n\t\tthis.y = y||0;\r\n\t\treturn this;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Copies all properties from the specified point to this point.\r\n\t * @method copy\r\n\t * @param {Point} point The point to copy properties from.\r\n\t * @return {Point} This point. Useful for chaining method calls.\r\n\t * @chainable\r\n\t*/\r\n\tp.copy = function(point) {\r\n\t\tthis.x = point.x;\r\n\t\tthis.y = point.y;\r\n\t\treturn this;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Returns a clone of the Point instance.\r\n\t * @method clone\r\n\t * @return {Point} a clone of the Point instance.\r\n\t **/\r\n\tp.clone = function() {\r\n\t\treturn new Point(this.x, this.y);\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a string representation of this object.\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t **/\r\n\tp.toString = function() {\r\n\t\treturn \"[Point (x=\"+this.x+\" y=\"+this.y+\")]\";\r\n\t};\r\n\t\r\n\t\r\n\tcreatejs.Point = Point;\r\n}());\r\n\r\n//##############################################################################\r\n// Rectangle.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * Represents a rectangle as defined by the points (x, y) and (x+width, y+height).\r\n\t *\r\n\t *

Example

\r\n\t *\r\n\t * var rect = new createjs.Rectangle(0, 0, 100, 100);\r\n\t *\r\n\t * @class Rectangle\r\n\t * @param {Number} [x=0] X position.\r\n\t * @param {Number} [y=0] Y position.\r\n\t * @param {Number} [width=0] The width of the Rectangle.\r\n\t * @param {Number} [height=0] The height of the Rectangle.\r\n\t * @constructor\r\n\t **/\r\n\tfunction Rectangle(x, y, width, height) {\r\n\t\tthis.setValues(x, y, width, height);\r\n\t\t\r\n\t\t\r\n\t// public properties:\r\n\t\t// assigned in the setValues method.\r\n\t\t/**\r\n\t\t * X position.\r\n\t\t * @property x\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\r\n\t\t/**\r\n\t\t * Y position.\r\n\t\t * @property y\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\r\n\t\t/**\r\n\t\t * Width.\r\n\t\t * @property width\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\r\n\t\t/**\r\n\t\t * Height.\r\n\t\t * @property height\r\n\t\t * @type Number\r\n\t\t **/\r\n\t}\r\n\tvar p = Rectangle.prototype;\r\n\r\n// public methods:\r\n\t/** \r\n\t * Sets the specified values on this instance.\r\n\t * @method setValues\r\n\t * @param {Number} [x=0] X position.\r\n\t * @param {Number} [y=0] Y position.\r\n\t * @param {Number} [width=0] The width of the Rectangle.\r\n\t * @param {Number} [height=0] The height of the Rectangle.\r\n\t * @return {Rectangle} This instance. Useful for chaining method calls.\r\n\t * @chainable\r\n\t*/\r\n\tp.setValues = function(x, y, width, height) {\r\n\t\t// don't forget to update docs in the constructor if these change:\r\n\t\tthis.x = x||0;\r\n\t\tthis.y = y||0;\r\n\t\tthis.width = width||0;\r\n\t\tthis.height = height||0;\r\n\t\treturn this;\r\n\t};\r\n\t\r\n\t/** \r\n\t * Extends the rectangle's bounds to include the described point or rectangle.\r\n\t * @method extend\r\n\t * @param {Number} x X position of the point or rectangle.\r\n\t * @param {Number} y Y position of the point or rectangle.\r\n\t * @param {Number} [width=0] The width of the rectangle.\r\n\t * @param {Number} [height=0] The height of the rectangle.\r\n\t * @return {Rectangle} This instance. Useful for chaining method calls.\r\n\t * @chainable\r\n\t*/\r\n\tp.extend = function(x, y, width, height) {\r\n\t\twidth = width||0;\r\n\t\theight = height||0;\r\n\t\tif (x+width > this.x+this.width) { this.width = x+width-this.x; }\r\n\t\tif (y+height > this.y+this.height) { this.height = y+height-this.y; }\r\n\t\tif (x < this.x) { this.width += this.x-x; this.x = x; }\r\n\t\tif (y < this.y) { this.height += this.y-y; this.y = y; }\r\n\t\treturn this;\r\n\t};\r\n\t\r\n\t/** \r\n\t * Adds the specified padding to the rectangle's bounds.\r\n\t * @method pad\r\n\t * @param {Number} top\r\n\t * @param {Number} left\r\n\t * @param {Number} bottom\r\n\t * @param {Number} right\r\n\t * @return {Rectangle} This instance. Useful for chaining method calls.\r\n\t * @chainable\r\n\t*/\r\n\tp.pad = function(top, left, bottom, right) {\r\n\t\tthis.x -= left;\r\n\t\tthis.y -= top;\r\n\t\tthis.width += left+right;\r\n\t\tthis.height += top+bottom;\r\n\t\treturn this;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Copies all properties from the specified rectangle to this rectangle.\r\n\t * @method copy\r\n\t * @param {Rectangle} rectangle The rectangle to copy properties from.\r\n\t * @return {Rectangle} This rectangle. Useful for chaining method calls.\r\n\t * @chainable\r\n\t*/\r\n\tp.copy = function(rectangle) {\r\n\t\treturn this.setValues(rectangle.x, rectangle.y, rectangle.width, rectangle.height);\r\n\t};\r\n\t\r\n\t/** \r\n\t * Returns true if this rectangle fully encloses the described point or rectangle.\r\n\t * @method contains\r\n\t * @param {Number} x X position of the point or rectangle.\r\n\t * @param {Number} y Y position of the point or rectangle.\r\n\t * @param {Number} [width=0] The width of the rectangle.\r\n\t * @param {Number} [height=0] The height of the rectangle.\r\n\t * @return {Boolean} True if the described point or rectangle is contained within this rectangle.\r\n\t*/\r\n\tp.contains = function(x, y, width, height) {\r\n\t\twidth = width||0;\r\n\t\theight = height||0;\r\n\t\treturn (x >= this.x && x+width <= this.x+this.width && y >= this.y && y+height <= this.y+this.height);\r\n\t};\r\n\t\r\n\t/** \r\n\t * Returns a new rectangle which contains this rectangle and the specified rectangle.\r\n\t * @method union\r\n\t * @param {Rectangle} rect The rectangle to calculate a union with.\r\n\t * @return {Rectangle} A new rectangle describing the union.\r\n\t*/\r\n\tp.union = function(rect) {\r\n\t\treturn this.clone().extend(rect.x, rect.y, rect.width, rect.height);\r\n\t};\r\n\t\r\n\t/** \r\n\t * Returns a new rectangle which describes the intersection (overlap) of this rectangle and the specified rectangle,\r\n\t * or null if they do not intersect.\r\n\t * @method intersection\r\n\t * @param {Rectangle} rect The rectangle to calculate an intersection with.\r\n\t * @return {Rectangle} A new rectangle describing the intersection or null.\r\n\t*/\r\n\tp.intersection = function(rect) {\r\n\t\tvar x1 = rect.x, y1 = rect.y, x2 = x1+rect.width, y2 = y1+rect.height;\r\n\t\tif (this.x > x1) { x1 = this.x; }\r\n\t\tif (this.y > y1) { y1 = this.y; }\r\n\t\tif (this.x + this.width < x2) { x2 = this.x + this.width; }\r\n\t\tif (this.y + this.height < y2) { y2 = this.y + this.height; }\r\n\t\treturn (x2 <= x1 || y2 <= y1) ? null : new Rectangle(x1, y1, x2-x1, y2-y1);\r\n\t};\r\n\t\r\n\t/** \r\n\t * Returns true if the specified rectangle intersects (has any overlap) with this rectangle.\r\n\t * @method intersects\r\n\t * @param {Rectangle} rect The rectangle to compare.\r\n\t * @return {Boolean} True if the rectangles intersect.\r\n\t*/\r\n\tp.intersects = function(rect) {\r\n\t\treturn (rect.x <= this.x+this.width && this.x <= rect.x+rect.width && rect.y <= this.y+this.height && this.y <= rect.y + rect.height);\r\n\t};\r\n\t\r\n\t/** \r\n\t * Returns true if the width or height are equal or less than 0.\r\n\t * @method isEmpty\r\n\t * @return {Boolean} True if the rectangle is empty.\r\n\t*/\r\n\tp.isEmpty = function() {\r\n\t\treturn this.width <= 0 || this.height <= 0;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Returns a clone of the Rectangle instance.\r\n\t * @method clone\r\n\t * @return {Rectangle} a clone of the Rectangle instance.\r\n\t **/\r\n\tp.clone = function() {\r\n\t\treturn new Rectangle(this.x, this.y, this.width, this.height);\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a string representation of this object.\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t **/\r\n\tp.toString = function() {\r\n\t\treturn \"[Rectangle (x=\"+this.x+\" y=\"+this.y+\" width=\"+this.width+\" height=\"+this.height+\")]\";\r\n\t};\r\n\t\r\n\t\r\n\tcreatejs.Rectangle = Rectangle;\r\n}());\r\n\r\n//##############################################################################\r\n// ButtonHelper.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * The ButtonHelper is a helper class to create interactive buttons from {{#crossLink \"MovieClip\"}}{{/crossLink}} or\r\n\t * {{#crossLink \"Sprite\"}}{{/crossLink}} instances. This class will intercept mouse events from an object, and\r\n\t * automatically call {{#crossLink \"Sprite/gotoAndStop\"}}{{/crossLink}} or {{#crossLink \"Sprite/gotoAndPlay\"}}{{/crossLink}},\r\n\t * to the respective animation labels, add a pointer cursor, and allows the user to define a hit state frame.\r\n\t *\r\n\t * The ButtonHelper instance does not need to be added to the stage, but a reference should be maintained to prevent\r\n\t * garbage collection.\r\n\t * \r\n\t * Note that over states will not work unless you call {{#crossLink \"Stage/enableMouseOver\"}}{{/crossLink}}.\r\n\t *\r\n\t *

Example

\r\n\t *\r\n\t * var helper = new createjs.ButtonHelper(myInstance, \"out\", \"over\", \"down\", false, myInstance, \"hit\");\r\n\t * myInstance.addEventListener(\"click\", handleClick);\r\n\t * function handleClick(event) {\r\n\t * // Click Happened.\r\n\t * }\r\n\t *\r\n\t * @class ButtonHelper\r\n\t * @param {Sprite|MovieClip} target The instance to manage.\r\n\t * @param {String} [outLabel=\"out\"] The label or animation to go to when the user rolls out of the button.\r\n\t * @param {String} [overLabel=\"over\"] The label or animation to go to when the user rolls over the button.\r\n\t * @param {String} [downLabel=\"down\"] The label or animation to go to when the user presses the button.\r\n\t * @param {Boolean} [play=false] If the helper should call \"gotoAndPlay\" or \"gotoAndStop\" on the button when changing\r\n\t * states.\r\n\t * @param {DisplayObject} [hitArea] An optional item to use as the hit state for the button. If this is not defined,\r\n\t * then the button's visible states will be used instead. Note that the same instance as the \"target\" argument can be\r\n\t * used for the hitState.\r\n\t * @param {String} [hitLabel] The label or animation on the hitArea instance that defines the hitArea bounds. If this is\r\n\t * null, then the default state of the hitArea will be used. *\r\n\t * @constructor\r\n\t */\r\n\tfunction ButtonHelper(target, outLabel, overLabel, downLabel, play, hitArea, hitLabel) {\r\n\t\tif (!target.addEventListener) { return; }\r\n\t\r\n\t\r\n\t// public properties:\r\n\t\t/**\r\n\t\t * The target for this button helper.\r\n\t\t * @property target\r\n\t\t * @type MovieClip | Sprite\r\n\t\t * @readonly\r\n\t\t **/\r\n\t\tthis.target = target;\r\n\t\r\n\t\t/**\r\n\t\t * The label name or frame number to display when the user mouses out of the target. Defaults to \"over\".\r\n\t\t * @property overLabel\r\n\t\t * @type String | Number\r\n\t\t **/\r\n\t\tthis.overLabel = overLabel == null ? \"over\" : overLabel;\r\n\t\r\n\t\t/**\r\n\t\t * The label name or frame number to display when the user mouses over the target. Defaults to \"out\".\r\n\t\t * @property outLabel\r\n\t\t * @type String | Number\r\n\t\t **/\r\n\t\tthis.outLabel = outLabel == null ? \"out\" : outLabel;\r\n\t\r\n\t\t/**\r\n\t\t * The label name or frame number to display when the user presses on the target. Defaults to \"down\".\r\n\t\t * @property downLabel\r\n\t\t * @type String | Number\r\n\t\t **/\r\n\t\tthis.downLabel = downLabel == null ? \"down\" : downLabel;\r\n\t\r\n\t\t/**\r\n\t\t * If true, then ButtonHelper will call gotoAndPlay, if false, it will use gotoAndStop. Default is false.\r\n\t\t * @property play\r\n\t\t * @default false\r\n\t\t * @type Boolean\r\n\t\t **/\r\n\t\tthis.play = play;\r\n\t\t\r\n\t\t\r\n\t// private properties\r\n\t\t/**\r\n\t\t * @property _isPressed\r\n\t\t * @type Boolean\r\n\t\t * @protected\r\n\t\t **/\r\n\t\tthis._isPressed = false;\r\n\t\r\n\t\t/**\r\n\t\t * @property _isOver\r\n\t\t * @type Boolean\r\n\t\t * @protected\r\n\t\t **/\r\n\t\tthis._isOver = false;\r\n\t\r\n\t\t/**\r\n\t\t * @property _enabled\r\n\t\t * @type Boolean\r\n\t\t * @protected\r\n\t\t **/\r\n\t\tthis._enabled = false;\r\n\t\t\r\n\t// setup:\r\n\t\ttarget.mouseChildren = false; // prevents issues when children are removed from the display list when state changes.\r\n\t\tthis.enabled = true;\r\n\t\tthis.handleEvent({});\r\n\t\tif (hitArea) {\r\n\t\t\tif (hitLabel) {\r\n\t\t\t\thitArea.actionsEnabled = false;\r\n\t\t\t\thitArea.gotoAndStop&&hitArea.gotoAndStop(hitLabel);\r\n\t\t\t}\r\n\t\t\ttarget.hitArea = hitArea;\r\n\t\t}\r\n\t}\r\n\tvar p = ButtonHelper.prototype;\r\n\t\r\n// getter / setters:\r\n\t/**\r\n\t * Use the {{#crossLink \"ButtonHelper/enabled:property\"}}{{/crossLink}} property instead.\r\n\t * @method setEnabled\r\n\t * @param {Boolean} value The enabled property to set the instance to.\r\n\t * @[rptected\r\n\t * @protected\r\n\t **/\r\n\tp._setEnabled = function(value) {\r\n\t\tif (value == this._enabled) { return; }\r\n\t\tvar o = this.target;\r\n\t\tthis._enabled = value;\r\n\t\tif (value) {\r\n\t\t\to.cursor = \"pointer\";\r\n\t\t\to.addEventListener(\"rollover\", this);\r\n\t\t\to.addEventListener(\"rollout\", this);\r\n\t\t\to.addEventListener(\"mousedown\", this);\r\n\t\t\to.addEventListener(\"pressup\", this);\r\n\t\t\tif (o._reset) { o.__reset = o._reset; o._reset = this._reset;}\r\n\t\t} else {\r\n\t\t\to.cursor = null;\r\n\t\t\to.removeEventListener(\"rollover\", this);\r\n\t\t\to.removeEventListener(\"rollout\", this);\r\n\t\t\to.removeEventListener(\"mousedown\", this);\r\n\t\t\to.removeEventListener(\"pressup\", this);\r\n\t\t\tif (o.__reset) { o._reset = o.__reset; delete(o.__reset); }\r\n\t\t}\r\n\t};\r\n\t// ButtonHelper.setEnabled is @deprecated. Remove for 1.1+\r\n\tp.setEnabled = createjs.deprecate(p._setEnabled, \"ButtonHelper.setEnabled\");\r\n\r\n\t/**\r\n\t * Use the {{#crossLink \"ButtonHelper/enabled:property\"}}{{/crossLink}} property instead.\r\n\t * @method getEnabled\r\n\t * @protected\r\n\t * @return {Boolean}\r\n\t **/\r\n\tp._getEnabled = function() {\r\n\t\treturn this._enabled;\r\n\t};\r\n\t// ButtonHelper.getEnabled is @deprecated. Remove for 1.1+\r\n\tp.getEnabled = createjs.deprecate(p._getEnabled, \"ButtonHelper.getEnabled\");\r\n\r\n\t/**\r\n\t * Enables or disables the button functionality on the target.\r\n\t * @property enabled\r\n\t * @type {Boolean}\r\n\t **/\r\n\ttry {\r\n\t\tObject.defineProperties(p, {\r\n\t\t\tenabled: { get: p._getEnabled, set: p._setEnabled }\r\n\t\t});\r\n\t} catch (e) {} // TODO: use Log\r\n\r\n\r\n// public methods:\r\n\t/**\r\n\t * Returns a string representation of this object.\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t **/\r\n\tp.toString = function() {\r\n\t\treturn \"[ButtonHelper]\";\r\n\t};\r\n\r\n\r\n// private methods:\r\n\t/**\r\n\t * @method handleEvent\r\n\t * @param {Object} evt The mouse event to handle.\r\n\t * @protected\r\n\t **/\r\n\tp.handleEvent = function(evt) {\r\n\t\tvar label, t = this.target, type = evt.type;\r\n\t\tif (type == \"mousedown\") {\r\n\t\t\tthis._isPressed = true;\r\n\t\t\tlabel = this.downLabel;\r\n\t\t} else if (type == \"pressup\") {\r\n\t\t\tthis._isPressed = false;\r\n\t\t\tlabel = this._isOver ? this.overLabel : this.outLabel;\r\n\t\t} else if (type == \"rollover\") {\r\n\t\t\tthis._isOver = true;\r\n\t\t\tlabel = this._isPressed ? this.downLabel : this.overLabel;\r\n\t\t} else { // rollout and default\r\n\t\t\tthis._isOver = false;\r\n\t\t\tlabel = this._isPressed ? this.overLabel : this.outLabel;\r\n\t\t}\r\n\t\tif (this.play) {\r\n\t\t\tt.gotoAndPlay&&t.gotoAndPlay(label);\r\n\t\t} else {\r\n\t\t\tt.gotoAndStop&&t.gotoAndStop(label);\r\n\t\t}\r\n\t};\r\n\t\r\n\t/**\r\n\t * Injected into target. Preserves the paused state through a reset.\r\n\t * @method _reset\r\n\t * @protected\r\n\t **/\r\n\tp._reset = function() {\r\n\t\t// TODO: explore better ways to handle this issue. This is hacky & disrupts object signatures.\r\n\t\tvar p = this.paused;\r\n\t\tthis.__reset();\r\n\t\tthis.paused = p;\r\n\t};\r\n\r\n\r\n\tcreatejs.ButtonHelper = ButtonHelper;\r\n}());\r\n\r\n//##############################################################################\r\n// Shadow.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * This class encapsulates the properties required to define a shadow to apply to a {{#crossLink \"DisplayObject\"}}{{/crossLink}}\r\n\t * via its shadow property.\r\n\t *\r\n\t *

Example

\r\n\t *\r\n\t * myImage.shadow = new createjs.Shadow(\"#000000\", 5, 5, 10);\r\n\t *\r\n\t * @class Shadow\r\n\t * @constructor\r\n\t * @param {String} color The color of the shadow. This can be any valid CSS color value.\r\n\t * @param {Number} offsetX The x offset of the shadow in pixels.\r\n\t * @param {Number} offsetY The y offset of the shadow in pixels.\r\n\t * @param {Number} blur The size of the blurring effect.\r\n\t **/\r\n\tfunction Shadow(color, offsetX, offsetY, blur) {\r\n\t\t\r\n\t\t\r\n\t// public properties:\r\n\t\t/** \r\n\t\t * The color of the shadow. This can be any valid CSS color value.\r\n\t\t * @property color\r\n\t\t * @type String\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.color = color||\"black\";\r\n\t\r\n\t\t/** The x offset of the shadow.\r\n\t\t * @property offsetX\r\n\t\t * @type Number\r\n\t\t * @default 0\r\n\t\t */\r\n\t\tthis.offsetX = offsetX||0;\r\n\t\r\n\t\t/** The y offset of the shadow.\r\n\t\t * @property offsetY\r\n\t\t * @type Number\r\n\t\t * @default 0\r\n\t\t */\r\n\t\tthis.offsetY = offsetY||0;\r\n\t\r\n\t\t/** The blur of the shadow.\r\n\t\t * @property blur\r\n\t\t * @type Number\r\n\t\t * @default 0\r\n\t\t */\r\n\t\tthis.blur = blur||0;\r\n\t}\r\n\tvar p = Shadow.prototype;\r\n\r\n// static public properties:\r\n\t/**\r\n\t * An identity shadow object (all properties are set to 0).\r\n\t * @property identity\r\n\t * @type Shadow\r\n\t * @static\r\n\t * @final\r\n\t * @readonly\r\n\t **/\r\n\tShadow.identity = new Shadow(\"transparent\", 0, 0, 0);\r\n\r\n\r\n// public methods:\r\n\t/**\r\n\t * Returns a string representation of this object.\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t **/\r\n\tp.toString = function() {\r\n\t\treturn \"[Shadow]\";\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a clone of this Shadow instance.\r\n\t * @method clone\r\n\t * @return {Shadow} A clone of the current Shadow instance.\r\n\t **/\r\n\tp.clone = function() {\r\n\t\treturn new Shadow(this.color, this.offsetX, this.offsetY, this.blur);\r\n\t};\r\n\t\r\n\r\n\tcreatejs.Shadow = Shadow;\r\n}());\r\n\r\n//##############################################################################\r\n// SpriteSheet.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * Encapsulates the properties and methods associated with a sprite sheet. A sprite sheet is a series of images (usually\r\n\t * animation frames) combined into a larger image (or images). For example, an animation consisting of eight 100x100\r\n\t * images could be combined into a single 400x200 sprite sheet (4 frames across by 2 high).\r\n\t *\r\n\t * The data passed to the SpriteSheet constructor defines:\r\n\t *
    \r\n\t * \t
  1. The source image or images to use.
  2. \r\n\t * \t
  3. The positions of individual image frames.
  4. \r\n\t * \t
  5. Sequences of frames that form named animations. Optional.
  6. \r\n\t * \t
  7. The target playback framerate. Optional.
  8. \r\n\t *
\r\n\t *

SpriteSheet Format

\r\n\t * SpriteSheets are an object with two required properties (`images` and `frames`), and two optional properties\r\n\t * (`framerate` and `animations`). This makes them easy to define in javascript code, or in JSON.\r\n\t *\r\n\t *

images

\r\n\t * An array of source images. Images can be either an HTMlimage\r\n\t * instance, or a uri to an image. The former is recommended to control preloading.\r\n\t *\r\n\t * \timages: [image1, \"path/to/image2.png\"],\r\n\t *\r\n\t *

frames

\r\n\t * Defines the individual frames. There are two supported formats for frame data:\r\n\t * When all of the frames are the same size (in a grid), use an object with `width`, `height`, `regX`, `regY`,\r\n\t * and `count` properties.\r\n\t *\r\n\t *
    \r\n\t *
  • `width` & `height` are required and specify the dimensions of the frames
  • \r\n\t *
  • `regX` & `regY` indicate the registration point or \"origin\" of the frames
  • \r\n\t *
  • `spacing` indicate the spacing between frames
  • \r\n\t *
  • `margin` specify the margin around the image(s)
  • \r\n\t *
  • `count` allows you to specify the total number of frames in the spritesheet; if omitted, this will\r\n\t * be calculated based on the dimensions of the source images and the frames. Frames will be assigned\r\n\t * indexes based on their position in the source images (left to right, top to bottom).
  • \r\n\t *
\r\n\t *\r\n\t * \tframes: {width:64, height:64, count:20, regX: 32, regY:64, spacing:0, margin:0}\r\n\t *\r\n\t * If the frames are of different sizes, use an array of frame definitions. Each definition is itself an array\r\n\t * with 4 required and 3 optional entries, in the order:\r\n\t *\r\n\t *
    \r\n\t *
  • The first four, `x`, `y`, `width`, and `height` are required and define the frame rectangle.
  • \r\n\t *
  • The fifth, `imageIndex`, specifies the index of the source image (defaults to 0)
  • \r\n\t *
  • The last two, `regX` and `regY` specify the registration point of the frame
  • \r\n\t *
\r\n\t *\r\n\t * \tframes: [\r\n\t * \t\t// x, y, width, height, imageIndex*, regX*, regY*\r\n\t * \t\t[64, 0, 96, 64],\r\n\t * \t\t[0, 0, 64, 64, 1, 32, 32]\r\n\t * \t\t// etc.\r\n\t * \t]\r\n\t *\r\n\t *

animations

\r\n\t * Optional. An object defining sequences of frames to play as named animations. Each property corresponds to an\r\n\t * animation of the same name. Each animation must specify the frames to play, and may\r\n\t * also include a relative playback `speed` (ex. 2 would playback at double speed, 0.5 at half), and\r\n\t * the name of the `next` animation to sequence to after it completes.\r\n\t *\r\n\t * There are three formats supported for defining the frames in an animation, which can be mixed and matched as appropriate:\r\n\t *
    \r\n\t * \t
  1. for a single frame animation, you can simply specify the frame index\r\n\t *\r\n\t * \t\tanimations: {\r\n\t * \t\t\tsit: 7\r\n\t * \t\t}\r\n\t *\r\n\t *
  2. \r\n\t *
  3. \r\n\t * for an animation of consecutive frames, you can use an array with two required, and two optional entries\r\n\t * \t\tin the order: `start`, `end`, `next`, and `speed`. This will play the frames from start to end inclusive.\r\n\t *\r\n\t * \t\tanimations: {\r\n\t * \t\t\t// start, end, next*, speed*\r\n\t * \t\t\trun: [0, 8],\r\n\t * \t\t\tjump: [9, 12, \"run\", 2]\r\n\t * \t\t}\r\n\t *\r\n\t *
  4. \r\n\t *
  5. \r\n\t * for non-consecutive frames, you can use an object with a `frames` property defining an array of frame\r\n\t * indexes to play in order. The object can also specify `next` and `speed` properties.\r\n\t *\r\n\t * \t\tanimations: {\r\n\t * \t\t\twalk: {\r\n\t * \t\t\t\tframes: [1,2,3,3,2,1]\r\n\t * \t\t\t},\r\n\t * \t\t\tshoot: {\r\n\t * \t\t\t\tframes: [1,4,5,6],\r\n\t * \t\t\t\tnext: \"walk\",\r\n\t * \t\t\t\tspeed: 0.5\r\n\t * \t\t\t}\r\n\t * \t\t}\r\n\t *\r\n\t *
  6. \r\n\t *
\r\n\t * Note: the `speed` property was added in EaselJS 0.7.0. Earlier versions had a `frequency`\r\n\t * property instead, which was the inverse of `speed`. For example, a value of \"4\" would be 1/4 normal speed in\r\n\t * earlier versions, but is 4x normal speed in EaselJS 0.7.0+.\r\n\t *\r\n\t *

framerate

\r\n\t * Optional. Indicates the default framerate to play this spritesheet at in frames per second. See\r\n\t * {{#crossLink \"SpriteSheet/framerate:property\"}}{{/crossLink}} for more information.\r\n\t *\r\n\t * \t\tframerate: 20\r\n\t *\r\n\t * Note that the Sprite framerate will only work if the stage update method is provided with the {{#crossLink \"Ticker/tick:event\"}}{{/crossLink}}\r\n\t * event generated by the {{#crossLink \"Ticker\"}}{{/crossLink}}.\r\n\t *\r\n\t * \t\tcreatejs.Ticker.on(\"tick\", handleTick);\r\n\t * \t\tfunction handleTick(event) {\r\n\t *\t\t\tstage.update(event);\r\n\t *\t\t}\r\n\t *\r\n\t *

Example

\r\n\t * To define a simple sprite sheet, with a single image \"sprites.jpg\" arranged in a regular 50x50 grid with three\r\n\t * animations: \"stand\" showing the first frame, \"run\" looping frame 1-5 inclusive, and \"jump\" playing frame 6-8 and\r\n\t * sequencing back to run.\r\n\t *\r\n\t * \t\tvar data = {\r\n\t * \t\t\timages: [\"sprites.jpg\"],\r\n\t * \t\t\tframes: {width:50, height:50},\r\n\t * \t\t\tanimations: {\r\n\t * \t\t\t\tstand:0,\r\n\t * \t\t\t\trun:[1,5],\r\n\t * \t\t\t\tjump:[6,8,\"run\"]\r\n\t * \t\t\t}\r\n\t * \t\t};\r\n\t * \t\tvar spriteSheet = new createjs.SpriteSheet(data);\r\n\t * \t\tvar animation = new createjs.Sprite(spriteSheet, \"run\");\r\n\t *\r\n\t *

Generating SpriteSheet Images

\r\n\t * Spritesheets can be created manually by combining images in PhotoShop, and specifying the frame size or\r\n\t * coordinates manually, however there are a number of tools that facilitate this.\r\n\t *
    \r\n\t *
  • Exporting SpriteSheets or HTML5 content from Adobe Flash/Animate supports the EaselJS SpriteSheet format.
  • \r\n\t *
  • The popular Texture Packer has\r\n\t * EaselJS support.\r\n\t *
  • SWF animations in Adobe Flash/Animate can be exported to SpriteSheets using Zoë
  • \r\n\t *
\r\n\t *\r\n\t *

Cross Origin Issues

\r\n\t * Warning: Images loaded cross-origin will throw cross-origin security errors when interacted with\r\n\t * using:\r\n\t *
    \r\n\t *
  • a mouse
  • \r\n\t *
  • methods such as {{#crossLink \"Container/getObjectUnderPoint\"}}{{/crossLink}}
  • \r\n\t *
  • Filters (see {{#crossLink \"Filter\"}}{{/crossLink}})
  • \r\n\t *
  • caching (see {{#crossLink \"DisplayObject/cache\"}}{{/crossLink}})
  • \r\n\t *
\r\n\t * You can get around this by setting `crossOrigin` property on your images before passing them to EaselJS, or\r\n\t * setting the `crossOrigin` property on PreloadJS' LoadQueue or LoadItems.\r\n\t *\r\n\t * \t\tvar image = new Image();\r\n\t * \t\timg.crossOrigin=\"Anonymous\";\r\n\t * \t\timg.src = \"http://server-with-CORS-support.com/path/to/image.jpg\";\r\n\t *\r\n\t * If you pass string paths to SpriteSheets, they will not work cross-origin. The server that stores the image must\r\n\t * support cross-origin requests, or this will not work. For more information, check out\r\n\t * CORS overview on MDN.\r\n\t *\r\n\t * @class SpriteSheet\r\n\t * @constructor\r\n\t * @param {Object} data An object describing the SpriteSheet data.\r\n\t * @extends EventDispatcher\r\n\t **/\r\n\tfunction SpriteSheet(data) {\r\n\t\tthis.EventDispatcher_constructor();\r\n\r\n\r\n\t\t// public properties:\r\n\t\t/**\r\n\t\t * Indicates whether all images are finished loading.\r\n\t\t * @property complete\r\n\t\t * @type Boolean\r\n\t\t * @readonly\r\n\t\t **/\r\n\t\tthis.complete = true;\r\n\r\n\t\t/**\r\n\t\t * Specifies the framerate to use by default for Sprite instances using the SpriteSheet. See the Sprite class\r\n\t\t * {{#crossLink \"Sprite/framerate:property\"}}{{/crossLink}} for more information.\r\n\t\t * @property framerate\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis.framerate = 0;\r\n\r\n\r\n\t\t// private properties:\r\n\t\t/**\r\n\t\t * @property _animations\r\n\t\t * @protected\r\n\t\t * @type Array\r\n\t\t **/\r\n\t\tthis._animations = null;\r\n\r\n\t\t/**\r\n\t\t * @property _frames\r\n\t\t * @protected\r\n\t\t * @type Array\r\n\t\t **/\r\n\t\tthis._frames = null;\r\n\r\n\t\t/**\r\n\t\t * @property _images\r\n\t\t * @protected\r\n\t\t * @type Array\r\n\t\t **/\r\n\t\tthis._images = null;\r\n\r\n\t\t/**\r\n\t\t * @property _data\r\n\t\t * @protected\r\n\t\t * @type Object\r\n\t\t **/\r\n\t\tthis._data = null;\r\n\r\n\t\t/**\r\n\t\t * @property _loadCount\r\n\t\t * @protected\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis._loadCount = 0;\r\n\r\n\t\t// only used for simple frame defs:\r\n\t\t/**\r\n\t\t * @property _frameHeight\r\n\t\t * @protected\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis._frameHeight = 0;\r\n\r\n\t\t/**\r\n\t\t * @property _frameWidth\r\n\t\t * @protected\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis._frameWidth = 0;\r\n\r\n\t\t/**\r\n\t\t * @property _numFrames\r\n\t\t * @protected\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis._numFrames = 0;\r\n\r\n\t\t/**\r\n\t\t * @property _regX\r\n\t\t * @protected\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis._regX = 0;\r\n\r\n\t\t/**\r\n\t\t * @property _regY\r\n\t\t * @protected\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis._regY = 0;\r\n\r\n\t\t/**\r\n\t\t * @property _spacing\r\n\t\t * @protected\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis._spacing = 0;\r\n\r\n\t\t/**\r\n\t\t * @property _margin\r\n\t\t * @protected\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis._margin = 0;\r\n\r\n\t\t// setup:\r\n\t\tthis._parseData(data);\r\n\t}\r\n\tvar p = createjs.extend(SpriteSheet, createjs.EventDispatcher);\r\n\r\n\t// TODO: deprecated\r\n\t// p.initialize = function() {}; // searchable for devs wondering where it is. REMOVED. See docs for details.\r\n\r\n\r\n// events:\r\n\t/**\r\n\t * Dispatched when all images are loaded. Note that this only fires if the images\r\n\t * were not fully loaded when the sprite sheet was initialized. You should check the complete property\r\n\t * to prior to adding a listener. Ex.\r\n\t *\r\n\t * \tvar sheet = new createjs.SpriteSheet(data);\r\n\t * \tif (!sheet.complete) {\r\n\t * \t\t// not preloaded, listen for the complete event:\r\n\t * \t\tsheet.addEventListener(\"complete\", handler);\r\n\t * \t}\r\n\t *\r\n\t * @event complete\r\n\t * @param {Object} target The object that dispatched the event.\r\n\t * @param {String} type The event type.\r\n\t * @since 0.6.0\r\n\t */\r\n\r\n\t/**\r\n\t * Dispatched when getFrame is called with a valid frame index. This is primarily intended for use by {{#crossLink \"SpriteSheetBuilder\"}}{{/crossLink}}\r\n\t * when doing on-demand rendering.\r\n\t * @event getframe\r\n\t * @param {Number} index The frame index.\r\n\t * @param {Object} frame The frame object that getFrame will return.\r\n\t */\r\n\r\n\t/**\r\n\t * Dispatched when an image encounters an error. A SpriteSheet will dispatch an error event for each image that\r\n\t * encounters an error, and will still dispatch a {{#crossLink \"SpriteSheet/complete:event\"}}{{/crossLink}}\r\n\t * event once all images are finished processing, even if an error is encountered.\r\n\t * @event error\r\n\t * @param {String} src The source of the image that failed to load.\r\n\t * @since 0.8.2\r\n\t */\r\n\r\n\r\n// getter / setters:\r\n\t/**\r\n\t * Use the {{#crossLink \"SpriteSheet/animations:property\"}}{{/crossLink}} property instead.\r\n\t * @method _getAnimations\r\n\t * @protected\r\n\t * @return {Array}\r\n\t **/\r\n\tp._getAnimations = function() {\r\n\t\treturn this._animations.slice();\r\n\t};\r\n\t// SpriteSheet.getAnimations is @deprecated. Remove for 1.1+\r\n\tp.getAnimations = createjs.deprecate(p._getAnimations, \"SpriteSheet.getAnimations\");\r\n\r\n\t/**\r\n\t * Returns an array of all available animation names available on this sprite sheet as strings.\r\n\t * @property animations\r\n\t * @type {Array}\r\n\t * @readonly\r\n\t **/\r\n\ttry {\r\n\t\tObject.defineProperties(p, {\r\n\t\t\tanimations: { get: p._getAnimations }\r\n\t\t});\r\n\t} catch (e) {}\r\n\r\n\r\n// public methods:\r\n\t/**\r\n\t * Returns the total number of frames in the specified animation, or in the whole sprite\r\n\t * sheet if the animation param is omitted. Returns 0 if the spritesheet relies on calculated frame counts, and\r\n\t * the images have not been fully loaded.\r\n\t * @method getNumFrames\r\n\t * @param {String} animation The name of the animation to get a frame count for.\r\n\t * @return {Number} The number of frames in the animation, or in the entire sprite sheet if the animation param is omitted.\r\n\t */\r\n\tp.getNumFrames = function(animation) {\r\n\t\tif (animation == null) {\r\n\t\t\treturn this._frames ? this._frames.length : this._numFrames || 0;\r\n\t\t} else {\r\n\t\t\tvar data = this._data[animation];\r\n\t\t\tif (data == null) { return 0; }\r\n\t\t\telse { return data.frames.length; }\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Returns an object defining the specified animation. The returned object contains:
    \r\n\t * \t
  • frames: an array of the frame ids in the animation
  • \r\n\t * \t
  • speed: the playback speed for this animation
  • \r\n\t * \t
  • name: the name of the animation
  • \r\n\t * \t
  • next: the default animation to play next. If the animation loops, the name and next property will be the\r\n\t * \tsame.
  • \r\n\t *
\r\n\t * @method getAnimation\r\n\t * @param {String} name The name of the animation to get.\r\n\t * @return {Object} a generic object with frames, speed, name, and next properties.\r\n\t **/\r\n\tp.getAnimation = function(name) {\r\n\t\treturn this._data[name];\r\n\t};\r\n\r\n\t/**\r\n\t * Returns an object specifying the image and source rect of the specified frame. The returned object has:
    \r\n\t * \t
  • an image property holding a reference to the image object in which the frame is found
  • \r\n\t * \t
  • a rect property containing a Rectangle instance which defines the boundaries for the frame within that\r\n\t * \timage.
  • \r\n\t * \t
  • A regX and regY property corresponding to the regX/Y values for the frame.\r\n\t *
\r\n\t * @method getFrame\r\n\t * @param {Number} frameIndex The index of the frame.\r\n\t * @return {Object} a generic object with image and rect properties. Returns null if the frame does not exist.\r\n\t **/\r\n\tp.getFrame = function(frameIndex) {\r\n\t\tvar frame;\r\n\t\tif (this._frames && (frame=this._frames[frameIndex])) { return frame; }\r\n\t\treturn null;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a {{#crossLink \"Rectangle\"}}{{/crossLink}} instance defining the bounds of the specified frame relative\r\n\t * to the origin. For example, a 90 x 70 frame with a regX of 50 and a regY of 40 would return:\r\n\t *\r\n\t * \t[x=-50, y=-40, width=90, height=70]\r\n\t *\r\n\t * @method getFrameBounds\r\n\t * @param {Number} frameIndex The index of the frame.\r\n\t * @param {Rectangle} [rectangle] A Rectangle instance to copy the values into. By default a new instance is created.\r\n\t * @return {Rectangle} A Rectangle instance. Returns null if the frame does not exist, or the image is not fully loaded.\r\n\t **/\r\n\tp.getFrameBounds = function(frameIndex, rectangle) {\r\n\t\tvar frame = this.getFrame(frameIndex);\r\n\t\treturn frame ? (rectangle||new createjs.Rectangle()).setValues(-frame.regX, -frame.regY, frame.rect.width, frame.rect.height) : null;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a string representation of this object.\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t **/\r\n\tp.toString = function() {\r\n\t\treturn \"[SpriteSheet]\";\r\n\t};\r\n\r\n\t/**\r\n\t * SpriteSheet cannot be cloned. A SpriteSheet can be shared by multiple Sprite instances without cloning it.\r\n\t * @method clone\r\n\t **/\r\n\tp.clone = function() {\r\n\t\tthrow(\"SpriteSheet cannot be cloned.\")\r\n\t};\r\n\r\n// private methods:\r\n\t/**\r\n\t * @method _parseData\r\n\t * @param {Object} data An object describing the SpriteSheet data.\r\n\t * @protected\r\n\t **/\r\n\tp._parseData = function(data) {\r\n\t\tvar i,l,o,a;\r\n\t\tif (data == null) { return; }\r\n\r\n\t\tthis.framerate = data.framerate||0;\r\n\r\n\t\t// parse images:\r\n\t\tif (data.images && (l=data.images.length) > 0) {\r\n\t\t\ta = this._images = [];\r\n\t\t\tfor (i=0; i= maxFrames) { break imgLoop; }\r\n\t\t\t\t\tframeCount++;\r\n\t\t\t\t\tthis._frames.push({\r\n\t\t\t\t\t\t\timage: img,\r\n\t\t\t\t\t\t\trect: new createjs.Rectangle(x, y, frameWidth, frameHeight),\r\n\t\t\t\t\t\t\tregX: this._regX,\r\n\t\t\t\t\t\t\tregY: this._regY\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\tx += frameWidth+spacing;\r\n\t\t\t\t}\r\n\t\t\t\ty += frameHeight+spacing;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis._numFrames = frameCount;\r\n\t};\r\n\r\n\r\n\tcreatejs.SpriteSheet = createjs.promote(SpriteSheet, \"EventDispatcher\");\r\n}());\r\n\r\n//##############################################################################\r\n// Graphics.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * The Graphics class exposes an easy to use API for generating vector drawing instructions and drawing them to a\r\n\t * specified context. Note that you can use Graphics without any dependency on the EaselJS framework by calling {{#crossLink \"Graphics/draw\"}}{{/crossLink}}\r\n\t * directly, or it can be used with the {{#crossLink \"Shape\"}}{{/crossLink}} object to draw vector graphics within the\r\n\t * context of an EaselJS display list.\r\n\t *\r\n\t * There are two approaches to working with Graphics object: calling methods on a Graphics instance (the \"Graphics API\"), or\r\n\t * instantiating Graphics command objects and adding them to the graphics queue via {{#crossLink \"Graphics/append\"}}{{/crossLink}}.\r\n\t * The former abstracts the latter, simplifying beginning and ending paths, fills, and strokes.\r\n\t *\r\n\t * var g = new createjs.Graphics();\r\n\t * g.setStrokeStyle(1);\r\n\t * g.beginStroke(\"#000000\");\r\n\t * g.beginFill(\"red\");\r\n\t * g.drawCircle(0,0,30);\r\n\t *\r\n\t * All drawing methods in Graphics return the Graphics instance, so they can be chained together. For example,\r\n\t * the following line of code would generate the instructions to draw a rectangle with a red stroke and blue fill:\r\n\t *\r\n\t * myGraphics.beginStroke(\"red\").beginFill(\"blue\").drawRect(20, 20, 100, 50);\r\n\t *\r\n\t * Each graphics API call generates a command object (see below). The last command to be created can be accessed via\r\n\t * {{#crossLink \"Graphics/command:property\"}}{{/crossLink}}:\r\n\t *\r\n\t * var fillCommand = myGraphics.beginFill(\"red\").command;\r\n\t * // ... later, update the fill style/color:\r\n\t * fillCommand.style = \"blue\";\r\n\t * // or change it to a bitmap fill:\r\n\t * fillCommand.bitmap(myImage);\r\n\t *\r\n\t * For more direct control of rendering, you can instantiate and append command objects to the graphics queue directly. In this case, you\r\n\t * need to manage path creation manually, and ensure that fill/stroke is applied to a defined path:\r\n\t *\r\n\t * // start a new path. Graphics.beginCmd is a reusable BeginPath instance:\r\n\t * myGraphics.append(createjs.Graphics.beginCmd);\r\n\t * // we need to define the path before applying the fill:\r\n\t * var circle = new createjs.Graphics.Circle(0,0,30);\r\n\t * myGraphics.append(circle);\r\n\t * // fill the path we just defined:\r\n\t * var fill = new createjs.Graphics.Fill(\"red\");\r\n\t * myGraphics.append(fill);\r\n\t *\r\n\t * These approaches can be used together, for example to insert a custom command:\r\n\t *\r\n\t * myGraphics.beginFill(\"red\");\r\n\t * var customCommand = new CustomSpiralCommand(etc);\r\n\t * myGraphics.append(customCommand);\r\n\t * myGraphics.beginFill(\"blue\");\r\n\t * myGraphics.drawCircle(0, 0, 30);\r\n\t *\r\n\t * See {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more info on creating custom commands.\r\n\t *\r\n\t *

Tiny API

\r\n\t * The Graphics class also includes a \"tiny API\", which is one or two-letter methods that are shortcuts for all of the\r\n\t * Graphics methods. These methods are great for creating compact instructions, and is used by the Toolkit for CreateJS\r\n\t * to generate readable code. All tiny methods are marked as protected, so you can view them by enabling protected\r\n\t * descriptions in the docs.\r\n\t *\r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t * \r\n\t *
TinyMethodTinyMethod
mt{{#crossLink \"Graphics/moveTo\"}}{{/crossLink}} lt {{#crossLink \"Graphics/lineTo\"}}{{/crossLink}}
a/at{{#crossLink \"Graphics/arc\"}}{{/crossLink}} / {{#crossLink \"Graphics/arcTo\"}}{{/crossLink}} bt{{#crossLink \"Graphics/bezierCurveTo\"}}{{/crossLink}}
qt{{#crossLink \"Graphics/quadraticCurveTo\"}}{{/crossLink}} (also curveTo)r{{#crossLink \"Graphics/rect\"}}{{/crossLink}}
cp{{#crossLink \"Graphics/closePath\"}}{{/crossLink}} c{{#crossLink \"Graphics/clear\"}}{{/crossLink}}
f{{#crossLink \"Graphics/beginFill\"}}{{/crossLink}} lf{{#crossLink \"Graphics/beginLinearGradientFill\"}}{{/crossLink}}
rf{{#crossLink \"Graphics/beginRadialGradientFill\"}}{{/crossLink}} bf{{#crossLink \"Graphics/beginBitmapFill\"}}{{/crossLink}}
ef{{#crossLink \"Graphics/endFill\"}}{{/crossLink}} ss / sd{{#crossLink \"Graphics/setStrokeStyle\"}}{{/crossLink}} / {{#crossLink \"Graphics/setStrokeDash\"}}{{/crossLink}}
s{{#crossLink \"Graphics/beginStroke\"}}{{/crossLink}} ls{{#crossLink \"Graphics/beginLinearGradientStroke\"}}{{/crossLink}}
rs{{#crossLink \"Graphics/beginRadialGradientStroke\"}}{{/crossLink}} bs{{#crossLink \"Graphics/beginBitmapStroke\"}}{{/crossLink}}
es{{#crossLink \"Graphics/endStroke\"}}{{/crossLink}} dr{{#crossLink \"Graphics/drawRect\"}}{{/crossLink}}
rr{{#crossLink \"Graphics/drawRoundRect\"}}{{/crossLink}} rc{{#crossLink \"Graphics/drawRoundRectComplex\"}}{{/crossLink}}
dc{{#crossLink \"Graphics/drawCircle\"}}{{/crossLink}} de{{#crossLink \"Graphics/drawEllipse\"}}{{/crossLink}}
dp{{#crossLink \"Graphics/drawPolyStar\"}}{{/crossLink}} p{{#crossLink \"Graphics/decodePath\"}}{{/crossLink}}
\r\n\t *\r\n\t * Here is the above example, using the tiny API instead.\r\n\t *\r\n\t * myGraphics.s(\"red\").f(\"blue\").r(20, 20, 100, 50);\r\n\t *\r\n\t * @class Graphics\r\n\t * @constructor\r\n\t **/\r\n\tfunction Graphics() {\r\n\r\n\r\n\t// public properties\r\n\t\t/**\r\n\t\t * Holds a reference to the last command that was created or appended. For example, you could retain a reference\r\n\t\t * to a Fill command in order to dynamically update the color later by using:\r\n\t\t *\r\n\t\t * \t\tvar myFill = myGraphics.beginFill(\"red\").command;\r\n\t\t * \t\t// update color later:\r\n\t\t * \t\tmyFill.style = \"yellow\";\r\n\t\t *\r\n\t\t * @property command\r\n\t\t * @type Object\r\n\t\t **/\r\n\t\tthis.command = null;\r\n\r\n\r\n\t// private properties\r\n\t\t/**\r\n\t\t * @property _stroke\r\n\t\t * @protected\r\n\t\t * @type {Stroke}\r\n\t\t **/\r\n\t\tthis._stroke = null;\r\n\r\n\t\t/**\r\n\t\t * @property _strokeStyle\r\n\t\t * @protected\r\n\t\t * @type {StrokeStyle}\r\n\t\t **/\r\n\t\tthis._strokeStyle = null;\r\n\t\t\r\n\t\t/**\r\n\t\t * @property _oldStrokeStyle\r\n\t\t * @protected\r\n\t\t * @type {StrokeStyle}\r\n\t\t **/\r\n\t\tthis._oldStrokeStyle = null;\r\n\t\t\r\n\t\t/**\r\n\t\t * @property _strokeDash\r\n\t\t * @protected\r\n\t\t * @type {StrokeDash}\r\n\t\t **/\r\n\t\tthis._strokeDash = null;\r\n\t\t\r\n\t\t/**\r\n\t\t * @property _oldStrokeDash\r\n\t\t * @protected\r\n\t\t * @type {StrokeDash}\r\n\t\t **/\r\n\t\tthis._oldStrokeDash = null;\r\n\r\n\t\t/**\r\n\t\t * @property _strokeIgnoreScale\r\n\t\t * @protected\r\n\t\t * @type Boolean\r\n\t\t **/\r\n\t\tthis._strokeIgnoreScale = false;\r\n\r\n\t\t/**\r\n\t\t * @property _fill\r\n\t\t * @protected\r\n\t\t * @type {Fill}\r\n\t\t **/\r\n\t\tthis._fill = null;\r\n\r\n\t\t/**\r\n\t\t * @property _instructions\r\n\t\t * @protected\r\n\t\t * @type {Array}\r\n\t\t **/\r\n\t\tthis._instructions = [];\r\n\r\n\t\t/**\r\n\t\t * Indicates the last instruction index that was committed.\r\n\t\t * @property _commitIndex\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t **/\r\n\t\tthis._commitIndex = 0;\r\n\r\n\t\t/**\r\n\t\t * Uncommitted instructions.\r\n\t\t * @property _activeInstructions\r\n\t\t * @protected\r\n\t\t * @type {Array}\r\n\t\t **/\r\n\t\tthis._activeInstructions = [];\r\n\r\n\t\t/**\r\n\t\t * This indicates that there have been changes to the activeInstruction list since the last updateInstructions call.\r\n\t\t * @property _dirty\r\n\t\t * @protected\r\n\t\t * @type {Boolean}\r\n\t\t * @default false\r\n\t\t **/\r\n\t\tthis._dirty = false;\r\n\r\n\t\t/**\r\n\t\t * Index to draw from if a store operation has happened.\r\n\t\t * @property _storeIndex\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis._storeIndex = 0;\r\n\r\n\t// setup:\r\n\t\tthis.clear();\r\n\t}\r\n\tvar p = Graphics.prototype;\r\n\tvar G = Graphics; // shortcut\r\n\r\n// static public methods:\r\n\t/**\r\n\t * Returns a CSS compatible color string based on the specified RGB numeric color values in the format\r\n\t * \"rgba(255,255,255,1.0)\", or if alpha is null then in the format \"rgb(255,255,255)\". For example,\r\n\t *\r\n\t * createjs.Graphics.getRGB(50, 100, 150, 0.5);\r\n\t * // Returns \"rgba(50,100,150,0.5)\"\r\n\t *\r\n\t * It also supports passing a single hex color value as the first param, and an optional alpha value as the second\r\n\t * param. For example,\r\n\t *\r\n\t * createjs.Graphics.getRGB(0xFF00FF, 0.2);\r\n\t * // Returns \"rgba(255,0,255,0.2)\"\r\n\t *\r\n\t * @method getRGB\r\n\t * @static\r\n\t * @param {Number} r The red component for the color, between 0 and 0xFF (255).\r\n\t * @param {Number} g The green component for the color, between 0 and 0xFF (255).\r\n\t * @param {Number} b The blue component for the color, between 0 and 0xFF (255).\r\n\t * @param {Number} [alpha] The alpha component for the color where 0 is fully transparent and 1 is fully opaque.\r\n\t * @return {String} A CSS compatible color string based on the specified RGB numeric color values in the format\r\n\t * \"rgba(255,255,255,1.0)\", or if alpha is null then in the format \"rgb(255,255,255)\".\r\n\t **/\r\n\tGraphics.getRGB = function(r, g, b, alpha) {\r\n\t\tif (r != null && b == null) {\r\n\t\t\talpha = g;\r\n\t\t\tb = r&0xFF;\r\n\t\t\tg = r>>8&0xFF;\r\n\t\t\tr = r>>16&0xFF;\r\n\t\t}\r\n\t\tif (alpha == null) {\r\n\t\t\treturn \"rgb(\"+r+\",\"+g+\",\"+b+\")\";\r\n\t\t} else {\r\n\t\t\treturn \"rgba(\"+r+\",\"+g+\",\"+b+\",\"+alpha+\")\";\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a CSS compatible color string based on the specified HSL numeric color values in the format \"hsla(360,100,100,1.0)\",\r\n\t * or if alpha is null then in the format \"hsl(360,100,100)\".\r\n\t *\r\n\t * createjs.Graphics.getHSL(150, 100, 70);\r\n\t * // Returns \"hsl(150,100,70)\"\r\n\t *\r\n\t * @method getHSL\r\n\t * @static\r\n\t * @param {Number} hue The hue component for the color, between 0 and 360.\r\n\t * @param {Number} saturation The saturation component for the color, between 0 and 100.\r\n\t * @param {Number} lightness The lightness component for the color, between 0 and 100.\r\n\t * @param {Number} [alpha] The alpha component for the color where 0 is fully transparent and 1 is fully opaque.\r\n\t * @return {String} A CSS compatible color string based on the specified HSL numeric color values in the format\r\n\t * \"hsla(360,100,100,1.0)\", or if alpha is null then in the format \"hsl(360,100,100)\".\r\n\t **/\r\n\tGraphics.getHSL = function(hue, saturation, lightness, alpha) {\r\n\t\tif (alpha == null) {\r\n\t\t\treturn \"hsl(\"+(hue%360)+\",\"+saturation+\"%,\"+lightness+\"%)\";\r\n\t\t} else {\r\n\t\t\treturn \"hsla(\"+(hue%360)+\",\"+saturation+\"%,\"+lightness+\"%,\"+alpha+\")\";\r\n\t\t}\r\n\t};\r\n\r\n\r\n// static properties:\r\n\t/**\r\n\t * A reusable instance of {{#crossLink \"Graphics/BeginPath\"}}{{/crossLink}} to avoid\r\n\t * unnecessary instantiation.\r\n\t * @property beginCmd\r\n\t * @type {Graphics.BeginPath}\r\n\t * @static\r\n\t **/\r\n\t // defined at the bottom of this file.\r\n\r\n\t/**\r\n\t * Map of Base64 characters to values. Used by {{#crossLink \"Graphics/decodePath\"}}{{/crossLink}}.\r\n\t * @property BASE_64\r\n\t * @static\r\n\t * @final\r\n\t * @readonly\r\n\t * @type {Object}\r\n\t **/\r\n\tGraphics.BASE_64 = {\"A\":0,\"B\":1,\"C\":2,\"D\":3,\"E\":4,\"F\":5,\"G\":6,\"H\":7,\"I\":8,\"J\":9,\"K\":10,\"L\":11,\"M\":12,\"N\":13,\"O\":14,\"P\":15,\"Q\":16,\"R\":17,\"S\":18,\"T\":19,\"U\":20,\"V\":21,\"W\":22,\"X\":23,\"Y\":24,\"Z\":25,\"a\":26,\"b\":27,\"c\":28,\"d\":29,\"e\":30,\"f\":31,\"g\":32,\"h\":33,\"i\":34,\"j\":35,\"k\":36,\"l\":37,\"m\":38,\"n\":39,\"o\":40,\"p\":41,\"q\":42,\"r\":43,\"s\":44,\"t\":45,\"u\":46,\"v\":47,\"w\":48,\"x\":49,\"y\":50,\"z\":51,\"0\":52,\"1\":53,\"2\":54,\"3\":55,\"4\":56,\"5\":57,\"6\":58,\"7\":59,\"8\":60,\"9\":61,\"+\":62,\"/\":63};\r\n\r\n\t/**\r\n\t * Maps numeric values for the caps parameter of {{#crossLink \"Graphics/setStrokeStyle\"}}{{/crossLink}} to\r\n\t * corresponding string values. This is primarily for use with the tiny API. The mappings are as follows: 0 to\r\n\t * \"butt\", 1 to \"round\", and 2 to \"square\".\r\n\t * For example, to set the line caps to \"square\":\r\n\t *\r\n\t * myGraphics.ss(16, 2);\r\n\t *\r\n\t * @property STROKE_CAPS_MAP\r\n\t * @static\r\n\t * @final\r\n\t * @readonly\r\n\t * @type {Array}\r\n\t **/\r\n\tGraphics.STROKE_CAPS_MAP = [\"butt\", \"round\", \"square\"];\r\n\r\n\t/**\r\n\t * Maps numeric values for the joints parameter of {{#crossLink \"Graphics/setStrokeStyle\"}}{{/crossLink}} to\r\n\t * corresponding string values. This is primarily for use with the tiny API. The mappings are as follows: 0 to\r\n\t * \"miter\", 1 to \"round\", and 2 to \"bevel\".\r\n\t * For example, to set the line joints to \"bevel\":\r\n\t *\r\n\t * myGraphics.ss(16, 0, 2);\r\n\t *\r\n\t * @property STROKE_JOINTS_MAP\r\n\t * @static\r\n\t * @final\r\n\t * @readonly\r\n\t * @type {Array}\r\n\t **/\r\n\tGraphics.STROKE_JOINTS_MAP = [\"miter\", \"round\", \"bevel\"];\r\n\r\n\t/**\r\n\t * @property _ctx\r\n\t * @static\r\n\t * @protected\r\n\t * @type {CanvasRenderingContext2D}\r\n\t **/\r\n\tvar canvas = (createjs.createCanvas?createjs.createCanvas():document.createElement(\"canvas\"));\r\n\tif (canvas.getContext) {\r\n\t\tGraphics._ctx = canvas.getContext(\"2d\");\r\n\t\tcanvas.width = canvas.height = 1;\r\n\t}\r\n\r\n\r\n// getter / setters:\r\n\t/**\r\n\t * Use the {{#crossLink \"Graphics/instructions:property\"}}{{/crossLink}} property instead.\r\n\t * @method _getInstructions\r\n\t * @protected\r\n\t * @return {Array} The instructions array, useful for chaining\r\n\t **/\r\n\tp._getInstructions = function() {\r\n\t\tthis._updateInstructions();\r\n\t\treturn this._instructions;\r\n\t};\r\n\t// Graphics.getInstructions is @deprecated. Remove for 1.1+\r\n\tp.getInstructions = createjs.deprecate(p._getInstructions, \"Graphics.getInstructions\");\r\n\r\n\t/**\r\n\t * Returns the graphics instructions array. Each entry is a graphics command object (ex. Graphics.Fill, Graphics.Rect)\r\n\t * Modifying the returned array directly is not recommended, and is likely to result in unexpected behaviour.\r\n\t *\r\n\t * This property is mainly intended for introspection of the instructions (ex. for graphics export).\r\n\t * @property instructions\r\n\t * @type {Array}\r\n\t * @readonly\r\n\t **/\r\n\ttry {\r\n\t\tObject.defineProperties(p, {\r\n\t\t\tinstructions: { get: p._getInstructions }\r\n\t\t});\r\n\t} catch (e) {}\r\n\r\n\r\n// public methods:\r\n\t/**\r\n\t * Returns true if this Graphics instance has no drawing commands.\r\n\t * @method isEmpty\r\n\t * @return {Boolean} Returns true if this Graphics instance has no drawing commands.\r\n\t **/\r\n\tp.isEmpty = function() {\r\n\t\treturn !(this._instructions.length || this._activeInstructions.length);\r\n\t};\r\n\r\n\t/**\r\n\t * Draws the display object into the specified context ignoring its visible, alpha, shadow, and transform.\r\n\t * Returns true if the draw was handled (useful for overriding functionality).\r\n\t *\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method draw\r\n\t * @param {CanvasRenderingContext2D} ctx The canvas 2D context object to draw into.\r\n\t * @param {Object} data Optional data that is passed to graphics command exec methods. When called from a Shape instance, the shape passes itself as the data parameter. This can be used by custom graphic commands to insert contextual data.\r\n\t **/\r\n\tp.draw = function(ctx, data) {\r\n\t\tthis._updateInstructions();\r\n\t\tvar instr = this._instructions;\r\n\t\tfor (var i=this._storeIndex, l=instr.length; iDisplayObject.mask to draw the clipping path, for example.\r\n\t *\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method drawAsPath\r\n\t * @param {CanvasRenderingContext2D} ctx The canvas 2D context object to draw into.\r\n\t **/\r\n\tp.drawAsPath = function(ctx) {\r\n\t\tthis._updateInstructions();\r\n\t\tvar instr, instrs = this._instructions;\r\n\t\tfor (var i=this._storeIndex, l=instrs.length; i\r\n\t * whatwg spec.\r\n\t * @method lineTo\r\n\t * @param {Number} x The x coordinate the drawing point should draw to.\r\n\t * @param {Number} y The y coordinate the drawing point should draw to.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.lineTo = function(x, y) {\r\n\t\treturn this.append(new G.LineTo(x,y));\r\n\t};\r\n\r\n\t/**\r\n\t * Draws an arc with the specified control points and radius. For detailed information, read the\r\n\t * \r\n\t * whatwg spec. A tiny API method \"at\" also exists.\r\n\t * @method arcTo\r\n\t * @param {Number} x1\r\n\t * @param {Number} y1\r\n\t * @param {Number} x2\r\n\t * @param {Number} y2\r\n\t * @param {Number} radius\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.arcTo = function(x1, y1, x2, y2, radius) {\r\n\t\treturn this.append(new G.ArcTo(x1, y1, x2, y2, radius));\r\n\t};\r\n\r\n\t/**\r\n\t * Draws an arc defined by the radius, startAngle and endAngle arguments, centered at the position (x, y). For\r\n\t * example, to draw a full circle with a radius of 20 centered at (100, 100):\r\n\t *\r\n\t * arc(100, 100, 20, 0, Math.PI*2);\r\n\t *\r\n\t * For detailed information, read the\r\n\t * whatwg spec.\r\n\t * A tiny API method \"a\" also exists.\r\n\t * @method arc\r\n\t * @param {Number} x\r\n\t * @param {Number} y\r\n\t * @param {Number} radius\r\n\t * @param {Number} startAngle Measured in radians.\r\n\t * @param {Number} endAngle Measured in radians.\r\n\t * @param {Boolean} anticlockwise\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.arc = function(x, y, radius, startAngle, endAngle, anticlockwise) {\r\n\t\treturn this.append(new G.Arc(x, y, radius, startAngle, endAngle, anticlockwise));\r\n\t};\r\n\r\n\t/**\r\n\t * Draws a quadratic curve from the current drawing point to (x, y) using the control point (cpx, cpy). For detailed\r\n\t * information, read the \r\n\t * whatwg spec. A tiny API method \"qt\" also exists.\r\n\t * @method quadraticCurveTo\r\n\t * @param {Number} cpx\r\n\t * @param {Number} cpy\r\n\t * @param {Number} x\r\n\t * @param {Number} y\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.quadraticCurveTo = function(cpx, cpy, x, y) {\r\n\t\treturn this.append(new G.QuadraticCurveTo(cpx, cpy, x, y));\r\n\t};\r\n\r\n\t/**\r\n\t * Draws a bezier curve from the current drawing point to (x, y) using the control points (cp1x, cp1y) and (cp2x,\r\n\t * cp2y). For detailed information, read the\r\n\t * \r\n\t * whatwg spec. A tiny API method \"bt\" also exists.\r\n\t * @method bezierCurveTo\r\n\t * @param {Number} cp1x\r\n\t * @param {Number} cp1y\r\n\t * @param {Number} cp2x\r\n\t * @param {Number} cp2y\r\n\t * @param {Number} x\r\n\t * @param {Number} y\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.bezierCurveTo = function(cp1x, cp1y, cp2x, cp2y, x, y) {\r\n\t\treturn this.append(new G.BezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y));\r\n\t};\r\n\r\n\t/**\r\n\t * Draws a rectangle at (x, y) with the specified width and height using the current fill and/or stroke.\r\n\t * For detailed information, read the\r\n\t * \r\n\t * whatwg spec. A tiny API method \"r\" also exists.\r\n\t * @method rect\r\n\t * @param {Number} x\r\n\t * @param {Number} y\r\n\t * @param {Number} w Width of the rectangle\r\n\t * @param {Number} h Height of the rectangle\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.rect = function(x, y, w, h) {\r\n\t\treturn this.append(new G.Rect(x, y, w, h));\r\n\t};\r\n\r\n\t/**\r\n\t * Closes the current path, effectively drawing a line from the current drawing point to the first drawing point specified\r\n\t * since the fill or stroke was last set. A tiny API method \"cp\" also exists.\r\n\t * @method closePath\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.closePath = function() {\r\n\t\treturn this._activeInstructions.length ? this.append(new G.ClosePath()) : this;\r\n\t};\r\n\r\n\r\n// public methods that roughly map to Adobe Flash/Animate graphics APIs:\r\n\t/**\r\n\t * Clears all drawing instructions, effectively resetting this Graphics instance. Any line and fill styles will need\r\n\t * to be redefined to draw shapes following a clear call. A tiny API method \"c\" also exists.\r\n\t * @method clear\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.clear = function() {\r\n\t\tthis._instructions.length = this._activeInstructions.length = this._commitIndex = 0;\r\n\t\tthis._strokeStyle = this._oldStrokeStyle = this._stroke = this._fill = this._strokeDash = this._oldStrokeDash = null;\r\n\t\tthis._dirty = this._strokeIgnoreScale = false;\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Begins a fill with the specified color. This ends the current sub-path. A tiny API method \"f\" also exists.\r\n\t * @method beginFill\r\n\t * @param {String} color A CSS compatible color value (ex. \"red\", \"#FF0000\", or \"rgba(255,0,0,0.5)\"). Setting to\r\n\t * null will result in no fill.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.beginFill = function(color) {\r\n\t\treturn this._setFill(color ? new G.Fill(color) : null);\r\n\t};\r\n\r\n\t/**\r\n\t * Begins a linear gradient fill defined by the line (x0, y0) to (x1, y1). This ends the current sub-path. For\r\n\t * example, the following code defines a black to white vertical gradient ranging from 20px to 120px, and draws a\r\n\t * square to display it:\r\n\t *\r\n\t * myGraphics.beginLinearGradientFill([\"#000\",\"#FFF\"], [0, 1], 0, 20, 0, 120).drawRect(20, 20, 120, 120);\r\n\t *\r\n\t * A tiny API method \"lf\" also exists.\r\n\t * @method beginLinearGradientFill\r\n\t * @param {Array} colors An array of CSS compatible color values. For example, [\"#F00\",\"#00F\"] would define a gradient\r\n\t * drawing from red to blue.\r\n\t * @param {Array} ratios An array of gradient positions which correspond to the colors. For example, [0.1, 0.9] would draw\r\n\t * the first color to 10% then interpolating to the second color at 90%.\r\n\t * @param {Number} x0 The position of the first point defining the line that defines the gradient direction and size.\r\n\t * @param {Number} y0 The position of the first point defining the line that defines the gradient direction and size.\r\n\t * @param {Number} x1 The position of the second point defining the line that defines the gradient direction and size.\r\n\t * @param {Number} y1 The position of the second point defining the line that defines the gradient direction and size.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.beginLinearGradientFill = function(colors, ratios, x0, y0, x1, y1) {\r\n\t\treturn this._setFill(new G.Fill().linearGradient(colors, ratios, x0, y0, x1, y1));\r\n\t};\r\n\r\n\t/**\r\n\t * Begins a radial gradient fill. This ends the current sub-path. For example, the following code defines a red to\r\n\t * blue radial gradient centered at (100, 100), with a radius of 50, and draws a circle to display it:\r\n\t *\r\n\t * myGraphics.beginRadialGradientFill([\"#F00\",\"#00F\"], [0, 1], 100, 100, 0, 100, 100, 50).drawCircle(100, 100, 50);\r\n\t *\r\n\t * A tiny API method \"rf\" also exists.\r\n\t * @method beginRadialGradientFill\r\n\t * @param {Array} colors An array of CSS compatible color values. For example, [\"#F00\",\"#00F\"] would define\r\n\t * a gradient drawing from red to blue.\r\n\t * @param {Array} ratios An array of gradient positions which correspond to the colors. For example, [0.1,\r\n\t * 0.9] would draw the first color to 10% then interpolating to the second color at 90%.\r\n\t * @param {Number} x0 Center position of the inner circle that defines the gradient.\r\n\t * @param {Number} y0 Center position of the inner circle that defines the gradient.\r\n\t * @param {Number} r0 Radius of the inner circle that defines the gradient.\r\n\t * @param {Number} x1 Center position of the outer circle that defines the gradient.\r\n\t * @param {Number} y1 Center position of the outer circle that defines the gradient.\r\n\t * @param {Number} r1 Radius of the outer circle that defines the gradient.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.beginRadialGradientFill = function(colors, ratios, x0, y0, r0, x1, y1, r1) {\r\n\t\treturn this._setFill(new G.Fill().radialGradient(colors, ratios, x0, y0, r0, x1, y1, r1));\r\n\t};\r\n\r\n\t/**\r\n\t * Begins a pattern fill using the specified image. This ends the current sub-path. A tiny API method \"bf\" also\r\n\t * exists.\r\n\t * @method beginBitmapFill\r\n\t * @param {HTMLImageElement | HTMLCanvasElement | HTMLVideoElement} image The Image, Canvas, or Video object to use\r\n\t * as the pattern. Must be loaded prior to creating a bitmap fill, or the fill will be empty.\r\n\t * @param {String} repetition Optional. Indicates whether to repeat the image in the fill area. One of \"repeat\",\r\n\t * \"repeat-x\", \"repeat-y\", or \"no-repeat\". Defaults to \"repeat\". Note that Firefox does not support \"repeat-x\" or\r\n\t * \"repeat-y\" (latest tests were in FF 20.0), and will default to \"repeat\".\r\n\t * @param {Matrix2D} matrix Optional. Specifies a transformation matrix for the bitmap fill. This transformation\r\n\t * will be applied relative to the parent transform.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.beginBitmapFill = function(image, repetition, matrix) {\r\n\t\treturn this._setFill(new G.Fill(null,matrix).bitmap(image, repetition));\r\n\t};\r\n\r\n\t/**\r\n\t * Ends the current sub-path, and begins a new one with no fill. Functionally identical to beginFill(null).\r\n\t * A tiny API method \"ef\" also exists.\r\n\t * @method endFill\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.endFill = function() {\r\n\t\treturn this.beginFill();\r\n\t};\r\n\r\n\t/**\r\n\t * Sets the stroke style. Like all drawing methods, this can be chained, so you can define\r\n\t * the stroke style and color in a single line of code like so:\r\n\t *\r\n\t * \tmyGraphics.setStrokeStyle(8,\"round\").beginStroke(\"#F00\");\r\n\t *\r\n\t * A tiny API method \"ss\" also exists.\r\n\t * @method setStrokeStyle\r\n\t * @param {Number} thickness The width of the stroke.\r\n\t * @param {String | Number} [caps=0] Indicates the type of caps to use at the end of lines. One of butt,\r\n\t * round, or square. Defaults to \"butt\". Also accepts the values 0 (butt), 1 (round), and 2 (square) for use with\r\n\t * the tiny API.\r\n\t * @param {String | Number} [joints=0] Specifies the type of joints that should be used where two lines meet.\r\n\t * One of bevel, round, or miter. Defaults to \"miter\". Also accepts the values 0 (miter), 1 (round), and 2 (bevel)\r\n\t * for use with the tiny API.\r\n\t * @param {Number} [miterLimit=10] If joints is set to \"miter\", then you can specify a miter limit ratio which\r\n\t * controls at what point a mitered joint will be clipped.\r\n\t * @param {Boolean} [ignoreScale=false] If true, the stroke will be drawn at the specified thickness regardless\r\n\t * of active transformations.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.setStrokeStyle = function(thickness, caps, joints, miterLimit, ignoreScale) {\r\n\t\tthis._updateInstructions(true);\r\n\t\tthis._strokeStyle = this.command = new G.StrokeStyle(thickness, caps, joints, miterLimit, ignoreScale);\r\n\r\n\t\t// ignoreScale lives on Stroke, not StrokeStyle, so we do a little trickery:\r\n\t\tif (this._stroke) { this._stroke.ignoreScale = ignoreScale; }\r\n\t\tthis._strokeIgnoreScale = ignoreScale;\r\n\t\treturn this;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Sets or clears the stroke dash pattern.\r\n\t *\r\n\t * \tmyGraphics.setStrokeDash([20, 10], 0);\r\n\t *\r\n\t * A tiny API method `sd` also exists.\r\n\t * @method setStrokeDash\r\n\t * @param {Array} [segments] An array specifying the dash pattern, alternating between line and gap.\r\n\t * For example, `[20,10]` would create a pattern of 20 pixel lines with 10 pixel gaps between them.\r\n\t * Passing null or an empty array will clear the existing stroke dash.\r\n\t * @param {Number} [offset=0] The offset of the dash pattern. For example, you could increment this value to create a \"marching ants\" effect.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.setStrokeDash = function(segments, offset) {\r\n\t\tthis._updateInstructions(true);\r\n\t\tthis._strokeDash = this.command = new G.StrokeDash(segments, offset);\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Begins a stroke with the specified color. This ends the current sub-path. A tiny API method \"s\" also exists.\r\n\t * @method beginStroke\r\n\t * @param {String} color A CSS compatible color value (ex. \"#FF0000\", \"red\", or \"rgba(255,0,0,0.5)\"). Setting to\r\n\t * null will result in no stroke.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.beginStroke = function(color) {\r\n\t\treturn this._setStroke(color ? new G.Stroke(color) : null);\r\n\t};\r\n\r\n\t/**\r\n\t * Begins a linear gradient stroke defined by the line (x0, y0) to (x1, y1). This ends the current sub-path. For\r\n\t * example, the following code defines a black to white vertical gradient ranging from 20px to 120px, and draws a\r\n\t * square to display it:\r\n\t *\r\n\t * myGraphics.setStrokeStyle(10).\r\n\t * beginLinearGradientStroke([\"#000\",\"#FFF\"], [0, 1], 0, 20, 0, 120).drawRect(20, 20, 120, 120);\r\n\t *\r\n\t * A tiny API method \"ls\" also exists.\r\n\t * @method beginLinearGradientStroke\r\n\t * @param {Array} colors An array of CSS compatible color values. For example, [\"#F00\",\"#00F\"] would define\r\n\t * a gradient drawing from red to blue.\r\n\t * @param {Array} ratios An array of gradient positions which correspond to the colors. For example, [0.1,\r\n\t * 0.9] would draw the first color to 10% then interpolating to the second color at 90%.\r\n\t * @param {Number} x0 The position of the first point defining the line that defines the gradient direction and size.\r\n\t * @param {Number} y0 The position of the first point defining the line that defines the gradient direction and size.\r\n\t * @param {Number} x1 The position of the second point defining the line that defines the gradient direction and size.\r\n\t * @param {Number} y1 The position of the second point defining the line that defines the gradient direction and size.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.beginLinearGradientStroke = function(colors, ratios, x0, y0, x1, y1) {\r\n\t\treturn this._setStroke(new G.Stroke().linearGradient(colors, ratios, x0, y0, x1, y1));\r\n\t};\r\n\r\n\t/**\r\n\t * Begins a radial gradient stroke. This ends the current sub-path. For example, the following code defines a red to\r\n\t * blue radial gradient centered at (100, 100), with a radius of 50, and draws a rectangle to display it:\r\n\t *\r\n\t * myGraphics.setStrokeStyle(10)\r\n\t * .beginRadialGradientStroke([\"#F00\",\"#00F\"], [0, 1], 100, 100, 0, 100, 100, 50)\r\n\t * .drawRect(50, 90, 150, 110);\r\n\t *\r\n\t * A tiny API method \"rs\" also exists.\r\n\t * @method beginRadialGradientStroke\r\n\t * @param {Array} colors An array of CSS compatible color values. For example, [\"#F00\",\"#00F\"] would define\r\n\t * a gradient drawing from red to blue.\r\n\t * @param {Array} ratios An array of gradient positions which correspond to the colors. For example, [0.1,\r\n\t * 0.9] would draw the first color to 10% then interpolating to the second color at 90%, then draw the second color\r\n\t * to 100%.\r\n\t * @param {Number} x0 Center position of the inner circle that defines the gradient.\r\n\t * @param {Number} y0 Center position of the inner circle that defines the gradient.\r\n\t * @param {Number} r0 Radius of the inner circle that defines the gradient.\r\n\t * @param {Number} x1 Center position of the outer circle that defines the gradient.\r\n\t * @param {Number} y1 Center position of the outer circle that defines the gradient.\r\n\t * @param {Number} r1 Radius of the outer circle that defines the gradient.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.beginRadialGradientStroke = function(colors, ratios, x0, y0, r0, x1, y1, r1) {\r\n\t\treturn this._setStroke(new G.Stroke().radialGradient(colors, ratios, x0, y0, r0, x1, y1, r1));\r\n\t};\r\n\r\n\t/**\r\n\t * Begins a pattern fill using the specified image. This ends the current sub-path. Note that unlike bitmap fills,\r\n\t * strokes do not currently support a matrix parameter due to limitations in the canvas API. A tiny API method \"bs\"\r\n\t * also exists.\r\n\t * @method beginBitmapStroke\r\n\t * @param {HTMLImageElement | HTMLCanvasElement | HTMLVideoElement} image The Image, Canvas, or Video object to use\r\n\t * as the pattern. Must be loaded prior to creating a bitmap fill, or the fill will be empty.\r\n\t * @param {String} [repetition=repeat] Optional. Indicates whether to repeat the image in the fill area. One of\r\n\t * \"repeat\", \"repeat-x\", \"repeat-y\", or \"no-repeat\". Defaults to \"repeat\".\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.beginBitmapStroke = function(image, repetition) {\r\n\t\t// NOTE: matrix is not supported for stroke because transforms on strokes also affect the drawn stroke width.\r\n\t\treturn this._setStroke(new G.Stroke().bitmap(image, repetition));\r\n\t};\r\n\r\n\t/**\r\n\t * Ends the current sub-path, and begins a new one with no stroke. Functionally identical to beginStroke(null).\r\n\t * A tiny API method \"es\" also exists.\r\n\t * @method endStroke\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.endStroke = function() {\r\n\t\treturn this.beginStroke();\r\n\t};\r\n\r\n\t/**\r\n\t * Maps the familiar ActionScript curveTo() method to the functionally similar {{#crossLink \"Graphics/quadraticCurveTo\"}}{{/crossLink}}\r\n\t * method.\r\n\t * @method curveTo\r\n\t * @param {Number} cpx\r\n\t * @param {Number} cpy\r\n\t * @param {Number} x\r\n\t * @param {Number} y\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.curveTo = p.quadraticCurveTo;\r\n\r\n\t/**\r\n\t *\r\n\t * Maps the familiar ActionScript drawRect() method to the functionally similar {{#crossLink \"Graphics/rect\"}}{{/crossLink}}\r\n\t * method.\r\n\t * @method drawRect\r\n\t * @param {Number} x\r\n\t * @param {Number} y\r\n\t * @param {Number} w Width of the rectangle\r\n\t * @param {Number} h Height of the rectangle\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.drawRect = p.rect;\r\n\r\n\t/**\r\n\t * Draws a rounded rectangle with all corners with the specified radius.\r\n\t * @method drawRoundRect\r\n\t * @param {Number} x\r\n\t * @param {Number} y\r\n\t * @param {Number} w\r\n\t * @param {Number} h\r\n\t * @param {Number} radius Corner radius.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.drawRoundRect = function(x, y, w, h, radius) {\r\n\t\treturn this.drawRoundRectComplex(x, y, w, h, radius, radius, radius, radius);\r\n\t};\r\n\r\n\t/**\r\n\t * Draws a rounded rectangle with different corner radii. Supports positive and negative corner radii. A tiny API\r\n\t * method \"rc\" also exists.\r\n\t * @method drawRoundRectComplex\r\n\t * @param {Number} x The horizontal coordinate to draw the round rect.\r\n\t * @param {Number} y The vertical coordinate to draw the round rect.\r\n\t * @param {Number} w The width of the round rect.\r\n\t * @param {Number} h The height of the round rect.\r\n\t * @param {Number} radiusTL Top left corner radius.\r\n\t * @param {Number} radiusTR Top right corner radius.\r\n\t * @param {Number} radiusBR Bottom right corner radius.\r\n\t * @param {Number} radiusBL Bottom left corner radius.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.drawRoundRectComplex = function(x, y, w, h, radiusTL, radiusTR, radiusBR, radiusBL) {\r\n\t\treturn this.append(new G.RoundRect(x, y, w, h, radiusTL, radiusTR, radiusBR, radiusBL));\r\n\t};\r\n\r\n\t/**\r\n\t * Draws a circle with the specified radius at (x, y).\r\n\t *\r\n\t * var g = new createjs.Graphics();\r\n\t *\t g.setStrokeStyle(1);\r\n\t *\t g.beginStroke(createjs.Graphics.getRGB(0,0,0));\r\n\t *\t g.beginFill(createjs.Graphics.getRGB(255,0,0));\r\n\t *\t g.drawCircle(0,0,3);\r\n\t *\r\n\t *\t var s = new createjs.Shape(g);\r\n\t *\t\ts.x = 100;\r\n\t *\t\ts.y = 100;\r\n\t *\r\n\t *\t stage.addChild(s);\r\n\t *\t stage.update();\r\n\t *\r\n\t * A tiny API method \"dc\" also exists.\r\n\t * @method drawCircle\r\n\t * @param {Number} x x coordinate center point of circle.\r\n\t * @param {Number} y y coordinate center point of circle.\r\n\t * @param {Number} radius Radius of circle.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.drawCircle = function(x, y, radius) {\r\n\t\treturn this.append(new G.Circle(x, y, radius));\r\n\t};\r\n\r\n\t/**\r\n\t * Draws an ellipse (oval) with a specified width (w) and height (h). Similar to {{#crossLink \"Graphics/drawCircle\"}}{{/crossLink}},\r\n\t * except the width and height can be different. A tiny API method \"de\" also exists.\r\n\t * @method drawEllipse\r\n\t * @param {Number} x The left coordinate point of the ellipse. Note that this is different from {{#crossLink \"Graphics/drawCircle\"}}{{/crossLink}}\r\n\t * which draws from center.\r\n\t * @param {Number} y The top coordinate point of the ellipse. Note that this is different from {{#crossLink \"Graphics/drawCircle\"}}{{/crossLink}}\r\n\t * which draws from the center.\r\n\t * @param {Number} w The height (horizontal diameter) of the ellipse. The horizontal radius will be half of this\r\n\t * number.\r\n\t * @param {Number} h The width (vertical diameter) of the ellipse. The vertical radius will be half of this number.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.drawEllipse = function(x, y, w, h) {\r\n\t\treturn this.append(new G.Ellipse(x, y, w, h));\r\n\t};\r\n\r\n\t/**\r\n\t * Draws a star if pointSize is greater than 0, or a regular polygon if pointSize is 0 with the specified number of\r\n\t * points. For example, the following code will draw a familiar 5 pointed star shape centered at 100, 100 and with a\r\n\t * radius of 50:\r\n\t *\r\n\t * myGraphics.beginFill(\"#FF0\").drawPolyStar(100, 100, 50, 5, 0.6, -90);\r\n\t * // Note: -90 makes the first point vertical\r\n\t *\r\n\t * A tiny API method \"dp\" also exists.\r\n\t *\r\n\t * @method drawPolyStar\r\n\t * @param {Number} x Position of the center of the shape.\r\n\t * @param {Number} y Position of the center of the shape.\r\n\t * @param {Number} radius The outer radius of the shape.\r\n\t * @param {Number} sides The number of points on the star or sides on the polygon.\r\n\t * @param {Number} pointSize The depth or \"pointy-ness\" of the star points. A pointSize of 0 will draw a regular\r\n\t * polygon (no points), a pointSize of 1 will draw nothing because the points are infinitely pointy.\r\n\t * @param {Number} angle The angle of the first point / corner. For example a value of 0 will draw the first point\r\n\t * directly to the right of the center.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.drawPolyStar = function(x, y, radius, sides, pointSize, angle) {\r\n\t\treturn this.append(new G.PolyStar(x, y, radius, sides, pointSize, angle));\r\n\t};\r\n\r\n\t/**\r\n\t * Appends a graphics command object to the graphics queue. Command objects expose an \"exec\" method\r\n\t * that accepts two parameters: the Context2D to operate on, and an arbitrary data object passed into\r\n\t * {{#crossLink \"Graphics/draw\"}}{{/crossLink}}. The latter will usually be the Shape instance that called draw.\r\n\t *\r\n\t * This method is used internally by Graphics methods, such as drawCircle, but can also be used directly to insert\r\n\t * built-in or custom graphics commands. For example:\r\n\t *\r\n\t * \t\t// attach data to our shape, so we can access it during the draw:\r\n\t * \t\tmyShape.color = \"red\";\r\n\t *\r\n\t * \t\t// append a Circle command object:\r\n\t * \t\tmyShape.graphics.append(new createjs.Graphics.Circle(50, 50, 30));\r\n\t *\r\n\t * \t\t// append a custom command object with an exec method that sets the fill style\r\n\t * \t\t// based on the shape's data, and then fills the circle.\r\n\t * \t\tmyShape.graphics.append({exec:function(ctx, shape) {\r\n\t * \t\t\tctx.fillStyle = shape.color;\r\n\t * \t\t\tctx.fill();\r\n\t * \t\t}});\r\n\t *\r\n\t * @method append\r\n\t * @param {Object} command A graphics command object exposing an \"exec\" method.\r\n\t * @param {boolean} clean The clean param is primarily for internal use. A value of true indicates that a command does not generate a path that should be stroked or filled.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.append = function(command, clean) {\r\n\t\tthis._activeInstructions.push(command);\r\n\t\tthis.command = command;\r\n\t\tif (!clean) { this._dirty = true; }\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Decodes a compact encoded path string into a series of draw instructions.\r\n\t * This format is not intended to be human readable, and is meant for use by authoring tools.\r\n\t * The format uses a base64 character set, with each character representing 6 bits, to define a series of draw\r\n\t * commands.\r\n\t *\r\n\t * Each command is comprised of a single \"header\" character followed by a variable number of alternating x and y\r\n\t * position values. Reading the header bits from left to right (most to least significant): bits 1 to 3 specify the\r\n\t * type of operation (0-moveTo, 1-lineTo, 2-quadraticCurveTo, 3-bezierCurveTo, 4-closePath, 5-7 unused). Bit 4\r\n\t * indicates whether position values use 12 bits (2 characters) or 18 bits (3 characters), with a one indicating the\r\n\t * latter. Bits 5 and 6 are currently unused.\r\n\t *\r\n\t * Following the header is a series of 0 (closePath), 2 (moveTo, lineTo), 4 (quadraticCurveTo), or 6 (bezierCurveTo)\r\n\t * parameters. These parameters are alternating x/y positions represented by 2 or 3 characters (as indicated by the\r\n\t * 4th bit in the command char). These characters consist of a 1 bit sign (1 is negative, 0 is positive), followed\r\n\t * by an 11 (2 char) or 17 (3 char) bit integer value. All position values are in tenths of a pixel. Except in the\r\n\t * case of move operations which are absolute, this value is a delta from the previous x or y position (as\r\n\t * appropriate).\r\n\t *\r\n\t * For example, the string \"A3cAAMAu4AAA\" represents a line starting at -150,0 and ending at 150,0.\r\n\t *
A - bits 000000. First 3 bits (000) indicate a moveTo operation. 4th bit (0) indicates 2 chars per\r\n\t * parameter.\r\n\t *
n0 - 110111011100. Absolute x position of -150.0px. First bit indicates a negative value, remaining bits\r\n\t * indicate 1500 tenths of a pixel.\r\n\t *
AA - 000000000000. Absolute y position of 0.\r\n\t *
I - 001100. First 3 bits (001) indicate a lineTo operation. 4th bit (1) indicates 3 chars per parameter.\r\n\t *
Au4 - 000000101110111000. An x delta of 300.0px, which is added to the previous x value of -150.0px to\r\n\t * provide an absolute position of +150.0px.\r\n\t *
AAA - 000000000000000000. A y delta value of 0.\r\n\t *\r\n\t * A tiny API method \"p\" also exists.\r\n\t * @method decodePath\r\n\t * @param {String} str The path string to decode.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.decodePath = function(str) {\r\n\t\tvar instructions = [this.moveTo, this.lineTo, this.quadraticCurveTo, this.bezierCurveTo, this.closePath];\r\n\t\tvar paramCount = [2, 2, 4, 6, 0];\r\n\t\tvar i=0, l=str.length;\r\n\t\tvar params = [];\r\n\t\tvar x=0, y=0;\r\n\t\tvar base64 = Graphics.BASE_64;\r\n\r\n\t\twhile (i>3; // highest order bits 1-3 code for operation.\r\n\t\t\tvar f = instructions[fi];\r\n\t\t\t// check that we have a valid instruction & that the unused bits are empty:\r\n\t\t\tif (!f || (n&3)) { throw(\"bad path data (@\"+i+\"): \"+c); }\r\n\t\t\tvar pl = paramCount[fi];\r\n\t\t\tif (!fi) { x=y=0; } // move operations reset the position.\r\n\t\t\tparams.length = 0;\r\n\t\t\ti++;\r\n\t\t\tvar charCount = (n>>2&1)+2; // 4th header bit indicates number size for this operation.\r\n\t\t\tfor (var p=0; p>5) ? -1 : 1;\r\n\t\t\t\tnum = ((num&31)<<6)|(base64[str.charAt(i+1)]);\r\n\t\t\t\tif (charCount == 3) { num = (num<<6)|(base64[str.charAt(i+2)]); }\r\n\t\t\t\tnum = sign*num/10;\r\n\t\t\t\tif (p%2) { x = (num += x); }\r\n\t\t\t\telse { y = (num += y); }\r\n\t\t\t\tparams[p] = num;\r\n\t\t\t\ti += charCount;\r\n\t\t\t}\r\n\t\t\tf.apply(this,params);\r\n\t\t}\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Stores all graphics commands so they won't be executed in future draws. Calling store() a second time adds to\r\n\t * the existing store. This also affects `drawAsPath()`.\r\n\t *\r\n\t * This is useful in cases where you are creating vector graphics in an iterative manner (ex. generative art), so\r\n\t * that only new graphics need to be drawn (which can provide huge performance benefits), but you wish to retain all\r\n\t * of the vector instructions for later use (ex. scaling, modifying, or exporting).\r\n\t *\r\n\t * Note that calling store() will force the active path (if any) to be ended in a manner similar to changing\r\n\t * the fill or stroke.\r\n\t *\r\n\t * For example, consider a application where the user draws lines with the mouse. As each line segment (or collection of\r\n\t * segments) are added to a Shape, it can be rasterized using {{#crossLink \"DisplayObject/updateCache\"}}{{/crossLink}},\r\n\t * and then stored, so that it can be redrawn at a different scale when the application is resized, or exported to SVG.\r\n\t *\r\n\t * \t// set up cache:\r\n\t * \tmyShape.cache(0,0,500,500,scale);\r\n\t *\r\n\t * \t// when the user drags, draw a new line:\r\n\t * \tmyShape.graphics.moveTo(oldX,oldY).lineTo(newX,newY);\r\n\t * \t// then draw it into the existing cache:\r\n\t * \tmyShape.updateCache(\"source-over\");\r\n\t * \t// store the new line, so it isn't redrawn next time:\r\n\t * \tmyShape.store();\r\n\t *\r\n\t * \t// then, when the window resizes, we can re-render at a different scale:\r\n\t * \t// first, unstore all our lines:\r\n\t * \tmyShape.unstore();\r\n\t * \t// then cache using the new scale:\r\n\t * \tmyShape.cache(0,0,500,500,newScale);\r\n\t * \t// finally, store the existing commands again:\r\n\t * \tmyShape.store();\r\n\t *\r\n\t * @method store\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.store = function() {\r\n\t\tthis._updateInstructions(true);\r\n\t\tthis._storeIndex = this._instructions.length;\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Unstores any graphics commands that were previously stored using {{#crossLink \"Graphics/store\"}}{{/crossLink}}\r\n\t * so that they will be executed in subsequent draw calls.\r\n\t *\r\n\t * @method unstore\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.unstore = function() {\r\n\t\tthis._storeIndex = 0;\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a clone of this Graphics instance. Note that the individual command objects are not cloned.\r\n\t * @method clone\r\n\t * @return {Graphics} A clone of the current Graphics instance.\r\n\t **/\r\n\tp.clone = function() {\r\n\t\tvar o = new Graphics();\r\n\t\to.command = this.command;\r\n\t\to._stroke = this._stroke;\r\n\t\to._strokeStyle = this._strokeStyle;\r\n\t\to._strokeDash = this._strokeDash;\r\n\t\to._strokeIgnoreScale = this._strokeIgnoreScale;\r\n\t\to._fill = this._fill;\r\n\t\to._instructions = this._instructions.slice();\r\n\t\to._commitIndex = this._commitIndex;\r\n\t\to._activeInstructions = this._activeInstructions.slice();\r\n\t\to._dirty = this._dirty;\r\n\t\to._storeIndex = this._storeIndex;\r\n\t\treturn o;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a string representation of this object.\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t **/\r\n\tp.toString = function() {\r\n\t\treturn \"[Graphics]\";\r\n\t};\r\n\r\n\r\n// tiny API:\r\n\t/**\r\n\t * Shortcut to moveTo.\r\n\t * @method mt\r\n\t * @param {Number} x The x coordinate the drawing point should move to.\r\n\t * @param {Number} y The y coordinate the drawing point should move to.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls).\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.mt = p.moveTo;\r\n\r\n\t/**\r\n\t * Shortcut to lineTo.\r\n\t * @method lt\r\n\t * @param {Number} x The x coordinate the drawing point should draw to.\r\n\t * @param {Number} y The y coordinate the drawing point should draw to.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.lt = p.lineTo;\r\n\r\n\t/**\r\n\t * Shortcut to arcTo.\r\n\t * @method at\r\n\t * @param {Number} x1\r\n\t * @param {Number} y1\r\n\t * @param {Number} x2\r\n\t * @param {Number} y2\r\n\t * @param {Number} radius\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.at = p.arcTo;\r\n\r\n\t/**\r\n\t * Shortcut to bezierCurveTo.\r\n\t * @method bt\r\n\t * @param {Number} cp1x\r\n\t * @param {Number} cp1y\r\n\t * @param {Number} cp2x\r\n\t * @param {Number} cp2y\r\n\t * @param {Number} x\r\n\t * @param {Number} y\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.bt = p.bezierCurveTo;\r\n\r\n\t/**\r\n\t * Shortcut to quadraticCurveTo / curveTo.\r\n\t * @method qt\r\n\t * @param {Number} cpx\r\n\t * @param {Number} cpy\r\n\t * @param {Number} x\r\n\t * @param {Number} y\r\n\t * @protected\r\n\t * @chainable\r\n\t **/\r\n\tp.qt = p.quadraticCurveTo;\r\n\r\n\t/**\r\n\t * Shortcut to arc.\r\n\t * @method a\r\n\t * @param {Number} x\r\n\t * @param {Number} y\r\n\t * @param {Number} radius\r\n\t * @param {Number} startAngle Measured in radians.\r\n\t * @param {Number} endAngle Measured in radians.\r\n\t * @param {Boolean} anticlockwise\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @protected\r\n\t * @chainable\r\n\t **/\r\n\tp.a = p.arc;\r\n\r\n\t/**\r\n\t * Shortcut to rect.\r\n\t * @method r\r\n\t * @param {Number} x\r\n\t * @param {Number} y\r\n\t * @param {Number} w Width of the rectangle\r\n\t * @param {Number} h Height of the rectangle\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.r = p.rect;\r\n\r\n\t/**\r\n\t * Shortcut to closePath.\r\n\t * @method cp\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.cp = p.closePath;\r\n\r\n\t/**\r\n\t * Shortcut to clear.\r\n\t * @method c\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.c = p.clear;\r\n\r\n\t/**\r\n\t * Shortcut to beginFill.\r\n\t * @method f\r\n\t * @param {String} color A CSS compatible color value (ex. \"red\", \"#FF0000\", or \"rgba(255,0,0,0.5)\"). Setting to\r\n\t * null will result in no fill.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.f = p.beginFill;\r\n\r\n\t/**\r\n\t * Shortcut to beginLinearGradientFill.\r\n\t * @method lf\r\n\t * @param {Array} colors An array of CSS compatible color values. For example, [\"#F00\",\"#00F\"] would define a gradient\r\n\t * drawing from red to blue.\r\n\t * @param {Array} ratios An array of gradient positions which correspond to the colors. For example, [0.1, 0.9] would draw\r\n\t * the first color to 10% then interpolating to the second color at 90%.\r\n\t * @param {Number} x0 The position of the first point defining the line that defines the gradient direction and size.\r\n\t * @param {Number} y0 The position of the first point defining the line that defines the gradient direction and size.\r\n\t * @param {Number} x1 The position of the second point defining the line that defines the gradient direction and size.\r\n\t * @param {Number} y1 The position of the second point defining the line that defines the gradient direction and size.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.lf = p.beginLinearGradientFill;\r\n\r\n\t/**\r\n\t * Shortcut to beginRadialGradientFill.\r\n\t * @method rf\r\n\t * @param {Array} colors An array of CSS compatible color values. For example, [\"#F00\",\"#00F\"] would define\r\n\t * a gradient drawing from red to blue.\r\n\t * @param {Array} ratios An array of gradient positions which correspond to the colors. For example, [0.1,\r\n\t * 0.9] would draw the first color to 10% then interpolating to the second color at 90%.\r\n\t * @param {Number} x0 Center position of the inner circle that defines the gradient.\r\n\t * @param {Number} y0 Center position of the inner circle that defines the gradient.\r\n\t * @param {Number} r0 Radius of the inner circle that defines the gradient.\r\n\t * @param {Number} x1 Center position of the outer circle that defines the gradient.\r\n\t * @param {Number} y1 Center position of the outer circle that defines the gradient.\r\n\t * @param {Number} r1 Radius of the outer circle that defines the gradient.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.rf = p.beginRadialGradientFill;\r\n\r\n\t/**\r\n\t * Shortcut to beginBitmapFill.\r\n\t * @method bf\r\n\t * @param {HTMLImageElement | HTMLCanvasElement | HTMLVideoElement} image The Image, Canvas, or Video object to use\r\n\t * as the pattern.\r\n\t * @param {String} repetition Optional. Indicates whether to repeat the image in the fill area. One of \"repeat\",\r\n\t * \"repeat-x\", \"repeat-y\", or \"no-repeat\". Defaults to \"repeat\". Note that Firefox does not support \"repeat-x\" or\r\n\t * \"repeat-y\" (latest tests were in FF 20.0), and will default to \"repeat\".\r\n\t * @param {Matrix2D} matrix Optional. Specifies a transformation matrix for the bitmap fill. This transformation\r\n\t * will be applied relative to the parent transform.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.bf = p.beginBitmapFill;\r\n\r\n\t/**\r\n\t * Shortcut to endFill.\r\n\t * @method ef\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.ef = p.endFill;\r\n\r\n\t/**\r\n\t * Shortcut to setStrokeStyle.\r\n\t * @method ss\r\n\t * @param {Number} thickness The width of the stroke.\r\n\t * @param {String | Number} [caps=0] Indicates the type of caps to use at the end of lines. One of butt,\r\n\t * round, or square. Defaults to \"butt\". Also accepts the values 0 (butt), 1 (round), and 2 (square) for use with\r\n\t * the tiny API.\r\n\t * @param {String | Number} [joints=0] Specifies the type of joints that should be used where two lines meet.\r\n\t * One of bevel, round, or miter. Defaults to \"miter\". Also accepts the values 0 (miter), 1 (round), and 2 (bevel)\r\n\t * for use with the tiny API.\r\n\t * @param {Number} [miterLimit=10] If joints is set to \"miter\", then you can specify a miter limit ratio which\r\n\t * controls at what point a mitered joint will be clipped.\r\n\t * @param {Boolean} [ignoreScale=false] If true, the stroke will be drawn at the specified thickness regardless\r\n\t * of active transformations.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.ss = p.setStrokeStyle;\r\n\t\r\n\t/**\r\n\t * Shortcut to setStrokeDash.\r\n\t * @method sd\r\n\t * @param {Array} [segments] An array specifying the dash pattern, alternating between line and gap.\r\n\t * For example, [20,10] would create a pattern of 20 pixel lines with 10 pixel gaps between them.\r\n\t * Passing null or an empty array will clear any existing dash.\r\n\t * @param {Number} [offset=0] The offset of the dash pattern. For example, you could increment this value to create a \"marching ants\" effect.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.sd = p.setStrokeDash;\r\n\r\n\t/**\r\n\t * Shortcut to beginStroke.\r\n\t * @method s\r\n\t * @param {String} color A CSS compatible color value (ex. \"#FF0000\", \"red\", or \"rgba(255,0,0,0.5)\"). Setting to\r\n\t * null will result in no stroke.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.s = p.beginStroke;\r\n\r\n\t/**\r\n\t * Shortcut to beginLinearGradientStroke.\r\n\t * @method ls\r\n\t * @param {Array} colors An array of CSS compatible color values. For example, [\"#F00\",\"#00F\"] would define\r\n\t * a gradient drawing from red to blue.\r\n\t * @param {Array} ratios An array of gradient positions which correspond to the colors. For example, [0.1,\r\n\t * 0.9] would draw the first color to 10% then interpolating to the second color at 90%.\r\n\t * @param {Number} x0 The position of the first point defining the line that defines the gradient direction and size.\r\n\t * @param {Number} y0 The position of the first point defining the line that defines the gradient direction and size.\r\n\t * @param {Number} x1 The position of the second point defining the line that defines the gradient direction and size.\r\n\t * @param {Number} y1 The position of the second point defining the line that defines the gradient direction and size.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.ls = p.beginLinearGradientStroke;\r\n\r\n\t/**\r\n\t * Shortcut to beginRadialGradientStroke.\r\n\t * @method rs\r\n\t * @param {Array} colors An array of CSS compatible color values. For example, [\"#F00\",\"#00F\"] would define\r\n\t * a gradient drawing from red to blue.\r\n\t * @param {Array} ratios An array of gradient positions which correspond to the colors. For example, [0.1,\r\n\t * 0.9] would draw the first color to 10% then interpolating to the second color at 90%, then draw the second color\r\n\t * to 100%.\r\n\t * @param {Number} x0 Center position of the inner circle that defines the gradient.\r\n\t * @param {Number} y0 Center position of the inner circle that defines the gradient.\r\n\t * @param {Number} r0 Radius of the inner circle that defines the gradient.\r\n\t * @param {Number} x1 Center position of the outer circle that defines the gradient.\r\n\t * @param {Number} y1 Center position of the outer circle that defines the gradient.\r\n\t * @param {Number} r1 Radius of the outer circle that defines the gradient.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.rs = p.beginRadialGradientStroke;\r\n\r\n\t/**\r\n\t * Shortcut to beginBitmapStroke.\r\n\t * @method bs\r\n\t * @param {HTMLImageElement | HTMLCanvasElement | HTMLVideoElement} image The Image, Canvas, or Video object to use\r\n\t * as the pattern.\r\n\t * @param {String} [repetition=repeat] Optional. Indicates whether to repeat the image in the fill area. One of\r\n\t * \"repeat\", \"repeat-x\", \"repeat-y\", or \"no-repeat\". Defaults to \"repeat\".\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.bs = p.beginBitmapStroke;\r\n\r\n\t/**\r\n\t * Shortcut to endStroke.\r\n\t * @method es\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.es = p.endStroke;\r\n\r\n\t/**\r\n\t * Shortcut to drawRect.\r\n\t * @method dr\r\n\t * @param {Number} x\r\n\t * @param {Number} y\r\n\t * @param {Number} w Width of the rectangle\r\n\t * @param {Number} h Height of the rectangle\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.dr = p.drawRect;\r\n\r\n\t/**\r\n\t * Shortcut to drawRoundRect.\r\n\t * @method rr\r\n\t * @param {Number} x\r\n\t * @param {Number} y\r\n\t * @param {Number} w\r\n\t * @param {Number} h\r\n\t * @param {Number} radius Corner radius.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.rr = p.drawRoundRect;\r\n\r\n\t/**\r\n\t * Shortcut to drawRoundRectComplex.\r\n\t * @method rc\r\n\t * @param {Number} x The horizontal coordinate to draw the round rect.\r\n\t * @param {Number} y The vertical coordinate to draw the round rect.\r\n\t * @param {Number} w The width of the round rect.\r\n\t * @param {Number} h The height of the round rect.\r\n\t * @param {Number} radiusTL Top left corner radius.\r\n\t * @param {Number} radiusTR Top right corner radius.\r\n\t * @param {Number} radiusBR Bottom right corner radius.\r\n\t * @param {Number} radiusBL Bottom left corner radius.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.rc = p.drawRoundRectComplex;\r\n\r\n\t/**\r\n\t * Shortcut to drawCircle.\r\n\t * @method dc\r\n\t * @param {Number} x x coordinate center point of circle.\r\n\t * @param {Number} y y coordinate center point of circle.\r\n\t * @param {Number} radius Radius of circle.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.dc = p.drawCircle;\r\n\r\n\t/**\r\n\t * Shortcut to drawEllipse.\r\n\t * @method de\r\n\t * @param {Number} x The left coordinate point of the ellipse. Note that this is different from {{#crossLink \"Graphics/drawCircle\"}}{{/crossLink}}\r\n\t * which draws from center.\r\n\t * @param {Number} y The top coordinate point of the ellipse. Note that this is different from {{#crossLink \"Graphics/drawCircle\"}}{{/crossLink}}\r\n\t * which draws from the center.\r\n\t * @param {Number} w The height (horizontal diameter) of the ellipse. The horizontal radius will be half of this\r\n\t * number.\r\n\t * @param {Number} h The width (vertical diameter) of the ellipse. The vertical radius will be half of this number.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.de = p.drawEllipse;\r\n\r\n\t/**\r\n\t * Shortcut to drawPolyStar.\r\n\t * @method dp\r\n\t * @param {Number} x Position of the center of the shape.\r\n\t * @param {Number} y Position of the center of the shape.\r\n\t * @param {Number} radius The outer radius of the shape.\r\n\t * @param {Number} sides The number of points on the star or sides on the polygon.\r\n\t * @param {Number} pointSize The depth or \"pointy-ness\" of the star points. A pointSize of 0 will draw a regular\r\n\t * polygon (no points), a pointSize of 1 will draw nothing because the points are infinitely pointy.\r\n\t * @param {Number} angle The angle of the first point / corner. For example a value of 0 will draw the first point\r\n\t * directly to the right of the center.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.dp = p.drawPolyStar;\r\n\r\n\t/**\r\n\t * Shortcut to decodePath.\r\n\t * @method p\r\n\t * @param {String} str The path string to decode.\r\n\t * @return {Graphics} The Graphics instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t * @protected\r\n\t **/\r\n\tp.p = p.decodePath;\r\n\r\n\r\n// private methods:\r\n\t/**\r\n\t * @method _updateInstructions\r\n\t * @param commit\r\n\t * @protected\r\n\t **/\r\n\tp._updateInstructions = function(commit) {\r\n\t\tvar instr = this._instructions, active = this._activeInstructions, commitIndex = this._commitIndex;\r\n\r\n\t\tif (this._dirty && active.length) {\r\n\t\t\tinstr.length = commitIndex; // remove old, uncommitted commands\r\n\t\t\tinstr.push(Graphics.beginCmd);\r\n\r\n\t\t\tvar l = active.length, ll = instr.length;\r\n\t\t\tinstr.length = ll+l;\r\n\t\t\tfor (var i=0; i= 2) {\r\n\t\t\tvar o = this.style = Graphics._ctx.createPattern(image, repetition || \"\");\r\n\t\t\to.props = {image: image, repetition: repetition, type: \"bitmap\"};\r\n\t\t}\r\n\t\treturn this;\r\n\t};\r\n\tp.path = false;\r\n\r\n\t/**\r\n\t * Graphics command object. See {{#crossLink \"Graphics/beginStroke\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.\r\n\t * @class Stroke\r\n\t * @constructor\r\n\t * @param {Object} style A valid Context2D fillStyle.\r\n\t * @param {Boolean} ignoreScale\r\n\t **/\r\n\t/**\r\n\t * A valid Context2D strokeStyle.\r\n\t * @property style\r\n\t * @type Object\r\n\t */\r\n\t/**\r\n\t * @property ignoreScale\r\n\t * @type Boolean\r\n\t */\r\n\t/**\r\n\t * Execute the Graphics command in the provided Canvas context.\r\n\t * @method exec\r\n\t * @param {CanvasRenderingContext2D} ctx The canvas rendering context\r\n\t */\r\n\tp = (G.Stroke = function(style, ignoreScale) {\r\n\t\tthis.style = style;\r\n\t\tthis.ignoreScale = ignoreScale;\r\n\t}).prototype;\r\n\tp.exec = function(ctx) {\r\n\t\tif (!this.style) { return; }\r\n\t\tctx.strokeStyle = this.style;\r\n\t\tif (this.ignoreScale) { ctx.save(); ctx.setTransform(1,0,0,1,0,0); }\r\n\t\tctx.stroke();\r\n\t\tif (this.ignoreScale) { ctx.restore(); }\r\n\t};\r\n\t/**\r\n\t * Creates a linear gradient style and assigns it to {{#crossLink \"Stroke/style:property\"}}{{/crossLink}}.\r\n\t * See {{#crossLink \"Graphics/beginLinearGradientStroke\"}}{{/crossLink}} for more information.\r\n\t * @method linearGradient\r\n\t * @param {Array} colors\r\n\t * @param {Array} ratios\r\n\t * @param {Number} x0\r\n\t * @param {Number} y0\r\n\t * @param {Number} x1\r\n\t * @param {Number} y1\r\n\t * @return {Fill} Returns this Stroke object for chaining or assignment.\r\n\t */\r\n\tp.linearGradient = G.Fill.prototype.linearGradient;\r\n\t/**\r\n\t * Creates a radial gradient style and assigns it to {{#crossLink \"Stroke/style:property\"}}{{/crossLink}}.\r\n\t * See {{#crossLink \"Graphics/beginRadialGradientStroke\"}}{{/crossLink}} for more information.\r\n\t * @method radialGradient\r\n\t * @param {Array} colors\r\n\t * @param {Array} ratios\r\n\t * @param {Number} x0\r\n\t * @param {Number} y0\r\n\t * @param {Number} r0\r\n\t * @param {Number} x1\r\n\t * @param {Number} y1\r\n\t * @param {Number} r1\r\n\t * @return {Fill} Returns this Stroke object for chaining or assignment.\r\n\t */\r\n\tp.radialGradient = G.Fill.prototype.radialGradient;\r\n\t/**\r\n\t * Creates a bitmap fill style and assigns it to {{#crossLink \"Stroke/style:property\"}}{{/crossLink}}.\r\n\t * See {{#crossLink \"Graphics/beginBitmapStroke\"}}{{/crossLink}} for more information.\r\n\t * @method bitmap\r\n\t * @param {HTMLImageElement} image\r\n\t * @param {String} [repetition] One of: repeat, repeat-x, repeat-y, or no-repeat.\r\n\t * @return {Fill} Returns this Stroke object for chaining or assignment.\r\n\t */\r\n\tp.bitmap = G.Fill.prototype.bitmap;\r\n\tp.path = false;\r\n\r\n\t/**\r\n\t * Graphics command object. See {{#crossLink \"Graphics/setStrokeStyle\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.\r\n\t * @class StrokeStyle\r\n\t * @constructor\r\n\t * @param {Number} width\r\n\t * @param {String} [caps=butt]\r\n\t * @param {String} [joints=miter]\r\n\t * @param {Number} [miterLimit=10]\r\n\t * @param {Boolean} [ignoreScale=false]\r\n\t **/\r\n\t/**\r\n\t * @property width\r\n\t * @type Number\r\n\t */\r\n\t/**\r\n\t * One of: butt, round, square\r\n\t * @property caps\r\n\t * @type String\r\n\t */\r\n\t/**\r\n\t * One of: round, bevel, miter\r\n\t * @property joints\r\n\t * @type String\r\n\t */\r\n\t/**\r\n\t * @property miterLimit\r\n\t * @type Number\r\n\t */\r\n\t/**\r\n\t * Execute the Graphics command in the provided Canvas context.\r\n\t * @method exec\r\n\t * @param {CanvasRenderingContext2D} ctx The canvas rendering context\r\n\t */\r\n\tp = (G.StrokeStyle = function(width, caps, joints, miterLimit, ignoreScale) {\r\n\t\tthis.width = width;\r\n\t\tthis.caps = caps;\r\n\t\tthis.joints = joints;\r\n\t\tthis.miterLimit = miterLimit;\r\n\t\tthis.ignoreScale = ignoreScale;\r\n\t}).prototype;\r\n\tp.exec = function(ctx) {\r\n\t\tctx.lineWidth = (this.width == null ? \"1\" : this.width);\r\n\t\tctx.lineCap = (this.caps == null ? \"butt\" : (isNaN(this.caps) ? this.caps : Graphics.STROKE_CAPS_MAP[this.caps]));\r\n\t\tctx.lineJoin = (this.joints == null ? \"miter\" : (isNaN(this.joints) ? this.joints : Graphics.STROKE_JOINTS_MAP[this.joints]));\r\n\t\tctx.miterLimit = (this.miterLimit == null ? \"10\" : this.miterLimit);\r\n\t\tctx.ignoreScale = (this.ignoreScale == null ? false : this.ignoreScale);\r\n\t};\r\n\tp.path = false;\r\n\t\r\n\t/**\r\n\t * Graphics command object. See {{#crossLink \"Graphics/setStrokeDash\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.\r\n\t * @class StrokeDash\r\n\t * @constructor\r\n\t * @param {Array} [segments]\r\n\t * @param {Number} [offset=0]\r\n\t **/\r\n\t/**\r\n\t * @property segments\r\n\t * @type Array\r\n\t */\r\n\t/**\r\n\t * @property offset\r\n\t * @type Number\r\n\t */\r\n\t/**\r\n\t * Execute the Graphics command in the provided Canvas context.\r\n\t * @method exec\r\n\t * @param {CanvasRenderingContext2D} ctx The canvas rendering context\r\n\t */\r\n\t(G.StrokeDash = function(segments, offset) {\r\n\t\tthis.segments = segments;\r\n\t\tthis.offset = offset||0;\r\n\t}).prototype.exec = function(ctx) {\r\n\t\tif (ctx.setLineDash) { // feature detection.\r\n\t\t\tctx.setLineDash(this.segments|| G.StrokeDash.EMPTY_SEGMENTS); // instead of [] to reduce churn.\r\n\t\t\tctx.lineDashOffset = this.offset||0;\r\n\t\t}\r\n\t};\r\n\t/**\r\n\t * The default value for segments (ie. no dash).\r\n\t * @property EMPTY_SEGMENTS\r\n\t * @static\r\n\t * @final\r\n\t * @readonly\r\n\t * @protected\r\n\t * @type {Array}\r\n\t **/\r\n\tG.StrokeDash.EMPTY_SEGMENTS = [];\r\n\r\n\t/**\r\n\t * Graphics command object. See {{#crossLink \"Graphics/drawRoundRectComplex\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.\r\n\t * @class RoundRect\r\n\t * @constructor\r\n\t * @param {Number} x\r\n\t * @param {Number} y\r\n\t * @param {Number} w\r\n\t * @param {Number} h\r\n\t * @param {Number} radiusTL\r\n\t * @param {Number} radiusTR\r\n\t * @param {Number} radiusBR\r\n\t * @param {Number} radiusBL\r\n\t **/\r\n\t/**\r\n\t * @property x\r\n\t * @type Number\r\n\t */\r\n\t/**\r\n\t * @property y\r\n\t * @type Number\r\n\t */\r\n\t/**\r\n\t * @property w\r\n\t * @type Number\r\n\t */\r\n\t/**\r\n\t * @property h\r\n\t * @type Number\r\n\t */\r\n\t/**\r\n\t * @property radiusTL\r\n\t * @type Number\r\n\t */\r\n\t/**\r\n\t * @property radiusTR\r\n\t * @type Number\r\n\t */\r\n\t/**\r\n\t * @property radiusBR\r\n\t * @type Number\r\n\t */\r\n\t/**\r\n\t * @property radiusBL\r\n\t * @type Number\r\n\t */\r\n\t/**\r\n\t * Execute the Graphics command in the provided Canvas context.\r\n\t * @method exec\r\n\t * @param {CanvasRenderingContext2D} ctx The canvas rendering context\r\n\t */\r\n\t(G.RoundRect = function(x, y, w, h, radiusTL, radiusTR, radiusBR, radiusBL) {\r\n\t\tthis.x = x; this.y = y;\r\n\t\tthis.w = w; this.h = h;\r\n\t\tthis.radiusTL = radiusTL; this.radiusTR = radiusTR;\r\n\t\tthis.radiusBR = radiusBR; this.radiusBL = radiusBL;\r\n\t}).prototype.exec = function(ctx) {\r\n\t\tvar max = (w max) { rTL = max; }\r\n\t\tif (rTR < 0) { rTR *= (mTR=-1); }\r\n\t\tif (rTR > max) { rTR = max; }\r\n\t\tif (rBR < 0) { rBR *= (mBR=-1); }\r\n\t\tif (rBR > max) { rBR = max; }\r\n\t\tif (rBL < 0) { rBL *= (mBL=-1); }\r\n\t\tif (rBL > max) { rBL = max; }\r\n\r\n\t\tctx.moveTo(x+w-rTR, y);\r\n\t\tctx.arcTo(x+w+rTR*mTR, y-rTR*mTR, x+w, y+rTR, rTR);\r\n\t\tctx.lineTo(x+w, y+h-rBR);\r\n\t\tctx.arcTo(x+w+rBR*mBR, y+h+rBR*mBR, x+w-rBR, y+h, rBR);\r\n\t\tctx.lineTo(x+rBL, y+h);\r\n\t\tctx.arcTo(x-rBL*mBL, y+h+rBL*mBL, x, y+h-rBL, rBL);\r\n\t\tctx.lineTo(x, y+rTL);\r\n\t\tctx.arcTo(x-rTL*mTL, y-rTL*mTL, x+rTL, y, rTL);\r\n\t\tctx.closePath();\r\n\t};\r\n\r\n\t/**\r\n\t * Graphics command object. See {{#crossLink \"Graphics/drawCircle\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.\r\n\t * @class Circle\r\n\t * @constructor\r\n\t * @param {Number} x\r\n\t * @param {Number} y\r\n\t * @param {Number} radius\r\n\t **/\r\n\t/**\r\n\t * @property x\r\n\t * @type Number\r\n\t */\r\n\t/**\r\n\t * @property y\r\n\t * @type Number\r\n\t */\r\n\t/**\r\n\t * @property radius\r\n\t * @type Number\r\n\t */\r\n\t/**\r\n\t * Execute the Graphics command in the provided Canvas context.\r\n\t * @method exec\r\n\t * @param {CanvasRenderingContext2D} ctx The canvas rendering context\r\n\t */\r\n\t(G.Circle = function(x, y, radius) {\r\n\t\tthis.x = x; this.y = y;\r\n\t\tthis.radius = radius;\r\n\t}).prototype.exec = function(ctx) { ctx.arc(this.x, this.y, this.radius, 0, Math.PI*2); };\r\n\r\n\t/**\r\n\t * Graphics command object. See {{#crossLink \"Graphics/drawEllipse\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.\r\n\t * @class Ellipse\r\n\t * @constructor\r\n\t * @param {Number} x\r\n\t * @param {Number} y\r\n\t * @param {Number} w\r\n\t * @param {Number} h\r\n\t **/\r\n\t/**\r\n\t * @property x\r\n\t * @type Number\r\n\t */\r\n\t/**\r\n\t * @property y\r\n\t * @type Number\r\n\t */\r\n\t/**\r\n\t * @property w\r\n\t * @type Number\r\n\t */\r\n\t/**\r\n\t * @property h\r\n\t * @type Number\r\n\t */\r\n\t/**\r\n\t * Execute the Graphics command in the provided Canvas context.\r\n\t * @method exec\r\n\t * @param {CanvasRenderingContext2D} ctx The canvas rendering context\r\n\t */\r\n\t(G.Ellipse = function(x, y, w, h) {\r\n\t\tthis.x = x; this.y = y;\r\n\t\tthis.w = w; this.h = h;\r\n\t}).prototype.exec = function(ctx) {\r\n\t\tvar x = this.x, y = this.y;\r\n\t\tvar w = this.w, h = this.h;\r\n\r\n\t\tvar k = 0.5522848;\r\n\t\tvar ox = (w / 2) * k;\r\n\t\tvar oy = (h / 2) * k;\r\n\t\tvar xe = x + w;\r\n\t\tvar ye = y + h;\r\n\t\tvar xm = x + w / 2;\r\n\t\tvar ym = y + h / 2;\r\n\r\n\t\tctx.moveTo(x, ym);\r\n\t\tctx.bezierCurveTo(x, ym-oy, xm-ox, y, xm, y);\r\n\t\tctx.bezierCurveTo(xm+ox, y, xe, ym-oy, xe, ym);\r\n\t\tctx.bezierCurveTo(xe, ym+oy, xm+ox, ye, xm, ye);\r\n\t\tctx.bezierCurveTo(xm-ox, ye, x, ym+oy, x, ym);\r\n\t};\r\n\r\n\t/**\r\n\t * Graphics command object. See {{#crossLink \"Graphics/drawPolyStar\"}}{{/crossLink}} and {{#crossLink \"Graphics/append\"}}{{/crossLink}} for more information.\r\n\t * @class PolyStar\r\n\t * @constructor\r\n\t * @param {Number} x\r\n\t * @param {Number} y\r\n\t * @param {Number} radius\r\n\t * @param {Number} sides\r\n\t * @param {Number} pointSize\r\n\t * @param {Number} angle\r\n\t **/\r\n\t/**\r\n\t * @property x\r\n\t * @type Number\r\n\t */\r\n\t/**\r\n\t * @property y\r\n\t * @type Number\r\n\t */\r\n\t/**\r\n\t * @property radius\r\n\t * @type Number\r\n\t */\r\n\t/**\r\n\t * @property sides\r\n\t * @type Number\r\n\t */\r\n\t/**\r\n\t * @property pointSize\r\n\t * @type Number\r\n\t */\r\n\t/**\r\n\t * @property angle\r\n\t * @type Number\r\n\t */\r\n\t/**\r\n\t * Execute the Graphics command in the provided Canvas context.\r\n\t * @method exec\r\n\t * @param {CanvasRenderingContext2D} ctx The canvas rendering context\r\n\t */\r\n\t(G.PolyStar = function(x, y, radius, sides, pointSize, angle) {\r\n\t\tthis.x = x; this.y = y;\r\n\t\tthis.radius = radius;\r\n\t\tthis.sides = sides;\r\n\t\tthis.pointSize = pointSize;\r\n\t\tthis.angle = angle;\r\n\t}).prototype.exec = function(ctx) {\r\n\t\tvar x = this.x, y = this.y;\r\n\t\tvar radius = this.radius;\r\n\t\tvar angle = (this.angle||0)/180*Math.PI;\r\n\t\tvar sides = this.sides;\r\n\t\tvar ps = 1-(this.pointSize||0);\r\n\t\tvar a = Math.PI/sides;\r\n\r\n\t\tctx.moveTo(x+Math.cos(angle)*radius, y+Math.sin(angle)*radius);\r\n\t\tfor (var i=0; iNote: In EaselJS 0.7.0, the mouseEnabled property will not work properly with nested Containers. Please\r\n\t\t * check out the latest NEXT version in GitHub for an updated version with this issue resolved. The fix will be\r\n\t\t * provided in the next release of EaselJS.\r\n\t\t * @property mouseEnabled\r\n\t\t * @type {Boolean}\r\n\t\t * @default true\r\n\t\t **/\r\n\t\tthis.mouseEnabled = true;\r\n\r\n\t\t/**\r\n\t\t * If false, the tick will not run on this display object (or its children). This can provide some performance benefits.\r\n\t\t * In addition to preventing the \"tick\" event from being dispatched, it will also prevent tick related updates\r\n\t\t * on some display objects (ex. Sprite & MovieClip frame advancing, and DOMElement display properties).\r\n\t\t * @property tickEnabled\r\n\t\t * @type Boolean\r\n\t\t * @default true\r\n\t\t **/\r\n\t\tthis.tickEnabled = true;\r\n\r\n\t\t/**\r\n\t\t * An optional name for this display object. Included in {{#crossLink \"DisplayObject/toString\"}}{{/crossLink}} . Useful for\r\n\t\t * debugging.\r\n\t\t * @property name\r\n\t\t * @type {String}\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis.name = null;\r\n\r\n\t\t/**\r\n\t\t * A reference to the {{#crossLink \"Container\"}}{{/crossLink}} or {{#crossLink \"Stage\"}}{{/crossLink}} object that\r\n\t\t * contains this display object, or null if it has not been added\r\n\t\t * to one.\r\n\t\t * @property parent\r\n\t\t * @final\r\n\t\t * @type {Container}\r\n\t\t * @default null\r\n\t\t * @readonly\r\n\t\t **/\r\n\t\tthis.parent = null;\r\n\r\n\t\t/**\r\n\t\t * The left offset for this display object's registration point. For example, to make a 100x100px Bitmap rotate\r\n\t\t * around its center, you would set regX and {{#crossLink \"DisplayObject/regY:property\"}}{{/crossLink}} to 50.\r\n\t\t * Cached object's registration points should be set based on pre-cache conditions, not cached size.\r\n\t\t * @property regX\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis.regX = 0;\r\n\r\n\t\t/**\r\n\t\t * The y offset for this display object's registration point. For example, to make a 100x100px Bitmap rotate around\r\n\t\t * its center, you would set {{#crossLink \"DisplayObject/regX:property\"}}{{/crossLink}} and regY to 50.\r\n\t\t * Cached object's registration points should be set based on pre-cache conditions, not cached size.\r\n\t\t * @property regY\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis.regY = 0;\r\n\r\n\t\t/**\r\n\t\t * The rotation in degrees for this display object.\r\n\t\t * @property rotation\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis.rotation = 0;\r\n\r\n\t\t/**\r\n\t\t * The factor to stretch this display object horizontally. For example, setting scaleX to 2 will stretch the display\r\n\t\t * object to twice its nominal width. To horizontally flip an object, set the scale to a negative number.\r\n\t\t * @property scaleX\r\n\t\t * @type {Number}\r\n\t\t * @default 1\r\n\t\t **/\r\n\t\tthis.scaleX = 1;\r\n\r\n\t\t/**\r\n\t\t * The factor to stretch this display object vertically. For example, setting scaleY to 0.5 will stretch the display\r\n\t\t * object to half its nominal height. To vertically flip an object, set the scale to a negative number.\r\n\t\t * @property scaleY\r\n\t\t * @type {Number}\r\n\t\t * @default 1\r\n\t\t **/\r\n\t\tthis.scaleY = 1;\r\n\r\n\t\t/**\r\n\t\t * The factor to skew this display object horizontally.\r\n\t\t * @property skewX\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis.skewX = 0;\r\n\r\n\t\t/**\r\n\t\t * The factor to skew this display object vertically.\r\n\t\t * @property skewY\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis.skewY = 0;\r\n\r\n\t\t/**\r\n\t\t * A shadow object that defines the shadow to render on this display object. Set to `null` to remove a shadow. If\r\n\t\t * null, this property is inherited from the parent container.\r\n\t\t * @property shadow\r\n\t\t * @type {Shadow}\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis.shadow = null;\r\n\r\n\t\t/**\r\n\t\t * Indicates whether this display object should be rendered to the canvas and included when running the Stage\r\n\t\t * {{#crossLink \"Stage/getObjectsUnderPoint\"}}{{/crossLink}} method.\r\n\t\t * @property visible\r\n\t\t * @type {Boolean}\r\n\t\t * @default true\r\n\t\t **/\r\n\t\tthis.visible = true;\r\n\r\n\t\t/**\r\n\t\t * The x (horizontal) position of the display object, relative to its parent.\r\n\t\t * @property x\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis.x = 0;\r\n\r\n\t\t/** The y (vertical) position of the display object, relative to its parent.\r\n\t\t * @property y\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis.y = 0;\r\n\r\n\t\t/**\r\n\t\t * If set, defines the transformation for this display object, overriding all other transformation properties\r\n\t\t * (x, y, rotation, scale, skew).\r\n\t\t * @property transformMatrix\r\n\t\t * @type {Matrix2D}\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis.transformMatrix = null;\r\n\r\n\t\t/**\r\n\t\t * The composite operation indicates how the pixels of this display object will be composited with the elements\r\n\t\t * behind it. If `null`, this property is inherited from the parent container. For more information, read the\r\n\t\t * \r\n\t\t * whatwg spec on compositing. For a list of supported compositeOperation value, visit\r\n\t\t * the W3C draft on Compositing and Blending.\r\n\t\t * @property compositeOperation\r\n\t\t * @type {String}\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis.compositeOperation = null;\r\n\r\n\t\t/**\r\n\t\t * Indicates whether the display object should be drawn to a whole pixel when\r\n\t\t * {{#crossLink \"Stage/snapToPixelEnabled\"}}{{/crossLink}} is true. To enable/disable snapping on whole\r\n\t\t * categories of display objects, set this value on the prototype (Ex. Text.prototype.snapToPixel = true).\r\n\t\t * @property snapToPixel\r\n\t\t * @type {Boolean}\r\n\t\t * @default true\r\n\t\t **/\r\n\t\tthis.snapToPixel = true;\r\n\r\n\t\t/**\r\n\t\t * An array of Filter objects to apply to this display object. Filters are only applied / updated when {{#crossLink \"cache\"}}{{/crossLink}}\r\n\t\t * or {{#crossLink \"updateCache\"}}{{/crossLink}} is called on the display object, and only apply to the area that is\r\n\t\t * cached.\r\n\t\t * @property filters\r\n\t\t * @type {Array}\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis.filters = null;\r\n\r\n\t\t/**\r\n\t\t * A Shape instance that defines a vector mask (clipping path) for this display object. The shape's transformation\r\n\t\t * will be applied relative to the display object's parent coordinates (as if it were a child of the parent).\r\n\t\t * @property mask\r\n\t\t * @type {Shape}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.mask = null;\r\n\r\n\t\t/**\r\n\t\t * A display object that will be tested when checking mouse interactions or testing {{#crossLink \"Container/getObjectsUnderPoint\"}}{{/crossLink}}.\r\n\t\t * The hit area will have its transformation applied relative to this display object's coordinate space (as though\r\n\t\t * the hit test object were a child of this display object and relative to its regX/Y). The hitArea will be tested\r\n\t\t * using only its own `alpha` value regardless of the alpha value on the target display object, or the target's\r\n\t\t * ancestors (parents).\r\n\t\t * \r\n\t\t * If set on a {{#crossLink \"Container\"}}{{/crossLink}}, children of the Container will not receive mouse events.\r\n\t\t * This is similar to setting {{#crossLink \"mouseChildren\"}}{{/crossLink}} to false.\r\n\t\t *\r\n\t\t * Note that hitArea is NOT currently used by the `hitTest()` method, nor is it supported for {{#crossLink \"Stage\"}}{{/crossLink}}.\r\n\t\t * @property hitArea\r\n\t\t * @type {DisplayObject}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.hitArea = null;\r\n\r\n\t\t/**\r\n\t\t * A CSS cursor (ex. \"pointer\", \"help\", \"text\", etc) that will be displayed when the user hovers over this display\r\n\t\t * object. You must enable mouseover events using the {{#crossLink \"Stage/enableMouseOver\"}}{{/crossLink}} method to\r\n\t\t * use this property. Setting a non-null cursor on a Container will override the cursor set on its descendants.\r\n\t\t * @property cursor\r\n\t\t * @type {String}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.cursor = null;\r\n\r\n\r\n\t// private properties:\r\n\t\t/**\r\n\t\t * Moved to {{#crossLink \"BitmapCache\"}}{{/crossLink}}\r\n\t\t * @property _cacheScale\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default 1\r\n\t\t * @deprecated\r\n\t\t **/\r\n\r\n\t\t/**\r\n\t\t * Moved to {{#crossLink \"BitmapCache\"}}{{/crossLink}}\r\n\t\t * @property _cacheDataURLID\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t * @deprecated\r\n\t\t */\r\n\r\n\t\t/**\r\n\t\t * Moved to {{#crossLink \"BitmapCache\"}}{{/crossLink}}\r\n\t\t * @property _cacheDataURL\r\n\t\t * @protected\r\n\t\t * @type {String}\r\n\t\t * @default null\r\n\t\t * @deprecated\r\n\t\t */\r\n\r\n\t\t/**\r\n\t\t * @property _props\r\n\t\t * @protected\r\n\t\t * @type {DisplayObject}\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis._props = new createjs.DisplayProps();\r\n\r\n\t\t/**\r\n\t\t * @property _rectangle\r\n\t\t * @protected\r\n\t\t * @type {Rectangle}\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis._rectangle = new createjs.Rectangle();\r\n\r\n\t\t/**\r\n\t\t * @property _bounds\r\n\t\t * @protected\r\n\t\t * @type {Rectangle}\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis._bounds = null;\r\n\r\n\t\t/**\r\n\t\t * Where StageGL should look for required display properties, matters only for leaf display objects. Containers\r\n\t\t * or cached objects won't use this property, it's for native display of terminal elements.\r\n\t\t * @property _webGLRenderStyle\r\n\t\t * @protected\r\n\t\t * @type {number}\r\n\t\t * @default 0\r\n\t\t */\r\n\t\tthis._webGLRenderStyle = DisplayObject._StageGL_NONE;\r\n\t}\r\n\tvar p = createjs.extend(DisplayObject, createjs.EventDispatcher);\r\n\r\n// static properties:\r\n\t/**\r\n\t * Listing of mouse event names. Used in _hasMouseEventListener.\r\n\t * @property _MOUSE_EVENTS\r\n\t * @protected\r\n\t * @static\r\n\t * @type {Array}\r\n\t **/\r\n\tDisplayObject._MOUSE_EVENTS = [\"click\",\"dblclick\",\"mousedown\",\"mouseout\",\"mouseover\",\"pressmove\",\"pressup\",\"rollout\",\"rollover\"];\r\n\r\n\t/**\r\n\t * Suppresses errors generated when using features like hitTest, mouse events, and {{#crossLink \"getObjectsUnderPoint\"}}{{/crossLink}}\r\n\t * with cross domain content.\r\n\t * @property suppressCrossDomainErrors\r\n\t * @static\r\n\t * @type {Boolean}\r\n\t * @default false\r\n\t **/\r\n\tDisplayObject.suppressCrossDomainErrors = false;\r\n\r\n\t/**\r\n\t * @property _snapToPixelEnabled\r\n\t * @protected\r\n\t * @static\r\n\t * @type {Boolean}\r\n\t * @default false\r\n\t **/\r\n\tDisplayObject._snapToPixelEnabled = false; // stage.snapToPixelEnabled is temporarily copied here during a draw to provide global access.\r\n\r\n\t/**\r\n\t * Enum like property for determining StageGL render lookup, i.e. where to expect properties.\r\n\t * @property _StageGL_NONE\r\n\t * @protected\r\n\t * @static\r\n\t * @type {number}\r\n\t */\r\n\tDisplayObject._StageGL_NONE = 0;\r\n\r\n\t/**\r\n\t * Enum like property for determining StageGL render lookup, i.e. where to expect properties.\r\n\t * @property _StageGL_SPRITE\r\n\t * @protected\r\n\t * @static\r\n\t * @type {number}\r\n\t */\r\n\tDisplayObject._StageGL_SPRITE = 1;\r\n\r\n\t/**\r\n\t * Enum like property for determining StageGL render lookup, i.e. where to expect properties.\r\n\t * @property _StageGL_BITMAP\r\n\t * @protected\r\n\t * @static\r\n\t * @type {number}\r\n\t */\r\n\tDisplayObject._StageGL_BITMAP = 2;\r\n\r\n\t/**\r\n\t * @property _hitTestCanvas\r\n\t * @type {HTMLCanvasElement | Object}\r\n\t * @static\r\n\t * @protected\r\n\t **/\r\n\t/**\r\n\t * @property _hitTestContext\r\n\t * @type {CanvasRenderingContext2D}\r\n\t * @static\r\n\t * @protected\r\n\t **/\r\n\tvar canvas = createjs.createCanvas?createjs.createCanvas():document.createElement(\"canvas\"); // prevent errors on load in browsers without canvas.\r\n\tif (canvas.getContext) {\r\n\t\tDisplayObject._hitTestCanvas = canvas;\r\n\t\tDisplayObject._hitTestContext = canvas.getContext(\"2d\");\r\n\t\tcanvas.width = canvas.height = 1;\r\n\t}\r\n\r\n// events:\r\n\t/**\r\n\t * Dispatched when the user presses their left mouse button over the display object. See the \r\n\t * {{#crossLink \"MouseEvent\"}}{{/crossLink}} class for a listing of event properties.\r\n\t * @event mousedown\r\n\t * @since 0.6.0\r\n\t */\r\n\r\n\t/**\r\n\t * Dispatched when the user presses their left mouse button and then releases it while over the display object.\r\n\t * See the {{#crossLink \"MouseEvent\"}}{{/crossLink}} class for a listing of event properties.\r\n\t * @event click\r\n\t * @since 0.6.0\r\n\t */\r\n\r\n\t/**\r\n\t * Dispatched when the user double clicks their left mouse button over this display object.\r\n\t * See the {{#crossLink \"MouseEvent\"}}{{/crossLink}} class for a listing of event properties.\r\n\t * @event dblclick\r\n\t * @since 0.6.0\r\n\t */\r\n\r\n\t/**\r\n\t * Dispatched when the user's mouse enters this display object. This event must be enabled using \r\n\t * {{#crossLink \"Stage/enableMouseOver\"}}{{/crossLink}}. See also {{#crossLink \"DisplayObject/rollover:event\"}}{{/crossLink}}.\r\n\t * See the {{#crossLink \"MouseEvent\"}}{{/crossLink}} class for a listing of event properties.\r\n\t * @event mouseover\r\n\t * @since 0.6.0\r\n\t */\r\n\r\n\t/**\r\n\t * Dispatched when the user's mouse leaves this display object. This event must be enabled using \r\n\t * {{#crossLink \"Stage/enableMouseOver\"}}{{/crossLink}}. See also {{#crossLink \"DisplayObject/rollout:event\"}}{{/crossLink}}.\r\n\t * See the {{#crossLink \"MouseEvent\"}}{{/crossLink}} class for a listing of event properties.\r\n\t * @event mouseout\r\n\t * @since 0.6.0\r\n\t */\r\n\r\n\t/**\r\n\t * This event is similar to {{#crossLink \"DisplayObject/mouseover:event\"}}{{/crossLink}}, with the following\r\n\t * differences: it does not bubble, and it considers {{#crossLink \"Container\"}}{{/crossLink}} instances as an\r\n\t * aggregate of their content.\r\n\t * \r\n\t * For example, myContainer contains two overlapping children: shapeA and shapeB. The user moves their mouse over\r\n\t * shapeA and then directly on to shapeB. With a listener for {{#crossLink \"mouseover:event\"}}{{/crossLink}} on\r\n\t * myContainer, two events would be received, each targeting a child element:
    \r\n\t *
  1. when the mouse enters shapeA (target=shapeA)
  2. \r\n\t *
  3. when the mouse enters shapeB (target=shapeB)
  4. \r\n\t *
\r\n\t * However, with a listener for \"rollover\" instead, only a single event is received when the mouse first enters\r\n\t * the aggregate myContainer content (target=myContainer).\r\n\t * \r\n\t * This event must be enabled using {{#crossLink \"Stage/enableMouseOver\"}}{{/crossLink}}.\r\n\t * See the {{#crossLink \"MouseEvent\"}}{{/crossLink}} class for a listing of event properties.\r\n\t * @event rollover\r\n\t * @since 0.7.0\r\n\t */\r\n\r\n\t/**\r\n\t * This event is similar to {{#crossLink \"DisplayObject/mouseout:event\"}}{{/crossLink}}, with the following\r\n\t * differences: it does not bubble, and it considers {{#crossLink \"Container\"}}{{/crossLink}} instances as an\r\n\t * aggregate of their content.\r\n\t * \r\n\t * For example, myContainer contains two overlapping children: shapeA and shapeB. The user moves their mouse over\r\n\t * shapeA, then directly on to shapeB, then off both. With a listener for {{#crossLink \"mouseout:event\"}}{{/crossLink}}\r\n\t * on myContainer, two events would be received, each targeting a child element:
    \r\n\t *
  1. when the mouse leaves shapeA (target=shapeA)
  2. \r\n\t *
  3. when the mouse leaves shapeB (target=shapeB)
  4. \r\n\t *
\r\n\t * However, with a listener for \"rollout\" instead, only a single event is received when the mouse leaves\r\n\t * the aggregate myContainer content (target=myContainer).\r\n\t * \r\n\t * This event must be enabled using {{#crossLink \"Stage/enableMouseOver\"}}{{/crossLink}}.\r\n\t * See the {{#crossLink \"MouseEvent\"}}{{/crossLink}} class for a listing of event properties.\r\n\t * @event rollout\r\n\t * @since 0.7.0\r\n\t */\r\n\r\n\t/**\r\n\t * After a {{#crossLink \"DisplayObject/mousedown:event\"}}{{/crossLink}} occurs on a display object, a pressmove\r\n\t * event will be generated on that object whenever the mouse moves until the mouse press is released. This can be\r\n\t * useful for dragging and similar operations.\r\n\t *\r\n\t * **Please note** that if the initial mouse target from a `mousedown` event is removed from the stage after being pressed\r\n\t * (e.g. during a `pressmove` event), a `pressmove` event is still generated. However since it is no longer in the\r\n\t * display list, the event can not bubble. This means that previous ancestors (parent containers) will not receive\r\n\t * the event, and therefore can not re-dispatch it. If you intend to listen for `{{#crossLink \"DisplayObject/pressup:event\"}}{{/crossLink}}`\r\n\t * or `pressmove` on a dynamic object (such as a {{#crossLink \"MovieClip\"}}{{/crossLink}} or {{#crossLink \"Container\"}}{{/crossLink}}),\r\n\t * then ensure you set {{#crossLink \"Container/mouseChildren:property\"}}{{/crossLink}} to `false`.\r\n\t * @event pressmove\r\n\t * @since 0.7.0\r\n\t */\r\n\r\n\t/**\r\n\t * After a {{#crossLink \"DisplayObject/mousedown:event\"}}{{/crossLink}} occurs on a display object, a pressup event\r\n\t * will be generated on that object when that mouse press is released. This can be useful for dragging and similar\r\n\t * operations.\r\n\t *\r\n\t * **Please note** that if the initial mouse target from a `mousedown` event is removed from the stage after being pressed\r\n\t * (e.g. during a `pressmove` event), a `pressup` event is still generated. However since it is no longer in the\r\n\t * display list, the event can not bubble. This means that previous ancestors (parent containers) will not receive\r\n\t * the event, and therefore can not re-dispatch it. If you intend to listen for `{{#crossLink \"DisplayObject/pressmove:event\"}}{{/crossLink}}`\r\n\t * or `pressup` on a dynamic object (such as a {{#crossLink \"MovieClip\"}}{{/crossLink}} or {{#crossLink \"Container\"}}{{/crossLink}}),\r\n\t * then ensure you set {{#crossLink \"Container/mouseChildren:property\"}}{{/crossLink}} to `false`.\r\n\t * @event pressup\r\n\t * @since 0.7.0\r\n\t */\r\n\r\n\t/**\r\n\t * Dispatched when the display object is added to a parent container.\r\n\t * @event added\r\n\t */\r\n\r\n\t/**\r\n\t * Dispatched when the display object is removed from its parent container.\r\n\t * @event removed\r\n\t */\r\n\r\n\t/**\r\n\t * Dispatched on each display object on a stage whenever the stage updates. This occurs immediately before the\r\n\t * rendering (draw) pass. When {{#crossLink \"Stage/update\"}}{{/crossLink}} is called, first all display objects on\r\n\t * the stage dispatch the tick event, then all of the display objects are drawn to stage. Children will have their\r\n\t * {{#crossLink \"tick:event\"}}{{/crossLink}} event dispatched in order of their depth prior to the event being\r\n\t * dispatched on their parent.\r\n\t * @event tick\r\n\t * @param {Object} target The object that dispatched the event.\r\n\t * @param {String} type The event type.\r\n\t * @param {Array} params An array containing any arguments that were passed to the Stage.update() method. For\r\n\t * example if you called stage.update(\"hello\"), then the params would be [\"hello\"].\r\n\t * @since 0.6.0\r\n\t */\r\n\r\n\r\n// getter / setters:\r\n\t/**\r\n\t * Use the {{#crossLink \"DisplayObject/stage:property\"}}{{/crossLink}} property instead.\r\n\t * @method _getStage\r\n\t * @protected\r\n\t * @return {Stage}\r\n\t **/\r\n\tp._getStage = function() {\r\n\t\t// uses dynamic access to avoid circular dependencies;\r\n\t\tvar o = this, _Stage = createjs[\"Stage\"];\r\n\t\twhile (o.parent) { o = o.parent; }\r\n\t\tif (o instanceof _Stage) { return o; }\r\n\t\treturn null;\r\n\t};\r\n\t// DisplayObject.getStage is @deprecated. Remove for 1.1+\r\n\tp.getStage = createjs.deprecate(p._getStage, \"DisplayObject.getStage\");\r\n\r\n\t/**\r\n\t * Returns the Stage instance that this display object will be rendered on, or null if it has not been added to one.\r\n\t * @property stage\r\n\t * @type {Stage}\r\n\t * @readonly\r\n\t **/\r\n\r\n\t/**\r\n\t * Returns an ID number that uniquely identifies the current cache for this display object. This can be used to\r\n\t * determine if the cache has changed since a previous check.\r\n\t * Moved to {{#crossLink \"BitmapCache\"}}{{/crossLink}}\r\n\t * @property cacheID\r\n\t * @deprecated\r\n\t * @type {Number}\r\n\t * @default 0\r\n\t */\r\n\r\n\t/**\r\n\t * Set both the {{#crossLink \"DisplayObject/scaleX:property\"}}{{/crossLink}} and the {{#crossLink \"DisplayObject/scaleY\"}}{{/crossLink}}\r\n\t * property to the same value. Note that when you get the value, if the `scaleX` and `scaleY` are different values,\r\n\t * it will return only the `scaleX`.\r\n\t * @property scaleX\r\n\t * @type {Number}\r\n\t * @default 1\r\n\t */\r\n\ttry {\r\n\t\tObject.defineProperties(p, {\r\n\t\t\tstage: { get: p._getStage },\r\n\t\t\tcacheID: {\r\n\t\t\t\tget: function(){ return this.bitmapCache && this.bitmapCache.cacheID },\r\n\t\t\t\tset: function(a){ this.bitmapCache && (this.bitmapCache.cacheID = a) }\r\n\t\t\t},\r\n\t\t\tscale: {\r\n\t\t\t\tget: function() { return this.scaleX; },\r\n\t\t\t\tset: function(scale) { this.scaleX = this.scaleY = scale; },\r\n\t\t\t}\r\n\t\t});\r\n\t} catch (e) {}\r\n\r\n\r\n// public methods:\r\n\t/**\r\n\t * Returns true or false indicating whether the display object would be visible if drawn to a canvas.\r\n\t * This does not account for whether it would be visible within the boundaries of the stage.\r\n\t *\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method isVisible\r\n\t * @return {Boolean} Boolean indicating whether the display object would be visible if drawn to a canvas\r\n\t **/\r\n\tp.isVisible = function() {\r\n\t\treturn !!(this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0);\r\n\t};\r\n\r\n\t/**\r\n\t * Draws the display object into the specified context ignoring its visible, alpha, shadow, and transform.\r\n\t * Returns true if the draw was handled (useful for overriding functionality).\r\n\t *\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method draw\r\n\t * @param {CanvasRenderingContext2D} ctx The canvas 2D context object to draw into.\r\n\t * @param {Boolean} [ignoreCache=false] Indicates whether the draw operation should ignore any current cache. For example,\r\n\t * used for drawing the cache (to prevent it from simply drawing an existing cache back into itself).\r\n\t * @return {Boolean}\r\n\t **/\r\n\tp.draw = function(ctx, ignoreCache) {\r\n\t\tvar cache = this.bitmapCache;\r\n\t\tif(cache && !ignoreCache) {\r\n\t\t\treturn cache.draw(ctx);\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\t/**\r\n\t * Applies this display object's transformation, alpha, globalCompositeOperation, clipping path (mask), and shadow\r\n\t * to the specified context. This is typically called prior to {{#crossLink \"DisplayObject/draw\"}}{{/crossLink}}.\r\n\t * @method updateContext\r\n\t * @param {CanvasRenderingContext2D} ctx The canvas 2D to update.\r\n\t **/\r\n\tp.updateContext = function(ctx) {\r\n\t\tvar o=this, mask=o.mask, mtx= o._props.matrix;\r\n\t\t\r\n\t\tif (mask && mask.graphics && !mask.graphics.isEmpty()) {\r\n\t\t\tmask.getMatrix(mtx);\r\n\t\t\tctx.transform(mtx.a, mtx.b, mtx.c, mtx.d, mtx.tx, mtx.ty);\r\n\t\t\t\r\n\t\t\tmask.graphics.drawAsPath(ctx);\r\n\t\t\tctx.clip();\r\n\t\t\t\r\n\t\t\tmtx.invert();\r\n\t\t\tctx.transform(mtx.a, mtx.b, mtx.c, mtx.d, mtx.tx, mtx.ty);\r\n\t\t}\r\n\t\t\r\n\t\tthis.getMatrix(mtx);\r\n\t\tvar tx = mtx.tx, ty = mtx.ty;\r\n\t\tif (DisplayObject._snapToPixelEnabled && o.snapToPixel) {\r\n\t\t\ttx = tx + (tx < 0 ? -0.5 : 0.5) | 0;\r\n\t\t\tty = ty + (ty < 0 ? -0.5 : 0.5) | 0;\r\n\t\t}\r\n\t\tctx.transform(mtx.a, mtx.b, mtx.c, mtx.d, tx, ty);\r\n\t\tctx.globalAlpha *= o.alpha;\r\n\t\tif (o.compositeOperation) { ctx.globalCompositeOperation = o.compositeOperation; }\r\n\t\tif (o.shadow) { this._applyShadow(ctx, o.shadow); }\r\n\t};\r\n\r\n\t/**\r\n\t * Draws the display object into a new element, which is then used for subsequent draws. Intended for complex content\r\n\t * that does not change frequently (ex. a Container with many children that do not move, or a complex vector Shape),\r\n\t * this can provide for much faster rendering because the content does not need to be re-rendered each tick. The\r\n\t * cached display object can be moved, rotated, faded, etc freely, however if its content changes, you must manually\r\n\t * update the cache by calling updateCache() again. You must specify the cached area via the x, y, w,\r\n\t * and h parameters. This defines the rectangle that will be rendered and cached using this display object's coordinates.\r\n\t *\r\n\t *

Example

\r\n\t * For example if you defined a Shape that drew a circle at 0, 0 with a radius of 25:\r\n\t *\r\n\t * var shape = new createjs.Shape();\r\n\t * shape.graphics.beginFill(\"#ff0000\").drawCircle(0, 0, 25);\r\n\t * shape.cache(-25, -25, 50, 50);\r\n\t *\r\n\t * Note that filters need to be defined before the cache is applied or you will have to call updateCache after\r\n\t * application. Check out the {{#crossLink \"Filter\"}}{{/crossLink}} class for more information. Some filters\r\n\t * (ex. BlurFilter) may not work as expected in conjunction with the scale param.\r\n\t * \r\n\t * Usually, the resulting cacheCanvas will have the dimensions width * scale, height * scale, however some filters (ex. BlurFilter)\r\n\t * will add padding to the canvas dimensions.\r\n\t *\r\n\t * In previous versions caching was handled on DisplayObject but has since been moved to {{#crossLink \"BitmapCache\"}}{{/crossLink}}.\r\n\t * This allows for easier interaction and alternate cache methods like WebGL with {{#crossLink \"StageGL\"}}{{/crossLink}}.\r\n\t * For more information on the options object, see the BitmapCache {{#crossLink \"BitmapCache/define\"}}{{/crossLink}}.\r\n\t *\r\n\t * @method cache\r\n\t * @param {Number} x The x coordinate origin for the cache region.\r\n\t * @param {Number} y The y coordinate origin for the cache region.\r\n\t * @param {Number} width The width of the cache region.\r\n\t * @param {Number} height The height of the cache region.\r\n\t * @param {Number} [scale=1] The scale at which the cache will be created. For example, if you cache a vector shape using\r\n\t * \tmyShape.cache(0,0,100,100,2) then the resulting cacheCanvas will be 200x200 px. This lets you scale and rotate\r\n\t * \tcached elements with greater fidelity. Default is 1.\r\n\t * @param {Object} [options=undefined] Specify additional parameters for the cache logic\r\n\t **/\r\n\tp.cache = function(x, y, width, height, scale, options) {\r\n\t\tif(!this.bitmapCache){\r\n\t\t\tthis.bitmapCache = new createjs.BitmapCache();\r\n\t\t}\r\n\t\tthis.bitmapCache.define(this, x, y, width, height, scale, options);\r\n\t};\r\n\r\n\t/**\r\n\t * Redraws the display object to its cache. Calling updateCache without an active cache will throw an error.\r\n\t * If compositeOperation is null the current cache will be cleared prior to drawing. Otherwise the display object\r\n\t * will be drawn over the existing cache using the specified compositeOperation.\r\n\t *\r\n\t *

Example

\r\n\t * Clear the current graphics of a cached shape, draw some new instructions, and then update the cache. The new line\r\n\t * will be drawn on top of the old one.\r\n\t *\r\n\t * // Not shown: Creating the shape, and caching it.\r\n\t * shapeInstance.clear();\r\n\t * shapeInstance.setStrokeStyle(3).beginStroke(\"#ff0000\").moveTo(100, 100).lineTo(200,200);\r\n\t * shapeInstance.updateCache();\r\n\t *\r\n\t * In previous versions caching was handled on DisplayObject but has since been moved to {{#crossLink \"BitmapCache\"}}{{/crossLink}}.\r\n\t * This allows for easier interaction and alternate cache methods like WebGL and {{#crossLink \"StageGL\"}}{{/crossLink}}.\r\n\t *\r\n\t * @method updateCache\r\n\t * @param {String} compositeOperation The compositeOperation to use, or null to clear the cache and redraw it.\r\n\t * \r\n\t * whatwg spec on compositing.\r\n\t **/\r\n\tp.updateCache = function(compositeOperation) {\r\n\t\tif(!this.bitmapCache) {\r\n\t\t\tthrow \"cache() must be called before updateCache()\";\r\n\t\t}\r\n\t\tthis.bitmapCache.update(compositeOperation);\r\n\t};\r\n\r\n\t/**\r\n\t * Clears the current cache. See {{#crossLink \"DisplayObject/cache\"}}{{/crossLink}} for more information.\r\n\t * @method uncache\r\n\t **/\r\n\tp.uncache = function() {\r\n\t\tif(this.bitmapCache) {\r\n\t\t\tthis.bitmapCache.release();\r\n\t\t\tthis.bitmapCache = undefined;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a data URL for the cache, or null if this display object is not cached.\r\n\t * Only generated if the cache has changed, otherwise returns last result.\r\n\t * @method getCacheDataURL\r\n\t * @return {String} The image data url for the cache.\r\n\t **/\r\n\tp.getCacheDataURL = function() {\r\n\t\treturn this.bitmapCache?this.bitmapCache.getDataURL():null;\r\n\t};\r\n\r\n\t/**\r\n\t * Transforms the specified x and y position from the coordinate space of the display object\r\n\t * to the global (stage) coordinate space. For example, this could be used to position an HTML label\r\n\t * over a specific point on a nested display object. Returns a Point instance with x and y properties\r\n\t * correlating to the transformed coordinates on the stage.\r\n\t *\r\n\t *

Example

\r\n\t *\r\n\t * displayObject.x = 300;\r\n\t * displayObject.y = 200;\r\n\t * stage.addChild(displayObject);\r\n\t * var point = displayObject.localToGlobal(100, 100);\r\n\t * // Results in x=400, y=300\r\n\t *\r\n\t * @method localToGlobal\r\n\t * @param {Number} x The x position in the source display object to transform.\r\n\t * @param {Number} y The y position in the source display object to transform.\r\n\t * @param {Point | Object} [pt] An object to copy the result into. If omitted a new Point object with x/y properties will be returned. \r\n\t * @return {Point} A Point instance with x and y properties correlating to the transformed coordinates\r\n\t * on the stage.\r\n\t **/\r\n\tp.localToGlobal = function(x, y, pt) {\r\n\t\treturn this.getConcatenatedMatrix(this._props.matrix).transformPoint(x,y, pt||new createjs.Point());\r\n\t};\r\n\r\n\t/**\r\n\t * Transforms the specified x and y position from the global (stage) coordinate space to the\r\n\t * coordinate space of the display object. For example, this could be used to determine\r\n\t * the current mouse position within the display object. Returns a Point instance with x and y properties\r\n\t * correlating to the transformed position in the display object's coordinate space.\r\n\t *\r\n\t *

Example

\r\n\t *\r\n\t * displayObject.x = 300;\r\n\t * displayObject.y = 200;\r\n\t * stage.addChild(displayObject);\r\n\t * var point = displayObject.globalToLocal(100, 100);\r\n\t * // Results in x=-200, y=-100\r\n\t *\r\n\t * @method globalToLocal\r\n\t * @param {Number} x The x position on the stage to transform.\r\n\t * @param {Number} y The y position on the stage to transform.\r\n\t * @param {Point | Object} [pt] An object to copy the result into. If omitted a new Point object with x/y properties will be returned. \r\n\t * @return {Point} A Point instance with x and y properties correlating to the transformed position in the\r\n\t * display object's coordinate space.\r\n\t **/\r\n\tp.globalToLocal = function(x, y, pt) {\r\n\t\treturn this.getConcatenatedMatrix(this._props.matrix).invert().transformPoint(x,y, pt||new createjs.Point());\r\n\t};\r\n\r\n\t/**\r\n\t * Transforms the specified x and y position from the coordinate space of this display object to the coordinate\r\n\t * space of the target display object. Returns a Point instance with x and y properties correlating to the\r\n\t * transformed position in the target's coordinate space. Effectively the same as using the following code with\r\n\t * {{#crossLink \"DisplayObject/localToGlobal\"}}{{/crossLink}} and {{#crossLink \"DisplayObject/globalToLocal\"}}{{/crossLink}}.\r\n\t *\r\n\t * var pt = this.localToGlobal(x, y);\r\n\t * pt = target.globalToLocal(pt.x, pt.y);\r\n\t *\r\n\t * @method localToLocal\r\n\t * @param {Number} x The x position in the source display object to transform.\r\n\t * @param {Number} y The y position on the source display object to transform.\r\n\t * @param {DisplayObject} target The target display object to which the coordinates will be transformed.\r\n\t * @param {Point | Object} [pt] An object to copy the result into. If omitted a new Point object with x/y properties will be returned. \r\n\t * @return {Point} Returns a Point instance with x and y properties correlating to the transformed position\r\n\t * in the target's coordinate space.\r\n\t **/\r\n\tp.localToLocal = function(x, y, target, pt) {\r\n\t\tpt = this.localToGlobal(x, y, pt);\r\n\t\treturn target.globalToLocal(pt.x, pt.y, pt);\r\n\t};\r\n\r\n\t/**\r\n\t * Shortcut method to quickly set the transform properties on the display object. All parameters are optional.\r\n\t * Omitted parameters will have the default value set.\r\n\t *\r\n\t *

Example

\r\n\t *\r\n\t * displayObject.setTransform(100, 100, 2, 2);\r\n\t *\r\n\t * @method setTransform\r\n\t * @param {Number} [x=0] The horizontal translation (x position) in pixels\r\n\t * @param {Number} [y=0] The vertical translation (y position) in pixels\r\n\t * @param {Number} [scaleX=1] The horizontal scale, as a percentage of 1\r\n\t * @param {Number} [scaleY=1] the vertical scale, as a percentage of 1\r\n\t * @param {Number} [rotation=0] The rotation, in degrees\r\n\t * @param {Number} [skewX=0] The horizontal skew factor\r\n\t * @param {Number} [skewY=0] The vertical skew factor\r\n\t * @param {Number} [regX=0] The horizontal registration point in pixels\r\n\t * @param {Number} [regY=0] The vertical registration point in pixels\r\n\t * @return {DisplayObject} Returns this instance. Useful for chaining commands.\r\n\t * @chainable\r\n\t*/\r\n\tp.setTransform = function(x, y, scaleX, scaleY, rotation, skewX, skewY, regX, regY) {\r\n\t\tthis.x = x || 0;\r\n\t\tthis.y = y || 0;\r\n\t\tthis.scaleX = scaleX == null ? 1 : scaleX;\r\n\t\tthis.scaleY = scaleY == null ? 1 : scaleY;\r\n\t\tthis.rotation = rotation || 0;\r\n\t\tthis.skewX = skewX || 0;\r\n\t\tthis.skewY = skewY || 0;\r\n\t\tthis.regX = regX || 0;\r\n\t\tthis.regY = regY || 0;\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a matrix based on this object's current transform.\r\n\t * @method getMatrix\r\n\t * @param {Matrix2D} matrix Optional. A Matrix2D object to populate with the calculated values. If null, a new\r\n\t * Matrix object is returned.\r\n\t * @return {Matrix2D} A matrix representing this display object's transform.\r\n\t **/\r\n\tp.getMatrix = function(matrix) {\r\n\t\tvar o = this, mtx = matrix&&matrix.identity() || new createjs.Matrix2D();\r\n\t\treturn o.transformMatrix ? mtx.copy(o.transformMatrix) : mtx.appendTransform(o.x, o.y, o.scaleX, o.scaleY, o.rotation, o.skewX, o.skewY, o.regX, o.regY);\r\n\t};\r\n\r\n\t/**\r\n\t * Generates a Matrix2D object representing the combined transform of the display object and all of its\r\n\t * parent Containers up to the highest level ancestor (usually the {{#crossLink \"Stage\"}}{{/crossLink}}). This can\r\n\t * be used to transform positions between coordinate spaces, such as with {{#crossLink \"DisplayObject/localToGlobal\"}}{{/crossLink}}\r\n\t * and {{#crossLink \"DisplayObject/globalToLocal\"}}{{/crossLink}}.\r\n\t * @method getConcatenatedMatrix\r\n\t * @param {Matrix2D} [matrix] A {{#crossLink \"Matrix2D\"}}{{/crossLink}} object to populate with the calculated values.\r\n\t * If null, a new Matrix2D object is returned.\r\n\t * @return {Matrix2D} The combined matrix.\r\n\t **/\r\n\tp.getConcatenatedMatrix = function(matrix) {\r\n\t\tvar o = this, mtx = this.getMatrix(matrix);\r\n\t\twhile (o = o.parent) {\r\n\t\t\tmtx.prependMatrix(o.getMatrix(o._props.matrix));\r\n\t\t}\r\n\t\treturn mtx;\r\n\t};\r\n\r\n\t/**\r\n\t * Generates a DisplayProps object representing the combined display properties of the object and all of its\r\n\t * parent Containers up to the highest level ancestor (usually the {{#crossLink \"Stage\"}}{{/crossLink}}).\r\n\t * @method getConcatenatedDisplayProps\r\n\t * @param {DisplayProps} [props] A {{#crossLink \"DisplayProps\"}}{{/crossLink}} object to populate with the calculated values.\r\n\t * If null, a new DisplayProps object is returned.\r\n\t * @return {DisplayProps} The combined display properties.\r\n\t **/\r\n\tp.getConcatenatedDisplayProps = function(props) {\r\n\t\tprops = props ? props.identity() : new createjs.DisplayProps();\r\n\t\tvar o = this, mtx = o.getMatrix(props.matrix); \r\n\t\tdo {\r\n\t\t\tprops.prepend(o.visible, o.alpha, o.shadow, o.compositeOperation);\r\n\t\t\t\r\n\t\t\t// we do this to avoid problems with the matrix being used for both operations when o._props.matrix is passed in as the props param.\r\n\t\t\t// this could be simplified (ie. just done as part of the prepend above) if we switched to using a pool.\r\n\t\t\tif (o != this) { mtx.prependMatrix(o.getMatrix(o._props.matrix)); }\r\n\t\t} while (o = o.parent);\r\n\t\treturn props;\r\n\t};\r\n\r\n\t/**\r\n\t * Tests whether the display object intersects the specified point in local coordinates (ie. draws a pixel with alpha > 0 at\r\n\t * the specified position). This ignores the alpha, shadow, hitArea, mask, and compositeOperation of the display object.\r\n\t *\r\n\t *

Example

\r\n\t *\r\n\t * stage.addEventListener(\"stagemousedown\", handleMouseDown);\r\n\t * function handleMouseDown(event) {\r\n\t * var hit = myShape.hitTest(event.stageX, event.stageY);\r\n\t * }\r\n\t *\r\n\t * Please note that shape-to-shape collision is not currently supported by EaselJS.\r\n\t * @method hitTest\r\n\t * @param {Number} x The x position to check in the display object's local coordinates.\r\n\t * @param {Number} y The y position to check in the display object's local coordinates.\r\n\t * @return {Boolean} A Boolean indicating whether a visible portion of the DisplayObject intersect the specified\r\n\t * local Point.\r\n\t*/\r\n\tp.hitTest = function(x, y) {\r\n\t\tvar ctx = DisplayObject._hitTestContext;\r\n\t\tctx.setTransform(1, 0, 0, 1, -x, -y);\r\n\t\tthis.draw(ctx);\r\n\r\n\t\tvar hit = this._testHit(ctx);\r\n\t\tctx.setTransform(1, 0, 0, 1, 0, 0);\r\n\t\tctx.clearRect(0, 0, 2, 2);\r\n\t\treturn hit;\r\n\t};\r\n\r\n\t/**\r\n\t * Provides a chainable shortcut method for setting a number of properties on the instance.\r\n\t *\r\n\t *

Example

\r\n\t *\r\n\t * var myGraphics = new createjs.Graphics().beginFill(\"#ff0000\").drawCircle(0, 0, 25);\r\n\t * var shape = stage.addChild(new Shape()).set({graphics:myGraphics, x:100, y:100, alpha:0.5});\r\n\t *\r\n\t * @method set\r\n\t * @param {Object} props A generic object containing properties to copy to the DisplayObject instance.\r\n\t * @return {DisplayObject} Returns the instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t*/\r\n\tp.set = function(props) {\r\n\t\tfor (var n in props) { this[n] = props[n]; }\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a rectangle representing this object's bounds in its local coordinate system (ie. with no transformation).\r\n\t * Objects that have been cached will return the bounds of the cache.\r\n\t * \r\n\t * Not all display objects can calculate their own bounds (ex. Shape). For these objects, you can use \r\n\t * {{#crossLink \"DisplayObject/setBounds\"}}{{/crossLink}} so that they are included when calculating Container\r\n\t * bounds.\r\n\t * \r\n\t * \r\n\t * \t\r\n\t * \t\r\n\t * \t\r\n\t * \t\r\n\t * \t\r\n\t * \t\r\n\t * \t\r\n\t*
All\r\n\t * \t\tAll display objects support setting bounds manually using setBounds(). Likewise, display objects that\r\n\t * \t\thave been cached using cache() will return the bounds of their cache. Manual and cache bounds will override\r\n\t * \t\tthe automatic calculations listed below.\r\n\t * \t
Bitmap\r\n\t * \t\tReturns the width and height of the sourceRect (if specified) or image, extending from (x=0,y=0).\r\n\t * \t
Sprite\r\n\t * \t\tReturns the bounds of the current frame. May have non-zero x/y if a frame registration point was specified\r\n\t * \t\tin the spritesheet data. See also {{#crossLink \"SpriteSheet/getFrameBounds\"}}{{/crossLink}}\r\n\t * \t
Container\r\n\t * \t\tReturns the aggregate (combined) bounds of all children that return a non-null value from getBounds().\r\n\t * \t
Shape\r\n\t * \t\tDoes not currently support automatic bounds calculations. Use setBounds() to manually define bounds.\r\n\t * \t
Text\r\n\t * \t\tReturns approximate bounds. Horizontal values (x/width) are quite accurate, but vertical values (y/height) are\r\n\t * \t\tnot, especially when using textBaseline values other than \"top\".\r\n\t * \t
BitmapText\r\n\t * \t\tReturns approximate bounds. Values will be more accurate if spritesheet frame registration points are close\r\n\t * \t\tto (x=0,y=0).\r\n\t * \t
\r\n\t * \r\n\t * Bounds can be expensive to calculate for some objects (ex. text, or containers with many children), and\r\n\t * are recalculated each time you call getBounds(). You can prevent recalculation on static objects by setting the\r\n\t * bounds explicitly:\r\n\t * \r\n\t * \tvar bounds = obj.getBounds();\r\n\t * \tobj.setBounds(bounds.x, bounds.y, bounds.width, bounds.height);\r\n\t * \t// getBounds will now use the set values, instead of recalculating\r\n\t * \r\n\t * To reduce memory impact, the returned Rectangle instance may be reused internally; clone the instance or copy its\r\n\t * values if you need to retain it.\r\n\t * \r\n\t * \tvar myBounds = obj.getBounds().clone();\r\n\t * \t// OR:\r\n\t * \tmyRect.copy(obj.getBounds());\r\n\t * \r\n\t * @method getBounds\r\n\t * @return {Rectangle} A Rectangle instance representing the bounds, or null if bounds are not available for this\r\n\t * object.\r\n\t **/\r\n\tp.getBounds = function() {\r\n\t\tif (this._bounds) { return this._rectangle.copy(this._bounds); }\r\n\t\tvar cacheCanvas = this.cacheCanvas;\r\n\t\tif (cacheCanvas) {\r\n\t\t\tvar scale = this._cacheScale;\r\n\t\t\treturn this._rectangle.setValues(this._cacheOffsetX, this._cacheOffsetY, cacheCanvas.width/scale, cacheCanvas.height/scale);\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a rectangle representing this object's bounds in its parent's coordinate system (ie. with transformations applied).\r\n\t * Objects that have been cached will return the transformed bounds of the cache.\r\n\t * \r\n\t * Not all display objects can calculate their own bounds (ex. Shape). For these objects, you can use \r\n\t * {{#crossLink \"DisplayObject/setBounds\"}}{{/crossLink}} so that they are included when calculating Container\r\n\t * bounds.\r\n\t * \r\n\t * To reduce memory impact, the returned Rectangle instance may be reused internally; clone the instance or copy its\r\n\t * values if you need to retain it.\r\n\t * \r\n\t * Container instances calculate aggregate bounds for all children that return bounds via getBounds.\r\n\t * @method getTransformedBounds\r\n\t * @return {Rectangle} A Rectangle instance representing the bounds, or null if bounds are not available for this object.\r\n\t **/\r\n\tp.getTransformedBounds = function() {\r\n\t\treturn this._getBounds();\r\n\t};\r\n\r\n\t/**\r\n\t * Allows you to manually specify the bounds of an object that either cannot calculate their own bounds (ex. Shape &\r\n\t * Text) for future reference, or so the object can be included in Container bounds. Manually set bounds will always\r\n\t * override calculated bounds.\r\n\t * \r\n\t * The bounds should be specified in the object's local (untransformed) coordinates. For example, a Shape instance\r\n\t * with a 25px radius circle centered at 0,0 would have bounds of (-25, -25, 50, 50).\r\n\t * @method setBounds\r\n\t * @param {Number} x The x origin of the bounds. Pass null to remove the manual bounds.\r\n\t * @param {Number} y The y origin of the bounds.\r\n\t * @param {Number} width The width of the bounds.\r\n\t * @param {Number} height The height of the bounds.\r\n\t **/\r\n\tp.setBounds = function(x, y, width, height) {\r\n\t\tif (x == null) { this._bounds = x; return; }\r\n\t\tthis._bounds = (this._bounds || new createjs.Rectangle()).setValues(x, y, width, height);\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a clone of this DisplayObject. Some properties that are specific to this instance's current context are\r\n\t * reverted to their defaults (for example .parent). Caches are not maintained across clones, and some elements\r\n\t * are copied by reference (masks, individual filter instances, hit area)\r\n\t * @method clone\r\n\t * @return {DisplayObject} A clone of the current DisplayObject instance.\r\n\t **/\r\n\tp.clone = function() {\r\n\t\treturn this._cloneProps(new DisplayObject());\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a string representation of this object.\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t **/\r\n\tp.toString = function() {\r\n\t\treturn \"[DisplayObject (name=\"+ this.name +\")]\";\r\n\t};\r\n\r\n\r\n// private methods:\r\n\t/**\r\n\t * Called before the object gets drawn and is a chance to ensure the display state of the object is correct.\r\n\t * Mostly used by {{#crossLink \"MovieClip\"}}{{/crossLink}} and {{#crossLink \"BitmapText\"}}{{/crossLink}} to\r\n\t * correct their internal state and children prior to being drawn.\r\n\t *\r\n\t * Is manually called via draw in a {{#crossLink \"Stage\"}}{{/crossLink}} but is automatically called when\r\n\t * present in a {{#crossLink \"StageGL\"}}{{/crossLink}} instance.\r\n\t *\r\n\t * @method _updateState\r\n\t * @default null\r\n\t */\r\n\tp._updateState = null;\r\n\r\n\t// separated so it can be used more easily in subclasses:\r\n\t/**\r\n\t * @method _cloneProps\r\n\t * @param {DisplayObject} o The DisplayObject instance which will have properties from the current DisplayObject\r\n\t * instance copied into.\r\n\t * @return {DisplayObject} o\r\n\t * @protected\r\n\t **/\r\n\tp._cloneProps = function(o) {\r\n\t\to.alpha = this.alpha;\r\n\t\to.mouseEnabled = this.mouseEnabled;\r\n\t\to.tickEnabled = this.tickEnabled;\r\n\t\to.name = this.name;\r\n\t\to.regX = this.regX;\r\n\t\to.regY = this.regY;\r\n\t\to.rotation = this.rotation;\r\n\t\to.scaleX = this.scaleX;\r\n\t\to.scaleY = this.scaleY;\r\n\t\to.shadow = this.shadow;\r\n\t\to.skewX = this.skewX;\r\n\t\to.skewY = this.skewY;\r\n\t\to.visible = this.visible;\r\n\t\to.x = this.x;\r\n\t\to.y = this.y;\r\n\t\to.compositeOperation = this.compositeOperation;\r\n\t\to.snapToPixel = this.snapToPixel;\r\n\t\to.filters = this.filters==null?null:this.filters.slice(0);\r\n\t\to.mask = this.mask;\r\n\t\to.hitArea = this.hitArea;\r\n\t\to.cursor = this.cursor;\r\n\t\to._bounds = this._bounds;\r\n\t\treturn o;\r\n\t};\r\n\r\n\t/**\r\n\t * @method _applyShadow\r\n\t * @protected\r\n\t * @param {CanvasRenderingContext2D} ctx\r\n\t * @param {Shadow} shadow\r\n\t **/\r\n\tp._applyShadow = function(ctx, shadow) {\r\n\t\tshadow = shadow || Shadow.identity;\r\n\t\tctx.shadowColor = shadow.color;\r\n\t\tctx.shadowOffsetX = shadow.offsetX;\r\n\t\tctx.shadowOffsetY = shadow.offsetY;\r\n\t\tctx.shadowBlur = shadow.blur;\r\n\t};\r\n\r\n\t/**\r\n\t * @method _tick\r\n\t * @param {Object} evtObj An event object that will be dispatched to all tick listeners. This object is reused between dispatchers to reduce construction & GC costs.\r\n\t * @protected\r\n\t **/\r\n\tp._tick = function(evtObj) {\r\n\t\t// because tick can be really performance sensitive, check for listeners before calling dispatchEvent.\r\n\t\tvar ls = this._listeners;\r\n\t\tif (ls && ls[\"tick\"]) {\r\n\t\t\t// reset & reuse the event object to avoid construction / GC costs:\r\n\t\t\tevtObj.target = null;\r\n\t\t\tevtObj.propagationStopped = evtObj.immediatePropagationStopped = false;\r\n\t\t\tthis.dispatchEvent(evtObj);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * @method _testHit\r\n\t * @protected\r\n\t * @param {CanvasRenderingContext2D} ctx\r\n\t * @return {Boolean}\r\n\t **/\r\n\tp._testHit = function(ctx) {\r\n\t\ttry {\r\n\t\t\tvar hit = ctx.getImageData(0, 0, 1, 1).data[3] > 1;\r\n\t\t} catch (e) {\r\n\t\t\tif (!DisplayObject.suppressCrossDomainErrors) {\r\n\t\t\t\tthrow \"An error has occurred. This is most likely due to security restrictions on reading canvas pixel data with local or cross-domain images.\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn hit;\r\n\t};\r\n\r\n\t/**\r\n\t * @method _getBounds\r\n\t * @param {Matrix2D} matrix\r\n\t * @param {Boolean} ignoreTransform If true, does not apply this object's transform.\r\n\t * @return {Rectangle}\r\n\t * @protected\r\n\t **/\r\n\tp._getBounds = function(matrix, ignoreTransform){\r\n\t\treturn this._transformBounds(this.getBounds(), matrix, ignoreTransform);\r\n\t};\r\n\r\n\t/**\r\n\t * @method _transformBounds\r\n\t * @param {Rectangle} bounds\r\n\t * @param {Matrix2D} matrix\r\n\t * @param {Boolean} ignoreTransform\r\n\t * @return {Rectangle}\r\n\t * @protected\r\n\t **/\r\n\tp._transformBounds = function(bounds, matrix, ignoreTransform) {\r\n\t\tif (!bounds) { return bounds; }\r\n\t\tvar x = bounds.x, y = bounds.y, width = bounds.width, height = bounds.height, mtx = this._props.matrix;\r\n\t\tmtx = ignoreTransform ? mtx.identity() : this.getMatrix(mtx);\r\n\t\t\r\n\t\tif (x || y) { mtx.appendTransform(0,0,1,1,0,0,0,-x,-y); } // TODO: simplify this.\r\n\t\tif (matrix) { mtx.prependMatrix(matrix); }\r\n\t\t\r\n\t\tvar x_a = width*mtx.a, x_b = width*mtx.b;\r\n\t\tvar y_c = height*mtx.c, y_d = height*mtx.d;\r\n\t\tvar tx = mtx.tx, ty = mtx.ty;\r\n\t\t\r\n\t\tvar minX = tx, maxX = tx, minY = ty, maxY = ty;\r\n\r\n\t\tif ((x = x_a + tx) < minX) { minX = x; } else if (x > maxX) { maxX = x; }\r\n\t\tif ((x = x_a + y_c + tx) < minX) { minX = x; } else if (x > maxX) { maxX = x; }\r\n\t\tif ((x = y_c + tx) < minX) { minX = x; } else if (x > maxX) { maxX = x; }\r\n\r\n\t\tif ((y = x_b + ty) < minY) { minY = y; } else if (y > maxY) { maxY = y; }\r\n\t\tif ((y = x_b + y_d + ty) < minY) { minY = y; } else if (y > maxY) { maxY = y; }\r\n\t\tif ((y = y_d + ty) < minY) { minY = y; } else if (y > maxY) { maxY = y; }\r\n\r\n\t\treturn bounds.setValues(minX, minY, maxX-minX, maxY-minY);\r\n\t};\r\n\r\n\t/**\r\n\t * Indicates whether the display object has any mouse event listeners or a cursor.\r\n\t * @method _isMouseOpaque\r\n\t * @return {Boolean}\r\n\t * @protected\r\n\t **/\r\n\tp._hasMouseEventListener = function() {\r\n\t\tvar evts = DisplayObject._MOUSE_EVENTS;\r\n\t\tfor (var i= 0, l=evts.length; itransform and alpha properties concatenated with their parent\r\n * Container.\r\n *\r\n * For example, a {{#crossLink \"Shape\"}}{{/crossLink}} with x=100 and alpha=0.5, placed in a Container with x=50\r\n * and alpha=0.7 will be rendered to the canvas at x=150 and alpha=0.35.\r\n * Containers have some overhead, so you generally shouldn't create a Container to hold a single child.\r\n *\r\n *

Example

\r\n *\r\n * var container = new createjs.Container();\r\n * container.addChild(bitmapInstance, shapeInstance);\r\n * container.x = 100;\r\n *\r\n * @class Container\r\n * @extends DisplayObject\r\n * @constructor\r\n **/\r\n\tfunction Container() {\r\n\t\tthis.DisplayObject_constructor();\r\n\t\t\r\n\t// public properties:\r\n\t\t/**\r\n\t\t * The array of children in the display list. You should usually use the child management methods such as\r\n\t\t * {{#crossLink \"Container/addChild\"}}{{/crossLink}}, {{#crossLink \"Container/removeChild\"}}{{/crossLink}},\r\n\t\t * {{#crossLink \"Container/swapChildren\"}}{{/crossLink}}, etc, rather than accessing this directly, but it is\r\n\t\t * included for advanced uses.\r\n\t\t * @property children\r\n\t\t * @type Array\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis.children = [];\r\n\t\t\r\n\t\t/**\r\n\t\t * Indicates whether the children of this container are independently enabled for mouse/pointer interaction.\r\n\t\t * If false, the children will be aggregated under the container - for example, a click on a child shape would\r\n\t\t * trigger a click event on the container.\r\n\t\t * @property mouseChildren\r\n\t\t * @type Boolean\r\n\t\t * @default true\r\n\t\t **/\r\n\t\tthis.mouseChildren = true;\r\n\t\t\r\n\t\t/**\r\n\t\t * If false, the tick will not be propagated to children of this Container. This can provide some performance benefits.\r\n\t\t * In addition to preventing the \"tick\" event from being dispatched, it will also prevent tick related updates\r\n\t\t * on some display objects (ex. Sprite & MovieClip frame advancing, DOMElement visibility handling).\r\n\t\t * @property tickChildren\r\n\t\t * @type Boolean\r\n\t\t * @default true\r\n\t\t **/\r\n\t\tthis.tickChildren = true;\r\n\t}\r\n\tvar p = createjs.extend(Container, createjs.DisplayObject);\r\n\t\r\n\t\r\n// getter / setters:\r\n\t/**\r\n\t * Use the {{#crossLink \"Container/numChildren:property\"}}{{/crossLink}} property instead.\r\n\t * @method _getNumChildren\r\n\t * @protected\r\n\t * @return {Number}\r\n\t **/\r\n\tp._getNumChildren = function() {\r\n\t\treturn this.children.length;\r\n\t};\r\n\t// Container.getNumChildren is @deprecated. Remove for 1.1+\r\n\tp.getNumChildren = createjs.deprecate(p._getNumChildren, \"Container.getNumChildren\");\r\n\r\n\t/**\r\n\t * Returns the number of children in the container.\r\n\t * @property numChildren\r\n\t * @type {Number}\r\n\t * @readonly\r\n\t **/\r\n\ttry {\r\n\t\tObject.defineProperties(p, {\r\n\t\t\tnumChildren: { get: p._getNumChildren }\r\n\t\t});\r\n\t} catch (e) {}\r\n\t\r\n\r\n// public methods:\r\n\t/**\r\n\t * Constructor alias for backwards compatibility. This method will be removed in future versions.\r\n\t * Subclasses should be updated to use {{#crossLink \"Utility Methods/extends\"}}{{/crossLink}}.\r\n\t * @method initialize\r\n\t * @deprecated in favour of `createjs.promote()`\r\n\t **/\r\n\tp.initialize = Container; // TODO: deprecated.\r\n\t\r\n\t/**\r\n\t * Returns true or false indicating whether the display object would be visible if drawn to a canvas.\r\n\t * This does not account for whether it would be visible within the boundaries of the stage.\r\n\t *\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method isVisible\r\n\t * @return {Boolean} Boolean indicating whether the display object would be visible if drawn to a canvas\r\n\t **/\r\n\tp.isVisible = function() {\r\n\t\tvar hasContent = this.cacheCanvas || this.children.length;\r\n\t\treturn !!(this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0 && hasContent);\r\n\t};\r\n\r\n\t/**\r\n\t * Draws the display object into the specified context ignoring its visible, alpha, shadow, and transform.\r\n\t * Returns true if the draw was handled (useful for overriding functionality).\r\n\t *\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method draw\r\n\t * @param {CanvasRenderingContext2D} ctx The canvas 2D context object to draw into.\r\n\t * @param {Boolean} [ignoreCache=false] Indicates whether the draw operation should ignore any current cache.\r\n\t * For example, used for drawing the cache (to prevent it from simply drawing an existing cache back\r\n\t * into itself).\r\n\t **/\r\n\tp.draw = function(ctx, ignoreCache) {\r\n\t\tif (this.DisplayObject_draw(ctx, ignoreCache)) { return true; }\r\n\t\t\r\n\t\t// this ensures we don't have issues with display list changes that occur during a draw:\r\n\t\tvar list = this.children.slice();\r\n\t\tfor (var i=0,l=list.length; iExample\r\n\t *\r\n\t * \t\tcontainer.addChild(bitmapInstance);\r\n\t *\r\n\t * You can also add multiple children at once:\r\n\t *\r\n\t * \t\tcontainer.addChild(bitmapInstance, shapeInstance, textInstance);\r\n\t *\r\n\t * @method addChild\r\n\t * @param {DisplayObject} child The display object to add.\r\n\t * @return {DisplayObject} The child that was added, or the last child if multiple children were added.\r\n\t **/\r\n\tp.addChild = function(child) {\r\n\t\tif (child == null) { return child; }\r\n\t\tvar l = arguments.length;\r\n\t\tif (l > 1) {\r\n\t\t\tfor (var i=0; iExample\r\n\t *\r\n\t * addChildAt(child1, index);\r\n\t *\r\n\t * You can also add multiple children, such as:\r\n\t *\r\n\t * addChildAt(child1, child2, ..., index);\r\n\t *\r\n\t * The index must be between 0 and numChildren. For example, to add myShape under otherShape in the display list,\r\n\t * you could use:\r\n\t *\r\n\t * container.addChildAt(myShape, container.getChildIndex(otherShape));\r\n\t *\r\n\t * This would also bump otherShape's index up by one. Fails silently if the index is out of range.\r\n\t *\r\n\t * @method addChildAt\r\n\t * @param {DisplayObject} child The display object to add.\r\n\t * @param {Number} index The index to add the child at.\r\n\t * @return {DisplayObject} Returns the last child that was added, or the last child if multiple children were added.\r\n\t **/\r\n\tp.addChildAt = function(child, index) {\r\n\t\tvar l = arguments.length;\r\n\t\tvar indx = arguments[l-1]; // can't use the same name as the index param or it replaces arguments[1]\r\n\t\tif (indx < 0 || indx > this.children.length) { return arguments[l-2]; }\r\n\t\tif (l > 2) {\r\n\t\t\tfor (var i=0; iExample\r\n\t *\r\n\t * container.removeChild(child);\r\n\t *\r\n\t * You can also remove multiple children:\r\n\t *\r\n\t * removeChild(child1, child2, ...);\r\n\t *\r\n\t * Returns true if the child (or children) was removed, or false if it was not in the display list.\r\n\t * @method removeChild\r\n\t * @param {DisplayObject} child The child to remove.\r\n\t * @return {Boolean} true if the child (or children) was removed, or false if it was not in the display list.\r\n\t **/\r\n\tp.removeChild = function(child) {\r\n\t\tvar l = arguments.length;\r\n\t\tif (l > 1) {\r\n\t\t\tvar good = true;\r\n\t\t\tfor (var i=0; iExample\r\n\t *\r\n\t * container.removeChildAt(2);\r\n\t *\r\n\t * You can also remove multiple children:\r\n\t *\r\n\t * container.removeChild(2, 7, ...)\r\n\t *\r\n\t * Returns true if the child (or children) was removed, or false if any index was out of range.\r\n\t * @method removeChildAt\r\n\t * @param {Number} index The index of the child to remove.\r\n\t * @return {Boolean} true if the child (or children) was removed, or false if any index was out of range.\r\n\t **/\r\n\tp.removeChildAt = function(index) {\r\n\t\tvar l = arguments.length;\r\n\t\tif (l > 1) {\r\n\t\t\tvar a = [];\r\n\t\t\tfor (var i=0; iExample\r\n\t *\r\n\t * \tcontainer.removeAllChildren();\r\n\t *\r\n\t * @method removeAllChildren\r\n\t **/\r\n\tp.removeAllChildren = function() {\r\n\t\tvar kids = this.children;\r\n\t\twhile (kids.length) { this._removeChildAt(0); }\r\n\t};\r\n\r\n\t/**\r\n\t * Returns the child at the specified index.\r\n\t *\r\n\t *

Example

\r\n\t *\r\n\t * container.getChildAt(2);\r\n\t *\r\n\t * @method getChildAt\r\n\t * @param {Number} index The index of the child to return.\r\n\t * @return {DisplayObject} The child at the specified index. Returns null if there is no child at the index.\r\n\t **/\r\n\tp.getChildAt = function(index) {\r\n\t\treturn this.children[index];\r\n\t};\r\n\t\r\n\t/**\r\n\t * Returns the child with the specified name.\r\n\t * @method getChildByName\r\n\t * @param {String} name The name of the child to return.\r\n\t * @return {DisplayObject} The child with the specified name.\r\n\t **/\r\n\tp.getChildByName = function(name) {\r\n\t\tvar kids = this.children;\r\n\t\tfor (var i=0,l=kids.length;iExample: Display children with a higher y in front.\r\n\t * \r\n\t * var sortFunction = function(obj1, obj2, options) {\r\n\t * if (obj1.y > obj2.y) { return 1; }\r\n\t * if (obj1.y < obj2.y) { return -1; }\r\n\t * return 0;\r\n\t * }\r\n\t * container.sortChildren(sortFunction);\r\n\t *\r\n\t * @method sortChildren\r\n\t * @param {Function} sortFunction the function to use to sort the child list. See JavaScript's Array.sort\r\n\t * documentation for details.\r\n\t **/\r\n\tp.sortChildren = function(sortFunction) {\r\n\t\tthis.children.sort(sortFunction);\r\n\t};\r\n\r\n\t/**\r\n\t * Returns the index of the specified child in the display list, or -1 if it is not in the display list.\r\n\t *\r\n\t *

Example

\r\n\t *\r\n\t * var index = container.getChildIndex(child);\r\n\t *\r\n\t * @method getChildIndex\r\n\t * @param {DisplayObject} child The child to return the index of.\r\n\t * @return {Number} The index of the specified child. -1 if the child is not found.\r\n\t **/\r\n\tp.getChildIndex = function(child) {\r\n\t\treturn createjs.indexOf(this.children, child);\r\n\t};\r\n\t\r\n\t/**\r\n\t * Swaps the children at the specified indexes. Fails silently if either index is out of range.\r\n\t * @method swapChildrenAt\r\n\t * @param {Number} index1\r\n\t * @param {Number} index2\r\n\t **/\r\n\tp.swapChildrenAt = function(index1, index2) {\r\n\t\tvar kids = this.children;\r\n\t\tvar o1 = kids[index1];\r\n\t\tvar o2 = kids[index2];\r\n\t\tif (!o1 || !o2) { return; }\r\n\t\tkids[index1] = o2;\r\n\t\tkids[index2] = o1;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Swaps the specified children's depth in the display list. Fails silently if either child is not a child of this\r\n\t * Container.\r\n\t * @method swapChildren\r\n\t * @param {DisplayObject} child1\r\n\t * @param {DisplayObject} child2\r\n\t **/\r\n\tp.swapChildren = function(child1, child2) {\r\n\t\tvar kids = this.children;\r\n\t\tvar index1,index2;\r\n\t\tfor (var i=0,l=kids.length;i= l) { return; }\r\n\t\tfor (var i=0;i 0 at the\r\n\t * specified position). This ignores the alpha, shadow and compositeOperation of the display object, and all\r\n\t * transform properties including regX/Y.\r\n\t * @method hitTest\r\n\t * @param {Number} x The x position to check in the display object's local coordinates.\r\n\t * @param {Number} y The y position to check in the display object's local coordinates.\r\n\t * @return {Boolean} A Boolean indicating whether there is a visible section of a DisplayObject that overlaps the specified\r\n\t * coordinates.\r\n\t **/\r\n\tp.hitTest = function(x, y) {\r\n\t\t// TODO: optimize to use the fast cache check where possible.\r\n\t\treturn (this.getObjectUnderPoint(x, y) != null);\r\n\t};\r\n\r\n\t/**\r\n\t * Returns an array of all display objects under the specified coordinates that are in this container's display\r\n\t * list. This routine ignores any display objects with {{#crossLink \"DisplayObject/mouseEnabled:property\"}}{{/crossLink}}\r\n\t * set to `false`. The array will be sorted in order of visual depth, with the top-most display object at index 0.\r\n\t * This uses shape based hit detection, and can be an expensive operation to run, so it is best to use it carefully.\r\n\t * For example, if testing for objects under the mouse, test on tick (instead of on {{#crossLink \"DisplayObject/mousemove:event\"}}{{/crossLink}}),\r\n\t * and only if the mouse's position has changed.\r\n\t * \r\n\t *
    \r\n\t *
  • By default (mode=0) this method evaluates all display objects.
  • \r\n\t *
  • By setting the `mode` parameter to `1`, the {{#crossLink \"DisplayObject/mouseEnabled:property\"}}{{/crossLink}}\r\n\t * \t\tand {{#crossLink \"mouseChildren:property\"}}{{/crossLink}} properties will be respected.
  • \r\n\t * \t
  • Setting the `mode` to `2` additionally excludes display objects that do not have active mouse event\r\n\t * \t \tlisteners or a {{#crossLink \"DisplayObject:cursor:property\"}}{{/crossLink}} property. That is, only objects\r\n\t * \t \tthat would normally intercept mouse interaction will be included. This can significantly improve performance\r\n\t * \t \tin some cases by reducing the number of display objects that need to be tested.
  • \r\n\t * \r\n\t * \r\n\t * This method accounts for both {{#crossLink \"DisplayObject/hitArea:property\"}}{{/crossLink}} and {{#crossLink \"DisplayObject/mask:property\"}}{{/crossLink}}.\r\n\t * @method getObjectsUnderPoint\r\n\t * @param {Number} x The x position in the container to test.\r\n\t * @param {Number} y The y position in the container to test.\r\n\t * @param {Number} [mode=0] The mode to use to determine which display objects to include. 0-all, 1-respect mouseEnabled/mouseChildren, 2-only mouse opaque objects.\r\n\t * @return {Array} An Array of DisplayObjects under the specified coordinates.\r\n\t **/\r\n\tp.getObjectsUnderPoint = function(x, y, mode) {\r\n\t\tvar arr = [];\r\n\t\tvar pt = this.localToGlobal(x, y);\r\n\t\tthis._getObjectsUnderPoint(pt.x, pt.y, arr, mode>0, mode==1);\r\n\t\treturn arr;\r\n\t};\r\n\r\n\t/**\r\n\t * Similar to {{#crossLink \"Container/getObjectsUnderPoint\"}}{{/crossLink}}, but returns only the top-most display\r\n\t * object. This runs significantly faster than getObjectsUnderPoint(), but is still potentially an expensive\r\n\t * operation. See {{#crossLink \"Container/getObjectsUnderPoint\"}}{{/crossLink}} for more information.\r\n\t * @method getObjectUnderPoint\r\n\t * @param {Number} x The x position in the container to test.\r\n\t * @param {Number} y The y position in the container to test.\r\n\t * @param {Number} mode The mode to use to determine which display objects to include. 0-all, 1-respect mouseEnabled/mouseChildren, 2-only mouse opaque objects.\r\n\t * @return {DisplayObject} The top-most display object under the specified coordinates.\r\n\t **/\r\n\tp.getObjectUnderPoint = function(x, y, mode) {\r\n\t\tvar pt = this.localToGlobal(x, y);\r\n\t\treturn this._getObjectsUnderPoint(pt.x, pt.y, null, mode>0, mode==1);\r\n\t};\r\n\t\r\n\t/**\r\n\t * Docced in superclass.\r\n\t */\r\n\tp.getBounds = function() {\r\n\t\treturn this._getBounds(null, true);\r\n\t};\r\n\t\r\n\t\r\n\t/**\r\n\t * Docced in superclass.\r\n\t */\r\n\tp.getTransformedBounds = function() {\r\n\t\treturn this._getBounds();\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a clone of this Container. Some properties that are specific to this instance's current context are\r\n\t * reverted to their defaults (for example .parent).\r\n\t * @method clone\r\n\t * @param {Boolean} [recursive=false] If true, all of the descendants of this container will be cloned recursively. If false, the\r\n\t * properties of the container will be cloned, but the new instance will not have any children.\r\n\t * @return {Container} A clone of the current Container instance.\r\n\t **/\r\n\tp.clone = function(recursive) {\r\n\t\tvar o = this._cloneProps(new Container());\r\n\t\tif (recursive) { this._cloneChildren(o); }\r\n\t\treturn o;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a string representation of this object.\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t **/\r\n\tp.toString = function() {\r\n\t\treturn \"[Container (name=\"+ this.name +\")]\";\r\n\t};\r\n\r\n\r\n// private methods:\r\n\t/**\r\n\t * @method _tick\r\n\t * @param {Object} evtObj An event object that will be dispatched to all tick listeners. This object is reused between dispatchers to reduce construction & GC costs.\r\n\t * @protected\r\n\t **/\r\n\tp._tick = function(evtObj) {\r\n\t\tif (this.tickChildren) {\r\n\t\t\tfor (var i=this.children.length-1; i>=0; i--) {\r\n\t\t\t\tvar child = this.children[i];\r\n\t\t\t\tif (child.tickEnabled && child._tick) { child._tick(evtObj); }\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.DisplayObject__tick(evtObj);\r\n\t};\r\n\t\r\n\t/**\r\n\t * Recursively clones all children of this container, and adds them to the target container.\r\n\t * @method cloneChildren\r\n\t * @protected\r\n\t * @param {Container} o The target container.\r\n\t **/\r\n\tp._cloneChildren = function(o) {\r\n\t\tif (o.children.length) { o.removeAllChildren(); }\r\n\t\tvar arr = o.children;\r\n\t\tfor (var i=0, l=this.children.length; i this.children.length-1) { return false; }\r\n\t\tvar child = this.children[index];\r\n\t\tif (child) { child.parent = null; }\r\n\t\tthis.children.splice(index, 1);\r\n\t\tif (!silent) { child.dispatchEvent(\"removed\"); }\r\n\t\treturn true;\r\n\t};\r\n\r\n\t/**\r\n\t * @method _getObjectsUnderPoint\r\n\t * @param {Number} x\r\n\t * @param {Number} y\r\n\t * @param {Array} arr\r\n\t * @param {Boolean} mouse If true, it will respect mouse interaction properties like mouseEnabled, mouseChildren, and active listeners.\r\n\t * @param {Boolean} activeListener If true, there is an active mouse event listener on a parent object.\r\n\t * @param {Number} currentDepth Indicates the current depth of the search.\r\n\t * @return {DisplayObject}\r\n\t * @protected\r\n\t **/\r\n\tp._getObjectsUnderPoint = function(x, y, arr, mouse, activeListener, currentDepth) {\r\n\t\tcurrentDepth = currentDepth || 0;\r\n\t\tif (!currentDepth && !this._testMask(this, x, y)) { return null; }\r\n\t\tvar mtx, ctx = createjs.DisplayObject._hitTestContext;\r\n\t\tactiveListener = activeListener || (mouse&&this._hasMouseEventListener());\r\n\r\n\t\t// draw children one at a time, and check if we get a hit:\r\n\t\tvar children = this.children, l = children.length;\r\n\t\tfor (var i=l-1; i>=0; i--) {\r\n\t\t\tvar child = children[i];\r\n\t\t\tvar hitArea = child.hitArea;\r\n\t\t\tif (!child.visible || (!hitArea && !child.isVisible()) || (mouse && !child.mouseEnabled)) { continue; }\r\n\t\t\tif (!hitArea && !this._testMask(child, x, y)) { continue; }\r\n\t\t\t\r\n\t\t\t// if a child container has a hitArea then we only need to check its hitAre2a, so we can treat it as a normal DO:\r\n\t\t\tif (!hitArea && child instanceof Container) {\r\n\t\t\t\tvar result = child._getObjectsUnderPoint(x, y, arr, mouse, activeListener, currentDepth+1);\r\n\t\t\t\tif (!arr && result) { return (mouse && !this.mouseChildren) ? this : result; }\r\n\t\t\t} else {\r\n\t\t\t\tif (mouse && !activeListener && !child._hasMouseEventListener()) { continue; }\r\n\t\t\t\t\r\n\t\t\t\t// TODO: can we pass displayProps forward, to avoid having to calculate this backwards every time? It's kind of a mixed bag. When we're only hunting for DOs with event listeners, it may not make sense.\r\n\t\t\t\tvar props = child.getConcatenatedDisplayProps(child._props);\r\n\t\t\t\tmtx = props.matrix;\r\n\t\t\t\t\r\n\t\t\t\tif (hitArea) {\r\n\t\t\t\t\tmtx.appendMatrix(hitArea.getMatrix(hitArea._props.matrix));\r\n\t\t\t\t\tprops.alpha = hitArea.alpha;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tctx.globalAlpha = props.alpha;\r\n\t\t\t\tctx.setTransform(mtx.a, mtx.b, mtx.c, mtx.d, mtx.tx-x, mtx.ty-y);\r\n\t\t\t\t(hitArea||child).draw(ctx);\r\n\t\t\t\tif (!this._testHit(ctx)) { continue; }\r\n\t\t\t\tctx.setTransform(1, 0, 0, 1, 0, 0);\r\n\t\t\t\tctx.clearRect(0, 0, 2, 2);\r\n\t\t\t\tif (arr) { arr.push(child); }\r\n\t\t\t\telse { return (mouse && !this.mouseChildren) ? this : child; }\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n\t\r\n\t/**\r\n\t * @method _testMask\r\n\t * @param {DisplayObject} target\r\n\t * @param {Number} x\r\n\t * @param {Number} y\r\n\t * @return {Boolean} Indicates whether the x/y is within the masked region.\r\n\t * @protected\r\n\t **/\r\n\tp._testMask = function(target, x, y) {\r\n\t\tvar mask = target.mask;\r\n\t\tif (!mask || !mask.graphics || mask.graphics.isEmpty()) { return true; }\r\n\t\t\r\n\t\tvar mtx = this._props.matrix, parent = target.parent;\r\n\t\tmtx = parent ? parent.getConcatenatedMatrix(mtx) : mtx.identity();\r\n\t\tmtx = mask.getMatrix(mask._props.matrix).prependMatrix(mtx);\r\n\t\t\r\n\t\tvar ctx = createjs.DisplayObject._hitTestContext;\r\n\t\tctx.setTransform(mtx.a, mtx.b, mtx.c, mtx.d, mtx.tx-x, mtx.ty-y);\r\n\t\t\r\n\t\t// draw the mask as a solid fill:\r\n\t\tmask.graphics.drawAsPath(ctx);\r\n\t\tctx.fillStyle = \"#000\";\r\n\t\tctx.fill();\r\n\t\t\r\n\t\tif (!this._testHit(ctx)) { return false; }\r\n\t\tctx.setTransform(1, 0, 0, 1, 0, 0);\r\n\t\tctx.clearRect(0, 0, 2, 2);\r\n\t\t\r\n\t\treturn true;\r\n\t};\r\n\t\r\n\t/**\r\n\t * @method _getBounds\r\n\t * @param {Matrix2D} matrix\r\n\t * @param {Boolean} ignoreTransform If true, does not apply this object's transform.\r\n\t * @return {Rectangle}\r\n\t * @protected\r\n\t **/\r\n\tp._getBounds = function(matrix, ignoreTransform) {\r\n\t\tvar bounds = this.DisplayObject_getBounds();\r\n\t\tif (bounds) { return this._transformBounds(bounds, matrix, ignoreTransform); }\r\n\t\t\r\n\t\tvar mtx = this._props.matrix;\r\n\t\tmtx = ignoreTransform ? mtx.identity() : this.getMatrix(mtx);\r\n\t\tif (matrix) { mtx.prependMatrix(matrix); }\r\n\t\t\r\n\t\tvar l = this.children.length, rect=null;\r\n\t\tfor (var i=0; iExample\r\n\t * This example creates a stage, adds a child to it, then uses {{#crossLink \"Ticker\"}}{{/crossLink}} to update the child\r\n\t * and redraw the stage using {{#crossLink \"Stage/update\"}}{{/crossLink}}.\r\n\t *\r\n\t * var stage = new createjs.Stage(\"canvasElementId\");\r\n\t * var image = new createjs.Bitmap(\"imagePath.png\");\r\n\t * stage.addChild(image);\r\n\t * createjs.Ticker.addEventListener(\"tick\", handleTick);\r\n\t * function handleTick(event) {\r\n\t * image.x += 10;\r\n\t * stage.update();\r\n\t * }\r\n\t *\r\n\t * @class Stage\r\n\t * @extends Container\r\n\t * @constructor\r\n\t * @param {HTMLCanvasElement | String | Object} canvas A canvas object that the Stage will render to, or the string id\r\n\t * of a canvas object in the current document.\r\n\t **/\r\n\tfunction Stage(canvas) {\r\n\t\tthis.Container_constructor();\r\n\t\r\n\t\r\n\t// public properties:\r\n\t\t/**\r\n\t\t * Indicates whether the stage should automatically clear the canvas before each render. You can set this to false\r\n\t\t * to manually control clearing (for generative art, or when pointing multiple stages at the same canvas for\r\n\t\t * example).\r\n\t\t *\r\n\t\t *

    Example

    \r\n\t\t *\r\n\t\t * var stage = new createjs.Stage(\"canvasId\");\r\n\t\t * stage.autoClear = false;\r\n\t\t *\r\n\t\t * @property autoClear\r\n\t\t * @type Boolean\r\n\t\t * @default true\r\n\t\t **/\r\n\t\tthis.autoClear = true;\r\n\t\r\n\t\t/**\r\n\t\t * The canvas the stage will render to. Multiple stages can share a single canvas, but you must disable autoClear for all but the\r\n\t\t * first stage that will be ticked (or they will clear each other's render).\r\n\t\t *\r\n\t\t * When changing the canvas property you must disable the events on the old canvas, and enable events on the\r\n\t\t * new canvas or mouse events will not work as expected. For example:\r\n\t\t *\r\n\t\t * myStage.enableDOMEvents(false);\r\n\t\t * myStage.canvas = anotherCanvas;\r\n\t\t * myStage.enableDOMEvents(true);\r\n\t\t *\r\n\t\t * @property canvas\r\n\t\t * @type HTMLCanvasElement | Object\r\n\t\t **/\r\n\t\tthis.canvas = (typeof canvas == \"string\") ? document.getElementById(canvas) : canvas;\r\n\t\r\n\t\t/**\r\n\t\t * The current mouse X position on the canvas. If the mouse leaves the canvas, this will indicate the most recent\r\n\t\t * position over the canvas, and mouseInBounds will be set to false.\r\n\t\t * @property mouseX\r\n\t\t * @type Number\r\n\t\t * @readonly\r\n\t\t **/\r\n\t\tthis.mouseX = 0;\r\n\t\r\n\t\t/**\r\n\t\t * The current mouse Y position on the canvas. If the mouse leaves the canvas, this will indicate the most recent\r\n\t\t * position over the canvas, and mouseInBounds will be set to false.\r\n\t\t * @property mouseY\r\n\t\t * @type Number\r\n\t\t * @readonly\r\n\t\t **/\r\n\t\tthis.mouseY = 0;\r\n\t\r\n\t\t/**\r\n\t\t * Specifies the area of the stage to affect when calling update. This can be use to selectively\r\n\t\t * re-draw specific regions of the canvas. If null, the whole canvas area is drawn.\r\n\t\t * @property drawRect\r\n\t\t * @type {Rectangle}\r\n\t\t */\r\n\t\tthis.drawRect = null;\r\n\t\r\n\t\t/**\r\n\t\t * Indicates whether display objects should be rendered on whole pixels. You can set the\r\n\t\t * {{#crossLink \"DisplayObject/snapToPixel\"}}{{/crossLink}} property of\r\n\t\t * display objects to false to enable/disable this behaviour on a per instance basis.\r\n\t\t * @property snapToPixelEnabled\r\n\t\t * @type Boolean\r\n\t\t * @default false\r\n\t\t **/\r\n\t\tthis.snapToPixelEnabled = false;\r\n\t\r\n\t\t/**\r\n\t\t * Indicates whether the mouse is currently within the bounds of the canvas.\r\n\t\t * @property mouseInBounds\r\n\t\t * @type Boolean\r\n\t\t * @default false\r\n\t\t **/\r\n\t\tthis.mouseInBounds = false;\r\n\t\r\n\t\t/**\r\n\t\t * If true, tick callbacks will be called on all display objects on the stage prior to rendering to the canvas.\r\n\t\t * @property tickOnUpdate\r\n\t\t * @type Boolean\r\n\t\t * @default true\r\n\t\t **/\r\n\t\tthis.tickOnUpdate = true;\r\n\t\r\n\t\t/**\r\n\t\t * If true, mouse move events will continue to be called when the mouse leaves the target canvas. See\r\n\t\t * {{#crossLink \"Stage/mouseInBounds:property\"}}{{/crossLink}}, and {{#crossLink \"MouseEvent\"}}{{/crossLink}}\r\n\t\t * x/y/rawX/rawY.\r\n\t\t * @property mouseMoveOutside\r\n\t\t * @type Boolean\r\n\t\t * @default false\r\n\t\t **/\r\n\t\tthis.mouseMoveOutside = false;\r\n\t\t\r\n\t\t\r\n\t\t/**\r\n\t\t * Prevents selection of other elements in the html page if the user clicks and drags, or double clicks on the canvas.\r\n\t\t * This works by calling `preventDefault()` on any mousedown events (or touch equivalent) originating on the canvas.\r\n\t\t * @property preventSelection\r\n\t\t * @type Boolean\r\n\t\t * @default true\r\n\t\t **/\r\n\t\tthis.preventSelection = true;\r\n\t\r\n\t\t/**\r\n\t\t * The hitArea property is not supported for Stage.\r\n\t\t * @property hitArea\r\n\t\t * @type {DisplayObject}\r\n\t\t * @default null\r\n\t\t */\r\n\t\t \r\n\t\t \r\n\t// private properties:\r\n\t\t/**\r\n\t\t * Holds objects with data for each active pointer id. Each object has the following properties:\r\n\t\t * x, y, event, target, overTarget, overX, overY, inBounds, posEvtObj (native event that last updated position)\r\n\t\t * @property _pointerData\r\n\t\t * @type {Object}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._pointerData = {};\r\n\t\r\n\t\t/**\r\n\t\t * Number of active pointers.\r\n\t\t * @property _pointerCount\r\n\t\t * @type {Object}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._pointerCount = 0;\r\n\t\r\n\t\t/**\r\n\t\t * The ID of the primary pointer.\r\n\t\t * @property _primaryPointerID\r\n\t\t * @type {Object}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._primaryPointerID = null;\r\n\t\r\n\t\t/**\r\n\t\t * @property _mouseOverIntervalID\r\n\t\t * @protected\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis._mouseOverIntervalID = null;\r\n\t\t\r\n\t\t/**\r\n\t\t * @property _nextStage\r\n\t\t * @protected\r\n\t\t * @type Stage\r\n\t\t **/\r\n\t\tthis._nextStage = null;\r\n\t\t\r\n\t\t/**\r\n\t\t * @property _prevStage\r\n\t\t * @protected\r\n\t\t * @type Stage\r\n\t\t **/\r\n\t\tthis._prevStage = null;\r\n\t\t\r\n\t\t\r\n\t// initialize:\r\n\t\tthis.enableDOMEvents(true);\r\n\t}\r\n\tvar p = createjs.extend(Stage, createjs.Container);\r\n\r\n// events:\r\n\t/**\r\n\t * Dispatched when the user moves the mouse over the canvas.\r\n\t * See the {{#crossLink \"MouseEvent\"}}{{/crossLink}} class for a listing of event properties.\r\n\t * @event stagemousemove\r\n\t * @since 0.6.0\r\n\t */\r\n\r\n\t/**\r\n\t * Dispatched when the user presses their left mouse button on the canvas. See the {{#crossLink \"MouseEvent\"}}{{/crossLink}}\r\n\t * class for a listing of event properties.\r\n\t * @event stagemousedown\r\n\t * @since 0.6.0\r\n\t */\r\n\r\n\t/**\r\n\t * Dispatched when the user the user presses somewhere on the stage, then releases the mouse button anywhere that the page can detect it (this varies slightly between browsers).\r\n\t * You can use {{#crossLink \"Stage/mouseInBounds:property\"}}{{/crossLink}} to check whether the mouse is currently within the stage bounds.\r\n\t * See the {{#crossLink \"MouseEvent\"}}{{/crossLink}} class for a listing of event properties.\r\n\t * @event stagemouseup\r\n\t * @since 0.6.0\r\n\t */\r\n\r\n\t/**\r\n\t * Dispatched when the mouse moves from within the canvas area (mouseInBounds == true) to outside it (mouseInBounds == false).\r\n\t * This is currently only dispatched for mouse input (not touch). See the {{#crossLink \"MouseEvent\"}}{{/crossLink}}\r\n\t * class for a listing of event properties.\r\n\t * @event mouseleave\r\n\t * @since 0.7.0\r\n\t */\r\n\r\n\t/**\r\n\t * Dispatched when the mouse moves into the canvas area (mouseInBounds == false) from outside it (mouseInBounds == true).\r\n\t * This is currently only dispatched for mouse input (not touch). See the {{#crossLink \"MouseEvent\"}}{{/crossLink}}\r\n\t * class for a listing of event properties.\r\n\t * @event mouseenter\r\n\t * @since 0.7.0\r\n\t */\r\n\t \r\n\t/**\r\n\t * Dispatched each update immediately before the tick event is propagated through the display list.\r\n\t * You can call preventDefault on the event object to cancel propagating the tick event.\r\n\t * @event tickstart\r\n\t * @since 0.7.0\r\n\t */\r\n\t \r\n\t/**\r\n\t * Dispatched each update immediately after the tick event is propagated through the display list. Does not fire if\r\n\t * tickOnUpdate is false. Precedes the \"drawstart\" event.\r\n\t * @event tickend\r\n\t * @since 0.7.0\r\n\t */\r\n\t \r\n\t/**\r\n\t * Dispatched each update immediately before the canvas is cleared and the display list is drawn to it.\r\n\t * You can call preventDefault on the event object to cancel the draw.\r\n\t * @event drawstart\r\n\t * @since 0.7.0\r\n\t */\r\n\t \r\n\t/**\r\n\t * Dispatched each update immediately after the display list is drawn to the canvas and the canvas context is restored.\r\n\t * @event drawend\r\n\t * @since 0.7.0\r\n\t */\r\n\r\n\t \r\n// getter / setters:\r\n\t/**\r\n\t * Specifies a target stage that will have mouse / touch interactions relayed to it after this stage handles them.\r\n\t * This can be useful in cases where you have multiple layered canvases and want user interactions\r\n\t * events to pass through. For example, this would relay mouse events from topStage to bottomStage:\r\n\t *\r\n\t * topStage.nextStage = bottomStage;\r\n\t *\r\n\t * To disable relaying, set nextStage to null.\r\n\t * \r\n\t * MouseOver, MouseOut, RollOver, and RollOut interactions are also passed through using the mouse over settings\r\n\t * of the top-most stage, but are only processed if the target stage has mouse over interactions enabled.\r\n\t * Considerations when using roll over in relay targets:
      \r\n\t *
    1. The top-most (first) stage must have mouse over interactions enabled (via enableMouseOver)
    2. \r\n\t *
    3. All stages that wish to participate in mouse over interaction must enable them via enableMouseOver
    4. \r\n\t *
    5. All relay targets will share the frequency value of the top-most stage
    6. \r\n\t *
    \r\n\t * To illustrate, in this example the targetStage would process mouse over interactions at 10hz (despite passing\r\n\t * 30 as it's desired frequency):\r\n\t * \ttopStage.nextStage = targetStage;\r\n\t * \ttopStage.enableMouseOver(10);\r\n\t * \ttargetStage.enableMouseOver(30);\r\n\t * \r\n\t * If the target stage's canvas is completely covered by this stage's canvas, you may also want to disable its\r\n\t * DOM events using:\r\n\t * \r\n\t *\ttargetStage.enableDOMEvents(false);\r\n\t * \r\n\t * @property nextStage\r\n\t * @type {Stage}\r\n\t **/\r\n\tp._get_nextStage = function() {\r\n\t\treturn this._nextStage;\r\n\t};\r\n\tp._set_nextStage = function(value) {\r\n\t\tif (this._nextStage) { this._nextStage._prevStage = null; }\r\n\t\tif (value) { value._prevStage = this; }\r\n\t\tthis._nextStage = value;\r\n\t};\r\n\t\r\n\ttry {\r\n\t\tObject.defineProperties(p, {\r\n\t\t\tnextStage: { get: p._get_nextStage, set: p._set_nextStage }\r\n\t\t});\r\n\t} catch (e) {} // TODO: use Log\r\n\r\n\r\n// public methods:\r\n\t/**\r\n\t * Each time the update method is called, the stage will call {{#crossLink \"Stage/tick\"}}{{/crossLink}}\r\n\t * unless {{#crossLink \"Stage/tickOnUpdate:property\"}}{{/crossLink}} is set to false,\r\n\t * and then render the display list to the canvas.\r\n\t *\r\n\t * @method update\r\n\t * @param {Object} [props] Props object to pass to `tick()`. Should usually be a {{#crossLink \"Ticker\"}}{{/crossLink}} event object, or similar object with a delta property.\r\n\t **/\r\n\tp.update = function(props) {\r\n\t\tif (!this.canvas) { return; }\r\n\t\tif (this.tickOnUpdate) { this.tick(props); }\r\n\t\tif (this.dispatchEvent(\"drawstart\", false, true) === false) { return; }\r\n\t\tcreatejs.DisplayObject._snapToPixelEnabled = this.snapToPixelEnabled;\r\n\t\tvar r = this.drawRect, ctx = this.canvas.getContext(\"2d\");\r\n\t\tctx.setTransform(1, 0, 0, 1, 0, 0);\r\n\t\tif (this.autoClear) {\r\n\t\t\tif (r) { ctx.clearRect(r.x, r.y, r.width, r.height); }\r\n\t\t\telse { ctx.clearRect(0, 0, this.canvas.width+1, this.canvas.height+1); }\r\n\t\t}\r\n\t\tctx.save();\r\n\t\tif (this.drawRect) {\r\n\t\t\tctx.beginPath();\r\n\t\t\tctx.rect(r.x, r.y, r.width, r.height);\r\n\t\t\tctx.clip();\r\n\t\t}\r\n\t\tthis.updateContext(ctx);\r\n\t\tthis.draw(ctx, false);\r\n\t\tctx.restore();\r\n\t\tthis.dispatchEvent(\"drawend\");\r\n\t};\r\n\t\r\n\t/**\r\n\t * Propagates a tick event through the display list. This is automatically called by {{#crossLink \"Stage/update\"}}{{/crossLink}}\r\n\t * unless {{#crossLink \"Stage/tickOnUpdate:property\"}}{{/crossLink}} is set to false.\r\n\t *\r\n\t * If a props object is passed to `tick()`, then all of its properties will be copied to the event object that is\r\n\t * propagated to listeners.\r\n\t *\r\n\t * Some time-based features in EaselJS (for example {{#crossLink \"Sprite/framerate\"}}{{/crossLink}} require that\r\n\t * a {{#crossLink \"Ticker/tick:event\"}}{{/crossLink}} event object (or equivalent object with a delta property) be\r\n\t * passed as the `props` parameter to `tick()`. For example:\r\n\t *\r\n\t * \tTicker.on(\"tick\", handleTick);\r\n\t * \tfunction handleTick(evtObj) {\r\n\t * \t\t// clone the event object from Ticker, and add some custom data to it:\r\n\t * \t\tvar evt = evtObj.clone().set({greeting:\"hello\", name:\"world\"});\r\n\t * \t\t\r\n\t * \t\t// pass it to stage.update():\r\n\t * \t\tmyStage.update(evt); // subsequently calls tick() with the same param\r\n\t * \t}\r\n\t * \t\r\n\t * \t// ...\r\n\t * \tmyDisplayObject.on(\"tick\", handleDisplayObjectTick);\r\n\t * \tfunction handleDisplayObjectTick(evt) {\r\n\t * \t\tconsole.log(evt.delta); // the delta property from the Ticker tick event object\r\n\t * \t\tconsole.log(evt.greeting, evt.name); // custom data: \"hello world\"\r\n\t * \t}\r\n\t * \r\n\t * @method tick\r\n\t * @param {Object} [props] An object with properties that should be copied to the event object. Should usually be a Ticker event object, or similar object with a delta property.\r\n\t **/\r\n\tp.tick = function(props) {\r\n\t\tif (!this.tickEnabled || this.dispatchEvent(\"tickstart\", false, true) === false) { return; }\r\n\t\tvar evtObj = new createjs.Event(\"tick\");\r\n\t\tif (props) {\r\n\t\t\tfor (var n in props) {\r\n\t\t\t\tif (props.hasOwnProperty(n)) { evtObj[n] = props[n]; }\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis._tick(evtObj);\r\n\t\tthis.dispatchEvent(\"tickend\");\r\n\t};\r\n\r\n\t/**\r\n\t * Default event handler that calls the Stage {{#crossLink \"Stage/update\"}}{{/crossLink}} method when a {{#crossLink \"DisplayObject/tick:event\"}}{{/crossLink}}\r\n\t * event is received. This allows you to register a Stage instance as a event listener on {{#crossLink \"Ticker\"}}{{/crossLink}}\r\n\t * directly, using:\r\n\t *\r\n\t * Ticker.addEventListener(\"tick\", myStage);\r\n\t *\r\n\t * Note that if you subscribe to ticks using this pattern, then the tick event object will be passed through to\r\n\t * display object tick handlers, instead of delta and paused parameters.\r\n\t * @property handleEvent\r\n\t * @type Function\r\n\t **/\r\n\tp.handleEvent = function(evt) {\r\n\t\tif (evt.type == \"tick\") { this.update(evt); }\r\n\t};\r\n\r\n\t/**\r\n\t * Clears the target canvas. Useful if {{#crossLink \"Stage/autoClear:property\"}}{{/crossLink}} is set to `false`.\r\n\t * @method clear\r\n\t **/\r\n\tp.clear = function() {\r\n\t\tif (!this.canvas) { return; }\r\n\t\tvar ctx = this.canvas.getContext(\"2d\");\r\n\t\tctx.setTransform(1, 0, 0, 1, 0, 0);\r\n\t\tctx.clearRect(0, 0, this.canvas.width+1, this.canvas.height+1);\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a data url that contains a Base64-encoded image of the contents of the stage. The returned data url can\r\n\t * be specified as the src value of an image element.\r\n\t * @method toDataURL\r\n\t * @param {String} [backgroundColor] The background color to be used for the generated image. Any valid CSS color\r\n\t * value is allowed. The default value is a transparent background.\r\n\t * @param {String} [mimeType=\"image/png\"] The MIME type of the image format to be create. The default is \"image/png\". If an unknown MIME type\r\n\t * is passed in, or if the browser does not support the specified MIME type, the default value will be used.\r\n\t * @return {String} a Base64 encoded image.\r\n\t **/\r\n\tp.toDataURL = function(backgroundColor, mimeType) {\r\n\t\tvar data, ctx = this.canvas.getContext('2d'), w = this.canvas.width, h = this.canvas.height;\r\n\r\n\t\tif (backgroundColor) {\r\n\t\t\tdata = ctx.getImageData(0, 0, w, h);\r\n\t\t\tvar compositeOperation = ctx.globalCompositeOperation;\r\n\t\t\tctx.globalCompositeOperation = \"destination-over\";\r\n\t\t\t\r\n\t\t\tctx.fillStyle = backgroundColor;\r\n\t\t\tctx.fillRect(0, 0, w, h);\r\n\t\t}\r\n\r\n\t\tvar dataURL = this.canvas.toDataURL(mimeType||\"image/png\");\r\n\r\n\t\tif(backgroundColor) {\r\n\t\t\tctx.putImageData(data, 0, 0);\r\n\t\t\tctx.globalCompositeOperation = compositeOperation;\r\n\t\t}\r\n\r\n\t\treturn dataURL;\r\n\t};\r\n\r\n\t/**\r\n\t * Enables or disables (by passing a frequency of 0) mouse over ({{#crossLink \"DisplayObject/mouseover:event\"}}{{/crossLink}}\r\n\t * and {{#crossLink \"DisplayObject/mouseout:event\"}}{{/crossLink}}) and roll over events ({{#crossLink \"DisplayObject/rollover:event\"}}{{/crossLink}}\r\n\t * and {{#crossLink \"DisplayObject/rollout:event\"}}{{/crossLink}}) for this stage's display list. These events can\r\n\t * be expensive to generate, so they are disabled by default. The frequency of the events can be controlled\r\n\t * independently of mouse move events via the optional `frequency` parameter.\r\n\t *\r\n\t *

    Example

    \r\n\t *\r\n\t * var stage = new createjs.Stage(\"canvasId\");\r\n\t * stage.enableMouseOver(10); // 10 updates per second\r\n\t *\r\n\t * @method enableMouseOver\r\n\t * @param {Number} [frequency=20] Optional param specifying the maximum number of times per second to broadcast\r\n\t * mouse over/out events. Set to 0 to disable mouse over events completely. Maximum is 50. A lower frequency is less\r\n\t * responsive, but uses less CPU.\r\n\t **/\r\n\tp.enableMouseOver = function(frequency) {\r\n\t\tif (this._mouseOverIntervalID) {\r\n\t\t\tclearInterval(this._mouseOverIntervalID);\r\n\t\t\tthis._mouseOverIntervalID = null;\r\n\t\t\tif (frequency == 0) {\r\n\t\t\t\tthis._testMouseOver(true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (frequency == null) { frequency = 20; }\r\n\t\telse if (frequency <= 0) { return; }\r\n\t\tvar o = this;\r\n\t\tthis._mouseOverIntervalID = setInterval(function(){ o._testMouseOver(); }, 1000/Math.min(50,frequency));\r\n\t};\r\n\r\n\t/**\r\n\t * Enables or disables the event listeners that stage adds to DOM elements (window, document and canvas). It is good\r\n\t * practice to disable events when disposing of a Stage instance, otherwise the stage will continue to receive\r\n\t * events from the page.\r\n\t *\r\n\t * When changing the canvas property you must disable the events on the old canvas, and enable events on the\r\n\t * new canvas or mouse events will not work as expected. For example:\r\n\t *\r\n\t * myStage.enableDOMEvents(false);\r\n\t * myStage.canvas = anotherCanvas;\r\n\t * myStage.enableDOMEvents(true);\r\n\t *\r\n\t * @method enableDOMEvents\r\n\t * @param {Boolean} [enable=true] Indicates whether to enable or disable the events. Default is true.\r\n\t **/\r\n\tp.enableDOMEvents = function(enable) {\r\n\t\tif (enable == null) { enable = true; }\r\n\t\tvar n, o, ls = this._eventListeners;\r\n\t\tif (!enable && ls) {\r\n\t\t\tfor (n in ls) {\r\n\t\t\t\to = ls[n];\r\n\t\t\t\to.t.removeEventListener(n, o.f, false);\r\n\t\t\t}\r\n\t\t\tthis._eventListeners = null;\r\n\t\t} else if (enable && !ls && this.canvas) {\r\n\t\t\tvar t = window.addEventListener ? window : document;\r\n\t\t\tvar _this = this;\r\n\t\t\tls = this._eventListeners = {};\r\n\t\t\tls[\"mouseup\"] = {t:t, f:function(e) { _this._handleMouseUp(e)} };\r\n\t\t\tls[\"mousemove\"] = {t:t, f:function(e) { _this._handleMouseMove(e)} };\r\n\t\t\tls[\"dblclick\"] = {t:this.canvas, f:function(e) { _this._handleDoubleClick(e)} };\r\n\t\t\tls[\"mousedown\"] = {t:this.canvas, f:function(e) { _this._handleMouseDown(e)} };\r\n\r\n\t\t\tfor (n in ls) {\r\n\t\t\t\to = ls[n];\r\n\t\t\t\to.t.addEventListener(n, o.f, false);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Stage instances cannot be cloned.\r\n\t * @method clone\r\n\t **/\r\n\tp.clone = function() {\r\n\t\tthrow(\"Stage cannot be cloned.\");\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a string representation of this object.\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t **/\r\n\tp.toString = function() {\r\n\t\treturn \"[Stage (name=\"+ this.name +\")]\";\r\n\t};\r\n\r\n\r\n// private methods:\r\n\t/**\r\n\t * @method _getElementRect\r\n\t * @protected\r\n\t * @param {HTMLElement} e\r\n\t **/\r\n\tp._getElementRect = function(e) {\r\n\t\tvar bounds;\r\n\t\ttry { bounds = e.getBoundingClientRect(); } // this can fail on disconnected DOM elements in IE9\r\n\t\tcatch (err) { bounds = {top: e.offsetTop, left: e.offsetLeft, width:e.offsetWidth, height:e.offsetHeight}; }\r\n\r\n\t\tvar offX = (window.pageXOffset || document.scrollLeft || 0) - (document.clientLeft || document.body.clientLeft || 0);\r\n\t\tvar offY = (window.pageYOffset || document.scrollTop || 0) - (document.clientTop || document.body.clientTop || 0);\r\n\r\n\t\tvar styles = window.getComputedStyle ? getComputedStyle(e,null) : e.currentStyle; // IE <9 compatibility.\r\n\t\tvar padL = parseInt(styles.paddingLeft)+parseInt(styles.borderLeftWidth);\r\n\t\tvar padT = parseInt(styles.paddingTop)+parseInt(styles.borderTopWidth);\r\n\t\tvar padR = parseInt(styles.paddingRight)+parseInt(styles.borderRightWidth);\r\n\t\tvar padB = parseInt(styles.paddingBottom)+parseInt(styles.borderBottomWidth);\r\n\r\n\t\t// note: in some browsers bounds properties are read only.\r\n\t\treturn {\r\n\t\t\tleft: bounds.left+offX+padL,\r\n\t\t\tright: bounds.right+offX-padR,\r\n\t\t\ttop: bounds.top+offY+padT,\r\n\t\t\tbottom: bounds.bottom+offY-padB\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * @method _getPointerData\r\n\t * @protected\r\n\t * @param {Number} id\r\n\t **/\r\n\tp._getPointerData = function(id) {\r\n\t\tvar data = this._pointerData[id];\r\n\t\tif (!data) { data = this._pointerData[id] = {x:0,y:0}; }\r\n\t\treturn data;\r\n\t};\r\n\r\n\t/**\r\n\t * @method _handleMouseMove\r\n\t * @protected\r\n\t * @param {MouseEvent} e\r\n\t **/\r\n\tp._handleMouseMove = function(e) {\r\n\t\tif(!e){ e = window.event; }\r\n\t\tthis._handlePointerMove(-1, e, e.pageX, e.pageY);\r\n\t};\r\n\r\n\t/**\r\n\t * @method _handlePointerMove\r\n\t * @protected\r\n\t * @param {Number} id\r\n\t * @param {Event} e\r\n\t * @param {Number} pageX\r\n\t * @param {Number} pageY\r\n\t * @param {Stage} owner Indicates that the event has already been captured & handled by the indicated stage.\r\n\t **/\r\n\tp._handlePointerMove = function(id, e, pageX, pageY, owner) {\r\n\t\tif (this._prevStage && owner === undefined) { return; } // redundant listener.\r\n\t\tif (!this.canvas) { return; }\r\n\t\tvar nextStage=this._nextStage, o=this._getPointerData(id);\r\n\r\n\t\tvar inBounds = o.inBounds;\r\n\t\tthis._updatePointerPosition(id, e, pageX, pageY);\r\n\t\tif (inBounds || o.inBounds || this.mouseMoveOutside) {\r\n\t\t\tif (id === -1 && o.inBounds == !inBounds) {\r\n\t\t\t\tthis._dispatchMouseEvent(this, (inBounds ? \"mouseleave\" : \"mouseenter\"), false, id, o, e);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis._dispatchMouseEvent(this, \"stagemousemove\", false, id, o, e);\r\n\t\t\tthis._dispatchMouseEvent(o.target, \"pressmove\", true, id, o, e);\r\n\t\t}\r\n\t\t\r\n\t\tnextStage&&nextStage._handlePointerMove(id, e, pageX, pageY, null);\r\n\t};\r\n\r\n\t/**\r\n\t * @method _updatePointerPosition\r\n\t * @protected\r\n\t * @param {Number} id\r\n\t * @param {Event} e\r\n\t * @param {Number} pageX\r\n\t * @param {Number} pageY\r\n\t **/\r\n\tp._updatePointerPosition = function(id, e, pageX, pageY) {\r\n\t\tvar rect = this._getElementRect(this.canvas);\r\n\t\tpageX -= rect.left;\r\n\t\tpageY -= rect.top;\r\n\r\n\t\tvar w = this.canvas.width;\r\n\t\tvar h = this.canvas.height;\r\n\t\tpageX /= (rect.right-rect.left)/w;\r\n\t\tpageY /= (rect.bottom-rect.top)/h;\r\n\t\tvar o = this._getPointerData(id);\r\n\t\tif (o.inBounds = (pageX >= 0 && pageY >= 0 && pageX <= w-1 && pageY <= h-1)) {\r\n\t\t\to.x = pageX;\r\n\t\t\to.y = pageY;\r\n\t\t} else if (this.mouseMoveOutside) {\r\n\t\t\to.x = pageX < 0 ? 0 : (pageX > w-1 ? w-1 : pageX);\r\n\t\t\to.y = pageY < 0 ? 0 : (pageY > h-1 ? h-1 : pageY);\r\n\t\t}\r\n\r\n\t\to.posEvtObj = e;\r\n\t\to.rawX = pageX;\r\n\t\to.rawY = pageY;\r\n\r\n\t\tif (id === this._primaryPointerID || id === -1) {\r\n\t\t\tthis.mouseX = o.x;\r\n\t\t\tthis.mouseY = o.y;\r\n\t\t\tthis.mouseInBounds = o.inBounds;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * @method _handleMouseUp\r\n\t * @protected\r\n\t * @param {MouseEvent} e\r\n\t **/\r\n\tp._handleMouseUp = function(e) {\r\n\t\tthis._handlePointerUp(-1, e, false);\r\n\t};\r\n\r\n\t/**\r\n\t * @method _handlePointerUp\r\n\t * @protected\r\n\t * @param {Number} id\r\n\t * @param {Event} e\r\n\t * @param {Boolean} clear\r\n\t * @param {Stage} owner Indicates that the event has already been captured & handled by the indicated stage.\r\n\t **/\r\n\tp._handlePointerUp = function(id, e, clear, owner) {\r\n\t\tvar nextStage = this._nextStage, o = this._getPointerData(id);\r\n\t\tif (this._prevStage && owner === undefined) { return; } // redundant listener.\r\n\t\t\r\n\t\tvar target=null, oTarget = o.target;\r\n\t\tif (!owner && (oTarget || nextStage)) { target = this._getObjectsUnderPoint(o.x, o.y, null, true); }\r\n\t\t\r\n\t\tif (o.down) { this._dispatchMouseEvent(this, \"stagemouseup\", false, id, o, e, target); o.down = false; }\r\n\t\t\r\n\t\tif (target == oTarget) { this._dispatchMouseEvent(oTarget, \"click\", true, id, o, e); }\r\n\t\tthis._dispatchMouseEvent(oTarget, \"pressup\", true, id, o, e);\r\n\t\t\r\n\t\tif (clear) {\r\n\t\t\tif (id==this._primaryPointerID) { this._primaryPointerID = null; }\r\n\t\t\tdelete(this._pointerData[id]);\r\n\t\t} else { o.target = null; }\r\n\t\t\r\n\t\tnextStage&&nextStage._handlePointerUp(id, e, clear, owner || target && this);\r\n\t};\r\n\r\n\t/**\r\n\t * @method _handleMouseDown\r\n\t * @protected\r\n\t * @param {MouseEvent} e\r\n\t **/\r\n\tp._handleMouseDown = function(e) {\r\n\t\tthis._handlePointerDown(-1, e, e.pageX, e.pageY);\r\n\t};\r\n\r\n\t/**\r\n\t * @method _handlePointerDown\r\n\t * @protected\r\n\t * @param {Number} id\r\n\t * @param {Event} e\r\n\t * @param {Number} pageX\r\n\t * @param {Number} pageY\r\n\t * @param {Stage} owner Indicates that the event has already been captured & handled by the indicated stage.\r\n\t **/\r\n\tp._handlePointerDown = function(id, e, pageX, pageY, owner) {\r\n\t\tif (this.preventSelection) { e.preventDefault(); }\r\n\t\tif (this._primaryPointerID == null || id === -1) { this._primaryPointerID = id; } // mouse always takes over.\r\n\t\t\r\n\t\tif (pageY != null) { this._updatePointerPosition(id, e, pageX, pageY); }\r\n\t\tvar target = null, nextStage = this._nextStage, o = this._getPointerData(id);\r\n\t\tif (!owner) { target = o.target = this._getObjectsUnderPoint(o.x, o.y, null, true); }\r\n\r\n\t\tif (o.inBounds) { this._dispatchMouseEvent(this, \"stagemousedown\", false, id, o, e, target); o.down = true; }\r\n\t\tthis._dispatchMouseEvent(target, \"mousedown\", true, id, o, e);\r\n\t\t\r\n\t\tnextStage&&nextStage._handlePointerDown(id, e, pageX, pageY, owner || target && this);\r\n\t};\r\n\r\n\t/**\r\n\t * @method _testMouseOver\r\n\t * @param {Boolean} clear If true, clears the mouseover / rollover (ie. no target)\r\n\t * @param {Stage} owner Indicates that the event has already been captured & handled by the indicated stage.\r\n\t * @param {Stage} eventTarget The stage that the cursor is actively over.\r\n\t * @protected\r\n\t **/\r\n\tp._testMouseOver = function(clear, owner, eventTarget) {\r\n\t\tif (this._prevStage && owner === undefined) { return; } // redundant listener.\r\n\t\t\r\n\t\tvar nextStage = this._nextStage;\r\n\t\tif (!this._mouseOverIntervalID) {\r\n\t\t\t// not enabled for mouseover, but should still relay the event.\r\n\t\t\tnextStage&&nextStage._testMouseOver(clear, owner, eventTarget);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar o = this._getPointerData(-1);\r\n\t\t// only update if the mouse position has changed. This provides a lot of optimization, but has some trade-offs.\r\n\t\tif (!o || (!clear && this.mouseX == this._mouseOverX && this.mouseY == this._mouseOverY && this.mouseInBounds)) { return; }\r\n\t\t\r\n\t\tvar e = o.posEvtObj;\r\n\t\tvar isEventTarget = eventTarget || e&&(e.target == this.canvas);\r\n\t\tvar target=null, common = -1, cursor=\"\", t, i, l;\r\n\t\t\r\n\t\tif (!owner && (clear || this.mouseInBounds && isEventTarget)) {\r\n\t\t\ttarget = this._getObjectsUnderPoint(this.mouseX, this.mouseY, null, true);\r\n\t\t\tthis._mouseOverX = this.mouseX;\r\n\t\t\tthis._mouseOverY = this.mouseY;\r\n\t\t}\r\n\r\n\t\tvar oldList = this._mouseOverTarget||[];\r\n\t\tvar oldTarget = oldList[oldList.length-1];\r\n\t\tvar list = this._mouseOverTarget = [];\r\n\r\n\t\t// generate ancestor list and check for cursor:\r\n\t\tt = target;\r\n\t\twhile (t) {\r\n\t\t\tlist.unshift(t);\r\n\t\t\tif (!cursor) { cursor = t.cursor; }\r\n\t\t\tt = t.parent;\r\n\t\t}\r\n\t\tthis.canvas.style.cursor = cursor;\r\n\t\tif (!owner && eventTarget) { eventTarget.canvas.style.cursor = cursor; }\r\n\r\n\t\t// find common ancestor:\r\n\t\tfor (i=0,l=list.length; icommon; i--) {\r\n\t\t\tthis._dispatchMouseEvent(oldList[i], \"rollout\", false, -1, o, e, target);\r\n\t\t}\r\n\r\n\t\tfor (i=list.length-1; i>common; i--) {\r\n\t\t\tthis._dispatchMouseEvent(list[i], \"rollover\", false, -1, o, e, oldTarget);\r\n\t\t}\r\n\r\n\t\tif (oldTarget != target) {\r\n\t\t\tthis._dispatchMouseEvent(target, \"mouseover\", true, -1, o, e, oldTarget);\r\n\t\t}\r\n\t\t\r\n\t\tnextStage&&nextStage._testMouseOver(clear, owner || target && this, eventTarget || isEventTarget && this);\r\n\t};\r\n\r\n\t/**\r\n\t * @method _handleDoubleClick\r\n\t * @protected\r\n\t * @param {MouseEvent} e\r\n\t * @param {Stage} owner Indicates that the event has already been captured & handled by the indicated stage.\r\n\t **/\r\n\tp._handleDoubleClick = function(e, owner) {\r\n\t\tvar target=null, nextStage=this._nextStage, o=this._getPointerData(-1);\r\n\t\tif (!owner) {\r\n\t\t\ttarget = this._getObjectsUnderPoint(o.x, o.y, null, true);\r\n\t\t\tthis._dispatchMouseEvent(target, \"dblclick\", true, -1, o, e);\r\n\t\t}\r\n\t\tnextStage&&nextStage._handleDoubleClick(e, owner || target && this);\r\n\t};\r\n\r\n\t/**\r\n\t * @method _dispatchMouseEvent\r\n\t * @protected\r\n\t * @param {DisplayObject} target\r\n\t * @param {String} type\r\n\t * @param {Boolean} bubbles\r\n\t * @param {Number} pointerId\r\n\t * @param {Object} o\r\n\t * @param {MouseEvent} [nativeEvent]\r\n\t * @param {DisplayObject} [relatedTarget]\r\n\t **/\r\n\tp._dispatchMouseEvent = function(target, type, bubbles, pointerId, o, nativeEvent, relatedTarget) {\r\n\t\t// TODO: might be worth either reusing MouseEvent instances, or adding a willTrigger method to avoid GC.\r\n\t\tif (!target || (!bubbles && !target.hasEventListener(type))) { return; }\r\n\t\t/*\r\n\t\t// TODO: account for stage transformations?\r\n\t\tthis._mtx = this.getConcatenatedMatrix(this._mtx).invert();\r\n\t\tvar pt = this._mtx.transformPoint(o.x, o.y);\r\n\t\tvar evt = new createjs.MouseEvent(type, bubbles, false, pt.x, pt.y, nativeEvent, pointerId, pointerId==this._primaryPointerID || pointerId==-1, o.rawX, o.rawY);\r\n\t\t*/\r\n\t\tvar evt = new createjs.MouseEvent(type, bubbles, false, o.x, o.y, nativeEvent, pointerId, pointerId === this._primaryPointerID || pointerId === -1, o.rawX, o.rawY, relatedTarget);\r\n\t\ttarget.dispatchEvent(evt);\r\n\t};\r\n\r\n\r\n\tcreatejs.Stage = createjs.promote(Stage, \"Container\");\r\n}());\r\n\r\n//##############################################################################\r\n// StageGL.js\r\n//##############################################################################\r\n\r\n/*\r\n * README IF EDITING:\r\n * Terminology for developers:\r\n *\r\n * Vertex: a point that help defines a shape, 3 per triangle. Usually has an x,y,z but can have more/less info.\r\n * Vertex Property: a piece of information attached to the vertex like a vector3 containing x,y,z\r\n * Index/Indices: used in groups of 3 to define a triangle, points to vertices by their index in an array (some render\r\n * \t\tmodes do not use these)\r\n * Card: a group of 2 triangles used to display a rectangular image\r\n * U/V: common names for the [0-1] texture co-ordinates on an image\r\n * Batch: a single call to the renderer, best done as little as possible so multiple cards are put into a single batch\r\n * Buffer: WebGL array data\r\n * Program/Shader: For every vertex we run the Vertex shader. The results are used per pixel by the Fragment shader. When\r\n * \t\tcombined and paired these are a shader \"program\"\r\n * Texture: WebGL representation of image data and associated extra information\r\n * Slot: A space on the GPU into which textures can be loaded for use in a batch, using \"ActiveTexture\" switches texture slot.\r\n */\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\t/**\r\n\t * A StageGL instance is the root level {{#crossLink \"Container\"}}{{/crossLink}} for an WebGL-optimized display list,\r\n\t * which is used in place of the usual {{#crossLink \"Stage\"}}{{/crossLink}}. This class should behave identically to\r\n\t * a {{#crossLink \"Stage\"}}{{/crossLink}} except for WebGL-specific functionality.\r\n\t *\r\n\t * Each time the {{#crossLink \"Stage/tick\"}}{{/crossLink}} method is called, the display list is rendered to the\r\n\t * target <canvas/> instance, ignoring non-WebGL-compatible display objects. On devices and browsers that don't\r\n\t * support WebGL, content will automatically be rendered to canvas 2D context instead.\r\n\t *\r\n\t *

    Limitations

    \r\n\t * - {{#crossLink \"Shape\"}}{{/crossLink}}, {{#crossLink \"Shadow\"}}{{/crossLink}}, and {{#crossLink \"Text\"}}{{/crossLink}}\r\n\t * \tare not rendered when added to the display list.\r\n\t * - To display something StageGL cannot render, {{#crossLink \"displayObject/cache\"}}{{/crossLink}} the object.\r\n\t *\tCaches can be rendered regardless of source.\r\n\t * - Images are wrapped as a webGL \"Texture\". Each graphics card has a limit to its concurrent Textures, too many \r\n\t * Textures will noticeably slow performance.\r\n\t * - Each cache counts as an individual Texture. As such {{#crossLink \"SpriteSheet\"}}{{/crossLink}} and \r\n\t * {{#crossLink \"SpriteSheetBuilder\"}}{{/crossLink}} are recommended practices to help keep texture counts low.\r\n\t * - To use any image node (DOM Image/Canvas Element) between multiple StageGL instances it must be a \r\n\t * {{#crossLink \"Bitmap/clone\"}}{{/crossLink}}, otherwise the GPU texture loading and tracking will get confused.\r\n\t * - to avoid an up/down scaled render you must call {{#crossLink \"StageGL/updateViewport\"}}{{/crossLink}} if you\r\n\t * resize your canvas after making a StageGL instance, this will properly size the WebGL context stored in memory.\r\n\t * - Best performance in demanding scenarios will come from manual management of texture memory, but it is handled\r\n\t * automatically by default. See {{#crossLink \"StageGL/releaseTexture\"}}{{/crossLink}} for details.\r\n\t *\r\n\t *

    Example

    \r\n\t * This example creates a StageGL instance, adds a child to it, then uses the EaselJS {{#crossLink \"Ticker\"}}{{/crossLink}}\r\n\t * to update the child and redraw the stage.\r\n\t *\r\n\t * var stage = new createjs.StageGL(\"canvasElementId\");\r\n\t *\r\n\t * var image = new createjs.Bitmap(\"imagePath.png\");\r\n\t * stage.addChild(image);\r\n\t *\r\n\t * createjs.Ticker.on(\"tick\", handleTick);\r\n\t *\r\n\t * function handleTick(event) {\r\n\t * image.x += 10;\r\n\t * stage.update();\r\n\t * }\r\n\t *\r\n\t *

    Notes

    \r\n\t * - StageGL is not currently included in the minified version of EaselJS.\r\n\t * - {{#crossLink \"SpriteContainer\"}}{{/crossLink}} (the previous approach to WebGL with EaselJS) has been deprecated.\r\n\t * - Earlier versions of WebGL support in EaselJS (SpriteStage and SpriteContainer) had hard limitations on images\r\n\t * \tper container, which have been solved.\r\n\t *\r\n\t * @class StageGL\r\n\t * @extends Stage\r\n\t * @constructor\r\n\t * @param {HTMLCanvasElement | String | Object} canvas A canvas object that StageGL will render to, or the string id\r\n\t * of a canvas object in the current DOM.\r\n\t * @param {Object} options All the option parameters in a reference object, some are not supported by some browsers.\r\n\t * @param {Boolean} [options.preserveBuffer=false] If `true`, the canvas is NOT auto-cleared by WebGL (the spec\r\n\t * discourages setting this to `true`). This is useful if you want persistent draw effects.\r\n\t * @param {Boolean} [options.antialias=false] Specifies whether or not the browser's WebGL implementation should try\r\n\t * to perform anti-aliasing. This will also enable linear pixel sampling on power-of-two textures (smoother images).\r\n\t * @param {Boolean} [options.transparent=false] If `true`, the canvas is transparent. This is very\r\n\t * expensive, and should be used with caution.\r\n\t * @param {Boolean} [options.premultiply=false] Alters color handling. If `true`, this assumes the shader must\r\n\t * account for pre-multiplied alpha. This can help avoid visual halo effects with some assets, but may also cause\r\n\t * problems with other assets.\r\n\t * @param {Integer} [options.autoPurge=1200] How often the system should automatically dump unused textures with\r\n\t * `purgeTextures(autoPurge)` every `autoPurge/2` draws. See {{#crossLink \"StageGL/purgeTextures\"}}{{/crossLink}} for more\r\n\t * information.\r\n\t */\r\n\tfunction StageGL(canvas, options) {\r\n\t\tthis.Stage_constructor(canvas);\r\n\r\n\t\tif (options !== undefined) {\r\n\t\t\tif (typeof options !== \"object\"){ throw(\"Invalid options object\"); }\r\n\t\t\tvar premultiply = options.premultiply;\r\n\t\t\tvar transparent = options.transparent;\r\n\t\t\tvar antialias = options.antialias;\r\n\t\t\tvar preserveBuffer = options.preserveBuffer;\r\n\t\t\tvar autoPurge = options.autoPurge;\r\n\t\t}\r\n\r\n// public properties:\r\n\t\t/**\r\n\t\t * Console log potential issues and problems. This is designed to have minimal performance impact, so\r\n\t\t * if extensive debugging information is required, this may be inadequate. See {{#crossLink \"WebGLInspector\"}}{{/crossLink}}\r\n\t\t * @property vocalDebug\r\n\t\t * @type {Boolean}\r\n\t\t * @default false\r\n\t\t */\r\n\t\tthis.vocalDebug = false;\r\n\r\n// private properties:\r\n\t\t/**\r\n\t\t * Specifies whether or not the canvas is auto-cleared by WebGL. The WebGL spec discourages `true`.\r\n\t\t * If true, the canvas is NOT auto-cleared by WebGL. Used when the canvas context is created and requires\r\n\t\t * context re-creation to update.\r\n\t\t * @property _preserveBuffer\r\n\t\t * @protected\r\n\t\t * @type {Boolean}\r\n\t\t * @default false\r\n\t\t */\r\n\t\tthis._preserveBuffer = preserveBuffer||false;\r\n\r\n\t\t/**\r\n\t\t * Specifies whether or not the browser's WebGL implementation should try to perform anti-aliasing.\r\n\t\t * @property _antialias\r\n\t\t * @protected\r\n\t\t * @type {Boolean}\r\n\t\t * @default false\r\n\t\t */\r\n\t\tthis._antialias = antialias||false;\r\n\r\n\t\t/**\r\n\t\t * Specifies whether or not the browser's WebGL implementation should be transparent.\r\n\t\t * @property _transparent\r\n\t\t * @protected\r\n\t\t * @type {Boolean}\r\n\t\t * @default false\r\n\t\t */\r\n\t\tthis._transparent = transparent||false;\r\n\r\n\t\t/**\r\n\t\t * Specifies whether or not StageGL is handling colours as premultiplied alpha.\r\n\t\t * @property _premultiply\r\n\t\t * @protected\r\n\t\t * @type {Boolean}\r\n\t\t * @default false\r\n\t\t */\r\n\t\tthis._premultiply = premultiply||false;\r\n\r\n\t\t/**\r\n\t\t * Internal value of {{#crossLink \"StageGL/autoPurge\"}}{{/crossLink}}\r\n\t\t * @property _autoPurge\r\n\t\t * @protected\r\n\t\t * @type {Integer}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis._autoPurge = undefined;\r\n\t\tthis.autoPurge = autoPurge;\t//getter/setter handles setting the real value and validating\r\n\r\n\t\t/**\r\n\t\t * The width in px of the drawing surface saved in memory.\r\n\t\t * @property _viewportWidth\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t */\r\n\t\tthis._viewportWidth = 0;\r\n\r\n\t\t/**\r\n\t\t * The height in px of the drawing surface saved in memory.\r\n\t\t * @property _viewportHeight\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t */\r\n\t\tthis._viewportHeight = 0;\r\n\r\n\t\t/**\r\n\t\t * A 2D projection matrix used to convert WebGL's viewspace into canvas co-ordinates. Regular canvas display\r\n\t\t * uses Top-Left values of [0,0] where WebGL uses a Center [0,0] Top-Right [1,1] (euclidean) system.\r\n\t\t * @property _projectionMatrix\r\n\t\t * @protected\r\n\t\t * @type {Float32Array}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis._projectionMatrix = null;\r\n\r\n\t\t/**\r\n\t\t * The current WebGL canvas context. Often shorthanded to just \"gl\" in many parts of the code.\r\n\t\t * @property _webGLContext\r\n\t\t * @protected\r\n\t\t * @type {WebGLRenderingContext}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis._webGLContext = null;\r\n\r\n\t\t/**\r\n\t\t * The color to use when the WebGL canvas has been cleared. May appear as a background color. Defaults to grey.\r\n\t\t * @property _clearColor\r\n\t\t * @protected\r\n\t\t * @type {Object}\r\n\t\t * @default {r: 0.50, g: 0.50, b: 0.50, a: 0.00}\r\n\t\t */\r\n\t\tthis._clearColor = {r: 0.50, g: 0.50, b: 0.50, a: 0.00};\r\n\r\n\t\t/**\r\n\t\t * The maximum number of cards (aka a single sprite) that can be drawn in one draw call. Use getter/setters to\r\n\t\t * modify otherwise internal buffers may be incorrect sizes.\r\n\t\t * @property _maxCardsPerBatch\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default StageGL.DEFAULT_MAX_BATCH_SIZE (10000)\r\n\t\t */\r\n\t\tthis._maxCardsPerBatch = StageGL.DEFAULT_MAX_BATCH_SIZE;\t\t\t\t\t\t\t\t\t\t\t\t\t\t//TODO: write getter/setters for this\r\n\r\n\t\t/**\r\n\t\t * The shader program used to draw the current batch.\r\n\t\t * @property _activeShader\r\n\t\t * @protected\r\n\t\t * @type {WebGLProgram}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis._activeShader = null;\r\n\r\n\t\t/**\r\n\t\t * The vertex position data for the current draw call.\r\n\t\t * @property _vertices\r\n\t\t * @protected\r\n\t\t * @type {Float32Array}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis._vertices = null;\r\n\r\n\t\t/**\r\n\t\t * The WebGL buffer attached to {{#crossLink \"StageGL/_vertices:property\"}}{{/crossLink}}.\r\n\t\t * @property _vertexPositionBuffer\r\n\t\t * @protected\r\n\t\t * @type {WebGLBuffer}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis._vertexPositionBuffer = null;\r\n\r\n\t\t/**\r\n\t\t * The vertex U/V data for the current draw call.\r\n\t\t * @property _uvs\r\n\t\t * @protected\r\n\t\t * @type {Float32Array}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis._uvs = null;\r\n\r\n\t\t/**\r\n\t\t * The WebGL buffer attached to {{#crossLink \"StageGL/_uvs:property\"}}{{/crossLink}}.\r\n\t\t * @property _uvPositionBuffer\r\n\t\t * @protected\r\n\t\t * @type {WebGLBuffer}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis._uvPositionBuffer = null;\r\n\r\n\t\t/**\r\n\t\t * The vertex indices data for the current draw call.\r\n\t\t * @property _indices\r\n\t\t * @protected\r\n\t\t * @type {Float32Array}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis._indices = null;\r\n\r\n\t\t/**\r\n\t\t * The WebGL buffer attached to {{#crossLink \"StageGL/_indices:property\"}}{{/crossLink}}.\r\n\t\t * @property _textureIndexBuffer\r\n\t\t * @protected\r\n\t\t * @type {WebGLBuffer}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis._textureIndexBuffer = null;\r\n\r\n\t\t/**\r\n\t\t * The vertices data for the current draw call.\r\n\t\t * @property _alphas\r\n\t\t * @protected\r\n\t\t * @type {Float32Array}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis._alphas = null;\r\n\r\n\t\t/**\r\n\t\t * The WebGL buffer attached to {{#crossLink \"StageGL/_alphas:property\"}}{{/crossLink}}.\r\n\t\t * @property _alphaBuffer\r\n\t\t * @protected\r\n\t\t * @type {WebGLBuffer}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis._alphaBuffer = null;\r\n\r\n\t\t/**\r\n\t\t * An index based lookup of every WebGL Texture currently in use.\r\n\t\t * @property _drawTexture\r\n\t\t * @protected\r\n\t\t * @type {Array}\r\n\t\t */\r\n\t\tthis._textureDictionary = [];\r\n\r\n\t\t/**\r\n\t\t * A string based lookup hash of which index a texture is stored at in the dictionary. The lookup string is\r\n\t\t * often the src url.\r\n\t\t * @property _textureIDs\r\n\t\t * @protected\r\n\t\t * @type {Object}\r\n\t\t */\r\n\t\tthis._textureIDs = {};\r\n\r\n\t\t/**\r\n\t\t * An array of all the textures currently loaded into the GPU. The index in the array matches the GPU index.\r\n\t\t * @property _batchTextures\r\n\t\t * @protected\r\n\t\t * @type {Array}\r\n\t\t */\r\n\t\tthis._batchTextures = [];\r\n\r\n\t\t/**\r\n\t\t * An array of all the simple filler textures used to prevent issues with missing textures in a batch.\r\n\t\t * @property _baseTextures\r\n\t\t * @protected\r\n\t\t * @type {Array}\r\n\t\t */\r\n\t\tthis._baseTextures = [];\r\n\r\n\t\t/**\r\n\t\t * The number of concurrent textures the GPU can handle. This value is dynamically set from WebGL during initialization\r\n\t\t * via `gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS)`. The WebGL spec states that the lowest guaranteed value is 8,\r\n\t\t * but it could be higher. Do not set this value higher than the value returned by the GPU. Setting it lower will\r\n\t\t * probably reduce performance, but may be advisable to reserve slots for custom filter work.\r\n\t\t * NOTE: Can also act as a length for {{#crossLink \"StageGL/_batchTextures:property\"}}.\r\n\t\t * @property _batchTextureCount\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default 8\r\n\t\t */\r\n\t\tthis._batchTextureCount = 8;\r\n\r\n\t\t/**\r\n\t\t * The location at which the last texture was inserted into a GPU slot in {{#crossLink \"StageGL/_batchTextures:property\"}}{{/crossLink}}.\r\n\t\t * Manual control of this variable can yield improvements in performance by intelligently replacing textures\r\n\t\t * inside a batch to reduce texture re-load. It is impossible to write automated general use code, as it requires\r\n\t\t * display list look ahead inspection and/or render foreknowledge.\r\n\t\t * @property _lastTextureInsert\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default -1\r\n\t\t */\r\n\t\tthis._lastTextureInsert = -1;\r\n\r\n\t\t/**\r\n\t\t * The current batch being drawn, A batch consists of a call to `drawElements` on the GPU. Many of these calls\r\n\t\t * can occur per draw.\r\n\t\t * @property _batchId\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t */\r\n\t\tthis._batchID = 0;\r\n\r\n\t\t/**\r\n\t\t * The current draw being performed, may contain multiple batches. Comparing to {{#crossLink \"StageGL/_batchID:property\"}}{{/crossLink}}\r\n\t\t * can reveal batching efficiency.\r\n\t\t * @property _drawID\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t */\r\n\t\tthis._drawID = 0;\r\n\r\n\t\t/**\r\n\t\t * Used to prevent textures in certain GPU slots from being replaced by an insert.\r\n\t\t * @property _slotBlackList\r\n\t\t * @protected\r\n\t\t * @type {Array}\r\n\t\t */\r\n\t\tthis._slotBlacklist = [];\r\n\r\n\t\t/**\r\n\t\t * Used to prevent nested draw calls from accidentally overwriting drawing information by tracking depth.\r\n\t\t * @property _isDrawing\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t */\r\n\t\tthis._isDrawing = 0;\r\n\r\n\t\t/**\r\n\t\t * Used to ensure every canvas used as a texture source has a unique ID.\r\n\t\t * @property _lastTrackedCanvas\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t */\r\n\t\tthis._lastTrackedCanvas = 0;\r\n\r\n\t\t/**\r\n\t\t * Controls whether final rendering output of a {{#crossLink \"cacheDraw\"}}{{/crossLink}} is the canvas or a render\r\n\t\t * texture. See the {{#crossLink \"cache\"}}{{/crossLink}} function modifications for full implications and discussion.\r\n\t\t * @property isCacheControlled\r\n\t\t * @protected\r\n\t\t * @type {Boolean}\r\n\t\t * @default false\r\n\t\t * @todo LM: is this supposed to be _isCacheControlled since its private?\r\n\t\t */\r\n\t\tthis.isCacheControlled = false;\r\n\r\n\t\t/**\r\n\t\t * Used to counter-position the object being cached so it aligns with the cache surface. Additionally ensures\r\n\t\t * that all rendering starts with a top level container.\r\n\t\t * @property _cacheContainer\r\n\t\t * @protected\r\n\t\t * @type {Container}\r\n\t\t * @default An instance of an EaselJS Container.\r\n\t\t */\r\n\t\tthis._cacheContainer = new createjs.Container();\r\n\r\n\t\t// and begin\r\n\t\tthis._initializeWebGL();\r\n\t}\r\n\tvar p = createjs.extend(StageGL, createjs.Stage);\r\n\r\n// static methods:\r\n\t/**\r\n\t * Calculate the U/V co-ordinate based info for sprite frames. Instead of pixel count it uses a 0-1 space. Also includes\r\n\t * the ability to get info back for a specific frame, or only calculate that one frame.\r\n\t *\r\n\t * //generate UV rects for all entries\r\n\t * StageGL.buildUVRects( spriteSheetA );\r\n\t * //generate all, fetch the first\r\n\t * var firstFrame = StageGL.buildUVRects( spriteSheetB, 0 );\r\n\t * //generate the rect for just a single frame for performance's sake\r\n\t * var newFrame = StageGL.buildUVRects( dynamicSpriteSheet, newFrameIndex, true );\r\n\t *\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method buildUVRects\r\n\t * @param {SpriteSheet} spritesheet The spritesheet to find the frames on\r\n\t * @param {int} [target=-1] The index of the frame to return\r\n\t * @param {Boolean} [onlyTarget=false] Whether \"target\" is the only frame that gets calculated\r\n\t * @static\r\n\t * @return {Object} the target frame if supplied and present or a generic frame {t, l, b, r}\r\n\t */\r\n\tStageGL.buildUVRects = function (spritesheet, target, onlyTarget) {\r\n\t\tif (!spritesheet || !spritesheet._frames) { return null; }\r\n\t\tif (target === undefined) { target = -1; }\r\n\t\tif (onlyTarget === undefined) { onlyTarget = false; }\r\n\r\n\t\tvar start = (target != -1 && onlyTarget)?(target):(0);\r\n\t\tvar end = (target != -1 && onlyTarget)?(target+1):(spritesheet._frames.length);\r\n\t\tfor (var i=start; i 0.0035) {\" +\t\t// 1/255 = 0.0039, so ignore any value below 1 because it's probably noise\r\n\t\t\t\"gl_FragColor = vec4(color.rgb/color.a, color.a * alphaValue);\" +\r\n\t\t\"} else {\" +\r\n\t\t\t\"gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\" +\r\n\t\t\"}\"\r\n\t);\r\n\r\n\t//TODO: DHG: a real particle shader\r\n\t/**\r\n\t * @property PARTICLE_VERTEX_BODY\r\n\t * @todo\r\n\t * @final\r\n\t * @static\r\n\t * @type {String}\r\n\t * @readonly\r\n\t */\r\n\tStageGL.PARTICLE_VERTEX_BODY = (\r\n\t\tStageGL.REGULAR_VERTEX_BODY\r\n\t);\r\n\t/**\r\n\t * @property PARTICLE_FRAGMENT_BODY\r\n\t * @todo\r\n\t * @final\r\n\t * @static\r\n\t * @type {String}\r\n\t * @readonly\r\n\t */\r\n\tStageGL.PARTICLE_FRAGMENT_BODY = (\r\n\t\tStageGL.REGULAR_FRAGMENT_BODY\r\n\t);\r\n\r\n\t/**\r\n\t * Portion of the shader that contains the \"varying\" properties required in both vertex and fragment shaders. The\r\n\t * cover shader is designed to be a simple vertex/uv only texture render that covers the render surface. Shader\r\n\t * code may contain templates that are replaced pre-compile.\r\n\t * @property COVER_VARYING_HEADER\r\n\t * @static\r\n\t * @final\r\n\t * @type {String}\r\n\t * @readonly\r\n\t */\r\n\tStageGL.COVER_VARYING_HEADER = (\r\n\t\t\"precision mediump float;\" +\r\n\r\n\t\t\"varying highp vec2 vRenderCoord;\" +\r\n\t\t\"varying highp vec2 vTextureCoord;\"\r\n\t);\r\n\r\n\t/**\r\n\t * Actual full header for the vertex shader. Includes the varying header. The cover shader is designed to be a\r\n\t * simple vertex/uv only texture render that covers the render surface. Shader code may contain templates that are\r\n\t * replaced pre-compile.\r\n\t * @property COVER_VERTEX_HEADER\r\n\t * @static\r\n\t * @final\r\n\t * @type {String}\r\n\t * @readonly\r\n\t */\r\n\tStageGL.COVER_VERTEX_HEADER = (\r\n\t\tStageGL.COVER_VARYING_HEADER +\r\n\t\t\"attribute vec2 vertexPosition;\" +\r\n\t\t\"attribute vec2 uvPosition;\" +\r\n\t\t\"uniform float uUpright;\"\r\n\t);\r\n\r\n\t/**\r\n\t * Actual full header for the fragment shader. Includes the varying header. The cover shader is designed to be a\r\n\t * simple vertex/uv only texture render that covers the render surface. Shader code may contain templates that are\r\n\t * replaced pre-compile.\r\n\t * @property COVER_FRAGMENT_HEADER\r\n\t * @static\r\n\t * @final\r\n\t * @type {String}\r\n\t * @readonly\r\n\t */\r\n\tStageGL.COVER_FRAGMENT_HEADER = (\r\n\t\tStageGL.COVER_VARYING_HEADER +\r\n\t\t\"uniform sampler2D uSampler;\"\r\n\t);\r\n\r\n\t/**\r\n\t * Body of the vertex shader. The cover shader is designed to be a simple vertex/uv only texture render that covers\r\n\t * the render surface. Shader code may contain templates that are replaced pre-compile.\r\n\t * @property COVER_VERTEX_BODY\r\n\t * @static\r\n\t * @final\r\n\t * @type {String}\r\n\t * @readonly\r\n\t */\r\n\tStageGL.COVER_VERTEX_BODY = (\r\n\t\t\"void main(void) {\" +\r\n\t\t\t\"gl_Position = vec4(vertexPosition.x, vertexPosition.y, 0.0, 1.0);\" +\r\n\t\t\t\"vRenderCoord = uvPosition;\" +\r\n\t\t\t\"vTextureCoord = vec2(uvPosition.x, abs(uUpright - uvPosition.y));\" +\r\n\t\t\"}\"\r\n\t);\r\n\r\n\t/**\r\n\t * Body of the fragment shader. The cover shader is designed to be a simple vertex/uv only texture render that\r\n\t * covers the render surface. Shader code may contain templates that are replaced pre-compile.\r\n\t * @property COVER_FRAGMENT_BODY\r\n\t * @static\r\n\t * @final\r\n\t * @type {String}\r\n\t * @readonly\r\n\t */\r\n\tStageGL.COVER_FRAGMENT_BODY = (\r\n\t\t\"void main(void) {\" +\r\n\t\t\t\"vec4 color = texture2D(uSampler, vRenderCoord);\" +\r\n\t\t\t\"gl_FragColor = color;\" +\r\n\t\t\"}\"\r\n\t);\r\n\r\n// events:\r\n\t/**\r\n\t * Dispatched each update immediately before the canvas is cleared and the display list is drawn to it. You can call\r\n\t * {{#crossLink \"Event/preventDefault\"}}{{/crossLink}} on the event to cancel the draw.\r\n\t * @event drawstart\r\n\t */\r\n\r\n\t/**\r\n\t * Dispatched each update immediately after the display list is drawn to the canvas and the canvas context is restored.\r\n\t * @event drawend\r\n\t */\r\n\r\n// getter / setters:\r\n\tp._get_isWebGL = function () {\r\n\t\treturn !!this._webGLContext;\r\n\t};\r\n\r\n\tp._set_autoPurge = function (value) {\r\n\t\tvalue = isNaN(value)?1200:value;\r\n\t\tif (value != -1) {\r\n\t\t\tvalue = value<10?10:value;\r\n\t\t}\r\n\t\tthis._autoPurge = value;\r\n\t};\r\n\tp._get_autoPurge = function () {\r\n\t\treturn Number(this._autoPurge);\r\n\t};\r\n\r\n\ttry {\r\n\t\tObject.defineProperties(p, {\r\n\t\t\t/**\r\n\t\t\t * Indicates whether WebGL is being used for rendering. For example, this would be `false` if WebGL is not\r\n\t\t\t * supported in the browser.\r\n\t\t\t * @property isWebGL\r\n\t\t\t * @type {Boolean}\r\n\t\t\t * @readonly\r\n\t\t\t */\r\n\t\t\tisWebGL: { get: p._get_isWebGL },\r\n\r\n\t\t\t/**\r\n\t\t\t * Specifies whether or not StageGL is automatically purging unused textures. Higher numbers purge less\r\n\t\t\t * often. Values below 10 are upgraded to 10, and -1 disables this feature.\r\n\t\t\t * @property autoPurge\r\n\t\t\t * @protected\r\n\t\t\t * @type {Integer}\r\n\t\t\t * @default 1000\r\n\t\t\t */\r\n\t\t\tautoPurge: { get: p._get_autoPurge, set: p._set_autoPurge }\r\n\t\t});\r\n\t} catch (e) {} // TODO: use Log\r\n\r\n\r\n// constructor methods:\r\n\t/**\r\n\t * Create and properly initialize the WebGL instance.\r\n\t * @method _initializeWebGL\r\n\t * @protected\r\n\t * @return {WebGLRenderingContext}\r\n\t */\r\n\tp._initializeWebGL = function () {\r\n\t\tif (this.canvas) {\r\n\t\t\tif (!this._webGLContext || this._webGLContext.canvas !== this.canvas) {\r\n\t\t\t\t// A context hasn't been defined yet,\r\n\t\t\t\t// OR the defined context belongs to a different canvas, so reinitialize.\r\n\r\n\t\t\t\t// defaults and options\r\n\t\t\t\tvar options = {\r\n\t\t\t\t\tdepth: false, // Disable the depth buffer as it isn't used.\r\n\t\t\t\t\talpha: this._transparent, // Make the canvas background transparent.\r\n\t\t\t\t\tstencil: true,\r\n\t\t\t\t\tantialias: this._antialias,\r\n\t\t\t\t\tpremultipliedAlpha: this._premultiply, // Assume the drawing buffer contains colors with premultiplied alpha.\r\n\t\t\t\t\tpreserveDrawingBuffer: this._preserveBuffer\r\n\t\t\t\t};\r\n\r\n\t\t\t\tvar gl = this._webGLContext = this._fetchWebGLContext(this.canvas, options);\r\n\t\t\t\tif (!gl) { return null; }\r\n\r\n\t\t\t\tthis.updateSimultaneousTextureCount(gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS));\r\n\t\t\t\tthis._maxTextureSlots = gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS);\r\n\t\t\t\tthis._createBuffers(gl);\r\n\t\t\t\tthis._initTextures(gl);\r\n\r\n\t\t\t\tgl.disable(gl.DEPTH_TEST);\r\n\t\t\t\tgl.enable(gl.BLEND);\r\n\t\t\t\tgl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\r\n\t\t\t\tgl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, this._premultiply);\r\n\t\t\t\t//gl.pixelStorei(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, gl.NONE);\r\n\r\n\t\t\t\tthis._webGLContext.clearColor(this._clearColor.r, this._clearColor.g, this._clearColor.b, this._clearColor.a);\r\n\t\t\t\tthis.updateViewport(this._viewportWidth || this.canvas.width, this._viewportHeight || this.canvas.height);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthis._webGLContext = null;\r\n\t\t}\r\n\t\treturn this._webGLContext;\r\n\t};\r\n\r\n// public methods:\r\n\t/**\r\n\t * Docced in superclass\r\n\t */\r\n\tp.update = function (props) {\r\n\t\tif (!this.canvas) { return; }\r\n\t\tif (this.tickOnUpdate) { this.tick(props); }\r\n\t\tthis.dispatchEvent(\"drawstart\");\r\n\t\tif (this.autoClear) { this.clear(); }\r\n\r\n\t\tif (this._webGLContext) {\r\n\t\t\t// Use WebGL.\r\n\t\t\tthis._batchDraw(this, this._webGLContext);\r\n\t\t\tif (this._autoPurge != -1 && !(this._drawID%((this._autoPurge/2)|0))) {\r\n\t\t\t\tthis.purgeTextures(this._autoPurge);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// Use 2D.\r\n\t\t\tvar ctx = this.canvas.getContext(\"2d\");\r\n\t\t\tctx.save();\r\n\t\t\tthis.updateContext(ctx);\r\n\t\t\tthis.draw(ctx, false);\r\n\t\t\tctx.restore();\r\n\t\t}\r\n\t\tthis.dispatchEvent(\"drawend\");\r\n\t};\r\n\r\n\t/**\r\n\t * Docced in superclass\r\n\t */\r\n\tp.clear = function () {\r\n\t\tif (!this.canvas) { return; }\r\n\t\tif (StageGL.isWebGLActive(this._webGLContext)) {\r\n\t\t\tvar gl = this._webGLContext;\r\n\t\t\tvar cc = this._clearColor;\r\n\t\t\tvar adjust = this._transparent ? cc.a : 1.0;\r\n\t\t\t// Use WebGL settings; adjust for pre multiplied alpha appropriate to scenario\r\n\t\t\tthis._webGLContext.clearColor(cc.r * adjust, cc.g * adjust, cc.b * adjust, adjust);\r\n\t\t\tgl.clear(gl.COLOR_BUFFER_BIT);\r\n\t\t\tthis._webGLContext.clearColor(cc.r, cc.g, cc.b, cc.a);\r\n\t\t} else {\r\n\t\t\t// Use 2D.\r\n\t\t\tthis.Stage_clear();\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Draws the stage into the supplied context if possible. Many WebGL properties only exist on their context. As such\r\n\t * you cannot share contexts among many StageGLs and each context requires a unique StageGL instance. Contexts that\r\n\t * don't match the context managed by this StageGL will be treated as a 2D context.\r\n\t *\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method draw\r\n\t * @param {CanvasRenderingContext2D | WebGLRenderingContext} context The context object to draw into.\r\n\t * @param {Boolean} [ignoreCache=false] Indicates whether the draw operation should ignore any current cache. For\r\n\t * example, used for drawing the cache (to prevent it from simply drawing an existing cache back into itself).\r\n\t * @return {Boolean} If the draw was handled by this function\r\n\t */\r\n\tp.draw = function (context, ignoreCache) {\r\n\t\tif (context === this._webGLContext && StageGL.isWebGLActive(this._webGLContext)) {\r\n\t\t\tvar gl = this._webGLContext;\r\n\t\t\tthis._batchDraw(this, gl, ignoreCache);\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn this.Stage_draw(context, ignoreCache);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Draws the target into the correct context, be it a canvas or Render Texture using WebGL.\r\n\t *\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method cacheDraw\r\n\t * @param {DisplayObject} target The object we're drawing into cache.\r\n\t * For example, used for drawing the cache (to prevent it from simply drawing an existing cache back into itself).\r\n\t * @param {Array} filters The filters we're drawing into cache.\r\n\t * @param {BitmapCache} manager The BitmapCache instance looking after the cache\r\n\t * @return {Boolean} If the draw was handled by this function\r\n\t */\r\n\tp.cacheDraw = function (target, filters, manager) {\r\n\t\tif (StageGL.isWebGLActive(this._webGLContext)) {\r\n\t\t\tvar gl = this._webGLContext;\r\n\t\t\tthis._cacheDraw(gl, target, filters, manager);\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Blocks, or frees a texture \"slot\" on the GPU. Can be useful if you are overflowing textures. When overflowing\r\n\t * textures they are re-uploaded to the GPU every time they're encountered, this can be expensive with large textures.\r\n\t * By blocking the slot you reduce available slots, potentially increasing draw calls, but mostly you prevent a\r\n\t * texture being re-uploaded if it would have moved slots due to overflow.\r\n\t *\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * For example, block the slot a background image is stored in so there is less re-loading of that image.\r\n\t * @method protectTextureSlot\r\n\t * @param {Number} id The slot to be affected\r\n\t * @param {Boolean} [lock=false] Whether this slot is the one being locked.\r\n\t */\r\n\tp.protectTextureSlot = function (id, lock) {\r\n\t\tif (id > this._maxTextureSlots || id < 0) {\r\n\t\t\tthrow \"Slot outside of acceptable range\";\r\n\t\t}\r\n\t\tthis._slotBlacklist[id] = !!lock;\r\n\t};\r\n\r\n\t/**\r\n\t * Render textures can't draw into themselves so any item being used for renderTextures needs two to alternate between.\r\n\t * This function creates, gets, and toggles the render surface between the two.\r\n\t *\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method getTargetRenderTexture\r\n\t * @param {DisplayObject} target The object associated with the render textures, usually a cached object.\r\n\t * @param {Number} w The width to create the texture at.\r\n\t * @param {Number} h The height to create the texture at.\r\n\t * @return {Objet}\r\n\t * @todo fill in return type\r\n\t */\r\n\tp.getTargetRenderTexture = function (target, w, h) {\r\n\t\tvar result, toggle = false;\r\n\t\tvar gl = this._webGLContext;\r\n\t\tif (target.__lastRT !== undefined && target.__lastRT === target.__rtA) { toggle = true; }\r\n\t\tif (!toggle) {\r\n\t\t\tif (target.__rtA === undefined) {\r\n\t\t\t\ttarget.__rtA = this.getRenderBufferTexture(w, h);\r\n\t\t\t} else {\r\n\t\t\t\tif (w != target.__rtA._width || h != target.__rtA._height) {\r\n\t\t\t\t\tthis.resizeTexture(target.__rtA, w, h);\r\n\t\t\t\t}\r\n\t\t\t\tthis.setTextureParams(gl);\r\n\t\t\t}\r\n\t\t\tresult = target.__rtA;\r\n\t\t} else {\r\n\t\t\tif (target.__rtB === undefined) {\r\n\t\t\t\ttarget.__rtB = this.getRenderBufferTexture(w, h);\r\n\t\t\t} else {\r\n\t\t\t\tif (w != target.__rtB._width || h != target.__rtB._height) {\r\n\t\t\t\t\tthis.resizeTexture(target.__rtB, w, h);\r\n\t\t\t\t}\r\n\t\t\t\tthis.setTextureParams(gl);\r\n\t\t\t}\r\n\t\t\tresult = target.__rtB;\r\n\t\t}\r\n\t\tif (!result) {\r\n\t\t\tthrow \"Problems creating render textures, known causes include using too much VRAM by not releasing WebGL texture instances\";\r\n\t\t}\r\n\t\ttarget.__lastRT = result;\r\n\t\treturn result;\r\n\t};\r\n\r\n\t/**\r\n\t * For every image encountered StageGL registers and tracks it automatically. This tracking can cause memory leaks \r\n\t * if not purged. StageGL, by default, automatically purges them. This does have a cost and may unfortunately find\r\n\t * false positives. This function is for manual management of this memory instead of the automatic system controlled\r\n\t * by the {{#crossLink \"StageGL/autoPurge:property\"}}{{/crossLink}} property.\r\n\t *\r\n\t * This function will recursively remove all textures found on the object, its children, cache, etc. It will uncache \r\n\t * objects and remove any texture it finds REGARDLESS of whether it is currently in use elsewhere. It is up to the\r\n\t * developer to ensure that a texture in use is not removed.\r\n\t *\r\n\t * Textures in use, or to be used again shortly, should not be removed. This is simply for performance reasons.\r\n\t * Removing a texture in use will cause the texture to have to be re-uploaded slowing rendering.\r\n\t * @method releaseTexture\r\n\t * @param {DisplayObject | Texture | Image | Canvas} item An object that used the texture to be discarded.\r\n\t */\r\n\tp.releaseTexture = function (item) {\r\n\t\tvar i, l;\r\n\t\tif (!item) { return; }\r\n\r\n\t\t// this is a container object\r\n\t\tif (item.children) {\r\n\t\t\tfor (i = 0, l = item.children.length; i < l; i++) {\r\n\t\t\t\tthis.releaseTexture(item.children[i]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// this has a cache canvas\r\n\t\tif (item.cacheCanvas) {\r\n\t\t\titem.uncache();\r\n\t\t}\r\n\r\n\t\tvar foundImage = undefined;\r\n\t\tif (item._storeID !== undefined) {\r\n\t\t\t// this is a texture itself\r\n\t\t\tif (item === this._textureDictionary[item._storeID]) {\r\n\t\t\t\tthis._killTextureObject(item);\r\n\t\t\t\titem._storeID = undefined;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// this is an image or canvas\r\n\t\t\tfoundImage = item;\r\n\t\t} else if (item._webGLRenderStyle === 2) {\r\n\t\t\t// this is a Bitmap class\r\n\t\t\tfoundImage = item.image;\r\n\t\t} else if (item._webGLRenderStyle === 1) {\r\n\t\t\t// this is a SpriteSheet, we can't tell which image we used from the list easily so remove them all!\r\n\t\t\tfor (i = 0, l = item.spriteSheet._images.length; i < l; i++) {\r\n\t\t\t\tthis.releaseTexture(item.spriteSheet._images[i]);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// did we find anything\r\n\t\tif (foundImage === undefined) {\r\n\t\t\tif (this.vocalDebug) {\r\n\t\t\t\tconsole.log(\"No associated texture found on release\");\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// remove it\r\n\t\tthis._killTextureObject(this._textureDictionary[foundImage._storeID]);\r\n\t\tfoundImage._storeID = undefined;\r\n\t};\r\n\r\n\t/**\r\n\t * Similar to {{#crossLink \"releaseTexture\"}}{{/crossLink}}, but this function differs by searching for textures to\r\n\t * release. It works by assuming that it can purge any texture which was last used more than \"count\" draw calls ago.\r\n\t * Because this process is unaware of the objects and whether they may be used on your stage, false positives can\r\n\t * occur. It is recommended to manually manage your memory with {{#crossLink \"StageGL/releaseTexture\"}}{{/crossLink}},\r\n\t * however, there are many use cases where this is simpler and error-free. This process is also run by default under\r\n\t * the hood to prevent leaks. To disable it see the {{#crossLink \"StageGL/autoPurge:property\"}}{{/crossLink}} property.\r\n\t * @method purgeTextures\r\n\t * @param {Number} [count=100] How many renders ago the texture was last used\r\n\t */\r\n\tp.purgeTextures = function (count) {\r\n\t\tif (count == undefined){ count = 100; }\r\n\r\n\t\tvar dict = this._textureDictionary;\r\n\t\tvar l = dict.length;\r\n\t\tfor (var i= 0; inot update the canvas element's width/height, but\r\n\t * the render surface's instead. This is necessary after manually resizing the canvas element on the DOM to avoid a\r\n\t * up/down scaled render.\r\n\t * @method updateViewport\r\n\t * @param {Integer} width The width of the render surface in pixels.\r\n\t * @param {Integer} height The height of the render surface in pixels.\r\n\t */\r\n\tp.updateViewport = function (width, height) {\r\n\t\tthis._viewportWidth = width|0;\r\n\t\tthis._viewportHeight = height|0;\r\n\t\tvar gl = this._webGLContext;\r\n\r\n\t\tif (gl) {\r\n\t\t\tgl.viewport(0, 0, this._viewportWidth, this._viewportHeight);\r\n\r\n\t\t\t// WebGL works with a -1,1 space on its screen. It also follows Y-Up\r\n\t\t\t// we need to flip the y, scale and then translate the co-ordinates to match this\r\n\t\t\t// additionally we offset into they Y so the polygons are inside the camera's \"clipping\" plane\r\n\t\t\tthis._projectionMatrix = new Float32Array([\r\n\t\t\t\t2 / this._viewportWidth,\t0,\t\t\t\t\t\t\t\t0,\t\t\t\t\t\t\t0,\r\n\t\t\t\t0,\t\t\t\t\t\t\t-2 / this._viewportHeight,\t\t1,\t\t\t\t\t\t\t0,\r\n\t\t\t\t0,\t\t\t\t\t\t\t0,\t\t\t\t\t\t\t\t1,\t\t\t\t\t\t\t0,\r\n\t\t\t\t-1,\t\t\t\t\t\t\t1,\t\t\t\t\t\t\t\t0.1,\t\t\t\t\t\t0\r\n\t\t\t]);\r\n\t\t\t// create the flipped version for use with render texture flipping\r\n\t\t\t// DHG: this would be a slice/clone but some platforms don't offer them for Float32Array\r\n\t\t\tthis._projectionMatrixFlip = new Float32Array([0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0]);\r\n\t\t\tthis._projectionMatrixFlip.set(this._projectionMatrix);\r\n\t\t\tthis._projectionMatrixFlip[5] *= -1;\r\n\t\t\tthis._projectionMatrixFlip[13] *= -1;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Fetches the shader compiled and set up to work with the provided filter/object. The shader is compiled on first\r\n\t * use and returned on subsequent calls.\r\n\t * @method getFilterShader\r\n\t * @param {Filter|Object} filter The object which will provide the information needed to construct the filter shader.\r\n\t * @return {WebGLProgram}\r\n\t */\r\n\tp.getFilterShader = function (filter) {\r\n\t\tif (!filter) { filter = this; }\r\n\r\n\t\tvar gl = this._webGLContext;\r\n\t\tvar targetShader = this._activeShader;\r\n\r\n\t\tif (filter._builtShader) {\r\n\t\t\ttargetShader = filter._builtShader;\r\n\t\t\tif (filter.shaderParamSetup) {\r\n\t\t\t\tgl.useProgram(targetShader);\r\n\t\t\t\tfilter.shaderParamSetup(gl, this, targetShader);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\ttry {\r\n\t\t\t\ttargetShader = this._fetchShaderProgram(\r\n\t\t\t\t\tgl, \"filter\",\r\n\t\t\t\t\tfilter.VTX_SHADER_BODY, filter.FRAG_SHADER_BODY,\r\n\t\t\t\t\tfilter.shaderParamSetup && filter.shaderParamSetup.bind(filter)\r\n\t\t\t\t);\r\n\t\t\t\tfilter._builtShader = targetShader;\r\n\t\t\t\ttargetShader._name = filter.toString();\r\n\t\t\t} catch (e) {\r\n\t\t\t\tconsole && console.log(\"SHADER SWITCH FAILURE\", e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn targetShader;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a base texture that has no image or data loaded. Not intended for loading images. It may return `null`\r\n\t * in some error cases, and trying to use a \"null\" texture can cause renders to fail.\r\n\t * @method getBaseTexture\r\n\t * @param {uint} [w=1] The width of the texture in pixels, defaults to 1\r\n\t * @param {uint} [h=1] The height of the texture in pixels, defaults to 1\r\n\t */\r\n\tp.getBaseTexture = function (w, h) {\r\n\t\tvar width = Math.ceil(w > 0 ? w : 1) || 1;\r\n\t\tvar height = Math.ceil(h > 0 ? h : 1) || 1;\r\n\r\n\t\tvar gl = this._webGLContext;\r\n\t\tvar texture = gl.createTexture();\r\n\t\tthis.resizeTexture(texture, width, height);\r\n\t\tthis.setTextureParams(gl, false);\r\n\r\n\t\treturn texture;\r\n\t};\r\n\r\n\t/**\r\n\t * Resizes a supplied texture element. May generate invalid textures in some error cases such as; when the texture\r\n\t * is too large, when an out of texture memory error occurs, or other error scenarios. Trying to use an invalid texture\r\n\t * can cause renders to hard stop on some devices. Check the WebGL bound texture after running this function.\r\n\t *\r\n\t * NOTE: The supplied texture must have been made with the WebGL \"texImage2D\" function, all default APIs in StageGL\r\n\t * use this, so this note only matters for library developers and plugins.\r\n\t *\r\n\t * @protected\r\n\t * @method resizeTexture\r\n\t * @param {WebGLTexture} texture The GL Texture to be modified.\r\n\t * @param {uint} [width=1] The width of the texture in pixels, defaults to 1\r\n\t * @param {uint} [height=1] The height of the texture in pixels, defaults to 1\r\n\t */\r\n\tp.resizeTexture = function (texture, width,height) {\r\n\t\tvar gl = this._webGLContext;\r\n\t\tgl.bindTexture(gl.TEXTURE_2D, texture);\r\n\t\tgl.texImage2D(\r\n\t\t\tgl.TEXTURE_2D,\t\t\t\t// target\r\n\t\t\t0,\t\t\t\t\t\t\t// level of detail\r\n\t\t\tgl.RGBA,\t\t\t\t\t// internal format\r\n\t\t\twidth, height, 0,\t\t\t// width, height, border (only for array/null sourced textures)\r\n\t\t\tgl.RGBA,\t\t\t\t\t// format (match internal format)\r\n\t\t\tgl.UNSIGNED_BYTE,\t\t\t// type of texture(pixel color depth)\r\n\t\t\tnull\t\t\t\t\t\t// image data, we can do null because we're doing array data\r\n\t\t);\r\n\t\ttexture.width = width;\r\n\t\ttexture.height = height;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a base texture (see {{#crossLink \"StageGL/getBaseTexture\"}}{{/crossLink}}) for details. Also includes an\r\n\t * attached and linked render buffer in `texture._frameBuffer`. RenderTextures can be thought of as an internal\r\n\t * canvas on the GPU that can be drawn to.\r\n\t * @method getRenderBufferTexture\r\n\t * @param {Number} w The width of the texture in pixels.\r\n\t * @param {Number} h The height of the texture in pixels.\r\n\t * @return {Texture} the basic texture instance with a render buffer property.\r\n\t */\r\n\tp.getRenderBufferTexture = function (w, h) {\r\n\t\tvar gl = this._webGLContext;\r\n\r\n\t\t// get the texture\r\n\t\tvar renderTexture = this.getBaseTexture(w, h);\r\n\t\tif (!renderTexture) { return null; }\r\n\r\n\t\t// get the frame buffer\r\n\t\tvar frameBuffer = gl.createFramebuffer();\r\n\t\tif (!frameBuffer) { return null; }\r\n\r\n\t\t// set its width and height for spoofing as an image\r\n\t\trenderTexture.width = w;\r\n\t\trenderTexture.height = h;\r\n\r\n\t\t// attach frame buffer to texture and provide cross links to look up each other\r\n\t\tgl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\r\n\t\tgl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, renderTexture, 0);\r\n\t\tframeBuffer._renderTexture = renderTexture;\r\n\t\trenderTexture._frameBuffer = frameBuffer;\r\n\r\n\t\t// these keep track of themselves simply to reduce complexity of some lookup code\r\n\t\trenderTexture._storeID = this._textureDictionary.length;\r\n\t\tthis._textureDictionary[renderTexture._storeID] = renderTexture;\r\n\r\n\t\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\r\n\t\treturn renderTexture;\r\n\t};\r\n\r\n\t/**\r\n\t * Common utility function used to apply the correct texture processing parameters for the bound texture.\r\n\t * @method setTextureParams\r\n\t * @param {WebGLRenderingContext} gl The canvas WebGL context object to draw into.\r\n\t * @param {Boolean} [isPOT=false] Marks whether the texture is \"Power of Two\", this may allow better quality AA.\r\n\t */\r\n\tp.setTextureParams = function (gl, isPOT) {\r\n\t\tif (isPOT && this._antialias) {\r\n\t\t\t//non POT linear works in some devices, but performance is NOT good, investigate\r\n\t\t\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\r\n\t\t\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\r\n\t\t} else {\r\n\t\t\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\r\n\t\t\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\r\n\t\t}\r\n\t\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\r\n\t\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\r\n\t};\r\n\r\n\t/**\r\n\t * Changes the webGL clear, aka \"background\" color to the provided value. A transparent clear is recommended, as\r\n\t * non-transparent colours may create undesired boxes around some visuals.\r\n\t *\r\n\t * The clear color will also be used for filters and other \"render textures\". The stage background will ignore the\r\n\t * transparency value and display a solid color normally. For the stage to recognize and use transparency it must be\r\n\t * created with the transparent flag set to `true` (see {{#crossLink \"StageGL/constructor\"}}{{/crossLink}})).\r\n\t *\r\n\t * Using \"transparent white\" to demonstrate, the valid data formats are as follows:\r\n\t *
      \r\n\t *
    • \"#FFF\"
    • \r\n\t *
    • \"#FFFFFF\"
    • \r\n\t *
    • \"#FFFFFF00\"
    • \r\n\t *
    • \"rgba(255,255,255,0.0)\"
    • \r\n\t *
    \r\n\t * @method setClearColor\r\n\t * @param {String|int} [color=0x00000000] The new color to use as the background\r\n\t */\r\n\tp.setClearColor = function (color) {\r\n\t\tvar r, g, b, a, output;\r\n\r\n\t\tif (typeof color == \"string\") {\r\n\t\t\tif (color.indexOf(\"#\") == 0) {\r\n\t\t\t\tif (color.length == 4) {\r\n\t\t\t\t\tcolor = \"#\" + color.charAt(1)+color.charAt(1) + color.charAt(2)+color.charAt(2) + color.charAt(3)+color.charAt(3)\r\n\t\t\t\t}\r\n\t\t\t\tr = Number(\"0x\"+color.slice(1, 3))/255;\r\n\t\t\t\tg = Number(\"0x\"+color.slice(3, 5))/255;\r\n\t\t\t\tb = Number(\"0x\"+color.slice(5, 7))/255;\r\n\t\t\t\ta = Number(\"0x\"+color.slice(7, 9))/255;\r\n\t\t\t} else if (color.indexOf(\"rgba(\") == 0) {\r\n\t\t\t\toutput = color.slice(5, -1).split(\",\");\r\n\t\t\t\tr = Number(output[0])/255;\r\n\t\t\t\tg = Number(output[1])/255;\r\n\t\t\t\tb = Number(output[2])/255;\r\n\t\t\t\ta = Number(output[3]);\r\n\t\t\t}\r\n\t\t} else {\t// >>> is an unsigned shift which is what we want as 0x80000000 and up are negative values\r\n\t\t\tr = ((color & 0xFF000000) >>> 24)/255;\r\n\t\t\tg = ((color & 0x00FF0000) >>> 16)/255;\r\n\t\t\tb = ((color & 0x0000FF00) >>> 8)/255;\r\n\t\t\ta = (color & 0x000000FF)/255;\r\n\t\t}\r\n\r\n\t\tthis._clearColor.r = r || 0;\r\n\t\tthis._clearColor.g = g || 0;\r\n\t\tthis._clearColor.b = b || 0;\r\n\t\tthis._clearColor.a = a || 0;\r\n\r\n\t\tif (!this._webGLContext) { return; }\r\n\t\tthis._webGLContext.clearColor(this._clearColor.r, this._clearColor.g, this._clearColor.b, this._clearColor.a);\r\n\t};\r\n\r\n\t/**\r\n\t * docced in subclass\r\n\t */\r\n\tp.toString = function () {\r\n\t\treturn \"[StageGL (name=\"+ this.name +\")]\";\r\n\t};\r\n\r\n// private methods:\r\n\t/**\r\n\t * Sets up and returns the WebGL context for the canvas. May return undefined in error scenarios. These can include \r\n\t * situations where the canvas element already has a context, 2D or GL.\r\n\t * @param {Canvas} canvas The DOM canvas element to attach to\r\n\t * @param {Object} options The options to be handed into the WebGL object, see WebGL spec\r\n\t * @method _fetchWebGLContext\r\n\t * @protected\r\n\t * @return {WebGLRenderingContext} The WebGL context, may return undefined in error scenarios\r\n\t */\r\n\tp._fetchWebGLContext = function (canvas, options) {\r\n\t\tvar gl;\r\n\r\n\t\ttry {\r\n\t\t\tgl = canvas.getContext(\"webgl\", options) || canvas.getContext(\"experimental-webgl\", options);\r\n\t\t} catch (e) {\r\n\t\t\t// don't do anything in catch, null check will handle it\r\n\t\t}\r\n\r\n\t\tif (!gl) {\r\n\t\t\tvar msg = \"Could not initialize WebGL\";\r\n\t\t\tconsole.error?console.error(msg):console.log(msg);\r\n\t\t} else {\r\n\t\t\tgl.viewportWidth = canvas.width;\r\n\t\t\tgl.viewportHeight = canvas.height;\r\n\t\t}\r\n\r\n\t\treturn gl;\r\n\t};\r\n\r\n\t/**\r\n\t * Create the completed Shader Program from the vertex and fragment shaders. Allows building of custom shaders for\r\n\t * filters. Once compiled, shaders are saved so. If the Shader code requires dynamic alterations re-run this function\r\n\t * to generate a new shader.\r\n\t * @method _fetchShaderProgram\r\n\t * @param {WebGLRenderingContext} gl The canvas WebGL context object to draw into.\r\n\t * @param {String} [shaderName=\"regular\"] Working values: \"regular\", \"override\", and \"filter\". Which type of shader to build.\r\n\t * Filter and override both accept the custom params. Regular and override have all features. Filter is a special case reduced feature shader meant to be over-ridden.\r\n\t * @param {String} [customVTX] Extra vertex shader information to replace a regular draw, see \r\n\t * {{#crossLink \"StageGL/COVER_VERTEX_BODY\"}}{{/crossLink}} for default and {{#crossLink \"Filter\"}}{{/crossLink}} for examples.\r\n\t * @param {String} [customFRAG] Extra fragment shader information to replace a regular draw, see \r\n\t * {{#crossLink \"StageGL/COVER_FRAGMENT_BODY\"}}{{/crossLink}} for default and {{#crossLink \"Filter\"}}{{/crossLink}} for examples.\r\n\t * @param {Function} [shaderParamSetup] Function to run so custom shader parameters can get applied for the render.\r\n\t * @protected\r\n\t * @return {WebGLProgram} The compiled and linked shader\r\n\t */\r\n\tp._fetchShaderProgram = function (gl, shaderName, customVTX, customFRAG, shaderParamSetup) {\r\n\t\tgl.useProgram(null);\t\t// safety to avoid collisions\r\n\r\n\t\t// build the correct shader string out of the right headers and bodies\r\n\t\tvar targetFrag, targetVtx;\r\n\t\tswitch (shaderName) {\r\n\t\t\tcase \"filter\":\r\n\t\t\t\ttargetVtx = StageGL.COVER_VERTEX_HEADER + (customVTX || StageGL.COVER_VERTEX_BODY);\r\n\t\t\t\ttargetFrag = StageGL.COVER_FRAGMENT_HEADER + (customFRAG || StageGL.COVER_FRAGMENT_BODY);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"particle\": //TODO\r\n\t\t\t\ttargetVtx = StageGL.REGULAR_VERTEX_HEADER + StageGL.PARTICLE_VERTEX_BODY;\r\n\t\t\t\ttargetFrag = StageGL.REGULAR_FRAGMENT_HEADER + StageGL.PARTICLE_FRAGMENT_BODY;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"override\":\r\n\t\t\t\ttargetVtx = StageGL.REGULAR_VERTEX_HEADER + (customVTX || StageGL.REGULAR_VERTEX_BODY);\r\n\t\t\t\ttargetFrag = StageGL.REGULAR_FRAGMENT_HEADER + (customFRAG || StageGL.REGULAR_FRAGMENT_BODY);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"regular\":\r\n\t\t\tdefault:\r\n\t\t\t\ttargetVtx = StageGL.REGULAR_VERTEX_HEADER + StageGL.REGULAR_VERTEX_BODY;\r\n\t\t\t\ttargetFrag = StageGL.REGULAR_FRAGMENT_HEADER + StageGL.REGULAR_FRAGMENT_BODY;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\t// create the separate vars\r\n\t\tvar vertexShader = this._createShader(gl, gl.VERTEX_SHADER, targetVtx);\r\n\t\tvar fragmentShader = this._createShader(gl, gl.FRAGMENT_SHADER, targetFrag);\r\n\r\n\t\t// link them together\r\n\t\tvar shaderProgram = gl.createProgram();\r\n\t\tgl.attachShader(shaderProgram, vertexShader);\r\n\t\tgl.attachShader(shaderProgram, fragmentShader);\r\n\t\tgl.linkProgram(shaderProgram);\r\n\t\tshaderProgram._type = shaderName;\r\n\r\n\t\t// check compile status\r\n\t\tif (!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS)) {\r\n\t\t\tgl.useProgram(this._activeShader);\r\n\t\t\tthrow gl.getProgramInfoLog(shaderProgram);\r\n\t\t}\r\n\r\n\t\t// set up the parameters on the shader\r\n\t\tgl.useProgram(shaderProgram);\r\n\t\tswitch (shaderName) {\r\n\t\t\tcase \"filter\":\r\n\t\t\t\t// get the places in memory the shader is stored so we can feed information into them\r\n\t\t\t\t// then save it off on the shader because it's so tied to the shader itself\r\n\t\t\t\tshaderProgram.vertexPositionAttribute = gl.getAttribLocation(shaderProgram, \"vertexPosition\");\r\n\t\t\t\tgl.enableVertexAttribArray(shaderProgram.vertexPositionAttribute);\r\n\r\n\t\t\t\tshaderProgram.uvPositionAttribute = gl.getAttribLocation(shaderProgram, \"uvPosition\");\r\n\t\t\t\tgl.enableVertexAttribArray(shaderProgram.uvPositionAttribute);\r\n\r\n\t\t\t\tshaderProgram.samplerUniform = gl.getUniformLocation(shaderProgram, \"uSampler\");\r\n\t\t\t\tgl.uniform1i(shaderProgram.samplerUniform, 0);\r\n\r\n\t\t\t\tshaderProgram.uprightUniform = gl.getUniformLocation(shaderProgram, \"uUpright\");\r\n\t\t\t\tgl.uniform1f(shaderProgram.uprightUniform, 0);\r\n\r\n\t\t\t\t// if there's some custom attributes be sure to hook them up\r\n\t\t\t\tif (shaderParamSetup) {\r\n\t\t\t\t\tshaderParamSetup(gl, this, shaderProgram);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"override\":\r\n\t\t\tcase \"particle\":\r\n\t\t\tcase \"regular\":\r\n\t\t\tdefault:\r\n\t\t\t\t// get the places in memory the shader is stored so we can feed information into them\r\n\t\t\t\t// then save it off on the shader because it's so tied to the shader itself\r\n\t\t\t\tshaderProgram.vertexPositionAttribute = gl.getAttribLocation(shaderProgram, \"vertexPosition\");\r\n\t\t\t\tgl.enableVertexAttribArray(shaderProgram.vertexPositionAttribute);\r\n\r\n\t\t\t\tshaderProgram.uvPositionAttribute = gl.getAttribLocation(shaderProgram, \"uvPosition\");\r\n\t\t\t\tgl.enableVertexAttribArray(shaderProgram.uvPositionAttribute);\r\n\r\n\t\t\t\tshaderProgram.textureIndexAttribute = gl.getAttribLocation(shaderProgram, \"textureIndex\");\r\n\t\t\t\tgl.enableVertexAttribArray(shaderProgram.textureIndexAttribute);\r\n\r\n\t\t\t\tshaderProgram.alphaAttribute = gl.getAttribLocation(shaderProgram, \"objectAlpha\");\r\n\t\t\t\tgl.enableVertexAttribArray(shaderProgram.alphaAttribute);\r\n\r\n\t\t\t\tvar samplers = [];\r\n\t\t\t\tfor (var i = 0; i < this._batchTextureCount; i++) {\r\n\t\t\t\t\tsamplers[i] = i;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tshaderProgram.samplerData = samplers;\r\n\t\t\t\tshaderProgram.samplerUniform = gl.getUniformLocation(shaderProgram, \"uSampler\");\r\n\t\t\t\tgl.uniform1iv(shaderProgram.samplerUniform, samplers);\r\n\r\n\t\t\t\tshaderProgram.pMatrixUniform = gl.getUniformLocation(shaderProgram, \"pMatrix\");\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tgl.useProgram(this._activeShader);\r\n\t\treturn shaderProgram;\r\n\t};\r\n\r\n\t/**\r\n\t * Creates a shader from the specified string replacing templates. Template items are defined via `{{` `key` `}}``.\r\n\t * @method _createShader\r\n\t * @param {WebGLRenderingContext} gl The canvas WebGL context object to draw into.\r\n\t * @param {Number} type The type of shader to create. gl.VERTEX_SHADER | gl.FRAGMENT_SHADER\r\n\t * @param {String} str The definition for the shader.\r\n\t * @return {WebGLShader}\r\n\t * @protected\r\n\t */\r\n\tp._createShader = function (gl, type, str) {\r\n\t\t// inject the static number\r\n\t\tstr = str.replace(/{{count}}/g, this._batchTextureCount);\r\n\r\n\t\t// resolve issue with no dynamic samplers by creating correct samplers in if else chain\r\n\t\t// TODO: WebGL 2.0 does not need this support\r\n\t\tvar insert = \"\";\r\n\t\tfor (var i = 1; i gl.MAX_TEXTURE_SIZE || image.height > gl.MAX_TEXTURE_SIZE){\r\n\t\t\t\tconsole && console.error(\"Oversized Texture: \"+ image.width+\"x\"+image.height +\" vs \"+ gl.MAX_TEXTURE_SIZE +\"max\");\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Adds the texture to a spot in the current batch, forcing a draw if no spots are free.\r\n\t * @method _insertTextureInBatch\r\n\t * @param {WebGLRenderingContext} gl The canvas WebGL context object to draw into.\r\n\t * @param {WebGLTexture} texture The texture to be inserted.\r\n\t * @protected\r\n\t */\r\n\tp._insertTextureInBatch = function (gl, texture) {\r\n\t\t// if it wasn't used last batch\r\n\t\tif (this._batchTextures[texture._activeIndex] !== texture) {\r\n\t\t\t// we've got to find it a a spot.\r\n\t\t\tvar found = -1;\r\n\t\t\tvar start = (this._lastTextureInsert+1) % this._batchTextureCount;\r\n\t\t\tvar look = start;\r\n\t\t\tdo {\r\n\t\t\t\tif (this._batchTextures[look]._batchID != this._batchID && !this._slotBlacklist[look]) {\r\n\t\t\t\t\tfound = look;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tlook = (look+1) % this._batchTextureCount;\r\n\t\t\t} while (look !== start);\r\n\r\n\t\t\t// we couldn't find anywhere for it go, meaning we're maxed out\r\n\t\t\tif (found === -1) {\r\n\t\t\t\tthis.batchReason = \"textureOverflow\";\r\n\t\t\t\tthis._drawBuffers(gl);\t\t// <------------------------------------------------------------------------\r\n\t\t\t\tthis.batchCardCount = 0;\r\n\t\t\t\tfound = start;\r\n\t\t\t}\r\n\r\n\t\t\t// lets put it into that spot\r\n\t\t\tthis._batchTextures[found] = texture;\r\n\t\t\ttexture._activeIndex = found;\r\n\t\t\tvar image = texture._imageData;\r\n\t\t\tif (image && image._invalid && texture._drawID !== undefined) {\r\n\t\t\t\tthis._updateTextureImageData(gl, image);\r\n\t\t\t} else {\r\n\t\t\t\tgl.activeTexture(gl.TEXTURE0 + found);\r\n\t\t\t\tgl.bindTexture(gl.TEXTURE_2D, texture);\r\n\t\t\t\tthis.setTextureParams(gl);\r\n\t\t\t}\r\n\t\t\tthis._lastTextureInsert = found;\r\n\t\t} else {\r\n\t\t\tvar image = texture._imageData;\r\n\t\t\tif (texture._storeID != undefined && image && image._invalid) {\r\n\t\t\t\tthis._updateTextureImageData(gl, image);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttexture._drawID = this._drawID;\r\n\t\ttexture._batchID = this._batchID;\r\n\t};\r\n\r\n\t/**\r\n\t * Remove and clean the texture, expects a texture and is inflexible. Mostly for internal use, recommended to call \r\n\t * {{#crossLink \"StageGL/releaseTexture\"}}{{/crossLink}} instead as it will call this with the correct texture object(s).\r\n\t * Note: Testing shows this may not happen immediately, have to wait frames for WebGL to have actually adjust memory.\r\n\t * @method _killTextureObject\r\n\t * @param {Texture} tex The texture to be cleaned out\r\n\t * @protected\r\n\t */\r\n\tp._killTextureObject = function (tex) {\r\n\t\tif (!tex) { return; }\r\n\t\tvar gl = this._webGLContext;\r\n\r\n\t\t// remove linkage\r\n\t\tif (tex._storeID !== undefined && tex._storeID >= 0) {\r\n\t\t\tthis._textureDictionary[tex._storeID] = undefined;\r\n\t\t\tfor (var n in this._textureIDs) {\r\n\t\t\t\tif (this._textureIDs[n] == tex._storeID) { delete this._textureIDs[n]; }\r\n\t\t\t}\r\n\t\t\tif(tex._imageData) { tex._imageData._storeID = undefined; }\r\n\t\t\ttex._imageData = tex._storeID = undefined;\r\n\t\t}\r\n\r\n\t\t// make sure to drop it out of an active slot\r\n\t\tif (tex._activeIndex !== undefined && this._batchTextures[tex._activeIndex] === tex) {\r\n\t\t\tthis._batchTextures[tex._activeIndex] = this._baseTextures[tex._activeIndex];\r\n\t\t}\r\n\r\n\t\t// remove buffers if present\r\n\t\ttry {\r\n\t\t\tif (tex._frameBuffer) { gl.deleteFramebuffer(tex._frameBuffer); }\r\n\t\t\ttex._frameBuffer = undefined;\r\n\t\t} catch(e) {\r\n\t\t\t/* suppress delete errors because it's already gone or didn't need deleting probably */\r\n\t\t\tif (this.vocalDebug) { console.log(e); }\r\n\t\t}\r\n\r\n\t\t// remove entry\r\n\t\ttry {\r\n\t\t\tgl.deleteTexture(tex);\r\n\t\t} catch(e) {\r\n\t\t\t/* suppress delete errors because it's already gone or didn't need deleting probably */\r\n\t\t\tif (this.vocalDebug) { console.log(e); }\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Store or restore current batch textures into a backup array\r\n\t * @method _backupBatchTextures\r\n\t * @param {Boolean} restore Perform a restore instead of a store.\r\n\t * @param {Array} [target=this._backupTextures] Where to perform the backup, defaults to internal backup.\r\n\t * @protected\r\n\t */\r\n\tp._backupBatchTextures = function (restore, target) {\r\n\t\tvar gl = this._webGLContext;\r\n\r\n\t\tif (!this._backupTextures) { this._backupTextures = []; }\r\n\t\tif (target === undefined) { target = this._backupTextures; }\r\n\r\n\t\tfor (var i=0; i 0) {\r\n\t\t\tthis._drawBuffers(gl);\r\n\t\t}\r\n\t\tthis._isDrawing++;\r\n\t\tthis._drawID++;\r\n\r\n\t\tthis.batchCardCount = 0;\r\n\t\tthis.depth = 0;\r\n\r\n\t\tthis._appendToBatchGroup(sceneGraph, gl, new createjs.Matrix2D(), this.alpha, ignoreCache);\r\n\r\n\t\tthis.batchReason = \"drawFinish\";\r\n\t\tthis._drawBuffers(gl);\t\t\t\t\t\t\t\t// <--------------------------------------------------------\r\n\t\tthis._isDrawing--;\r\n\t};\r\n\r\n\t/**\r\n\t * Perform the drawing process to fill a specific cache texture, including applying filters.\r\n\t * @method _cacheDraw\r\n\t * @param {DisplayObject} target The object we're drawing into the cache. For example, used for drawing the cache\r\n\t * (to prevent it from simply drawing an existing cache back into itself).\r\n\t * @param {Array} filters The filters we're drawing into cache.\r\n\t * @param {BitmapCache} manager The BitmapCache instance looking after the cache\r\n\t * @protected\r\n\t */\r\n\tp._cacheDraw = function (gl, target, filters, manager) {\r\n\t\t/*\r\n\t\tImplicitly there are 4 modes to this function: filtered-sameContext, filtered-uniqueContext, sameContext, uniqueContext.\r\n\t\tEach situation must be handled slightly differently as 'sameContext' or 'uniqueContext' define how the output works,\r\n\t\tone drawing directly into the main context and the other drawing into a stored renderTexture respectively.\r\n\t\tWhen the draw is a 'filtered' draw, the filters are applied sequentially and will draw into saved textures repeatedly.\r\n\t\tOnce the final filter is done the final output is treated depending upon whether it is a same or unique context.\r\n\t\tThe internal complexity comes from reducing over-draw, shared code, and issues like textures needing to be flipped\r\n\t\tsometimes when written to render textures.\r\n\t\t*/\r\n\t\tvar renderTexture;\r\n\t\tvar shaderBackup = this._activeShader;\r\n\t\tvar blackListBackup = this._slotBlacklist;\r\n\t\tvar lastTextureSlot = this._maxTextureSlots-1;\r\n\t\tvar wBackup = this._viewportWidth, hBackup = this._viewportHeight;\r\n\r\n\t\t// protect the last slot so that we have somewhere to bind the renderTextures so it doesn't get upset\r\n\t\tthis.protectTextureSlot(lastTextureSlot, true);\r\n\r\n\t\t// create offset container for drawing item\r\n\t\tvar mtx = target.getMatrix();\r\n\t\tmtx = mtx.clone();\r\n\t\tmtx.scale(1/manager.scale, 1/manager.scale);\r\n\t\tmtx = mtx.invert();\r\n\t\tmtx.translate(-manager.offX/manager.scale*target.scaleX, -manager.offY/manager.scale*target.scaleY);\r\n\t\tvar container = this._cacheContainer;\r\n\t\tcontainer.children = [target];\r\n\t\tcontainer.transformMatrix = mtx;\r\n\r\n\t\tthis._backupBatchTextures(false);\r\n\r\n\t\tif (filters && filters.length) {\r\n\t\t\tthis._drawFilters(target, filters, manager);\r\n\t\t} else {\r\n\t\t\t// is this for another stage or mine?\r\n\t\t\tif (this.isCacheControlled) {\r\n\t\t\t\t// draw item to canvas\t\t\t\tI -> C\r\n\t\t\t\tgl.clear(gl.COLOR_BUFFER_BIT);\r\n\t\t\t\tthis._batchDraw(container, gl, true);\r\n\t\t\t} else {\r\n\t\t\t\tgl.activeTexture(gl.TEXTURE0 + lastTextureSlot);\r\n\t\t\t\ttarget.cacheCanvas = this.getTargetRenderTexture(target, manager._drawWidth, manager._drawHeight);\r\n\t\t\t\trenderTexture = target.cacheCanvas;\r\n\r\n\t\t\t\t// draw item to render texture\t\tI -> T\r\n\t\t\t\tgl.bindFramebuffer(gl.FRAMEBUFFER, renderTexture._frameBuffer);\r\n\t\t\t\tthis.updateViewport(manager._drawWidth, manager._drawHeight);\r\n\t\t\t\tthis._projectionMatrix = this._projectionMatrixFlip;\r\n\t\t\t\tgl.clear(gl.COLOR_BUFFER_BIT);\r\n\t\t\t\tthis._batchDraw(container, gl, true);\r\n\r\n\t\t\t\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\r\n\t\t\t\tthis.updateViewport(wBackup, hBackup);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._backupBatchTextures(true);\r\n\r\n\t\tthis.protectTextureSlot(lastTextureSlot, false);\r\n\t\tthis._activeShader = shaderBackup;\r\n\t\tthis._slotBlacklist = blackListBackup;\r\n\t};\r\n\r\n\t/**\r\n\t * Sub portion of _cacheDraw, split off for readability. Do not call independently.\r\n\t * @method _drawFilters\r\n\t * @param {DisplayObject} target The object we're drawing with a filter.\r\n\t * @param {Array} filters The filters we're drawing into cache.\r\n\t * @param {BitmapCache} manager The BitmapCache instance looking after the cache\r\n\t */\r\n\tp._drawFilters = function (target, filters, manager) {\r\n\t\tvar gl = this._webGLContext;\r\n\t\tvar renderTexture;\r\n\t\tvar lastTextureSlot = this._maxTextureSlots-1;\r\n\t\tvar wBackup = this._viewportWidth, hBackup = this._viewportHeight;\r\n\r\n\t\tvar container = this._cacheContainer;\r\n\t\tvar filterCount = filters.length;\r\n\r\n\t\t// we don't know which texture slot we're dealing with previously and we need one out of the way\r\n\t\t// once we're using that slot activate it so when we make and bind our RenderTexture it's safe there\r\n\t\tgl.activeTexture(gl.TEXTURE0 + lastTextureSlot);\r\n\t\trenderTexture = this.getTargetRenderTexture(target, manager._drawWidth, manager._drawHeight);\r\n\r\n\t\t// draw item to render texture\t\tI -> T\r\n\t\tgl.bindFramebuffer(gl.FRAMEBUFFER, renderTexture._frameBuffer);\r\n\t\tthis.updateViewport(manager._drawWidth, manager._drawHeight);\r\n\t\tgl.clear(gl.COLOR_BUFFER_BIT);\r\n\t\tthis._batchDraw(container, gl, true);\r\n\r\n\t\t// bind the result texture to slot 0 as all filters and cover draws assume original content is in slot 0\r\n\t\tgl.activeTexture(gl.TEXTURE0);\r\n\t\tgl.bindTexture(gl.TEXTURE_2D, renderTexture);\r\n\t\tthis.setTextureParams(gl);\r\n\r\n\t\tvar flipY = false;\r\n\t\tvar i = 0, filter = filters[i];\r\n\t\tdo { // this is safe because we wouldn't be in apply filters without a filter count of at least 1\r\n\r\n\t\t\t// swap to correct shader\r\n\t\t\tthis._activeShader = this.getFilterShader(filter);\r\n\t\t\tif (!this._activeShader) { continue; }\r\n\r\n\t\t\t// now the old result is stored in slot 0, make a new render texture\r\n\t\t\tgl.activeTexture(gl.TEXTURE0 + lastTextureSlot);\r\n\t\t\trenderTexture = this.getTargetRenderTexture(target, manager._drawWidth, manager._drawHeight);\r\n\t\t\tgl.bindFramebuffer(gl.FRAMEBUFFER, renderTexture._frameBuffer);\r\n\r\n\t\t\t// draw result to render texture\tR -> T\r\n\t\t\tgl.viewport(0, 0, manager._drawWidth, manager._drawHeight);\r\n\t\t\tgl.clear(gl.COLOR_BUFFER_BIT);\r\n\t\t\tthis._drawCover(gl, flipY);\r\n\r\n\t\t\t// bind the result texture to slot 0 as all filters and cover draws assume original content is in slot 0\r\n\t\t\tgl.activeTexture(gl.TEXTURE0);\r\n\t\t\tgl.bindTexture(gl.TEXTURE_2D, renderTexture);\r\n\t\t\tthis.setTextureParams(gl);\r\n\r\n\t\t\t// use flipping to keep things upright, things already cancel out on a single filter\r\n\t\t\t// this needs to be here as multiPass is not accurate to _this_ frame until after shader acquisition\r\n\t\t\tif (filterCount > 1 || filters[0]._multiPass) {\r\n\t\t\t\tflipY = !flipY;\r\n\t\t\t}\r\n\r\n\t\t\t// work through the multipass if it's there, otherwise move on\r\n\t\t\tfilter = filter._multiPass !== null ? filter._multiPass : filters[++i];\r\n\t\t} while (filter);\r\n\r\n\t\t// is this for another stage or mine\r\n\t\tif (this.isCacheControlled) {\r\n\t\t\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\r\n\t\t\tthis.updateViewport(wBackup, hBackup);\r\n\r\n\t\t\t// draw result to canvas\t\t\tR -> C\r\n\t\t\tthis._activeShader = this.getFilterShader(this);\r\n\t\t\tgl.clear(gl.COLOR_BUFFER_BIT);\r\n\t\t\tthis._drawCover(gl, flipY);\r\n\t\t} else {\r\n\t\t\t//TODO: DHG: this is less than ideal. A flipped initial render for this circumstance might help. Adjust the perspective matrix?\r\n\t\t\tif (flipY) {\r\n\t\t\t\tgl.activeTexture(gl.TEXTURE0 + lastTextureSlot);\r\n\t\t\t\trenderTexture = this.getTargetRenderTexture(target, manager._drawWidth, manager._drawHeight);\r\n\t\t\t\tgl.bindFramebuffer(gl.FRAMEBUFFER, renderTexture._frameBuffer);\r\n\r\n\t\t\t\tthis._activeShader = this.getFilterShader(this);\r\n\t\t\t\tgl.viewport(0, 0, manager._drawWidth, manager._drawHeight);\r\n\t\t\t\tgl.clear(gl.COLOR_BUFFER_BIT);\r\n\t\t\t\tthis._drawCover(gl, !flipY);\r\n\t\t\t}\r\n\t\t\tgl.bindFramebuffer(gl.FRAMEBUFFER, null);\r\n\t\t\tthis.updateViewport(wBackup, hBackup);\r\n\r\n\t\t\t// make sure the last texture is the active thing to draw\r\n\t\t\ttarget.cacheCanvas = renderTexture;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Add all the contents of a container to the pending buffers, called recursively on each container. This may\r\n\t * trigger a draw if a buffer runs out of space. This is the main workforce of the render loop.\r\n\t * @method _appendToBatchGroup\r\n\t * @param {Container} container The {{#crossLink \"Container\"}}{{/crossLink}} that contains everything to be drawn.\r\n\t * @param {WebGLRenderingContext} gl The canvas WebGL context object to draw into.\r\n\t * @param {Matrix2D} concatMtx The effective (concatenated) transformation matrix when beginning this container\r\n\t * @param {Number} concatAlpha The effective (concatenated) alpha when beginning this container\r\n\t * @param {Boolean} ignoreCache Don't use an element's cache during this draw\r\n\t * @protected\r\n\t */\r\n\tp._appendToBatchGroup = function (container, gl, concatMtx, concatAlpha, ignoreCache) {\r\n\t\t// sort out shared properties\r\n\t\tif (!container._glMtx) { container._glMtx = new createjs.Matrix2D(); }\r\n\t\tvar cMtx = container._glMtx;\r\n\t\tcMtx.copy(concatMtx);\r\n\t\tif (container.transformMatrix) {\r\n\t\t\tcMtx.appendMatrix(container.transformMatrix);\r\n\t\t} else {\r\n\t\t\tcMtx.appendTransform(\r\n\t\t\t\tcontainer.x, container.y,\r\n\t\t\t\tcontainer.scaleX, container.scaleY,\r\n\t\t\t\tcontainer.rotation, container.skewX, container.skewY,\r\n\t\t\t\tcontainer.regX, container.regY\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t// sub components of figuring out the position an object holds\r\n\t\tvar subL, subT, subR, subB;\r\n\r\n\t\t// actually apply its data to the buffers\r\n\t\tvar l = container.children.length;\r\n\t\tfor (var i = 0; i < l; i++) {\r\n\t\t\tvar item = container.children[i];\r\n\r\n\t\t\tif (!(item.visible && concatAlpha)) { continue; }\r\n\t\t\tif (!item.cacheCanvas || ignoreCache) {\r\n\t\t\t\tif (item._updateState){\r\n\t\t\t\t\titem._updateState();\r\n\t\t\t\t}\r\n\t\t\t\tif (item.children) {\r\n\t\t\t\t\tthis._appendToBatchGroup(item, gl, cMtx, item.alpha * concatAlpha);\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// check for overflowing batch, if yes then force a render\r\n\t\t\t// TODO: DHG: consider making this polygon count dependant for things like vector draws\r\n\t\t\tif (this.batchCardCount+1 > this._maxCardsPerBatch) {\r\n\t\t\t\tthis.batchReason = \"vertexOverflow\";\r\n\t\t\t\tthis._drawBuffers(gl);\t\t\t\t\t// <------------------------------------------------------------\r\n\t\t\t\tthis.batchCardCount = 0;\r\n\t\t\t}\r\n\r\n\t\t\t// keep track of concatenated position\r\n\t\t\tif (!item._glMtx) { item._glMtx = new createjs.Matrix2D(); }\r\n\t\t\tvar iMtx = item._glMtx;\r\n\t\t\tiMtx.copy(cMtx);\r\n\t\t\tif (item.transformMatrix) {\r\n\t\t\t\tiMtx.appendMatrix(item.transformMatrix);\r\n\t\t\t} else {\r\n\t\t\t\tiMtx.appendTransform(\r\n\t\t\t\t\titem.x, item.y,\r\n\t\t\t\t\titem.scaleX, item.scaleY,\r\n\t\t\t\t\titem.rotation, item.skewX, item.skewY,\r\n\t\t\t\t\titem.regX, item.regY\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tvar uvRect, texIndex, image, frame, texture, src;\r\n\t\t\tvar useCache = item.cacheCanvas && !ignoreCache;\r\n\r\n\t\t\tif (item._webGLRenderStyle === 2 || useCache) {\t\t\t// BITMAP / Cached Canvas\r\n\t\t\t\timage = (ignoreCache?false:item.cacheCanvas) || item.image;\r\n\t\t\t} else if (item._webGLRenderStyle === 1) {\t\t\t\t\t\t\t\t\t\t\t// SPRITE\r\n\t\t\t\tframe = item.spriteSheet.getFrame(item.currentFrame);\t//TODO: Faster way?\r\n\t\t\t\tif (frame === null) { continue; }\r\n\t\t\t\timage = frame.image;\r\n\t\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// MISC (DOM objects render themselves later)\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tvar uvs = this._uvs;\r\n\t\t\tvar vertices = this._vertices;\r\n\t\t\tvar texI = this._indices;\r\n\t\t\tvar alphas = this._alphas;\r\n\r\n\t\t\t// calculate texture\r\n\t\t\tif (!image) { continue; }\r\n\t\t\tif (image._storeID === undefined) {\r\n\t\t\t\t// this texture is new to us so load it and add it to the batch\r\n\t\t\t\ttexture = this._loadTextureImage(gl, image);\r\n\t\t\t\tthis._insertTextureInBatch(gl, texture);\r\n\t\t\t} else {\r\n\t\t\t\t// fetch the texture (render textures know how to look themselves up to simplify this logic)\r\n\t\t\t\ttexture = this._textureDictionary[image._storeID];\r\n\t\t\t\tif (!texture){\r\n\t\t\t\t\tif (this.vocalDebug){ console.log(\"Texture should not be looked up while not being stored.\"); }\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// put it in the batch if needed\r\n\t\t\t\tif (texture._batchID !== this._batchID) {\r\n\t\t\t\t\tthis._insertTextureInBatch(gl, texture);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttexIndex = texture._activeIndex;\r\n\r\n\t\t\tif (item._webGLRenderStyle === 2 || useCache) {\t\t\t// BITMAP / Cached Canvas\r\n\t\t\t\tif (!useCache && item.sourceRect) {\r\n\t\t\t\t\t// calculate uvs\r\n\t\t\t\t\tif (!item._uvRect) { item._uvRect = {}; }\r\n\t\t\t\t\tsrc = item.sourceRect;\r\n\t\t\t\t\tuvRect = item._uvRect;\r\n\t\t\t\t\tuvRect.t = (src.y)/image.height;\r\n\t\t\t\t\tuvRect.l = (src.x)/image.width;\r\n\t\t\t\t\tuvRect.b = (src.y + src.height)/image.height;\r\n\t\t\t\t\tuvRect.r = (src.x + src.width)/image.width;\r\n\r\n\t\t\t\t\t// calculate vertices\r\n\t\t\t\t\tsubL = 0;\t\t\t\t\t\t\tsubT = 0;\r\n\t\t\t\t\tsubR = src.width+subL;\t\t\t\tsubB = src.height+subT;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// calculate uvs\r\n\t\t\t\t\tuvRect = StageGL.UV_RECT;\r\n\t\t\t\t\t// calculate vertices\r\n\t\t\t\t\tif (useCache) {\r\n\t\t\t\t\t\tsrc = item.bitmapCache;\r\n\t\t\t\t\t\tsubL = src.x+(src._filterOffX/src.scale);\tsubT = src.y+(src._filterOffY/src.scale);\r\n\t\t\t\t\t\tsubR = (src._drawWidth/src.scale)+subL;\t\tsubB = (src._drawHeight/src.scale)+subT;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsubL = 0;\t\t\t\t\t\tsubT = 0;\r\n\t\t\t\t\t\tsubR = image.width+subL;\t\tsubB = image.height+subT;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (item._webGLRenderStyle === 1) {\t\t\t\t\t\t\t\t\t\t\t// SPRITE\r\n\t\t\t\tvar rect = frame.rect;\r\n\r\n\t\t\t\t// calculate uvs\r\n\t\t\t\tuvRect = frame.uvRect;\r\n\t\t\t\tif (!uvRect) {\r\n\t\t\t\t\tuvRect = StageGL.buildUVRects(item.spriteSheet, item.currentFrame, false);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// calculate vertices\r\n\t\t\t\tsubL = -frame.regX;\t\t\t\t\t\t\t\tsubT = -frame.regY;\r\n\t\t\t\tsubR = rect.width-frame.regX;\t\t\t\t\tsubB = rect.height-frame.regY;\r\n\t\t\t}\r\n\r\n\t\t\t// These must be calculated here else a forced draw might happen after they're set\r\n\t\t\tvar offV1 = this.batchCardCount*StageGL.INDICIES_PER_CARD;\t\t// offset for 1 component vectors\r\n\t\t\tvar offV2 = offV1*2;\t\t\t\t\t\t\t\t\t\t\t// offset for 2 component vectors\r\n\r\n\t\t\t//DHG: See Matrix2D.transformPoint for why this math specifically\r\n\t\t\t// apply vertices\r\n\t\t\tvertices[offV2] =\t\tsubL *iMtx.a + subT *iMtx.c +iMtx.tx;\t\tvertices[offV2+1] =\t\tsubL *iMtx.b + subT *iMtx.d +iMtx.ty;\r\n\t\t\tvertices[offV2+2] =\t\tsubL *iMtx.a + subB *iMtx.c +iMtx.tx;\t\tvertices[offV2+3] =\t\tsubL *iMtx.b + subB *iMtx.d +iMtx.ty;\r\n\t\t\tvertices[offV2+4] =\t\tsubR *iMtx.a + subT *iMtx.c +iMtx.tx;\t\tvertices[offV2+5] =\t\tsubR *iMtx.b + subT *iMtx.d +iMtx.ty;\r\n\t\t\tvertices[offV2+6] =\t\tvertices[offV2+2];\t\t\t\t\t\t\tvertices[offV2+7] =\t\tvertices[offV2+3];\r\n\t\t\tvertices[offV2+8] =\t\tvertices[offV2+4];\t\t\t\t\t\t\tvertices[offV2+9] =\t\tvertices[offV2+5];\r\n\t\t\tvertices[offV2+10] =\tsubR *iMtx.a + subB *iMtx.c +iMtx.tx;\t\tvertices[offV2+11] =\tsubR *iMtx.b + subB *iMtx.d +iMtx.ty;\r\n\r\n\t\t\t// apply uvs\r\n\t\t\tuvs[offV2] =\tuvRect.l;\t\t\tuvs[offV2+1] =\tuvRect.t;\r\n\t\t\tuvs[offV2+2] =\tuvRect.l;\t\t\tuvs[offV2+3] =\tuvRect.b;\r\n\t\t\tuvs[offV2+4] =\tuvRect.r;\t\t\tuvs[offV2+5] =\tuvRect.t;\r\n\t\t\tuvs[offV2+6] =\tuvRect.l;\t\t\tuvs[offV2+7] =\tuvRect.b;\r\n\t\t\tuvs[offV2+8] =\tuvRect.r;\t\t\tuvs[offV2+9] =\tuvRect.t;\r\n\t\t\tuvs[offV2+10] =\tuvRect.r;\t\t\tuvs[offV2+11] =\tuvRect.b;\r\n\r\n\t\t\t// apply texture\r\n\t\t\ttexI[offV1] = texI[offV1+1] = texI[offV1+2] = texI[offV1+3] = texI[offV1+4] = texI[offV1+5] = texIndex;\r\n\r\n\t\t\t// apply alpha\r\n\t\t\talphas[offV1] = alphas[offV1+1] = alphas[offV1+2] = alphas[offV1+3] = alphas[offV1+4] = alphas[offV1+5] = item.alpha * concatAlpha;\r\n\r\n\t\t\tthis.batchCardCount++;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Draws all the currently defined cards in the buffer to the render surface.\r\n\t * @method _drawBuffers\r\n\t * @param {WebGLRenderingContext} gl The canvas WebGL context object to draw into.\r\n\t * @protected\r\n\t */\r\n\tp._drawBuffers = function (gl) {\r\n\t\tif (this.batchCardCount <= 0) { return; }\t// prevents error logs on stages filled with un-renederable content.\r\n\r\n\t\tif (this.vocalDebug) {\r\n\t\t\tconsole.log(\"Draw[\"+ this._drawID +\":\"+ this._batchID +\"] : \"+ this.batchReason);\r\n\t\t}\r\n\t\tvar shaderProgram = this._activeShader;\r\n\t\tvar vertexPositionBuffer = this._vertexPositionBuffer;\r\n\t\tvar textureIndexBuffer = this._textureIndexBuffer;\r\n\t\tvar uvPositionBuffer = this._uvPositionBuffer;\r\n\t\tvar alphaBuffer = this._alphaBuffer;\r\n\r\n\t\tgl.useProgram(shaderProgram);\r\n\r\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, vertexPositionBuffer);\r\n\t\tgl.vertexAttribPointer(shaderProgram.vertexPositionAttribute, vertexPositionBuffer.itemSize, gl.FLOAT, false, 0, 0);\r\n\t\tgl.bufferSubData(gl.ARRAY_BUFFER, 0, this._vertices);\r\n\r\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, textureIndexBuffer);\r\n\t\tgl.vertexAttribPointer(shaderProgram.textureIndexAttribute, textureIndexBuffer.itemSize, gl.FLOAT, false, 0, 0);\r\n\t\tgl.bufferSubData(gl.ARRAY_BUFFER, 0, this._indices);\r\n\r\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, uvPositionBuffer);\r\n\t\tgl.vertexAttribPointer(shaderProgram.uvPositionAttribute, uvPositionBuffer.itemSize, gl.FLOAT, false, 0, 0);\r\n\t\tgl.bufferSubData(gl.ARRAY_BUFFER, 0, this._uvs);\r\n\r\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, alphaBuffer);\r\n\t\tgl.vertexAttribPointer(shaderProgram.alphaAttribute, alphaBuffer.itemSize, gl.FLOAT, false, 0, 0);\r\n\t\tgl.bufferSubData(gl.ARRAY_BUFFER, 0, this._alphas);\r\n\r\n\t\tgl.uniformMatrix4fv(shaderProgram.pMatrixUniform, gl.FALSE, this._projectionMatrix);\r\n\r\n\t\tfor (var i = 0; i < this._batchTextureCount; i++) {\r\n\t\t\tvar texture = this._batchTextures[i];\r\n\t\t\tgl.activeTexture(gl.TEXTURE0 + i);\r\n\t\t\tgl.bindTexture(gl.TEXTURE_2D, texture);\r\n\t\t\tthis.setTextureParams(gl, texture.isPOT);\r\n\t\t}\r\n\r\n\t\tgl.drawArrays(gl.TRIANGLES, 0, this.batchCardCount*StageGL.INDICIES_PER_CARD);\r\n\t\tthis._batchID++;\r\n\t};\r\n\r\n\t/**\r\n\t * Draws a card that covers the entire render surface. Mainly used for filters.\r\n\t * @method _drawBuffers\r\n\t * @param {WebGLRenderingContext} gl The canvas WebGL context object to draw into.\r\n\t * @param {Boolean} flipY Covers are used for things like RenderTextures and because of 3D vs Canvas space this can\r\n\t * end up meaning the `y` space sometimes requires flipping in the render.\r\n\t * @protected\r\n\t */\r\n\tp._drawCover = function (gl, flipY) {\r\n\t\tif (this._isDrawing > 0) {\r\n\t\t\tthis._drawBuffers(gl);\r\n\t\t}\r\n\r\n\t\tif (this.vocalDebug) {\r\n\t\t\tconsole.log(\"Draw[\"+ this._drawID +\":\"+ this._batchID +\"] : \"+ \"Cover\");\r\n\t\t}\r\n\t\tvar shaderProgram = this._activeShader;\r\n\t\tvar vertexPositionBuffer = this._vertexPositionBuffer;\r\n\t\tvar uvPositionBuffer = this._uvPositionBuffer;\r\n\r\n\t\tgl.clear(gl.COLOR_BUFFER_BIT);\r\n\t\tgl.useProgram(shaderProgram);\r\n\r\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, vertexPositionBuffer);\r\n\t\tgl.vertexAttribPointer(shaderProgram.vertexPositionAttribute, vertexPositionBuffer.itemSize, gl.FLOAT, false, 0, 0);\r\n\t\tgl.bufferSubData(gl.ARRAY_BUFFER, 0, StageGL.COVER_VERT);\r\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, uvPositionBuffer);\r\n\t\tgl.vertexAttribPointer(shaderProgram.uvPositionAttribute, uvPositionBuffer.itemSize, gl.FLOAT, false, 0, 0);\r\n\t\tgl.bufferSubData(gl.ARRAY_BUFFER, 0, flipY?StageGL.COVER_UV_FLIP:StageGL.COVER_UV);\r\n\r\n\t\tgl.uniform1i(shaderProgram.samplerUniform, 0);\r\n\t\tgl.uniform1f(shaderProgram.uprightUniform, flipY?0:1);\r\n\r\n\t\tgl.drawArrays(gl.TRIANGLES, 0, StageGL.INDICIES_PER_CARD);\r\n\t};\r\n\r\n\tcreatejs.StageGL = createjs.promote(StageGL, \"Stage\");\r\n}());\r\n\r\n//##############################################################################\r\n// Bitmap.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\r\n\t/**\r\n\t * A Bitmap represents an Image, Canvas, or Video in the display list. A Bitmap can be instantiated using an existing\r\n\t * HTML element, or a string.\r\n\t *\r\n\t *

    Example

    \r\n\t *\r\n\t * \tvar bitmap = new createjs.Bitmap(\"imagePath.jpg\");\r\n\t *\r\n\t * Notes:\r\n\t *
      \r\n\t * \t
    1. When using a video source that may loop or seek, use a {{#crossLink \"VideoBuffer\"}}{{/crossLink}} object to\r\n\t * \t prevent blinking / flashing.\r\n\t * \t
    2. When a string path or image tag that is not yet loaded is used, the stage may need to be redrawn before it\r\n\t * \t will be displayed.
    3. \r\n\t * \t
    4. Bitmaps with an SVG source currently will not respect an alpha value other than 0 or 1. To get around this,\r\n\t * \tthe Bitmap can be cached.
    5. \r\n\t * \t
    6. Bitmaps with an SVG source will taint the canvas with cross-origin data, which prevents interactivity. This\r\n\t * \thappens in all browsers except recent Firefox builds.
    7. \r\n\t * \t
    8. Images loaded cross-origin will throw cross-origin security errors when interacted with using a mouse, using\r\n\t * \tmethods such as `getObjectUnderPoint`, or using filters, or caching. You can get around this by setting\r\n\t * \t`crossOrigin` flags on your images before passing them to EaselJS, eg: `img.crossOrigin=\"Anonymous\";`
    9. \r\n\t *
    \r\n\t *\r\n\t * @class Bitmap\r\n\t * @extends DisplayObject\r\n\t * @constructor\r\n\t * @param {CanvasImageSource | String | Object} imageOrUri The source image to display. This can be a CanvasImageSource\r\n\t * (image, video, canvas), an object with a `getImage` method that returns a CanvasImageSource, or a string URL to an image.\r\n\t * If the latter, a new Image instance with the URL as its src will be used.\r\n\t **/\r\n\tfunction Bitmap(imageOrUri) {\r\n\t\tthis.DisplayObject_constructor();\r\n\t\t\r\n\t\t\r\n\t// public properties:\r\n\t\t/**\r\n\t\t * The source image to display. This can be a CanvasImageSource\r\n\t\t * (image, video, canvas), an object with a `getImage` method that returns a CanvasImageSource, or a string URL to an image.\r\n\t\t * If the latter, a new Image instance with the URL as its src will be used.\r\n\t\t * @property image\r\n\t\t * @type CanvasImageSource | Object\r\n\t\t **/\r\n\t\tif (typeof imageOrUri == \"string\") {\r\n\t\t\tthis.image = document.createElement(\"img\");\r\n\t\t\tthis.image.src = imageOrUri;\r\n\t\t} else {\r\n\t\t\tthis.image = imageOrUri;\r\n\t\t}\r\n\t\r\n\t\t/**\r\n\t\t * Specifies an area of the source image to draw. If omitted, the whole image will be drawn.\r\n\t\t * Notes:\r\n\t\t *
      \r\n\t\t *
    • that video sources must have a width / height set to work correctly with `sourceRect`
    • \r\n\t\t *
    • Cached objects will ignore the `sourceRect` property
    • \r\n\t\t *
    \r\n\t\t * @property sourceRect\r\n\t\t * @type Rectangle\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.sourceRect = null;\r\n\r\n\t// private properties:\r\n\t\t/**\r\n\t\t * Docced in superclass.\r\n\t\t */\r\n\t\tthis._webGLRenderStyle = createjs.DisplayObject._StageGL_BITMAP;\r\n\t}\r\n\tvar p = createjs.extend(Bitmap, createjs.DisplayObject);\r\n\t\r\n\t\r\n// public methods:\r\n\t/**\r\n\t * Constructor alias for backwards compatibility. This method will be removed in future versions.\r\n\t * Subclasses should be updated to use {{#crossLink \"Utility Methods/extends\"}}{{/crossLink}}.\r\n\t * @method initialize\r\n\t * @deprecated in favour of `createjs.promote()`\r\n\t **/\r\n\tp.initialize = Bitmap; // TODO: deprecated.\r\n\r\n\t/**\r\n\t * Returns true or false indicating whether the display object would be visible if drawn to a canvas.\r\n\t * This does not account for whether it would be visible within the boundaries of the stage.\r\n\t *\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method isVisible\r\n\t * @return {Boolean} Boolean indicating whether the display object would be visible if drawn to a canvas\r\n\t **/\r\n\tp.isVisible = function() {\r\n\t\tvar image = this.image;\r\n\t\tvar hasContent = this.cacheCanvas || (image && (image.naturalWidth || image.getContext || image.readyState >= 2));\r\n\t\treturn !!(this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0 && hasContent);\r\n\t};\r\n\r\n\t/**\r\n\t * Draws the display object into the specified context ignoring its visible, alpha, shadow, and transform.\r\n\t * Returns true if the draw was handled (useful for overriding functionality).\r\n\t *\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method draw\r\n\t * @param {CanvasRenderingContext2D} ctx The canvas 2D context object to draw into.\r\n\t * @param {Boolean} [ignoreCache=false] Indicates whether the draw operation should ignore any current cache.\r\n\t * For example, used for drawing the cache (to prevent it from simply drawing an existing cache back\r\n\t * into itself).\r\n\t * @return {Boolean}\r\n\t **/\r\n\tp.draw = function(ctx, ignoreCache) {\r\n\t\tif (this.DisplayObject_draw(ctx, ignoreCache)) { return true; }\r\n\t\tvar img = this.image, rect = this.sourceRect;\r\n\t\tif (img.getImage) { img = img.getImage(); }\r\n\t\tif (!img) { return true; }\r\n\t\tif (rect) {\r\n\t\t\t// some browsers choke on out of bound values, so we'll fix them:\r\n\t\t\tvar x1 = rect.x, y1 = rect.y, x2 = x1 + rect.width, y2 = y1 + rect.height, x = 0, y = 0, w = img.width, h = img.height;\r\n\t\t\tif (x1 < 0) { x -= x1; x1 = 0; }\r\n\t\t\tif (x2 > w) { x2 = w; }\r\n\t\t\tif (y1 < 0) { y -= y1; y1 = 0; }\r\n\t\t\tif (y2 > h) { y2 = h; }\r\n\t\t\tctx.drawImage(img, x1, y1, x2-x1, y2-y1, x, y, x2-x1, y2-y1);\r\n\t\t} else {\r\n\t\t\tctx.drawImage(img, 0, 0);\r\n\t\t}\r\n\t\treturn true;\r\n\t};\r\n\t\r\n\t//Note, the doc sections below document using the specified APIs (from DisplayObject) from\r\n\t//Bitmap. This is why they have no method implementations.\r\n\t\r\n\t/**\r\n\t * Because the content of a Bitmap is already in a simple format, cache is unnecessary for Bitmap instances.\r\n\t * You should not cache Bitmap instances as it can degrade performance.\r\n\t *\r\n\t * However: If you want to use a filter on a Bitmap, you MUST cache it, or it will not work.\r\n\t * To see the API for caching, please visit the DisplayObject {{#crossLink \"DisplayObject/cache\"}}{{/crossLink}}\r\n\t * method.\r\n\t * @method cache\r\n\t **/\r\n\t\r\n\t/**\r\n\t * Because the content of a Bitmap is already in a simple format, cache is unnecessary for Bitmap instances.\r\n\t * You should not cache Bitmap instances as it can degrade performance.\r\n\t *\r\n\t * However: If you want to use a filter on a Bitmap, you MUST cache it, or it will not work.\r\n\t * To see the API for caching, please visit the DisplayObject {{#crossLink \"DisplayObject/cache\"}}{{/crossLink}}\r\n\t * method.\r\n\t * @method updateCache\r\n\t **/\r\n\t\r\n\t/**\r\n\t * Because the content of a Bitmap is already in a simple format, cache is unnecessary for Bitmap instances.\r\n\t * You should not cache Bitmap instances as it can degrade performance.\r\n\t *\r\n\t * However: If you want to use a filter on a Bitmap, you MUST cache it, or it will not work.\r\n\t * To see the API for caching, please visit the DisplayObject {{#crossLink \"DisplayObject/cache\"}}{{/crossLink}}\r\n\t * method.\r\n\t * @method uncache\r\n\t **/\r\n\r\n\t/**\r\n\t * Docced in superclass.\r\n\t */\r\n\tp.getBounds = function() {\r\n\t\tvar rect = this.DisplayObject_getBounds();\r\n\t\tif (rect) { return rect; }\r\n\t\tvar image = this.image, o = this.sourceRect || image;\r\n\t\tvar hasContent = (image && (image.naturalWidth || image.getContext || image.readyState >= 2));\r\n\t\treturn hasContent ? this._rectangle.setValues(0, 0, o.width, o.height) : null;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Returns a clone of the Bitmap instance.\r\n\t * @method clone\r\n\t * @param {Boolean} node Whether the underlying dom element should be cloned as well.\r\n\t * @return {Bitmap} a clone of the Bitmap instance.\r\n\t **/\r\n\tp.clone = function(node) {\r\n\t\tvar image = this.image;\r\n\t\tif(image && node){ image = image.cloneNode(); }\r\n\t\tvar o = new Bitmap(image);\r\n\t\tif (this.sourceRect) { o.sourceRect = this.sourceRect.clone(); }\r\n\t\tthis._cloneProps(o);\r\n\t\treturn o;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Returns a string representation of this object.\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t **/\r\n\tp.toString = function() {\r\n\t\treturn \"[Bitmap (name=\"+ this.name +\")]\";\r\n\t};\r\n\r\n\t\r\n\tcreatejs.Bitmap = createjs.promote(Bitmap, \"DisplayObject\");\r\n}());\r\n\r\n//##############################################################################\r\n// Sprite.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * Displays a frame or sequence of frames (ie. an animation) from a SpriteSheet instance. A sprite sheet is a series of\r\n\t * images (usually animation frames) combined into a single image. For example, an animation consisting of 8 100x100\r\n\t * images could be combined into a 400x200 sprite sheet (4 frames across by 2 high). You can display individual frames,\r\n\t * play frames as an animation, and even sequence animations together.\r\n\t *\r\n\t * See the {{#crossLink \"SpriteSheet\"}}{{/crossLink}} class for more information on setting up frames and animations.\r\n\t *\r\n\t *

    Example

    \r\n\t *\r\n\t * var instance = new createjs.Sprite(spriteSheet);\r\n\t * instance.gotoAndStop(\"frameName\");\r\n\t *\r\n\t * Until {{#crossLink \"Sprite/gotoAndStop\"}}{{/crossLink}} or {{#crossLink \"Sprite/gotoAndPlay\"}}{{/crossLink}} is called,\r\n\t * only the first defined frame defined in the sprite sheet will be displayed.\r\n\t *\r\n\t * @class Sprite\r\n\t * @extends DisplayObject\r\n\t * @constructor\r\n\t * @param {SpriteSheet} spriteSheet The SpriteSheet instance to play back. This includes the source image(s), frame\r\n\t * dimensions, and frame data. See {{#crossLink \"SpriteSheet\"}}{{/crossLink}} for more information.\r\n\t * @param {String|Number} [frameOrAnimation] The frame number or animation to play initially.\r\n\t **/\r\n\tfunction Sprite(spriteSheet, frameOrAnimation) {\r\n\t\tthis.DisplayObject_constructor();\r\n\t\t\r\n\t\t\r\n\t// public properties:\r\n\t\t/**\r\n\t\t * The frame index that will be drawn when draw is called. Note that with some {{#crossLink \"SpriteSheet\"}}{{/crossLink}}\r\n\t\t * definitions, this will advance non-sequentially. This will always be an integer value.\r\n\t\t * @property currentFrame\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t * @readonly\r\n\t\t **/\r\n\t\tthis.currentFrame = 0;\r\n\t\r\n\t\t/**\r\n\t\t * Returns the name of the currently playing animation.\r\n\t\t * @property currentAnimation\r\n\t\t * @type {String}\r\n\t\t * @final\r\n\t\t * @readonly\r\n\t\t **/\r\n\t\tthis.currentAnimation = null;\r\n\t\r\n\t\t/**\r\n\t\t * Prevents the animation from advancing each tick automatically. For example, you could create a sprite\r\n\t\t * sheet of icons, set paused to true, and display the appropriate icon by setting currentFrame.\r\n\t\t * @property paused\r\n\t\t * @type {Boolean}\r\n\t\t * @default false\r\n\t\t **/\r\n\t\tthis.paused = true;\r\n\t\r\n\t\t/**\r\n\t\t * The SpriteSheet instance to play back. This includes the source image, frame dimensions, and frame\r\n\t\t * data. See {{#crossLink \"SpriteSheet\"}}{{/crossLink}} for more information.\r\n\t\t * @property spriteSheet\r\n\t\t * @type {SpriteSheet}\r\n\t\t * @readonly\r\n\t\t **/\r\n\t\tthis.spriteSheet = spriteSheet;\r\n\t\r\n\t\t/**\r\n\t\t * Specifies the current frame index within the currently playing animation. When playing normally, this will increase\r\n\t\t * from 0 to n-1, where n is the number of frames in the current animation.\r\n\t\t *\r\n\t\t * This could be a non-integer value if\r\n\t\t * using time-based playback (see {{#crossLink \"Sprite/framerate\"}}{{/crossLink}}, or if the animation's speed is\r\n\t\t * not an integer.\r\n\t\t * @property currentAnimationFrame\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis.currentAnimationFrame = 0;\r\n\t\r\n\t\t/**\r\n\t\t * By default Sprite instances advance one frame per tick. Specifying a framerate for the Sprite (or its related\r\n\t\t * SpriteSheet) will cause it to advance based on elapsed time between ticks as appropriate to maintain the target\r\n\t\t * framerate.\r\n\t\t *\r\n\t\t * For example, if a Sprite with a framerate of 10 is placed on a Stage being updated at 40fps, then the Sprite will\r\n\t\t * advance roughly one frame every 4 ticks. This will not be exact, because the time between each tick will\r\n\t\t * vary slightly between frames.\r\n\t\t *\r\n\t\t * This feature is dependent on the tick event object (or an object with an appropriate \"delta\" property) being\r\n\t\t * passed into {{#crossLink \"Stage/update\"}}{{/crossLink}}.\r\n\t\t * @property framerate\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis.framerate = 0;\r\n\t\r\n\t\r\n\t// private properties:\r\n\t\t/**\r\n\t\t * Current animation object.\r\n\t\t * @property _animation\r\n\t\t * @protected\r\n\t\t * @type {Object}\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis._animation = null;\r\n\t\r\n\t\t/**\r\n\t\t * Current frame index.\r\n\t\t * @property _currentFrame\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis._currentFrame = null;\r\n\t\t\r\n\t\t/**\r\n\t\t * Skips the next auto advance. Used by gotoAndPlay to avoid immediately jumping to the next frame\r\n\t\t * @property _skipAdvance\r\n\t\t * @protected\r\n\t\t * @type {Boolean}\r\n\t\t * @default false\r\n\t\t **/\r\n\t\tthis._skipAdvance = false;\r\n\r\n\t\t/**\r\n\t\t * Docced in superclass.\r\n\t\t */\r\n\t\tthis._webGLRenderStyle = createjs.DisplayObject._StageGL_SPRITE;\r\n\r\n\t\tif (frameOrAnimation != null) { this.gotoAndPlay(frameOrAnimation); }\r\n\t}\r\n\tvar p = createjs.extend(Sprite, createjs.DisplayObject);\r\n\r\n\t/**\r\n\t * Constructor alias for backwards compatibility. This method will be removed in future versions.\r\n\t * Subclasses should be updated to use {{#crossLink \"Utility Methods/extends\"}}{{/crossLink}}.\r\n\t * @method initialize\r\n\t * @deprecated in favour of `createjs.promote()`\r\n\t **/\r\n\tp.initialize = Sprite; // TODO: Deprecated. This is for backwards support of Flash/Animate spritesheet export.\r\n\r\n\r\n// events:\r\n\t/**\r\n\t * Dispatched when an animation reaches its ends.\r\n\t * @event animationend\r\n\t * @param {Object} target The object that dispatched the event.\r\n\t * @param {String} type The event type.\r\n\t * @param {String} name The name of the animation that just ended.\r\n\t * @param {String} next The name of the next animation that will be played, or null. This will be the same as name if the animation is looping.\r\n\t * @since 0.6.0\r\n\t */\r\n\t \r\n\t/**\r\n\t * Dispatched any time the current frame changes. For example, this could be due to automatic advancement on a tick,\r\n\t * or calling gotoAndPlay() or gotoAndStop().\r\n\t * @event change\r\n\t * @param {Object} target The object that dispatched the event.\r\n\t * @param {String} type The event type.\r\n\t */\r\n\r\n\r\n// public methods:\r\n\t/**\r\n\t * Returns true or false indicating whether the display object would be visible if drawn to a canvas.\r\n\t * This does not account for whether it would be visible within the boundaries of the stage.\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method isVisible\r\n\t * @return {Boolean} Boolean indicating whether the display object would be visible if drawn to a canvas\r\n\t **/\r\n\tp.isVisible = function() {\r\n\t\tvar hasContent = this.cacheCanvas || this.spriteSheet.complete;\r\n\t\treturn !!(this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0 && hasContent);\r\n\t};\r\n\r\n\t/**\r\n\t * Draws the display object into the specified context ignoring its visible, alpha, shadow, and transform.\r\n\t * Returns true if the draw was handled (useful for overriding functionality).\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method draw\r\n\t * @param {CanvasRenderingContext2D} ctx The canvas 2D context object to draw into.\r\n\t * @param {Boolean} ignoreCache Indicates whether the draw operation should ignore any current cache.\r\n\t * For example, used for drawing the cache (to prevent it from simply drawing an existing cache back\r\n\t * into itself).\r\n\t **/\r\n\tp.draw = function(ctx, ignoreCache) {\r\n\t\tif (this.DisplayObject_draw(ctx, ignoreCache)) { return true; }\r\n\t\tthis._normalizeFrame();\r\n\t\tvar o = this.spriteSheet.getFrame(this._currentFrame|0);\r\n\t\tif (!o) { return false; }\r\n\t\tvar rect = o.rect;\r\n\t\tif (rect.width && rect.height) { ctx.drawImage(o.image, rect.x, rect.y, rect.width, rect.height, -o.regX, -o.regY, rect.width, rect.height); }\r\n\t\treturn true;\r\n\t};\r\n\r\n\t//Note, the doc sections below document using the specified APIs (from DisplayObject) from\r\n\t//Bitmap. This is why they have no method implementations.\r\n\r\n\t/**\r\n\t * Because the content of a Sprite is already in a raster format, cache is unnecessary for Sprite instances.\r\n\t * You should not cache Sprite instances as it can degrade performance.\r\n\t * @method cache\r\n\t **/\r\n\r\n\t/**\r\n\t * Because the content of a Sprite is already in a raster format, cache is unnecessary for Sprite instances.\r\n\t * You should not cache Sprite instances as it can degrade performance.\r\n\t * @method updateCache\r\n\t **/\r\n\r\n\t/**\r\n\t * Because the content of a Sprite is already in a raster format, cache is unnecessary for Sprite instances.\r\n\t * You should not cache Sprite instances as it can degrade performance.\r\n\t * @method uncache\r\n\t **/\r\n\r\n\t/**\r\n\t * Play (unpause) the current animation. The Sprite will be paused if either {{#crossLink \"Sprite/stop\"}}{{/crossLink}}\r\n\t * or {{#crossLink \"Sprite/gotoAndStop\"}}{{/crossLink}} is called. Single frame animations will remain\r\n\t * unchanged.\r\n\t * @method play\r\n\t **/\r\n\tp.play = function() {\r\n\t\tthis.paused = false;\r\n\t};\r\n\r\n\t/**\r\n\t * Stop playing a running animation. The Sprite will be playing if {{#crossLink \"Sprite/gotoAndPlay\"}}{{/crossLink}}\r\n\t * is called. Note that calling {{#crossLink \"Sprite/gotoAndPlay\"}}{{/crossLink}} or {{#crossLink \"Sprite/play\"}}{{/crossLink}}\r\n\t * will resume playback.\r\n\t * @method stop\r\n\t **/\r\n\tp.stop = function() {\r\n\t\tthis.paused = true;\r\n\t};\r\n\r\n\t/**\r\n\t * Sets paused to false and plays the specified animation name, named frame, or frame number.\r\n\t * @method gotoAndPlay\r\n\t * @param {String|Number} frameOrAnimation The frame number or animation name that the playhead should move to\r\n\t * and begin playing.\r\n\t **/\r\n\tp.gotoAndPlay = function(frameOrAnimation) {\r\n\t\tthis.paused = false;\r\n\t\tthis._skipAdvance = true;\r\n\t\tthis._goto(frameOrAnimation);\r\n\t};\r\n\r\n\t/**\r\n\t * Sets paused to true and seeks to the specified animation name, named frame, or frame number.\r\n\t * @method gotoAndStop\r\n\t * @param {String|Number} frameOrAnimation The frame number or animation name that the playhead should move to\r\n\t * and stop.\r\n\t **/\r\n\tp.gotoAndStop = function(frameOrAnimation) {\r\n\t\tthis.paused = true;\r\n\t\tthis._goto(frameOrAnimation);\r\n\t};\r\n\r\n\t/**\r\n\t * Advances the playhead. This occurs automatically each tick by default.\r\n\t * @param [time] {Number} The amount of time in ms to advance by. Only applicable if framerate is set on the Sprite\r\n\t * or its SpriteSheet.\r\n\t * @method advance\r\n\t*/\r\n\tp.advance = function(time) {\r\n\t\tvar fps = this.framerate || this.spriteSheet.framerate;\r\n\t\tvar t = (fps && time != null) ? time/(1000/fps) : 1;\r\n\t\tthis._normalizeFrame(t);\r\n\t};\r\n\t\r\n\t/**\r\n\t * Returns a {{#crossLink \"Rectangle\"}}{{/crossLink}} instance defining the bounds of the current frame relative to\r\n\t * the origin. For example, a 90 x 70 frame with regX=50 and regY=40 would return a\r\n\t * rectangle with [x=-50, y=-40, width=90, height=70]. This ignores transformations on the display object.\r\n\t *\r\n\t * Also see the SpriteSheet {{#crossLink \"SpriteSheet/getFrameBounds\"}}{{/crossLink}} method.\r\n\t * @method getBounds\r\n\t * @return {Rectangle} A Rectangle instance. Returns null if the frame does not exist, or the image is not fully\r\n\t * loaded.\r\n\t **/\r\n\tp.getBounds = function() {\r\n\t\t// TODO: should this normalizeFrame?\r\n\t\treturn this.DisplayObject_getBounds() || this.spriteSheet.getFrameBounds(this.currentFrame, this._rectangle);\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a clone of the Sprite instance. Note that the same SpriteSheet is shared between cloned\r\n\t * instances.\r\n\t * @method clone\r\n\t * @return {Sprite} a clone of the Sprite instance.\r\n\t **/\r\n\tp.clone = function() {\r\n\t\treturn this._cloneProps(new Sprite(this.spriteSheet));\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a string representation of this object.\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t **/\r\n\tp.toString = function() {\r\n\t\treturn \"[Sprite (name=\"+ this.name +\")]\";\r\n\t};\r\n\r\n// private methods:\r\n\t/**\r\n\t * @method _cloneProps\r\n\t * @param {Sprite} o\r\n\t * @return {Sprite} o\r\n\t * @protected\r\n\t **/\r\n\tp._cloneProps = function(o) {\r\n\t\tthis.DisplayObject__cloneProps(o);\r\n\t\to.currentFrame = this.currentFrame;\r\n\t\to.currentAnimation = this.currentAnimation;\r\n\t\to.paused = this.paused;\r\n\t\to.currentAnimationFrame = this.currentAnimationFrame;\r\n\t\to.framerate = this.framerate;\r\n\t\t\r\n\t\to._animation = this._animation;\r\n\t\to._currentFrame = this._currentFrame;\r\n\t\to._skipAdvance = this._skipAdvance;\r\n\t\treturn o;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Advances the currentFrame if paused is not true. This is called automatically when the {{#crossLink \"Stage\"}}{{/crossLink}}\r\n\t * ticks.\r\n\t * @param {Object} evtObj An event object that will be dispatched to all tick listeners. This object is reused between dispatchers to reduce construction & GC costs.\r\n\t * @protected\r\n\t * @method _tick\r\n\t **/\r\n\tp._tick = function(evtObj) {\r\n\t\tif (!this.paused) {\r\n\t\t\tif (!this._skipAdvance) { this.advance(evtObj&&evtObj.delta); }\r\n\t\t\tthis._skipAdvance = false;\r\n\t\t}\r\n\t\tthis.DisplayObject__tick(evtObj);\r\n\t};\r\n\r\n\r\n\t/**\r\n\t * Normalizes the current frame, advancing animations and dispatching callbacks as appropriate.\r\n\t * @protected\r\n\t * @method _normalizeFrame\r\n\t **/\r\n\tp._normalizeFrame = function(frameDelta) {\r\n\t\tframeDelta = frameDelta || 0;\r\n\t\tvar animation = this._animation;\r\n\t\tvar paused = this.paused;\r\n\t\tvar frame = this._currentFrame;\r\n\t\tvar l;\r\n\t\t\r\n\t\tif (animation) {\r\n\t\t\tvar speed = animation.speed || 1;\r\n\t\t\tvar animFrame = this.currentAnimationFrame;\r\n\t\t\tl = animation.frames.length;\r\n\t\t\tif (animFrame + frameDelta * speed >= l) {\r\n\t\t\t\tvar next = animation.next;\r\n\t\t\t\tif (this._dispatchAnimationEnd(animation, frame, paused, next, l - 1)) {\r\n\t\t\t\t\t// something changed in the event stack, so we shouldn't make any more changes here.\r\n\t\t\t\t\treturn;\r\n\t\t\t\t} else if (next) {\r\n\t\t\t\t\t// sequence. Automatically calls _normalizeFrame again with the remaining frames.\r\n\t\t\t\t\treturn this._goto(next, frameDelta - (l - animFrame) / speed);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// end.\r\n\t\t\t\t\tthis.paused = true;\r\n\t\t\t\t\tanimFrame = animation.frames.length - 1;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tanimFrame += frameDelta * speed;\r\n\t\t\t}\r\n\t\t\tthis.currentAnimationFrame = animFrame;\r\n\t\t\tthis._currentFrame = animation.frames[animFrame | 0]\r\n\t\t} else {\r\n\t\t\tframe = (this._currentFrame += frameDelta);\r\n\t\t\tl = this.spriteSheet.getNumFrames();\r\n\t\t\tif (frame >= l && l > 0) {\r\n\t\t\t\tif (!this._dispatchAnimationEnd(animation, frame, paused, l - 1)) {\r\n\t\t\t\t\t// looped.\r\n\t\t\t\t\tif ((this._currentFrame -= l) >= l) { return this._normalizeFrame(); }\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tframe = this._currentFrame | 0;\r\n\t\tif (this.currentFrame != frame) {\r\n\t\t\tthis.currentFrame = frame;\r\n\t\t\tthis.dispatchEvent(\"change\");\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Dispatches the \"animationend\" event. Returns true if a handler changed the animation (ex. calling {{#crossLink \"Sprite/stop\"}}{{/crossLink}},\r\n\t * {{#crossLink \"Sprite/gotoAndPlay\"}}{{/crossLink}}, etc.)\r\n\t * @property _dispatchAnimationEnd\r\n\t * @private\r\n\t * @type {Function}\r\n\t **/\r\n\tp._dispatchAnimationEnd = function(animation, frame, paused, next, end) {\r\n\t\tvar name = animation ? animation.name : null;\r\n\t\tif (this.hasEventListener(\"animationend\")) {\r\n\t\t\tvar evt = new createjs.Event(\"animationend\");\r\n\t\t\tevt.name = name;\r\n\t\t\tevt.next = next;\r\n\t\t\tthis.dispatchEvent(evt);\r\n\t\t}\r\n\t\t// did the animation get changed in the event stack?:\r\n\t\tvar changed = (this._animation != animation || this._currentFrame != frame);\r\n\t\t// if the animation hasn't changed, but the sprite was paused, then we want to stick to the last frame:\r\n\t\tif (!changed && !paused && this.paused) { this.currentAnimationFrame = end; changed = true; }\r\n\t\treturn changed;\r\n\t};\r\n\r\n\t/**\r\n\t * Moves the playhead to the specified frame number or animation.\r\n\t * @method _goto\r\n\t * @param {String|Number} frameOrAnimation The frame number or animation that the playhead should move to.\r\n\t * @param {Boolean} [frame] The frame of the animation to go to. Defaults to 0.\r\n\t * @protected\r\n\t **/\r\n\tp._goto = function(frameOrAnimation, frame) {\r\n\t\tthis.currentAnimationFrame = 0;\r\n\t\tif (isNaN(frameOrAnimation)) {\r\n\t\t\tvar data = this.spriteSheet.getAnimation(frameOrAnimation);\r\n\t\t\tif (data) {\r\n\t\t\t\tthis._animation = data;\r\n\t\t\t\tthis.currentAnimation = frameOrAnimation;\r\n\t\t\t\tthis._normalizeFrame(frame);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthis.currentAnimation = this._animation = null;\r\n\t\t\tthis._currentFrame = frameOrAnimation;\r\n\t\t\tthis._normalizeFrame();\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tcreatejs.Sprite = createjs.promote(Sprite, \"DisplayObject\");\r\n}());\r\n\r\n//##############################################################################\r\n// Shape.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * A Shape allows you to display vector art in the display list. It composites a {{#crossLink \"Graphics\"}}{{/crossLink}}\r\n\t * instance which exposes all of the vector drawing methods. The Graphics instance can be shared between multiple Shape\r\n\t * instances to display the same vector graphics with different positions or transforms.\r\n\t *\r\n\t * If the vector art will not\r\n\t * change between draws, you may want to use the {{#crossLink \"DisplayObject/cache\"}}{{/crossLink}} method to reduce the\r\n\t * rendering cost.\r\n\t *\r\n\t *

    Example

    \r\n\t *\r\n\t * var graphics = new createjs.Graphics().beginFill(\"#ff0000\").drawRect(0, 0, 100, 100);\r\n\t * var shape = new createjs.Shape(graphics);\r\n\t *\r\n\t * //Alternatively use can also use the graphics property of the Shape class to renderer the same as above.\r\n\t * var shape = new createjs.Shape();\r\n\t * shape.graphics.beginFill(\"#ff0000\").drawRect(0, 0, 100, 100);\r\n\t *\r\n\t * @class Shape\r\n\t * @extends DisplayObject\r\n\t * @constructor\r\n\t * @param {Graphics} graphics Optional. The graphics instance to display. If null, a new Graphics instance will be created.\r\n\t **/\r\n\tfunction Shape(graphics) {\r\n\t\tthis.DisplayObject_constructor();\r\n\t\t\r\n\t\t\r\n\t// public properties:\r\n\t\t/**\r\n\t\t * The graphics instance to display.\r\n\t\t * @property graphics\r\n\t\t * @type Graphics\r\n\t\t **/\r\n\t\tthis.graphics = graphics ? graphics : new createjs.Graphics();\r\n\t}\r\n\tvar p = createjs.extend(Shape, createjs.DisplayObject);\r\n\r\n\t// TODO: deprecated\r\n\t// p.initialize = function() {}; // searchable for devs wondering where it is. REMOVED. See docs for details.\r\n\r\n\r\n// public methods:\r\n\t/**\r\n\t * Returns true or false indicating whether the Shape would be visible if drawn to a canvas.\r\n\t * This does not account for whether it would be visible within the boundaries of the stage.\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method isVisible\r\n\t * @return {Boolean} Boolean indicating whether the Shape would be visible if drawn to a canvas\r\n\t **/\r\n\tp.isVisible = function() {\r\n\t\tvar hasContent = this.cacheCanvas || (this.graphics && !this.graphics.isEmpty());\r\n\t\treturn !!(this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0 && hasContent);\r\n\t};\r\n\r\n\t/**\r\n\t * Draws the Shape into the specified context ignoring its visible, alpha, shadow, and transform. Returns true if\r\n\t * the draw was handled (useful for overriding functionality).\r\n\t *\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method draw\r\n\t * @param {CanvasRenderingContext2D} ctx The canvas 2D context object to draw into.\r\n\t * @param {Boolean} [ignoreCache=false] Indicates whether the draw operation should ignore any current cache. For example,\r\n\t * used for drawing the cache (to prevent it from simply drawing an existing cache back into itself).\r\n\t * @return {Boolean}\r\n\t **/\r\n\tp.draw = function(ctx, ignoreCache) {\r\n\t\tif (this.DisplayObject_draw(ctx, ignoreCache)) { return true; }\r\n\t\tthis.graphics.draw(ctx, this);\r\n\t\treturn true;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a clone of this Shape. Some properties that are specific to this instance's current context are reverted to\r\n\t * their defaults (for example .parent).\r\n\t * @method clone\r\n\t * @param {Boolean} recursive If true, this Shape's {{#crossLink \"Graphics\"}}{{/crossLink}} instance will also be\r\n\t * cloned. If false, the Graphics instance will be shared with the new Shape.\r\n\t **/\r\n\tp.clone = function(recursive) {\r\n\t\tvar g = (recursive && this.graphics) ? this.graphics.clone() : this.graphics;\r\n\t\treturn this._cloneProps(new Shape(g));\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a string representation of this object.\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t **/\r\n\tp.toString = function() {\r\n\t\treturn \"[Shape (name=\"+ this.name +\")]\";\r\n\t};\r\n\r\n\r\n\tcreatejs.Shape = createjs.promote(Shape, \"DisplayObject\");\r\n}());\r\n\r\n//##############################################################################\r\n// Text.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * Display one or more lines of dynamic text (not user editable) in the display list. Line wrapping support (using the\r\n\t * lineWidth) is very basic, wrapping on spaces and tabs only. Note that as an alternative to Text, you can position HTML\r\n\t * text above or below the canvas relative to items in the display list using the {{#crossLink \"DisplayObject/localToGlobal\"}}{{/crossLink}}\r\n\t * method, or using {{#crossLink \"DOMElement\"}}{{/crossLink}}.\r\n\t *\r\n\t * Please note that Text does not support HTML text, and can only display one font style at a time. To use\r\n\t * multiple font styles, you will need to create multiple text instances, and position them manually.\r\n\t *\r\n\t *

    Example

    \r\n\t *\r\n\t * var text = new createjs.Text(\"Hello World\", \"20px Arial\", \"#ff7700\");\r\n\t * text.x = 100;\r\n\t * text.textBaseline = \"alphabetic\";\r\n\t *\r\n\t * CreateJS Text supports web fonts (the same rules as Canvas). The font must be loaded and supported by the browser\r\n\t * before it can be displayed.\r\n\t *\r\n\t * Note: Text can be expensive to generate, so cache instances where possible. Be aware that not all\r\n\t * browsers will render Text exactly the same.\r\n\t * @class Text\r\n\t * @extends DisplayObject\r\n\t * @constructor\r\n\t * @param {String} [text] The text to display.\r\n\t * @param {String} [font] The font style to use. Any valid value for the CSS font attribute is acceptable (ex. \"bold\r\n\t * 36px Arial\").\r\n\t * @param {String} [color] The color to draw the text in. Any valid value for the CSS color attribute is acceptable (ex.\r\n\t * \"#F00\", \"red\", or \"#FF0000\").\r\n\t **/\r\n\tfunction Text(text, font, color) {\r\n\t\tthis.DisplayObject_constructor();\r\n\t\t\r\n\t\t\r\n\t// public properties:\r\n\t\t/**\r\n\t\t * The text to display.\r\n\t\t * @property text\r\n\t\t * @type String\r\n\t\t **/\r\n\t\tthis.text = text;\r\n\t\r\n\t\t/**\r\n\t\t * The font style to use. Any valid value for the CSS font attribute is acceptable (ex. \"bold 36px Arial\").\r\n\t\t * @property font\r\n\t\t * @type String\r\n\t\t **/\r\n\t\tthis.font = font;\r\n\t\r\n\t\t/**\r\n\t\t * The color to draw the text in. Any valid value for the CSS color attribute is acceptable (ex. \"#F00\"). Default is \"#000\".\r\n\t\t * It will also accept valid canvas fillStyle values.\r\n\t\t * @property color\r\n\t\t * @type String\r\n\t\t **/\r\n\t\tthis.color = color;\r\n\t\r\n\t\t/**\r\n\t\t * The horizontal text alignment. Any of \"start\", \"end\", \"left\", \"right\", and \"center\". For detailed\r\n\t\t * information view the\r\n\t\t * \r\n\t\t * whatwg spec. Default is \"left\".\r\n\t\t * @property textAlign\r\n\t\t * @type String\r\n\t\t **/\r\n\t\tthis.textAlign = \"left\";\r\n\t\r\n\t\t/**\r\n\t\t * The vertical alignment point on the font. Any of \"top\", \"hanging\", \"middle\", \"alphabetic\", \"ideographic\", or\r\n\t\t * \"bottom\". For detailed information view the \r\n\t\t * whatwg spec. Default is \"top\".\r\n\t\t * @property textBaseline\r\n\t\t * @type String\r\n\t\t*/\r\n\t\tthis.textBaseline = \"top\";\r\n\t\r\n\t\t/**\r\n\t\t * The maximum width to draw the text. If maxWidth is specified (not null), the text will be condensed or\r\n\t\t * shrunk to make it fit in this width. For detailed information view the\r\n\t\t * \r\n\t\t * whatwg spec.\r\n\t\t * @property maxWidth\r\n\t\t * @type Number\r\n\t\t*/\r\n\t\tthis.maxWidth = null;\r\n\t\r\n\t\t/**\r\n\t\t * If greater than 0, the text will be drawn as a stroke (outline) of the specified width.\r\n\t\t * @property outline\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis.outline = 0;\r\n\t\r\n\t\t/**\r\n\t\t * Indicates the line height (vertical distance between baselines) for multi-line text. If null or 0,\r\n\t\t * the value of getMeasuredLineHeight is used.\r\n\t\t * @property lineHeight\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis.lineHeight = 0;\r\n\t\r\n\t\t/**\r\n\t\t * Indicates the maximum width for a line of text before it is wrapped to multiple lines. If null,\r\n\t\t * the text will not be wrapped.\r\n\t\t * @property lineWidth\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis.lineWidth = null;\r\n\t}\r\n\tvar p = createjs.extend(Text, createjs.DisplayObject);\r\n\r\n\t// TODO: deprecated\r\n\t// p.initialize = function() {}; // searchable for devs wondering where it is. REMOVED. See docs for details.\r\n\r\n\t\r\n// static properties:\r\n\t/**\r\n\t * @property _workingContext\r\n\t * @type CanvasRenderingContext2D\r\n\t * @private\r\n\t **/\r\n\tvar canvas = (createjs.createCanvas?createjs.createCanvas():document.createElement(\"canvas\"));\r\n\tif (canvas.getContext) { Text._workingContext = canvas.getContext(\"2d\"); canvas.width = canvas.height = 1; }\r\n\t\r\n\t\r\n// constants:\r\n\t/**\r\n\t * Lookup table for the ratio to offset bounds x calculations based on the textAlign property.\r\n\t * @property H_OFFSETS\r\n\t * @type Object\r\n\t * @protected\r\n\t * @static\r\n\t **/\r\n\tText.H_OFFSETS = {start: 0, left: 0, center: -0.5, end: -1, right: -1};\r\n\t\r\n\t/**\r\n\t * Lookup table for the ratio to offset bounds y calculations based on the textBaseline property.\r\n\t * @property H_OFFSETS\r\n\t * @type Object\r\n\t * @protected\r\n\t * @static\r\n\t **/\r\n\tText.V_OFFSETS = {top: 0, hanging: -0.01, middle: -0.4, alphabetic: -0.8, ideographic: -0.85, bottom: -1};\r\n\r\n\r\n// public methods:\r\n\t/**\r\n\t * Returns true or false indicating whether the display object would be visible if drawn to a canvas.\r\n\t * This does not account for whether it would be visible within the boundaries of the stage.\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method isVisible\r\n\t * @return {Boolean} Whether the display object would be visible if drawn to a canvas\r\n\t **/\r\n\tp.isVisible = function() {\r\n\t\tvar hasContent = this.cacheCanvas || (this.text != null && this.text !== \"\");\r\n\t\treturn !!(this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0 && hasContent);\r\n\t};\r\n\r\n\t/**\r\n\t * Draws the Text into the specified context ignoring its visible, alpha, shadow, and transform.\r\n\t * Returns true if the draw was handled (useful for overriding functionality).\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method draw\r\n\t * @param {CanvasRenderingContext2D} ctx The canvas 2D context object to draw into.\r\n\t * @param {Boolean} ignoreCache Indicates whether the draw operation should ignore any current cache.\r\n\t * For example, used for drawing the cache (to prevent it from simply drawing an existing cache back\r\n\t * into itself).\r\n\t **/\r\n\tp.draw = function(ctx, ignoreCache) {\r\n\t\tif (this.DisplayObject_draw(ctx, ignoreCache)) { return true; }\r\n\r\n\t\tvar col = this.color || \"#000\";\r\n\t\tif (this.outline) { ctx.strokeStyle = col; ctx.lineWidth = this.outline*1; }\r\n\t\telse { ctx.fillStyle = col; }\r\n\t\t\r\n\t\tthis._drawText(this._prepContext(ctx));\r\n\t\treturn true;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns the measured, untransformed width of the text without wrapping. Use getBounds for a more robust value.\r\n\t * @method getMeasuredWidth\r\n\t * @return {Number} The measured, untransformed width of the text.\r\n\t **/\r\n\tp.getMeasuredWidth = function() {\r\n\t\treturn this._getMeasuredWidth(this.text);\r\n\t};\r\n\r\n\t/**\r\n\t * Returns an approximate line height of the text, ignoring the lineHeight property. This is based on the measured\r\n\t * width of a \"M\" character multiplied by 1.2, which provides an approximate line height for most fonts.\r\n\t * @method getMeasuredLineHeight\r\n\t * @return {Number} an approximate line height of the text, ignoring the lineHeight property. This is\r\n\t * based on the measured width of a \"M\" character multiplied by 1.2, which approximates em for most fonts.\r\n\t **/\r\n\tp.getMeasuredLineHeight = function() {\r\n\t\treturn this._getMeasuredWidth(\"M\")*1.2;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns the approximate height of multi-line text by multiplying the number of lines against either the\r\n\t * lineHeight (if specified) or {{#crossLink \"Text/getMeasuredLineHeight\"}}{{/crossLink}}. Note that\r\n\t * this operation requires the text flowing logic to run, which has an associated CPU cost.\r\n\t * @method getMeasuredHeight\r\n\t * @return {Number} The approximate height of the untransformed multi-line text.\r\n\t **/\r\n\tp.getMeasuredHeight = function() {\r\n\t\treturn this._drawText(null,{}).height;\r\n\t};\r\n\r\n\t/**\r\n\t * Docced in superclass.\r\n\t */\r\n\tp.getBounds = function() {\r\n\t\tvar rect = this.DisplayObject_getBounds();\r\n\t\tif (rect) { return rect; }\r\n\t\tif (this.text == null || this.text === \"\") { return null; }\r\n\t\tvar o = this._drawText(null, {});\r\n\t\tvar w = (this.maxWidth && this.maxWidth < o.width) ? this.maxWidth : o.width;\r\n\t\tvar x = w * Text.H_OFFSETS[this.textAlign||\"left\"];\r\n\t\tvar lineHeight = this.lineHeight||this.getMeasuredLineHeight();\r\n\t\tvar y = lineHeight * Text.V_OFFSETS[this.textBaseline||\"top\"];\r\n\t\treturn this._rectangle.setValues(x, y, w, o.height);\r\n\t};\r\n\t\r\n\t/**\r\n\t * Returns an object with width, height, and lines properties. The width and height are the visual width and height\r\n\t * of the drawn text. The lines property contains an array of strings, one for\r\n\t * each line of text that will be drawn, accounting for line breaks and wrapping. These strings have trailing\r\n\t * whitespace removed.\r\n\t * @method getMetrics\r\n\t * @return {Object} An object with width, height, and lines properties.\r\n\t **/\r\n\tp.getMetrics = function() {\r\n\t\tvar o = {lines:[]};\r\n\t\to.lineHeight = this.lineHeight || this.getMeasuredLineHeight();\r\n\t\to.vOffset = o.lineHeight * Text.V_OFFSETS[this.textBaseline||\"top\"];\r\n\t\treturn this._drawText(null, o, o.lines);\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a clone of the Text instance.\r\n\t * @method clone\r\n\t * @return {Text} a clone of the Text instance.\r\n\t **/\r\n\tp.clone = function() {\r\n\t\treturn this._cloneProps(new Text(this.text, this.font, this.color));\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a string representation of this object.\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t **/\r\n\tp.toString = function() {\r\n\t\treturn \"[Text (text=\"+ (this.text.length > 20 ? this.text.substr(0, 17)+\"...\" : this.text) +\")]\";\r\n\t};\r\n\r\n\r\n// private methods:\r\n\t/**\r\n\t * @method _cloneProps\r\n\t * @param {Text} o\r\n\t * @protected\r\n\t * @return {Text} o\r\n\t **/\r\n\tp._cloneProps = function(o) {\r\n\t\tthis.DisplayObject__cloneProps(o);\r\n\t\to.textAlign = this.textAlign;\r\n\t\to.textBaseline = this.textBaseline;\r\n\t\to.maxWidth = this.maxWidth;\r\n\t\to.outline = this.outline;\r\n\t\to.lineHeight = this.lineHeight;\r\n\t\to.lineWidth = this.lineWidth;\r\n\t\treturn o;\r\n\t};\r\n\r\n\t/**\r\n\t * @method _getWorkingContext\r\n\t * @param {CanvasRenderingContext2D} ctx\r\n\t * @return {CanvasRenderingContext2D}\r\n\t * @protected\r\n\t **/\r\n\tp._prepContext = function(ctx) {\r\n\t\tctx.font = this.font||\"10px sans-serif\";\r\n\t\tctx.textAlign = this.textAlign||\"left\";\r\n\t\tctx.textBaseline = this.textBaseline||\"top\";\r\n\t\tctx.lineJoin = \"miter\";\r\n\t\tctx.miterLimit = 2.5;\r\n\t\treturn ctx;\r\n\t};\r\n\r\n\t/**\r\n\t * Draws multiline text.\r\n\t * @method _drawText\r\n\t * @param {CanvasRenderingContext2D} ctx\r\n\t * @param {Object} o\r\n\t * @param {Array} lines\r\n\t * @return {Object}\r\n\t * @protected\r\n\t **/\r\n\tp._drawText = function(ctx, o, lines) {\r\n\t\tvar paint = !!ctx;\r\n\t\tif (!paint) {\r\n\t\t\tctx = Text._workingContext;\r\n\t\t\tctx.save();\r\n\t\t\tthis._prepContext(ctx);\r\n\t\t}\r\n\t\tvar lineHeight = this.lineHeight||this.getMeasuredLineHeight();\r\n\t\t\r\n\t\tvar maxW = 0, count = 0;\r\n\t\tvar hardLines = String(this.text).split(/(?:\\r\\n|\\r|\\n)/);\r\n\t\tfor (var i=0, l=hardLines.length; i this.lineWidth) {\r\n\t\t\t\t// text wrapping:\r\n\t\t\t\tvar words = str.split(/(\\s)/);\r\n\t\t\t\tstr = words[0];\r\n\t\t\t\tw = ctx.measureText(str).width;\r\n\t\t\t\t\r\n\t\t\t\tfor (var j=1, jl=words.length; j this.lineWidth) {\r\n\t\t\t\t\t\tif (paint) { this._drawTextLine(ctx, str, count*lineHeight); }\r\n\t\t\t\t\t\tif (lines) { lines.push(str); }\r\n\t\t\t\t\t\tif (w > maxW) { maxW = w; }\r\n\t\t\t\t\t\tstr = words[j+1];\r\n\t\t\t\t\t\tw = ctx.measureText(str).width;\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tstr += words[j] + words[j+1];\r\n\t\t\t\t\t\tw += wordW;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (paint) { this._drawTextLine(ctx, str, count*lineHeight); }\r\n\t\t\tif (lines) { lines.push(str); }\r\n\t\t\tif (o && w == null) { w = ctx.measureText(str).width; }\r\n\t\t\tif (w > maxW) { maxW = w; }\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\t\r\n\t\tif (o) {\r\n\t\t\to.width = maxW;\r\n\t\t\to.height = count*lineHeight;\r\n\t\t}\r\n\t\tif (!paint) { ctx.restore(); }\r\n\t\treturn o;\r\n\t};\r\n\r\n\t/**\r\n\t * @method _drawTextLine\r\n\t * @param {CanvasRenderingContext2D} ctx\r\n\t * @param {String} text\r\n\t * @param {Number} y\r\n\t * @protected\r\n\t **/\r\n\tp._drawTextLine = function(ctx, text, y) {\r\n\t\t// Chrome 17 will fail to draw the text if the last param is included but null, so we feed it a large value instead:\r\n\t\tif (this.outline) { ctx.strokeText(text, 0, y, this.maxWidth||0xFFFF); }\r\n\t\telse { ctx.fillText(text, 0, y, this.maxWidth||0xFFFF); }\r\n\t};\r\n\t\r\n\t\r\n\t/**\r\n\t * @method _getMeasuredWidth\r\n\t * @param {String} text\r\n\t * @protected\r\n\t **/\r\n\tp._getMeasuredWidth = function(text) {\r\n\t\tvar ctx = Text._workingContext;\r\n\t\tctx.save();\r\n\t\tvar w = this._prepContext(ctx).measureText(text).width;\r\n\t\tctx.restore();\r\n\t\treturn w;\r\n\t};\r\n\r\n\r\n\tcreatejs.Text = createjs.promote(Text, \"DisplayObject\");\r\n}());\r\n\r\n//##############################################################################\r\n// BitmapText.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * Displays text using bitmap glyphs defined in a sprite sheet. Multi-line text is supported using new line characters,\r\n\t * but automatic wrapping is not supported. See the {{#crossLink \"BitmapText/spriteSheet:property\"}}{{/crossLink}}\r\n\t * property for more information on defining glyphs.\r\n\t *\r\n\t * Important: While BitmapText extends Container, it is not designed to be used as one.\r\n\t * As such, methods like addChild and removeChild are disabled.\r\n\t *\r\n\t *\r\n\t * @class BitmapText\r\n\t * @extends DisplayObject\r\n\t * @param {String} [text=\"\"] The text to display.\r\n\t * @param {SpriteSheet} [spriteSheet=null] The spritesheet that defines the character glyphs.\r\n\t * @constructor\r\n\t **/\r\n\tfunction BitmapText(text, spriteSheet) {\r\n\t\tthis.Container_constructor();\r\n\t\t\r\n\t\t\r\n\t// public properties:\r\n\t\t/**\r\n\t\t * The text to display.\r\n\t\t * @property text\r\n\t\t * @type String\r\n\t\t * @default \"\"\r\n\t\t **/\r\n\t\tthis.text = text||\"\";\r\n\t\t\r\n\t\t/**\r\n\t\t * A SpriteSheet instance that defines the glyphs for this bitmap text. Each glyph/character\r\n\t\t * should have a single frame animation defined in the sprite sheet named the same as\r\n\t\t * corresponding character. For example, the following animation definition:\r\n\t\t *\r\n\t\t * \t\t\"A\": {frames: [0]}\r\n\t\t *\r\n\t\t * would indicate that the frame at index 0 of the spritesheet should be drawn for the \"A\" character. The short form\r\n\t\t * is also acceptable:\r\n\t\t * \r\n\t\t * \t\t\"A\": 0\r\n\t\t *\r\n\t\t * Note that if a character in the text is not found in the sprite sheet, it will also\r\n\t\t * try to use the alternate case (upper or lower).\r\n\t\t *\r\n\t\t * See SpriteSheet for more information on defining sprite sheet data.\r\n\t\t * @property spriteSheet\r\n\t\t * @type SpriteSheet\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis.spriteSheet = spriteSheet;\r\n\t\r\n\t\t/**\r\n\t\t * The height of each line of text. If 0, then it will use a line height calculated\r\n\t\t * by checking for the height of the \"1\", \"T\", or \"L\" character (in that order). If\r\n\t\t * those characters are not defined, it will use the height of the first frame of the\r\n\t\t * sprite sheet.\r\n\t\t * @property lineHeight\r\n\t\t * @type Number\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis.lineHeight = 0;\r\n\t\r\n\t\t/**\r\n\t\t * This spacing (in pixels) will be added after each character in the output.\r\n\t\t * @property letterSpacing\r\n\t\t * @type Number\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis.letterSpacing = 0;\r\n\t\r\n\t\t/**\r\n\t\t * If a space character is not defined in the sprite sheet, then empty pixels equal to\r\n\t\t * spaceWidth will be inserted instead. If 0, then it will use a value calculated\r\n\t\t * by checking for the width of the \"1\", \"l\", \"E\", or \"A\" character (in that order). If\r\n\t\t * those characters are not defined, it will use the width of the first frame of the\r\n\t\t * sprite sheet.\r\n\t\t * @property spaceWidth\r\n\t\t * @type Number\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis.spaceWidth = 0;\r\n\t\t\r\n\t\t\r\n\t// private properties:\r\n\t \t/**\r\n\t\t * @property _oldProps\r\n\t\t * @type Object\r\n\t\t * @protected\r\n\t\t **/\r\n\t\tthis._oldProps = {text:0,spriteSheet:0,lineHeight:0,letterSpacing:0,spaceWidth:0};\r\n\r\n\t\t/**\r\n\t\t * Used to track the object which this class attached listeners to, helps optimize listener attachment.\r\n\t\t * @property _oldStage\r\n\t\t * @type Stage\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._oldStage = null;\r\n\t\t/**\r\n\t\t * The event listener proxy triggered drawing draw for special circumstances.\r\n\t\t * @property _drawAction\r\n\t\t * @type function\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._drawAction = null;\r\n\t}\r\n\tvar p = createjs.extend(BitmapText, createjs.Container);\r\n\r\n// static properties:\r\n\t/**\r\n\t * BitmapText uses Sprite instances to draw text. To reduce the creation and destruction of instances (and thus garbage collection), it maintains\r\n\t * an internal object pool of sprite instances to reuse. Increasing this value can cause more sprites to be\r\n\t * retained, slightly increasing memory use, but reducing instantiation.\r\n\t * @property maxPoolSize\r\n\t * @type Number\r\n\t * @static\r\n\t * @default 100\r\n\t **/\r\n\tBitmapText.maxPoolSize = 100;\r\n\t\r\n\t/**\r\n\t * Sprite object pool.\r\n\t * @type {Array}\r\n\t * @static\r\n\t * @private\r\n\t */\r\n\tBitmapText._spritePool = [];\r\n\r\n\t\r\n// public methods:\r\n\t/**\r\n\t * Docced in superclass.\r\n\t **/\r\n\tp.draw = function(ctx, ignoreCache) {\r\n\t\tif (this.DisplayObject_draw(ctx, ignoreCache)) { return; }\r\n\t\tthis._updateState();\r\n\t\tthis.Container_draw(ctx, ignoreCache);\r\n\t};\r\n\t\r\n\t/**\r\n\t * Docced in superclass.\r\n\t **/\r\n\tp.getBounds = function() {\r\n\t\tthis._updateText();\r\n\t\treturn this.Container_getBounds();\r\n\t};\r\n\t\r\n\t/**\r\n\t * Returns true or false indicating whether the display object would be visible if drawn to a canvas.\r\n\t * This does not account for whether it would be visible within the boundaries of the stage.\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method isVisible\r\n\t * @return {Boolean} Boolean indicating whether the display object would be visible if drawn to a canvas\r\n\t **/\r\n\tp.isVisible = function() {\r\n\t\tvar hasContent = this.cacheCanvas || (this.spriteSheet && this.spriteSheet.complete && this.text);\r\n\t\treturn !!(this.visible && this.alpha > 0 && this.scaleX !== 0 && this.scaleY !== 0 && hasContent);\r\n\t};\r\n\t\r\n\tp.clone = function() {\r\n\t\treturn this._cloneProps(new BitmapText(this.text, this.spriteSheet));\r\n\t};\r\n\t\r\n\t/**\r\n\t * Disabled in BitmapText.\r\n\t * @method addChild\r\n\t **/\r\n\t/**\r\n\t * Disabled in BitmapText.\r\n\t * @method addChildAt\r\n\t **/\r\n\t/**\r\n\t * Disabled in BitmapText.\r\n\t * @method removeChild\r\n\t **/\r\n\t/**\r\n\t * Disabled in BitmapText.\r\n\t * @method removeChildAt\r\n\t **/\r\n\t/**\r\n\t * Disabled in BitmapText.\r\n\t * @method removeAllChildren\r\n\t **/\r\n\tp.addChild = p.addChildAt = p.removeChild = p.removeChildAt = p.removeAllChildren = function() {};\r\n\r\n\r\n// private methods:\r\n\t/**\r\n\t * Docced in superclass.\r\n\t **/\r\n\tp._updateState = function() {\r\n\t\tthis._updateText();\r\n\t};\r\n\r\n \t/**\r\n\t * @method _cloneProps\r\n\t * @param {BitmapText} o\r\n\t * @return {BitmapText} o\r\n\t * @protected\r\n\t **/\r\n\tp._cloneProps = function(o) {\r\n\t\tthis.Container__cloneProps(o);\r\n\t\to.lineHeight = this.lineHeight;\r\n\t\to.letterSpacing = this.letterSpacing;\r\n\t\to.spaceWidth = this.spaceWidth;\r\n\t\treturn o;\r\n\t};\r\n\t\r\n\t/**\r\n\t * @method _getFrameIndex\r\n\t * @param {String} character\r\n\t * @param {SpriteSheet} spriteSheet\r\n\t * @return {Number}\r\n\t * @protected\r\n\t **/\r\n\tp._getFrameIndex = function(character, spriteSheet) {\r\n\t\tvar c, o = spriteSheet.getAnimation(character);\r\n\t\tif (!o) {\r\n\t\t\t(character != (c = character.toUpperCase())) || (character != (c = character.toLowerCase())) || (c=null);\r\n\t\t\tif (c) { o = spriteSheet.getAnimation(c); }\r\n\t\t}\r\n\t\treturn o && o.frames[0];\r\n\t};\r\n\t\r\n\t/**\r\n\t * @method _getFrame\r\n\t * @param {String} character\r\n\t * @param {SpriteSheet} spriteSheet\r\n\t * @return {Object}\r\n\t * @protected\r\n\t **/\r\n\tp._getFrame = function(character, spriteSheet) {\r\n\t\tvar index = this._getFrameIndex(character, spriteSheet);\r\n\t\treturn index == null ? index : spriteSheet.getFrame(index);\r\n\t};\r\n\r\n\t/**\r\n\t * @method _getLineHeight\r\n\t * @param {SpriteSheet} ss\r\n\t * @return {Number}\r\n\t * @protected\r\n\t **/\r\n\tp._getLineHeight = function(ss) {\r\n\t\tvar frame = this._getFrame(\"1\",ss) || this._getFrame(\"T\",ss) || this._getFrame(\"L\",ss) || ss.getFrame(0);\r\n\t\treturn frame ? frame.rect.height : 1;\r\n\t};\r\n\r\n\t/**\r\n\t * @method _getSpaceWidth\r\n\t * @param {SpriteSheet} ss\r\n\t * @return {Number}\r\n\t * @protected\r\n\t **/\r\n\tp._getSpaceWidth = function(ss) {\r\n\t\tvar frame = this._getFrame(\"1\",ss) || this._getFrame(\"l\",ss) || this._getFrame(\"e\",ss) || this._getFrame(\"a\",ss) || ss.getFrame(0);\r\n\t\treturn frame ? frame.rect.width : 1;\r\n\t};\r\n\r\n\t/**\r\n\t * @method _updateText\r\n\t * @protected\r\n\t **/\r\n\tp._updateText = function() {\r\n\t\tvar x=0, y=0, o=this._oldProps, change=false, spaceW=this.spaceWidth, lineH=this.lineHeight, ss=this.spriteSheet;\r\n\t\tvar pool=BitmapText._spritePool, kids=this.children, childIndex=0, numKids=kids.length, sprite;\r\n\t\t\r\n\t\tfor (var n in o) {\r\n\t\t\tif (o[n] != this[n]) {\r\n\t\t\t\to[n] = this[n];\r\n\t\t\t\tchange = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!change) { return; }\r\n\t\t\r\n\t\tvar hasSpace = !!this._getFrame(\" \", ss);\r\n\t\tif (!hasSpace && !spaceW) { spaceW = this._getSpaceWidth(ss); }\r\n\t\tif (!lineH) { lineH = this._getLineHeight(ss); }\r\n\t\t\r\n\t\tfor(var i=0, l=this.text.length; i childIndex) {\r\n\t\t\t // faster than removeChild.\r\n\t\t\tpool.push(sprite = kids.pop());\r\n\t\t\tsprite.parent = null;\r\n\t\t\tnumKids--;\r\n\t\t}\r\n\t\tif (pool.length > BitmapText.maxPoolSize) { pool.length = BitmapText.maxPoolSize; }\r\n\t};\r\n\r\n\r\n\tcreatejs.BitmapText = createjs.promote(BitmapText, \"Container\");\r\n}());\r\n\r\n//##############################################################################\r\n// MovieClip.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * The MovieClip class associates a TweenJS Timeline with an EaselJS {{#crossLink \"Container\"}}{{/crossLink}}. It allows\r\n\t * you to create objects which encapsulate timeline animations, state changes, and synched actions. The MovieClip\r\n\t * class has been included in the EaselJS minified file since 0.7.0.\r\n\t *\r\n\t * Currently MovieClip only works properly if it is tick based (as opposed to time based) though some concessions have\r\n\t * been made to support time-based timelines in the future.\r\n\t *\r\n\t *

    Example

    \r\n\t * This example animates two shapes back and forth. The grey shape starts on the left, but we jump to a mid-point in\r\n\t * the animation using {{#crossLink \"MovieClip/gotoAndPlay\"}}{{/crossLink}}.\r\n\t *\r\n\t * var stage = new createjs.Stage(\"canvas\");\r\n\t * createjs.Ticker.addEventListener(\"tick\", stage);\r\n\t *\r\n\t * var mc = new createjs.MovieClip({loop:-1, labels:{myLabel:20}});\r\n\t * stage.addChild(mc);\r\n\t *\r\n\t * var child1 = new createjs.Shape(\r\n\t * new createjs.Graphics().beginFill(\"#999999\")\r\n\t * .drawCircle(30,30,30));\r\n\t * var child2 = new createjs.Shape(\r\n\t * new createjs.Graphics().beginFill(\"#5a9cfb\")\r\n\t * .drawCircle(30,30,30));\r\n\t *\r\n\t * mc.timeline.addTween(\r\n\t * createjs.Tween.get(child1)\r\n\t * .to({x:0}).to({x:60}, 50).to({x:0}, 50));\r\n\t * mc.timeline.addTween(\r\n\t * createjs.Tween.get(child2)\r\n\t * .to({x:60}).to({x:0}, 50).to({x:60}, 50));\r\n\t *\r\n\t * mc.gotoAndPlay(\"start\");\r\n\t *\r\n\t * It is recommended to use tween.to() to animate and set properties (use no duration to have it set\r\n\t * immediately), and the tween.wait() method to create delays between animations. Note that using the\r\n\t * tween.set() method to affect properties will likely not provide the desired result.\r\n\t *\r\n\t * @class MovieClip\r\n\t * @main MovieClip\r\n\t * @param {Object} [props] The configuration properties to apply to this instance (ex. `{mode:MovieClip.SYNCHED}`).\r\n\t * Supported props for the MovieClip are listed below. These props are set on the corresponding instance properties except where\r\n\t * specified.
      \r\n\t *
    • `mode`
    • \r\n\t *
    • `startPosition`
    • \r\n\t *
    • `frameBounds`
    • \r\n\t *
    \r\n\t * \r\n\t * This object will also be passed into the Timeline instance associated with this MovieClip. See the documentation\r\n\t * for Timeline for a list of supported props (ex. `paused`, `labels`, `loop`, `reversed`, etc.)\r\n\t * @extends Container\r\n\t * @constructor\r\n\t **/\r\n\tfunction MovieClip(props) {\r\n\t\tthis.Container_constructor();\r\n\t\t!MovieClip.inited&&MovieClip.init(); // static init\r\n\t\t\r\n\t\tvar mode, startPosition, loop, labels;\r\n\t\t\r\n\t\t// handle old params (mode, startPosition, loop, labels):\r\n\t\t// TODO: deprecated param handling:\r\n\t\tif (props instanceof String || arguments.length > 1) {\r\n\t\t\tmode = props;\r\n\t\t\tstartPosition = arguments[1];\r\n\t\t\tloop = arguments[2];\r\n\t\t\tlabels = arguments[3];\r\n\t\t\tif (loop == null) { loop = -1; }\r\n\t\t\tprops = null;\r\n\t\t} else if (props) {\r\n\t\t\tmode = props.mode;\r\n\t\t\tstartPosition = props.startPosition;\r\n\t\t\tloop = props.loop;\r\n\t\t\tlabels = props.labels;\r\n\t\t}\r\n\t\tif (!props) { props = {labels:labels}; }\r\n\t\t\r\n\t\t\r\n\t// public properties:\r\n\t\t/**\r\n\t\t * Controls how this MovieClip advances its time. Must be one of 0 (INDEPENDENT), 1 (SINGLE_FRAME), or 2 (SYNCHED).\r\n\t\t * See each constant for a description of the behaviour.\r\n\t\t * @property mode\r\n\t\t * @type String\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis.mode = mode||MovieClip.INDEPENDENT;\r\n\t\r\n\t\t/**\r\n\t\t * Specifies what the first frame to play in this movieclip, or the only frame to display if mode is SINGLE_FRAME.\r\n\t\t * @property startPosition\r\n\t\t * @type Number\r\n\t\t * @default 0\r\n\t\t */\r\n\t\tthis.startPosition = startPosition||0;\r\n\t\r\n\t\t/**\r\n\t\t * Specifies how many times this MovieClip should loop. A value of -1 indicates it should loop indefinitely. A value of\r\n\t\t * 1 would cause it to loop once (ie. play a total of twice).\r\n\t\t * @property loop\r\n\t\t * @type Number\r\n\t\t * @default -1\r\n\t\t */\r\n\t\tthis.loop = loop === true ? -1 : (loop || 0);\r\n\t\r\n\t\t/**\r\n\t\t * The current frame of the movieclip.\r\n\t\t * @property currentFrame\r\n\t\t * @type Number\r\n\t\t * @default 0\r\n\t\t * @readonly\r\n\t\t */\r\n\t\tthis.currentFrame = 0;\r\n\t\r\n\t\t/**\r\n\t\t * If true, the MovieClip's position will not advance when ticked.\r\n\t\t * @property paused\r\n\t\t * @type Boolean\r\n\t\t * @default false\r\n\t\t */\r\n\t\tthis.paused = props.paused||false;\r\n\t\r\n\t\t/**\r\n\t\t * If true, actions in this MovieClip's tweens will be run when the playhead advances.\r\n\t\t * @property actionsEnabled\r\n\t\t * @type Boolean\r\n\t\t * @default true\r\n\t\t */\r\n\t\tthis.actionsEnabled = true;\r\n\t\r\n\t\t/**\r\n\t\t * If true, the MovieClip will automatically be reset to its first frame whenever the timeline adds\r\n\t\t * it back onto the display list. This only applies to MovieClip instances with mode=INDEPENDENT.\r\n\t\t *

    \r\n\t\t * For example, if you had a character animation with a \"body\" child MovieClip instance\r\n\t\t * with different costumes on each frame, you could set body.autoReset = false, so that\r\n\t\t * you can manually change the frame it is on, without worrying that it will be reset\r\n\t\t * automatically.\r\n\t\t * @property autoReset\r\n\t\t * @type Boolean\r\n\t\t * @default true\r\n\t\t */\r\n\t\tthis.autoReset = true;\r\n\t\t\r\n\t\t/**\r\n\t\t * An array of bounds for each frame in the MovieClip. This is mainly intended for tool output.\r\n\t\t * @property frameBounds\r\n\t\t * @type Array\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.frameBounds = this.frameBounds||props.frameBounds; // frameBounds are set on the prototype in Animate.\r\n\t\t\r\n\t\t/**\r\n\t\t * By default MovieClip instances advance one frame per tick. Specifying a framerate for the MovieClip\r\n\t\t * will cause it to advance based on elapsed time between ticks as appropriate to maintain the target\r\n\t\t * framerate.\r\n\t\t *\r\n\t\t * For example, if a MovieClip with a framerate of 10 is placed on a Stage being updated at 40fps, then the MovieClip will\r\n\t\t * advance roughly one frame every 4 ticks. This will not be exact, because the time between each tick will\r\n\t\t * vary slightly between frames.\r\n\t\t *\r\n\t\t * This feature is dependent on the tick event object (or an object with an appropriate \"delta\" property) being\r\n\t\t * passed into {{#crossLink \"Stage/update\"}}{{/crossLink}}.\r\n\t\t * @property framerate\r\n\t\t * @type {Number}\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis.framerate = null;\r\n\t\t\r\n\t\t// set up the needed props for Timeline:\r\n\t\tprops.useTicks = props.paused = true;\r\n\t\t\r\n\t\t/**\r\n\t\t * The TweenJS Timeline that is associated with this MovieClip. This is created automatically when the MovieClip\r\n\t\t * instance is initialized. Animations are created by adding TweenJS Tween\r\n\t\t * instances to the timeline.\r\n\t\t *\r\n\t\t *

    Example

    \r\n\t\t *\r\n\t\t * var tween = createjs.Tween.get(target).to({x:0}).to({x:100}, 30);\r\n\t\t * var mc = new createjs.MovieClip();\r\n\t\t * mc.timeline.addTween(tween);\r\n\t\t *\r\n\t\t * Elements can be added and removed from the timeline by toggling an \"_off\" property\r\n\t\t * using the tweenInstance.to() method. Note that using Tween.set is not recommended to\r\n\t\t * create MovieClip animations. The following example will toggle the target off on frame 0, and then back on for\r\n\t\t * frame 1. You can use the \"visible\" property to achieve the same effect.\r\n\t\t *\r\n\t\t * var tween = createjs.Tween.get(target).to({_off:false})\r\n\t\t * .wait(1).to({_off:true})\r\n\t\t * .wait(1).to({_off:false});\r\n\t\t *\r\n\t\t * @property timeline\r\n\t\t * @type Timeline\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.timeline = new createjs.Timeline(props);\r\n\t\t\r\n\t\t\r\n\t// private properties:\r\n\t\t/**\r\n\t\t * @property _synchOffset\r\n\t\t * @type Number\r\n\t\t * @default 0\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._synchOffset = 0;\r\n\t\r\n\t\t/**\r\n\t\t * @property _rawPosition\r\n\t\t * @type Number\r\n\t\t * @default -1\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._rawPosition = -1; // TODO: evaluate using a ._reset Boolean prop instead of -1.\r\n\t\t\r\n\t\t/**\r\n\t\t * @property _bound_resolveState\r\n\t\t * @type Function\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._bound_resolveState = this._resolveState.bind(this);\r\n\t\r\n\t\r\n\t\t/**\r\n\t\t * The time remaining from the previous tick, only applicable when .framerate is set.\r\n\t\t * @property _t\r\n\t\t * @type Number\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._t = 0;\r\n\t\r\n\t\t/**\r\n\t\t * List of display objects that are actively being managed by the MovieClip.\r\n\t\t * @property _managed\r\n\t\t * @type Object\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._managed = {};\r\n\t}\r\n\tvar p = createjs.extend(MovieClip, createjs.Container);\r\n\r\n\r\n// constants:\r\n\t/**\r\n\t * The MovieClip will advance independently of its parent, even if its parent is paused.\r\n\t * This is the default mode.\r\n\t * @property INDEPENDENT\r\n\t * @static\r\n\t * @type String\r\n\t * @default \"independent\"\r\n\t * @readonly\r\n\t **/\r\n\tMovieClip.INDEPENDENT = \"independent\";\r\n\r\n\t/**\r\n\t * The MovieClip will only display a single frame (as determined by the startPosition property).\r\n\t * @property SINGLE_FRAME\r\n\t * @static\r\n\t * @type String\r\n\t * @default \"single\"\r\n\t * @readonly\r\n\t **/\r\n\tMovieClip.SINGLE_FRAME = \"single\";\r\n\r\n\t/**\r\n\t * The MovieClip will be advanced only when its parent advances and will be synched to the position of\r\n\t * the parent MovieClip.\r\n\t * @property SYNCHED\r\n\t * @static\r\n\t * @type String\r\n\t * @default \"synched\"\r\n\t * @readonly\r\n\t **/\r\n\tMovieClip.SYNCHED = \"synched\";\r\n\t\r\n\t\r\n// static properties:\r\n\tMovieClip.inited = false;\r\n\t\r\n\t\r\n// static methods:\r\n\tMovieClip.init = function() {\r\n\t\tif (MovieClip.inited) { return; }\r\n\t\t// plugins introduce some overhead to Tween, so we only install this if an MC is instantiated.\r\n\t\tMovieClipPlugin.install();\r\n\t\tMovieClip.inited = true;\r\n\t};\r\n\t\r\n\t\r\n// getter / setters:\r\n\t/**\r\n\t * Use the {{#crossLink \"MovieClip/labels:property\"}}{{/crossLink}} property instead.\r\n\t * @method _getLabels\r\n\t * @protected\r\n\t * @return {Array}\r\n\t **/\r\n\tp._getLabels = function() {\r\n\t\treturn this.timeline.getLabels();\r\n\t};\r\n\t// MovieClip.getLabels is @deprecated. Remove for 1.1+\r\n\tp.getLabels = createjs.deprecate(p._getLabels, \"MovieClip.getLabels\");\r\n\r\n\t/**\r\n\t * Use the {{#crossLink \"MovieClip/currentLabel:property\"}}{{/crossLink}} property instead.\r\n\t * @method _getCurrentLabel\r\n\t * @protected\r\n\t * @return {String}\r\n\t **/\r\n\tp._getCurrentLabel = function() {\r\n\t\treturn this.timeline.currentLabel;\r\n\t};\r\n\t// MovieClip.getCurrentLabel is @deprecated. Remove for 1.1+\r\n\tp.getCurrentLabel = createjs.deprecate(p._getCurrentLabel, \"MovieClip.getCurrentLabel\");\r\n\r\n\t/**\r\n\t * Use the {{#crossLink \"MovieClip/duration:property\"}}{{/crossLink}} property instead.\r\n\t * @method _getDuration\r\n\t * @protected\r\n\t * @return {Number}\r\n\t **/\r\n\tp._getDuration = function() {\r\n\t\treturn this.timeline.duration;\r\n\t};\r\n\t// MovieClip.getDuration is @deprecated. Remove for 1.1+\r\n\tp.getDuration = createjs.deprecate(p._getDuration, \"MovieClip.getDuration\");\r\n\r\n\t/**\r\n\t * Returns an array of objects with label and position (aka frame) properties, sorted by position.\r\n\t * @property labels\r\n\t * @type {Array}\r\n\t * @readonly\r\n\t **/\r\n\t\r\n\t/**\r\n\t * Returns the name of the label on or immediately before the current frame.\r\n\t * @property currentLabel\r\n\t * @type {String}\r\n\t * @readonly\r\n\t **/\r\n\t\r\n\t/**\r\n\t * Returns the duration of this MovieClip in seconds or ticks.\r\n\t * @property totalFrames\r\n\t * @type {Number}\r\n\t * @readonly\r\n\t **/\r\n\t\r\n\t/**\r\n\t * Returns the duration of this MovieClip in seconds or ticks.\r\n\t * @property duration\r\n\t * @type {Number}\r\n\t * @readonly\r\n\t **/\r\n\ttry {\r\n\t\tObject.defineProperties(p, {\r\n\t\t\tlabels: { get: p._getLabels },\r\n\t\t\tcurrentLabel: { get: p._getCurrentLabel },\r\n\t\t\ttotalFrames: { get: p._getDuration },\r\n\t\t\tduration: { get: p._getDuration }\r\n\t\t\t// TODO: can we just proxy .currentFrame to tl.position as well? Ditto for .loop (or just remove entirely).\r\n\t\t});\r\n\t} catch (e) {}\r\n\r\n\r\n// public methods:\r\n\t/**\r\n\t * Constructor alias for backwards compatibility. This method will be removed in future versions.\r\n\t * Subclasses should be updated to use {{#crossLink \"Utility Methods/extends\"}}{{/crossLink}}.\r\n\t * @method initialize\r\n\t * @deprecated in favour of `createjs.promote()`\r\n\t **/\r\n\tp.initialize = MovieClip; // TODO: Deprecated. This is for backwards support of Adobe Flash/Animate\r\n\r\n\t/**\r\n\t * Returns true or false indicating whether the display object would be visible if drawn to a canvas.\r\n\t * This does not account for whether it would be visible within the boundaries of the stage.\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method isVisible\r\n\t * @return {Boolean} Boolean indicating whether the display object would be visible if drawn to a canvas\r\n\t **/\r\n\tp.isVisible = function() {\r\n\t\t// children are placed in draw, so we can't determine if we have content.\r\n\t\treturn !!(this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0);\r\n\t};\r\n\r\n\t/**\r\n\t * Draws the display object into the specified context ignoring its visible, alpha, shadow, and transform.\r\n\t * Returns true if the draw was handled (useful for overriding functionality).\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method draw\r\n\t * @param {CanvasRenderingContext2D} ctx The canvas 2D context object to draw into.\r\n\t * @param {Boolean} ignoreCache Indicates whether the draw operation should ignore any current cache.\r\n\t * For example, used for drawing the cache (to prevent it from simply drawing an existing cache back\r\n\t * into itself).\r\n\t **/\r\n\tp.draw = function(ctx, ignoreCache) {\r\n\t\t// draw to cache first:\r\n\t\tif (this.DisplayObject_draw(ctx, ignoreCache)) { return true; }\r\n\t\tthis._updateState();\r\n\t\tthis.Container_draw(ctx, ignoreCache);\r\n\t\treturn true;\r\n\t};\r\n\r\n\t/**\r\n\t * Sets paused to false.\r\n\t * @method play\r\n\t **/\r\n\tp.play = function() {\r\n\t\tthis.paused = false;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Sets paused to true.\r\n\t * @method stop\r\n\t **/\r\n\tp.stop = function() {\r\n\t\tthis.paused = true;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Advances this movie clip to the specified position or label and sets paused to false.\r\n\t * @method gotoAndPlay\r\n\t * @param {String|Number} positionOrLabel The animation name or frame number to go to.\r\n\t **/\r\n\tp.gotoAndPlay = function(positionOrLabel) {\r\n\t\tthis.paused = false;\r\n\t\tthis._goto(positionOrLabel);\r\n\t};\r\n\t\r\n\t/**\r\n\t * Advances this movie clip to the specified position or label and sets paused to true.\r\n\t * @method gotoAndStop\r\n\t * @param {String|Number} positionOrLabel The animation or frame name to go to.\r\n\t **/\r\n\tp.gotoAndStop = function(positionOrLabel) {\r\n\t\tthis.paused = true;\r\n\t\tthis._goto(positionOrLabel);\r\n\t};\r\n\t\r\n\t/**\r\n\t * Advances the playhead. This occurs automatically each tick by default.\r\n\t * @param [time] {Number} The amount of time in ms to advance by. Only applicable if framerate is set.\r\n\t * @method advance\r\n\t*/\r\n\tp.advance = function(time) {\r\n\t\tvar independent = MovieClip.INDEPENDENT;\r\n\t\tif (this.mode !== independent) { return; } // update happens in draw for synched clips\r\n\t\t\r\n\t\t// if this MC doesn't have a framerate, hunt ancestors for one:\r\n\t\tvar o=this, fps = o.framerate;\r\n\t\twhile ((o = o.parent) && fps === null) { if (o.mode === independent) { fps = o._framerate; } }\r\n\t\tthis._framerate = fps;\r\n\t\t\r\n\t\tif (this.paused) { return; }\r\n\t\t\r\n\t\t// calculate how many frames to advance:\r\n\t\tvar t = (fps !== null && fps !== -1 && time !== null) ? time/(1000/fps) + this._t : 1;\r\n\t\tvar frames = t|0;\r\n\t\tthis._t = t-frames; // leftover time, save to add to next advance.\r\n\t\t\r\n\t\twhile (frames--) { this._updateTimeline(this._rawPosition+1, false); }\r\n\t};\r\n\t\r\n\t/**\r\n\t * MovieClip instances cannot be cloned.\r\n\t * @method clone\r\n\t **/\r\n\tp.clone = function() {\r\n\t\t// TODO: add support for this? Need to clone the Timeline & retarget tweens - pretty complex.\r\n\t\tthrow(\"MovieClip cannot be cloned.\");\r\n\t};\r\n\t\r\n\t/**\r\n\t * Returns a string representation of this object.\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t **/\r\n\tp.toString = function() {\r\n\t\treturn \"[MovieClip (name=\"+ this.name +\")]\";\r\n\t};\r\n\r\n\r\n// private methods:\r\n\t/**\r\n\t * Docced in superclass.\r\n\t **/\r\n\tp._updateState = function() {\r\n\t\tif (this._rawPosition === -1 || this.mode !== MovieClip.INDEPENDENT) { this._updateTimeline(-1); }\r\n\t};\r\n\r\n\t/**\r\n\t * @method _tick\r\n\t * @param {Object} evtObj An event object that will be dispatched to all tick listeners. This object is reused between dispatchers to reduce construction & GC costs.\r\n\t * function.\r\n\t * @protected\r\n\t **/\r\n\tp._tick = function(evtObj) {\r\n\t\tthis.advance(evtObj&&evtObj.delta);\r\n\t\tthis.Container__tick(evtObj);\r\n\t};\r\n\t\r\n\t/**\r\n\t * @method _goto\r\n\t * @param {String|Number} positionOrLabel The animation name or frame number to go to.\r\n\t * @protected\r\n\t **/\r\n\tp._goto = function(positionOrLabel) {\r\n\t\tvar pos = this.timeline.resolve(positionOrLabel);\r\n\t\tif (pos == null) { return; }\r\n\t\tthis._t = 0;\r\n\t\tthis._updateTimeline(pos, true);\r\n\t};\r\n\t\r\n\t/**\r\n\t * @method _reset\r\n\t * @private\r\n\t **/\r\n\tp._reset = function() {\r\n\t\tthis._rawPosition = -1;\r\n\t\tthis._t = this.currentFrame = 0;\r\n\t\tthis.paused = false;\r\n\t};\r\n\t\r\n\t/**\r\n\t * @method _updateTimeline\r\n\t * @param {Boolean} jump Indicates whether this update is due to jumping (via gotoAndXX) to a new position.\r\n\t * @protected\r\n\t **/\r\n\tp._updateTimeline = function(rawPosition, jump) {\r\n\t\tvar synced = this.mode !== MovieClip.INDEPENDENT, tl = this.timeline;\r\n\t\tif (synced) { rawPosition = this.startPosition + (this.mode===MovieClip.SINGLE_FRAME?0:this._synchOffset); }\r\n\t\tif (rawPosition < 0) { rawPosition = 0; }\r\n\t\tif (this._rawPosition === rawPosition && !synced) { return; }\r\n\t\tthis._rawPosition = rawPosition;\r\n\t\t\r\n\t\t// update timeline position, ignoring actions if this is a graphic.\r\n\t\ttl.loop = this.loop; // TODO: should we maintain this on MovieClip, or just have it on timeline?\r\n\t\ttl.setPosition(rawPosition, synced || !this.actionsEnabled, jump, this._bound_resolveState);\r\n\t};\r\n\t\r\n\t/**\r\n\t * Renders position 0 without running actions or updating _rawPosition.\r\n\t * Primarily used by Animate CC to build out the first frame in the constructor of MC symbols.\r\n\t * NOTE: not tested when run after the MC advances past the first frame.\r\n\t * @method _renderFirstFrame\r\n\t * @protected\r\n\t **/\r\n\tp._renderFirstFrame = function() {\r\n\t\tvar tl = this.timeline, pos = tl.rawPosition;\r\n\t\ttl.setPosition(0, true, true, this._bound_resolveState);\r\n\t\ttl.rawPosition = pos;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Runs via a callback after timeline property updates and before actions.\r\n\t * @method _resolveState\r\n\t * @protected\r\n\t **/\r\n\tp._resolveState = function() {\r\n\t\tvar tl = this.timeline;\r\n\t\tthis.currentFrame = tl.position;\r\n\t\t\r\n\t\tfor (var n in this._managed) { this._managed[n] = 1; }\r\n\r\n\t\tvar tweens = tl.tweens;\r\n\t\tfor (var i=0, l=tweens.length; i=0; i--) {\r\n\t\t\tvar id = kids[i].id;\r\n\t\t\tif (this._managed[id] === 1) {\r\n\t\t\t\tthis.removeChildAt(i);\r\n\t\t\t\tdelete(this._managed[id]);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * @method _setState\r\n\t * @param {Array} state\r\n\t * @param {Number} offset\r\n\t * @protected\r\n\t **/\r\n\tp._setState = function(state, offset) {\r\n\t\tif (!state) { return; }\r\n\t\tfor (var i=state.length-1;i>=0;i--) {\r\n\t\t\tvar o = state[i];\r\n\t\t\tvar target = o.t;\r\n\t\t\tvar props = o.p;\r\n\t\t\tfor (var n in props) { target[n] = props[n]; }\r\n\t\t\tthis._addManagedChild(target, offset);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Adds a child to the timeline, and sets it up as a managed child.\r\n\t * @method _addManagedChild\r\n\t * @param {MovieClip} child The child MovieClip to manage\r\n\t * @param {Number} offset\r\n\t * @private\r\n\t **/\r\n\tp._addManagedChild = function(child, offset) {\r\n\t\tif (child._off) { return; }\r\n\t\tthis.addChildAt(child,0);\r\n\r\n\t\tif (child instanceof MovieClip) {\r\n\t\t\tchild._synchOffset = offset;\r\n\t\t\t// TODO: this does not precisely match Adobe Flash/Animate, which loses track of the clip if it is renamed or removed from the timeline, which causes it to reset.\r\n\t\t\t// TODO: should also reset when MovieClip loops, though that will be a bit tricky to detect.\r\n\t\t\tif (child.mode === MovieClip.INDEPENDENT && child.autoReset && (!this._managed[child.id])) { child._reset(); }\r\n\t\t}\r\n\t\tthis._managed[child.id] = 2;\r\n\t};\r\n\t\r\n\t/**\r\n\t * @method _getBounds\r\n\t * @param {Matrix2D} matrix\r\n\t * @param {Boolean} ignoreTransform\r\n\t * @return {Rectangle}\r\n\t * @protected\r\n\t **/\r\n\tp._getBounds = function(matrix, ignoreTransform) {\r\n\t\tvar bounds = this.DisplayObject_getBounds();\r\n\t\tif (!bounds) {\r\n\t\t\tif (this.frameBounds) { bounds = this._rectangle.copy(this.frameBounds[this.currentFrame]); }\r\n\t\t}\r\n\t\tif (bounds) { return this._transformBounds(bounds, matrix, ignoreTransform); }\r\n\t\treturn this.Container__getBounds(matrix, ignoreTransform);\r\n\t};\r\n\r\n\r\n\tcreatejs.MovieClip = createjs.promote(MovieClip, \"Container\");\r\n\r\n\r\n\r\n// MovieClipPlugin for TweenJS:\r\n\t/**\r\n\t * This plugin works with TweenJS to prevent the startPosition\r\n\t * property from tweening.\r\n\t * @private\r\n\t * @class MovieClipPlugin\r\n\t * @constructor\r\n\t **/\r\n\tfunction MovieClipPlugin() {\r\n\t\tthrow(\"MovieClipPlugin cannot be instantiated.\")\r\n\t}\r\n\t\r\n\t/**\r\n\t * @property priority\r\n\t * @type {Number}\r\n\t * @static\r\n\t * @readonly\r\n\t **/\r\n\tMovieClipPlugin.priority = 100; // very high priority, should run first\r\n\t\r\n\t/**\r\n\t * @property ID\r\n\t * @type {String}\r\n\t * @static\r\n\t * @readonly\r\n\t **/\r\n\tMovieClipPlugin.ID = \"MovieClip\";\r\n\r\n\t/**\r\n\t * @method install\r\n\t * @static\r\n\t **/\r\n\tMovieClipPlugin.install = function() {\r\n\t\tcreatejs.Tween._installPlugin(MovieClipPlugin);\r\n\t};\r\n\t\r\n\t/**\r\n\t * @method init\r\n\t * @param {Tween} tween\r\n\t * @param {String} prop\r\n\t * @param {*} value\r\n\t * @static\r\n\t **/\r\n\tMovieClipPlugin.init = function(tween, prop, value) {\r\n\t\tif (prop === \"startPosition\" && tween.target instanceof MovieClip) { tween._addPlugin(MovieClipPlugin); }\r\n\t};\r\n\t\r\n\t/**\r\n\t * @method step\r\n\t * @param {Tween} tween\r\n\t * @param {TweenStep} step\r\n\t * @param {Object} props\r\n\t * @static\r\n\t **/\r\n\tMovieClipPlugin.step = function(tween, step, props) {};\r\n\r\n\t/**\r\n\t * @method change\r\n\t * @param {Tween} tween\r\n\t * @param {TweenStep} step\r\n\t * @param {*} value\r\n\t * @param {Number} ratio\r\n\t * @param {Object} end\r\n\t * @return {*}\r\n\t * @static\r\n\t */\r\n\tMovieClipPlugin.change = function(tween, step, prop, value, ratio, end) {\r\n\t\tif (prop === \"startPosition\") { return (ratio === 1 ? step.props[prop] : step.prev.props[prop]); }\r\n\t};\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// SpriteSheetUtils.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\t\r\n\t\r\n// constructor:\r\n\t/**\r\n\t * The SpriteSheetUtils class is a collection of static methods for working with {{#crossLink \"SpriteSheet\"}}{{/crossLink}}s.\r\n\t * A sprite sheet is a series of images (usually animation frames) combined into a single image on a regular grid. For\r\n\t * example, an animation consisting of 8 100x100 images could be combined into a 400x200 sprite sheet (4 frames across\r\n\t * by 2 high). The SpriteSheetUtils class uses a static interface and should not be instantiated.\r\n\t * @class SpriteSheetUtils\r\n\t * @static\r\n\t **/\r\n\tfunction SpriteSheetUtils() {\r\n\t\tthrow \"SpriteSheetUtils cannot be instantiated\";\r\n\t}\r\n\r\n\r\n// private static properties:\r\n\t/**\r\n\t * @property _workingCanvas\r\n\t * @static\r\n\t * @type HTMLCanvasElement | Object\r\n\t * @protected\r\n\t*/\r\n\t/**\r\n\t * @property _workingContext\r\n\t * @static\r\n\t * @type CanvasRenderingContext2D\r\n\t * @protected\r\n\t*/\r\n\tvar canvas = (createjs.createCanvas?createjs.createCanvas():document.createElement(\"canvas\"));\r\n\tif (canvas.getContext) {\r\n\t\tSpriteSheetUtils._workingCanvas = canvas;\r\n\t\tSpriteSheetUtils._workingContext = canvas.getContext(\"2d\");\r\n\t\tcanvas.width = canvas.height = 1;\r\n\t}\r\n\r\n\r\n// public static methods:\r\n\t/**\r\n\t * Returns a single frame of the specified sprite sheet as a new PNG image. An example of when this may be useful is\r\n\t * to use a spritesheet frame as the source for a bitmap fill.\r\n\t *\r\n\t * WARNING: In almost all cases it is better to display a single frame using a {{#crossLink \"Sprite\"}}{{/crossLink}}\r\n\t * with a {{#crossLink \"Sprite/gotoAndStop\"}}{{/crossLink}} call than it is to slice out a frame using this\r\n\t * method and display it with a Bitmap instance. You can also crop an image using the {{#crossLink \"Bitmap/sourceRect\"}}{{/crossLink}}\r\n\t * property of {{#crossLink \"Bitmap\"}}{{/crossLink}}.\r\n\t *\r\n\t * The extractFrame method may cause cross-domain warnings since it accesses pixels directly on the canvas.\r\n\t * @method extractFrame\r\n\t * @static\r\n\t * @param {SpriteSheet} spriteSheet The SpriteSheet instance to extract a frame from.\r\n\t * @param {Number|String} frameOrAnimation The frame number or animation name to extract. If an animation\r\n\t * name is specified, only the first frame of the animation will be extracted.\r\n\t * @return {HTMLImageElement} a single frame of the specified sprite sheet as a new PNG image.\r\n\t*/\r\n\tSpriteSheetUtils.extractFrame = function(spriteSheet, frameOrAnimation) {\r\n\t\tif (isNaN(frameOrAnimation)) {\r\n\t\t\tframeOrAnimation = spriteSheet.getAnimation(frameOrAnimation).frames[0];\r\n\t\t}\r\n\t\tvar data = spriteSheet.getFrame(frameOrAnimation);\r\n\t\tif (!data) { return null; }\r\n\t\tvar r = data.rect;\r\n\t\tvar canvas = SpriteSheetUtils._workingCanvas;\r\n\t\tcanvas.width = r.width;\r\n\t\tcanvas.height = r.height;\r\n\t\tSpriteSheetUtils._workingContext.drawImage(data.image, r.x, r.y, r.width, r.height, 0, 0, r.width, r.height);\r\n\t\tvar img = document.createElement(\"img\");\r\n\t\timg.src = canvas.toDataURL(\"image/png\");\r\n\t\treturn img;\r\n\t};\r\n\r\n\t// SpriteSheetUtils.addFlippedFrames is @deprecated. Remove for 1.1+\r\n\tSpriteSheetUtils.addFlippedFrames = createjs.deprecate(null, \"SpriteSheetUtils.addFlippedFrames\");\r\n\r\n\t// SpriteSheetUtils.addFlippedFrames is @deprecated. Remove for 1.1+\r\n\tSpriteSheetUtils.mergeAlpha = createjs.deprecate(null, \"SpriteSheetUtils.mergeAlpha\");\r\n\r\n\t\r\n// private static methods:\r\n\tSpriteSheetUtils._flip = function(spriteSheet, count, h, v) {\r\n\t\tvar imgs = spriteSheet._images;\r\n\t\tvar canvas = SpriteSheetUtils._workingCanvas;\r\n\t\tvar ctx = SpriteSheetUtils._workingContext;\r\n\t\tvar il = imgs.length/count;\r\n\t\tfor (var i=0;i this.maxHeight) { throw SpriteSheetBuilder.ERR_DIMENSIONS; }\r\n\t\tvar y=0, x=0;\r\n\t\tvar img = 0;\r\n\t\twhile (frames.length) {\r\n\t\t\tvar o = this._fillRow(frames, y, img, dataFrames, pad);\r\n\t\t\tif (o.w > x) { x = o.w; }\r\n\t\t\ty += o.h;\r\n\t\t\tif (!o.h || !frames.length) {\r\n\t\t\t\tvar canvas = createjs.createCanvas?createjs.createCanvas():document.createElement(\"canvas\");\r\n\t\t\t\tcanvas.width = this._getSize(x,this.maxWidth);\r\n\t\t\t\tcanvas.height = this._getSize(y,this.maxHeight);\r\n\t\t\t\tthis._data.images[img] = canvas;\r\n\t\t\t\tif (!o.h) {\r\n\t\t\t\t\tx=y=0;\r\n\t\t\t\t\timg++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\t/**\r\n\t * @method _setupMovieClipFrame\r\n\t * @protected\r\n\t * @return {Number} The width & height of the row.\r\n\t **/\r\n\tp._setupMovieClipFrame = function(source, data) {\r\n\t\tvar ae = source.actionsEnabled;\r\n\t\tsource.actionsEnabled = false;\r\n\t\tsource.gotoAndStop(data.i);\r\n\t\tsource.actionsEnabled = ae;\r\n\t\tdata.f&&data.f(source, data.d, data.i);\r\n\t};\r\n\r\n\t/**\r\n\t * @method _getSize\r\n\t * @protected\r\n\t * @return {Number} The width & height of the row.\r\n\t **/\r\n\tp._getSize = function(size,max) {\r\n\t\tvar pow = 4;\r\n\t\twhile (Math.pow(2,++pow) < size){}\r\n\t\treturn Math.min(max,Math.pow(2,pow));\r\n\t};\r\n\r\n\t/**\r\n\t * @method _fillRow\r\n\t * @param {Array} frames\r\n\t * @param {Number} y\r\n\t * @param {HTMLImageElement} img\r\n\t * @param {Object} dataFrames\r\n\t * @param {Number} pad\r\n\t * @protected\r\n\t * @return {Number} The width & height of the row.\r\n\t **/\r\n\tp._fillRow = function(frames, y, img, dataFrames, pad) {\r\n\t\tvar w = this.maxWidth;\r\n\t\tvar maxH = this.maxHeight;\r\n\t\ty += pad;\r\n\t\tvar h = maxH-y;\r\n\t\tvar x = pad;\r\n\t\tvar height = 0;\r\n\t\tfor (var i=frames.length-1; i>=0; i--) {\r\n\t\t\tvar frame = frames[i];\r\n\t\t\tvar sc = this._scale*frame.scale;\r\n\t\t\tvar rect = frame.sourceRect;\r\n\t\t\tvar source = frame.source;\r\n\t\t\tvar rx = Math.floor(sc*rect.x-pad);\r\n\t\t\tvar ry = Math.floor(sc*rect.y-pad);\r\n\t\t\tvar rh = Math.ceil(sc*rect.height+pad*2);\r\n\t\t\tvar rw = Math.ceil(sc*rect.width+pad*2);\r\n\t\t\tif (rw > w) { throw SpriteSheetBuilder.ERR_DIMENSIONS; }\r\n\t\t\tif (rh > h || x+rw > w) { continue; }\r\n\t\t\tframe.img = img;\r\n\t\t\tframe.rect = new createjs.Rectangle(x,y,rw,rh);\r\n\t\t\theight = height || rh;\r\n\t\t\tframes.splice(i,1);\r\n\t\t\tdataFrames[frame.index] = [x,y,rw,rh,img,Math.round(-rx+sc*source.regX-pad),Math.round(-ry+sc*source.regY-pad)];\r\n\t\t\tx += rw;\r\n\t\t}\r\n\t\treturn {w:x, h:height};\r\n\t};\r\n\r\n\t/**\r\n\t * @method _endBuild\r\n\t * @protected\r\n\t **/\r\n\tp._endBuild = function() {\r\n\t\tthis.spriteSheet = new createjs.SpriteSheet(this._data);\r\n\t\tthis._data = null;\r\n\t\tthis.progress = 1;\r\n\t\tthis.dispatchEvent(\"complete\");\r\n\t};\r\n\r\n\t/**\r\n\t * @method _run\r\n\t * @protected\r\n\t **/\r\n\tp._run = function() {\r\n\t\tvar ts = Math.max(0.01, Math.min(0.99, this.timeSlice||0.3))*50;\r\n\t\tvar t = (new Date()).getTime()+ts;\r\n\t\tvar complete = false;\r\n\t\twhile (t > (new Date()).getTime()) {\r\n\t\t\tif (!this._drawNext()) { complete = true; break; }\r\n\t\t}\r\n\t\tif (complete) {\r\n\t\t\tthis._endBuild();\r\n\t\t} else {\r\n\t\t\tvar _this = this;\r\n\t\t\tthis._timerID = setTimeout(function() { _this._run(); }, 50-ts);\r\n\t\t}\r\n\t\tvar p = this.progress = this._index/this._frames.length;\r\n\t\tif (this.hasEventListener(\"progress\")) {\r\n\t\t\tvar evt = new createjs.Event(\"progress\");\r\n\t\t\tevt.progress = p;\r\n\t\t\tthis.dispatchEvent(evt);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * @method _drawNext\r\n\t * @protected\r\n\t * @return Boolean Returns false if this is the last draw.\r\n\t **/\r\n\tp._drawNext = function() {\r\n\t\tvar frame = this._frames[this._index];\r\n\t\tvar sc = frame.scale*this._scale;\r\n\t\tvar rect = frame.rect;\r\n\t\tvar sourceRect = frame.sourceRect;\r\n\t\tvar canvas = this._data.images[frame.img];\r\n\t\tvar ctx = canvas.getContext(\"2d\");\r\n\t\tframe.funct&&frame.funct(frame.source, frame.data);\r\n\t\tctx.save();\r\n\t\tctx.beginPath();\r\n\t\tctx.rect(rect.x, rect.y, rect.width, rect.height);\r\n\t\tctx.clip();\r\n\t\tctx.translate(Math.ceil(rect.x-sourceRect.x*sc), Math.ceil(rect.y-sourceRect.y*sc));\r\n\t\tctx.scale(sc,sc);\r\n\t\tframe.source.draw(ctx); // display object will draw itself.\r\n\t\tctx.restore();\r\n\t\treturn (++this._index) < this._frames.length;\r\n\t};\r\n\r\n\r\n\tcreatejs.SpriteSheetBuilder = createjs.promote(SpriteSheetBuilder, \"EventDispatcher\");\r\n}());\r\n\r\n//##############################################################################\r\n// DOMElement.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * This class is still experimental, and more advanced use is likely to be buggy. Please report bugs.\r\n\t *\r\n\t * A DOMElement allows you to associate a HTMLElement with the display list. It will be transformed\r\n\t * within the DOM as though it is child of the {{#crossLink \"Container\"}}{{/crossLink}} it is added to. However, it is\r\n\t * not rendered to canvas, and as such will retain whatever z-index it has relative to the canvas (ie. it will be\r\n\t * drawn in front of or behind the canvas).\r\n\t *\r\n\t * The position of a DOMElement is relative to their parent node in the DOM. It is recommended that\r\n\t * the DOM Object be added to a div that also contains the canvas so that they share the same position\r\n\t * on the page.\r\n\t *\r\n\t * DOMElement is useful for positioning HTML elements over top of canvas content, and for elements\r\n\t * that you want to display outside the bounds of the canvas. For example, a tooltip with rich HTML\r\n\t * content.\r\n\t *\r\n\t *

    Mouse Interaction

    \r\n\t *\r\n\t * DOMElement instances are not full EaselJS display objects, and do not participate in EaselJS mouse\r\n\t * events or support methods like hitTest. To get mouse events from a DOMElement, you must instead add handlers to\r\n\t * the htmlElement (note, this does not support EventDispatcher)\r\n\t *\r\n\t * var domElement = new createjs.DOMElement(htmlElement);\r\n\t * domElement.htmlElement.onclick = function() {\r\n\t * console.log(\"clicked\");\r\n\t * }\r\n\t *\r\n\t * Important: This class needs to be notified it is about to be drawn, this will happen automatically\r\n\t * if you call stage.update, calling stage.draw or disabling tickEnabled will miss important steps and it will render\r\n\t * stale information.\r\n\t *\r\n\t * @class DOMElement\r\n\t * @extends DisplayObject\r\n\t * @constructor\r\n\t * @param {HTMLElement} htmlElement A reference or id for the DOM element to manage.\r\n\t */\r\n\tfunction DOMElement(htmlElement) {\r\n\t\tthis.DisplayObject_constructor();\r\n\t\t\r\n\t\tif (typeof(htmlElement)==\"string\") { htmlElement = document.getElementById(htmlElement); }\r\n\t\tthis.mouseEnabled = false;\r\n\t\t\r\n\t\tvar style = htmlElement.style;\r\n\t\tstyle.position = \"absolute\";\r\n\t\tstyle.transformOrigin = style.WebkitTransformOrigin = style.msTransformOrigin = style.MozTransformOrigin = style.OTransformOrigin = \"0% 0%\";\r\n\t\t\r\n\t\t\r\n\t// public properties:\r\n\t\t/**\r\n\t\t * The DOM object to manage.\r\n\t\t * @property htmlElement\r\n\t\t * @type HTMLElement\r\n\t\t */\r\n\t\tthis.htmlElement = htmlElement;\r\n\t\r\n\t\r\n\t// private properties:\r\n\t\t/**\r\n\t\t * @property _oldMtx\r\n\t\t * @type Matrix2D\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._oldProps = null;\r\n\r\n\t\t/**\r\n\t\t * Used to track the object which this class attached listeners to, helps optimize listener attachment.\r\n\t\t * @property _oldStage\r\n\t\t * @type Stage\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._oldStage = null;\r\n\t\t/**\r\n\t\t * The event listener proxy triggered drawing draw for special circumstances.\r\n\t\t * @property _drawAction\r\n\t\t * @type function\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._drawAction = null;\r\n\t}\r\n\tvar p = createjs.extend(DOMElement, createjs.DisplayObject);\r\n\r\n\t// TODO: deprecated\r\n\t// p.initialize = function() {}; // searchable for devs wondering where it is. REMOVED. See docs for details.\r\n\r\n\r\n// public methods:\r\n\t/**\r\n\t * Returns true or false indicating whether the display object would be visible if drawn to a canvas.\r\n\t * This does not account for whether it would be visible within the boundaries of the stage.\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method isVisible\r\n\t * @return {Boolean} Boolean indicating whether the display object would be visible if drawn to a canvas\r\n\t */\r\n\tp.isVisible = function() {\r\n\t\treturn this.htmlElement != null;\r\n\t};\r\n\r\n\t/**\r\n\t * Draws the display object into the specified context ignoring its visible, alpha, shadow, and transform.\r\n\t * Returns true if the draw was handled (useful for overriding functionality).\r\n\t * NOTE: This method is mainly for internal use, though it may be useful for advanced uses.\r\n\t * @method draw\r\n\t * @param {CanvasRenderingContext2D} ctx The canvas 2D context object to draw into.\r\n\t * @param {Boolean} ignoreCache Indicates whether the draw operation should ignore any current cache.\r\n\t * For example, used for drawing the cache (to prevent it from simply drawing an existing cache back\r\n\t * into itself).\r\n\t * @return {Boolean}\r\n\t */\r\n\tp.draw = function(ctx, ignoreCache) {\r\n\t\t// this relies on the _tick method because draw isn't called if the parent is not visible.\r\n\t\t// the actual update happens in _handleDrawEnd\r\n\t\treturn true;\r\n\t};\r\n\r\n\t/**\r\n\t * Not applicable to DOMElement.\r\n\t * @method cache\r\n\t */\r\n\tp.cache = function() {};\r\n\r\n\t/**\r\n\t * Not applicable to DOMElement.\r\n\t * @method uncache\r\n\t */\r\n\tp.uncache = function() {};\r\n\r\n\t/**\r\n\t * Not applicable to DOMElement.\r\n\t * @method updateCache\r\n\t */\r\n\tp.updateCache = function() {};\r\n\r\n\t/**\r\n\t * Not applicable to DOMElement.\r\n\t * @method hitTest\r\n\t */\r\n\tp.hitTest = function() {};\r\n\r\n\t/**\r\n\t * Not applicable to DOMElement.\r\n\t * @method localToGlobal\r\n\t */\r\n\tp.localToGlobal = function() {};\r\n\r\n\t/**\r\n\t * Not applicable to DOMElement.\r\n\t * @method globalToLocal\r\n\t */\r\n\tp.globalToLocal = function() {};\r\n\r\n\t/**\r\n\t * Not applicable to DOMElement.\r\n\t * @method localToLocal\r\n\t */\r\n\tp.localToLocal = function() {};\r\n\r\n\t/**\r\n\t * DOMElement cannot be cloned. Throws an error.\r\n\t * @method clone\r\n\t */\r\n\tp.clone = function() {\r\n\t\tthrow(\"DOMElement cannot be cloned.\")\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a string representation of this object.\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t */\r\n\tp.toString = function() {\r\n\t\treturn \"[DOMElement (name=\"+ this.name +\")]\";\r\n\t};\r\n\r\n\t/**\r\n * Interaction events should be added to `htmlElement`, and not the DOMElement instance, since DOMElement instances\r\n\t * are not full EaselJS display objects and do not participate in EaselJS mouse events.\r\n\t * @event click\r\n\t */\r\n\r\n /**\r\n * Interaction events should be added to `htmlElement`, and not the DOMElement instance, since DOMElement instances\r\n \t * are not full EaselJS display objects and do not participate in EaselJS mouse events.\r\n\t * @event dblClick\r\n\t */\r\n\r\n /**\r\n * Interaction events should be added to `htmlElement`, and not the DOMElement instance, since DOMElement instances\r\n \t * are not full EaselJS display objects and do not participate in EaselJS mouse events.\r\n\t * @event mousedown\r\n\t */\r\n\r\n /**\r\n * The HTMLElement can listen for the mouseover event, not the DOMElement instance.\r\n * Since DOMElement instances are not full EaselJS display objects and do not participate in EaselJS mouse events.\r\n * @event mouseover\r\n\t */\r\n\r\n /**\r\n * Not applicable to DOMElement.\r\n\t * @event tick\r\n\t */\r\n\r\n\r\n// private methods:\r\n\t/**\r\n\t * @method _tick\r\n\t * @param {Object} evtObj An event object that will be dispatched to all tick listeners. This object is reused between dispatchers to reduce construction & GC costs.\r\n\t * function.\r\n\t * @protected\r\n\t */\r\n\tp._tick = function(evtObj) {\r\n\t\tvar stage = this.stage;\r\n\t\tif(stage && stage !== this._oldStage) {\r\n\t\t\tthis._drawAction && stage.off(\"drawend\", this._drawAction);\r\n\t\t\tthis._drawAction = stage.on(\"drawend\", this._handleDrawEnd, this);\r\n\t\t\tthis._oldStage = stage;\r\n\t\t}\r\n\t\tthis.DisplayObject__tick(evtObj);\r\n\t};\r\n\t\r\n\t/**\r\n\t * @method _handleDrawEnd\r\n\t * @param {Event} evt\r\n\t * @protected\r\n\t */\r\n\tp._handleDrawEnd = function(evt) {\r\n\t\tvar o = this.htmlElement;\r\n\t\tif (!o) { return; }\r\n\t\tvar style = o.style;\r\n\t\t\r\n\t\tvar props = this.getConcatenatedDisplayProps(this._props), mtx = props.matrix;\r\n\t\t\r\n\t\tvar visibility = props.visible ? \"visible\" : \"hidden\";\r\n\t\tif (visibility != style.visibility) { style.visibility = visibility; }\r\n\t\tif (!props.visible) { return; }\r\n\t\t\r\n\t\tvar oldProps = this._oldProps, oldMtx = oldProps&&oldProps.matrix;\r\n\t\tvar n = 10000; // precision\r\n\t\t\r\n\t\tif (!oldMtx || !oldMtx.equals(mtx)) {\r\n\t\t\tvar str = \"matrix(\" + (mtx.a*n|0)/n +\",\"+ (mtx.b*n|0)/n +\",\"+ (mtx.c*n|0)/n +\",\"+ (mtx.d*n|0)/n +\",\"+ (mtx.tx+0.5|0);\r\n\t\t\tstyle.transform = style.WebkitTransform = style.OTransform = style.msTransform = str +\",\"+ (mtx.ty+0.5|0) +\")\";\r\n\t\t\tstyle.MozTransform = str +\"px,\"+ (mtx.ty+0.5|0) +\"px)\";\r\n\t\t\tif (!oldProps) { oldProps = this._oldProps = new createjs.DisplayProps(true, null); }\r\n\t\t\toldProps.matrix.copy(mtx);\r\n\t\t}\r\n\t\t\r\n\t\tif (oldProps.alpha != props.alpha) {\r\n\t\t\tstyle.opacity = \"\"+(props.alpha*n|0)/n;\r\n\t\t\toldProps.alpha = props.alpha;\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tcreatejs.DOMElement = createjs.promote(DOMElement, \"DisplayObject\");\r\n}());\r\n\r\n//##############################################################################\r\n// Filter.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * Base class that all filters should inherit from. Filters need to be applied to objects that have been cached using\r\n\t * the {{#crossLink \"DisplayObject/cache\"}}{{/crossLink}} method. If an object changes, please cache it again, or use\r\n\t * {{#crossLink \"DisplayObject/updateCache\"}}{{/crossLink}}. Note that the filters must be applied before caching.\r\n\t *\r\n\t *

    Example

    \r\n\t *\r\n\t * myInstance.filters = [\r\n\t * new createjs.ColorFilter(0, 0, 0, 1, 255, 0, 0),\r\n\t * new createjs.BlurFilter(5, 5, 10)\r\n\t * ];\r\n\t * myInstance.cache(0,0, 100, 100);\r\n\t *\r\n\t * Note that each filter can implement a {{#crossLink \"Filter/getBounds\"}}{{/crossLink}} method, which returns the\r\n\t * margins that need to be applied in order to fully display the filter. For example, the {{#crossLink \"BlurFilter\"}}{{/crossLink}}\r\n\t * will cause an object to feather outwards, resulting in a margin around the shape.\r\n\t *\r\n\t *

    EaselJS Filters

    \r\n\t * EaselJS comes with a number of pre-built filters:\r\n\t *
    • {{#crossLink \"AlphaMapFilter\"}}{{/crossLink}} : Map a greyscale image to the alpha channel of a display object
    • \r\n\t *
    • {{#crossLink \"AlphaMaskFilter\"}}{{/crossLink}}: Map an image's alpha channel to the alpha channel of a display object
    • \r\n\t *
    • {{#crossLink \"BlurFilter\"}}{{/crossLink}}: Apply vertical and horizontal blur to a display object
    • \r\n\t *
    • {{#crossLink \"ColorFilter\"}}{{/crossLink}}: Color transform a display object
    • \r\n\t *
    • {{#crossLink \"ColorMatrixFilter\"}}{{/crossLink}}: Transform an image using a {{#crossLink \"ColorMatrix\"}}{{/crossLink}}
    • \r\n\t *
    \r\n\t *\r\n\t * @class Filter\r\n\t * @constructor\r\n\t **/\r\n\tfunction Filter() {\r\n\t\t/**\r\n\t\t * A flag stating that this filter uses a context draw mode and cannot be batched into imageData processing.\r\n\t\t * @property usesContext\r\n\t\t * @type {boolean}\r\n\t\t * @default false\r\n\t\t */\r\n\t\tthis.usesContext = false;\r\n\r\n\t\t/**\r\n\t\t * Another filter that is required to act as part of this filter and created and managed under the hood.\r\n\t\t * @private\r\n\t\t * @property _multiPass\r\n\t\t * @type {Filter}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis._multiPass = null;\r\n\r\n\t\t/**\r\n\t\t * Pre-processed template shader code. It will be parsed before being fed in into the shader compiler.\r\n\t\t * This should be based upon StageGL.SHADER_VERTEX_BODY_REGULAR\r\n\t\t * @property VTX_SHADER\r\n\t\t * @virtual\r\n\t\t * @type {String}\r\n\t\t * @readonly\r\n\t\t */\r\n\t\tthis.VTX_SHADER_BODY = null;\r\n\r\n\t\t/**\r\n\t\t * Pre-processed template shader code. It will be parsed before being fed in into the shader compiler.\r\n\t\t * This should be based upon StageGL.SHADER_FRAGMENT_BODY_REGULAR\r\n\t\t * @property FRAG_SHADER\r\n\t\t * @virtual\r\n\t\t * @type {String}\r\n\t\t * @readonly\r\n\t\t */\r\n\t\tthis.FRAG_SHADER_BODY = null;\r\n\t}\r\n\tvar p = Filter.prototype;\r\n\r\n// public methods:\r\n\t/**\r\n\t * Provides padding values for this filter. That is, how much the filter will extend the visual bounds of an object it is applied to.\r\n\t * @method getBounds\r\n\t * @param {Rectangle} [rect] If specified, the provided Rectangle instance will be expanded by the padding amounts and returned.\r\n\t * @return {Rectangle} If a `rect` param was provided, it is returned. If not, either a new rectangle with the padding values, or null if no padding is required for this filter.\r\n\t **/\r\n\tp.getBounds = function(rect) {\r\n\t\treturn rect;\r\n\t};\r\n\r\n\t/**\r\n\t * Assign any unique uniforms or other setup functionality here.\r\n\t * @method shaderParamSetup\r\n\t * @virtual\r\n\t * @param {WebGLContext} gl The context associated with the stage performing the render.\r\n\t * @param {StageGL} stage The stage instance that will be rendering.\r\n\t * @param {ShaderProgram} shaderProgram The compiled shader that is going to be used to perform the render.\r\n\t */\r\n\tp.shaderParamSetup = function(gl, stage, shaderProgram) {};\r\n\r\n\t/**\r\n\t * Applies the filter to the specified context.\r\n\t * @method applyFilter\r\n\t * @param {CanvasRenderingContext2D} ctx The 2D context to use as the source.\r\n\t * @param {Number} x The x position to use for the source rect.\r\n\t * @param {Number} y The y position to use for the source rect.\r\n\t * @param {Number} width The width to use for the source rect.\r\n\t * @param {Number} height The height to use for the source rect.\r\n\t * @param {CanvasRenderingContext2D} [targetCtx] The 2D context to draw the result to. Defaults to the context passed to ctx.\r\n\t * @param {Number} [targetX] The x position to draw the result to. Defaults to the value passed to x.\r\n\t * @param {Number} [targetY] The y position to draw the result to. Defaults to the value passed to y.\r\n\t * @return {Boolean} If the filter was applied successfully.\r\n\t **/\r\n\tp.applyFilter = function(ctx, x, y, width, height, targetCtx, targetX, targetY) {\r\n\t\t// this is the default behaviour because most filters access pixel data. It is overridden when not needed.\r\n\t\ttargetCtx = targetCtx || ctx;\r\n\t\tif (targetX == null) { targetX = x; }\r\n\t\tif (targetY == null) { targetY = y; }\r\n\t\ttry {\r\n\t\t\tvar imageData = ctx.getImageData(x, y, width, height);\r\n\t\t} catch (e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (this._applyFilter(imageData)) {\r\n\t\t\ttargetCtx.putImageData(imageData, targetX, targetY);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a string representation of this object.\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t **/\r\n\tp.toString = function() {\r\n\t\treturn \"[Filter]\";\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a clone of this Filter instance.\r\n\t * @method clone\r\n\t * @return {Filter} A clone of the current Filter instance.\r\n\t **/\r\n\tp.clone = function() {\r\n\t\treturn new Filter();\r\n\t};\r\n\t\r\n// private methods:\r\n\t/**\r\n\t * @method _applyFilter\r\n\t * @param {ImageData} imageData Target ImageData instance.\r\n\t * @return {Boolean}\r\n\t **/\r\n\tp._applyFilter = function(imageData) { return true; };\r\n\r\n\r\n\tcreatejs.Filter = Filter;\r\n}());\r\n\r\n//##############################################################################\r\n// BitmapCache.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * The BitmapCache is an internal representation of all the cache properties and logic required in order to \"cache\"\r\n\t * an object. This information and functionality used to be located on a {{#crossLink \"DisplayObject/cache\"}}{{/crossLink}}\r\n\t * method in {{#crossLink \"DisplayObject\"}}{{/crossLink}}, but was moved to its own class.\r\n\t *\r\n\t * Caching in this context is purely visual, and will render the DisplayObject out into an image to be used instead\r\n\t * of the object. The actual cache itself is still stored on the target with the {{#crossLink \"DisplayObject/cacheCanvas:property\"}}{{/crossLink}}.\r\n\t * Working with a singular image like a {{#crossLink \"Bitmap\"}}{{/crossLink}} there is little benefit to performing \r\n\t * a cache as it is already a single image. Caching is best done on containers containing multiple complex parts that \r\n\t * do not move often, so that rendering the image instead will improve overall rendering speed. A cached object will \r\n\t * not visually update until explicitly told to do so with a call to update, much like a Stage. If a cache is being \r\n\t * updated every frame it is likely not improving rendering performance. Cache are best used when updates will be sparse.\r\n\t *\r\n\t * Caching is also a co-requisite for applying filters to prevent expensive filters running constantly without need, \r\n\t * and to physically enable some effects. The BitmapCache is also responsible for applying filters to objects and \r\n\t * reads each {{#crossLink \"Filter\"}}{{/crossLink}} due to this relationship. Real-time Filters are not recommended \r\n\t * performance wise when dealing with a Context2D canvas. For best performance and to still allow for some visual \r\n\t * effects use a compositeOperation when possible.\r\n\t * @class BitmapCache\r\n\t * @constructor\r\n\t **/\r\n\tfunction BitmapCache() {\r\n\r\n\t\t// public:\r\n\t\t/**\r\n\t\t * Width of the cache relative to the target object.\r\n\t\t * @property width\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default undefined\r\n\t\t **/\r\n\t\tthis.width = undefined;\r\n\r\n\t\t/**\r\n\t\t * Height of the cache relative to the target object.\r\n\t\t * @property height\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default undefined\r\n\t\t * @todo Should the width and height be protected?\r\n\t\t **/\r\n\t\tthis.height = undefined;\r\n\r\n\t\t/**\r\n\t\t * Horizontal position of the cache relative to the target's origin.\r\n\t\t * @property x\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default undefined\r\n\t\t **/\r\n\t\tthis.x = undefined;\r\n\r\n\t\t/**\r\n\t\t * Vertical position of the cache relative to target's origin.\r\n\t\t * @property y\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default undefined\r\n\t\t **/\r\n\t\tthis.y = undefined;\r\n\r\n\t\t/**\r\n\t\t * The internal scale of the cache image, does not affects display size. This is useful to both increase and\r\n\t\t * decrease render quality. Objects with increased scales are more likely to look good when scaled up or rotated.\r\n\t\t * Objects with decreased scales can save on rendering performance.\r\n\t\t * @property scale\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default 1\r\n\t\t **/\r\n\t\tthis.scale = 1;\r\n\r\n\t\t/**\r\n\t\t * The x offset used for drawing into the cache itself, accounts for both transforms applied.\r\n\t\t * @property offX\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis.offX = 0;\r\n\r\n\t\t/**\r\n\t\t * The y offset used for drawing into the cache itself, accounts for both transforms applied.\r\n\t\t * @property offY\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis.offY = 0;\r\n\r\n\t\t/**\r\n\t\t * Track how many times the cache has been updated, mostly used for preventing duplicate cacheURLs.\r\n\t\t * This can be useful to see if a cache has been updated.\r\n\t\t * @property cacheID\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis.cacheID = 0;\r\n\r\n\t\t// protected:\r\n\t\t/**\r\n\t\t * The relative offset of the filter's x position, used for drawing the cache onto its container.\r\n\t\t * Re-calculated every update call before drawing.\r\n\t\t * @property _filterOffY\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis._filterOffX = 0;\r\n\r\n\t\t/**\r\n\t\t * The relative offset of the filter's y position, used for drawing the cache onto its container.\r\n\t\t * Re-calculated every update call before drawing.\r\n\t\t * @property _filterOffY\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis._filterOffY = 0;\r\n\r\n\t\t/**\r\n\t\t * The cacheID when a DataURL was requested.\r\n\t\t * @property _cacheDataURLID\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis._cacheDataURLID = 0;\r\n\r\n\t\t/**\r\n\t\t * The cache's DataURL, generated on-demand using the getter.\r\n\t\t * @property _cacheDataURL\r\n\t\t * @protected\r\n\t\t * @type {String}\r\n\t\t * @default null\r\n\t\t **/\r\n\t\tthis._cacheDataURL = null;\r\n\r\n\t\t/**\r\n\t\t * Internal tracking of final bounding width, approximately width*scale; however, filters can complicate the actual value.\r\n\t\t * @property _drawWidth\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis._drawWidth = 0;\r\n\r\n\t\t/**\r\n\t\t * Internal tracking of final bounding height, approximately height*scale; however, filters can complicate the actual value.\r\n\t\t * @property _drawHeight\r\n\t\t * @protected\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t **/\r\n\t\tthis._drawHeight = 0;\r\n\t}\r\n\tvar p = BitmapCache.prototype;\r\n\r\n\t/**\r\n\t * Returns the bounds that surround all applied filters, relies on each filter to describe how it changes bounds.\r\n\t * @method getFilterBounds\r\n\t * @param {DisplayObject} target The object to check the filter bounds for.\r\n\t * @param {Rectangle} [output=null] Optional parameter, if provided then calculated bounds will be applied to that object.\r\n\t * @return {Rectangle} bounds object representing the bounds with filters.\r\n\t * @static\r\n\t **/\r\n\tBitmapCache.getFilterBounds = function(target, output) {\r\n\t\tif(!output){ output = new createjs.Rectangle(); }\r\n\t\tvar filters = target.filters;\r\n\t\tvar filterCount = filters && filters.length;\r\n\t\tif (!!filterCount <= 0) { return output; }\r\n\r\n\t\tfor(var i=0; iWebGL cache with a 2D context\r\n\t *\r\n\t * var stage = new createjs.Stage();\r\n\t * var bmp = new createjs.Bitmap(src);\r\n\t * bmp.cache(0, 0, bmp.width, bmp.height, 1, {gl: \"new\"}); // no StageGL to use, so make one\r\n\t *\r\n\t * var shape = new createjs.Shape();\r\n\t * shape.graphics.clear().fill(\"red\").drawRect(0,0,20,20);\r\n\t * shape.cache(0, 0, 20, 20, 1); // cannot use WebGL cache\r\n\t *\r\n\t *

    WebGL cache with a WebGL context

    \r\n\t *\r\n\t * var stageGL = new createjs.StageGL();\r\n\t * var bmp = new createjs.Bitmap(src);\r\n\t * bmp.cache(0, 0, bmp.width, bmp.height, 1, {gl: \"stage\"}); // use our StageGL to cache\r\n\t *\r\n\t * var shape = new createjs.Shape();\r\n\t * shape.graphics.clear().fill(\"red\").drawRect(0,0,20,20);\r\n\t * shape.cache(0, 0, 20, 20, 1); // cannot use WebGL cache\r\n\t *\r\n\t * You may wish to create your own StageGL instance to control factors like clear color, transparency, AA, and\r\n\t * others. If you do, pass a new instance in instead of \"true\", the library will automatically set the\r\n\t * {{#crossLink \"StageGL/isCacheControlled\"}}{{/crossLink}} to true on your instance. This will trigger it to behave\r\n\t * correctly, and not assume your main context is WebGL.\r\n\t *\r\n\t * @public\r\n\t * @method BitmapCache.cache\r\n\t * @param {Number} x The x coordinate origin for the cache region.\r\n\t * @param {Number} y The y coordinate origin for the cache region.\r\n\t * @param {Number} width The width of the cache region.\r\n\t * @param {Number} height The height of the cache region.\r\n\t * @param {Number} [scale=1] The scale at which the cache will be created. For example, if you cache a vector shape\r\n\t * using myShape.cache(0,0,100,100,2) then the resulting cacheCanvas will be 200x200 px. This lets you scale and\r\n\t * rotate cached elements with greater fidelity. Default is 1.\r\n\t * @param {Object} [options=undefined] Specify additional parameters for the cache logic\r\n\t * @param {undefined|\"new\"|\"stage\"|StageGL} [options.useGL=undefined] Select whether to use context 2D, or WebGL rendering, and\r\n\t * whether to make a new stage instance or use an existing one. See above for extensive details on use.\r\n\t * @for BitmapCache\r\n\t */\r\n\t p.define = function(target, x, y, width, height, scale, options) {\r\n\t\tif(!target){ throw \"No symbol to cache\"; }\r\n\t\tthis._options = options;\r\n\t\tthis.target = target;\r\n\r\n\t\tthis.width =\t\twidth >= 1 ? width : 1;\r\n\t\tthis.height =\t\theight >= 1 ? height : 1;\r\n\t\tthis.x =\t\t\tx || 0;\r\n\t\tthis.y =\t\t\ty || 0;\r\n\t\tthis.scale =\t\tscale || 1;\r\n\r\n\t\tthis.update();\r\n\t};\r\n\r\n\t/**\r\n\t * Directly called via {{#crossLink \"DisplayObject/updateCache:method\"}}{{/crossLink}}, but also internally. This\r\n\t * has the dual responsibility of making sure the surface is ready to be drawn to, and performing the draw. For\r\n\t * full details of each behaviour, check the protected functions {{#crossLink \"BitmapCache/_updateSurface\"}}{{/crossLink}}\r\n\t * and {{#crossLink \"BitmapCache/_drawToCache\"}}{{/crossLink}} respectively.\r\n\t * @method update\r\n\t * @param {String} [compositeOperation=null] The DisplayObject this cache is linked to.\r\n\t **/\r\n\tp.update = function(compositeOperation) {\r\n\t\tif(!this.target) { throw \"define() must be called before update()\"; }\r\n\r\n\t\tvar filterBounds = BitmapCache.getFilterBounds(this.target);\r\n\t\tvar surface = this.target.cacheCanvas;\r\n\r\n\t\tthis._drawWidth = Math.ceil(this.width*this.scale) + filterBounds.width;\r\n\t\tthis._drawHeight = Math.ceil(this.height*this.scale) + filterBounds.height;\r\n\r\n\t\tif(!surface || this._drawWidth != surface.width || this._drawHeight != surface.height) {\r\n\t\t\tthis._updateSurface();\r\n\t\t}\r\n\r\n\t\tthis._filterOffX = filterBounds.x;\r\n\t\tthis._filterOffY = filterBounds.y;\r\n\t\tthis.offX = this.x*this.scale + this._filterOffX;\r\n\t\tthis.offY = this.y*this.scale + this._filterOffY;\r\n\r\n\t\tthis._drawToCache(compositeOperation);\r\n\r\n\t\tthis.cacheID = this.cacheID?this.cacheID+1:1;\r\n\t};\r\n\r\n\t/**\r\n\t * Reset and release all the properties and memory associated with this cache.\r\n\t * @method release\r\n\t **/\r\n\tp.release = function() {\r\n\t\tif (this._webGLCache) {\r\n\t\t\t// if it isn't cache controlled clean up after yourself\r\n\t\t\tif (!this._webGLCache.isCacheControlled) {\r\n\t\t\t\tif (this.__lastRT){ this.__lastRT = undefined; }\r\n\t\t\t\tif (this.__rtA){ this._webGLCache._killTextureObject(this.__rtA); }\r\n\t\t\t\tif (this.__rtB){ this._webGLCache._killTextureObject(this.__rtB); }\r\n\t\t\t\tif (this.target && this.target.cacheCanvas){ this._webGLCache._killTextureObject(this.target.cacheCanvas); }\r\n\t\t\t}\r\n\t\t\t// set the context to none and let the garbage collector get the rest when the canvas itself gets removed\r\n\t\t\tthis._webGLCache = false;\r\n\t\t} else {\r\n\t\t\tvar stage = this.target.stage;\r\n\t\t\tif (stage instanceof createjs.StageGL){\r\n\t\t\t\tstage.releaseTexture(this.target.cacheCanvas);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.target = this.target.cacheCanvas = null;\r\n\t\tthis.cacheID = this._cacheDataURLID = this._cacheDataURL = undefined;\r\n\t\tthis.width = this.height = this.x = this.y = this.offX = this.offY = 0;\r\n\t\tthis.scale = 1;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a data URL for the cache, or `null` if this display object is not cached.\r\n\t * Uses {{#crossLink \"BitmapCache/cacheID:property\"}}{{/crossLink}} to ensure a new data URL is not generated if the\r\n\t * cache has not changed.\r\n\t * @method getCacheDataURL\r\n\t * @return {String} The image data url for the cache.\r\n\t **/\r\n\tp.getCacheDataURL = function() {\r\n\t\tvar cacheCanvas = this.target && this.target.cacheCanvas;\r\n\t\tif (!cacheCanvas) { return null; }\r\n\t\tif (this.cacheID != this._cacheDataURLID) {\r\n\t\t\tthis._cacheDataURLID = this.cacheID;\r\n\t\t\tthis._cacheDataURL = cacheCanvas.toDataURL?cacheCanvas.toDataURL():null;\t// incase function is\r\n\t\t}\r\n\t\treturn this._cacheDataURL;\r\n\t};\r\n\r\n\t/**\r\n\t * Use context2D drawing commands to display the cache canvas being used.\r\n\t * @method draw\r\n\t * @param {CanvasRenderingContext2D} ctx The context to draw into.\r\n\t * @return {Boolean} Whether the draw was handled successfully.\r\n\t **/\r\n\tp.draw = function(ctx) {\r\n\t\tif(!this.target) { return false; }\r\n\t\tctx.drawImage(this.target.cacheCanvas,\r\n\t\t\tthis.x + (this._filterOffX/this.scale),\t\tthis.y + (this._filterOffY/this.scale),\r\n\t\t\tthis._drawWidth/this.scale,\t\t\t\t\tthis._drawHeight/this.scale\r\n\t\t);\r\n\t\treturn true;\r\n\t};\r\n\r\n// private methods:\r\n\t/**\r\n\t * Create or resize the invisible canvas/surface that is needed for the display object(s) to draw to,\r\n\t * and in turn be used in their stead when drawing. The surface is resized to the size defined\r\n\t * by the width and height, factoring in scaling and filters. Adjust them to adjust the output size.\r\n\t * @method _updateSurface\r\n\t * @protected\r\n\t **/\r\n\tp._updateSurface = function() {\r\n\t\tif (!this._options || !this._options.useGL) {\r\n\t\t\tvar surface = this.target.cacheCanvas;\r\n\r\n\t\t\t// create it if it's missing\r\n\t\t\tif(!surface) {\r\n\t\t\t\tsurface = this.target.cacheCanvas = createjs.createCanvas?createjs.createCanvas():document.createElement(\"canvas\");\r\n\t\t\t}\r\n\r\n\t\t\t// now size it\r\n\t\t\tsurface.width = this._drawWidth;\r\n\t\t\tsurface.height = this._drawHeight;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// create it if it's missing\r\n\t\tif (!this._webGLCache) {\r\n\t\t\tif (this._options.useGL === \"stage\") {\r\n\t\t\t\tif(!(this.target.stage && this.target.stage.isWebGL)){\r\n\t\t\t\t\tvar error = \"Cannot use 'stage' for cache because the object's parent stage is \";\r\n\t\t\t\t\terror += this.target.stage ? \"non WebGL.\" : \"not set, please addChild to the correct stage.\";\r\n\t\t\t\t\tthrow error;\r\n\t\t\t\t}\r\n\t\t\t\tthis.target.cacheCanvas = true; // will be replaced with RenderTexture, temporary positive value for old \"isCached\" checks\r\n\t\t\t\tthis._webGLCache = this.target.stage;\r\n\r\n\t\t\t} else if(this._options.useGL === \"new\") {\r\n\t\t\t\tthis.target.cacheCanvas = document.createElement(\"canvas\"); // we can turn off autopurge because we wont be making textures here\r\n\t\t\t\tthis._webGLCache = new createjs.StageGL(this.target.cacheCanvas, {antialias: true, transparent: true, autoPurge: -1});\r\n\t\t\t\tthis._webGLCache.isCacheControlled = true;\t// use this flag to control stage sizing and final output\r\n\r\n\t\t\t} else if(this._options.useGL instanceof createjs.StageGL) {\r\n\t\t\t\tthis.target.cacheCanvas = true; // will be replaced with RenderTexture, temporary positive value for old \"isCached\" checks\r\n\t\t\t\tthis._webGLCache = this._options.useGL;\r\n\t\t\t\tthis._webGLCache.isCacheControlled = true;\t// use this flag to control stage sizing and final output\r\n\r\n\t\t\t} else {\r\n\t\t\t\tthrow \"Invalid option provided to useGL, expected ['stage', 'new', StageGL, undefined], got \"+ this._options.useGL;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// now size render surfaces\r\n\t\tvar surface = this.target.cacheCanvas;\r\n\t\tvar stageGL = this._webGLCache;\r\n\r\n\t\t// if we have a dedicated stage we've gotta size it\r\n\t\tif (stageGL.isCacheControlled) {\r\n\t\t\tsurface.width = this._drawWidth;\r\n\t\t\tsurface.height = this._drawHeight;\r\n\t\t\tstageGL.updateViewport(this._drawWidth, this._drawHeight);\r\n\t\t}\r\n\t\tif (this.target.filters) {\r\n\t\t\t// with filters we can't tell how many we'll need but the most we'll ever need is two, so make them now\r\n\t\t\tstageGL.getTargetRenderTexture(this.target, this._drawWidth,this._drawHeight);\r\n\t\t\tstageGL.getTargetRenderTexture(this.target, this._drawWidth,this._drawHeight);\r\n\t\t} else {\r\n\t\t\t// without filters then we only need one RenderTexture, and that's only if its not a dedicated stage\r\n\t\t\tif (!stageGL.isCacheControlled) {\r\n\t\t\t\tstageGL.getTargetRenderTexture(this.target, this._drawWidth,this._drawHeight);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Perform the cache draw out for context 2D now that the setup properties have been performed.\r\n\t * @method _drawToCache\r\n\t * @protected\r\n\t **/\r\n\tp._drawToCache = function(compositeOperation) {\r\n\t\tvar surface = this.target.cacheCanvas;\r\n\t\tvar target = this.target;\r\n\t\tvar webGL = this._webGLCache;\r\n\r\n\t\tif (webGL){\r\n\t\t\t//TODO: auto split blur into an x/y pass\r\n\t\t\twebGL.cacheDraw(target, target.filters, this);\r\n\r\n\t\t\t// we may of swapped around which element the surface is, so we re-fetch it\r\n\t\t\tsurface = this.target.cacheCanvas;\r\n\r\n\t\t\tsurface.width = this._drawWidth;\r\n\t\t\tsurface.height = this._drawHeight;\r\n\t\t} else {\r\n\t\t\tvar ctx = surface.getContext(\"2d\");\r\n\r\n\t\t\tif (!compositeOperation) {\r\n\t\t\t\tctx.clearRect(0, 0, this._drawWidth+1, this._drawHeight+1);\r\n\t\t\t}\r\n\r\n\t\t\tctx.save();\r\n\t\t\tctx.globalCompositeOperation = compositeOperation;\r\n\t\t\tctx.setTransform(this.scale,0,0,this.scale, -this._filterOffX,-this._filterOffY);\r\n\t\t\tctx.translate(-this.x, -this.y);\r\n\t\t\ttarget.draw(ctx, true);\r\n\t\t\tctx.restore();\r\n\r\n\r\n\t\t\tif (target.filters && target.filters.length) {\r\n\t\t\t\tthis._applyFilters(ctx);\r\n\t\t\t}\r\n\t\t}\r\n\t\tsurface._invalid = true;\r\n\t};\r\n\r\n\t/**\r\n\t * Work through every filter and apply its individual visual transformation.\r\n\t * @method _applyFilters\r\n\t * @protected\r\n\t **/\r\n\tp._applyFilters = function(ctx) {\r\n\t\tvar filters = this.target.filters;\r\n\r\n\t\tvar w = this._drawWidth;\r\n\t\tvar h = this._drawHeight;\r\n\r\n\t\tvar data;\r\n\r\n\t\tvar i = 0, filter = filters[i];\r\n\t\tdo { // this is safe because we wouldn't be in apply filters without a filter count of at least 1\r\n\t\t\tif(filter.usesContext){\r\n\t\t\t\tif(data) {\r\n\t\t\t\t\tctx.putImageData(data, 0,0);\r\n\t\t\t\t\tdata = null;\r\n\t\t\t\t}\r\n\t\t\t\tfilter.applyFilter(ctx, 0,0, w,h);\r\n\t\t\t} else {\r\n\t\t\t\tif(!data) {\r\n\t\t\t\t\tdata = ctx.getImageData(0,0, w,h);\r\n\t\t\t\t}\r\n\t\t\t\tfilter._applyFilter(data);\r\n\t\t\t}\r\n\r\n\t\t\t// work through the multipass if it's there, otherwise move on\r\n\t\t\tfilter = filter._multiPass !== null ? filter._multiPass : filters[++i];\r\n\t\t} while (filter);\r\n\r\n\t\t//done\r\n\t\tif(data) {\r\n\t\t\tctx.putImageData(data, 0,0);\r\n\t\t}\r\n\t};\r\n\r\n\tcreatejs.BitmapCache = BitmapCache;\r\n}());\r\n\r\n//##############################################################################\r\n// BlurFilter.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * Applies a box blur to DisplayObjects in context 2D and a Gaussian blur in webgl. Note that this filter is fairly\r\n\t * intensive, particularly if the quality is set higher than 1.\r\n\t *\r\n\t *

    Example

    \r\n\t * This example creates a red circle, and then applies a 5 pixel blur to it. It uses the {{#crossLink \"Filter/getBounds\"}}{{/crossLink}}\r\n\t * method to account for the spread that the blur causes.\r\n\t *\r\n\t * var shape = new createjs.Shape().set({x:100,y:100});\r\n\t * shape.graphics.beginFill(\"#ff0000\").drawCircle(0,0,50);\r\n\t *\r\n\t * var blurFilter = new createjs.BlurFilter(5, 5, 1);\r\n\t * shape.filters = [blurFilter];\r\n\t * var bounds = blurFilter.getBounds();\r\n\t *\r\n\t * shape.cache(-50+bounds.x, -50+bounds.y, 100+bounds.width, 100+bounds.height);\r\n\t *\r\n\t * See {{#crossLink \"Filter\"}}{{/crossLink}} for an more information on applying filters.\r\n\t * @class BlurFilter\r\n\t * @extends Filter\r\n\t * @constructor\r\n\t * @param {Number} [blurX=0] The horizontal blur radius in pixels.\r\n\t * @param {Number} [blurY=0] The vertical blur radius in pixels.\r\n\t * @param {Number} [quality=1] The number of blur iterations.\r\n\t **/\r\n\tfunction BlurFilter( blurX, blurY, quality) {\r\n\t\tthis.Filter_constructor();\r\n\r\n\t\t// public properties:\r\n\t\t/**\r\n\t\t * Horizontal blur radius in pixels\r\n\t\t * @property blurX\r\n\t\t * @default 0\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis._blurX = blurX;\r\n\t\tthis._blurXTable = [];\r\n\t\tthis._lastBlurX = null;\r\n\r\n\t\t/**\r\n\t\t * Vertical blur radius in pixels\r\n\t\t * @property blurY\r\n\t\t * @default 0\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis._blurY = blurY;\r\n\t\tthis._blurYTable = [];\r\n\t\tthis._lastBlurY = null;\r\n\r\n\t\t/**\r\n\t\t * Number of blur iterations. For example, a value of 1 will produce a rough blur. A value of 2 will produce a\r\n\t\t * smoother blur, but take twice as long to run.\r\n\t\t * @property quality\r\n\t\t * @default 1\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis._quality;\r\n\t\tthis._lastQuality = null;\r\n\r\n\t\t/**\r\n\t\t * This is a template to generate the shader for {{#crossLink FRAG_SHADER_BODY}}{{/crossLink}}\r\n\t\t */\r\n\t\tthis.FRAG_SHADER_TEMPLATE = (\r\n\t\t\t\"uniform float xWeight[{{blurX}}];\" +\r\n\t\t\t\"uniform float yWeight[{{blurY}}];\" +\r\n\t\t\t\"uniform vec2 textureOffset;\" +\r\n\t\t\t\"void main(void) {\" +\r\n\t\t\t\t\"vec4 color = vec4(0.0);\" +\r\n\r\n\t\t\t\t\"float xAdj = ({{blurX}}.0-1.0)/2.0;\" +\r\n\t\t\t\t\"float yAdj = ({{blurY}}.0-1.0)/2.0;\" +\r\n\t\t\t\t\"vec2 sampleOffset;\" +\r\n\r\n\t\t\t\t\"for(int i=0; i<{{blurX}}; i++) {\" +\r\n\t\t\t\t\t\"for(int j=0; j<{{blurY}}; j++) {\" +\r\n\t\t\t\t\t\t\"sampleOffset = vRenderCoord + (textureOffset * vec2(float(i)-xAdj, float(j)-yAdj));\" +\r\n\t\t\t\t\t\t\"color += texture2D(uSampler, sampleOffset) * (xWeight[i] * yWeight[j]);\" +\r\n\t\t\t\t\t\"}\" +\r\n\t\t\t\t\"}\" +\r\n\r\n\t\t\t\t\"gl_FragColor = color.rgba;\" +\r\n\t\t\t\"}\"\r\n\t\t);\r\n\r\n\t\t// update the filter using the setters\r\n\t\tif(isNaN(quality) || quality < 1){ quality = 1; }\r\n\t\tthis.setQuality(quality|0);\r\n\t}\r\n\tvar p = createjs.extend(BlurFilter, createjs.Filter);\r\n\r\n\t// TODO: deprecated\r\n\t// p.initialize = function() {}; // searchable for devs wondering where it is. REMOVED. See docs for details.\r\n\r\n\tp.getBlurX = function() { return this._blurX; };\r\n\tp.getBlurY = function() { return this._blurY; };\r\n\tp.setBlurX = function(value) {\r\n\t\tif(isNaN(value) || value < 0){ value = 0; }\r\n\t\tthis._blurX = value;\r\n\t};\r\n\tp.setBlurY = function(value) {\r\n\t\tif(isNaN(value) || value < 0){ value = 0; }\r\n\t\tthis._blurY = value;\r\n\t};\r\n\tp.getQuality = function() { return this._quality; };\r\n\tp.setQuality = function(value) {\r\n\t\tif(isNaN(value) || value < 0){ value = 0; }\r\n\t\tthis._quality = value | 0;\r\n\t};\r\n\tp._getShader = function() {\r\n\t\tvar xChange = this._lastBlurX !== this._blurX;\r\n\t\tvar yChange = this._lastBlurY !== this._blurY;\r\n\t\tvar qChange = this._lastQuality !== this._quality;\r\n\t\tif(xChange || yChange || qChange) {\r\n\t\t\tif(xChange || qChange) { this._blurXTable = this._getTable(this._blurX * this._quality); }\r\n\t\t\tif(yChange || qChange) { this._blurYTable = this._getTable(this._blurY * this._quality); }\r\n\t\t\tthis._updateShader();\r\n\t\t\tthis._lastBlurX = this._blurX;\r\n\t\t\tthis._lastBlurY = this._blurY;\r\n\t\t\tthis._lastQuality = this._quality;\r\n\t\t\treturn undefined; // force a rebuild\r\n\t\t}\r\n\t\treturn this._compiledShader;\r\n\t};\r\n\tp._setShader = function() { this._compiledShader; };\r\n\r\n\ttry {\r\n\t\tObject.defineProperties(p, {\r\n\t\t\tblurX: { get: p.getBlurX, set: p.setBlurX },\r\n\t\t\tblurY: { get: p.getBlurY, set: p.setBlurY },\r\n\t\t\tquality: { get: p.getQuality, set: p.setQuality },\r\n\t\t\t_builtShader: { get: p._getShader, set: p._setShader}\r\n\t\t});\r\n\t} catch (e) { console.log(e); }\r\n\r\n\t/**\r\n\t * Internal lookup function to create gaussian distribution.\r\n\t * @method _getTable\r\n\t * @param {Number} spread How many steps in the curve.\r\n\t * @return {Array} An array with Math.ceil(spread*2) entries with appropriately distributed weights.\r\n\t */\r\n\tp._getTable = function(spread) {\r\n\t\tvar EDGE = 4.2;\r\n\t\tif(spread<=1) { return [1]; }\r\n\r\n\t\tvar result = [];\r\n\t\tvar count = Math.ceil(spread*2);\r\n\t\tcount += (count%2)?0:1;\r\n\t\tvar adjust = (count/2)|0;\r\n\t\tfor(var i = -adjust; i<=adjust; i++) {\r\n\t\t\tvar x = (i/adjust)*EDGE;\r\n\t\t\tresult.push(1/Math.sqrt(2*Math.PI) * Math.pow(Math.E, -(Math.pow(x,2)/4)));\r\n\t\t}\r\n\t\tvar factor = result.reduce(function(a, b) { return a + b; });\r\n\t\treturn result.map(function(currentValue, index, array) { return currentValue/factor; });\r\n\t};\r\n\r\n\t/**\r\n\t * Internal update function to create shader properties.\r\n\t * @method _updateShader\r\n\t */\r\n\tp._updateShader = function() {\r\n\t\tif(this._blurX === undefined || this._blurY === undefined){ return; }\r\n\t\tvar result = this.FRAG_SHADER_TEMPLATE;\r\n\t\tresult = result.replace(/\\{\\{blurX\\}\\}/g, (this._blurXTable.length).toFixed(0));\r\n\t\tresult = result.replace(/\\{\\{blurY\\}\\}/g, (this._blurYTable.length).toFixed(0));\r\n\t\tthis.FRAG_SHADER_BODY = result;\r\n\t};\r\n\r\n\t/** docced in super class **/\r\n\tp.shaderParamSetup = function(gl, stage, shaderProgram) {\r\n\t\t// load the normalized gaussian weight tables\r\n\t\tgl.uniform1fv(\r\n\t\t\tgl.getUniformLocation(shaderProgram, \"xWeight\"),\r\n\t\t\tthis._blurXTable\r\n\t\t);\r\n\t\tgl.uniform1fv(\r\n\t\t\tgl.getUniformLocation(shaderProgram, \"yWeight\"),\r\n\t\t\tthis._blurYTable\r\n\t\t);\r\n\r\n\t\t// what is the size of a single pixel in -1, 1 (webGL) space\r\n\t\tgl.uniform2f(\r\n\t\t\tgl.getUniformLocation(shaderProgram, \"textureOffset\"),\r\n\t\t\t2/(stage._viewportWidth*this._quality), 2/(stage._viewportHeight*this._quality)\r\n\t\t);\r\n\t};\r\n\r\n// constants:\r\n\t/**\r\n\t * Array of multiply values for blur calculations.\r\n\t * @property MUL_TABLE\r\n\t * @type Array\r\n\t * @protected\r\n\t * @static\r\n\t **/\r\n\tBlurFilter.MUL_TABLE = [1, 171, 205, 293, 57, 373, 79, 137, 241, 27, 391, 357, 41, 19, 283, 265, 497, 469, 443, 421, 25, 191, 365, 349, 335, 161, 155, 149, 9, 278, 269, 261, 505, 245, 475, 231, 449, 437, 213, 415, 405, 395, 193, 377, 369, 361, 353, 345, 169, 331, 325, 319, 313, 307, 301, 37, 145, 285, 281, 69, 271, 267, 263, 259, 509, 501, 493, 243, 479, 118, 465, 459, 113, 446, 55, 435, 429, 423, 209, 413, 51, 403, 199, 393, 97, 3, 379, 375, 371, 367, 363, 359, 355, 351, 347, 43, 85, 337, 333, 165, 327, 323, 5, 317, 157, 311, 77, 305, 303, 75, 297, 294, 73, 289, 287, 71, 141, 279, 277, 275, 68, 135, 67, 133, 33, 262, 260, 129, 511, 507, 503, 499, 495, 491, 61, 121, 481, 477, 237, 235, 467, 232, 115, 457, 227, 451, 7, 445, 221, 439, 218, 433, 215, 427, 425, 211, 419, 417, 207, 411, 409, 203, 202, 401, 399, 396, 197, 49, 389, 387, 385, 383, 95, 189, 47, 187, 93, 185, 23, 183, 91, 181, 45, 179, 89, 177, 11, 175, 87, 173, 345, 343, 341, 339, 337, 21, 167, 83, 331, 329, 327, 163, 81, 323, 321, 319, 159, 79, 315, 313, 39, 155, 309, 307, 153, 305, 303, 151, 75, 299, 149, 37, 295, 147, 73, 291, 145, 289, 287, 143, 285, 71, 141, 281, 35, 279, 139, 69, 275, 137, 273, 17, 271, 135, 269, 267, 133, 265, 33, 263, 131, 261, 130, 259, 129, 257, 1];\r\n\r\n\t/**\r\n\t * Array of shift values for blur calculations.\r\n\t * @property SHG_TABLE\r\n\t * @type Array\r\n\t * @protected\r\n\t * @static\r\n\t **/\r\n\tBlurFilter.SHG_TABLE = [0, 9, 10, 11, 9, 12, 10, 11, 12, 9, 13, 13, 10, 9, 13, 13, 14, 14, 14, 14, 10, 13, 14, 14, 14, 13, 13, 13, 9, 14, 14, 14, 15, 14, 15, 14, 15, 15, 14, 15, 15, 15, 14, 15, 15, 15, 15, 15, 14, 15, 15, 15, 15, 15, 15, 12, 14, 15, 15, 13, 15, 15, 15, 15, 16, 16, 16, 15, 16, 14, 16, 16, 14, 16, 13, 16, 16, 16, 15, 16, 13, 16, 15, 16, 14, 9, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, 14, 16, 16, 15, 16, 16, 10, 16, 15, 16, 14, 16, 16, 14, 16, 16, 14, 16, 16, 14, 15, 16, 16, 16, 14, 15, 14, 15, 13, 16, 16, 15, 17, 17, 17, 17, 17, 17, 14, 15, 17, 17, 16, 16, 17, 16, 15, 17, 16, 17, 11, 17, 16, 17, 16, 17, 16, 17, 17, 16, 17, 17, 16, 17, 17, 16, 16, 17, 17, 17, 16, 14, 17, 17, 17, 17, 15, 16, 14, 16, 15, 16, 13, 16, 15, 16, 14, 16, 15, 16, 12, 16, 15, 16, 17, 17, 17, 17, 17, 13, 16, 15, 17, 17, 17, 16, 15, 17, 17, 17, 16, 15, 17, 17, 14, 16, 17, 17, 16, 17, 17, 16, 15, 17, 16, 14, 17, 16, 15, 17, 16, 17, 17, 16, 17, 15, 16, 17, 14, 17, 16, 15, 17, 16, 17, 13, 17, 16, 17, 17, 16, 17, 14, 17, 16, 17, 16, 17, 16, 17, 9];\r\n\r\n// public methods:\r\n\t/** docced in super class **/\r\n\tp.getBounds = function (rect) {\r\n\t\tvar x = this.blurX|0, y = this.blurY| 0;\r\n\t\tif(x <= 0 && y <= 0) { return rect; }\r\n\t\tvar q = Math.pow(this.quality, 0.2);\r\n\t\treturn (rect || new createjs.Rectangle()).pad(y*q+1,x*q+1,y*q+1,x*q+1);\r\n\t};\r\n\r\n\t/** docced in super class **/\r\n\tp.clone = function() {\r\n\t\treturn new BlurFilter(this.blurX, this.blurY, this.quality);\r\n\t};\r\n\r\n\t/** docced in super class **/\r\n\tp.toString = function() {\r\n\t\treturn \"[BlurFilter]\";\r\n\t};\r\n\r\n\r\n// private methods:\r\n\r\n\t/** docced in super class **/\r\n\tp._applyFilter = function (imageData) {\r\n\t\tvar radiusX = this._blurX >> 1;\r\n\t\tif (isNaN(radiusX) || radiusX < 0) return false;\r\n\t\tvar radiusY = this._blurY >> 1;\r\n\t\tif (isNaN(radiusY) || radiusY < 0) return false;\r\n\t\tif (radiusX == 0 && radiusY == 0) return false;\r\n\r\n\t\tvar iterations = this.quality;\r\n\t\tif (isNaN(iterations) || iterations < 1) iterations = 1;\r\n\t\titerations |= 0;\r\n\t\tif (iterations > 3) iterations = 3;\r\n\t\tif (iterations < 1) iterations = 1;\r\n\r\n\t\tvar px = imageData.data;\r\n\t\tvar x=0, y=0, i=0, p=0, yp=0, yi=0, yw=0, r=0, g=0, b=0, a=0, pr=0, pg=0, pb=0, pa=0;\r\n\r\n\t\tvar divx = (radiusX + radiusX + 1) | 0;\r\n\t\tvar divy = (radiusY + radiusY + 1) | 0;\r\n\t\tvar w = imageData.width | 0;\r\n\t\tvar h = imageData.height | 0;\r\n\r\n\t\tvar w1 = (w - 1) | 0;\r\n\t\tvar h1 = (h - 1) | 0;\r\n\t\tvar rxp1 = (radiusX + 1) | 0;\r\n\t\tvar ryp1 = (radiusY + 1) | 0;\r\n\r\n\t\tvar ssx = {r:0,b:0,g:0,a:0};\r\n\t\tvar sx = ssx;\r\n\t\tfor ( i = 1; i < divx; i++ )\r\n\t\t{\r\n\t\t\tsx = sx.n = {r:0,b:0,g:0,a:0};\r\n\t\t}\r\n\t\tsx.n = ssx;\r\n\r\n\t\tvar ssy = {r:0,b:0,g:0,a:0};\r\n\t\tvar sy = ssy;\r\n\t\tfor ( i = 1; i < divy; i++ )\r\n\t\t{\r\n\t\t\tsy = sy.n = {r:0,b:0,g:0,a:0};\r\n\t\t}\r\n\t\tsy.n = ssy;\r\n\r\n\t\tvar si = null;\r\n\r\n\r\n\t\tvar mtx = BlurFilter.MUL_TABLE[radiusX] | 0;\r\n\t\tvar stx = BlurFilter.SHG_TABLE[radiusX] | 0;\r\n\t\tvar mty = BlurFilter.MUL_TABLE[radiusY] | 0;\r\n\t\tvar sty = BlurFilter.SHG_TABLE[radiusY] | 0;\r\n\r\n\t\twhile (iterations-- > 0) {\r\n\r\n\t\t\tyw = yi = 0;\r\n\t\t\tvar ms = mtx;\r\n\t\t\tvar ss = stx;\r\n\t\t\tfor (y = h; --y > -1;) {\r\n\t\t\t\tr = rxp1 * (pr = px[(yi) | 0]);\r\n\t\t\t\tg = rxp1 * (pg = px[(yi + 1) | 0]);\r\n\t\t\t\tb = rxp1 * (pb = px[(yi + 2) | 0]);\r\n\t\t\t\ta = rxp1 * (pa = px[(yi + 3) | 0]);\r\n\r\n\t\t\t\tsx = ssx;\r\n\r\n\t\t\t\tfor( i = rxp1; --i > -1; )\r\n\t\t\t\t{\r\n\t\t\t\t\tsx.r = pr;\r\n\t\t\t\t\tsx.g = pg;\r\n\t\t\t\t\tsx.b = pb;\r\n\t\t\t\t\tsx.a = pa;\r\n\t\t\t\t\tsx = sx.n;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor( i = 1; i < rxp1; i++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tp = (yi + ((w1 < i ? w1 : i) << 2)) | 0;\r\n\t\t\t\t\tr += ( sx.r = px[p]);\r\n\t\t\t\t\tg += ( sx.g = px[p+1]);\r\n\t\t\t\t\tb += ( sx.b = px[p+2]);\r\n\t\t\t\t\ta += ( sx.a = px[p+3]);\r\n\r\n\t\t\t\t\tsx = sx.n;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsi = ssx;\r\n\t\t\t\tfor ( x = 0; x < w; x++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tpx[yi++] = (r * ms) >>> ss;\r\n\t\t\t\t\tpx[yi++] = (g * ms) >>> ss;\r\n\t\t\t\t\tpx[yi++] = (b * ms) >>> ss;\r\n\t\t\t\t\tpx[yi++] = (a * ms) >>> ss;\r\n\r\n\t\t\t\t\tp = ((yw + ((p = x + radiusX + 1) < w1 ? p : w1)) << 2);\r\n\r\n\t\t\t\t\tr -= si.r - ( si.r = px[p]);\r\n\t\t\t\t\tg -= si.g - ( si.g = px[p+1]);\r\n\t\t\t\t\tb -= si.b - ( si.b = px[p+2]);\r\n\t\t\t\t\ta -= si.a - ( si.a = px[p+3]);\r\n\r\n\t\t\t\t\tsi = si.n;\r\n\r\n\t\t\t\t}\r\n\t\t\t\tyw += w;\r\n\t\t\t}\r\n\r\n\t\t\tms = mty;\r\n\t\t\tss = sty;\r\n\t\t\tfor (x = 0; x < w; x++) {\r\n\t\t\t\tyi = (x << 2) | 0;\r\n\r\n\t\t\t\tr = (ryp1 * (pr = px[yi])) | 0;\r\n\t\t\t\tg = (ryp1 * (pg = px[(yi + 1) | 0])) | 0;\r\n\t\t\t\tb = (ryp1 * (pb = px[(yi + 2) | 0])) | 0;\r\n\t\t\t\ta = (ryp1 * (pa = px[(yi + 3) | 0])) | 0;\r\n\r\n\t\t\t\tsy = ssy;\r\n\t\t\t\tfor( i = 0; i < ryp1; i++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tsy.r = pr;\r\n\t\t\t\t\tsy.g = pg;\r\n\t\t\t\t\tsy.b = pb;\r\n\t\t\t\t\tsy.a = pa;\r\n\t\t\t\t\tsy = sy.n;\r\n\t\t\t\t}\r\n\r\n\t\t\t\typ = w;\r\n\r\n\t\t\t\tfor( i = 1; i <= radiusY; i++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tyi = ( yp + x ) << 2;\r\n\r\n\t\t\t\t\tr += ( sy.r = px[yi]);\r\n\t\t\t\t\tg += ( sy.g = px[yi+1]);\r\n\t\t\t\t\tb += ( sy.b = px[yi+2]);\r\n\t\t\t\t\ta += ( sy.a = px[yi+3]);\r\n\r\n\t\t\t\t\tsy = sy.n;\r\n\r\n\t\t\t\t\tif( i < h1 )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\typ += w;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tyi = x;\r\n\t\t\t\tsi = ssy;\r\n\t\t\t\tif ( iterations > 0 )\r\n\t\t\t\t{\r\n\t\t\t\t\tfor ( y = 0; y < h; y++ )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tp = yi << 2;\r\n\t\t\t\t\t\tpx[p+3] = pa =(a * ms) >>> ss;\r\n\t\t\t\t\t\tif ( pa > 0 )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tpx[p] = ((r * ms) >>> ss );\r\n\t\t\t\t\t\t\tpx[p+1] = ((g * ms) >>> ss );\r\n\t\t\t\t\t\t\tpx[p+2] = ((b * ms) >>> ss );\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tpx[p] = px[p+1] = px[p+2] = 0\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tp = ( x + (( ( p = y + ryp1) < h1 ? p : h1 ) * w )) << 2;\r\n\r\n\t\t\t\t\t\tr -= si.r - ( si.r = px[p]);\r\n\t\t\t\t\t\tg -= si.g - ( si.g = px[p+1]);\r\n\t\t\t\t\t\tb -= si.b - ( si.b = px[p+2]);\r\n\t\t\t\t\t\ta -= si.a - ( si.a = px[p+3]);\r\n\r\n\t\t\t\t\t\tsi = si.n;\r\n\r\n\t\t\t\t\t\tyi += w;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfor ( y = 0; y < h; y++ )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tp = yi << 2;\r\n\t\t\t\t\t\tpx[p+3] = pa =(a * ms) >>> ss;\r\n\t\t\t\t\t\tif ( pa > 0 )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tpa = 255 / pa;\r\n\t\t\t\t\t\t\tpx[p] = ((r * ms) >>> ss ) * pa;\r\n\t\t\t\t\t\t\tpx[p+1] = ((g * ms) >>> ss ) * pa;\r\n\t\t\t\t\t\t\tpx[p+2] = ((b * ms) >>> ss ) * pa;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tpx[p] = px[p+1] = px[p+2] = 0\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tp = ( x + (( ( p = y + ryp1) < h1 ? p : h1 ) * w )) << 2;\r\n\r\n\t\t\t\t\t\tr -= si.r - ( si.r = px[p]);\r\n\t\t\t\t\t\tg -= si.g - ( si.g = px[p+1]);\r\n\t\t\t\t\t\tb -= si.b - ( si.b = px[p+2]);\r\n\t\t\t\t\t\ta -= si.a - ( si.a = px[p+3]);\r\n\r\n\t\t\t\t\t\tsi = si.n;\r\n\r\n\t\t\t\t\t\tyi += w;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn true;\r\n\t};\r\n\r\n\tcreatejs.BlurFilter = createjs.promote(BlurFilter, \"Filter\");\r\n}());\r\n\r\n//##############################################################################\r\n// AlphaMapFilter.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\t\r\n\t\r\n// constructor:\r\n\t/**\r\n\t * Applies a greyscale alpha map image (or canvas) to the target, such that the alpha channel of the result will\r\n\t * be copied from the red channel of the map, and the RGB channels will be copied from the target.\r\n\t *\r\n\t * Generally, it is recommended that you use {{#crossLink \"AlphaMaskFilter\"}}{{/crossLink}}, because it has much\r\n\t * better performance.\r\n\t *\r\n\t *

    Example

    \r\n\t * This example draws a red->blue box, caches it, and then uses the cache canvas as an alpha map on a 100x100 image.\r\n\t *\r\n\t * var box = new createjs.Shape();\r\n\t * box.graphics.beginLinearGradientFill([\"#ff0000\", \"#0000ff\"], [0, 1], 0, 0, 0, 100)\r\n\t * box.graphics.drawRect(0, 0, 100, 100);\r\n\t * box.cache(0, 0, 100, 100);\r\n\t *\r\n\t * var bmp = new createjs.Bitmap(\"path/to/image.jpg\");\r\n\t * bmp.filters = [\r\n\t * new createjs.AlphaMapFilter(box.cacheCanvas)\r\n\t * ];\r\n\t * bmp.cache(0, 0, 100, 100);\r\n\t * stage.addChild(bmp);\r\n\t *\r\n\t * See {{#crossLink \"Filter\"}}{{/crossLink}} for more information on applying filters.\r\n\t * @class AlphaMapFilter\r\n\t * @extends Filter\r\n\t * @constructor\r\n\t * @param {HTMLImageElement|HTMLCanvasElement} alphaMap The greyscale image (or canvas) to use as the alpha value for the\r\n\t * result. This should be exactly the same dimensions as the target.\r\n\t **/\r\n\tfunction AlphaMapFilter(alphaMap) {\r\n\t\tthis.Filter_constructor();\r\n\t\r\n\t// public properties:\r\n\t\t/**\r\n\t\t * The greyscale image (or canvas) to use as the alpha value for the result. This should be exactly the same\r\n\t\t * dimensions as the target.\r\n\t\t * @property alphaMap\r\n\t\t * @type HTMLImageElement|HTMLCanvasElement\r\n\t\t **/\r\n\t\tthis.alphaMap = alphaMap;\r\n\t\t\r\n\t\t\r\n\t// private properties:\r\n\t\t/**\r\n\t\t * @property _alphaMap\r\n\t\t * @protected\r\n\t\t * @type HTMLImageElement|HTMLCanvasElement\r\n\t\t **/\r\n\t\tthis._alphaMap = null;\r\n\t\t\r\n\t\t/**\r\n\t\t * @property _mapData\r\n\t\t * @protected\r\n\t\t * @type Uint8ClampedArray\r\n\t\t **/\r\n\t\tthis._mapData = null;\r\n\t\tthis._mapTexture = null;\r\n\r\n\t\tthis.FRAG_SHADER_BODY = (\r\n\t\t\t\"uniform sampler2D uAlphaSampler;\"+\r\n\r\n\t\t\t\"void main(void) {\" +\r\n\t\t\t\t\"vec4 color = texture2D(uSampler, vRenderCoord);\" +\r\n\t\t\t\t\"vec4 alphaMap = texture2D(uAlphaSampler, vTextureCoord);\" +\r\n\r\n\t\t\t\t// some image formats can have transparent white rgba(1,1,1, 0) when put on the GPU, this means we need a slight tweak\r\n\t\t\t\t// using ceil ensure that the colour will be used so long as it exists but pure transparency will be treated black\r\n\t\t\t\t\"gl_FragColor = vec4(color.rgb, color.a * (alphaMap.r * ceil(alphaMap.a)));\" +\r\n\t\t\t\"}\"\r\n\t\t);\r\n\t}\r\n\tvar p = createjs.extend(AlphaMapFilter, createjs.Filter);\r\n\r\n\t// TODO: deprecated\r\n\t// p.initialize = function() {}; // searchable for devs wondering where it is. REMOVED. See docs for details.\r\n\r\n\t/** docced in super class **/\r\n\tp.shaderParamSetup = function(gl, stage, shaderProgram) {\r\n\t\tif(!this._mapTexture) { this._mapTexture = gl.createTexture(); }\r\n\r\n\t\tgl.activeTexture(gl.TEXTURE1);\r\n\t\tgl.bindTexture(gl.TEXTURE_2D, this._mapTexture);\r\n\t\tstage.setTextureParams(gl);\r\n\t\tgl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this.alphaMap);\r\n\r\n\t\tgl.uniform1i(\r\n\t\t\tgl.getUniformLocation(shaderProgram, \"uAlphaSampler\"),\r\n\t\t\t1\r\n\t\t);\r\n\t};\r\n\r\n// public methods:\r\n\t/** docced in super class **/\r\n\tp.clone = function () {\r\n\t\tvar o = new AlphaMapFilter(this.alphaMap);\r\n\t\to._alphaMap = this._alphaMap;\r\n\t\to._mapData = this._mapData;\r\n\t\treturn o;\r\n\t};\r\n\r\n\t/** docced in super class **/\r\n\tp.toString = function () {\r\n\t\treturn \"[AlphaMapFilter]\";\r\n\t};\r\n\r\n\r\n// private methods:\r\n\t/** docced in super class **/\r\n\tp._applyFilter = function (imageData) {\r\n\t\tif (!this.alphaMap) { return true; }\r\n\t\tif (!this._prepAlphaMap()) { return false; }\r\n\t\t\r\n\t\t// TODO: update to support scenarios where the target has different dimensions.\r\n\t\tvar data = imageData.data;\r\n\t\tvar map = this._mapData;\r\n\t\tfor(var i=0, l=data.length; iIMPORTANT NOTE: This filter currently does not support the targetCtx, or targetX/Y parameters correctly.\r\n\t *\r\n\t *

    Example

    \r\n\t * This example draws a gradient box, then caches it and uses the \"cacheCanvas\" as the alpha mask on a 100x100 image.\r\n\t *\r\n\t * var box = new createjs.Shape();\r\n\t * box.graphics.beginLinearGradientFill([\"#000000\", \"rgba(0, 0, 0, 0)\"], [0, 1], 0, 0, 100, 100)\r\n\t * box.graphics.drawRect(0, 0, 100, 100);\r\n\t * box.cache(0, 0, 100, 100);\r\n\t *\r\n\t * var bmp = new createjs.Bitmap(\"path/to/image.jpg\");\r\n\t * bmp.filters = [\r\n\t * new createjs.AlphaMaskFilter(box.cacheCanvas)\r\n\t * ];\r\n\t * bmp.cache(0, 0, 100, 100);\r\n\t *\r\n\t * See {{#crossLink \"Filter\"}}{{/crossLink}} for more information on applying filters.\r\n\t * @class AlphaMaskFilter\r\n\t * @extends Filter\r\n\t * @constructor\r\n\t * @param {HTMLImageElement|HTMLCanvasElement} mask\r\n\t **/\r\n\tfunction AlphaMaskFilter(mask) {\r\n\t\tthis.Filter_constructor();\r\n\t\r\n\t// public properties:\r\n\t\t/**\r\n\t\t * The image (or canvas) to use as the mask.\r\n\t\t * @property mask\r\n\t\t * @type HTMLImageElement|HTMLCanvasElement\r\n\t\t **/\r\n\t\tthis.mask = mask;\r\n\r\n\t\t/** docced in super class **/\r\n\t\tthis.usesContext = true;\r\n\r\n\t\tthis.FRAG_SHADER_BODY = (\r\n\t\t\t\"uniform sampler2D uAlphaSampler;\"+\r\n\r\n\t\t\t\"void main(void) {\" +\r\n\t\t\t\t\"vec4 color = texture2D(uSampler, vRenderCoord);\" +\r\n\t\t\t\t\"vec4 alphaMap = texture2D(uAlphaSampler, vTextureCoord);\" +\r\n\r\n\t\t\t\t\"gl_FragColor = vec4(color.rgb, color.a * alphaMap.a);\" +\r\n\t\t\t\"}\"\r\n\t\t);\r\n\t}\r\n\tvar p = createjs.extend(AlphaMaskFilter, createjs.Filter);\r\n\r\n\t// TODO: deprecated\r\n\t// p.initialize = function() {}; // searchable for devs wondering where it is. REMOVED. See docs for details.\r\n\r\n\t/** docced in super class **/\r\n\tp.shaderParamSetup = function(gl, stage, shaderProgram) {\r\n\t\tif(!this._mapTexture) { this._mapTexture = gl.createTexture(); }\r\n\r\n\t\tgl.activeTexture(gl.TEXTURE1);\r\n\t\tgl.bindTexture(gl.TEXTURE_2D, this._mapTexture);\r\n\t\tstage.setTextureParams(gl);\r\n\t\tgl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this.mask);\r\n\r\n\t\tgl.uniform1i(\r\n\t\t\tgl.getUniformLocation(shaderProgram, \"uAlphaSampler\"),\r\n\t\t\t1\r\n\t\t);\r\n\t};\r\n\r\n// public methods:\r\n\t/**\r\n\t * Applies the filter to the specified context.\r\n\t *\r\n\t * IMPORTANT NOTE: This filter currently does not support the targetCtx, or targetX/Y parameters\r\n\t * correctly.\r\n\t * @method applyFilter\r\n\t * @param {CanvasRenderingContext2D} ctx The 2D context to use as the source.\r\n\t * @param {Number} x The x position to use for the source rect.\r\n\t * @param {Number} y The y position to use for the source rect.\r\n\t * @param {Number} width The width to use for the source rect.\r\n\t * @param {Number} height The height to use for the source rect.\r\n\t * @param {CanvasRenderingContext2D} [targetCtx] NOT SUPPORTED IN THIS FILTER. The 2D context to draw the result to. Defaults to the context passed to ctx.\r\n\t * @param {Number} [targetX] NOT SUPPORTED IN THIS FILTER. The x position to draw the result to. Defaults to the value passed to x.\r\n\t * @param {Number} [targetY] NOT SUPPORTED IN THIS FILTER. The y position to draw the result to. Defaults to the value passed to y.\r\n\t * @return {Boolean} If the filter was applied successfully.\r\n\t **/\r\n\tp.applyFilter = function (ctx, x, y, width, height, targetCtx, targetX, targetY) {\r\n\t\tif (!this.mask) { return true; }\r\n\t\ttargetCtx = targetCtx || ctx;\r\n\t\tif (targetX == null) { targetX = x; }\r\n\t\tif (targetY == null) { targetY = y; }\r\n\r\n\t\ttargetCtx.save();\r\n\t\tif (ctx != targetCtx) {\r\n\t\t\t// TODO: support targetCtx and targetX/Y\r\n\t\t\t// clearRect, then draw the ctx in?\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\ttargetCtx.globalCompositeOperation = \"destination-in\";\r\n\t\ttargetCtx.drawImage(this.mask, targetX, targetY);\r\n\t\ttargetCtx.restore();\r\n\t\treturn true;\r\n\t};\r\n\r\n\t/** docced in super class **/\r\n\tp.clone = function () {\r\n\t\treturn new AlphaMaskFilter(this.mask);\r\n\t};\r\n\r\n\t/** docced in super class **/\r\n\tp.toString = function () {\r\n\t\treturn \"[AlphaMaskFilter]\";\r\n\t};\r\n\r\n\r\n\tcreatejs.AlphaMaskFilter = createjs.promote(AlphaMaskFilter, \"Filter\");\r\n}());\r\n\r\n//##############################################################################\r\n// ColorFilter.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * Applies a color transform to DisplayObjects.\r\n\t *\r\n\t *

    Example

    \r\n\t * This example draws a red circle, and then transforms it to Blue. This is accomplished by multiplying all the channels\r\n\t * to 0 (except alpha, which is set to 1), and then adding 255 to the blue channel.\r\n\t *\r\n\t * var shape = new createjs.Shape().set({x:100,y:100});\r\n\t * shape.graphics.beginFill(\"#ff0000\").drawCircle(0,0,50);\r\n\t *\r\n\t * shape.filters = [\r\n\t * new createjs.ColorFilter(0,0,0,1, 0,0,255,0)\r\n\t * ];\r\n\t * shape.cache(-50, -50, 100, 100);\r\n\t *\r\n\t * See {{#crossLink \"Filter\"}}{{/crossLink}} for an more information on applying filters.\r\n\t * @class ColorFilter\r\n\t * @param {Number} [redMultiplier=1] The amount to multiply against the red channel. This is a range between 0 and 1.\r\n\t * @param {Number} [greenMultiplier=1] The amount to multiply against the green channel. This is a range between 0 and 1.\r\n\t * @param {Number} [blueMultiplier=1] The amount to multiply against the blue channel. This is a range between 0 and 1.\r\n\t * @param {Number} [alphaMultiplier=1] The amount to multiply against the alpha channel. This is a range between 0 and 1.\r\n\t * @param {Number} [redOffset=0] The amount to add to the red channel after it has been multiplied. This is a range\r\n\t * between -255 and 255.\r\n\t * @param {Number} [greenOffset=0] The amount to add to the green channel after it has been multiplied. This is a range\r\n\t * between -255 and 255.\r\n\t * @param {Number} [blueOffset=0] The amount to add to the blue channel after it has been multiplied. This is a range\r\n\t * between -255 and 255.\r\n\t * @param {Number} [alphaOffset=0] The amount to add to the alpha channel after it has been multiplied. This is a range\r\n\t * between -255 and 255.\r\n\t * @constructor\r\n\t * @extends Filter\r\n\t **/\r\n\tfunction ColorFilter(redMultiplier, greenMultiplier, blueMultiplier, alphaMultiplier, redOffset, greenOffset, blueOffset, alphaOffset) {\r\n\t\tthis.Filter_constructor();\r\n\r\n\t// public properties:\r\n\t\t/**\r\n\t\t * Red channel multiplier.\r\n\t\t * @property redMultiplier\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis.redMultiplier = redMultiplier != null ? redMultiplier : 1;\r\n\t\r\n\t\t/**\r\n\t\t * Green channel multiplier.\r\n\t\t * @property greenMultiplier\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis.greenMultiplier = greenMultiplier != null ? greenMultiplier : 1;\r\n\t\r\n\t\t/**\r\n\t\t * Blue channel multiplier.\r\n\t\t * @property blueMultiplier\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis.blueMultiplier = blueMultiplier != null ? blueMultiplier : 1;\r\n\t\r\n\t\t/**\r\n\t\t * Alpha channel multiplier.\r\n\t\t * @property alphaMultiplier\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis.alphaMultiplier = alphaMultiplier != null ? alphaMultiplier : 1;\r\n\t\r\n\t\t/**\r\n\t\t * Red channel offset (added to value).\r\n\t\t * @property redOffset\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis.redOffset = redOffset || 0;\r\n\t\r\n\t\t/**\r\n\t\t * Green channel offset (added to value).\r\n\t\t * @property greenOffset\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis.greenOffset = greenOffset || 0;\r\n\t\r\n\t\t/**\r\n\t\t * Blue channel offset (added to value).\r\n\t\t * @property blueOffset\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis.blueOffset = blueOffset || 0;\r\n\t\r\n\t\t/**\r\n\t\t * Alpha channel offset (added to value).\r\n\t\t * @property alphaOffset\r\n\t\t * @type Number\r\n\t\t **/\r\n\t\tthis.alphaOffset = alphaOffset || 0;\r\n\r\n\t\tthis.FRAG_SHADER_BODY = (\r\n\t\t\t\"uniform vec4 uColorMultiplier;\" +\r\n\t\t\t\"uniform vec4 uColorOffset;\" +\r\n\r\n\t\t\t\"void main(void) {\" +\r\n\t\t\t\t\"vec4 color = texture2D(uSampler, vRenderCoord);\" +\r\n\r\n\t\t\t\t\"gl_FragColor = (color * uColorMultiplier) + uColorOffset;\" +\r\n\t\t\t\"}\"\r\n\t\t);\r\n\r\n\t}\r\n\tvar p = createjs.extend(ColorFilter, createjs.Filter);\r\n\r\n\t// TODO: deprecated\r\n\t// p.initialize = function() {}; // searchable for devs wondering where it is. REMOVED. See docs for details.\r\n\r\n\r\n// public methods:\r\n\t/** docced in super class **/\r\n\tp.shaderParamSetup = function(gl, stage, shaderProgram) {\r\n\t\tgl.uniform4f(\r\n\t\t\tgl.getUniformLocation(shaderProgram, \"uColorMultiplier\"),\r\n\t\t\tthis.redMultiplier, this.greenMultiplier, this.blueMultiplier, this.alphaMultiplier\r\n\t\t);\r\n\r\n\t\tgl.uniform4f(\r\n\t\t\tgl.getUniformLocation(shaderProgram, \"uColorOffset\"),\r\n\t\t\tthis.redOffset/255, this.greenOffset/255, this.blueOffset/255, this.alphaOffset/255\r\n\t\t);\r\n\t};\r\n\r\n\t/** docced in super class **/\r\n\tp.toString = function() {\r\n\t\treturn \"[ColorFilter]\";\r\n\t};\r\n\r\n\t/** docced in super class **/\r\n\tp.clone = function() {\r\n\t\treturn new ColorFilter(\r\n\t\t\tthis.redMultiplier, this.greenMultiplier, this.blueMultiplier, this.alphaMultiplier,\r\n\t\t\tthis.redOffset, this.greenOffset, this.blueOffset, this.alphaOffset\r\n\t\t);\r\n\t};\r\n\r\n// private methods:\r\n\t/** docced in super class **/\r\n\tp._applyFilter = function(imageData) {\r\n\t\tvar data = imageData.data;\r\n\t\tvar l = data.length;\r\n\t\tfor (var i=0; iExample\r\n\t *\r\n\t * myColorMatrix.adjustHue(20).adjustBrightness(50);\r\n\t *\r\n\t * See {{#crossLink \"Filter\"}}{{/crossLink}} for an example of how to apply filters, or {{#crossLink \"ColorMatrixFilter\"}}{{/crossLink}}\r\n\t * for an example of how to use ColorMatrix to change a DisplayObject's color.\r\n\t * @class ColorMatrix\r\n\t * @param {Number} brightness\r\n\t * @param {Number} contrast\r\n\t * @param {Number} saturation\r\n\t * @param {Number} hue\r\n\t * @constructor\r\n\t **/\r\n\tfunction ColorMatrix(brightness, contrast, saturation, hue) {\r\n\t\tthis.setColor(brightness, contrast, saturation, hue);\r\n\t}\r\n\tvar p = ColorMatrix.prototype;\r\n\r\n// constants:\r\n\t/**\r\n\t * Array of delta values for contrast calculations.\r\n\t * @property DELTA_INDEX\r\n\t * @type Array\r\n\t * @protected\r\n\t * @static\r\n\t **/\r\n\tColorMatrix.DELTA_INDEX = [\r\n\t\t0, 0.01, 0.02, 0.04, 0.05, 0.06, 0.07, 0.08, 0.1, 0.11,\r\n\t\t0.12, 0.14, 0.15, 0.16, 0.17, 0.18, 0.20, 0.21, 0.22, 0.24,\r\n\t\t0.25, 0.27, 0.28, 0.30, 0.32, 0.34, 0.36, 0.38, 0.40, 0.42,\r\n\t\t0.44, 0.46, 0.48, 0.5, 0.53, 0.56, 0.59, 0.62, 0.65, 0.68,\r\n\t\t0.71, 0.74, 0.77, 0.80, 0.83, 0.86, 0.89, 0.92, 0.95, 0.98,\r\n\t\t1.0, 1.06, 1.12, 1.18, 1.24, 1.30, 1.36, 1.42, 1.48, 1.54,\r\n\t\t1.60, 1.66, 1.72, 1.78, 1.84, 1.90, 1.96, 2.0, 2.12, 2.25,\r\n\t\t2.37, 2.50, 2.62, 2.75, 2.87, 3.0, 3.2, 3.4, 3.6, 3.8,\r\n\t\t4.0, 4.3, 4.7, 4.9, 5.0, 5.5, 6.0, 6.5, 6.8, 7.0,\r\n\t\t7.3, 7.5, 7.8, 8.0, 8.4, 8.7, 9.0, 9.4, 9.6, 9.8,\r\n\t\t10.0\r\n\t];\r\n\r\n\t/**\r\n\t * Identity matrix values.\r\n\t * @property IDENTITY_MATRIX\r\n\t * @type Array\r\n\t * @protected\r\n\t * @static\r\n\t **/\r\n\tColorMatrix.IDENTITY_MATRIX = [\r\n\t\t1,0,0,0,0,\r\n\t\t0,1,0,0,0,\r\n\t\t0,0,1,0,0,\r\n\t\t0,0,0,1,0,\r\n\t\t0,0,0,0,1\r\n\t];\r\n\r\n\t/**\r\n\t * The constant length of a color matrix.\r\n\t * @property LENGTH\r\n\t * @type Number\r\n\t * @protected\r\n\t * @static\r\n\t **/\r\n\tColorMatrix.LENGTH = ColorMatrix.IDENTITY_MATRIX.length;\r\n\r\n\r\n// public methods:\r\n\t/**\r\n\t * Resets the instance with the specified values.\r\n\t * @method setColor\r\n\t * @param {Number} brightness\r\n\t * @param {Number} contrast\r\n\t * @param {Number} saturation\r\n\t * @param {Number} hue\r\n\t * @return {ColorMatrix} The ColorMatrix instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t */\r\n\tp.setColor = function(brightness,contrast,saturation,hue) {\r\n\t\treturn this.reset().adjustColor(brightness,contrast,saturation,hue);\r\n\t};\r\n\r\n\t/**\r\n\t * Resets the matrix to identity values.\r\n\t * @method reset\r\n\t * @return {ColorMatrix} The ColorMatrix instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t */\r\n\tp.reset = function() {\r\n\t\treturn this.copy(ColorMatrix.IDENTITY_MATRIX);\r\n\t};\r\n\r\n\t/**\r\n\t * Shortcut method to adjust brightness, contrast, saturation and hue.\r\n\t * Equivalent to calling adjustHue(hue), adjustContrast(contrast),\r\n\t * adjustBrightness(brightness), adjustSaturation(saturation), in that order.\r\n\t * @method adjustColor\r\n\t * @param {Number} brightness\r\n\t * @param {Number} contrast\r\n\t * @param {Number} saturation\r\n\t * @param {Number} hue\r\n\t * @return {ColorMatrix} The ColorMatrix instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.adjustColor = function(brightness,contrast,saturation,hue) {\r\n\t\tthis.adjustHue(hue);\r\n\t\tthis.adjustContrast(contrast);\r\n\t\tthis.adjustBrightness(brightness);\r\n\t\treturn this.adjustSaturation(saturation);\r\n\t};\r\n\r\n\t/**\r\n\t * Adjusts the brightness of pixel color by adding the specified value to the red, green and blue channels.\r\n\t * Positive values will make the image brighter, negative values will make it darker.\r\n\t * @method adjustBrightness\r\n\t * @param {Number} value A value between -255 & 255 that will be added to the RGB channels.\r\n\t * @return {ColorMatrix} The ColorMatrix instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.adjustBrightness = function(value) {\r\n\t\tif (value == 0 || isNaN(value)) { return this; }\r\n\t\tvalue = this._cleanValue(value,255);\r\n\t\tthis._multiplyMatrix([\r\n\t\t\t1,0,0,0,value,\r\n\t\t\t0,1,0,0,value,\r\n\t\t\t0,0,1,0,value,\r\n\t\t\t0,0,0,1,0,\r\n\t\t\t0,0,0,0,1\r\n\t\t]);\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Adjusts the contrast of pixel color.\r\n\t * Positive values will increase contrast, negative values will decrease contrast.\r\n\t * @method adjustContrast\r\n\t * @param {Number} value A value between -100 & 100.\r\n\t * @return {ColorMatrix} The ColorMatrix instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.adjustContrast = function(value) {\r\n\t\tif (value == 0 || isNaN(value)) { return this; }\r\n\t\tvalue = this._cleanValue(value,100);\r\n\t\tvar x;\r\n\t\tif (value<0) {\r\n\t\t\tx = 127+value/100*127;\r\n\t\t} else {\r\n\t\t\tx = value%1;\r\n\t\t\tif (x == 0) {\r\n\t\t\t\tx = ColorMatrix.DELTA_INDEX[value];\r\n\t\t\t} else {\r\n\t\t\t\tx = ColorMatrix.DELTA_INDEX[(value<<0)]*(1-x)+ColorMatrix.DELTA_INDEX[(value<<0)+1]*x; // use linear interpolation for more granularity.\r\n\t\t\t}\r\n\t\t\tx = x*127+127;\r\n\t\t}\r\n\t\tthis._multiplyMatrix([\r\n\t\t\tx/127,0,0,0,0.5*(127-x),\r\n\t\t\t0,x/127,0,0,0.5*(127-x),\r\n\t\t\t0,0,x/127,0,0.5*(127-x),\r\n\t\t\t0,0,0,1,0,\r\n\t\t\t0,0,0,0,1\r\n\t\t]);\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Adjusts the color saturation of the pixel.\r\n\t * Positive values will increase saturation, negative values will decrease saturation (trend towards greyscale).\r\n\t * @method adjustSaturation\r\n\t * @param {Number} value A value between -100 & 100.\r\n\t * @return {ColorMatrix} The ColorMatrix instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.adjustSaturation = function(value) {\r\n\t\tif (value == 0 || isNaN(value)) { return this; }\r\n\t\tvalue = this._cleanValue(value,100);\r\n\t\tvar x = 1+((value > 0) ? 3*value/100 : value/100);\r\n\t\tvar lumR = 0.3086;\r\n\t\tvar lumG = 0.6094;\r\n\t\tvar lumB = 0.0820;\r\n\t\tthis._multiplyMatrix([\r\n\t\t\tlumR*(1-x)+x,lumG*(1-x),lumB*(1-x),0,0,\r\n\t\t\tlumR*(1-x),lumG*(1-x)+x,lumB*(1-x),0,0,\r\n\t\t\tlumR*(1-x),lumG*(1-x),lumB*(1-x)+x,0,0,\r\n\t\t\t0,0,0,1,0,\r\n\t\t\t0,0,0,0,1\r\n\t\t]);\r\n\t\treturn this;\r\n\t};\r\n\r\n\r\n\t/**\r\n\t * Adjusts the hue of the pixel color.\r\n\t * @method adjustHue\r\n\t * @param {Number} value A value between -180 & 180.\r\n\t * @return {ColorMatrix} The ColorMatrix instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.adjustHue = function(value) {\r\n\t\tif (value == 0 || isNaN(value)) { return this; }\r\n\t\tvalue = this._cleanValue(value,180)/180*Math.PI;\r\n\t\tvar cosVal = Math.cos(value);\r\n\t\tvar sinVal = Math.sin(value);\r\n\t\tvar lumR = 0.213;\r\n\t\tvar lumG = 0.715;\r\n\t\tvar lumB = 0.072;\r\n\t\tthis._multiplyMatrix([\r\n\t\t\tlumR+cosVal*(1-lumR)+sinVal*(-lumR),lumG+cosVal*(-lumG)+sinVal*(-lumG),lumB+cosVal*(-lumB)+sinVal*(1-lumB),0,0,\r\n\t\t\tlumR+cosVal*(-lumR)+sinVal*(0.143),lumG+cosVal*(1-lumG)+sinVal*(0.140),lumB+cosVal*(-lumB)+sinVal*(-0.283),0,0,\r\n\t\t\tlumR+cosVal*(-lumR)+sinVal*(-(1-lumR)),lumG+cosVal*(-lumG)+sinVal*(lumG),lumB+cosVal*(1-lumB)+sinVal*(lumB),0,0,\r\n\t\t\t0,0,0,1,0,\r\n\t\t\t0,0,0,0,1\r\n\t\t]);\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Concatenates (multiplies) the specified matrix with this one.\r\n\t * @method concat\r\n\t * @param {Array} matrix An array or ColorMatrix instance.\r\n\t * @return {ColorMatrix} The ColorMatrix instance the method is called on (useful for chaining calls.)\r\n\t * @chainable\r\n\t **/\r\n\tp.concat = function(matrix) {\r\n\t\tmatrix = this._fixMatrix(matrix);\r\n\t\tif (matrix.length != ColorMatrix.LENGTH) { return this; }\r\n\t\tthis._multiplyMatrix(matrix);\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Returns a clone of this ColorMatrix.\r\n\t * @method clone\r\n\t * @return {ColorMatrix} A clone of this ColorMatrix.\r\n\t **/\r\n\tp.clone = function() {\r\n\t\treturn (new ColorMatrix()).copy(this);\r\n\t};\r\n\r\n\t/**\r\n\t * Return a length 25 (5x5) array instance containing this matrix's values.\r\n\t * @method toArray\r\n\t * @return {Array} An array holding this matrix's values.\r\n\t **/\r\n\tp.toArray = function() {\r\n\t\tvar arr = [];\r\n\t\tfor (var i= 0, l=ColorMatrix.LENGTH; i ColorMatrix.LENGTH) {\r\n\t\t\tmatrix = matrix.slice(0,ColorMatrix.LENGTH);\r\n\t\t}\r\n\t\treturn matrix;\r\n\t};\r\n\r\n\r\n\tcreatejs.ColorMatrix = ColorMatrix;\r\n}());\r\n\r\n//##############################################################################\r\n// ColorMatrixFilter.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n\t/**\r\n\t * Allows you to carry out complex color operations such as modifying saturation, brightness, or inverting. See the\r\n\t * {{#crossLink \"ColorMatrix\"}}{{/crossLink}} for more information on changing colors. For an easier color transform,\r\n\t * consider the {{#crossLink \"ColorFilter\"}}{{/crossLink}}.\r\n\t *\r\n\t *

    Example

    \r\n\t * This example creates a red circle, inverts its hue, and then saturates it to brighten it up.\r\n\t *\r\n\t * var shape = new createjs.Shape().set({x:100,y:100});\r\n\t * shape.graphics.beginFill(\"#ff0000\").drawCircle(0,0,50);\r\n\t *\r\n\t * var matrix = new createjs.ColorMatrix().adjustHue(180).adjustSaturation(100);\r\n\t * shape.filters = [\r\n\t * new createjs.ColorMatrixFilter(matrix)\r\n\t * ];\r\n\t *\r\n\t * shape.cache(-50, -50, 100, 100);\r\n\t *\r\n\t * See {{#crossLink \"Filter\"}}{{/crossLink}} for an more information on applying filters.\r\n\t * @class ColorMatrixFilter\r\n\t * @constructor\r\n\t * @extends Filter\r\n\t * @param {Array | ColorMatrix} matrix A 4x5 matrix describing the color operation to perform. See also the {{#crossLink \"ColorMatrix\"}}{{/crossLink}}\r\n\t * class.\r\n\t **/\r\n\tfunction ColorMatrixFilter(matrix) {\r\n\t\tthis.Filter_constructor();\r\n\r\n\t// public properties:\r\n\t\t/**\r\n\t\t * A 4x5 matrix describing the color operation to perform. See also the {{#crossLink \"ColorMatrix\"}}{{/crossLink}}\r\n\t\t * @property matrix\r\n\t\t * @type Array | ColorMatrix\r\n\t\t **/\r\n\t\tthis.matrix = matrix;\r\n\r\n\t\tthis.FRAG_SHADER_BODY = (\r\n\t\t\t\"uniform mat4 uColorMatrix;\" +\r\n\t\t\t\"uniform vec4 uColorMatrixOffset;\" +\r\n\r\n\t\t\t\"void main(void) {\" +\r\n\t\t\t\t\"vec4 color = texture2D(uSampler, vRenderCoord);\" +\r\n\r\n\t\t\t\t\"mat4 m = uColorMatrix;\" +\r\n\t\t\t\t\"vec4 newColor = vec4(0,0,0,0);\" +\r\n\t\t\t\t\"newColor.r = color.r*m[0][0] + color.g*m[0][1] + color.b*m[0][2] + color.a*m[0][3];\" +\r\n\t\t\t\t\"newColor.g = color.r*m[1][0] + color.g*m[1][1] + color.b*m[1][2] + color.a*m[1][3];\" +\r\n\t\t\t\t\"newColor.b = color.r*m[2][0] + color.g*m[2][1] + color.b*m[2][2] + color.a*m[2][3];\" +\r\n\t\t\t\t\"newColor.a = color.r*m[3][0] + color.g*m[3][1] + color.b*m[3][2] + color.a*m[3][3];\" +\r\n\r\n\t\t\t\t\"gl_FragColor = newColor + uColorMatrixOffset;\" +\r\n\t\t\t\"}\"\r\n\t\t);\r\n\t}\r\n\tvar p = createjs.extend(ColorMatrixFilter, createjs.Filter);\r\n\r\n\t// TODO: deprecated\r\n\t// p.initialize = function() {}; // searchable for devs wondering where it is. REMOVED. See docs for details.\r\n\r\n\t/** docced in super class **/\r\n\tp.shaderParamSetup = function(gl, stage, shaderProgram) {\r\n\t\tvar mat = this.matrix;\r\n\t\tvar colorMatrix = new Float32Array([\r\n\t\t\tmat[0],mat[1],mat[2],mat[3],\r\n\t\t\tmat[5],mat[6],mat[7],mat[8],\r\n\t\t\tmat[10],mat[11],mat[12],mat[13],\r\n\t\t\tmat[15],mat[16],mat[17],mat[18]\r\n\t\t]);\r\n\r\n\t\tgl.uniformMatrix4fv(\r\n\t\t\tgl.getUniformLocation(shaderProgram, \"uColorMatrix\"),\r\n\t\t\tfalse, colorMatrix\r\n\t\t);\r\n\t\tgl.uniform4f(\r\n\t\t\tgl.getUniformLocation(shaderProgram, \"uColorMatrixOffset\"),\r\n\t\t\tmat[4]/255, mat[9]/255, mat[14]/255, mat[19]/255\r\n\t\t);\r\n\t};\r\n\r\n// public methods:\r\n\t/** docced in super class **/\r\n\tp.toString = function() {\r\n\t\treturn \"[ColorMatrixFilter]\";\r\n\t};\r\n\r\n\t/** docced in super class **/\r\n\tp.clone = function() {\r\n\t\treturn new ColorMatrixFilter(this.matrix);\r\n\t};\r\n\r\n// private methods:\r\n\t/** docced in super class **/\r\n\tp._applyFilter = function(imageData) { \r\n\t\tvar data = imageData.data;\r\n\t\tvar l = data.length;\r\n\t\tvar r,g,b,a;\r\n\t\tvar mtx = this.matrix;\r\n\t\tvar m0 = mtx[0], m1 = mtx[1], m2 = mtx[2], m3 = mtx[3], m4 = mtx[4];\r\n\t\tvar m5 = mtx[5], m6 = mtx[6], m7 = mtx[7], m8 = mtx[8], m9 = mtx[9];\r\n\t\tvar m10 = mtx[10], m11 = mtx[11], m12 = mtx[12], m13 = mtx[13], m14 = mtx[14];\r\n\t\tvar m15 = mtx[15], m16 = mtx[16], m17 = mtx[17], m18 = mtx[18], m19 = mtx[19];\r\n\r\n\t\tfor (var i=0; iExample\r\n *\r\n * var stage = new createjs.Stage(\"canvasId\");\r\n * createjs.Touch.enable(stage);\r\n *\r\n * Note: It is important to disable Touch on a stage that you are no longer using:\r\n *\r\n * createjs.Touch.disable(stage);\r\n *\r\n * @class Touch\r\n * @static\r\n **/\r\n\tfunction Touch() {\r\n\t\tthrow \"Touch cannot be instantiated\";\r\n\t}\r\n\r\n\r\n// public static methods:\r\n\t/**\r\n\t * Returns `true` if touch is supported in the current browser.\r\n\t * @method isSupported\r\n\t * @return {Boolean} Indicates whether touch is supported in the current browser.\r\n\t * @static\r\n\t **/\r\n\tTouch.isSupported = function() {\r\n\t\treturn\t!!(('ontouchstart' in window) // iOS & Android\r\n\t\t\t|| (window.navigator['msPointerEnabled'] && window.navigator['msMaxTouchPoints'] > 0) // IE10\r\n\t\t\t|| (window.navigator['pointerEnabled'] && window.navigator['maxTouchPoints'] > 0)); // IE11+\r\n\t};\r\n\r\n\t/**\r\n\t * Enables touch interaction for the specified EaselJS {{#crossLink \"Stage\"}}{{/crossLink}}. Currently supports iOS\r\n\t * (and compatible browsers, such as modern Android browsers), and IE10/11. Supports both single touch and\r\n\t * multi-touch modes. Extends the EaselJS {{#crossLink \"MouseEvent\"}}{{/crossLink}} model, but without support for\r\n\t * double click or over/out events. See the MouseEvent {{#crossLink \"MouseEvent/pointerId:property\"}}{{/crossLink}}\r\n\t * for more information.\r\n\t * @method enable\r\n\t * @param {Stage} stage The {{#crossLink \"Stage\"}}{{/crossLink}} to enable touch on.\r\n\t * @param {Boolean} [singleTouch=false] If `true`, only a single touch will be active at a time.\r\n\t * @param {Boolean} [allowDefault=false] If `true`, then default gesture actions (ex. scrolling, zooming) will be\r\n\t * allowed when the user is interacting with the target canvas.\r\n\t * @return {Boolean} Returns `true` if touch was successfully enabled on the target stage.\r\n\t * @static\r\n\t **/\r\n\tTouch.enable = function(stage, singleTouch, allowDefault) {\r\n\t\tif (!stage || !stage.canvas || !Touch.isSupported()) { return false; }\r\n\t\tif (stage.__touch) { return true; }\r\n\r\n\t\t// inject required properties on stage:\r\n\t\tstage.__touch = {pointers:{}, multitouch:!singleTouch, preventDefault:!allowDefault, count:0};\r\n\r\n\t\t// note that in the future we may need to disable the standard mouse event model before adding\r\n\t\t// these to prevent duplicate calls. It doesn't seem to be an issue with iOS devices though.\r\n\t\tif ('ontouchstart' in window) { Touch._IOS_enable(stage); }\r\n\t\telse if (window.navigator['msPointerEnabled'] || window.navigator[\"pointerEnabled\"]) { Touch._IE_enable(stage); }\r\n\t\treturn true;\r\n\t};\r\n\r\n\t/**\r\n\t * Removes all listeners that were set up when calling `Touch.enable()` on a stage.\r\n\t * @method disable\r\n\t * @param {Stage} stage The {{#crossLink \"Stage\"}}{{/crossLink}} to disable touch on.\r\n\t * @static\r\n\t **/\r\n\tTouch.disable = function(stage) {\r\n\t\tif (!stage) { return; }\r\n\t\tif ('ontouchstart' in window) { Touch._IOS_disable(stage); }\r\n\t\telse if (window.navigator['msPointerEnabled'] || window.navigator[\"pointerEnabled\"]) { Touch._IE_disable(stage); }\r\n\t\t\r\n\t\tdelete stage.__touch;\r\n\t};\r\n\r\n\r\n// Private static methods:\r\n\t/**\r\n\t * @method _IOS_enable\r\n\t * @protected\r\n\t * @param {Stage} stage\r\n\t * @static\r\n\t **/\r\n\tTouch._IOS_enable = function(stage) {\r\n\t\tvar canvas = stage.canvas;\r\n\t\tvar f = stage.__touch.f = function(e) { Touch._IOS_handleEvent(stage,e); };\r\n\t\tcanvas.addEventListener(\"touchstart\", f, false);\r\n\t\tcanvas.addEventListener(\"touchmove\", f, false);\r\n\t\tcanvas.addEventListener(\"touchend\", f, false);\r\n\t\tcanvas.addEventListener(\"touchcancel\", f, false);\r\n\t};\r\n\r\n\t/**\r\n\t * @method _IOS_disable\r\n\t * @protected\r\n\t * @param {Stage} stage\r\n\t * @static\r\n\t **/\r\n\tTouch._IOS_disable = function(stage) {\r\n\t\tvar canvas = stage.canvas;\r\n\t\tif (!canvas) { return; }\r\n\t\tvar f = stage.__touch.f;\r\n\t\tcanvas.removeEventListener(\"touchstart\", f, false);\r\n\t\tcanvas.removeEventListener(\"touchmove\", f, false);\r\n\t\tcanvas.removeEventListener(\"touchend\", f, false);\r\n\t\tcanvas.removeEventListener(\"touchcancel\", f, false);\r\n\t};\r\n\r\n\t/**\r\n\t * @method _IOS_handleEvent\r\n\t * @param {Stage} stage\r\n\t * @param {Object} e The event to handle\r\n\t * @protected\r\n\t * @static\r\n\t **/\r\n\tTouch._IOS_handleEvent = function(stage, e) {\r\n\t\tif (!stage) { return; }\r\n\t\tif (stage.__touch.preventDefault) { e.preventDefault&&e.preventDefault(); }\r\n\t\tvar touches = e.changedTouches;\r\n\t\tvar type = e.type;\r\n\t\tfor (var i= 0,l=touches.length; iExample\r\n *\r\n * myObject.addEventListener(\"change\", createjs.proxy(myMethod, scope));\r\n *\r\n * @class Utility Methods\r\n * @main Utility Methods\r\n */\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\t/**\r\n\t * A function proxy for methods. By default, JavaScript methods do not maintain scope, so passing a method as a\r\n\t * callback will result in the method getting called in the scope of the caller. Using a proxy ensures that the\r\n\t * method gets called in the correct scope.\r\n\t *\r\n\t * Additional arguments can be passed that will be applied to the function when it is called.\r\n\t *\r\n\t *

    Example

    \r\n\t *\r\n\t * myObject.addEventListener(\"event\", createjs.proxy(myHandler, this, arg1, arg2));\r\n\t *\r\n\t * function myHandler(arg1, arg2) {\r\n\t * // This gets called when myObject.myCallback is executed.\r\n\t * }\r\n\t *\r\n\t * @method proxy\r\n\t * @param {Function} method The function to call\r\n\t * @param {Object} scope The scope to call the method name on\r\n\t * @param {mixed} [arg] * Arguments that are appended to the callback for additional params.\r\n\t * @public\r\n\t * @static\r\n\t */\r\n\tcreatejs.proxy = function (method, scope) {\r\n\t\tvar aArgs = Array.prototype.slice.call(arguments, 2);\r\n\t\treturn function () {\r\n\t\t\treturn method.apply(scope, Array.prototype.slice.call(arguments, 0).concat(aArgs));\r\n\t\t};\r\n\t}\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// ErrorEvent.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\t/**\r\n\t * A general error {{#crossLink \"Event\"}}{{/crossLink}}, that describes an error that occurred, as well as any details.\r\n\t * @class ErrorEvent\r\n\t * @param {String} [title] The error title\r\n\t * @param {String} [message] The error description\r\n\t * @param {Object} [data] Additional error data\r\n\t * @constructor\r\n\t */\r\n\tfunction ErrorEvent(title, message, data) {\r\n\t\tthis.Event_constructor(\"error\");\r\n\r\n\t\t/**\r\n\t\t * The short error title, which indicates the type of error that occurred.\r\n\t\t * @property title\r\n\t\t * @type String\r\n\t\t */\r\n\t\tthis.title = title;\r\n\r\n\t\t/**\r\n\t\t * The verbose error message, containing details about the error.\r\n\t\t * @property message\r\n\t\t * @type String\r\n\t\t */\r\n\t\tthis.message = message;\r\n\r\n\t\t/**\r\n\t\t * Additional data attached to an error.\r\n\t\t * @property data\r\n\t\t * @type {Object}\r\n\t\t */\r\n\t\tthis.data = data;\r\n\t}\r\n\r\n\tvar p = createjs.extend(ErrorEvent, createjs.Event);\r\n\r\n\tp.clone = function() {\r\n\t\treturn new createjs.ErrorEvent(this.title, this.message, this.data);\r\n\t};\r\n\r\n\tcreatejs.ErrorEvent = createjs.promote(ErrorEvent, \"Event\");\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// ProgressEvent.js\r\n//##############################################################################\r\n\r\n(function (scope) {\r\n\t\"use strict\";\r\n\r\n\t// constructor\r\n\t/**\r\n\t * A CreateJS {{#crossLink \"Event\"}}{{/crossLink}} that is dispatched when progress changes.\r\n\t * @class ProgressEvent\r\n\t * @param {Number} loaded The amount that has been loaded. This can be any number relative to the total.\r\n\t * @param {Number} [total=1] The total amount that will load. This will default to 1, so if the `loaded` value is\r\n\t * a percentage (between 0 and 1), it can be omitted.\r\n\t * @todo Consider having this event be a \"fileprogress\" event as well\r\n\t * @constructor\r\n\t */\r\n\tfunction ProgressEvent(loaded, total) {\r\n\t\tthis.Event_constructor(\"progress\");\r\n\r\n\t\t/**\r\n\t\t * The amount that has been loaded (out of a total amount)\r\n\t\t * @property loaded\r\n\t\t * @type {Number}\r\n\t\t */\r\n\t\tthis.loaded = loaded;\r\n\r\n\t\t/**\r\n\t\t * The total \"size\" of the load.\r\n\t\t * @property total\r\n\t\t * @type {Number}\r\n\t\t * @default 1\r\n\t\t */\r\n\t\tthis.total = (total == null) ? 1 : total;\r\n\r\n\t\t/**\r\n\t\t * The percentage (out of 1) that the load has been completed. This is calculated using `loaded/total`.\r\n\t\t * @property progress\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t */\r\n\t\tthis.progress = (total == 0) ? 0 : this.loaded / this.total;\r\n\t};\r\n\r\n\tvar p = createjs.extend(ProgressEvent, createjs.Event);\r\n\r\n\t/**\r\n\t * Returns a clone of the ProgressEvent instance.\r\n\t * @method clone\r\n\t * @return {ProgressEvent} a clone of the Event instance.\r\n\t **/\r\n\tp.clone = function() {\r\n\t\treturn new createjs.ProgressEvent(this.loaded, this.total);\r\n\t};\r\n\r\n\tcreatejs.ProgressEvent = createjs.promote(ProgressEvent, \"Event\");\r\n\r\n}(window));\r\n\r\n//##############################################################################\r\n// json3.js\r\n//##############################################################################\r\n\r\n/*! JSON v3.3.2 | http://bestiejs.github.io/json3 | Copyright 2012-2014, Kit Cambridge | http://kit.mit-license.org */\r\n;(function () {\r\n // Detect the `define` function exposed by asynchronous module loaders. The\r\n // strict `define` check is necessary for compatibility with `r.js`.\r\n var isLoader = typeof define === \"function\" && define.amd;\r\n\r\n // A set of types used to distinguish objects from primitives.\r\n var objectTypes = {\r\n \"function\": true,\r\n \"object\": true\r\n };\r\n\r\n // Detect the `exports` object exposed by CommonJS implementations.\r\n var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;\r\n\r\n // Use the `global` object exposed by Node (including Browserify via\r\n // `insert-module-globals`), Narwhal, and Ringo as the default context,\r\n // and the `window` object in browsers. Rhino exports a `global` function\r\n // instead.\r\n var root = objectTypes[typeof window] && window || this,\r\n freeGlobal = freeExports && objectTypes[typeof module] && module && !module.nodeType && typeof global == \"object\" && global;\r\n\r\n if (freeGlobal && (freeGlobal[\"global\"] === freeGlobal || freeGlobal[\"window\"] === freeGlobal || freeGlobal[\"self\"] === freeGlobal)) {\r\n root = freeGlobal;\r\n }\r\n\r\n // Public: Initializes JSON 3 using the given `context` object, attaching the\r\n // `stringify` and `parse` functions to the specified `exports` object.\r\n function runInContext(context, exports) {\r\n context || (context = root[\"Object\"]());\r\n exports || (exports = root[\"Object\"]());\r\n\r\n // Native constructor aliases.\r\n var Number = context[\"Number\"] || root[\"Number\"],\r\n String = context[\"String\"] || root[\"String\"],\r\n Object = context[\"Object\"] || root[\"Object\"],\r\n Date = context[\"Date\"] || root[\"Date\"],\r\n SyntaxError = context[\"SyntaxError\"] || root[\"SyntaxError\"],\r\n TypeError = context[\"TypeError\"] || root[\"TypeError\"],\r\n Math = context[\"Math\"] || root[\"Math\"],\r\n nativeJSON = context[\"JSON\"] || root[\"JSON\"];\r\n\r\n // Delegate to the native `stringify` and `parse` implementations.\r\n if (typeof nativeJSON == \"object\" && nativeJSON) {\r\n exports.stringify = nativeJSON.stringify;\r\n exports.parse = nativeJSON.parse;\r\n }\r\n\r\n // Convenience aliases.\r\n var objectProto = Object.prototype,\r\n getClass = objectProto.toString,\r\n isProperty, forEach, undef;\r\n\r\n // Test the `Date#getUTC*` methods. Based on work by @Yaffle.\r\n var isExtended = new Date(-3509827334573292);\r\n try {\r\n // The `getUTCFullYear`, `Month`, and `Date` methods return nonsensical\r\n // results for certain dates in Opera >= 10.53.\r\n isExtended = isExtended.getUTCFullYear() == -109252 && isExtended.getUTCMonth() === 0 && isExtended.getUTCDate() === 1 &&\r\n // Safari < 2.0.2 stores the internal millisecond time value correctly,\r\n // but clips the values returned by the date methods to the range of\r\n // signed 32-bit integers ([-2 ** 31, 2 ** 31 - 1]).\r\n isExtended.getUTCHours() == 10 && isExtended.getUTCMinutes() == 37 && isExtended.getUTCSeconds() == 6 && isExtended.getUTCMilliseconds() == 708;\r\n } catch (exception) {}\r\n\r\n // Internal: Determines whether the native `JSON.stringify` and `parse`\r\n // implementations are spec-compliant. Based on work by Ken Snyder.\r\n function has(name) {\r\n if (has[name] !== undef) {\r\n // Return cached feature test result.\r\n return has[name];\r\n }\r\n var isSupported;\r\n if (name == \"bug-string-char-index\") {\r\n // IE <= 7 doesn't support accessing string characters using square\r\n // bracket notation. IE 8 only supports this for primitives.\r\n isSupported = \"a\"[0] != \"a\";\r\n } else if (name == \"json\") {\r\n // Indicates whether both `JSON.stringify` and `JSON.parse` are\r\n // supported.\r\n isSupported = has(\"json-stringify\") && has(\"json-parse\");\r\n } else {\r\n var value, serialized = '{\"a\":[1,true,false,null,\"\\\\u0000\\\\b\\\\n\\\\f\\\\r\\\\t\"]}';\r\n // Test `JSON.stringify`.\r\n if (name == \"json-stringify\") {\r\n var stringify = exports.stringify, stringifySupported = typeof stringify == \"function\" && isExtended;\r\n if (stringifySupported) {\r\n // A test function object with a custom `toJSON` method.\r\n (value = function () {\r\n return 1;\r\n }).toJSON = value;\r\n try {\r\n stringifySupported =\r\n // Firefox 3.1b1 and b2 serialize string, number, and boolean\r\n // primitives as object literals.\r\n stringify(0) === \"0\" &&\r\n // FF 3.1b1, b2, and JSON 2 serialize wrapped primitives as object\r\n // literals.\r\n stringify(new Number()) === \"0\" &&\r\n stringify(new String()) == '\"\"' &&\r\n // FF 3.1b1, 2 throw an error if the value is `null`, `undefined`, or\r\n // does not define a canonical JSON representation (this applies to\r\n // objects with `toJSON` properties as well, *unless* they are nested\r\n // within an object or array).\r\n stringify(getClass) === undef &&\r\n // IE 8 serializes `undefined` as `\"undefined\"`. Safari <= 5.1.7 and\r\n // FF 3.1b3 pass this test.\r\n stringify(undef) === undef &&\r\n // Safari <= 5.1.7 and FF 3.1b3 throw `Error`s and `TypeError`s,\r\n // respectively, if the value is omitted entirely.\r\n stringify() === undef &&\r\n // FF 3.1b1, 2 throw an error if the given value is not a number,\r\n // string, array, object, Boolean, or `null` literal. This applies to\r\n // objects with custom `toJSON` methods as well, unless they are nested\r\n // inside object or array literals. YUI 3.0.0b1 ignores custom `toJSON`\r\n // methods entirely.\r\n stringify(value) === \"1\" &&\r\n stringify([value]) == \"[1]\" &&\r\n // Prototype <= 1.6.1 serializes `[undefined]` as `\"[]\"` instead of\r\n // `\"[null]\"`.\r\n stringify([undef]) == \"[null]\" &&\r\n // YUI 3.0.0b1 fails to serialize `null` literals.\r\n stringify(null) == \"null\" &&\r\n // FF 3.1b1, 2 halts serialization if an array contains a function:\r\n // `[1, true, getClass, 1]` serializes as \"[1,true,],\". FF 3.1b3\r\n // elides non-JSON values from objects and arrays, unless they\r\n // define custom `toJSON` methods.\r\n stringify([undef, getClass, null]) == \"[null,null,null]\" &&\r\n // Simple serialization test. FF 3.1b1 uses Unicode escape sequences\r\n // where character escape codes are expected (e.g., `\\b` => `\\u0008`).\r\n stringify({ \"a\": [value, true, false, null, \"\\x00\\b\\n\\f\\r\\t\"] }) == serialized &&\r\n // FF 3.1b1 and b2 ignore the `filter` and `width` arguments.\r\n stringify(null, value) === \"1\" &&\r\n stringify([1, 2], null, 1) == \"[\\n 1,\\n 2\\n]\" &&\r\n // JSON 2, Prototype <= 1.7, and older WebKit builds incorrectly\r\n // serialize extended years.\r\n stringify(new Date(-8.64e15)) == '\"-271821-04-20T00:00:00.000Z\"' &&\r\n // The milliseconds are optional in ES 5, but required in 5.1.\r\n stringify(new Date(8.64e15)) == '\"+275760-09-13T00:00:00.000Z\"' &&\r\n // Firefox <= 11.0 incorrectly serializes years prior to 0 as negative\r\n // four-digit years instead of six-digit years. Credits: @Yaffle.\r\n stringify(new Date(-621987552e5)) == '\"-000001-01-01T00:00:00.000Z\"' &&\r\n // Safari <= 5.1.5 and Opera >= 10.53 incorrectly serialize millisecond\r\n // values less than 1000. Credits: @Yaffle.\r\n stringify(new Date(-1)) == '\"1969-12-31T23:59:59.999Z\"';\r\n } catch (exception) {\r\n stringifySupported = false;\r\n }\r\n }\r\n isSupported = stringifySupported;\r\n }\r\n // Test `JSON.parse`.\r\n if (name == \"json-parse\") {\r\n var parse = exports.parse;\r\n if (typeof parse == \"function\") {\r\n try {\r\n // FF 3.1b1, b2 will throw an exception if a bare literal is provided.\r\n // Conforming implementations should also coerce the initial argument to\r\n // a string prior to parsing.\r\n if (parse(\"0\") === 0 && !parse(false)) {\r\n // Simple parsing test.\r\n value = parse(serialized);\r\n var parseSupported = value[\"a\"].length == 5 && value[\"a\"][0] === 1;\r\n if (parseSupported) {\r\n try {\r\n // Safari <= 5.1.2 and FF 3.1b1 allow unescaped tabs in strings.\r\n parseSupported = !parse('\"\\t\"');\r\n } catch (exception) {}\r\n if (parseSupported) {\r\n try {\r\n // FF 4.0 and 4.0.1 allow leading `+` signs and leading\r\n // decimal points. FF 4.0, 4.0.1, and IE 9-10 also allow\r\n // certain octal literals.\r\n parseSupported = parse(\"01\") !== 1;\r\n } catch (exception) {}\r\n }\r\n if (parseSupported) {\r\n try {\r\n // FF 4.0, 4.0.1, and Rhino 1.7R3-R4 allow trailing decimal\r\n // points. These environments, along with FF 3.1b1 and 2,\r\n // also allow trailing commas in JSON objects and arrays.\r\n parseSupported = parse(\"1.\") !== 1;\r\n } catch (exception) {}\r\n }\r\n }\r\n }\r\n } catch (exception) {\r\n parseSupported = false;\r\n }\r\n }\r\n isSupported = parseSupported;\r\n }\r\n }\r\n return has[name] = !!isSupported;\r\n }\r\n\r\n if (!has(\"json\")) {\r\n // Common `[[Class]]` name aliases.\r\n var functionClass = \"[object Function]\",\r\n dateClass = \"[object Date]\",\r\n numberClass = \"[object Number]\",\r\n stringClass = \"[object String]\",\r\n arrayClass = \"[object Array]\",\r\n booleanClass = \"[object Boolean]\";\r\n\r\n // Detect incomplete support for accessing string characters by index.\r\n var charIndexBuggy = has(\"bug-string-char-index\");\r\n\r\n // Define additional utility methods if the `Date` methods are buggy.\r\n if (!isExtended) {\r\n var floor = Math.floor;\r\n // A mapping between the months of the year and the number of days between\r\n // January 1st and the first of the respective month.\r\n var Months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];\r\n // Internal: Calculates the number of days between the Unix epoch and the\r\n // first day of the given month.\r\n var getDay = function (year, month) {\r\n return Months[month] + 365 * (year - 1970) + floor((year - 1969 + (month = +(month > 1))) / 4) - floor((year - 1901 + month) / 100) + floor((year - 1601 + month) / 400);\r\n };\r\n }\r\n\r\n // Internal: Determines if a property is a direct property of the given\r\n // object. Delegates to the native `Object#hasOwnProperty` method.\r\n if (!(isProperty = objectProto.hasOwnProperty)) {\r\n isProperty = function (property) {\r\n var members = {}, constructor;\r\n if ((members.__proto__ = null, members.__proto__ = {\r\n // The *proto* property cannot be set multiple times in recent\r\n // versions of Firefox and SeaMonkey.\r\n \"toString\": 1\r\n }, members).toString != getClass) {\r\n // Safari <= 2.0.3 doesn't implement `Object#hasOwnProperty`, but\r\n // supports the mutable *proto* property.\r\n isProperty = function (property) {\r\n // Capture and break the object's prototype chain (see section 8.6.2\r\n // of the ES 5.1 spec). The parenthesized expression prevents an\r\n // unsafe transformation by the Closure Compiler.\r\n var original = this.__proto__, result = property in (this.__proto__ = null, this);\r\n // Restore the original prototype chain.\r\n this.__proto__ = original;\r\n return result;\r\n };\r\n } else {\r\n // Capture a reference to the top-level `Object` constructor.\r\n constructor = members.constructor;\r\n // Use the `constructor` property to simulate `Object#hasOwnProperty` in\r\n // other environments.\r\n isProperty = function (property) {\r\n var parent = (this.constructor || constructor).prototype;\r\n return property in this && !(property in parent && this[property] === parent[property]);\r\n };\r\n }\r\n members = null;\r\n return isProperty.call(this, property);\r\n };\r\n }\r\n\r\n // Internal: Normalizes the `for...in` iteration algorithm across\r\n // environments. Each enumerated key is yielded to a `callback` function.\r\n forEach = function (object, callback) {\r\n var size = 0, Properties, members, property;\r\n\r\n // Tests for bugs in the current environment's `for...in` algorithm. The\r\n // `valueOf` property inherits the non-enumerable flag from\r\n // `Object.prototype` in older versions of IE, Netscape, and Mozilla.\r\n (Properties = function () {\r\n this.valueOf = 0;\r\n }).prototype.valueOf = 0;\r\n\r\n // Iterate over a new instance of the `Properties` class.\r\n members = new Properties();\r\n for (property in members) {\r\n // Ignore all properties inherited from `Object.prototype`.\r\n if (isProperty.call(members, property)) {\r\n size++;\r\n }\r\n }\r\n Properties = members = null;\r\n\r\n // Normalize the iteration algorithm.\r\n if (!size) {\r\n // A list of non-enumerable properties inherited from `Object.prototype`.\r\n members = [\"valueOf\", \"toString\", \"toLocaleString\", \"propertyIsEnumerable\", \"isPrototypeOf\", \"hasOwnProperty\", \"constructor\"];\r\n // IE <= 8, Mozilla 1.0, and Netscape 6.2 ignore shadowed non-enumerable\r\n // properties.\r\n forEach = function (object, callback) {\r\n var isFunction = getClass.call(object) == functionClass, property, length;\r\n var hasProperty = !isFunction && typeof object.constructor != \"function\" && objectTypes[typeof object.hasOwnProperty] && object.hasOwnProperty || isProperty;\r\n for (property in object) {\r\n // Gecko <= 1.0 enumerates the `prototype` property of functions under\r\n // certain conditions; IE does not.\r\n if (!(isFunction && property == \"prototype\") && hasProperty.call(object, property)) {\r\n callback(property);\r\n }\r\n }\r\n // Manually invoke the callback for each non-enumerable property.\r\n for (length = members.length; property = members[--length]; hasProperty.call(object, property) && callback(property));\r\n };\r\n } else if (size == 2) {\r\n // Safari <= 2.0.4 enumerates shadowed properties twice.\r\n forEach = function (object, callback) {\r\n // Create a set of iterated properties.\r\n var members = {}, isFunction = getClass.call(object) == functionClass, property;\r\n for (property in object) {\r\n // Store each property name to prevent double enumeration. The\r\n // `prototype` property of functions is not enumerated due to cross-\r\n // environment inconsistencies.\r\n if (!(isFunction && property == \"prototype\") && !isProperty.call(members, property) && (members[property] = 1) && isProperty.call(object, property)) {\r\n callback(property);\r\n }\r\n }\r\n };\r\n } else {\r\n // No bugs detected; use the standard `for...in` algorithm.\r\n forEach = function (object, callback) {\r\n var isFunction = getClass.call(object) == functionClass, property, isConstructor;\r\n for (property in object) {\r\n if (!(isFunction && property == \"prototype\") && isProperty.call(object, property) && !(isConstructor = property === \"constructor\")) {\r\n callback(property);\r\n }\r\n }\r\n // Manually invoke the callback for the `constructor` property due to\r\n // cross-environment inconsistencies.\r\n if (isConstructor || isProperty.call(object, (property = \"constructor\"))) {\r\n callback(property);\r\n }\r\n };\r\n }\r\n return forEach(object, callback);\r\n };\r\n\r\n // Public: Serializes a JavaScript `value` as a JSON string. The optional\r\n // `filter` argument may specify either a function that alters how object and\r\n // array members are serialized, or an array of strings and numbers that\r\n // indicates which properties should be serialized. The optional `width`\r\n // argument may be either a string or number that specifies the indentation\r\n // level of the output.\r\n if (!has(\"json-stringify\")) {\r\n // Internal: A map of control characters and their escaped equivalents.\r\n var Escapes = {\r\n 92: \"\\\\\\\\\",\r\n 34: '\\\\\"',\r\n 8: \"\\\\b\",\r\n 12: \"\\\\f\",\r\n 10: \"\\\\n\",\r\n 13: \"\\\\r\",\r\n 9: \"\\\\t\"\r\n };\r\n\r\n // Internal: Converts `value` into a zero-padded string such that its\r\n // length is at least equal to `width`. The `width` must be <= 6.\r\n var leadingZeroes = \"000000\";\r\n var toPaddedString = function (width, value) {\r\n // The `|| 0` expression is necessary to work around a bug in\r\n // Opera <= 7.54u2 where `0 == -0`, but `String(-0) !== \"0\"`.\r\n return (leadingZeroes + (value || 0)).slice(-width);\r\n };\r\n\r\n // Internal: Double-quotes a string `value`, replacing all ASCII control\r\n // characters (characters with code unit values between 0 and 31) with\r\n // their escaped equivalents. This is an implementation of the\r\n // `Quote(value)` operation defined in ES 5.1 section 15.12.3.\r\n var unicodePrefix = \"\\\\u00\";\r\n var quote = function (value) {\r\n var result = '\"', index = 0, length = value.length, useCharIndex = !charIndexBuggy || length > 10;\r\n var symbols = useCharIndex && (charIndexBuggy ? value.split(\"\") : value);\r\n for (; index < length; index++) {\r\n var charCode = value.charCodeAt(index);\r\n // If the character is a control character, append its Unicode or\r\n // shorthand escape sequence; otherwise, append the character as-is.\r\n switch (charCode) {\r\n case 8: case 9: case 10: case 12: case 13: case 34: case 92:\r\n result += Escapes[charCode];\r\n break;\r\n default:\r\n if (charCode < 32) {\r\n result += unicodePrefix + toPaddedString(2, charCode.toString(16));\r\n break;\r\n }\r\n result += useCharIndex ? symbols[index] : value.charAt(index);\r\n }\r\n }\r\n return result + '\"';\r\n };\r\n\r\n // Internal: Recursively serializes an object. Implements the\r\n // `Str(key, holder)`, `JO(value)`, and `JA(value)` operations.\r\n var serialize = function (property, object, callback, properties, whitespace, indentation, stack) {\r\n var value, className, year, month, date, time, hours, minutes, seconds, milliseconds, results, element, index, length, prefix, result;\r\n try {\r\n // Necessary for host object support.\r\n value = object[property];\r\n } catch (exception) {}\r\n if (typeof value == \"object\" && value) {\r\n className = getClass.call(value);\r\n if (className == dateClass && !isProperty.call(value, \"toJSON\")) {\r\n if (value > -1 / 0 && value < 1 / 0) {\r\n // Dates are serialized according to the `Date#toJSON` method\r\n // specified in ES 5.1 section 15.9.5.44. See section 15.9.1.15\r\n // for the ISO 8601 date time string format.\r\n if (getDay) {\r\n // Manually compute the year, month, date, hours, minutes,\r\n // seconds, and milliseconds if the `getUTC*` methods are\r\n // buggy. Adapted from @Yaffle's `date-shim` project.\r\n date = floor(value / 864e5);\r\n for (year = floor(date / 365.2425) + 1970 - 1; getDay(year + 1, 0) <= date; year++);\r\n for (month = floor((date - getDay(year, 0)) / 30.42); getDay(year, month + 1) <= date; month++);\r\n date = 1 + date - getDay(year, month);\r\n // The `time` value specifies the time within the day (see ES\r\n // 5.1 section 15.9.1.2). The formula `(A % B + B) % B` is used\r\n // to compute `A modulo B`, as the `%` operator does not\r\n // correspond to the `modulo` operation for negative numbers.\r\n time = (value % 864e5 + 864e5) % 864e5;\r\n // The hours, minutes, seconds, and milliseconds are obtained by\r\n // decomposing the time within the day. See section 15.9.1.10.\r\n hours = floor(time / 36e5) % 24;\r\n minutes = floor(time / 6e4) % 60;\r\n seconds = floor(time / 1e3) % 60;\r\n milliseconds = time % 1e3;\r\n } else {\r\n year = value.getUTCFullYear();\r\n month = value.getUTCMonth();\r\n date = value.getUTCDate();\r\n hours = value.getUTCHours();\r\n minutes = value.getUTCMinutes();\r\n seconds = value.getUTCSeconds();\r\n milliseconds = value.getUTCMilliseconds();\r\n }\r\n // Serialize extended years correctly.\r\n value = (year <= 0 || year >= 1e4 ? (year < 0 ? \"-\" : \"+\") + toPaddedString(6, year < 0 ? -year : year) : toPaddedString(4, year)) +\r\n \"-\" + toPaddedString(2, month + 1) + \"-\" + toPaddedString(2, date) +\r\n // Months, dates, hours, minutes, and seconds should have two\r\n // digits; milliseconds should have three.\r\n \"T\" + toPaddedString(2, hours) + \":\" + toPaddedString(2, minutes) + \":\" + toPaddedString(2, seconds) +\r\n // Milliseconds are optional in ES 5.0, but required in 5.1.\r\n \".\" + toPaddedString(3, milliseconds) + \"Z\";\r\n } else {\r\n value = null;\r\n }\r\n } else if (typeof value.toJSON == \"function\" && ((className != numberClass && className != stringClass && className != arrayClass) || isProperty.call(value, \"toJSON\"))) {\r\n // Prototype <= 1.6.1 adds non-standard `toJSON` methods to the\r\n // `Number`, `String`, `Date`, and `Array` prototypes. JSON 3\r\n // ignores all `toJSON` methods on these objects unless they are\r\n // defined directly on an instance.\r\n value = value.toJSON(property);\r\n }\r\n }\r\n if (callback) {\r\n // If a replacement function was provided, call it to obtain the value\r\n // for serialization.\r\n value = callback.call(object, property, value);\r\n }\r\n if (value === null) {\r\n return \"null\";\r\n }\r\n className = getClass.call(value);\r\n if (className == booleanClass) {\r\n // Booleans are represented literally.\r\n return \"\" + value;\r\n } else if (className == numberClass) {\r\n // JSON numbers must be finite. `Infinity` and `NaN` are serialized as\r\n // `\"null\"`.\r\n return value > -1 / 0 && value < 1 / 0 ? \"\" + value : \"null\";\r\n } else if (className == stringClass) {\r\n // Strings are double-quoted and escaped.\r\n return quote(\"\" + value);\r\n }\r\n // Recursively serialize objects and arrays.\r\n if (typeof value == \"object\") {\r\n // Check for cyclic structures. This is a linear search; performance\r\n // is inversely proportional to the number of unique nested objects.\r\n for (length = stack.length; length--;) {\r\n if (stack[length] === value) {\r\n // Cyclic structures cannot be serialized by `JSON.stringify`.\r\n throw TypeError();\r\n }\r\n }\r\n // Add the object to the stack of traversed objects.\r\n stack.push(value);\r\n results = [];\r\n // Save the current indentation level and indent one additional level.\r\n prefix = indentation;\r\n indentation += whitespace;\r\n if (className == arrayClass) {\r\n // Recursively serialize array elements.\r\n for (index = 0, length = value.length; index < length; index++) {\r\n element = serialize(index, value, callback, properties, whitespace, indentation, stack);\r\n results.push(element === undef ? \"null\" : element);\r\n }\r\n result = results.length ? (whitespace ? \"[\\n\" + indentation + results.join(\",\\n\" + indentation) + \"\\n\" + prefix + \"]\" : (\"[\" + results.join(\",\") + \"]\")) : \"[]\";\r\n } else {\r\n // Recursively serialize object members. Members are selected from\r\n // either a user-specified list of property names, or the object\r\n // itself.\r\n forEach(properties || value, function (property) {\r\n var element = serialize(property, value, callback, properties, whitespace, indentation, stack);\r\n if (element !== undef) {\r\n // According to ES 5.1 section 15.12.3: \"If `gap` {whitespace}\r\n // is not the empty string, let `member` {quote(property) + \":\"}\r\n // be the concatenation of `member` and the `space` character.\"\r\n // The \"`space` character\" refers to the literal space\r\n // character, not the `space` {width} argument provided to\r\n // `JSON.stringify`.\r\n results.push(quote(property) + \":\" + (whitespace ? \" \" : \"\") + element);\r\n }\r\n });\r\n result = results.length ? (whitespace ? \"{\\n\" + indentation + results.join(\",\\n\" + indentation) + \"\\n\" + prefix + \"}\" : (\"{\" + results.join(\",\") + \"}\")) : \"{}\";\r\n }\r\n // Remove the object from the traversed object stack.\r\n stack.pop();\r\n return result;\r\n }\r\n };\r\n\r\n // Public: `JSON.stringify`. See ES 5.1 section 15.12.3.\r\n exports.stringify = function (source, filter, width) {\r\n var whitespace, callback, properties, className;\r\n if (objectTypes[typeof filter] && filter) {\r\n if ((className = getClass.call(filter)) == functionClass) {\r\n callback = filter;\r\n } else if (className == arrayClass) {\r\n // Convert the property names array into a makeshift set.\r\n properties = {};\r\n for (var index = 0, length = filter.length, value; index < length; value = filter[index++], ((className = getClass.call(value)), className == stringClass || className == numberClass) && (properties[value] = 1));\r\n }\r\n }\r\n if (width) {\r\n if ((className = getClass.call(width)) == numberClass) {\r\n // Convert the `width` to an integer and create a string containing\r\n // `width` number of space characters.\r\n if ((width -= width % 1) > 0) {\r\n for (whitespace = \"\", width > 10 && (width = 10); whitespace.length < width; whitespace += \" \");\r\n }\r\n } else if (className == stringClass) {\r\n whitespace = width.length <= 10 ? width : width.slice(0, 10);\r\n }\r\n }\r\n // Opera <= 7.54u2 discards the values associated with empty string keys\r\n // (`\"\"`) only if they are used directly within an object member list\r\n // (e.g., `!(\"\" in { \"\": 1})`).\r\n return serialize(\"\", (value = {}, value[\"\"] = source, value), callback, properties, whitespace, \"\", []);\r\n };\r\n }\r\n\r\n // Public: Parses a JSON source string.\r\n if (!has(\"json-parse\")) {\r\n var fromCharCode = String.fromCharCode;\r\n\r\n // Internal: A map of escaped control characters and their unescaped\r\n // equivalents.\r\n var Unescapes = {\r\n 92: \"\\\\\",\r\n 34: '\"',\r\n 47: \"/\",\r\n 98: \"\\b\",\r\n 116: \"\\t\",\r\n 110: \"\\n\",\r\n 102: \"\\f\",\r\n 114: \"\\r\"\r\n };\r\n\r\n // Internal: Stores the parser state.\r\n var Index, Source;\r\n\r\n // Internal: Resets the parser state and throws a `SyntaxError`.\r\n var abort = function () {\r\n Index = Source = null;\r\n throw SyntaxError();\r\n };\r\n\r\n // Internal: Returns the next token, or `\"$\"` if the parser has reached\r\n // the end of the source string. A token may be a string, number, `null`\r\n // literal, or Boolean literal.\r\n var lex = function () {\r\n var source = Source, length = source.length, value, begin, position, isSigned, charCode;\r\n while (Index < length) {\r\n charCode = source.charCodeAt(Index);\r\n switch (charCode) {\r\n case 9: case 10: case 13: case 32:\r\n // Skip whitespace tokens, including tabs, carriage returns, line\r\n // feeds, and space characters.\r\n Index++;\r\n break;\r\n case 123: case 125: case 91: case 93: case 58: case 44:\r\n // Parse a punctuator token (`{`, `}`, `[`, `]`, `:`, or `,`) at\r\n // the current position.\r\n value = charIndexBuggy ? source.charAt(Index) : source[Index];\r\n Index++;\r\n return value;\r\n case 34:\r\n // `\"` delimits a JSON string; advance to the next character and\r\n // begin parsing the string. String tokens are prefixed with the\r\n // sentinel `@` character to distinguish them from punctuators and\r\n // end-of-string tokens.\r\n for (value = \"@\", Index++; Index < length;) {\r\n charCode = source.charCodeAt(Index);\r\n if (charCode < 32) {\r\n // Unescaped ASCII control characters (those with a code unit\r\n // less than the space character) are not permitted.\r\n abort();\r\n } else if (charCode == 92) {\r\n // A reverse solidus (`\\`) marks the beginning of an escaped\r\n // control character (including `\"`, `\\`, and `/`) or Unicode\r\n // escape sequence.\r\n charCode = source.charCodeAt(++Index);\r\n switch (charCode) {\r\n case 92: case 34: case 47: case 98: case 116: case 110: case 102: case 114:\r\n // Revive escaped control characters.\r\n value += Unescapes[charCode];\r\n Index++;\r\n break;\r\n case 117:\r\n // `\\u` marks the beginning of a Unicode escape sequence.\r\n // Advance to the first character and validate the\r\n // four-digit code point.\r\n begin = ++Index;\r\n for (position = Index + 4; Index < position; Index++) {\r\n charCode = source.charCodeAt(Index);\r\n // A valid sequence comprises four hexdigits (case-\r\n // insensitive) that form a single hexadecimal value.\r\n if (!(charCode >= 48 && charCode <= 57 || charCode >= 97 && charCode <= 102 || charCode >= 65 && charCode <= 70)) {\r\n // Invalid Unicode escape sequence.\r\n abort();\r\n }\r\n }\r\n // Revive the escaped character.\r\n value += fromCharCode(\"0x\" + source.slice(begin, Index));\r\n break;\r\n default:\r\n // Invalid escape sequence.\r\n abort();\r\n }\r\n } else {\r\n if (charCode == 34) {\r\n // An unescaped double-quote character marks the end of the\r\n // string.\r\n break;\r\n }\r\n charCode = source.charCodeAt(Index);\r\n begin = Index;\r\n // Optimize for the common case where a string is valid.\r\n while (charCode >= 32 && charCode != 92 && charCode != 34) {\r\n charCode = source.charCodeAt(++Index);\r\n }\r\n // Append the string as-is.\r\n value += source.slice(begin, Index);\r\n }\r\n }\r\n if (source.charCodeAt(Index) == 34) {\r\n // Advance to the next character and return the revived string.\r\n Index++;\r\n return value;\r\n }\r\n // Unterminated string.\r\n abort();\r\n default:\r\n // Parse numbers and literals.\r\n begin = Index;\r\n // Advance past the negative sign, if one is specified.\r\n if (charCode == 45) {\r\n isSigned = true;\r\n charCode = source.charCodeAt(++Index);\r\n }\r\n // Parse an integer or floating-point value.\r\n if (charCode >= 48 && charCode <= 57) {\r\n // Leading zeroes are interpreted as octal literals.\r\n if (charCode == 48 && ((charCode = source.charCodeAt(Index + 1)), charCode >= 48 && charCode <= 57)) {\r\n // Illegal octal literal.\r\n abort();\r\n }\r\n isSigned = false;\r\n // Parse the integer component.\r\n for (; Index < length && ((charCode = source.charCodeAt(Index)), charCode >= 48 && charCode <= 57); Index++);\r\n // Floats cannot contain a leading decimal point; however, this\r\n // case is already accounted for by the parser.\r\n if (source.charCodeAt(Index) == 46) {\r\n position = ++Index;\r\n // Parse the decimal component.\r\n for (; position < length && ((charCode = source.charCodeAt(position)), charCode >= 48 && charCode <= 57); position++);\r\n if (position == Index) {\r\n // Illegal trailing decimal.\r\n abort();\r\n }\r\n Index = position;\r\n }\r\n // Parse exponents. The `e` denoting the exponent is\r\n // case-insensitive.\r\n charCode = source.charCodeAt(Index);\r\n if (charCode == 101 || charCode == 69) {\r\n charCode = source.charCodeAt(++Index);\r\n // Skip past the sign following the exponent, if one is\r\n // specified.\r\n if (charCode == 43 || charCode == 45) {\r\n Index++;\r\n }\r\n // Parse the exponential component.\r\n for (position = Index; position < length && ((charCode = source.charCodeAt(position)), charCode >= 48 && charCode <= 57); position++);\r\n if (position == Index) {\r\n // Illegal empty exponent.\r\n abort();\r\n }\r\n Index = position;\r\n }\r\n // Coerce the parsed value to a JavaScript number.\r\n return +source.slice(begin, Index);\r\n }\r\n // A negative sign may only precede numbers.\r\n if (isSigned) {\r\n abort();\r\n }\r\n // `true`, `false`, and `null` literals.\r\n if (source.slice(Index, Index + 4) == \"true\") {\r\n Index += 4;\r\n return true;\r\n } else if (source.slice(Index, Index + 5) == \"false\") {\r\n Index += 5;\r\n return false;\r\n } else if (source.slice(Index, Index + 4) == \"null\") {\r\n Index += 4;\r\n return null;\r\n }\r\n // Unrecognized token.\r\n abort();\r\n }\r\n }\r\n // Return the sentinel `$` character if the parser has reached the end\r\n // of the source string.\r\n return \"$\";\r\n };\r\n\r\n // Internal: Parses a JSON `value` token.\r\n var get = function (value) {\r\n var results, hasMembers;\r\n if (value == \"$\") {\r\n // Unexpected end of input.\r\n abort();\r\n }\r\n if (typeof value == \"string\") {\r\n if ((charIndexBuggy ? value.charAt(0) : value[0]) == \"@\") {\r\n // Remove the sentinel `@` character.\r\n return value.slice(1);\r\n }\r\n // Parse object and array literals.\r\n if (value == \"[\") {\r\n // Parses a JSON array, returning a new JavaScript array.\r\n results = [];\r\n for (;; hasMembers || (hasMembers = true)) {\r\n value = lex();\r\n // A closing square bracket marks the end of the array literal.\r\n if (value == \"]\") {\r\n break;\r\n }\r\n // If the array literal contains elements, the current token\r\n // should be a comma separating the previous element from the\r\n // next.\r\n if (hasMembers) {\r\n if (value == \",\") {\r\n value = lex();\r\n if (value == \"]\") {\r\n // Unexpected trailing `,` in array literal.\r\n abort();\r\n }\r\n } else {\r\n // A `,` must separate each array element.\r\n abort();\r\n }\r\n }\r\n // Elisions and leading commas are not permitted.\r\n if (value == \",\") {\r\n abort();\r\n }\r\n results.push(get(value));\r\n }\r\n return results;\r\n } else if (value == \"{\") {\r\n // Parses a JSON object, returning a new JavaScript object.\r\n results = {};\r\n for (;; hasMembers || (hasMembers = true)) {\r\n value = lex();\r\n // A closing curly brace marks the end of the object literal.\r\n if (value == \"}\") {\r\n break;\r\n }\r\n // If the object literal contains members, the current token\r\n // should be a comma separator.\r\n if (hasMembers) {\r\n if (value == \",\") {\r\n value = lex();\r\n if (value == \"}\") {\r\n // Unexpected trailing `,` in object literal.\r\n abort();\r\n }\r\n } else {\r\n // A `,` must separate each object member.\r\n abort();\r\n }\r\n }\r\n // Leading commas are not permitted, object property names must be\r\n // double-quoted strings, and a `:` must separate each property\r\n // name and value.\r\n if (value == \",\" || typeof value != \"string\" || (charIndexBuggy ? value.charAt(0) : value[0]) != \"@\" || lex() != \":\") {\r\n abort();\r\n }\r\n results[value.slice(1)] = get(lex());\r\n }\r\n return results;\r\n }\r\n // Unexpected token encountered.\r\n abort();\r\n }\r\n return value;\r\n };\r\n\r\n // Internal: Updates a traversed object member.\r\n var update = function (source, property, callback) {\r\n var element = walk(source, property, callback);\r\n if (element === undef) {\r\n delete source[property];\r\n } else {\r\n source[property] = element;\r\n }\r\n };\r\n\r\n // Internal: Recursively traverses a parsed JSON object, invoking the\r\n // `callback` function for each value. This is an implementation of the\r\n // `Walk(holder, name)` operation defined in ES 5.1 section 15.12.2.\r\n var walk = function (source, property, callback) {\r\n var value = source[property], length;\r\n if (typeof value == \"object\" && value) {\r\n // `forEach` can't be used to traverse an array in Opera <= 8.54\r\n // because its `Object#hasOwnProperty` implementation returns `false`\r\n // for array indices (e.g., `![1, 2, 3].hasOwnProperty(\"0\")`).\r\n if (getClass.call(value) == arrayClass) {\r\n for (length = value.length; length--;) {\r\n update(value, length, callback);\r\n }\r\n } else {\r\n forEach(value, function (property) {\r\n update(value, property, callback);\r\n });\r\n }\r\n }\r\n return callback.call(source, property, value);\r\n };\r\n\r\n // Public: `JSON.parse`. See ES 5.1 section 15.12.2.\r\n exports.parse = function (source, callback) {\r\n var result, value;\r\n Index = 0;\r\n Source = \"\" + source;\r\n result = get(lex());\r\n // If a JSON string contains multiple tokens, it is invalid.\r\n if (lex() != \"$\") {\r\n abort();\r\n }\r\n // Reset the parser state.\r\n Index = Source = null;\r\n return callback && getClass.call(callback) == functionClass ? walk((value = {}, value[\"\"] = result, value), \"\", callback) : result;\r\n };\r\n }\r\n }\r\n\r\n exports[\"runInContext\"] = runInContext;\r\n return exports;\r\n }\r\n\r\n if (freeExports && !isLoader) {\r\n // Export for CommonJS environments.\r\n runInContext(root, freeExports);\r\n } else {\r\n // Export for web browsers and JavaScript engines.\r\n var nativeJSON = root.JSON,\r\n previousJSON = root[\"JSON3\"],\r\n isRestored = false;\r\n\r\n var JSON3 = runInContext(root, (root[\"JSON3\"] = {\r\n // Public: Restores the original value of the global `JSON` object and\r\n // returns a reference to the `JSON3` object.\r\n \"noConflict\": function () {\r\n if (!isRestored) {\r\n isRestored = true;\r\n root.JSON = nativeJSON;\r\n root[\"JSON3\"] = previousJSON;\r\n nativeJSON = previousJSON = null;\r\n }\r\n return JSON3;\r\n }\r\n }));\r\n\r\n root.JSON = {\r\n \"parse\": JSON3.parse,\r\n \"stringify\": JSON3.stringify\r\n };\r\n }\r\n\r\n // Export for asynchronous module loaders.\r\n if (isLoader) {\r\n define(function () {\r\n return JSON3;\r\n });\r\n }\r\n}).call(this);\r\n\r\n//##############################################################################\r\n// Elements.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\r\n\t/**\r\n\t * Convenience methods for creating various elements used by PrelaodJS.\r\n\t *\r\n\t * @class DomUtils\r\n\t */\r\n\tvar s = {};\r\n\r\n\ts.a = function() {\r\n\t\treturn s.el(\"a\");\r\n\t}\r\n\r\n\ts.svg = function() {\r\n\t\treturn s.el(\"svg\");\r\n\t}\r\n\r\n\ts.object = function() {\r\n\t\treturn s.el(\"object\");\r\n\t}\r\n\r\n\ts.image = function() {\r\n\t\treturn s.el(\"image\");\r\n\t}\r\n\r\n\ts.img = function() {\r\n\t\treturn s.el(\"img\");\r\n\t}\r\n\r\n\ts.style = function() {\r\n\t\treturn s.el(\"style\");\r\n\t}\r\n\r\n\ts.link = function() {\r\n\t\treturn s.el(\"link\");\r\n\t}\r\n\r\n\ts.script = function() {\r\n\t\treturn s.el(\"script\");\r\n\t}\r\n\r\n\ts.audio = function() {\r\n\t\treturn s.el(\"audio\");\r\n\t}\r\n\r\n\ts.video = function() {\r\n\t\treturn s.el(\"video\");\r\n\t}\r\n\r\n\ts.text = function(value) {\r\n\t\treturn document.createTextNode(value);\r\n\t}\r\n\r\n\ts.el = function(name) {\r\n\t\treturn document.createElement(name);\r\n\t}\r\n\r\n\tcreatejs.Elements = s;\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// URLUtils.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\r\n\t/**\r\n\t * Utilities that assist with parsing load items, and determining file types, etc.\r\n\t * @class URLUtils\r\n\t */\r\n\tvar s = {};\r\n\r\n\t/**\r\n\t * The Regular Expression used to test file URLS for an absolute path.\r\n\t * @property ABSOLUTE_PATH\r\n\t * @type {RegExp}\r\n\t * @static\r\n\t */\r\n\ts.ABSOLUTE_PATT = /^(?:\\w+:)?\\/{2}/i;\r\n\r\n\t/**\r\n\t * The Regular Expression used to test file URLS for a relative path.\r\n\t * @property RELATIVE_PATH\r\n\t * @type {RegExp}\r\n\t * @static\r\n\t */\r\n\ts.RELATIVE_PATT = (/^[./]*?\\//i);\r\n\r\n\t/**\r\n\t * The Regular Expression used to test file URLS for an extension. Note that URIs must already have the query string\r\n\t * removed.\r\n\t * @property EXTENSION_PATT\r\n\t * @type {RegExp}\r\n\t * @static\r\n\t */\r\n\ts.EXTENSION_PATT = /\\/?[^/]+\\.(\\w{1,5})$/i;\r\n\r\n\t/**\r\n\t * Parse a file path to determine the information we need to work with it. Currently, PreloadJS needs to know:\r\n\t *
      \r\n\t *
    • If the path is absolute. Absolute paths start with a protocol (such as `http://`, `file://`, or\r\n\t * `//networkPath`)
    • \r\n\t *
    • If the path is relative. Relative paths start with `../` or `/path` (or similar)
    • \r\n\t *
    • The file extension. This is determined by the filename with an extension. Query strings are dropped, and\r\n\t * the file path is expected to follow the format `name.ext`.
    • \r\n\t *
    \r\n\t *\r\n\t * @method parseURI\r\n\t * @param {String} path\r\n\t * @returns {Object} An Object with an `absolute` and `relative` Boolean values,\r\n\t * \tthe pieces of the path (protocol, hostname, port, pathname, search, hash, host)\r\n\t * \tas well as an optional 'extension` property, which is the lowercase extension.\r\n\t *\r\n\t * @static\r\n\t */\r\n\ts.parseURI = function (path) {\r\n\t\tvar info = {\r\n\t\t\tabsolute: false,\r\n\t\t\trelative: false,\r\n\t\t\tprotocol: null,\r\n\t\t\thostname: null,\r\n\t\t\tport: null,\r\n\t\t\tpathname: null,\r\n\t\t\tsearch: null,\r\n\t\t\thash: null,\r\n\t\t\thost: null\r\n\t\t};\r\n\r\n\t\tif (path == null) { return info; }\r\n\r\n\t\t// Inject the path parts.\r\n\t\tvar parser = createjs.Elements.a();\r\n\t\tparser.href = path;\r\n\r\n\t\tfor (var n in info) {\r\n\t\t\tif (n in parser) {\r\n\t\t\t\tinfo[n] = parser[n];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Drop the query string\r\n\t\tvar queryIndex = path.indexOf(\"?\");\r\n\t\tif (queryIndex > -1) {\r\n\t\t\tpath = path.substr(0, queryIndex);\r\n\t\t}\r\n\r\n\t\t// Absolute\r\n\t\tvar match;\r\n\t\tif (s.ABSOLUTE_PATT.test(path)) {\r\n\t\t\tinfo.absolute = true;\r\n\r\n\t\t\t// Relative\r\n\t\t} else if (s.RELATIVE_PATT.test(path)) {\r\n\t\t\tinfo.relative = true;\r\n\t\t}\r\n\r\n\t\t// Extension\r\n\t\tif (match = path.match(s.EXTENSION_PATT)) {\r\n\t\t\tinfo.extension = match[1].toLowerCase();\r\n\t\t}\r\n\r\n\t\treturn info;\r\n\t};\r\n\r\n\t/**\r\n\t * Formats an object into a query string for either a POST or GET request.\r\n\t * @method formatQueryString\r\n\t * @param {Object} data The data to convert to a query string.\r\n\t * @param {Array} [query] Existing name/value pairs to append on to this query.\r\n\t * @static\r\n\t */\r\n\ts.formatQueryString = function (data, query) {\r\n\t\tif (data == null) {\r\n\t\t\tthrow new Error(\"You must specify data.\");\r\n\t\t}\r\n\t\tvar params = [];\r\n\t\tfor (var n in data) {\r\n\t\t\tparams.push(n + \"=\" + escape(data[n]));\r\n\t\t}\r\n\t\tif (query) {\r\n\t\t\tparams = params.concat(query);\r\n\t\t}\r\n\t\treturn params.join(\"&\");\r\n\t};\r\n\r\n\t/**\r\n\t * A utility method that builds a file path using a source and a data object, and formats it into a new path.\r\n\t * @method buildURI\r\n\t * @param {String} src The source path to add values to.\r\n\t * @param {Object} [data] Object used to append values to this request as a query string. Existing parameters on the\r\n\t * path will be preserved.\r\n\t * @returns {string} A formatted string that contains the path and the supplied parameters.\r\n\t * @static\r\n\t */\r\n\ts.buildURI = function (src, data) {\r\n\t\tif (data == null) {\r\n\t\t\treturn src;\r\n\t\t}\r\n\r\n\t\tvar query = [];\r\n\t\tvar idx = src.indexOf(\"?\");\r\n\r\n\t\tif (idx != -1) {\r\n\t\t\tvar q = src.slice(idx + 1);\r\n\t\t\tquery = query.concat(q.split(\"&\"));\r\n\t\t}\r\n\r\n\t\tif (idx != -1) {\r\n\t\t\treturn src.slice(0, idx) + \"?\" + this.formatQueryString(data, query);\r\n\t\t} else {\r\n\t\t\treturn src + \"?\" + this.formatQueryString(data, query);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * @method isCrossDomain\r\n\t * @param {LoadItem|Object} item A load item with a `src` property.\r\n\t * @return {Boolean} If the load item is loading from a different domain than the current location.\r\n\t * @static\r\n\t */\r\n\ts.isCrossDomain = function (item) {\r\n\t\tvar target = createjs.Elements.a();\r\n\t\ttarget.href = item.src;\r\n\r\n\t\tvar host = createjs.Elements.a();\r\n\t\thost.href = location.href;\r\n\r\n\t\tvar crossdomain = (target.hostname != \"\") &&\r\n\t\t\t(target.port != host.port ||\r\n\t\t\ttarget.protocol != host.protocol ||\r\n\t\t\ttarget.hostname != host.hostname);\r\n\t\treturn crossdomain;\r\n\t};\r\n\r\n\t/**\r\n\t * @method isLocal\r\n\t * @param {LoadItem|Object} item A load item with a `src` property\r\n\t * @return {Boolean} If the load item is loading from the \"file:\" protocol. Assume that the host must be local as\r\n\t * well.\r\n\t * @static\r\n\t */\r\n\ts.isLocal = function (item) {\r\n\t\tvar target = createjs.Elements.a();\r\n\t\ttarget.href = item.src;\r\n\t\treturn target.hostname == \"\" && target.protocol == \"file:\";\r\n\t};\r\n\r\n\tcreatejs.URLUtils = s;\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// DomUtils.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\r\n\t/**\r\n\t * A few utilities for interacting with the dom.\r\n\t * @class DomUtils\r\n\t */\r\n\tvar s = {\r\n\t\tcontainer: null\r\n\t};\r\n\r\n\ts.appendToHead = function (el) {\r\n\t\ts.getHead().appendChild(el);\r\n\t}\r\n\r\n\ts.appendToBody = function (el) {\r\n\t\tif (s.container == null) {\r\n\t\t\ts.container = document.createElement(\"div\");\r\n\t\t\ts.container.id = \"preloadjs-container\";\r\n\t\t\tvar style = s.container.style;\r\n\t\t\tstyle.visibility = \"hidden\";\r\n\t\t\tstyle.position = \"absolute\";\r\n\t\t\tstyle.width = s.container.style.height = \"10px\";\r\n\t\t\tstyle.overflow = \"hidden\";\r\n\t\t\tstyle.transform = style.msTransform = style.webkitTransform = style.oTransform = \"translate(-10px, -10px)\"; //LM: Not working\r\n\t\t\ts.getBody().appendChild(s.container);\r\n\t\t}\r\n\t\ts.container.appendChild(el);\r\n\t}\r\n\r\n\ts.getHead = function () {\r\n\t\treturn document.head || document.getElementsByTagName(\"head\")[0];\r\n\t}\r\n\r\n\ts.getBody = function () {\r\n\t\treturn document.body || document.getElementsByTagName(\"body\")[0];\r\n\t}\r\n\r\n\ts.removeChild = function(el) {\r\n\t\tif (el.parent) {\r\n\t\t\tel.parent.removeChild(el);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Check if item is a valid HTMLImageElement\r\n\t * @method isImageTag\r\n\t * @param {Object} item\r\n\t * @returns {Boolean}\r\n\t * @static\r\n\t */\r\n\ts.isImageTag = function(item) {\r\n\t\treturn item instanceof HTMLImageElement;\r\n\t};\r\n\r\n\t/**\r\n\t * Check if item is a valid HTMLAudioElement\r\n\t * @method isAudioTag\r\n\t * @param {Object} item\r\n\t * @returns {Boolean}\r\n\t * @static\r\n\t */\r\n\ts.isAudioTag = function(item) {\r\n\t\tif (window.HTMLAudioElement) {\r\n\t\t\treturn item instanceof HTMLAudioElement;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Check if item is a valid HTMLVideoElement\r\n\t * @method isVideoTag\r\n\t * @param {Object} item\r\n\t * @returns {Boolean}\r\n\t * @static\r\n\t */\r\n\ts.isVideoTag = function(item) {\r\n\t\tif (window.HTMLVideoElement) {\r\n\t\t\treturn item instanceof HTMLVideoElement;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t};\r\n\r\n\tcreatejs.DomUtils = s;\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// DataUtils.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\r\n\t/**\r\n\t * A few data utilities for formatting different data types.\r\n\t * @class DataUtils\r\n\t */\r\n\tvar s = {};\r\n\r\n\t// static methods\r\n\t/**\r\n\t * Parse XML using the DOM. This is required when preloading XML or SVG.\r\n\t * @method parseXML\r\n\t * @param {String} text The raw text or XML that is loaded by XHR.\r\n\t * @return {XML} An XML document\r\n\t * @static\r\n\t */\r\n\ts.parseXML = function (text) {\r\n\t\tvar xml = null;\r\n\t\t// CocoonJS does not support XML parsing with either method.\r\n\r\n\t\t// Most browsers will use DOMParser\r\n\t\t// IE fails on certain SVG files, so we have a fallback below.\r\n\t\ttry {\r\n\t\t\tif (window.DOMParser) {\r\n\t\t\t\tvar parser = new DOMParser();\r\n\t\t\t\txml = parser.parseFromString(text, \"text/xml\");\r\n\t\t\t}\r\n\t\t} catch (e) {\r\n\t\t}\r\n\r\n\t\t// Fallback for IE support.\r\n\t\tif (!xml) {\r\n\t\t\ttry {\r\n\t\t\t\txml = new ActiveXObject(\"Microsoft.XMLDOM\");\r\n\t\t\t\txml.async = false;\r\n\t\t\t\txml.loadXML(text);\r\n\t\t\t} catch (e) {\r\n\t\t\t\txml = null;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn xml;\r\n\t};\r\n\r\n\t/**\r\n\t * Parse a string into an Object.\r\n\t * @method parseJSON\r\n\t * @param {String} value The loaded JSON string\r\n\t * @returns {Object} A JavaScript object.\r\n\t */\r\n\ts.parseJSON = function (value) {\r\n\t\tif (value == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\treturn JSON.parse(value);\r\n\t\t} catch (e) {\r\n\t\t\t// TODO; Handle this with a custom error?\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t};\r\n\r\n\tcreatejs.DataUtils = s;\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// Types.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\tvar s = {};\r\n\r\n\t/**\r\n\t * The preload type for generic binary types. Note that images are loaded as binary files when using XHR.\r\n\t * @property BINARY\r\n\t * @type {String}\r\n\t * @default binary\r\n\t * @static\r\n\t * @since 0.6.0\r\n\t */\r\n\ts.BINARY = \"binary\";\r\n\r\n\t/**\r\n\t * The preload type for css files. CSS files are loaded using a <link> when loaded with XHR, or a\r\n\t * <style> tag when loaded with tags.\r\n\t * @property CSS\r\n\t * @type {String}\r\n\t * @default css\r\n\t * @static\r\n\t * @since 0.6.0\r\n\t */\r\n\ts.CSS = \"css\";\r\n\r\n\t/**\r\n\t * The preload type for font files.\r\n\t * @property FONT\r\n\t * @type {String}\r\n\t * @default font\r\n\t * @static\r\n\t * @since 0.9.0\r\n\t */\r\n\ts.FONT = \"font\";\r\n\r\n\t/**\r\n\t * The preload type for fonts specified with CSS (such as Google fonts)\r\n\t * @property FONTCSS\r\n\t * @type {String}\r\n\t * @default fontcss\r\n\t * @static\r\n\t * @since 0.9.0\r\n\t */\r\n\ts.FONTCSS = \"fontcss\";\r\n\r\n\t/**\r\n\t * The preload type for image files, usually png, gif, or jpg/jpeg. Images are loaded into an <image> tag.\r\n\t * @property IMAGE\r\n\t * @type {String}\r\n\t * @default image\r\n\t * @static\r\n\t * @since 0.6.0\r\n\t */\r\n\ts.IMAGE = \"image\";\r\n\r\n\t/**\r\n\t * The preload type for javascript files, usually with the \"js\" file extension. JavaScript files are loaded into a\r\n\t * <script> tag.\r\n\t *\r\n\t * Since version 0.4.1+, due to how tag-loaded scripts work, all JavaScript files are automatically injected into\r\n\t * the body of the document to maintain parity between XHR and tag-loaded scripts. In version 0.4.0 and earlier,\r\n\t * only tag-loaded scripts are injected.\r\n\t * @property JAVASCRIPT\r\n\t * @type {String}\r\n\t * @default javascript\r\n\t * @static\r\n\t * @since 0.6.0\r\n\t */\r\n\ts.JAVASCRIPT = \"javascript\";\r\n\r\n\t/**\r\n\t * The preload type for json files, usually with the \"json\" file extension. JSON data is loaded and parsed into a\r\n\t * JavaScript object. Note that if a `callback` is present on the load item, the file will be loaded with JSONP,\r\n\t * no matter what the {{#crossLink \"LoadQueue/preferXHR:property\"}}{{/crossLink}} property is set to, and the JSON\r\n\t * must contain a matching wrapper function.\r\n\t * @property JSON\r\n\t * @type {String}\r\n\t * @default json\r\n\t * @static\r\n\t * @since 0.6.0\r\n\t */\r\n\ts.JSON = \"json\";\r\n\r\n\t/**\r\n\t * The preload type for jsonp files, usually with the \"json\" file extension. JSON data is loaded and parsed into a\r\n\t * JavaScript object. You are required to pass a callback parameter that matches the function wrapper in the JSON.\r\n\t * Note that JSONP will always be used if there is a callback present, no matter what the {{#crossLink \"LoadQueue/preferXHR:property\"}}{{/crossLink}}\r\n\t * property is set to.\r\n\t * @property JSONP\r\n\t * @type {String}\r\n\t * @default jsonp\r\n\t * @static\r\n\t * @since 0.6.0\r\n\t */\r\n\ts.JSONP = \"jsonp\";\r\n\r\n\t/**\r\n\t * The preload type for json-based manifest files, usually with the \"json\" file extension. The JSON data is loaded\r\n\t * and parsed into a JavaScript object. PreloadJS will then look for a \"manifest\" property in the JSON, which is an\r\n\t * Array of files to load, following the same format as the {{#crossLink \"LoadQueue/loadManifest\"}}{{/crossLink}}\r\n\t * method. If a \"callback\" is specified on the manifest object, then it will be loaded using JSONP instead,\r\n\t * regardless of what the {{#crossLink \"LoadQueue/preferXHR:property\"}}{{/crossLink}} property is set to.\r\n\t * @property MANIFEST\r\n\t * @type {String}\r\n\t * @default manifest\r\n\t * @static\r\n\t * @since 0.6.0\r\n\t */\r\n\ts.MANIFEST = \"manifest\";\r\n\r\n\t/**\r\n\t * The preload type for sound files, usually mp3, ogg, or wav. When loading via tags, audio is loaded into an\r\n\t * <audio> tag.\r\n\t * @property SOUND\r\n\t * @type {String}\r\n\t * @default sound\r\n\t * @static\r\n\t * @since 0.6.0\r\n\t */\r\n\ts.SOUND = \"sound\";\r\n\r\n\t/**\r\n\t * The preload type for video files, usually mp4, ts, or ogg. When loading via tags, video is loaded into an\r\n\t * <video> tag.\r\n\t * @property VIDEO\r\n\t * @type {String}\r\n\t * @default video\r\n\t * @static\r\n\t * @since 0.6.0\r\n\t */\r\n\ts.VIDEO = \"video\";\r\n\r\n\t/**\r\n\t * The preload type for SpriteSheet files. SpriteSheet files are JSON files that contain string image paths.\r\n\t * @property SPRITESHEET\r\n\t * @type {String}\r\n\t * @default spritesheet\r\n\t * @static\r\n\t * @since 0.6.0\r\n\t */\r\n\ts.SPRITESHEET = \"spritesheet\";\r\n\r\n\t/**\r\n\t * The preload type for SVG files.\r\n\t * @property SVG\r\n\t * @type {String}\r\n\t * @default svg\r\n\t * @static\r\n\t * @since 0.6.0\r\n\t */\r\n\ts.SVG = \"svg\";\r\n\r\n\t/**\r\n\t * The preload type for text files, which is also the default file type if the type can not be determined. Text is\r\n\t * loaded as raw text.\r\n\t * @property TEXT\r\n\t * @type {String}\r\n\t * @default text\r\n\t * @static\r\n\t * @since 0.6.0\r\n\t */\r\n\ts.TEXT = \"text\";\r\n\r\n\t/**\r\n\t * The preload type for xml files. XML is loaded into an XML document.\r\n\t * @property XML\r\n\t * @type {String}\r\n\t * @default xml\r\n\t * @static\r\n\t * @since 0.6.0\r\n\t */\r\n\ts.XML = \"xml\";\r\n\r\n\tcreatejs.Types = s;\r\n}());\r\n\r\n//##############################################################################\r\n// Methods.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\tvar s = {};\r\n\r\n\t/**\r\n\t * Defines a POST request, use for a method value when loading data.\r\n\t * @property POST\r\n\t * @type {string}\r\n\t * @default post\r\n\t * @static\r\n\t */\r\n\ts.POST = \"POST\";\r\n\r\n\t/**\r\n\t * Defines a GET request, use for a method value when loading data.\r\n\t * @property GET\r\n\t * @type {string}\r\n\t * @default get\r\n\t * @static\r\n\t */\r\n\ts.GET = \"GET\";\r\n\r\n\tcreatejs.Methods = s;\r\n}());\r\n\r\n//##############################################################################\r\n// LoadItem.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\t/**\r\n\t * All loaders accept an item containing the properties defined in this class. If a raw object is passed instead,\r\n\t * it will not be affected, but it must contain at least a {{#crossLink \"src:property\"}}{{/crossLink}} property. A\r\n\t * string path or HTML tag is also acceptable, but it will be automatically converted to a LoadItem using the\r\n\t * {{#crossLink \"create\"}}{{/crossLink}} method by {{#crossLink \"AbstractLoader\"}}{{/crossLink}}\r\n\t * @class LoadItem\r\n\t * @constructor\r\n\t * @since 0.6.0\r\n\t */\r\n\tfunction LoadItem() {\r\n\t\t/**\r\n\t\t * The source of the file that is being loaded. This property is required. The source can either be a\r\n\t\t * string (recommended), or an HTML tag.\r\n\t\t * This can also be an object, but in that case it has to include a type and be handled by a plugin.\r\n\t\t * @property src\r\n\t\t * @type {String}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.src = null;\r\n\r\n\t\t/**\r\n\t\t * The type file that is being loaded. The type of the file is usually inferred by the extension, but can also\r\n\t\t * be set manually. This is helpful in cases where a file does not have an extension.\r\n\t\t * @property type\r\n\t\t * @type {String}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.type = null;\r\n\r\n\t\t/**\r\n\t\t * A string identifier which can be used to reference the loaded object. If none is provided, this will be\r\n\t\t * automatically set to the {{#crossLink \"src:property\"}}{{/crossLink}}.\r\n\t\t * @property id\r\n\t\t * @type {String}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.id = null;\r\n\r\n\t\t/**\r\n\t\t * Determines if a manifest will maintain the order of this item, in relation to other items in the manifest\r\n\t\t * that have also set the `maintainOrder` property to `true`. This only applies when the max connections has\r\n\t\t * been set above 1 (using {{#crossLink \"LoadQueue/setMaxConnections\"}}{{/crossLink}}). Everything with this\r\n\t\t * property set to `false` will finish as it is loaded. Ordered items are combined with script tags loading in\r\n\t\t * order when {{#crossLink \"LoadQueue/maintainScriptOrder:property\"}}{{/crossLink}} is set to `true`.\r\n\t\t * @property maintainOrder\r\n\t\t * @type {Boolean}\r\n\t\t * @default false\r\n\t\t */\r\n\t\tthis.maintainOrder = false;\r\n\r\n\t\t/**\r\n\t\t * A callback used by JSONP requests that defines what global method to call when the JSONP content is loaded.\r\n\t\t * @property callback\r\n\t\t * @type {String}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.callback = null;\r\n\r\n\t\t/**\r\n\t\t * An arbitrary data object, which is included with the loaded object.\r\n\t\t * @property data\r\n\t\t * @type {Object}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.data = null;\r\n\r\n\t\t/**\r\n\t\t * The request method used for HTTP calls. Both {{#crossLink \"Methods/GET:property\"}}{{/crossLink}} or\r\n\t\t * {{#crossLink \"Methods/POST:property\"}}{{/crossLink}} request types are supported, and are defined as\r\n\t\t * constants on {{#crossLink \"AbstractLoader\"}}{{/crossLink}}.\r\n\t\t * @property method\r\n\t\t * @type {String}\r\n\t\t * @default GET\r\n\t\t */\r\n\t\tthis.method = createjs.Methods.GET;\r\n\r\n\t\t/**\r\n\t\t * An object hash of name/value pairs to send to the server.\r\n\t\t * @property values\r\n\t\t * @type {Object}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.values = null;\r\n\r\n\t\t/**\r\n\t\t * An object hash of headers to attach to an XHR request. PreloadJS will automatically attach some default\r\n\t\t * headers when required, including \"Origin\", \"Content-Type\", and \"X-Requested-With\". You may override the\r\n\t\t * default headers by including them in your headers object.\r\n\t\t * @property headers\r\n\t\t * @type {Object}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.headers = null;\r\n\r\n\t\t/**\r\n\t\t * Enable credentials for XHR requests.\r\n\t\t * @property withCredentials\r\n\t\t * @type {Boolean}\r\n\t\t * @default false\r\n\t\t */\r\n\t\tthis.withCredentials = false;\r\n\r\n\t\t/**\r\n\t\t * Set the mime type of XHR-based requests. This is automatically set to \"text/plain; charset=utf-8\" for text\r\n\t\t * based files (json, xml, text, css, js).\r\n\t\t * @property mimeType\r\n\t\t * @type {String}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.mimeType = null;\r\n\r\n\t\t/**\r\n\t\t * Sets the crossOrigin attribute for CORS-enabled images loading cross-domain.\r\n\t\t * @property crossOrigin\r\n\t\t * @type {boolean}\r\n\t\t * @default Anonymous\r\n\t\t */\r\n\t\tthis.crossOrigin = null;\r\n\r\n\t\t/**\r\n\t\t * The duration in milliseconds to wait before a request times out. This only applies to tag-based and and XHR\r\n\t\t * (level one) loading, as XHR (level 2) provides its own timeout event.\r\n\t\t * @property loadTimeout\r\n\t\t * @type {Number}\r\n\t\t * @default 8000 (8 seconds)\r\n\t\t */\r\n\t\tthis.loadTimeout = s.LOAD_TIMEOUT_DEFAULT;\r\n\t};\r\n\r\n\tvar p = LoadItem.prototype = {};\r\n\tvar s = LoadItem;\r\n\r\n\t/**\r\n\t * Default duration in milliseconds to wait before a request times out. This only applies to tag-based and and XHR\r\n\t * (level one) loading, as XHR (level 2) provides its own timeout event.\r\n\t * @property LOAD_TIMEOUT_DEFAULT\r\n\t * @type {number}\r\n\t * @static\r\n\t */\r\n\ts.LOAD_TIMEOUT_DEFAULT = 8000;\r\n\r\n\t/**\r\n\t * Create a LoadItem.\r\n\t *
      \r\n\t *
    • String-based items are converted to a LoadItem with a populated {{#crossLink \"src:property\"}}{{/crossLink}}.
    • \r\n\t *
    • LoadItem instances are returned as-is
    • \r\n\t *
    • Objects are returned with any needed properties added
    • \r\n\t *
    \r\n\t * @method create\r\n\t * @param {LoadItem|String|Object} value The load item value\r\n\t * @returns {LoadItem|Object}\r\n\t * @static\r\n\t */\r\n\ts.create = function (value) {\r\n\t\tif (typeof value == \"string\") {\r\n\t\t\tvar item = new LoadItem();\r\n\t\t\titem.src = value;\r\n\t\t\treturn item;\r\n\t\t} else if (value instanceof s) {\r\n\t\t\treturn value;\r\n\t\t} else if (value instanceof Object && value.src) {\r\n\t\t\tif (value.loadTimeout == null) {\r\n\t\t\t\tvalue.loadTimeout = s.LOAD_TIMEOUT_DEFAULT;\r\n\t\t\t}\r\n\t\t\treturn value;\r\n\t\t} else {\r\n\t\t\tthrow new Error(\"Type not recognized.\");\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Provides a chainable shortcut method for setting a number of properties on the instance.\r\n\t *\r\n\t *

    Example

    \r\n\t *\r\n\t * var loadItem = new createjs.LoadItem().set({src:\"image.png\", maintainOrder:true});\r\n\t *\r\n\t * @method set\r\n\t * @param {Object} props A generic object containing properties to copy to the LoadItem instance.\r\n\t * @return {LoadItem} Returns the instance the method is called on (useful for chaining calls.)\r\n\t*/\r\n\tp.set = function(props) {\r\n\t\tfor (var n in props) { this[n] = props[n]; }\r\n\t\treturn this;\r\n\t};\r\n\r\n\tcreatejs.LoadItem = s;\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// RequestUtils.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\r\n\t/**\r\n\t * Utilities that assist with parsing load items, and determining file types, etc.\r\n\t * @class RequestUtils\r\n\t */\r\n\tvar s = {};\r\n\r\n\t/**\r\n\t * Determine if a specific type should be loaded as a binary file. Currently, only images and items marked\r\n\t * specifically as \"binary\" are loaded as binary. Note that audio is not a binary type, as we can not play\r\n\t * back using an audio tag if it is loaded as binary. Plugins can change the item type to binary to ensure they get\r\n\t * a binary result to work with. Binary files are loaded using XHR2. Types are defined as static constants on\r\n\t * {{#crossLink \"AbstractLoader\"}}{{/crossLink}}.\r\n\t * @method isBinary\r\n\t * @param {String} type The item type.\r\n\t * @return {Boolean} If the specified type is binary.\r\n\t * @static\r\n\t */\r\n\ts.isBinary = function (type) {\r\n\t\tswitch (type) {\r\n\t\t\tcase createjs.Types.IMAGE:\r\n\t\t\tcase createjs.Types.BINARY:\r\n\t\t\t\treturn true;\r\n\t\t\tdefault:\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Determine if a specific type is a text-based asset, and should be loaded as UTF-8.\r\n\t * @method isText\r\n\t * @param {String} type The item type.\r\n\t * @return {Boolean} If the specified type is text.\r\n\t * @static\r\n\t */\r\n\ts.isText = function (type) {\r\n\t\tswitch (type) {\r\n\t\t\tcase createjs.Types.TEXT:\r\n\t\t\tcase createjs.Types.JSON:\r\n\t\t\tcase createjs.Types.MANIFEST:\r\n\t\t\tcase createjs.Types.XML:\r\n\t\t\tcase createjs.Types.CSS:\r\n\t\t\tcase createjs.Types.SVG:\r\n\t\t\tcase createjs.Types.JAVASCRIPT:\r\n\t\t\tcase createjs.Types.SPRITESHEET:\r\n\t\t\t\treturn true;\r\n\t\t\tdefault:\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Determine the type of the object using common extensions. Note that the type can be passed in with the load item\r\n\t * if it is an unusual extension.\r\n\t * @method getTypeByExtension\r\n\t * @param {String} extension The file extension to use to determine the load type.\r\n\t * @return {String} The determined load type (for example, `createjs.Types.IMAGE`). Will return `null` if\r\n\t * the type can not be determined by the extension.\r\n\t * @static\r\n\t */\r\n\ts.getTypeByExtension = function (extension) {\r\n\t\tif (extension == null) {\r\n\t\t\treturn createjs.Types.TEXT;\r\n\t\t}\r\n\r\n\t\tswitch (extension.toLowerCase()) {\r\n\t\t\tcase \"jpeg\":\r\n\t\t\tcase \"jpg\":\r\n\t\t\tcase \"gif\":\r\n\t\t\tcase \"png\":\r\n\t\t\tcase \"webp\":\r\n\t\t\tcase \"bmp\":\r\n\t\t\t\treturn createjs.Types.IMAGE;\r\n\t\t\tcase \"ogg\":\r\n\t\t\tcase \"mp3\":\r\n\t\t\tcase \"webm\":\r\n\t\t\t\treturn createjs.Types.SOUND;\r\n\t\t\tcase \"mp4\":\r\n\t\t\tcase \"webm\":\r\n\t\t\tcase \"ts\":\r\n\t\t\t\treturn createjs.Types.VIDEO;\r\n\t\t\tcase \"json\":\r\n\t\t\t\treturn createjs.Types.JSON;\r\n\t\t\tcase \"xml\":\r\n\t\t\t\treturn createjs.Types.XML;\r\n\t\t\tcase \"css\":\r\n\t\t\t\treturn createjs.Types.CSS;\r\n\t\t\tcase \"js\":\r\n\t\t\t\treturn createjs.Types.JAVASCRIPT;\r\n\t\t\tcase 'svg':\r\n\t\t\t\treturn createjs.Types.SVG;\r\n\t\t\tdefault:\r\n\t\t\t\treturn createjs.Types.TEXT;\r\n\t\t}\r\n\t};\r\n\r\n\tcreatejs.RequestUtils = s;\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// AbstractLoader.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n// constructor\r\n\t/**\r\n\t * The base loader, which defines all the generic methods, properties, and events. All loaders extend this class,\r\n\t * including the {{#crossLink \"LoadQueue\"}}{{/crossLink}}.\r\n\t * @class AbstractLoader\r\n\t * @param {LoadItem|object|string} loadItem The item to be loaded.\r\n\t * @param {Boolean} [preferXHR] Determines if the LoadItem should try and load using XHR, or take a\r\n\t * tag-based approach, which can be better in cross-domain situations. Not all loaders can load using one or the\r\n\t * other, so this is a suggested directive.\r\n\t * @param {String} [type] The type of loader. Loader types are defined as constants on the AbstractLoader class,\r\n\t * such as {{#crossLink \"IMAGE:property\"}}{{/crossLink}}, {{#crossLink \"CSS:property\"}}{{/crossLink}}, etc.\r\n\t * @extends EventDispatcher\r\n\t */\r\n\tfunction AbstractLoader(loadItem, preferXHR, type) {\r\n\t\tthis.EventDispatcher_constructor();\r\n\r\n\t\t// public properties\r\n\t\t/**\r\n\t\t * If the loader has completed loading. This provides a quick check, but also ensures that the different approaches\r\n\t\t * used for loading do not pile up resulting in more than one `complete` {{#crossLink \"Event\"}}{{/crossLink}}.\r\n\t\t * @property loaded\r\n\t\t * @type {Boolean}\r\n\t\t * @default false\r\n\t\t */\r\n\t\tthis.loaded = false;\r\n\r\n\t\t/**\r\n\t\t * Determine if the loader was canceled. Canceled loads will not fire complete events. Note that this property\r\n\t\t * is readonly, so {{#crossLink \"LoadQueue\"}}{{/crossLink}} queues should be closed using {{#crossLink \"LoadQueue/close\"}}{{/crossLink}}\r\n\t\t * instead.\r\n\t\t * @property canceled\r\n\t\t * @type {Boolean}\r\n\t\t * @default false\r\n\t\t * @readonly\r\n\t\t */\r\n\t\tthis.canceled = false;\r\n\r\n\t\t/**\r\n\t\t * The current load progress (percentage) for this item. This will be a number between 0 and 1.\r\n\t\t *\r\n\t\t *

    Example

    \r\n\t\t *\r\n\t\t * var queue = new createjs.LoadQueue();\r\n\t\t * queue.loadFile(\"largeImage.png\");\r\n\t\t * queue.on(\"progress\", function() {\r\n\t\t * console.log(\"Progress:\", queue.progress, event.progress);\r\n\t\t * });\r\n\t\t *\r\n\t\t * @property progress\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t */\r\n\t\tthis.progress = 0;\r\n\r\n\t\t/**\r\n\t\t * The type of item this loader will load. See {{#crossLink \"AbstractLoader\"}}{{/crossLink}} for a full list of\r\n\t\t * supported types.\r\n\t\t * @property type\r\n\t\t * @type {String}\r\n\t\t */\r\n\t\tthis.type = type;\r\n\r\n\t\t/**\r\n\t\t * A formatter function that converts the loaded raw result into the final result. For example, the JSONLoader\r\n\t\t * converts a string of text into a JavaScript object. Not all loaders have a resultFormatter, and this property\r\n\t\t * can be overridden to provide custom formatting.\r\n\t\t *\r\n\t\t * Optionally, a resultFormatter can return a callback function in cases where the formatting needs to be\r\n\t\t * asynchronous, such as creating a new image. The callback function is passed 2 parameters, which are callbacks\r\n\t\t * to handle success and error conditions in the resultFormatter. Note that the resultFormatter method is\r\n\t\t * called in the current scope, as well as the success and error callbacks.\r\n\t\t *\r\n\t\t *

    Example asynchronous resultFormatter

    \r\n\t\t *\r\n\t\t * \tfunction _formatResult(loader) {\r\n\t\t * \t\treturn function(success, error) {\r\n\t\t * \t\t\tif (errorCondition) { error(errorDetailEvent); }\r\n\t\t * \t\t\tsuccess(result);\r\n\t\t * \t\t}\r\n\t\t * \t}\r\n\t\t * @property resultFormatter\r\n\t\t * @type {Function}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.resultFormatter = null;\r\n\r\n\t\t// protected properties\r\n\t\t/**\r\n\t\t * The {{#crossLink \"LoadItem\"}}{{/crossLink}} this loader represents. Note that this is null in a {{#crossLink \"LoadQueue\"}}{{/crossLink}},\r\n\t\t * but will be available on loaders such as {{#crossLink \"XMLLoader\"}}{{/crossLink}} and {{#crossLink \"ImageLoader\"}}{{/crossLink}}.\r\n\t\t * @property _item\r\n\t\t * @type {LoadItem|Object}\r\n\t\t * @private\r\n\t\t */\r\n\t\tif (loadItem) {\r\n\t\t\tthis._item = createjs.LoadItem.create(loadItem);\r\n\t\t} else {\r\n\t\t\tthis._item = null;\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Whether the loader will try and load content using XHR (true) or HTML tags (false).\r\n\t\t * @property _preferXHR\r\n\t\t * @type {Boolean}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._preferXHR = preferXHR;\r\n\r\n\t\t/**\r\n\t\t * The loaded result after it is formatted by an optional {{#crossLink \"resultFormatter\"}}{{/crossLink}}. For\r\n\t\t * items that are not formatted, this will be the same as the {{#crossLink \"_rawResult:property\"}}{{/crossLink}}.\r\n\t\t * The result is accessed using the {{#crossLink \"getResult\"}}{{/crossLink}} method.\r\n\t\t * @property _result\r\n\t\t * @type {Object|String}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._result = null;\r\n\r\n\t\t/**\r\n\t\t * The loaded result before it is formatted. The rawResult is accessed using the {{#crossLink \"getResult\"}}{{/crossLink}}\r\n\t\t * method, and passing `true`.\r\n\t\t * @property _rawResult\r\n\t\t * @type {Object|String}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._rawResult = null;\r\n\r\n\t\t/**\r\n\t\t * A list of items that loaders load behind the scenes. This does not include the main item the loader is\r\n\t\t * responsible for loading. Examples of loaders that have sub-items include the {{#crossLink \"SpriteSheetLoader\"}}{{/crossLink}} and\r\n\t\t * {{#crossLink \"ManifestLoader\"}}{{/crossLink}}.\r\n\t\t * @property _loadItems\r\n\t\t * @type {null}\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._loadedItems = null;\r\n\r\n\t\t/**\r\n\t\t * The attribute the items loaded using tags use for the source.\r\n\t\t * @type {string}\r\n\t\t * @default null\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._tagSrcAttribute = null;\r\n\r\n\t\t/**\r\n\t\t * An HTML tag (or similar) that a loader may use to load HTML content, such as images, scripts, etc.\r\n\t\t * @property _tag\r\n\t\t * @type {Object}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._tag = null;\r\n\t};\r\n\r\n\tvar p = createjs.extend(AbstractLoader, createjs.EventDispatcher);\r\n\tvar s = AbstractLoader;\r\n\r\n\t// Remove these @deprecated properties after 1.0\r\n\ttry {\r\n\t\tObject.defineProperties(s, {\r\n\t\t\tPOST: { get: createjs.deprecate(function() { return createjs.Methods.POST; }, \"AbstractLoader.POST\") },\r\n\t\t\tGET: { get: createjs.deprecate(function() { return createjs.Methods.GET; }, \"AbstractLoader.GET\") },\r\n\r\n\t\t\tBINARY: { get: createjs.deprecate(function() { return createjs.Types.BINARY; }, \"AbstractLoader.BINARY\") },\r\n\t\t\tCSS: { get: createjs.deprecate(function() { return createjs.Types.CSS; }, \"AbstractLoader.CSS\") },\r\n\t\t\tFONT: { get: createjs.deprecate(function() { return createjs.Types.FONT; }, \"AbstractLoader.FONT\") },\r\n\t\t\tFONTCSS: { get: createjs.deprecate(function() { return createjs.Types.FONTCSS; }, \"AbstractLoader.FONTCSS\") },\r\n\t\t\tIMAGE: { get: createjs.deprecate(function() { return createjs.Types.IMAGE; }, \"AbstractLoader.IMAGE\") },\r\n\t\t\tJAVASCRIPT: { get: createjs.deprecate(function() { return createjs.Types.JAVASCRIPT; }, \"AbstractLoader.JAVASCRIPT\") },\r\n\t\t\tJSON: { get: createjs.deprecate(function() { return createjs.Types.JSON; }, \"AbstractLoader.JSON\") },\r\n\t\t\tJSONP: { get: createjs.deprecate(function() { return createjs.Types.JSONP; }, \"AbstractLoader.JSONP\") },\r\n\t\t\tMANIFEST: { get: createjs.deprecate(function() { return createjs.Types.MANIFEST; }, \"AbstractLoader.MANIFEST\") },\r\n\t\t\tSOUND: { get: createjs.deprecate(function() { return createjs.Types.SOUND; }, \"AbstractLoader.SOUND\") },\r\n\t\t\tVIDEO: { get: createjs.deprecate(function() { return createjs.Types.VIDEO; }, \"AbstractLoader.VIDEO\") },\r\n\t\t\tSPRITESHEET: { get: createjs.deprecate(function() { return createjs.Types.SPRITESHEET; }, \"AbstractLoader.SPRITESHEET\") },\r\n\t\t\tSVG: { get: createjs.deprecate(function() { return createjs.Types.SVG; }, \"AbstractLoader.SVG\") },\r\n\t\t\tTEXT: { get: createjs.deprecate(function() { return createjs.Types.TEXT; }, \"AbstractLoader.TEXT\") },\r\n\t\t\tXML: { get: createjs.deprecate(function() { return createjs.Types.XML; }, \"AbstractLoader.XML\") }\r\n\t\t});\r\n\t} catch (e) {}\r\n\r\n// Events\r\n\t/**\r\n\t * The {{#crossLink \"ProgressEvent\"}}{{/crossLink}} that is fired when the overall progress changes. Prior to\r\n\t * version 0.6.0, this was just a regular {{#crossLink \"Event\"}}{{/crossLink}}.\r\n\t * @event progress\r\n\t * @since 0.3.0\r\n\t */\r\n\r\n\t/**\r\n\t * The {{#crossLink \"Event\"}}{{/crossLink}} that is fired when a load starts.\r\n\t * @event loadstart\r\n\t * @param {Object} target The object that dispatched the event.\r\n\t * @param {String} type The event type.\r\n\t * @since 0.3.1\r\n\t */\r\n\r\n\t/**\r\n\t * The {{#crossLink \"Event\"}}{{/crossLink}} that is fired when the entire queue has been loaded.\r\n\t * @event complete\r\n\t * @param {Object} target The object that dispatched the event.\r\n\t * @param {String} type The event type.\r\n\t * @since 0.3.0\r\n\t */\r\n\r\n\t/**\r\n\t * The {{#crossLink \"ErrorEvent\"}}{{/crossLink}} that is fired when the loader encounters an error. If the error was\r\n\t * encountered by a file, the event will contain the item that caused the error. Prior to version 0.6.0, this was\r\n\t * just a regular {{#crossLink \"Event\"}}{{/crossLink}}.\r\n\t * @event error\r\n\t * @since 0.3.0\r\n\t */\r\n\r\n\t/**\r\n\t * The {{#crossLink \"Event\"}}{{/crossLink}} that is fired when the loader encounters an internal file load error.\r\n\t * This enables loaders to maintain internal queues, and surface file load errors.\r\n\t * @event fileerror\r\n\t * @param {Object} target The object that dispatched the event.\r\n\t * @param {String} type The event type (\"fileerror\")\r\n\t * @param {LoadItem|object} The item that encountered the error\r\n\t * @since 0.6.0\r\n\t */\r\n\r\n\t/**\r\n\t * The {{#crossLink \"Event\"}}{{/crossLink}} that is fired when a loader internally loads a file. This enables\r\n\t * loaders such as {{#crossLink \"ManifestLoader\"}}{{/crossLink}} to maintain internal {{#crossLink \"LoadQueue\"}}{{/crossLink}}s\r\n\t * and notify when they have loaded a file. The {{#crossLink \"LoadQueue\"}}{{/crossLink}} class dispatches a\r\n\t * slightly different {{#crossLink \"LoadQueue/fileload:event\"}}{{/crossLink}} event.\r\n\t * @event fileload\r\n\t * @param {Object} target The object that dispatched the event.\r\n\t * @param {String} type The event type (\"fileload\")\r\n\t * @param {Object} item The file item which was specified in the {{#crossLink \"LoadQueue/loadFile\"}}{{/crossLink}}\r\n\t * or {{#crossLink \"LoadQueue/loadManifest\"}}{{/crossLink}} call. If only a string path or tag was specified, the\r\n\t * object will contain that value as a `src` property.\r\n\t * @param {Object} result The HTML tag or parsed result of the loaded item.\r\n\t * @param {Object} rawResult The unprocessed result, usually the raw text or binary data before it is converted\r\n\t * to a usable object.\r\n\t * @since 0.6.0\r\n\t */\r\n\r\n\t/**\r\n\t * The {{#crossLink \"Event\"}}{{/crossLink}} that is fired after the internal request is created, but before a load.\r\n\t * This allows updates to the loader for specific loading needs, such as binary or XHR image loading.\r\n\t * @event initialize\r\n\t * @param {Object} target The object that dispatched the event.\r\n\t * @param {String} type The event type (\"initialize\")\r\n\t * @param {AbstractLoader} loader The loader that has been initialized.\r\n\t */\r\n\r\n\r\n\t/**\r\n\t * Get a reference to the manifest item that is loaded by this loader. In some cases this will be the value that was\r\n\t * passed into {{#crossLink \"LoadQueue\"}}{{/crossLink}} using {{#crossLink \"LoadQueue/loadFile\"}}{{/crossLink}} or\r\n\t * {{#crossLink \"LoadQueue/loadManifest\"}}{{/crossLink}}. However if only a String path was passed in, then it will\r\n\t * be a {{#crossLink \"LoadItem\"}}{{/crossLink}}.\r\n\t * @method getItem\r\n\t * @return {Object} The manifest item that this loader is responsible for loading.\r\n\t * @since 0.6.0\r\n\t */\r\n\tp.getItem = function () {\r\n\t\treturn this._item;\r\n\t};\r\n\r\n\t/**\r\n\t * Get a reference to the content that was loaded by the loader (only available after the {{#crossLink \"complete:event\"}}{{/crossLink}}\r\n\t * event is dispatched.\r\n\t * @method getResult\r\n\t * @param {Boolean} [raw=false] Determines if the returned result will be the formatted content, or the raw loaded\r\n\t * data (if it exists).\r\n\t * @return {Object}\r\n\t * @since 0.6.0\r\n\t */\r\n\tp.getResult = function (raw) {\r\n\t\treturn raw ? this._rawResult : this._result;\r\n\t};\r\n\r\n\t/**\r\n\t * Return the `tag` this object creates or uses for loading.\r\n\t * @method getTag\r\n\t * @return {Object} The tag instance\r\n\t * @since 0.6.0\r\n\t */\r\n\tp.getTag = function () {\r\n\t\treturn this._tag;\r\n\t};\r\n\r\n\t/**\r\n\t * Set the `tag` this item uses for loading.\r\n\t * @method setTag\r\n\t * @param {Object} tag The tag instance\r\n\t * @since 0.6.0\r\n\t */\r\n\tp.setTag = function(tag) {\r\n\t this._tag = tag;\r\n\t};\r\n\r\n\t/**\r\n\t * Begin loading the item. This method is required when using a loader by itself.\r\n\t *\r\n\t *

    Example

    \r\n\t *\r\n\t * var queue = new createjs.LoadQueue();\r\n\t * queue.on(\"complete\", handleComplete);\r\n\t * queue.loadManifest(fileArray, false); // Note the 2nd argument that tells the queue not to start loading yet\r\n\t * queue.load();\r\n\t *\r\n\t * @method load\r\n\t */\r\n\tp.load = function () {\r\n\t\tthis._createRequest();\r\n\r\n\t\tthis._request.on(\"complete\", this, this);\r\n\t\tthis._request.on(\"progress\", this, this);\r\n\t\tthis._request.on(\"loadStart\", this, this);\r\n\t\tthis._request.on(\"abort\", this, this);\r\n\t\tthis._request.on(\"timeout\", this, this);\r\n\t\tthis._request.on(\"error\", this, this);\r\n\r\n\t\tvar evt = new createjs.Event(\"initialize\");\r\n\t\tevt.loader = this._request;\r\n\t\tthis.dispatchEvent(evt);\r\n\r\n\t\tthis._request.load();\r\n\t};\r\n\r\n\t/**\r\n\t * Close the the item. This will stop any open requests (although downloads using HTML tags may still continue in\r\n\t * the background), but events will not longer be dispatched.\r\n\t * @method cancel\r\n\t */\r\n\tp.cancel = function () {\r\n\t\tthis.canceled = true;\r\n\t\tthis.destroy();\r\n\t};\r\n\r\n\t/**\r\n\t * Clean up the loader.\r\n\t * @method destroy\r\n\t */\r\n\tp.destroy = function() {\r\n\t\tif (this._request) {\r\n\t\t\tthis._request.removeAllEventListeners();\r\n\t\t\tthis._request.destroy();\r\n\t\t}\r\n\r\n\t\tthis._request = null;\r\n\r\n\t\tthis._item = null;\r\n\t\tthis._rawResult = null;\r\n\t\tthis._result = null;\r\n\r\n\t\tthis._loadItems = null;\r\n\r\n\t\tthis.removeAllEventListeners();\r\n\t};\r\n\r\n\t/**\r\n\t * Get any items loaded internally by the loader. The enables loaders such as {{#crossLink \"ManifestLoader\"}}{{/crossLink}}\r\n\t * to expose items it loads internally.\r\n\t * @method getLoadedItems\r\n\t * @return {Array} A list of the items loaded by the loader.\r\n\t * @since 0.6.0\r\n\t */\r\n\tp.getLoadedItems = function () {\r\n\t\treturn this._loadedItems;\r\n\t};\r\n\r\n\r\n\t// Private methods\r\n\t/**\r\n\t * Create an internal request used for loading. By default, an {{#crossLink \"XHRRequest\"}}{{/crossLink}} or\r\n\t * {{#crossLink \"TagRequest\"}}{{/crossLink}} is created, depending on the value of {{#crossLink \"preferXHR:property\"}}{{/crossLink}}.\r\n\t * Other loaders may override this to use different request types, such as {{#crossLink \"ManifestLoader\"}}{{/crossLink}},\r\n\t * which uses {{#crossLink \"JSONLoader\"}}{{/crossLink}} or {{#crossLink \"JSONPLoader\"}}{{/crossLink}} under the hood.\r\n\t * @method _createRequest\r\n\t * @protected\r\n\t */\r\n\tp._createRequest = function() {\r\n\t\tif (!this._preferXHR) {\r\n\t\t\tthis._request = new createjs.TagRequest(this._item, this._tag || this._createTag(), this._tagSrcAttribute);\r\n\t\t} else {\r\n\t\t\tthis._request = new createjs.XHRRequest(this._item);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Create the HTML tag used for loading. This method does nothing by default, and needs to be implemented\r\n\t * by loaders that require tag loading.\r\n\t * @method _createTag\r\n\t * @param {String} src The tag source\r\n\t * @return {HTMLElement} The tag that was created\r\n\t * @protected\r\n\t */\r\n\tp._createTag = function(src) { return null; };\r\n\r\n\t/**\r\n\t * Dispatch a loadstart {{#crossLink \"Event\"}}{{/crossLink}}. Please see the {{#crossLink \"AbstractLoader/loadstart:event\"}}{{/crossLink}}\r\n\t * event for details on the event payload.\r\n\t * @method _sendLoadStart\r\n\t * @protected\r\n\t */\r\n\tp._sendLoadStart = function () {\r\n\t\tif (this._isCanceled()) { return; }\r\n\t\tthis.dispatchEvent(\"loadstart\");\r\n\t};\r\n\r\n\t/**\r\n\t * Dispatch a {{#crossLink \"ProgressEvent\"}}{{/crossLink}}.\r\n\t * @method _sendProgress\r\n\t * @param {Number | Object} value The progress of the loaded item, or an object containing loaded\r\n\t * and total properties.\r\n\t * @protected\r\n\t */\r\n\tp._sendProgress = function (value) {\r\n\t\tif (this._isCanceled()) { return; }\r\n\t\tvar event = null;\r\n\t\tif (typeof(value) == \"number\") {\r\n\t\t\tthis.progress = value;\r\n\t\t\tevent = new createjs.ProgressEvent(this.progress);\r\n\t\t} else {\r\n\t\t\tevent = value;\r\n\t\t\tthis.progress = value.loaded / value.total;\r\n\t\t\tevent.progress = this.progress;\r\n\t\t\tif (isNaN(this.progress) || this.progress == Infinity) { this.progress = 0; }\r\n\t\t}\r\n\t\tthis.hasEventListener(\"progress\") && this.dispatchEvent(event);\r\n\t};\r\n\r\n\t/**\r\n\t * Dispatch a complete {{#crossLink \"Event\"}}{{/crossLink}}. Please see the {{#crossLink \"AbstractLoader/complete:event\"}}{{/crossLink}} event\r\n\t * @method _sendComplete\r\n\t * @protected\r\n\t */\r\n\tp._sendComplete = function () {\r\n\t\tif (this._isCanceled()) { return; }\r\n\r\n\t\tthis.loaded = true;\r\n\r\n\t\tvar event = new createjs.Event(\"complete\");\r\n\t\tevent.rawResult = this._rawResult;\r\n\r\n\t\tif (this._result != null) {\r\n\t\t\tevent.result = this._result;\r\n\t\t}\r\n\r\n\t\tthis.dispatchEvent(event);\r\n\t};\r\n\r\n\t/**\r\n\t * Dispatch an error {{#crossLink \"Event\"}}{{/crossLink}}. Please see the {{#crossLink \"AbstractLoader/error:event\"}}{{/crossLink}}\r\n\t * event for details on the event payload.\r\n\t * @method _sendError\r\n\t * @param {ErrorEvent} event The event object containing specific error properties.\r\n\t * @protected\r\n\t */\r\n\tp._sendError = function (event) {\r\n\t\tif (this._isCanceled() || !this.hasEventListener(\"error\")) { return; }\r\n\t\tif (event == null) {\r\n\t\t\tevent = new createjs.ErrorEvent(\"PRELOAD_ERROR_EMPTY\"); // TODO: Populate error\r\n\t\t}\r\n\t\tthis.dispatchEvent(event);\r\n\t};\r\n\r\n\t/**\r\n\t * Determine if the load has been canceled. This is important to ensure that method calls or asynchronous events\r\n\t * do not cause issues after the queue has been cleaned up.\r\n\t * @method _isCanceled\r\n\t * @return {Boolean} If the loader has been canceled.\r\n\t * @protected\r\n\t */\r\n\tp._isCanceled = function () {\r\n\t\tif (window.createjs == null || this.canceled) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\t/**\r\n\t * A custom result formatter function, which is called just before a request dispatches its complete event. Most\r\n\t * loader types already have an internal formatter, but this can be user-overridden for custom formatting. The\r\n\t * formatted result will be available on Loaders using {{#crossLink \"getResult\"}}{{/crossLink}}, and passing `true`.\r\n\t * @property resultFormatter\r\n\t * @type Function\r\n\t * @return {Object} The formatted result\r\n\t * @since 0.6.0\r\n\t */\r\n\tp.resultFormatter = null;\r\n\r\n\t/**\r\n\t * Handle events from internal requests. By default, loaders will handle, and redispatch the necessary events, but\r\n\t * this method can be overridden for custom behaviours.\r\n\t * @method handleEvent\r\n\t * @param {Event} event The event that the internal request dispatches.\r\n\t * @protected\r\n\t * @since 0.6.0\r\n\t */\r\n\tp.handleEvent = function (event) {\r\n\t\tswitch (event.type) {\r\n\t\t\tcase \"complete\":\r\n\t\t\t\tthis._rawResult = event.target._response;\r\n\t\t\t\tvar result = this.resultFormatter && this.resultFormatter(this);\r\n\t\t\t\t// The resultFormatter is asynchronous\r\n\t\t\t\tif (result instanceof Function) {\r\n\t\t\t\t\tresult.call(this,\r\n\t\t\t\t\t\t\tcreatejs.proxy(this._resultFormatSuccess, this),\r\n\t\t\t\t\t\t\tcreatejs.proxy(this._resultFormatFailed, this)\r\n\t\t\t\t\t);\r\n\t\t\t\t// The result formatter is synchronous\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis._result = result || this._rawResult;\r\n\t\t\t\t\tthis._sendComplete();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"progress\":\r\n\t\t\t\tthis._sendProgress(event);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"error\":\r\n\t\t\t\tthis._sendError(event);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"loadstart\":\r\n\t\t\t\tthis._sendLoadStart();\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"abort\":\r\n\t\t\tcase \"timeout\":\r\n\t\t\t\tif (!this._isCanceled()) {\r\n\t\t\t\t\tthis.dispatchEvent(new createjs.ErrorEvent(\"PRELOAD_\" + event.type.toUpperCase() + \"_ERROR\"));\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * The \"success\" callback passed to {{#crossLink \"AbstractLoader/resultFormatter\"}}{{/crossLink}} asynchronous\r\n\t * functions.\r\n\t * @method _resultFormatSuccess\r\n\t * @param {Object} result The formatted result\r\n\t * @private\r\n\t */\r\n\tp._resultFormatSuccess = function (result) {\r\n\t\tthis._result = result;\r\n\t\tthis._sendComplete();\r\n\t};\r\n\r\n\t/**\r\n\t * The \"error\" callback passed to {{#crossLink \"AbstractLoader/resultFormatter\"}}{{/crossLink}} asynchronous\r\n\t * functions.\r\n\t * @method _resultFormatSuccess\r\n\t * @param {Object} error The error event\r\n\t * @private\r\n\t */\r\n\tp._resultFormatFailed = function (event) {\r\n\t\tthis._sendError(event);\r\n\t};\r\n\r\n\t/**\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t */\r\n\tp.toString = function () {\r\n\t\treturn \"[PreloadJS AbstractLoader]\";\r\n\t};\r\n\r\n\tcreatejs.AbstractLoader = createjs.promote(AbstractLoader, \"EventDispatcher\");\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// AbstractMediaLoader.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\t// constructor\r\n\t/**\r\n\t * The AbstractMediaLoader is a base class that handles some of the shared methods and properties of loaders that\r\n\t * handle HTML media elements, such as Video and Audio.\r\n\t * @class AbstractMediaLoader\r\n\t * @param {LoadItem|Object} loadItem\r\n\t * @param {Boolean} preferXHR\r\n\t * @param {String} type The type of media to load. Usually \"video\" or \"audio\".\r\n\t * @extends AbstractLoader\r\n\t * @constructor\r\n\t */\r\n\tfunction AbstractMediaLoader(loadItem, preferXHR, type) {\r\n\t\tthis.AbstractLoader_constructor(loadItem, preferXHR, type);\r\n\r\n\t\t// public properties\r\n\t\tthis.resultFormatter = this._formatResult;\r\n\r\n\t\t// protected properties\r\n\t\tthis._tagSrcAttribute = \"src\";\r\n\r\n this.on(\"initialize\", this._updateXHR, this);\r\n\t};\r\n\r\n\tvar p = createjs.extend(AbstractMediaLoader, createjs.AbstractLoader);\r\n\r\n\t// static properties\r\n\t// public methods\r\n\tp.load = function () {\r\n\t\t// TagRequest will handle most of this, but Sound / Video need a few custom properties, so just handle them here.\r\n\t\tif (!this._tag) {\r\n\t\t\tthis._tag = this._createTag(this._item.src);\r\n\t\t}\r\n\r\n\t\tthis._tag.preload = \"auto\";\r\n\t\tthis._tag.load();\r\n\r\n\t\tthis.AbstractLoader_load();\r\n\t};\r\n\r\n\t// protected methods\r\n\t/**\r\n\t * Creates a new tag for loading if it doesn't exist yet.\r\n\t * @method _createTag\r\n\t * @private\r\n\t */\r\n\tp._createTag = function () {};\r\n\r\n\r\n\tp._createRequest = function() {\r\n\t\tif (!this._preferXHR) {\r\n\t\t\tthis._request = new createjs.MediaTagRequest(this._item, this._tag || this._createTag(), this._tagSrcAttribute);\r\n\t\t} else {\r\n\t\t\tthis._request = new createjs.XHRRequest(this._item);\r\n\t\t}\r\n\t};\r\n\r\n // protected methods\r\n /**\r\n * Before the item loads, set its mimeType and responseType.\r\n * @property _updateXHR\r\n * @param {Event} event\r\n * @private\r\n */\r\n p._updateXHR = function (event) {\r\n // Only exists for XHR\r\n if (event.loader.setResponseType) {\r\n event.loader.setResponseType(\"blob\");\r\n }\r\n };\r\n\r\n\t/**\r\n\t * The result formatter for media files.\r\n\t * @method _formatResult\r\n\t * @param {AbstractLoader} loader\r\n\t * @returns {HTMLVideoElement|HTMLAudioElement}\r\n\t * @private\r\n\t */\r\n\tp._formatResult = function (loader) {\r\n\t\tthis._tag.removeEventListener && this._tag.removeEventListener(\"canplaythrough\", this._loadedHandler);\r\n\t\tthis._tag.onstalled = null;\r\n\t\tif (this._preferXHR) {\r\n var URL = window.URL || window.webkitURL;\r\n var result = loader.getResult(true);\r\n\r\n\t\t\tloader.getTag().src = URL.createObjectURL(result);\r\n\t\t}\r\n\t\treturn loader.getTag();\r\n\t};\r\n\r\n\tcreatejs.AbstractMediaLoader = createjs.promote(AbstractMediaLoader, \"AbstractLoader\");\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// AbstractRequest.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\t/**\r\n\t * A base class for actual data requests, such as {{#crossLink \"XHRRequest\"}}{{/crossLink}}, {{#crossLink \"TagRequest\"}}{{/crossLink}},\r\n\t * and {{#crossLink \"MediaRequest\"}}{{/crossLink}}. PreloadJS loaders will typically use a data loader under the\r\n\t * hood to get data.\r\n\t * @class AbstractRequest\r\n\t * @param {LoadItem} item\r\n\t * @constructor\r\n\t */\r\n\tvar AbstractRequest = function (item) {\r\n\t\tthis._item = item;\r\n\t};\r\n\r\n\tvar p = createjs.extend(AbstractRequest, createjs.EventDispatcher);\r\n\r\n\t// public methods\r\n\t/**\r\n\t * Begin a load.\r\n\t * @method load\r\n\t */\r\n\tp.load = function() {};\r\n\r\n\t/**\r\n\t * Clean up a request.\r\n\t * @method destroy\r\n\t */\r\n\tp.destroy = function() {};\r\n\r\n\t/**\r\n\t * Cancel an in-progress request.\r\n\t * @method cancel\r\n\t */\r\n\tp.cancel = function() {};\r\n\r\n\tcreatejs.AbstractRequest = createjs.promote(AbstractRequest, \"EventDispatcher\");\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// TagRequest.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\t// constructor\r\n\t/**\r\n\t * An {{#crossLink \"AbstractRequest\"}}{{/crossLink}} that loads HTML tags, such as images and scripts.\r\n\t * @class TagRequest\r\n\t * @param {LoadItem} loadItem\r\n\t * @param {HTMLElement} tag\r\n\t * @param {String} srcAttribute The tag attribute that specifies the source, such as \"src\", \"href\", etc.\r\n\t */\r\n\tfunction TagRequest(loadItem, tag, srcAttribute) {\r\n\t\tthis.AbstractRequest_constructor(loadItem);\r\n\r\n\t\t// protected properties\r\n\t\t/**\r\n\t\t * The HTML tag instance that is used to load.\r\n\t\t * @property _tag\r\n\t\t * @type {HTMLElement}\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._tag = tag;\r\n\r\n\t\t/**\r\n\t\t * The tag attribute that specifies the source, such as \"src\", \"href\", etc.\r\n\t\t * @property _tagSrcAttribute\r\n\t\t * @type {String}\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._tagSrcAttribute = srcAttribute;\r\n\r\n\t\t/**\r\n\t\t * A method closure used for handling the tag load event.\r\n\t\t * @property _loadedHandler\r\n\t\t * @type {Function}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._loadedHandler = createjs.proxy(this._handleTagComplete, this);\r\n\r\n\t\t/**\r\n\t\t * Determines if the element was added to the DOM automatically by PreloadJS, so it can be cleaned up after.\r\n\t\t * @property _addedToDOM\r\n\t\t * @type {Boolean}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._addedToDOM = false;\r\n\r\n\t};\r\n\r\n\tvar p = createjs.extend(TagRequest, createjs.AbstractRequest);\r\n\r\n\t// public methods\r\n\tp.load = function () {\r\n\t\tthis._tag.onload = createjs.proxy(this._handleTagComplete, this);\r\n\t\tthis._tag.onreadystatechange = createjs.proxy(this._handleReadyStateChange, this);\r\n\t\tthis._tag.onerror = createjs.proxy(this._handleError, this);\r\n\r\n\t\tvar evt = new createjs.Event(\"initialize\");\r\n\t\tevt.loader = this._tag;\r\n\r\n\t\tthis.dispatchEvent(evt);\r\n\r\n\t\tthis._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), this._item.loadTimeout);\r\n\r\n\t\tthis._tag[this._tagSrcAttribute] = this._item.src;\r\n\r\n\t\t// wdg:: Append the tag AFTER setting the src, or SVG loading on iOS will fail.\r\n\t\tif (this._tag.parentNode == null) {\r\n\t\t\tcreatejs.DomUtils.appendToBody(this._tag);\r\n\t\t\tthis._addedToDOM = true;\r\n\t\t}\r\n\t};\r\n\r\n\tp.destroy = function() {\r\n\t\tthis._clean();\r\n\t\tthis._tag = null;\r\n\r\n\t\tthis.AbstractRequest_destroy();\r\n\t};\r\n\r\n\t// private methods\r\n\t/**\r\n\t * Handle the readyStateChange event from a tag. We need this in place of the `onload` callback (mainly SCRIPT\r\n\t * and LINK tags), but other cases may exist.\r\n\t * @method _handleReadyStateChange\r\n\t * @private\r\n\t */\r\n\tp._handleReadyStateChange = function () {\r\n\t\tclearTimeout(this._loadTimeout);\r\n\t\t// This is strictly for tags in browsers that do not support onload.\r\n\t\tvar tag = this._tag;\r\n\r\n\t\t// Complete is for old IE support.\r\n\t\tif (tag.readyState == \"loaded\" || tag.readyState == \"complete\") {\r\n\t\t\tthis._handleTagComplete();\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Handle any error events from the tag.\r\n\t * @method _handleError\r\n\t * @protected\r\n\t */\r\n\tp._handleError = function() {\r\n\t\tthis._clean();\r\n\t\tthis.dispatchEvent(\"error\");\r\n\t};\r\n\r\n\t/**\r\n\t * Handle the tag's onload callback.\r\n\t * @method _handleTagComplete\r\n\t * @private\r\n\t */\r\n\tp._handleTagComplete = function () {\r\n\t\tthis._rawResult = this._tag;\r\n\t\tthis._result = this.resultFormatter && this.resultFormatter(this) || this._rawResult;\r\n\r\n\t\tthis._clean();\r\n\r\n\t\tthis.dispatchEvent(\"complete\");\r\n\t};\r\n\r\n\t/**\r\n\t * The tag request has not loaded within the time specified in loadTimeout.\r\n\t * @method _handleError\r\n\t * @param {Object} event The XHR error event.\r\n\t * @private\r\n\t */\r\n\tp._handleTimeout = function () {\r\n\t\tthis._clean();\r\n\t\tthis.dispatchEvent(new createjs.Event(\"timeout\"));\r\n\t};\r\n\r\n\t/**\r\n\t * Remove event listeners, but don't destroy the request object\r\n\t * @method _clean\r\n\t * @private\r\n\t */\r\n\tp._clean = function() {\r\n\t\tthis._tag.onload = null;\r\n\t\tthis._tag.onreadystatechange = null;\r\n\t\tthis._tag.onerror = null;\r\n\t\tif (this._addedToDOM && this._tag.parentNode != null) {\r\n\t\t\tthis._tag.parentNode.removeChild(this._tag);\r\n\t\t}\r\n\t\tclearTimeout(this._loadTimeout);\r\n\t};\r\n\r\n\t/**\r\n\t * Handle a stalled audio event. The main place this happens is with HTMLAudio in Chrome when playing back audio\r\n\t * that is already in a load, but not complete.\r\n\t * @method _handleStalled\r\n\t * @private\r\n\t */\r\n\tp._handleStalled = function () {\r\n\t\t//Ignore, let the timeout take care of it. Sometimes its not really stopped.\r\n\t};\r\n\r\n\tcreatejs.TagRequest = createjs.promote(TagRequest, \"AbstractRequest\");\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// MediaTagRequest.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\t// constructor\r\n\t/**\r\n\t * An {{#crossLink \"TagRequest\"}}{{/crossLink}} that loads HTML tags for video and audio.\r\n\t * @class MediaTagRequest\r\n\t * @param {LoadItem} loadItem\r\n\t * @param {HTMLAudioElement|HTMLVideoElement} tag\r\n\t * @param {String} srcAttribute The tag attribute that specifies the source, such as \"src\", \"href\", etc.\r\n\t * @constructor\r\n\t */\r\n\tfunction MediaTagRequest(loadItem, tag, srcAttribute) {\r\n\t\tthis.AbstractRequest_constructor(loadItem);\r\n\r\n\t\t// protected properties\r\n\t\tthis._tag = tag;\r\n\t\tthis._tagSrcAttribute = srcAttribute;\r\n\t\tthis._loadedHandler = createjs.proxy(this._handleTagComplete, this);\r\n\t};\r\n\r\n\tvar p = createjs.extend(MediaTagRequest, createjs.TagRequest);\r\n\tvar s = MediaTagRequest;\r\n\r\n\t// public methods\r\n\tp.load = function () {\r\n\t\tvar sc = createjs.proxy(this._handleStalled, this);\r\n\t\tthis._stalledCallback = sc;\r\n\r\n\t\tvar pc = createjs.proxy(this._handleProgress, this);\r\n\t\tthis._handleProgress = pc;\r\n\r\n\t\tthis._tag.addEventListener(\"stalled\", sc);\r\n\t\tthis._tag.addEventListener(\"progress\", pc);\r\n\r\n\t\t// This will tell us when audio is buffered enough to play through, but not when its loaded.\r\n\t\t// The tag doesn't keep loading in Chrome once enough has buffered, and we have decided that behaviour is sufficient.\r\n\t\tthis._tag.addEventListener && this._tag.addEventListener(\"canplaythrough\", this._loadedHandler, false); // canplaythrough callback doesn't work in Chrome, so we use an event.\r\n\r\n\t\tthis.TagRequest_load();\r\n\t};\r\n\r\n\t// private methods\r\n\tp._handleReadyStateChange = function () {\r\n\t\tclearTimeout(this._loadTimeout);\r\n\t\t// This is strictly for tags in browsers that do not support onload.\r\n\t\tvar tag = this._tag;\r\n\r\n\t\t// Complete is for old IE support.\r\n\t\tif (tag.readyState == \"loaded\" || tag.readyState == \"complete\") {\r\n\t\t\tthis._handleTagComplete();\r\n\t\t}\r\n\t};\r\n\r\n\tp._handleStalled = function () {\r\n\t\t//Ignore, let the timeout take care of it. Sometimes its not really stopped.\r\n\t};\r\n\r\n\t/**\r\n\t * An XHR request has reported progress.\r\n\t * @method _handleProgress\r\n\t * @param {Object} event The XHR progress event.\r\n\t * @private\r\n\t */\r\n\tp._handleProgress = function (event) {\r\n\t\tif (!event || event.loaded > 0 && event.total == 0) {\r\n\t\t\treturn; // Sometimes we get no \"total\", so just ignore the progress event.\r\n\t\t}\r\n\r\n\t\tvar newEvent = new createjs.ProgressEvent(event.loaded, event.total);\r\n\t\tthis.dispatchEvent(newEvent);\r\n\t};\r\n\r\n\t// protected methods\r\n\tp._clean = function () {\r\n\t\tthis._tag.removeEventListener && this._tag.removeEventListener(\"canplaythrough\", this._loadedHandler);\r\n\t\tthis._tag.removeEventListener(\"stalled\", this._stalledCallback);\r\n\t\tthis._tag.removeEventListener(\"progress\", this._progressCallback);\r\n\r\n\t\tthis.TagRequest__clean();\r\n\t};\r\n\r\n\tcreatejs.MediaTagRequest = createjs.promote(MediaTagRequest, \"TagRequest\");\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// XHRRequest.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n// constructor\r\n\t/**\r\n\t * A preloader that loads items using XHR requests, usually XMLHttpRequest. However XDomainRequests will be used\r\n\t * for cross-domain requests if possible, and older versions of IE fall back on to ActiveX objects when necessary.\r\n\t * XHR requests load the content as text or binary data, provide progress and consistent completion events, and\r\n\t * can be canceled during load. Note that XHR is not supported in IE 6 or earlier, and is not recommended for\r\n\t * cross-domain loading.\r\n\t * @class XHRRequest\r\n\t * @constructor\r\n\t * @param {Object} item The object that defines the file to load. Please see the {{#crossLink \"LoadQueue/loadFile\"}}{{/crossLink}}\r\n\t * for an overview of supported file properties.\r\n\t * @extends AbstractLoader\r\n\t */\r\n\tfunction XHRRequest (item) {\r\n\t\tthis.AbstractRequest_constructor(item);\r\n\r\n\t\t// protected properties\r\n\t\t/**\r\n\t\t * A reference to the XHR request used to load the content.\r\n\t\t * @property _request\r\n\t\t * @type {XMLHttpRequest | XDomainRequest | ActiveX.XMLHTTP}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._request = null;\r\n\r\n\t\t/**\r\n\t\t * A manual load timeout that is used for browsers that do not support the onTimeout event on XHR (XHR level 1,\r\n\t\t * typically IE9).\r\n\t\t * @property _loadTimeout\r\n\t\t * @type {Number}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._loadTimeout = null;\r\n\r\n\t\t/**\r\n\t\t * The browser's XHR (XMLHTTPRequest) version. Supported versions are 1 and 2. There is no official way to detect\r\n\t\t * the version, so we use capabilities to make a best guess.\r\n\t\t * @property _xhrLevel\r\n\t\t * @type {Number}\r\n\t\t * @default 1\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._xhrLevel = 1;\r\n\r\n\t\t/**\r\n\t\t * The response of a loaded file. This is set because it is expensive to look up constantly. This property will be\r\n\t\t * null until the file is loaded.\r\n\t\t * @property _response\r\n\t\t * @type {mixed}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._response = null;\r\n\r\n\t\t/**\r\n\t\t * The response of the loaded file before it is modified. In most cases, content is converted from raw text to\r\n\t\t * an HTML tag or a formatted object which is set to the result property, but the developer may still\r\n\t\t * want to access the raw content as it was loaded.\r\n\t\t * @property _rawResponse\r\n\t\t * @type {String|Object}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._rawResponse = null;\r\n\r\n\t\tthis._canceled = false;\r\n\r\n\t\t// Setup our event handlers now.\r\n\t\tthis._handleLoadStartProxy = createjs.proxy(this._handleLoadStart, this);\r\n\t\tthis._handleProgressProxy = createjs.proxy(this._handleProgress, this);\r\n\t\tthis._handleAbortProxy = createjs.proxy(this._handleAbort, this);\r\n\t\tthis._handleErrorProxy = createjs.proxy(this._handleError, this);\r\n\t\tthis._handleTimeoutProxy = createjs.proxy(this._handleTimeout, this);\r\n\t\tthis._handleLoadProxy = createjs.proxy(this._handleLoad, this);\r\n\t\tthis._handleReadyStateChangeProxy = createjs.proxy(this._handleReadyStateChange, this);\r\n\r\n\t\tif (!this._createXHR(item)) {\r\n\t\t\t//TODO: Throw error?\r\n\t\t}\r\n\t};\r\n\r\n\tvar p = createjs.extend(XHRRequest, createjs.AbstractRequest);\r\n\r\n// static properties\r\n\t/**\r\n\t * A list of XMLHTTP object IDs to try when building an ActiveX object for XHR requests in earlier versions of IE.\r\n\t * @property ACTIVEX_VERSIONS\r\n\t * @type {Array}\r\n\t * @since 0.4.2\r\n\t * @private\r\n\t */\r\n\tXHRRequest.ACTIVEX_VERSIONS = [\r\n\t\t\"Msxml2.XMLHTTP.6.0\",\r\n\t\t\"Msxml2.XMLHTTP.5.0\",\r\n\t\t\"Msxml2.XMLHTTP.4.0\",\r\n\t\t\"MSXML2.XMLHTTP.3.0\",\r\n\t\t\"MSXML2.XMLHTTP\",\r\n\t\t\"Microsoft.XMLHTTP\"\r\n\t];\r\n\r\n// Public methods\r\n\t/**\r\n\t * Look up the loaded result.\r\n\t * @method getResult\r\n\t * @param {Boolean} [raw=false] Return a raw result instead of a formatted result. This applies to content\r\n\t * loaded via XHR such as scripts, XML, CSS, and Images. If there is no raw result, the formatted result will be\r\n\t * returned instead.\r\n\t * @return {Object} A result object containing the content that was loaded, such as:\r\n\t *
      \r\n\t *
    • An image tag (<image />) for images
    • \r\n\t *
    • A script tag for JavaScript (<script />). Note that scripts loaded with tags may be added to the\r\n\t * HTML head.
    • \r\n\t *
    • A style tag for CSS (<style />)
    • \r\n\t *
    • Raw text for TEXT
    • \r\n\t *
    • A formatted JavaScript object defined by JSON
    • \r\n\t *
    • An XML document
    • \r\n\t *
    • An binary arraybuffer loaded by XHR
    • \r\n\t *
    \r\n\t * Note that if a raw result is requested, but not found, the result will be returned instead.\r\n\t */\r\n\tp.getResult = function (raw) {\r\n\t\tif (raw && this._rawResponse) {\r\n\t\t\treturn this._rawResponse;\r\n\t\t}\r\n\t\treturn this._response;\r\n\t};\r\n\r\n\t// Overrides abstract method in AbstractRequest\r\n\tp.cancel = function () {\r\n\t\tthis.canceled = true;\r\n\t\tthis._clean();\r\n\t\tthis._request.abort();\r\n\t};\r\n\r\n\t// Overrides abstract method in AbstractLoader\r\n\tp.load = function () {\r\n\t\tif (this._request == null) {\r\n\t\t\tthis._handleError();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//Events\r\n\t\tif (this._request.addEventListener != null) {\r\n\t\t\tthis._request.addEventListener(\"loadstart\", this._handleLoadStartProxy, false);\r\n\t\t\tthis._request.addEventListener(\"progress\", this._handleProgressProxy, false);\r\n\t\t\tthis._request.addEventListener(\"abort\", this._handleAbortProxy, false);\r\n\t\t\tthis._request.addEventListener(\"error\", this._handleErrorProxy, false);\r\n\t\t\tthis._request.addEventListener(\"timeout\", this._handleTimeoutProxy, false);\r\n\r\n\t\t\t// Note: We don't get onload in all browsers (earlier FF and IE). onReadyStateChange handles these.\r\n\t\t\tthis._request.addEventListener(\"load\", this._handleLoadProxy, false);\r\n\t\t\tthis._request.addEventListener(\"readystatechange\", this._handleReadyStateChangeProxy, false);\r\n\t\t} else {\r\n\t\t\t// IE9 support\r\n\t\t\tthis._request.onloadstart = this._handleLoadStartProxy;\r\n\t\t\tthis._request.onprogress = this._handleProgressProxy;\r\n\t\t\tthis._request.onabort = this._handleAbortProxy;\r\n\t\t\tthis._request.onerror = this._handleErrorProxy;\r\n\t\t\tthis._request.ontimeout = this._handleTimeoutProxy;\r\n\r\n\t\t\t// Note: We don't get onload in all browsers (earlier FF and IE). onReadyStateChange handles these.\r\n\t\t\tthis._request.onload = this._handleLoadProxy;\r\n\t\t\tthis._request.onreadystatechange = this._handleReadyStateChangeProxy;\r\n\t\t}\r\n\r\n\t\t// Set up a timeout if we don't have XHR2\r\n\t\tif (this._xhrLevel == 1) {\r\n\t\t\tthis._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), this._item.loadTimeout);\r\n\t\t}\r\n\r\n\t\t// Sometimes we get back 404s immediately, particularly when there is a cross origin request. // note this does not catch in Chrome\r\n\t\ttry {\r\n\t\t\tif (!this._item.values) {\r\n\t\t\t\tthis._request.send();\r\n\t\t\t} else {\r\n\t\t\t\tthis._request.send(createjs.URLUtils.formatQueryString(this._item.values));\r\n\t\t\t}\r\n\t\t} catch (error) {\r\n\t\t\tthis.dispatchEvent(new createjs.ErrorEvent(\"XHR_SEND\", null, error));\r\n\t\t}\r\n\t};\r\n\r\n\tp.setResponseType = function (type) {\r\n\t\t// Some old browsers doesn't support blob, so we convert arraybuffer to blob after response is downloaded\r\n\t\tif (type === 'blob') {\r\n\t\t\ttype = window.URL ? 'blob' : 'arraybuffer';\r\n\t\t\tthis._responseType = type;\r\n\t\t}\r\n\t\tthis._request.responseType = type;\r\n\t};\r\n\r\n\t/**\r\n\t * Get all the response headers from the XmlHttpRequest.\r\n\t *\r\n\t * From the docs: Return all the HTTP headers, excluding headers that are a case-insensitive match\r\n\t * for Set-Cookie or Set-Cookie2, as a single string, with each header line separated by a U+000D CR U+000A LF pair,\r\n\t * excluding the status line, and with each header name and header value separated by a U+003A COLON U+0020 SPACE\r\n\t * pair.\r\n\t * @method getAllResponseHeaders\r\n\t * @return {String}\r\n\t * @since 0.4.1\r\n\t */\r\n\tp.getAllResponseHeaders = function () {\r\n\t\tif (this._request.getAllResponseHeaders instanceof Function) {\r\n\t\t\treturn this._request.getAllResponseHeaders();\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Get a specific response header from the XmlHttpRequest.\r\n\t *\r\n\t * From the docs: Returns the header field value from the response of which the field name matches\r\n\t * header, unless the field name is Set-Cookie or Set-Cookie2.\r\n\t * @method getResponseHeader\r\n\t * @param {String} header The header name to retrieve.\r\n\t * @return {String}\r\n\t * @since 0.4.1\r\n\t */\r\n\tp.getResponseHeader = function (header) {\r\n\t\tif (this._request.getResponseHeader instanceof Function) {\r\n\t\t\treturn this._request.getResponseHeader(header);\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t};\r\n\r\n// protected methods\r\n\t/**\r\n\t * The XHR request has reported progress.\r\n\t * @method _handleProgress\r\n\t * @param {Object} event The XHR progress event.\r\n\t * @private\r\n\t */\r\n\tp._handleProgress = function (event) {\r\n\t\tif (!event || event.loaded > 0 && event.total == 0) {\r\n\t\t\treturn; // Sometimes we get no \"total\", so just ignore the progress event.\r\n\t\t}\r\n\r\n\t\tvar newEvent = new createjs.ProgressEvent(event.loaded, event.total);\r\n\t\tthis.dispatchEvent(newEvent);\r\n\t};\r\n\r\n\t/**\r\n\t * The XHR request has reported a load start.\r\n\t * @method _handleLoadStart\r\n\t * @param {Object} event The XHR loadStart event.\r\n\t * @private\r\n\t */\r\n\tp._handleLoadStart = function (event) {\r\n\t\tclearTimeout(this._loadTimeout);\r\n\t\tthis.dispatchEvent(\"loadstart\");\r\n\t};\r\n\r\n\t/**\r\n\t * The XHR request has reported an abort event.\r\n\t * @method handleAbort\r\n\t * @param {Object} event The XHR abort event.\r\n\t * @private\r\n\t */\r\n\tp._handleAbort = function (event) {\r\n\t\tthis._clean();\r\n\t\tthis.dispatchEvent(new createjs.ErrorEvent(\"XHR_ABORTED\", null, event));\r\n\t};\r\n\r\n\t/**\r\n\t * The XHR request has reported an error event.\r\n\t * @method _handleError\r\n\t * @param {Object} event The XHR error event.\r\n\t * @private\r\n\t */\r\n\tp._handleError = function (event) {\r\n\t\tthis._clean();\r\n\t\tthis.dispatchEvent(new createjs.ErrorEvent(event.message));\r\n\t};\r\n\r\n\t/**\r\n\t * The XHR request has reported a readyState change. Note that older browsers (IE 7 & 8) do not provide an onload\r\n\t * event, so we must monitor the readyStateChange to determine if the file is loaded.\r\n\t * @method _handleReadyStateChange\r\n\t * @param {Object} event The XHR readyStateChange event.\r\n\t * @private\r\n\t */\r\n\tp._handleReadyStateChange = function (event) {\r\n\t\tif (this._request.readyState == 4) {\r\n\t\t\tthis._handleLoad();\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * The XHR request has completed. This is called by the XHR request directly, or by a readyStateChange that has\r\n\t * request.readyState == 4. Only the first call to this method will be processed.\r\n\t *\r\n\t * Note that This method uses {{#crossLink \"_checkError\"}}{{/crossLink}} to determine if the server has returned an\r\n\t * error code.\r\n\t * @method _handleLoad\r\n\t * @param {Object} event The XHR load event.\r\n\t * @private\r\n\t */\r\n\tp._handleLoad = function (event) {\r\n\t\tif (this.loaded) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.loaded = true;\r\n\r\n\t\tvar error = this._checkError();\r\n\t\tif (error) {\r\n\t\t\tthis._handleError(error);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._response = this._getResponse();\r\n\t\t// Convert arraybuffer back to blob\r\n\t\tif (this._responseType === 'arraybuffer') {\r\n\t\t\ttry {\r\n\t\t\t\tthis._response = new Blob([this._response]);\r\n\t\t\t} catch (e) {\r\n\t\t\t\t// Fallback to use BlobBuilder if Blob constructor is not supported\r\n\t\t\t\t// Tested on Android 2.3 ~ 4.2 and iOS5 safari\r\n\t\t\t\twindow.BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder;\r\n\t\t\t\tif (e.name === 'TypeError' && window.BlobBuilder) {\r\n\t\t\t\t\tvar builder = new BlobBuilder();\r\n\t\t\t\t\tbuilder.append(this._response);\r\n\t\t\t\t\tthis._response = builder.getBlob();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis._clean();\r\n\r\n\t\tthis.dispatchEvent(new createjs.Event(\"complete\"));\r\n\t};\r\n\r\n\t/**\r\n\t * The XHR request has timed out. This is called by the XHR request directly, or via a setTimeout\r\n\t * callback.\r\n\t * @method _handleTimeout\r\n\t * @param {Object} [event] The XHR timeout event. This is occasionally null when called by the backup setTimeout.\r\n\t * @private\r\n\t */\r\n\tp._handleTimeout = function (event) {\r\n\t\tthis._clean();\r\n\t\tthis.dispatchEvent(new createjs.ErrorEvent(\"PRELOAD_TIMEOUT\", null, event));\r\n\t};\r\n\r\n// Protected\r\n\t/**\r\n\t * Determine if there is an error in the current load.\r\n\t * Currently this checks the status of the request for problem codes, and not actual response content:\r\n\t *
      \r\n\t *
    • Status codes between 400 and 599 (HTTP error range)
    • \r\n\t *
    • A status of 0, but *only when the application is running on a server*. If the application is running\r\n\t * on `file:`, then it may incorrectly treat an error on local (or embedded applications) as a successful\r\n\t * load.
    • \r\n\t *
    \r\n\t * @method _checkError\r\n\t * @return {Error} An error with the status code in the `message` argument.\r\n\t * @private\r\n\t */\r\n\tp._checkError = function () {\r\n\t\tvar status = parseInt(this._request.status);\r\n\t\tif (status >= 400 && status <= 599) {\r\n\t\t\treturn new Error(status);\r\n\t\t} else if (status == 0) {\r\n\t\t\tif ((/^https?:/).test(location.protocol)) { return new Error(0); }\r\n\t\t\treturn null; // Likely an embedded app.\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t};\r\n\r\n\r\n\t/**\r\n\t * Validate the response. Different browsers have different approaches, some of which throw errors when accessed\r\n\t * in other browsers. If there is no response, the _response property will remain null.\r\n\t * @method _getResponse\r\n\t * @private\r\n\t */\r\n\tp._getResponse = function () {\r\n\t\tif (this._response != null) {\r\n\t\t\treturn this._response;\r\n\t\t}\r\n\r\n\t\tif (this._request.response != null) {\r\n\t\t\treturn this._request.response;\r\n\t\t}\r\n\r\n\t\t// Android 2.2 uses .responseText\r\n\t\ttry {\r\n\t\t\tif (this._request.responseText != null) {\r\n\t\t\t\treturn this._request.responseText;\r\n\t\t\t}\r\n\t\t} catch (e) {\r\n\t\t}\r\n\r\n\t\t// When loading XML, IE9 does not return .response, instead it returns responseXML.xml\r\n\t\ttry {\r\n\t\t\tif (this._request.responseXML != null) {\r\n\t\t\t\treturn this._request.responseXML;\r\n\t\t\t}\r\n\t\t} catch (e) {\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t};\r\n\r\n\t/**\r\n\t * Create an XHR request. Depending on a number of factors, we get totally different results.\r\n\t *
    1. Some browsers get an XDomainRequest when loading cross-domain.
    2. \r\n\t *
    3. XMLHttpRequest are created when available.
    4. \r\n\t *
    5. ActiveX.XMLHTTP objects are used in older IE browsers.
    6. \r\n\t *
    7. Text requests override the mime type if possible
    8. \r\n\t *
    9. Origin headers are sent for crossdomain requests in some browsers.
    10. \r\n\t *
    11. Binary loads set the response type to \"arraybuffer\"
    \r\n\t * @method _createXHR\r\n\t * @param {Object} item The requested item that is being loaded.\r\n\t * @return {Boolean} If an XHR request or equivalent was successfully created.\r\n\t * @private\r\n\t */\r\n\tp._createXHR = function (item) {\r\n\t\t// Check for cross-domain loads. We can't fully support them, but we can try.\r\n\t\tvar crossdomain = createjs.URLUtils.isCrossDomain(item);\r\n\t\tvar headers = {};\r\n\r\n\t\t// Create the request. Fallback to whatever support we have.\r\n\t\tvar req = null;\r\n\t\tif (window.XMLHttpRequest) {\r\n\t\t\treq = new XMLHttpRequest();\r\n\t\t\t// This is 8 or 9, so use XDomainRequest instead.\r\n\t\t\tif (crossdomain && req.withCredentials === undefined && window.XDomainRequest) {\r\n\t\t\t\treq = new XDomainRequest();\r\n\t\t\t}\r\n\t\t} else { // Old IE versions use a different approach\r\n\t\t\tfor (var i = 0, l = s.ACTIVEX_VERSIONS.length; i < l; i++) {\r\n\t\t\t\tvar axVersion = s.ACTIVEX_VERSIONS[i];\r\n\t\t\t\ttry {\r\n\t\t\t\t\treq = new ActiveXObject(axVersion);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (req == null) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Default to utf-8 for Text requests.\r\n\t\tif (item.mimeType == null && createjs.RequestUtils.isText(item.type)) {\r\n\t\t\titem.mimeType = \"text/plain; charset=utf-8\";\r\n\t\t}\r\n\r\n\t\t// IE9 doesn't support overrideMimeType(), so we need to check for it.\r\n\t\tif (item.mimeType && req.overrideMimeType) {\r\n\t\t\treq.overrideMimeType(item.mimeType);\r\n\t\t}\r\n\r\n\t\t// Determine the XHR level\r\n\t\tthis._xhrLevel = (typeof req.responseType === \"string\") ? 2 : 1;\r\n\r\n\t\tvar src = null;\r\n\t\tif (item.method == createjs.Methods.GET) {\r\n\t\t\tsrc = createjs.URLUtils.buildURI(item.src, item.values);\r\n\t\t} else {\r\n\t\t\tsrc = item.src;\r\n\t\t}\r\n\r\n\t\t// Open the request. Set cross-domain flags if it is supported (XHR level 1 only)\r\n\t\treq.open(item.method || createjs.Methods.GET, src, true);\r\n\r\n\t\tif (crossdomain && req instanceof XMLHttpRequest && this._xhrLevel == 1) {\r\n\t\t\theaders[\"Origin\"] = location.origin;\r\n\t\t}\r\n\r\n\t\t// To send data we need to set the Content-type header)\r\n\t\tif (item.values && item.method == createjs.Methods.POST) {\r\n\t\t\theaders[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\r\n\t\t}\r\n\r\n\t\tif (!crossdomain && !headers[\"X-Requested-With\"]) {\r\n\t\t\theaders[\"X-Requested-With\"] = \"XMLHttpRequest\";\r\n\t\t}\r\n\r\n\t\tif (item.headers) {\r\n\t\t\tfor (var n in item.headers) {\r\n\t\t\t\theaders[n] = item.headers[n];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (n in headers) {\r\n\t\t\treq.setRequestHeader(n, headers[n])\r\n\t\t}\r\n\r\n\t\tif (req instanceof XMLHttpRequest && item.withCredentials !== undefined) {\r\n\t\t\treq.withCredentials = item.withCredentials;\r\n\t\t}\r\n\r\n\t\tthis._request = req;\r\n\r\n\t\treturn true;\r\n\t};\r\n\r\n\t/**\r\n\t * A request has completed (or failed or canceled), and needs to be disposed.\r\n\t * @method _clean\r\n\t * @private\r\n\t */\r\n\tp._clean = function () {\r\n\t\tclearTimeout(this._loadTimeout);\r\n\r\n\t\tif (this._request.removeEventListener != null) {\r\n\t\t\tthis._request.removeEventListener(\"loadstart\", this._handleLoadStartProxy);\r\n\t\t\tthis._request.removeEventListener(\"progress\", this._handleProgressProxy);\r\n\t\t\tthis._request.removeEventListener(\"abort\", this._handleAbortProxy);\r\n\t\t\tthis._request.removeEventListener(\"error\", this._handleErrorProxy);\r\n\t\t\tthis._request.removeEventListener(\"timeout\", this._handleTimeoutProxy);\r\n\t\t\tthis._request.removeEventListener(\"load\", this._handleLoadProxy);\r\n\t\t\tthis._request.removeEventListener(\"readystatechange\", this._handleReadyStateChangeProxy);\r\n\t\t} else {\r\n\t\t\tthis._request.onloadstart = null;\r\n\t\t\tthis._request.onprogress = null;\r\n\t\t\tthis._request.onabort = null;\r\n\t\t\tthis._request.onerror = null;\r\n\t\t\tthis._request.ontimeout = null;\r\n\t\t\tthis._request.onload = null;\r\n\t\t\tthis._request.onreadystatechange = null;\r\n\t\t}\r\n\t};\r\n\r\n\tp.toString = function () {\r\n\t\treturn \"[PreloadJS XHRRequest]\";\r\n\t};\r\n\r\n\tcreatejs.XHRRequest = createjs.promote(XHRRequest, \"AbstractRequest\");\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// LoadQueue.js\r\n//##############################################################################\r\n\r\n/*\r\n TODO: WINDOWS ISSUES\r\n * No error for HTML audio in IE 678\r\n * SVG no failure error in IE 67 (maybe 8) TAGS AND XHR\r\n * No script complete handler in IE 67 TAGS (XHR is fine)\r\n * No XML/JSON in IE6 TAGS\r\n * Need to hide loading SVG in Opera TAGS\r\n * No CSS onload/readystatechange in Safari or Android TAGS (requires rule checking)\r\n * SVG no load or failure in Opera XHR\r\n * Reported issues with IE7/8\r\n */\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n// constructor\r\n\t/**\r\n\t * The LoadQueue class is the main API for preloading content. LoadQueue is a load manager, which can preload either\r\n\t * a single file, or queue of files.\r\n\t *\r\n\t * Creating a Queue
    \r\n\t * To use LoadQueue, create a LoadQueue instance. If you want to force tag loading where possible, set the preferXHR\r\n\t * argument to false.\r\n\t *\r\n\t * var queue = new createjs.LoadQueue(true);\r\n\t *\r\n\t * Listening for Events
    \r\n\t * Add any listeners you want to the queue. Since PreloadJS 0.3.0, the {{#crossLink \"EventDispatcher\"}}{{/crossLink}}\r\n\t * lets you add as many listeners as you want for events. You can subscribe to the following events:
      \r\n\t *
    • {{#crossLink \"AbstractLoader/complete:event\"}}{{/crossLink}}: fired when a queue completes loading all\r\n\t * files
    • \r\n\t *
    • {{#crossLink \"AbstractLoader/error:event\"}}{{/crossLink}}: fired when the queue encounters an error with\r\n\t * any file.
    • \r\n\t *
    • {{#crossLink \"AbstractLoader/progress:event\"}}{{/crossLink}}: Progress for the entire queue has\r\n\t * changed.
    • \r\n\t *
    • {{#crossLink \"LoadQueue/fileload:event\"}}{{/crossLink}}: A single file has completed loading.
    • \r\n\t *
    • {{#crossLink \"LoadQueue/fileprogress:event\"}}{{/crossLink}}: Progress for a single file has changes. Note\r\n\t * that only files loaded with XHR (or possibly by plugins) will fire progress events other than 0 or 100%.
    • \r\n\t *
    \r\n\t *\r\n\t * queue.on(\"fileload\", handleFileLoad, this);\r\n\t * queue.on(\"complete\", handleComplete, this);\r\n\t *\r\n\t * Adding files and manifests
    \r\n\t * Add files you want to load using {{#crossLink \"LoadQueue/loadFile\"}}{{/crossLink}} or add multiple files at a\r\n\t * time using a list or a manifest definition using {{#crossLink \"LoadQueue/loadManifest\"}}{{/crossLink}}. Files are\r\n\t * appended to the end of the active queue, so you can use these methods as many times as you like, whenever you\r\n\t * like.\r\n\t *\r\n\t * queue.loadFile(\"filePath/file.jpg\");\r\n\t * queue.loadFile({id:\"image\", src:\"filePath/file.jpg\"});\r\n\t * queue.loadManifest([\"filePath/file.jpg\", {id:\"image\", src:\"filePath/file.jpg\"}]);\r\n\t *\r\n\t * // Use an external manifest\r\n\t * queue.loadManifest(\"path/to/manifest.json\");\r\n\t * queue.loadManifest({src:\"manifest.json\", type:\"manifest\"});\r\n\t *\r\n\t * If you pass `false` as the `loadNow` parameter, the queue will not kick of the load of the files, but it will not\r\n\t * stop if it has already been started. Call the {{#crossLink \"AbstractLoader/load\"}}{{/crossLink}} method to begin\r\n\t * a paused queue. Note that a paused queue will automatically resume when new files are added to it with a\r\n\t * `loadNow` argument of `true`.\r\n\t *\r\n\t * queue.load();\r\n\t *\r\n\t * File Types
    \r\n\t * The file type of a manifest item is auto-determined by the file extension. The pattern matching in PreloadJS\r\n\t * should handle the majority of standard file and url formats, and works with common file extensions. If you have\r\n\t * either a non-standard file extension, or are serving the file using a proxy script, then you can pass in a\r\n\t * type property with any manifest item.\r\n\t *\r\n\t * queue.loadFile({src:\"path/to/myFile.mp3x\", type:createjs.Types.SOUND});\r\n\t *\r\n\t * // Note that PreloadJS will not read a file extension from the query string\r\n\t * queue.loadFile({src:\"http://server.com/proxy?file=image.jpg\", type:createjs.Types.IMAGE});\r\n\t *\r\n\t * Supported types are defined on the {{#crossLink \"AbstractLoader\"}}{{/crossLink}} class, and include:\r\n\t *
      \r\n\t *
    • {{#crossLink \"Types/BINARY:property\"}}{{/crossLink}}: Raw binary data via XHR
    • \r\n\t *
    • {{#crossLink \"Types/CSS:property\"}}{{/crossLink}}: CSS files
    • \r\n\t *
    • {{#crossLink \"Types/IMAGE:property\"}}{{/crossLink}}: Common image formats
    • \r\n\t *
    • {{#crossLink \"Types/JAVASCRIPT:property\"}}{{/crossLink}}: JavaScript files
    • \r\n\t *
    • {{#crossLink \"Types/JSON:property\"}}{{/crossLink}}: JSON data
    • \r\n\t *
    • {{#crossLink \"Types/JSONP:property\"}}{{/crossLink}}: JSON files cross-domain
    • \r\n\t *
    • {{#crossLink \"Types/MANIFEST:property\"}}{{/crossLink}}: A list of files to load in JSON format, see\r\n\t * {{#crossLink \"AbstractLoader/loadManifest\"}}{{/crossLink}}
    • \r\n\t *
    • {{#crossLink \"Types/SOUND:property\"}}{{/crossLink}}: Audio file formats
    • \r\n\t *
    • {{#crossLink \"Types/SPRITESHEET:property\"}}{{/crossLink}}: JSON SpriteSheet definitions. This\r\n\t * will also load sub-images, and provide a {{#crossLink \"SpriteSheet\"}}{{/crossLink}} instance.
    • \r\n\t *
    • {{#crossLink \"Types/SVG:property\"}}{{/crossLink}}: SVG files
    • \r\n\t *
    • {{#crossLink \"Types/TEXT:property\"}}{{/crossLink}}: Text files - XHR only
    • \r\n *
    • {{#crossLink \"Types/VIDEO:property\"}}{{/crossLink}}: Video objects
    • \r\n\t *
    • {{#crossLink \"Types/XML:property\"}}{{/crossLink}}: XML data
    • \r\n\t *
    \r\n\t *\r\n\t * Note: Loader types used to be defined on LoadQueue, but have been moved to the Types class\r\n\t *\r\n\t * Handling Results
    \r\n\t * When a file is finished downloading, a {{#crossLink \"LoadQueue/fileload:event\"}}{{/crossLink}} event is\r\n\t * dispatched. In an example above, there is an event listener snippet for fileload. Loaded files are usually a\r\n\t * formatted object that can be used immediately, including:\r\n\t *
      \r\n\t *
    • Binary: The binary loaded result
    • \r\n\t *
    • CSS: A <link /> tag
    • \r\n\t *
    • Image: An <img /> tag
    • \r\n\t *
    • JavaScript: A <script /> tag
    • \r\n\t *
    • JSON/JSONP: A formatted JavaScript Object
    • \r\n\t *
    • Manifest: A JavaScript object.\r\n\t *
    • Sound: An <audio /> tag\r\n\t *
    • SpriteSheet: A {{#crossLink \"SpriteSheet\"}}{{/crossLink}} instance, containing loaded images.\r\n\t *
    • SVG: An <object /> tag
    • \r\n\t *
    • Text: Raw text
    • \r\n *
    • Video: A Video DOM node
    • \r\n\t *
    • XML: An XML DOM node
    • \r\n\t *
    \r\n\t *\r\n\t * function handleFileLoad(event) {\r\n\t * var item = event.item; // A reference to the item that was passed in to the LoadQueue\r\n\t * var type = item.type;\r\n\t *\r\n\t * // Add any images to the page body.\r\n\t * if (type == createjs.Types.IMAGE) {\r\n\t * document.body.appendChild(event.result);\r\n\t * }\r\n\t * }\r\n\t *\r\n\t * At any time after the file has been loaded (usually after the queue has completed), any result can be looked up\r\n\t * via its \"id\" using {{#crossLink \"LoadQueue/getResult\"}}{{/crossLink}}. If no id was provided, then the\r\n\t * \"src\" or file path can be used instead, including the `path` defined by a manifest, but not including\r\n\t * a base path defined on the LoadQueue. It is recommended to always pass an id if you want to look up content.\r\n\t *\r\n\t * var image = queue.getResult(\"image\");\r\n\t * document.body.appendChild(image);\r\n\t *\r\n\t * Raw loaded content can be accessed using the rawResult property of the {{#crossLink \"LoadQueue/fileload:event\"}}{{/crossLink}}\r\n\t * event, or can be looked up using {{#crossLink \"LoadQueue/getResult\"}}{{/crossLink}}, passing `true` as the 2nd\r\n\t * argument. This is only applicable for content that has been parsed for the browser, specifically: JavaScript,\r\n\t * CSS, XML, SVG, and JSON objects, or anything loaded with XHR.\r\n\t *\r\n\t * var image = queue.getResult(\"image\", true); // load the binary image data loaded with XHR.\r\n\t *\r\n\t * Plugins
    \r\n\t * LoadQueue has a simple plugin architecture to help process and preload content. For example, to preload audio,\r\n\t * make sure to install the SoundJS Sound class, which will help load HTML audio,\r\n\t * Flash audio, and WebAudio files. This should be installed before loading any audio files.\r\n\t *\r\n\t * queue.installPlugin(createjs.Sound);\r\n\t *\r\n\t *

    Known Browser Issues

    \r\n\t *
      \r\n\t *
    • Browsers without audio support can not load audio files.
    • \r\n\t *
    • Safari on Mac OS X can only play HTML audio if QuickTime is installed
    • \r\n\t *
    • HTML Audio tags will only download until their canPlayThrough event is fired. Browsers other\r\n\t * than Chrome will continue to download in the background.
    • \r\n\t *
    • When loading scripts using tags, they are automatically added to the document.
    • \r\n\t *
    • Scripts loaded via XHR may not be properly inspectable with browser tools.
    • \r\n\t *
    • IE6 and IE7 (and some other browsers) may not be able to load XML, Text, or JSON, since they require\r\n\t * XHR to work.
    • \r\n\t *
    • Content loaded via tags will not show progress, and will continue to download in the background when\r\n\t * canceled, although no events will be dispatched.
    • \r\n\t *
    \r\n\t *\r\n\t * @class LoadQueue\r\n\t * @param {Boolean} [preferXHR=true] Determines whether the preload instance will favor loading with XHR (XML HTTP\r\n\t * Requests), or HTML tags. When this is `false`, the queue will use tag loading when possible, and fall back on XHR\r\n\t * when necessary.\r\n\t * @param {String} [basePath=\"\"] A path that will be prepended on to the source parameter of all items in the queue\r\n\t * before they are loaded. Sources beginning with a protocol such as `http://` or a relative path such as `../`\r\n\t * will not receive a base path.\r\n\t * @param {String|Boolean} [crossOrigin=\"\"] An optional flag to support images loaded from a CORS-enabled server. To\r\n\t * use it, set this value to `true`, which will default the crossOrigin property on images to \"Anonymous\". Any\r\n\t * string value will be passed through, but only \"\" and \"Anonymous\" are recommended. Note: The crossOrigin\r\n\t * parameter is deprecated. Use LoadItem.crossOrigin instead\r\n\t *\r\n\t * @constructor\r\n\t * @extends AbstractLoader\r\n\t */\r\n\tfunction LoadQueue (preferXHR, basePath, crossOrigin) {\r\n\t\tthis.AbstractLoader_constructor();\r\n\r\n\t\t/**\r\n\t\t * An array of the plugins registered using {{#crossLink \"LoadQueue/installPlugin\"}}{{/crossLink}}.\r\n\t\t * @property _plugins\r\n\t\t * @type {Array}\r\n\t\t * @private\r\n\t\t * @since 0.6.1\r\n\t\t */\r\n\t\tthis._plugins = [];\r\n\r\n\t\t/**\r\n\t\t * An object hash of callbacks that are fired for each file type before the file is loaded, giving plugins the\r\n\t\t * ability to override properties of the load. Please see the {{#crossLink \"LoadQueue/installPlugin\"}}{{/crossLink}}\r\n\t\t * method for more information.\r\n\t\t * @property _typeCallbacks\r\n\t\t * @type {Object}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._typeCallbacks = {};\r\n\r\n\t\t/**\r\n\t\t * An object hash of callbacks that are fired for each file extension before the file is loaded, giving plugins the\r\n\t\t * ability to override properties of the load. Please see the {{#crossLink \"LoadQueue/installPlugin\"}}{{/crossLink}}\r\n\t\t * method for more information.\r\n\t\t * @property _extensionCallbacks\r\n\t\t * @type {null}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._extensionCallbacks = {};\r\n\r\n\t\t/**\r\n\t\t * The next preload queue to process when this one is complete. If an error is thrown in the current queue, and\r\n\t\t * {{#crossLink \"LoadQueue/stopOnError:property\"}}{{/crossLink}} is `true`, the next queue will not be processed.\r\n\t\t * @property next\r\n\t\t * @type {LoadQueue}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.next = null;\r\n\r\n\t\t/**\r\n\t\t * Ensure loaded scripts \"complete\" in the order they are specified. Loaded scripts are added to the document head\r\n\t\t * once they are loaded. Scripts loaded via tags will load one-at-a-time when this property is `true`, whereas\r\n\t\t * scripts loaded using XHR can load in any order, but will \"finish\" and be added to the document in the order\r\n\t\t * specified.\r\n\t\t *\r\n\t\t * Any items can be set to load in order by setting the {{#crossLink \"maintainOrder:property\"}}{{/crossLink}}\r\n\t\t * property on the load item, or by ensuring that only one connection can be open at a time using\r\n\t\t * {{#crossLink \"LoadQueue/setMaxConnections\"}}{{/crossLink}}. Note that when the `maintainScriptOrder` property\r\n\t\t * is set to `true`, scripts items are automatically set to `maintainOrder=true`, and changing the\r\n\t\t * `maintainScriptOrder` to `false` during a load will not change items already in a queue.\r\n\t\t *\r\n\t\t *

    Example

    \r\n\t\t *\r\n\t\t * var queue = new createjs.LoadQueue();\r\n\t\t * queue.setMaxConnections(3); // Set a higher number to load multiple items at once\r\n\t\t * queue.maintainScriptOrder = true; // Ensure scripts are loaded in order\r\n\t\t * queue.loadManifest([\r\n\t\t * \"script1.js\",\r\n\t\t * \"script2.js\",\r\n\t\t * \"image.png\", // Load any time\r\n\t\t * {src: \"image2.png\", maintainOrder: true} // Will wait for script2.js\r\n\t\t * \"image3.png\",\r\n\t\t * \"script3.js\" // Will wait for image2.png before loading (or completing when loading with XHR)\r\n\t\t * ]);\r\n\t\t *\r\n\t\t * @property maintainScriptOrder\r\n\t\t * @type {Boolean}\r\n\t\t * @default true\r\n\t\t */\r\n\t\tthis.maintainScriptOrder = true;\r\n\r\n\t\t/**\r\n\t\t * Determines if the LoadQueue will stop processing the current queue when an error is encountered.\r\n\t\t * @property stopOnError\r\n\t\t * @type {Boolean}\r\n\t\t * @default false\r\n\t\t */\r\n\t\tthis.stopOnError = false;\r\n\r\n\t\t/**\r\n\t\t * The number of maximum open connections that a loadQueue tries to maintain. Please see\r\n\t\t * {{#crossLink \"LoadQueue/setMaxConnections\"}}{{/crossLink}} for more information.\r\n\t\t * @property _maxConnections\r\n\t\t * @type {Number}\r\n\t\t * @default 1\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._maxConnections = 1;\r\n\r\n\t\t/**\r\n\t\t * An internal list of all the default Loaders that are included with PreloadJS. Before an item is loaded, the\r\n\t\t * available loader list is iterated, in the order they are included, and as soon as a loader indicates it can\r\n\t\t * handle the content, it will be selected. The default loader, ({{#crossLink \"TextLoader\"}}{{/crossLink}} is\r\n\t\t * last in the list, so it will be used if no other match is found. Typically, loaders will match based on the\r\n\t\t * {{#crossLink \"LoadItem/type\"}}{{/crossLink}}, which is automatically determined using the file extension of\r\n\t\t * the {{#crossLink \"LoadItem/src:property\"}}{{/crossLink}}.\r\n\t\t *\r\n\t\t * Loaders can be removed from PreloadJS by simply not including them.\r\n\t\t *\r\n\t\t * Custom loaders installed using {{#crossLink \"registerLoader\"}}{{/crossLink}} will be prepended to this list\r\n\t\t * so that they are checked first.\r\n\t\t * @property _availableLoaders\r\n\t\t * @type {Array}\r\n\t\t * @private\r\n\t\t * @since 0.6.0\r\n\t\t */\r\n\t\tthis._availableLoaders = [\r\n createjs.FontLoader,\r\n\t\t\tcreatejs.ImageLoader,\r\n\t\t\tcreatejs.JavaScriptLoader,\r\n\t\t\tcreatejs.CSSLoader,\r\n\t\t\tcreatejs.JSONLoader,\r\n\t\t\tcreatejs.JSONPLoader,\r\n\t\t\tcreatejs.SoundLoader,\r\n\t\t\tcreatejs.ManifestLoader,\r\n\t\t\tcreatejs.SpriteSheetLoader,\r\n\t\t\tcreatejs.XMLLoader,\r\n\t\t\tcreatejs.SVGLoader,\r\n\t\t\tcreatejs.BinaryLoader,\r\n\t\t\tcreatejs.VideoLoader,\r\n\t\t\tcreatejs.TextLoader\r\n\t\t];\r\n\r\n\t\t/**\r\n\t\t * The number of built in loaders, so they can't be removed by {{#crossLink \"unregisterLoader\"}}{{/crossLink}.\r\n\t\t\t\t * @property _defaultLoaderLength\r\n\t\t * @type {Number}\r\n\t\t * @private\r\n\t\t * @since 0.6.0\r\n\t\t */\r\n\t\tthis._defaultLoaderLength = this._availableLoaders.length;\r\n\r\n\t\tthis.init(preferXHR, basePath, crossOrigin);\r\n\t}\r\n\r\n\tvar p = createjs.extend(LoadQueue, createjs.AbstractLoader);\r\n\tvar s = LoadQueue;\r\n\r\n\t// Remove these @deprecated properties after 1.0\r\n\ttry {\r\n\t\tObject.defineProperties(s, {\r\n\t\t\tPOST: { get: createjs.deprecate(function() { return createjs.Methods.POST; }, \"AbstractLoader.POST\") },\r\n\t\t\tGET: { get: createjs.deprecate(function() { return createjs.Methods.GET; }, \"AbstractLoader.GET\") },\r\n\r\n\t\t\tBINARY: { get: createjs.deprecate(function() { return createjs.Types.BINARY; }, \"AbstractLoader.BINARY\") },\r\n\t\t\tCSS: { get: createjs.deprecate(function() { return createjs.Types.CSS; }, \"AbstractLoader.CSS\") },\r\n\t\t\tFONT: { get: createjs.deprecate(function() { return createjs.Types.FONT; }, \"AbstractLoader.FONT\") },\r\n\t\t\tFONTCSS: { get: createjs.deprecate(function() { return createjs.Types.FONTCSS; }, \"AbstractLoader.FONTCSS\") },\r\n\t\t\tIMAGE: { get: createjs.deprecate(function() { return createjs.Types.IMAGE; }, \"AbstractLoader.IMAGE\") },\r\n\t\t\tJAVASCRIPT: { get: createjs.deprecate(function() { return createjs.Types.JAVASCRIPT; }, \"AbstractLoader.JAVASCRIPT\") },\r\n\t\t\tJSON: { get: createjs.deprecate(function() { return createjs.Types.JSON; }, \"AbstractLoader.JSON\") },\r\n\t\t\tJSONP: { get: createjs.deprecate(function() { return createjs.Types.JSONP; }, \"AbstractLoader.JSONP\") },\r\n\t\t\tMANIFEST: { get: createjs.deprecate(function() { return createjs.Types.MANIFEST; }, \"AbstractLoader.MANIFEST\") },\r\n\t\t\tSOUND: { get: createjs.deprecate(function() { return createjs.Types.SOUND; }, \"AbstractLoader.SOUND\") },\r\n\t\t\tVIDEO: { get: createjs.deprecate(function() { return createjs.Types.VIDEO; }, \"AbstractLoader.VIDEO\") },\r\n\t\t\tSPRITESHEET: { get: createjs.deprecate(function() { return createjs.Types.SPRITESHEET; }, \"AbstractLoader.SPRITESHEET\") },\r\n\t\t\tSVG: { get: createjs.deprecate(function() { return createjs.Types.SVG; }, \"AbstractLoader.SVG\") },\r\n\t\t\tTEXT: { get: createjs.deprecate(function() { return createjs.Types.TEXT; }, \"AbstractLoader.TEXT\") },\r\n\t\t\tXML: { get: createjs.deprecate(function() { return createjs.Types.XML; }, \"AbstractLoader.XML\") }\r\n\t\t});\r\n\t} catch (e) {}\r\n\r\n\t/**\r\n\t * An internal initialization method, which is used for initial set up, but also to reset the LoadQueue.\r\n\t * @method init\r\n\t * @param preferXHR\r\n\t * @param basePath\r\n\t * @param crossOrigin\r\n\t * @private\r\n\t */\r\n\tp.init = function (preferXHR, basePath, crossOrigin) {\r\n\r\n\t\t// public properties\r\n\r\n\t\t/**\r\n\t\t * Try and use XMLHttpRequest (XHR) when possible. Note that LoadQueue will default to tag loading or XHR\r\n\t\t * loading depending on the requirements for a media type. For example, HTML audio can not be loaded with XHR,\r\n\t\t * and plain text can not be loaded with tags, so it will default the the correct type instead of using the\r\n\t\t * user-defined type.\r\n\t\t * @type {Boolean}\r\n\t\t * @default true\r\n\t\t * @since 0.6.0\r\n\t\t */\r\n\t\tthis.preferXHR = true; //TODO: Get/Set\r\n\t\tthis._preferXHR = true;\r\n\t\tthis.setPreferXHR(preferXHR);\r\n\r\n\t\t// protected properties\r\n\t\t/**\r\n\t\t * Whether the queue is currently paused or not.\r\n\t\t * @property _paused\r\n\t\t * @type {boolean}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._paused = false;\r\n\r\n\t\t/**\r\n\t\t * A path that will be prepended on to the item's {{#crossLink \"LoadItem/src:property\"}}{{/crossLink}}. The\r\n\t\t * `_basePath` property will only be used if an item's source is relative, and does not include a protocol such\r\n\t\t * as `http://`, or a relative path such as `../`.\r\n\t\t * @property _basePath\r\n\t\t * @type {String}\r\n\t\t * @private\r\n\t\t * @since 0.3.1\r\n\t\t */\r\n\t\tthis._basePath = basePath;\r\n\r\n\t\t/**\r\n\t\t * An optional flag to set on images that are loaded using PreloadJS, which enables CORS support. Images loaded\r\n\t\t * cross-domain by servers that support CORS require the crossOrigin flag to be loaded and interacted with by\r\n\t\t * a canvas. When loading locally, or with a server with no CORS support, this flag can cause other security issues,\r\n\t\t * so it is recommended to only set it if you are sure the server supports it. Currently, supported values are \"\"\r\n\t\t * and \"Anonymous\".\r\n\t\t * @property _crossOrigin\r\n\t\t * @type {String}\r\n\t\t * @default \"\"\r\n\t\t * @private\r\n\t\t * @since 0.4.1\r\n\t\t */\r\n\t\tthis._crossOrigin = crossOrigin;\r\n\r\n\t\t/**\r\n\t\t * Determines if the loadStart event was dispatched already. This event is only fired one time, when the first\r\n\t\t * file is requested.\r\n\t\t * @property _loadStartWasDispatched\r\n\t\t * @type {Boolean}\r\n\t\t * @default false\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._loadStartWasDispatched = false;\r\n\r\n\t\t/**\r\n\t\t * Determines if there is currently a script loading. This helps ensure that only a single script loads at once when\r\n\t\t * using a script tag to do preloading.\r\n\t\t * @property _currentlyLoadingScript\r\n\t\t * @type {Boolean}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._currentlyLoadingScript = null;\r\n\r\n\t\t/**\r\n\t\t * An array containing the currently downloading files.\r\n\t\t * @property _currentLoads\r\n\t\t * @type {Array}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._currentLoads = [];\r\n\r\n\t\t/**\r\n\t\t * An array containing the queued items that have not yet started downloading.\r\n\t\t * @property _loadQueue\r\n\t\t * @type {Array}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._loadQueue = [];\r\n\r\n\t\t/**\r\n\t\t * An array containing downloads that have not completed, so that the LoadQueue can be properly reset.\r\n\t\t * @property _loadQueueBackup\r\n\t\t * @type {Array}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._loadQueueBackup = [];\r\n\r\n\t\t/**\r\n\t\t * An object hash of items that have finished downloading, indexed by the {{#crossLink \"LoadItem\"}}{{/crossLink}}\r\n\t\t * id.\r\n\t\t * @property _loadItemsById\r\n\t\t * @type {Object}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._loadItemsById = {};\r\n\r\n\t\t/**\r\n\t\t * An object hash of items that have finished downloading, indexed by {{#crossLink \"LoadItem\"}}{{/crossLink}}\r\n\t\t * source.\r\n\t\t * @property _loadItemsBySrc\r\n\t\t * @type {Object}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._loadItemsBySrc = {};\r\n\r\n\t\t/**\r\n\t\t * An object hash of loaded items, indexed by the ID of the {{#crossLink \"LoadItem\"}}{{/crossLink}}.\r\n\t\t * @property _loadedResults\r\n\t\t * @type {Object}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._loadedResults = {};\r\n\r\n\t\t/**\r\n\t\t * An object hash of un-parsed loaded items, indexed by the ID of the {{#crossLink \"LoadItem\"}}{{/crossLink}}.\r\n\t\t * @property _loadedRawResults\r\n\t\t * @type {Object}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._loadedRawResults = {};\r\n\r\n\t\t/**\r\n\t\t * The number of items that have been requested. This helps manage an overall progress without knowing how large\r\n\t\t * the files are before they are downloaded. This does not include items inside of loaders such as the\r\n\t\t * {{#crossLink \"ManifestLoader\"}}{{/crossLink}}.\r\n\t\t * @property _numItems\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._numItems = 0;\r\n\r\n\t\t/**\r\n\t\t * The number of items that have completed loaded. This helps manage an overall progress without knowing how large\r\n\t\t * the files are before they are downloaded.\r\n\t\t * @property _numItemsLoaded\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._numItemsLoaded = 0;\r\n\r\n\t\t/**\r\n\t\t * A list of scripts in the order they were requested. This helps ensure that scripts are \"completed\" in the right\r\n\t\t * order.\r\n\t\t * @property _scriptOrder\r\n\t\t * @type {Array}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._scriptOrder = [];\r\n\r\n\t\t/**\r\n\t\t * A list of scripts that have been loaded. Items are added to this list as null when they are\r\n\t\t * requested, contain the loaded item if it has completed, but not been dispatched to the user, and true\r\n\t\t * once they are complete and have been dispatched.\r\n\t\t * @property _loadedScripts\r\n\t\t * @type {Array}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._loadedScripts = [];\r\n\r\n\t\t/**\r\n\t\t * The last progress amount. This is used to suppress duplicate progress events.\r\n\t\t * @property _lastProgress\r\n\t\t * @type {Number}\r\n\t\t * @private\r\n\t\t * @since 0.6.0\r\n\t\t */\r\n\t\tthis._lastProgress = NaN;\r\n\r\n\t};\r\n\r\n// static properties\r\n\r\n// events\r\n\t/**\r\n\t * This event is fired when an individual file has loaded, and been processed.\r\n\t * @event fileload\r\n\t * @param {Object} target The object that dispatched the event.\r\n\t * @param {String} type The event type.\r\n\t * @param {Object} item The file item which was specified in the {{#crossLink \"LoadQueue/loadFile\"}}{{/crossLink}}\r\n\t * or {{#crossLink \"LoadQueue/loadManifest\"}}{{/crossLink}} call. If only a string path or tag was specified, the\r\n\t * object will contain that value as a `src` property.\r\n\t * @param {Object} result The HTML tag or parsed result of the loaded item.\r\n\t * @param {Object} rawResult The unprocessed result, usually the raw text or binary data before it is converted\r\n\t * to a usable object.\r\n\t * @since 0.3.0\r\n\t */\r\n\r\n\t/**\r\n\t * This {{#crossLink \"ProgressEvent\"}}{{/crossLink}} that is fired when an an individual file's progress changes.\r\n\t * @event fileprogress\r\n\t * @since 0.3.0\r\n\t */\r\n\r\n\t/**\r\n\t * This event is fired when an individual file starts to load.\r\n\t * @event filestart\r\n\t * @param {Object} target The object that dispatched the event.\r\n\t * @param {String} type The event type.\r\n\t * @param {Object} item The file item which was specified in the {{#crossLink \"LoadQueue/loadFile\"}}{{/crossLink}}\r\n\t * or {{#crossLink \"LoadQueue/loadManifest\"}}{{/crossLink}} call. If only a string path or tag was specified, the\r\n\t * object will contain that value as a property.\r\n\t */\r\n\r\n\t/**\r\n\t * Although it extends {{#crossLink \"AbstractLoader\"}}{{/crossLink}}, the `initialize` event is never fired from\r\n\t * a LoadQueue instance.\r\n\t * @event initialize\r\n\t * @private\r\n\t */\r\n\r\n// public methods\r\n\t/**\r\n\t * Register a custom loaders class. New loaders are given precedence over loaders added earlier and default loaders.\r\n\t * It is recommended that loaders extend {{#crossLink \"AbstractLoader\"}}{{/crossLink}}. Loaders can only be added\r\n\t * once, and will be prepended to the list of available loaders.\r\n\t * @method registerLoader\r\n\t * @param {Function|AbstractLoader} loader The AbstractLoader class to add.\r\n\t * @since 0.6.0\r\n\t */\r\n\tp.registerLoader = function (loader) {\r\n\t\tif (!loader || !loader.canLoadItem) {\r\n\t\t\tthrow new Error(\"loader is of an incorrect type.\");\r\n\t\t} else if (this._availableLoaders.indexOf(loader) != -1) {\r\n\t\t\tthrow new Error(\"loader already exists.\"); //LM: Maybe just silently fail here\r\n\t\t}\r\n\r\n\t\tthis._availableLoaders.unshift(loader);\r\n\t};\r\n\r\n\t/**\r\n\t * Remove a custom loader added using {{#crossLink \"registerLoader\"}}{{/crossLink}}. Only custom loaders can be\r\n\t * unregistered, the default loaders will always be available.\r\n\t * @method unregisterLoader\r\n\t * @param {Function|AbstractLoader} loader The AbstractLoader class to remove\r\n\t */\r\n\tp.unregisterLoader = function (loader) {\r\n\t\tvar idx = this._availableLoaders.indexOf(loader);\r\n\t\tif (idx != -1 && idx < this._defaultLoaderLength - 1) {\r\n\t\t\tthis._availableLoaders.splice(idx, 1);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Change the {{#crossLink \"preferXHR:property\"}}{{/crossLink}} value. Note that if this is set to `true`, it may\r\n\t * fail, or be ignored depending on the browser's capabilities and the load type.\r\n\t * @method setPreferXHR\r\n\t * @param {Boolean} value\r\n\t * @returns {Boolean} The value of {{#crossLink \"preferXHR\"}}{{/crossLink}} that was successfully set.\r\n\t * @since 0.6.0\r\n\t */\r\n\tp.setPreferXHR = function (value) {\r\n\t\t// Determine if we can use XHR. XHR defaults to TRUE, but the browser may not support it.\r\n\t\t//TODO: Should we be checking for the other XHR types? Might have to do a try/catch on the different types similar to createXHR.\r\n\t\tthis.preferXHR = (value != false && window.XMLHttpRequest != null);\r\n\t\treturn this.preferXHR;\r\n\t};\r\n\r\n\t/**\r\n\t * Stops all queued and loading items, and clears the queue. This also removes all internal references to loaded\r\n\t * content, and allows the queue to be used again.\r\n\t * @method removeAll\r\n\t * @since 0.3.0\r\n\t */\r\n\tp.removeAll = function () {\r\n\t\tthis.remove();\r\n\t};\r\n\r\n\t/**\r\n\t * Stops an item from being loaded, and removes it from the queue. If nothing is passed, all items are removed.\r\n\t * This also removes internal references to loaded item(s).\r\n\t *\r\n\t *

    Example

    \r\n\t *\r\n\t * queue.loadManifest([\r\n\t * {src:\"test.png\", id:\"png\"},\r\n\t * {src:\"test.jpg\", id:\"jpg\"},\r\n\t * {src:\"test.mp3\", id:\"mp3\"}\r\n\t * ]);\r\n\t * queue.remove(\"png\"); // Single item by ID\r\n\t * queue.remove(\"png\", \"test.jpg\"); // Items as arguments. Mixed id and src.\r\n\t * queue.remove([\"test.png\", \"jpg\"]); // Items in an Array. Mixed id and src.\r\n\t *\r\n\t * @method remove\r\n\t * @param {String | Array} idsOrUrls* The id or ids to remove from this queue. You can pass an item, an array of\r\n\t * items, or multiple items as arguments.\r\n\t * @since 0.3.0\r\n\t */\r\n\tp.remove = function (idsOrUrls) {\r\n\t\tvar args = null;\r\n\r\n\t\tif (idsOrUrls && !Array.isArray(idsOrUrls)) {\r\n\t\t\targs = [idsOrUrls];\r\n\t\t} else if (idsOrUrls) {\r\n\t\t\targs = idsOrUrls;\r\n\t\t} else if (arguments.length > 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar itemsWereRemoved = false;\r\n\r\n\t\t// Destroy everything\r\n\t\tif (!args) {\r\n\t\t\tthis.close();\r\n\t\t\tfor (var n in this._loadItemsById) {\r\n\t\t\t\tthis._disposeItem(this._loadItemsById[n]);\r\n\t\t\t}\r\n\t\t\tthis.init(this.preferXHR, this._basePath);\r\n\r\n\t\t\t// Remove specific items\r\n\t\t} else {\r\n\t\t\twhile (args.length) {\r\n\t\t\t\tvar item = args.pop();\r\n\t\t\t\tvar r = this.getResult(item);\r\n\r\n\t\t\t\t//Remove from the main load Queue\r\n\t\t\t\tfor (i = this._loadQueue.length - 1; i >= 0; i--) {\r\n\t\t\t\t\tloadItem = this._loadQueue[i].getItem();\r\n\t\t\t\t\tif (loadItem.id == item || loadItem.src == item) {\r\n\t\t\t\t\t\tthis._loadQueue.splice(i, 1)[0].cancel();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Remove from the backup queue\r\n\t\t\t\tfor (i = this._loadQueueBackup.length - 1; i >= 0; i--) {\r\n\t\t\t\t\tloadItem = this._loadQueueBackup[i].getItem();\r\n\t\t\t\t\tif (loadItem.id == item || loadItem.src == item) {\r\n\t\t\t\t\t\tthis._loadQueueBackup.splice(i, 1)[0].cancel();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (r) {\r\n\t\t\t\t\tthis._disposeItem(this.getItem(item));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfor (var i = this._currentLoads.length - 1; i >= 0; i--) {\r\n\t\t\t\t\t\tvar loadItem = this._currentLoads[i].getItem();\r\n\t\t\t\t\t\tif (loadItem.id == item || loadItem.src == item) {\r\n\t\t\t\t\t\t\tthis._currentLoads.splice(i, 1)[0].cancel();\r\n\t\t\t\t\t\t\titemsWereRemoved = true;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// If this was called during a load, try to load the next item.\r\n\t\t\tif (itemsWereRemoved) {\r\n\t\t\t\tthis._loadNext();\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Stops all open loads, destroys any loaded items, and resets the queue, so all items can\r\n\t * be reloaded again by calling {{#crossLink \"AbstractLoader/load\"}}{{/crossLink}}. Items are not removed from the\r\n\t * queue. To remove items use the {{#crossLink \"LoadQueue/remove\"}}{{/crossLink}} or\r\n\t * {{#crossLink \"LoadQueue/removeAll\"}}{{/crossLink}} method.\r\n\t * @method reset\r\n\t * @since 0.3.0\r\n\t */\r\n\tp.reset = function () {\r\n\t\tthis.close();\r\n\t\tfor (var n in this._loadItemsById) {\r\n\t\t\tthis._disposeItem(this._loadItemsById[n]);\r\n\t\t}\r\n\r\n\t\t//Reset the queue to its start state\r\n\t\tvar a = [];\r\n\t\tfor (var i = 0, l = this._loadQueueBackup.length; i < l; i++) {\r\n\t\t\ta.push(this._loadQueueBackup[i].getItem());\r\n\t\t}\r\n\r\n\t\tthis.loadManifest(a, false);\r\n\t};\r\n\r\n\t/**\r\n\t * Register a plugin. Plugins can map to load types (sound, image, etc), or specific extensions (png, mp3, etc).\r\n\t * Currently, only one plugin can exist per type/extension.\r\n\t *\r\n\t * When a plugin is installed, a getPreloadHandlers() method will be called on it. For more information\r\n\t * on this method, check out the {{#crossLink \"SamplePlugin/getPreloadHandlers\"}}{{/crossLink}} method in the\r\n\t * {{#crossLink \"SamplePlugin\"}}{{/crossLink}} class.\r\n\t *\r\n\t * Before a file is loaded, a matching plugin has an opportunity to modify the load. If a `callback` is returned\r\n\t * from the {{#crossLink \"SamplePlugin/getPreloadHandlers\"}}{{/crossLink}} method, it will be invoked first, and its\r\n\t * result may cancel or modify the item. The callback method can also return a `completeHandler` to be fired when\r\n\t * the file is loaded, or a `tag` object, which will manage the actual download. For more information on these\r\n\t * methods, check out the {{#crossLink \"SamplePlugin/preloadHandler\"}}{{/crossLink}} and {{#crossLink \"SamplePlugin/fileLoadHandler\"}}{{/crossLink}}\r\n\t * methods on the {{#crossLink \"SamplePlugin\"}}{{/crossLink}}.\r\n\t *\r\n\t * @method installPlugin\r\n\t * @param {Function} plugin The plugin class to install.\r\n\t */\r\n\tp.installPlugin = function (plugin) {\r\n\t\tif (plugin == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (plugin.getPreloadHandlers != null) {\r\n\t\t\tthis._plugins.push(plugin);\r\n\t\t\tvar map = plugin.getPreloadHandlers();\r\n\t\t\tmap.scope = plugin;\r\n\r\n\t\t\tif (map.types != null) {\r\n\t\t\t\tfor (var i = 0, l = map.types.length; i < l; i++) {\r\n\t\t\t\t\tthis._typeCallbacks[map.types[i]] = map;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (map.extensions != null) {\r\n\t\t\t\tfor (i = 0, l = map.extensions.length; i < l; i++) {\r\n\t\t\t\t\tthis._extensionCallbacks[map.extensions[i]] = map;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Set the maximum number of concurrent connections. Note that browsers and servers may have a built-in maximum\r\n\t * number of open connections, so any additional connections may remain in a pending state until the browser\r\n\t * opens the connection. When loading scripts using tags, and when {{#crossLink \"LoadQueue/maintainScriptOrder:property\"}}{{/crossLink}}\r\n\t * is `true`, only one script is loaded at a time due to browser limitations.\r\n\t *\r\n\t *

    Example

    \r\n\t *\r\n\t * var queue = new createjs.LoadQueue();\r\n\t * queue.setMaxConnections(10); // Allow 10 concurrent loads\r\n\t *\r\n\t * @method setMaxConnections\r\n\t * @param {Number} value The number of concurrent loads to allow. By default, only a single connection per LoadQueue\r\n\t * is open at any time.\r\n\t */\r\n\tp.setMaxConnections = function (value) {\r\n\t\tthis._maxConnections = value;\r\n\t\tif (!this._paused && this._loadQueue.length > 0) {\r\n\t\t\tthis._loadNext();\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Load a single file. To add multiple files at once, use the {{#crossLink \"LoadQueue/loadManifest\"}}{{/crossLink}}\r\n\t * method.\r\n\t *\r\n\t * Files are always appended to the current queue, so this method can be used multiple times to add files.\r\n\t * To clear the queue first, use the {{#crossLink \"AbstractLoader/close\"}}{{/crossLink}} method.\r\n\t * @method loadFile\r\n\t * @param {LoadItem|Object|String} file The file object or path to load. A file can be either\r\n\t *
      \r\n\t *
    • A {{#crossLink \"LoadItem\"}}{{/crossLink}} instance
    • \r\n\t *
    • An object containing properties defined by {{#crossLink \"LoadItem\"}}{{/crossLink}}
    • \r\n\t *
    • OR A string path to a resource. Note that this kind of load item will be converted to a {{#crossLink \"LoadItem\"}}{{/crossLink}}\r\n\t * in the background.
    • \r\n\t *
    \r\n\t * @param {Boolean} [loadNow=true] Kick off an immediate load (true) or wait for a load call (false). The default\r\n\t * value is true. If the queue is paused using {{#crossLink \"LoadQueue/setPaused\"}}{{/crossLink}}, and the value is\r\n\t * `true`, the queue will resume automatically.\r\n\t * @param {String} [basePath] A base path that will be prepended to each file. The basePath argument overrides the\r\n\t * path specified in the constructor. Note that if you load a manifest using a file of type {{#crossLink \"Types/MANIFEST:property\"}}{{/crossLink}},\r\n\t * its files will NOT use the basePath parameter. The basePath parameter is deprecated.\r\n\t * This parameter will be removed in a future version. Please either use the `basePath` parameter in the LoadQueue\r\n\t * constructor, or a `path` property in a manifest definition.\r\n\t */\r\n\tp.loadFile = function (file, loadNow, basePath) {\r\n\t\tif (file == null) {\r\n\t\t\tvar event = new createjs.ErrorEvent(\"PRELOAD_NO_FILE\");\r\n\t\t\tthis._sendError(event);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._addItem(file, null, basePath);\r\n\r\n\t\tif (loadNow !== false) {\r\n\t\t\tthis.setPaused(false);\r\n\t\t} else {\r\n\t\t\tthis.setPaused(true);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Load an array of files. To load a single file, use the {{#crossLink \"LoadQueue/loadFile\"}}{{/crossLink}} method.\r\n\t * The files in the manifest are requested in the same order, but may complete in a different order if the max\r\n\t * connections are set above 1 using {{#crossLink \"LoadQueue/setMaxConnections\"}}{{/crossLink}}. Scripts will load\r\n\t * in the right order as long as {{#crossLink \"LoadQueue/maintainScriptOrder\"}}{{/crossLink}} is true (which is\r\n\t * default).\r\n\t *\r\n\t * Files are always appended to the current queue, so this method can be used multiple times to add files.\r\n\t * To clear the queue first, use the {{#crossLink \"AbstractLoader/close\"}}{{/crossLink}} method.\r\n\t * @method loadManifest\r\n\t * @param {Array|String|Object} manifest An list of files to load. The loadManifest call supports four types of\r\n\t * manifests:\r\n\t *
      \r\n\t *
    1. A string path, which points to a manifest file, which is a JSON file that contains a \"manifest\" property,\r\n\t * which defines the list of files to load, and can optionally contain a \"path\" property, which will be\r\n\t * prepended to each file in the list.
    2. \r\n\t *
    3. An object which defines a \"src\", which is a JSON or JSONP file. A \"callback\" can be defined for JSONP\r\n\t * file. The JSON/JSONP file should contain a \"manifest\" property, which defines the list of files to load,\r\n\t * and can optionally contain a \"path\" property, which will be prepended to each file in the list.
    4. \r\n\t *
    5. An object which contains a \"manifest\" property, which defines the list of files to load, and can\r\n\t * optionally contain a \"path\" property, which will be prepended to each file in the list.
    6. \r\n\t *
    7. An Array of files to load.
    8. \r\n\t *
    \r\n\t *\r\n\t * Each \"file\" in a manifest can be either:\r\n\t *
      \r\n\t *
    • A {{#crossLink \"LoadItem\"}}{{/crossLink}} instance
    • \r\n\t *
    • An object containing properties defined by {{#crossLink \"LoadItem\"}}{{/crossLink}}
    • \r\n\t *
    • OR A string path to a resource. Note that this kind of load item will be converted to a {{#crossLink \"LoadItem\"}}{{/crossLink}}\r\n\t * in the background.
    • \r\n\t *
    \r\n\t *\r\n\t * @param {Boolean} [loadNow=true] Kick off an immediate load (true) or wait for a load call (false). The default\r\n\t * value is true. If the queue is paused using {{#crossLink \"LoadQueue/setPaused\"}}{{/crossLink}} and this value is\r\n\t * `true`, the queue will resume automatically.\r\n\t * @param {String} [basePath] A base path that will be prepended to each file. The basePath argument overrides the\r\n\t * path specified in the constructor. Note that if you load a manifest using a file of type {{#crossLink \"LoadQueue/MANIFEST:property\"}}{{/crossLink}},\r\n\t * its files will NOT use the basePath parameter. The basePath parameter is deprecated.\r\n\t * This parameter will be removed in a future version. Please either use the `basePath` parameter in the LoadQueue\r\n\t * constructor, or a `path` property in a manifest definition.\r\n\t */\r\n\tp.loadManifest = function (manifest, loadNow, basePath) {\r\n\t\tvar fileList = null;\r\n\t\tvar path = null;\r\n\r\n\t\t// Array-based list of items\r\n\t\tif (Array.isArray(manifest)) {\r\n\t\t\tif (manifest.length == 0) {\r\n\t\t\t\tvar event = new createjs.ErrorEvent(\"PRELOAD_MANIFEST_EMPTY\");\r\n\t\t\t\tthis._sendError(event);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tfileList = manifest;\r\n\r\n\t\t\t// String-based. Only file manifests can be specified this way. Any other types will cause an error when loaded.\r\n\t\t} else if (typeof(manifest) === \"string\") {\r\n\t\t\tfileList = [\r\n\t\t\t\t{\r\n\t\t\t\t\tsrc: manifest,\r\n\t\t\t\t\ttype: s.MANIFEST\r\n\t\t\t\t}\r\n\t\t\t];\r\n\r\n\t\t} else if (typeof(manifest) == \"object\") {\r\n\r\n\t\t\t// An object that defines a manifest path\r\n\t\t\tif (manifest.src !== undefined) {\r\n\t\t\t\tif (manifest.type == null) {\r\n\t\t\t\t\tmanifest.type = s.MANIFEST;\r\n\t\t\t\t} else if (manifest.type != s.MANIFEST) {\r\n\t\t\t\t\tvar event = new createjs.ErrorEvent(\"PRELOAD_MANIFEST_TYPE\");\r\n\t\t\t\t\tthis._sendError(event);\r\n\t\t\t\t}\r\n\t\t\t\tfileList = [manifest];\r\n\r\n\t\t\t\t// An object that defines a manifest\r\n\t\t\t} else if (manifest.manifest !== undefined) {\r\n\t\t\t\tfileList = manifest.manifest;\r\n\t\t\t\tpath = manifest.path;\r\n\t\t\t}\r\n\r\n\t\t\t// Unsupported. This will throw an error.\r\n\t\t} else {\r\n\t\t\tvar event = new createjs.ErrorEvent(\"PRELOAD_MANIFEST_NULL\");\r\n\t\t\tthis._sendError(event);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tfor (var i = 0, l = fileList.length; i < l; i++) {\r\n\t\t\tthis._addItem(fileList[i], path, basePath);\r\n\t\t}\r\n\r\n\t\tif (loadNow !== false) {\r\n\t\t\tthis.setPaused(false);\r\n\t\t} else {\r\n\t\t\tthis.setPaused(true);\r\n\t\t}\r\n\r\n\t};\r\n\r\n\t/**\r\n\t * Start a LoadQueue that was created, but not automatically started.\r\n\t * @method load\r\n\t */\r\n\tp.load = function () {\r\n\t\tthis.setPaused(false);\r\n\t};\r\n\r\n\t/**\r\n\t * Look up a {{#crossLink \"LoadItem\"}}{{/crossLink}} using either the \"id\" or \"src\" that was specified when loading it. Note that if no \"id\" was\r\n\t * supplied with the load item, the ID will be the \"src\", including a `path` property defined by a manifest. The\r\n\t * `basePath` will not be part of the ID.\r\n\t * @method getItem\r\n\t * @param {String} value The id or src of the load item.\r\n\t * @return {Object} The load item that was initially requested using {{#crossLink \"LoadQueue/loadFile\"}}{{/crossLink}}\r\n\t * or {{#crossLink \"LoadQueue/loadManifest\"}}{{/crossLink}}. This object is also returned via the {{#crossLink \"LoadQueue/fileload:event\"}}{{/crossLink}}\r\n\t * event as the `item` parameter.\r\n\t */\r\n\tp.getItem = function (value) {\r\n\t\treturn this._loadItemsById[value] || this._loadItemsBySrc[value];\r\n\t};\r\n\r\n\t/**\r\n\t * Look up a loaded result using either the \"id\" or \"src\" that was specified when loading it. Note that if no \"id\"\r\n\t * was supplied with the load item, the ID will be the \"src\", including a `path` property defined by a manifest. The\r\n\t * `basePath` will not be part of the ID.\r\n\t * @method getResult\r\n\t * @param {String} value The id or src of the load item.\r\n\t * @param {Boolean} [rawResult=false] Return a raw result instead of a formatted result. This applies to content\r\n\t * loaded via XHR such as scripts, XML, CSS, and Images. If there is no raw result, the formatted result will be\r\n\t * returned instead.\r\n\t * @return {Object} A result object containing the content that was loaded, such as:\r\n\t *
      \r\n\t *
    • An image tag (<image />) for images
    • \r\n\t *
    • A script tag for JavaScript (<script />). Note that scripts are automatically added to the HTML\r\n\t * DOM.
    • \r\n\t *
    • A style tag for CSS (<style /> or <link >)
    • \r\n\t *
    • Raw text for TEXT
    • \r\n\t *
    • A formatted JavaScript object defined by JSON
    • \r\n\t *
    • An XML document
    • \r\n\t *
    • A binary arraybuffer loaded by XHR
    • \r\n\t *
    • An audio tag (<audio >) for HTML audio. Note that it is recommended to use SoundJS APIs to play\r\n\t * loaded audio. Specifically, audio loaded by Flash and WebAudio will return a loader object using this method\r\n\t * which can not be used to play audio back.
    • \r\n\t *
    \r\n\t * This object is also returned via the {{#crossLink \"LoadQueue/fileload:event\"}}{{/crossLink}} event as the 'item`\r\n\t * parameter. Note that if a raw result is requested, but not found, the result will be returned instead.\r\n\t */\r\n\tp.getResult = function (value, rawResult) {\r\n\t\tvar item = this._loadItemsById[value] || this._loadItemsBySrc[value];\r\n\t\tif (item == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tvar id = item.id;\r\n\t\tif (rawResult && this._loadedRawResults[id]) {\r\n\t\t\treturn this._loadedRawResults[id];\r\n\t\t}\r\n\t\treturn this._loadedResults[id];\r\n\t};\r\n\r\n\t/**\r\n\t * Generate an list of items loaded by this queue.\r\n\t * @method getItems\r\n\t * @param {Boolean} loaded Determines if only items that have been loaded should be returned. If false, in-progress\r\n\t * and failed load items will also be included.\r\n\t * @returns {Array} A list of objects that have been loaded. Each item includes the {{#crossLink \"LoadItem\"}}{{/crossLink}},\r\n\t * result, and rawResult.\r\n\t * @since 0.6.0\r\n\t */\r\n\tp.getItems = function (loaded) {\r\n\t\tvar arr = [];\r\n\t\tfor (var n in this._loadItemsById) {\r\n\t\t\tvar item = this._loadItemsById[n];\r\n\t\t\tvar result = this.getResult(n);\r\n\t\t\tif (loaded === true && result == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tarr.push({\r\n\t\t\t\titem: item,\r\n\t\t\t\tresult: result,\r\n\t\t\t\trawResult: this.getResult(n, true)\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn arr;\r\n\t};\r\n\r\n\t/**\r\n\t * Pause or resume the current load. Active loads will not be cancelled, but the next items in the queue will not\r\n\t * be processed when active loads complete. LoadQueues are not paused by default.\r\n\t *\r\n\t * Note that if new items are added to the queue using {{#crossLink \"LoadQueue/loadFile\"}}{{/crossLink}} or\r\n\t * {{#crossLink \"LoadQueue/loadManifest\"}}{{/crossLink}}, a paused queue will be resumed, unless the `loadNow`\r\n\t * argument is `false`.\r\n\t * @method setPaused\r\n\t * @param {Boolean} value Whether the queue should be paused or not.\r\n\t */\r\n\tp.setPaused = function (value) {\r\n\t\tthis._paused = value;\r\n\t\tif (!this._paused) {\r\n\t\t\tthis._loadNext();\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Close the active queue. Closing a queue completely empties the queue, and prevents any remaining items from\r\n\t * starting to download. Note that currently any active loads will remain open, and events may be processed.\r\n\t *\r\n\t * To stop and restart a queue, use the {{#crossLink \"LoadQueue/setPaused\"}}{{/crossLink}} method instead.\r\n\t * @method close\r\n\t */\r\n\tp.close = function () {\r\n\t\twhile (this._currentLoads.length) {\r\n\t\t\tthis._currentLoads.pop().cancel();\r\n\t\t}\r\n\t\tthis._scriptOrder.length = 0;\r\n\t\tthis._loadedScripts.length = 0;\r\n\t\tthis.loadStartWasDispatched = false;\r\n\t\tthis._itemCount = 0;\r\n\t\tthis._lastProgress = NaN;\r\n\t};\r\n\r\n// protected methods\r\n\t/**\r\n\t * Add an item to the queue. Items are formatted into a usable object containing all the properties necessary to\r\n\t * load the content. The load queue is populated with the loader instance that handles preloading, and not the load\r\n\t * item that was passed in by the user. To look up the load item by id or src, use the {{#crossLink \"LoadQueue.getItem\"}}{{/crossLink}}\r\n\t * method.\r\n\t * @method _addItem\r\n\t * @param {String|Object} value The item to add to the queue.\r\n\t * @param {String} [path] An optional path prepended to the `src`. The path will only be prepended if the src is\r\n\t * relative, and does not start with a protocol such as `http://`, or a path like `../`. If the LoadQueue was\r\n\t * provided a {{#crossLink \"_basePath\"}}{{/crossLink}}, then it will optionally be prepended after.\r\n\t * @param {String} [basePath] DeprecatedAn optional basePath passed into a {{#crossLink \"LoadQueue/loadManifest\"}}{{/crossLink}}\r\n\t * or {{#crossLink \"LoadQueue/loadFile\"}}{{/crossLink}} call. This parameter will be removed in a future tagged\r\n\t * version.\r\n\t * @private\r\n\t */\r\n\tp._addItem = function (value, path, basePath) {\r\n\t\tvar item = this._createLoadItem(value, path, basePath); // basePath and manifest path are added to the src.\r\n\t\tif (item == null) {\r\n\t\t\treturn;\r\n\t\t} // Sometimes plugins or types should be skipped.\r\n\t\tvar loader = this._createLoader(item);\r\n\t\tif (loader != null) {\r\n\t\t\tif (\"plugins\" in loader) {\r\n\t\t\t\tloader.plugins = this._plugins;\r\n\t\t\t}\r\n\t\t\titem._loader = loader;\r\n\t\t\tthis._loadQueue.push(loader);\r\n\t\t\tthis._loadQueueBackup.push(loader);\r\n\r\n\t\t\tthis._numItems++;\r\n\t\t\tthis._updateProgress();\r\n\r\n\t\t\t// Only worry about script order when using XHR to load scripts. Tags are only loading one at a time.\r\n\t\t\tif ((this.maintainScriptOrder\r\n\t\t\t\t\t&& item.type == createjs.Types.JAVASCRIPT\r\n\t\t\t\t\t\t//&& loader instanceof createjs.XHRLoader //NOTE: Have to track all JS files this way\r\n\t\t\t\t\t)\r\n\t\t\t\t\t|| item.maintainOrder === true) {\r\n\t\t\t\tthis._scriptOrder.push(item);\r\n\t\t\t\tthis._loadedScripts.push(null);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Create a refined {{#crossLink \"LoadItem\"}}{{/crossLink}}, which contains all the required properties. The type of\r\n\t * item is determined by browser support, requirements based on the file type, and developer settings. For example,\r\n\t * XHR is only used for file types that support it in new browsers.\r\n\t *\r\n\t * Before the item is returned, any plugins registered to handle the type or extension will be fired, which may\r\n\t * alter the load item.\r\n\t * @method _createLoadItem\r\n\t * @param {String | Object | HTMLAudioElement | HTMLImageElement} value The item that needs to be preloaded.\r\n\t * @param {String} [path] A path to prepend to the item's source. Sources beginning with http:// or similar will\r\n\t * not receive a path. Since PreloadJS 0.4.1, the src will be modified to include the `path` and {{#crossLink \"LoadQueue/_basePath:property\"}}{{/crossLink}}\r\n\t * when it is added.\r\n\t * @param {String} [basePath] Deprectated A base path to prepend to the items source in addition to\r\n\t * the path argument.\r\n\t * @return {Object} The loader instance that will be used.\r\n\t * @private\r\n\t */\r\n\tp._createLoadItem = function (value, path, basePath) {\r\n\t\tvar item = createjs.LoadItem.create(value);\r\n\t\tif (item == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tvar bp = \"\"; // Store the generated basePath\r\n\t\tvar useBasePath = basePath || this._basePath;\r\n\r\n\t\tif (item.src instanceof Object) {\r\n\t\t\tif (!item.type) {\r\n\t\t\t\treturn null;\r\n\t\t\t} // the the src is an object, type is required to pass off to plugin\r\n\t\t\tif (path) {\r\n\t\t\t\tbp = path;\r\n\t\t\t\tvar pathMatch = createjs.URLUtils.parseURI(path);\r\n\t\t\t\t// Also append basePath\r\n\t\t\t\tif (useBasePath != null && !pathMatch.absolute && !pathMatch.relative) {\r\n\t\t\t\t\tbp = useBasePath + bp;\r\n\t\t\t\t}\r\n\t\t\t} else if (useBasePath != null) {\r\n\t\t\t\tbp = useBasePath;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// Determine Extension, etc.\r\n\t\t\tvar match = createjs.URLUtils.parseURI(item.src);\r\n\t\t\tif (match.extension) {\r\n\t\t\t\titem.ext = match.extension;\r\n\t\t\t}\r\n\t\t\tif (item.type == null) {\r\n\t\t\t\titem.type = createjs.RequestUtils.getTypeByExtension(item.ext);\r\n\t\t\t}\r\n\r\n\t\t\t// Inject path & basePath\r\n\t\t\tvar autoId = item.src;\r\n\t\t\tif (!match.absolute && !match.relative) {\r\n\t\t\t\tif (path) {\r\n\t\t\t\t\tbp = path;\r\n\t\t\t\t\tvar pathMatch = createjs.URLUtils.parseURI(path);\r\n\t\t\t\t\tautoId = path + autoId;\r\n\t\t\t\t\t// Also append basePath\r\n\t\t\t\t\tif (useBasePath != null && !pathMatch.absolute && !pathMatch.relative) {\r\n\t\t\t\t\t\tbp = useBasePath + bp;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (useBasePath != null) {\r\n\t\t\t\t\tbp = useBasePath;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\titem.src = bp + item.src;\r\n\t\t}\r\n\t\titem.path = bp;\r\n\r\n\t\t// If there's no id, set one now.\r\n\t\tif (item.id === undefined || item.id === null || item.id === \"\") {\r\n\t\t\titem.id = autoId;\r\n\t\t}\r\n\r\n\t\t// Give plugins a chance to modify the loadItem:\r\n\t\tvar customHandler = this._typeCallbacks[item.type] || this._extensionCallbacks[item.ext];\r\n\t\tif (customHandler) {\r\n\t\t\t// Plugins are now passed both the full source, as well as a combined path+basePath (appropriately)\r\n\t\t\tvar result = customHandler.callback.call(customHandler.scope, item, this);\r\n\r\n\t\t\t// The plugin will handle the load, or has canceled it. Ignore it.\r\n\t\t\tif (result === false) {\r\n\t\t\t\treturn null;\r\n\r\n\t\t\t\t// Load as normal:\r\n\t\t\t} else if (result === true) {\r\n\t\t\t\t// Do Nothing\r\n\r\n\t\t\t\t// Result is a loader class:\r\n\t\t\t} else if (result != null) {\r\n\t\t\t\titem._loader = result;\r\n\t\t\t}\r\n\r\n\t\t\t// Update the extension in case the type changed:\r\n\t\t\tmatch = createjs.URLUtils.parseURI(item.src);\r\n\t\t\tif (match.extension != null) {\r\n\t\t\t\titem.ext = match.extension;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Store the item for lookup. This also helps clean-up later.\r\n\t\tthis._loadItemsById[item.id] = item;\r\n\t\tthis._loadItemsBySrc[item.src] = item;\r\n\r\n\t\tif (item.crossOrigin == null) {\r\n\t\t\titem.crossOrigin = this._crossOrigin;\r\n\t\t}\r\n\r\n\t\treturn item;\r\n\t};\r\n\r\n\t/**\r\n\t * Create a loader for a load item.\r\n\t * @method _createLoader\r\n\t * @param {Object} item A formatted load item that can be used to generate a loader.\r\n\t * @return {AbstractLoader} A loader that can be used to load content.\r\n\t * @private\r\n\t */\r\n\tp._createLoader = function (item) {\r\n\t\tif (item._loader != null) { // A plugin already specified a loader\r\n\t\t\treturn item._loader;\r\n\t\t}\r\n\r\n\t\t// Initially, try and use the provided/supported XHR mode:\r\n\t\tvar preferXHR = this.preferXHR;\r\n\r\n\t\tfor (var i = 0; i < this._availableLoaders.length; i++) {\r\n\t\t\tvar loader = this._availableLoaders[i];\r\n\t\t\tif (loader && loader.canLoadItem(item)) {\r\n\t\t\t\treturn new loader(item, preferXHR);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// TODO: Log error (requires createjs.log)\r\n\t\treturn null;\r\n\t};\r\n\r\n\t/**\r\n\t * Load the next item in the queue. If the queue is empty (all items have been loaded), then the complete event\r\n\t * is processed. The queue will \"fill up\" any empty slots, up to the max connection specified using\r\n\t * {{#crossLink \"LoadQueue.setMaxConnections\"}}{{/crossLink}} method. The only exception is scripts that are loaded\r\n\t * using tags, which have to be loaded one at a time to maintain load order.\r\n\t * @method _loadNext\r\n\t * @private\r\n\t */\r\n\tp._loadNext = function () {\r\n\t\tif (this._paused) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Only dispatch loadstart event when the first file is loaded.\r\n\t\tif (!this._loadStartWasDispatched) {\r\n\t\t\tthis._sendLoadStart();\r\n\t\t\tthis._loadStartWasDispatched = true;\r\n\t\t}\r\n\r\n\t\t// The queue has completed.\r\n\t\tif (this._numItems == this._numItemsLoaded) {\r\n\t\t\tthis.loaded = true;\r\n\t\t\tthis._sendComplete();\r\n\r\n\t\t\t// Load the next queue, if it has been defined.\r\n\t\t\tif (this.next && this.next.load) {\r\n\t\t\t\tthis.next.load();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthis.loaded = false;\r\n\t\t}\r\n\r\n\t\t// Must iterate forwards to load in the right order.\r\n\t\tfor (var i = 0; i < this._loadQueue.length; i++) {\r\n\t\t\tif (this._currentLoads.length >= this._maxConnections) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tvar loader = this._loadQueue[i];\r\n\r\n\t\t\t// Determine if we should be only loading one tag-script at a time:\r\n\t\t\t// Note: maintainOrder items don't do anything here because we can hold onto their loaded value\r\n\t\t\tif (!this._canStartLoad(loader)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tthis._loadQueue.splice(i, 1);\r\n\t\t\ti--;\r\n\t\t\tthis._loadItem(loader);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Begin loading an item. Event listeners are not added to the loaders until the load starts.\r\n\t * @method _loadItem\r\n\t * @param {AbstractLoader} loader The loader instance to start. Currently, this will be an XHRLoader or TagLoader.\r\n\t * @private\r\n\t */\r\n\tp._loadItem = function (loader) {\r\n\t\tloader.on(\"fileload\", this._handleFileLoad, this);\r\n\t\tloader.on(\"progress\", this._handleProgress, this);\r\n\t\tloader.on(\"complete\", this._handleFileComplete, this);\r\n\t\tloader.on(\"error\", this._handleError, this);\r\n\t\tloader.on(\"fileerror\", this._handleFileError, this);\r\n\t\tthis._currentLoads.push(loader);\r\n\t\tthis._sendFileStart(loader.getItem());\r\n\t\tloader.load();\r\n\t};\r\n\r\n\t/**\r\n\t * The callback that is fired when a loader loads a file. This enables loaders like {{#crossLink \"ManifestLoader\"}}{{/crossLink}}\r\n\t * to maintain internal queues, but for this queue to dispatch the {{#crossLink \"fileload:event\"}}{{/crossLink}}\r\n\t * events.\r\n\t * @param {Event} event The {{#crossLink \"AbstractLoader/fileload:event\"}}{{/crossLink}} event from the loader.\r\n\t * @private\r\n\t * @since 0.6.0\r\n\t */\r\n\tp._handleFileLoad = function (event) {\r\n\t\tevent.target = null;\r\n\t\tthis.dispatchEvent(event);\r\n\t};\r\n\r\n\t/**\r\n\t * The callback that is fired when a loader encounters an error from an internal file load operation. This enables\r\n\t * loaders like M\r\n\t * @param event\r\n\t * @private\r\n\t */\r\n\tp._handleFileError = function (event) {\r\n\t\tvar newEvent = new createjs.ErrorEvent(\"FILE_LOAD_ERROR\", null, event.item);\r\n\t\tthis._sendError(newEvent);\r\n\t};\r\n\r\n\t/**\r\n\t * The callback that is fired when a loader encounters an error. The queue will continue loading unless {{#crossLink \"LoadQueue/stopOnError:property\"}}{{/crossLink}}\r\n\t * is set to `true`.\r\n\t * @method _handleError\r\n\t * @param {ErrorEvent} event The error event, containing relevant error information.\r\n\t * @private\r\n\t */\r\n\tp._handleError = function (event) {\r\n\t\tvar loader = event.target;\r\n\t\tthis._numItemsLoaded++;\r\n\r\n\t\tthis._finishOrderedItem(loader, true);\r\n\t\tthis._updateProgress();\r\n\r\n\t\tvar newEvent = new createjs.ErrorEvent(\"FILE_LOAD_ERROR\", null, loader.getItem());\r\n\t\t// TODO: Propagate actual error message.\r\n\r\n\t\tthis._sendError(newEvent);\r\n\r\n\t\tif (!this.stopOnError) {\r\n\t\t\tthis._removeLoadItem(loader);\r\n\t\t\tthis._cleanLoadItem(loader);\r\n\t\t\tthis._loadNext();\r\n\t\t} else {\r\n\t\t\tthis.setPaused(true);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * An item has finished loading. We can assume that it is totally loaded, has been parsed for immediate use, and\r\n\t * is available as the \"result\" property on the load item. The raw text result for a parsed item (such as JSON, XML,\r\n\t * CSS, JavaScript, etc) is available as the \"rawResult\" property, and can also be looked up using {{#crossLink \"LoadQueue/getResult\"}}{{/crossLink}}.\r\n\t * @method _handleFileComplete\r\n\t * @param {Event} event The event object from the loader.\r\n\t * @private\r\n\t */\r\n\tp._handleFileComplete = function (event) {\r\n\t\tvar loader = event.target;\r\n\t\tvar item = loader.getItem();\r\n\r\n\t\tvar result = loader.getResult();\r\n\t\tthis._loadedResults[item.id] = result;\r\n\t\tvar rawResult = loader.getResult(true);\r\n\t\tif (rawResult != null && rawResult !== result) {\r\n\t\t\tthis._loadedRawResults[item.id] = rawResult;\r\n\t\t}\r\n\r\n\t\tthis._saveLoadedItems(loader);\r\n\r\n\t\t// Remove the load item\r\n\t\tthis._removeLoadItem(loader);\r\n\r\n\t\tif (!this._finishOrderedItem(loader)) {\r\n\t\t\t// The item was NOT managed, so process it now\r\n\t\t\tthis._processFinishedLoad(item, loader);\r\n\t\t}\r\n\r\n\t\t// Clean up the load item\r\n\t\tthis._cleanLoadItem(loader);\r\n\t};\r\n\r\n\t/**\r\n\t * Some loaders might load additional content, other than the item they were passed (such as {{#crossLink \"ManifestLoader\"}}{{/crossLink}}).\r\n\t * Any items exposed by the loader using {{#crossLink \"AbstractLoader/getLoadItems\"}}{{/crossLink}} are added to the\r\n\t * LoadQueue's look-ups, including {{#crossLink \"getItem\"}}{{/crossLink}} and {{#crossLink \"getResult\"}}{{/crossLink}}\r\n\t * methods.\r\n\t * @method _saveLoadedItems\r\n\t * @param {AbstractLoader} loader\r\n\t * @protected\r\n\t * @since 0.6.0\r\n\t */\r\n\tp._saveLoadedItems = function (loader) {\r\n\t\t// TODO: Not sure how to handle this. Would be nice to expose the items.\r\n\t\t// Loaders may load sub-items. This adds them to this queue\r\n\t\tvar list = loader.getLoadedItems();\r\n\t\tif (list === null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < list.length; i++) {\r\n\t\t\tvar item = list[i].item;\r\n\r\n\t\t\t// Store item lookups\r\n\t\t\tthis._loadItemsBySrc[item.src] = item;\r\n\t\t\tthis._loadItemsById[item.id] = item;\r\n\r\n\t\t\t// Store loaded content\r\n\t\t\tthis._loadedResults[item.id] = list[i].result;\r\n\t\t\tthis._loadedRawResults[item.id] = list[i].rawResult;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Flag an item as finished. If the item's order is being managed, then ensure that it is allowed to finish, and if\r\n\t * so, trigger prior items to trigger as well.\r\n\t * @method _finishOrderedItem\r\n\t * @param {AbstractLoader} loader\r\n\t * @param {Boolean} loadFailed\r\n\t * @return {Boolean} If the item's order is being managed. This allows the caller to take an alternate\r\n\t * behaviour if it is.\r\n\t * @private\r\n\t */\r\n\tp._finishOrderedItem = function (loader, loadFailed) {\r\n\t\tvar item = loader.getItem();\r\n\r\n\t\tif ((this.maintainScriptOrder && item.type == createjs.Types.JAVASCRIPT)\r\n\t\t\t\t|| item.maintainOrder) {\r\n\r\n\t\t\t//TODO: Evaluate removal of the _currentlyLoadingScript\r\n\t\t\tif (loader instanceof createjs.JavaScriptLoader) {\r\n\t\t\t\tthis._currentlyLoadingScript = false;\r\n\t\t\t}\r\n\r\n\t\t\tvar index = createjs.indexOf(this._scriptOrder, item);\r\n\t\t\tif (index == -1) {\r\n\t\t\t\treturn false;\r\n\t\t\t} // This loader no longer exists\r\n\t\t\tthis._loadedScripts[index] = (loadFailed === true) ? true : item;\r\n\r\n\t\t\tthis._checkScriptLoadOrder();\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t};\r\n\r\n\t/**\r\n\t * Ensure the scripts load and dispatch in the correct order. When using XHR, scripts are stored in an array in the\r\n\t * order they were added, but with a \"null\" value. When they are completed, the value is set to the load item,\r\n\t * and then when they are processed and dispatched, the value is set to `true`. This method simply\r\n\t * iterates the array, and ensures that any loaded items that are not preceded by a `null` value are\r\n\t * dispatched.\r\n\t * @method _checkScriptLoadOrder\r\n\t * @private\r\n\t */\r\n\tp._checkScriptLoadOrder = function () {\r\n\t\tvar l = this._loadedScripts.length;\r\n\r\n\t\tfor (var i = 0; i < l; i++) {\r\n\t\t\tvar item = this._loadedScripts[i];\r\n\t\t\tif (item === null) {\r\n\t\t\t\tbreak;\r\n\t\t\t} // This is still loading. Do not process further.\r\n\t\t\tif (item === true) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} // This has completed, and been processed. Move on.\r\n\r\n\t\t\tvar loadItem = this._loadedResults[item.id];\r\n\t\t\tif (item.type == createjs.Types.JAVASCRIPT) {\r\n\t\t\t\t// Append script tags to the head automatically.\r\n\t\t\t\tcreatejs.DomUtils.appendToHead(loadItem);\r\n\t\t\t}\r\n\r\n\t\t\tvar loader = item._loader;\r\n\t\t\tthis._processFinishedLoad(item, loader);\r\n\t\t\tthis._loadedScripts[i] = true;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * A file has completed loading, and the LoadQueue can move on. This triggers the complete event, and kick-starts\r\n\t * the next item.\r\n\t * @method _processFinishedLoad\r\n\t * @param {LoadItem|Object} item\r\n\t * @param {AbstractLoader} loader\r\n\t * @protected\r\n\t */\r\n\tp._processFinishedLoad = function (item, loader) {\r\n\t\tthis._numItemsLoaded++;\r\n\r\n\t\t// Since LoadQueue needs maintain order, we can't append scripts in the loader.\r\n\t\t// So we do it here instead. Or in _checkScriptLoadOrder();\r\n\t\tif (!this.maintainScriptOrder && item.type == createjs.Types.JAVASCRIPT) {\r\n\t\t\tvar tag = loader.getTag();\r\n\t\t\tcreatejs.DomUtils.appendToHead(tag);\r\n\t\t}\r\n\r\n\t\tthis._updateProgress();\r\n\t\tthis._sendFileComplete(item, loader);\r\n\t\tthis._loadNext();\r\n\t};\r\n\r\n\t/**\r\n\t * Ensure items with `maintainOrder=true` that are before the specified item have loaded. This only applies to\r\n\t * JavaScript items that are being loaded with a TagLoader, since they have to be loaded and completed before\r\n\t * the script can even be started, since it exist in the DOM while loading.\r\n\t * @method _canStartLoad\r\n\t * @param {AbstractLoader} loader The loader for the item\r\n\t * @return {Boolean} Whether the item can start a load or not.\r\n\t * @private\r\n\t */\r\n\tp._canStartLoad = function (loader) {\r\n\t\tif (!this.maintainScriptOrder || loader.preferXHR) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvar item = loader.getItem();\r\n\t\tif (item.type != createjs.Types.JAVASCRIPT) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (this._currentlyLoadingScript) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tvar index = this._scriptOrder.indexOf(item);\r\n\t\tvar i = 0;\r\n\t\twhile (i < index) {\r\n\t\t\tvar checkItem = this._loadedScripts[i];\r\n\t\t\tif (checkItem == null) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tthis._currentlyLoadingScript = true;\r\n\t\treturn true;\r\n\t};\r\n\r\n\t/**\r\n\t * A load item is completed or was canceled, and needs to be removed from the LoadQueue.\r\n\t * @method _removeLoadItem\r\n\t * @param {AbstractLoader} loader A loader instance to remove.\r\n\t * @private\r\n\t */\r\n\tp._removeLoadItem = function (loader) {\r\n\t\tvar l = this._currentLoads.length;\r\n\t\tfor (var i = 0; i < l; i++) {\r\n\t\t\tif (this._currentLoads[i] == loader) {\r\n\t\t\t\tthis._currentLoads.splice(i, 1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Remove unneeded references from a loader.\r\n\t *\r\n\t * @param loader\r\n\t * @private\r\n\t */\r\n\tp._cleanLoadItem = function(loader) {\r\n\t\tvar item = loader.getItem();\r\n\t\tif (item) {\r\n\t\t\tdelete item._loader;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * An item has dispatched progress. Propagate that progress, and update the LoadQueue's overall progress.\r\n\t * @method _handleProgress\r\n\t * @param {ProgressEvent} event The progress event from the item.\r\n\t * @private\r\n\t */\r\n\tp._handleProgress = function (event) {\r\n\t\tvar loader = event.target;\r\n\t\tthis._sendFileProgress(loader.getItem(), loader.progress);\r\n\t\tthis._updateProgress();\r\n\t};\r\n\r\n\t/**\r\n\t * Overall progress has changed, so determine the new progress amount and dispatch it. This changes any time an\r\n\t * item dispatches progress or completes. Note that since we don't always know the actual filesize of items before\r\n\t * they are loaded. In this case, we define a \"slot\" for each item (1 item in 10 would get 10%), and then append\r\n\t * loaded progress on top of the already-loaded items.\r\n\t *\r\n\t * For example, if 5/10 items have loaded, and item 6 is 20% loaded, the total progress would be:\r\n\t *
      \r\n\t *
    • 5/10 of the items in the queue (50%)
    • \r\n\t *
    • plus 20% of item 6's slot (2%)
    • \r\n\t *
    • equals 52%
    • \r\n\t *
    \r\n\t * @method _updateProgress\r\n\t * @private\r\n\t */\r\n\tp._updateProgress = function () {\r\n\t\tvar loaded = this._numItemsLoaded / this._numItems; // Fully Loaded Progress\r\n\t\tvar remaining = this._numItems - this._numItemsLoaded;\r\n\t\tif (remaining > 0) {\r\n\t\t\tvar chunk = 0;\r\n\t\t\tfor (var i = 0, l = this._currentLoads.length; i < l; i++) {\r\n\t\t\t\tchunk += this._currentLoads[i].progress;\r\n\t\t\t}\r\n\t\t\tloaded += (chunk / remaining) * (remaining / this._numItems);\r\n\t\t}\r\n\r\n\t\tif (this._lastProgress != loaded) {\r\n\t\t\tthis._sendProgress(loaded);\r\n\t\t\tthis._lastProgress = loaded;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Clean out item results, to free them from memory. Mainly, the loaded item and results are cleared from internal\r\n\t * hashes.\r\n\t * @method _disposeItem\r\n\t * @param {LoadItem|Object} item The item that was passed in for preloading.\r\n\t * @private\r\n\t */\r\n\tp._disposeItem = function (item) {\r\n\t\tdelete this._loadedResults[item.id];\r\n\t\tdelete this._loadedRawResults[item.id];\r\n\t\tdelete this._loadItemsById[item.id];\r\n\t\tdelete this._loadItemsBySrc[item.src];\r\n\t};\r\n\r\n\t/**\r\n\t * Dispatch a \"fileprogress\" {{#crossLink \"Event\"}}{{/crossLink}}. Please see the LoadQueue {{#crossLink \"LoadQueue/fileprogress:event\"}}{{/crossLink}}\r\n\t * event for details on the event payload.\r\n\t * @method _sendFileProgress\r\n\t * @param {LoadItem|Object} item The item that is being loaded.\r\n\t * @param {Number} progress The amount the item has been loaded (between 0 and 1).\r\n\t * @protected\r\n\t */\r\n\tp._sendFileProgress = function (item, progress) {\r\n\t\tif (this._isCanceled() || this._paused) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (!this.hasEventListener(\"fileprogress\")) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//LM: Rework ProgressEvent to support this?\r\n\t\tvar event = new createjs.Event(\"fileprogress\");\r\n\t\tevent.progress = progress;\r\n\t\tevent.loaded = progress;\r\n\t\tevent.total = 1;\r\n\t\tevent.item = item;\r\n\r\n\t\tthis.dispatchEvent(event);\r\n\t};\r\n\r\n\t/**\r\n\t * Dispatch a fileload {{#crossLink \"Event\"}}{{/crossLink}}. Please see the {{#crossLink \"LoadQueue/fileload:event\"}}{{/crossLink}} event for\r\n\t * details on the event payload.\r\n\t * @method _sendFileComplete\r\n\t * @param {LoadItemObject} item The item that is being loaded.\r\n\t * @param {AbstractLoader} loader\r\n\t * @protected\r\n\t */\r\n\tp._sendFileComplete = function (item, loader) {\r\n\t\tif (this._isCanceled() || this._paused) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar event = new createjs.Event(\"fileload\");\r\n\t\tevent.loader = loader;\r\n\t\tevent.item = item;\r\n\t\tevent.result = this._loadedResults[item.id];\r\n\t\tevent.rawResult = this._loadedRawResults[item.id];\r\n\r\n\t\t// This calls a handler specified on the actual load item. Currently, the SoundJS plugin uses this.\r\n\t\tif (item.completeHandler) {\r\n\t\t\titem.completeHandler(event);\r\n\t\t}\r\n\r\n\t\tthis.hasEventListener(\"fileload\") && this.dispatchEvent(event);\r\n\t};\r\n\r\n\t/**\r\n\t * Dispatch a filestart {{#crossLink \"Event\"}}{{/crossLink}} immediately before a file starts to load. Please see\r\n\t * the {{#crossLink \"LoadQueue/filestart:event\"}}{{/crossLink}} event for details on the event payload.\r\n\t * @method _sendFileStart\r\n\t * @param {LoadItem|Object} item The item that is being loaded.\r\n\t * @protected\r\n\t */\r\n\tp._sendFileStart = function (item) {\r\n\t\tvar event = new createjs.Event(\"filestart\");\r\n\t\tevent.item = item;\r\n\t\tthis.hasEventListener(\"filestart\") && this.dispatchEvent(event);\r\n\t};\r\n\r\n\tp.toString = function () {\r\n\t\treturn \"[PreloadJS LoadQueue]\";\r\n\t};\r\n\r\n\tcreatejs.LoadQueue = createjs.promote(LoadQueue, \"AbstractLoader\");\r\n}());\r\n\r\n//##############################################################################\r\n// TextLoader.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\t// constructor\r\n\t/**\r\n\t * A loader for Text files.\r\n\t * @class TextLoader\r\n\t * @param {LoadItem|Object} loadItem\r\n\t * @extends AbstractLoader\r\n\t * @constructor\r\n\t */\r\n\tfunction TextLoader(loadItem) {\r\n\t\tthis.AbstractLoader_constructor(loadItem, true, createjs.Types.TEXT);\r\n\t};\r\n\r\n\tvar p = createjs.extend(TextLoader, createjs.AbstractLoader);\r\n\tvar s = TextLoader;\r\n\r\n\t// static methods\r\n\t/**\r\n\t * Determines if the loader can load a specific item. This loader loads items that are of type {{#crossLink \"Types/TEXT:property\"}}{{/crossLink}},\r\n\t * but is also the default loader if a file type can not be determined.\r\n\t * @method canLoadItem\r\n\t * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\r\n\t * @returns {Boolean} Whether the loader can load the item.\r\n\t * @static\r\n\t */\r\n\ts.canLoadItem = function (item) {\r\n\t\treturn item.type == createjs.Types.TEXT;\r\n\t};\r\n\r\n\tcreatejs.TextLoader = createjs.promote(TextLoader, \"AbstractLoader\");\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// BinaryLoader.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\t// constructor\r\n\t/**\r\n\t * A loader for binary files. This is useful for loading web audio, or content that requires an ArrayBuffer.\r\n\t * @class BinaryLoader\r\n\t * @param {LoadItem|Object} loadItem\r\n\t * @extends AbstractLoader\r\n\t * @constructor\r\n\t */\r\n\tfunction BinaryLoader(loadItem) {\r\n\t\tthis.AbstractLoader_constructor(loadItem, true, createjs.Types.BINARY);\r\n\t\tthis.on(\"initialize\", this._updateXHR, this);\r\n\t};\r\n\r\n\tvar p = createjs.extend(BinaryLoader, createjs.AbstractLoader);\r\n\tvar s = BinaryLoader;\r\n\r\n\t// static methods\r\n\t/**\r\n\t * Determines if the loader can load a specific item. This loader can only load items that are of type\r\n\t * {{#crossLink \"Types/BINARY:property\"}}{{/crossLink}}\r\n\t * @method canLoadItem\r\n\t * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\r\n\t * @returns {Boolean} Whether the loader can load the item.\r\n\t * @static\r\n\t */\r\n\ts.canLoadItem = function (item) {\r\n\t\treturn item.type == createjs.Types.BINARY;\r\n\t};\r\n\r\n\t// private methods\r\n\t/**\r\n\t * Before the item loads, set the response type to \"arraybuffer\"\r\n\t * @property _updateXHR\r\n\t * @param {Event} event\r\n\t * @private\r\n\t */\r\n\tp._updateXHR = function (event) {\r\n\t\tevent.loader.setResponseType(\"arraybuffer\");\r\n\t};\r\n\r\n\tcreatejs.BinaryLoader = createjs.promote(BinaryLoader, \"AbstractLoader\");\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// CSSLoader.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\t// constructor\r\n\t/**\r\n\t * A loader for CSS files.\r\n\t * @class CSSLoader\r\n\t * @param {LoadItem|Object} loadItem\r\n\t * @param {Boolean} preferXHR\r\n\t * @extends AbstractLoader\r\n\t * @constructor\r\n\t */\r\n\tfunction CSSLoader(loadItem, preferXHR) {\r\n\t\tthis.AbstractLoader_constructor(loadItem, preferXHR, createjs.Types.CSS);\r\n\r\n\t\t// public properties\r\n\t\tthis.resultFormatter = this._formatResult;\r\n\r\n\t\t// protected properties\r\n\t\tthis._tagSrcAttribute = \"href\";\r\n\r\n\t\tif (preferXHR) {\r\n\t\t\tthis._tag = createjs.Elements.style();\r\n\t\t} else {\r\n\t\t\tthis._tag = createjs.Elements.link();\r\n\t\t}\r\n\r\n\t\tthis._tag.rel = \"stylesheet\";\r\n\t\tthis._tag.type = \"text/css\";\r\n\t};\r\n\r\n\tvar p = createjs.extend(CSSLoader, createjs.AbstractLoader);\r\n\tvar s = CSSLoader;\r\n\r\n\t// static methods\r\n\t/**\r\n\t * Determines if the loader can load a specific item. This loader can only load items that are of type\r\n\t * {{#crossLink \"Types/CSS:property\"}}{{/crossLink}}.\r\n\t * @method canLoadItem\r\n\t * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\r\n\t * @returns {Boolean} Whether the loader can load the item.\r\n\t * @static\r\n\t */\r\n\ts.canLoadItem = function (item) {\r\n\t\treturn item.type == createjs.Types.CSS;\r\n\t};\r\n\r\n\t// protected methods\r\n\t/**\r\n\t * The result formatter for CSS files.\r\n\t * @method _formatResult\r\n\t * @param {AbstractLoader} loader\r\n\t * @returns {HTMLLinkElement|HTMLStyleElement}\r\n\t * @private\r\n\t */\r\n\tp._formatResult = function (loader) {\r\n\t\tif (this._preferXHR) {\r\n\t\t\tvar tag = loader.getTag();\r\n\r\n\t\t\tif (tag.styleSheet) { // IE\r\n\t\t\t\ttag.styleSheet.cssText = loader.getResult(true);\r\n\t\t\t} else {\r\n\t\t\t\tvar textNode = createjs.Elements.text(loader.getResult(true));\r\n\t\t\t\ttag.appendChild(textNode);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\ttag = this._tag;\r\n\t\t}\r\n\r\n\t\tcreatejs.DomUtils.appendToHead(tag);\r\n\r\n\t\treturn tag;\r\n\t};\r\n\r\n\tcreatejs.CSSLoader = createjs.promote(CSSLoader, \"AbstractLoader\");\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// FontLoader.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n// constructor:\r\n\t/**\r\n\t * A loader that handles font files, CSS definitions, and CSS paths. FontLoader doesn't actually preload fonts\r\n\t * themselves, but rather generates CSS definitions, and then tests the size changes on an HTML5 Canvas element.\r\n\t *\r\n\t * Note that FontLoader does not support tag-based loading due to the requirement that CSS be read to determine the\r\n\t * font definitions to test for.\r\n\t * @class FontLoader\r\n\t * @param {LoadItem|object|string} loadItem The item to be loaded.\r\n\t * @extends AbstractLoader\r\n\t * @constructor\r\n\t **/\r\n\tfunction FontLoader(loadItem, preferXHR) {\r\n\t\tthis.AbstractLoader_constructor(loadItem, preferXHR, loadItem.type);\r\n\r\n\t\t// private properties:\r\n\t\t/**\r\n\t\t * A lookup of font faces to load.\r\n\t\t * @property _faces\r\n\t\t * @protected\r\n\t\t * @type Object\r\n\t\t **/\r\n\t\tthis._faces = {};\r\n\r\n\t\t/**\r\n\t\t * A list of font faces currently being \"watched\". Watched fonts will be tested on a regular interval, and be\r\n\t\t * removed from this list when they are complete.\r\n\t\t * @oroperty _watched\r\n\t\t * @type {Array}\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._watched = [];\r\n\r\n\t\t/**\r\n\t\t * A count of the total font faces to load.\r\n\t\t * @property _count\r\n\t\t * @type {number}\r\n\t\t * @protected\r\n\t\t * @default 0\r\n\t\t */\r\n\t\tthis._count = 0;\r\n\r\n\t\t/**\r\n\t\t * The interval for checking if fonts have been loaded.\r\n\t\t * @property _watchInterval\r\n\t\t * @type {Number}\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._watchInterval = null;\r\n\r\n\t\t/**\r\n\t\t * The timeout for determining if a font can't be loaded. Uses the LoadItem {{#crossLink \"LoadImte/timeout:property\"}}{{/crossLink}}\r\n\t\t * value.\r\n\t\t * @property _loadTimeout\r\n\t\t * @type {Number}\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._loadTimeout = null;\r\n\t\t/**\r\n\t\t * Determines if generated CSS should be injected into the document.\r\n\t\t * @property _injectCSS\r\n\t\t * @type {boolean}\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._injectCSS = (loadItem.injectCSS === undefined) ? true : loadItem.injectCSS;\r\n\r\n\t\tthis.dispatchEvent(\"initialize\");\r\n\t}\r\n\tvar p = createjs.extend(FontLoader, createjs.AbstractLoader);\r\n \r\n /**\r\n * Determines if the loader can load a specific item. This loader can only load items that are of type\r\n * {{#crossLink \"Types/FONT:property\"}}{{/crossLink}}.\r\n * @method canLoadItem\r\n * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\r\n * @returns {Boolean} Whether the loader can load the item.\r\n * @static\r\n */\r\n FontLoader.canLoadItem = function (item) {\r\n return item.type == createjs.Types.FONT || item.type == createjs.Types.FONTCSS;\r\n };\r\n\r\n// static properties:\r\n\t/**\r\n\t * Sample text used by the FontLoader to determine if the font has been loaded. The sample text size is compared\r\n\t * to the loaded font size, and a change indicates that the font has completed.\r\n\t * @property sampleText\r\n\t * @type {String}\r\n\t * @default abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n\t * @static\r\n\t * @private\r\n\t */\r\n\tFontLoader.sampleText = \"abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\r\n\r\n\t/**\r\n\t * The canvas context used to test the font size. Note that this currently requires an HTML DOM.\r\n\t * @property _ctx\r\n\t * @type {CanvasRenderingContext2D}\r\n\t * @static\r\n\t * @private\r\n\t */\r\n\tFontLoader._ctx = document.createElement(\"canvas\").getContext(\"2d\"); // TODO: Consider a method to do this like EaselJS Stage has.\r\n\r\n\t/**\r\n\t * A list of reference fonts to test. Multiple faces are tested to address the rare case of a loaded font being the\r\n\t * exact same dimensions as the test font.\r\n\t * @property _referenceFonts\r\n\t * @type {Array}\r\n\t * @default [\"serif\", \"monospace\"]\r\n\t * @private\r\n\t */\r\n\tFontLoader._referenceFonts = [\"serif\",\"monospace\"];\r\n\r\n\t/**\r\n\t * A regular expression that pulls out possible style values from the font name.\r\n\t *
      \r\n\t *
    • This includes font names that include thin, normal, book, regular, medium, black, and heavy (such as\r\n\t * \"Arial Black\")
    • \r\n\t *
    • Weight modifiers including extra, ultra, semi, demi, light, and bold (such as \"WorkSans SemiBold\")
    • \r\n\t *
    \r\n\t *\r\n\t * Weight descriptions map to font weight values by default using the following (from\r\n\t * http://www.w3.org/TR/css3-fonts/#font-weight-numeric-values):\r\n\t *
      \r\n\t *
    • 100 - Thin
    • \r\n\t * \t
    • 200 - Extra Light, Ultra Light
    • \r\n\t *
    • 300 - Light, Semi Light, Demi Light
    • \r\n\t *
    • 400 - Normal, Book, Regular
    • \r\n\t *
    • 500 - Medium
    • \r\n\t *
    • 600 - Semi Bold, Demi Bold
    • \r\n\t *
    • 700 - Bold
    • \r\n\t *
    • 800 - Extra Bold, Ultra Bold
    • \r\n\t *
    • 900 - Black, Heavy
    • \r\n\t *
    \r\n\t * @property WEIGHT_REGEX\r\n\t * @type {RegExp}\r\n\t * @static\r\n\t */\r\n\tFontLoader.WEIGHT_REGEX = /[- ._]*(thin|normal|book|regular|medium|black|heavy|[1-9]00|(?:extra|ultra|semi|demi)?[- ._]*(?:light|bold))[- ._]*/ig;\r\n\r\n\t/**\r\n\t * A regular expression that pulls out possible style values from the font name. These include \"italic\"\r\n\t * and \"oblique\".\r\n\t * @property STYLE_REGEX\r\n\t * @type {RegExp}\r\n\t * @static\r\n\t */\r\n\tFontLoader.STYLE_REGEX = /[- ._]*(italic|oblique)[- ._]*/ig;\r\n\r\n\t/**\r\n\t * A lookup of font types for generating a CSS definition. For example, TTF fonts requires a \"truetype\" type.\r\n\t * @property FONT_FORMAT\r\n\t * @type {Object}\r\n\t * @static\r\n\t */\r\n\tFontLoader.FONT_FORMAT = {woff2:\"woff2\", woff:\"woff\", ttf:\"truetype\", otf:\"truetype\"};\r\n\r\n\t/**\r\n\t * A lookup of font weights based on a name. These values are from http://www.w3.org/TR/css3-fonts/#font-weight-numeric-values.\r\n\t * @property FONT_WEIGHT\r\n\t * @type {Object}\r\n\t * @static\r\n\t */\r\n\tFontLoader.FONT_WEIGHT = {thin:100, extralight:200, ultralight:200, light:300, semilight:300, demilight:300, book:\"normal\", regular:\"normal\", semibold:600, demibold:600, extrabold:800, ultrabold:800, black:900, heavy:900};\r\n\r\n\t/**\r\n\t * The frequency in milliseconds to check for loaded fonts.\r\n\t * @property WATCH_DURATION\r\n\t * @type {number}\r\n\t * @default 10\r\n\t * @static\r\n\t */\r\n\tFontLoader.WATCH_DURATION = 10;\r\n// public methods:\r\n\tp.load = function() {\r\n\t\tif (this.type == createjs.Types.FONTCSS) {\r\n\t\t\tvar loaded = this._watchCSS();\r\n\r\n\t\t\t// If the CSS is not ready, it will create a request, which AbstractLoader can handle.\r\n\t\t\tif (!loaded) {\r\n\t\t\t\tthis.AbstractLoader_load();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t} else if (this._item.src instanceof Array) {\r\n\t\t\tthis._watchFontArray();\r\n\t\t} else {\r\n\t\t\tvar def = this._defFromSrc(this._item.src);\r\n\t\t\tthis._watchFont(def);\r\n\t\t\tthis._injectStyleTag(this._cssFromDef(def));\r\n\t\t}\r\n\r\n\t\tthis._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), this._item.loadTimeout);\r\n\r\n\t\tthis.dispatchEvent(\"loadstart\");\r\n\t};\r\n\r\n\t/**\r\n\t * The font load has timed out. This is called via a setTimeout.\r\n\t * callback.\r\n\t * @method _handleTimeout\r\n\t * @protected\r\n\t */\r\n\tp._handleTimeout = function () {\r\n\t\tthis._stopWatching();\r\n\t\tthis.dispatchEvent(new createjs.ErrorEvent(\"PRELOAD_TIMEOUT\"));\r\n\t};\r\n\r\n\t// WatchCSS does the work for us, and provides a modified src.\r\n\tp._createRequest = function() {\r\n\t\treturn this._request;\r\n\t};\r\n\r\n\t// Events come from the internal XHR loader.\r\n\tp.handleEvent = function (event) {\r\n\t\tswitch (event.type) {\r\n\t\t\tcase \"complete\":\r\n\t\t\t\tthis._rawResult = event.target._response;\r\n\t\t\t\tthis._result = true;\r\n\t\t\t\tthis._parseCSS(this._rawResult);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"error\":\r\n\t\t\t\tthis._stopWatching();\r\n\t\t\t\tthis.AbstractLoader_handleEvent(event);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t};\r\n\r\n// private methods:\r\n\t/**\r\n\t * Determine if the provided CSS is a string definition, CSS HTML element, or a CSS file URI. Depending on the\r\n\t * format, the CSS will be parsed, or loaded.\r\n\t * @method _watchCSS\r\n\t * @returns {boolean} Whether or not the CSS is ready\r\n\t * @protected\r\n\t */\r\n\tp._watchCSS = function() {\r\n\t\tvar src = this._item.src;\r\n\r\n\t\t// An HTMLElement was passed in. Just use it.\r\n\t\tif (src instanceof HTMLStyleElement) {\r\n\t\t\tif (this._injectCSS && !src.parentNode) { (document.head || document.getElementsByTagName('head')[0]).appendChild(src); }\r\n\t\t\tthis._injectCSS = false;\r\n\t\t\tsrc = \"\\n\"+src.textContent;\r\n\t\t}\r\n\r\n\t\t// A CSS string was passed in. Parse and use it\r\n\t\tif (src.search(/\\n|\\r|@font-face/i) !== -1) { // css string.\r\n\t\t\tthis._parseCSS(src);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// Load a CSS Path. Note that we CAN NOT load it without XHR because we need to read the CSS definition\r\n\t\tthis._request = new createjs.XHRRequest(this._item);\r\n\t\treturn false;\r\n\t};\r\n\r\n\t/**\r\n\t * Parse a CSS string to determine the fonts to load.\r\n\t * @method _parseCSS\r\n\t * @param {String} css The CSS string to parse\r\n\t * @protected\r\n\t */\r\n\tp._parseCSS = function(css) {\r\n\t\tvar regex = /@font-face\\s*\\{([^}]+)}/g\r\n\t\twhile (true) {\r\n\t\t\tvar result = regex.exec(css);\r\n\t\t\tif (!result) { break; }\r\n\t\t\tthis._watchFont(this._parseFontFace(result[1]));\r\n\t\t}\r\n\t\tthis._injectStyleTag(css);\r\n\t};\r\n\r\n\t/**\r\n\t * The provided fonts were an array of object or string definitions. Parse them, and inject any that are ready.\r\n\t * @method _watchFontArray\r\n\t * @protected\r\n\t */\r\n\tp._watchFontArray = function() {\r\n\t\tvar arr = this._item.src, css = \"\", def;\r\n\t\tfor (var i=arr.length-1; i>=0; i--) {\r\n\t\t\tvar o = arr[i];\r\n\t\t\tif (typeof o === \"string\") { def = this._defFromSrc(o) }\r\n\t\t\telse { def = this._defFromObj(o); }\r\n\t\t\tthis._watchFont(def);\r\n\t\t\tcss += this._cssFromDef(def)+\"\\n\";\r\n\t\t}\r\n\t\tthis._injectStyleTag(css);\r\n\t};\r\n\r\n\t/**\r\n\t * Inject any style definitions into the document head. This is necessary when the definition is just a string or\r\n\t * object definition in order for the styles to be applied to the document. If the loaded fonts are already HTML CSS\r\n\t * elements, they don't need to be appended again.\r\n\t * @method _injectStyleTag\r\n\t * @param {String} css The CSS string content to be appended to the\r\n\t * @protected\r\n\t */\r\n\tp._injectStyleTag = function(css) {\r\n\t\tif (!this._injectCSS) { return; }\r\n\t\tvar head = document.head || document.getElementsByTagName('head')[0];\r\n\t\tvar styleTag = document.createElement(\"style\");\r\n\t\tstyleTag.type = \"text/css\";\r\n\t\tif (styleTag.styleSheet){\r\n\t\t\tstyleTag.styleSheet.cssText = css;\r\n\t\t} else {\r\n\t\t\tstyleTag.appendChild(document.createTextNode(css));\r\n\t\t}\r\n\t\thead.appendChild(styleTag);\r\n\t};\r\n\r\n\t/**\r\n\t * Determine the font face from a CSS definition.\r\n\t * @method _parseFontFace\r\n\t * @param {String} str The CSS string definition\r\n\t * @protected\r\n\t * @return {String} A modified CSS object containing family name, src, style, and weight\r\n\t */\r\n\tp._parseFontFace = function(str) {\r\n\t\tvar family = this._getCSSValue(str, \"font-family\"), src = this._getCSSValue(str, \"src\");\r\n\t\tif (!family || !src) { return null; }\r\n\t\treturn this._defFromObj({\r\n\t\t\tfamily: family,\r\n\t\t\tsrc: src,\r\n\t\t\tstyle: this._getCSSValue(str, \"font-style\"),\r\n\t\t\tweight: this._getCSSValue(str, \"font-weight\")\r\n\t\t});\r\n\t};\r\n\r\n\t/**\r\n\t * Add a font to the list of fonts currently being watched. If the font is already watched or loaded, it won't be\r\n\t * added again.\r\n\t * @method _watchFont\r\n\t * @param {Object} def The font definition\r\n\t * @protected\r\n\t */\r\n\tp._watchFont = function(def) {\r\n\t\tif (!def || this._faces[def.id]) { return; }\r\n\t\tthis._faces[def.id] = def;\r\n\t\tthis._watched.push(def);\r\n\t\tthis._count++;\r\n\r\n\t\tthis._calculateReferenceSizes(def);\r\n\t\tthis._startWatching();\r\n\t};\r\n\r\n\t/**\r\n\t * Create a interval to check for loaded fonts. Only one interval is used for all fonts. The fonts are checked based\r\n\t * on the {{#crossLink \"FontLoader/WATCH_DURATION:property\"}}{{/crossLink}}.\r\n\t * @method _startWatching\r\n\t * @protected\r\n\t */\r\n\tp._startWatching = function() {\r\n\t\tif (this._watchInterval != null) { return; }\r\n\t\tthis._watchInterval = setInterval(createjs.proxy(this._watch, this), FontLoader.WATCH_DURATION);\r\n\t};\r\n\r\n\t/**\r\n\t * Clear the interval used to check fonts. This happens when all fonts are loaded, or an error occurs, such as a\r\n\t * CSS file error, or a load timeout.\r\n\t * @method _stopWatching\r\n\t * @protected\r\n\t */\r\n\tp._stopWatching = function() {\r\n\t\tclearInterval(this._watchInterval);\r\n\t\tclearTimeout(this._loadTimeout);\r\n\t\tthis._watchInterval = null;\r\n\t};\r\n\r\n\t/**\r\n\t * Check all the fonts that have not been loaded. The fonts are drawn to a canvas in memory, and if their font size\r\n\t * varies from the default text size, then the font is considered loaded.\r\n\t *\r\n\t * A {{#crossLink \"AbstractLoader/fileload\"}}{{/crossLink}} event will be dispatched when each file is loaded, along\r\n\t * with the font family name as the `item` value. A {{#crossLink \"ProgressEvent\"}}{{/crossLink}} is dispatched a\r\n\t * maximum of one time per check when any fonts are loaded, with the {{#crossLink \"ProgressEvent/progress:property\"}}{{/crossLink}}\r\n\t * value showing the percentage of fonts that have loaded.\r\n\t * @method _watch\r\n\t * @protected\r\n\t */\r\n\tp._watch = function() {\r\n\t\tvar defs = this._watched, refFonts = FontLoader._referenceFonts, l = defs.length;\r\n\t\tfor (var i = l - 1; i >= 0; i--) {\r\n\t\t\tvar def = defs[i], refs = def.refs;\r\n\t\t\tfor (var j = refs.length - 1; j >= 0; j--) {\r\n\t\t\t\tvar w = this._getTextWidth(def.family + \",\" + refFonts[j], def.weight, def.style);\r\n\t\t\t\tif (w != refs[j]) {\r\n\t\t\t\t\tvar event = new createjs.Event(\"fileload\");\r\n\t\t\t\t\tdef.type = \"font-family\";\r\n\t\t\t\t\tevent.item = def;\r\n\t\t\t\t\tthis.dispatchEvent(event);\r\n\t\t\t\t\tdefs.splice(i, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (l !== defs.length) {\r\n\t\t\tvar event = new createjs.ProgressEvent(this._count-defs.length, this._count);\r\n\t\t\tthis.dispatchEvent(event);\r\n\t\t}\r\n\t\tif (l === 0) {\r\n\t\t\tthis._stopWatching();\r\n\t\t\tthis._sendComplete();\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Determine the default size of the reference fonts used to compare against loaded fonts.\r\n\t * @method _calculateReferenceSizes\r\n\t * @param {Object} def The font definition to get the size of.\r\n\t * @protected\r\n\t */\r\n\tp._calculateReferenceSizes = function(def) {\r\n\t\tvar refFonts = FontLoader._referenceFonts;\r\n\t\tvar refs = def.refs = [];\r\n\t\tfor (var i=0; iwithout requiring CORS.\r\n\t * JSONP files are loaded as JavaScript, and the \"callback\" is executed once they are loaded. The callback in the\r\n\t * JSONP must match the callback passed to the loadItem.\r\n\t *\r\n\t *

    Example JSONP

    \r\n\t *\r\n\t * \t\tcallbackName({\r\n\t * \t\t\t\"name\": \"value\",\r\n\t *\t \t\t\"num\": 3,\r\n\t *\t\t\t\"obj\": { \"bool\":true }\r\n\t * \t\t});\r\n\t *\r\n\t *

    Example

    \r\n\t *\r\n\t * \t\tvar loadItem = {id:\"json\", type:\"jsonp\", src:\"http://server.com/text.json\", callback:\"callbackName\"}\r\n\t * \t\tvar queue = new createjs.LoadQueue();\r\n\t * \t\tqueue.on(\"complete\", handleComplete);\r\n\t * \t\tqueue.loadItem(loadItem);\r\n\t *\r\n\t * \t\tfunction handleComplete(event) }\r\n\t * \t\t\tvar json = queue.getResult(\"json\");\r\n\t * \t\t\tconsole.log(json.obj.bool); // true\r\n\t * \t\t}\r\n\t *\r\n\t * JSONP files loaded concurrently require a unique callback. To ensure JSONP files are loaded in order,\r\n\t * either use the {{#crossLink \"LoadQueue/setMaxConnections\"}}{{/crossLink}} method (set to 1), or set\r\n\t * {{#crossLink \"LoadItem/maintainOrder:property\"}}{{/crossLink}} on items with the same callback.\r\n\t *\r\n\t * Important note: Some browsers will prevent JSONP from firing the callback if the file was loaded as JSON, and not\r\n\t * JavaScript. You may have to have your server give you a JavaScript mime-type for this to work.\r\n\t *\r\n\t * @class JSONPLoader\r\n\t * @param {LoadItem|Object} loadItem\r\n\t * @extends AbstractLoader\r\n\t * @constructor\r\n\t */\r\n\tfunction JSONPLoader(loadItem) {\r\n\t\tthis.AbstractLoader_constructor(loadItem, false, createjs.Types.JSONP);\r\n\t\tthis.setTag(createjs.Elements.script());\r\n\t\tthis.getTag().type = \"text/javascript\";\r\n\t};\r\n\r\n\tvar p = createjs.extend(JSONPLoader, createjs.AbstractLoader);\r\n\tvar s = JSONPLoader;\r\n\r\n\r\n\t// static methods\r\n\t/**\r\n\t * Determines if the loader can load a specific item. This loader can only load items that are of type\r\n\t * {{#crossLink \"Types/JSONP:property\"}}{{/crossLink}}.\r\n\t * @method canLoadItem\r\n\t * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\r\n\t * @returns {Boolean} Whether the loader can load the item.\r\n\t * @static\r\n\t */\r\n\ts.canLoadItem = function (item) {\r\n\t\treturn item.type == createjs.Types.JSONP;\r\n\t};\r\n\r\n\t// public methods\r\n\tp.cancel = function () {\r\n\t\tthis.AbstractLoader_cancel();\r\n\t\tthis._dispose();\r\n\t};\r\n\r\n\t/**\r\n\t * Loads the JSONp file. Because of the unique loading needs of JSONp\r\n\t * we don't use the AbstractLoader.load() method.\r\n\t *\r\n\t * @method load\r\n\t *\r\n\t */\r\n\tp.load = function () {\r\n\t\tif (this._item.callback == null) {\r\n\t\t\tthrow new Error('callback is required for loading JSONP requests.');\r\n\t\t}\r\n\r\n\t\t// TODO: Look into creating our own iFrame to handle the load\r\n\t\t// In the first attempt, FF did not get the result\r\n\t\t// result instanceof Object did not work either\r\n\t\t// so we would need to clone the result.\r\n\t\tif (window[this._item.callback] != null) {\r\n\t\t\tthrow new Error(\r\n\t\t\t\t\"JSONP callback '\" +\r\n\t\t\t\tthis._item.callback +\r\n\t\t\t\t\"' already exists on window. You need to specify a different callback or re-name the current one.\");\r\n\t\t}\r\n\r\n\t\twindow[this._item.callback] = createjs.proxy(this._handleLoad, this);\r\n\t\tcreatejs.DomUtils.appendToBody(this._tag);\r\n\r\n\t\tthis._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), this._item.loadTimeout);\r\n\r\n\t\t// Load the tag\r\n\t\tthis._tag.src = this._item.src;\r\n\t};\r\n\r\n\t// private methods\r\n\t/**\r\n\t * Handle the JSONP callback, which is a public method defined on `window`.\r\n\t * @method _handleLoad\r\n\t * @param {Object} data The formatted JSON data.\r\n\t * @private\r\n\t */\r\n\tp._handleLoad = function (data) {\r\n\t\tthis._result = this._rawResult = data;\r\n\t\tthis._sendComplete();\r\n\r\n\t\tthis._dispose();\r\n\t};\r\n\r\n\t/**\r\n\t * The tag request has not loaded within the time specfied in loadTimeout.\r\n\t * @method _handleError\r\n\t * @param {Object} event The XHR error event.\r\n\t * @private\r\n\t */\r\n\tp._handleTimeout = function () {\r\n\t\tthis._dispose();\r\n\t\tthis.dispatchEvent(new createjs.ErrorEvent(\"timeout\"));\r\n\t};\r\n\r\n\t/**\r\n\t * Clean up the JSONP load. This clears out the callback and script tag that this loader creates.\r\n\t * @method _dispose\r\n\t * @private\r\n\t */\r\n\tp._dispose = function () {\r\n\t\tcreatejs.DomUtils.removeChild(this._tag);\r\n\t\tdelete window[this._item.callback];\r\n\r\n\t\tclearTimeout(this._loadTimeout);\r\n\t};\r\n\r\n\tcreatejs.JSONPLoader = createjs.promote(JSONPLoader, \"AbstractLoader\");\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// ManifestLoader.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\t// constructor\r\n\t/**\r\n\t * A loader for JSON manifests. Items inside the manifest are loaded before the loader completes. To load manifests\r\n\t * using JSONP, specify a {{#crossLink \"LoadItem/callback:property\"}}{{/crossLink}} as part of the\r\n\t * {{#crossLink \"LoadItem\"}}{{/crossLink}}.\r\n\t *\r\n\t * The list of files in the manifest must be defined on the top-level JSON object in a `manifest` property. This\r\n\t * example shows a sample manifest definition, as well as how to to include a sub-manifest.\r\n\t *\r\n\t * \t\t{\r\n\t * \t\t\t\"path\": \"assets/\",\r\n\t *\t \t \"manifest\": [\r\n\t *\t\t\t\t\"image.png\",\r\n\t *\t\t\t\t{\"src\": \"image2.png\", \"id\":\"image2\"},\r\n\t *\t\t\t\t{\"src\": \"sub-manifest.json\", \"type\":\"manifest\", \"callback\":\"jsonCallback\"}\r\n\t *\t \t ]\r\n\t *\t \t}\r\n\t *\r\n\t * When a ManifestLoader has completed loading, the parent loader (usually a {{#crossLink \"LoadQueue\"}}{{/crossLink}},\r\n\t * but could also be another ManifestLoader) will inherit all the loaded items, so you can access them directly.\r\n\t *\r\n\t * Note that the {{#crossLink \"JSONLoader\"}}{{/crossLink}} and {{#crossLink \"JSONPLoader\"}}{{/crossLink}} are\r\n\t * higher priority loaders, so manifests must set the {{#crossLink \"LoadItem\"}}{{/crossLink}}\r\n\t * {{#crossLink \"LoadItem/type:property\"}}{{/crossLink}} property to {{#crossLink \"Types/MANIFEST:property\"}}{{/crossLink}}.\r\n\t *\r\n\t * Additionally, some browsers require the server to serve a JavaScript mime-type for JSONP, so it may not work in\r\n\t * some conditions.\r\n\t * @class ManifestLoader\r\n\t * @param {LoadItem|Object} loadItem\r\n\t * @extends AbstractLoader\r\n\t * @constructor\r\n\t */\r\n\tfunction ManifestLoader(loadItem, preferXHR) {\r\n\t\tthis.AbstractLoader_constructor(loadItem, preferXHR, createjs.Types.MANIFEST);\r\n\r\n\t// Public Properties\r\n\t\t/**\r\n\t\t * An array of the plugins registered using {{#crossLink \"LoadQueue/installPlugin\"}}{{/crossLink}},\r\n\t\t * used to pass plugins to new LoadQueues that may be created.\r\n\t\t * @property _plugins\r\n\t\t * @type {Array}\r\n\t\t * @private\r\n\t\t * @since 0.6.1\r\n\t\t */\r\n\t\tthis.plugins = null;\r\n\r\n\r\n\t// Protected Properties\r\n\t\t/**\r\n\t\t * An internal {{#crossLink \"LoadQueue\"}}{{/crossLink}} that loads the contents of the manifest.\r\n\t\t * @property _manifestQueue\r\n\t\t * @type {LoadQueue}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._manifestQueue = null;\r\n\t};\r\n\r\n\tvar p = createjs.extend(ManifestLoader, createjs.AbstractLoader);\r\n\tvar s = ManifestLoader;\r\n\r\n\t// static properties\r\n\t/**\r\n\t * The amount of progress that the manifest itself takes up.\r\n\t * @property MANIFEST_PROGRESS\r\n\t * @type {number}\r\n\t * @default 0.25 (25%)\r\n\t * @private\r\n\t * @static\r\n\t */\r\n\ts.MANIFEST_PROGRESS = 0.25;\r\n\r\n\t// static methods\r\n\t/**\r\n\t * Determines if the loader can load a specific item. This loader can only load items that are of type\r\n\t * {{#crossLink \"Types/MANIFEST:property\"}}{{/crossLink}}\r\n\t * @method canLoadItem\r\n\t * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\r\n\t * @returns {Boolean} Whether the loader can load the item.\r\n\t * @static\r\n\t */\r\n\ts.canLoadItem = function (item) {\r\n\t\treturn item.type == createjs.Types.MANIFEST;\r\n\t};\r\n\r\n\t// public methods\r\n\tp.load = function () {\r\n\t\tthis.AbstractLoader_load();\r\n\t};\r\n\r\n\t// protected methods\r\n\tp._createRequest = function() {\r\n\t\tvar callback = this._item.callback;\r\n\t\tif (callback != null) {\r\n\t\t\tthis._request = new createjs.JSONPLoader(this._item);\r\n\t\t} else {\r\n\t\t\tthis._request = new createjs.JSONLoader(this._item);\r\n\t\t}\r\n\t};\r\n\r\n\tp.handleEvent = function (event) {\r\n\t\tswitch (event.type) {\r\n\t\t\tcase \"complete\":\r\n\t\t\t\tthis._rawResult = event.target.getResult(true);\r\n\t\t\t\tthis._result = event.target.getResult();\r\n\t\t\t\tthis._sendProgress(s.MANIFEST_PROGRESS);\r\n\t\t\t\tthis._loadManifest(this._result);\r\n\t\t\t\treturn;\r\n\t\t\tcase \"progress\":\r\n\t\t\t\tevent.loaded *= s.MANIFEST_PROGRESS;\r\n\t\t\t\tthis.progress = event.loaded / event.total;\r\n\t\t\t\tif (isNaN(this.progress) || this.progress == Infinity) { this.progress = 0; }\r\n\t\t\t\tthis._sendProgress(event);\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t\tthis.AbstractLoader_handleEvent(event);\r\n\t};\r\n\r\n\tp.destroy = function() {\r\n\t\tthis.AbstractLoader_destroy();\r\n\t\tthis._manifestQueue.close();\r\n\t};\r\n\r\n\t/**\r\n\t * Create and load the manifest items once the actual manifest has been loaded.\r\n\t * @method _loadManifest\r\n\t * @param {Object} json\r\n\t * @private\r\n\t */\r\n\tp._loadManifest = function (json) {\r\n\t\tif (json && json.manifest) {\r\n\t\t\tvar queue = this._manifestQueue = new createjs.LoadQueue(this._preferXHR);\r\n\t\t\tqueue.on(\"fileload\", this._handleManifestFileLoad, this);\r\n\t\t\tqueue.on(\"progress\", this._handleManifestProgress, this);\r\n\t\t\tqueue.on(\"complete\", this._handleManifestComplete, this, true);\r\n\t\t\tqueue.on(\"error\", this._handleManifestError, this, true);\r\n\t\t\tfor(var i = 0, l = this.plugins.length; i < l; i++) {\t// conserve order of plugins\r\n\t\t\t\tqueue.installPlugin(this.plugins[i]);\r\n\t\t\t}\r\n\t\t\tqueue.loadManifest(json);\r\n\t\t} else {\r\n\t\t\tthis._sendComplete();\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * An item from the {{#crossLink \"_manifestQueue:property\"}}{{/crossLink}} has completed.\r\n\t * @method _handleManifestFileLoad\r\n\t * @param {Event} event\r\n\t * @private\r\n\t */\r\n\tp._handleManifestFileLoad = function (event) {\r\n\t\tevent.target = null;\r\n\t\tthis.dispatchEvent(event);\r\n\t};\r\n\r\n\t/**\r\n\t * The manifest has completed loading. This triggers the {{#crossLink \"AbstractLoader/complete:event\"}}{{/crossLink}}\r\n\t * {{#crossLink \"Event\"}}{{/crossLink}} from the ManifestLoader.\r\n\t * @method _handleManifestComplete\r\n\t * @param {Event} event\r\n\t * @private\r\n\t */\r\n\tp._handleManifestComplete = function (event) {\r\n\t\tthis._loadedItems = this._manifestQueue.getItems(true);\r\n\t\tthis._sendComplete();\r\n\t};\r\n\r\n\t/**\r\n\t * The manifest has reported progress.\r\n\t * @method _handleManifestProgress\r\n\t * @param {ProgressEvent} event\r\n\t * @private\r\n\t */\r\n\tp._handleManifestProgress = function (event) {\r\n\t\tthis.progress = event.progress * (1 - s.MANIFEST_PROGRESS) + s.MANIFEST_PROGRESS;\r\n\t\tthis._sendProgress(this.progress);\r\n\t};\r\n\r\n\t/**\r\n\t * The manifest has reported an error with one of the files.\r\n\t * @method _handleManifestError\r\n\t * @param {ErrorEvent} event\r\n\t * @private\r\n\t */\r\n\tp._handleManifestError = function (event) {\r\n\t\tvar newEvent = new createjs.Event(\"fileerror\");\r\n\t\tnewEvent.item = event.data;\r\n\t\tthis.dispatchEvent(newEvent);\r\n\t};\r\n\r\n\tcreatejs.ManifestLoader = createjs.promote(ManifestLoader, \"AbstractLoader\");\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// SoundLoader.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\t// constructor\r\n\t/**\r\n\t * A loader for HTML audio files. PreloadJS can not load WebAudio files, as a WebAudio context is required, which\r\n\t * should be created by either a library playing the sound (such as SoundJS, or an\r\n\t * external framework that handles audio playback. To load content that can be played by WebAudio, use the\r\n\t * {{#crossLink \"BinaryLoader\"}}{{/crossLink}}, and handle the audio context decoding manually.\r\n\t * @class SoundLoader\r\n\t * @param {LoadItem|Object} loadItem\r\n\t * @param {Boolean} preferXHR\r\n\t * @extends AbstractMediaLoader\r\n\t * @constructor\r\n\t */\r\n\tfunction SoundLoader(loadItem, preferXHR) {\r\n\t\tthis.AbstractMediaLoader_constructor(loadItem, preferXHR, createjs.Types.SOUND);\r\n\r\n\t\t// protected properties\r\n\t\tif (createjs.DomUtils.isAudioTag(loadItem)) {\r\n\t\t\tthis._tag = loadItem;\r\n\t\t} else if (createjs.DomUtils.isAudioTag(loadItem.src)) {\r\n\t\t\tthis._tag = loadItem;\r\n\t\t} else if (createjs.DomUtils.isAudioTag(loadItem.tag)) {\r\n\t\t\tthis._tag = createjs.DomUtils.isAudioTag(loadItem) ? loadItem : loadItem.src;\r\n\t\t}\r\n\r\n\t\tif (this._tag != null) {\r\n\t\t\tthis._preferXHR = false;\r\n\t\t}\r\n\t};\r\n\r\n\tvar p = createjs.extend(SoundLoader, createjs.AbstractMediaLoader);\r\n\tvar s = SoundLoader;\r\n\r\n\t// static methods\r\n\t/**\r\n\t * Determines if the loader can load a specific item. This loader can only load items that are of type\r\n\t * {{#crossLink \"Types/SOUND:property\"}}{{/crossLink}}.\r\n\t * @method canLoadItem\r\n\t * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\r\n\t * @returns {Boolean} Whether the loader can load the item.\r\n\t * @static\r\n\t */\r\n\ts.canLoadItem = function (item) {\r\n\t\treturn item.type == createjs.Types.SOUND;\r\n\t};\r\n\r\n\t// protected methods\r\n\tp._createTag = function (src) {\r\n\t\tvar tag = createjs.Elements.audio();\r\n\t\ttag.autoplay = false;\r\n\t\ttag.preload = \"none\";\r\n\r\n\t\t//LM: Firefox fails when this the preload=\"none\" for other tags, but it needs to be \"none\" to ensure PreloadJS works.\r\n\t\ttag.src = src;\r\n\t\treturn tag;\r\n\t};\r\n\r\n\tcreatejs.SoundLoader = createjs.promote(SoundLoader, \"AbstractMediaLoader\");\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// VideoLoader.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\t// constructor\r\n\t/**\r\n\t * A loader for video files.\r\n\t * @class VideoLoader\r\n\t * @param {LoadItem|Object} loadItem\r\n\t * @param {Boolean} preferXHR\r\n\t * @extends AbstractMediaLoader\r\n\t * @constructor\r\n\t */\r\n\tfunction VideoLoader(loadItem, preferXHR) {\r\n\t\tthis.AbstractMediaLoader_constructor(loadItem, preferXHR, createjs.Types.VIDEO);\r\n\r\n\t\tif (createjs.DomUtils.isVideoTag(loadItem) || createjs.DomUtils.isVideoTag(loadItem.src)) {\r\n\t\t\tthis.setTag(createjs.DomUtils.isVideoTag(loadItem)?loadItem:loadItem.src);\r\n\r\n\t\t\t// We can't use XHR for a tag that's passed in.\r\n\t\t\tthis._preferXHR = false;\r\n\t\t} else {\r\n\t\t\tthis.setTag(this._createTag());\r\n\t\t}\r\n\t};\r\n\r\n\tvar p = createjs.extend(VideoLoader, createjs.AbstractMediaLoader);\r\n\tvar s = VideoLoader;\r\n\r\n\t/**\r\n\t * Create a new video tag\r\n\t *\r\n\t * @returns {HTMLElement}\r\n\t * @private\r\n\t */\r\n\tp._createTag = function () {\r\n\t\treturn createjs.Elements.video();\r\n\t};\r\n\r\n\t// static methods\r\n\t/**\r\n\t * Determines if the loader can load a specific item. This loader can only load items that are of type\r\n\t * {{#crossLink \"Types/VIDEO:property\"}}{{/crossLink}}.\r\n\t * @method canLoadItem\r\n\t * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\r\n\t * @returns {Boolean} Whether the loader can load the item.\r\n\t * @static\r\n\t */\r\n\ts.canLoadItem = function (item) {\r\n\t\treturn item.type == createjs.Types.VIDEO;\r\n\t};\r\n\r\n\tcreatejs.VideoLoader = createjs.promote(VideoLoader, \"AbstractMediaLoader\");\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// SpriteSheetLoader.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\t// constructor\r\n\t/**\r\n\t * A loader for EaselJS SpriteSheets. Images inside the spritesheet definition are loaded before the loader\r\n\t * completes. To load SpriteSheets using JSONP, specify a {{#crossLink \"LoadItem/callback:property\"}}{{/crossLink}}\r\n\t * as part of the {{#crossLink \"LoadItem\"}}{{/crossLink}}. Note that the {{#crossLink \"JSONLoader\"}}{{/crossLink}}\r\n\t * and {{#crossLink \"JSONPLoader\"}}{{/crossLink}} are higher priority loaders, so SpriteSheets must\r\n\t * set the {{#crossLink \"LoadItem\"}}{{/crossLink}} {{#crossLink \"LoadItem/type:property\"}}{{/crossLink}} property\r\n\t * to {{#crossLink \"Types/SPRITESHEET:property\"}}{{/crossLink}}.\r\n\t *\r\n\t * The {{#crossLink \"LoadItem\"}}{{/crossLink}} {{#crossLink \"LoadItem/crossOrigin:property\"}}{{/crossLink}} as well\r\n\t * as the {{#crossLink \"LoadQueue's\"}}{{/crossLink}} `basePath` argument and {{#crossLink \"LoadQueue/_preferXHR\"}}{{/crossLink}}\r\n\t * property supplied to the {{#crossLink \"LoadQueue\"}}{{/crossLink}} are passed on to the sub-manifest that loads\r\n\t * the SpriteSheet images.\r\n\t *\r\n\t * Note that the SpriteSheet JSON does not respect the {{#crossLink \"LoadQueue/_preferXHR:property\"}}{{/crossLink}}\r\n\t * property, which should instead be determined by the presence of a {{#crossLink \"LoadItem/callback:property\"}}{{/crossLink}}\r\n\t * property on the SpriteSheet load item. This is because the JSON loaded will have a different format depending on\r\n\t * if it is loaded as JSON, so just changing `preferXHR` is not enough to change how it is loaded.\r\n\t * @class SpriteSheetLoader\r\n\t * @param {LoadItem|Object} loadItem\r\n\t * @extends AbstractLoader\r\n\t * @constructor\r\n\t */\r\n\tfunction SpriteSheetLoader(loadItem, preferXHR) {\r\n\t\tthis.AbstractLoader_constructor(loadItem, preferXHR, createjs.Types.SPRITESHEET);\r\n\r\n\t\t// protected properties\r\n\t\t/**\r\n\t\t * An internal queue which loads the SpriteSheet's images.\r\n\t\t * @method _manifestQueue\r\n\t\t * @type {LoadQueue}\r\n\t\t * @private\r\n\t\t */\r\n\t\tthis._manifestQueue = null;\r\n\t}\r\n\r\n\tvar p = createjs.extend(SpriteSheetLoader, createjs.AbstractLoader);\r\n\tvar s = SpriteSheetLoader;\r\n\r\n\t// static properties\r\n\t/**\r\n\t * The amount of progress that the manifest itself takes up.\r\n\t * @property SPRITESHEET_PROGRESS\r\n\t * @type {number}\r\n\t * @default 0.25 (25%)\r\n\t * @private\r\n\t * @static\r\n\t */\r\n\ts.SPRITESHEET_PROGRESS = 0.25;\r\n\r\n\t// static methods\r\n\t/**\r\n\t * Determines if the loader can load a specific item. This loader can only load items that are of type\r\n\t * {{#crossLink \"Types/SPRITESHEET:property\"}}{{/crossLink}}\r\n\t * @method canLoadItem\r\n\t * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\r\n\t * @returns {Boolean} Whether the loader can load the item.\r\n\t * @static\r\n\t */\r\n\ts.canLoadItem = function (item) {\r\n\t\treturn item.type == createjs.Types.SPRITESHEET;\r\n\t};\r\n\r\n\t// public methods\r\n\tp.destroy = function() {\r\n\t\tthis.AbstractLoader_destroy();\r\n\t\tthis._manifestQueue.close();\r\n\t};\r\n\r\n\t// protected methods\r\n\tp._createRequest = function() {\r\n\t\tvar callback = this._item.callback;\r\n\t\tif (callback != null) {\r\n\t\t\tthis._request = new createjs.JSONPLoader(this._item);\r\n\t\t} else {\r\n\t\t\tthis._request = new createjs.JSONLoader(this._item);\r\n\t\t}\r\n\t};\r\n\r\n\tp.handleEvent = function (event) {\r\n\t\tswitch (event.type) {\r\n\t\t\tcase \"complete\":\r\n\t\t\t\tthis._rawResult = event.target.getResult(true);\r\n\t\t\t\tthis._result = event.target.getResult();\r\n\t\t\t\tthis._sendProgress(s.SPRITESHEET_PROGRESS);\r\n\t\t\t\tthis._loadManifest(this._result);\r\n\t\t\t\treturn;\r\n\t\t\tcase \"progress\":\r\n\t\t\t\tevent.loaded *= s.SPRITESHEET_PROGRESS;\r\n\t\t\t\tthis.progress = event.loaded / event.total;\r\n\t\t\t\tif (isNaN(this.progress) || this.progress == Infinity) { this.progress = 0; }\r\n\t\t\t\tthis._sendProgress(event);\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t\tthis.AbstractLoader_handleEvent(event);\r\n\t};\r\n\r\n\t/**\r\n\t * Create and load the images once the SpriteSheet JSON has been loaded.\r\n\t * @method _loadManifest\r\n\t * @param {Object} json\r\n\t * @private\r\n\t */\r\n\tp._loadManifest = function (json) {\r\n\t\tif (json && json.images) {\r\n\t\t\tvar queue = this._manifestQueue = new createjs.LoadQueue(this._preferXHR, this._item.path, this._item.crossOrigin);\r\n\t\t\tqueue.on(\"complete\", this._handleManifestComplete, this, true);\r\n\t\t\tqueue.on(\"fileload\", this._handleManifestFileLoad, this);\r\n\t\t\tqueue.on(\"progress\", this._handleManifestProgress, this);\r\n\t\t\tqueue.on(\"error\", this._handleManifestError, this, true);\r\n\t\t\tqueue.loadManifest(json.images);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * An item from the {{#crossLink \"_manifestQueue:property\"}}{{/crossLink}} has completed.\r\n\t * @method _handleManifestFileLoad\r\n\t * @param {Event} event\r\n\t * @private\r\n\t */\r\n\tp._handleManifestFileLoad = function (event) {\r\n\t\tvar image = event.result;\r\n\t\tif (image != null) {\r\n\t\t\tvar images = this.getResult().images;\r\n\t\t\tvar pos = images.indexOf(event.item.src);\r\n\t\t\timages[pos] = image;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * The images have completed loading. This triggers the {{#crossLink \"AbstractLoader/complete:event\"}}{{/crossLink}}\r\n\t * {{#crossLink \"Event\"}}{{/crossLink}} from the SpriteSheetLoader.\r\n\t * @method _handleManifestComplete\r\n\t * @param {Event} event\r\n\t * @private\r\n\t */\r\n\tp._handleManifestComplete = function (event) {\r\n\t\tthis._result = new createjs.SpriteSheet(this._result);\r\n\t\tthis._loadedItems = this._manifestQueue.getItems(true);\r\n\t\tthis._sendComplete();\r\n\t};\r\n\r\n\t/**\r\n\t * The images {{#crossLink \"LoadQueue\"}}{{/crossLink}} has reported progress.\r\n\t * @method _handleManifestProgress\r\n\t * @param {ProgressEvent} event\r\n\t * @private\r\n\t */\r\n\tp._handleManifestProgress = function (event) {\r\n\t\tthis.progress = event.progress * (1 - s.SPRITESHEET_PROGRESS) + s.SPRITESHEET_PROGRESS;\r\n\t\tthis._sendProgress(this.progress);\r\n\t};\r\n\r\n\t/**\r\n\t * An image has reported an error.\r\n\t * @method _handleManifestError\r\n\t * @param {ErrorEvent} event\r\n\t * @private\r\n\t */\r\n\tp._handleManifestError = function (event) {\r\n\t\tvar newEvent = new createjs.Event(\"fileerror\");\r\n\t\tnewEvent.item = event.data;\r\n\t\tthis.dispatchEvent(newEvent);\r\n\t};\r\n\r\n\tcreatejs.SpriteSheetLoader = createjs.promote(SpriteSheetLoader, \"AbstractLoader\");\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// SVGLoader.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\t// constructor\r\n\t/**\r\n\t * A loader for SVG files.\r\n\t * @class SVGLoader\r\n\t * @param {LoadItem|Object} loadItem\r\n\t * @param {Boolean} preferXHR\r\n\t * @extends AbstractLoader\r\n\t * @constructor\r\n\t */\r\n\tfunction SVGLoader(loadItem, preferXHR) {\r\n\t\tthis.AbstractLoader_constructor(loadItem, preferXHR, createjs.Types.SVG);\r\n\r\n\t\t// public properties\r\n\t\tthis.resultFormatter = this._formatResult;\r\n\r\n\t\t// protected properties\r\n\t\tthis._tagSrcAttribute = \"data\";\r\n\r\n\t\tif (preferXHR) {\r\n\t\t\tthis.setTag(createjs.Elements.svg());\r\n\t\t} else {\r\n\t\t\tthis.setTag(createjs.Elements.object());\r\n\t\t\tthis.getTag().type = \"image/svg+xml\";\r\n\t\t}\r\n\t};\r\n\r\n\tvar p = createjs.extend(SVGLoader, createjs.AbstractLoader);\r\n\tvar s = SVGLoader;\r\n\r\n\t// static methods\r\n\t/**\r\n\t * Determines if the loader can load a specific item. This loader can only load items that are of type\r\n\t * {{#crossLink \"Types/SVG:property\"}}{{/crossLink}}\r\n\t * @method canLoadItem\r\n\t * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\r\n\t * @returns {Boolean} Whether the loader can load the item.\r\n\t * @static\r\n\t */\r\n\ts.canLoadItem = function (item) {\r\n\t\treturn item.type == createjs.Types.SVG;\r\n\t};\r\n\r\n\t// protected methods\r\n\t/**\r\n\t * The result formatter for SVG files.\r\n\t * @method _formatResult\r\n\t * @param {AbstractLoader} loader\r\n\t * @returns {Object}\r\n\t * @private\r\n\t */\r\n\tp._formatResult = function (loader) {\r\n\t\t// mime should be image/svg+xml, but Opera requires text/xml\r\n\t\tvar xml = createjs.DataUtils.parseXML(loader.getResult(true));\r\n\t\tvar tag = loader.getTag();\r\n\r\n\t\tif (!this._preferXHR && document.body.contains(tag)) {\r\n\t\t\tdocument.body.removeChild(tag);\r\n\t\t}\r\n\r\n\t\tif (xml.documentElement != null) {\r\n\t\t\tvar element = xml.documentElement;\r\n\t\t\t// Support loading an SVG from a different domain in ID\r\n\t\t\tif (document.importNode) {\r\n\t\t\t\telement = document.importNode(element, true);\r\n\t\t\t}\r\n\t\t\ttag.appendChild(element);\r\n\t\t\treturn tag;\r\n\t\t} else { // For browsers that don't support SVG, just give them the XML. (IE 9-8)\r\n\t\t\treturn xml;\r\n\t\t}\r\n\t};\r\n\r\n\tcreatejs.SVGLoader = createjs.promote(SVGLoader, \"AbstractLoader\");\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// XMLLoader.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\t// constructor\r\n\t/**\r\n\t * A loader for CSS files.\r\n\t * @class XMLLoader\r\n\t * @param {LoadItem|Object} loadItem\r\n\t * @extends AbstractLoader\r\n\t * @constructor\r\n\t */\r\n\tfunction XMLLoader(loadItem) {\r\n\t\tthis.AbstractLoader_constructor(loadItem, true, createjs.Types.XML);\r\n\r\n\t\t// public properties\r\n\t\tthis.resultFormatter = this._formatResult;\r\n\t};\r\n\r\n\tvar p = createjs.extend(XMLLoader, createjs.AbstractLoader);\r\n\tvar s = XMLLoader;\r\n\r\n\t// static methods\r\n\t/**\r\n\t * Determines if the loader can load a specific item. This loader can only load items that are of type\r\n\t * {{#crossLink \"Types/XML:property\"}}{{/crossLink}}.\r\n\t * @method canLoadItem\r\n\t * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.\r\n\t * @returns {Boolean} Whether the loader can load the item.\r\n\t * @static\r\n\t */\r\n\ts.canLoadItem = function (item) {\r\n\t\treturn item.type == createjs.Types.XML;\r\n\t};\r\n\r\n\t// protected methods\r\n\t/**\r\n\t * The result formatter for XML files.\r\n\t * @method _formatResult\r\n\t * @param {AbstractLoader} loader\r\n\t * @returns {XMLDocument}\r\n\t * @private\r\n\t */\r\n\tp._formatResult = function (loader) {\r\n\t\treturn createjs.DataUtils.parseXML(loader.getResult(true));\r\n\t};\r\n\r\n\tcreatejs.XMLLoader = createjs.promote(XMLLoader, \"AbstractLoader\");\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// version.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\r\n\t/**\r\n\t * Static class holding library specific information such as the version and buildDate of the library.\r\n\t * The SoundJS class has been renamed {{#crossLink \"Sound\"}}{{/crossLink}}. Please see {{#crossLink \"Sound\"}}{{/crossLink}}\r\n\t * for information on using sound.\r\n\t * @class SoundJS\r\n\t **/\r\n\tvar s = createjs.SoundJS = createjs.SoundJS || {};\r\n\r\n\t/**\r\n\t * The version string for this release.\r\n\t * @property version\r\n\t * @type String\r\n\t * @static\r\n\t **/\r\n\ts.version = /*=version*/\"NEXT\"; // injected by build process\r\n\r\n\t/**\r\n\t * The build date for this release in UTC format.\r\n\t * @property buildDate\r\n\t * @type String\r\n\t * @static\r\n\t **/\r\n\ts.buildDate = /*=date*/\"Thu, 14 Sep 2017 22:19:45 GMT\"; // injected by build process\r\n\r\n})();\r\n\r\n//##############################################################################\r\n// BrowserDetect.js\r\n//##############################################################################\r\n\r\n/**\r\n * @class Utility Methods\r\n */\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\t/**\r\n\t * An object that determines the current browser, version, operating system, and other environment\r\n\t * variables via user agent string.\r\n\t *\r\n\t * Used for audio because feature detection is unable to detect the many limitations of mobile devices.\r\n\t *\r\n\t *

    Example

    \r\n\t *\r\n\t * if (createjs.BrowserDetect.isIOS) { // do stuff }\r\n\t *\r\n\t * @property BrowserDetect\r\n\t * @type {Object}\r\n\t * @param {Boolean} isFirefox True if our browser is Firefox.\r\n\t * @param {Boolean} isOpera True if our browser is opera.\r\n\t * @param {Boolean} isChrome True if our browser is Chrome. Note that Chrome for Android returns true, but is a\r\n\t * completely different browser with different abilities.\r\n\t * @param {Boolean} isIOS True if our browser is safari for iOS devices (iPad, iPhone, and iPod).\r\n\t * @param {Boolean} isAndroid True if our browser is Android.\r\n\t * @param {Boolean} isBlackberry True if our browser is Blackberry.\r\n\t * @constructor\r\n\t * @static\r\n\t */\r\n\tfunction BrowserDetect() {\r\n\t\tthrow \"BrowserDetect cannot be instantiated\";\r\n\t};\r\n\r\n\tvar agent = BrowserDetect.agent = window.navigator.userAgent;\r\n\tBrowserDetect.isWindowPhone = (agent.indexOf(\"IEMobile\") > -1) || (agent.indexOf(\"Windows Phone\") > -1);\r\n\tBrowserDetect.isFirefox = (agent.indexOf(\"Firefox\") > -1);\r\n\tBrowserDetect.isOpera = (window.opera != null);\r\n\tBrowserDetect.isChrome = (agent.indexOf(\"Chrome\") > -1); // NOTE that Chrome on Android returns true but is a completely different browser with different abilities\r\n\tBrowserDetect.isIOS = (agent.indexOf(\"iPod\") > -1 || agent.indexOf(\"iPhone\") > -1 || agent.indexOf(\"iPad\") > -1) && !BrowserDetect.isWindowPhone;\r\n\tBrowserDetect.isAndroid = (agent.indexOf(\"Android\") > -1) && !BrowserDetect.isWindowPhone;\r\n\tBrowserDetect.isBlackberry = (agent.indexOf(\"Blackberry\") > -1);\r\n\r\n\tcreatejs.BrowserDetect = BrowserDetect;\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// AudioSprite.js\r\n//##############################################################################\r\n\r\n// NOTE this is \"Class\" is purely to document audioSprite Setup and usage.\r\n\r\n\r\n/**\r\n * Note: AudioSprite is not a class, but its usage is easily lost in the documentation, so it has been called\r\n * out here for quick reference.\r\n *\r\n * Audio sprites are much like CSS sprites or image sprite sheets: multiple audio assets grouped into a single file.\r\n * Audio sprites work around limitations in certain browsers, where only a single sound can be loaded and played at a\r\n * time. We recommend at least 300ms of silence between audio clips to deal with HTML audio tag inaccuracy, and to prevent\r\n * accidentally playing bits of the neighbouring clips.\r\n *\r\n * Benefits of Audio Sprites:\r\n *
      \r\n *
    • More robust support for older browsers and devices that only allow a single audio instance, such as iOS 5.
    • \r\n *
    • They provide a work around for the Internet Explorer 9 audio tag limit, which restricts how many different\r\n * sounds that could be loaded at once.
    • \r\n *
    • Faster loading by only requiring a single network request for several sounds, especially on mobile devices\r\n * where the network round trip for each file can add significant latency.
    • \r\n *
    \r\n *\r\n * Drawbacks of Audio Sprites\r\n *
      \r\n *
    • No guarantee of smooth looping when using HTML or Flash audio. If you have a track that needs to loop\r\n * \t\tsmoothly and you are supporting non-web audio browsers, do not use audio sprites for that sound if you can avoid\r\n * \t\tit.
    • \r\n *
    • No guarantee that HTML audio will play back immediately, especially the first time. In some browsers\r\n * (Chrome!), HTML audio will only load enough to play through at the current download speed – so we rely on the\r\n * `canplaythrough` event to determine if the audio is loaded. Since audio sprites must jump ahead to play specific\r\n * sounds, the audio may not yet have downloaded fully.
    • \r\n *
    • Audio sprites share the same core source, so if you have a sprite with 5 sounds and are limited to 2\r\n * \t\tconcurrently playing instances, you can only play 2 of the sounds at the same time.
    • \r\n *
    \r\n *\r\n *

    Example

    \r\n *\r\n *\t\tcreatejs.Sound.initializeDefaultPlugins();\r\n *\t\tvar assetsPath = \"./assets/\";\r\n *\t\tvar sounds = [{\r\n *\t\t\tsrc:\"MyAudioSprite.ogg\", data: {\r\n *\t\t\t\taudioSprite: [\r\n *\t\t\t\t\t{id:\"sound1\", startTime:0, duration:500},\r\n *\t\t\t\t\t{id:\"sound2\", startTime:1000, duration:400},\r\n *\t\t\t\t\t{id:\"sound3\", startTime:1700, duration: 1000}\r\n *\t\t\t\t]}\r\n *\t\t\t}\r\n *\t\t];\r\n *\t\tcreatejs.Sound.alternateExtensions = [\"mp3\"];\r\n *\t\tcreatejs.Sound.on(\"fileload\", loadSound);\r\n *\t\tcreatejs.Sound.registerSounds(sounds, assetsPath);\r\n *\t\t// after load is complete\r\n *\t\tcreatejs.Sound.play(\"sound2\");\r\n *\r\n * You can also create audio sprites on the fly by setting the startTime and duration when creating an new AbstractSoundInstance.\r\n *\r\n * \t\tcreatejs.Sound.play(\"MyAudioSprite\", {startTime: 1000, duration: 400});\r\n *\r\n * The excellent CreateJS community has created a tool to create audio sprites, available at\r\n * https://github.com/tonistiigi/audiosprite,\r\n * as well as a jsfiddle to convert the output\r\n * to SoundJS format.\r\n *\r\n * @class AudioSprite\r\n * @since 0.6.0\r\n */\r\n\r\n//##############################################################################\r\n// PlayPropsConfig.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\t/**\r\n\t * A class to store the optional play properties passed in {{#crossLink \"Sound/play\"}}{{/crossLink}} and\r\n\t * {{#crossLink \"AbstractSoundInstance/play\"}}{{/crossLink}} calls.\r\n\t *\r\n\t * Optional Play Properties Include:\r\n\t *
      \r\n\t *
    • interrupt - How to interrupt any currently playing instances of audio with the same source,\r\n\t * if the maximum number of instances of the sound are already playing. Values are defined as INTERRUPT_TYPE\r\n\t * constants on the Sound class, with the default defined by {{#crossLink \"Sound/defaultInterruptBehavior:property\"}}{{/crossLink}}.
    • \r\n\t *
    • delay - The amount of time to delay the start of audio playback, in milliseconds.
    • \r\n\t *
    • offset - The offset from the start of the audio to begin playback, in milliseconds.
    • \r\n\t *
    • loop - How many times the audio loops when it reaches the end of playback. The default is 0 (no\r\n\t * loops), and -1 can be used for infinite playback.
    • \r\n\t *
    • volume - The volume of the sound, between 0 and 1. Note that the master volume is applied\r\n\t * against the individual volume.
    • \r\n\t *
    • pan - The left-right pan of the sound (if supported), between -1 (left) and 1 (right).
    • \r\n\t *
    • startTime - To create an audio sprite (with duration), the initial offset to start playback and loop from, in milliseconds.
    • \r\n\t *
    • duration - To create an audio sprite (with startTime), the amount of time to play the clip for, in milliseconds.
    • \r\n\t *
    \r\n\t *\r\n\t *

    Example

    \r\n\t *\r\n\t * \tvar props = new createjs.PlayPropsConfig().set({interrupt: createjs.Sound.INTERRUPT_ANY, loop: -1, volume: 0.5})\r\n\t * \tcreatejs.Sound.play(\"mySound\", props);\r\n\t * \t// OR\r\n\t * \tmySoundInstance.play(props);\r\n\t *\r\n\t * @class PlayPropsConfig\r\n\t * @constructor\r\n\t * @since 0.6.1\r\n\t */\r\n\t// TODO think of a better name for this class\r\n\tvar PlayPropsConfig = function () {\r\n// Public Properties\r\n\t\t/**\r\n\t\t * How to interrupt any currently playing instances of audio with the same source,\r\n\t\t * if the maximum number of instances of the sound are already playing. Values are defined as\r\n\t\t * INTERRUPT_TYPE constants on the Sound class, with the default defined by\r\n\t\t * {{#crossLink \"Sound/defaultInterruptBehavior:property\"}}{{/crossLink}}.\r\n\t\t * @property interrupt\r\n\t\t * @type {string}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.interrupt = null;\r\n\r\n\t\t/**\r\n\t\t * The amount of time to delay the start of audio playback, in milliseconds.\r\n\t\t * @property delay\r\n\t\t * @type {Number}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.delay = null;\r\n\r\n\t\t/**\r\n\t\t * The offset from the start of the audio to begin playback, in milliseconds.\r\n\t\t * @property offset\r\n\t\t * @type {number}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.offset = null;\r\n\r\n\t\t/**\r\n\t\t * How many times the audio loops when it reaches the end of playback. The default is 0 (no\r\n\t\t * loops), and -1 can be used for infinite playback.\r\n\t\t * @property loop\r\n\t\t * @type {number}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.loop = null;\r\n\r\n\t\t/**\r\n\t\t * The volume of the sound, between 0 and 1. Note that the master volume is applied\r\n\t\t * against the individual volume.\r\n\t\t * @property volume\r\n\t\t * @type {number}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.volume = null;\r\n\r\n\t\t/**\r\n\t\t * The left-right pan of the sound (if supported), between -1 (left) and 1 (right).\r\n\t\t * @property pan\r\n\t\t * @type {number}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.pan = null;\r\n\r\n\t\t/**\r\n\t\t * Used to create an audio sprite (with duration), the initial offset to start playback and loop from, in milliseconds.\r\n\t\t * @property startTime\r\n\t\t * @type {number}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.startTime = null;\r\n\r\n\t\t/**\r\n\t\t * Used to create an audio sprite (with startTime), the amount of time to play the clip for, in milliseconds.\r\n\t\t * @property duration\r\n\t\t * @type {number}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.duration = null;\r\n\t};\r\n\tvar p = PlayPropsConfig.prototype = {};\r\n\tvar s = PlayPropsConfig;\r\n\r\n\r\n// Static Methods\r\n\t/**\r\n\t * Creates a PlayPropsConfig from another PlayPropsConfig or an Object.\r\n\t *\r\n\t * @method create\r\n\t * @param {PlayPropsConfig|Object} value The play properties\r\n\t * @returns {PlayPropsConfig}\r\n\t * @static\r\n\t */\r\n\ts.create = function (value) {\r\n\t\tif (typeof(value) === \"string\") {\r\n\t\t\t// Handle the old API gracefully.\r\n\t\t\tconsole && (console.warn || console.log)(\"Deprecated behaviour. Sound.play takes a configuration object instead of individual arguments. See docs for info.\");\r\n\t\t\treturn new createjs.PlayPropsConfig().set({interrupt:value});\r\n\t\t} else if (value == null || value instanceof s || value instanceof Object) {\r\n\t\t\treturn new createjs.PlayPropsConfig().set(value);\r\n\t\t} else if (value == null) {\r\n\t\t\tthrow new Error(\"PlayProps configuration not recognized.\");\r\n\t\t}\r\n\t};\r\n\r\n// Public Methods\r\n\t/**\r\n\t * Provides a chainable shortcut method for setting a number of properties on the instance.\r\n\t *\r\n\t *

    Example

    \r\n\t *\r\n\t * var PlayPropsConfig = new createjs.PlayPropsConfig().set({loop:-1, volume:0.7});\r\n\t *\r\n\t * @method set\r\n\t * @param {Object} props A generic object containing properties to copy to the PlayPropsConfig instance.\r\n\t * @return {PlayPropsConfig} Returns the instance the method is called on (useful for chaining calls.)\r\n\t*/\r\n\tp.set = function(props) {\r\n\t\tif (props != null) {\r\n\t\t\tfor (var n in props) { this[n] = props[n]; }\r\n\t\t}\r\n\t\treturn this;\r\n\t};\r\n\r\n\tp.toString = function() {\r\n\t\treturn \"[PlayPropsConfig]\";\r\n\t};\r\n\r\n\tcreatejs.PlayPropsConfig = s;\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// Sound.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\t/**\r\n\t * The Sound class is the public API for creating sounds, controlling the overall sound levels, and managing plugins.\r\n\t * All Sound APIs on this class are static.\r\n\t *\r\n\t * Registering and Preloading
    \r\n\t * Before you can play a sound, it must be registered. You can do this with {{#crossLink \"Sound/registerSound\"}}{{/crossLink}},\r\n\t * or register multiple sounds using {{#crossLink \"Sound/registerSounds\"}}{{/crossLink}}. If you don't register a\r\n\t * sound prior to attempting to play it using {{#crossLink \"Sound/play\"}}{{/crossLink}} or create it using {{#crossLink \"Sound/createInstance\"}}{{/crossLink}},\r\n\t * the sound source will be automatically registered but playback will fail as the source will not be ready. If you use\r\n\t * PreloadJS, registration is handled for you when the sound is\r\n\t * preloaded. It is recommended to preload sounds either internally using the register functions or externally using\r\n\t * PreloadJS so they are ready when you want to use them.\r\n\t *\r\n\t * Playback
    \r\n\t * To play a sound once it's been registered and preloaded, use the {{#crossLink \"Sound/play\"}}{{/crossLink}} method.\r\n\t * This method returns a {{#crossLink \"AbstractSoundInstance\"}}{{/crossLink}} which can be paused, resumed, muted, etc.\r\n\t * Please see the {{#crossLink \"AbstractSoundInstance\"}}{{/crossLink}} documentation for more on the instance control APIs.\r\n\t *\r\n\t * Plugins
    \r\n\t * By default, the {{#crossLink \"WebAudioPlugin\"}}{{/crossLink}} or the {{#crossLink \"HTMLAudioPlugin\"}}{{/crossLink}}\r\n\t * are used (when available), although developers can change plugin priority or add new plugins (such as the\r\n\t * provided {{#crossLink \"FlashAudioPlugin\"}}{{/crossLink}}). Please see the {{#crossLink \"Sound\"}}{{/crossLink}} API\r\n\t * methods for more on the playback and plugin APIs. To install plugins, or specify a different plugin order, see\r\n\t * {{#crossLink \"Sound/installPlugins\"}}{{/crossLink}}.\r\n\t *\r\n\t *

    Example

    \r\n\t *\r\n\t * createjs.FlashAudioPlugin.swfPath = \"../src/soundjs/flashaudio\";\r\n\t * createjs.Sound.registerPlugins([createjs.WebAudioPlugin, createjs.FlashAudioPlugin]);\r\n\t * createjs.Sound.alternateExtensions = [\"mp3\"];\r\n\t * createjs.Sound.on(\"fileload\", this.loadHandler, this);\r\n\t * createjs.Sound.registerSound(\"path/to/mySound.ogg\", \"sound\");\r\n\t * function loadHandler(event) {\r\n * // This is fired for each sound that is registered.\r\n * var instance = createjs.Sound.play(\"sound\"); // play using id. Could also use full source path or event.src.\r\n * instance.on(\"complete\", this.handleComplete, this);\r\n * instance.volume = 0.5;\r\n\t * }\r\n\t *\r\n\t * The maximum number of concurrently playing instances of the same sound can be specified in the \"data\" argument\r\n\t * of {{#crossLink \"Sound/registerSound\"}}{{/crossLink}}. Note that if not specified, the active plugin will apply\r\n\t * a default limit. Currently HTMLAudioPlugin sets a default limit of 2, while WebAudioPlugin and FlashAudioPlugin set a\r\n\t * default limit of 100.\r\n\t *\r\n\t * createjs.Sound.registerSound(\"sound.mp3\", \"soundId\", 4);\r\n\t *\r\n\t * Sound can be used as a plugin with PreloadJS to help preload audio properly. Audio preloaded with PreloadJS is\r\n\t * automatically registered with the Sound class. When audio is not preloaded, Sound will do an automatic internal\r\n\t * load. As a result, it may fail to play the first time play is called if the audio is not finished loading. Use\r\n\t * the {{#crossLink \"Sound/fileload:event\"}}{{/crossLink}} event to determine when a sound has finished internally\r\n\t * preloading. It is recommended that all audio is preloaded before it is played.\r\n\t *\r\n\t * var queue = new createjs.LoadQueue();\r\n\t *\t\tqueue.installPlugin(createjs.Sound);\r\n\t *\r\n\t * Audio Sprites
    \r\n\t * SoundJS has added support for {{#crossLink \"AudioSprite\"}}{{/crossLink}}, available as of version 0.6.0.\r\n\t * For those unfamiliar with audio sprites, they are much like CSS sprites or sprite sheets: multiple audio assets\r\n\t * grouped into a single file.\r\n\t *\r\n\t *

    Example

    \r\n\t *\r\n\t *\t\tvar assetsPath = \"./assets/\";\r\n\t *\t\tvar sounds = [{\r\n\t *\t\t\tsrc:\"MyAudioSprite.ogg\", data: {\r\n\t *\t\t\t\taudioSprite: [\r\n\t *\t\t\t\t\t{id:\"sound1\", startTime:0, duration:500},\r\n\t *\t\t\t\t\t{id:\"sound2\", startTime:1000, duration:400},\r\n\t *\t\t\t\t\t{id:\"sound3\", startTime:1700, duration: 1000}\r\n\t *\t\t\t\t]}\r\n \t *\t\t\t}\r\n\t *\t\t];\r\n\t *\t\tcreatejs.Sound.alternateExtensions = [\"mp3\"];\r\n\t *\t\tcreatejs.Sound.on(\"fileload\", loadSound);\r\n\t *\t\tcreatejs.Sound.registerSounds(sounds, assetsPath);\r\n\t *\t\t// after load is complete\r\n\t *\t\tcreatejs.Sound.play(\"sound2\");\r\n\t *\r\n\t * Mobile Playback
    \r\n\t * Devices running iOS require the WebAudio context to be \"unlocked\" by playing at least one sound inside of a user-\r\n\t * initiated event (such as touch/click). Earlier versions of SoundJS included a \"MobileSafe\" sample, but this is no\r\n\t * longer necessary as of SoundJS 0.6.2.\r\n\t *
      \r\n\t *
    • \r\n\t * In SoundJS 0.4.1 and above, you can either initialize plugins or use the {{#crossLink \"WebAudioPlugin/playEmptySound\"}}{{/crossLink}}\r\n\t * method in the call stack of a user input event to manually unlock the audio context.\r\n\t *
    • \r\n\t *
    • \r\n\t * In SoundJS 0.6.2 and above, SoundJS will automatically listen for the first document-level \"mousedown\"\r\n\t * and \"touchend\" event, and unlock WebAudio. This will continue to check these events until the WebAudio\r\n\t * context becomes \"unlocked\" (changes from \"suspended\" to \"running\")\r\n\t *
    • \r\n\t *
    • \r\n\t * Both the \"mousedown\" and \"touchend\" events can be used to unlock audio in iOS9+, the \"touchstart\" event\r\n\t * will work in iOS8 and below. The \"touchend\" event will only work in iOS9 when the gesture is interpreted\r\n\t * as a \"click\", so if the user long-presses the button, it will no longer work.\r\n\t *
    • \r\n\t *
    • \r\n\t * When using the EaselJS Touch class,\r\n\t * the \"mousedown\" event will not fire when a canvas is clicked, since MouseEvents are prevented, to ensure\r\n\t * only touch events fire. To get around this, you can either rely on \"touchend\", or:\r\n\t *
        \r\n\t *
      1. Set the `allowDefault` property on the Touch class constructor to `true` (defaults to `false`).
      2. \r\n\t *
      3. Set the `preventSelection` property on the EaselJS `Stage` to `false`.
      4. \r\n\t *
      \r\n\t * These settings may change how your application behaves, and are not recommended.\r\n\t *
    • \r\n\t *
    \r\n\t *\r\n\t * Loading Alternate Paths and Extension-less Files
    \r\n\t * SoundJS supports loading alternate paths and extension-less files by passing an object instead of a string for\r\n\t * the `src` property, which is a hash using the format `{extension:\"path\", extension2:\"path2\"}`. These labels are\r\n\t * how SoundJS determines if the browser will support the sound. This also enables multiple formats to live in\r\n\t * different folders, or on CDNs, which often has completely different filenames for each file.\r\n\t *\r\n\t * Priority is determined by the property order (first property is tried first). This is supported by both internal loading\r\n\t * and loading with PreloadJS.\r\n\t *\r\n\t * Note: an id is required for playback.\r\n\t *\r\n\t *

    Example

    \r\n\t *\r\n\t *\t\tvar sounds = {path:\"./audioPath/\",\r\n\t * \t\t\t\tmanifest: [\r\n\t *\t\t\t\t{id: \"cool\", src: {mp3:\"mp3/awesome.mp3\", ogg:\"noExtensionOggFile\"}}\r\n\t *\t\t]};\r\n\t *\r\n\t *\t\tcreatejs.Sound.alternateExtensions = [\"mp3\"];\r\n\t *\t\tcreatejs.Sound.addEventListener(\"fileload\", handleLoad);\r\n\t *\t\tcreatejs.Sound.registerSounds(sounds);\r\n\t *\r\n\t *

    Known Browser and OS issues

    \r\n\t * IE 9 HTML Audio limitations
    \r\n\t *
    • There is a delay in applying volume changes to tags that occurs once playback is started. So if you have\r\n\t * muted all sounds, they will all play during this delay until the mute applies internally. This happens regardless of\r\n\t * when or how you apply the volume change, as the tag seems to need to play to apply it.
    • \r\n *
    • MP3 encoding will not always work for audio tags, particularly in Internet Explorer. We've found default\r\n\t * encoding with 64kbps works.
    • \r\n\t *
    • Occasionally very short samples will get cut off.
    • \r\n\t *
    • There is a limit to how many audio tags you can load and play at once, which appears to be determined by\r\n\t * hardware and browser settings. See {{#crossLink \"HTMLAudioPlugin.MAX_INSTANCES\"}}{{/crossLink}} for a safe\r\n\t * estimate.
    \r\n\t *\r\n\t * Firefox 25 Web Audio limitations\r\n\t *
    • mp3 audio files do not load properly on all windows machines, reported\r\n\t * here.
      \r\n\t * For this reason it is recommended to pass another FF supported type (ie ogg) first until this bug is resolved, if\r\n\t * possible.
    \r\n\r\n\t * Safari limitations
    \r\n\t *
    • Safari requires Quicktime to be installed for audio playback.
    \r\n\t *\r\n\t * iOS 6 Web Audio limitations
    \r\n\t *
    • Sound is initially locked, and must be unlocked via a user-initiated event. Please see the section on\r\n\t * Mobile Playback above.
    • \r\n\t *
    • A bug exists that will distort un-cached web audio when a video element is present in the DOM that has audio\r\n\t * at a different sampleRate.
    • \r\n\t *
    \r\n\t *\r\n\t * Android HTML Audio limitations
    \r\n\t *
    • We have no control over audio volume. Only the user can set volume on their device.
    • \r\n\t *
    • We can only play audio inside a user event (touch/click). This currently means you cannot loop sound or use\r\n\t * a delay.
    \r\n\t *\r\n\t * Web Audio and PreloadJS
    \r\n\t *
    • Web Audio must be loaded through XHR, therefore when used with PreloadJS, tag loading is not possible.\r\n\t * This means that tag loading can not be used to avoid cross domain issues.
      • \r\n\t *\r\n\t * @class Sound\r\n\t * @static\r\n\t * @uses EventDispatcher\r\n\t */\r\n\tfunction Sound() {\r\n\t\tthrow \"Sound cannot be instantiated\";\r\n\t}\r\n\r\n\tvar s = Sound;\r\n\r\n\r\n// Static Properties\r\n\t/**\r\n\t * The interrupt value to interrupt any currently playing instance with the same source, if the maximum number of\r\n\t * instances of the sound are already playing.\r\n\t * @property INTERRUPT_ANY\r\n\t * @type {String}\r\n\t * @default any\r\n\t * @static\r\n\t */\r\n\ts.INTERRUPT_ANY = \"any\";\r\n\r\n\t/**\r\n\t * The interrupt value to interrupt the earliest currently playing instance with the same source that progressed the\r\n\t * least distance in the audio track, if the maximum number of instances of the sound are already playing.\r\n\t * @property INTERRUPT_EARLY\r\n\t * @type {String}\r\n\t * @default early\r\n\t * @static\r\n\t */\r\n\ts.INTERRUPT_EARLY = \"early\";\r\n\r\n\t/**\r\n\t * The interrupt value to interrupt the currently playing instance with the same source that progressed the most\r\n\t * distance in the audio track, if the maximum number of instances of the sound are already playing.\r\n\t * @property INTERRUPT_LATE\r\n\t * @type {String}\r\n\t * @default late\r\n\t * @static\r\n\t */\r\n\ts.INTERRUPT_LATE = \"late\";\r\n\r\n\t/**\r\n\t * The interrupt value to not interrupt any currently playing instances with the same source, if the maximum number of\r\n\t * instances of the sound are already playing.\r\n\t * @property INTERRUPT_NONE\r\n\t * @type {String}\r\n\t * @default none\r\n\t * @static\r\n\t */\r\n\ts.INTERRUPT_NONE = \"none\";\r\n\r\n\t/**\r\n\t * Defines the playState of an instance that is still initializing.\r\n\t * @property PLAY_INITED\r\n\t * @type {String}\r\n\t * @default playInited\r\n\t * @static\r\n\t */\r\n\ts.PLAY_INITED = \"playInited\";\r\n\r\n\t/**\r\n\t * Defines the playState of an instance that is currently playing or paused.\r\n\t * @property PLAY_SUCCEEDED\r\n\t * @type {String}\r\n\t * @default playSucceeded\r\n\t * @static\r\n\t */\r\n\ts.PLAY_SUCCEEDED = \"playSucceeded\";\r\n\r\n\t/**\r\n\t * Defines the playState of an instance that was interrupted by another instance.\r\n\t * @property PLAY_INTERRUPTED\r\n\t * @type {String}\r\n\t * @default playInterrupted\r\n\t * @static\r\n\t */\r\n\ts.PLAY_INTERRUPTED = \"playInterrupted\";\r\n\r\n\t/**\r\n\t * Defines the playState of an instance that completed playback.\r\n\t * @property PLAY_FINISHED\r\n\t * @type {String}\r\n\t * @default playFinished\r\n\t * @static\r\n\t */\r\n\ts.PLAY_FINISHED = \"playFinished\";\r\n\r\n\t/**\r\n\t * Defines the playState of an instance that failed to play. This is usually caused by a lack of available channels\r\n\t * when the interrupt mode was \"INTERRUPT_NONE\", the playback stalled, or the sound could not be found.\r\n\t * @property PLAY_FAILED\r\n\t * @type {String}\r\n\t * @default playFailed\r\n\t * @static\r\n\t */\r\n\ts.PLAY_FAILED = \"playFailed\";\r\n\r\n\t/**\r\n\t * A list of the default supported extensions that Sound will try to play. Plugins will check if the browser\r\n\t * can play these types, so modifying this list before a plugin is initialized will allow the plugins to try to\r\n\t * support additional media types.\r\n\t *\r\n\t * NOTE this does not currently work for {{#crossLink \"FlashAudioPlugin\"}}{{/crossLink}}.\r\n\t *\r\n\t * More details on file formats can be found at http://en.wikipedia.org/wiki/Audio_file_format.
        \r\n\t * A very detailed list of file formats can be found at http://www.fileinfo.com/filetypes/audio.\r\n\t * @property SUPPORTED_EXTENSIONS\r\n\t * @type {Array[String]}\r\n\t * @default [\"mp3\", \"ogg\", \"opus\", \"mpeg\", \"wav\", \"m4a\", \"mp4\", \"aiff\", \"wma\", \"mid\"]\r\n\t * @since 0.4.0\r\n\t * @static\r\n\t */\r\n\ts.SUPPORTED_EXTENSIONS = [\"mp3\", \"ogg\", \"opus\", \"mpeg\", \"wav\", \"m4a\", \"mp4\", \"aiff\", \"wma\", \"mid\"];\r\n\r\n\t/**\r\n\t * Some extensions use another type of extension support to play (one of them is a codex). This allows you to map\r\n\t * that support so plugins can accurately determine if an extension is supported. Adding to this list can help\r\n\t * plugins determine more accurately if an extension is supported.\r\n\t *\r\n \t * A useful list of extensions for each format can be found at http://html5doctor.com/html5-audio-the-state-of-play/.\r\n\t * @property EXTENSION_MAP\r\n\t * @type {Object}\r\n\t * @since 0.4.0\r\n\t * @default {m4a:\"mp4\"}\r\n\t * @static\r\n\t */\r\n\ts.EXTENSION_MAP = {\r\n\t\tm4a:\"mp4\"\r\n\t};\r\n\r\n\t/**\r\n\t * The RegExp pattern used to parse file URIs. This supports simple file names, as well as full domain URIs with\r\n\t * query strings. The resulting match is: protocol:$1 domain:$2 path:$3 file:$4 extension:$5 query:$6.\r\n\t * @property FILE_PATTERN\r\n\t * @type {RegExp}\r\n\t * @static\r\n\t * @private\r\n\t */\r\n\ts.FILE_PATTERN = /^(?:(\\w+:)\\/{2}(\\w+(?:\\.\\w+)*\\/?))?([/.]*?(?:[^?]+)?\\/)?((?:[^/?]+)\\.(\\w+))(?:\\?(\\S+)?)?$/;\r\n\r\n\r\n// Class Public properties\r\n\t/**\r\n\t * Determines the default behavior for interrupting other currently playing instances with the same source, if the\r\n\t * maximum number of instances of the sound are already playing. Currently the default is {{#crossLink \"Sound/INTERRUPT_NONE:property\"}}{{/crossLink}}\r\n\t * but this can be set and will change playback behavior accordingly. This is only used when {{#crossLink \"Sound/play\"}}{{/crossLink}}\r\n\t * is called without passing a value for interrupt.\r\n\t * @property defaultInterruptBehavior\r\n\t * @type {String}\r\n\t * @default Sound.INTERRUPT_NONE, or \"none\"\r\n\t * @static\r\n\t * @since 0.4.0\r\n\t */\r\n\ts.defaultInterruptBehavior = s.INTERRUPT_NONE; // OJR does s.INTERRUPT_ANY make more sense as default? Needs game dev testing to see which case makes more sense.\r\n\r\n\t/**\r\n\t * An array of extensions to attempt to use when loading sound, if the default is unsupported by the active plugin.\r\n\t * These are applied in order, so if you try to Load Thunder.ogg in a browser that does not support ogg, and your\r\n\t * extensions array is [\"mp3\", \"m4a\", \"wav\"] it will check mp3 support, then m4a, then wav. The audio files need\r\n\t * to exist in the same location, as only the extension is altered.\r\n\t *\r\n\t * Note that regardless of which file is loaded, you can call {{#crossLink \"Sound/createInstance\"}}{{/crossLink}}\r\n\t * and {{#crossLink \"Sound/play\"}}{{/crossLink}} using the same id or full source path passed for loading.\r\n\t *\r\n\t *

        Example

        \r\n\t *\r\n\t *\tvar sounds = [\r\n\t *\t\t{src:\"myPath/mySound.ogg\", id:\"example\"},\r\n\t *\t];\r\n\t *\tcreatejs.Sound.alternateExtensions = [\"mp3\"]; // now if ogg is not supported, SoundJS will try asset0.mp3\r\n\t *\tcreatejs.Sound.on(\"fileload\", handleLoad); // call handleLoad when each sound loads\r\n\t *\tcreatejs.Sound.registerSounds(sounds, assetPath);\r\n\t *\t// ...\r\n\t *\tcreatejs.Sound.play(\"myPath/mySound.ogg\"); // works regardless of what extension is supported. Note calling with ID is a better approach\r\n\t *\r\n\t * @property alternateExtensions\r\n\t * @type {Array}\r\n\t * @since 0.5.2\r\n\t * @static\r\n\t */\r\n\ts.alternateExtensions = [];\r\n\r\n\t/**\r\n\t * The currently active plugin. If this is null, then no plugin could be initialized. If no plugin was specified,\r\n\t * Sound attempts to apply the default plugins: {{#crossLink \"WebAudioPlugin\"}}{{/crossLink}}, followed by\r\n\t * {{#crossLink \"HTMLAudioPlugin\"}}{{/crossLink}}.\r\n\t * @property activePlugin\r\n\t * @type {Object}\r\n\t * @static\r\n\t */\r\n s.activePlugin = null;\r\n\r\n\r\n// class getter / setter properties\r\n\r\n\t/**\r\n\t * Set the master volume of Sound. The master volume is multiplied against each sound's individual volume. For\r\n\t * example, if master volume is 0.5 and a sound's volume is 0.5, the resulting volume is 0.25. To set individual\r\n\t * sound volume, use AbstractSoundInstance {{#crossLink \"AbstractSoundInstance/volume:property\"}}{{/crossLink}}\r\n\t * instead.\r\n\t *\r\n\t *

        Example

        \r\n\t *\r\n\t * createjs.Sound.volume = 0.5;\r\n\t *\r\n\t * @property volume\r\n\t * @type {Number}\r\n\t * @default 1\r\n\t * @since 0.6.1\r\n\t */\r\n\r\n\t/**\r\n\t * The internal volume level. Use {{#crossLink \"Sound/volume:property\"}}{{/crossLink}} to adjust the master volume.\r\n\t * @property _masterVolume\r\n\t * @type {number}\r\n\t * @default 1\r\n\t * @private\r\n\t */\r\n\ts._masterVolume = 1;\r\n\r\n\t/**\r\n\t * Use the {{#crossLink \"Sound/volume:property\"}}{{/crossLink}} property instead.\r\n\t * @method _getMasterVolume\r\n\t * @private\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\ts._getMasterVolume = function() {\r\n\t\treturn this._masterVolume;\r\n\t};\r\n\t// Sound.getMasterVolume is @deprecated. Remove for 1.1+\r\n\ts.getVolume = createjs.deprecate(s._getMasterVolume, \"Sound.getVolume\");\r\n\t/**\r\n\t * Use the {{#crossLink \"Sound/volume:property\"}}{{/crossLink}} property instead.\r\n\t * @method _setMasterVolume\r\n\t * @static\r\n\t * @private\r\n\t **/\r\n\ts._setMasterVolume = function(value) {\r\n\t\tif (Number(value) == null) { return; }\r\n\t\tvalue = Math.max(0, Math.min(1, value));\r\n\t\ts._masterVolume = value;\r\n\t\tif (!this.activePlugin || !this.activePlugin.setVolume || !this.activePlugin.setVolume(value)) {\r\n\t\t\tvar instances = this._instances;\r\n\t\t\tfor (var i = 0, l = instances.length; i < l; i++) {\r\n\t\t\t\tinstances[i].setMasterVolume(value);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t// Sound.stMasterVolume is @deprecated. Remove for 1.1+\r\n\ts.setVolume = createjs.deprecate(s._setMasterVolume, \"Sound.setVolume\");\r\n\r\n\t/**\r\n\t * Mute/Unmute all audio. Note that muted audio still plays at 0 volume. This global mute value is maintained\r\n\t * separately and when set will override, but not change the mute property of individual instances. To mute an individual\r\n\t * instance, use AbstractSoundInstance {{#crossLink \"AbstractSoundInstance/muted:property\"}}{{/crossLink}} instead.\r\n\t *\r\n\t *

        Example

        \r\n\t *\r\n\t * createjs.Sound.muted = true;\r\n\t *\r\n\t *\r\n\t * @property muted\r\n\t * @type {Boolean}\r\n\t * @default false\r\n\t * @since 0.6.1\r\n\t */\r\n\ts._masterMute = false;\r\n\r\n\t/**\r\n\t * Use the {{#crossLink \"Sound/muted:property\"}}{{/crossLink}} property instead.\r\n\t * @method _getMute\r\n\t * @returns {Boolean}\r\n\t * @static\r\n\t * @private\r\n\t */\r\n\ts._getMute = function () {\r\n\t\treturn this._masterMute;\r\n\t};\r\n\t// Sound.getMute is @deprecated. Remove for 1.1+\r\n\ts.getMute = createjs.deprecate(s._getMute, \"Sound.getMute\");\r\n\r\n\t/**\r\n\t * Use the {{#crossLink \"Sound/muted:property\"}}{{/crossLink}} property instead.\r\n\t * @method _setMute\r\n\t * @param {Boolean} value The muted value\r\n\t * @static\r\n\t * @private\r\n\t */\r\n\ts._setMute = function (value) {\r\n\t\tif (value == null) { return; }\r\n\t\tthis._masterMute = value;\r\n\t\tif (!this.activePlugin || !this.activePlugin.setMute || !this.activePlugin.setMute(value)) {\r\n\t\t\tvar instances = this._instances;\r\n\t\t\tfor (var i = 0, l = instances.length; i < l; i++) {\r\n\t\t\t\tinstances[i].setMasterMute(value);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t// Sound.setMute is @deprecated. Remove for 1.1+\r\n\ts.setMute = createjs.deprecate(s._setMute, \"Sound.setMute\");\r\n\r\n\t/**\r\n\t * Get the active plugins capabilities, which help determine if a plugin can be used in the current environment,\r\n\t * or if the plugin supports a specific feature. Capabilities include:\r\n\t *
          \r\n\t *
        • panning: If the plugin can pan audio from left to right
        • \r\n\t *
        • volume; If the plugin can control audio volume.
        • \r\n\t *
        • tracks: The maximum number of audio tracks that can be played back at a time. This will be -1\r\n\t * if there is no known limit.
        • \r\n\t *
          An entry for each file type in {{#crossLink \"Sound/SUPPORTED_EXTENSIONS:property\"}}{{/crossLink}}:\r\n\t *
        • mp3: If MP3 audio is supported.
        • \r\n\t *
        • ogg: If OGG audio is supported.
        • \r\n\t *
        • wav: If WAV audio is supported.
        • \r\n\t *
        • mpeg: If MPEG audio is supported.
        • \r\n\t *
        • m4a: If M4A audio is supported.
        • \r\n\t *
        • mp4: If MP4 audio is supported.
        • \r\n\t *
        • aiff: If aiff audio is supported.
        • \r\n\t *
        • wma: If wma audio is supported.
        • \r\n\t *
        • mid: If mid audio is supported.
        • \r\n\t *
        \r\n\t *\r\n\t * You can get a specific capability of the active plugin using standard object notation\r\n\t *\r\n\t *

        Example

        \r\n\t *\r\n\t * var mp3 = createjs.Sound.capabilities.mp3;\r\n\t *\r\n\t * Note this property is read only.\r\n\t *\r\n\t * @property capabilities\r\n\t * @type {Object}\r\n\t * @static\r\n\t * @readOnly\r\n\t * @since 0.6.1\r\n\t */\r\n\r\n\t/**\r\n\t * Use the {{#crossLink \"Sound/capabilities:property\"}}{{/crossLink}} property instead.\r\n\t * @returns {null}\r\n\t * @private\r\n\t */\r\n\ts._getCapabilities = function() {\r\n\t\tif (s.activePlugin == null) { return null; }\r\n\t\treturn s.activePlugin._capabilities;\r\n\t};\r\n\t// Sound.getCapabilities is @deprecated. Remove for 1.1+\r\n\ts.getCapabilities = createjs.deprecate(s._getCapabilities, \"Sound.getCapabilities\");\r\n\r\n\tObject.defineProperties(s, {\r\n\t\tvolume: { get: s._getMasterVolume, set: s._setMasterVolume },\r\n\t\tmuted: { get: s._getMute, set: s._setMute },\r\n\t\tcapabilities: { get: s._getCapabilities }\r\n\t});\r\n\r\n\r\n// Class Private properties\r\n\t/**\r\n\t * Determines if the plugins have been registered. If false, the first call to {{#crossLink \"play\"}}{{/crossLink}} will instantiate the default\r\n\t * plugins ({{#crossLink \"WebAudioPlugin\"}}{{/crossLink}}, followed by {{#crossLink \"HTMLAudioPlugin\"}}{{/crossLink}}).\r\n\t * If plugins have been registered, but none are applicable, then sound playback will fail.\r\n\t * @property _pluginsRegistered\r\n\t * @type {Boolean}\r\n\t * @default false\r\n\t * @static\r\n\t * @private\r\n\t */\r\n\ts._pluginsRegistered = false;\r\n\r\n\t/**\r\n\t * Used internally to assign unique IDs to each AbstractSoundInstance.\r\n\t * @property _lastID\r\n\t * @type {Number}\r\n\t * @static\r\n\t * @private\r\n\t */\r\n\ts._lastID = 0;\r\n\r\n\t/**\r\n\t * An array containing all currently playing instances. This allows Sound to control the volume, mute, and playback of\r\n\t * all instances when using static APIs like {{#crossLink \"Sound/stop\"}}{{/crossLink}} and {{#crossLink \"Sound/volume:property\"}}{{/crossLink}}.\r\n\t * When an instance has finished playback, it gets removed via the {{#crossLink \"Sound/finishedPlaying\"}}{{/crossLink}}\r\n\t * method. If the user replays an instance, it gets added back in via the {{#crossLink \"Sound/_beginPlaying\"}}{{/crossLink}}\r\n\t * method.\r\n\t * @property _instances\r\n\t * @type {Array}\r\n\t * @private\r\n\t * @static\r\n\t */\r\n\ts._instances = [];\r\n\r\n\t/**\r\n\t * An object hash storing objects with sound sources, startTime, and duration via there corresponding ID.\r\n\t * @property _idHash\r\n\t * @type {Object}\r\n\t * @private\r\n\t * @static\r\n\t */\r\n\ts._idHash = {};\r\n\r\n\t/**\r\n\t * An object hash that stores preloading sound sources via the parsed source that is passed to the plugin. Contains the\r\n\t * source, id, and data that was passed in by the user. Parsed sources can contain multiple instances of source, id,\r\n\t * and data.\r\n\t * @property _preloadHash\r\n\t * @type {Object}\r\n\t * @private\r\n\t * @static\r\n\t */\r\n\ts._preloadHash = {};\r\n\r\n\t/**\r\n\t * An object hash storing {{#crossLink \"PlayPropsConfig\"}}{{/crossLink}} via the parsed source that is passed as defaultPlayProps in\r\n\t * {{#crossLink \"Sound/registerSound\"}}{{/crossLink}} and {{#crossLink \"Sound/registerSounds\"}}{{/crossLink}}.\r\n\t * @property _defaultPlayPropsHash\r\n\t * @type {Object}\r\n\t * @private\r\n\t * @static\r\n\t * @since 0.6.1\r\n\t */\r\n\ts._defaultPlayPropsHash = {};\r\n\r\n\r\n// EventDispatcher methods:\r\n\ts.addEventListener = null;\r\n\ts.removeEventListener = null;\r\n\ts.removeAllEventListeners = null;\r\n\ts.dispatchEvent = null;\r\n\ts.hasEventListener = null;\r\n\ts._listeners = null;\r\n\r\n\tcreatejs.EventDispatcher.initialize(s); // inject EventDispatcher methods.\r\n\r\n\r\n// Events\r\n\t/**\r\n\t * This event is fired when a file finishes loading internally. This event is fired for each loaded sound,\r\n\t * so any handler methods should look up the event.src to handle a particular sound.\r\n\t * @event fileload\r\n\t * @param {Object} target The object that dispatched the event.\r\n\t * @param {String} type The event type.\r\n\t * @param {String} src The source of the sound that was loaded.\r\n\t * @param {String} [id] The id passed in when the sound was registered. If one was not provided, it will be null.\r\n\t * @param {Number|Object} [data] Any additional data associated with the item. If not provided, it will be undefined.\r\n\t * @since 0.4.1\r\n\t */\r\n\r\n\t/**\r\n\t * This event is fired when a file fails loading internally. This event is fired for each loaded sound,\r\n\t * so any handler methods should look up the event.src to handle a particular sound.\r\n\t * @event fileerror\r\n\t * @param {Object} target The object that dispatched the event.\r\n\t * @param {String} type The event type.\r\n\t * @param {String} src The source of the sound that was loaded.\r\n\t * @param {String} [id] The id passed in when the sound was registered. If one was not provided, it will be null.\r\n\t * @param {Number|Object} [data] Any additional data associated with the item. If not provided, it will be undefined.\r\n\t * @since 0.6.0\r\n\t */\r\n\r\n\r\n// Class Public Methods\r\n\t/**\r\n\t * Get the preload rules to allow Sound to be used as a plugin by PreloadJS.\r\n\t * Any load calls that have the matching type or extension will fire the callback method, and use the resulting\r\n\t * object, which is potentially modified by Sound. This helps when determining the correct path, as well as\r\n\t * registering the audio instance(s) with Sound. This method should not be called, except by PreloadJS.\r\n\t * @method getPreloadHandlers\r\n\t * @return {Object} An object containing:\r\n\t *
        • callback: A preload callback that is fired when a file is added to PreloadJS, which provides\r\n\t * Sound a mechanism to modify the load parameters, select the correct file format, register the sound, etc.
        • \r\n\t *
        • types: A list of file types that are supported by Sound (currently supports \"sound\").
        • \r\n\t *
        • extensions: A list of file extensions that are supported by Sound (see {{#crossLink \"Sound/SUPPORTED_EXTENSIONS:property\"}}{{/crossLink}}).
        \r\n\t * @static\r\n\t * @private\r\n\t */\r\n\ts.getPreloadHandlers = function () {\r\n\t\treturn {\r\n\t\t\tcallback:createjs.proxy(s.initLoad, s),\r\n\t\t\ttypes:[\"sound\"],\r\n\t\t\textensions:s.SUPPORTED_EXTENSIONS\r\n\t\t};\r\n\t};\r\n\r\n\t/**\r\n\t * Used to dispatch fileload events from internal loading.\r\n\t * @method _handleLoadComplete\r\n\t * @param event A loader event.\r\n\t * @private\r\n\t * @static\r\n\t * @since 0.6.0\r\n\t */\r\n\ts._handleLoadComplete = function(event) {\r\n\t\tvar src = event.target.getItem().src;\r\n\t\tif (!s._preloadHash[src]) {return;}\r\n\r\n\t\tfor (var i = 0, l = s._preloadHash[src].length; i < l; i++) {\r\n\t\t\tvar item = s._preloadHash[src][i];\r\n\t\t\ts._preloadHash[src][i] = true;\r\n\r\n\t\t\tif (!s.hasEventListener(\"fileload\")) { continue; }\r\n\r\n\t\t\tvar event = new createjs.Event(\"fileload\");\r\n\t\t\tevent.src = item.src;\r\n\t\t\tevent.id = item.id;\r\n\t\t\tevent.data = item.data;\r\n\t\t\tevent.sprite = item.sprite;\r\n\r\n\t\t\ts.dispatchEvent(event);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Used to dispatch error events from internal preloading.\r\n\t * @param event\r\n\t * @private\r\n\t * @since 0.6.0\r\n\t * @static\r\n\t */\r\n\ts._handleLoadError = function(event) {\r\n\t\tvar src = event.target.getItem().src;\r\n\t\tif (!s._preloadHash[src]) {return;}\r\n\r\n\t\tfor (var i = 0, l = s._preloadHash[src].length; i < l; i++) {\r\n\t\t\tvar item = s._preloadHash[src][i];\r\n\t\t\ts._preloadHash[src][i] = false;\r\n\r\n\t\t\tif (!s.hasEventListener(\"fileerror\")) { continue; }\r\n\r\n\t\t\tvar event = new createjs.Event(\"fileerror\");\r\n\t\t\tevent.src = item.src;\r\n\t\t\tevent.id = item.id;\r\n\t\t\tevent.data = item.data;\r\n\t\t\tevent.sprite = item.sprite;\r\n\r\n\t\t\ts.dispatchEvent(event);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Used by {{#crossLink \"Sound/registerPlugins\"}}{{/crossLink}} to register a Sound plugin.\r\n\t *\r\n\t * @method _registerPlugin\r\n\t * @param {Object} plugin The plugin class to install.\r\n\t * @return {Boolean} Whether the plugin was successfully initialized.\r\n\t * @static\r\n\t * @private\r\n\t */\r\n\ts._registerPlugin = function (plugin) {\r\n\t\t// Note: Each plugin is passed in as a class reference, but we store the activePlugin as an instance\r\n\t\tif (plugin.isSupported()) {\r\n\t\t\ts.activePlugin = new plugin();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\t/**\r\n\t * Register a list of Sound plugins, in order of precedence. To register a single plugin, pass a single element in the array.\r\n\t *\r\n\t *

        Example

        \r\n\t *\r\n\t * createjs.FlashAudioPlugin.swfPath = \"../src/soundjs/flashaudio/\";\r\n\t * createjs.Sound.registerPlugins([createjs.WebAudioPlugin, createjs.HTMLAudioPlugin, createjs.FlashAudioPlugin]);\r\n\t *\r\n\t * @method registerPlugins\r\n\t * @param {Array} plugins An array of plugins classes to install.\r\n\t * @return {Boolean} Whether a plugin was successfully initialized.\r\n\t * @static\r\n\t */\r\n\ts.registerPlugins = function (plugins) {\r\n\t\ts._pluginsRegistered = true;\r\n\t\tfor (var i = 0, l = plugins.length; i < l; i++) {\r\n\t\t\tif (s._registerPlugin(plugins[i])) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\t/**\r\n\t * Initialize the default plugins. This method is automatically called when any audio is played or registered before\r\n\t * the user has manually registered plugins, and enables Sound to work without manual plugin setup. Currently, the\r\n\t * default plugins are {{#crossLink \"WebAudioPlugin\"}}{{/crossLink}} followed by {{#crossLink \"HTMLAudioPlugin\"}}{{/crossLink}}.\r\n\t *\r\n\t *

        Example

        \r\n\t *\r\n\t * \tif (!createjs.initializeDefaultPlugins()) { return; }\r\n\t *\r\n\t * @method initializeDefaultPlugins\r\n\t * @returns {Boolean} True if a plugin was initialized, false otherwise.\r\n\t * @since 0.4.0\r\n\t * @static\r\n\t */\r\n\ts.initializeDefaultPlugins = function () {\r\n\t\tif (s.activePlugin != null) {return true;}\r\n\t\tif (s._pluginsRegistered) {return false;}\r\n\t\tif (s.registerPlugins([createjs.WebAudioPlugin, createjs.HTMLAudioPlugin])) {return true;}\r\n\t\treturn false;\r\n\t};\r\n\r\n\t/**\r\n\t * Determines if Sound has been initialized, and a plugin has been activated.\r\n\t *\r\n\t *

        Example

        \r\n\t * This example sets up a Flash fallback, but only if there is no plugin specified yet.\r\n\t *\r\n\t * \tif (!createjs.Sound.isReady()) {\r\n\t *\t\tcreatejs.FlashAudioPlugin.swfPath = \"../src/soundjs/flashaudio/\";\r\n\t * \t\tcreatejs.Sound.registerPlugins([createjs.WebAudioPlugin, createjs.HTMLAudioPlugin, createjs.FlashAudioPlugin]);\r\n\t *\t}\r\n\t *\r\n\t * @method isReady\r\n\t * @return {Boolean} If Sound has initialized a plugin.\r\n\t * @static\r\n\t */\r\n\ts.isReady = function () {\r\n\t\treturn (s.activePlugin != null);\r\n\t};\r\n\r\n\t/**\r\n\t * Process manifest items from PreloadJS. This method is intended\r\n\t * for usage by a plugin, and not for direct interaction.\r\n\t * @method initLoad\r\n\t * @param {Object} src The object to load.\r\n\t * @return {Object|AbstractLoader} An instance of AbstractLoader.\r\n\t * @private\r\n\t * @static\r\n\t */\r\n\ts.initLoad = function (loadItem) {\r\n\t\tif (loadItem.type == \"video\") { return true; } // Don't handle video. PreloadJS's plugin model is really aggressive.\r\n\t\treturn s._registerSound(loadItem);\r\n\t};\r\n\r\n\t/**\r\n\t * Internal method for loading sounds. This should not be called directly.\r\n\t *\r\n\t * @method _registerSound\r\n\t * @param {Object} src The object to load, containing src property and optionally containing id and data.\r\n\t * @return {Object} An object with the modified values that were passed in, which defines the sound.\r\n\t * Returns false if the source cannot be parsed or no plugins can be initialized.\r\n\t * Returns true if the source is already loaded.\r\n\t * @static\r\n\t * @private\r\n\t * @since 0.6.0\r\n\t */\r\n\r\n\ts._registerSound = function (loadItem) {\r\n\t\tif (!s.initializeDefaultPlugins()) {return false;}\r\n\r\n\t\tvar details;\r\n\t\tif (loadItem.src instanceof Object) {\r\n\t\t\tdetails = s._parseSrc(loadItem.src);\r\n\t\t\tdetails.src = loadItem.path + details.src;\r\n\t\t} else {\r\n\t\t\tdetails = s._parsePath(loadItem.src);\r\n\t\t}\r\n\t\tif (details == null) {return false;}\r\n\t\tloadItem.src = details.src;\r\n\t\tloadItem.type = \"sound\";\r\n\r\n\t\tvar data = loadItem.data;\r\n\t\tvar numChannels = null;\r\n\t\tif (data != null) {\r\n\t\t\tif (!isNaN(data.channels)) {\r\n\t\t\t\tnumChannels = parseInt(data.channels);\r\n\t\t\t} else if (!isNaN(data)) {\r\n\t\t\t\tnumChannels = parseInt(data);\r\n\t\t\t}\r\n\r\n\t\t\tif(data.audioSprite) {\r\n\t\t\t\tvar sp;\r\n\t\t\t\tfor(var i = data.audioSprite.length; i--; ) {\r\n\t\t\t\t\tsp = data.audioSprite[i];\r\n\t\t\t\t\ts._idHash[sp.id] = {src: loadItem.src, startTime: parseInt(sp.startTime), duration: parseInt(sp.duration)};\r\n\r\n\t\t\t\t\tif (sp.defaultPlayProps) {\r\n\t\t\t\t\t\ts._defaultPlayPropsHash[sp.id] = createjs.PlayPropsConfig.create(sp.defaultPlayProps);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (loadItem.id != null) {s._idHash[loadItem.id] = {src: loadItem.src}};\r\n\t\tvar loader = s.activePlugin.register(loadItem);\r\n\r\n\t\tSoundChannel.create(loadItem.src, numChannels);\r\n\r\n\t\t// return the number of instances to the user. This will also be returned in the load event.\r\n\t\tif (data == null || !isNaN(data)) {\r\n\t\t\tloadItem.data = numChannels || SoundChannel.maxPerChannel();\r\n\t\t} else {\r\n\t\t\tloadItem.data.channels = numChannels || SoundChannel.maxPerChannel();\r\n\t\t}\r\n\r\n\t\tif (loader.type) {loadItem.type = loader.type;}\r\n\r\n\t\tif (loadItem.defaultPlayProps) {\r\n\t\t\ts._defaultPlayPropsHash[loadItem.src] = createjs.PlayPropsConfig.create(loadItem.defaultPlayProps);\r\n\t\t}\r\n\t\treturn loader;\r\n\t};\r\n\r\n\t/**\r\n\t * Register an audio file for loading and future playback in Sound. This is automatically called when using\r\n\t * PreloadJS. It is recommended to register all sounds that\r\n\t * need to be played back in order to properly prepare and preload them. Sound does internal preloading when required.\r\n\t *\r\n\t *

        Example

        \r\n\t *\r\n\t * createjs.Sound.alternateExtensions = [\"mp3\"];\r\n\t * createjs.Sound.on(\"fileload\", handleLoad); // add an event listener for when load is completed\r\n\t * createjs.Sound.registerSound(\"myAudioPath/mySound.ogg\", \"myID\", 3);\r\n\t * createjs.Sound.registerSound({ogg:\"path1/mySound.ogg\", mp3:\"path2/mySoundNoExtension\"}, \"myID\", 3);\r\n\t *\r\n\t *\r\n\t * @method registerSound\r\n\t * @param {String | Object} src The source or an Object with a \"src\" property or an Object with multiple extension labeled src properties.\r\n\t * @param {String} [id] An id specified by the user to play the sound later. Note id is required for when src is multiple extension labeled src properties.\r\n\t * @param {Number | Object} [data] Data associated with the item. Sound uses the data parameter as the number of\r\n\t * channels for an audio instance, however a \"channels\" property can be appended to the data object if it is used\r\n\t * for other information. The audio channels will set a default based on plugin if no value is found.\r\n\t * Sound also uses the data property to hold an {{#crossLink \"AudioSprite\"}}{{/crossLink}} array of objects in the following format {id, startTime, duration}.
        \r\n\t * id used to play the sound later, in the same manner as a sound src with an id.
        \r\n\t * startTime is the initial offset to start playback and loop from, in milliseconds.
        \r\n\t * duration is the amount of time to play the clip for, in milliseconds.
        \r\n\t * This allows Sound to support audio sprites that are played back by id.\r\n\t * @param {string} basePath Set a path that will be prepended to src for loading.\r\n\t * @param {Object | PlayPropsConfig} defaultPlayProps Optional Playback properties that will be set as the defaults on any new AbstractSoundInstance.\r\n\t * See {{#crossLink \"PlayPropsConfig\"}}{{/crossLink}} for options.\r\n\t * @return {Object} An object with the modified values that were passed in, which defines the sound.\r\n\t * Returns false if the source cannot be parsed or no plugins can be initialized.\r\n\t * Returns true if the source is already loaded.\r\n\t * @static\r\n\t * @since 0.4.0\r\n\t */\r\n\ts.registerSound = function (src, id, data, basePath, defaultPlayProps) {\r\n\t\tvar loadItem = {src: src, id: id, data:data, defaultPlayProps:defaultPlayProps};\r\n\t\tif (src instanceof Object && src.src) {\r\n\t\t\tbasePath = id;\r\n\t\t\tloadItem = src;\r\n\t\t}\r\n\t\tloadItem = createjs.LoadItem.create(loadItem);\r\n\t\tloadItem.path = basePath;\r\n\r\n\t\tif (basePath != null && !(loadItem.src instanceof Object)) {loadItem.src = basePath + loadItem.src;}\r\n\r\n\t\tvar loader = s._registerSound(loadItem);\r\n\t\tif(!loader) {return false;}\r\n\r\n\t\tif (!s._preloadHash[loadItem.src]) { s._preloadHash[loadItem.src] = [];}\r\n\t\ts._preloadHash[loadItem.src].push(loadItem);\r\n\t\tif (s._preloadHash[loadItem.src].length == 1) {\r\n\t\t\t// OJR note this will disallow reloading a sound if loading fails or the source changes\r\n\t\t\tloader.on(\"complete\", this._handleLoadComplete, this);\r\n\t\t\tloader.on(\"error\", this._handleLoadError, this);\r\n\t\t\ts.activePlugin.preload(loader);\r\n\t\t} else {\r\n\t\t\tif (s._preloadHash[loadItem.src][0] == true) {return true;}\r\n\t\t}\r\n\r\n\t\treturn loadItem;\r\n\t};\r\n\r\n\t/**\r\n\t * Register an array of audio files for loading and future playback in Sound. It is recommended to register all\r\n\t * sounds that need to be played back in order to properly prepare and preload them. Sound does internal preloading\r\n\t * when required.\r\n\t *\r\n\t *

        Example

        \r\n\t *\r\n\t * \t\tvar assetPath = \"./myAudioPath/\";\r\n\t * var sounds = [\r\n\t * {src:\"asset0.ogg\", id:\"example\"},\r\n\t * {src:\"asset1.ogg\", id:\"1\", data:6},\r\n\t * {src:\"asset2.mp3\", id:\"works\"}\r\n\t * {src:{mp3:\"path1/asset3.mp3\", ogg:\"path2/asset3NoExtension\"}, id:\"better\"}\r\n\t * ];\r\n\t * createjs.Sound.alternateExtensions = [\"mp3\"];\t// if the passed extension is not supported, try this extension\r\n\t * createjs.Sound.on(\"fileload\", handleLoad); // call handleLoad when each sound loads\r\n\t * createjs.Sound.registerSounds(sounds, assetPath);\r\n\t *\r\n\t * @method registerSounds\r\n\t * @param {Array} sounds An array of objects to load. Objects are expected to be in the format needed for\r\n\t * {{#crossLink \"Sound/registerSound\"}}{{/crossLink}}: {src:srcURI, id:ID, data:Data}\r\n\t * with \"id\" and \"data\" being optional.\r\n\t * You can also pass an object with path and manifest properties, where path is a basePath and manifest is an array of objects to load.\r\n\t * Note id is required if src is an object with extension labeled src properties.\r\n\t * @param {string} basePath Set a path that will be prepended to each src when loading. When creating, playing, or removing\r\n\t * audio that was loaded with a basePath by src, the basePath must be included.\r\n\t * @return {Object} An array of objects with the modified values that were passed in, which defines each sound.\r\n\t * Like registerSound, it will return false for any values when the source cannot be parsed or if no plugins can be initialized.\r\n\t * Also, it will return true for any values when the source is already loaded.\r\n\t * @static\r\n\t * @since 0.6.0\r\n\t */\r\n\ts.registerSounds = function (sounds, basePath) {\r\n\t\tvar returnValues = [];\r\n\t\tif (sounds.path) {\r\n\t\t\tif (!basePath) {\r\n\t\t\t\tbasePath = sounds.path;\r\n\t\t\t} else {\r\n\t\t\t\tbasePath = basePath + sounds.path;\r\n\t\t\t}\r\n\t\t\tsounds = sounds.manifest;\r\n\t\t\t// TODO document this feature\r\n\t\t}\r\n\t\tfor (var i = 0, l = sounds.length; i < l; i++) {\r\n\t\t\treturnValues[i] = createjs.Sound.registerSound(sounds[i].src, sounds[i].id, sounds[i].data, basePath, sounds[i].defaultPlayProps);\r\n\t\t}\r\n\t\treturn returnValues;\r\n\t};\r\n\r\n\t/**\r\n\t * Remove a sound that has been registered with {{#crossLink \"Sound/registerSound\"}}{{/crossLink}} or\r\n\t * {{#crossLink \"Sound/registerSounds\"}}{{/crossLink}}.\r\n\t *
        Note this will stop playback on active instances playing this sound before deleting them.\r\n\t *
        Note if you passed in a basePath, you need to pass it or prepend it to the src here.\r\n\t *\r\n\t *

        Example

        \r\n\t *\r\n\t * createjs.Sound.removeSound(\"myID\");\r\n\t * createjs.Sound.removeSound(\"myAudioBasePath/mySound.ogg\");\r\n\t * createjs.Sound.removeSound(\"myPath/myOtherSound.mp3\", \"myBasePath/\");\r\n\t * createjs.Sound.removeSound({mp3:\"musicNoExtension\", ogg:\"music.ogg\"}, \"myBasePath/\");\r\n\t *\r\n\t * @method removeSound\r\n\t * @param {String | Object} src The src or ID of the audio, or an Object with a \"src\" property, or an Object with multiple extension labeled src properties.\r\n\t * @param {string} basePath Set a path that will be prepended to each src when removing.\r\n\t * @return {Boolean} True if sound is successfully removed.\r\n\t * @static\r\n\t * @since 0.4.1\r\n\t */\r\n\ts.removeSound = function(src, basePath) {\r\n\t\tif (s.activePlugin == null) {return false;}\r\n\r\n\t\tif (src instanceof Object && src.src) {src = src.src;}\r\n\r\n\t\tvar details;\r\n\t\tif (src instanceof Object) {\r\n\t\t\tdetails = s._parseSrc(src);\r\n\t\t} else {\r\n\t\t\tsrc = s._getSrcById(src).src;\r\n\t\t\tdetails = s._parsePath(src);\r\n\t\t}\r\n\t\tif (details == null) {return false;}\r\n\t\tsrc = details.src;\r\n\t\tif (basePath != null) {src = basePath + src;}\r\n\r\n\t\tfor(var prop in s._idHash){\r\n\t\t\tif(s._idHash[prop].src == src) {\r\n\t\t\t\tdelete(s._idHash[prop]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// clear from SoundChannel, which also stops and deletes all instances\r\n\t\tSoundChannel.removeSrc(src);\r\n\r\n\t\tdelete(s._preloadHash[src]);\r\n\r\n\t\ts.activePlugin.removeSound(src);\r\n\r\n\t\treturn true;\r\n\t};\r\n\r\n\t/**\r\n\t * Remove an array of audio files that have been registered with {{#crossLink \"Sound/registerSound\"}}{{/crossLink}} or\r\n\t * {{#crossLink \"Sound/registerSounds\"}}{{/crossLink}}.\r\n\t *
        Note this will stop playback on active instances playing this audio before deleting them.\r\n\t *
        Note if you passed in a basePath, you need to pass it or prepend it to the src here.\r\n\t *\r\n\t *

        Example

        \r\n\t *\r\n\t * \t\tassetPath = \"./myPath/\";\r\n\t * var sounds = [\r\n\t * {src:\"asset0.ogg\", id:\"example\"},\r\n\t * {src:\"asset1.ogg\", id:\"1\", data:6},\r\n\t * {src:\"asset2.mp3\", id:\"works\"}\r\n\t * ];\r\n\t * createjs.Sound.removeSounds(sounds, assetPath);\r\n\t *\r\n\t * @method removeSounds\r\n\t * @param {Array} sounds An array of objects to remove. Objects are expected to be in the format needed for\r\n\t * {{#crossLink \"Sound/removeSound\"}}{{/crossLink}}: {srcOrID:srcURIorID}.\r\n\t * You can also pass an object with path and manifest properties, where path is a basePath and manifest is an array of objects to remove.\r\n\t * @param {string} basePath Set a path that will be prepended to each src when removing.\r\n\t * @return {Object} An array of Boolean values representing if the sounds with the same array index were\r\n\t * successfully removed.\r\n\t * @static\r\n\t * @since 0.4.1\r\n\t */\r\n\ts.removeSounds = function (sounds, basePath) {\r\n\t\tvar returnValues = [];\r\n\t\tif (sounds.path) {\r\n\t\t\tif (!basePath) {\r\n\t\t\t\tbasePath = sounds.path;\r\n\t\t\t} else {\r\n\t\t\t\tbasePath = basePath + sounds.path;\r\n\t\t\t}\r\n\t\t\tsounds = sounds.manifest;\r\n\t\t}\r\n\t\tfor (var i = 0, l = sounds.length; i < l; i++) {\r\n\t\t\treturnValues[i] = createjs.Sound.removeSound(sounds[i].src, basePath);\r\n\t\t}\r\n\t\treturn returnValues;\r\n\t};\r\n\r\n\t/**\r\n\t * Remove all sounds that have been registered with {{#crossLink \"Sound/registerSound\"}}{{/crossLink}} or\r\n\t * {{#crossLink \"Sound/registerSounds\"}}{{/crossLink}}.\r\n\t *
        Note this will stop playback on all active sound instances before deleting them.\r\n\t *\r\n\t *

        Example

        \r\n\t *\r\n\t * createjs.Sound.removeAllSounds();\r\n\t *\r\n\t * @method removeAllSounds\r\n\t * @static\r\n\t * @since 0.4.1\r\n\t */\r\n\ts.removeAllSounds = function() {\r\n\t\ts._idHash = {};\r\n\t\ts._preloadHash = {};\r\n\t\tSoundChannel.removeAll();\r\n\t\tif (s.activePlugin) {s.activePlugin.removeAllSounds();}\r\n\t};\r\n\r\n\t/**\r\n\t * Check if a source has been loaded by internal preloaders. This is necessary to ensure that sounds that are\r\n\t * not completed preloading will not kick off a new internal preload if they are played.\r\n\t *\r\n\t *

        Example

        \r\n\t *\r\n\t * var mySound = \"assetPath/asset0.ogg\";\r\n\t * if(createjs.Sound.loadComplete(mySound) {\r\n\t * createjs.Sound.play(mySound);\r\n\t * }\r\n\t *\r\n\t * @method loadComplete\r\n\t * @param {String} src The src or id that is being loaded.\r\n\t * @return {Boolean} If the src is already loaded.\r\n\t * @since 0.4.0\r\n\t * @static\r\n\t */\r\n\ts.loadComplete = function (src) {\r\n\t\tif (!s.isReady()) { return false; }\r\n\t\tvar details = s._parsePath(src);\r\n\t\tif (details) {\r\n\t\t\tsrc = s._getSrcById(details.src).src;\r\n\t\t} else {\r\n\t\t\tsrc = s._getSrcById(src).src;\r\n\t\t}\r\n\t\tif(s._preloadHash[src] == undefined) {return false;}\r\n\t\treturn (s._preloadHash[src][0] == true); // src only loads once, so if it's true for the first it's true for all\r\n\t};\r\n\r\n\t/**\r\n\t * Parse the path of a sound. Alternate extensions will be attempted in order if the\r\n\t * current extension is not supported\r\n\t * @method _parsePath\r\n\t * @param {String} value The path to an audio source.\r\n\t * @return {Object} A formatted object that can be registered with the {{#crossLink \"Sound/activePlugin:property\"}}{{/crossLink}}\r\n\t * and returned to a preloader like PreloadJS.\r\n\t * @private\r\n\t * @static\r\n\t */\r\n\ts._parsePath = function (value) {\r\n\t\tif (typeof(value) != \"string\") {value = value.toString();}\r\n\r\n\t\tvar match = value.match(s.FILE_PATTERN);\r\n\t\tif (match == null) {return false;}\r\n\r\n\t\tvar name = match[4];\r\n\t\tvar ext = match[5];\r\n\t\tvar c = s.capabilities;\r\n\t\tvar i = 0;\r\n\t\twhile (!c[ext]) {\r\n\t\t\text = s.alternateExtensions[i++];\r\n\t\t\tif (i > s.alternateExtensions.length) { return null;}\t// no extensions are supported\r\n\t\t}\r\n\t\tvalue = value.replace(\".\"+match[5], \".\"+ext);\r\n\r\n\t\tvar ret = {name:name, src:value, extension:ext};\r\n\t\treturn ret;\r\n\t};\r\n\r\n\t/**\r\n\t * Parse the path of a sound based on properties of src matching with supported extensions.\r\n\t * Returns false if none of the properties are supported\r\n\t * @method _parseSrc\r\n\t * @param {Object} value The paths to an audio source, indexed by extension type.\r\n\t * @return {Object} A formatted object that can be registered with the {{#crossLink \"Sound/activePlugin:property\"}}{{/crossLink}}\r\n\t * and returned to a preloader like PreloadJS.\r\n\t * @private\r\n\t * @static\r\n\t */\r\n\ts._parseSrc = function (value) {\r\n\t\tvar ret = {name:undefined, src:undefined, extension:undefined};\r\n\t\tvar c = s.capabilities;\r\n\r\n\t\tfor (var prop in value) {\r\n\t\t if(value.hasOwnProperty(prop) && c[prop]) {\r\n\t\t\t\tret.src = value[prop];\r\n\t\t\t\tret.extension = prop;\r\n\t\t\t\tbreak;\r\n\t\t }\r\n\t\t}\r\n\t\tif (!ret.src) {return false;}\t// no matches\r\n\r\n\t\tvar i = ret.src.lastIndexOf(\"/\");\r\n\t\tif (i != -1) {\r\n\t\t\tret.name = ret.src.slice(i+1);\r\n\t\t} else {\r\n\t\t\tret.name = ret.src;\r\n\t\t}\r\n\r\n\t\treturn ret;\r\n\t};\r\n\r\n\t/* ---------------\r\n\t Static API.\r\n\t --------------- */\r\n\t/**\r\n\t * Play a sound and get a {{#crossLink \"AbstractSoundInstance\"}}{{/crossLink}} to control. If the sound fails to\r\n\t * play, an AbstractSoundInstance will still be returned, and have a playState of {{#crossLink \"Sound/PLAY_FAILED:property\"}}{{/crossLink}}.\r\n\t * Note that even on sounds with failed playback, you may still be able to call the {{#crossLink \"AbstractSoundInstance/play\"}}{{/crossLink}},\r\n\t * method, since the failure could be due to lack of available channels. If the src does not have a supported\r\n\t * extension or if there is no available plugin, a default AbstractSoundInstance will still be returned, which will\r\n\t * not play any audio, but will not generate errors.\r\n\t *\r\n\t *

        Example

        \r\n\t *\r\n\t * createjs.Sound.on(\"fileload\", handleLoad);\r\n\t * createjs.Sound.registerSound(\"myAudioPath/mySound.mp3\", \"myID\", 3);\r\n\t * function handleLoad(event) {\r\n\t * \tcreatejs.Sound.play(\"myID\");\r\n\t * \t// store off AbstractSoundInstance for controlling\r\n\t * \tvar myInstance = createjs.Sound.play(\"myID\", {interrupt: createjs.Sound.INTERRUPT_ANY, loop:-1});\r\n\t * }\r\n\t *\r\n\t * NOTE: To create an audio sprite that has not already been registered, both startTime and duration need to be set.\r\n\t * This is only when creating a new audio sprite, not when playing using the id of an already registered audio sprite.\r\n\t *\r\n\t * @method play\r\n\t * @param {String} src The src or ID of the audio.\r\n\t * @param {Object | PlayPropsConfig} props A PlayPropsConfig instance, or an object that contains the parameters to\r\n\t * play a sound. See the {{#crossLink \"PlayPropsConfig\"}}{{/crossLink}} for more info.\r\n\t * @return {AbstractSoundInstance} A {{#crossLink \"AbstractSoundInstance\"}}{{/crossLink}} that can be controlled\r\n\t * after it is created.\r\n\t * @static\r\n\t */\r\n\ts.play = function (src, props) {\r\n\t\tvar playProps = createjs.PlayPropsConfig.create(props);\r\n\t\tvar instance = s.createInstance(src, playProps.startTime, playProps.duration);\r\n\t\tvar ok = s._playInstance(instance, playProps);\r\n\t\tif (!ok) {instance._playFailed();}\r\n\t\treturn instance;\r\n\t};\r\n\r\n\t/**\r\n\t * Creates a {{#crossLink \"AbstractSoundInstance\"}}{{/crossLink}} using the passed in src. If the src does not have a\r\n\t * supported extension or if there is no available plugin, a default AbstractSoundInstance will be returned that can be\r\n\t * called safely but does nothing.\r\n\t *\r\n\t *

        Example

        \r\n\t *\r\n\t * var myInstance = null;\r\n\t * createjs.Sound.on(\"fileload\", handleLoad);\r\n\t * createjs.Sound.registerSound(\"myAudioPath/mySound.mp3\", \"myID\", 3);\r\n\t * function handleLoad(event) {\r\n\t * \tmyInstance = createjs.Sound.createInstance(\"myID\");\r\n\t * \t// alternately we could call the following\r\n\t * \tmyInstance = createjs.Sound.createInstance(\"myAudioPath/mySound.mp3\");\r\n\t * }\r\n\t *\r\n\t * NOTE to create an audio sprite that has not already been registered, both startTime and duration need to be set.\r\n\t * This is only when creating a new audio sprite, not when playing using the id of an already registered audio sprite.\r\n\t *\r\n\t * @method createInstance\r\n\t * @param {String} src The src or ID of the audio.\r\n\t * @param {Number} [startTime=null] To create an audio sprite (with duration), the initial offset to start playback and loop from, in milliseconds.\r\n\t * @param {Number} [duration=null] To create an audio sprite (with startTime), the amount of time to play the clip for, in milliseconds.\r\n\t * @return {AbstractSoundInstance} A {{#crossLink \"AbstractSoundInstance\"}}{{/crossLink}} that can be controlled after it is created.\r\n\t * Unsupported extensions will return the default AbstractSoundInstance.\r\n\t * @since 0.4.0\r\n\t * @static\r\n\t */\r\n\ts.createInstance = function (src, startTime, duration) {\r\n\t\tif (!s.initializeDefaultPlugins()) { return new createjs.DefaultSoundInstance(src, startTime, duration); }\r\n\r\n\t\tvar defaultPlayProps = s._defaultPlayPropsHash[src];\t// for audio sprites, which create and store defaults by id\r\n\t\tsrc = s._getSrcById(src);\r\n\r\n\t\tvar details = s._parsePath(src.src);\r\n\r\n\t\tvar instance = null;\r\n\t\tif (details != null && details.src != null) {\r\n\t\t\tSoundChannel.create(details.src);\r\n\t\t\tif (startTime == null) { startTime = src.startTime; }\r\n\t\t\tinstance = s.activePlugin.create(details.src, startTime, duration || src.duration);\r\n\r\n\t\t\tdefaultPlayProps = defaultPlayProps || s._defaultPlayPropsHash[details.src];\r\n\t\t\tif (defaultPlayProps) {\r\n\t\t\t\tinstance.applyPlayProps(defaultPlayProps);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tinstance = new createjs.DefaultSoundInstance(src, startTime, duration);\r\n\t\t}\r\n\r\n\t\tinstance.uniqueId = s._lastID++;\r\n\r\n\t\treturn instance;\r\n\t};\r\n\r\n\t/**\r\n\t * Stop all audio (global stop). Stopped audio is reset, and not paused. To play audio that has been stopped,\r\n\t * call AbstractSoundInstance {{#crossLink \"AbstractSoundInstance/play\"}}{{/crossLink}}.\r\n\t *\r\n\t *

        Example

        \r\n\t *\r\n\t * createjs.Sound.stop();\r\n\t *\r\n\t * @method stop\r\n\t * @static\r\n\t */\r\n\ts.stop = function () {\r\n\t\tvar instances = this._instances;\r\n\t\tfor (var i = instances.length; i--; ) {\r\n\t\t\tinstances[i].stop(); // NOTE stop removes instance from this._instances\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Set the default playback properties for all new SoundInstances of the passed in src or ID.\r\n\t * See {{#crossLink \"PlayPropsConfig\"}}{{/crossLink}} for available properties.\r\n\t *\r\n\t * @method setDefaultPlayProps\r\n\t * @param {String} src The src or ID used to register the audio.\r\n\t * @param {Object | PlayPropsConfig} playProps The playback properties you would like to set.\r\n\t * @since 0.6.1\r\n\t */\r\n\ts.setDefaultPlayProps = function(src, playProps) {\r\n\t\tsrc = s._getSrcById(src);\r\n\t\ts._defaultPlayPropsHash[s._parsePath(src.src).src] = createjs.PlayPropsConfig.create(playProps);\r\n\t};\r\n\r\n\t/**\r\n\t * Get the default playback properties for the passed in src or ID. These properties are applied to all\r\n\t * new SoundInstances. Returns null if default does not exist.\r\n\t *\r\n\t * @method getDefaultPlayProps\r\n\t * @param {String} src The src or ID used to register the audio.\r\n\t * @returns {PlayPropsConfig} returns an existing PlayPropsConfig or null if one does not exist\r\n\t * @since 0.6.1\r\n\t */\r\n\ts.getDefaultPlayProps = function(src) {\r\n\t\tsrc = s._getSrcById(src);\r\n\t\treturn s._defaultPlayPropsHash[s._parsePath(src.src).src];\r\n\t};\r\n\r\n\r\n\t/* ---------------\r\n\t Internal methods\r\n\t --------------- */\r\n\t/**\r\n\t * Play an instance. This is called by the static API, as well as from plugins. This allows the core class to\r\n\t * control delays.\r\n\t * @method _playInstance\r\n\t * @param {AbstractSoundInstance} instance The {{#crossLink \"AbstractSoundInstance\"}}{{/crossLink}} to start playing.\r\n\t * @param {PlayPropsConfig} playProps A PlayPropsConfig object.\r\n\t * @return {Boolean} If the sound can start playing. Sounds that fail immediately will return false. Sounds that\r\n\t * have a delay will return true, but may still fail to play.\r\n\t * @private\r\n\t * @static\r\n\t */\r\n\ts._playInstance = function (instance, playProps) {\r\n\t\tvar defaultPlayProps = s._defaultPlayPropsHash[instance.src] || {};\r\n\t\tif (playProps.interrupt == null) {playProps.interrupt = defaultPlayProps.interrupt || s.defaultInterruptBehavior};\r\n\t\tif (playProps.delay == null) {playProps.delay = defaultPlayProps.delay || 0;}\r\n\t\tif (playProps.offset == null) {playProps.offset = instance.position;}\r\n\t\tif (playProps.loop == null) {playProps.loop = instance.loop;}\r\n\t\tif (playProps.volume == null) {playProps.volume = instance.volume;}\r\n\t\tif (playProps.pan == null) {playProps.pan = instance.pan;}\r\n\r\n\t\tif (playProps.delay == 0) {\r\n\t\t\tvar ok = s._beginPlaying(instance, playProps);\r\n\t\t\tif (!ok) {return false;}\r\n\t\t} else {\r\n\t\t\t//Note that we can't pass arguments to proxy OR setTimeout (IE only), so just wrap the function call.\r\n\t\t\t// OJR WebAudio may want to handle this differently, so it might make sense to move this functionality into the plugins in the future\r\n\t\t\tvar delayTimeoutId = setTimeout(function () {\r\n\t\t\t\ts._beginPlaying(instance, playProps);\r\n\t\t\t}, playProps.delay);\r\n\t\t\tinstance.delayTimeoutId = delayTimeoutId;\r\n\t\t}\r\n\r\n\t\tthis._instances.push(instance);\r\n\r\n\t\treturn true;\r\n\t};\r\n\r\n\t/**\r\n\t * Begin playback. This is called immediately or after delay by {{#crossLink \"Sound/playInstance\"}}{{/crossLink}}.\r\n\t * @method _beginPlaying\r\n\t * @param {AbstractSoundInstance} instance A {{#crossLink \"AbstractSoundInstance\"}}{{/crossLink}} to begin playback.\r\n\t * @param {PlayPropsConfig} playProps A PlayPropsConfig object.\r\n\t * @return {Boolean} If the sound can start playing. If there are no available channels, or the instance fails to\r\n\t * start, this will return false.\r\n\t * @private\r\n\t * @static\r\n\t */\r\n\ts._beginPlaying = function (instance, playProps) {\r\n\t\tif (!SoundChannel.add(instance, playProps.interrupt)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tvar result = instance._beginPlaying(playProps);\r\n\t\tif (!result) {\r\n\t\t\tvar index = createjs.indexOf(this._instances, instance);\r\n\t\t\tif (index > -1) {this._instances.splice(index, 1);}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t};\r\n\r\n\t/**\r\n\t * Get the source of a sound via the ID passed in with a register call. If no ID is found the value is returned\r\n\t * instead.\r\n\t * @method _getSrcById\r\n\t * @param {String} value The ID the sound was registered with.\r\n\t * @return {String} The source of the sound if it has been registered with this ID or the value that was passed in.\r\n\t * @private\r\n\t * @static\r\n\t */\r\n\ts._getSrcById = function (value) {\r\n\t\treturn s._idHash[value] || {src: value};\r\n\t};\r\n\r\n\t/**\r\n\t * A sound has completed playback, been interrupted, failed, or been stopped. This method removes the instance from\r\n\t * Sound management. It will be added again, if the sound re-plays. Note that this method is called from the\r\n\t * instances themselves.\r\n\t * @method _playFinished\r\n\t * @param {AbstractSoundInstance} instance The instance that finished playback.\r\n\t * @private\r\n\t * @static\r\n\t */\r\n\ts._playFinished = function (instance) {\r\n\t\tSoundChannel.remove(instance);\r\n\t\tvar index = createjs.indexOf(this._instances, instance);\r\n\t\tif (index > -1) {this._instances.splice(index, 1);}\t// OJR this will always be > -1, there is no way for an instance to exist without being added to this._instances\r\n\t};\r\n\r\n\tcreatejs.Sound = Sound;\r\n\r\n\t/**\r\n\t * An internal class that manages the number of active {{#crossLink \"AbstractSoundInstance\"}}{{/crossLink}} instances for\r\n\t * each sound type. This method is only used internally by the {{#crossLink \"Sound\"}}{{/crossLink}} class.\r\n\t *\r\n\t * The number of sounds is artificially limited by Sound in order to prevent over-saturation of a\r\n\t * single sound, as well as to stay within hardware limitations, although the latter may disappear with better\r\n\t * browser support.\r\n\t *\r\n\t * When a sound is played, this class ensures that there is an available instance, or interrupts an appropriate\r\n\t * sound that is already playing.\r\n\t * #class SoundChannel\r\n\t * @param {String} src The source of the instances\r\n\t * @param {Number} [max=1] The number of instances allowed\r\n\t * @constructor\r\n\t * @protected\r\n\t */\r\n\tfunction SoundChannel(src, max) {\r\n\t\tthis.init(src, max);\r\n\t}\r\n\r\n\t/* ------------\r\n\t Static API\r\n\t ------------ */\r\n\t/**\r\n\t * A hash of channel instances indexed by source.\r\n\t * #property channels\r\n\t * @type {Object}\r\n\t * @static\r\n\t */\r\n\tSoundChannel.channels = {};\r\n\r\n\t/**\r\n\t * Create a sound channel. Note that if the sound channel already exists, this will fail.\r\n\t * #method create\r\n\t * @param {String} src The source for the channel\r\n\t * @param {Number} max The maximum amount this channel holds. The default is {{#crossLink \"SoundChannel.maxDefault\"}}{{/crossLink}}.\r\n\t * @return {Boolean} If the channels were created.\r\n\t * @static\r\n\t */\r\n\tSoundChannel.create = function (src, max) {\r\n\t\tvar channel = SoundChannel.get(src);\r\n\t\tif (channel == null) {\r\n\t\t\tSoundChannel.channels[src] = new SoundChannel(src, max);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\t/**\r\n\t * Delete a sound channel, stop and delete all related instances. Note that if the sound channel does not exist, this will fail.\r\n\t * #method remove\r\n\t * @param {String} src The source for the channel\r\n\t * @return {Boolean} If the channels were deleted.\r\n\t * @static\r\n\t */\r\n\tSoundChannel.removeSrc = function (src) {\r\n\t\tvar channel = SoundChannel.get(src);\r\n\t\tif (channel == null) {return false;}\r\n\t\tchannel._removeAll();\t// this stops and removes all active instances\r\n\t\tdelete(SoundChannel.channels[src]);\r\n\t\treturn true;\r\n\t};\r\n\t/**\r\n\t * Delete all sound channels, stop and delete all related instances.\r\n\t * #method removeAll\r\n\t * @static\r\n\t */\r\n\tSoundChannel.removeAll = function () {\r\n\t\tfor(var channel in SoundChannel.channels) {\r\n\t\t\tSoundChannel.channels[channel]._removeAll();\t// this stops and removes all active instances\r\n\t\t}\r\n\t\tSoundChannel.channels = {};\r\n\t};\r\n\t/**\r\n\t * Add an instance to a sound channel.\r\n\t * #method add\r\n\t * @param {AbstractSoundInstance} instance The instance to add to the channel\r\n\t * @param {String} interrupt The interrupt value to use. Please see the {{#crossLink \"Sound/play\"}}{{/crossLink}}\r\n\t * for details on interrupt modes.\r\n\t * @return {Boolean} The success of the method call. If the channel is full, it will return false.\r\n\t * @static\r\n\t */\r\n\tSoundChannel.add = function (instance, interrupt) {\r\n\t\tvar channel = SoundChannel.get(instance.src);\r\n\t\tif (channel == null) {return false;}\r\n\t\treturn channel._add(instance, interrupt);\r\n\t};\r\n\t/**\r\n\t * Remove an instance from the channel.\r\n\t * #method remove\r\n\t * @param {AbstractSoundInstance} instance The instance to remove from the channel\r\n\t * @return The success of the method call. If there is no channel, it will return false.\r\n\t * @static\r\n\t */\r\n\tSoundChannel.remove = function (instance) {\r\n\t\tvar channel = SoundChannel.get(instance.src);\r\n\t\tif (channel == null) {return false;}\r\n\t\tchannel._remove(instance);\r\n\t\treturn true;\r\n\t};\r\n\t/**\r\n\t * Get the maximum number of sounds you can have in a channel.\r\n\t * #method maxPerChannel\r\n\t * @return {Number} The maximum number of sounds you can have in a channel.\r\n\t */\r\n\tSoundChannel.maxPerChannel = function () {\r\n\t\treturn p.maxDefault;\r\n\t};\r\n\t/**\r\n\t * Get a channel instance by its src.\r\n\t * #method get\r\n\t * @param {String} src The src to use to look up the channel\r\n\t * @static\r\n\t */\r\n\tSoundChannel.get = function (src) {\r\n\t\treturn SoundChannel.channels[src];\r\n\t};\r\n\r\n\tvar p = SoundChannel.prototype;\r\n\tp.constructor = SoundChannel;\r\n\r\n\t/**\r\n\t * The source of the channel.\r\n\t * #property src\r\n\t * @type {String}\r\n\t */\r\n\tp.src = null;\r\n\r\n\t/**\r\n\t * The maximum number of instances in this channel. -1 indicates no limit\r\n\t * #property max\r\n\t * @type {Number}\r\n\t */\r\n\tp.max = null;\r\n\r\n\t/**\r\n\t * The default value to set for max, if it isn't passed in. Also used if -1 is passed.\r\n\t * #property maxDefault\r\n\t * @type {Number}\r\n\t * @default 100\r\n\t * @since 0.4.0\r\n\t */\r\n\tp.maxDefault = 100;\r\n\r\n\t/**\r\n\t * The current number of active instances.\r\n\t * #property length\r\n\t * @type {Number}\r\n\t */\r\n\tp.length = 0;\r\n\r\n\t/**\r\n\t * Initialize the channel.\r\n\t * #method init\r\n\t * @param {String} src The source of the channel\r\n\t * @param {Number} max The maximum number of instances in the channel\r\n\t * @protected\r\n\t */\r\n\tp.init = function (src, max) {\r\n\t\tthis.src = src;\r\n\t\tthis.max = max || this.maxDefault;\r\n\t\tif (this.max == -1) {this.max = this.maxDefault;}\r\n\t\tthis._instances = [];\r\n\t};\r\n\r\n\t/**\r\n\t * Get an instance by index.\r\n\t * #method get\r\n\t * @param {Number} index The index to return.\r\n\t * @return {AbstractSoundInstance} The AbstractSoundInstance at a specific instance.\r\n\t */\r\n\tp._get = function (index) {\r\n\t\treturn this._instances[index];\r\n\t};\r\n\r\n\t/**\r\n\t * Add a new instance to the channel.\r\n\t * #method add\r\n\t * @param {AbstractSoundInstance} instance The instance to add.\r\n\t * @return {Boolean} The success of the method call. If the channel is full, it will return false.\r\n\t */\r\n\tp._add = function (instance, interrupt) {\r\n\t\tif (!this._getSlot(interrupt, instance)) {return false;}\r\n\t\tthis._instances.push(instance);\r\n\t\tthis.length++;\r\n\t\treturn true;\r\n\t};\r\n\r\n\t/**\r\n\t * Remove an instance from the channel, either when it has finished playing, or it has been interrupted.\r\n\t * #method remove\r\n\t * @param {AbstractSoundInstance} instance The instance to remove\r\n\t * @return {Boolean} The success of the remove call. If the instance is not found in this channel, it will\r\n\t * return false.\r\n\t */\r\n\tp._remove = function (instance) {\r\n\t\tvar index = createjs.indexOf(this._instances, instance);\r\n\t\tif (index == -1) {return false;}\r\n\t\tthis._instances.splice(index, 1);\r\n\t\tthis.length--;\r\n\t\treturn true;\r\n\t};\r\n\r\n\t/**\r\n\t * Stop playback and remove all instances from the channel. Usually in response to a delete call.\r\n\t * #method removeAll\r\n\t */\r\n\tp._removeAll = function () {\r\n\t\t// Note that stop() removes the item from the list\r\n\t\tfor (var i=this.length-1; i>=0; i--) {\r\n\t\t\tthis._instances[i].stop();\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Get an available slot depending on interrupt value and if slots are available.\r\n\t * #method getSlot\r\n\t * @param {String} interrupt The interrupt value to use.\r\n\t * @param {AbstractSoundInstance} instance The sound instance that will go in the channel if successful.\r\n\t * @return {Boolean} Determines if there is an available slot. Depending on the interrupt mode, if there are no slots,\r\n\t * an existing AbstractSoundInstance may be interrupted. If there are no slots, this method returns false.\r\n\t */\r\n\tp._getSlot = function (interrupt, instance) {\r\n\t\tvar target, replacement;\r\n\r\n\t\tif (interrupt != Sound.INTERRUPT_NONE) {\r\n\t\t\t// First replacement candidate\r\n\t\t\treplacement = this._get(0);\r\n\t\t\tif (replacement == null) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i = 0, l = this.max; i < l; i++) {\r\n\t\t\ttarget = this._get(i);\r\n\r\n\t\t\t// Available Space\r\n\t\t\tif (target == null) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\t// Audio is complete or not playing\r\n\t\t\tif (target.playState == Sound.PLAY_FINISHED ||\r\n\t\t\t\ttarget.playState == Sound.PLAY_INTERRUPTED ||\r\n\t\t\t\ttarget.playState == Sound.PLAY_FAILED) {\r\n\t\t\t\treplacement = target;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif (interrupt == Sound.INTERRUPT_NONE) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t// Audio is a better candidate than the current target, according to playhead\r\n\t\t\tif ((interrupt == Sound.INTERRUPT_EARLY && target.position < replacement.position) ||\r\n\t\t\t\t(interrupt == Sound.INTERRUPT_LATE && target.position > replacement.position)) {\r\n\t\t\t\t\treplacement = target;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (replacement != null) {\r\n\t\t\treplacement._interrupt();\r\n\t\t\tthis._remove(replacement);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\tp.toString = function () {\r\n\t\treturn \"[Sound SoundChannel]\";\r\n\t};\r\n\t// do not add SoundChannel to namespace\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// AbstractSoundInstance.js\r\n//##############################################################################\r\n\r\n/**\r\n * A AbstractSoundInstance is created when any calls to the Sound API method {{#crossLink \"Sound/play\"}}{{/crossLink}} or\r\n * {{#crossLink \"Sound/createInstance\"}}{{/crossLink}} are made. The AbstractSoundInstance is returned by the active plugin\r\n * for control by the user.\r\n *\r\n *

        Example

        \r\n *\r\n * var myInstance = createjs.Sound.play(\"myAssetPath/mySrcFile.mp3\");\r\n *\r\n * A number of additional parameters provide a quick way to determine how a sound is played. Please see the Sound\r\n * API method {{#crossLink \"Sound/play\"}}{{/crossLink}} for a list of arguments.\r\n *\r\n * Once a AbstractSoundInstance is created, a reference can be stored that can be used to control the audio directly through\r\n * the AbstractSoundInstance. If the reference is not stored, the AbstractSoundInstance will play out its audio (and any loops), and\r\n * is then de-referenced from the {{#crossLink \"Sound\"}}{{/crossLink}} class so that it can be cleaned up. If audio\r\n * playback has completed, a simple call to the {{#crossLink \"AbstractSoundInstance/play\"}}{{/crossLink}} instance method\r\n * will rebuild the references the Sound class need to control it.\r\n *\r\n * var myInstance = createjs.Sound.play(\"myAssetPath/mySrcFile.mp3\", {loop:2});\r\n * myInstance.on(\"loop\", handleLoop);\r\n * function handleLoop(event) {\r\n * myInstance.volume = myInstance.volume * 0.5;\r\n * }\r\n *\r\n * Events are dispatched from the instance to notify when the sound has completed, looped, or when playback fails\r\n *\r\n * var myInstance = createjs.Sound.play(\"myAssetPath/mySrcFile.mp3\");\r\n * myInstance.on(\"complete\", handleComplete);\r\n * myInstance.on(\"loop\", handleLoop);\r\n * myInstance.on(\"failed\", handleFailed);\r\n *\r\n *\r\n * @class AbstractSoundInstance\r\n * @param {String} src The path to and file name of the sound.\r\n * @param {Number} startTime Audio sprite property used to apply an offset, in milliseconds.\r\n * @param {Number} duration Audio sprite property used to set the time the clip plays for, in milliseconds.\r\n * @param {Object} playbackResource Any resource needed by plugin to support audio playback.\r\n * @extends EventDispatcher\r\n * @constructor\r\n */\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\r\n// Constructor:\r\n\tvar AbstractSoundInstance = function (src, startTime, duration, playbackResource) {\r\n\t\tthis.EventDispatcher_constructor();\r\n\r\n\r\n\t// public properties:\r\n\t\t/**\r\n\t\t * The source of the sound.\r\n\t\t * @property src\r\n\t\t * @type {String}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.src = src;\r\n\r\n\t\t/**\r\n\t\t * The unique ID of the instance. This is set by {{#crossLink \"Sound\"}}{{/crossLink}}.\r\n\t\t * @property uniqueId\r\n\t\t * @type {String} | Number\r\n\t\t * @default -1\r\n\t\t */\r\n\t\tthis.uniqueId = -1;\r\n\r\n\t\t/**\r\n\t\t * The play state of the sound. Play states are defined as constants on {{#crossLink \"Sound\"}}{{/crossLink}}.\r\n\t\t * @property playState\r\n\t\t * @type {String}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis.playState = null;\r\n\r\n\t\t/**\r\n\t\t * A Timeout created by {{#crossLink \"Sound\"}}{{/crossLink}} when this AbstractSoundInstance is played with a delay.\r\n\t\t * This allows AbstractSoundInstance to remove the delay if stop, pause, or cleanup are called before playback begins.\r\n\t\t * @property delayTimeoutId\r\n\t\t * @type {timeoutVariable}\r\n\t\t * @default null\r\n\t\t * @protected\r\n\t\t * @since 0.4.0\r\n\t\t */\r\n\t\tthis.delayTimeoutId = null;\r\n\t\t// TODO consider moving delay into AbstractSoundInstance so it can be handled by plugins\r\n\r\n\r\n\t// private properties\r\n\t// Getter / Setter Properties\r\n\t\t// OJR TODO find original reason that we didn't use defined functions. I think it was performance related\r\n\t\t/**\r\n\t\t * The volume of the sound, between 0 and 1.\r\n\t\t *\r\n\t\t * The actual output volume of a sound can be calculated using:\r\n\t\t * myInstance.volume * createjs.Sound._getVolume();\r\n\t\t *\r\n\t\t * @property volume\r\n\t\t * @type {Number}\r\n\t\t * @default 1\r\n\t\t */\r\n\t\tthis._volume = 1;\r\n\t\tObject.defineProperty(this, \"volume\", {\r\n\t\t\tget: this._getVolume,\r\n\t\t\tset: this._setVolume\r\n\t\t});\r\n\r\n\t\t/**\r\n\t\t * The pan of the sound, between -1 (left) and 1 (right). Note that pan is not supported by HTML Audio.\r\n\t\t *\r\n\t\t * Note in WebAudioPlugin this only gives us the \"x\" value of what is actually 3D audio\r\n\t\t * @property pan\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t */\r\n\t\tthis._pan = 0;\r\n\t\tObject.defineProperty(this, \"pan\", {\r\n\t\t\tget: this._getPan,\r\n\t\t\tset: this._setPan\r\n\t\t});\r\n\r\n\t\t/**\r\n\t\t * Audio sprite property used to determine the starting offset.\r\n\t\t * @property startTime\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t * @since 0.6.1\r\n\t\t */\r\n\t\tthis._startTime = Math.max(0, startTime || 0);\r\n\t\tObject.defineProperty(this, \"startTime\", {\r\n\t\t\tget: this._getStartTime,\r\n\t\t\tset: this._setStartTime\r\n\t\t});\r\n\r\n\t\t/**\r\n\t\t * Sets or gets the length of the audio clip, value is in milliseconds.\r\n\t\t *\r\n\t\t * @property duration\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t * @since 0.6.0\r\n\t\t */\r\n\t\tthis._duration = Math.max(0, duration || 0);\r\n\t\tObject.defineProperty(this, \"duration\", {\r\n\t\t\tget: this._getDuration,\r\n\t\t\tset: this._setDuration\r\n\t\t});\r\n\r\n\t\t/**\r\n\t\t * Object that holds plugin specific resource need for audio playback.\r\n\t\t * This is set internally by the plugin. For example, WebAudioPlugin will set an array buffer,\r\n\t\t * HTMLAudioPlugin will set a tag, FlashAudioPlugin will set a flash reference.\r\n\t\t *\r\n\t\t * @property playbackResource\r\n\t\t * @type {Object}\r\n\t\t * @default null\r\n\t\t */\r\n\t\tthis._playbackResource = null;\r\n\t\tObject.defineProperty(this, \"playbackResource\", {\r\n\t\t\tget: this._getPlaybackResource,\r\n\t\t\tset: this._setPlaybackResource\r\n\t\t});\r\n\t\tif(playbackResource !== false && playbackResource !== true) { this._setPlaybackResource(playbackResource); }\r\n\r\n\t\t/**\r\n\t\t * The position of the playhead in milliseconds. This can be set while a sound is playing, paused, or stopped.\r\n\t\t *\r\n\t\t * @property position\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t * @since 0.6.0\r\n\t\t */\r\n\t\tthis._position = 0;\r\n\t\tObject.defineProperty(this, \"position\", {\r\n\t\t\tget: this._getPosition,\r\n\t\t\tset: this._setPosition\r\n\t\t});\r\n\r\n\t\t/**\r\n\t\t * The number of play loops remaining. Negative values will loop infinitely.\r\n\t\t *\r\n\t\t * @property loop\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t * @public\r\n\t\t * @since 0.6.0\r\n\t\t */\r\n\t\tthis._loop = 0;\r\n\t\tObject.defineProperty(this, \"loop\", {\r\n\t\t\tget: this._getLoop,\r\n\t\t\tset: this._setLoop\r\n\t\t});\r\n\r\n\t\t/**\r\n\t\t * Mutes or unmutes the current audio instance.\r\n\t\t *\r\n\t\t * @property muted\r\n\t\t * @type {Boolean}\r\n\t\t * @default false\r\n\t\t * @since 0.6.0\r\n\t\t */\r\n\t\tthis._muted = false;\r\n\t\tObject.defineProperty(this, \"muted\", {\r\n\t\t\tget: this._getMuted,\r\n\t\t\tset: this._setMuted\r\n\t\t});\r\n\r\n\t\t/**\r\n\t\t * Pauses or resumes the current audio instance.\r\n\t\t *\r\n\t\t * @property paused\r\n\t\t * @type {Boolean}\r\n\t\t */\r\n\t\tthis._paused = false;\r\n\t\tObject.defineProperty(this, \"paused\", {\r\n\t\t\tget: this._getPaused,\r\n\t\t\tset: this._setPaused\r\n\t\t});\r\n\r\n\r\n\t// Events\r\n\t\t/**\r\n\t\t * The event that is fired when playback has started successfully.\r\n\t\t * @event succeeded\r\n\t\t * @param {Object} target The object that dispatched the event.\r\n\t\t * @param {String} type The event type.\r\n\t\t * @since 0.4.0\r\n\t\t */\r\n\r\n\t\t/**\r\n\t\t * The event that is fired when playback is interrupted. This happens when another sound with the same\r\n\t\t * src property is played using an interrupt value that causes this instance to stop playing.\r\n\t\t * @event interrupted\r\n\t\t * @param {Object} target The object that dispatched the event.\r\n\t\t * @param {String} type The event type.\r\n\t\t * @since 0.4.0\r\n\t\t */\r\n\r\n\t\t/**\r\n\t\t * The event that is fired when playback has failed. This happens when there are too many channels with the same\r\n\t\t * src property already playing (and the interrupt value doesn't cause an interrupt of another instance), or\r\n\t\t * the sound could not be played, perhaps due to a 404 error.\r\n\t\t * @event failed\r\n\t\t * @param {Object} target The object that dispatched the event.\r\n\t\t * @param {String} type The event type.\r\n\t\t * @since 0.4.0\r\n\t\t */\r\n\r\n\t\t/**\r\n\t\t * The event that is fired when a sound has completed playing but has loops remaining.\r\n\t\t * @event loop\r\n\t\t * @param {Object} target The object that dispatched the event.\r\n\t\t * @param {String} type The event type.\r\n\t\t * @since 0.4.0\r\n\t\t */\r\n\r\n\t\t/**\r\n\t\t * The event that is fired when playback completes. This means that the sound has finished playing in its\r\n\t\t * entirety, including its loop iterations.\r\n\t\t * @event complete\r\n\t\t * @param {Object} target The object that dispatched the event.\r\n\t\t * @param {String} type The event type.\r\n\t\t * @since 0.4.0\r\n\t\t */\r\n\t};\r\n\r\n\tvar p = createjs.extend(AbstractSoundInstance, createjs.EventDispatcher);\r\n\r\n// Public Methods:\r\n\t/**\r\n\t * Play an instance. This method is intended to be called on SoundInstances that already exist (created\r\n\t * with the Sound API {{#crossLink \"Sound/createInstance\"}}{{/crossLink}} or {{#crossLink \"Sound/play\"}}{{/crossLink}}).\r\n\t *\r\n\t *

        Example

        \r\n\t *\r\n\t * var myInstance = createjs.Sound.createInstance(mySrc);\r\n\t * myInstance.play({interrupt:createjs.Sound.INTERRUPT_ANY, loop:2, pan:0.5});\r\n\t *\r\n\t * Note that if this sound is already playing, this call will still set the passed in parameters.\r\n\r\n\t * Parameters Deprecated
        \r\n\t * The parameters for this method are deprecated in favor of a single parameter that is an Object or {{#crossLink \"PlayPropsConfig\"}}{{/crossLink}}.\r\n\t *\r\n\t * @method play\r\n\t * @param {Object | PlayPropsConfig} props A PlayPropsConfig instance, or an object that contains the parameters to\r\n\t * play a sound. See the {{#crossLink \"PlayPropsConfig\"}}{{/crossLink}} for more info.\r\n\t * @return {AbstractSoundInstance} A reference to itself, intended for chaining calls.\r\n\t */\r\n\tp.play = function (props) {\r\n\t\tvar playProps = createjs.PlayPropsConfig.create(props);\r\n\t\tif (this.playState == createjs.Sound.PLAY_SUCCEEDED) {\r\n\t\t\tthis.applyPlayProps(playProps);\r\n\t\t\tif (this._paused) {\tthis._setPaused(false); }\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._cleanUp();\r\n\t\tcreatejs.Sound._playInstance(this, playProps);\t// make this an event dispatch??\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Stop playback of the instance. Stopped sounds will reset their position to 0, and calls to {{#crossLink \"AbstractSoundInstance/resume\"}}{{/crossLink}}\r\n\t * will fail. To start playback again, call {{#crossLink \"AbstractSoundInstance/play\"}}{{/crossLink}}.\r\n *\r\n * If you don't want to lose your position use yourSoundInstance.paused = true instead. {{#crossLink \"AbstractSoundInstance/paused\"}}{{/crossLink}}.\r\n\t *\r\n\t *

        Example

        \r\n\t *\r\n\t * myInstance.stop();\r\n\t *\r\n\t * @method stop\r\n\t * @return {AbstractSoundInstance} A reference to itself, intended for chaining calls.\r\n\t */\r\n\tp.stop = function () {\r\n\t\tthis._position = 0;\r\n\t\tthis._paused = false;\r\n\t\tthis._handleStop();\r\n\t\tthis._cleanUp();\r\n\t\tthis.playState = createjs.Sound.PLAY_FINISHED;\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Remove all external references and resources from AbstractSoundInstance. Note this is irreversible and AbstractSoundInstance will no longer work\r\n\t * @method destroy\r\n\t * @since 0.6.0\r\n\t */\r\n\tp.destroy = function() {\r\n\t\tthis._cleanUp();\r\n\t\tthis.src = null;\r\n\t\tthis.playbackResource = null;\r\n\r\n\t\tthis.removeAllEventListeners();\r\n\t};\r\n\r\n\t/**\r\n\t * Takes an PlayPropsConfig or Object with the same properties and sets them on this instance.\r\n\t * @method applyPlayProps\r\n\t * @param {PlayPropsConfig | Object} playProps A PlayPropsConfig or object containing the same properties.\r\n\t * @since 0.6.1\r\n\t * @return {AbstractSoundInstance} A reference to itself, intended for chaining calls.\r\n\t */\r\n\tp.applyPlayProps = function(playProps) {\r\n\t\tif (playProps.offset != null) { this._setPosition(playProps.offset) }\r\n\t\tif (playProps.loop != null) { this._setLoop(playProps.loop); }\r\n\t\tif (playProps.volume != null) { this._setVolume(playProps.volume); }\r\n\t\tif (playProps.pan != null) { this._setPan(playProps.pan); }\r\n\t\tif (playProps.startTime != null) {\r\n\t\t\tthis._setStartTime(playProps.startTime);\r\n\t\t\tthis._setDuration(playProps.duration);\r\n\t\t}\r\n\t\treturn this;\r\n\t};\r\n\r\n\tp.toString = function () {\r\n\t\treturn \"[AbstractSoundInstance]\";\r\n\t};\r\n\r\n// get/set methods that allow support for IE8\r\n\t/**\r\n\t * Please use {{#crossLink \"AbstractSoundInstance/paused:property\"}}{{/crossLink}} directly as a property.\r\n\t * @method _getPaused\r\n\t * @protected\r\n\t * @return {boolean} If the instance is currently paused\r\n\t * @since 0.6.0\r\n\t */\r\n\tp._getPaused = function() {\r\n\t\treturn this._paused;\r\n\t};\r\n\r\n\t/**\r\n\t * Please use {{#crossLink \"AbstractSoundInstance/paused:property\"}}{{/crossLink}} directly as a property\r\n\t * @method _setPaused\r\n\t * @protected\r\n\t * @param {boolean} value\r\n\t * @since 0.6.0\r\n\t * @return {AbstractSoundInstance} A reference to itself, intended for chaining calls.\r\n\t */\r\n\tp._setPaused = function (value) {\r\n\t\tif ((value !== true && value !== false) || this._paused == value) {return;}\r\n\t\tif (value == true && this.playState != createjs.Sound.PLAY_SUCCEEDED) {return;}\r\n\t\tthis._paused = value;\r\n\t\tif(value) {\r\n\t\t\tthis._pause();\r\n\t\t} else {\r\n\t\t\tthis._resume();\r\n\t\t}\r\n\t\tclearTimeout(this.delayTimeoutId);\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Please use {{#crossLink \"AbstractSoundInstance/volume:property\"}}{{/crossLink}} directly as a property\r\n\t * @method _setVolume\r\n\t * @protected\r\n\t * @param {Number} value The volume to set, between 0 and 1.\r\n\t * @return {AbstractSoundInstance} A reference to itself, intended for chaining calls.\r\n\t */\r\n\tp._setVolume = function (value) {\r\n\t\tif (value == this._volume) { return this; }\r\n\t\tthis._volume = Math.max(0, Math.min(1, value));\r\n\t\tif (!this._muted) {\r\n\t\t\tthis._updateVolume();\r\n\t\t}\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Please use {{#crossLink \"AbstractSoundInstance/volume:property\"}}{{/crossLink}} directly as a property\r\n\t * @method _getVolume\r\n\t * @protected\r\n\t * @return {Number} The current volume of the sound instance.\r\n\t */\r\n\tp._getVolume = function () {\r\n\t\treturn this._volume;\r\n\t};\r\n\r\n\t/**\r\n\t * Please use {{#crossLink \"AbstractSoundInstance/muted:property\"}}{{/crossLink}} directly as a property\r\n\t * @method _setMuted\r\n\t * @protected\r\n\t * @param {Boolean} value If the sound should be muted.\r\n\t * @return {AbstractSoundInstance} A reference to itself, intended for chaining calls.\r\n\t * @since 0.6.0\r\n\t */\r\n\tp._setMuted = function (value) {\r\n\t\tif (value !== true && value !== false) {return;}\r\n\t\tthis._muted = value;\r\n\t\tthis._updateVolume();\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Please use {{#crossLink \"AbstractSoundInstance/muted:property\"}}{{/crossLink}} directly as a property\r\n\t * @method _getMuted\r\n\t * @protected\r\n\t * @return {Boolean} If the sound is muted.\r\n\t * @since 0.6.0\r\n\t */\r\n\tp._getMuted = function () {\r\n\t\treturn this._muted;\r\n\t};\r\n\r\n\t/**\r\n\t * Please use {{#crossLink \"AbstractSoundInstance/pan:property\"}}{{/crossLink}} directly as a property\r\n\t * @method _setPan\r\n\t * @protected\r\n\t * @param {Number} value The pan value, between -1 (left) and 1 (right).\r\n\t * @return {AbstractSoundInstance} Returns reference to itself for chaining calls\r\n\t */\r\n\tp._setPan = function (value) {\r\n\t\tif(value == this._pan) { return this; }\r\n\t\tthis._pan = Math.max(-1, Math.min(1, value));\r\n\t\tthis._updatePan();\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Please use {{#crossLink \"AbstractSoundInstance/pan:property\"}}{{/crossLink}} directly as a property\r\n\t * @method _getPan\r\n\t * @protected\r\n\t * @return {Number} The value of the pan, between -1 (left) and 1 (right).\r\n\t */\r\n\tp._getPan = function () {\r\n\t\treturn this._pan;\r\n\t};\r\n\r\n\t/**\r\n\t * Please use {{#crossLink \"AbstractSoundInstance/position:property\"}}{{/crossLink}} directly as a property\r\n\t * @method _getPosition\r\n\t * @protected\r\n\t * @return {Number} The position of the playhead in the sound, in milliseconds.\r\n\t */\r\n\tp._getPosition = function () {\r\n\t\tif (!this._paused && this.playState == createjs.Sound.PLAY_SUCCEEDED) {\r\n\t\t\tthis._position = this._calculateCurrentPosition();\r\n\t\t}\r\n\t\treturn this._position;\r\n\t};\r\n\r\n\t/**\r\n\t * Please use {{#crossLink \"AbstractSoundInstance/position:property\"}}{{/crossLink}} directly as a property\r\n\t * @method _setPosition\r\n\t * @protected\r\n\t * @param {Number} value The position to place the playhead, in milliseconds.\r\n\t * @return {AbstractSoundInstance} Returns reference to itself for chaining calls\r\n\t */\r\n\tp._setPosition = function (value) {\r\n\t\tthis._position = Math.max(0, value);\r\n\t\tif (this.playState == createjs.Sound.PLAY_SUCCEEDED) {\r\n\t\t\tthis._updatePosition();\r\n\t\t}\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Please use {{#crossLink \"AbstractSoundInstance/startTime:property\"}}{{/crossLink}} directly as a property\r\n\t * @method _getStartTime\r\n\t * @protected\r\n\t * @return {Number} The startTime of the sound instance in milliseconds.\r\n\t */\r\n\tp._getStartTime = function () {\r\n\t\treturn this._startTime;\r\n\t};\r\n\r\n\t/**\r\n\t * Please use {{#crossLink \"AbstractSoundInstance/startTime:property\"}}{{/crossLink}} directly as a property\r\n\t * @method _setStartTime\r\n\t * @protected\r\n\t * @param {number} value The new startTime time in milli seconds.\r\n\t * @return {AbstractSoundInstance} Returns reference to itself for chaining calls\r\n\t */\r\n\tp._setStartTime = function (value) {\r\n\t\tif (value == this._startTime) { return this; }\r\n\t\tthis._startTime = Math.max(0, value || 0);\r\n\t\tthis._updateStartTime();\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Please use {{#crossLink \"AbstractSoundInstance/duration:property\"}}{{/crossLink}} directly as a property\r\n\t * @method _getDuration\r\n\t * @protected\r\n\t * @return {Number} The duration of the sound instance in milliseconds.\r\n\t */\r\n\tp._getDuration = function () {\r\n\t\treturn this._duration;\r\n\t};\r\n\r\n\t/**\r\n\t * Please use {{#crossLink \"AbstractSoundInstance/duration:property\"}}{{/crossLink}} directly as a property\r\n\t * @method _setDuration\r\n\t * @protected\r\n\t * @param {number} value The new duration time in milli seconds.\r\n\t * @return {AbstractSoundInstance} Returns reference to itself for chaining calls\r\n\t * @since 0.6.0\r\n\t */\r\n\tp._setDuration = function (value) {\r\n\t\tif (value == this._duration) { return this; }\r\n\t\tthis._duration = Math.max(0, value || 0);\r\n\t\tthis._updateDuration();\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Please use {{#crossLink \"AbstractSoundInstance/playbackResource:property\"}}{{/crossLink}} directly as a property\r\n\t * @method _setPlaybackResource\r\n\t * @protected\r\n\t * @param {Object} value The new playback resource.\r\n\t * @return {AbstractSoundInstance} Returns reference to itself for chaining calls\r\n\t * @since 0.6.0\r\n\t **/\r\n\tp._setPlaybackResource = function (value) {\r\n\t\tthis._playbackResource = value;\r\n\t\tif (this._duration == 0 && this._playbackResource) { this._setDurationFromSource(); }\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Please use {{#crossLink \"AbstractSoundInstance/playbackResource:property\"}}{{/crossLink}} directly as a property\r\n\t * @method _getPlaybackResource\r\n\t * @protected\r\n\t * @param {Object} value The new playback resource.\r\n\t * @return {Object} playback resource used for playing audio\r\n\t * @since 0.6.0\r\n\t **/\r\n\tp._getPlaybackResource = function () {\r\n\t\treturn this._playbackResource;\r\n\t};\r\n\r\n\t/**\r\n\t * Please use {{#crossLink \"AbstractSoundInstance/loop:property\"}}{{/crossLink}} directly as a property\r\n\t * @method _getLoop\r\n\t * @protected\r\n\t * @return {number}\r\n\t * @since 0.6.0\r\n\t **/\r\n\tp._getLoop = function () {\r\n\t\treturn this._loop;\r\n\t};\r\n\r\n\t/**\r\n\t * Please use {{#crossLink \"AbstractSoundInstance/loop:property\"}}{{/crossLink}} directly as a property\r\n\t * @method _setLoop\r\n\t * @protected\r\n\t * @param {number} value The number of times to loop after play.\r\n\t * @since 0.6.0\r\n\t */\r\n\tp._setLoop = function (value) {\r\n\t\tif(this._playbackResource != null) {\r\n\t\t\t// remove looping\r\n\t\t\tif (this._loop != 0 && value == 0) {\r\n\t\t\t\tthis._removeLooping(value);\r\n\t\t\t}\r\n\t\t\t// add looping\r\n\t\t\telse if (this._loop == 0 && value != 0) {\r\n\t\t\t\tthis._addLooping(value);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis._loop = value;\r\n\t};\r\n\r\n\r\n// Private Methods:\r\n\t/**\r\n\t * A helper method that dispatches all events for AbstractSoundInstance.\r\n\t * @method _sendEvent\r\n\t * @param {String} type The event type\r\n\t * @protected\r\n\t */\r\n\tp._sendEvent = function (type) {\r\n\t\tvar event = new createjs.Event(type);\r\n\t\tthis.dispatchEvent(event);\r\n\t};\r\n\r\n\t/**\r\n\t * Clean up the instance. Remove references and clean up any additional properties such as timers.\r\n\t * @method _cleanUp\r\n\t * @protected\r\n\t */\r\n\tp._cleanUp = function () {\r\n\t\tclearTimeout(this.delayTimeoutId); // clear timeout that plays delayed sound\r\n\t\tthis._handleCleanUp();\r\n\t\tthis._paused = false;\r\n\r\n\t\tcreatejs.Sound._playFinished(this);\t// TODO change to an event\r\n\t};\r\n\r\n\t/**\r\n\t * The sound has been interrupted.\r\n\t * @method _interrupt\r\n\t * @protected\r\n\t */\r\n\tp._interrupt = function () {\r\n\t\tthis._cleanUp();\r\n\t\tthis.playState = createjs.Sound.PLAY_INTERRUPTED;\r\n\t\tthis._sendEvent(\"interrupted\");\r\n\t};\r\n\r\n\t/**\r\n\t * Called by the Sound class when the audio is ready to play (delay has completed). Starts sound playing if the\r\n\t * src is loaded, otherwise playback will fail.\r\n\t * @method _beginPlaying\r\n\t * @param {PlayPropsConfig} playProps A PlayPropsConfig object.\r\n\t * @return {Boolean} If playback succeeded.\r\n\t * @protected\r\n\t */\r\n\t// OJR FlashAudioSoundInstance overwrites\r\n\tp._beginPlaying = function (playProps) {\r\n\t\tthis._setPosition(playProps.offset);\r\n\t\tthis._setLoop(playProps.loop);\r\n\t\tthis._setVolume(playProps.volume);\r\n\t\tthis._setPan(playProps.pan);\r\n\t\tif (playProps.startTime != null) {\r\n\t\t\tthis._setStartTime(playProps.startTime);\r\n\t\t\tthis._setDuration(playProps.duration);\r\n\t\t}\r\n\r\n\t\tif (this._playbackResource != null && this._position < this._duration) {\r\n\t\t\tthis._paused = false;\r\n\t\t\tthis._handleSoundReady();\r\n\t\t\tthis.playState = createjs.Sound.PLAY_SUCCEEDED;\r\n\t\t\tthis._sendEvent(\"succeeded\");\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\tthis._playFailed();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Play has failed, which can happen for a variety of reasons.\r\n\t * Cleans up instance and dispatches failed event\r\n\t * @method _playFailed\r\n\t * @private\r\n\t */\r\n\tp._playFailed = function () {\r\n\t\tthis._cleanUp();\r\n\t\tthis.playState = createjs.Sound.PLAY_FAILED;\r\n\t\tthis._sendEvent(\"failed\");\r\n\t};\r\n\r\n\t/**\r\n\t * Audio has finished playing. Manually loop it if required.\r\n\t * @method _handleSoundComplete\r\n\t * @param event\r\n\t * @protected\r\n\t */\r\n\tp._handleSoundComplete = function (event) {\r\n\t\tthis._position = 0; // have to set this as it can be set by pause during playback\r\n\r\n\t\tif (this._loop != 0) {\r\n\t\t\tthis._loop--; // NOTE this introduces a theoretical limit on loops = float max size x 2 - 1\r\n\t\t\tthis._handleLoop();\r\n\t\t\tthis._sendEvent(\"loop\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._cleanUp();\r\n\t\tthis.playState = createjs.Sound.PLAY_FINISHED;\r\n\t\tthis._sendEvent(\"complete\");\r\n\t};\r\n\r\n// Plugin specific code\r\n\t/**\r\n\t * Handles starting playback when the sound is ready for playing.\r\n\t * @method _handleSoundReady\r\n\t * @protected\r\n \t */\r\n\tp._handleSoundReady = function () {\r\n\t\t// plugin specific code\r\n\t};\r\n\r\n\t/**\r\n\t * Internal function used to update the volume based on the instance volume, master volume, instance mute value,\r\n\t * and master mute value.\r\n\t * @method _updateVolume\r\n\t * @protected\r\n\t */\r\n\tp._updateVolume = function () {\r\n\t\t// plugin specific code\r\n\t};\r\n\r\n\t/**\r\n\t * Internal function used to update the pan\r\n\t * @method _updatePan\r\n\t * @protected\r\n\t * @since 0.6.0\r\n\t */\r\n\tp._updatePan = function () {\r\n\t\t// plugin specific code\r\n\t};\r\n\r\n\t/**\r\n\t * Internal function used to update the startTime of the audio.\r\n\t * @method _updateStartTime\r\n\t * @protected\r\n\t * @since 0.6.1\r\n\t */\r\n\tp._updateStartTime = function () {\r\n\t\t// plugin specific code\r\n\t};\r\n\r\n\t/**\r\n\t * Internal function used to update the duration of the audio.\r\n\t * @method _updateDuration\r\n\t * @protected\r\n\t * @since 0.6.0\r\n\t */\r\n\tp._updateDuration = function () {\r\n\t\t// plugin specific code\r\n\t};\r\n\r\n\t/**\r\n\t * Internal function used to get the duration of the audio from the source we'll be playing.\r\n\t * @method _updateDuration\r\n\t * @protected\r\n\t * @since 0.6.0\r\n\t */\r\n\tp._setDurationFromSource = function () {\r\n\t\t// plugin specific code\r\n\t};\r\n\r\n\t/**\r\n\t * Internal function that calculates the current position of the playhead and sets this._position to that value\r\n\t * @method _calculateCurrentPosition\r\n\t * @protected\r\n\t * @since 0.6.0\r\n\t */\r\n\tp._calculateCurrentPosition = function () {\r\n\t\t// plugin specific code that sets this.position\r\n\t};\r\n\r\n\t/**\r\n\t * Internal function used to update the position of the playhead.\r\n\t * @method _updatePosition\r\n\t * @protected\r\n\t * @since 0.6.0\r\n\t */\r\n\tp._updatePosition = function () {\r\n\t\t// plugin specific code\r\n\t};\r\n\r\n\t/**\r\n\t * Internal function called when looping is removed during playback.\r\n\t * @method _removeLooping\r\n\t * @param {number} value The number of times to loop after play.\r\n\t * @protected\r\n\t * @since 0.6.0\r\n\t */\r\n\tp._removeLooping = function (value) {\r\n\t\t// plugin specific code\r\n\t};\r\n\r\n\t/**\r\n\t * Internal function called when looping is added during playback.\r\n\t * @method _addLooping\r\n\t * @param {number} value The number of times to loop after play.\r\n\t * @protected\r\n\t * @since 0.6.0\r\n\t */\r\n\tp._addLooping = function (value) {\r\n\t\t// plugin specific code\r\n\t};\r\n\r\n\t/**\r\n\t * Internal function called when pausing playback\r\n\t * @method _pause\r\n\t * @protected\r\n\t * @since 0.6.0\r\n\t */\r\n\tp._pause = function () {\r\n\t\t// plugin specific code\r\n\t};\r\n\r\n\t/**\r\n\t * Internal function called when resuming playback\r\n\t * @method _resume\r\n\t * @protected\r\n\t * @since 0.6.0\r\n\t */\r\n\tp._resume = function () {\r\n\t\t// plugin specific code\r\n\t};\r\n\r\n\t/**\r\n\t * Internal function called when stopping playback\r\n\t * @method _handleStop\r\n\t * @protected\r\n\t * @since 0.6.0\r\n\t */\r\n\tp._handleStop = function() {\r\n\t\t// plugin specific code\r\n\t};\r\n\r\n\t/**\r\n\t * Internal function called when AbstractSoundInstance is being cleaned up\r\n\t * @method _handleCleanUp\r\n\t * @protected\r\n\t * @since 0.6.0\r\n\t */\r\n\tp._handleCleanUp = function() {\r\n\t\t// plugin specific code\r\n\t};\r\n\r\n\t/**\r\n\t * Internal function called when AbstractSoundInstance has played to end and is looping\r\n\t * @method _handleLoop\r\n\t * @protected\r\n\t * @since 0.6.0\r\n\t */\r\n\tp._handleLoop = function () {\r\n\t\t// plugin specific code\r\n\t};\r\n\r\n\tcreatejs.AbstractSoundInstance = createjs.promote(AbstractSoundInstance, \"EventDispatcher\");\r\n\tcreatejs.DefaultSoundInstance = createjs.AbstractSoundInstance;\t// used when no plugin is supported\r\n}());\r\n\r\n//##############################################################################\r\n// AbstractPlugin.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor:\r\n \t/**\r\n\t * A default plugin class used as a base for all other plugins.\r\n\t * @class AbstractPlugin\r\n\t * @constructor\r\n\t * @since 0.6.0\r\n\t */\r\n\r\n\tvar AbstractPlugin = function () {\r\n\t// private properties:\r\n\t\t/**\r\n\t\t * The capabilities of the plugin.\r\n\t\t * method and is used internally.\r\n\t\t * @property _capabilities\r\n\t\t * @type {Object}\r\n\t\t * @default null\r\n\t\t * @protected\r\n\t\t * @static\r\n\t\t */\r\n\t\tthis._capabilities = null;\r\n\r\n\t\t/**\r\n\t\t * Object hash indexed by the source URI of all created loaders, used to properly destroy them if sources are removed.\r\n\t\t * @type {Object}\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._loaders = {};\r\n\r\n\t\t/**\r\n\t\t * Object hash indexed by the source URI of each file to indicate if an audio source has begun loading,\r\n\t\t * is currently loading, or has completed loading. Can be used to store non boolean data after loading\r\n\t\t * is complete (for example arrayBuffers for web audio).\r\n\t\t * @property _audioSources\r\n\t\t * @type {Object}\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._audioSources = {};\r\n\r\n\t\t/**\r\n\t\t * Object hash indexed by the source URI of all created SoundInstances, updates the playbackResource if it loads after they are created,\r\n\t\t * and properly destroy them if sources are removed\r\n\t\t * @type {Object}\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._soundInstances = {};\r\n\r\n\t\t/**\r\n\t\t * The internal master volume value of the plugin.\r\n\t\t * @property _volume\r\n\t\t * @type {Number}\r\n\t\t * @default 1\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._volume = 1;\r\n\r\n\t\t/**\r\n\t\t * A reference to a loader class used by a plugin that must be set.\r\n\t\t * @type {Object}\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._loaderClass;\r\n\r\n\t\t/**\r\n\t\t * A reference to an AbstractSoundInstance class used by a plugin that must be set.\r\n\t\t * @type {Object}\r\n\t\t * @protected;\r\n\t\t */\r\n\t\tthis._soundInstanceClass;\r\n\t};\r\n\tvar p = AbstractPlugin.prototype;\r\n\r\n// Static Properties:\r\n// NOTE THESE PROPERTIES NEED TO BE ADDED TO EACH PLUGIN\r\n\t/**\r\n\t * The capabilities of the plugin. This is generated via the _generateCapabilities method and is used internally.\r\n\t * @property _capabilities\r\n\t * @type {Object}\r\n\t * @default null\r\n\t * @private\r\n\t * @static\r\n\t */\r\n\tAbstractPlugin._capabilities = null;\r\n\r\n\t/**\r\n\t * Determine if the plugin can be used in the current browser/OS.\r\n\t * @method isSupported\r\n\t * @return {Boolean} If the plugin can be initialized.\r\n\t * @static\r\n\t */\r\n\tAbstractPlugin.isSupported = function () {\r\n\t\treturn true;\r\n\t};\r\n\r\n\r\n// public methods:\r\n\t/**\r\n\t * Pre-register a sound for preloading and setup. This is called by {{#crossLink \"Sound\"}}{{/crossLink}}.\r\n\t * Note all plugins provide a Loader instance, which PreloadJS\r\n\t * can use to assist with preloading.\r\n\t * @method register\r\n\t * @param {String} loadItem An Object containing the source of the audio\r\n\t * Note that not every plugin will manage this value.\r\n\t * @return {Object} A result object, containing a \"tag\" for preloading purposes.\r\n\t */\r\n\tp.register = function (loadItem) {\r\n\t\tvar loader = this._loaders[loadItem.src];\r\n\t\tif(loader && !loader.canceled) {return this._loaders[loadItem.src];}\t// already loading/loaded this, so don't load twice\r\n\t\t// OJR potential issue that we won't be firing loaded event, might need to trigger if this is already loaded?\r\n\t\tthis._audioSources[loadItem.src] = true;\r\n\t\tthis._soundInstances[loadItem.src] = [];\r\n\t\tloader = new this._loaderClass(loadItem);\r\n\t\tloader.on(\"complete\", this._handlePreloadComplete, this);\r\n\t\tthis._loaders[loadItem.src] = loader;\r\n\t\treturn loader;\r\n\t};\r\n\r\n\t// note sound calls register before calling preload\r\n\t/**\r\n\t * Internally preload a sound.\r\n\t * @method preload\r\n\t * @param {Loader} loader The sound URI to load.\r\n\t */\r\n\tp.preload = function (loader) {\r\n\t\tloader.on(\"error\", this._handlePreloadError, this);\r\n\t\tloader.load();\r\n\t};\r\n\r\n\t/**\r\n\t * Checks if preloading has started for a specific source. If the source is found, we can assume it is loading,\r\n\t * or has already finished loading.\r\n\t * @method isPreloadStarted\r\n\t * @param {String} src The sound URI to check.\r\n\t * @return {Boolean}\r\n\t */\r\n\tp.isPreloadStarted = function (src) {\r\n\t\treturn (this._audioSources[src] != null);\r\n\t};\r\n\r\n\t/**\r\n\t * Checks if preloading has finished for a specific source.\r\n\t * @method isPreloadComplete\r\n\t * @param {String} src The sound URI to load.\r\n\t * @return {Boolean}\r\n\t */\r\n\tp.isPreloadComplete = function (src) {\r\n\t\treturn (!(this._audioSources[src] == null || this._audioSources[src] == true));\r\n\t};\r\n\r\n\t/**\r\n\t * Remove a sound added using {{#crossLink \"WebAudioPlugin/register\"}}{{/crossLink}}. Note this does not cancel a preload.\r\n\t * @method removeSound\r\n\t * @param {String} src The sound URI to unload.\r\n\t */\r\n\tp.removeSound = function (src) {\r\n\t\tif (!this._soundInstances[src]) { return; }\r\n\t\tfor (var i = this._soundInstances[src].length; i--; ) {\r\n\t\t\tvar item = this._soundInstances[src][i];\r\n\t\t\titem.destroy();\r\n\t\t}\r\n\t\tdelete(this._soundInstances[src]);\r\n\t\tdelete(this._audioSources[src]);\r\n\t\tif(this._loaders[src]) { this._loaders[src].destroy(); }\r\n\t\tdelete(this._loaders[src]);\r\n\t};\r\n\r\n\t/**\r\n\t * Remove all sounds added using {{#crossLink \"WebAudioPlugin/register\"}}{{/crossLink}}. Note this does not cancel a preload.\r\n\t * @method removeAllSounds\r\n\t * @param {String} src The sound URI to unload.\r\n\t */\r\n\tp.removeAllSounds = function () {\r\n\t\tfor(var key in this._audioSources) {\r\n\t\t\tthis.removeSound(key);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Create a sound instance. If the sound has not been preloaded, it is internally preloaded here.\r\n\t * @method create\r\n\t * @param {String} src The sound source to use.\r\n\t * @param {Number} startTime Audio sprite property used to apply an offset, in milliseconds.\r\n\t * @param {Number} duration Audio sprite property used to set the time the clip plays for, in milliseconds.\r\n\t * @return {AbstractSoundInstance} A sound instance for playback and control.\r\n\t */\r\n\tp.create = function (src, startTime, duration) {\r\n\t\tif (!this.isPreloadStarted(src)) {\r\n\t\t\tthis.preload(this.register(src));\r\n\t\t}\r\n\t\tvar si = new this._soundInstanceClass(src, startTime, duration, this._audioSources[src]);\r\n\t\tif(this._soundInstances[src]){\r\n\t\t\tthis._soundInstances[src].push(si);\r\n\t\t}\r\n\r\n\t\t// Plugins that don't have a setVolume should implement a setMasterVolune/setMasterMute\r\n\t\t// So we have to check that here.\r\n\t\tsi.setMasterVolume && si.setMasterVolume(createjs.Sound.volume);\r\n\t\tsi.setMasterMute && si.setMasterMute(createjs.Sound.muted);\r\n\r\n\t\treturn si;\r\n\t};\r\n\r\n\t// if a plugin does not support volume and mute, it should set these to null\r\n\t/**\r\n\t * Set the master volume of the plugin, which affects all SoundInstances.\r\n\t * @method setVolume\r\n\t * @param {Number} value The volume to set, between 0 and 1.\r\n\t * @return {Boolean} If the plugin processes the setVolume call (true). The Sound class will affect all the\r\n\t * instances manually otherwise.\r\n\t */\r\n\tp.setVolume = function (value) {\r\n\t\tthis._volume = value;\r\n\t\tthis._updateVolume();\r\n\t\treturn true;\r\n\t};\r\n\r\n\t/**\r\n\t * Get the master volume of the plugin, which affects all SoundInstances.\r\n\t * @method getVolume\r\n\t * @return {Number} The volume level, between 0 and 1.\r\n\t */\r\n\tp.getVolume = function () {\r\n\t\treturn this._volume;\r\n\t};\r\n\r\n\t/**\r\n\t * Mute all sounds via the plugin.\r\n\t * @method setMute\r\n\t * @param {Boolean} value If all sound should be muted or not. Note that plugin-level muting just looks up\r\n\t * the mute value of Sound {{#crossLink \"Sound/muted:property\"}}{{/crossLink}}, so this property is not used here.\r\n\t * @return {Boolean} If the mute call succeeds.\r\n\t */\r\n\tp.setMute = function (value) {\r\n\t\tthis._updateVolume();\r\n\t\treturn true;\r\n\t};\r\n\r\n\t// plugins should overwrite this method\r\n\tp.toString = function () {\r\n\t\treturn \"[AbstractPlugin]\";\r\n\t};\r\n\r\n\r\n// private methods:\r\n\t/**\r\n\t * Handles internal preload completion.\r\n\t * @method _handlePreloadComplete\r\n\t * @param event\r\n\t * @protected\r\n\t */\r\n\tp._handlePreloadComplete = function (event) {\r\n\t\tvar src = event.target.getItem().src;\r\n\t\tthis._audioSources[src] = event.result;\r\n\t\tfor (var i = 0, l = this._soundInstances[src].length; i < l; i++) {\r\n\t\t\tvar item = this._soundInstances[src][i];\r\n\t\t\titem.setPlaybackResource(this._audioSources[src]);\r\n\t\t\t// ToDo consider adding play call here if playstate == playfailed\r\n\t\t\tthis._soundInstances[src] = null;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Handles internal preload errors\r\n\t * @method _handlePreloadError\r\n\t * @param event\r\n\t * @protected\r\n\t */\r\n\tp._handlePreloadError = function(event) {\r\n\t\t//delete(this._audioSources[src]);\r\n\t};\r\n\r\n\t/**\r\n\t * Set the gain value for master audio. Should not be called externally.\r\n\t * @method _updateVolume\r\n\t * @protected\r\n\t */\r\n\tp._updateVolume = function () {\r\n\t\t// Plugin Specific code\r\n\t};\r\n\r\n\tcreatejs.AbstractPlugin = AbstractPlugin;\r\n}());\r\n\r\n//##############################################################################\r\n// WebAudioLoader.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\t/**\r\n\t * Loader provides a mechanism to preload Web Audio content via PreloadJS or internally. Instances are returned to\r\n\t * the preloader, and the load method is called when the asset needs to be requested.\r\n\t *\r\n\t * @class WebAudioLoader\r\n\t * @param {String} loadItem The item to be loaded\r\n\t * @extends XHRRequest\r\n\t * @protected\r\n\t */\r\n\tfunction Loader(loadItem) {\r\n\t\tthis.AbstractLoader_constructor(loadItem, true, createjs.Types.SOUND);\r\n\r\n\t};\r\n\tvar p = createjs.extend(Loader, createjs.AbstractLoader);\r\n\r\n\t/**\r\n\t * web audio context required for decoding audio\r\n\t * @property context\r\n\t * @type {AudioContext}\r\n\t * @static\r\n\t */\r\n\tLoader.context = null;\r\n\r\n\r\n// public methods\r\n\tp.toString = function () {\r\n\t\treturn \"[WebAudioLoader]\";\r\n\t};\r\n\r\n\r\n// private methods\r\n\tp._createRequest = function() {\r\n\t\tthis._request = new createjs.XHRRequest(this._item, false);\r\n\t\tthis._request.setResponseType(\"arraybuffer\");\r\n\t};\r\n\r\n\tp._sendComplete = function (event) {\r\n\t\t// OJR we leave this wrapped in Loader because we need to reference src and the handler only receives a single argument, the decodedAudio\r\n\t\tLoader.context.decodeAudioData(this._rawResult,\r\n\t createjs.proxy(this._handleAudioDecoded, this),\r\n\t createjs.proxy(this._sendError, this));\r\n\t};\r\n\r\n\r\n\t/**\r\n\t* The audio has been decoded.\r\n\t* @method handleAudioDecoded\r\n\t* @param decoded\r\n\t* @protected\r\n\t*/\r\n\tp._handleAudioDecoded = function (decodedAudio) {\r\n\t\tthis._result = decodedAudio;\r\n\t\tthis.AbstractLoader__sendComplete();\r\n\t};\r\n\r\n\tcreatejs.WebAudioLoader = createjs.promote(Loader, \"AbstractLoader\");\r\n}());\r\n\r\n//##############################################################################\r\n// WebAudioSoundInstance.js\r\n//##############################################################################\r\n\r\n/**\r\n * WebAudioSoundInstance extends the base api of {{#crossLink \"AbstractSoundInstance\"}}{{/crossLink}} and is used by\r\n * {{#crossLink \"WebAudioPlugin\"}}{{/crossLink}}.\r\n *\r\n * WebAudioSoundInstance exposes audioNodes for advanced users.\r\n *\r\n * @param {String} src The path to and file name of the sound.\r\n * @param {Number} startTime Audio sprite property used to apply an offset, in milliseconds.\r\n * @param {Number} duration Audio sprite property used to set the time the clip plays for, in milliseconds.\r\n * @param {Object} playbackResource Any resource needed by plugin to support audio playback.\r\n * @class WebAudioSoundInstance\r\n * @extends AbstractSoundInstance\r\n * @constructor\r\n */\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\tfunction WebAudioSoundInstance(src, startTime, duration, playbackResource) {\r\n\t\tthis.AbstractSoundInstance_constructor(src, startTime, duration, playbackResource);\r\n\r\n\r\n// public properties\r\n\t\t/**\r\n\t\t * NOTE this is only intended for use by advanced users.\r\n\t\t *
        GainNode for controlling WebAudioSoundInstance volume. Connected to the {{#crossLink \"WebAudioSoundInstance/destinationNode:property\"}}{{/crossLink}}.\r\n\t\t * @property gainNode\r\n\t\t * @type {AudioGainNode}\r\n\t\t * @since 0.4.0\r\n\t\t *\r\n\t\t */\r\n\t\tthis.gainNode = s.context.createGain();\r\n\r\n\t\t/**\r\n\t\t * NOTE this is only intended for use by advanced users.\r\n\t\t *
        A panNode allowing left and right audio channel panning only. Connected to WebAudioSoundInstance {{#crossLink \"WebAudioSoundInstance/gainNode:property\"}}{{/crossLink}}.\r\n\t\t * @property panNode\r\n\t\t * @type {AudioPannerNode}\r\n\t\t * @since 0.4.0\r\n\t\t */\r\n\t\tthis.panNode = s.context.createPanner();\r\n\t\tthis.panNode.panningModel = s._panningModel;\r\n\t\tthis.panNode.connect(this.gainNode);\r\n\t\tthis._updatePan();\r\n\r\n\t\t/**\r\n\t\t * NOTE this is only intended for use by advanced users.\r\n\t\t *
        sourceNode is the audio source. Connected to WebAudioSoundInstance {{#crossLink \"WebAudioSoundInstance/panNode:property\"}}{{/crossLink}}.\r\n\t\t * @property sourceNode\r\n\t\t * @type {AudioNode}\r\n\t\t * @since 0.4.0\r\n\t\t *\r\n\t\t */\r\n\t\tthis.sourceNode = null;\r\n\r\n\r\n// private properties\r\n\t\t/**\r\n\t\t * Timeout that is created internally to handle sound playing to completion.\r\n\t\t * Stored so we can remove it when stop, pause, or cleanup are called\r\n\t\t * @property _soundCompleteTimeout\r\n\t\t * @type {timeoutVariable}\r\n\t\t * @default null\r\n\t\t * @protected\r\n\t\t * @since 0.4.0\r\n\t\t */\r\n\t\tthis._soundCompleteTimeout = null;\r\n\r\n\t\t/**\r\n\t\t * NOTE this is only intended for use by very advanced users.\r\n\t\t * _sourceNodeNext is the audio source for the next loop, inserted in a look ahead approach to allow for smooth\r\n\t\t * looping. Connected to {{#crossLink \"WebAudioSoundInstance/gainNode:property\"}}{{/crossLink}}.\r\n\t\t * @property _sourceNodeNext\r\n\t\t * @type {AudioNode}\r\n\t\t * @default null\r\n\t\t * @protected\r\n\t\t * @since 0.4.1\r\n\t\t *\r\n\t\t */\r\n\t\tthis._sourceNodeNext = null;\r\n\r\n\t\t/**\r\n\t\t * Time audio started playback, in seconds. Used to handle set position, get position, and resuming from paused.\r\n\t\t * @property _playbackStartTime\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t * @protected\r\n\t\t * @since 0.4.0\r\n\t\t */\r\n\t\tthis._playbackStartTime = 0;\r\n\r\n\t\t// Proxies, make removing listeners easier.\r\n\t\tthis._endedHandler = createjs.proxy(this._handleSoundComplete, this);\r\n\t};\r\n\tvar p = createjs.extend(WebAudioSoundInstance, createjs.AbstractSoundInstance);\r\n\tvar s = WebAudioSoundInstance;\r\n\r\n\t/**\r\n\t * Note this is only intended for use by advanced users.\r\n\t *
        Audio context used to create nodes. This is and needs to be the same context used by {{#crossLink \"WebAudioPlugin\"}}{{/crossLink}}.\r\n \t * @property context\r\n\t * @type {AudioContext}\r\n\t * @static\r\n\t * @since 0.6.0\r\n\t */\r\n\ts.context = null;\r\n\r\n\t/**\r\n\t * Note this is only intended for use by advanced users.\r\n\t *
        The scratch buffer that will be assigned to the buffer property of a source node on close. \r\n\t * This is and should be the same scratch buffer referenced by {{#crossLink \"WebAudioPlugin\"}}{{/crossLink}}.\r\n \t * @property _scratchBuffer\r\n\t * @type {AudioBufferSourceNode}\r\n\t * @static\r\n\t */\r\n\ts._scratchBuffer = null;\r\n\r\n\t/**\r\n\t * Note this is only intended for use by advanced users.\r\n\t *
        Audio node from WebAudioPlugin that sequences to context.destination\r\n\t * @property destinationNode\r\n\t * @type {AudioNode}\r\n\t * @static\r\n\t * @since 0.6.0\r\n\t */\r\n\ts.destinationNode = null;\r\n\r\n\t/**\r\n\t * Value to set panning model to equal power for WebAudioSoundInstance. Can be \"equalpower\" or 0 depending on browser implementation.\r\n\t * @property _panningModel\r\n\t * @type {Number / String}\r\n\t * @protected\r\n\t * @static\r\n\t * @since 0.6.0\r\n\t */\r\n\ts._panningModel = \"equalpower\";\r\n\r\n\r\n// Public methods\r\n\tp.destroy = function() {\r\n\t\tthis.AbstractSoundInstance_destroy();\r\n\r\n\t\tthis.panNode.disconnect(0);\r\n\t\tthis.panNode = null;\r\n\t\tthis.gainNode.disconnect(0);\r\n\t\tthis.gainNode = null;\r\n\t};\r\n\r\n\tp.toString = function () {\r\n\t\treturn \"[WebAudioSoundInstance]\";\r\n\t};\r\n\r\n\r\n// Private Methods\r\n\tp._updatePan = function() {\r\n\t\tthis.panNode.setPosition(this._pan, 0, -0.5);\r\n\t\t// z need to be -0.5 otherwise the sound only plays in left, right, or center\r\n\t};\r\n\r\n\tp._removeLooping = function(value) {\r\n\t\tthis._sourceNodeNext = this._cleanUpAudioNode(this._sourceNodeNext);\r\n\t};\r\n\r\n\tp._addLooping = function(value) {\r\n\t\tif (this.playState != createjs.Sound.PLAY_SUCCEEDED) { return; }\r\n\t\tthis._sourceNodeNext = this._createAndPlayAudioNode(this._playbackStartTime, 0);\r\n\t};\r\n\r\n\tp._setDurationFromSource = function () {\r\n\t\tthis._duration = this.playbackResource.duration * 1000;\r\n\t};\r\n\r\n\tp._handleCleanUp = function () {\r\n\t\tif (this.sourceNode && this.playState == createjs.Sound.PLAY_SUCCEEDED) {\r\n\t\t\tthis.sourceNode = this._cleanUpAudioNode(this.sourceNode);\r\n\t\t\tthis._sourceNodeNext = this._cleanUpAudioNode(this._sourceNodeNext);\r\n\t\t}\r\n\r\n\t\tif (this.gainNode.numberOfOutputs != 0) {this.gainNode.disconnect(0);}\r\n\t\t// OJR there appears to be a bug that this doesn't always work in webkit (Chrome and Safari). According to the documentation, this should work.\r\n\r\n\t\tclearTimeout(this._soundCompleteTimeout);\r\n\r\n\t\tthis._playbackStartTime = 0;\t// This is used by _getPosition\r\n\t};\r\n\r\n\t/**\r\n\t * Turn off and disconnect an audioNode, then set reference to null to release it for garbage collection\r\n\t * @method _cleanUpAudioNode\r\n\t * @param audioNode\r\n\t * @return {audioNode}\r\n\t * @protected\r\n\t * @since 0.4.1\r\n\t */\r\n\tp._cleanUpAudioNode = function(audioNode) {\r\n\t\tif(audioNode) {\r\n\t\t\taudioNode.stop(0);\r\n\t\t\taudioNode.disconnect(0);\r\n\t\t\t// necessary to prevent leak on iOS Safari 7-9. will throw in almost all other\r\n\t\t\t// browser implementations.\r\n\t\t\tif ( createjs.BrowserDetect.isIOS ) {\r\n\t\t\t\ttry { audioNode.buffer = s._scratchBuffer; } catch(e) {}\r\n\t\t\t}\r\n\t\t\taudioNode = null;\r\n\t\t}\r\n\t\treturn audioNode;\r\n\t};\r\n\r\n\tp._handleSoundReady = function (event) {\r\n\t\tthis.gainNode.connect(s.destinationNode); // this line can cause a memory leak. Nodes need to be disconnected from the audioDestination or any sequence that leads to it.\r\n\r\n\t\tvar dur = this._duration * 0.001,\r\n\t\t\tpos = Math.min(Math.max(0, this._position) * 0.001, dur);\r\n\t\tthis.sourceNode = this._createAndPlayAudioNode((s.context.currentTime - dur), pos);\r\n\t\tthis._playbackStartTime = this.sourceNode.startTime - pos;\r\n\r\n\t\tthis._soundCompleteTimeout = setTimeout(this._endedHandler, (dur - pos) * 1000);\r\n\r\n\t\tif(this._loop != 0) {\r\n\t\t\tthis._sourceNodeNext = this._createAndPlayAudioNode(this._playbackStartTime, 0);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Creates an audio node using the current src and context, connects it to the gain node, and starts playback.\r\n\t * @method _createAndPlayAudioNode\r\n\t * @param {Number} startTime The time to add this to the web audio context, in seconds.\r\n\t * @param {Number} offset The amount of time into the src audio to start playback, in seconds.\r\n\t * @return {audioNode}\r\n\t * @protected\r\n\t * @since 0.4.1\r\n\t */\r\n\tp._createAndPlayAudioNode = function(startTime, offset) {\r\n\t\tvar audioNode = s.context.createBufferSource();\r\n\t\taudioNode.buffer = this.playbackResource;\r\n\t\taudioNode.connect(this.panNode);\r\n\t\tvar dur = this._duration * 0.001;\r\n\t\taudioNode.startTime = startTime + dur;\r\n\t\taudioNode.start(audioNode.startTime, offset+(this._startTime*0.001), dur - offset);\r\n\t\treturn audioNode;\r\n\t};\r\n\r\n\tp._pause = function () {\r\n\t\tthis._position = (s.context.currentTime - this._playbackStartTime) * 1000; // * 1000 to give milliseconds, lets us restart at same point\r\n\t\tthis.sourceNode = this._cleanUpAudioNode(this.sourceNode);\r\n\t\tthis._sourceNodeNext = this._cleanUpAudioNode(this._sourceNodeNext);\r\n\r\n\t\tif (this.gainNode.numberOfOutputs != 0) {this.gainNode.disconnect(0);}\r\n\r\n\t\tclearTimeout(this._soundCompleteTimeout);\r\n\t};\r\n\r\n\tp._resume = function () {\r\n\t\tthis._handleSoundReady();\r\n\t};\r\n\r\n\t/*\r\n\tp._handleStop = function () {\r\n\t\t// web audio does not need to do anything extra\r\n\t};\r\n\t*/\r\n\r\n\tp._updateVolume = function () {\r\n\t\tvar newVolume = this._muted ? 0 : this._volume;\r\n\t \tif (newVolume != this.gainNode.gain.value) {\r\n\t\t this.gainNode.gain.value = newVolume;\r\n \t\t}\r\n\t};\r\n\r\n\tp._calculateCurrentPosition = function () {\r\n\t\treturn ((s.context.currentTime - this._playbackStartTime) * 1000); // pos in seconds * 1000 to give milliseconds\r\n\t};\r\n\r\n\tp._updatePosition = function () {\r\n\t\tthis.sourceNode = this._cleanUpAudioNode(this.sourceNode);\r\n\t\tthis._sourceNodeNext = this._cleanUpAudioNode(this._sourceNodeNext);\r\n\t\tclearTimeout(this._soundCompleteTimeout);\r\n\r\n\t\tif (!this._paused) {this._handleSoundReady();}\r\n\t};\r\n\r\n\t// OJR we are using a look ahead approach to ensure smooth looping.\r\n\t// We add _sourceNodeNext to the audio context so that it starts playing even if this callback is delayed.\r\n\t// This technique is described here: http://www.html5rocks.com/en/tutorials/audio/scheduling/\r\n\t// NOTE the cost of this is that our audio loop may not always match the loop event timing precisely.\r\n\tp._handleLoop = function () {\r\n\t\tthis._cleanUpAudioNode(this.sourceNode);\r\n\t\tthis.sourceNode = this._sourceNodeNext;\r\n\t\tthis._playbackStartTime = this.sourceNode.startTime;\r\n\t\tthis._sourceNodeNext = this._createAndPlayAudioNode(this._playbackStartTime, 0);\r\n\t\tthis._soundCompleteTimeout = setTimeout(this._endedHandler, this._duration);\r\n\t};\r\n\r\n\tp._updateDuration = function () {\r\n\t\tif(this.playState == createjs.Sound.PLAY_SUCCEEDED) {\r\n\t\t\tthis._pause();\r\n\t\t\tthis._resume();\r\n\t\t}\r\n\t};\r\n\r\n\tcreatejs.WebAudioSoundInstance = createjs.promote(WebAudioSoundInstance, \"AbstractSoundInstance\");\r\n}());\r\n\r\n//##############################################################################\r\n// WebAudioPlugin.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\r\n\t\"use strict\";\r\n\r\n\t/**\r\n\t * Play sounds using Web Audio in the browser. The WebAudioPlugin is currently the default plugin, and will be used\r\n\t * anywhere that it is supported. To change plugin priority, check out the Sound API\r\n\t * {{#crossLink \"Sound/registerPlugins\"}}{{/crossLink}} method.\r\n\r\n\t *

        Known Browser and OS issues for Web Audio

        \r\n\t * Firefox 25\r\n\t *
      • \r\n\t * mp3 audio files do not load properly on all windows machines, reported here.\r\n\t *
        For this reason it is recommended to pass another FireFox-supported type (i.e. ogg) as the default\r\n\t * extension, until this bug is resolved\r\n\t *
      • \r\n\t *\r\n\t * Webkit (Chrome and Safari)\r\n\t *
      • \r\n\t * AudioNode.disconnect does not always seem to work. This can cause the file size to grow over time if you\r\n\t * \t are playing a lot of audio files.\r\n\t *
      • \r\n\t *\r\n\t * iOS 6 limitations\r\n\t *
          \r\n\t *
        • \r\n\t * Sound is initially muted and will only unmute through play being called inside a user initiated event\r\n\t * (touch/click). Please read the mobile playback notes in the the {{#crossLink \"Sound\"}}{{/crossLink}}\r\n\t * class for a full overview of the limitations, and how to get around them.\r\n\t *
        • \r\n\t *\t
        • \r\n\t *\t A bug exists that will distort un-cached audio when a video element is present in the DOM. You can avoid\r\n\t *\t this bug by ensuring the audio and video audio share the same sample rate.\r\n\t *\t
        • \r\n\t *
        \r\n\t * @class WebAudioPlugin\r\n\t * @extends AbstractPlugin\r\n\t * @constructor\r\n\t * @since 0.4.0\r\n\t */\r\n\tfunction WebAudioPlugin() {\r\n\t\tthis.AbstractPlugin_constructor();\r\n\r\n\r\n// Private Properties\r\n\t\t/**\r\n\t\t * Value to set panning model to equal power for WebAudioSoundInstance. Can be \"equalpower\" or 0 depending on browser implementation.\r\n\t\t * @property _panningModel\r\n\t\t * @type {Number / String}\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._panningModel = s._panningModel;;\r\n\r\n\t\t/**\r\n\t\t * The web audio context, which WebAudio uses to play audio. All nodes that interact with the WebAudioPlugin\r\n\t\t * need to be created within this context.\r\n\t\t * @property context\r\n\t\t * @type {AudioContext}\r\n\t\t */\r\n\t\tthis.context = s.context;\r\n\r\n\t\t/**\r\n\t\t * A DynamicsCompressorNode, which is used to improve sound quality and prevent audio distortion.\r\n\t\t * It is connected to context.destination.\r\n\t\t *\r\n\t\t * Can be accessed by advanced users through createjs.Sound.activePlugin.dynamicsCompressorNode.\r\n\t\t * @property dynamicsCompressorNode\r\n\t\t * @type {AudioNode}\r\n\t\t */\r\n\t\tthis.dynamicsCompressorNode = this.context.createDynamicsCompressor();\r\n\t\tthis.dynamicsCompressorNode.connect(this.context.destination);\r\n\r\n\t\t/**\r\n\t\t * A GainNode for controlling master volume. It is connected to {{#crossLink \"WebAudioPlugin/dynamicsCompressorNode:property\"}}{{/crossLink}}.\r\n\t\t *\r\n\t\t * Can be accessed by advanced users through createjs.Sound.activePlugin.gainNode.\r\n\t\t * @property gainNode\r\n\t\t * @type {AudioGainNode}\r\n\t\t */\r\n\t\tthis.gainNode = this.context.createGain();\r\n\t\tthis.gainNode.connect(this.dynamicsCompressorNode);\r\n\t\tcreatejs.WebAudioSoundInstance.destinationNode = this.gainNode;\r\n\r\n\t\tthis._capabilities = s._capabilities;\r\n\r\n\t\tthis._loaderClass = createjs.WebAudioLoader;\r\n\t\tthis._soundInstanceClass = createjs.WebAudioSoundInstance;\r\n\r\n\t\tthis._addPropsToClasses();\r\n\t}\r\n\tvar p = createjs.extend(WebAudioPlugin, createjs.AbstractPlugin);\r\n\r\n// Static Properties\r\n\tvar s = WebAudioPlugin;\r\n\t/**\r\n\t * The capabilities of the plugin. This is generated via the {{#crossLink \"WebAudioPlugin/_generateCapabilities:method\"}}{{/crossLink}}\r\n\t * method and is used internally.\r\n\t * @property _capabilities\r\n\t * @type {Object}\r\n\t * @default null\r\n\t * @private\r\n\t * @static\r\n\t */\r\n\ts._capabilities = null;\r\n\r\n\t/**\r\n\t * Value to set panning model to equal power for WebAudioSoundInstance. Can be \"equalpower\" or 0 depending on browser implementation.\r\n\t * @property _panningModel\r\n\t * @type {Number / String}\r\n\t * @private\r\n\t * @static\r\n\t */\r\n\ts._panningModel = \"equalpower\";\r\n\r\n\t/**\r\n\t * The web audio context, which WebAudio uses to play audio. All nodes that interact with the WebAudioPlugin\r\n\t * need to be created within this context.\r\n\t *\r\n\t * Advanced users can set this to an existing context, but must do so before they call\r\n\t * {{#crossLink \"Sound/registerPlugins\"}}{{/crossLink}} or {{#crossLink \"Sound/initializeDefaultPlugins\"}}{{/crossLink}}.\r\n\t *\r\n\t * @property context\r\n\t * @type {AudioContext}\r\n\t * @static\r\n\t */\r\n\ts.context = null;\r\n\r\n\t/**\r\n\t * The scratch buffer that will be assigned to the buffer property of a source node on close.\r\n\t * Works around an iOS Safari bug: https://github.com/CreateJS/SoundJS/issues/102\r\n\t *\r\n\t * Advanced users can set this to an existing source node, but must do so before they call\r\n\t * {{#crossLink \"Sound/registerPlugins\"}}{{/crossLink}} or {{#crossLink \"Sound/initializeDefaultPlugins\"}}{{/crossLink}}.\r\n\t *\r\n\t * @property _scratchBuffer\r\n\t * @type {AudioBuffer}\r\n\t * @private\r\n\t * @static\r\n\t */\r\n\t s._scratchBuffer = null;\r\n\r\n\t/**\r\n\t * Indicated whether audio on iOS has been unlocked, which requires a touchend/mousedown event that plays an\r\n\t * empty sound.\r\n\t * @property _unlocked\r\n\t * @type {boolean}\r\n\t * @since 0.6.2\r\n\t * @private\r\n\t */\r\n\ts._unlocked = false;\r\n\r\n\t/**\r\n\t * The default sample rate used when checking for iOS compatibility. See {{#crossLink \"WebAudioPlugin/_createAudioContext\"}}{{/crossLink}}.\r\n\t * @property DEFAULT_SAMPLE_REATE\r\n\t * @type {number}\r\n\t * @default 44100\r\n\t * @static\r\n\t */\r\n\ts.DEFAULT_SAMPLE_RATE = 44100;\r\n\r\n// Static Public Methods\r\n\t/**\r\n\t * Determine if the plugin can be used in the current browser/OS.\r\n\t * @method isSupported\r\n\t * @return {Boolean} If the plugin can be initialized.\r\n\t * @static\r\n\t */\r\n\ts.isSupported = function () {\r\n\t\t// check if this is some kind of mobile device, Web Audio works with local protocol under PhoneGap and it is unlikely someone is trying to run a local file\r\n\t\tvar isMobilePhoneGap = createjs.BrowserDetect.isIOS || createjs.BrowserDetect.isAndroid || createjs.BrowserDetect.isBlackberry;\r\n\t\t// OJR isMobile may be redundant with _isFileXHRSupported available. Consider removing.\r\n\t\tif (location.protocol == \"file:\" && !isMobilePhoneGap && !this._isFileXHRSupported()) { return false; } // Web Audio requires XHR, which is not usually available locally\r\n\t\ts._generateCapabilities();\r\n\t\tif (s.context == null) {return false;}\r\n\t\treturn true;\r\n\t};\r\n\r\n\t/**\r\n\t * Plays an empty sound in the web audio context. This is used to enable web audio on iOS devices, as they\r\n\t * require the first sound to be played inside of a user initiated event (touch/click). This is called when\r\n\t * {{#crossLink \"WebAudioPlugin\"}}{{/crossLink}} is initialized (by Sound {{#crossLink \"Sound/initializeDefaultPlugins\"}}{{/crossLink}}\r\n\t * for example).\r\n\t *\r\n\t *

        Example

        \r\n\t *\r\n\t * function handleTouch(event) {\r\n\t * createjs.WebAudioPlugin.playEmptySound();\r\n\t * }\r\n\t *\r\n\t * @method playEmptySound\r\n\t * @static\r\n\t * @since 0.4.1\r\n\t */\r\n\ts.playEmptySound = function() {\r\n\t\tif (s.context == null) {return;}\r\n\t\tvar source = s.context.createBufferSource();\r\n\t\tsource.buffer = s._scratchBuffer;\r\n\t\tsource.connect(s.context.destination);\r\n\t\tsource.start(0, 0, 0);\r\n\t};\r\n\r\n\r\n// Static Private Methods\r\n\t/**\r\n\t * Determine if XHR is supported, which is necessary for web audio.\r\n\t * @method _isFileXHRSupported\r\n\t * @return {Boolean} If XHR is supported.\r\n\t * @since 0.4.2\r\n\t * @private\r\n\t * @static\r\n\t */\r\n\ts._isFileXHRSupported = function() {\r\n\t\t// it's much easier to detect when something goes wrong, so let's start optimistically\r\n\t\tvar supported = true;\r\n\r\n\t\tvar xhr = new XMLHttpRequest();\r\n\t\ttry {\r\n\t\t\txhr.open(\"GET\", \"WebAudioPluginTest.fail\", false); // loading non-existant file triggers 404 only if it could load (synchronous call)\r\n\t\t} catch (error) {\r\n\t\t\t// catch errors in cases where the onerror is passed by\r\n\t\t\tsupported = false;\r\n\t\t\treturn supported;\r\n\t\t}\r\n\t\txhr.onerror = function() { supported = false; }; // cause irrelevant\r\n\t\t// with security turned off, we can get empty success results, which is actually a failed read (status code 0?)\r\n\t\txhr.onload = function() { supported = this.status == 404 || (this.status == 200 || (this.status == 0 && this.response != \"\")); };\r\n\t\ttry {\r\n\t\t\txhr.send();\r\n\t\t} catch (error) {\r\n\t\t\t// catch errors in cases where the onerror is passed by\r\n\t\t\tsupported = false;\r\n\t\t}\r\n\r\n\t\treturn supported;\r\n\t};\r\n\r\n\t/**\r\n\t * Determine the capabilities of the plugin. Used internally. Please see the Sound API {{#crossLink \"Sound/capabilities:property\"}}{{/crossLink}}\r\n\t * method for an overview of plugin capabilities.\r\n\t * @method _generateCapabilities\r\n\t * @static\r\n\t * @private\r\n\t */\r\n\ts._generateCapabilities = function () {\r\n\t\tif (s._capabilities != null) {return;}\r\n\t\t// Web Audio can be in any formats supported by the audio element, from http://www.w3.org/TR/webaudio/#AudioContext-section\r\n\t\tvar t = document.createElement(\"audio\");\r\n\t\tif (t.canPlayType == null) {return null;}\r\n\r\n\t\tif (s.context == null) {\r\n\t\t\ts.context = s._createAudioContext();\r\n\t\t\tif (s.context == null) { return null; }\r\n\t\t}\r\n\t\tif (s._scratchBuffer == null) {\r\n\t\t\ts._scratchBuffer = s.context.createBuffer(1, 1, 22050);\r\n\t\t}\r\n\r\n\t\ts._compatibilitySetUp();\r\n\r\n\t\t// Listen for document level clicks to unlock WebAudio on iOS. See the _unlock method.\r\n\t\tif (\"ontouchstart\" in window && s.context.state != \"running\") {\r\n\t\t\ts._unlock(); // When played inside of a touch event, this will enable audio on iOS immediately.\r\n\t\t\tdocument.addEventListener(\"mousedown\", s._unlock, true);\r\n\t\t\tdocument.addEventListener(\"touchstart\", s._unlock, true);\r\n\t\t\tdocument.addEventListener(\"touchend\", s._unlock, true);\r\n\t\t}\r\n\r\n\t\ts._capabilities = {\r\n\t\t\tpanning:true,\r\n\t\t\tvolume:true,\r\n\t\t\ttracks:-1\r\n\t\t};\r\n\r\n\t\t// determine which extensions our browser supports for this plugin by iterating through Sound.SUPPORTED_EXTENSIONS\r\n\t\tvar supportedExtensions = createjs.Sound.SUPPORTED_EXTENSIONS;\r\n\t\tvar extensionMap = createjs.Sound.EXTENSION_MAP;\r\n\t\tfor (var i = 0, l = supportedExtensions.length; i < l; i++) {\r\n\t\t\tvar ext = supportedExtensions[i];\r\n\t\t\tvar playType = extensionMap[ext] || ext;\r\n\t\t\ts._capabilities[ext] = (t.canPlayType(\"audio/\" + ext) != \"no\" && t.canPlayType(\"audio/\" + ext) != \"\") || (t.canPlayType(\"audio/\" + playType) != \"no\" && t.canPlayType(\"audio/\" + playType) != \"\");\r\n\t\t} // OJR another way to do this might be canPlayType:\"m4a\", codex: mp4\r\n\r\n\t\t// 0=no output, 1=mono, 2=stereo, 4=surround, 6=5.1 surround.\r\n\t\t// See http://www.w3.org/TR/webaudio/#AudioChannelSplitter for more details on channels.\r\n\t\tif (s.context.destination.numberOfChannels < 2) {\r\n\t\t\ts._capabilities.panning = false;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Create an audio context for the sound.\r\n\t *\r\n\t * This method handles both vendor prefixes (specifically webkit support), as well as a case on iOS where\r\n\t * audio played with a different sample rate may play garbled when first started. The default sample rate is\r\n\t * 44,100, however it can be changed using the {{#crossLink \"WebAudioPlugin/DEFAULT_SAMPLE_RATE:property\"}}{{/crossLink}}.\r\n\t * @method _createAudioContext\r\n\t * @return {AudioContext | webkitAudioContext}\r\n\t * @private\r\n\t * @static\r\n\t * @since 1.0.0\r\n\t */\r\n\ts._createAudioContext = function() {\r\n\t\t// Slightly modified version of https://github.com/Jam3/ios-safe-audio-context\r\n\t\t// Resolves issues with first-run contexts playing garbled on iOS.\r\n\t\tvar AudioCtor = (window.AudioContext || window.webkitAudioContext);\r\n\t\tif (AudioCtor == null) { return null; }\r\n\t\tvar context = new AudioCtor();\r\n\r\n\t\t// Check if hack is necessary. Only occurs in iOS6+ devices\r\n\t\t// and only when you first boot the iPhone, or play a audio/video\r\n\t\t// with a different sample rate\r\n\t\tif (/(iPhone|iPad)/i.test(navigator.userAgent)\r\n\t\t\t\t&& context.sampleRate !== s.DEFAULT_SAMPLE_RATE) {\r\n\t\t\tvar buffer = context.createBuffer(1, 1, s.DEFAULT_SAMPLE_RATE),\r\n\t\t\t\t\tdummy = context.createBufferSource();\r\n\t\t\tdummy.buffer = buffer;\r\n\t\t\tdummy.connect(context.destination);\r\n\t\t\tdummy.start(0);\r\n\t\t\tdummy.disconnect();\r\n\t\t\tcontext.close() // dispose old context\r\n\r\n\t\t\tcontext = new AudioCtor();\r\n\t\t}\r\n\t\treturn context;\r\n\t}\r\n\r\n\t/**\r\n\t * Set up compatibility if only deprecated web audio calls are supported.\r\n\t * See http://www.w3.org/TR/webaudio/#DeprecationNotes\r\n\t * Needed so we can support new browsers that don't support deprecated calls (Firefox) as well as old browsers that\r\n\t * don't support new calls.\r\n\t *\r\n\t * @method _compatibilitySetUp\r\n\t * @static\r\n\t * @private\r\n\t * @since 0.4.2\r\n\t */\r\n\ts._compatibilitySetUp = function() {\r\n\t\ts._panningModel = \"equalpower\";\r\n\t\t//assume that if one new call is supported, they all are\r\n\t\tif (s.context.createGain) { return; }\r\n\r\n\t\t// simple name change, functionality the same\r\n\t\ts.context.createGain = s.context.createGainNode;\r\n\r\n\t\t// source node, add to prototype\r\n\t\tvar audioNode = s.context.createBufferSource();\r\n\t\taudioNode.__proto__.start = audioNode.__proto__.noteGrainOn;\t// note that noteGrainOn requires all 3 parameters\r\n\t\taudioNode.__proto__.stop = audioNode.__proto__.noteOff;\r\n\r\n\t\t// panningModel\r\n\t\ts._panningModel = 0;\r\n\t};\r\n\r\n\t/**\r\n\t * Try to unlock audio on iOS. This is triggered from either WebAudio plugin setup (which will work if inside of\r\n\t * a `mousedown` or `touchend` event stack), or the first document touchend/mousedown event. If it fails (touchend\r\n\t * will fail if the user presses for too long, indicating a scroll event instead of a click event.\r\n\t *\r\n\t * Note that earlier versions of iOS supported `touchstart` for this, but iOS9 removed this functionality. Adding\r\n\t * a `touchstart` event to support older platforms may preclude a `mousedown` even from getting fired on iOS9, so we\r\n\t * stick with `mousedown` and `touchend`.\r\n\t * @method _unlock\r\n\t * @since 0.6.2\r\n\t * @private\r\n\t */\r\n\ts._unlock = function() {\r\n\t\tif (s._unlocked) { return; }\r\n\t\ts.playEmptySound();\r\n\t\tif (s.context.state == \"running\") {\r\n\t\t\tdocument.removeEventListener(\"mousedown\", s._unlock, true);\r\n\t\t\tdocument.removeEventListener(\"touchend\", s._unlock, true);\r\n\t\t\tdocument.removeEventListener(\"touchstart\", s._unlock, true);\r\n\t\t\ts._unlocked = true;\r\n\t\t}\r\n\t};\r\n\r\n\r\n// Public Methods\r\n\tp.toString = function () {\r\n\t\treturn \"[WebAudioPlugin]\";\r\n\t};\r\n\r\n\r\n// Private Methods\r\n\t/**\r\n\t * Set up needed properties on supported classes WebAudioSoundInstance and WebAudioLoader.\r\n\t * @method _addPropsToClasses\r\n\t * @static\r\n\t * @protected\r\n\t * @since 0.6.0\r\n\t */\r\n\tp._addPropsToClasses = function() {\r\n\t\tvar c = this._soundInstanceClass;\r\n\t\tc.context = this.context;\r\n\t\tc._scratchBuffer = s._scratchBuffer;\r\n\t\tc.destinationNode = this.gainNode;\r\n\t\tc._panningModel = this._panningModel;\r\n\r\n\t\tthis._loaderClass.context = this.context;\r\n\t};\r\n\r\n\r\n\t/**\r\n\t * Set the gain value for master audio. Should not be called externally.\r\n\t * @method _updateVolume\r\n\t * @protected\r\n\t */\r\n\tp._updateVolume = function () {\r\n\t\tvar newVolume = createjs.Sound._masterMute ? 0 : this._volume;\r\n\t\tif (newVolume != this.gainNode.gain.value) {\r\n\t\t\tthis.gainNode.gain.value = newVolume;\r\n\t\t}\r\n\t};\r\n\r\n\tcreatejs.WebAudioPlugin = createjs.promote(WebAudioPlugin, \"AbstractPlugin\");\r\n}());\r\n\r\n//##############################################################################\r\n// HTMLAudioTagPool.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\t/**\r\n\t * HTMLAudioTagPool is an object pool for HTMLAudio tag instances.\r\n\t * @class HTMLAudioTagPool\r\n\t * @param {String} src The source of the channel.\r\n\t * @protected\r\n\t */\r\n\tfunction HTMLAudioTagPool() {\r\n\t\t\tthrow \"HTMLAudioTagPool cannot be instantiated\";\r\n\t}\r\n\r\n\tvar s = HTMLAudioTagPool;\r\n\r\n// Static Properties\r\n\t/**\r\n\t * A hash lookup of each base audio tag, indexed by the audio source.\r\n\t * @property _tags\r\n\t * @type {{}}\r\n\t * @static\r\n\t * @private\r\n\t */\r\n\ts._tags = {};\r\n\r\n\t/**\r\n\t * An object pool for html audio tags\r\n\t * @property _tagPool\r\n\t * @type {TagPool}\r\n\t * @static\r\n\t * @private\r\n\t */\r\n\ts._tagPool = new TagPool();\r\n\r\n\t/**\r\n\t * A hash lookup of if a base audio tag is available, indexed by the audio source\r\n\t * @property _tagsUsed\r\n\t * @type {{}}\r\n\t * @private\r\n\t * @static\r\n\t */\r\n\ts._tagUsed = {};\r\n\r\n// Static Methods\r\n\t/**\r\n\t * Get an audio tag with the given source.\r\n\t * @method get\r\n\t * @param {String} src The source file used by the audio tag.\r\n\t * @static\r\n\t */\r\n\t s.get = function (src) {\r\n\t\tvar t = s._tags[src];\r\n\t\tif (t == null) {\r\n\t\t\t// create new base tag\r\n\t\t\tt = s._tags[src] = s._tagPool.get();\r\n\t\t\tt.src = src;\r\n\t\t} else {\r\n\t\t\t// get base or pool\r\n\t\t\tif (s._tagUsed[src]) {\r\n\t\t\t\tt = s._tagPool.get();\r\n\t\t\t\tt.src = src;\r\n\t\t\t} else {\r\n\t\t\t\ts._tagUsed[src] = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn t;\r\n\t };\r\n\r\n\t /**\r\n\t * Return an audio tag to the pool.\r\n\t * @method set\r\n\t * @param {String} src The source file used by the audio tag.\r\n\t * @param {HTMLElement} tag Audio tag to set.\r\n\t * @static\r\n\t */\r\n\t s.set = function (src, tag) {\r\n\t\t // check if this is base, if yes set boolean if not return to pool\r\n\t\t if(tag == s._tags[src]) {\r\n\t\t\t s._tagUsed[src] = false;\r\n\t\t } else {\r\n\t\t\t s._tagPool.set(tag);\r\n\t\t }\r\n\t };\r\n\r\n\t/**\r\n\t * Delete stored tag reference and return them to pool. Note that if the tag reference does not exist, this will fail.\r\n\t * @method remove\r\n\t * @param {String} src The source for the tag\r\n\t * @return {Boolean} If the TagPool was deleted.\r\n\t * @static\r\n\t */\r\n\ts.remove = function (src) {\r\n\t\tvar tag = s._tags[src];\r\n\t\tif (tag == null) {return false;}\r\n\t\ts._tagPool.set(tag);\r\n\t\tdelete(s._tags[src]);\r\n\t\tdelete(s._tagUsed[src]);\r\n\t\treturn true;\r\n\t};\r\n\r\n\t/**\r\n\t * Gets the duration of the src audio in milliseconds\r\n\t * @method getDuration\r\n\t * @param {String} src The source file used by the audio tag.\r\n\t * @return {Number} Duration of src in milliseconds\r\n\t * @static\r\n\t */\r\n\ts.getDuration= function (src) {\r\n\t\tvar t = s._tags[src];\r\n\t\tif (t == null || !t.duration) {return 0;}\t// OJR duration is NaN if loading has not completed\r\n\t\treturn t.duration * 1000;\r\n\t};\r\n\r\n\tcreatejs.HTMLAudioTagPool = HTMLAudioTagPool;\r\n\r\n\r\n// ************************************************************************************************************\r\n\t/**\r\n\t * The TagPool is an object pool for HTMLAudio tag instances.\r\n\t * #class TagPool\r\n\t * @param {String} src The source of the channel.\r\n\t * @protected\r\n\t */\r\n\tfunction TagPool(src) {\r\n\r\n// Public Properties\r\n\t\t/**\r\n\t\t * A list of all available tags in the pool.\r\n\t\t * #property tags\r\n\t\t * @type {Array}\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._tags = [];\r\n\t};\r\n\r\n\tvar p = TagPool.prototype;\r\n\tp.constructor = TagPool;\r\n\r\n\r\n// Public Methods\r\n\t/**\r\n\t * Get an HTMLAudioElement for immediate playback. This takes it out of the pool.\r\n\t * #method get\r\n\t * @return {HTMLAudioElement} An HTML audio tag.\r\n\t */\r\n\tp.get = function () {\r\n\t\tvar tag;\r\n\t\tif (this._tags.length == 0) {\r\n\t\t\ttag = this._createTag();\r\n\t\t} else {\r\n\t\t\ttag = this._tags.pop();\r\n\t\t}\r\n\t\tif (tag.parentNode == null) {document.body.appendChild(tag);}\r\n\t\treturn tag;\r\n\t};\r\n\r\n\t/**\r\n\t * Put an HTMLAudioElement back in the pool for use.\r\n\t * #method set\r\n\t * @param {HTMLAudioElement} tag HTML audio tag\r\n\t */\r\n\tp.set = function (tag) {\r\n\t\t// OJR this first step seems unnecessary\r\n\t\tvar index = createjs.indexOf(this._tags, tag);\r\n\t\tif (index == -1) {\r\n\t\t\tthis._tags.src = null;\r\n\t\t\tthis._tags.push(tag);\r\n\t\t}\r\n\t};\r\n\r\n\tp.toString = function () {\r\n\t\treturn \"[TagPool]\";\r\n\t};\r\n\r\n\r\n// Private Methods\r\n\t/**\r\n\t * Create an HTML audio tag.\r\n\t * #method _createTag\r\n\t * @param {String} src The source file to set for the audio tag.\r\n\t * @return {HTMLElement} Returns an HTML audio tag.\r\n\t * @protected\r\n\t */\r\n\tp._createTag = function () {\r\n\t\tvar tag = document.createElement(\"audio\");\r\n\t\ttag.autoplay = false;\r\n\t\ttag.preload = \"none\";\r\n\t\t//LM: Firefox fails when this the preload=\"none\" for other tags, but it needs to be \"none\" to ensure PreloadJS works.\r\n\t\treturn tag;\r\n\t};\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// HTMLAudioSoundInstance.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\t/**\r\n\t * HTMLAudioSoundInstance extends the base api of {{#crossLink \"AbstractSoundInstance\"}}{{/crossLink}} and is used by\r\n\t * {{#crossLink \"HTMLAudioPlugin\"}}{{/crossLink}}.\r\n\t *\r\n\t * @param {String} src The path to and file name of the sound.\r\n\t * @param {Number} startTime Audio sprite property used to apply an offset, in milliseconds.\r\n\t * @param {Number} duration Audio sprite property used to set the time the clip plays for, in milliseconds.\r\n\t * @param {Object} playbackResource Any resource needed by plugin to support audio playback.\r\n\t * @class HTMLAudioSoundInstance\r\n\t * @extends AbstractSoundInstance\r\n\t * @constructor\r\n\t */\r\n\tfunction HTMLAudioSoundInstance(src, startTime, duration, playbackResource) {\r\n\t\tthis.AbstractSoundInstance_constructor(src, startTime, duration, playbackResource);\r\n\r\n\r\n// Private Properties\r\n\t\tthis._audioSpriteStopTime = null;\r\n\t\tthis._delayTimeoutId = null;\r\n\r\n\t\t// Proxies, make removing listeners easier.\r\n\t\tthis._endedHandler = createjs.proxy(this._handleSoundComplete, this);\r\n\t\tthis._readyHandler = createjs.proxy(this._handleTagReady, this);\r\n\t\tthis._stalledHandler = createjs.proxy(this._playFailed, this);\r\n\t\tthis._audioSpriteEndHandler = createjs.proxy(this._handleAudioSpriteLoop, this);\r\n\t\tthis._loopHandler = createjs.proxy(this._handleSoundComplete, this);\r\n\r\n\t\tif (duration) {\r\n\t\t\tthis._audioSpriteStopTime = (startTime + duration) * 0.001;\r\n\t\t} else {\r\n\t\t\tthis._duration = createjs.HTMLAudioTagPool.getDuration(this.src);\r\n\t\t}\r\n\t}\r\n\tvar p = createjs.extend(HTMLAudioSoundInstance, createjs.AbstractSoundInstance);\r\n\r\n// Public Methods\r\n\t/**\r\n\t * Called by {{#crossLink \"Sound\"}}{{/crossLink}} when plugin does not handle master volume.\r\n\t * undoc'd because it is not meant to be used outside of Sound\r\n\t * #method setMasterVolume\r\n\t * @param value\r\n\t */\r\n\tp.setMasterVolume = function (value) {\r\n\t\tthis._updateVolume();\r\n\t};\r\n\r\n\t/**\r\n\t * Called by {{#crossLink \"Sound\"}}{{/crossLink}} when plugin does not handle master mute.\r\n\t * undoc'd because it is not meant to be used outside of Sound\r\n\t * #method setMasterMute\r\n\t * @param value\r\n\t */\r\n\tp.setMasterMute = function (isMuted) {\r\n\t\tthis._updateVolume();\r\n\t};\r\n\r\n\tp.toString = function () {\r\n\t\treturn \"[HTMLAudioSoundInstance]\";\r\n\t};\r\n\r\n//Private Methods\r\n\tp._removeLooping = function() {\r\n\t\tif(this._playbackResource == null) {return;}\r\n\t\tthis._playbackResource.loop = false;\r\n\t\tthis._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, false);\r\n\t};\r\n\r\n\tp._addLooping = function() {\r\n\t\tif(this._playbackResource == null || this._audioSpriteStopTime) {return;}\r\n\t\tthis._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, false);\r\n\t\tthis._playbackResource.loop = true;\r\n\t};\r\n\r\n\tp._handleCleanUp = function () {\r\n\t\tvar tag = this._playbackResource;\r\n\t\tif (tag != null) {\r\n\t\t\ttag.pause();\r\n\t\t\ttag.loop = false;\r\n\t\t\ttag.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED, this._endedHandler, false);\r\n\t\t\ttag.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY, this._readyHandler, false);\r\n\t\t\ttag.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED, this._stalledHandler, false);\r\n\t\t\ttag.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, false);\r\n\t\t\ttag.removeEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE, this._audioSpriteEndHandler, false);\r\n\r\n\t\t\ttry {\r\n\t\t\t\ttag.currentTime = this._startTime;\r\n\t\t\t} catch (e) {\r\n\t\t\t} // Reset Position\r\n\t\t\tcreatejs.HTMLAudioTagPool.set(this.src, tag);\r\n\t\t\tthis._playbackResource = null;\r\n\t\t}\r\n\t};\r\n\r\n\tp._beginPlaying = function (playProps) {\r\n\t\tthis._playbackResource = createjs.HTMLAudioTagPool.get(this.src);\r\n\t\treturn this.AbstractSoundInstance__beginPlaying(playProps);\r\n\t};\r\n\r\n\tp._handleSoundReady = function (event) {\r\n\t\tif (this._playbackResource.readyState !== 4) {\r\n\t\t\tvar tag = this._playbackResource;\r\n\t\t\ttag.addEventListener(createjs.HTMLAudioPlugin._AUDIO_READY, this._readyHandler, false);\r\n\t\t\ttag.addEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED, this._stalledHandler, false);\r\n\t\t\ttag.preload = \"auto\"; // This is necessary for Firefox, as it won't ever \"load\" until this is set.\r\n\t\t\ttag.load();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._updateVolume();\r\n\t\tthis._playbackResource.currentTime = (this._startTime + this._position) * 0.001;\r\n\t\tif (this._audioSpriteStopTime) {\r\n\t\t\tthis._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE, this._audioSpriteEndHandler, false);\r\n\t\t} else {\r\n\t\t\tthis._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED, this._endedHandler, false);\r\n\t\t\tif(this._loop != 0) {\r\n\t\t\t\tthis._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, false);\r\n\t\t\t\tthis._playbackResource.loop = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._playbackResource.play();\r\n\t};\r\n\r\n\t/**\r\n\t * Used to handle when a tag is not ready for immediate playback when it is returned from the HTMLAudioTagPool.\r\n\t * @method _handleTagReady\r\n\t * @param event\r\n\t * @protected\r\n\t */\r\n\tp._handleTagReady = function (event) {\r\n\t\tthis._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY, this._readyHandler, false);\r\n\t\tthis._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED, this._stalledHandler, false);\r\n\r\n\t\tthis._handleSoundReady();\r\n\t};\r\n\r\n\tp._pause = function () {\r\n\t\tthis._playbackResource.pause();\r\n\t};\r\n\r\n\tp._resume = function () {\r\n\t\tthis._playbackResource.play();\r\n\t};\r\n\r\n\tp._updateVolume = function () {\r\n\t\tif (this._playbackResource != null) {\r\n\t\t\tvar newVolume = (this._muted || createjs.Sound._masterMute) ? 0 : this._volume * createjs.Sound._masterVolume;\r\n\t\t\tif (newVolume != this._playbackResource.volume) {this._playbackResource.volume = newVolume;}\r\n\t\t}\r\n\t};\r\n\r\n\tp._calculateCurrentPosition = function() {\r\n\t\treturn (this._playbackResource.currentTime * 1000) - this._startTime;\r\n\t};\r\n\r\n\tp._updatePosition = function() {\r\n\t\tthis._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, false);\r\n\t\tthis._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._handleSetPositionSeek, false);\r\n\t\ttry {\r\n\t\t\tthis._playbackResource.currentTime = (this._position + this._startTime) * 0.001;\r\n\t\t} catch (error) { // Out of range\r\n\t\t\tthis._handleSetPositionSeek(null);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Used to enable setting position, as we need to wait for that seek to be done before we add back our loop handling seek listener\r\n\t * @method _handleSetPositionSeek\r\n\t * @param event\r\n\t * @protected\r\n\t */\r\n\tp._handleSetPositionSeek = function(event) {\r\n\t\tif (this._playbackResource == null) { return; }\r\n\t\tthis._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._handleSetPositionSeek, false);\r\n\t\tthis._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, false);\r\n\t};\r\n\r\n\t/**\r\n\t * Timer used to loop audio sprites.\r\n\t * NOTE because of the inaccuracies in the timeupdate event (15 - 250ms) and in setting the tag to the desired timed\r\n\t * (up to 300ms), it is strongly recommended not to loop audio sprites with HTML Audio if smooth looping is desired\r\n\t *\r\n\t * @method _handleAudioSpriteLoop\r\n\t * @param event\r\n\t * @private\r\n\t */\r\n\tp._handleAudioSpriteLoop = function (event) {\r\n\t\tif(this._playbackResource.currentTime <= this._audioSpriteStopTime) {return;}\r\n\t\tthis._playbackResource.pause();\r\n\t\tif(this._loop == 0) {\r\n\t\t\tthis._handleSoundComplete(null);\r\n\t\t} else {\r\n\t\t\tthis._position = 0;\r\n\t\t\tthis._loop--;\r\n\t\t\tthis._playbackResource.currentTime = this._startTime * 0.001;\r\n\t\t\tif(!this._paused) {this._playbackResource.play();}\r\n\t\t\tthis._sendEvent(\"loop\");\r\n\t\t}\r\n\t};\r\n\r\n\t// NOTE with this approach audio will loop as reliably as the browser allows\r\n\t// but we could end up sending the loop event after next loop playback begins\r\n\tp._handleLoop = function (event) {\r\n\t\tif(this._loop == 0) {\r\n\t\t\tthis._playbackResource.loop = false;\r\n\t\t\tthis._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, false);\r\n\t\t}\r\n\t};\r\n\r\n\tp._updateStartTime = function () {\r\n\t\tthis._audioSpriteStopTime = (this._startTime + this._duration) * 0.001;\r\n\r\n\t\tif(this.playState == createjs.Sound.PLAY_SUCCEEDED) {\r\n\t\t\tthis._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED, this._endedHandler, false);\r\n\t\t\tthis._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE, this._audioSpriteEndHandler, false);\r\n\t\t}\r\n\t};\r\n\r\n\tp._updateDuration = function () {\r\n\t\tthis._audioSpriteStopTime = (this._startTime + this._duration) * 0.001;\r\n\r\n\t\tif(this.playState == createjs.Sound.PLAY_SUCCEEDED) {\r\n\t\t\tthis._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED, this._endedHandler, false);\r\n\t\t\tthis._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE, this._audioSpriteEndHandler, false);\r\n\t\t}\r\n\t};\r\n\r\n\tp._setDurationFromSource = function () {\r\n\t\tthis._duration = createjs.HTMLAudioTagPool.getDuration(this.src);\r\n\t\tthis._playbackResource = null;\r\n\t};\r\n\r\n\tcreatejs.HTMLAudioSoundInstance = createjs.promote(HTMLAudioSoundInstance, \"AbstractSoundInstance\");\r\n}());\r\n\r\n//##############################################################################\r\n// HTMLAudioPlugin.js\r\n//##############################################################################\r\n\r\n(function () {\r\n\r\n\t\"use strict\";\r\n\r\n\t/**\r\n\t * Play sounds using HTML <audio> tags in the browser. This plugin is the second priority plugin installed\r\n\t * by default, after the {{#crossLink \"WebAudioPlugin\"}}{{/crossLink}}. For older browsers that do not support html\r\n\t * audio, include and install the {{#crossLink \"FlashAudioPlugin\"}}{{/crossLink}}.\r\n\t *\r\n\t *

        Known Browser and OS issues for HTML Audio

        \r\n\t * All browsers
        \r\n\t * Testing has shown in all browsers there is a limit to how many audio tag instances you are allowed. If you exceed\r\n\t * this limit, you can expect to see unpredictable results. Please use {{#crossLink \"Sound.MAX_INSTANCES\"}}{{/crossLink}} as\r\n\t * a guide to how many total audio tags you can safely use in all browsers. This issue is primarily limited to IE9.\r\n\t *\r\n * IE html limitations
        \r\n *
        • There is a delay in applying volume changes to tags that occurs once playback is started. So if you have\r\n * muted all sounds, they will all play during this delay until the mute applies internally. This happens regardless of\r\n * when or how you apply the volume change, as the tag seems to need to play to apply it.
        • \r\n *
        • MP3 encoding will not always work for audio tags if it's not default. We've found default encoding with\r\n * 64kbps works.
        • \r\n\t *
        • Occasionally very short samples will get cut off.
        • \r\n\t *
        • There is a limit to how many audio tags you can load or play at once, which appears to be determined by\r\n\t * hardware and browser settings. See {{#crossLink \"HTMLAudioPlugin.MAX_INSTANCES\"}}{{/crossLink}} for a safe estimate.\r\n\t * Note that audio sprites can be used as a solution to this issue.
        \r\n\t *\r\n\t * Safari limitations
        \r\n\t *
        • Safari requires Quicktime to be installed for audio playback.
        \r\n\t *\r\n\t * iOS 6 limitations
        \r\n\t *
        • can only have one <audio> tag
        • \r\n\t * \t\t
        • can not preload or autoplay the audio
        • \r\n\t * \t\t
        • can not cache the audio
        • \r\n\t * \t\t
        • can not play the audio except inside a user initiated event.
        • \r\n\t *\t\t
        • Note it is recommended to use {{#crossLink \"WebAudioPlugin\"}}{{/crossLink}} for iOS (6+)
        • \r\n\t * \t\t
        • audio sprites can be used to mitigate some of these issues and are strongly recommended on iOS
        • \r\n\t *
        \r\n\t *\r\n\t * Android Native Browser limitations
        \r\n\t *
        • We have no control over audio volume. Only the user can set volume on their device.
        • \r\n\t *
        • We can only play audio inside a user event (touch/click). This currently means you cannot loop sound or use a delay.
        \r\n\t * Android Chrome 26.0.1410.58 specific limitations
        \r\n\t *
        • Can only play 1 sound at a time.
        • \r\n\t *
        • Sound is not cached.
        • \r\n\t *
        • Sound can only be loaded in a user initiated touch/click event.
        • \r\n\t *
        • There is a delay before a sound is played, presumably while the src is loaded.
        • \r\n\t *
        \r\n\t *\r\n\t * See {{#crossLink \"Sound\"}}{{/crossLink}} for general notes on known issues.\r\n\t *\r\n\t * @class HTMLAudioPlugin\r\n\t * @extends AbstractPlugin\r\n\t * @constructor\r\n\t */\r\n\tfunction HTMLAudioPlugin() {\r\n\t\tthis.AbstractPlugin_constructor();\r\n\r\n\r\n\t// Public Properties\r\n\t\tthis._capabilities = s._capabilities;\r\n\r\n\t\tthis._loaderClass = createjs.SoundLoader;\r\n\t\tthis._soundInstanceClass = createjs.HTMLAudioSoundInstance;\r\n\t}\r\n\r\n\tvar p = createjs.extend(HTMLAudioPlugin, createjs.AbstractPlugin);\r\n\tvar s = HTMLAudioPlugin;\r\n\r\n// Static Properties\r\n\t/**\r\n\t * The maximum number of instances that can be loaded or played. This is a browser limitation, primarily limited to IE9.\r\n\t * The actual number varies from browser to browser (and is largely hardware dependant), but this is a safe estimate.\r\n\t * Audio sprites work around this limitation.\r\n\t * @property MAX_INSTANCES\r\n\t * @type {Number}\r\n\t * @default 30\r\n\t * @static\r\n\t */\r\n\ts.MAX_INSTANCES = 30;\r\n\r\n\t/**\r\n\t * Event constant for the \"canPlayThrough\" event for cleaner code.\r\n\t * @property _AUDIO_READY\r\n\t * @type {String}\r\n\t * @default canplaythrough\r\n\t * @static\r\n\t * @private\r\n\t */\r\n\ts._AUDIO_READY = \"canplaythrough\";\r\n\r\n\t/**\r\n\t * Event constant for the \"ended\" event for cleaner code.\r\n\t * @property _AUDIO_ENDED\r\n\t * @type {String}\r\n\t * @default ended\r\n\t * @static\r\n\t * @private\r\n\t */\r\n\ts._AUDIO_ENDED = \"ended\";\r\n\r\n\t/**\r\n\t * Event constant for the \"seeked\" event for cleaner code. We utilize this event for maintaining loop events.\r\n\t * @property _AUDIO_SEEKED\r\n\t * @type {String}\r\n\t * @default seeked\r\n\t * @static\r\n\t * @private\r\n\t */\r\n\ts._AUDIO_SEEKED = \"seeked\";\r\n\r\n\t/**\r\n\t * Event constant for the \"stalled\" event for cleaner code.\r\n\t * @property _AUDIO_STALLED\r\n\t * @type {String}\r\n\t * @default stalled\r\n\t * @static\r\n\t * @private\r\n\t */\r\n\ts._AUDIO_STALLED = \"stalled\";\r\n\r\n\t/**\r\n\t * Event constant for the \"timeupdate\" event for cleaner code. Utilized for looping audio sprites.\r\n\t * This event callsback ever 15 to 250ms and can be dropped by the browser for performance.\r\n\t * @property _TIME_UPDATE\r\n\t * @type {String}\r\n\t * @default timeupdate\r\n\t * @static\r\n\t * @private\r\n\t */\r\n\ts._TIME_UPDATE = \"timeupdate\";\r\n\r\n\t/**\r\n\t * The capabilities of the plugin. This is generated via the {{#crossLink \"HTMLAudioPlugin/_generateCapabilities\"}}{{/crossLink}}\r\n\t * method. Please see the Sound {{#crossLink \"Sound/capabilities:property\"}}{{/crossLink}} method for an overview of all\r\n\t * of the available properties.\r\n\t * @property _capabilities\r\n\t * @type {Object}\r\n\t * @private\r\n\t * @static\r\n\t */\r\n\ts._capabilities = null;\r\n\r\n\r\n// Static Methods\r\n\t/**\r\n\t * Determine if the plugin can be used in the current browser/OS. Note that HTML audio is available in most modern\r\n\t * browsers, but is disabled in iOS because of its limitations.\r\n\t * @method isSupported\r\n\t * @return {Boolean} If the plugin can be initialized.\r\n\t * @static\r\n\t */\r\n\ts.isSupported = function () {\r\n\t\ts._generateCapabilities();\r\n\t\treturn (s._capabilities != null);\r\n\t};\r\n\r\n\t/**\r\n\t * Determine the capabilities of the plugin. Used internally. Please see the Sound API {{#crossLink \"Sound/capabilities:property\"}}{{/crossLink}}\r\n\t * method for an overview of plugin capabilities.\r\n\t * @method _generateCapabilities\r\n\t * @static\r\n\t * @private\r\n\t */\r\n\ts._generateCapabilities = function () {\r\n\t\tif (s._capabilities != null) {return;}\r\n\t\tvar t = document.createElement(\"audio\");\r\n\t\tif (t.canPlayType == null) {return null;}\r\n\r\n\t\ts._capabilities = {\r\n\t\t\tpanning:false,\r\n\t\t\tvolume:true,\r\n\t\t\ttracks:-1\r\n\t\t};\r\n\r\n\t\t// determine which extensions our browser supports for this plugin by iterating through Sound.SUPPORTED_EXTENSIONS\r\n\t\tvar supportedExtensions = createjs.Sound.SUPPORTED_EXTENSIONS;\r\n\t\tvar extensionMap = createjs.Sound.EXTENSION_MAP;\r\n\t\tfor (var i = 0, l = supportedExtensions.length; i < l; i++) {\r\n\t\t\tvar ext = supportedExtensions[i];\r\n\t\t\tvar playType = extensionMap[ext] || ext;\r\n\t\t\ts._capabilities[ext] = (t.canPlayType(\"audio/\" + ext) != \"no\" && t.canPlayType(\"audio/\" + ext) != \"\") || (t.canPlayType(\"audio/\" + playType) != \"no\" && t.canPlayType(\"audio/\" + playType) != \"\");\r\n\t\t} // OJR another way to do this might be canPlayType:\"m4a\", codex: mp4\r\n\t};\r\n\r\n\r\n// public methods\r\n\tp.register = function (loadItem) {\r\n\t\tvar tag = createjs.HTMLAudioTagPool.get(loadItem.src);\r\n\t\tvar loader = this.AbstractPlugin_register(loadItem);\r\n\t\tloader.setTag(tag);\r\n\r\n\t\treturn loader;\r\n\t};\r\n\r\n\tp.removeSound = function (src) {\r\n\t\tthis.AbstractPlugin_removeSound(src);\r\n\t\tcreatejs.HTMLAudioTagPool.remove(src);\r\n\t};\r\n\r\n\tp.create = function (src, startTime, duration) {\r\n\t\tvar si = this.AbstractPlugin_create(src, startTime, duration);\r\n\t\tsi.playbackResource = null;\r\n\t\treturn si;\r\n\t};\r\n\r\n\tp.toString = function () {\r\n\t\treturn \"[HTMLAudioPlugin]\";\r\n\t};\r\n\r\n\t// plugin does not support these\r\n\tp.setVolume = p.getVolume = p.setMute = null;\r\n\r\n\r\n\tcreatejs.HTMLAudioPlugin = createjs.promote(HTMLAudioPlugin, \"AbstractPlugin\");\r\n}());\r\n\r\n//##############################################################################\r\n// AbstractTween.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor\r\n\t/**\r\n\t * Base class that both {{#crossLink \"Tween\"}}{{/crossLink}} and {{#crossLink \"Timeline\"}}{{/crossLink}} extend. Should not be instantiated directly.\r\n\t * @class AbstractTween\r\n\t * @param {Object} [props] The configuration properties to apply to this instance (ex. `{loop:-1, paused:true}`).\r\n\t * Supported props are listed below. These props are set on the corresponding instance properties except where\r\n\t * specified.\r\n\t * @param {boolean} [props.useTicks=false] See the {{#crossLink \"AbstractTween/useTicks:property\"}}{{/crossLink}} property for more information.\r\n\t * @param {boolean} [props.ignoreGlobalPause=false] See the {{#crossLink \"AbstractTween/ignoreGlobalPause:property\"}}{{/crossLink}} for more information.\r\n\t * @param {number|boolean} [props.loop=0] See the {{#crossLink \"AbstractTween/loop:property\"}}{{/crossLink}} for more information.\r\n\t * @param {boolean} [props.reversed=false] See the {{#crossLink \"AbstractTween/reversed:property\"}}{{/crossLink}} for more information.\r\n\t * @param {boolean} [props.bounce=false] See the {{#crossLink \"AbstractTween/bounce:property\"}}{{/crossLink}} for more information.\r\n\t * @param {number} [props.timeScale=1] See the {{#crossLink \"AbstractTween/timeScale:property\"}}{{/crossLink}} for more information.\r\n\t * @param {Function} [props.onChange] Adds the specified function as a listener to the {{#crossLink \"AbstractTween/change:event\"}}{{/crossLink}} event\r\n\t * @param {Function} [props.onComplete] Adds the specified function as a listener to the {{#crossLink \"AbstractTween/complete:event\"}}{{/crossLink}} event\r\n\t * @extends EventDispatcher\r\n\t * @constructor\r\n\t */\r\n\tfunction AbstractTween(props) {\r\n\t\tthis.EventDispatcher_constructor();\r\n\t\t\r\n\t// public properties:\r\n\t\t/**\r\n\t\t * Causes this tween to continue playing when a global pause is active. For example, if TweenJS is using {{#crossLink \"Ticker\"}}{{/crossLink}},\r\n\t\t * then setting this to false (the default) will cause this tween to be paused when `Ticker.paused` is set to\r\n\t\t * `true`. See the {{#crossLink \"Tween/tick\"}}{{/crossLink}} method for more info. Can be set via the `props`\r\n\t\t * parameter.\r\n\t\t * @property ignoreGlobalPause\r\n\t\t * @type Boolean\r\n\t\t * @default false\r\n\t\t */\r\n\t\tthis.ignoreGlobalPause = false;\r\n\t\r\n\t\t/**\r\n\t\t * Indicates the number of times to loop. If set to -1, the tween will loop continuously.\r\n\t\t *\r\n\t\t * Note that a tween must loop at _least_ once to see it play in both directions when `{{#crossLink \"AbstractTween/bounce:property\"}}{{/crossLink}}`\r\n\t\t * is set to `true`.\r\n\t\t * @property loop\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t */\r\n\t\tthis.loop = 0;\r\n\t\r\n\t\t/**\r\n\t\t * Uses ticks for all durations instead of milliseconds. This also changes the behaviour of some actions (such as `call`).\r\n\t\t * Changing this value on a running tween could have unexpected results.\r\n\t\t * @property useTicks\r\n\t\t * @type {Boolean}\r\n\t\t * @default false\r\n\t\t * @readonly\r\n\t\t */\r\n\t\tthis.useTicks = false;\r\n\t\t\r\n\t\t/**\r\n\t\t * Causes the tween to play in reverse.\r\n\t\t * @property reversed\r\n\t\t * @type {Boolean}\r\n\t\t * @default false\r\n\t\t */\r\n\t\tthis.reversed = false;\r\n\t\t\r\n\t\t/**\r\n\t\t * Causes the tween to reverse direction at the end of each loop. Each single-direction play-through of the\r\n\t\t * tween counts as a single bounce. For example, to play a tween once forward, and once back, set the\r\n\t\t * `{{#crossLink \"AbstractTween/loop:property\"}}{{/crossLink}}` to `1`.\r\n\t\t * @property bounce\r\n\t\t * @type {Boolean}\r\n\t\t * @default false\r\n\t\t */\r\n\t\tthis.bounce = false;\r\n\t\t\r\n\t\t/**\r\n\t\t * Changes the rate at which the tween advances. For example, a `timeScale` value of `2` will double the\r\n\t\t * playback speed, a value of `0.5` would halve it.\r\n\t\t * @property timeScale\r\n\t\t * @type {Number}\r\n\t\t * @default 1\r\n\t\t */\r\n\t\tthis.timeScale = 1;\r\n\t\r\n\t\t/**\r\n\t\t * Indicates the duration of this tween in milliseconds (or ticks if `useTicks` is true), irrespective of `loops`.\r\n\t\t * This value is automatically updated as you modify the tween. Changing it directly could result in unexpected\r\n\t\t * behaviour.\r\n\t\t * @property duration\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t * @readonly\r\n\t\t */\r\n\t\tthis.duration = 0;\r\n\t\r\n\t\t/**\r\n\t\t * The current normalized position of the tween. This will always be a value between 0 and `duration`.\r\n\t\t * Changing this property directly will have unexpected results, use {{#crossLink \"Tween/setPosition\"}}{{/crossLink}}.\r\n\t\t * @property position\r\n\t\t * @type {Object}\r\n\t\t * @default 0\r\n\t\t * @readonly\r\n\t\t */\r\n\t\tthis.position = 0;\r\n\t\t\r\n\t\t/**\r\n\t\t * The raw tween position. This value will be between `0` and `loops * duration` while the tween is active, or -1 before it activates.\r\n\t\t * @property rawPosition\r\n\t\t * @type {Number}\r\n\t\t * @default -1\r\n\t\t * @readonly\r\n\t\t */\r\n\t\tthis.rawPosition = -1;\r\n\t\t\r\n\t\t\r\n\t// private properties:\r\n\t\t/**\r\n\t\t * @property _paused\r\n\t\t * @type {Boolean}\r\n\t\t * @default false\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._paused = true;\r\n\t\t\r\n\t\t/**\r\n\t\t * @property _next\r\n\t\t * @type {Tween}\r\n\t\t * @default null\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._next = null;\r\n\t\t\r\n\t\t/**\r\n\t\t * @property _prev\r\n\t\t * @type {Tween}\r\n\t\t * @default null\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._prev = null;\r\n\t\t\r\n\t\t/**\r\n\t\t * @property _parent\r\n\t\t * @type {Object}\r\n\t\t * @default null\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._parent = null;\r\n\r\n\t\t/**\r\n\t\t * @property _labels\r\n\t\t * @type Object\r\n\t\t * @protected\r\n\t\t **/\r\n\t\tthis._labels = null;\r\n\r\n\t\t/**\r\n\t\t * @property _labelList\r\n\t\t * @type Array[Object]\r\n\t\t * @protected\r\n\t\t **/\r\n\t\tthis._labelList = null;\r\n\r\n\t\tif (props) {\r\n\t\t\tthis.useTicks = !!props.useTicks;\r\n\t\t\tthis.ignoreGlobalPause = !!props.ignoreGlobalPause;\r\n\t\t\tthis.loop = props.loop === true ? -1 : (props.loop||0);\r\n\t\t\tthis.reversed = !!props.reversed;\r\n\t\t\tthis.bounce = !!props.bounce;\r\n\t\t\tthis.timeScale = props.timeScale||1;\r\n\t\t\tprops.onChange && this.addEventListener(\"change\", props.onChange);\r\n\t\t\tprops.onComplete && this.addEventListener(\"complete\", props.onComplete);\r\n\t\t}\r\n\t\t\r\n\t\t// while `position` is shared, it needs to happen after ALL props are set, so it's handled in _init()\r\n\t};\r\n\r\n\tvar p = createjs.extend(AbstractTween, createjs.EventDispatcher);\r\n\r\n// events:\r\n\t/**\r\n\t * Dispatched whenever the tween's position changes. It occurs after all tweened properties are updated and actions\r\n\t * are executed.\r\n\t * @event change\r\n\t **/\r\n\t \r\n\t/**\r\n\t * Dispatched when the tween reaches its end and has paused itself. This does not fire until all loops are complete;\r\n\t * tweens that loop continuously will never fire a complete event.\r\n\t * @event complete\r\n\t **/\r\n\t\r\n// getter / setters:\r\n\t\r\n\t/**\r\n\t * Use the {{#crossLink \"AbstractTween/paused:property\"}}{{/crossLink}} property instead.\r\n\t * @method _setPaused\r\n\t * @param {Boolean} [value=true] Indicates whether the tween should be paused (`true`) or played (`false`).\r\n\t * @return {AbstractTween} This tween instance (for chaining calls)\r\n\t * @protected\r\n\t * @chainable\r\n\t */\r\n\tp._setPaused = function(value) {\r\n\t\tcreatejs.Tween._register(this, value);\r\n\t\treturn this;\r\n\t};\r\n\tp.setPaused = createjs.deprecate(p._setPaused, \"AbstractTween.setPaused\");\r\n\t\r\n\t/**\r\n\t * Use the {{#crossLink \"AbstractTween/paused:property\"}}{{/crossLink}} property instead.\r\n\t * @method _getPaused\r\n\t * @protected\r\n\t */\r\n\tp._getPaused = function() {\r\n\t\treturn this._paused;\r\n\t};\r\n\tp.getPaused = createjs.deprecate(p._getPaused, \"AbstactTween.getPaused\");\r\n\t\r\n\t/**\r\n\t * Use the {{#crossLink \"AbstractTween/currentLabel:property\"}}{{/crossLink}} property instead.\r\n\t * @method _getCurrentLabel\r\n\t * @protected\r\n\t * @return {String} The name of the current label or null if there is no label\r\n\t **/\r\n\tp._getCurrentLabel = function(pos) {\r\n\t\tvar labels = this.getLabels();\r\n\t\tif (pos == null) { pos = this.position; }\r\n\t\tfor (var i = 0, l = labels.length; i\r\n\t * \t\t
      • null if the current position is 2.
      • \r\n\t * \t\t
      • \"first\" if the current position is 4.
      • \r\n\t * \t\t
      • \"first\" if the current position is 7.
      • \r\n\t * \t\t
      • \"second\" if the current position is 15.
      • \r\n\t *
      \r\n\t * @property currentLabel\r\n\t * @type String\r\n\t * @readonly\r\n\t **/\r\n\t \r\n\ttry {\r\n\t\tObject.defineProperties(p, {\r\n\t\t\tpaused: { set: p._setPaused, get: p._getPaused },\r\n\t\t\tcurrentLabel: { get: p._getCurrentLabel }\r\n\t\t});\r\n\t} catch (e) {}\r\n\r\n// public methods:\r\n\t/**\r\n\t * Advances the tween by a specified amount.\r\n\t * @method advance\r\n\t * @param {Number} delta The amount to advance in milliseconds (or ticks if useTicks is true). Negative values are supported.\r\n\t * @param {Number} [ignoreActions=false] If true, actions will not be executed due to this change in position.\r\n\t */\r\n\tp.advance = function(delta, ignoreActions) {\r\n\t\tthis.setPosition(this.rawPosition+delta*this.timeScale, ignoreActions);\r\n\t};\r\n\t\r\n\t/**\r\n\t * Advances the tween to a specified position.\r\n\t * @method setPosition\r\n\t * @param {Number} rawPosition The raw position to seek to in milliseconds (or ticks if useTicks is true).\r\n\t * @param {Boolean} [ignoreActions=false] If true, do not run any actions that would be triggered by this operation.\r\n\t * @param {Boolean} [jump=false] If true, only actions at the new position will be run. If false, actions between the old and new position are run.\r\n\t * @param {Function} [callback] Primarily for use with MovieClip, this callback is called after properties are updated, but before actions are run.\r\n\t */\r\n\tp.setPosition = function(rawPosition, ignoreActions, jump, callback) {\r\n\t\tvar d=this.duration, loopCount=this.loop, prevRawPos = this.rawPosition;\r\n\t\tvar loop=0, t=0, end=false;\r\n\t\t\r\n\t\t// normalize position:\r\n\t\tif (rawPosition < 0) { rawPosition = 0; }\r\n\t\t\r\n\t\tif (d === 0) {\r\n\t\t\t// deal with 0 length tweens.\r\n\t\t\tend = true;\r\n\t\t\tif (prevRawPos !== -1) { return end; } // we can avoid doing anything else if we're already at 0.\r\n\t\t} else {\r\n\t\t\tloop = rawPosition/d|0;\r\n\t\t\tt = rawPosition-loop*d;\r\n\t\t\t\r\n\t\t\tend = (loopCount !== -1 && rawPosition >= loopCount*d+d);\r\n\t\t\tif (end) { rawPosition = (t=d)*(loop=loopCount)+d; }\r\n\t\t\tif (rawPosition === prevRawPos) { return end; } // no need to update\r\n\t\t\t\r\n\t\t\tvar rev = !this.reversed !== !(this.bounce && loop%2); // current loop is reversed\r\n\t\t\tif (rev) { t = d-t; }\r\n\t\t}\r\n\t\t\r\n\t\t// set this in advance in case an action modifies position:\r\n\t\tthis.position = t;\r\n\t\tthis.rawPosition = rawPosition;\r\n\t\t\r\n\t\tthis._updatePosition(jump, end);\r\n\t\tif (end) { this.paused = true; }\r\n\t\t\r\n\t\tcallback&&callback(this);\r\n\t\t\r\n\t\tif (!ignoreActions) { this._runActions(prevRawPos, rawPosition, jump, !jump && prevRawPos === -1); }\r\n\t\t\r\n\t\tthis.dispatchEvent(\"change\");\r\n\t\tif (end) { this.dispatchEvent(\"complete\"); }\r\n\t};\r\n\t\r\n\t/**\r\n\t * Calculates a normalized position based on a raw position. For example, given a tween with a duration of 3000ms set to loop:\r\n\t * \tconsole.log(myTween.calculatePosition(3700); // 700\r\n\t * @method calculatePosition\r\n\t * @param {Number} rawPosition A raw position.\r\n\t */\r\n\tp.calculatePosition = function(rawPosition) {\r\n\t\t// largely duplicated from setPosition, but necessary to avoid having to instantiate generic objects to pass values (end, loop, position) back.\r\n\t\tvar d=this.duration, loopCount=this.loop, loop=0, t=0;\r\n\t\t\r\n\t\tif (d===0) { return 0; }\r\n\t\tif (loopCount !== -1 && rawPosition >= loopCount*d+d) { t = d; loop = loopCount } // end\r\n\t\telse if (rawPosition < 0) { t = 0; }\r\n\t\telse { loop = rawPosition/d|0; t = rawPosition-loop*d; }\r\n\t\t\r\n\t\tvar rev = !this.reversed !== !(this.bounce && loop%2); // current loop is reversed\r\n\t\treturn rev ? d-t : t;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Returns a list of the labels defined on this tween sorted by position.\r\n\t * @method getLabels\r\n\t * @return {Array[Object]} A sorted array of objects with label and position properties.\r\n\t **/\r\n\tp.getLabels = function() {\r\n\t\tvar list = this._labelList;\r\n\t\tif (!list) {\r\n\t\t\tlist = this._labelList = [];\r\n\t\t\tvar labels = this._labels;\r\n\t\t\tfor (var n in labels) {\r\n\t\t\t\tlist.push({label:n, position:labels[n]});\r\n\t\t\t}\r\n\t\t\tlist.sort(function (a,b) { return a.position- b.position; });\r\n\t\t}\r\n\t\treturn list;\r\n\t};\r\n\t\r\n\r\n\t/**\r\n\t * Defines labels for use with gotoAndPlay/Stop. Overwrites any previously set labels.\r\n\t * @method setLabels\r\n\t * @param {Object} labels An object defining labels for using {{#crossLink \"Timeline/gotoAndPlay\"}}{{/crossLink}}/{{#crossLink \"Timeline/gotoAndStop\"}}{{/crossLink}}\r\n\t * in the form `{myLabelName:time}` where time is in milliseconds (or ticks if `useTicks` is `true`).\r\n\t **/\r\n\tp.setLabels = function(labels) {\r\n\t\tthis._labels = labels;\r\n\t\tthis._labelList = null;\r\n\t};\r\n\r\n\t/**\r\n\t * Adds a label that can be used with {{#crossLink \"Timeline/gotoAndPlay\"}}{{/crossLink}}/{{#crossLink \"Timeline/gotoAndStop\"}}{{/crossLink}}.\r\n\t * @method addLabel\r\n\t * @param {String} label The label name.\r\n\t * @param {Number} position The position this label represents.\r\n\t **/\r\n\tp.addLabel = function(label, position) {\r\n\t\tif (!this._labels) { this._labels = {}; }\r\n\t\tthis._labels[label] = position;\r\n\t\tvar list = this._labelList;\r\n\t\tif (list) {\r\n\t\t\tfor (var i= 0,l=list.length; i Tween\" : \"Timeline\", \"run\", startRawPos, endRawPos, jump, includeStart);\r\n\t\t\r\n\t\t// if we don't have any actions, and we're not a Timeline, then return:\r\n\t\t// TODO: a cleaner way to handle this would be to override this method in Tween, but I'm not sure it's worth the overhead.\r\n\t\tif (!this._actionHead && !this.tweens) { return; } \r\n\t\t\r\n\t\tvar d=this.duration, reversed=this.reversed, bounce=this.bounce, loopCount=this.loop;\r\n\t\tvar loop0, loop1, t0, t1;\r\n\t\t\r\n\t\tif (d === 0) {\r\n\t\t\t// deal with 0 length tweens:\r\n\t\t\tloop0 = loop1 = t0 = t1 = 0;\r\n\t\t\treversed = bounce = false;\r\n\t\t} else {\r\n\t\t\tloop0=startRawPos/d|0;\r\n\t\t\tloop1=endRawPos/d|0;\r\n\t\t\tt0=startRawPos-loop0*d;\r\n\t\t\tt1=endRawPos-loop1*d;\r\n\t\t}\r\n\t\t\r\n\t\t// catch positions that are past the end:\r\n\t\tif (loopCount !== -1) {\r\n\t\t\tif (loop1 > loopCount) { t1=d; loop1=loopCount; }\r\n\t\t\tif (loop0 > loopCount) { t0=d; loop0=loopCount; }\r\n\t\t}\r\n\t\t\r\n\t\t// special cases:\r\n\t\tif (jump) { return this._runActionsRange(t1, t1, jump, includeStart); } // jump.\r\n\t\telse if (loop0 === loop1 && t0 === t1 && !jump && !includeStart) { return; } // no actions if the position is identical and we aren't including the start\r\n\t\telse if (loop0 === -1) { loop0 = t0 = 0; } // correct the -1 value for first advance, important with useTicks.\r\n\t\t\r\n\t\tvar dir = (startRawPos <= endRawPos), loop = loop0;\r\n\t\tdo {\r\n\t\t\tvar rev = !reversed !== !(bounce && loop % 2);\r\n\r\n\t\t\tvar start = (loop === loop0) ? t0 : dir ? 0 : d;\r\n\t\t\tvar end = (loop === loop1) ? t1 : dir ? d : 0;\r\n\t\t\t\r\n\t\t\tif (rev) {\r\n\t\t\t\tstart = d - start;\r\n\t\t\t\tend = d - end;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (bounce && loop !== loop0 && start === end) { /* bounced onto the same time/frame, don't re-execute end actions */ }\r\n\t\t\telse if (this._runActionsRange(start, end, jump, includeStart || (loop !== loop0 && !bounce))) { return true; }\r\n\t\t\t\t\r\n\t\t\tincludeStart = false;\r\n\t\t} while ((dir && ++loop <= loop1) || (!dir && --loop >= loop1));\r\n\t};\r\n\t\r\n\tp._runActionsRange = function(startPos, endPos, jump, includeStart) {\r\n\t\t// abstract\r\n\t};\r\n\r\n\tcreatejs.AbstractTween = createjs.promote(AbstractTween, \"EventDispatcher\");\r\n}());\r\n\r\n//##############################################################################\r\n// Tween.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\r\n// constructor\r\n\t/**\r\n\t * Tweens properties for a single target. Methods can be chained to create complex animation sequences:\r\n\t *\r\n\t *

      Example

      \r\n\t *\r\n\t *\tcreatejs.Tween.get(target)\r\n\t *\t\t.wait(500)\r\n\t *\t\t.to({alpha:0, visible:false}, 1000)\r\n\t *\t\t.call(handleComplete);\r\n\t *\r\n\t * Multiple tweens can share a target, however if they affect the same properties there could be unexpected\r\n\t * behaviour. To stop all tweens on an object, use {{#crossLink \"Tween/removeTweens\"}}{{/crossLink}} or pass `override:true`\r\n\t * in the props argument.\r\n\t *\r\n\t * \tcreatejs.Tween.get(target, {override:true}).to({x:100});\r\n\t *\r\n\t * Subscribe to the {{#crossLink \"Tween/change:event\"}}{{/crossLink}} event to be notified when the tween position changes.\r\n\t *\r\n\t * \tcreatejs.Tween.get(target, {override:true}).to({x:100}).addEventListener(\"change\", handleChange);\r\n\t * \tfunction handleChange(event) {\r\n\t * \t\t// The tween changed.\r\n\t * \t}\r\n\t *\r\n\t * See the {{#crossLink \"Tween/get\"}}{{/crossLink}} method also.\r\n\t * @class Tween\r\n\t * @param {Object} target The target object that will have its properties tweened.\r\n\t * @param {Object} [props] The configuration properties to apply to this instance (ex. `{loop:-1, paused:true}`).\r\n\t * Supported props are listed below. These props are set on the corresponding instance properties except where\r\n\t * specified.\r\n\t * @param {boolean} [props.useTicks=false] See the {{#crossLink \"AbstractTween/useTicks:property\"}}{{/crossLink}} property for more information.\r\n\t * @param {boolean} [props.ignoreGlobalPause=false] See the {{#crossLink \"AbstractTween/ignoreGlobalPause:property\"}}{{/crossLink}} for more information.\r\n\t * @param {number|boolean} [props.loop=0] See the {{#crossLink \"AbstractTween/loop:property\"}}{{/crossLink}} for more information.\r\n\t * @param {boolean} [props.reversed=false] See the {{#crossLink \"AbstractTween/reversed:property\"}}{{/crossLink}} for more information.\r\n\t * @param {boolean} [props.bounce=false] See the {{#crossLink \"AbstractTween/bounce:property\"}}{{/crossLink}} for more information.\r\n\t * @param {number} [props.timeScale=1] See the {{#crossLink \"AbstractTween/timeScale:property\"}}{{/crossLink}} for more information.\r\n\t * @param {object} [props.pluginData] See the {{#crossLink \"Tween/pluginData:property\"}}{{/crossLink}} for more information.\r\n\t * @param {boolean} [props.paused=false] See the {{#crossLink \"AbstractTween/paused:property\"}}{{/crossLink}} for more information.\r\n\t * @param {number} [props.position=0] The initial position for this tween. See {{#crossLink \"AbstractTween/position:property\"}}{{/crossLink}}\r\n\t * @param {Function} [props.onChange] Adds the specified function as a listener to the {{#crossLink \"AbstractTween/change:event\"}}{{/crossLink}} event\r\n\t * @param {Function} [props.onComplete] Adds the specified function as a listener to the {{#crossLink \"AbstractTween/complete:event\"}}{{/crossLink}} event\r\n\t * @param {boolean} [props.override=false] Removes all existing tweens for the target when set to `true`.\r\n\t *
    \r\n\t * @extends AbstractTween\r\n\t * @constructor\r\n\t */\r\n\tfunction Tween(target, props) {\r\n\t\tthis.AbstractTween_constructor(props);\r\n\t\t\r\n\t// public properties:\r\n\t\r\n\t\t/**\r\n\t\t * Allows you to specify data that will be used by installed plugins. Each plugin uses this differently, but in general\r\n\t\t * you specify data by assigning it to a property of `pluginData` with the same name as the plugin.\r\n\t\t * Note that in many cases, this data is used as soon as the plugin initializes itself for the tween.\r\n\t\t * As such, this data should be set before the first `to` call in most cases.\r\n\t\t * @example\r\n\t\t *\tmyTween.pluginData.SmartRotation = data;\r\n\t\t * \r\n\t\t * Most plugins also support a property to disable them for a specific tween. This is typically the plugin name followed by \"_disabled\".\r\n\t\t * @example\r\n\t\t *\tmyTween.pluginData.SmartRotation_disabled = true;\r\n\t\t * \r\n\t\t * Some plugins also store working data in this object, usually in a property named `_PluginClassName`.\r\n\t\t * See the documentation for individual plugins for more details.\r\n\t\t * @property pluginData\r\n\t\t * @type {Object}\r\n\t\t */\r\n\t\tthis.pluginData = null;\r\n\t\r\n\t\t/**\r\n\t\t * The target of this tween. This is the object on which the tweened properties will be changed.\r\n\t\t * @property target\r\n\t\t * @type {Object}\r\n\t\t * @readonly\r\n\t\t */\r\n\t\tthis.target = target;\r\n\t\r\n\t\t/**\r\n\t\t * Indicates the tween's current position is within a passive wait.\r\n\t\t * @property passive\r\n\t\t * @type {Boolean}\r\n\t\t * @default false\r\n\t\t * @readonly\r\n\t\t **/\r\n\t\tthis.passive = false;\r\n\t\t\r\n\t\t\r\n\t// private properties:\r\n\t\r\n\t\t/**\r\n\t\t * @property _stepHead\r\n\t\t * @type {TweenStep}\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._stepHead = new TweenStep(null, 0, 0, {}, null, true);\r\n\t\t\r\n\t\t/**\r\n\t\t * @property _stepTail\r\n\t\t * @type {TweenStep}\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._stepTail = this._stepHead;\r\n\t\t\r\n\t\t/**\r\n\t\t * The position within the current step. Used by MovieClip.\r\n\t\t * @property _stepPosition\r\n\t\t * @type {Number}\r\n\t\t * @default 0\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._stepPosition = 0;\r\n\t\t\r\n\t\t/**\r\n\t\t * @property _actionHead\r\n\t\t * @type {TweenAction}\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._actionHead = null;\r\n\t\t\r\n\t\t/**\r\n\t\t * @property _actionTail\r\n\t\t * @type {TweenAction}\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._actionTail = null;\r\n\t\t\r\n\t\t/**\r\n\t\t * Plugins added to this tween instance.\r\n\t\t * @property _plugins\r\n\t\t * @type Array[Object]\r\n\t\t * @default null\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._plugins = null;\r\n\t\t\r\n\t\t/**\r\n\t\t * Hash for quickly looking up added plugins. Null until a plugin is added.\r\n\t\t * @property _plugins\r\n\t\t * @type Object\r\n\t\t * @default null\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._pluginIds = null;\r\n\t\t\r\n\t\t/**\r\n\t\t * Used by plugins to inject new properties.\r\n\t\t * @property _injected\r\n\t\t * @type {Object}\r\n\t\t * @default null\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._injected = null;\r\n\r\n\t\tif (props) {\r\n\t\t\tthis.pluginData = props.pluginData;\r\n\t\t\tif (props.override) { Tween.removeTweens(target); }\r\n\t\t}\r\n\t\tif (!this.pluginData) { this.pluginData = {}; }\r\n\t\t\r\n\t\tthis._init(props);\r\n\t};\r\n\r\n\tvar p = createjs.extend(Tween, createjs.AbstractTween);\r\n\r\n// static properties\r\n\r\n\t/**\r\n\t * Constant returned by plugins to tell the tween not to use default assignment.\r\n\t * @property IGNORE\r\n\t * @type Object\r\n\t * @static\r\n\t */\r\n\tTween.IGNORE = {};\r\n\r\n\t/**\r\n\t * @property _listeners\r\n\t * @type Array[Tween]\r\n\t * @static\r\n\t * @protected\r\n\t */\r\n\tTween._tweens = [];\r\n\r\n\t/**\r\n\t * @property _plugins\r\n\t * @type Object\r\n\t * @static\r\n\t * @protected\r\n\t */\r\n\tTween._plugins = null;\r\n\t\r\n\t/**\r\n\t * @property _tweenHead\r\n\t * @type Tween\r\n\t * @static\r\n\t * @protected\r\n\t */\r\n\tTween._tweenHead = null;\r\n\t\r\n\t/**\r\n\t * @property _tweenTail\r\n\t * @type Tween\r\n\t * @static\r\n\t * @protected\r\n\t */\r\n\tTween._tweenTail = null;\r\n\r\n\r\n// static methods\t\r\n\t/**\r\n\t * Returns a new tween instance. This is functionally identical to using `new Tween(...)`, but may look cleaner\r\n\t * with the chained syntax of TweenJS.\r\n\t *

    Example

    \r\n\t *\r\n\t *\tvar tween = createjs.Tween.get(target).to({x:100}, 500);\r\n\t *\t// equivalent to:\r\n\t *\tvar tween = new createjs.Tween(target).to({x:100}, 500);\r\n\t *\r\n\t * @method get\r\n\t * @param {Object} target The target object that will have its properties tweened.\r\n\t * @param {Object} [props] The configuration properties to apply to this instance (ex. `{loop:-1, paused:true}`).\r\n\t * Supported props are listed below. These props are set on the corresponding instance properties except where\r\n\t * specified.\r\n\t * @param {boolean} [props.useTicks=false] See the {{#crossLink \"AbstractTween/useTicks:property\"}}{{/crossLink}} property for more information.\r\n\t * @param {boolean} [props.ignoreGlobalPause=false] See the {{#crossLink \"AbstractTween/ignoreGlobalPause:property\"}}{{/crossLink}} for more information.\r\n\t * @param {number|boolean} [props.loop=0] See the {{#crossLink \"AbstractTween/loop:property\"}}{{/crossLink}} for more information.\r\n\t * @param {boolean} [props.reversed=false] See the {{#crossLink \"AbstractTween/reversed:property\"}}{{/crossLink}} for more information.\r\n\t * @param {boolean} [props.bounce=false] See the {{#crossLink \"AbstractTween/bounce:property\"}}{{/crossLink}} for more information.\r\n\t * @param {number} [props.timeScale=1] See the {{#crossLink \"AbstractTween/timeScale:property\"}}{{/crossLink}} for more information.\r\n\t * @param {object} [props.pluginData] See the {{#crossLink \"Tween/pluginData:property\"}}{{/crossLink}} for more information.\r\n\t * @param {boolean} [props.paused=false] See the {{#crossLink \"AbstractTween/paused:property\"}}{{/crossLink}} for more information.\r\n\t * @param {number} [props.position=0] The initial position for this tween. See {{#crossLink \"AbstractTween/position:property\"}}{{/crossLink}}\r\n\t * @param {Function} [props.onChange] Adds the specified function as a listener to the {{#crossLink \"AbstractTween/change:event\"}}{{/crossLink}} event\r\n\t * @param {Function} [props.onComplete] Adds the specified function as a listener to the {{#crossLink \"AbstractTween/complete:event\"}}{{/crossLink}} event\r\n\t * @param {boolean} [props.override=false] Removes all existing tweens for the target when set to `true`.\r\n\t * @return {Tween} A reference to the created tween.\r\n\t * @static\r\n\t */\r\n\tTween.get = function(target, props) {\r\n\t\treturn new Tween(target, props);\r\n\t};\r\n\r\n\t/**\r\n\t * Advances all tweens. This typically uses the {{#crossLink \"Ticker\"}}{{/crossLink}} class, but you can call it\r\n\t * manually if you prefer to use your own \"heartbeat\" implementation.\r\n\t * @method tick\r\n\t * @param {Number} delta The change in time in milliseconds since the last tick. Required unless all tweens have\r\n\t * `useTicks` set to true.\r\n\t * @param {Boolean} paused Indicates whether a global pause is in effect. Tweens with {{#crossLink \"Tween/ignoreGlobalPause:property\"}}{{/crossLink}}\r\n\t * will ignore this, but all others will pause if this is `true`.\r\n\t * @static\r\n\t */\r\n\tTween.tick = function(delta, paused) {\r\n\t\tvar tween = Tween._tweenHead;\r\n\t\twhile (tween) {\r\n\t\t\tvar next = tween._next; // in case it completes and wipes its _next property\r\n\t\t\tif ((paused && !tween.ignoreGlobalPause) || tween._paused) { /* paused */ }\r\n\t\t\telse { tween.advance(tween.useTicks?1:delta); }\r\n\t\t\ttween = next;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Handle events that result from Tween being used as an event handler. This is included to allow Tween to handle\r\n\t * {{#crossLink \"Ticker/tick:event\"}}{{/crossLink}} events from the createjs {{#crossLink \"Ticker\"}}{{/crossLink}}.\r\n\t * No other events are handled in Tween.\r\n\t * @method handleEvent\r\n\t * @param {Object} event An event object passed in by the {{#crossLink \"EventDispatcher\"}}{{/crossLink}}. Will\r\n\t * usually be of type \"tick\".\r\n\t * @private\r\n\t * @static\r\n\t * @since 0.4.2\r\n\t */\r\n\tTween.handleEvent = function(event) {\r\n\t\tif (event.type === \"tick\") {\r\n\t\t\tthis.tick(event.delta, event.paused);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Removes all existing tweens for a target. This is called automatically by new tweens if the `override`\r\n\t * property is `true`.\r\n\t * @method removeTweens\r\n\t * @param {Object} target The target object to remove existing tweens from.\r\n\t * @static\r\n\t */\r\n\tTween.removeTweens = function(target) {\r\n\t\tif (!target.tweenjs_count) { return; }\r\n\t\tvar tween = Tween._tweenHead;\r\n\t\twhile (tween) {\r\n\t\t\tvar next = tween._next;\r\n\t\t\tif (tween.target === target) { Tween._register(tween, true); }\r\n\t\t\ttween = next;\r\n\t\t}\r\n\t\ttarget.tweenjs_count = 0;\r\n\t};\r\n\r\n\t/**\r\n\t * Stop and remove all existing tweens.\r\n\t * @method removeAllTweens\r\n\t * @static\r\n\t * @since 0.4.1\r\n\t */\r\n\tTween.removeAllTweens = function() {\r\n\t\tvar tween = Tween._tweenHead;\r\n\t\twhile (tween) {\r\n\t\t\tvar next = tween._next;\r\n\t\t\ttween._paused = true;\r\n\t\t\ttween.target&&(tween.target.tweenjs_count = 0);\r\n\t\t\ttween._next = tween._prev = null;\r\n\t\t\ttween = next;\r\n\t\t}\r\n\t\tTween._tweenHead = Tween._tweenTail = null;\r\n\t};\r\n\r\n\t/**\r\n\t * Indicates whether there are any active tweens on the target object (if specified) or in general.\r\n\t * @method hasActiveTweens\r\n\t * @param {Object} [target] The target to check for active tweens. If not specified, the return value will indicate\r\n\t * if there are any active tweens on any target.\r\n\t * @return {Boolean} Indicates if there are active tweens.\r\n\t * @static\r\n\t */\r\n\tTween.hasActiveTweens = function(target) {\r\n\t\tif (target) { return !!target.tweenjs_count; }\r\n\t\treturn !!Tween._tweenHead;\r\n\t};\r\n\r\n\t/**\r\n\t * Installs a plugin, which can modify how certain properties are handled when tweened. See the {{#crossLink \"SamplePlugin\"}}{{/crossLink}}\r\n\t * for an example of how to write TweenJS plugins. Plugins should generally be installed via their own `install` method, in order to provide\r\n\t * the plugin with an opportunity to configure itself.\r\n\t * @method _installPlugin\r\n\t * @param {Object} plugin The plugin to install\r\n\t * @static\r\n\t * @protected\r\n\t */\r\n\tTween._installPlugin = function(plugin) {\r\n\t\tvar priority = (plugin.priority = plugin.priority||0), arr = (Tween._plugins = Tween._plugins || []);\r\n\t\tfor (var i=0,l=arr.length;iExample\r\n\t *\r\n\t *\t//This tween will wait 1s before alpha is faded to 0.\r\n\t *\tcreatejs.Tween.get(target).wait(1000).to({alpha:0}, 1000);\r\n\t *\r\n\t * @method wait\r\n\t * @param {Number} duration The duration of the wait in milliseconds (or in ticks if `useTicks` is true).\r\n\t * @param {Boolean} [passive=false] Tween properties will not be updated during a passive wait. This\r\n\t * is mostly useful for use with {{#crossLink \"Timeline\"}}{{/crossLink}} instances that contain multiple tweens\r\n\t * affecting the same target at different times.\r\n\t * @return {Tween} This tween instance (for chaining calls).\r\n\t * @chainable\r\n\t **/\r\n\tp.wait = function(duration, passive) {\r\n\t\tif (duration > 0) { this._addStep(+duration, this._stepTail.props, null, passive); }\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Adds a tween from the current values to the specified properties. Set duration to 0 to jump to these value.\r\n\t * Numeric properties will be tweened from their current value in the tween to the target value. Non-numeric\r\n\t * properties will be set at the end of the specified duration.\r\n\t *

    Example

    \r\n\t *\r\n\t *\tcreatejs.Tween.get(target).to({alpha:0, visible:false}, 1000);\r\n\t *\r\n\t * @method to\r\n\t * @param {Object} props An object specifying property target values for this tween (Ex. `{x:300}` would tween the x\r\n\t * property of the target to 300).\r\n\t * @param {Number} [duration=0] The duration of the tween in milliseconds (or in ticks if `useTicks` is true).\r\n\t * @param {Function} [ease=\"linear\"] The easing function to use for this tween. See the {{#crossLink \"Ease\"}}{{/crossLink}}\r\n\t * class for a list of built-in ease functions.\r\n\t * @return {Tween} This tween instance (for chaining calls).\r\n\t * @chainable\r\n\t */\r\n\tp.to = function(props, duration, ease) {\r\n\t\tif (duration == null || duration < 0) { duration = 0; }\r\n\t\tvar step = this._addStep(+duration, null, ease);\r\n\t\tthis._appendProps(props, step);\r\n\t\treturn this;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Adds a label that can be used with {{#crossLink \"Tween/gotoAndPlay\"}}{{/crossLink}}/{{#crossLink \"Tween/gotoAndStop\"}}{{/crossLink}}\r\n\t * at the current point in the tween. For example:\r\n\t * \r\n\t * \tvar tween = createjs.Tween.get(foo)\r\n\t * \t\t\t\t\t.to({x:100}, 1000)\r\n\t * \t\t\t\t\t.label(\"myLabel\")\r\n\t * \t\t\t\t\t.to({x:200}, 1000);\r\n\t * // ...\r\n\t * tween.gotoAndPlay(\"myLabel\"); // would play from 1000ms in.\r\n\t * \r\n\t * @method addLabel\r\n\t * @param {String} label The label name.\r\n\t * @return {Tween} This tween instance (for chaining calls).\r\n\t * @chainable\r\n\t **/\r\n\tp.label = function(name) {\r\n\t\tthis.addLabel(name, this.duration);\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * Adds an action to call the specified function.\r\n\t *

    Example

    \r\n\t *\r\n\t * \t//would call myFunction() after 1 second.\r\n\t * \tcreatejs.Tween.get().wait(1000).call(myFunction);\r\n\t *\r\n\t * @method call\r\n\t * @param {Function} callback The function to call.\r\n\t * @param {Array} [params]. The parameters to call the function with. If this is omitted, then the function\r\n\t * will be called with a single param pointing to this tween.\r\n\t * @param {Object} [scope]. The scope to call the function in. If omitted, it will be called in the target's scope.\r\n\t * @return {Tween} This tween instance (for chaining calls).\r\n\t * @chainable\r\n\t */\r\n\tp.call = function(callback, params, scope) {\r\n\t\treturn this._addAction(scope||this.target, callback, params||[this]);\r\n\t};\r\n\r\n\t/**\r\n\t * Adds an action to set the specified props on the specified target. If `target` is null, it will use this tween's\r\n\t * target. Note that for properties on the target object, you should consider using a zero duration {{#crossLink \"Tween/to\"}}{{/crossLink}}\r\n\t * operation instead so the values are registered as tweened props.\r\n\t *

    Example

    \r\n\t *\r\n\t *\tmyTween.wait(1000).set({visible:false}, foo);\r\n\t *\r\n\t * @method set\r\n\t * @param {Object} props The properties to set (ex. `{visible:false}`).\r\n\t * @param {Object} [target] The target to set the properties on. If omitted, they will be set on the tween's target.\r\n\t * @return {Tween} This tween instance (for chaining calls).\r\n\t * @chainable\r\n\t */\r\n\tp.set = function(props, target) {\r\n\t\treturn this._addAction(target||this.target, this._set, [props]);\r\n\t};\r\n\r\n\t/**\r\n\t * Adds an action to play (unpause) the specified tween. This enables you to sequence multiple tweens.\r\n\t *

    Example

    \r\n\t *\r\n\t *\tmyTween.to({x:100}, 500).play(otherTween);\r\n\t *\r\n\t * @method play\r\n\t * @param {Tween} [tween] The tween to play. Defaults to this tween.\r\n\t * @return {Tween} This tween instance (for chaining calls).\r\n\t * @chainable\r\n\t */\r\n\tp.play = function(tween) {\r\n\t\treturn this._addAction(tween||this, this._set, [{paused:false}]);\r\n\t};\r\n\r\n\t/**\r\n\t * Adds an action to pause the specified tween.\r\n\t * \r\n\t * \tmyTween.pause(otherTween).to({alpha:1}, 1000).play(otherTween);\r\n\t * \r\n\t * Note that this executes at the end of a tween update, so the tween may advance beyond the time the pause\r\n\t * action was inserted at. For example:\r\n\t * \r\n\t * myTween.to({foo:0}, 1000).pause().to({foo:1}, 1000);\r\n\t * \r\n\t * At 60fps the tween will advance by ~16ms per tick, if the tween above was at 999ms prior to the current tick, it\r\n\t * will advance to 1015ms (15ms into the second \"step\") and then pause.\r\n\t * \r\n\t * @method pause\r\n\t * @param {Tween} [tween] The tween to pause. Defaults to this tween.\r\n\t * @return {Tween} This tween instance (for chaining calls)\r\n\t * @chainable\r\n\t */\r\n\tp.pause = function(tween) {\r\n\t\treturn this._addAction(tween||this, this._set, [{paused:true}]);\r\n\t};\r\n\r\n\t// tiny api (primarily for tool output):\r\n\tp.w = p.wait;\r\n\tp.t = p.to;\r\n\tp.c = p.call;\r\n\tp.s = p.set;\r\n\r\n\t/**\r\n\t * Returns a string representation of this object.\r\n\t * @method toString\r\n\t * @return {String} a string representation of the instance.\r\n\t */\r\n\tp.toString = function() {\r\n\t\treturn \"[Tween]\";\r\n\t};\r\n\r\n\t/**\r\n\t * @method clone\r\n\t * @protected\r\n\t */\r\n\tp.clone = function() {\r\n\t\tthrow(\"Tween can not be cloned.\")\r\n\t};\r\n\r\n\r\n// private methods:\r\n\t/**\r\n\t * Adds a plugin to this tween.\r\n\t * @method _addPlugin\r\n\t * @param {Object} plugin\r\n\t * @protected\r\n\t */\r\n\tp._addPlugin = function(plugin) {\r\n\t\tvar ids = this._pluginIds || (this._pluginIds = {}), id = plugin.ID;\r\n\t\tif (!id || ids[id]) { return; } // already added\r\n\t\t\r\n\t\tids[id] = true;\r\n\t\tvar plugins = this._plugins || (this._plugins = []), priority = plugin.priority || 0;\r\n\t\tfor (var i=0,l=plugins.length; i= 1 ? v1 : v0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (plugins) {\r\n\t\t\t\tfor (var i=0,l=plugins.length;i endPos;\r\n\t\tvar action = rev ? this._actionTail : this._actionHead;\r\n\t\tvar ePos = endPos, sPos = startPos;\r\n\t\tif (rev) { ePos=startPos; sPos=endPos; }\r\n\t\tvar t = this.position;\r\n\t\twhile (action) {\r\n\t\t\tvar pos = action.t;\r\n\t\t\tif (pos === endPos || (pos > sPos && pos < ePos) || (includeStart && pos === startPos)) {\r\n\t\t\t\taction.funct.apply(action.scope, action.params);\r\n\t\t\t\tif (t !== this.position) { return true; }\r\n\t\t\t}\r\n\t\t\taction = rev ? action.prev : action.next;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * @method _appendProps\r\n\t * @param {Object} props\r\n\t * @protected\r\n\t */\r\n\tp._appendProps = function(props, step, stepPlugins) {\r\n\t\tvar initProps = this._stepHead.props, target = this.target, plugins = Tween._plugins;\r\n\t\tvar n, i, value, initValue, inject;\r\n\t\tvar oldStep = step.prev, oldProps = oldStep.props;\r\n\t\tvar stepProps = step.props || (step.props = this._cloneProps(oldProps));\r\n\t\tvar cleanProps = {}; // TODO: is there some way to avoid this additional object?\r\n\r\n\t\tfor (n in props) {\r\n\t\t\tif (!props.hasOwnProperty(n)) { continue; }\r\n\t\t\tcleanProps[n] = stepProps[n] = props[n];\r\n\r\n\t\t\tif (initProps[n] !== undefined) { continue; }\r\n\r\n\t\t\tinitValue = undefined; // accessing missing properties on DOMElements when using CSSPlugin is INSANELY expensive, so we let the plugin take a first swing at it.\r\n\t\t\tif (plugins) {\r\n\t\t\t\tfor (i = plugins.length-1; i >= 0; i--) {\r\n\t\t\t\t\tvalue = plugins[i].init(this, n, initValue);\r\n\t\t\t\t\tif (value !== undefined) { initValue = value; }\r\n\t\t\t\t\tif (initValue === Tween.IGNORE) {\r\n\t\t\t\t\t\tdelete(stepProps[n]);\r\n\t\t\t\t\t\tdelete(cleanProps[n]);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (initValue !== Tween.IGNORE) {\r\n\t\t\t\tif (initValue === undefined) { initValue = target[n]; }\r\n\t\t\t\toldProps[n] = (initValue === undefined) ? null : initValue;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor (n in cleanProps) {\r\n\t\t\tvalue = props[n];\r\n\r\n\t\t\t// propagate old value to previous steps:\r\n\t\t\tvar o, prev=oldStep;\r\n\t\t\twhile ((o = prev) && (prev = o.prev)) {\r\n\t\t\t\tif (prev.props === o.props) { continue; } // wait step\r\n\t\t\t\tif (prev.props[n] !== undefined) { break; } // already has a value, we're done.\r\n\t\t\t\tprev.props[n] = oldProps[n];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (stepPlugins !== false && (plugins = this._plugins)) {\r\n\t\t\tfor (i = plugins.length-1; i >= 0; i--) {\r\n\t\t\t\tplugins[i].step(this, step, cleanProps);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (inject = this._injected) {\r\n\t\t\tthis._injected = null;\r\n\t\t\tthis._appendProps(inject, step, false);\r\n\t\t}\r\n\t};\r\n\t\r\n\t/**\r\n\t * Used by plugins to inject properties onto the current step. Called from within `Plugin.step` calls.\r\n\t * For example, a plugin dealing with color, could read a hex color, and inject red, green, and blue props into the tween.\r\n\t * See the SamplePlugin for more info.\r\n\t * @method _injectProp\r\n\t * @param {String} name\r\n\t * @param {Object} value\r\n\t * @protected\r\n\t */\r\n\tp._injectProp = function(name, value) {\r\n\t\tvar o = this._injected || (this._injected = {});\r\n\t\to[name] = value;\r\n\t};\r\n\r\n\t/**\r\n\t * @method _addStep\r\n\t * @param {Number} duration\r\n\t * @param {Object} props\r\n\t * @param {Function} ease\r\n\t * @param {Boolean} passive\r\n\t * @protected\r\n\t */\r\n\tp._addStep = function(duration, props, ease, passive) {\r\n\t\tvar step = new TweenStep(this._stepTail, this.duration, duration, props, ease, passive||false);\r\n\t\tthis.duration += duration;\r\n\t\treturn this._stepTail = (this._stepTail.next = step);\r\n\t};\r\n\r\n\t/**\r\n\t * @method _addAction\r\n\t * @param {Object} scope\r\n\t * @param {Function} funct\r\n\t * @param {Array} params\r\n\t * @protected\r\n\t */\r\n\tp._addAction = function(scope, funct, params) {\r\n\t\tvar action = new TweenAction(this._actionTail, this.duration, scope, funct, params);\r\n\t\tif (this._actionTail) { this._actionTail.next = action; }\r\n\t\telse { this._actionHead = action; }\r\n\t\tthis._actionTail = action;\r\n\t\treturn this;\r\n\t};\r\n\r\n\t/**\r\n\t * @method _set\r\n\t * @param {Object} props\r\n\t * @protected\r\n\t */\r\n\tp._set = function(props) {\r\n\t\tfor (var n in props) {\r\n\t\t\tthis[n] = props[n];\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * @method _cloneProps\r\n\t * @param {Object} props\r\n\t * @protected\r\n\t */\r\n\tp._cloneProps = function(props) {\r\n\t\tvar o = {};\r\n\t\tfor (var n in props) { o[n] = props[n]; }\r\n\t\treturn o;\r\n\t};\r\n\r\n\tcreatejs.Tween = createjs.promote(Tween, \"AbstractTween\");\r\n\t\r\n\tfunction TweenStep(prev, t, d, props, ease, passive) {\r\n\t\tthis.next = null;\r\n\t\tthis.prev = prev;\r\n\t\tthis.t = t;\r\n\t\tthis.d = d;\r\n\t\tthis.props = props;\r\n\t\tthis.ease = ease;\r\n\t\tthis.passive = passive;\r\n\t\tthis.index = prev ? prev.index+1 : 0;\r\n\t};\r\n\t\r\n\tfunction TweenAction(prev, t, scope, funct, params) {\r\n\t\tthis.next = null;\r\n\t\tthis.prev = prev;\r\n\t\tthis.t = t;\r\n\t\tthis.d = 0;\r\n\t\tthis.scope = scope;\r\n\t\tthis.funct = funct;\r\n\t\tthis.params = params;\r\n\t};\r\n}());\r\n\r\n//##############################################################################\r\n// Timeline.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\t\r\n\r\n// constructor\t\r\n\t/**\r\n\t * The Timeline class synchronizes multiple tweens and allows them to be controlled as a group. Please note that if a\r\n\t * timeline is looping, the tweens on it may appear to loop even if the \"loop\" property of the tween is false.\r\n\t * \r\n\t * NOTE: Timeline currently also accepts a param list in the form: `tweens, labels, props`. This is for backwards\r\n\t * compatibility only and will be removed in the future. Include tweens and labels as properties on the props object.\r\n\t * @class Timeline\r\n\t * @param {Object} [props] The configuration properties to apply to this instance (ex. `{loop:-1, paused:true}`).\r\n\t * Supported props are listed below. These props are set on the corresponding instance properties except where\r\n\t * specified.
      \r\n\t *
    • `useTicks`
    • \r\n\t *
    • `ignoreGlobalPause`
    • \r\n\t *
    • `loop`
    • \r\n\t *
    • `reversed`
    • \r\n\t *
    • `bounce`
    • \r\n\t *
    • `timeScale`
    • \r\n\t *
    • `paused`
    • \r\n\t *
    • `position`: indicates the initial position for this tween.
    • \r\n\t *
    • `onChange`: adds the specified function as a listener to the `change` event
    • \r\n\t *
    • `onComplete`: adds the specified function as a listener to the `complete` event
    • \r\n\t *
    \r\n\t * @extends AbstractTween\r\n\t * @constructor\r\n\t **/\r\n\tfunction Timeline(props) {\r\n\t\tvar tweens, labels;\r\n\t\t// handle old params (tweens, labels, props):\r\n\t\t// TODO: deprecated.\r\n\t\tif (props instanceof Array || (props == null && arguments.length > 1)) {\r\n\t\t\ttweens = props;\r\n\t\t\tlabels = arguments[1];\r\n\t\t\tprops = arguments[2];\r\n\t\t} else if (props) {\r\n\t\t\ttweens = props.tweens;\r\n\t\t\tlabels = props.labels;\r\n\t\t}\r\n\t\t\r\n\t\tthis.AbstractTween_constructor(props);\r\n\r\n\t// private properties:\r\n\t\t/**\r\n\t\t * The array of tweens in the timeline. It is *strongly* recommended that you use\r\n\t\t * {{#crossLink \"Tween/addTween\"}}{{/crossLink}} and {{#crossLink \"Tween/removeTween\"}}{{/crossLink}},\r\n\t\t * rather than accessing this directly, but it is included for advanced uses.\r\n\t\t * @property tweens\r\n\t\t * @type Array\r\n\t\t **/\r\n\t\tthis.tweens = [];\r\n\t\t\r\n\t\tif (tweens) { this.addTween.apply(this, tweens); }\r\n\t\tthis.setLabels(labels);\r\n\t\t\r\n\t\tthis._init(props);\r\n\t};\r\n\t\r\n\tvar p = createjs.extend(Timeline, createjs.AbstractTween);\r\n\r\n\t\r\n// events:\r\n\t// docced in AbstractTween.\r\n\r\n\r\n// public methods:\r\n\t/**\r\n\t * Adds one or more tweens (or timelines) to this timeline. The tweens will be paused (to remove them from the\r\n\t * normal ticking system) and managed by this timeline. Adding a tween to multiple timelines will result in\r\n\t * unexpected behaviour.\r\n\t * @method addTween\r\n\t * @param {Tween} ...tween The tween(s) to add. Accepts multiple arguments.\r\n\t * @return {Tween} The first tween that was passed in.\r\n\t **/\r\n\tp.addTween = function(tween) {\r\n\t\tif (tween._parent) { tween._parent.removeTween(tween); }\r\n\t\t\r\n\t\tvar l = arguments.length;\r\n\t\tif (l > 1) {\r\n\t\t\tfor (var i=0; i 0) { d *= tween.loop+1; }\r\n\t\tif (d > this.duration) { this.duration = d; }\r\n\t\t\r\n\t\tif (this.rawPosition >= 0) { tween.setPosition(this.rawPosition); }\r\n\t\treturn tween;\r\n\t};\r\n\r\n\t/**\r\n\t * Removes one or more tweens from this timeline.\r\n\t * @method removeTween\r\n\t * @param {Tween} ...tween The tween(s) to remove. Accepts multiple arguments.\r\n\t * @return Boolean Returns `true` if all of the tweens were successfully removed.\r\n\t **/\r\n\tp.removeTween = function(tween) {\r\n\t\tvar l = arguments.length;\r\n\t\tif (l > 1) {\r\n\t\t\tvar good = true;\r\n\t\t\tfor (var i=0; i= this.duration) { this.updateDuration(); }\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\r\n\t/**\r\n\t * Recalculates the duration of the timeline. The duration is automatically updated when tweens are added or removed,\r\n\t * but this method is useful if you modify a tween after it was added to the timeline.\r\n\t * @method updateDuration\r\n\t **/\r\n\tp.updateDuration = function() {\r\n\t\tthis.duration = 0;\r\n\t\tfor (var i=0,l=this.tweens.length; i 0) { d *= tween.loop+1; }\r\n\t\t\tif (d > this.duration) { this.duration = d; }\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t* Returns a string representation of this object.\r\n\t* @method toString\r\n\t* @return {String} a string representation of the instance.\r\n\t**/\r\n\tp.toString = function() {\r\n\t\treturn \"[Timeline]\";\r\n\t};\r\n\r\n\t/**\r\n\t * @method clone\r\n\t * @protected\r\n\t **/\r\n\tp.clone = function() {\r\n\t\tthrow(\"Timeline can not be cloned.\")\r\n\t};\r\n\r\n// private methods:\r\n\t\r\n\t// Docced in AbstractTween\r\n\tp._updatePosition = function(jump, end) {\r\n\t\tvar t = this.position;\r\n\t\tfor (var i=0, l=this.tweens.length; ispark table demo for an\r\n\t * overview of the different ease types on TweenJS.com.\r\n\t *\r\n\t * Equations derived from work by Robert Penner.\r\n\t * @class Ease\r\n\t * @static\r\n\t **/\r\n\tfunction Ease() {\r\n\t\tthrow \"Ease cannot be instantiated.\";\r\n\t}\r\n\r\n\r\n// static methods and properties\r\n\t/**\r\n\t * @method linear\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.linear = function(t) { return t; };\r\n\r\n\t/**\r\n\t * Identical to linear.\r\n\t * @method none\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.none = Ease.linear;\r\n\r\n\t/**\r\n\t * Mimics the simple -100 to 100 easing in Adobe Flash/Animate.\r\n\t * @method get\r\n\t * @param {Number} amount A value from -1 (ease in) to 1 (ease out) indicating the strength and direction of the ease.\r\n\t * @static\r\n\t * @return {Function}\r\n\t **/\r\n\tEase.get = function(amount) {\r\n\t\tif (amount < -1) { amount = -1; }\r\n\t\telse if (amount > 1) { amount = 1; }\r\n\t\treturn function(t) {\r\n\t\t\tif (amount==0) { return t; }\r\n\t\t\tif (amount<0) { return t*(t*-amount+1+amount); }\r\n\t\t\treturn t*((2-t)*amount+(1-amount));\r\n\t\t};\r\n\t};\r\n\r\n\t/**\r\n\t * Configurable exponential ease.\r\n\t * @method getPowIn\r\n\t * @param {Number} pow The exponent to use (ex. 3 would return a cubic ease).\r\n\t * @static\r\n\t * @return {Function}\r\n\t **/\r\n\tEase.getPowIn = function(pow) {\r\n\t\treturn function(t) {\r\n\t\t\treturn Math.pow(t,pow);\r\n\t\t};\r\n\t};\r\n\r\n\t/**\r\n\t * Configurable exponential ease.\r\n\t * @method getPowOut\r\n\t * @param {Number} pow The exponent to use (ex. 3 would return a cubic ease).\r\n\t * @static\r\n\t * @return {Function}\r\n\t **/\r\n\tEase.getPowOut = function(pow) {\r\n\t\treturn function(t) {\r\n\t\t\treturn 1-Math.pow(1-t,pow);\r\n\t\t};\r\n\t};\r\n\r\n\t/**\r\n\t * Configurable exponential ease.\r\n\t * @method getPowInOut\r\n\t * @param {Number} pow The exponent to use (ex. 3 would return a cubic ease).\r\n\t * @static\r\n\t * @return {Function}\r\n\t **/\r\n\tEase.getPowInOut = function(pow) {\r\n\t\treturn function(t) {\r\n\t\t\tif ((t*=2)<1) return 0.5*Math.pow(t,pow);\r\n\t\t\treturn 1-0.5*Math.abs(Math.pow(2-t,pow));\r\n\t\t};\r\n\t};\r\n\r\n\t/**\r\n\t * @method quadIn\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.quadIn = Ease.getPowIn(2);\r\n\t/**\r\n\t * @method quadOut\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.quadOut = Ease.getPowOut(2);\r\n\t/**\r\n\t * @method quadInOut\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.quadInOut = Ease.getPowInOut(2);\r\n\r\n\t/**\r\n\t * @method cubicIn\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.cubicIn = Ease.getPowIn(3);\r\n\t/**\r\n\t * @method cubicOut\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.cubicOut = Ease.getPowOut(3);\r\n\t/**\r\n\t * @method cubicInOut\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.cubicInOut = Ease.getPowInOut(3);\r\n\r\n\t/**\r\n\t * @method quartIn\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.quartIn = Ease.getPowIn(4);\r\n\t/**\r\n\t * @method quartOut\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.quartOut = Ease.getPowOut(4);\r\n\t/**\r\n\t * @method quartInOut\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.quartInOut = Ease.getPowInOut(4);\r\n\r\n\t/**\r\n\t * @method quintIn\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.quintIn = Ease.getPowIn(5);\r\n\t/**\r\n\t * @method quintOut\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.quintOut = Ease.getPowOut(5);\r\n\t/**\r\n\t * @method quintInOut\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.quintInOut = Ease.getPowInOut(5);\r\n\r\n\t/**\r\n\t * @method sineIn\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.sineIn = function(t) {\r\n\t\treturn 1-Math.cos(t*Math.PI/2);\r\n\t};\r\n\r\n\t/**\r\n\t * @method sineOut\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.sineOut = function(t) {\r\n\t\treturn Math.sin(t*Math.PI/2);\r\n\t};\r\n\r\n\t/**\r\n\t * @method sineInOut\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.sineInOut = function(t) {\r\n\t\treturn -0.5*(Math.cos(Math.PI*t) - 1);\r\n\t};\r\n\r\n\t/**\r\n\t * Configurable \"back in\" ease.\r\n\t * @method getBackIn\r\n\t * @param {Number} amount The strength of the ease.\r\n\t * @static\r\n\t * @return {Function}\r\n\t **/\r\n\tEase.getBackIn = function(amount) {\r\n\t\treturn function(t) {\r\n\t\t\treturn t*t*((amount+1)*t-amount);\r\n\t\t};\r\n\t};\r\n\t/**\r\n\t * @method backIn\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.backIn = Ease.getBackIn(1.7);\r\n\r\n\t/**\r\n\t * Configurable \"back out\" ease.\r\n\t * @method getBackOut\r\n\t * @param {Number} amount The strength of the ease.\r\n\t * @static\r\n\t * @return {Function}\r\n\t **/\r\n\tEase.getBackOut = function(amount) {\r\n\t\treturn function(t) {\r\n\t\t\treturn (--t*t*((amount+1)*t + amount) + 1);\r\n\t\t};\r\n\t};\r\n\t/**\r\n\t * @method backOut\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.backOut = Ease.getBackOut(1.7);\r\n\r\n\t/**\r\n\t * Configurable \"back in out\" ease.\r\n\t * @method getBackInOut\r\n\t * @param {Number} amount The strength of the ease.\r\n\t * @static\r\n\t * @return {Function}\r\n\t **/\r\n\tEase.getBackInOut = function(amount) {\r\n\t\tamount*=1.525;\r\n\t\treturn function(t) {\r\n\t\t\tif ((t*=2)<1) return 0.5*(t*t*((amount+1)*t-amount));\r\n\t\t\treturn 0.5*((t-=2)*t*((amount+1)*t+amount)+2);\r\n\t\t};\r\n\t};\r\n\t/**\r\n\t * @method backInOut\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.backInOut = Ease.getBackInOut(1.7);\r\n\r\n\t/**\r\n\t * @method circIn\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.circIn = function(t) {\r\n\t\treturn -(Math.sqrt(1-t*t)- 1);\r\n\t};\r\n\r\n\t/**\r\n\t * @method circOut\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.circOut = function(t) {\r\n\t\treturn Math.sqrt(1-(--t)*t);\r\n\t};\r\n\r\n\t/**\r\n\t * @method circInOut\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.circInOut = function(t) {\r\n\t\tif ((t*=2) < 1) return -0.5*(Math.sqrt(1-t*t)-1);\r\n\t\treturn 0.5*(Math.sqrt(1-(t-=2)*t)+1);\r\n\t};\r\n\r\n\t/**\r\n\t * @method bounceIn\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.bounceIn = function(t) {\r\n\t\treturn 1-Ease.bounceOut(1-t);\r\n\t};\r\n\r\n\t/**\r\n\t * @method bounceOut\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.bounceOut = function(t) {\r\n\t\tif (t < 1/2.75) {\r\n\t\t\treturn (7.5625*t*t);\r\n\t\t} else if (t < 2/2.75) {\r\n\t\t\treturn (7.5625*(t-=1.5/2.75)*t+0.75);\r\n\t\t} else if (t < 2.5/2.75) {\r\n\t\t\treturn (7.5625*(t-=2.25/2.75)*t+0.9375);\r\n\t\t} else {\r\n\t\t\treturn (7.5625*(t-=2.625/2.75)*t +0.984375);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * @method bounceInOut\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.bounceInOut = function(t) {\r\n\t\tif (t<0.5) return Ease.bounceIn (t*2) * .5;\r\n\t\treturn Ease.bounceOut(t*2-1)*0.5+0.5;\r\n\t};\r\n\r\n\t/**\r\n\t * Configurable elastic ease.\r\n\t * @method getElasticIn\r\n\t * @param {Number} amplitude\r\n\t * @param {Number} period\r\n\t * @static\r\n\t * @return {Function}\r\n\t **/\r\n\tEase.getElasticIn = function(amplitude,period) {\r\n\t\tvar pi2 = Math.PI*2;\r\n\t\treturn function(t) {\r\n\t\t\tif (t==0 || t==1) return t;\r\n\t\t\tvar s = period/pi2*Math.asin(1/amplitude);\r\n\t\t\treturn -(amplitude*Math.pow(2,10*(t-=1))*Math.sin((t-s)*pi2/period));\r\n\t\t};\r\n\t};\r\n\t/**\r\n\t * @method elasticIn\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.elasticIn = Ease.getElasticIn(1,0.3);\r\n\r\n\t/**\r\n\t * Configurable elastic ease.\r\n\t * @method getElasticOut\r\n\t * @param {Number} amplitude\r\n\t * @param {Number} period\r\n\t * @static\r\n\t * @return {Function}\r\n\t **/\r\n\tEase.getElasticOut = function(amplitude,period) {\r\n\t\tvar pi2 = Math.PI*2;\r\n\t\treturn function(t) {\r\n\t\t\tif (t==0 || t==1) return t;\r\n\t\t\tvar s = period/pi2 * Math.asin(1/amplitude);\r\n\t\t\treturn (amplitude*Math.pow(2,-10*t)*Math.sin((t-s)*pi2/period )+1);\r\n\t\t};\r\n\t};\r\n\t/**\r\n\t * @method elasticOut\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.elasticOut = Ease.getElasticOut(1,0.3);\r\n\r\n\t/**\r\n\t * Configurable elastic ease.\r\n\t * @method getElasticInOut\r\n\t * @param {Number} amplitude\r\n\t * @param {Number} period\r\n\t * @static\r\n\t * @return {Function}\r\n\t **/\r\n\tEase.getElasticInOut = function(amplitude,period) {\r\n\t\tvar pi2 = Math.PI*2;\r\n\t\treturn function(t) {\r\n\t\t\tvar s = period/pi2 * Math.asin(1/amplitude);\r\n\t\t\tif ((t*=2)<1) return -0.5*(amplitude*Math.pow(2,10*(t-=1))*Math.sin( (t-s)*pi2/period ));\r\n\t\t\treturn amplitude*Math.pow(2,-10*(t-=1))*Math.sin((t-s)*pi2/period)*0.5+1;\r\n\t\t};\r\n\t};\r\n\t/**\r\n\t * @method elasticInOut\r\n\t * @param {Number} t\r\n\t * @static\r\n\t * @return {Number}\r\n\t **/\r\n\tEase.elasticInOut = Ease.getElasticInOut(1,0.3*1.5);\r\n\r\n\tcreatejs.Ease = Ease;\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// MotionGuidePlugin.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\t/**\r\n\t * A TweenJS plugin for working with motion guides. Defined paths which objects can follow or orient along.\r\n\t *\r\n\t * To use the plugin, install the plugin after TweenJS has loaded. To define a path, add\r\n\t *\r\n\t * \t\tcreatejs.MotionGuidePlugin.install();\r\n\t *\r\n\t *

    Example

    \r\n\t *\r\n\t * \t\t// Using a Motion Guide\r\n\t * \t\tcreatejs.Tween.get(target).to({guide:{ path:[0,0, 0,200,200,200, 200,0,0,0] }},7000);\r\n\t * \t\t// Visualizing the line\r\n\t * \t\tgraphics.moveTo(0,0).curveTo(0,200,200,200).curveTo(200,0,0,0);\r\n\t *\r\n\t * Each path needs pre-computation to ensure there's fast performance. Because of the pre-computation there's no\r\n\t * built in support for path changes mid tween. These are the Guide Object's properties:
      \r\n\t * \t\t
    • path: Required, Array : The x/y points used to draw the path with a moveTo and 1 to n curveTo calls.
    • \r\n\t * \t\t
    • start: Optional, 0-1 : Initial position, default 0 except for when continuing along the same path.
    • \r\n\t * \t\t
    • end: Optional, 0-1 : Final position, default 1 if not specified.
    • \r\n\t * \t\t
    • orient: Optional, string : \"fixed\"/\"auto\"/\"cw\"/\"ccw\"
        \r\n\t *\t\t\t\t
      • \"fixed\" forces the object to face down the path all movement (relative to start rotation),
      • \r\n\t * \t\t\t\t
      • \"auto\" rotates the object along the path relative to the line.
      • \r\n\t * \t\t\t\t
      • \"cw\"/\"ccw\" force clockwise or counter clockwise rotations including Adobe Flash/Animate-like\r\n\t * \t\t\t\tbehaviour. This may override your end rotation value.
      • \r\n\t * \t\t
    • \r\n\t *
    \r\n\t * Guide objects should not be shared between tweens even if all properties are identical, the library stores\r\n\t * information on these objects in the background and sharing them can cause unexpected behaviour. Values\r\n\t * outside 0-1 range of tweens will be a \"best guess\" from the appropriate part of the defined curve.\r\n\t *\r\n\t * @class MotionGuidePlugin\r\n\t * @constructor\r\n\t */\r\n\tfunction MotionGuidePlugin() {\r\n\t\tthrow(\"MotionGuidePlugin cannot be instantiated.\")\r\n\t}\r\n\tvar s = MotionGuidePlugin;\r\n\r\n\r\n// static properties:\r\n\t/**\r\n\t * @property priority\r\n\t * @protected\r\n\t * @static\r\n\t */\r\n\ts.priority = 0; // high priority, should run sooner\r\n\r\n\t/**\r\n\t * READ-ONLY. A unique identifying string for this plugin. Used by TweenJS to ensure duplicate plugins are not installed on a tween.\r\n\t * @property ID\r\n\t * @type {String}\r\n\t * @static\r\n\t * @readonly\r\n\t */\r\n\ts.ID = \"MotionGuide\";\r\n\r\n// static methods\r\n\t/**\r\n\t * Installs this plugin for use with TweenJS. Call this once after TweenJS is loaded to enable this plugin.\r\n\t * @method install\r\n\t * @static\r\n\t */\r\n\ts.install = function() {\r\n\t\tcreatejs.Tween._installPlugin(MotionGuidePlugin);\r\n\t\treturn createjs.Tween.IGNORE;\r\n\t};\r\n\r\n\t/**\r\n\t * Called by TweenJS when a new property initializes on a tween.\r\n\t * See {{#crossLink \"SamplePlugin/init\"}}{{/crossLink}} for more info.\r\n\t * @method init\r\n\t * @param {Tween} tween\r\n\t * @param {String} prop\r\n\t * @param {any} value\r\n\t * @return {any}\r\n\t * @static\r\n\t */\r\n\ts.init = function(tween, prop, value) {\r\n\t\tif(prop == \"guide\") {\r\n\t\t\ttween._addPlugin(s);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Called when a new step is added to a tween (ie. a new \"to\" action is added to a tween).\r\n\t * See {{#crossLink \"SamplePlugin/step\"}}{{/crossLink}} for more info.\r\n\t * @method step\r\n\t * @param {Tween} tween\r\n\t * @param {TweenStep} step\r\n\t * @param {Object} props\r\n\t * @static\r\n\t */\r\n\ts.step = function(tween, step, props) {\r\n\t\tfor (var n in props) {\r\n\t\t\tif(n !== \"guide\") { continue; }\r\n\r\n\t\t\tvar guideData = step.props.guide;\r\n\t\t\tvar error = s._solveGuideData(props.guide, guideData);\r\n\t\t\tguideData.valid = !error;\r\n\r\n\t\t\tvar end = guideData.endData;\r\n\t\t\ttween._injectProp(\"x\", end.x);\r\n\t\t\ttween._injectProp(\"y\", end.y);\r\n\r\n\t\t\tif(error || !guideData.orient) { break; }\r\n\r\n\t\t\tvar initRot = step.prev.props.rotation === undefined ? (tween.target.rotation || 0) : step.prev.props.rotation;\r\n\r\n\t\t\tguideData.startOffsetRot = initRot - guideData.startData.rotation;\r\n\r\n\t\t\tif(guideData.orient == \"fixed\") {\r\n\t\t\t\t// controlled rotation\r\n\t\t\t\tguideData.endAbsRot = end.rotation + guideData.startOffsetRot;\r\n\t\t\t\tguideData.deltaRotation = 0;\r\n\t\t\t} else {\r\n\t\t\t\t// interpreted rotation\r\n\r\n\t\t\t\tvar finalRot = props.rotation === undefined ? (tween.target.rotation || 0) : props.rotation;\r\n\t\t\t\tvar deltaRot = (finalRot - guideData.endData.rotation) - guideData.startOffsetRot;\r\n\t\t\t\tvar modRot = deltaRot % 360;\r\n\r\n\t\t\t\tguideData.endAbsRot = finalRot;\r\n\r\n\t\t\t\tswitch(guideData.orient) {\r\n\t\t\t\t\tcase \"auto\":\r\n\t\t\t\t\t\tguideData.deltaRotation = deltaRot;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"cw\":\r\n\t\t\t\t\t\tguideData.deltaRotation = ((modRot + 360) % 360) + (360 * Math.abs((deltaRot/360) |0));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"ccw\":\r\n\t\t\t\t\t\tguideData.deltaRotation = ((modRot - 360) % 360) + (-360 * Math.abs((deltaRot/360) |0));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\ttween._injectProp(\"rotation\", guideData.endAbsRot);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Called before a property is updated by the tween.\r\n\t * See {{#crossLink \"SamplePlugin/change\"}}{{/crossLink}} for more info.\r\n\t * @method change\r\n\t * @param {Tween} tween\r\n\t * @param {TweenStep} step\r\n\t * @param {String} prop\r\n\t * @param {any} value\r\n\t * @param {Number} ratio\r\n\t * @param {Boolean} end\r\n\t * @return {any}\r\n\t * @static\r\n\t */\r\n\ts.change = function(tween, step, prop, value, ratio, end) {\r\n\t\tvar guideData = step.props.guide;\r\n\r\n\t\tif(\r\n\t\t\t\t!guideData ||\t\t\t\t\t\t\t// Missing data\r\n\t\t\t\t(step.props === step.prev.props) || \t// In a wait()\r\n\t\t\t\t(guideData === step.prev.props.guide) \t// Guide hasn't changed\r\n\t\t) {\r\n\t\t\treturn; // have no business making decisions\r\n\t\t}\r\n\t\tif(\r\n\t\t\t\t(prop === \"guide\" && !guideData.valid) ||\t\t// this data is broken\r\n\t\t\t\t(prop == \"x\" || prop == \"y\") ||\t\t\t\t\t// these always get over-written\r\n\t\t\t\t(prop === \"rotation\" && guideData.orient)\t\t// currently over-written\r\n\t\t){\r\n\t\t\treturn createjs.Tween.IGNORE;\r\n\t\t}\r\n\r\n\t\ts._ratioToPositionData(ratio, guideData, tween.target);\r\n\t};\r\n\r\n// public methods\r\n\t/**\r\n\t * Provide potentially useful debugging information, like running the error detection system, and rendering the path\r\n\t * defined in the guide data.\r\n\t *\r\n\t * NOTE: you will need to transform your context 2D to the local space of the guide if you wish to line it up.\r\n\t * @param {Object} guideData All the information describing the guide to be followed.\r\n\t * @param {DrawingContext2D} [ctx=undefined] The context to draw the object into.\r\n\t * @param {Array} [higlight=undefined] Array of ratio positions to highlight\r\n\t * @returns {undefined|String}\r\n\t */\r\n\ts.debug = function(guideData, ctx, higlight) {\r\n\t\tguideData = guideData.guide || guideData;\r\n\r\n\t\t// errors\r\n\t\tvar err = s._findPathProblems(guideData);\r\n\t\tif(err) {\r\n\t\t\tconsole.error(\"MotionGuidePlugin Error found: \\n\" + err);\r\n\t\t}\r\n\r\n\t\t// drawing\r\n\t\tif(!ctx){ return err; }\r\n\r\n\t\tvar i;\r\n\t\tvar path = guideData.path;\r\n\t\tvar pathLength = path.length;\r\n\t\tvar width = 3;\r\n\t\tvar length = 9;\r\n\r\n\t\tctx.save();\r\n\t\t//ctx.resetTransform();\r\n\r\n\t\tctx.lineCap = \"round\";\r\n\t\tctx.lineJoin = \"miter\";\r\n\t\tctx.beginPath();\r\n\r\n\t\t// curve\r\n\t\tctx.moveTo(path[0], path[1]);\r\n\t\tfor(i=2; i < pathLength; i+=4) {\r\n\t\t\tctx.quadraticCurveTo(\r\n\t\t\t\tpath[i], path[i+1],\r\n\t\t\t\tpath[i+2], path[i+3]\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tctx.strokeStyle = \"black\";\r\n\t\tctx.lineWidth = width*1.5;\r\n\t\tctx.stroke();\r\n\t\tctx.strokeStyle = \"white\";\r\n\t\tctx.lineWidth = width;\r\n\t\tctx.stroke();\r\n\t\tctx.closePath();\r\n\r\n\t\t// highlights\r\n\t\tvar hiCount = higlight.length;\r\n\t\tif(higlight && hiCount) {\r\n\t\t\tvar tempStore = {};\r\n\t\t\tvar tempLook = {};\r\n\t\t\ts._solveGuideData(guideData, tempStore);\r\n\r\n\t\t\tfor(var i=0; i= effRatio){ target = i; break; }\r\n\t\t\tlook += test;\r\n\t\t}\r\n\t\tif(target === undefined) { target = l-1; look -= test; }\r\n\r\n\t\t// find midline weighting\r\n\t\tvar subLines = lineSegments[target].weightings;\r\n\t\tvar portion = test;\r\n\t\tl = subLines.length;\r\n\t\tfor(i=0; i= effRatio){ break; }\r\n\t\t\tlook += test;\r\n\t\t}\r\n\r\n\t\t// translate the subline index into a position in the path data\r\n\t\ttarget = (target*4) + 2;\r\n\t\t// take the distance we've covered in our ratio, and scale it to distance into the weightings\r\n\t\tt = (i/precision) + (((effRatio-look) / test) * (1/precision));\r\n\r\n\t\t// position\r\n\t\tvar pathData = guideData.path;\r\n\t\ts._getParamsForCurve(\r\n\t\t\tpathData[target-2],\t\t\tpathData[target-1],\r\n\t\t\tpathData[target],\t\t\tpathData[target+1],\r\n\t\t\tpathData[target+2],\t\t\tpathData[target+3],\r\n\t\t\tt,\r\n\t\t\tguideData.orient,\r\n\t\t\toutput\r\n\t\t);\r\n\r\n\t\tif(guideData.orient) {\r\n\t\t\tif(ratio >= 0.99999 && ratio <= 1.00001 && guideData.endAbsRot !== undefined) {\r\n\t\t\t\toutput.rotation = guideData.endAbsRot;\r\n\t\t\t} else {\r\n\t\t\t\toutput.rotation += guideData.startOffsetRot + (ratio * guideData.deltaRotation);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t};\r\n\r\n\t/**\r\n\t * For a given quadratic bezier t-value, what is the position and rotation. Save it onto the output object.\r\n\t * @param {Number} sx Start x.\r\n\t * @param {Number} sy Start y.\r\n\t * @param {Number} cx Control x.\r\n\t * @param {Number} cy Control y.\r\n\t * @param {Number} ex End x.\r\n\t * @param {Number} ey End y.\r\n\t * @param {Number} t T value (parametric distance into curve).\r\n\t * @param {Boolean} orient Save rotation data.\r\n\t * @param {Object} output Object to save output properties of x,y, and rotation onto.\r\n\t * @private\r\n\t */\r\n\ts._getParamsForCurve = function(sx,sy, cx,cy, ex,ey, t, orient, output) {\r\n\t\tvar inv = 1 - t;\r\n\r\n\t\t// finding a point on a bezier curve\r\n\t\toutput.x =\tinv*inv * sx + 2 * inv * t * cx + t*t * ex;\r\n\t\toutput.y =\tinv*inv * sy + 2 * inv * t * cy + t*t * ey;\r\n\r\n\t\t// finding an angle on a bezier curve\r\n\t\tif(orient) {\r\n\t\t\t// convert from radians back to degrees\r\n\t\t\toutput.rotation = 57.2957795 * Math.atan2(\r\n\t\t\t\t(cy - sy)*inv + (ey - cy)*t,\r\n\t\t\t\t(cx - sx)*inv + (ex - cx)*t\r\n\t\t\t);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Perform a check to validate path information so plugin can avoid later error checking.\r\n\t * @param {Object} guideData All the information describing the guide to be followed.\r\n\t * @returns {undefined|String} The problem found, or undefined if no problems.\r\n\t * @private\r\n\t */\r\n\ts._findPathProblems = function(guideData) {\r\n\t\tvar path = guideData.path;\r\n\t\tvar valueCount = (path && path.length) || 0;\t// ensure this is a number to simplify later logic\r\n\t\tif(valueCount < 6 || (valueCount-2) % 4) {\r\n\t\t\tvar message =\t\"\\tCannot parse 'path' array due to invalid number of entries in path. \";\r\n\t\t\tmessage +=\t\t\"There should be an odd number of points, at least 3 points, and 2 entries per point (x & y). \";\r\n\t\t\tmessage +=\t\t\"See 'CanvasRenderingContext2D.quadraticCurveTo' for details as 'path' models a quadratic bezier.\\n\\n\";\r\n\t\t\tmessage +=\t\t\"Only [ \"+ valueCount +\" ] values found. Expected: \"+ Math.max(Math.ceil((valueCount-2)/4)*4+2, 6); //6, 10, 14,...\r\n\t\t\treturn message;\r\n\t\t}\r\n\r\n\t\tfor(var i=0; i 1*/) {\t// outside 0-1 is unpredictable, but not breaking\r\n\t\t\treturn \"'start' out of bounds. Expected 0 to 1, got: \"+ start;\r\n\t\t}\r\n\t\tvar end = guideData.end;\r\n\t\tif(isNaN(end) && (end !== undefined)/* || end < 0 || end > 1*/) {\t// outside 0-1 is unpredictable, but not breaking\r\n\t\t\treturn \"'end' out of bounds. Expected 0 to 1, got: \"+ end;\r\n\t\t}\r\n\r\n\t\tvar orient = guideData.orient;\r\n\t\tif(orient) { // mirror the check used elsewhere\r\n\t\t\tif(orient != \"fixed\" && orient != \"auto\" && orient != \"cw\" && orient != \"ccw\") {\r\n\t\t\t\treturn 'Invalid orientation value. Expected [\"fixed\", \"auto\", \"cw\", \"ccw\", undefined], got: '+ orient;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn undefined;\r\n\t};\r\n\r\n\tcreatejs.MotionGuidePlugin = MotionGuidePlugin;\r\n\r\n}());\r\n\r\n//##############################################################################\r\n// version.js\r\n//##############################################################################\r\n\r\n(function() {\r\n\t\"use strict\";\r\n\r\n\t/**\r\n\t * Static class holding library specific information such as the version and buildDate of\r\n\t * the library.\r\n\t * @class TweenJS\r\n\t **/\r\n\tvar s = createjs.TweenJS = createjs.TweenJS || {};\r\n\r\n\t/**\r\n\t * The version string for this release.\r\n\t * @property version\r\n\t * @type String\r\n\t * @static\r\n\t **/\r\n\ts.version = /*=version*/\"NEXT\"; // injected by build process\r\n\r\n\t/**\r\n\t * The build date for this release in UTC format.\r\n\t * @property buildDate\r\n\t * @type String\r\n\t * @static\r\n\t **/\r\n\ts.buildDate = /*=date*/\"Thu, 14 Sep 2017 22:19:45 GMT\"; // injected by build process\r\n\r\n})();","__rmAmd = (function (__loader, __globals) {\r\nif (typeof globalThis === \"undefined\") {\r\n var _global = (function() {\r\n if (typeof self !== \"undefined\") return self;\r\n if (typeof window !== \"undefined\") return window;\r\n if (typeof global !== \"undefined\") return global;\r\n if (typeof this !== \"undefined\") return this;\r\n })();\r\n _global.globalThis = _global;\r\n}\r\n\r\n/* eslint-disable no-undef */\r\nif (!Array.from) {\r\n Array.from = function (arrayLike) {\r\n return Array.prototype.slice.call(arrayLike, 0);\r\n };\r\n}\r\nif (!Array.of) {\r\n Array.of = function () {\r\n return Array.prototype.slice.call(arguments, 0);\r\n };\r\n}\r\nif (!Array.prototype.fill) {\r\n Array.prototype.fill = function (v, start, end) {\r\n var l = this.length;\r\n if (typeof start !== \"number\") start = 0;\r\n if (typeof end !== \"number\") end = this.length;\r\n if (start < 0) start = l + start;\r\n if (end < 0) end = l + end;\r\n for (var i = start; i < end; i++) {\r\n this[i] = v;\r\n }\r\n return this;\r\n };\r\n}\r\nif (!Array.prototype.find) {\r\n Array.prototype.find = function (fn, thisObj) {\r\n if (this === null || this === undefined) {\r\n throw new TypeError(\"Array.prototype.find: must not be called on null or undefined\");\r\n }\r\n if (typeof fn !== \"function\") {\r\n throw new TypeError(\"Array.prototype.find: first argument must be a function\");\r\n }\r\n\r\n var len = this.length || 0,\r\n v;\r\n for (var i = 0; i < len; i++) {\r\n v = this[i];\r\n if (fn.call(thisObj, v, i, this)) {\r\n return v;\r\n }\r\n }\r\n };\r\n}\r\nif (!Array.prototype.findIndex) {\r\n Array.prototype.findIndex = function (fn, thisObj) {\r\n if (this === null || this === undefined) {\r\n throw new TypeError(\"Array.prototype.find: must not be called on null or undefined\");\r\n }\r\n if (typeof fn !== \"function\") {\r\n throw new TypeError(\"Array.prototype.find: first argument must be a function\");\r\n }\r\n\r\n var len = this.length || 0,\r\n v;\r\n for (var i = 0; i < len; i++) {\r\n v = this[i];\r\n if (fn.call(thisObj, v, i, this)) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n };\r\n}\r\nif (!Array.prototype.flat) {\r\n Array.prototype.flat = function (depth) {\r\n if (typeof depth === \"undefined\") depth = 1;\r\n var len = this.length;\r\n var result = [],\r\n v;\r\n for (var i = 0; i < len; i++) {\r\n if (!hasOwnProperty(this, i)) continue;\r\n v = this[i];\r\n if (Array.isArray(v) && depth) result = result.concat(v.flat(depth - 1));\r\n else result.push(v);\r\n }\r\n\r\n return result;\r\n };\r\n}\r\nif (!Array.prototype.flatMap) {\r\n Array.prototype.flatMap = function (fn, thisObj) {\r\n return Array.prototype.map.call(this, fn, thisObj).flat();\r\n };\r\n}\r\nif (!Array.prototype.includes) {\r\n Array.prototype.includes = function (valueToFind, fromIndex) {\r\n if (typeof fromIndex === undefined) fromIndex = 0;\r\n return Array.prototype.indexOf.call(this, valueToFind, fromIndex) >= 0;\r\n };\r\n}\r\n/*\r\nREQUIRES ITERATOR:\r\n- Array.prototype.keys\r\n- Array.prototype.values\r\n- Array.prototype.entries\r\n\r\n*/\r\n\r\nif (!Set.prototype.values) {\r\n Set.prototype.values = function () {\r\n var r = [];\r\n this.forEach(function (v) {\r\n r.push(v);\r\n });\r\n return r;\r\n };\r\n}\r\n\r\nfunction hasOwnProperty(obj, prop) {\r\n return Object.prototype.hasOwnProperty.call(obj, prop);\r\n}\r\n\r\nif (!Object.assign) {\r\n Object.assign = function(target) {\r\n if (!target) throw new TypeError(\"Target cannot be null\");\r\n\r\n var source;\r\n for (var i = 1; i < arguments.length; i++) {\r\n source = arguments[i];\r\n\r\n for (var key in source) {\r\n if (hasOwnProperty(source, key)) {\r\n target[key] = source[key];\r\n }\r\n }\r\n }\r\n\r\n return target;\r\n };\r\n}\r\n\r\nif (!Object.entries) {\r\n Object.entries = function(obj) {\r\n var oProps = Object.keys(obj),\r\n j = oProps.length,\r\n resArr = new Array(j);\r\n while (j--) {\r\n resArr[j] = [oProps[j], obj[oProps[j]]];\r\n }\r\n\r\n return resArr;\r\n };\r\n}\r\n\r\nif (!Object.is) {\r\n Object.is = function(a, b) {\r\n if (a === b) {\r\n return a !== 0 || 1 / a === 1 / b;\r\n } else {\r\n return a !== a && b !== b;\r\n }\r\n };\r\n}\r\n\r\nif (!Object.values) {\r\n Object.values = function(obj) {\r\n if (typeof obj !== \"object\") obj = Array.from(obj);\r\n var oProps = Object.keys(obj),\r\n j = oProps.length,\r\n resArr = [];\r\n while (j--) {\r\n resArr.unshift(obj[oProps[j]]);\r\n }\r\n\r\n return resArr;\r\n };\r\n}\r\n\r\nif (!Number.isNaN) {\r\n Number.isNaN = function(v) {\r\n return typeof v === \"number\" && v !== v;\r\n };\r\n}\r\n\r\nif (!Number.parseFloat) Number.parseFloat = globalThis.parseFloat;\r\nif (!Number.parseInt) Number.parseInt = globalThis.parseInt;\r\n\r\nif (!Number.isFinite) {\r\n Number.isFinite = function(v) {\r\n return typeof v === \"number\" && globalThis.isFinite(v);\r\n };\r\n}\r\n\r\nif (!Number.isInteger) {\r\n Number.isInteger = function(v) {\r\n return Number.isFinite(v) && Math.floor(v) === v;\r\n };\r\n}\r\n\r\nif (!globalThis.Promise) {\r\n globalThis.Promise = PolyfillPromise();\r\n}\r\n\r\nfunction PolyfillPromise() {\r\n var IDENTITY = \"Identity\",\r\n THROWER = \"Thrower\",\r\n STATE_PENDING = \"pending\",\r\n STATE_FULFILLED = \"fulfilled\",\r\n STATE_REJECTED = \"rejected\",\r\n undef = (function () {})();\r\n\r\n if (!Array.isArray) {\r\n Array.isArray = function (arr) {\r\n return Object.prototype.toString.call(arr) === \"[object Array]\";\r\n };\r\n }\r\n\r\n function makeIterator(arr) {\r\n var i = 0;\r\n\r\n try {\r\n if (!Array.isArray(arr) && typeof arr.length !== \"number\") throw new TypeError(\"Not an Iterable\");\r\n } catch (err) {\r\n throw new TypeError(\"Not an Iterable\");\r\n }\r\n\r\n return {\r\n next: function () {\r\n if (i >= arr.length) return { done: true };\r\n else return { done: false, value: arr[i++] };\r\n },\r\n };\r\n }\r\n\r\n var enqueueJob = (function () {\r\n var queue = [],\r\n timer;\r\n\r\n function runQueue() {\r\n timer = undef;\r\n\r\n var item;\r\n while ((item = queue.shift())) {\r\n //jshint ignore:line\r\n item.func.apply(undef, item.args);\r\n }\r\n }\r\n\r\n return function (f, args) {\r\n queue.push({ func: f, args: args });\r\n if (!timer) {\r\n timer = setTimeout(runQueue, 0);\r\n }\r\n };\r\n })();\r\n\r\n function promiseReactionJob(reaction, argument) {\r\n var promiseCapability = reaction.capabilities,\r\n handler = reaction.handler,\r\n handlerResult,\r\n throws = false;\r\n\r\n if (handler === IDENTITY) {\r\n handlerResult = argument;\r\n } else if (handler === THROWER) {\r\n handlerResult = argument;\r\n throws = true;\r\n } else {\r\n try {\r\n handlerResult = handler(argument);\r\n } catch (err) {\r\n throws = true;\r\n handlerResult = err;\r\n }\r\n }\r\n\r\n if (throws) {\r\n promiseCapability.reject(handlerResult);\r\n } else {\r\n promiseCapability.resolve(handlerResult);\r\n }\r\n }\r\n\r\n function promiseResolveThenableJob(promiseToResolve, thenable, then) {\r\n var resolvingFunctions = createResolvingFunctions(promiseToResolve);\r\n\r\n try {\r\n then.call(thenable, resolvingFunctions.resolve, resolvingFunctions.reject);\r\n } catch (err) {\r\n resolvingFunctions.reject(err);\r\n }\r\n }\r\n\r\n function triggerPromiseReactions(reactions, argument) {\r\n for (var i = 0; i < reactions.length; i++) {\r\n enqueueJob(promiseReactionJob, [reactions[i], argument]);\r\n }\r\n }\r\n\r\n function rejectPromise(promise, reason) {\r\n if (promise[\"[[PromiseState]]\"] !== STATE_PENDING) return;\r\n\r\n var reactions = promise[\"[[PromiseRejectReactions]]\"];\r\n promise[\"[[PromiseResult]]\"] = reason;\r\n promise[\"[[PromiseFulfillReactions]]\"] = undef;\r\n promise[\"[[PromiseRejectReactions]]\"] = undef;\r\n promise[\"[[PromiseState]]\"] = STATE_REJECTED;\r\n\r\n if (!reactions.length) {\r\n promise[\"[[PromiseRejectUnhandled]]\"] = true;\r\n enqueueJob(function () {\r\n if (promise[\"[[PromiseRejectUnhandled]]\"]) {\r\n if (reason.stack) {\r\n // eslint-disable-next-line no-console\r\n console.error(\"(Unhandled in Promise) \" + reason.stack);\r\n } else {\r\n console.error(\"(Unhandled in Promise) \" + reason.toString());\r\n }\r\n }\r\n });\r\n }\r\n\r\n return triggerPromiseReactions(reactions, reason);\r\n }\r\n\r\n function fulfillPromise(promise, value) {\r\n if (promise[\"[[PromiseState]]\"] !== STATE_PENDING) return;\r\n\r\n var reactions = promise[\"[[PromiseFulfillReactions]]\"];\r\n promise[\"[[PromiseResult]]\"] = value;\r\n promise[\"[[PromiseFulfillReactions]]\"] = undef;\r\n promise[\"[[PromiseRejectReactions]]\"] = undef;\r\n promise[\"[[PromiseState]]\"] = STATE_FULFILLED;\r\n\r\n return triggerPromiseReactions(reactions, value);\r\n }\r\n\r\n function createResolvingFunctions(promise) {\r\n var alreadyResolved = false;\r\n\r\n var resolve = function (resolution) {\r\n if (typeof promise !== \"object\") throw new TypeError(); // TODO: error message\r\n\r\n if (alreadyResolved) return;\r\n\r\n alreadyResolved = true;\r\n\r\n if (resolution === promise)\r\n return rejectPromise(promise, new TypeError(\"Promise resolution cannot be itself.\"));\r\n\r\n if ((typeof resolution !== \"object\" || resolution === null) && typeof resolution !== \"function\")\r\n return fulfillPromise(promise, resolution);\r\n\r\n try {\r\n var then = resolution.then;\r\n if (typeof then !== \"function\") return fulfillPromise(promise, resolution);\r\n\r\n enqueueJob(promiseResolveThenableJob, [promise, resolution, then]);\r\n } catch (err) {\r\n return rejectPromise(promise, err);\r\n }\r\n };\r\n var reject = function (reason) {\r\n if (typeof promise !== \"object\") throw new TypeError(); // TODO: error message\r\n\r\n if (alreadyResolved) return;\r\n\r\n alreadyResolved = true;\r\n\r\n return rejectPromise(promise, reason);\r\n };\r\n\r\n return { resolve: resolve, reject: reject };\r\n }\r\n\r\n function newPromiseCapability(C) {\r\n var resolve,\r\n reject,\r\n promise = new C(function (res, rej) {\r\n if (typeof resolve !== \"undefined\" || typeof reject !== \"undefined\") throw new TypeError(); // TODO: error message\r\n\r\n resolve = res;\r\n reject = rej;\r\n });\r\n\r\n if (typeof resolve !== \"function\" || typeof reject !== \"function\") throw new TypeError(); // TODO: error message\r\n\r\n return {\r\n promise: promise,\r\n resolve: resolve,\r\n reject: reject,\r\n };\r\n }\r\n\r\n function isPromise(p) {\r\n return typeof p === \"object\" && p[\"[[PromiseState]]\"];\r\n }\r\n\r\n function PromiseReaction(capabilities, handler) {\r\n this.capabilities = capabilities;\r\n this.handler = handler;\r\n }\r\n\r\n function Promise(executor) {\r\n if (!(this instanceof Promise)) throw new TypeError(\"Must call with new\");\r\n if (typeof this[\"[[PromiseState]]\"] !== \"undefined\")\r\n throw new TypeError(\"this is an already constructed Promise\");\r\n if (typeof executor !== \"function\") throw new TypeError(\"executor must be a function\");\r\n\r\n this[\"[[PromiseState]]\"] = STATE_PENDING;\r\n this[\"[[PromiseFulfillReactions]]\"] = [];\r\n this[\"[[PromiseRejectReactions]]\"] = [];\r\n this[\"[[PromiseResult]]\"] = undef;\r\n\r\n var resolvingFunctions = createResolvingFunctions(this);\r\n\r\n try {\r\n executor(resolvingFunctions.resolve, resolvingFunctions.reject);\r\n } catch (err) {\r\n resolvingFunctions.reject(err);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n Promise.prototype.then = function (onFulfilled, onRejected) {\r\n if (!isPromise(this)) throw new TypeError(\"this must be a promise\");\r\n\r\n var promise = this,\r\n C = this.constructor || Promise,\r\n resultCapability = newPromiseCapability(C);\r\n\r\n if (typeof onFulfilled !== \"function\") onFulfilled = IDENTITY;\r\n if (typeof onRejected !== \"function\") onRejected = THROWER;\r\n\r\n var fulfillReaction = new PromiseReaction(resultCapability, onFulfilled),\r\n rejectReaction = new PromiseReaction(resultCapability, onRejected);\r\n\r\n if (promise[\"[[PromiseState]]\"] === STATE_PENDING) {\r\n promise[\"[[PromiseFulfillReactions]]\"].push(fulfillReaction);\r\n promise[\"[[PromiseRejectReactions]]\"].push(rejectReaction);\r\n } else if (promise[\"[[PromiseState]]\"] === STATE_FULFILLED) {\r\n enqueueJob(promiseReactionJob, [fulfillReaction, promise[\"[[PromiseResult]]\"]]);\r\n } else if (promise[\"[[PromiseState]]\"] === STATE_REJECTED) {\r\n promise[\"[[PromiseRejectUnhandled]]\"] = false;\r\n enqueueJob(promiseReactionJob, [rejectReaction, promise[\"[[PromiseResult]]\"]]);\r\n }\r\n\r\n return resultCapability.promise;\r\n };\r\n\r\n Promise.prototype[\"catch\"] = function (onRejected) {\r\n return this.then(undef, onRejected);\r\n };\r\n\r\n function reject(r) {\r\n var C = this;\r\n if (typeof C !== \"function\") throw TypeError(); // TODO: error message\r\n\r\n var promiseCapability = newPromiseCapability(C);\r\n promiseCapability.reject(r);\r\n\r\n return promiseCapability.promise;\r\n }\r\n\r\n function resolve(x) {\r\n var C = this;\r\n\r\n if (isPromise(x) && x.constructor === C) {\r\n return x;\r\n }\r\n\r\n if (typeof C !== \"function\") throw TypeError(); // TODO: error message\r\n\r\n var promiseCapability = newPromiseCapability(C);\r\n promiseCapability.resolve(x);\r\n\r\n return promiseCapability.promise;\r\n }\r\n\r\n function promiseAllResolveElement(index, values, capabilities, remainingElements) {\r\n var alreadyCalled = false;\r\n\r\n return function (x) {\r\n if (alreadyCalled) return;\r\n alreadyCalled = true;\r\n\r\n values[index] = x;\r\n remainingElements.value -= 1;\r\n if (remainingElements.value === 0) {\r\n capabilities.resolve(values);\r\n }\r\n };\r\n }\r\n\r\n function performPromiseAll(iteratorRecord, constructor, resultCapability) {\r\n var values = [],\r\n remainingElementsCount = { value: 1 },\r\n index = 0;\r\n\r\n // eslint-disable-next-line no-constant-condition\r\n while (true) {\r\n var next;\r\n try {\r\n next = iteratorRecord.iterator.next();\r\n } catch (err) {\r\n iteratorRecord.done = true;\r\n throw err;\r\n }\r\n\r\n if (next.done) {\r\n iteratorRecord.done = true;\r\n remainingElementsCount.value -= 1;\r\n if (remainingElementsCount.value === 0) {\r\n resultCapability.resolve(values);\r\n }\r\n return resultCapability.promise;\r\n }\r\n\r\n values.push(undef);\r\n\r\n var nextPromise = constructor.resolve(next.value);\r\n var resolveElement = promiseAllResolveElement(index, values, resultCapability, remainingElementsCount);\r\n\r\n remainingElementsCount.value += 1;\r\n nextPromise.then(resolveElement, resultCapability.reject);\r\n index += 1;\r\n }\r\n }\r\n\r\n function all(iterable) {\r\n var C = this;\r\n if (typeof C !== \"function\") throw TypeError(); // TODO: error message\r\n\r\n var promiseCapability = newPromiseCapability(C);\r\n\r\n var iterator;\r\n try {\r\n iterator = makeIterator(iterable);\r\n } catch (err) {\r\n promiseCapability.reject(err);\r\n return promiseCapability.promise;\r\n }\r\n\r\n var iteratorRecord = { iterator: iterator, done: false };\r\n try {\r\n return performPromiseAll(iteratorRecord, C, promiseCapability);\r\n } catch (err) {\r\n promiseCapability.reject(err);\r\n return promiseCapability.promise;\r\n }\r\n }\r\n\r\n function performPromiseRace(iteratorRecord, promiseCapability, C) {\r\n // eslint-disable-next-line no-constant-condition\r\n while (true) {\r\n var next;\r\n try {\r\n next = iteratorRecord.iterator.next();\r\n } catch (err) {\r\n iteratorRecord.done = true;\r\n throw err;\r\n }\r\n\r\n if (next.done) {\r\n iteratorRecord.done = true;\r\n return promiseCapability.promise;\r\n }\r\n\r\n var nextPromise = C.resolve(next.value);\r\n nextPromise.then(promiseCapability.resolve, promiseCapability.reject);\r\n }\r\n }\r\n\r\n function race(iterable) {\r\n var C = this;\r\n if (typeof C !== \"function\") throw TypeError(); // TODO: error message\r\n\r\n var promiseCapability = newPromiseCapability(C);\r\n\r\n var iterator;\r\n try {\r\n iterator = makeIterator(iterable);\r\n } catch (err) {\r\n promiseCapability.reject(err);\r\n return promiseCapability.promise;\r\n }\r\n\r\n var iteratorRecord = { iterator: iterator, done: false };\r\n try {\r\n return performPromiseRace(iteratorRecord, promiseCapability, C);\r\n } catch (err) {\r\n promiseCapability.reject(err);\r\n return promiseCapability.promise;\r\n }\r\n }\r\n\r\n if (Object.defineProperties) {\r\n Object.defineProperties(Promise, {\r\n resolve: { value: resolve, writable: true },\r\n reject: { value: reject, writable: true },\r\n all: { value: all, writable: true },\r\n race: { value: race, writable: true },\r\n });\r\n } else {\r\n Promise.resolve = resolve;\r\n Promise.reject = reject;\r\n Promise.all = all;\r\n Promise.race = race;\r\n }\r\n\r\n return Promise;\r\n}\r\n\r\nif (!String.prototype.trimEnd) {\r\n String.prototype.trimRight = String.prototype.trimEnd = function () {\r\n return this.replace(/\\s+$/, \"\");\r\n };\r\n}\r\n\r\nif (!String.prototype.trimStart) {\r\n String.prototype.trimLeft = String.prototype.trimStart = function () {\r\n return this.replace(/^\\s+/g, \"\");\r\n };\r\n}\r\n\r\nif (!String.prototype.endsWith) {\r\n String.prototype.endsWith = function (search, this_len) {\r\n if (this_len === undefined || this_len > this.length) {\r\n this_len = this.length;\r\n }\r\n\r\n return this.substring(this_len - search.length, this_len) === search;\r\n };\r\n}\r\n\r\nif (!String.prototype.includes) {\r\n String.prototype.includes = function (search, start) {\r\n if (typeof start !== \"number\") {\r\n start = 0;\r\n }\r\n if (start + search.length > this.length) {\r\n return false;\r\n } else {\r\n return this.indexOf(search, start) !== -1;\r\n }\r\n };\r\n}\r\n\r\nif (!String.prototype.repeat) {\r\n String.prototype.repeat = function (count) {\r\n if (this == null) {\r\n throw new TypeError(\"can't convert \" + this + \" to object\");\r\n }\r\n var str = \"\" + this,\r\n ostr = \"\" + this;\r\n count = +count;\r\n if (count < 0) {\r\n throw new RangeError(\"repet count must be non-negative\");\r\n }\r\n if (count == Infinity) {\r\n throw new RangeError(\"repet count must be less than infinity\");\r\n }\r\n count |= 0;\r\n\r\n if (str.length == 0 || count == 0) {\r\n return \"\";\r\n }\r\n if (str.length * count >= 1 << 28) {\r\n throw new RangeError(\"repeat count must be not overflow maximum string size\");\r\n }\r\n\r\n for (var i = 0; i < count - 1; i++) {\r\n str += ostr;\r\n }\r\n\r\n return str;\r\n };\r\n}\r\n\r\nif (!String.prototype.padEnd) {\r\n String.prototype.padEnd = function (strLen, padStr) {\r\n strLen = strLen >> 0;\r\n padStr = String(typeof padStr !== \"undefined\" ? padStr : \" \");\r\n if (this.length > strLen) {\r\n return String(this);\r\n } else {\r\n strLen = strLen - this.length;\r\n if (strLen > padStr.length) {\r\n padStr += padStr.repeat(strLen / padStr.length);\r\n }\r\n return String(this) + padStr.slice(0, strLen);\r\n }\r\n };\r\n}\r\n\r\nif (!String.prototype.padStart) {\r\n String.prototype.padStart = function (strLen, padStr) {\r\n strLen = strLen >> 0;\r\n padStr = String(typeof padStr !== \"undefined\" ? padStr : \" \");\r\n if (this.length >= strLen) {\r\n return String(this);\r\n } else {\r\n strLen = strLen - this.length;\r\n if (strLen > padStr.length) {\r\n padStr += padStr.repeat(strLen / padStr.length);\r\n }\r\n return padStr.slice(0, strLen) + String(this);\r\n }\r\n };\r\n}\r\n\r\nif (!String.prototype.startsWith) {\r\n String.prototype.startsWith = function (searchStr, startPos) {\r\n startPos = !startPos || startPos < 0 ? 0 : +startPos;\r\n return this.substring(startPos, searchStr.length) === searchStr;\r\n };\r\n}\r\n\r\nif (!Map.prototype.keys) {\r\n Map.prototype.keys = function () {\r\n var keys = [];\r\n this.forEach(function (value, key) {\r\n keys.push(key);\r\n });\r\n return keys;\r\n };\r\n}\r\n\r\nif (!Element.prototype.matches) {\r\n Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\r\n}\r\nif (!Element.prototype.closest) {\r\n Element.prototype.closest = function (selector) {\r\n var el = this;\r\n if (el.nodeType !== 1) el = el.parentElement;\r\n while (el && el.nodeType === 1) {\r\n if (el.matches(selector)) return el;\r\n el = el.parentElement;\r\n }\r\n return null;\r\n };\r\n}\r\n\r\nfunction replaceChildren() {\r\n const newChildren = Array.from(arguments);\r\n while (this.lastChild) {\r\n this.removeChild(this.lastChild);\r\n }\r\n this.append.apply(this, newChildren);\r\n}\r\nif (!Element.prototype.replaceChildren) {\r\n Document.prototype.replaceChildren = replaceChildren;\r\n DocumentFragment.prototype.replaceChildren = replaceChildren;\r\n Element.prototype.replaceChildren = replaceChildren;\r\n}\r\n\r\n/*eslint-env browser */\r\n/*globals __loader:true */\r\nvar define, require, defineAmd, i18n;\r\n(function () {\r\n var map = {};\r\n\r\n function arrayMap(arr, cb) {\r\n if (Array.prototype.map) return arr.map(cb);\r\n\r\n var newArr = [];\r\n if (typeof cb !== \"function\") throw new TypeError();\r\n\r\n for (var i = 0; i < arr.length; i++) {\r\n newArr.push(cb.call(null, arr[i], i, arr));\r\n }\r\n return newArr;\r\n }\r\n\r\n function inArray(arr, e) {\r\n for (var i = 0; i < arr.length; i += 1) {\r\n if (arr[i] === e) return i;\r\n }\r\n return -1;\r\n }\r\n\r\n function resolvePath(current, path) {\r\n if (!/^\\.\\.?\\//.test(path)) return path; // Not a relative path\r\n\r\n var currentParts = current.split(\"/\"),\r\n parts = currentParts.slice(0, currentParts.length - 1).concat(path.split(\"/\")),\r\n stack = [];\r\n backstack = [];\r\n\r\n for (var i = 0; i < parts.length; i += 1) {\r\n if (parts[i] === \".\") {\r\n // Do nothing\r\n } else if (parts[i] === \"..\" && stack.length === 0) {\r\n backstack.push(\"..\");\r\n } else if (parts[i] === \"..\") {\r\n stack.pop();\r\n } else {\r\n stack.push(parts[i]);\r\n }\r\n }\r\n return backstack.concat(stack).join(\"/\");\r\n }\r\n\r\n function cjsRequire(current) {\r\n return function (id) {\r\n return loadMod(id, current);\r\n };\r\n }\r\n function amdRequire(current) {\r\n return function (id) {\r\n return loadMod(id, current).default;\r\n };\r\n }\r\n\r\n function loadDeps(deps, current) {\r\n return arrayMap(deps, function (m) {\r\n if (m === \"requireAmd\") {\r\n return amdRequire(current);\r\n } else if (m === \"require\") {\r\n return cjsRequire(current);\r\n } else if (m === \"exports\") {\r\n return map[current].module.exports;\r\n } else if (m === \"module\") {\r\n return map[current].module;\r\n }\r\n return loadMod(m, current);\r\n });\r\n }\r\n\r\n function loadMod(id, curr, depth) {\r\n if (curr) id = resolvePath(curr, id);\r\n if (!depth) depth = [];\r\n\r\n var modInfo = map[id];\r\n if (!modInfo && map[id + \".js\"]) {\r\n id = id + \".js\";\r\n modInfo = map[id];\r\n }\r\n if (!modInfo && map[id + \".ts\"]) {\r\n id = id + \".ts\";\r\n modInfo = map[id];\r\n }\r\n if (!modInfo && map[id + \".json\"]) {\r\n id = id + \".json\";\r\n modInfo = map[id];\r\n }\r\n\r\n if (!modInfo || !modInfo.factory) {\r\n throw \"Error loading mod '\" + id + \"' from '\" + curr + \"'.\";\r\n }\r\n if (inArray(depth, id) !== -1) {\r\n throw \"No circular dependancies. '\" + id + \"' from '\" + curr + \"'\";\r\n }\r\n depth.push(id);\r\n\r\n // if (modInfo.loading) {\r\n // throw \"No circular dependancies. '\" + id + \"' from '\" + curr + \"'\";\r\n // }\r\n if (!modInfo.loaded && !modInfo.loading) {\r\n modInfo.module.exports = {};\r\n var deps = modInfo.deps && loadDeps(modInfo.deps, id, depth);\r\n modInfo.loading = true;\r\n modInfo.module.exports = modInfo.factory.apply(null, deps) || modInfo.module.exports;\r\n modInfo.loaded = true;\r\n modInfo.loading = false;\r\n }\r\n\r\n return modInfo.module.exports;\r\n }\r\n\r\n define = function (id, dependencies, factory) {\r\n if (typeof id !== \"string\") throw new Error(\"Modules must be names with a string.\");\r\n\r\n if (Object.prototype.toString.call(dependencies) !== \"[object Array]\") {\r\n factory = dependencies;\r\n dependencies = [\"require\", \"exports\", \"module\"];\r\n }\r\n\r\n map[id] = {\r\n id: id,\r\n deps: dependencies,\r\n factory: factory,\r\n };\r\n map[id].module = {\r\n id: id,\r\n exports: map[id].exports,\r\n };\r\n };\r\n defineAmd = function (id, dependancies, factory) {\r\n var mod;\r\n\r\n define(id, dependancies, function () {\r\n var args = Array.prototype.slice.apply(arguments);\r\n var ret = factory.apply(\r\n this,\r\n args.map(function (v) {\r\n return v.default || v;\r\n })\r\n );\r\n return {\r\n default: ret || mod.module.exports,\r\n };\r\n });\r\n\r\n mod = map[id];\r\n mod.deps = mod.deps.map(function (d) {\r\n if (d === \"require\") return \"requireAmd\";\r\n return d;\r\n });\r\n };\r\n define.amd = {};\r\n require = function (dependencies, factory) {\r\n if (typeof dependencies === \"string\") {\r\n // Return single module\r\n return loadMod(dependencies);\r\n } else {\r\n if (Object.prototype.toString.call(dependencies) !== \"[object Array]\") {\r\n factory = dependencies;\r\n dependencies = [];\r\n }\r\n dependencies = loadDeps(dependencies);\r\n if (typeof factory === \"function\") {\r\n factory.apply(null, dependencies);\r\n }\r\n }\r\n };\r\n\r\n function i18nSimple(lookupKey) {\r\n lookupKey = lookupKey\r\n .replace(/^\\s+/g, \"\")\r\n .replace(/\\s+$/g, \"\")\r\n .replace(/\\s+/g, \" \")\r\n .replace(/&/g, \"&\")\r\n .replace(//g, \">\");\r\n var lang = i18n.lang;\r\n if (!i18n.strings) {\r\n // eslint-disable-next-line no-console\r\n console.error(\"i18n strings are not defined\");\r\n return lookupKey;\r\n }\r\n if (!i18n.strings[lookupKey]) {\r\n // eslint-disable-next-line no-console\r\n console.error('i18n string not defined for any language: \"' + lookupKey + '\"');\r\n return lookupKey;\r\n }\r\n if (!i18n.strings[lookupKey][lang]) {\r\n // eslint-disable-next-line no-console\r\n console.error('i18n string not defined for language \"' + lang + '\": \"' + lookupKey + '\"');\r\n return lookupKey;\r\n }\r\n return i18n.strings[lookupKey][lang].replace(/>/g, \">\").replace(/</g, \"<\").replace(/&/g, \"&\");\r\n }\r\n\r\n i18n = function i18n() {\r\n var args = Array.prototype.slice.call(arguments);\r\n if (args.length === 0) return \"\";\r\n if (args.length === 1) return i18nSimple(args[0]);\r\n var lang = i18n.lang;\r\n var lookupKey = args\r\n .reduce(function (acc, arg, i) {\r\n if (i % 2 === 0) {\r\n return acc + arg.replace(/&/g, \"&\").replace(//g, \">\");\r\n } else {\r\n const r = acc + \"<\" + i + \">\";\r\n return r;\r\n }\r\n }, \"\")\r\n .replace(/^\\s+/g, \"\")\r\n .replace(/\\s+$/g, \"\")\r\n .replace(/\\s+/g, \" \");\r\n\r\n if (!i18n.strings) {\r\n // eslint-disable-next-line no-console\r\n console.error(\"i18n strings are not defined\");\r\n return args.join(\"\");\r\n }\r\n if (!i18n.strings[lookupKey]) {\r\n // eslint-disable-next-line no-console\r\n console.error('i18n string not defined for any language: \"' + lookupKey + '\"');\r\n return args.join(\"\");\r\n }\r\n if (!i18n.strings[lookupKey][lang]) {\r\n // eslint-disable-next-line no-console\r\n console.error('i18n string not defined for language \"' + lang + '\": \"' + lookupKey + '\"');\r\n return args.join(\"\");\r\n }\r\n var lookupValue = i18n.strings[lookupKey][lang];\r\n return lookupValue.split(/<\\d+>/g).reduce(function (acc, part, i) {\r\n part = part.replace(/>/g, \">\").replace(/</g, \"<\").replace(/&/g, \"&\");\r\n if (i === 0) return acc + part;\r\n var argIndex = 2 * i - 1;\r\n return acc + args[argIndex] + part;\r\n }, \"\");\r\n };\r\n\r\n i18n.lang = document.documentElement.lang ? document.documentElement.lang.substring(0, 2).toLowerCase() : \"en\";\r\n i18n.strings = null;\r\n})();\r\n__loader = __loader || {};\r\n__loader.define = define;\r\n__loader.defineAmd = defineAmd;\r\n__loader.require = require;\r\n__loader.i18n = i18n;\r\n\r\nvar define=__loader.define,defineAmd=__loader.defineAmd,require=__loader.require,i18n=__loader.i18n;\r\ndefine(\"createjs\", function () { return {default:createjs}; });\r\ndefine(\"jquery\", function () { return {default:jQuery}; });\r\n\r\ndefine(\"@rmlibrary/animate-components/dist/video-component.js\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.AnimateVideoComponent = void 0;\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b)\r\n { if (Object.prototype.hasOwnProperty.call(b, p))\r\n { d[p] = b[p]; } } };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n { throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\"); }\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar createjs_1 = require(\"createjs\");\r\nfunction isUpgraded(element) {\r\n return \"__rm_upgraded__\" in element;\r\n}\r\nfunction hasOverlay(stage) {\r\n return stage && !!stage.domOverlay;\r\n}\r\nvar AnimateVideoComponent = /** @class */ (function (_super) {\r\n __extends(AnimateVideoComponent, _super);\r\n function AnimateVideoComponent(mc, videoSource, bitmap) {\r\n var _this_1 = _super.call(this, mc.mode, mc.startPosition, mc.loop, mc.labels) || this;\r\n _this_1.__rm_upgraded__ = true;\r\n _this_1.cancelStageListener = null;\r\n _this_1.nominalBounds = new createjs_1.default.Rectangle(0, 0, 0, 0);\r\n _this_1.handleRemoved = function () {\r\n _this_1.updateDom();\r\n };\r\n var nominalBounds = mc.nominalBounds;\r\n Object.setPrototypeOf(mc, AnimateVideoComponent.prototype);\r\n var _this = mc;\r\n _this.__rm_upgraded__ = true;\r\n _this.mc = mc;\r\n _this.bitmapFrame = bitmap;\r\n _this.videoSrc = videoSource;\r\n _this.fps = createjs_1.default.Ticker.framerate;\r\n _this.tolerance = 1.5;\r\n _this.oldParentFrame = 0;\r\n _this.init();\r\n _this.nominalBounds = nominalBounds;\r\n return mc;\r\n }\r\n AnimateVideoComponent.upgrade = function (mc, videoSrc, bitmap) {\r\n if (isUpgraded(mc)) {\r\n return mc;\r\n }\r\n return new AnimateVideoComponent(mc, videoSrc, bitmap);\r\n };\r\n AnimateVideoComponent.prototype.init = function () {\r\n var _this_1 = this;\r\n this.addEventListener(\"removed\", function () { return _this_1.updateDom(); });\r\n };\r\n AnimateVideoComponent.prototype.getContainer = function () {\r\n return hasOverlay(this.stage) ? this.stage.domOverlay : document.getElementById(\"dom_overlay_container\");\r\n };\r\n AnimateVideoComponent.prototype.updateDom = function () {\r\n var _this_1 = this;\r\n if (this.stage) {\r\n var container = this.getContainer();\r\n if (!container) {\r\n throw new Error(\"AnimateHtmlComponent: Container wasn't found!\");\r\n }\r\n this.cancelStageListener = this.stage.addEventListener(\"drawstart\", function () {\r\n if (!_this_1.stage) {\r\n _this_1.videoElem.pause();\r\n if (_this_1.cancelStageListener)\r\n { _this_1.cancelStageListener(); }\r\n }\r\n });\r\n }\r\n else if (!this.stage) {\r\n this.videoElem.pause();\r\n if (this.cancelStageListener)\r\n { this.cancelStageListener(); }\r\n }\r\n };\r\n AnimateVideoComponent.prototype.draw = function (ctx, ignoreCache) {\r\n //ensure video elem is always updated to latest active video\r\n this.videoElem = document.querySelector(\".cp-video\");\r\n //update video source if current video source doesn't match animate's\r\n if (!this.videoElem.src.includes(this.videoSrc.substring(2))) {\r\n console.log(\"setting video src\");\r\n this.videoElem.src = this.videoSrc;\r\n }\r\n var buffer = new createjs_1.default.VideoBuffer(this.videoElem);\r\n this.bitmapFrame.image = buffer;\r\n var parent = this.parent;\r\n //check if animation has progressed since last frame\r\n //if not then animation is paused\r\n if (this.videoElem.readyState == 4 || this.videoElem.readyState == 3) {\r\n if (this.oldParentFrame == parent.currentFrame) {\r\n this.videoElem.pause();\r\n }\r\n else {\r\n this.videoElem.play();\r\n this.videoElem.muted = false;\r\n }\r\n }\r\n else {\r\n console.log(\"video not loaded\");\r\n }\r\n //video elem and animate file syncing\r\n var parentTime = parent.currentFrame / this.fps;\r\n var videoTime = this.videoElem.currentTime;\r\n var delta = videoTime - parentTime;\r\n var isSynced = Math.abs(parentTime - videoTime) < this.tolerance ? true : false;\r\n var playbackRate = 1;\r\n if (!isSynced) {\r\n if (Math.abs(delta) >= 2) {\r\n this.videoElem.currentTime = parentTime;\r\n }\r\n else if (delta < 0) {\r\n playbackRate = Math.min(2, 1 + Math.abs(delta) / 2);\r\n }\r\n else {\r\n playbackRate = Math.max(0.1, 1 - Math.abs(delta) / 2);\r\n }\r\n }\r\n this.videoElem.playbackRate = playbackRate;\r\n this.oldParentFrame = parent.currentFrame;\r\n return _super.prototype.draw.call(this, ctx, ignoreCache); // This will draw the movieclip as normal\r\n };\r\n return AnimateVideoComponent;\r\n}(createjs_1.default.MovieClip));\r\nexports.AnimateVideoComponent = AnimateVideoComponent;\r\n//# sourceMappingURL=video-component.js.map\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/animate-components/dist/html-component.js\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.AnimateHtmlComponent = void 0;\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b)\r\n { if (Object.prototype.hasOwnProperty.call(b, p))\r\n { d[p] = b[p]; } } };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n { throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\"); }\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nfunction isUpgraded(element) {\r\n return \"__rm_upgraded__\" in element;\r\n}\r\nfunction hasOverlay(stage) {\r\n return stage && !!stage.domOverlay;\r\n}\r\nvar AnimateHtmlComponent = /** @class */ (function (_super) {\r\n __extends(AnimateHtmlComponent, _super);\r\n function AnimateHtmlComponent(mc, html, fn) {\r\n var _this_1 = _super.call(this, mc.mode, mc.startPosition, mc.loop, mc.labels) || this;\r\n _this_1.__rm_upgraded__ = true;\r\n _this_1.cancelStageListener = null;\r\n _this_1.nominalBounds = new createjs.Rectangle(0, 0, 0, 0);\r\n _this_1.handleRemoved = function () {\r\n _this_1.updateDom();\r\n };\r\n var nominalBounds = mc.nominalBounds;\r\n Object.setPrototypeOf(mc, AnimateHtmlComponent.prototype);\r\n var _this = mc;\r\n _this.__rm_upgraded__ = true;\r\n _this.init(html);\r\n _this.nominalBounds = nominalBounds;\r\n if (fn)\r\n { fn(); }\r\n return mc;\r\n }\r\n AnimateHtmlComponent.upgrade = function (mc, html, fn) {\r\n if (isUpgraded(mc)) {\r\n return mc;\r\n }\r\n return new AnimateHtmlComponent(mc, html, fn);\r\n };\r\n AnimateHtmlComponent.prototype.init = function (html) {\r\n var _this_1 = this;\r\n var el = document.createElement(\"div\");\r\n el.style.position = \"absolute\";\r\n el.style.top = \"0px\";\r\n el.style.left = \"0px\";\r\n el.style.pointerEvents = \"auto\";\r\n var shadow = el.attachShadow({ mode: \"open\" });\r\n shadow.innerHTML = html;\r\n this.addEventListener(\"removed\", function () { return _this_1.updateDom(); });\r\n this.element = el;\r\n };\r\n AnimateHtmlComponent.prototype.getContainer = function () {\r\n return hasOverlay(this.stage) ? this.stage.domOverlay : document.getElementById(\"dom_overlay_container\");\r\n };\r\n AnimateHtmlComponent.prototype.updateDom = function () {\r\n var _this_1 = this;\r\n if (this.stage && !this.element.offsetParent) {\r\n var container = this.getContainer();\r\n if (!container) {\r\n throw new Error(\"AnimateHtmlComponent: Container wasn't found!\");\r\n }\r\n if (!this.element.offsetParent) {\r\n container.appendChild(this.element);\r\n }\r\n this.cancelStageListener = this.stage.addEventListener(\"drawstart\", function () {\r\n if (!_this_1.stage && _this_1.element.offsetParent) {\r\n _this_1.element.remove();\r\n if (_this_1.cancelStageListener)\r\n { _this_1.cancelStageListener(); }\r\n }\r\n });\r\n }\r\n else if (!this.stage && this.element.offsetParent) {\r\n this.element.remove();\r\n if (this.cancelStageListener)\r\n { this.cancelStageListener(); }\r\n }\r\n };\r\n AnimateHtmlComponent.prototype.updatePosition = function () {\r\n var _this = this;\r\n var props = this.getConcatenatedDisplayProps(_this._props), mat = props.matrix;\r\n var tx1 = mat.decompose();\r\n var sx = tx1.scaleX;\r\n var sy = tx1.scaleY;\r\n var dp = 1; // window.devicePixelRatio || 1;\r\n var w = this.nominalBounds.width; // * sx;\r\n var h = this.nominalBounds.height; // * sy;\r\n var dx = this.nominalBounds.x * sx;\r\n var dy = this.nominalBounds.y * sy;\r\n mat.tx /= dp;\r\n mat.ty /= dp;\r\n mat.a /= dp; // * sx;\r\n mat.b /= dp; // * sx;\r\n mat.c /= dp; // * sy;\r\n mat.d /= dp; // * sy;\r\n // const origX = this.nominalBounds.x + this.regX;\r\n // const origY = this.nominalBounds.y + this.regY;\r\n // console.log(this.regX, this.regY, this.nominalBounds.x, this.nominalBounds.y);\r\n this.element.style.setProperty(\"transform-origin\", this.regX + \"px \" + this.regY + \"px\");\r\n var x = mat.tx + dx + this.regX * mat.a + this.regY * mat.c - this.regX;\r\n var y = mat.ty + dy + this.regX * mat.b + this.regY * mat.d - this.regY;\r\n var tx = \"matrix(\" + mat.a + \",\" + mat.b + \",\" + mat.c + \",\" + mat.d + \",\" + x + \",\" + y + \")\";\r\n this.element.style.setProperty(\"transform\", tx);\r\n this.element.style.setProperty(\"width\", \"\".concat(w, \"px\"));\r\n this.element.style.setProperty(\"height\", \"\".concat(h, \"px\"));\r\n // this.element.style.setProperty(\"font-size\", `${sx * 100}px`);\r\n };\r\n AnimateHtmlComponent.prototype.draw = function ( /*ctx: CanvasRenderingContext2D, ignoreCache?: boolean*/) {\r\n this.updateDom();\r\n this.updatePosition();\r\n return true;\r\n };\r\n AnimateHtmlComponent.prototype.querySelector = function (s) {\r\n return this.element.shadowRoot.querySelector(s);\r\n };\r\n AnimateHtmlComponent.prototype.querySelectorAll = function (s) {\r\n return this.element.shadowRoot.querySelectorAll(s);\r\n };\r\n return AnimateHtmlComponent;\r\n}(createjs.MovieClip));\r\nexports.AnimateHtmlComponent = AnimateHtmlComponent;\r\n//# sourceMappingURL=html-component.js.map\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/animate-components\", [\"@rmlibrary/animate-components/dist/index.js\"], function (d) { return d; });\r\ndefine(\"@rmlibrary/animate-components/dist/index.js\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.watch = exports.registerInput = exports.AnimateVideoComponent = exports.AnimateHtmlComponent = void 0;\r\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\r\n if (pack || arguments.length === 2)\r\n { for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar)\r\n { ar = Array.prototype.slice.call(from, 0, i); }\r\n ar[i] = from[i];\r\n }\r\n } }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n};\r\nvar html_component_js_1 = require(\"./html-component.js\");\r\nObject.defineProperty(exports, \"AnimateHtmlComponent\", { enumerable: true, get: function () { return html_component_js_1.AnimateHtmlComponent; } });\r\nvar video_component_js_1 = require(\"./video-component.js\");\r\nObject.defineProperty(exports, \"AnimateVideoComponent\", { enumerable: true, get: function () { return video_component_js_1.AnimateVideoComponent; } });\r\nvar rm = {\r\n upgradeClip: function (mc, html, fn) { return html_component_js_1.AnimateHtmlComponent.upgrade(mc, html, fn); },\r\n addVideo: function (mc, videoSrc, bitmap) {\r\n return video_component_js_1.AnimateVideoComponent.upgrade(mc, videoSrc, bitmap);\r\n },\r\n registerInput: registerInput,\r\n values: new Map(),\r\n watch: watch,\r\n animate: this,\r\n};\r\nexports.default = rm;\r\nfunction registerInput(name, mc, input) {\r\n console.log(name, mc, input);\r\n}\r\nexports.registerInput = registerInput;\r\nvar watcherMap = new WeakMap();\r\nfunction watch(o, name, watcher, action) {\r\n var watched = [];\r\n if (watcherMap.has(o)) {\r\n watched = watcherMap.get(o);\r\n if (watched.includes(name))\r\n { return; }\r\n }\r\n watcherMap.set(o, __spreadArray(__spreadArray([], watched, true), [name], false));\r\n var lastValue = undefined;\r\n o.on(\"tick\", function () {\r\n var v = watcher();\r\n if (v !== lastValue) {\r\n lastValue = v;\r\n action(v);\r\n }\r\n });\r\n}\r\nexports.watch = watch;\r\n//# sourceMappingURL=index.js.map\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/custom-elements/src/ie11fix.js\", function(require, exports, module) {\r\n/* eslint-disable prettier/prettier */\r\n/* eslint-disable @typescript-eslint/camelcase */\r\nif (navigator.appVersion.indexOf(\"Trident/\") >= 0 && !window.__rm_ie11_innerhtml_fixed__) {\r\n function fixProp(propName) {\r\n var desc = Object.getOwnPropertyDescriptor(HTMLElement.prototype, propName);\r\n Object.defineProperty(HTMLElement.prototype, propName, {\r\n set: function (v) {\r\n var this$1 = this;\r\n\r\n while (this.lastChild)\r\n { this$1.removeChild(this$1.lastChild); }\r\n desc.set.call(this, v);\r\n },\r\n });\r\n }\r\n fixProp(\"innerHTML\");\r\n fixProp(\"innerText\");\r\n window.__rm_ie11_innerhtml_fixed__ = true;\r\n}\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/custom-elements/src/HTMLElement.js\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.setWatchAttributes = exports.queueElement = exports.tagNameLookup = void 0;\r\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\r\nvar NativeHTMLElement = window.HTMLElement;\r\nvar upgradeQueue = [];\r\nexports.tagNameLookup = new Map();\r\nfunction queueElement(element) {\r\n upgradeQueue.push(element);\r\n}\r\nexports.queueElement = queueElement;\r\nvar watchAttributes = null;\r\nfunction setWatchAttributes(fn) {\r\n watchAttributes = fn;\r\n}\r\nexports.setWatchAttributes = setWatchAttributes;\r\nfunction HTMLElement() {\r\n var C = this.constructor;\r\n var tagName = exports.tagNameLookup.get(C);\r\n var element;\r\n if (!upgradeQueue.length) {\r\n if (!tagName) {\r\n throw new Error(\"Coulnd't find a tagname for this \");\r\n }\r\n element = document.createElement(tagName);\r\n }\r\n else {\r\n element = upgradeQueue.pop();\r\n }\r\n Object.setPrototypeOf(element, C.prototype);\r\n watchAttributes(element, C);\r\n return element;\r\n}\r\nHTMLElement.prototype = NativeHTMLElement.prototype;\r\nwindow.HTMLElement = HTMLElement;\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/custom-elements\", [\"@rmlibrary/custom-elements/src/index.js\"], function (d) { return d; });\r\ndefine(\"@rmlibrary/custom-elements/src/index.js\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.deregisterElement = exports.registerElement = exports.HTMLCustomElement = void 0;\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b)\r\n { if (b.hasOwnProperty(p))\r\n { d[p] = b[p]; } } };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nrequire(\"./ie11fix.js\");\r\nvar HTMLElement_js_1 = require(\"./HTMLElement.js\");\r\nvar HTMLCustomElement = /** @class */ (function (_super) {\r\n __extends(HTMLCustomElement, _super);\r\n function HTMLCustomElement() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.__rm_upgraded__ = true; // tslint:disable-line\r\n return _this;\r\n }\r\n Object.defineProperty(HTMLCustomElement.prototype, \"isConnected\", {\r\n get: function () {\r\n return document.documentElement.contains(this);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return HTMLCustomElement;\r\n}(HTMLElement));\r\nexports.HTMLCustomElement = HTMLCustomElement;\r\nvar BASE_OBSSERVER_OPTIONS = {\r\n childList: true,\r\n subtree: true,\r\n};\r\nfunction isUpgraded(element) {\r\n return \"__rm_upgraded__\" in element;\r\n}\r\nfunction watchAttributes(element, C) {\r\n if (typeof element.attributeChangedCallback === \"function\") {\r\n var observer = new MutationObserver(function (mutations) {\r\n mutations.forEach(function (mutation) {\r\n if (mutation.type !== \"attributes\")\r\n { return; }\r\n element.attributeChangedCallback(mutation.attributeName, mutation.oldValue, element.getAttribute(mutation.attributeName));\r\n });\r\n });\r\n observer.observe(element, {\r\n attributes: true,\r\n attributeOldValue: true,\r\n attributeFilter: C.observedAttributes,\r\n });\r\n }\r\n}\r\n(0, HTMLElement_js_1.setWatchAttributes)(watchAttributes);\r\nvar map = new Map();\r\nvar newObserver = new MutationObserver(function (mutations) {\r\n var alreadyRemoved = [];\r\n mutations.forEach(function (mutation) {\r\n if (mutation.type === \"childList\") {\r\n Array.from(mutation.removedNodes).forEach(function (node) {\r\n if (node.nodeType !== Node.ELEMENT_NODE)\r\n { return; }\r\n if (alreadyRemoved.filter(function (p) { return p.contains(node); }).length)\r\n { return; }\r\n alreadyRemoved.push(node);\r\n checkRemovedElement(node, true); // eslint-disable-line @typescript-eslint/no-use-before-define\r\n });\r\n }\r\n });\r\n var alreadyAdded = [];\r\n mutations.forEach(function (mutation) {\r\n if (mutation.type === \"childList\") {\r\n Array.from(mutation.addedNodes).forEach(function (node) {\r\n if (node.nodeType !== Node.ELEMENT_NODE)\r\n { return; }\r\n if (alreadyAdded.filter(function (p) { return p.contains(node); }).length)\r\n { return; }\r\n alreadyAdded.push(node);\r\n checkAddedElement(node, true); // eslint-disable-line @typescript-eslint/no-use-before-define\r\n });\r\n }\r\n });\r\n});\r\nfunction doUpgrade(element, tagname) {\r\n if (isUpgraded(element))\r\n { return element; }\r\n var C = map.get(tagname);\r\n if (!C)\r\n { return; }\r\n (0, HTMLElement_js_1.queueElement)(element);\r\n var result = new C();\r\n if (result !== element) {\r\n throw new Error(\"Something went wrong while upgrading the element\");\r\n }\r\n return element;\r\n}\r\nfunction init(element, tagname) {\r\n var C = map.get(tagname);\r\n if (!C)\r\n { return; }\r\n if (!isUpgraded(element)) {\r\n doUpgrade(element, tagname);\r\n }\r\n}\r\nfunction checkInitElement(element) {\r\n map.forEach(function (value, tagname) {\r\n if (isUpgraded(element) || element.tagName !== tagname)\r\n { return; }\r\n init(element, tagname);\r\n });\r\n}\r\nfunction checkAddedElement(element, deep) {\r\n if (deep === void 0) {\r\n deep = false;\r\n }\r\n checkInitElement(element);\r\n if (isUpgraded(element)) {\r\n if (typeof element.connectedCallback === \"function\") {\r\n element.connectedCallback();\r\n }\r\n }\r\n if (deep)\r\n { Array.from(element.children).forEach(function (c) { return checkAddedElement(c, deep); }); }\r\n}\r\nfunction checkRemovedElement(element, deep) {\r\n if (deep === void 0) {\r\n deep = false;\r\n }\r\n if (isUpgraded(element)) {\r\n if (typeof element.disconnectedCallback === \"function\") {\r\n element.disconnectedCallback();\r\n }\r\n }\r\n if (deep)\r\n { Array.from(element.children).forEach(function (c) { return checkRemovedElement(c, deep); }); }\r\n}\r\nfunction setup() {\r\n if (map.size === 0)\r\n { return; }\r\n newObserver.observe(document.documentElement, BASE_OBSSERVER_OPTIONS);\r\n}\r\nfunction tryTakedown() {\r\n if (map.size > 0)\r\n { return; }\r\n newObserver.disconnect();\r\n}\r\nfunction registerElement(tagname, C) {\r\n if (map.has(tagname.toUpperCase())) {\r\n throw new Error(\"The tagname \\\"\" + name + \"\\\" has already been registered.\");\r\n }\r\n tagname = tagname.toUpperCase();\r\n map.set(tagname, C);\r\n HTMLElement_js_1.tagNameLookup.set(C, tagname);\r\n setup();\r\n Array.from(document.querySelectorAll(tagname)).forEach(function (el) {\r\n checkAddedElement(el);\r\n });\r\n}\r\nexports.registerElement = registerElement;\r\nfunction deregisterElement(name) {\r\n map.delete(name);\r\n tryTakedown();\r\n}\r\nexports.deregisterElement = deregisterElement;\r\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7O0FBQUEsT0FBTyxjQUFjLENBQUM7QUFDdEIsT0FBTyxFQUFnQyxZQUFZLEVBQUUsa0JBQWtCLEVBQUUsYUFBYSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFFakg7SUFBZ0QscUNBQVc7SUFBM0Q7UUFBQSxxRUFZQztRQVRXLHFCQUFlLEdBQUcsSUFBSSxDQUFDLENBQUMsc0JBQXNCOztJQVMxRCxDQUFDO0lBUEcsc0JBQVcsMENBQVc7YUFBdEI7WUFDSSxPQUFPLFFBQVEsQ0FBQyxlQUFlLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxDQUFDO1FBQ25ELENBQUM7OztPQUFBO0lBS0wsd0JBQUM7QUFBRCxDQVpBLEFBWUMsQ0FaK0MsV0FBVyxHQVkxRDs7QUFFRCxJQUFNLHNCQUFzQixHQUFHO0lBQzNCLFNBQVMsRUFBRSxJQUFJO0lBQ2YsT0FBTyxFQUFFLElBQUk7Q0FDaEIsQ0FBQztBQUVGLFNBQVMsVUFBVSxDQUFDLE9BQXdDO0lBQ3hELE9BQU8saUJBQWlCLElBQUksT0FBTyxDQUFDO0FBQ3hDL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GFnbmFtZSBcIiR7bmFtZX1cIiBoYXMgYWxyZWFkeSBiZWVuIHJlZ2lzdGVyZWQuYCk7XG4gICAgfVxuXG4gICAgdGFnbmFtZSA9IHRhZ25hbWUudG9VcHBlckNhc2UoKTtcblxuICAgIG1hcC5zZXQodGFnbmFtZSwgQyk7XG4gICAgdGFnTmFtZUxvb2t1cC5zZXQoQywgdGFnbmFtZSk7XG4gICAgc2V0dXAoKTtcblxuICAgIEFycmF5LmZyb20oZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCh0YWduYW1lKSkuZm9yRWFjaChlbCA9PiB7XG4gICAgICAgIGNoZWNrQWRkZWRFbGVtZW50KGVsIGFzIEhUTUxFbGVtZW50KTtcbiAgICB9KTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGRlcmVnaXN0ZXJFbGVtZW50KG5hbWU6IHN0cmluZyk6IHZvaWQge1xuICAgIG1hcC5kZWxldGUobmFtZSk7XG4gICAgdHJ5VGFrZWRvd24oKTtcbn1cbiJdfQ==\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/canvas-player-controls/src/focus.js\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.removeFocusListener = exports.isHidden = exports.addFocusListener = void 0;\r\nvar hidden = \"\";\r\nvar visibilityChange = \"\";\r\nfunction addFocusListener(listener) {\r\n if (typeof document.hidden !== \"undefined\") {\r\n // Opera 12.10 and Firefox 18 and later support\r\n hidden = \"hidden\";\r\n visibilityChange = \"visibilitychange\";\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n }\r\n else if (typeof document.msHidden !== \"undefined\") {\r\n hidden = \"msHidden\";\r\n visibilityChange = \"msvisibilitychange\";\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n }\r\n else if (typeof document.webkitHidden !== \"undefined\") {\r\n hidden = \"webkitHidden\";\r\n visibilityChange = \"webkitvisibilitychange\";\r\n }\r\n if (typeof document.addEventListener === \"undefined\" || typeof document.hidden === \"undefined\") {\r\n console.warn(\"focus/blur changes on tab require Google Chrome or Firefox\"); // eslint-disable-line\r\n }\r\n else {\r\n document.addEventListener(visibilityChange, listener, false);\r\n }\r\n}\r\nexports.addFocusListener = addFocusListener;\r\nfunction removeFocusListener(listener) {\r\n try {\r\n document.removeEventListener(visibilityChange, listener, false);\r\n }\r\n catch (error) {\r\n // Do nothing\r\n }\r\n}\r\nexports.removeFocusListener = removeFocusListener;\r\nfunction isHidden() {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n return document[hidden];\r\n}\r\nexports.isHidden = isHidden;\r\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9mb2N1cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxJQUFJLE1BQU0sR0FBRyxFQUFFLENBQUM7QUFDaEIsSUFBSSxnQkFBZ0IsR0FBRyxFQUFFLENBQUM7QUFFMUIsU0FBUyxnQkFBZ0IsQ0FBQyxRQUF1QjtJQUM3QyxJQUFJLE9BQU8sUUFBUSxDQUFDLE1BQU0sS0FBSyxXQUFXLEVBQUU7UUFDeEMsK0NBQStDO1FBQy9DLE1BQU0sR0FBRyxRQUFRLENBQUM7UUFDbEIsZ0JBQWdCLEdBQUcsa0JBQWtCLENBQUM7UUFDdEMsOERBQThEO0tBQ2pFO1NBQU0sSUFBSSxPQUFRLFFBQWdCLENBQUMsUUFBUSxLQUFLLFdBQVcsRUFBRTtRQUMxRCxNQUFNLEdBQUcsVUFBVSxDQUFDO1FBQ3BCLGdCQUFnQixHQUFHLG9CQUFvQixDQUFDO1FBQ3hDLDhEQUE4RDtLQUNqRTtTQUFNLElBQUksT0FBUSxRQUFnQixDQUFDLFlBQVksS0FBSyxXQUFXLEVBQUU7UUFDOUQsTUFBTSxHQUFHLGNBQWMsQ0FBQztRQUN4QixnQkFBZ0IsR0FBRyx3QkFBd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lcih2aXNpYmlsaXR5Q2hhbmdlLCBsaXN0ZW5lciwgZmFsc2UpO1xuICAgIH1cbn1cblxuZnVuY3Rpb24gcmVtb3ZlRm9jdXNMaXN0ZW5lcihsaXN0ZW5lcjogRXZlbnRMaXN0ZW5lcik6IHZvaWQge1xuICAgIHRyeSB7XG4gICAgICAgIGRvY3VtZW50LnJlbW92ZUV2ZW50TGlzdGVuZXIodmlzaWJpbGl0eUNoYW5nZSwgbGlzdGVuZXIsIGZhbHNlKTtcbiAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAvLyBEbyBub3RoaW5nXG4gICAgfVxufVxuXG5mdW5jdGlvbiBpc0hpZGRlbigpOiBib29sZWFuIHtcbiAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueVxuICAgIHJldHVybiAoZG9jdW1lbnQgYXMgYW55KVtoaWRkZW5dO1xufVxuXG5leHBvcnQgeyBhZGRGb2N1c0xpc3RlbmVyLCBpc0hpZGRlbiwgcmVtb3ZlRm9jdXNMaXN0ZW5lciB9O1xuIl19\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/canvas-player-controls/src/accessibility.js\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.isTabbable = void 0;\r\nvar tabbableElements = [\"button\", \"input\", \"object\", \"select\", \"textarea\", \"a\"];\r\nfunction isTabbable(element) {\r\n var elementType = element.tagName.toLowerCase();\r\n if (tabbableElements.indexOf(elementType) > -1) {\r\n if (elementType !== \"a\" || (elementType === \"a\" && element.hasAttribute(\"href\"))) {\r\n return true;\r\n }\r\n }\r\n if (element.hasAttribute(\"tabindex\")) {\r\n var tabIndex = Number(element.getAttribute(\"tabindex\"));\r\n return !isNaN(tabIndex) && tabIndex >= 0;\r\n }\r\n return false;\r\n}\r\nexports.isTabbable = isTabbable;\r\n//# sourceMappingURL=data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gW1wiYnV0dG9uXCIsIFwiaW5wdXRcIiwgXCJvYmplY3RcIiwgXCJzZWxlY3RcIiwgXCJ0ZXh0YXJlYVwiLCBcImFcIl07XG5cbmZ1bmN0aW9uIGlzVGFiYmFibGUoZWxlbWVudDogSFRNTEVsZW1lbnQpOiBib29sZWFuIHtcbiAgICBjb25zdCBlbGVtZW50VHlwZTogc3RyaW5nID0gZWxlbWVudC50YWdOYW1lLnRvTG93ZXJDYXNlKCk7XG4gICAgaWYgKHRhYmJhYmxlRWxlbWVudHMuaW5kZXhPZihlbGVtZW50VHlwZSkgPiAtMSkge1xuICAgICAgICBpZiAoZWxlbWVudFR5cGUgIT09IFwiYVwiIHx8IChlbGVtZW50VHlwZSA9PT0gXCJhXCIgJiYgZWxlbWVudC5oYXNBdHRyaWJ1dGUoXCJocmVmXCIpKSkge1xuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoZWxlbWVudC5oYXNBdHRyaWJ1dGUoXCJ0YWJpbmRleFwiKSkge1xuICAgICAgICBjb25zdCB0YWJJbmRleCA9IE51bWJlcihlbGVtZW50LmdldEF0dHJpYnV0ZShcInRhYmluZGV4XCIpKTtcblxuICAgICAgICByZXR1cm4gIWlzTmFOKHRhYkluZGV4KSAmJiB0YWJJbmRleCA+PSAwO1xuICAgIH1cblxuICAgIHJldHVybiBmYWxzZTtcbn1cblxuZXhwb3J0IHsgaXNUYWJiYWJsZSB9O1xuIl19\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/canvas-player-controls/src/throttle.js\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.throttle = void 0;\r\n// eslint-disable-next-line @typescript-eslint/ban-types\r\nfunction throttle(fn, t, immediate) {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n var lastArgs, timer;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n return function () {\r\n var arguments$1 = arguments;\r\n\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments$1[_i];\r\n }\r\n var noTimer = !timer;\r\n function timeoutFn() {\r\n if (lastArgs) {\r\n if (typeof fn === \"function\")\r\n { fn.apply(this, lastArgs); }\r\n lastArgs = null;\r\n timer = setTimeout(timeoutFn, t);\r\n }\r\n else {\r\n timer = null;\r\n }\r\n }\r\n if (!noTimer || !immediate) {\r\n lastArgs = args;\r\n }\r\n if (!timer)\r\n { timer = setTimeout(timeoutFn, t); }\r\n if (immediate && noTimer && typeof fn === \"function\")\r\n { fn.apply(this, args); }\r\n };\r\n}\r\nexports.throttle = throttle;\r\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy90aHJvdHRsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx3REFBd0Q7QUFDeEQsTUFBTSxVQUFVLFFBQVEsQ0FBQyxFQUFZLEVBQUUsQ0FBUyxFQUFFLFNBQWtCO0lBQ2hFLDhEQUE4RDtJQUM5RCxJQUFJLFFBQWEsRUFBRSxLQUFVLENBQUM7SUFFOUIsOERBQThEO0lBQzlELE9BQU87UUFBVSxjQUFZO2FBQVosVUFBWSxFQUFaLHFCQUFZLEVBQVosSUFBWTtZQUFaLHlCQUFZOztRQUN6QixJQUFNLE9BQU8sR0FBRyxDQUFDLEtBQUssQ0FBQztRQUV2QixTQUFTLFNBQVM7WUFDZCxJQUFJLFFBQVEsRUFBRTtnQkFDVixJQUFJLE9BQU8sRUFBRSxLQUFLLFVBQVU7b0JBQUUsRUFBRSxDQUFDLEtBQUssQ0FBQyxJQUFJLEVBQUUsUUFBUSxDQUFDLENBQUM7Z0JBQ3ZELFFBQVEsR0FBRyxJQUFJLENBQUM7Z0JBQ2hCLEtBQUssR0FBRyxVQUFVLENBQUMsU0FBUyxFQUFFLENBQUMsQ0FBQyxDQUFDO2FBQ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obGFzdEFyZ3MpIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGZuID09PSBcImZ1bmN0aW9uXCIpIGZuLmFwcGx5KHRoaXMsIGxhc3RBcmdzKTtcbiAgICAgICAgICAgICAgICBsYXN0QXJncyA9IG51bGw7XG4gICAgICAgICAgICAgICAgdGltZXIgPSBzZXRUaW1lb3V0KHRpbWVvdXRGbiwgdCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRpbWVyID0gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghbm9UaW1lciB8fCAhaW1tZWRpYXRlKSB7XG4gICAgICAgICAgICBsYXN0QXJncyA9IGFyZ3M7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCF0aW1lcikgdGltZXIgPSBzZXRUaW1lb3V0KHRpbWVvdXRGbiwgdCk7XG4gICAgICAgIGlmIChpbW1lZGlhdGUgJiYgbm9UaW1lciAmJiB0eXBlb2YgZm4gPT09IFwiZnVuY3Rpb25cIikgZm4uYXBwbHkodGhpcywgYXJncyk7XG4gICAgfTtcbn1cbiJdfQ==\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/canvas-player-controls/src/utilities.js\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.isIE = exports.getStringFromObject = exports.formatTimeA11y = exports.formatTime = exports.cloneElement = void 0;\r\nvar lang = \"en\";\r\ntry {\r\n lang = document.documentElement.lang.toLowerCase() === \"fr\" ? \"fr\" : \"en\";\r\n}\r\ncatch (e) {\r\n lang = \"en\";\r\n}\r\n/*\r\n * create a new copy of the element using another document\r\n * NOTE: IE will block appending any element created in a different window context\r\n * from the window context that the element is being appended to.\r\n */\r\nfunction cloneElement(document, element) {\r\n var newElement = document.createElement(element.tagName);\r\n newElement.innerHTML = element.innerHTML;\r\n return newElement;\r\n}\r\nexports.cloneElement = cloneElement;\r\n// format a number to a more appropriate string\r\nfunction formatTime(numberOfSeconds) {\r\n var minutes = String(Math.floor(numberOfSeconds / 60));\r\n var seconds = String(Math.ceil(numberOfSeconds % 60));\r\n if (seconds.length <= 1) {\r\n seconds = \"0\" + seconds;\r\n }\r\n return minutes + \":\" + seconds;\r\n}\r\nexports.formatTime = formatTime;\r\n// format a number to a more appropriate string\r\nfunction formatTimeA11y(numberOfSeconds) {\r\n var minutes = Math.floor(numberOfSeconds / 60);\r\n var seconds = Math.ceil(numberOfSeconds % 60);\r\n var parts = [];\r\n if (minutes > 0) {\r\n parts.push(minutes);\r\n parts.push(minutes === 1 ? \"minute\" : \"minutes\");\r\n }\r\n parts.push(seconds);\r\n if (lang === \"fr\")\r\n { parts.push(minutes === 1 ? \"seconde\" : \"secondes\"); }\r\n else\r\n { parts.push(minutes === 1 ? \"second\" : \"seconds\"); }\r\n return parts.join(\" \");\r\n}\r\nexports.formatTimeA11y = formatTimeA11y;\r\nfunction getStringFromObject(object) {\r\n var keys = Object.keys(object);\r\n return keys.reduce(function (string, key, index) {\r\n var separator = index < keys.length - 1 ? \",\" : \"\";\r\n var value = object[key];\r\n return string.concat(key + \"=\" + value + separator);\r\n }, \"\");\r\n}\r\nexports.getStringFromObject = getStringFromObject;\r\nfunction isIE() {\r\n return !!window.MSInputMethodContext && !!document.documentMode;\r\n}\r\nexports.isIE = isIE;\r\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy91dGlsaXRpZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBTUEsSUFBSSxJQUFJLEdBQUcsSUFBSSxDQUFDO0FBQ2hCLElBQUk7SUFDQSxJQUFJLEdBQUcsUUFBUSxDQUFDLGVBQWUsQ0FBQyxJQUFJLENBQUMsV0FBVyxFQUFFLEtBQUssSUFBSSxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQztDQU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lc1wiKTtcbiAgICB9XG4gICAgcGFydHMucHVzaChzZWNvbmRzKTtcbiAgICBpZiAobGFuZyA9PT0gXCJmclwiKSBwYXJ0cy5wdXNoKG1pbnV0ZXMgPT09IDEgPyBcInNlY29uZGVcIiA6IFwic2Vjb25kZXNcIik7XG4gICAgZWxzZSBwYXJ0cy5wdXNoKG1pbnV0ZXMgPT09IDEgPyBcInNlY29uZFwiIDogXCJzZWNvbmRzXCIpO1xuXG4gICAgcmV0dXJuIHBhcnRzLmpvaW4oXCIgXCIpO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gZ2V0U3RyaW5nRnJvbU9iamVjdChvYmplY3Q6IFJlY29yZDxzdHJpbmcsIG51bWJlcj4pOiBzdHJpbmcge1xuICAgIGNvbnN0IGtleXMgPSBPYmplY3Qua2V5cyhvYmplY3QpO1xuXG4gICAgcmV0dXJuIGtleXMucmVkdWNlKChzdHJpbmcsIGtleSwgaW5kZXgpID0+IHtcbiAgICAgICAgY29uc3Qgc2VwYXJhdG9yID0gaW5kZXggPCBrZXlzLmxlbmd0aCAtIDEgPyBcIixcIiA6IFwiXCI7XG4gICAgICAgIGNvbnN0IHZhbHVlID0gb2JqZWN0W2tleV07XG5cbiAgICAgICAgcmV0dXJuIHN0cmluZy5jb25jYXQoYCR7a2V5fT0ke3ZhbHVlfSR7c2VwYXJhdG9yfWApO1xuICAgIH0sIFwiXCIpO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gaXNJRSgpOiBib29sZWFuIHtcbiAgICByZXR1cm4gISF3aW5kb3cuTVNJbnB1dE1ldGhvZENvbnRleHQgJiYgISFkb2N1bWVudC5kb2N1bWVudE1vZGU7XG59XG4iXX0=\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/canvas-player/src/ios-fix.js\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar createjs_1 = require(\"createjs\");\r\nvar IOSFix = /** @class */ (function () {\r\n function IOSFix() {\r\n }\r\n Object.defineProperty(IOSFix, \"mimeType\", {\r\n get: function () {\r\n return \"audio/mp3\";\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(IOSFix, \"blankAudio\", {\r\n get: function () {\r\n return \"SUQzAwAAAAABBVRJVDIAAAAXAAAAU2lsZW50IE1QMyBIYWxmIFNlY29uZFRQRTEAAAAPAAAAd3d3LnhhbXVlbC5jb21DT01NAAAAKwAAAFhYWABGcm9tIGh0dHA6Ly93d3cueGFtdWVsLmNvbS9ibGFuay1tcDNzL1RDT04AAAAMAAAARGVhdGggTWV0YWz/+pDAX6sAAAAAAaQYAAAAAAA0g4AAAExBTUUzLjkzVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuOTNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+pLA5p/FA8AAAaQAAAAAAAA0gAAAAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV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kzVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//qSwPre/4PAAAGkAAAAAAAANIAAAABVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQ==\";\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n IOSFix.init = function () {\r\n var bytes = atob(this.blankAudio);\r\n var arrayBuffer = new ArrayBuffer(bytes.length);\r\n var uintArray = new Uint8Array(arrayBuffer);\r\n for (var i = 0; i < bytes.length; i++) {\r\n uintArray[i] = bytes.charCodeAt(i);\r\n }\r\n var blob = new Blob([arrayBuffer], { type: this.mimeType });\r\n this.blobURL = URL.createObjectURL(blob);\r\n };\r\n IOSFix.handler = function () {\r\n createjs_1.default.Sound.play(this.blobURL);\r\n };\r\n return IOSFix;\r\n}());\r\nexports.default = IOSFix;\r\n//# sourceMappingURL=ios-fix.js.map\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/canvas-player/src/noSleep.js\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mp4Src = \"data:video/mp4;base64,AAAAIGZ0eXBtcDQyAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACKBtZGF0AAAC8wYF///v3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE0MiByMjQ3OSBkZDc5YTYxIC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTEgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9MiBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0wIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MCA4eDhkY3Q9MCBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0wIHRocmVhZHM9NiBsb29rYWhlYWRfdGhyZWFkcz0xIHNsaWNlZF90aHJlYWRzPTAgbnI9MCBkZWNpbWF0ZT0xIGludGVybGFjZWQ9MCBibHVyYXlfY29tcGF0PTAgY29uc3RyYWluZWRfaW50cmE9MCBiZnJhbWVzPTMgYl9weXJhbWlkPTIgYl9hZGFwdD0xIGJfYmlhcz0wIGRpcmVjdD0xIHdlaWdodGI9MSBvcGVuX2dvcD0wIHdlaWdodHA9MSBrZXlpbnQ9MzAwIGtleWludF9taW49MzAgc2NlbmVjdXQ9NDAgaW50cmFfcmVmcmVzaD0wIHJjX2xvb2thaGVhZD0xMCByYz1jcmYgbWJ0cmVlPTEgY3JmPTIwLjAgcWNvbXA9MC42MCBxcG1p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AAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAO2lsc3QAAAAzqXRvbwAAACtkYXRhAAAAAQAAAABIYW5kQnJha2UgMC4xMC4yIDIwMTUwNjExMDA=\";\r\nvar NoSleep = /** @class */ (function () {\r\n function NoSleep() {\r\n var _this = this;\r\n this.videoElement = document.createElement(\"video\");\r\n this.videoElement.setAttribute(\"muted\", \"\");\r\n this.videoElement.setAttribute(\"playsinline\", \"\");\r\n var source = document.createElement(\"source\");\r\n source.src = mp4Src;\r\n source.type = \"video/mp4\";\r\n this.videoElement.appendChild(source);\r\n this.videoElement.addEventListener(\"loadedmetadata\", function () {\r\n _this.videoElement.addEventListener(\"timeupdate\", function () {\r\n if (_this.videoElement.currentTime > 0.5) {\r\n var uintArray = new Uint32Array(1);\r\n var crypto = window.crypto || window.msCrypto;\r\n var randomNumber = crypto.getRandomValues(uintArray)[0] * Math.pow(2, -32);\r\n _this.videoElement.currentTime = randomNumber;\r\n }\r\n });\r\n });\r\n }\r\n NoSleep.prototype.enable = function () {\r\n this.videoElement.play();\r\n };\r\n NoSleep.prototype.disable = function () {\r\n this.videoElement.pause();\r\n };\r\n NoSleep.get = function () {\r\n if (!NoSleep.instance)\r\n { NoSleep.instance = new NoSleep(); }\r\n return NoSleep.instance;\r\n };\r\n return NoSleep;\r\n}());\r\nNoSleep.instance = null;\r\nexports.default = NoSleep;\r\n//# sourceMappingURL=noSleep.js.map\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/canvas-player/src/rich-text.js\", function(require, exports, module) {\r\n\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) { if (Object.prototype.hasOwnProperty.call(b, p)) { d[p] = b[p]; } } };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n { throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\"); }\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar RichText = /** @class */ (function (_super) {\r\n __extends(RichText, _super);\r\n function RichText(markup, font, color) {\r\n var _this = _super.call(this) || this;\r\n _this._color = undefined;\r\n _this._font = undefined;\r\n _this._markup = undefined;\r\n _this.lineHeight = 0;\r\n _this.lineWidth = null;\r\n _this.maxWidth = null;\r\n _this.outline = 0;\r\n _this.textAlign = \"left\";\r\n _this.textBaseline = \"top\";\r\n _this.textBlocks = undefined;\r\n _this.DisplayObject_constructor();\r\n _this._color = color;\r\n _this._font = font;\r\n _this._markup = markup;\r\n _this.textBlocks = _this.convertMarkupToTextBlocks();\r\n return _this;\r\n }\r\n RichText.prototype.draw = function (context, ignoreCache) {\r\n var _a;\r\n if (this.DisplayObject_draw(context, ignoreCache)) {\r\n return true;\r\n }\r\n context.fillStyle = this._color || \"#000\";\r\n var lineHeight = this.lineHeight || this.getMaxHeight();\r\n var words = (_a = this.textBlocks) === null || _a === void 0 ? void 0 : _a.reduce(function (listOfWords, textBlock) {\r\n this.prepareContext(context, textBlock);\r\n var words = String(textBlock.text).split(/(\\s|\\r\\n|\\r|\\n)/);\r\n words.forEach(function (word) { return listOfWords.push({\r\n color: textBlock.color,\r\n font: textBlock.font,\r\n text: word,\r\n width: context.measureText(word).width,\r\n }); });\r\n return listOfWords;\r\n }.bind(this), []);\r\n var lineOfWords = [];\r\n var lineCount = 0;\r\n var lineWidth = 0;\r\n words === null || words === void 0 ? void 0 : words.forEach(function (word) {\r\n var wordWidth = word.width || 0;\r\n if ((this.lineWidth && lineWidth + wordWidth > this.lineWidth) ||\r\n word.text === \"\\r\\n\" ||\r\n word.text === \"\\n\" ||\r\n word.text === \"\\r\") {\r\n this.drawLineOfWords(context, lineOfWords, lineWidth, lineCount * lineHeight);\r\n lineOfWords = [];\r\n lineOfWords.push(word);\r\n lineWidth = wordWidth;\r\n lineCount += 1;\r\n }\r\n else {\r\n lineOfWords.push(word);\r\n lineWidth += wordWidth;\r\n }\r\n }.bind(this));\r\n if (lineOfWords.length > 0) {\r\n this.drawLineOfWords(context, lineOfWords, lineWidth, lineCount * lineHeight);\r\n }\r\n return true;\r\n };\r\n RichText.prototype.getMeasuredLineHeight = function () {\r\n return this.getMeasuredWidth(\"M\") * 1.2;\r\n };\r\n RichText.prototype.convertMarkupToTextBlocks = function () {\r\n var _this = this;\r\n var _a;\r\n var markupChunks = (_a = this._markup) === null || _a === void 0 ? void 0 : _a.split(/(]*>|<\\/b>|]*>|<\\/i>)/);\r\n var color = this._color;\r\n var state = \"text\";\r\n this.textBlocks = markupChunks === null || markupChunks === void 0 ? void 0 : markupChunks.reduce(function (textBlocks, chunk, index) {\r\n if (chunk === \"\") {\r\n return textBlocks;\r\n }\r\n var token = _this.getToken(chunk);\r\n if (state === \"bold\") {\r\n if (token === \"boldClose\") {\r\n state = \"text\";\r\n }\r\n else if (token === \"italicOpen\") {\r\n state = \"bold-italic\";\r\n }\r\n else if (token === \"text\") {\r\n var oldColor = color;\r\n if (index - 1 >= 0) {\r\n var previousChunk = markupChunks[index - 1];\r\n if ((previousChunk === \"\" || previousChunk === \"\") && previousChunk.includes(\"style=\")) {\r\n color = _this.getColor(previousChunk);\r\n }\r\n }\r\n textBlocks.push({\r\n color: color,\r\n font: \"bold \".concat(_this._font),\r\n text: chunk,\r\n });\r\n color = oldColor;\r\n }\r\n else {\r\n throw new Error(\"Invalid markup: looking for text or closing bold tag and found a \".concat(chunk, \" tag.\"));\r\n }\r\n }\r\n else if (state === \"bold-italic\") {\r\n if (token === \"boldClose\") {\r\n state = \"italic\";\r\n }\r\n else if (token === \"italicClose\") {\r\n state = \"bold\";\r\n }\r\n else if (token === \"text\") {\r\n var oldColor = color;\r\n if (index - 1 >= 0) {\r\n var previousChunk = markupChunks[index - 1];\r\n if ((previousChunk === \"\" || previousChunk === \"\") && previousChunk.includes(\"style=\")) {\r\n color = _this.getColor(previousChunk);\r\n }\r\n }\r\n textBlocks.push({\r\n color: color,\r\n font: \"bold italic \".concat(_this._font),\r\n text: chunk,\r\n });\r\n color = oldColor;\r\n }\r\n else {\r\n throw new Error(\"Invalid markup: looking for text or closing bold or italic tag and found a \".concat(chunk, \" tag.\"));\r\n }\r\n }\r\n else if (state === \"italic\") {\r\n if (token === \"boldOpen\") {\r\n state = \"bold-italic\";\r\n }\r\n else if (token === \"italicClose\") {\r\n state = \"text\";\r\n }\r\n else if (token === \"text\") {\r\n var oldColor = color;\r\n if (index - 1 >= 0) {\r\n var previousChunk = markupChunks[index - 1];\r\n if ((previousChunk === \"\" || previousChunk === \"\") && previousChunk.includes(\"style=\")) {\r\n color = _this.getColor(previousChunk);\r\n }\r\n }\r\n textBlocks.push({\r\n color: color,\r\n font: \"italic \".concat(_this._font),\r\n text: chunk,\r\n });\r\n color = oldColor;\r\n }\r\n else {\r\n throw new Error(\"Invalid markup: looking for text or opening italic tag and found a \".concat(chunk, \" tag.\"));\r\n }\r\n }\r\n else if (state === \"text\") {\r\n if (token === \"boldOpen\") {\r\n state = \"bold\";\r\n }\r\n else if (token === \"italicOpen\") {\r\n state = \"italic\";\r\n }\r\n else if (state === \"text\" && token === \"text\") {\r\n textBlocks.push({\r\n color: color,\r\n font: _this._font,\r\n text: chunk,\r\n });\r\n }\r\n else {\r\n throw new Error(\"Invalid markup: looking for text and found a \".concat(chunk, \" tag.\"));\r\n }\r\n }\r\n return textBlocks;\r\n }, []);\r\n return this.textBlocks;\r\n };\r\n RichText.prototype.drawLineOfWords = function (context, lineOfWords, width, y) {\r\n width = this.trimLineOfWords(lineOfWords).reduce(function (totalWidth, word) { return totalWidth + (word.width || 0); }, 0);\r\n var x = 0;\r\n if (this.textAlign === \"center\") {\r\n x = -width / 2;\r\n }\r\n else if (this.textAlign === \"left\") {\r\n x = 0;\r\n }\r\n else if (this.textAlign === \"right\") {\r\n x = -width;\r\n }\r\n lineOfWords.forEach(function (word) {\r\n this.prepareContext(context, {\r\n color: word.color,\r\n font: word.font,\r\n textAlign: \"left\",\r\n });\r\n this.drawText(context, word.text, x, y);\r\n x += word.width || 0;\r\n }.bind(this));\r\n };\r\n RichText.prototype.drawText = function (context, text, x, y) {\r\n if (this.outline) {\r\n context.strokeText(text, x, y, this.maxWidth || 0xffff);\r\n }\r\n else {\r\n context.fillText(text, x, y, this.maxWidth || 0xffff);\r\n }\r\n };\r\n RichText.prototype.getColor = function (markup) {\r\n return markup\r\n .split(\"=\")\r\n .slice(1)[0]\r\n .replace(/>/g, \"\")\r\n .replace(/('|\")/g, \"\")\r\n .split(\":\")\r\n .slice(1)[0]\r\n .replace(/;/g, \"\")\r\n .trim();\r\n };\r\n RichText.prototype.getMaxHeight = function () {\r\n return (this.getMaxWidth() || 0) * 1.2;\r\n };\r\n RichText.prototype.getMaxWidth = function () {\r\n var _this = this;\r\n var _a;\r\n return (((_a = this.textBlocks) === null || _a === void 0 ? void 0 : _a.reduce(function (maxWidth, textBlock) {\r\n var width = _this.getMeasuredWidth({\r\n font: textBlock.font,\r\n text: \"M\",\r\n });\r\n return maxWidth > width ? maxWidth : width;\r\n }, 0)) || 0);\r\n };\r\n RichText.prototype.getMetrics = function (word) {\r\n var _a;\r\n var context = Text._workingContext;\r\n context === null || context === void 0 ? void 0 : context.save();\r\n var text = typeof word === \"object\" ? word.text : word;\r\n var metrics = (_a = this.prepareContext(context, word)) === null || _a === void 0 ? void 0 : _a.measureText(text);\r\n context === null || context === void 0 ? void 0 : context.restore();\r\n return metrics;\r\n };\r\n RichText.prototype.getMeasuredWidth = function (word) {\r\n var metrics = this.getMetrics(word);\r\n return metrics.width || 0;\r\n };\r\n RichText.prototype.getToken = function (markup) {\r\n if (markup === \"\") {\r\n return \"boldClose\";\r\n }\r\n else if (markup.slice(0, 2) === \"\") {\r\n return \"boldOpen\";\r\n }\r\n else if (markup === \"\") {\r\n return \"italicClose\";\r\n }\r\n else if (markup.slice(0, 2) === \"\") {\r\n return \"italicOpen\";\r\n }\r\n else {\r\n return \"text\";\r\n }\r\n };\r\n RichText.prototype.prepareContext = function (context, word) {\r\n if (context) {\r\n context.font = (typeof word === \"object\" && word.font) || this._font || \"10px sans-serif\";\r\n context.fillStyle = (typeof word === \"object\" && word.color) || this._color || \"#000\";\r\n context.textAlign = (typeof word === \"object\" && word.textAlign) || this.textAlign || \"left\";\r\n context.textBaseline = this.textBaseline || \"top\";\r\n context.lineJoin = \"miter\";\r\n context.miterLimit = 2.5;\r\n }\r\n return context;\r\n };\r\n RichText.prototype.trimLineOfWords = function (lineOfWords) {\r\n var start = lineOfWords.findIndex(function (word) { return word.text.trim().length > 0; });\r\n lineOfWords.splice(0, start);\r\n lineOfWords.reverse();\r\n start = lineOfWords.findIndex(function (word) { return word.text.trim().length > 0; });\r\n lineOfWords.splice(0, start);\r\n lineOfWords.reverse();\r\n return lineOfWords;\r\n };\r\n return RichText;\r\n}(createjs.DisplayObject));\r\nRichText.H_OFFSETS = {\r\n center: -0.5,\r\n end: -1,\r\n left: 0,\r\n right: -1,\r\n start: 0,\r\n};\r\nRichText.V_OFFSETS = {\r\n alphabetic: -0.8,\r\n bottom: -1,\r\n hanging: -0.01,\r\n ideographic: -0.85,\r\n middle: -0.4,\r\n top: 0,\r\n};\r\nvar canvas = createjs.createCanvas\r\n ? createjs.createCanvas()\r\n : document.createElement(\"canvas\");\r\nif (!canvas.getContext) {\r\n Text._workingContext = canvas.getContext(\"2d\");\r\n canvas.width = canvas.height = 1;\r\n}\r\nObject.defineProperty(RichText.prototype, \"color\", {\r\n get: function () {\r\n return this._color;\r\n },\r\n set: function (color) {\r\n this._color = color;\r\n this.textBlocks = this.convertMarkupToTextBlocks();\r\n },\r\n enumerable: true,\r\n});\r\nObject.defineProperty(RichText.prototype, \"font\", {\r\n get: function () {\r\n return this._font;\r\n },\r\n set: function (font) {\r\n this._font = font;\r\n this.textBlocks = this.convertMarkupToTextBlocks();\r\n },\r\n enumerable: true,\r\n});\r\nObject.defineProperty(RichText.prototype, \"markup\", {\r\n get: function () {\r\n return this._markup;\r\n },\r\n set: function (markup) {\r\n this._markup = markup;\r\n this.textBlocks = this.convertMarkupToTextBlocks();\r\n },\r\n enumerable: true,\r\n});\r\ncreatejs.RichText = createjs.promote(RichText, \"DisplayObject\");\r\nexports.default = RichText;\r\n//# sourceMappingURL=rich-text.js.map\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/canvas-player/src/iframe-fix.js\", function(require, exports, module) {\r\n\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) { throw t[1]; } return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) { throw new TypeError(\"Generator is already executing.\"); }\r\n while (g && (g = 0, op[0] && (_ = 0)), _) { try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) { return t; }\r\n if (y = 0, t) { op = [op[0] & 2, t.value]; }\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) { _.ops.pop(); }\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } }\r\n if (op[0] & 5) { throw op[1]; } return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n};\r\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\r\n if (pack || arguments.length === 2) { for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) { ar = Array.prototype.slice.call(from, 0, i); }\r\n ar[i] = from[i];\r\n }\r\n } }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.iframeFix = void 0;\r\n// eslint-disable-next-line prettier/prettier\r\nfunction iframeFix() {\r\n var doc = document;\r\n var isEmbedded = window.parent !== window;\r\n var cpControls = isEmbedded && document.querySelector(\"rm-canvas-player-controls\");\r\n var logPrefix = \"[rm-personalized-video\".concat(cpControls ? \"(child)\" : \"(parent)\", \"]\");\r\n var otherOrigin = \"*\"; // Changed with init event;\r\n var forceOverride = true;\r\n var pendingFullscreenElement = null;\r\n var savedScrollPosition = 0;\r\n function log() {\r\n var arguments$1 = arguments;\r\n\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments$1[_i];\r\n }\r\n // eslint-disable-next-line no-console\r\n console.log.apply(console, __spreadArray([logPrefix], args, false));\r\n }\r\n function setupFakeFullscreen() {\r\n if (!cpControls) {\r\n throw new Error(\"Should not get here!\");\r\n }\r\n var isIos = /iPad|iPhone|iPod/.test(navigator.userAgent);\r\n var fullScreenEnabled = doc.fullscreenEnabled || doc.mozFullScreenEnabled || doc.webkitFullscreenEnabled || doc.msFullscreenEnabled;\r\n var shouldPatch = forceOverride || (isIos && !fullScreenEnabled);\r\n if (!shouldPatch)\r\n { return; }\r\n Element.prototype.requestFullscreen = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n return __generator(this, function (_a) {\r\n // eslint-disable-next-line @typescript-eslint/no-this-alias\r\n pendingFullscreenElement = this;\r\n window.parent.postMessage({\r\n type: \"rm-personalized-video-request-fullscreen\",\r\n }, otherOrigin);\r\n return [2 /*return*/];\r\n });\r\n });\r\n };\r\n doc.exitFullscreen = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n return __generator(this, function (_a) {\r\n window.parent.postMessage({\r\n type: \"rm-personalized-video-exit-fullscreen\",\r\n }, otherOrigin);\r\n return [2 /*return*/];\r\n });\r\n });\r\n };\r\n Object.defineProperty(document, \"fullscreenElement\", {\r\n value: null,\r\n writable: true,\r\n });\r\n Object.defineProperty(document, \"fullscreenEnabled\", {\r\n value: true,\r\n writable: false,\r\n });\r\n cpControls.fullScreenSupported = cpControls.isFullscreenSupported();\r\n cpControls.fullScreenBtn.classList.remove(\"hide\");\r\n }\r\n window.addEventListener(\"message\", function (event) {\r\n if (event.data && typeof event.data.type === \"string\" && event.data.type.startsWith(\"rm-personalized-video\")) {\r\n var data = event.data;\r\n var iframe = Array.from(document.getElementsByTagName(\"iframe\")).filter(function (el) { return el.contentWindow === event.source; })[0];\r\n switch (data.type) {\r\n // PARENT\r\n case \"rm-personalized-video-init\":\r\n {\r\n otherOrigin = data.origin;\r\n iframe.style.aspectRatio = data.aspectRatio;\r\n iframe.style.height = \"auto\";\r\n iframe.contentWindow.postMessage({\r\n type: \"rm-personalized-video-ack\",\r\n origin: window.location.origin,\r\n }, otherOrigin);\r\n }\r\n break;\r\n case \"rm-personalized-video-request-fullscreen\": {\r\n var scrollingElement = document.scrollingElement;\r\n savedScrollPosition = scrollingElement.scrollTop;\r\n iframe.style.position = \"fixed\";\r\n iframe.style.top = \"0\";\r\n iframe.style.left = \"0\";\r\n iframe.style.width = \"100vw\";\r\n iframe.style.height = \"100vh\";\r\n iframe.style.zIndex = \"99999\";\r\n // scrollingElement.style.height = \"100vh\";\r\n // scrollingElement.style.overflow = \"hidden\";\r\n iframe.contentWindow.postMessage({\r\n type: \"rm-personalized-video-request-fullscreen-ack\",\r\n }, otherOrigin);\r\n break;\r\n }\r\n case \"rm-personalized-video-exit-fullscreen\": {\r\n iframe.style.position = \"\";\r\n iframe.style.top = \"\";\r\n iframe.style.left = \"\";\r\n iframe.style.width = \"\";\r\n iframe.style.height = \"auto\";\r\n iframe.style.zIndex = \"\";\r\n var scrollingElement = document.scrollingElement;\r\n // scrollingElement.style.height = \"\";\r\n // scrollingElement.style.overflow = \"\";\r\n scrollingElement.scrollTop = savedScrollPosition;\r\n iframe.contentWindow.postMessage({\r\n type: \"rm-personalized-video-exit-fullscreen-ack\",\r\n }, otherOrigin);\r\n break;\r\n }\r\n //CHILD\r\n case \"rm-personalized-video-ack\": {\r\n otherOrigin = data.origin;\r\n if (cpControls)\r\n { cpControls.player.handleResizeDebounced(); }\r\n setupFakeFullscreen();\r\n break;\r\n }\r\n case \"rm-personalized-video-request-fullscreen-ack\": {\r\n doc.fullscreenElement = pendingFullscreenElement;\r\n pendingFullscreenElement = null;\r\n var event_1 = new Event(\"fullscreenchange\");\r\n document.dispatchEvent(event_1);\r\n break;\r\n }\r\n case \"rm-personalized-video-exit-fullscreen-ack\": {\r\n document.fullscreenElement = null;\r\n var event_2 = new Event(\"fullscreenchange\");\r\n document.dispatchEvent(event_2);\r\n break;\r\n }\r\n default:\r\n log(\"UNKNOWN MESSAGE TYPE:\", data);\r\n }\r\n }\r\n });\r\n function initFromChild(e) {\r\n if (document.readyState !== \"complete\")\r\n { return; }\r\n if (e) {\r\n try {\r\n document.removeEventListener(\"readystatechange\", initFromChild);\r\n }\r\n catch (e) {\r\n // Do nothing;\r\n }\r\n }\r\n if (cpControls) {\r\n // Embedded in iframe. Try to contact parent\r\n window.parent.postMessage({\r\n type: \"rm-personalized-video-init\",\r\n aspectRatio: \"\".concat(cpControls.player.width, \" / \").concat(cpControls.player.height),\r\n origin: window.location.origin,\r\n }, otherOrigin);\r\n }\r\n }\r\n if (cpControls) {\r\n if (document.readyState === \"complete\") {\r\n initFromChild();\r\n }\r\n else {\r\n document.addEventListener(\"readystatechange\", initFromChild);\r\n }\r\n }\r\n}\r\nexports.iframeFix = iframeFix;\r\n//# sourceMappingURL=iframe-fix.js.map\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/canvas-player/src/debounce.js\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.rmDebounce = void 0;\r\nfunction rmDebounce(fn, t, immediate) {\r\n var timer;\r\n return function () {\r\n var arguments$1 = arguments;\r\n\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments$1[_i];\r\n }\r\n var noTimer = !timer;\r\n clearTimeout(timer);\r\n timer = setTimeout(function () {\r\n timer = null;\r\n if (!immediate && typeof fn === \"function\")\r\n { fn.apply(this, args); }\r\n }, t);\r\n if (immediate && noTimer && typeof fn === \"function\")\r\n { fn.apply(this, args); }\r\n };\r\n}\r\nexports.rmDebounce = rmDebounce;\r\n//# sourceMappingURL=debounce.js.map\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/canvas-player/src/customevent-ie.js\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.customEventPolyFill = void 0;\r\nfunction customEventPolyFill() {\r\n (function () {\r\n if (typeof window.CustomEvent === \"function\")\r\n { return false; }\r\n var windowObj = window;\r\n function CustomEvent(typeArg, eventInitDict) {\r\n eventInitDict = eventInitDict || { bubbles: false, cancelable: false, detail: null };\r\n var evt = document.createEvent(\"CustomEvent\");\r\n evt.initCustomEvent(typeArg, eventInitDict.bubbles, eventInitDict.cancelable, eventInitDict.detail);\r\n return evt;\r\n }\r\n windowObj.CustomEvent = CustomEvent;\r\n })();\r\n}\r\nexports.customEventPolyFill = customEventPolyFill;\r\n//# sourceMappingURL=customevent-ie.js.map\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/canvas-player/src/interfaces.js\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.isEnhancedRootMovieClip = void 0;\r\nfunction isEnhancedRootMovieClip(clip) {\r\n return typeof clip.clearAllSoundStreams === \"function\";\r\n}\r\nexports.isEnhancedRootMovieClip = isEnhancedRootMovieClip;\r\n//# sourceMappingURL=interfaces.js.map\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/canvas-player\", [\"@rmlibrary/canvas-player/src/index.js\"], function (d) { return d; });\r\ndefine(\"@rmlibrary/canvas-player/src/index.js\", function(require, exports, module) {\r\n\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) { if (Object.prototype.hasOwnProperty.call(b, p)) { d[p] = b[p]; } } };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n { throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\"); }\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __assign = (this && this.__assign) || function () {\r\n __assign = Object.assign || function(t) {\r\n var arguments$1 = arguments;\r\n\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments$1[i];\r\n for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p))\r\n { t[p] = s[p]; } }\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) { k2 = k; }\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) { k2 = k; }\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) { if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) { __createBinding(exports, m, p); } }\r\n};\r\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\r\n if (pack || arguments.length === 2) { for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) { ar = Array.prototype.slice.call(from, 0, i); }\r\n ar[i] = from[i];\r\n }\r\n } }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.iframeFix = exports.RichText = exports.CanvasPlayer = void 0;\r\nvar Interfaces = require(\"./interfaces\");\r\nvar ios_fix_js_1 = require(\"./ios-fix.js\");\r\nvar noSleep_js_1 = require(\"./noSleep.js\");\r\nvar rich_text_js_1 = require(\"./rich-text.js\");\r\nexports.RichText = rich_text_js_1.default;\r\nvar createjs_1 = require(\"createjs\");\r\nvar customevent_ie_js_1 = require(\"./customevent-ie.js\");\r\nvar debounce_js_1 = require(\"./debounce.js\");\r\nvar iframe_fix_js_1 = require(\"./iframe-fix.js\");\r\nObject.defineProperty(exports, \"iframeFix\", { enumerable: true, get: function () { return iframe_fix_js_1.iframeFix; } });\r\nvar createJSFixed = false;\r\nvar animationCache = {};\r\nfunction fakeSynced(_asset, currentFrame) {\r\n var asset = _asset;\r\n asset._getStartFrame = function () {\r\n if (typeof this._startFrame === \"number\")\r\n { return this._startFrame; }\r\n this._startFrame = currentFrame;\r\n return this._startFrame;\r\n };\r\n asset.advance = function () {\r\n this._framerate = this.framerate;\r\n return;\r\n };\r\n asset._updateTimeline = function (rawPosition, jump) {\r\n var tl = this.timeline;\r\n if (!this.parent)\r\n { return; }\r\n rawPosition = this.parent.currentFrame - this._getStartFrame();\r\n if (rawPosition < 0) {\r\n rawPosition = 0;\r\n }\r\n if (this._rawPosition === rawPosition) {\r\n return;\r\n }\r\n this._rawPosition = rawPosition;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tl.loop = this.loop;\r\n var movingBackwards = tl.rawPosition >= rawPosition;\r\n tl.setPosition(rawPosition, movingBackwards || !this.actionsEnabled, jump, this._bound_resolveState);\r\n };\r\n}\r\nvar CanvasPlayer = /** @class */ (function (_super) {\r\n __extends(CanvasPlayer, _super);\r\n function CanvasPlayer(container, animation, options) {\r\n var _this = _super.call(this) || this;\r\n _this.noSleepInstance = null;\r\n _this.tickHandler = function (event) {\r\n if (document.hidden) {\r\n return;\r\n }\r\n if (_this.exportRoot.currentFrame >= _this.exportRoot.duration && !_this.ended) {\r\n _this.ended = true;\r\n _this.audioClips.forEach(function (clip) {\r\n clip.soundInstance.stop();\r\n });\r\n if (_this.backgroundMusicSoundClip) {\r\n _this.backgroundMusicSoundClip.soundInstance.position = 0;\r\n _this.backgroundMusicSoundClip.soundInstance.volume = 1;\r\n }\r\n _this.dispatchEvent(\"ended\");\r\n }\r\n if (!_this.stage) {\r\n return;\r\n }\r\n // REMOVED - prevents animation when the player is paused.\r\n // this.stage.tickOnUpdate = !this.paused;\r\n var time = (_this.exportRoot.currentFrame * 1000) / _this.animationProperties.fps;\r\n if (time !== _this.lastReportedTime) {\r\n _this.lastReportedTime = time;\r\n _this.fadeOutBackgroundMusic();\r\n _this.dispatchEvent(\"timeupdate\");\r\n }\r\n if (!_this.paused) {\r\n _this.loopThroughAudio(_this.exportRoot.currentFrame);\r\n }\r\n if (_this.captions.length !== 0 && _this.enableCC) {\r\n var currentCaptionIndex = _this.currentCaptionsReference === undefined ? -1 : _this.captions.indexOf(_this.currentCaptionsReference);\r\n if (currentCaptionIndex === -1) {\r\n _this.currentCaptionsReference = _this.captions[0];\r\n var event_1 = new CustomEvent(\"captionChanged\", {\r\n detail: _this.currentCaptionsReference,\r\n });\r\n _this.dispatchEvent(event_1);\r\n }\r\n else if (_this.captions[currentCaptionIndex + 1] !== undefined &&\r\n _this.exportRoot.currentFrame >= _this.captions[currentCaptionIndex + 1].startFrame) {\r\n _this.currentCaptionsReference = _this.captions[currentCaptionIndex + 1];\r\n var event_2 = new CustomEvent(\"captionChanged\", {\r\n detail: _this.currentCaptionsReference,\r\n });\r\n _this.dispatchEvent(event_2);\r\n }\r\n }\r\n _this.stage.update(event);\r\n if (typeof _this.exportRoot.handleSoundTick === \"function\") {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n _this.exportRoot.handleSoundTick();\r\n }\r\n };\r\n if (typeof options.noSleep === \"undefined\" || options.noSleep) {\r\n _this.noSleepInstance = noSleep_js_1.default.get();\r\n }\r\n createjs_1.default.EventDispatcher.initialize(_this);\r\n _this.iosFixed = false;\r\n _this.isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent);\r\n if (_this.isIOS) {\r\n _this.implementIOSFix();\r\n }\r\n if (!createJSFixed) {\r\n _this.implementCreateJSFix();\r\n }\r\n _this.container = container;\r\n _this.animation = animation;\r\n _this.options = options;\r\n if (_this.animation instanceof Array) {\r\n _this.loadChildrenLibraries();\r\n }\r\n else {\r\n _this.animationLibrary = _this.animation.composition.getLibrary();\r\n _this.animationImages = _this.animation.composition.getImages();\r\n }\r\n _this.animationProperties = _this.animationLibrary.properties;\r\n var preloadFonts = _this.options.fonts || [];\r\n if (_this.container.querySelector(\"canvas\") === null) {\r\n _this.container.appendChild(_this.createTemplate(preloadFonts));\r\n }\r\n _this.initializeOptions();\r\n // Load the files from the manifest\r\n if (_this.manifest.length > 0) {\r\n _this.handleAnimationLoad(_this.animation instanceof Array ? _this.animation : [_this.animation]);\r\n }\r\n else {\r\n setTimeout(function () { return _this.handleComplete(); });\r\n }\r\n // Creating the debounced version of resize function\r\n _this.handleResizeDebounced = (0, debounce_js_1.rmDebounce)(_this.handlePlayerResize.bind(_this), 50, false);\r\n _this.fullScreenFunc = function () {\r\n _this.fullScreenChange();\r\n };\r\n _this.resizeFunc = function () {\r\n _this.handleResize();\r\n };\r\n document.addEventListener(\"fullscreenchange\", _this.fullScreenFunc);\r\n document.addEventListener(\"mozfullscreenchange\", _this.fullScreenFunc);\r\n document.addEventListener(\"webkitfullscreenchange\", _this.fullScreenFunc);\r\n document.addEventListener(\"MSFullscreenChange\", _this.fullScreenFunc);\r\n window.addEventListener(\"resize\", _this.resizeFunc);\r\n _this.dispatchEvent(\"loadstart\");\r\n return _this;\r\n }\r\n Object.defineProperty(CanvasPlayer.prototype, \"paused\", {\r\n /**\r\n * Getter that is used to obtain the exportRoot.paused value\r\n */\r\n get: function () {\r\n return this.exportRoot === undefined ? true : this.exportRoot.paused;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Fixes line height issue for dynamic texts.\r\n CanvasPlayer.prototype.implementCreateJSFix = function () {\r\n createJSFixed = true;\r\n var isFirefox = navigator.userAgent.toLowerCase().indexOf(\"firefox\") > -1;\r\n var appleTextFix = false;\r\n var isChromeGreaterThanOrEqualTo71 = true;\r\n try {\r\n var versionNumber = navigator.userAgent.match(/Chrome\\/(\\d+)/i)[1];\r\n isChromeGreaterThanOrEqualTo71 = Number(versionNumber) >= 71;\r\n }\r\n catch (error) {\r\n isChromeGreaterThanOrEqualTo71 = false;\r\n }\r\n if (/Mac/i.test(navigator.userAgent)) {\r\n var macSafariVersion = Number(navigator.userAgent.match(/Version\\/(\\d+)/i)[1]);\r\n if (macSafariVersion < 18)\r\n { appleTextFix = true; }\r\n }\r\n if (this.isIOS) {\r\n var iosSafariVersion = Number(navigator.userAgent.match(/Version\\/(\\d+)/i)[1]);\r\n if (iosSafariVersion < 17)\r\n { appleTextFix = true; }\r\n }\r\n if (isFirefox || isChromeGreaterThanOrEqualTo71 || appleTextFix) {\r\n var createJSTextPrototype = createjs_1.default.Text.prototype;\r\n var prepContext_1 = createJSTextPrototype._prepContext;\r\n createJSTextPrototype._prepContext = function (context) {\r\n var workingContext = createjs_1.default.Text._workingContext;\r\n workingContext.save();\r\n var measuredWidth = prepContext_1.call(this, workingContext).measureText(\"M\").width * 1.2;\r\n workingContext.restore();\r\n context.translate(0, measuredWidth * 0.2);\r\n return prepContext_1.call(this, context);\r\n };\r\n }\r\n };\r\n CanvasPlayer.prototype.implementIOSFix = function () {\r\n var _this = this;\r\n ios_fix_js_1.default.init();\r\n document.body.addEventListener(\"touchstart\", function () {\r\n ios_fix_js_1.default.handler();\r\n _this.iosFixed = true;\r\n }, false);\r\n document.body.addEventListener(\"touchend\", function () {\r\n ios_fix_js_1.default.handler();\r\n _this.iosFixed = true;\r\n }, false);\r\n };\r\n CanvasPlayer.prototype.initializeOptions = function () {\r\n var preloadImages = this.options.preloadImages === undefined ? true : this.options.preloadImages;\r\n (0, customevent_ie_js_1.customEventPolyFill)();\r\n // Setting the width and height of the player\r\n this.width = this.animationProperties.width;\r\n this.height = this.animationProperties.height;\r\n this.autoplay = false; //typeof this.options.autoplay !== \"boolean\" ? true : this.options.autoplay;\r\n // Grabs the rootName used for initializing the exportRoot\r\n this.rootName =\r\n this.options.rootName ||\r\n Object.keys(this.animationLibrary)[Object.keys(this.animationLibrary).indexOf(\"properties\") - 1];\r\n this.ended = false;\r\n this.progress = 0;\r\n this.pixelDensity = this.options.pixelDensity || 1;\r\n this.audioClips = [];\r\n this.manifest = this.animationProperties.manifest;\r\n if (!preloadImages) {\r\n this.manifest = this.manifest.filter(function (asset) {\r\n return !/\\.(jpg|jpeg|png|gif)$/i.test(asset.src);\r\n });\r\n }\r\n this.totalNumFiles = this.manifest.length;\r\n this.canvas = this.container.querySelector(\"canvas\");\r\n this.domOverlay = this.container.querySelector(\".cp-overlay\") || null;\r\n var containerWidth = this.container.offsetWidth;\r\n var containerHeight = this.container.offsetHeight;\r\n var widthFactor = containerWidth / this.width;\r\n var heightFactor = containerHeight / this.height;\r\n var factor = Math.min(widthFactor, heightFactor);\r\n var viewWidth = factor * this.width;\r\n var viewHeight = factor * this.height;\r\n var pixelDensity = this.pixelDensity || 1;\r\n if (this.options.videoSize) {\r\n this.canvas.width = this.options.videoSize.width;\r\n this.canvas.height = this.options.videoSize.height;\r\n }\r\n else {\r\n this.canvas.width = viewWidth * pixelDensity;\r\n this.canvas.height = viewHeight * pixelDensity;\r\n }\r\n if (this.domOverlay) {\r\n this.domOverlay.style.width = viewWidth + \"px\";\r\n this.domOverlay.style.height = viewHeight + \"px\";\r\n }\r\n this.enableCC = this.options.enableCC === undefined ? false : this.options.enableCC;\r\n this.captions = [];\r\n this.captionGrabCompleted = false;\r\n this.descriptions = [];\r\n this.descriptionGrabCompleted = false;\r\n if (this.options.backgroundMusic) {\r\n if (this.options.backgroundMusic.soundClipID) {\r\n this.backgroundMusicSoundClipID = this.options.backgroundMusic.soundClipID;\r\n }\r\n }\r\n };\r\n CanvasPlayer.prototype.createTemplate = function (fonts) {\r\n var fragment = document.createDocumentFragment();\r\n var div = document.createElement(\"div\");\r\n // sanitize width and height for when rmlib compiles these string literals to concat() functions\r\n var width = String(this.animationProperties.width).replace(/\\D/g, \"\");\r\n var height = String(this.animationProperties.height).replace(/\\D/g, \"\");\r\n var canvasHTML = \"\");\r\n var overlayHTML = this.options.domOverlay\r\n ? \"
    \")\r\n : \"\";\r\n var fontHTML = '
    ' + fonts.map(this.createFontTemplate).join(\"\") + \"
    \";\r\n div.innerHTML = canvasHTML + overlayHTML + fontHTML;\r\n while (div.firstChild) {\r\n fragment.appendChild(div.firstChild);\r\n }\r\n return fragment;\r\n };\r\n CanvasPlayer.prototype.createFontTemplate = function (font) {\r\n font = font.replace(//g, \">\");\r\n return \"
    preload
    \");\r\n };\r\n CanvasPlayer.prototype.handleFileLoad = function (event) {\r\n this.progress += 1 / this.totalNumFiles;\r\n this.dispatchEvent(\"progress\");\r\n if (event && event.item.type === \"image\") {\r\n this.animationImages[event.item.id] = event.result;\r\n }\r\n };\r\n CanvasPlayer.prototype.handleAnimationLoad = function (animations) {\r\n var _this = this;\r\n // Loading the manifest for each specific dynamic timeline\r\n var promises = animations.map(function (anim) {\r\n return new Promise(function (resolve) {\r\n // Get each animation timeline's image object and library\r\n var images = anim.composition.getImages();\r\n var library = anim.composition.getLibrary();\r\n var imagesArray = [];\r\n var soundsArray = [];\r\n // Create a new loader for each animation\r\n var loader = new createjs_1.default.LoadQueue(false);\r\n loader.installPlugin(createjs_1.default.Sound);\r\n loader.setMaxConnections(6);\r\n loader.on(\"fileload\", function (event) {\r\n _this.progress += 1 / _this.totalNumFiles;\r\n _this.dispatchEvent(\"progress\");\r\n if (event && event.item.type === \"image\") {\r\n images[event.item.id] = event.result;\r\n }\r\n });\r\n loader.on(\"complete\", function () {\r\n resolve(null);\r\n });\r\n if (library.properties.loaded === undefined || library.properties.loaded === false) {\r\n imagesArray = library.properties.manifest.filter(function (asset) { return asset.src[asset.src.length - 1] !== \"3\"; });\r\n library.properties.loaded = true;\r\n }\r\n soundsArray = library.properties.manifest.filter(function (asset) { return asset.src[asset.src.length - 1] === \"3\" &&\r\n (createjs_1.default.Sound.activePlugin\r\n ? !createjs_1.default.Sound.activePlugin.isPreloadComplete(asset.src)\r\n : true); });\r\n if (imagesArray.length === 0 && soundsArray.length === 0) {\r\n resolve(null);\r\n }\r\n loader.loadManifest(__spreadArray(__spreadArray([], imagesArray, true), soundsArray, true));\r\n });\r\n });\r\n try {\r\n Promise.all(promises).then(this.handleComplete.bind(this));\r\n }\r\n catch (e) {\r\n console.log(e);\r\n }\r\n };\r\n CanvasPlayer.prototype.createStage = function () {\r\n if (this.options.webgl)\r\n { return new createjs_1.default.StageGL(this.canvas, { antialias: true }); }\r\n if (typeof this.animationLibrary.Stage === \"function\")\r\n { return new this.animationLibrary.Stage(this.canvas); }\r\n return new createjs_1.default.Stage(this.canvas);\r\n };\r\n CanvasPlayer.prototype.handleComplete = function () {\r\n var _this = this;\r\n this.progress = 1;\r\n this.dispatchEvent(\"progress\");\r\n this.canvas.style.display = \"block\";\r\n createjs_1.default.Ticker.framerate = this.animationProperties.fps;\r\n createjs_1.default.Ticker.timingMode =\r\n this.options.timingMode ||\r\n (this.options.webgl ? CanvasPlayer.TIMING.RAF_SYNCHED : CanvasPlayer.TIMING.TIMEOUT);\r\n createjs_1.default.Ticker.addEventListener(\"tick\", this.tickHandler);\r\n this.stage = this.createStage();\r\n if (this.options.webgl)\r\n { this.stage.setClearColor(this.options.clearColor || \"rgba(255, 255, 255, 0.0)\"); }\r\n this.stage.autoClear = true;\r\n var pixelDensity = this.pixelDensity || 1;\r\n this.stage.pixelDensity = pixelDensity;\r\n if (this.options.stageVars) {\r\n this.stage.stageVars = this.options.stageVars;\r\n this.stageVars = this.options.stageVars;\r\n }\r\n if (this.domOverlay) {\r\n this.stage.domOverlay = this.domOverlay;\r\n }\r\n this.initExportRoot();\r\n this.exportRoot.stop();\r\n this.updateStage();\r\n this.dispatchEvent(\"durationchange\");\r\n setTimeout(function () {\r\n _this.dispatchEvent(\"canplay\");\r\n _this.dispatchEvent(\"tick\");\r\n if (_this.autoplay) {\r\n _this.play();\r\n }\r\n else {\r\n _this.audioClips.forEach(function (clip) {\r\n clip.soundInstance.paused = true;\r\n });\r\n _this.dispatchEvent(\"pause\");\r\n }\r\n });\r\n };\r\n CanvasPlayer.prototype.loadChildrenLibraries = function () {\r\n var childrenLibraries = [];\r\n if (this.options.dynamicTimeline === undefined || this.options.dynamicTimeline.length === 0) {\r\n throw new Error(\"No dynamic Timeline provided!\");\r\n }\r\n var sceneIds = [];\r\n this.options.dynamicTimeline.forEach(function (scene) {\r\n if (typeof scene === \"string\") {\r\n sceneIds.push(scene);\r\n }\r\n else {\r\n sceneIds.push(scene.id);\r\n }\r\n });\r\n var sortedAnimations = this.animation\r\n .filter(function (anim) { return sceneIds.indexOf(anim.meta.TITLE) !== -1; })\r\n .sort(function (anim1, anim2) {\r\n return sceneIds.indexOf(anim1.meta.TITLE) - sceneIds.indexOf(anim2.meta.TITLE);\r\n });\r\n sortedAnimations.forEach(function (anim) {\r\n if (sceneIds.indexOf(anim.meta.TITLE) !== -1) {\r\n var childLib = anim.composition.getLibrary();\r\n childrenLibraries.push(childLib);\r\n }\r\n });\r\n if (childrenLibraries.length === 0) {\r\n throw new Error(\"No Children Libraries available!\");\r\n }\r\n // Generate dynamic timeline library\r\n this.animationLibrary = this.generateLibForDynamicTimelines(childrenLibraries, sceneIds);\r\n };\r\n CanvasPlayer.prototype.updateStage = function () {\r\n this.stage.tickOnUpdate = false;\r\n this.stage.update();\r\n this.stage.tickOnUpdate = true;\r\n };\r\n CanvasPlayer.prototype.handleResize = function () {\r\n createjs_1.default.Ticker.paused = true;\r\n this.handleResizeDebounced();\r\n };\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n CanvasPlayer.prototype.handlePlayerResize = function (_forceResize) {\r\n if (_forceResize === void 0) { _forceResize = false; }\r\n if (this.exportRoot !== undefined) {\r\n var containerWidth = this.container.offsetWidth;\r\n var containerHeight = this.container.offsetHeight;\r\n var widthFactor = containerWidth / this.width;\r\n var heightFactor = containerHeight / this.height;\r\n var factor = Math.min(widthFactor, heightFactor);\r\n var viewWidth = factor * this.width;\r\n var viewHeight = factor * this.height;\r\n var pixelDensity = this.pixelDensity || 1;\r\n if (this.options.videoSize) {\r\n this.canvas.width = this.options.videoSize.width;\r\n this.canvas.height = this.options.videoSize.height;\r\n }\r\n else {\r\n this.canvas.width = viewWidth * pixelDensity;\r\n this.canvas.height = viewHeight * pixelDensity;\r\n }\r\n if (this.options.width) {\r\n this.canvas.style.width =\r\n typeof this.options.width === \"string\" ? this.options.width : this.options.width(viewWidth);\r\n }\r\n else {\r\n this.canvas.style.width = \"\".concat(viewWidth, \"px\");\r\n }\r\n if (this.options.height) {\r\n this.canvas.style.height =\r\n typeof this.options.height === \"string\" ? this.options.height : this.options.height(viewHeight);\r\n }\r\n else {\r\n this.canvas.style.height = \"\".concat(viewHeight, \"px\");\r\n }\r\n this.canvas.style.left = Math.round((containerWidth - viewWidth) / 2) + \"px\";\r\n this.canvas.style.top = Math.round((containerHeight - viewHeight) / 2) + \"px\";\r\n if (this.domOverlay) {\r\n this.domOverlay.style.width = viewWidth * pixelDensity + \"px\";\r\n this.domOverlay.style.height = viewHeight * pixelDensity + \"px\";\r\n this.domOverlay.style.left = this.canvas.style.left;\r\n this.domOverlay.style.top = this.canvas.style.top;\r\n this.domOverlay.style.fontSize = \"\".concat(Math.round(factor * pixelDensity * 100).toFixed(5), \"px\");\r\n this.domOverlay.style.transform = \"scale(\".concat((1 / pixelDensity).toFixed(5), \")\");\r\n this.domOverlay.style.transformOrigin = \"top left\";\r\n }\r\n if (this.options.webgl) {\r\n this.stage.updateViewport(this.canvas.width, this.canvas.height);\r\n }\r\n else {\r\n this.exportRoot.setTransform(0, 0, factor * pixelDensity, factor * pixelDensity);\r\n }\r\n this.stage.pixelDensity = pixelDensity;\r\n createjs_1.default.Ticker.paused = false;\r\n if (this.paused) {\r\n this.updateStage();\r\n }\r\n this.dispatchEvent(\"resizeEnd\");\r\n }\r\n };\r\n CanvasPlayer.prototype.createExportRoot = function () {\r\n var C;\r\n if (this.options.dynamicTimeline === undefined) {\r\n C = this.animationLibrary[this.rootName];\r\n }\r\n else {\r\n C = this.animationLibrary.main;\r\n }\r\n return new C(createjs_1.default.MovieClip.INDEPENDENT, 0, 0);\r\n };\r\n CanvasPlayer.prototype.initExportRoot = function () {\r\n var _this = this;\r\n this.exportRoot = this.createExportRoot();\r\n this.audioClips = [];\r\n if (this.exportRoot.dynamicScenes === undefined || this.exportRoot.dynamicScenes.length === 0) {\r\n this.grabAudio(this.exportRoot, 0);\r\n if (this.enableCC) {\r\n this.grabCaptionsFromAnimation(false);\r\n this.grabDescriptions(false);\r\n }\r\n }\r\n else {\r\n this.exportRoot.dynamicScenes.forEach(function (scene) {\r\n _this.grabAudio(scene.inst, scene.startFrame);\r\n });\r\n if (this.enableCC) {\r\n this.grabCaptionsFromAnimation(true);\r\n this.grabDescriptions(true);\r\n }\r\n }\r\n this.stage.addChild(this.exportRoot);\r\n this.exportRoot.framerate = this.animationProperties.fps;\r\n this.dispatchEvent(\"exportRootCreated\");\r\n this.handlePlayerResize();\r\n };\r\n CanvasPlayer.prototype.grabCaptionsFromAnimation = function (hasDynamicTimeline) {\r\n var _this = this;\r\n if (!hasDynamicTimeline) {\r\n var ccPropNames_1 = Object.keys(this.exportRoot).filter(function (property) {\r\n return property.startsWith(\"caption\");\r\n });\r\n var captionTweens = this.exportRoot.timeline.tweens.filter(function (tween) {\r\n return ccPropNames_1.some(function (propName) {\r\n if (tween.target === _this.exportRoot[propName]) {\r\n return true;\r\n }\r\n });\r\n });\r\n captionTweens.forEach(function (captionTween) {\r\n var cur = captionTween._stepHead;\r\n while (cur !== null && !_this.captionGrabCompleted) {\r\n if (Object.keys(cur).length === 0 || cur.props.text === undefined) {\r\n _this.captions.push({\r\n startFrame: cur.t + cur.d,\r\n off: cur.props._off === undefined || cur.props._off === null ? false : cur.props._off,\r\n text: captionTween.target.text,\r\n });\r\n }\r\n else {\r\n _this.captions.push({\r\n startFrame: cur.t + cur.d,\r\n off: cur.props._off,\r\n text: cur.props.text,\r\n });\r\n }\r\n var startTime = cur.t / _this.animationProperties.fps;\r\n var duration = cur.d / _this.animationProperties.fps;\r\n if (Object.keys(cur).length === 0 || cur.props.text === undefined) {\r\n _this.descriptions.push({\r\n startTime: startTime,\r\n duration: duration,\r\n text: captionTween.target.text,\r\n type: \"caption\",\r\n off: cur.props._off === undefined || cur.props._off === null ? false : cur.props._off,\r\n });\r\n }\r\n else {\r\n _this.descriptions.push({\r\n startTime: startTime,\r\n duration: duration,\r\n text: cur.props.text,\r\n type: \"caption\",\r\n off: cur.props._off,\r\n });\r\n }\r\n cur = cur.next;\r\n }\r\n _this.exportRoot.timeline.removeTween(captionTween);\r\n });\r\n ccPropNames_1.forEach(function (name) {\r\n _this.exportRoot[name] = undefined;\r\n });\r\n }\r\n else {\r\n var ccPropNames_2 = [];\r\n this.exportRoot.dynamicScenes.forEach(function (scene) {\r\n var keys = Object.keys(scene.inst);\r\n var key = keys.filter(function (property) {\r\n return property.startsWith(\"caption\");\r\n })[0];\r\n ccPropNames_2.push(key);\r\n });\r\n var firstStartFrame_1 = 0;\r\n this.exportRoot.dynamicScenes.forEach(function (scene) {\r\n var captionTweens = scene.inst.timeline.tweens.filter(function (tween) {\r\n return ccPropNames_2.some(function (propName) {\r\n if (tween.target === scene.inst[propName]) {\r\n return true;\r\n }\r\n });\r\n });\r\n captionTweens.forEach(function (captionTween) {\r\n var cur = captionTween._stepHead;\r\n while (cur !== null && !_this.captionGrabCompleted) {\r\n if (Object.keys(cur).length === 0 || cur.props.text === undefined) {\r\n _this.captions.push({\r\n startFrame: cur.t + cur.d + firstStartFrame_1,\r\n text: captionTween.target.text,\r\n off: cur.props._off === undefined || cur.props._off === null ? false : cur.props._off,\r\n });\r\n }\r\n else {\r\n _this.captions.push({\r\n startFrame: cur.t + cur.d + firstStartFrame_1,\r\n text: cur.props.text,\r\n off: cur.props._off,\r\n });\r\n }\r\n var startTime = (cur.t + firstStartFrame_1) / _this.animationProperties.fps;\r\n var duration = cur.d / _this.animationProperties.fps;\r\n if (Object.keys(cur).length === 0 || cur.props.text === undefined) {\r\n _this.descriptions.push({\r\n startTime: startTime,\r\n duration: duration,\r\n text: captionTween.target.text,\r\n type: \"caption\",\r\n off: cur.props._off === undefined || cur.props._off === null ? false : cur.props._off,\r\n });\r\n }\r\n else {\r\n _this.descriptions.push({\r\n startTime: startTime,\r\n duration: duration,\r\n text: cur.props.text,\r\n type: \"caption\",\r\n off: cur.props._off,\r\n });\r\n }\r\n cur = cur.next;\r\n }\r\n firstStartFrame_1 += scene.duration;\r\n scene.inst.timeline.removeTween(captionTween);\r\n });\r\n });\r\n this.exportRoot.dynamicScenes.forEach(function (scene) {\r\n ccPropNames_2.forEach(function (ccpropName) {\r\n if (scene.inst[ccpropName] !== undefined) {\r\n scene.inst[ccpropName] = undefined;\r\n }\r\n });\r\n });\r\n }\r\n this.captions.sort(function (caption1, caption2) { return caption1.startFrame - caption2.startFrame; });\r\n this.captionGrabCompleted = true;\r\n };\r\n CanvasPlayer.prototype.grabDescriptions = function (hasDynamicTimeline) {\r\n var _this = this;\r\n if (!hasDynamicTimeline) {\r\n var descPropNames_1 = Object.keys(this.exportRoot).filter(function (property) {\r\n return property.startsWith(\"description\");\r\n });\r\n var descriptionTweens = this.exportRoot.timeline.tweens.filter(function (tween) {\r\n return descPropNames_1.some(function (propName) {\r\n if (tween.target === _this.exportRoot[propName]) {\r\n return true;\r\n }\r\n });\r\n });\r\n descriptionTweens.forEach(function (descTween) {\r\n var cur = descTween._stepHead;\r\n while (cur !== null && !_this.descriptionGrabCompleted) {\r\n var startTime = cur.t / _this.animationProperties.fps;\r\n var duration = cur.d / _this.animationProperties.fps;\r\n if (Object.keys(cur).length === 0 || cur.props.text === undefined) {\r\n _this.descriptions.push({\r\n startTime: startTime,\r\n duration: duration,\r\n text: descTween.target.text,\r\n off: cur.props._off === undefined || cur.props._off === null ? false : cur.props._off,\r\n type: \"description\",\r\n });\r\n }\r\n else {\r\n _this.descriptions.push({\r\n startTime: startTime,\r\n duration: duration,\r\n text: cur.props.text,\r\n off: cur.props._off,\r\n type: \"description\",\r\n });\r\n }\r\n cur = cur.next;\r\n }\r\n _this.exportRoot.timeline.removeTween(descTween);\r\n });\r\n descPropNames_1.forEach(function (name) {\r\n _this.exportRoot[name] = undefined;\r\n });\r\n }\r\n else {\r\n var descPropNames_2 = [];\r\n this.exportRoot.dynamicScenes.forEach(function (scene) {\r\n var keys = Object.keys(scene.inst);\r\n var key = keys.filter(function (property) {\r\n return property.startsWith(\"description\");\r\n })[0];\r\n descPropNames_2.push(key);\r\n });\r\n var firstStartFrame_2 = 0;\r\n this.exportRoot.dynamicScenes.forEach(function (scene) {\r\n var descriptionTweens = scene.inst.timeline.tweens.filter(function (tween) {\r\n return descPropNames_2.some(function (propName) {\r\n if (tween.target === scene.inst[propName]) {\r\n return true;\r\n }\r\n });\r\n });\r\n descriptionTweens.forEach(function (descTween) {\r\n var cur = descTween._stepHead;\r\n while (cur !== null && !_this.descriptionGrabCompleted) {\r\n var startTime = (cur.t + firstStartFrame_2) / _this.animationProperties.fps;\r\n var duration = cur.d / _this.animationProperties.fps;\r\n if (Object.keys(cur).length === 0 || cur.props.text === undefined) {\r\n _this.descriptions.push({\r\n startTime: startTime,\r\n duration: duration,\r\n text: descTween.target.text,\r\n off: cur.props._off === undefined || cur.props._off === null ? false : cur.props._off,\r\n type: \"description\",\r\n });\r\n }\r\n else {\r\n _this.descriptions.push({\r\n startTime: startTime,\r\n duration: duration,\r\n text: cur.props.text,\r\n off: cur.props._off,\r\n type: \"description\",\r\n });\r\n }\r\n cur = cur.next;\r\n }\r\n firstStartFrame_2 += scene.duration;\r\n scene.inst.timeline.removeTween(descTween);\r\n });\r\n });\r\n }\r\n this.descriptions.sort(function (desc1, desc2) {\r\n if (desc1.startTime === desc2.startTime && desc1.type === \"caption\" && desc2.type === \"description\") {\r\n return 1;\r\n }\r\n return desc1.startTime - desc2.startTime;\r\n });\r\n this.descriptionGrabCompleted = true;\r\n };\r\n CanvasPlayer.prototype.generateTranscript = function () {\r\n return this.descriptions;\r\n };\r\n CanvasPlayer.prototype.grabAudio = function (clip, startFrame) {\r\n var _this = this;\r\n if (this.options.nativeAudio)\r\n { return; }\r\n var movieClipProp, soundInstance;\r\n Object.keys(clip).forEach(function (key) {\r\n movieClipProp = clip[key];\r\n if (typeof movieClipProp === \"function\") {\r\n var soundIds = (movieClipProp.toString().match(/playSound\\(\"([^\"]+)\"/g) || []).map(function (m) { return m.replace(/^playSound\\(\"/, \"\").replace(/\"$/, \"\"); });\r\n soundIds.forEach(function (idString) {\r\n soundInstance = createjs_1.default.Sound.createInstance(idString);\r\n var audioClip = {\r\n startFrame: parseInt(key.toString().split(\"_\")[1]) + startFrame,\r\n id: idString,\r\n duration: soundInstance.duration,\r\n soundInstance: soundInstance,\r\n };\r\n if (_this.backgroundMusicSoundClipID &&\r\n audioClip.id === _this.backgroundMusicSoundClipID &&\r\n !_this.backgroundMusicSoundClip) {\r\n _this.backgroundMusicSoundClip = audioClip;\r\n }\r\n var includeClip = true;\r\n if (typeof _this.options.filterSoundClip === \"function\") {\r\n includeClip = _this.options.filterSoundClip(audioClip);\r\n }\r\n if (includeClip) {\r\n _this.audioClips.push(audioClip);\r\n }\r\n });\r\n }\r\n });\r\n };\r\n CanvasPlayer.prototype.fullScreenChange = function () {\r\n var document = window.document;\r\n var fullScreenElement = document.fullscreenElement ||\r\n document.mozFullScreenElement ||\r\n document.webkitFullscreenElement ||\r\n document.msFullscreenElement;\r\n var fullScreenEnabled = document.fullscreenEnabled ||\r\n document.mozFullScreenEnabled ||\r\n document.webkitFullscreenEnabled ||\r\n document.msFullscreenEnabled;\r\n if (this.fullScreen && (!fullScreenEnabled || fullScreenElement !== this.container)) {\r\n this.fullScreen = false;\r\n this.dispatchEvent(\"fullscreenchange\");\r\n this.container.classList.remove(\"fullscreen-on\");\r\n }\r\n else if (!this.fullScreen && fullScreenEnabled && fullScreenElement === this.container) {\r\n this.fullScreen = true;\r\n this.dispatchEvent(\"fullscreenchange\");\r\n this.container.classList.add(\"fullscreen-on\");\r\n }\r\n };\r\n CanvasPlayer.prototype.updateStageVars = function (newVars) {\r\n this.stage.stageVars = newVars;\r\n this.stageVars = newVars;\r\n };\r\n CanvasPlayer.prototype.destroy = function () {\r\n // Removing event listeners\r\n window.removeEventListener(\"resize\", this.resizeFunc);\r\n createjs_1.default.Ticker.removeEventListener(\"tick\", this.tickHandler);\r\n document.removeEventListener(\"fullscreenchange\", this.fullScreenFunc);\r\n document.removeEventListener(\"mozfullscreenchange\", this.fullScreenFunc);\r\n document.removeEventListener(\"webkitfullscreenchange\", this.fullScreenFunc);\r\n document.removeEventListener(\"MSFullscreenChange\", this.fullScreenFunc);\r\n // Removing the canvas element ! Removing this for now for testing purposes\r\n // this.container.removeChild(this.canvas);\r\n // Stopping the exportRoot and all audioClips\r\n this.audioClips.forEach(function (clip) {\r\n clip.soundInstance.stop();\r\n });\r\n this.exportRoot.stop();\r\n this.exportRoot = undefined;\r\n this.stage.enableMouseOver(-1);\r\n this.stage.enableDOMEvents(false);\r\n this.stage.removeAllEventListeners();\r\n this.stage.removeAllChildren();\r\n this.stage.canvas = null;\r\n this.stage = null;\r\n };\r\n CanvasPlayer.prototype.loopThroughAudio = function (frameNum, seeking) {\r\n var _this = this;\r\n var frameDuration;\r\n var fps = this.animationProperties.fps;\r\n this.audioClips.forEach(function (clip) {\r\n frameDuration = clip.duration / fps;\r\n if (seeking) {\r\n clip.played = false;\r\n }\r\n if (frameNum >= clip.startFrame && frameNum < clip.startFrame + frameDuration) {\r\n if (!clip.played) {\r\n clip.played = true;\r\n clip.soundInstance.position = ((frameNum - clip.startFrame) * 1000) / fps;\r\n if (!_this.paused) {\r\n clip.soundInstance.play();\r\n }\r\n }\r\n else if (seeking) {\r\n clip.soundInstance.position = ((frameNum - clip.startFrame) * 1000) / fps;\r\n }\r\n }\r\n else if (typeof clip.soundInstance !== \"undefined\") {\r\n clip.soundInstance.stop();\r\n }\r\n });\r\n return true;\r\n };\r\n CanvasPlayer.prototype.fadeOutBackgroundMusic = function () {\r\n var fps = this.animationProperties.fps;\r\n var fadeOut = this.options.backgroundMusic && this.options.backgroundMusic.fadeOut;\r\n var fadeOutDuration = this.options.backgroundMusic && typeof this.options.backgroundMusic.fadeOutDuration === \"number\"\r\n ? this.options.backgroundMusic.fadeOutDuration\r\n : 5;\r\n fadeOutDuration *= fps;\r\n if (fadeOut && this.backgroundMusicSoundClip) {\r\n if (this.getTotalFrames() - this.exportRoot.currentFrame <= fadeOutDuration) {\r\n this.backgroundMusicSoundClip.soundInstance.volume -= 1 / fadeOutDuration;\r\n }\r\n else {\r\n this.backgroundMusicSoundClip.soundInstance.volume = 1;\r\n }\r\n }\r\n };\r\n CanvasPlayer.prototype.play = function () {\r\n this.exportRoot.play();\r\n if (this.noSleepInstance) {\r\n this.noSleepInstance.enable();\r\n }\r\n if (this.ended) {\r\n this.ended = false;\r\n this.audioClips.forEach(function (clip) {\r\n clip.played = false;\r\n });\r\n try {\r\n this.stage.removeChild(this.exportRoot);\r\n }\r\n catch (e) {\r\n console.error(\"Error: \", e);\r\n }\r\n this.initExportRoot();\r\n this.dispatchEvent(\"play\");\r\n }\r\n else {\r\n this.audioClips.forEach(function (clip) {\r\n clip.played = false;\r\n clip.soundInstance.paused = false;\r\n });\r\n this.dispatchEvent(\"play\");\r\n }\r\n };\r\n CanvasPlayer.prototype.pause = function () {\r\n if (this.paused === false) {\r\n this.exportRoot.stop();\r\n if (this.noSleepInstance)\r\n { this.noSleepInstance.disable(); }\r\n this.audioClips.forEach(function (clip) {\r\n clip.played = false;\r\n clip.soundInstance.paused = true;\r\n });\r\n this.dispatchEvent(\"pause\");\r\n }\r\n };\r\n CanvasPlayer.prototype.goToFrame = function (frameNum) {\r\n var this$1 = this;\r\n\r\n var movieClipFrame;\r\n if (this.paused) {\r\n this.exportRoot.gotoAndStop(frameNum);\r\n }\r\n else {\r\n this.exportRoot.gotoAndPlay(frameNum);\r\n }\r\n if (this.exportRoot.dynamicScenes !== undefined && this.exportRoot.dynamicScenes.length === 0) {\r\n this.exportRoot.dynamicScenes.forEach(function (dynamicScene) {\r\n if (!dynamicScene.background &&\r\n frameNum >= dynamicScene.startFrame &&\r\n frameNum < dynamicScene.startFrame + dynamicScene.duration) {\r\n movieClipFrame = frameNum - dynamicScene.startFrame;\r\n if (dynamicScene.inst.paused) {\r\n dynamicScene.inst.gotoAndStop(movieClipFrame);\r\n }\r\n else {\r\n dynamicScene.inst.gotoAndPlay(movieClipFrame);\r\n }\r\n }\r\n });\r\n }\r\n if (this.paused) {\r\n this.updateStage();\r\n }\r\n this.loopThroughAudio(frameNum, true);\r\n if (this.enableCC) {\r\n for (var i = 0; i < this.captions.length; i++) {\r\n if (this$1.exportRoot.currentFrame >= this$1.captions[i].startFrame) {\r\n this$1.currentCaptionsReference = this$1.captions[i];\r\n var event = new CustomEvent(\"captionChanged\", {\r\n detail: this$1.currentCaptionsReference,\r\n });\r\n this$1.dispatchEvent(event);\r\n }\r\n }\r\n }\r\n };\r\n CanvasPlayer.prototype.restart = function () {\r\n this.ended = false;\r\n this.exportRoot.play();\r\n this.audioClips.forEach(function (clip) {\r\n clip.soundInstance.stop();\r\n });\r\n try {\r\n this.stage.removeChild(this.exportRoot);\r\n }\r\n catch (e) {\r\n console.error(\"Error: \", e);\r\n }\r\n this.initExportRoot();\r\n this.dispatchEvent(\"play\");\r\n };\r\n CanvasPlayer.prototype.getDuration = function () {\r\n return Math.round(this.exportRoot.duration / this.animationProperties.fps);\r\n };\r\n CanvasPlayer.prototype.getCurrentTime = function () {\r\n return Math.round((20 * this.exportRoot.currentFrame) / this.animationProperties.fps) / 20;\r\n };\r\n CanvasPlayer.prototype.getTotalFrames = function () {\r\n return this.exportRoot.duration;\r\n };\r\n CanvasPlayer.prototype.toggleFullscreen = function () {\r\n var document = window.document;\r\n var fullScreenEnabled = document.fullscreenEnabled ||\r\n document.mozFullScreenEnabled ||\r\n document.webkitFullscreenEnabled ||\r\n document.msFullscreenEnabled;\r\n if (fullScreenEnabled) {\r\n createjs_1.default.Ticker.paused = true;\r\n this.handleResizeDebounced();\r\n var container = this.container;\r\n var requestFullScreen = container.requestFullscreen ||\r\n container.mozRequestFullScreen ||\r\n container.msRequestFullscreen ||\r\n container.webkitRequestFullscreen;\r\n var exitFullScreen = document.exitFullscreen ||\r\n document.mozCancelFullScreen ||\r\n document.msExitFullscreen ||\r\n document.webkitExitFullscreen;\r\n if (this.fullScreen) {\r\n exitFullScreen.call(document);\r\n }\r\n else {\r\n requestFullScreen.call(container);\r\n }\r\n }\r\n };\r\n CanvasPlayer.prototype.isFullscreen = function () {\r\n return this.fullScreen;\r\n };\r\n CanvasPlayer.prototype.isCC = function () {\r\n return this.enableCC;\r\n };\r\n CanvasPlayer.prototype.getProgress = function () {\r\n return this.progress;\r\n };\r\n CanvasPlayer.prototype.goToScene = function (scene) {\r\n var sceneId = typeof scene !== \"string\" ? scene.id : scene;\r\n var dynamicScene = this.exportRoot.dynamicScenes.filter(function (dynamicScene) {\r\n return dynamicScene.id === sceneId;\r\n })[0];\r\n if (!dynamicScene) {\r\n return;\r\n }\r\n this.goToFrame(dynamicScene.startFrame);\r\n };\r\n CanvasPlayer.prototype.reflow = function (sceneList, options) {\r\n if (!sceneList || sceneList.length === 0) {\r\n throw new Error(\"No scenelist provided!\");\r\n }\r\n this.options.dynamicTimeline = sceneList;\r\n this.loadChildrenLibraries();\r\n this.exportRoot.stop();\r\n // Recapture captions and descriptions\r\n this.captions = [];\r\n this.descriptions = [];\r\n this.captionGrabCompleted = false;\r\n this.descriptionGrabCompleted = false;\r\n // Initialize the ExportRoot\r\n this.initExportRoot();\r\n // This removes the previous ExportRoot from the stage and adds\r\n // the newly created one\r\n this.stage.removeAllChildren();\r\n this.stage.addChild(this.exportRoot);\r\n this.exportRoot.stop();\r\n this.updateStage();\r\n // If both scene and frameNums are provided then jumping to the specified scene\r\n // takes priority\r\n if (options) {\r\n if (options.scene) {\r\n this.goToScene(options.scene);\r\n }\r\n else if (options.frameNum) {\r\n this.goToFrame(options.frameNum);\r\n }\r\n }\r\n this.dispatchEvent(\"canplay\");\r\n };\r\n CanvasPlayer.prototype.canAutoPlay = function () {\r\n if (this.isIOS && this.iosFixed) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n CanvasPlayer.prototype.getAudioById = function (id) {\r\n var this$1 = this;\r\n\r\n for (var i = 0; i < this.audioClips.length; i++) {\r\n var clip = this$1.audioClips[i];\r\n if (clip.id === id) {\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n CanvasPlayer.prototype.generateLibForDynamicTimelines = function (children, sceneIds) {\r\n var fps = children[0].properties.fps;\r\n for (var i = 0, l = children.length; i < l; i++) {\r\n if (children[i].properties.fps !== fps) {\r\n throw new Error(\"Scene \\\"\".concat(sceneIds[i], \"\\\" has a different fps: \").concat(children[i].properties.fps));\r\n }\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-this-alias\r\n var cp = this;\r\n var newLibrary = {\r\n properties: {\r\n width: 1920,\r\n height: 1080,\r\n fps: fps,\r\n color: \"#FFFFFF\",\r\n opacity: 1.0,\r\n manifest: children.reduce(function (manifest, child) {\r\n return manifest.concat(child.properties.manifest);\r\n }, []),\r\n },\r\n main: function (mode, startPosition, loop) {\r\n var this$1 = this;\r\n\r\n var _this = this;\r\n this.initialize(mode, startPosition, loop, {});\r\n var childClips = [];\r\n var currentFrame = 0;\r\n var totalDuration = 0;\r\n this.dynamicLabels = [];\r\n this._updateTimeline = function (rawPosition, jump) {\r\n var tl = this.timeline;\r\n if (rawPosition < 0) {\r\n rawPosition = 0;\r\n }\r\n if (this._rawPosition === rawPosition) {\r\n return;\r\n }\r\n this._rawPosition = rawPosition;\r\n // update timeline position, ignoring actions if this is a graphic.\r\n tl.loop = this.loop; // TODO: should we maintain this on MovieClip, or just have it on timeline?\r\n tl.setPosition(rawPosition, !this.actionsEnabled, jump, this._bound_resolveState);\r\n for (var i = 0; i < children.length; i++) {\r\n var childClip = childClips[i];\r\n childClip._updateTimeline(rawPosition - childClip.startFrame, jump);\r\n }\r\n };\r\n for (var i = 0; i < children.length; i++) {\r\n var C = CanvasPlayer.getExportRoot(children[i]);\r\n var childClip = new C(\"independent\", 0, 0);\r\n childClip.parent = this$1;\r\n childClips.push(childClip);\r\n childClip.startFrame = currentFrame;\r\n Object.defineProperty(childClip, \"_off\", {\r\n get: function () {\r\n return this.__off;\r\n },\r\n set: function (v) {\r\n this.__off = v;\r\n if (this.__off && Interfaces.isEnhancedRootMovieClip(this)) {\r\n this.clearAllSoundStreams();\r\n }\r\n },\r\n });\r\n childClip.stop = function () {\r\n cp.pause();\r\n };\r\n childClip.play = function () {\r\n cp.play();\r\n };\r\n fakeSynced(childClip, currentFrame);\r\n currentFrame += childClip.duration;\r\n totalDuration += childClip.duration;\r\n }\r\n var _loop_1 = function (i) {\r\n var childClip = childClips[i];\r\n var tween = createjs_1.default.Tween.get(childClip);\r\n var endTime = childClip.startFrame + childClip.duration;\r\n if (i > 0) {\r\n childClip._off = true;\r\n tween.to({ _off: false }, childClip.startFrame);\r\n }\r\n else {\r\n childClip._off = false;\r\n }\r\n if (totalDuration - endTime <= 0) {\r\n tween.wait(childClip.duration);\r\n }\r\n else {\r\n tween.to({ _off: true }, childClip.duration);\r\n tween.wait(totalDuration - endTime);\r\n }\r\n childClip.dynamicLabels = childClip.labels.map(function (label) { return (__assign(__assign({}, label), { position: childClip.startFrame + label.position })); });\r\n this_1.timeline.addTween(tween);\r\n this_1.dynamicLabels = __spreadArray(__spreadArray([], this_1.dynamicLabels, true), childClip.dynamicLabels, true);\r\n };\r\n var this_1 = this;\r\n for (var i = 0; i < children.length; i++) {\r\n _loop_1(i);\r\n }\r\n this.dynamicScenes = [];\r\n childClips.forEach(function (childClip, index) {\r\n _this.dynamicScenes.push({\r\n id: sceneIds[index],\r\n startFrame: childClip.startFrame,\r\n duration: childClip.duration,\r\n inst: childClip,\r\n });\r\n });\r\n this.stop = function () {\r\n createjs_1.default.MovieClip.prototype.stop.call(_this);\r\n childClips.forEach(function (c) {\r\n if (Interfaces.isEnhancedRootMovieClip(c))\r\n { c.clearAllSoundStreams(); }\r\n });\r\n };\r\n this.gotoAndStop = function (positionOrLabel) {\r\n createjs_1.default.MovieClip.prototype.gotoAndStop.call(_this, positionOrLabel);\r\n childClips.forEach(function (c) {\r\n if (Interfaces.isEnhancedRootMovieClip(c))\r\n { c.clearAllSoundStreams(); }\r\n });\r\n };\r\n this.play = function () {\r\n childClips.forEach(function (c) {\r\n if (Interfaces.isEnhancedRootMovieClip(c)) {\r\n c.clearAllSoundStreams();\r\n c.startStreamSoundsForTargetedFrame(_this.currentFrame - c.startFrame);\r\n }\r\n });\r\n createjs_1.default.MovieClip.prototype.play.call(_this);\r\n };\r\n this.gotoAndPlay = function (positionOrLabel) {\r\n var pos = _this.timeline.resolve(positionOrLabel);\r\n if (pos != null) {\r\n childClips.forEach(function (c) {\r\n if (Interfaces.isEnhancedRootMovieClip(c)) {\r\n c.clearAllSoundStreams();\r\n c.startStreamSoundsForTargetedFrame(pos - c.startFrame);\r\n }\r\n });\r\n }\r\n createjs_1.default.MovieClip.prototype.gotoAndPlay.call(_this, positionOrLabel);\r\n };\r\n this.handleSoundTick = function () {\r\n childClips.forEach(function (c) {\r\n if (c._off)\r\n { return; }\r\n if (Interfaces.isEnhancedRootMovieClip(c)) {\r\n c.stopSoundStreams(c.currentFrame);\r\n }\r\n });\r\n };\r\n },\r\n };\r\n newLibrary.main.prototype = new createjs_1.default.MovieClip();\r\n return newLibrary;\r\n };\r\n CanvasPlayer.getExportRoot = function (childLibrary) {\r\n var rootName = CanvasPlayer.getRootName(childLibrary);\r\n return childLibrary[rootName];\r\n };\r\n CanvasPlayer.getRootName = function (childLibrary) {\r\n var libKeys = Object.keys(childLibrary);\r\n return libKeys[libKeys.length - 3];\r\n };\r\n CanvasPlayer.loadAnimation = function (url, modName) {\r\n var base = document.baseURI;\r\n var newURL = new URL(url, base);\r\n url = newURL.href;\r\n var scriptSrc = newURL.href;\r\n if (animationCache[modName]) {\r\n return Promise.resolve(animationCache[modName]);\r\n }\r\n return new Promise(function (resolve) {\r\n var script = document.createElement(\"script\");\r\n script.src = scriptSrc;\r\n script.onload = function () { return setTimeout(function () {\r\n // eslint-disable-next-line @typescript-eslint/no-var-requires\r\n var animation = require(modName).default;\r\n animationCache[modName] = animation;\r\n var library = animation.composition.getLibrary();\r\n library.properties.manifest.forEach(function (item) {\r\n var newURL = new URL(item.src, url);\r\n item.src = newURL.href;\r\n });\r\n resolve(animation);\r\n }); };\r\n document.head.appendChild(script);\r\n });\r\n };\r\n return CanvasPlayer;\r\n}(createjs_1.default.EventDispatcher));\r\nexports.CanvasPlayer = CanvasPlayer;\r\nCanvasPlayer.TIMING = {\r\n RAF: \"raf\",\r\n RAF_SYNCHED: \"synched\",\r\n TIMEOUT: \"timeout\",\r\n};\r\n__exportStar(require(\"./interfaces\"), exports);\r\nexports.default = CanvasPlayer;\r\n//# sourceMappingURL=index.js.map\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/formatting/src/text-formatting-fr.js\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar TextFormatterFrench = /** @class */ (function () {\r\n function TextFormatterFrench() {\r\n }\r\n TextFormatterFrench.prototype.roundNumber = function (n, decPlaces) {\r\n return Number(Math.round(Number(n + \"e\" + decPlaces)) + (\"e-\" + decPlaces));\r\n };\r\n /**\r\n * Adds trailing zeroes to a string that contains a number.\r\n * @param numStr Input string that needs to be formatted.\r\n * @param decPlaces Number of decimal places that the output should be rounded to.\r\n */\r\n TextFormatterFrench.prototype.addTrailingZeroes = function (numStr, decPlaces) {\r\n for (var i = 0; i < decPlaces; ++i) {\r\n numStr += \"0\";\r\n }\r\n return numStr;\r\n };\r\n /**\r\n * Parses a string and converts it to a floating-point number (passed through parseFloat()).\r\n * @param str String containing a number.\r\n * @returns Floating-point number.\r\n */\r\n TextFormatterFrench.prototype.parseNumber = function (str) {\r\n var sanitizedInput = str.replace(/,/g, \".\").replace(/[^-\\.0-9]+/g, \"\");\r\n return parseFloat(sanitizedInput);\r\n };\r\n /**\r\n * Formats the number provided as an input based on the provided options.\r\n * @param n Number to be formatted.\r\n * @param options Formatting options. Valid options are as follows:\r\n * - type: (optional) Valid values are \"number\" | \"currency\" | \"percentage\".\r\n * - lang: (optional) Language code. Default languages are English (\"en\") and French (\"fr\").\r\n * - decPlaces: (optional) Number of decimal places that the output should be rounded to.\r\n * - currencySymbol: (optional) The currency symbol to be used in the output.\r\n */\r\n TextFormatterFrench.prototype.format = function (n, options) {\r\n var _this = this;\r\n // If `n` is a string, call parseNumber on it.\r\n if (typeof n === \"string\") {\r\n n = this.parseNumber(n);\r\n }\r\n if (isNaN(n)) {\r\n throw new Error(\"format() - Illegal argument: Expected a number, received \" + typeof n + \".\");\r\n }\r\n var _formatNumber = function (n, options) {\r\n var formattedNumber = \"\";\r\n if (typeof options.decPlaces === \"undefined\") {\r\n var decPointIndex = n.toString().indexOf(\".\");\r\n if (decPointIndex > -1) {\r\n options.decPlaces = n.toString().length - decPointIndex - 1;\r\n n = _this.roundNumber(n, options.decPlaces);\r\n }\r\n }\r\n else {\r\n n = _this.roundNumber(n, options.decPlaces);\r\n }\r\n var numStr = n.toString();\r\n // Keep negative sign if number is negative\r\n // TODO: Financial negative number notation? e.g. (123)\r\n if (n < 0) {\r\n formattedNumber += \"-\";\r\n numStr = numStr.slice(1);\r\n }\r\n // Get the integer part\r\n var decimalIndex = numStr.indexOf(\".\");\r\n var integerPart = decimalIndex > -1 ? numStr.slice(0, decimalIndex) : numStr;\r\n var integerPartLength = integerPart.length;\r\n // Add thousand separators, if needed\r\n if (integerPartLength > 3) {\r\n var integerPartDigits = integerPart.split(\"\").reverse();\r\n integerPart = integerPartDigits\r\n .reduce(function (digits, currentDigit, currentIndex) {\r\n if (currentIndex > 0 && currentIndex % 3 === 0) {\r\n digits.push(\" \");\r\n }\r\n digits.push(currentDigit);\r\n return digits;\r\n }, [])\r\n .reverse()\r\n .join(\"\");\r\n }\r\n formattedNumber += integerPart;\r\n // Add decimal point and the fractional part, if appropriate.\r\n if (options.decPlaces) {\r\n if (decimalIndex > -1) {\r\n var fractionalPart = numStr.slice(decimalIndex);\r\n formattedNumber += fractionalPart;\r\n formattedNumber = formattedNumber.replace(\".\", \",\");\r\n if (fractionalPart.slice(1).length < options.decPlaces) {\r\n // Add trailing zeroes.\r\n formattedNumber = _this.addTrailingZeroes(formattedNumber, options.decPlaces - fractionalPart.slice(1).length);\r\n }\r\n }\r\n else {\r\n // Add trailing zeroes.\r\n formattedNumber += \",\";\r\n formattedNumber = _this.addTrailingZeroes(formattedNumber, options.decPlaces);\r\n }\r\n }\r\n return formattedNumber;\r\n };\r\n var _formatCurrency = function (n, options) {\r\n var defaultCurrencySymbol = \"$\";\r\n var formattedNumber = _formatNumber(n, options);\r\n if (options.currencySymbol) {\r\n formattedNumber = formattedNumber + \" \" + options.currencySymbol;\r\n }\r\n else {\r\n formattedNumber = formattedNumber + \" \" + defaultCurrencySymbol;\r\n }\r\n return formattedNumber;\r\n };\r\n var _formatPercentage = function (n, options) {\r\n var formattedNumber = _formatNumber(n, options);\r\n formattedNumber = formattedNumber + \" %\";\r\n return formattedNumber;\r\n };\r\n var formatter = {\r\n number: _formatNumber,\r\n currency: _formatCurrency,\r\n percentage: _formatPercentage,\r\n };\r\n var formattedNumber = \"\";\r\n if (options.type) {\r\n formattedNumber = formatter[options.type](n, options);\r\n }\r\n // Default to number\r\n else {\r\n formattedNumber = formatter[\"number\"](n, options);\r\n }\r\n return formattedNumber;\r\n };\r\n /**\r\n * Convenience function. Equivalent to calling [[format]] with `options.type = \"number\"`\r\n * @param n Number to be formatted.\r\n * @param options Formatting options. See [[format]] for details.\r\n */\r\n TextFormatterFrench.prototype.formatNumber = function (n, options) {\r\n if (options) {\r\n options.type = \"number\";\r\n }\r\n return this.format(n, options || { type: \"number\", lang: \"fr\" });\r\n };\r\n /**\r\n * Convenience function. Equivalent to calling [[format]] with `options.type = \"currency\"`\r\n * @param n Number to be formatted.\r\n * @param options Formatting options. See [[format]] for details.\r\n */\r\n TextFormatterFrench.prototype.formatCurrency = function (n, options) {\r\n if (options) {\r\n options.type = \"currency\";\r\n }\r\n return this.format(n, options || { type: \"currency\", lang: \"fr\" });\r\n };\r\n /**\r\n * Convenience function. Equivalent to calling [[format]] with `options.type = \"percentage\"`\r\n * @param n Number to be formatted.\r\n * @param options Formatting options. See [[format]] for details.\r\n */\r\n TextFormatterFrench.prototype.formatPercentage = function (n, options) {\r\n if (options) {\r\n options.type = \"percentage\";\r\n }\r\n return this.format(n, options || { type: \"percentage\", lang: \"fr\" });\r\n };\r\n return TextFormatterFrench;\r\n}());\r\nexports.default = TextFormatterFrench;\r\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy90ZXh0LWZvcm1hdHRpbmctZnIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUE7SUFBQTtJQXdLQSxDQUFDO0lBdktXLHlDQUFXLEdBQW5CLFVBQW9CLENBQVMsRUFBRSxTQUFpQjtRQUM1QyxPQUFPLE1BQU0sQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLE1BQU0sQ0FBSSxDQUFDLFNBQUksU0FBVyxDQUFDLENBQUMsSUFBRyxPQUFLLFNBQVcsQ0FBQSxDQUFDLENBQUM7SUFDOUUsQ0FBQztJQUNEOzs7O09BSUc7SUFDSywrQ0FBaUIsR0FBekIsVUFBMEIsTUFBYyxFQUFFLFNBQWlCO1FBQ3ZELEtBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxTQUFTLEVBQUUsRUFBRSxDQUFDLEVBQUU7WUFDaEMsTUFBTSxJQUFJLEdBQUcsQ0FBQztTQUNqQjtRQUNELE9BQU8sTUFBTSxDQUFDO0lBQ2xCLENBQUM7SUFDRDs7OztPQUlHO0lBQ0kseUNBQVcsR0FBbEIsVUFBbUIsR0FBVztRQUMxQixJQUFNLGNBQWMsR0FBRyxHQUFHLENBQUMsT0FBTyxDQUFDLElBQUksRUFBRSxHQUFHLENBQUMsQ0FBQyxPQUFPLENBQUMsYUFBYSxFQUFFLEV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pO1xyXG4gICAgICAgICAgICAgICAgaWYgKGRlY1BvaW50SW5kZXggPiAtMSkge1xyXG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMuZGVjUGxhY2VzID0gbi50b1N0cmluZygpLmxlbmd0aCAtIGRlY1BvaW50SW5kZXggLSAxO1xyXG4gICAgICAgICAgICAgICAgICAgIG4gPSB0aGlzLnJvdW5kTnVtYmVyKG4sIG9wdGlvbnMuZGVjUGxhY2VzKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIG4gPSB0aGlzLnJvdW5kTnVtYmVyKG4sIG9wdGlvbnMuZGVjUGxhY2VzKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBsZXQgbnVtU3RyID0gbi50b1N0cmluZygpO1xyXG4gICAgICAgICAgICAvLyBLZWVwIG5lZ2F0aXZlIHNpZ24gaWYgbnVtYmVyIGlzIG5lZ2F0aXZlXHJcbiAgICAgICAgICAgIC8vIFRPRE86IEZpbmFuY2lhbCBuZWdhdGl2ZSBudW1iZXIgbm90YXRpb24/IGUuZy4gKDEyMylcclxuICAgICAgICAgICAgaWYgKG4gPCAwKSB7XHJcbiAgICAgICAgICAgICAgICBmb3JtYXR0ZWROdW1iZXIgKz0gXCItXCI7XHJcbiAgICAgICAgICAgICAgICBudW1TdHIgPSBudW1TdHIuc2xpY2UoMSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgLy8gR2V0IHRoZSBpbnRlZ2VyIHBhcnRcclxuICAgICAgICAgICAgY29uc3QgZGVjaW1hbEluZGV4ID0gbnVtU3RyLmluZGV4T2YoXCIuXCIpO1xyXG4gICAgICAgICAgICBsZXQgaW50ZWdlclBhcnQ6IHN0cmluZyA9IGRlY2ltYWxJbmRleCA+IC0xID8gbnVtU3RyLnNsaWNlKDAsIGRlY2ltYWxJbmRleCkgOiBudW1TdHI7XHJcbiAgICAgICAgICAgIGNvbnN0IGludGVnZXJQYXJ0TGVuZ3RoID0gaW50ZWdlclBhcnQubGVuZ3RoO1xyXG5cclxuICAgICAgICAgICAgLy8gQWRkIHRob3VzYW5kIHNlcGFyYXRvcnMsIGlmIG5lZWRlZFxyXG4gICAgICAgICAgICBpZiAoaW50ZWdlclBhcnRMZW5ndGggPiAzKSB7XHJcbiAgICAgICAgICAgICAgICBjb25zdCBpbnRlZ2VyUGFydERpZ2l0cyA9IGludGVnZXJQYXJ0LnNwbGl0KFwiXCIpLnJldmVyc2UoKTtcclxuICAgICAgICAgICAgICAgIGludGVnZXJQYXJ0ID0gaW50ZWdlclBhcnREaWdpdHNcclxuICAgICAgICAgICAgICAgICAgICAucmVkdWNlKChkaWdpdHMsIGN1cnJlbnREaWdpdCwgY3VycmVudEluZGV4KSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjdXJyZW50SW5kZXggPiAwICYmIGN1cnJlbnRJbmRleCAlIDMgPT09IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpZ2l0cy5wdXNoKFwiIFwiKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBkaWdpdHMucHVzaChjdXJyZW50RGlnaXQpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGlnaXRzO1xyXG4gICAgICAgICAgICAgICAgICAgIH0sIFtdKVxyXG4gICAgICAgICAgICAgICAgICAgIC5yZXZlcnNlKClcclxuICAgICAgICAgICAgICAgICAgICAuam9pbihcIlwiKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBmb3JtYXR0ZWROdW1iZXIgKz0gaW50ZWdlclBhcnQ7XHJcbiAgICAgICAgICAgIC8vIEFkZCBkZWNpbWFsIHBvaW50IGFuZCB0aGUgZnJhY3Rpb25hbCBwYXJ0LCBpZiBhcHByb3ByaWF0ZS5cclxuICAgICAgICAgICAgaWYgKG9wdGlvbnMuZGVjUGxhY2VzKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoZGVjaW1hbEluZGV4ID4gLTEpIHtcclxuICAgICAgICAgICAgICAgICAgICBjb25zdCBmcmFjdGlvbmFsUGFydCA9IG51bVN0ci5zbGljZShkZWNpbWFsSW5kZXgpO1xyXG4gICAgICAgICAgICAgICAgICAgIGZvcm1hdHRlZE51bWJlciArPSBmcmFjdGlvbmFsUGFydDtcclxuICAgICAgICAgICAgICAgICAgICBmb3JtYXR0ZWROdW1iZXIgPSBmb3JtYXR0ZWROdW1iZXIucmVwbGFjZShcIi5cIiwgXCIsXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChmcmFjdGlvbmFsUGFydC5zbGljZSgxKS5sZW5ndGggPCBvcHRpb25zLmRlY1BsYWNlcykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBBZGQgdHJhaWxpbmcgemVyb2VzLlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3JtYXR0ZWROdW1iZXIgPSB0aGlzLmFkZFRyYWlsaW5nWmVyb2VzKFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybWF0dGVkTnVtYmVyLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5kZWNQbGFjZXMgLSBmcmFjdGlvbmFsUGFydC5zbGljZSgxKS5sZW5ndGgsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAvLyBBZGQgdHJhaWxpbmcgemVyb2VzLlxyXG4gICAgICAgICAgICAgICAgICAgIGZvcm1hdHRlZE51bWJlciArPSBcIixcIjtcclxuICAgICAgICAgICAgICAgICAgICBmb3JtYXR0ZWROdW1iZXIgPSB0aGlzLmFkZFRyYWlsaW5nWmVyb2VzKGZvcm1hdHRlZE51bWJlciwgb3B0aW9ucy5kZWNQbGF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4gICAgICogQHBhcmFtIG4gTnVtYmVyIHRvIGJlIGZvcm1hdHRlZC5cclxuICAgICAqIEBwYXJhbSBvcHRpb25zIEZvcm1hdHRpbmcgb3B0aW9ucy4gU2VlIFtbZm9ybWF0XV0gZm9yIGRldGFpbHMuXHJcbiAgICAgKi9cclxuICAgIHB1YmxpYyBmb3JtYXRQZXJjZW50YWdlKG46IG51bWJlciwgb3B0aW9ucz86IFRleHRGb3JtYXRPcHRpb25zKTogc3RyaW5nIHtcclxuICAgICAgICBpZiAob3B0aW9ucykge1xyXG4gICAgICAgICAgICBvcHRpb25zLnR5cGUgPSBcInBlcmNlbnRhZ2VcIjtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuZm9ybWF0KG4sIG9wdGlvbnMgfHwgeyB0eXBlOiBcInBlcmNlbnRhZ2VcIiwgbGFuZzogXCJmclwiIH0pO1xyXG4gICAgfVxyXG59XHJcbiJdfQ==\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/formatting/src/text-formatting-en.js\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Make a common interface. Each language should have a class that implements the interface. For registering a new language, create a new class for the language and pass it to the register function.\r\n */\r\nvar TextFormatterEnglish = /** @class */ (function () {\r\n function TextFormatterEnglish() {\r\n }\r\n TextFormatterEnglish.prototype.roundNumber = function (n, decPlaces) {\r\n return Number(Math.round(Number(n + \"e\" + decPlaces)) + (\"e-\" + decPlaces));\r\n };\r\n /**\r\n * Adds trailing zeroes to a string that contains a number.\r\n * @param numStr Input string that needs to be formatted.\r\n * @param decPlaces Number of decimal places that the output should be rounded to.\r\n */\r\n TextFormatterEnglish.prototype.addTrailingZeroes = function (numStr, decPlaces) {\r\n for (var i = 0; i < decPlaces; ++i) {\r\n numStr += \"0\";\r\n }\r\n return numStr;\r\n };\r\n /**\r\n * Parses a string and converts it to a floating-point number (passed through parseFloat()).\r\n * @param str String containing a number.\r\n * @returns Floating-point number.\r\n */\r\n TextFormatterEnglish.prototype.parseNumber = function (str) {\r\n var sanitizedInput = str.replace(/[^-\\.0-9]+/g, \"\");\r\n return parseFloat(sanitizedInput);\r\n };\r\n /**\r\n * Formats the number provided as an input based on the provided options.\r\n * @param n Number to be formatted.\r\n * @param options Formatting options. Valid options are as follows:\r\n * - type: (optional) Valid values are \"number\" | \"currency\" | \"percentage\".\r\n * - lang: (optional) Language code. Default languages are English (\"en\") and French (\"fr\").\r\n * - decPlaces: (optional) Number of decimal places the output should be rounded to.\r\n * - currencySymbol: (optional) The currency symbol to be used in the output.\r\n */\r\n TextFormatterEnglish.prototype.format = function (n, options) {\r\n var _this = this;\r\n // If `n` is a string, call parseNumber on it.\r\n if (typeof n === \"string\") {\r\n n = this.parseNumber(n);\r\n }\r\n if (isNaN(n)) {\r\n throw new Error(\"format() - Illegal argument: Expected a number, received \" + typeof n + \".\");\r\n }\r\n var _formatNumber = function (n, options) {\r\n var formattedNumber = \"\";\r\n if (typeof options.decPlaces === \"undefined\") {\r\n var decPointIndex = n.toString().indexOf(\".\");\r\n if (decPointIndex > -1) {\r\n options.decPlaces = n.toString().length - decPointIndex - 1;\r\n n = _this.roundNumber(n, options.decPlaces);\r\n }\r\n }\r\n else {\r\n n = _this.roundNumber(n, options.decPlaces);\r\n }\r\n var numStr = n.toString();\r\n // Keep negative sign if number is negative\r\n // TODO: Financial negative number notation? e.g. (123)\r\n if (n < 0) {\r\n formattedNumber += \"-\";\r\n numStr = numStr.slice(1);\r\n }\r\n // Get the integer part\r\n var decimalIndex = numStr.indexOf(\".\");\r\n var integerPart = decimalIndex > -1 ? numStr.slice(0, decimalIndex) : numStr;\r\n var integerPartLength = integerPart.length;\r\n // Add thousand separators, if needed\r\n if (integerPartLength > 3) {\r\n var integerPartDigits = integerPart.split(\"\").reverse();\r\n integerPart = integerPartDigits\r\n .reduce(function (digits, currentDigit, currentIndex) {\r\n if (currentIndex > 0 && currentIndex % 3 === 0) {\r\n digits.push(\",\");\r\n }\r\n digits.push(currentDigit);\r\n return digits;\r\n }, [])\r\n .reverse()\r\n .join(\"\");\r\n }\r\n formattedNumber += integerPart;\r\n // Add decimal point and the fractional part, if appropriate.\r\n if (options.decPlaces) {\r\n if (decimalIndex > -1) {\r\n var fractionalPart = numStr.slice(decimalIndex);\r\n formattedNumber += fractionalPart;\r\n if (fractionalPart.slice(1).length < options.decPlaces) {\r\n // Add trailing zeroes.\r\n formattedNumber = _this.addTrailingZeroes(formattedNumber, options.decPlaces - fractionalPart.slice(1).length);\r\n }\r\n }\r\n else {\r\n // Add trailing zeroes.\r\n formattedNumber += \".\";\r\n formattedNumber = _this.addTrailingZeroes(formattedNumber, options.decPlaces);\r\n }\r\n }\r\n return formattedNumber;\r\n };\r\n var _formatCurrency = function (n, options) {\r\n var defaultCurrencySymbol = \"$\";\r\n var formattedNumber = _formatNumber(n, options);\r\n if (options.currencySymbol) {\r\n formattedNumber = options.currencySymbol + formattedNumber;\r\n }\r\n else {\r\n formattedNumber = defaultCurrencySymbol + formattedNumber;\r\n }\r\n return formattedNumber;\r\n };\r\n var _formatPercentage = function (n, options) {\r\n var formattedNumber = _formatNumber(n, options);\r\n formattedNumber = formattedNumber + \"%\";\r\n return formattedNumber;\r\n };\r\n var formatter = {\r\n number: _formatNumber,\r\n currency: _formatCurrency,\r\n percentage: _formatPercentage,\r\n };\r\n var formattedNumber = \"\";\r\n if (options.type) {\r\n formattedNumber = formatter[options.type](n, options);\r\n }\r\n // Default to number\r\n else {\r\n formattedNumber = formatter[\"number\"](n, options);\r\n }\r\n return formattedNumber;\r\n };\r\n /**\r\n * Convenience function. Equivalent to calling [[format]] with `options.type = \"number\"`\r\n * @param n Number to be formatted.\r\n * @param options Formatting options. See [[format]] for details.\r\n */\r\n TextFormatterEnglish.prototype.formatNumber = function (n, options) {\r\n if (options) {\r\n options.type = \"number\";\r\n }\r\n return this.format(n, options || { type: \"number\", lang: \"en\" });\r\n };\r\n /**\r\n * Convenience function. Equivalent to calling [[format]] with `options.type = \"currency\"`\r\n * @param n Number to be formatted.\r\n * @param options Formatting options. See [[format]] for details.\r\n */\r\n TextFormatterEnglish.prototype.formatCurrency = function (n, options) {\r\n if (options) {\r\n options.type = \"currency\";\r\n }\r\n return this.format(n, options || { type: \"currency\", lang: \"en\" });\r\n };\r\n /**\r\n * Convenience function. Equivalent to calling [[format]] with `options.type = \"percentage\"`\r\n * @param n Number to be formatted.\r\n * @param options Formatting options. See [[format]] for details.\r\n */\r\n TextFormatterEnglish.prototype.formatPercentage = function (n, options) {\r\n if (options) {\r\n options.type = \"percentage\";\r\n }\r\n return this.format(n, options || { type: \"percentage\", lang: \"en\" });\r\n };\r\n return TextFormatterEnglish;\r\n}());\r\nexports.default = TextFormatterEnglish;\r\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy90ZXh0LWZvcm1hdHRpbmctZW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0E7O0dBRUc7QUFFSDtJQUFBO0lBcUtBLENBQUM7SUFwS1csMENBQVcsR0FBbkIsVUFBb0IsQ0FBUyxFQUFFLFNBQWlCO1FBQzVDLE9BQU8sTUFBTSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsTUFBTSxDQUFJLENBQUMsU0FBSSxTQUFXLENBQUMsQ0FBQyxJQUFHLE9BQUssU0FBVyxDQUFBLENBQUMsQ0FBQztJQUM5RSxDQUFDO0lBQ0Q7Ozs7T0FJRztJQUNLLGdEQUFpQixHQUF6QixVQUEwQixNQUFjLEVBQUUsU0FBaUI7UUFDdkQsS0FBSyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLFNBQVMsRUFBRSxFQUFFLENBQUMsRUFBRTtZQUNoQyxNQUFNLElBQUksR0FBRyxDQUFDO1NBQ2pCO1FBQ0QsT0FBTyxNQUFNLENBQUM7SUFDbEIsQ0FBQztJQUNEO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cHRpb25zPzogVGV4dEZvcm1hdE9wdGlvbnMpOiBzdHJpbmcgPT4ge1xyXG4gICAgICAgICAgICBsZXQgZm9ybWF0dGVkTnVtYmVyID0gXCJcIjtcclxuICAgICAgICAgICAgaWYgKHR5cGVvZiBvcHRpb25zLmRlY1BsYWNlcyA9PT0gXCJ1bmRlZmluZWRcIikge1xyXG4gICAgICAgICAgICAgICAgY29uc3QgZGVjUG9pbnRJbmRleCA9IG4udG9TdHJpbmcoKS5pbmRleE9mKFwiLlwiKTtcclxuICAgICAgICAgICAgICAgIGlmIChkZWNQb2ludEluZGV4ID4gLTEpIHtcclxuICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmRlY1BsYWNlcyA9IG4udG9TdHJpbmcoKS5sZW5ndGggLSBkZWNQb2ludEluZGV4IC0gMTtcclxuICAgICAgICAgICAgICAgICAgICBuID0gdGhpcy5yb3VuZE51bWJlcihuLCBvcHRpb25zLmRlY1BsYWNlcyk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBuID0gdGhpcy5yb3VuZE51bWJlcihuLCBvcHRpb25zLmRlY1BsYWNlcyk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgbGV0IG51bVN0ciA9IG4udG9TdHJpbmcoKTtcclxuICAgICAgICAgICAgLy8gS2VlcCBuZWdhdGl2ZSBzaWduIGlmIG51bWJlciBpcyBuZWdhdGl2ZVxyXG4gICAgICAgICAgICAvLyBUT0RPOiBGaW5hbmNpYWwgbmVnYXRpdmUgbnVtYmVyIG5vdGF0aW9uPyBlLmcuICgxMjMpXHJcbiAgICAgICAgICAgIGlmIChuIDwgMCkge1xyXG4gICAgICAgICAgICAgICAgZm9ybWF0dGVkTnVtYmVyICs9IFwiLVwiO1xyXG4gICAgICAgICAgICAgICAgbnVtU3RyID0gbnVtU3RyLnNsaWNlKDEpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIC8vIEdldCB0aGUgaW50ZWdlciBwYXJ0XHJcbiAgICAgICAgICAgIGNvbnN0IGRlY2ltYWxJbmRleCA9IG51bVN0ci5pbmRleE9mKFwiLlwiKTtcclxuICAgICAgICAgICAgbGV0IGludGVnZXJQYXJ0OiBzdHJpbmcgPSBkZWNpbWFsSW5kZXggPiAtMSA/IG51bVN0ci5zbGljZSgwLCBkZWNpbWFsSW5kZXgpIDogbnVtU3RyO1xyXG4gICAgICAgICAgICBjb25zdCBpbnRlZ2VyUGFydExlbmd0aCA9IGludGVnZXJQYXJ0Lmxlbmd0aDtcclxuXHJcbiAgICAgICAgICAgIC8vIEFkZCB0aG91c2FuZCBzZXBhcmF0b3JzLCBpZiBuZWVkZWRcclxuICAgICAgICAgICAgaWYgKGludGVnZXJQYXJ0TGVuZ3RoID4gMykge1xyXG4gICAgICAgICAgICAgICAgY29uc3QgaW50ZWdlclBhcnREaWdpdHMgPSBpbnRlZ2VyUGFydC5zcGxpdChcIlwiKS5yZXZlcnNlKCk7XHJcbiAgICAgICAgICAgICAgICBpbnRlZ2VyUGFydCA9IGludGVnZXJQYXJ0RGlnaXRzXHJcbiAgICAgICAgICAgICAgICAgICAgLnJlZHVjZSgoZGlnaXRzLCBjdXJyZW50RGlnaXQsIGN1cnJlbnRJbmRleCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY3VycmVudEluZGV4ID4gMCAmJiBjdXJyZW50SW5kZXggJSAzID09PSAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaWdpdHMucHVzaChcIixcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgZGlnaXRzLnB1c2goY3VycmVudERpZ2l0KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRpZ2l0cztcclxuICAgICAgICAgICAgICAgICAgICB9LCBbXSlcclxuICAgICAgICAgICAgICAgICAgICAucmV2ZXJzZSgpXHJcbiAgICAgICAgICAgICAgICAgICAgLmpvaW4oXCJcIik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZm9ybWF0dGVkTnVtYmVyICs9IGludGVnZXJQYXJ0O1xyXG4gICAgICAgICAgICAvLyBBZGQgZGVjaW1hbCBwb2ludCBhbmQgdGhlIGZyYWN0aW9uYWwgcGFydCwgaWYgYXBwcm9wcmlhdGUuXHJcbiAgICAgICAgICAgIGlmIChvcHRpb25zLmRlY1BsYWNlcykge1xyXG4gICAgICAgICAgICAgICAgaWYgKGRlY2ltYWxJbmRleCA+IC0xKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZnJhY3Rpb25hbFBhcnQgPSBudW1TdHIuc2xpY2UoZGVjaW1hbEluZGV4KTtcclxuICAgICAgICAgICAgICAgICAgICBmb3JtYXR0ZWROdW1iZXIgKz0gZnJhY3Rpb25hbFBhcnQ7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGZyYWN0aW9uYWxQYXJ0LnNsaWNlKDEpLmxlbmd0aCA8IG9wdGlvbnMuZGVjUGxhY2VzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIEFkZCB0cmFpbGluZyB6ZXJvZXMuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1hdHRlZE51bWJlciA9IHRoaXMuYWRkVHJhaWxpbmdaZXJvZXMoXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtYXR0ZWROdW1iZXIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmRlY1BsYWNlcyAtIGZyYWN0aW9uYWxQYXJ0LnNsaWNlKDEpLmxlbmd0aCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIEFkZCB0cmFpbGluZyB6ZXJvZX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ICAvKipcclxuICAgICAqIENvbnZlbmllbmNlIGZ1bmN0aW9uLiBFcXVpdmFsZW50IHRvIGNhbGxpbmcgW1tmb3JtYXRdXSB3aXRoIGBvcHRpb25zLnR5cGUgPSBcInBlcmNlbnRhZ2VcImBcclxuICAgICAqIEBwYXJhbSBuIE51bWJlciB0byBiZSBmb3JtYXR0ZWQuXHJcbiAgICAgKiBAcGFyYW0gb3B0aW9ucyBGb3JtYXR0aW5nIG9wdGlvbnMuIFNlZSBbW2Zvcm1hdF1dIGZvciBkZXRhaWxzLlxyXG4gICAgICovXHJcbiAgICBwdWJsaWMgZm9ybWF0UGVyY2VudGFnZShuOiBudW1iZXIsIG9wdGlvbnM/OiBUZXh0Rm9ybWF0T3B0aW9ucyk6IHN0cmluZyB7XHJcbiAgICAgICAgaWYgKG9wdGlvbnMpIHtcclxuICAgICAgICAgICAgb3B0aW9ucy50eXBlID0gXCJwZXJjZW50YWdlXCI7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiB0aGlzLmZvcm1hdChuLCBvcHRpb25zIHx8IHsgdHlwZTogXCJwZXJjZW50YWdlXCIsIGxhbmc6IFwiZW5cIiB9KTtcclxuICAgIH1cclxufVxyXG4iXX0=\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/formatting/src/date-formatting-fr.js\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar formatter_language_js_1 = require(\"./formatter-language.js\");\r\nvar DateFormatterFrench = /** @class */ (function () {\r\n function DateFormatterFrench() {\r\n }\r\n /**\r\n * Returns the current date.\r\n */\r\n DateFormatterFrench.prototype.today = function () {\r\n return new Date();\r\n };\r\n /**\r\n * Takes a number (0-11) or Date object and returns the number of days in that month. Can account for leap years.\r\n * @param date - The month, either a Date or the number of the month.\r\n * @param year - Used to check for leap years. Defaults to the current year, can be overriden by the input or by the Date object.\r\n */\r\n DateFormatterFrench.prototype.getMonthDays = function (date, year) {\r\n if (year === void 0) {\r\n year = this.today().getFullYear();\r\n }\r\n if (typeof date === \"number\" && (date > 11 || date < 0)) {\r\n throw new Error(\"Function getMonthDays() -> Invalid month value received: \" + date);\r\n }\r\n var monthNum = typeof date === \"number\" ? date : date.getMonth();\r\n var isLeapYear = false;\r\n if (typeof date === \"object\")\r\n { year = date.getFullYear(); }\r\n else if (year == undefined || year == 0)\r\n { year = this.today().getFullYear(); }\r\n if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0 || year == 2000)\r\n { isLeapYear = true; }\r\n return monthNum == 1 && isLeapYear ? 29 : DateFormatterFrench.monthsList[monthNum].days;\r\n };\r\n /**\r\n * Takes a number for the year, a number for the month, and a number for the day. Returns true if that date is valid.\r\n * @param year - Must be a 4 digit number.\r\n * @param month - Must be from 0-11.\r\n * @param day - Must be greater than 0, upper limit is determined by the month inputted.\r\n */\r\n DateFormatterFrench.prototype.isValidDate = function (year, month, day) {\r\n if (year >= 1000 && year <= 9999) {\r\n if (month >= 0 && month <= 11) {\r\n if (day >= 1 && day <= this.getMonthDays(month, year)) {\r\n return true;\r\n }\r\n else {\r\n throw new Error(\"Function isValidDate() -> Invalid day received: \" + day);\r\n }\r\n }\r\n else {\r\n throw new Error(\"Function isValidDate() -> Invalid month received: \" + month);\r\n }\r\n }\r\n else {\r\n throw new Error(\"Function isValidDate() -> Invalid year received: \" + year);\r\n }\r\n };\r\n /**\r\n * Takes a number (0-11) or a Date object, and returns the name of that month.\r\n * See [[activeLanguage]] for more details.\r\n * @param date - The month, either a Date object or the number of the month.\r\n * @param abbreviated - Whether to return the full name of the month, or the shortened version. Defaults to false.\r\n */\r\n DateFormatterFrench.prototype.getMonthName = function (date, abbreviated) {\r\n if (abbreviated === void 0) {\r\n abbreviated = false;\r\n }\r\n if (typeof date === \"number\" && (date > 11 || date < 0)) {\r\n throw new Error(\"Function getMonthName() -> Invalid month value received: \" + date);\r\n }\r\n var monthNum = typeof date === \"number\" ? date : date.getMonth();\r\n var monthName = abbreviated\r\n ? DateFormatterFrench.monthsList[monthNum].shortName\r\n : DateFormatterFrench.monthsList[monthNum].fullName;\r\n return monthName;\r\n };\r\n /**\r\n * Takes a number (1-31) or Date object and returns the suffix for the day.\r\n * See [[activeLanguage]] for more details.\r\n * @param date - The day, either a number or a Date object.\r\n */\r\n DateFormatterFrench.prototype.getDateSuffix = function (date) {\r\n if (typeof date === \"number\" && (date > 31 || date < 0)) {\r\n throw new Error(\"Function getDateSuffix() -> Invalid date value received: \" + date);\r\n }\r\n var dateNum = typeof date === \"number\" ? date : date.getDate();\r\n var dateSuffix = \"\";\r\n if (dateNum === 1) {\r\n dateSuffix = \"er\";\r\n }\r\n return dateSuffix;\r\n };\r\n /**\r\n * Takes a date string and a string for the format of that date string. Returns a Date object corresponding to the input\r\n * @param str - The inputted string for the date.\r\n * @param format - A string with the format of the inputted date string.\r\n */\r\n DateFormatterFrench.prototype.parseDate = function (str, format) {\r\n var parsedDate = new Date();\r\n format = format.toLowerCase();\r\n var monthInput = { format: \"\", content: \"\" };\r\n var yearInput = { format: \"\", content: \"\" };\r\n var dayInput = { format: \"\", content: \"\" };\r\n var formatParts = [\r\n { format: \"yyyy\" },\r\n { format: \"yy\" },\r\n { format: \"mmmm\" },\r\n { format: \"mmm\" },\r\n { format: \"mm\" },\r\n { format: \"m\" },\r\n { format: \"dddd\" },\r\n { format: \"ddd\" },\r\n { format: \"dd\" },\r\n { format: \"d\" } ];\r\n var strToArr = str.split(/\\s*,\\s*|\\s*\\/\\s*|\\s*-\\s*|\\s+/);\r\n var formatToArr = format.split(/\\s*,\\s*|\\s*\\/\\s*|\\s*-\\s*|\\s+/);\r\n if (strToArr.length != 3) {\r\n throw new Error(\"Function parseDate() -> Invalid date string received: \" + str);\r\n }\r\n if (formatToArr.length != 3) {\r\n throw new Error(\"Function parseDate() -> Invalid format string received: \" + format);\r\n }\r\n for (var i = 0; i < formatParts.length; i++) {\r\n if (formatToArr.indexOf(formatParts[i].format) != -1) {\r\n var index = formatToArr.indexOf(formatParts[i].format);\r\n if (formatParts[i].format[0] === \"y\") {\r\n yearInput.format = formatToArr[index];\r\n yearInput.content = strToArr[index];\r\n }\r\n else if (formatParts[i].format[0] === \"m\") {\r\n monthInput.format = formatToArr[index];\r\n monthInput.content = strToArr[index];\r\n }\r\n else {\r\n dayInput.format = formatToArr[index];\r\n dayInput.content = strToArr[index];\r\n }\r\n }\r\n }\r\n // If input year is 2 digits, selects the closest year to the current year\r\n if (yearInput.format === \"yy\" && yearInput.content.length === 2) {\r\n var currentYear = this.today().getFullYear();\r\n var futureYear = Number(\"20\" + yearInput.content);\r\n var pastYear = Number(\"19\" + yearInput.content);\r\n yearInput.content = (Math.abs(currentYear - futureYear) < Math.abs(currentYear - pastYear)\r\n ? futureYear\r\n : pastYear).toString();\r\n }\r\n else if (yearInput.format !== \"yyyy\") {\r\n throw new Error(\"Function parseDate() -> Invalid year format string received: \" + yearInput.format);\r\n }\r\n // Find the numeric value of a month given the name of the month (either full or abbreviated)\r\n if (monthInput.format == \"mmmm\") {\r\n monthInput.content = DateFormatterFrench.monthsList\r\n .filter(function (month) {\r\n return month.fullName == monthInput.content;\r\n })[0]\r\n .monthNum.toString();\r\n }\r\n else if (monthInput.format == \"mmm\") {\r\n monthInput.content = DateFormatterFrench.monthsList\r\n .filter(function (month) {\r\n return month.shortName == monthInput.content;\r\n })[0]\r\n .monthNum.toString();\r\n }\r\n else if (monthInput.format == \"mm\" || monthInput.format == \"m\") {\r\n monthInput.content = (Number(monthInput.content) - 1).toString();\r\n }\r\n else {\r\n throw new Error(\"Function parseDate() -> Invalid month format string received: \" + monthInput.format);\r\n }\r\n // If input date has a suffix, remove it\r\n if (dayInput.format == \"dddd\" || dayInput.format == \"ddd\") {\r\n dayInput.content = parseInt(dayInput.content).toString();\r\n }\r\n else if (dayInput.format != \"dd\" && dayInput.format != \"d\") {\r\n throw new Error(\"Function parseDate() -> Invalid day format string received: \" + dayInput.format);\r\n }\r\n if (this.isValidDate(Number(yearInput.content), Number(monthInput.content), Number(dayInput.content))) {\r\n parsedDate.setFullYear(Number(yearInput.content));\r\n parsedDate.setMonth(Number(monthInput.content));\r\n parsedDate.setDate(Number(dayInput.content));\r\n }\r\n return parsedDate;\r\n };\r\n /**\r\n * Takes a Date object and a format string. Returns a formatted string for the provided date.\r\n * @param date - The Date object.\r\n * @param format - A string with the format of the inputted date string.\r\n */\r\n DateFormatterFrench.prototype.formatDate = function (date, format) {\r\n var month = date.getMonth();\r\n var day = date.getDate();\r\n var year = date.getFullYear();\r\n format = format.toLowerCase();\r\n var formatParts = [\r\n { format: \"yyyy\", content: year.toString() },\r\n { format: \"yy\", content: year.toString().slice(2) },\r\n { format: \"mmmm\", content: this.getMonthName(month) },\r\n { format: \"mmm\", content: this.getMonthName(month, true) },\r\n { format: \"mm\", content: (0, formatter_language_js_1.padWithZeroes)(month + 1, 2) },\r\n { format: \"m\", content: (month + 1).toString() },\r\n { format: \"dddd\", content: (0, formatter_language_js_1.padWithZeroes)(day, 2) + this.getDateSuffix(day) },\r\n { format: \"ddd\", content: day.toString() + this.getDateSuffix(day) },\r\n { format: \"dd\", content: (0, formatter_language_js_1.padWithZeroes)(day, 2) },\r\n { format: \"d\", content: day.toString() } ];\r\n // checking for valid year, month and day inputs in the formatting string\r\n var testingArr = [];\r\n var formatToArr = format.split(/\\s*,\\s*|\\s*\\/\\s*|\\s*-\\s*|\\s+/);\r\n var _loop_1 = function (i) {\r\n testingArr.push(formatParts.filter(function (entry) {\r\n return entry.format == formatToArr[i];\r\n }));\r\n };\r\n for (var i = 0; i < formatToArr.length; i++) {\r\n _loop_1(i);\r\n }\r\n if (testingArr.length != 3) {\r\n throw new Error(\"Function formatDate() -> Invalid format string received\");\r\n }\r\n var completedParts = [];\r\n for (var i = 0; i < formatParts.length; i++) {\r\n if (format.search(formatParts[i].format) !== -1 && completedParts.indexOf(formatParts[i].format[0]) == -1) {\r\n format = format.replace(formatParts[i].format, formatParts[i].content);\r\n completedParts.push(formatParts[i].format[0]);\r\n }\r\n }\r\n return format;\r\n };\r\n DateFormatterFrench.monthsList = [\r\n { monthNum: 0, fullName: \"janvier\", shortName: \"janv\", days: 31 },\r\n { monthNum: 1, fullName: \"f\\u00E9vrier\", shortName: \"f\\u00E9v\", days: 28 },\r\n { monthNum: 2, fullName: \"mars\", shortName: \"mars\", days: 31 },\r\n { monthNum: 3, fullName: \"avril\", shortName: \"avril\", days: 30 },\r\n { monthNum: 4, fullName: \"mai\", shortName: \"mai\", days: 31 },\r\n { monthNum: 5, fullName: \"juin\", shortName: \"juin\", days: 30 },\r\n { monthNum: 6, fullName: \"juillet\", shortName: \"juil\", days: 31 },\r\n { monthNum: 7, fullName: \"ao\\u00FBt\", shortName: \"ao\\u00FBt\", days: 31 },\r\n { monthNum: 8, fullName: \"septembre\", shortName: \"sept\", days: 30 },\r\n { monthNum: 9, fullName: \"octobre\", shortName: \"oct\", days: 31 },\r\n { monthNum: 10, fullName: \"novembre\", shortName: \"nov\", days: 30 },\r\n { monthNum: 11, fullName: \"d\\u00E9cembre\", shortName: \"d\\u00E9c\", days: 31 } ];\r\n return DateFormatterFrench;\r\n}());\r\nexports.default = DateFormatterFrench;\r\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9kYXRlLWZvcm1hdHRpbmctZnIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFpQixhQUFhLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUV2RTtJQUFBO0lBNlBBLENBQUM7SUE3T0c7O09BRUc7SUFDSSxtQ0FBSyxHQUFaO1FBQ0ksT0FBTyxJQUFJLElBQUksRUFBRSxDQUFDO0lBQ3RCLENBQUM7SUFFRDs7OztPQUlHO0lBQ0ksMENBQVksR0FBbkIsVUFBb0IsSUFBbUIsRUFBRSxJQUF5QztRQUF6QyxxQkFBQSxFQUFBLE9BQWUsSUFBSSxDQUFDLEtBQUssRUFBRSxD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Chmb3JtYXRUb0Fyci5pbmRleE9mKGZvcm1hdFBhcnRzW2ldLmZvcm1hdCkgIT0gLTEpIHtcclxuICAgICAgICAgICAgICAgIGNvbnN0IGluZGV4ID0gZm9ybWF0VG9BcnIuaW5kZXhPZihmb3JtYXRQYXJ0c1tpXS5mb3JtYXQpO1xyXG4gICAgICAgICAgICAgICAgaWYgKGZvcm1hdFBhcnRzW2ldLmZvcm1hdFswXSA9PT0gXCJ5XCIpIHtcclxuICAgICAgICAgICAgICAgICAgICB5ZWFySW5wdXQuZm9ybWF0ID0gZm9ybWF0VG9BcnJbaW5kZXhdO1xyXG4gICAgICAgICAgICAgICAgICAgIHllYXJJbnB1dC5jb250ZW50ID0gc3RyVG9BcnJbaW5kZXhdO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChmb3JtYXRQYXJ0c1tpXS5mb3JtYXRbMF0gPT09IFwibVwiKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbW9udGhJbnB1dC5mb3JtYXQgPSBmb3JtYXRUb0FycltpbmRleF07XHJcbiAgICAgICAgICAgICAgICAgICAgbW9udGhJbnB1dC5jb250ZW50ID0gc3RyVG9BcnJbaW5kZXhdO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBkYXlJbnB1dC5mb3JtYXQgPSBmb3JtYXRUb0FycltpbmRleF07XHJcbiAgICAgICAgICAgICAgICAgICAgZGF5SW5wdXQuY29udGVudCA9IHN0clRvQXJyW2luZGV4XTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gSWYgaW5wdXQgeWVhciBpcyAyIGRpZ2l0cywgc2VsZWN0cyB0aGUgY2xvc2VzdCB5ZWFyIHRvIHRoZSBjdXJyZW50IHllYXJcclxuICAgICAgICBpZiAoeWVhcklucHV0LmZvcm1hdCA9PT0gXCJ5eVwiICYmIHllYXJJbnB1dC5jb250ZW50Lmxlbmd0aCA9PT0gMikge1xyXG4gICAgICAgICAgICBjb25zdCBjdXJyZW50WWVhciA9IHRoaXMudG9kYXkoKS5nZXRGdWxsWWVhcigpO1xyXG4gICAgICAgICAgICBjb25zdCBmdXR1cmVZZWFyID0gTnVtYmVyKFwiMjBcIiArIHllYXJJbnB1dC5jb250ZW50KTtcclxuICAgICAgICAgICAgY29uc3QgcGFzdFllYXIgPSBOdW1iZXIoXCIxOVwiICsgeWVhcklucHV0LmNvbnRlbnQpO1xyXG4gICAgICAgICAgICB5ZWFySW5wdXQuY29udGVudCA9IChNYXRoLmFicyhjdXJyZW50WWVhciAtIGZ1dHVyZVllYXIpIDwgTWF0aC5hYnMoY3VycmVudFllYXIgLSBwYXN0WWVhcilcclxuICAgICAgICAgICAgICAgID8gZnV0dXJlWWVhclxyXG4gICAgICAgICAgICAgICAgOiBwYXN0WWVhclxyXG4gICAgICAgICAgICApLnRvU3RyaW5nKCk7XHJcbiAgICAgICAgfSBlbHNlIGlmICh5ZWFySW5wdXQuZm9ybWF0ICE9PSBcInl5eXlcIikge1xyXG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJGdW5jdGlvbiBwYXJzZURhdGUoKSAtPiBJbnZhbGlkIHllYXIgZm9ybWF0IHN0cmluZyByZWNlaXZlZDogXCIgKyB5ZWFySW5wdXQuZm9ybWF0KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vIEZpbmQgdGhlIG51bWVyaWMgdmFsdWUgb2YgYSBtb250aCBnaXZlbiB0aGUgbmFtZSBvZiB0aGUgbW9udGggKGVpdGhlciBmdWxsIG9yIGFiYnJldmlhdGVkKVxyXG4gICAgICAgIGlmIChtb250aElucHV0LmZvcm1hdCA9PSBcIm1tbW1cIikge1xyXG4gICAgICAgICAgICBtb250aElucHV0LmNvbnRlbnQgPSBEYXRlRm9ybWF0dGVyRnJlbmNoLm1vbnRoc0xpc3RcclxuICAgICAgICAgICAgICAgIC5maWx0ZXIoZnVuY3Rpb24obW9udGgpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbW9udGguZnVsbE5hbWUgPT0gbW9udGhJbnB1dC5jb250ZW50O1xyXG4gICAgICAgICAgICAgICAgfSlbMF1cclxuICAgICAgICAgICAgICAgIC5tb250aE51bS50b1N0cmluZygpO1xyXG4gICAgICAgIH0gZWxzZSBpZiAobW9udGhJbnB1dC5mb3JtYXQgPT0gXCJtbW1cIikge1xyXG4gICAgICAgICAgICBtb250aElucHV0LmNvbnRlbnQgPSBEYXRlRm9ybWF0dGVyRnJlbmNoLm1vbnRoc0xpc3RcclxuICAgICAgICAgICAgICAgIC5maWx0ZXIoZnVuY3Rpb24obW9udGgpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbW9udGguc2hvcnROYW1lID09IG1vbnRoSW5wdXQuY29udGVudDtcclxuICAgICAgICAgICAgICAgIH0pWzBdXHJcbiAgICAgICAgICAgICAgICAubW9udGhOdW0udG9TdHJpbmcoKTtcclxuICAgICAgICB9IGVsc2UgaWYgKG1vbnRoSW5wdXQuZm9ybWF0ID09IFwibW1cIiB8fCBtb250aElucHV0LmZvcm1hdCA9PSBcIm1cIikge1xyXG4gICAgICAgICAgICBtb250aElucHV0LmNvbnRlbnQgPSAoTnVtYmVyKG1vbnRoSW5wdXQuY29udGVudCkgLSAxKS50b1N0cmluZygpO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIkZ1bmN0aW9uIHBhcnNlRGF0ZSgpIC0+IEludmFsaWQgbW9udGggZm9ybWF0IHN0cmluZyByZWNlaXZlZDogXCIgKyBtb250aElucHV0LmZvcm1hdCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBJZiBpbnB1dCBkYXRlIGhhcyBhIHN1ZmZpeCwgcmVtb3ZlIGl0XHJcbiAgICAgICAgaWYgKGRheUlucHV0LmZvcm1hdCA9PSBcImRkZGRcIiB8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OiBcImRkZGRcIiwgY29udGVudDogcGFkV2l0aFplcm9lcyhkYXksIDIpICsgdGhpcy5nZXREYXRlU3VmZml4KGRheSkgfSxcclxuICAgICAgICAgICAgeyBmb3JtYXQ6IFwiZGRkXCIsIGNvbnRlbnQ6IGRheS50b1N0cmluZygpICsgdGhpcy5nZXREYXRlU3VmZml4KGRheSkgfSxcclxuICAgICAgICAgICAgeyBmb3JtYXQ6IFwiZGRcIiwgY29udGVudDogcGFkV2l0aFplcm9lcyhkYXksIDIpIH0sXHJcbiAgICAgICAgICAgIHsgZm9ybWF0OiBcImRcIiwgY29udGVudDogZGF5LnRvU3RyaW5nKCkgfSxcclxuICAgICAgICBdO1xyXG5cclxuICAgICAgICAvLyBjaGVja2luZyBmb3IgdmFsaWQgeWVhciwgbW9udGggYW5kIGRheSBpbnB1dHMgaW4gdGhlIGZvcm1hdHRpbmcgc3RyaW5nXHJcbiAgICAgICAgY29uc3QgdGVzdGluZ0FyciA9IFtdO1xyXG4gICAgICAgIGNvbnN0IGZvcm1hdFRvQXJyOiBzdHJpbmdbXSA9IGZvcm1hdC5zcGxpdCgvXFxzKixcXHMqfFxccypcXC9cXHMqfFxccyotXFxzKnxcXHMrLyk7XHJcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBmb3JtYXRUb0Fyci5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICB0ZXN0aW5nQXJyLnB1c2goXHJcbiAgICAgICAgICAgICAgICBmb3JtYXRQYXJ0cy5maWx0ZXIoZnVuY3Rpb24oZW50cnkpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZW50cnkuZm9ybWF0ID09IGZvcm1hdFRvQXJyW2ldO1xyXG4gICAgICAgICAgICAgICAgfSksXHJcbiAgICAgICAgICAgICk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmICh0ZXN0aW5nQXJyLmxlbmd0aCAhPSAzKSB7XHJcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIkZ1bmN0aW9uIGZvcm1hdERhdGUoKSAtPiBJbnZhbGlkIGZvcm1hdCBzdHJpbmcgcmVjZWl2ZWRcIik7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBjb25zdCBjb21wbGV0ZWRQYXJ0czogc3RyaW5nW10gPSBbXTtcclxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGZvcm1hdFBhcnRzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGlmIChmb3JtYXQuc2VhcmNoKGZvcm1hdFBhcnRzW2ldLmZvcm1hdCkgIT09IC0xICYmIGNvbXBsZXRlZFBhcnRzLmluZGV4T2YoZm9ybWF0UGFydHNbaV0uZm9ybWF0WzBdKSA9PSAtMSkge1xyXG4gICAgICAgICAgICAgICAgZm9ybWF0ID0gZm9ybWF0LnJlcGxhY2UoZm9ybWF0UGFydHNbaV0uZm9ybWF0LCBmb3JtYXRQYXJ0c1tpXS5jb250ZW50KTtcclxuICAgICAgICAgICAgICAgIGNvbXBsZXRlZFBhcnRzLnB1c2goZm9ybWF0UGFydHNbaV0uZm9ybWF0WzBdKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgcmV0dXJuIGZvcm1hdDtcclxuICAgIH1cclxufVxyXG4iXX0=\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/formatting/src/date-formatting-en.js\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar formatter_language_js_1 = require(\"./formatter-language.js\");\r\nvar DateFormatterEnglish = /** @class */ (function () {\r\n function DateFormatterEnglish() {\r\n }\r\n /**\r\n * Returns the current date.\r\n */\r\n DateFormatterEnglish.prototype.today = function () {\r\n return new Date();\r\n };\r\n /**\r\n * Takes a number (0-11) or Date object and returns the number of days in that month. Can account for leap years.\r\n * @param date - The month, either a Date or the number of the month.\r\n * @param year - Used to check for leap years. Defaults to the current year, can be overriden by the input or by the Date object.\r\n */\r\n DateFormatterEnglish.prototype.getMonthDays = function (date, year) {\r\n if (year === void 0) {\r\n year = this.today().getFullYear();\r\n }\r\n if (typeof date === \"number\" && (date > 11 || date < 0)) {\r\n throw new Error(\"Function getMonthDays() -> Invalid month value received: \" + date);\r\n }\r\n var monthNum = typeof date === \"number\" ? date : date.getMonth();\r\n var isLeapYear = false;\r\n if (typeof date === \"object\")\r\n { year = date.getFullYear(); }\r\n else if (year == undefined || year == 0)\r\n { year = this.today().getFullYear(); }\r\n if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0 || year == 2000)\r\n { isLeapYear = true; }\r\n return monthNum == 1 && isLeapYear ? 29 : DateFormatterEnglish.monthsList[monthNum].days;\r\n };\r\n /**\r\n * Takes a number for the year, a number for the month, and a number for the day. Returns true if that date is valid.\r\n * @param year - Must be a 4 digit number.\r\n * @param month - Must be from 0-11.\r\n * @param day - Must be greater than 0, upper limit is determined by the month inputted.\r\n */\r\n DateFormatterEnglish.prototype.isValidDate = function (year, month, day) {\r\n if (year >= 1000 && year <= 9999) {\r\n if (month >= 0 && month <= 11) {\r\n if (day >= 1 && day <= this.getMonthDays(month, year)) {\r\n return true;\r\n }\r\n else {\r\n throw new Error(\"Function isValidDate() -> Invalid day received: \" + day);\r\n }\r\n }\r\n else {\r\n throw new Error(\"Function isValidDate() -> Invalid month received: \" + month);\r\n }\r\n }\r\n else {\r\n throw new Error(\"Function isValidDate() -> Invalid year received: \" + year);\r\n }\r\n };\r\n /**\r\n * Takes a number (0-11) or a Date object, and returns the name of that month.\r\n * See [[activeLanguage]] for more details.\r\n * @param date - The month, either a Date object or the number of the month.\r\n * @param abbreviated - Whether to return the full name of the month, or the shortened version. Defaults to false.\r\n */\r\n DateFormatterEnglish.prototype.getMonthName = function (date, abbreviated) {\r\n if (abbreviated === void 0) {\r\n abbreviated = false;\r\n }\r\n if (typeof date === \"number\" && (date > 11 || date < 0)) {\r\n throw new Error(\"Function getMonthName() -> Invalid month value received: \" + date);\r\n }\r\n var monthNum = typeof date === \"number\" ? date : date.getMonth();\r\n var monthName = abbreviated\r\n ? DateFormatterEnglish.monthsList[monthNum].shortName\r\n : DateFormatterEnglish.monthsList[monthNum].fullName;\r\n return monthName;\r\n };\r\n /**\r\n * Takes a number (1-31) or Date object and returns the suffix for the day.\r\n * See [[activeLanguage]] for more details.\r\n * @param date - The day, either a number or a Date object.\r\n */\r\n DateFormatterEnglish.prototype.getDateSuffix = function (date) {\r\n if (typeof date === \"number\" && (date > 31 || date < 0)) {\r\n throw new Error(\"Function getDateSuffix() -> Invalid date value received: \" + date);\r\n }\r\n var dateNum = typeof date === \"number\" ? date : date.getDate();\r\n var dateSuffix;\r\n if (dateNum % 10 == 1 && dateNum != 11) {\r\n dateSuffix = \"st\";\r\n }\r\n else if (dateNum % 10 == 2 && dateNum != 12) {\r\n dateSuffix = \"nd\";\r\n }\r\n else if (dateNum % 10 == 3 && dateNum != 13) {\r\n dateSuffix = \"rd\";\r\n }\r\n else {\r\n dateSuffix = \"th\";\r\n }\r\n return dateSuffix;\r\n };\r\n /**\r\n * Takes a date string and a string for the format of that date string. Returns a Date object corresponding to the input\r\n * @param str - The inputted string for the date.\r\n * @param format - A string with the format of the inputted date string.\r\n */\r\n DateFormatterEnglish.prototype.parseDate = function (str, format) {\r\n var parsedDate = new Date();\r\n format = format.toLowerCase();\r\n var monthInput = { format: \"\", content: \"\" };\r\n var yearInput = { format: \"\", content: \"\" };\r\n var dayInput = { format: \"\", content: \"\" };\r\n var formatParts = [\r\n { format: \"yyyy\" },\r\n { format: \"yy\" },\r\n { format: \"mmmm\" },\r\n { format: \"mmm\" },\r\n { format: \"mm\" },\r\n { format: \"m\" },\r\n { format: \"dddd\" },\r\n { format: \"ddd\" },\r\n { format: \"dd\" },\r\n { format: \"d\" } ];\r\n var strToArr = str.split(/\\s*,\\s*|\\s*\\/\\s*|\\s*-\\s*|\\s+/);\r\n var formatToArr = format.split(/\\s*,\\s*|\\s*\\/\\s*|\\s*-\\s*|\\s+/);\r\n if (strToArr.length != 3) {\r\n throw new Error(\"Function parseDate() -> Invalid date string received: \" + str);\r\n }\r\n if (formatToArr.length != 3) {\r\n throw new Error(\"Function parseDate() -> Invalid format string received: \" + format);\r\n }\r\n for (var i = 0; i < formatParts.length; i++) {\r\n if (formatToArr.indexOf(formatParts[i].format) != -1) {\r\n var index = formatToArr.indexOf(formatParts[i].format);\r\n if (formatParts[i].format[0] === \"y\") {\r\n yearInput.format = formatToArr[index];\r\n yearInput.content = strToArr[index];\r\n }\r\n else if (formatParts[i].format[0] === \"m\") {\r\n monthInput.format = formatToArr[index];\r\n monthInput.content = strToArr[index];\r\n }\r\n else {\r\n dayInput.format = formatToArr[index];\r\n dayInput.content = strToArr[index];\r\n }\r\n }\r\n }\r\n // If input year is 2 digits, selects the closest year to the current year\r\n if (yearInput.format === \"yy\" && yearInput.content.length === 2) {\r\n var currentYear = this.today().getFullYear();\r\n var futureYear = Number(\"20\" + yearInput.content);\r\n var pastYear = Number(\"19\" + yearInput.content);\r\n yearInput.content = (Math.abs(currentYear - futureYear) < Math.abs(currentYear - pastYear)\r\n ? futureYear\r\n : pastYear).toString();\r\n }\r\n else if (yearInput.format !== \"yyyy\") {\r\n throw new Error(\"Function parseDate() -> Invalid year format string received: \" + yearInput.format);\r\n }\r\n // Find the numeric value of a month given the name of the month (either full or abbreviated)\r\n if (monthInput.format == \"mmmm\") {\r\n monthInput.content = DateFormatterEnglish.monthsList\r\n .filter(function (month) {\r\n return month.fullName == monthInput.content;\r\n })[0]\r\n .monthNum.toString();\r\n }\r\n else if (monthInput.format == \"mmm\") {\r\n monthInput.content = DateFormatterEnglish.monthsList\r\n .filter(function (month) {\r\n return month.shortName == monthInput.content;\r\n })[0]\r\n .monthNum.toString();\r\n }\r\n else if (monthInput.format == \"mm\" || monthInput.format == \"m\") {\r\n monthInput.content = (Number(monthInput.content) - 1).toString();\r\n }\r\n else {\r\n throw new Error(\"Function parseDate() -> Invalid month format string received: \" + monthInput.format);\r\n }\r\n // If input date has a suffix, remove it\r\n if (dayInput.format == \"dddd\" || dayInput.format == \"ddd\") {\r\n dayInput.content = parseInt(dayInput.content).toString();\r\n }\r\n else if (dayInput.format != \"dd\" && dayInput.format != \"d\") {\r\n throw new Error(\"Function parseDate() -> Invalid day format string received: \" + dayInput.format);\r\n }\r\n if (this.isValidDate(Number(yearInput.content), Number(monthInput.content), Number(dayInput.content))) {\r\n parsedDate.setFullYear(Number(yearInput.content));\r\n parsedDate.setMonth(Number(monthInput.content));\r\n parsedDate.setDate(Number(dayInput.content));\r\n }\r\n return parsedDate;\r\n };\r\n /**\r\n * Takes a Date object and a format string. Returns a formatted string for the provided date.\r\n * @param date - The Date object.\r\n * @param format - A string with the format of the inputted date string.\r\n */\r\n DateFormatterEnglish.prototype.formatDate = function (date, format) {\r\n var month = date.getMonth();\r\n var day = date.getDate();\r\n var year = date.getFullYear();\r\n format = format.toLowerCase();\r\n var formatParts = [\r\n { format: \"yyyy\", content: year.toString() },\r\n { format: \"yy\", content: year.toString().slice(2) },\r\n { format: \"mmmm\", content: this.getMonthName(month) },\r\n { format: \"mmm\", content: this.getMonthName(month, true) },\r\n { format: \"mm\", content: (0, formatter_language_js_1.padWithZeroes)(month + 1, 2) },\r\n { format: \"m\", content: (month + 1).toString() },\r\n { format: \"dddd\", content: (0, formatter_language_js_1.padWithZeroes)(day, 2) + this.getDateSuffix(day) },\r\n { format: \"ddd\", content: day.toString() + this.getDateSuffix(day) },\r\n { format: \"dd\", content: (0, formatter_language_js_1.padWithZeroes)(day, 2) },\r\n { format: \"d\", content: day.toString() } ];\r\n // checking for valid year, month and day inputs in the formatting string\r\n var testingArr = [];\r\n var formatToArr = format.split(/\\s*,\\s*|\\s*\\/\\s*|\\s*-\\s*|\\s+/);\r\n var _loop_1 = function (i) {\r\n testingArr.push(formatParts.filter(function (entry) {\r\n return entry.format == formatToArr[i];\r\n }));\r\n };\r\n for (var i = 0; i < formatToArr.length; i++) {\r\n _loop_1(i);\r\n }\r\n if (testingArr.length != 3) {\r\n throw new Error(\"Function formatDate() -> Invalid format string received\");\r\n }\r\n var completedParts = [];\r\n for (var i = 0; i < formatParts.length; i++) {\r\n if (format.search(formatParts[i].format) !== -1 && completedParts.indexOf(formatParts[i].format[0]) == -1) {\r\n format = format.replace(formatParts[i].format, formatParts[i].content);\r\n completedParts.push(formatParts[i].format[0]);\r\n }\r\n }\r\n return format;\r\n };\r\n DateFormatterEnglish.monthsList = [\r\n { monthNum: 0, fullName: \"January\", shortName: \"Jan\", days: 31 },\r\n { monthNum: 1, fullName: \"February\", shortName: \"Feb\", days: 28 },\r\n { monthNum: 2, fullName: \"March\", shortName: \"Mar\", days: 31 },\r\n { monthNum: 3, fullName: \"April\", shortName: \"Apr\", days: 30 },\r\n { monthNum: 4, fullName: \"May\", shortName: \"May\", days: 31 },\r\n { monthNum: 5, fullName: \"June\", shortName: \"June\", days: 30 },\r\n { monthNum: 6, fullName: \"July\", shortName: \"July\", days: 31 },\r\n { monthNum: 7, fullName: \"August\", shortName: \"Aug\", days: 31 },\r\n { monthNum: 8, fullName: \"September\", shortName: \"Sept\", days: 30 },\r\n { monthNum: 9, fullName: \"October\", shortName: \"Oct\", days: 31 },\r\n { monthNum: 10, fullName: \"November\", shortName: \"Nov\", days: 30 },\r\n { monthNum: 11, fullName: \"December\", shortName: \"Dec\", days: 31 } ];\r\n return DateFormatterEnglish;\r\n}());\r\nexports.default = DateFormatterEnglish;\r\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9kYXRlLWZvcm1hdHRpbmctZW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFpQixhQUFhLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUV2RTtJQUFBO0lBa1FBLENBQUM7SUFsUEc7O09BRUc7SUFDSSxvQ0FBSyxHQUFaO1FBQ0ksT0FBTyxJQUFJLElBQUksRUFB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0xlYXBZZWFyID0gdHJ1ZTtcclxuXHJcbiAgICAgICAgcmV0dXJuIG1vbnRoTnVtID09IDEgJiYgaXNMZWFwWWVhciA/IDI5IDogRGF0ZUZvcm1hdHRlckVuZ2xpc2gubW9udGhzTGlzdFttb250aE51bV0uZGF5cztcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIFRha2VzIGEgbnVtYmVyIGZvciB0aGUgeWVhciwgYSBudW1iZXIgZm9yIHRoZSBtb250aCwgYW5kIGEgbnVtYmVyIGZvciB0aGUgZGF5LiBSZXR1cm5zIHRydWUgaWYgdGhhdCBkYXRlIGlzIHZhbGlkLlxyXG4gICAgICogQHBhcmFtIHllYXIgLSBNdXN0IGJlIGEgNCBkaWdpdCBudW1iZXIuXHJcbiAgICAgKiBAcGFyYW0gbW9udGggLSBNdXN0IGJlIGZyb20gMC0xMS5cclxuICAgICAqIEBwYXJhbSBkYXkgLSBNdXN0IGJlIGdyZWF0ZXIgdGhhbiAwLCB1cHBlciBsaW1pdCBpcyBkZXRlcm1pbmVkIGJ5IHRoZSBtb250aCBpbnB1dHRlZC5cclxuICAgICAqL1xyXG4gICAgcHVibGljIGlzVmFsaWREYXRlKHllYXI6IG51bWJlciwgbW9udGg6IG51bWJlciwgZGF5OiBudW1iZXIpOiBib29sZWFuIHtcclxuICAgICAgICBpZiAoeWVhciA+PSAxMDAwICYmIHllYXIgPD0gOTk5OSkge1xyXG4gICAgICAgICAgICBpZiAobW9udGggPj0gMCAmJiBtb250aCA8PSAxMSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKGRheSA+PSAxICYmIGRheSA8PSB0aGlzLmdldE1vbnRoRGF5cyhtb250aCwgeWVhcikpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiRnVuY3Rpb24gaXNWYWxpZERhdGUoK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ICAgeWVhcklucHV0LmNvbnRlbnQgPSBzdHJUb0FycltpbmRleF07XHJcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGZvcm1hdFBhcnRzW2ldLmZvcm1hdFswXSA9PT0gXCJtXCIpIHtcclxuICAgICAgICAgICAgICAgICAgICBtb250aElucHV0LmZvcm1hdCA9IGZvcm1hdFRvQXJyW2luZGV4XTtcclxuICAgICAgICAgICAgICAgICAgICBtb250aElucHV0LmNvbnRlbnQgPSBzdHJUb0FycltpbmRleF07XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGRheUlucHV0LmZvcm1hdCA9IGZvcm1hdFRvQXJyW2luZGV4XTtcclxuICAgICAgICAgICAgICAgICAgICBkYXlJbnB1dC5jb250ZW50ID0gc3RyVG9BcnJbaW5kZXhdO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBJZiBpbnB1dCB5ZWFyIGlzIDIgZGlnaXRzLCBzZWxlY3RzIHRoZSBjbG9zZXN0IHllYXIgdG8gdGhlIGN1cnJlbnQgeWVhclxyXG4gICAgICAgIGlmICh5ZWFySW5wdXQuZm9ybWF0ID09PSBcInl5XCIgJiYgeWVhcklucHV0LmNvbnRlbnQubGVuZ3RoID09PSAyKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRZZWFyID0gdGhpcy50b2RheSgpLmdldEZ1bGxZZWFyKCk7XHJcbiAgICAgICAgICAgIGNvbnN0IGZ1dHVyZVllYXIgPSBOdW1iZXIoXCIyMFwiICsgeWVhcklucHV0LmNvbnRlbnQpO1xyXG4gICAgICAgICAgICBjb25zdCBwYXN0WWVhciA9IE51bWJlcihcIjE5XCIgKyB5ZWFySW5wdXQuY29udGVudCk7XHJcbiAgICAgICAgICAgIHllYXJJbnB1dC5jb250ZW50ID0gKE1hdGguYWJzKGN1cnJlbnRZZWFyI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xpc3RcclxuICAgICAgICAgICAgICAgIC5maWx0ZXIobW9udGggPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBtb250aC5zaG9ydE5hbWUgPT0gbW9udGhJbnB1dC5jb250ZW50O1xyXG4gICAgICAgICAgICAgICAgfSlbMF1cclxuICAgICAgICAgICAgICAgIC5tb250aE51bS50b1N0cmluZygpO1xyXG4gICAgICAgIH0gZWxzZSBpZiAobW9udGhJbnB1dC5mb3JtYXQgPT0gXCJtbVwiIHx8IG1vbnRoSW5wdXQuZm9ybWF0ID09IFwibVwiKSB7XHJcbiAgICAgICAgICAgIG1vbnRoSW5wdXQuY29udGVudCA9IChOdW1iZXIobW9udGhJbnB1dC5jb250ZW50KSAtIDEpLnRvU3RyaW5nKCk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiRnVuY3Rpb24gcGFyc2VEYXRlKCkgLT4gSW52YWxpZCBtb250aCBmb3JtYXQgc3RyaW5nIHJlY2VpdmVkOiBcIiArIG1vbnRoSW5wdXQuZm9ybWF0KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vIElmIGlucHV0IGRhdGUgaGFzIGEgc3VmZml4LCByZW1vdmUgaXRcclxuICAgICAgICBpZiAoZGF5SW5wdXQuZm9ybWF0ID09IFwiZGRkZFwiIHx8IGRheUlucHV0LmZvcm1hdCA9PSBcImRkZFwiKSB7XHJcbiAgICAgICAgICAgIGRheUlucHV0LmNvbnRlbnQgPSBwYXJzZUludChkYXlJbnB1dC5jb250ZW50KS50b1N0cmluZygpO1xyXG4gICAgICAgIH0gZWxzZSBpZiAoZGF5SW5wdXQuZm9ybWF0ICE9IFwiZGRcIiAmJiBkYXlJbnB1dC5mb3JtYXQgIT0gXCJkXCIpIHtcclxuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiRnVuY3Rpb24gcGFyc2VEYXRlKCkgLT4gSW52YWxpZCBkYXkgZm9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ZW50OiBkYXkudG9TdHJpbmcoKSB9LFxyXG4gICAgICAgIF07XHJcblxyXG4gICAgICAgIC8vIGNoZWNraW5nIGZvciB2YWxpZCB5ZWFyLCBtb250aCBhbmQgZGF5IGlucHV0cyBpbiB0aGUgZm9ybWF0dGluZyBzdHJpbmdcclxuICAgICAgICBjb25zdCB0ZXN0aW5nQXJyID0gW107XHJcbiAgICAgICAgY29uc3QgZm9ybWF0VG9BcnI6IHN0cmluZ1tdID0gZm9ybWF0LnNwbGl0KC9cXHMqLFxccyp8XFxzKlxcL1xccyp8XFxzKi1cXHMqfFxccysvKTtcclxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGZvcm1hdFRvQXJyLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIHRlc3RpbmdBcnIucHVzaChcclxuICAgICAgICAgICAgICAgIGZvcm1hdFBhcnRzLmZpbHRlcihmdW5jdGlvbihlbnRyeSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBlbnRyeS5mb3JtYXQgPT0gZm9ybWF0VG9BcnJbaV07XHJcbiAgICAgICAgICAgICAgICB9KSxcclxuICAgICAgICAgICAgKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKHRlc3RpbmdBcnIubGVuZ3RoICE9IDMpIHtcclxuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiRnVuY3Rpb24gZm9ybWF0RGF0ZSgpIC0+IEludmFsaWQgZm9ybWF0IHN0cmluZyByZWNlaXZlZFwiKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGNvbnN0IGNvbXBsZXRlZFBhcnRzOiBzdHJpbmdbXSA9IFtdO1xyXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZm9ybWF0UGFydHMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgaWYgKGZvcm1hdC5zZWFyY2goZm9ybWF0UGFydHNbaV0uZm9ybWF0KSAhPT0gLTEgJiYgY29tcGxldGVkUGFydHMuaW5kZXhPZihmb3JtYXRQYXJ0c1tpXS5mb3JtYXRbMF0pID09IC0xKSB7XHJcbiAgICAgICAgICAgICAgICBmb3JtYXQgPSBmb3JtYXQucmVwbGFjZShmb3JtYXRQYXJ0c1tpXS5mb3JtYXQsIGZvcm1hdFBhcnRzW2ldLmNvbnRlbnQpO1xyXG4gICAgICAgICAgICAgICAgY29tcGxldGVkUGFydHMucHVzaChmb3JtYXRQYXJ0c1tpXS5mb3JtYXRbMF0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICByZXR1cm4gZm9ybWF0O1xyXG4gICAgfVxyXG59XHJcbiJdfQ==\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/formatting/src/formatter-language.js\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.removeLanguage = exports.registerLanguage = exports.getLangModule = exports.padWithZeroes = void 0;\r\nvar text_formatting_en_js_1 = require(\"./text-formatting-en.js\");\r\nvar date_formatting_en_js_1 = require(\"./date-formatting-en.js\");\r\nvar text_formatting_fr_js_1 = require(\"./text-formatting-fr.js\");\r\nvar date_formatting_fr_js_1 = require(\"./date-formatting-fr.js\");\r\n/**\r\n * Takes a number and returns it as a string, front padded with zeroes up to the requisite number of digits.\r\n * @param number - Number to be padded.\r\n * @param digits - Total number of digits for the output.\r\n */\r\nfunction padWithZeroes(number, digits) {\r\n if (digits === void 0) {\r\n digits = 2;\r\n }\r\n var output = number.toString();\r\n var zeroes = [];\r\n for (var i = output.length; i < digits; i++) {\r\n zeroes.push(\"0\");\r\n }\r\n var zeroString = zeroes.join(\"\");\r\n return zeroString + output;\r\n}\r\nexports.padWithZeroes = padWithZeroes;\r\nvar langModule = {\r\n en: {\r\n text: new text_formatting_en_js_1.default(),\r\n date: new date_formatting_en_js_1.default(),\r\n },\r\n fr: {\r\n text: new text_formatting_fr_js_1.default(),\r\n date: new date_formatting_fr_js_1.default(),\r\n },\r\n};\r\nfunction getLangModule(options) {\r\n if (typeof options !== \"undefined\" && typeof options.lang !== \"undefined\") {\r\n if (langModule[options.lang]) {\r\n return langModule[options.lang];\r\n }\r\n else\r\n { throw new Error(\"Error: invalid language\"); }\r\n }\r\n else {\r\n var docLang = document.documentElement.lang;\r\n if (langModule[docLang]) {\r\n return langModule[docLang];\r\n }\r\n else\r\n { throw new Error(\"Error: invalid language\"); }\r\n }\r\n}\r\nexports.getLangModule = getLangModule;\r\nfunction registerLanguage(lang, implementation) {\r\n // check if language already exists or is registered\r\n if (langModule[lang]) {\r\n throw new Error(\"Error: cannot override an existing language\");\r\n }\r\n else {\r\n langModule[lang] = {\r\n text: {\r\n parseNumber: langModule.en.text.parseNumber,\r\n format: implementation.format,\r\n formatNumber: langModule.en.text.formatNumber,\r\n formatCurrency: langModule.en.text.formatCurrency,\r\n formatPercentage: langModule.en.text.formatPercentage,\r\n },\r\n date: {\r\n today: langModule.en.date.today,\r\n getMonthDays: langModule.en.date.getMonthDays,\r\n isValidDate: langModule.en.date.isValidDate,\r\n getMonthName: implementation.getMonthName,\r\n getDateSuffix: implementation.getDateSuffix,\r\n parseDate: implementation.parseDate,\r\n formatDate: implementation.formatDate,\r\n },\r\n };\r\n }\r\n}\r\nexports.registerLanguage = registerLanguage;\r\nfunction removeLanguage(lang) {\r\n if (lang == \"en\" || lang == \"fr\") {\r\n throw new Error(\"Error: cannot delete a default language\");\r\n }\r\n else if (langModule[lang]) {\r\n delete langModule[lang];\r\n }\r\n else {\r\n throw new Error(\"Error: language does not exist\");\r\n }\r\n}\r\nexports.removeLanguage = removeLanguage;\r\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9mb3JtYXR0ZXItbGFuZ3VhZ2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxvQkFBb0IsTUFBTSx5QkFBeUIsQ0FBQztB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gICAgICAgfSxcclxuICAgICAgICB9O1xyXG4gICAgfVxyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gcmVtb3ZlTGFuZ3VhZ2UobGFuZzogc3RyaW5nKTogdm9pZCB7XHJcbiAgICBpZiAobGFuZyA9PSBcImVuXCIgfHwgbGFuZyA9PSBcImZyXCIpIHtcclxuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJFcnJvcjogY2Fubm90IGRlbGV0ZSBhIGRlZmF1bHQgbGFuZ3VhZ2VcIik7XHJcbiAgICB9IGVsc2UgaWYgKGxhbmdNb2R1bGVbbGFuZ10pIHtcclxuICAgICAgICBkZWxldGUgbGFuZ01vZHVsZVtsYW5nXTtcclxuICAgIH0gZWxzZSB7XHJcbiAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiRXJyb3I6IGxhbmd1YWdlIGRvZXMgbm90IGV4aXN0XCIpO1xyXG4gICAgfVxyXG59XHJcbiJdfQ==\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/formatting\", [\"@rmlibrary/formatting/src/index.js\"], function (d) { return d; });\r\ndefine(\"@rmlibrary/formatting/src/index.js\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.removeLanguage = exports.registerLanguage = exports.formatDate = exports.parseDate = exports.getDateSuffix = exports.getMonthName = exports.isValidDate = exports.getMonthDays = exports.today = exports.parseNumber = exports.formatPercentage = exports.formatCurrency = exports.formatNumber = exports.format = void 0;\r\nvar formatter = require(\"./formatter-language.js\");\r\n/**\r\n * Generic formatting function, takes in a number and formats it as per the inputted options.\r\n * @param n Number to be formatted.\r\n * @param options Optional object determining how the number is formatted. See [[TextFormatOptions]] for more details.\r\n */\r\nfunction format(n, options) {\r\n return formatter.getLangModule(options).text.format(n, options);\r\n}\r\nexports.format = format;\r\n/**\r\n * Takes in a number and formats it as a number (adding thousands separators).\r\n * @param n Number to be formatted.\r\n * @param options Optional object determing additional formatting options. Type is defaulted to \"number\".\r\n */\r\nfunction formatNumber(n, options) {\r\n return formatter.getLangModule(options).text.formatNumber(n, options);\r\n}\r\nexports.formatNumber = formatNumber;\r\n/**\r\n * Takes in a number and formats it as a currency (adding currency symbol).\r\n * @param n Number to be formatted.\r\n * @param options Optional object determing additional formatting options. Type is defaulted to \"currency\". Currency symbol is defaulted to \"$\".\r\n */\r\nfunction formatCurrency(n, options) {\r\n return formatter.getLangModule(options).text.formatCurrency(n, options);\r\n}\r\nexports.formatCurrency = formatCurrency;\r\n/**\r\n * Takes in a number and formats it as a percentage (adding a \"%\" to the end of it)\r\n * @param n Number to be formatted.\r\n * @param options Optional object determing additional formatting options. Type is defaulted to \"percentage\".\r\n */\r\nfunction formatPercentage(n, options) {\r\n return formatter.getLangModule(options).text.formatPercentage(n, options);\r\n}\r\nexports.formatPercentage = formatPercentage;\r\n/**\r\n * Takes in a string and parses a number from it\r\n * @param numStr String to be parsed\r\n * @param options Used to determine language only\r\n */\r\nfunction parseNumber(numStr, options) {\r\n return formatter.getLangModule(options).text.parseNumber(numStr);\r\n}\r\nexports.parseNumber = parseNumber;\r\n/**\r\n * Returns the current date as a Date object\r\n */\r\nfunction today() {\r\n return new Date();\r\n}\r\nexports.today = today;\r\n/**\r\n * Takes in a value for the month and year or Date object and returns the number of days in that month.\r\n * @param date A Date object or a number (0-11) for the month number.\r\n * @param year Optional, the year in question. Defaults to the current year.\r\n * @param lang The formatter-language to be used.\r\n */\r\nfunction getMonthDays(date, year, lang) {\r\n return formatter.getLangModule({ lang: lang }).date.getMonthDays(date, year);\r\n}\r\nexports.getMonthDays = getMonthDays;\r\n/**\r\n * Takes in a year, month and day, returns true if the inputted values are a valid date.\r\n * @param year The year of the date to be validated\r\n * @param month The month of the date to be validated\r\n * @param day The day of the date to be validated\r\n * @param lang The formatter-language to be used.\r\n */\r\nfunction isValidDate(year, month, day, lang) {\r\n return formatter.getLangModule({ lang: lang }).date.isValidDate(year, month, day);\r\n}\r\nexports.isValidDate = isValidDate;\r\n/**\r\n * Takes in a numeric value for the month or a Date object and returns the name of that month, abbreviated or full.\r\n * @param date A Date object or a number (0-11) for the month number.\r\n * @param abbreviated A boolean for whether to return the month abbreviation or the full month name.\r\n * @param lang The formatter-language to be used.\r\n */\r\nfunction getMonthName(date, abbreviated, lang) {\r\n return formatter.getLangModule({ lang: lang }).date.getMonthName(date, abbreviated);\r\n}\r\nexports.getMonthName = getMonthName;\r\n/**\r\n * Takes in a value for the day or a Date object and returns the suffix for that day number.\r\n * @param date A value for the day (1-31) or a Date object\r\n * @param lang The formatter-language to be used.\r\n */\r\nfunction getDateSuffix(date, lang) {\r\n return formatter.getLangModule({ lang: lang }).date.getDateSuffix(date);\r\n}\r\nexports.getDateSuffix = getDateSuffix;\r\n/**\r\n * Takes in a string representing a written date and the format of the date, and returns the corresponding Date object.\r\n * @param str A string containing a written date that matches the format input.\r\n * @param format A string containing the matching format the str input is entered in.\r\n * @param lang The formatter-language to be used.\r\n */\r\nfunction parseDate(str, format, lang) {\r\n return formatter.getLangModule({ lang: lang }).date.parseDate(str, format);\r\n}\r\nexports.parseDate = parseDate;\r\n/**\r\n * Takes in a Date object and a format string, and returns a corresponding string with the formatted date.\r\n * @param date A Date object.\r\n * @param format A string containing the format for the date to be outputted in.\r\n * @param lang The formatter-language to be used.\r\n */\r\nfunction formatDate(date, format, lang) {\r\n return formatter.getLangModule({ lang: lang }).date.formatDate(date, format);\r\n}\r\nexports.formatDate = formatDate;\r\n/**\r\n * Takes in a language code and 5 functions, and registers a new language for local formatting use.\r\n * @param lang The name of the new language to be registered (preferably a 2 character ISO language code)\r\n * @param implementation The needed functions to register a new language. See [[FormatterLanguage]] for more details.\r\n */\r\nfunction registerLanguage(lang, implementation) {\r\n formatter.registerLanguage(lang, implementation);\r\n}\r\nexports.registerLanguage = registerLanguage;\r\n/**\r\n * Takes in the name of a registered language to be removed from the local formatting library.\r\n * @param lang The name of the language to be removed. English (\"en\") and French (\"fr\") cannot be removed.\r\n */\r\nfunction removeLanguage(lang) {\r\n formatter.removeLanguage(lang);\r\n}\r\nexports.removeLanguage = removeLanguage;\r\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssU0FBUyxNQUFNLHlCQUF5QixDQUFDO0FBRXJEOzs7O0dBSUc7QUFDSCxNQUFNLFVBQVUsTUFBTSxDQUFDLENBQVMsRUFBRSxPQUFxQztJQUNuRSxPQUFPLFNBQVMsQ0FBQyxhQUFhLENBQUMsT0FBTyxDQUFDLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxDQUFDLEVBQUUsT0FBTyxDQUFDLENBQUM7QUFDcEUsQ0FBQztBQUVEOzs7O0dBSUc7QUFDSCxNQUFNLFVBQVUsWUFBWSxDQUFDLENBQVMsRUFBRSxPQUFxQztJQUN6RSxPQUFPLFNBQVMsQ0FBQyxhQUFhLENBQUMsT0FBTyxDQUFDLENBQUMsSUFBSSxDQUFDLFlBQVksQ0FBQyxDQUFDLEVBQUUsT0FBTyxDQUFDLENBQUM7QUFDMUUsQ0FBQztBQUVEOzs7O0dBSUc7QUFDSCxNQUFNLFVBQVUsY0FBYyxDQUFDLENBQVMsRUFBRSxPQUFxQztJQUMzRSxPQUFPLFNBQVMsQ0FBQyxhQUFhLENBQUMsT0FBTyxDQUFDLENBQUMsSUFBSSxDQUFDLGNBQWMsQ0FBQyxDQUFDLEVBQUUsT0FBTyxDQUFDLENBQUM7QUFDNUUsQ0FBQztBQUVEOzs7O0dBSUc7QUFDSCxNQUFNLFVBQVUsZ0JBQWdCLENBQUMsQ0FBUyxFQUFFLE9BQXFDO0lBQzdFLE9BQU8sU0FBUyxDQUFDLGFBQWEsQ0FBQyxPQUFPLENBQUMsQ0FBQyxJQUFJLENBQUMsZ0JBQWdCLENBQUMsQ0FBQyxFQUFFLE9BQU8sQ0F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W1wbGVtZW50YXRpb24gVGhlIG5lZWRlZCBmdW5jdGlvbnMgdG8gcmVnaXN0ZXIgYSBuZXcgbGFuZ3VhZ2UuIFNlZSBbW0Zvcm1hdHRlckxhbmd1YWdlXV0gZm9yIG1vcmUgZGV0YWlscy5cclxuICovXHJcbmV4cG9ydCBmdW5jdGlvbiByZWdpc3Rlckxhbmd1YWdlKGxhbmc6IHN0cmluZywgaW1wbGVtZW50YXRpb246IGZvcm1hdHRlci5Gb3JtYXR0ZXJMYW5ndWFnZSk6IHZvaWQge1xyXG4gICAgZm9ybWF0dGVyLnJlZ2lzdGVyTGFuZ3VhZ2UobGFuZywgaW1wbGVtZW50YXRpb24pO1xyXG59XHJcblxyXG4vKipcclxuICogVGFrZXMgaW4gdGhlIG5hbWUgb2YgYSByZWdpc3RlcmVkIGxhbmd1YWdlIHRvIGJlIHJlbW92ZWQgZnJvbSB0aGUgbG9jYWwgZm9ybWF0dGluZyBsaWJyYXJ5LlxyXG4gKiBAcGFyYW0gbGFuZyBUaGUgbmFtZSBvZiB0aGUgbGFuZ3VhZ2UgdG8gYmUgcmVtb3ZlZC4gRW5nbGlzaCAoXCJlblwiKSBhbmQgRnJlbmNoIChcImZyXCIpIGNhbm5vdCBiZSByZW1vdmVkLlxyXG4gKi9cclxuZXhwb3J0IGZ1bmN0aW9uIHJlbW92ZUxhbmd1YWdlKGxhbmc6IHN0cmluZyk6IHZvaWQge1xyXG4gICAgZm9ybWF0dGVyLnJlbW92ZUxhbmd1YWdlKGxhbmcpO1xyXG59XHJcbiJdfQ==\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/event-emitter\", [\"@rmlibrary/event-emitter/src/index.js\"], function (d) { return d; });\r\ndefine(\"@rmlibrary/event-emitter/src/index.js\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.EventEmitter = void 0;\r\nvar EventEmitter = /** @class */ (function () {\r\n function EventEmitter() {\r\n this.handlers = {};\r\n }\r\n /**\r\n * Trigger any event handlers for the given event type\r\n * @param evtName The type of event\r\n * @param args Arguments to pass to the event handlers\r\n */\r\n EventEmitter.prototype.trigger = function (type, arg) {\r\n var handlers = this.getHandlers(type);\r\n if (!Array.isArray(handlers)) {\r\n return;\r\n }\r\n for (var _i = 0, handlers_1 = handlers; _i < handlers_1.length; _i++) {\r\n var handler = handlers_1[_i];\r\n if (typeof handler === \"function\")\r\n { handler(arg); }\r\n }\r\n return this;\r\n };\r\n /**\r\n * Attach an event listener for the given event type.\r\n * @param type The type of event.\r\n * @param handler The handler function to run when the event triggers.\r\n */\r\n EventEmitter.prototype.on = function (type, handler) {\r\n var handlers = this.getHandlers(type);\r\n if (!handlers) {\r\n this.handlers[type] = [];\r\n }\r\n this.addHandler(type, handler);\r\n return this;\r\n };\r\n /**\r\n * Remove previously added event listeners.\r\n * @param type The type of event.\r\n * @param handler The handler that should be removed. If not provided, then remove handlers for this event type.\r\n */\r\n EventEmitter.prototype.off = function (type, handler) {\r\n if (!handler) {\r\n this.clearAllHandlers(type);\r\n }\r\n else {\r\n var handlers = this.getHandlers(type);\r\n for (var i = handlers.length - 1; i >= 0; i--) {\r\n if (handlers[i] === handler) {\r\n handlers.splice(i, 1);\r\n }\r\n }\r\n }\r\n return this;\r\n };\r\n EventEmitter.prototype.getHandlers = function (type) {\r\n return this.handlers[type];\r\n };\r\n EventEmitter.prototype.addHandler = function (type, handler) {\r\n if (!this.handlers[type])\r\n { this.handlers[type] = []; }\r\n this.handlers[type].push(handler);\r\n };\r\n EventEmitter.prototype.clearAllHandlers = function (type) {\r\n this.handlers[type] = [];\r\n };\r\n return EventEmitter;\r\n}());\r\nexports.EventEmitter = EventEmitter;\r\nexports.default = EventEmitter;\r\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtJQUFBO1FBQ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hbmRsZXJzKHR5cGUpO1xyXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gaGFuZGxlcnMubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIHtcclxuICAgICAgICAgICAgICAgIGlmIChoYW5kbGVyc1tpXSA9PT0gaGFuZGxlcikge1xyXG4gICAgICAgICAgICAgICAgICAgIGhhbmRsZXJzLnNwbGljZShpLCAxKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gdGhpcztcclxuICAgIH1cclxuXHJcbiAgICBwcml2YXRlIGdldEhhbmRsZXJzPEsgZXh0ZW5kcyBrZXlvZiBUPih0eXBlOiBLKTogKChhcmc6IFRbS10pID0+IHZvaWQpW10ge1xyXG4gICAgICAgIHJldHVybiB0aGlzLmhhbmRsZXJzW3R5cGUgYXMgc3RyaW5nXTtcclxuICAgIH1cclxuICAgIHByaXZhdGUgYWRkSGFuZGxlcjxLIGV4dGVuZHMga2V5b2YgVD4odHlwZTogSywgaGFuZGxlcjogKGFyZzogVFtLXSkgPT4gdm9pZCk6IHZvaWQge1xyXG4gICAgICAgIGlmICghdGhpcy5oYW5kbGVyc1t0eXBlIGFzIHN0cmluZ10pIHRoaXMuaGFuZGxlcnNbdHlwZSBhcyBzdHJpbmddID0gW107XHJcbiAgICAgICAgdGhpcy5oYW5kbGVyc1t0eXBlIGFzIHN0cmluZ10ucHVzaChoYW5kbGVyKTtcclxuICAgIH1cclxuICAgIHByaXZhdGUgY2xlYXJBbGxIYW5kbGVyczxLIGV4dGVuZHMga2V5b2YgVD4odHlwZTogSyk6IHZvaWQge1xyXG4gICAgICAgIHRoaXMuaGFuZGxlcnNbdHlwZSBhcyBzdHJpbmddID0gW107XHJcbiAgICB9XHJcbn1cclxuXHJcbmV4cG9ydCBkZWZhdWx0IEV2ZW50RW1pdHRlcjtcclxuIl19\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/slider/src/index.js\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Slider = exports.SliderOptions = exports.SliderOrientation = void 0;\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b)\r\n { if (b.hasOwnProperty(p))\r\n { d[p] = b[p]; } } };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar event_emitter_1 = require(\"@rmlibrary/event-emitter\");\r\nvar documentScollingElement = document.scrollingElement || document.documentElement;\r\nvar DEFAULT_INNER_HTML = \"
    \\n
    \\n
    \\n
    \\n
    \";\r\nfunction isTouch(evt) {\r\n try {\r\n return evt instanceof TouchEvent;\r\n }\r\n catch (e) {\r\n return false;\r\n }\r\n}\r\n(function (SliderOrientation) {\r\n SliderOrientation[\"Vertical\"] = \"vertical\";\r\n SliderOrientation[\"VerticalReverse\"] = \"vertical-reverse\";\r\n SliderOrientation[\"Horizontal\"] = \"horizontal\";\r\n})(exports.SliderOrientation || (exports.SliderOrientation = {}));\r\nvar SliderOptions = /** @class */ (function () {\r\n function SliderOptions(options) {\r\n var _this = this;\r\n this._hasValuesArray = false;\r\n this.valueToNumber = function (v) {\r\n if (typeof v === \"number\")\r\n { return v; }\r\n throw new Error(\"We should never get here!\");\r\n };\r\n this.numberToValue = function (v) {\r\n return v;\r\n };\r\n if (\"values\" in options) {\r\n this._sections = [0, options.values.length - 1];\r\n this._steps = [1];\r\n this.valueToNumber = function (v) {\r\n var ind = options.values.indexOf(v);\r\n if (ind < 0) {\r\n throw new Error(\"Slider: \\\"\" + options.value + \"\\\" is not includes in the list of possible options.\");\r\n }\r\n return ind;\r\n };\r\n this.numberToValue = function (n) {\r\n return options.values[n];\r\n };\r\n this._valueText = function (n) { return _this.numberToValue(n).toString(); };\r\n if (\"value\" in options)\r\n { this._value = this.valueToNumber(options.value); }\r\n else\r\n { this._value = 0; }\r\n this._hasValuesArray = true;\r\n }\r\n else if (\"sections\" in options) {\r\n this._sections = options.sections;\r\n this._steps = options.steps;\r\n if (typeof options.value === \"number\")\r\n { this._value = options.value; }\r\n else\r\n { this._value = this._sections[0]; }\r\n }\r\n else {\r\n this._sections = [options.min, options.max];\r\n this._steps = [options.step || 1];\r\n if (typeof options.value === \"number\")\r\n { this._value = options.value; }\r\n else\r\n { this._value = this._sections[0]; }\r\n }\r\n if (options.orientation)\r\n { this._orientation = options.orientation; }\r\n else\r\n { this._orientation = exports.SliderOrientation.Horizontal; }\r\n this._snap = false;\r\n if (options.snap) {\r\n this._snap = options.snap === true ? \"round\" : options.snap;\r\n }\r\n this._keyStep = options.keyStep;\r\n if (typeof options.valueText === \"function\") {\r\n this._valueText = options.valueText;\r\n }\r\n if (options.ariaLabel) {\r\n this._ariaLabel = options.ariaLabel;\r\n }\r\n if (options.ariaLabelledBy) {\r\n this._ariaLabelledBy = options.ariaLabelledBy;\r\n }\r\n }\r\n Object.defineProperty(SliderOptions.prototype, \"sections\", {\r\n get: function () {\r\n return this._sections;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SliderOptions.prototype, \"steps\", {\r\n get: function () {\r\n return this._steps;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SliderOptions.prototype, \"value\", {\r\n get: function () {\r\n return this._value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SliderOptions.prototype, \"orientation\", {\r\n get: function () {\r\n return this._orientation;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SliderOptions.prototype, \"snap\", {\r\n get: function () {\r\n return this._snap;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SliderOptions.prototype, \"keyStep\", {\r\n get: function () {\r\n return this._keyStep;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SliderOptions.prototype, \"valueText\", {\r\n get: function () {\r\n return this._valueText;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SliderOptions.prototype, \"ariaLabel\", {\r\n get: function () {\r\n return this._ariaLabel;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SliderOptions.prototype, \"ariaLabelledBy\", {\r\n get: function () {\r\n return this._ariaLabelledBy;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return SliderOptions;\r\n}());\r\nexports.SliderOptions = SliderOptions;\r\nvar Slider = /** @class */ (function (_super) {\r\n __extends(Slider, _super);\r\n function Slider(element, options) {\r\n var _this = _super.call(this) || this;\r\n _this._handleLock = false;\r\n _this.handleDown = function (evt) {\r\n evt.preventDefault();\r\n _this._handleLock = true;\r\n _this.trigger(\"down\", null);\r\n _this._evtValues = {\r\n startX: _this.getPos(evt),\r\n startLeft: _this.elements.handle.offsetLeft,\r\n startTop: _this.elements.handle.offsetTop,\r\n };\r\n _this.elements.handle.focus();\r\n document.addEventListener(\"mousemove\", _this.handleMove);\r\n document.addEventListener(\"touchmove\", _this.handleMove, { passive: false });\r\n document.addEventListener(\"mouseup\", _this.handleUp);\r\n document.addEventListener(\"touchend\", _this.handleUp, { passive: false });\r\n };\r\n _this.handleBgDown = function (evt) {\r\n if (_this._handleLock)\r\n { return; }\r\n evt.preventDefault();\r\n _this.trigger(\"down\", null);\r\n var pos = _this.getPos(evt);\r\n _this._evtValues = {\r\n startX: pos,\r\n startLeft: pos - _this.elements.track.getBoundingClientRect().left - documentScollingElement.scrollLeft,\r\n startTop: pos - _this.elements.track.getBoundingClientRect().top - documentScollingElement.scrollTop,\r\n };\r\n // this.elements.handle.focus();\r\n document.addEventListener(\"mousemove\", _this.handleMove);\r\n document.addEventListener(\"touchmove\", _this.handleMove, { passive: false });\r\n document.addEventListener(\"mouseup\", _this.handleUp);\r\n document.addEventListener(\"touchend\", _this.handleUp, { passive: false });\r\n _this.handleMove(evt);\r\n };\r\n _this.handleMove = function (evt) {\r\n evt.preventDefault();\r\n var evtValues = _this._evtValues;\r\n var x = _this.getPos(evt);\r\n var dx = x - evtValues.startX;\r\n var orientation = _this.options.orientation;\r\n var position = (orientation !== exports.SliderOrientation.Horizontal ? evtValues.startTop : evtValues.startLeft) + dx;\r\n var maxPosition = orientation !== exports.SliderOrientation.Horizontal\r\n ? _this.elements.track.offsetHeight\r\n : _this.elements.track.offsetWidth;\r\n position = Math.max(0, Math.min(maxPosition, position));\r\n var percent = position / maxPosition;\r\n // if (orientation === SliderOrientation.VerticalReverse) percent = 1 - percent;\r\n var val = _this.getValueFromPercent(percent);\r\n // this.setPosition(val);\r\n _this.setPositionPercent(percent);\r\n var vMin = _this.options.sections[0];\r\n var vMax = _this.options.sections[_this.options.sections.length - 1];\r\n val = Math.min(vMax, Math.max(vMin, val));\r\n _this._value = val;\r\n _this.setAria();\r\n _this.trigger(\"change\", val);\r\n };\r\n _this.handleUp = function (evt) {\r\n evt.preventDefault();\r\n document.removeEventListener(\"mousemove\", _this.handleMove);\r\n document.removeEventListener(\"touchmove\", _this.handleMove, {});\r\n document.removeEventListener(\"mouseup\", _this.handleUp);\r\n document.removeEventListener(\"touchend\", _this.handleUp, {});\r\n var val = _this._value;\r\n if (_this.options.snap)\r\n { _this.setPosition(val); }\r\n _this._handleLock = false;\r\n _this.trigger(\"up\", val);\r\n };\r\n _this.handleKeyUp = function (evt) {\r\n if (!_this.downKey)\r\n { return; }\r\n if (evt.which === _this.downKey) {\r\n _this.downKey = null;\r\n _this.trigger(\"up\", _this._value);\r\n }\r\n };\r\n _this.handleKeyDown = function (evt) {\r\n if (evt.which === 38 || evt.which === 39) {\r\n // Up/Right\r\n if (!_this.downKey)\r\n { _this.trigger(\"down\", null); }\r\n _this.downKey = evt.which;\r\n _this.step(1);\r\n evt.preventDefault();\r\n }\r\n else if (evt.which === 37 || evt.which === 40) {\r\n // Left/Down\r\n if (!_this.downKey)\r\n { _this.trigger(\"down\", null); }\r\n _this.downKey = evt.which;\r\n _this.step(-1);\r\n evt.preventDefault();\r\n }\r\n else if (evt.which === 33) {\r\n // Page Up\r\n if (!_this.downKey)\r\n { _this.trigger(\"down\", null); }\r\n _this.downKey = evt.which;\r\n _this.step(1, true);\r\n evt.preventDefault();\r\n }\r\n else if (evt.which === 34) {\r\n // Page Down\r\n if (!_this.downKey)\r\n { _this.trigger(\"down\", null); }\r\n _this.downKey = evt.which;\r\n _this.step(-1, true);\r\n evt.preventDefault();\r\n }\r\n else if (evt.which === 35) {\r\n // End\r\n if (!_this.downKey)\r\n { _this.trigger(\"down\", null); }\r\n _this.downKey = evt.which;\r\n _this.gotoEnd();\r\n evt.preventDefault();\r\n }\r\n else if (evt.which === 36) {\r\n // Home\r\n if (!_this.downKey)\r\n { _this.trigger(\"down\", null); }\r\n _this.downKey = evt.which;\r\n _this.gotoStart();\r\n evt.preventDefault();\r\n }\r\n };\r\n element.innerHTML = DEFAULT_INNER_HTML;\r\n element.classList.add(\"rm-slider\");\r\n _this.elements = {\r\n main: element,\r\n track: element.querySelector(\".rm-slider-track\"),\r\n trackBefore: element.querySelector(\".rm-slider-track-before\"),\r\n trackAfter: element.querySelector(\".rm-slider-track-after\"),\r\n handle: element.querySelector(\".rm-slider-handle\"),\r\n };\r\n _this.setOptions(options);\r\n _this.elements.handle.addEventListener(\"mousedown\", _this.handleDown);\r\n _this.elements.handle.addEventListener(\"touchstart\", _this.handleDown, { passive: false });\r\n _this.elements.main.addEventListener(\"mousedown\", _this.handleBgDown);\r\n _this.elements.main.addEventListener(\"touchstart\", _this.handleBgDown, { passive: false });\r\n _this.elements.handle.addEventListener(\"keydown\", _this.handleKeyDown);\r\n _this.elements.handle.addEventListener(\"keyup\", _this.handleKeyUp);\r\n return _this;\r\n }\r\n Slider.prototype.destroy = function () {\r\n this.elements.handle.removeEventListener(\"mousedown\", this.handleDown);\r\n this.elements.handle.removeEventListener(\"touchstart\", this.handleDown, {});\r\n this.elements.main.removeEventListener(\"mousedown\", this.handleBgDown);\r\n this.elements.main.removeEventListener(\"touchstart\", this.handleBgDown, {});\r\n this.elements.handle.removeEventListener(\"keydown\", this.handleKeyDown);\r\n this.elements.handle.removeEventListener(\"keyup\", this.handleKeyUp);\r\n };\r\n Object.defineProperty(Slider.prototype, \"options\", {\r\n get: function () {\r\n return this._options;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Slider.prototype.setOptions = function (options) {\r\n if (options instanceof SliderOptions)\r\n { this._options = options; }\r\n else\r\n { this._options = new SliderOptions(options); }\r\n if (this.options.orientation === exports.SliderOrientation.Horizontal) {\r\n this.elements.main.classList.add(\"rm-slider-horizontal\");\r\n this.elements.main.classList.remove(\"rm-slider-vertical\");\r\n }\r\n else {\r\n this.elements.main.classList.remove(\"rm-slider-horizontal\");\r\n this.elements.main.classList.add(\"rm-slider-vertical\");\r\n if (this.options.orientation === exports.SliderOrientation.VerticalReverse) {\r\n this.elements.main.classList.add(\"rm-slider-vertical-reverse\");\r\n }\r\n }\r\n if (options.ariaLabelledBy) {\r\n this.elements.handle.removeAttribute(\"aria-label\");\r\n this.elements.handle.setAttribute(\"aria-labelledby\", options.ariaLabelledBy);\r\n }\r\n else if (options.ariaLabel) {\r\n this.elements.handle.removeAttribute(\"aria-labelledby\");\r\n this.elements.handle.setAttribute(\"aria-label\", options.ariaLabel);\r\n }\r\n else {\r\n this.elements.handle.removeAttribute(\"aria-label\");\r\n this.elements.handle.removeAttribute(\"aria-labelledby\");\r\n }\r\n this.setValue(this.options.numberToValue(this._options.value), true);\r\n };\r\n Object.defineProperty(Slider.prototype, \"value\", {\r\n get: function () {\r\n return this.options.numberToValue(this._value);\r\n },\r\n set: function (v) {\r\n this.setValue(v);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Slider.prototype.setValue = function (v, suppressValueError) {\r\n if (suppressValueError === void 0) {\r\n suppressValueError = false;\r\n }\r\n var vNum;\r\n try {\r\n vNum = this.options.valueToNumber(v);\r\n }\r\n catch (e) {\r\n if (!suppressValueError)\r\n { throw e; }\r\n else\r\n { vNum = 0; }\r\n }\r\n var sections = this.options.sections;\r\n var numSections = sections.length - 1;\r\n if (vNum < sections[0] || vNum > sections[numSections]) {\r\n throw new Error(\"Slider: value is outside of valid range: \" + v);\r\n }\r\n this.setPosition(vNum);\r\n this._value = vNum;\r\n this.setAria();\r\n };\r\n Slider.prototype.setPositionPercent = function (percent) {\r\n var orientation = this.options.orientation;\r\n var prop = orientation === exports.SliderOrientation.Horizontal ? \"left\" : \"top\";\r\n var otherProp = orientation === exports.SliderOrientation.Horizontal ? \"top\" : \"left\";\r\n this.elements.handle.style[prop] = percent * 100 + \"%\";\r\n this.elements.handle.style[otherProp] = \"\";\r\n var wProp = orientation === exports.SliderOrientation.Horizontal ? \"width\" : \"height\";\r\n var wOtherProp = orientation === exports.SliderOrientation.Horizontal ? \"height\" : \"width\";\r\n this.elements.trackBefore.style[wProp] = percent * 100 + \"%\";\r\n this.elements.trackBefore.style[wOtherProp] = \"\";\r\n this.elements.trackAfter.style[wProp] = (1 - percent) * 100 + \"%\";\r\n this.elements.trackAfter.style[wOtherProp] = \"\";\r\n };\r\n Slider.prototype.setPosition = function (v) {\r\n var sections = this.options.sections;\r\n var numSections = sections.length - 1;\r\n var currentSection = 0;\r\n while (v > sections[currentSection + 1])\r\n { currentSection++; }\r\n var stepMin = sections[currentSection];\r\n var stepMax = sections[currentSection + 1];\r\n var percentInStep = (v - stepMin) / (stepMax - stepMin);\r\n var percent = percentInStep / numSections + currentSection / numSections;\r\n var orientation = this.options.orientation;\r\n if (orientation === exports.SliderOrientation.VerticalReverse)\r\n { percent = 1 - percent; }\r\n this.setPositionPercent(percent);\r\n };\r\n Slider.prototype.setAria = function () {\r\n this.elements.handle.setAttribute(\"role\", \"slider\");\r\n this.elements.handle.setAttribute(\"aria-valuenow\", this._value.toString());\r\n if (this.options.valueText) {\r\n this.elements.handle.setAttribute(\"aria-valuetext\", this.options.valueText(this._value, this));\r\n }\r\n this.elements.handle.setAttribute(\"aria-valuemin\", this.options.sections[0].toString());\r\n this.elements.handle.setAttribute(\"aria-valuemax\", this.options.sections[this.options.sections.length - 1].toString());\r\n };\r\n Slider.prototype.getPos = function (evt) {\r\n var orientation = this.options.orientation;\r\n var isVertical = orientation !== exports.SliderOrientation.Horizontal;\r\n if (isTouch(evt)) {\r\n return isVertical ? evt.touches[0].pageY : evt.touches[0].pageX;\r\n }\r\n else {\r\n return isVertical ? evt.pageY : evt.pageX;\r\n }\r\n };\r\n Slider.prototype.getValueFromPercent = function (percent) {\r\n percent = Math.max(0, Math.min(1, percent));\r\n if (this.options.orientation === exports.SliderOrientation.VerticalReverse)\r\n { percent = 1 - percent; }\r\n var numSections = this.options.sections.length - 1;\r\n var currentSection = Math.min(Math.floor(numSections * percent), numSections - 1);\r\n var percentInStep = (percent - currentSection / numSections) * numSections;\r\n var stepMin = this.options.sections[currentSection];\r\n var stepMax = this.options.sections[currentSection + 1];\r\n var roundTo = this.options.steps[currentSection];\r\n var roundFn = function (v) { return Math.round(v); };\r\n if (this.options.snap === \"floor\") {\r\n roundFn = function (v) { return Math.floor(v); };\r\n }\r\n else if (this.options.snap === \"ceil\") {\r\n roundFn = function (v) { return Math.ceil(v); };\r\n }\r\n var tmpVal = roundFn(((stepMax - stepMin) * percentInStep) / roundTo) * roundTo;\r\n return tmpVal + stepMin;\r\n };\r\n Slider.prototype.gotoStart = function () {\r\n var sections = this.options.sections;\r\n var val = sections[0];\r\n if (this._value === val)\r\n { return; }\r\n this.setPosition(val);\r\n this._value = val;\r\n this.setAria();\r\n this.trigger(\"change\", val);\r\n };\r\n Slider.prototype.gotoEnd = function () {\r\n var sections = this.options.sections;\r\n var val = sections[sections.length - 1];\r\n if (this._value === val)\r\n { return; }\r\n this.setPosition(val);\r\n this._value = val;\r\n this.setAria();\r\n this.trigger(\"change\", val);\r\n };\r\n Slider.prototype.step = function (d, isJump) {\r\n if (isJump === void 0) {\r\n isJump = false;\r\n }\r\n var sections = this.options.sections;\r\n var numSections = sections.length - 1;\r\n var val = this._value;\r\n var keyStep = this.options.keyStep;\r\n if (!keyStep) {\r\n if (d === 0)\r\n { return; }\r\n if (d < 0 && val <= sections[0])\r\n { return; }\r\n if (d > 0 && val >= sections[numSections])\r\n { return; }\r\n var currentSection = 0;\r\n while (val > sections[currentSection + 1])\r\n { currentSection++; }\r\n if (val === sections[currentSection] && d < 0)\r\n { currentSection -= 1; }\r\n if (val === sections[currentSection + 1] && d > 0)\r\n { currentSection += 1; }\r\n var roundTo = this.options.steps[currentSection];\r\n var stepInSection = (val - sections[currentSection]) / roundTo;\r\n var betweenSteps = stepInSection % 1 > 0.0001;\r\n if (betweenSteps) {\r\n stepInSection = d > 0 ? Math.ceil(stepInSection) : Math.floor(stepInSection);\r\n }\r\n else {\r\n stepInSection = d > 0 ? stepInSection + 1 : stepInSection - 1;\r\n }\r\n val = stepInSection * roundTo + sections[currentSection];\r\n }\r\n else {\r\n var newValue = keyStep(d, isJump, this);\r\n val = this.options.valueToNumber(newValue);\r\n if (val <= sections[0])\r\n { val = sections[0]; }\r\n if (val >= sections[numSections])\r\n { val = sections[numSections]; }\r\n }\r\n this.setPosition(val);\r\n this._value = val;\r\n this.setAria();\r\n this.trigger(\"change\", val);\r\n };\r\n Slider.Horizontal = exports.SliderOrientation.Horizontal;\r\n Slider.Vertical = exports.SliderOrientation.Vertical;\r\n Slider.VerticalReverse = exports.SliderOrientation.VerticalReverse;\r\n return Slider;\r\n}(event_emitter_1.EventEmitter));\r\nexports.Slider = Slider;\r\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7O0FBQU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B7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgU2xpZGVyOiBcIiR7b3B0aW9ucy52YWx1ZX1cIiBpcyBub3QgaW5jbHVkZXMgaW4gdGhlIGxpc3Qgb2YgcG9zc2libGUgb3B0aW9ucy5gKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluZDtcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHRoaXMubnVtYmVyVG9WYWx1ZSA9IChuOiBudW1iZXIpID0+IHtcbiAgICAgICAgICAgICAgICByZXR1cm4gb3B0aW9ucy52YWx1ZXNbbl07XG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICB0aGlzLl92YWx1ZVRleHQgPSAobjogbnVtYmVyKSA9PiB0aGlzLm51bWJlclRvVmFsdWUobikudG9TdHJpbmcoKTtcblxuICAgICAgICAgICAgaWYgKFwidmFsdWVcIiBpbiBvcHRpb25zKSB0aGlzLl92YWx1ZSA9IHRoaXMudmFsdWVUb051bWJlcihvcHRpb25zLnZhbHVlKTtcbiAgICAgICAgICAgIGVsc2UgdGhpcy5fdmFsdWUgPSAwO1xuXG4gICAgICAgICAgICB0aGlzLl9oYXNWYWx1ZXNBcnJheSA9IHRydWU7XG4gICAgICAgIH0gZWxzZSBpZiAoXCJzZWN0aW9uc1wiIGluIG9wdGlvbnMpIHtcbiAgICAgICAgICAgIHRoaXMuX3NlY3Rpb25zID0gb3B0aW9ucy5zZWN0aW9ucztcbiAgICAgICAgICAgIHRoaXMuX3N0ZXBzID0gb3B0aW9ucy5zdGVwcztcblxuICAgICAgICAgICAgaWYgKHR5cGVvZiBvcHRpb25zLnZhbHVlID09PSBcIm51bWJlclwiKSB0aGlzLl92YWx1ZSA9IG9wdGlvbnMudmFsdWU7XG4gICAgICAgICAgICBlbHNlIHRoaXMuX3ZhbHVlID0gdGhpcy5fc2VjdGlvbnNbMF07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgIC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oaWNoID09PSAzOSkge1xuICAgICAgICAgICAgLy8gVXAvUmlnaHRcbiAgICAgICAgICAgIGlmICghdGhpcy5kb3duS2V5KSB0aGlzLnRyaWdnZXIoXCJkb3duXCIsIG51bGwpO1xuICAgICAgICAgICAgdGhpcy5kb3duS2V5ID0gZXZ0LndoaWNoO1xuICAgICAgICAgICAgdGhpcy5zdGVwKDEpO1xuICAgICAgICAgICAgZXZ0LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgIH0gZWxzZSBpZiAoZXZ0LndoaWNoID09PSAzNyB8fCBldnQud2hpY2ggPT09IDQwKSB7XG4gICAgICAgICAgICAvLyBMZWZ0L0Rvd25cbiAgICAgICAgICAgIGlmICghdGhpcy5kb3duS2V5KSB0aGlzLnRyaWdnZXIoXCJkb3duXCIsIG51bGwpO1xuICAgICAgICAgICAgdGhpcy5kb3duS2V5ID0gZXZ0LndoaWNoO1xuICAgICAgICAgICAgdGhpcy5zdGVwKC0xKTtcbiAgICAgICAgICAgIGV2dC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICB9IGVsc2UgaWYgKGV2dC53aGljaCA9PT0gMzMpIHtcbiAgICAgICAgICAgIC8vIFBhZ2UgVXBcbiAgICAgICAgICAgIGlmICghdGhpcy5kb3duS2V5KSB0aGlzLnRyaWdnZXIoXCJkb3duXCIsIG51bGwpO1xuICAgICAgICAgICAgdGhpcy5kb3duS2V5ID0gZXZ0LndoaWNoO1xuICAgICAgICAgICAgdGhpcy5zdGVwKDEsIHRydWUpO1xuICAgICAgICAgICAgZXZ0LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgIH0gZWxzZSBpZiAoZXZ0LndoaWNoID09PSAzNCkge1xuICAgICAgICAgICAgLy8gUGFnZSBEb3duXG4gICAgICAgICAgICBpZiAoIXRoaXMuZG93bktleSkgdGhpcy50cmlnZ2VyKFwiZG93blwiLCBudWxsKTtcbiAgICAgICAgICAgIHRoaXMuZG93bktleSA9IGV2dC53aGljaDtcbiAgICAgICAgICAgIHRoaXMuc3RlcCgtMSwgdHJ1ZSk7XG4gICAgICAgICAgICBldnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgfSBlbHNlIGlmIChldnQud2hpY2ggPT09IDM1KSB7XG4gICAgICAgICAgICAvLyBFbmRcbiAgICAgICAgICAgIGlmICghdGhpcy5kb3duS2V5KSB0aGlzLnRyaWdnZXIoXCJkb3duXCIsIG51bGwpO1xuICAgICAgICAgICAgdGhpcy5kb3duS2V5ID0gZXZ0LndoaWNoO1xuICAgICAgICAgICAgdGhpcy5nb3RvRW5kKCk7XG4gICAgICAgICAgICBldnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgfSBlbHNlIGlmIChldnQud2hpY2ggPT09IDM2KSB7XG4gICAgICAgICAgICAvLyBIb21lXG4gICAgICAgICAgICBpZiAoIXRoaXMuZG93bktleSkgdGhpcy50cmlnZ2VyKFwiZG93blwiLCBudWxsKTtcbiAgICAgICAgICAgIHRoaXMuZG93bktleSA9IGV2dC53aGljaDtcbiAgICAgICAgICAgIHRoaXMuZ290b1N0YXJ0KCk7XG4gICAgICAgICAgICBldnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgfVxuICAgIH07XG59XG4iXX0=\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/slider/src/custom-element.js\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.RMSliderElement = void 0;\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b)\r\n { if (b.hasOwnProperty(p))\r\n { d[p] = b[p]; } } };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar custom_elements_1 = require(\"@rmlibrary/custom-elements\");\r\nvar index_js_1 = require(\"./index.js\");\r\nvar RMSliderElement = /** @class */ (function (_super) {\r\n __extends(RMSliderElement, _super);\r\n function RMSliderElement() {\r\n var _this = _super.call(this) || this;\r\n _this.slider = null;\r\n _this.handleInit = _this.handleEvent(\"init\");\r\n _this.handleSliderChange = _this.handleEvent(\"change\");\r\n _this.handleSliderUp = _this.handleEvent(\"rm-slider-up\");\r\n _this.handleSliderDown = _this.handleEvent(\"rm-slider-down\");\r\n return _this;\r\n }\r\n Object.defineProperty(RMSliderElement, \"observedAttributes\", {\r\n get: function () {\r\n return [\"value\"];\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n RMSliderElement.prototype.getAttributeOptions = function () {\r\n var orientation = index_js_1.SliderOrientation.Horizontal;\r\n if (this.getAttribute(\"orientation\") === \"vertical\")\r\n { orientation = index_js_1.SliderOrientation.Vertical; }\r\n if (this.getAttribute(\"orientation\") === \"vertical-reverse\")\r\n { orientation = index_js_1.SliderOrientation.VerticalReverse; }\r\n var snap = this.hasAttribute(\"snap\");\r\n if (this.hasAttribute(\"sections\") && this.hasAttribute(\"steps\")) {\r\n var value = this.hasAttribute(\"value\") ? Number(this.getAttribute(\"value\")) : undefined;\r\n var sections = this.getAttribute(\"sections\")\r\n .split(\",\")\r\n .map(function (n) { return Number(n.trim()); });\r\n var steps = this.getAttribute(\"steps\")\r\n .split(\",\")\r\n .map(function (n) { return Number(n.trim()); });\r\n return new index_js_1.SliderOptions({ sections: sections, steps: steps, value: value, orientation: orientation, snap: snap });\r\n }\r\n else if (this.hasAttribute(\"min\") && this.hasAttribute(\"max\")) {\r\n var min = Number(this.getAttribute(\"min\"));\r\n var max = Number(this.getAttribute(\"max\"));\r\n var value = this.hasAttribute(\"value\") ? Number(this.getAttribute(\"value\")) : undefined;\r\n return new index_js_1.SliderOptions({ min: min, max: max, value: value, orientation: orientation, snap: snap });\r\n }\r\n else if (this.hasAttribute(\"values\")) {\r\n var values = this.getAttribute(\"values\")\r\n .split(\",\")\r\n .map(function (n) { return n.trim(); });\r\n var value = this.hasAttribute(\"value\") ? this.getAttribute(\"value\") : undefined;\r\n return new index_js_1.SliderOptions({ values: values, value: value, orientation: orientation, snap: snap });\r\n }\r\n return null;\r\n };\r\n RMSliderElement.prototype.connectedCallback = function () {\r\n if (!this.savedOptions)\r\n { this.savedOptions = this.getAttributeOptions(); }\r\n if (!this.savedOptions) {\r\n console.warn(\"Could not intialize slider!\");\r\n return;\r\n }\r\n this.slider = new index_js_1.Slider(this, this.savedOptions);\r\n this.slider.on(\"change\", this.handleSliderChange);\r\n this.slider.on(\"up\", this.handleSliderUp);\r\n this.slider.on(\"down\", this.handleSliderDown);\r\n this.handleInit();\r\n };\r\n RMSliderElement.prototype.disconnectedCallback = function () {\r\n this.slider.off(\"change\", this.handleSliderChange);\r\n this.slider.off(\"up\", this.handleSliderUp);\r\n this.slider.off(\"down\", this.handleSliderDown);\r\n this.slider.destroy();\r\n this.slider = null;\r\n };\r\n Object.defineProperty(RMSliderElement.prototype, \"value\", {\r\n get: function () {\r\n return this.slider ? this.slider.value : null;\r\n },\r\n set: function (v) {\r\n if (this.slider)\r\n { this.slider.value = v; }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n RMSliderElement.prototype.handleEvent = function (name) {\r\n var _this = this;\r\n return function () {\r\n var event = document.createEvent(\"Event\");\r\n event.initEvent(name, true, false);\r\n _this.dispatchEvent(event);\r\n };\r\n };\r\n Object.defineProperty(RMSliderElement.prototype, \"options\", {\r\n get: function () {\r\n return this.savedOptions;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n RMSliderElement.prototype.setOptions = function (options) {\r\n this.savedOptions = new index_js_1.SliderOptions(options);\r\n if (!this.slider)\r\n { this.connectedCallback(); }\r\n else\r\n { this.slider.setOptions(this.savedOptions); }\r\n };\r\n RMSliderElement.prototype.attributeChangedCallback = function (name, oldValue, newValue) {\r\n if (name === \"value\") {\r\n var numberValue = Number(newValue);\r\n if (isNaN(numberValue))\r\n { this.value = newValue; }\r\n else\r\n { this.value = numberValue; }\r\n }\r\n };\r\n return RMSliderElement;\r\n}(custom_elements_1.HTMLCustomElement));\r\nexports.RMSliderElement = RMSliderElement;\r\n(0, custom_elements_1.registerElement)(\"rm-slider\", RMSliderElement);\r\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9jdXN0b20tZWxlbWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7O0FBQUEsT0FBTyxFQUFFLGlCQUFpQixFQUFFLGVBQWUsRUFBRSxNQUFNLDRCQUE0QixDQUFDO0FBQ2hGLE9BQU8sRUFBRSxNQUFNLEVBQXNCLGFBQWEsRUFBRSxpQkFBaUIsRUFBRSxNQUFNLFlBQVksQ0FBQztBQUUxRjtJQUFxQyxtQ0FBaUI7SUFRbEQ7UUFBQSxZQUNJLGlCQUFPLFNBQ1Y7UUFUTyxZQUFNLEdBQTRCLElBQUksQ0FBQztRQXNGdkMsZ0JBQVUsR0FBRyxLQUFJLENBQUMsV0FBVyxDQUFDLE1BQU0sQ0FBQyxDQUFDO1FBQ3RDLHdCQUFrQixHQUFHLEtBQUksQ0FBQyxXQUFXLENBQUMsUUFBUSxDQUFDLENBQUM7UUFDaEQsb0JBQWMsR0FBRyxLQUFJLENBQUMsV0FBVyxDQUFDLGNBQWMsQ0FBQyxDQUFDO1FBQ2xELHNCQUFnQixHQUFHLEtBQUksQ0FBQyxXQUFXLENBQUMsZ0JBQWdCLENBQUMsQ0FBQzs7SUFoRjlELENBQUM7SUFORCxzQkFBa0IscUNBQWtCO2FBQXBDO1lBQ0ksT0FBTyxDQUFDLE9BQU8sQ0FBQyxDQUFDO1FBQ3JCLENBQUM7OztPQUFBO0lBTU8sNkNBQW1CLEdBQTNCO1FBQ0ksSUFBSSxXQUFXLEdBQXN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H1cblxuICAgIHB1YmxpYyBhdHRyaWJ1dGVDaGFuZ2VkQ2FsbGJhY2sobmFtZTogc3RyaW5nLCBvbGRWYWx1ZTogc3RyaW5nLCBuZXdWYWx1ZTogc3RyaW5nKTogdm9pZCB7XG4gICAgICAgIGlmIChuYW1lID09PSBcInZhbHVlXCIpIHtcbiAgICAgICAgICAgIGNvbnN0IG51bWJlclZhbHVlID0gTnVtYmVyKG5ld1ZhbHVlKTtcbiAgICAgICAgICAgIGlmIChpc05hTihudW1iZXJWYWx1ZSkpIHRoaXMudmFsdWUgPSBuZXdWYWx1ZTtcbiAgICAgICAgICAgIGVsc2UgdGhpcy52YWx1ZSA9IG51bWJlclZhbHVlO1xuICAgICAgICB9XG4gICAgfVxufVxuXG5yZWdpc3RlckVsZW1lbnQoXCJybS1zbGlkZXJcIiwgUk1TbGlkZXJFbGVtZW50KTtcbiJdfQ==\r\n//# sourceMappingURL=module.js.map\r\n});define(\"@rmlibrary/canvas-player-controls\", [\"@rmlibrary/canvas-player-controls/src/index.js\"], function (d) { return d; });\r\ndefine(\"@rmlibrary/canvas-player-controls/src/index.js\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b)\r\n { if (b.hasOwnProperty(p))\r\n { d[p] = b[p]; } } };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nrequire(\"@rmlibrary/slider/src/custom-element.js\");\r\nvar Focus = require(\"./focus.js\");\r\nvar custom_elements_1 = require(\"@rmlibrary/custom-elements\");\r\nvar utilities_js_1 = require(\"./utilities.js\");\r\nvar accessibility_js_1 = require(\"./accessibility.js\");\r\nvar throttle_js_1 = require(\"./throttle.js\");\r\nvar RMCPControlsElement = /** @class */ (function (_super) {\r\n __extends(RMCPControlsElement, _super);\r\n function RMCPControlsElement() {\r\n var _this = _super.call(this) || this;\r\n // boolean properties\r\n _this.allowIndicators = false; // determines if indicators should be shown when video is played/paused\r\n _this.preventClickAction = false; // prevents doubleclick from playing/pausing video (should only allow for fullscreen/exit full screen mode)\r\n _this.hideControls = true; // tracks if the controls should be hidden\r\n _this.isSeeking = false; // allows for the handling of play/pause when video is seeking\r\n _this.resumePlay = false; // tracks if the video was playing before seeking in order to resume playing on release of slider-handle (if true, resume playing, if false, leave paused)\r\n _this.touchDevice = false; // tracks if the device has a touchscreen\r\n // allows for manipulation of captions/transcript\r\n _this.formatTranscript = function (str) { return str; };\r\n _this.transcriptHTMLRef = null; // holds a reference to the transcript HTML\r\n _this.transcriptHTMLContainerSelector = \"\";\r\n _this.transcriptHTMLUrl = \"\";\r\n _this.transcriptWindowFeatures = null;\r\n // seekbar options (allows user to jump frames using keyboard and seekbar)\r\n _this.sliderOptions = {\r\n min: 0,\r\n max: 1000,\r\n value: 0,\r\n keyStep: function (direction, isJump, slider) {\r\n var delta = ((isJump ? 20 : 5) * 1000) / _this.duration;\r\n return direction > 0 ? slider.value + delta : slider.value - delta;\r\n },\r\n };\r\n // player controls timer\r\n _this.playerControlsTimeout = 3000;\r\n _this.playerControlsTimer = 0;\r\n _this.clickActionDelay = 500;\r\n _this.clickActionTimer = 0;\r\n /*\r\n * the following property allows for customization of action on end of animation\r\n * options: stop, stopNoReplayBtn, loop, restart (see onEnd function)\r\n */\r\n _this.endAction = \"stopNoReplayBtn\"; // stopNoReplayBtn is the default\r\n // adds a timeout on how often the player calls goToFrame on change (used in change handler)\r\n _this.throttleGoToFrame = (0, throttle_js_1.throttle)(function (frame) { return _this.player.goToFrame(frame); }, 50, false);\r\n _this.handleKeyDown = _this.handleKeyDown.bind(_this);\r\n _this.handleControlsKeyDown = _this.handleControlsKeyDown.bind(_this);\r\n _this.handleTouchStart = _this.handleTouchStart.bind(_this);\r\n _this.handleRmSliderDown = _this.handleRmSliderDown.bind(_this);\r\n _this.handleRMSliderChange = _this.handleRMSliderChange.bind(_this);\r\n _this.handleRMSliderUp = _this.handleRMSliderUp.bind(_this);\r\n _this.handleMouseMove = _this.handleMouseMove.bind(_this);\r\n _this.handleMouseLeave = _this.handleMouseLeave.bind(_this);\r\n _this.handleFocusIn = _this.handleFocusIn.bind(_this);\r\n _this.handleFocusOut = _this.handleFocusOut.bind(_this);\r\n _this.handleDblClick = _this.handleDblClick.bind(_this);\r\n _this.handleClick = _this.handleClick.bind(_this);\r\n return _this;\r\n }\r\n // function to handle play/pause on video when the spacebar key is pressed\r\n RMCPControlsElement.prototype.handleKeyDown = function (event) {\r\n if ((0, accessibility_js_1.isTabbable)(event.target)) {\r\n return;\r\n }\r\n /*\r\n * Prevents the browser default behaviour of the page scrolling\r\n * down when the spacebar key is pressed.\r\n */\r\n /*\r\n if (event.key === \" \" || event.key === \"Spacebar\") {\r\n this.togglePlay(false, true);\r\n this.cpContainer.focus();\r\n this.hideControls = true;\r\n \r\n event.preventDefault();\r\n }*/\r\n };\r\n // check if browser supports full screen mode\r\n RMCPControlsElement.prototype.isFullscreenSupported = function () {\r\n var document = window.document;\r\n return document.fullscreenEnabled ||\r\n document.mozFullScreenEnabled ||\r\n document.msFullscreenEnabled ||\r\n document.webkitFullscreenEnabled\r\n ? true\r\n : false;\r\n };\r\n RMCPControlsElement.prototype.connectedCallback = function () {\r\n this.cpContainer = this.querySelector(\".cp-container\"); // container for the canvas player\r\n this.overlay = this.querySelector(\".cp-overlay\"); // overlay for adding buttons\r\n this.preloader = this.querySelector(\".cp-preloader\");\r\n this.playIndicator = this.querySelector(\".cp-play-indicator\");\r\n this.pauseIndicator = this.querySelector(\".cp-pause-indicator\");\r\n this.lrgPlayBtn = this.querySelector(\".cp-large-play\");\r\n this.lrgReplayBtn = this.querySelector(\".cp-large-replay\");\r\n this.controlsContainer = this.querySelector(\".cp-controls-container\"); // container for the captions and controls\r\n this.captions = this.querySelector(\".cp-captions\");\r\n this.playerControls = this.querySelector(\".cp-controls\"); // container for the controls (all buttons)\r\n this.playBtn = this.querySelector(\".cp-play\");\r\n this.replayBtn = this.querySelector(\".cp-replay\");\r\n this.pauseBtn = this.querySelector(\".cp-pause\");\r\n this.currentTimeText = this.querySelector(\".current-time\");\r\n this.durationText = this.querySelector(\".duration\");\r\n this.seekBar = this.querySelector(\".cp-seekbar\");\r\n this.showCaptionsBtn = this.querySelector(\".cp-show-captions\");\r\n this.hideCaptionsBtn = this.querySelector(\".cp-hide-captions\");\r\n this.transcriptBtn = this.querySelector(\".cp-transcript\");\r\n this.fullScreenBtn = this.querySelector(\".cp-fullscreen\");\r\n this.exitFullScreenBtn = this.querySelector(\".cp-exit-fullscreen\");\r\n this.seekBarHandle = this.querySelector(\".rm-slider-handle\");\r\n this.captionsEmpty = this.captions.innerText === \"\" ? true : false;\r\n this.fullScreenSupported = this.isFullscreenSupported();\r\n // Add listeners\r\n // play/pause the video when the spacebar key is pressed\r\n document.addEventListener(\"keydown\", this.handleKeyDown);\r\n };\r\n RMCPControlsElement.prototype.disconnectedCallback = function () {\r\n // Remove listeners\r\n document.removeEventListener(\"keydown\", this.handleKeyDown);\r\n };\r\n // update property this.allowIndicators\r\n RMCPControlsElement.prototype.toggleIndicators = function (allowIndicators) {\r\n this.allowIndicators = allowIndicators;\r\n };\r\n RMCPControlsElement.prototype.resetIndicator = function (event) {\r\n event.target.classList.remove(\"fade-out\");\r\n event.target.classList.add(\"hide\");\r\n event.target.removeEventListener(\"animationend\", this.resetIndicator);\r\n };\r\n // toggle between play/pause btn\r\n RMCPControlsElement.prototype.togglePlay = function (preventFocus, showIndicator) {\r\n if (preventFocus === void 0) {\r\n preventFocus = false;\r\n }\r\n if (showIndicator === void 0) {\r\n showIndicator = false;\r\n }\r\n if (!this.lrgPlayBtn.classList.contains(\"hide\")) {\r\n this.lrgPlayBtn.classList.add(\"hide\");\r\n }\r\n if (!this.lrgReplayBtn.classList.contains(\"hide\")) {\r\n this.lrgReplayBtn.classList.add(\"hide\");\r\n }\r\n if (!this.replayBtn.classList.contains(\"hide\")) {\r\n this.replayBtn.classList.add(\"hide\");\r\n }\r\n if (this.player.paused) {\r\n this.player.play();\r\n this.playBtn.classList.add(\"hide\");\r\n this.pauseBtn.classList.remove(\"hide\");\r\n if (!preventFocus) {\r\n this.pauseBtn.focus();\r\n }\r\n if (this.allowIndicators && showIndicator) {\r\n this.pauseIndicator.classList.add(\"hide\");\r\n this.playIndicator.classList.remove(\"hide\");\r\n this.playIndicator.classList.add(\"fade-out\");\r\n this.playIndicator.addEventListener(\"animationend\", this.resetIndicator);\r\n }\r\n else {\r\n this.pauseIndicator.classList.add(\"hide\");\r\n this.playIndicator.classList.add(\"hide\");\r\n }\r\n }\r\n else {\r\n this.playIndicator.classList.add(\"hide\");\r\n this.pauseIndicator.classList.remove(\"hide\");\r\n this.player.pause();\r\n this.pauseBtn.classList.add(\"hide\");\r\n this.playBtn.classList.remove(\"hide\");\r\n if (!preventFocus) {\r\n this.playBtn.focus();\r\n }\r\n if (this.allowIndicators && showIndicator) {\r\n this.playIndicator.classList.add(\"hide\");\r\n this.pauseIndicator.classList.remove(\"hide\");\r\n this.pauseIndicator.classList.add(\"fade-out\");\r\n this.pauseIndicator.addEventListener(\"animationend\", this.resetIndicator);\r\n }\r\n else {\r\n this.pauseIndicator.classList.add(\"hide\");\r\n this.playIndicator.classList.add(\"hide\");\r\n }\r\n }\r\n };\r\n // show/hidden control buttons\r\n RMCPControlsElement.prototype.toggleVisibility = function (element1, element2) {\r\n if (element2 === void 0) {\r\n element2 = null;\r\n }\r\n // toggle between two elements\r\n if (element2 !== null) {\r\n if (element1.classList.contains(\"hide\")) {\r\n element1.classList.remove(\"hide\");\r\n element2.classList.add(\"hide\");\r\n element1.focus();\r\n }\r\n else {\r\n element1.classList.add(\"hide\");\r\n element2.classList.remove(\"hide\");\r\n element2.focus();\r\n }\r\n // toggle single element\r\n }\r\n else {\r\n if (element1.classList.contains(\"hide\")) {\r\n element1.classList.remove(\"hide\");\r\n element1.focus();\r\n }\r\n else {\r\n element1.classList.add(\"hide\");\r\n }\r\n }\r\n };\r\n // update the currentTime and currentTimeText\r\n RMCPControlsElement.prototype.updateCurrentTimeText = function () {\r\n var t = Math.round(this.player.getCurrentTime());\r\n this.currentTime = (0, utilities_js_1.formatTime)(t);\r\n this.currentTimeA11y = (0, utilities_js_1.formatTimeA11y)(t);\r\n this.currentTimeText.textContent = this.currentTime;\r\n };\r\n /*\r\n * applies action to end of video\r\n * \"stop\": stops the video in the last frame and shows a large restart button.\r\n * \"stopNoReplayBtn\": stops the video in the last frame without a large restart button.\r\n * \"loop\": restarts and plays the video.\r\n * \"reset\": resets the video to the initial state with the large play button.\r\n */\r\n RMCPControlsElement.prototype.onEnd = function (endAction) {\r\n switch (endAction) {\r\n case \"stop\":\r\n case \"stopNoReplayBtn\":\r\n this.player.pause();\r\n this.player.goToFrame(this.player.getTotalFrames() - 1);\r\n // show large replay button\r\n if (endAction !== \"stopNoReplayBtn\") {\r\n this.lrgReplayBtn.classList.remove(\"hide\");\r\n }\r\n // show replay btn on controls\r\n this.replayBtn.classList.remove(\"hide\");\r\n this.pauseBtn.classList.add(\"hide\");\r\n this.playBtn.classList.add(\"hide\");\r\n break;\r\n case \"loop\":\r\n this.player.pause();\r\n this.player.goToFrame(0);\r\n this.updateCurrentTimeText();\r\n this.player.play();\r\n break;\r\n case \"reset\":\r\n this.player.pause();\r\n this.player.goToFrame(0);\r\n this.updateCurrentTimeText();\r\n this.playBtn.classList.remove(\"hide\");\r\n this.pauseBtn.classList.add(\"hide\");\r\n this.lrgPlayBtn.classList.remove(\"hide\");\r\n break;\r\n }\r\n };\r\n // replays video\r\n RMCPControlsElement.prototype.replay = function () {\r\n this.player.goToFrame(0);\r\n this.updateCurrentTimeText();\r\n if (!this.lrgReplayBtn.classList.contains(\"hide\")) {\r\n this.lrgReplayBtn.classList.add(\"hide\");\r\n }\r\n this.replayBtn.classList.add(\"hide\");\r\n this.pauseBtn.classList.remove(\"hide\");\r\n this.player.play();\r\n };\r\n // update property this.endAction\r\n RMCPControlsElement.prototype.updateEndAction = function (action) {\r\n this.endAction = action;\r\n };\r\n // update slider handle aria-valuetext attribute when seekbar value changes\r\n RMCPControlsElement.prototype.updateSeekBarHandleARIAValueText = function (currentTime, duration) {\r\n var ariaValueText = currentTime + \" of \" + duration;\r\n if (!this.seekBarHandle)\r\n { this.seekBarHandle = this.querySelector(\".rm-slider-handle\"); }\r\n this.seekBarHandle.setAttribute(\"aria-valuetext\", ariaValueText);\r\n };\r\n // position the captions according to the controls visibility\r\n RMCPControlsElement.prototype.positionCaptions = function () {\r\n var hiddenTrue = this.playerControls.classList.contains(\"hidden\");\r\n var height = hiddenTrue ? 0 : this.playerControls.offsetHeight;\r\n this.captions.style.bottom = height + \"px\";\r\n };\r\n RMCPControlsElement.prototype.hideControlsOnTimeout = function () {\r\n var _this = this;\r\n clearTimeout(this.playerControlsTimer);\r\n if (this.hideControls) {\r\n this.playerControlsTimer = setTimeout(function () {\r\n if (!_this.captions.classList.contains(\"hide\")) {\r\n setTimeout(function () {\r\n _this.positionCaptions();\r\n }, 300);\r\n }\r\n _this.playerControls.classList.add(\"hidden\");\r\n _this.playerControls.style.zIndex = \"-1\";\r\n }, this.playerControlsTimeout);\r\n }\r\n };\r\n RMCPControlsElement.prototype.showControls = function () {\r\n clearTimeout(this.playerControlsTimer);\r\n this.playerControls.classList.remove(\"hidden\");\r\n this.playerControls.style.zIndex = \"1\";\r\n if (!this.captions.classList.contains(\"hide\")) {\r\n this.positionCaptions();\r\n }\r\n };\r\n /*** CP-CONTROLS EVENT HANDLERS ***/\r\n // ensures the control features are maintained with keyboard accessibility\r\n RMCPControlsElement.prototype.handleControlsKeyDown = function (event) {\r\n var target = event.target;\r\n // prevents controls from being hidden while seekbar is navigated with keyboard\r\n if (target === this.seekBarHandle) {\r\n var keys = [\"ArrowRight\", \"ArrowLeft\", \"ArrowUp\", \"ArrowDown\", \"Left\", \"Right\", \"Up\", \"Down\"];\r\n var keyFound = keys.indexOf(event.key);\r\n if (keyFound > -1) {\r\n this.showControls();\r\n this.hideControls = true;\r\n this.hideControlsOnTimeout();\r\n }\r\n if (!this.replayBtn.classList.contains(\"hide\") && !this.lrgReplayBtn.classList.contains(\"hide\")) {\r\n this.lrgReplayBtn.classList.add(\"hide\");\r\n this.replayBtn.classList.add(\"hide\");\r\n this.playBtn.classList.remove(\"hide\");\r\n }\r\n // prevents the captions from moving behind the controls instead of hiding them\r\n }\r\n else if (target === this.captions) {\r\n if (event.key === \" \" || event.key === \"Spacebar\") {\r\n this.toggleVisibility(this.captions);\r\n }\r\n // removes the controls when video is played using keyboard unless video is paused\r\n }\r\n else if (target === this.pauseBtn) {\r\n if (event.key === \"Enter\" || event.key === \" \" || event.key === \"Spacebar\") {\r\n this.hideControls = false;\r\n clearTimeout(this.playerControlsTimer);\r\n }\r\n }\r\n else {\r\n this.hideControls = true;\r\n this.hideControlsOnTimeout();\r\n }\r\n };\r\n // determines if the device is touchscreen to disable click on canvas to play\r\n RMCPControlsElement.prototype.handleTouchStart = function () {\r\n this.touchDevice = true;\r\n };\r\n // while the seekbar is in use, pause the video\r\n RMCPControlsElement.prototype.handleRmSliderDown = function () {\r\n this.hideControls = false;\r\n this.isSeeking = true;\r\n if (this.player.ended) {\r\n this.resumePlay = true;\r\n }\r\n else if (!this.player.paused) {\r\n this.resumePlay = true;\r\n this.togglePlay(true);\r\n }\r\n else {\r\n this.resumePlay = false;\r\n }\r\n };\r\n // when the seekbar is used, keep video, timestamp, and seekbar in sync\r\n RMCPControlsElement.prototype.handleRMSliderChange = function () {\r\n var value = this.seekBar.value;\r\n this.ratio = value / this.seekBar.options.sections[1];\r\n // Keeps the current time indicator in sync with the seek bar handle.\r\n var newCurrentTime = (0, utilities_js_1.formatTime)(Math.round(this.ratio * this.duration));\r\n this.currentTimeText.textContent = newCurrentTime;\r\n // Keeps the video in sync with the seek bar handle.\r\n this.totalFrames = this.player.getTotalFrames() - 1;\r\n this.frame = Math.floor(this.ratio * this.totalFrames);\r\n if (this.frameStop) {\r\n if (this.frame >= this.frameStop) {\r\n this.throttleGoToFrame(this.frameStop);\r\n // this.seekBar.value = (this.frameStop / this.player.getTotalFrames()) * this.seekBar.options.sections[1];\r\n }\r\n else {\r\n this.throttleGoToFrame(this.frame);\r\n }\r\n }\r\n else {\r\n this.throttleGoToFrame(this.frame); // this.player.goToFrame() wrapped in throttle for efficiency\r\n }\r\n };\r\n // on release of the slider-handle, play the video\r\n RMCPControlsElement.prototype.handleRMSliderUp = function () {\r\n this.hideControls = true;\r\n this.isSeeking = false;\r\n this.totalFrames = this.player.getTotalFrames() - 1;\r\n if (this.frameStop) {\r\n if (this.frame >= this.frameStop) {\r\n this.seekBar.value = (this.frameStop / this.player.getTotalFrames()) * this.seekBar.options.sections[1];\r\n }\r\n }\r\n if (this.player.exportRoot.currentFrame >= this.totalFrames &&\r\n Number(this.seekBarHandle.getAttribute(\"aria-valuenow\")) >=\r\n Number(this.seekBarHandle.getAttribute(\"aria-valuemax\"))) {\r\n this.player.ended = true;\r\n this.onEnd(this.endAction);\r\n }\r\n else if (this.player.paused && this.resumePlay) {\r\n this.player.ended = false;\r\n this.resumePlay = false;\r\n this.togglePlay(true);\r\n }\r\n };\r\n // show controls when mouse moves anywhere on the video\r\n RMCPControlsElement.prototype.handleMouseMove = function () {\r\n this.showControls();\r\n // remove the controls after timeout\r\n if (document.activeElement !== this.seekBarHandle) {\r\n this.hideControlsOnTimeout();\r\n }\r\n };\r\n // remove controls when mouse leaves video\r\n RMCPControlsElement.prototype.handleMouseLeave = function () {\r\n if (document.activeElement !== this.seekBarHandle) {\r\n this.hideControlsOnTimeout();\r\n }\r\n };\r\n // show controls when focus is on the controls (keyboard accessiblity)\r\n RMCPControlsElement.prototype.handleFocusIn = function () {\r\n this.showControls();\r\n this.hideControlsOnTimeout();\r\n };\r\n // hide controls when focus leaves (keyboard accessiblity)\r\n RMCPControlsElement.prototype.handleFocusOut = function () {\r\n this.hideControlsOnTimeout();\r\n };\r\n // handle full screen toggle on double click (only when canvas is dbl clicked)\r\n RMCPControlsElement.prototype.handleDblClick = function () {\r\n if (this.fullScreenSupported) {\r\n clearTimeout(this.clickActionTimer);\r\n this.preventClickAction = true;\r\n this.player.toggleFullscreen();\r\n this.toggleVisibility(this.fullScreenBtn, this.exitFullScreenBtn);\r\n }\r\n };\r\n // handles all click actions for the cp-controls\r\n RMCPControlsElement.prototype.handleClick = function (event) {\r\n var _this = this;\r\n var target = event.target;\r\n // ensures the player plays correctly if the animation has ended but the user uses the seekbar instead of the replay button\r\n if (target.classList.contains(\"rm-slider\") ||\r\n target.classList.contains(\"rm-slider-track\") ||\r\n target.classList.contains(\"rm-slider-track-after\") ||\r\n target.classList.contains(\"rm-slider-track-before\") ||\r\n target.classList.contains(\"rm-slider-handle\")) {\r\n if (!this.replayBtn.classList.contains(\"hide\") && !this.lrgReplayBtn.classList.contains(\"hide\")) {\r\n this.lrgReplayBtn.classList.add(\"hide\");\r\n this.replayBtn.classList.add(\"hide\");\r\n this.playBtn.classList.remove(\"hide\");\r\n }\r\n }\r\n // clicking anywhere on the video will play/pause the video\r\n if (target.nodeName.toUpperCase() === \"CANVAS\") {\r\n if (this.touchDevice) {\r\n this.playerControls.classList.remove(\"hidden\");\r\n }\r\n else {\r\n this.clickActionTimer = setTimeout(function () {\r\n if (!_this.preventClickAction) {\r\n _this.togglePlay(false, true);\r\n }\r\n _this.cpContainer.focus();\r\n _this.preventClickAction = false;\r\n }, this.clickActionDelay);\r\n }\r\n }\r\n else if (target.classList.contains(\"cp-large-replay\") || target.classList.contains(\"cp-replay\")) {\r\n this.replay();\r\n this.cpContainer.focus();\r\n }\r\n else if (target.classList.contains(\"cp-play\") ||\r\n target.classList.contains(\"cp-large-play\") ||\r\n target.classList.contains(\"cp-pause\")) {\r\n this.togglePlay();\r\n if (target.classList.contains(\"cp-large-play\")) {\r\n this.cpContainer.focus();\r\n }\r\n }\r\n else if (target.classList.contains(\"cp-show-captions\") || target.classList.contains(\"cp-hide-captions\")) {\r\n this.captionsEmpty = this.captions.innerText === \"\" ? true : false;\r\n if (this.captionsEmpty) {\r\n this.captions.classList.add(\"blank\");\r\n }\r\n else {\r\n this.captions.classList.remove(\"blank\");\r\n }\r\n this.toggleVisibility(this.captions);\r\n this.toggleVisibility(this.showCaptionsBtn, this.hideCaptionsBtn);\r\n if (!this.captions.classList.contains(\"hide\")) {\r\n this.positionCaptions();\r\n }\r\n }\r\n else if (target.classList.contains(\"cp-transcript\")) {\r\n var features = null;\r\n if (this.transcriptWindowFeatures === null) {\r\n var height = window.screen.availHeight / 2;\r\n var width = window.screen.availWidth / 2;\r\n features = {\r\n resizable: 1,\r\n scrollbars: 1,\r\n top: window.screenTop + window.outerHeight / 2 - height / 2,\r\n left: window.screenLeft + window.outerWidth / 2 - width / 2,\r\n height: height,\r\n width: width,\r\n };\r\n }\r\n else {\r\n features = this.transcriptWindowFeatures;\r\n }\r\n features = (0, utilities_js_1.getStringFromObject)(features);\r\n this.transcriptLoaded = false;\r\n // open new blank window with default descriptions\r\n if (this.transcriptHTMLUrl === \"\" && this.transcriptHTMLRef === null) {\r\n this.transcriptWindow = window.open(this.transcriptHTMLUrl, \"_blank\", features);\r\n this.descriptions.forEach(function (ts, index) {\r\n if (ts.text !== undefined && ts.text !== \"\") {\r\n if (index === 0) {\r\n _this.transcriptWindow.document.body.appendChild(document.createElement(\"h1\")).innerText =\r\n \"Video Transcript\";\r\n _this.transcriptWindow.document.body.appendChild(document.createElement(\"p\")).innerText = _this.formatTranscript(ts.text);\r\n }\r\n else if (ts.text !== _this.descriptions[index - 1].text) {\r\n _this.transcriptWindow.document.body.appendChild(document.createElement(\"p\")).innerText = _this.formatTranscript(ts.text);\r\n }\r\n }\r\n });\r\n this.transcriptLoaded = true;\r\n // open new blank window with provided HTML Element(s) appended to body\r\n }\r\n else if (this.transcriptHTMLUrl === \"\" && this.transcriptHTMLRef !== null) {\r\n this.transcriptWindow = window.open(this.transcriptHTMLUrl, \"_blank\", features);\r\n if (Array.isArray(this.transcriptHTMLRef)) {\r\n this.transcriptHTMLRef.forEach(function (element) {\r\n var child = (0, utilities_js_1.cloneElement)(_this.transcriptWindow.document, element);\r\n _this.transcriptWindow.document.body.appendChild(child);\r\n });\r\n }\r\n else {\r\n var child = (0, utilities_js_1.cloneElement)(this.transcriptWindow.document, this.transcriptHTMLRef);\r\n this.transcriptWindow.document.body.appendChild(child);\r\n }\r\n this.transcriptLoaded = true;\r\n // open the provided HTML url in a new window\r\n }\r\n else if (this.transcriptHTMLUrl !== \"\" && this.transcriptHTMLRef === null) {\r\n this.transcriptWindow = window.open(this.transcriptHTMLUrl, \"_blank\", features);\r\n this.transcriptLoaded = true;\r\n // open the provided HTML url in a new window and append the HTML Element(s) to the body of the window or the specified container\r\n }\r\n else {\r\n var loadTranscriptContent_1 = function () {\r\n if (_this.transcriptLoaded) {\r\n return;\r\n }\r\n if (!_this.transcriptWindow.document.body) {\r\n setTimeout(function () { return loadTranscriptContent_1(); }, 100);\r\n return;\r\n }\r\n if (_this.transcriptHTMLRef !== null) {\r\n if (Array.isArray(_this.transcriptHTMLRef)) {\r\n _this.transcriptHTMLRef.forEach(function (element) {\r\n var child = (0, utilities_js_1.cloneElement)(_this.transcriptWindow.document, element);\r\n if (_this.transcriptHTMLContainerSelector) {\r\n _this.transcriptWindow.document.body\r\n .querySelector(_this.transcriptHTMLContainerSelector)\r\n .appendChild(child);\r\n }\r\n else {\r\n _this.transcriptWindow.document.body.appendChild(child);\r\n }\r\n });\r\n }\r\n else {\r\n var child = (0, utilities_js_1.cloneElement)(_this.transcriptWindow.document, _this.transcriptHTMLRef);\r\n if (_this.transcriptHTMLContainerSelector) {\r\n _this.transcriptWindow.document.body\r\n .querySelector(_this.transcriptHTMLContainerSelector)\r\n .appendChild(child);\r\n }\r\n else {\r\n _this.transcriptWindow.document.body.appendChild(child);\r\n }\r\n }\r\n }\r\n _this.transcriptLoaded = true;\r\n };\r\n this.transcriptWindow = window.open(this.transcriptHTMLUrl, \"_blank\", features);\r\n this.transcriptWindow.onload = function () {\r\n if (!_this.transcriptLoaded) {\r\n loadTranscriptContent_1();\r\n }\r\n };\r\n /*\r\n * IE11 runs window.open() as a synchronous task, preventing any further\r\n * JavaScript from running until the window has opened and loaded, so the\r\n * onload event that is declared afterwards is never fired because the new\r\n * window has already \"loaded\". To get around this, check if the browser is\r\n * IE11 and fire the load event again.\r\n */\r\n if ((0, utilities_js_1.isIE)() && !this.transcriptLoaded) {\r\n var loadTranscript_1 = function () {\r\n if (!_this.transcriptWindow.document) {\r\n setTimeout(function () { return loadTranscript_1(); }, 100);\r\n }\r\n else if (!_this.transcriptLoaded) {\r\n loadTranscriptContent_1();\r\n }\r\n };\r\n loadTranscript_1();\r\n }\r\n }\r\n }\r\n else if (target.classList.contains(\"cp-fullscreen\") || target.classList.contains(\"cp-exit-fullscreen\")) {\r\n this.player.toggleFullscreen();\r\n this.toggleVisibility(this.fullScreenBtn, this.exitFullScreenBtn);\r\n }\r\n };\r\n /*** END OF CP-CONTROLS EVENT HANDLERS ***/\r\n RMCPControlsElement.prototype.updateTranscript = function (buildHTML, HTMLContainer, HTMLUrl, windowFeatures) {\r\n if (buildHTML === void 0) {\r\n buildHTML = undefined;\r\n }\r\n if (HTMLContainer === void 0) {\r\n HTMLContainer = \"\";\r\n }\r\n if (HTMLUrl === void 0) {\r\n HTMLUrl = \"\";\r\n }\r\n if (windowFeatures === void 0) {\r\n windowFeatures = undefined;\r\n }\r\n if (buildHTML !== undefined) {\r\n this.transcriptHTMLRef = buildHTML();\r\n }\r\n this.transcriptHTMLContainerSelector = HTMLContainer;\r\n this.transcriptHTMLUrl = HTMLUrl;\r\n if (windowFeatures !== undefined) {\r\n this.transcriptWindowFeatures = windowFeatures;\r\n }\r\n };\r\n // connect controls to CanvasPlayer instance\r\n RMCPControlsElement.prototype.attachCanvasPlayer = function (cp) {\r\n var _this = this;\r\n this.player = cp;\r\n // hide full screen if browser doesn't support it\r\n if (!this.fullScreenSupported) {\r\n this.fullScreenBtn.classList.add(\"hide\");\r\n }\r\n // once the animation is loaded\r\n this.player.on(\"canplay\", function () {\r\n //update video time stamp\r\n _this.duration = _this.player.getDuration();\r\n _this.durationText.textContent = (0, utilities_js_1.formatTime)(_this.duration);\r\n _this.updateCurrentTimeText(); // initializes this.currentTime and updates this.currentTimeText\r\n // get transcript\r\n _this.descriptions = _this.player.generateTranscript();\r\n // hide preloader and show the large play button\r\n _this.preloader.classList.add(\"hide\");\r\n // if autoplay is true, don't show large play button\r\n if (_this.player.autoplay === true) {\r\n // this.toggleVisibility(this.playBtn, this.pauseBtn);\r\n _this.lrgPlayBtn.classList.add(\"hide\"); // Hide the lrg play button when autoplay is true\r\n _this.playBtn.classList.add(\"hide\");\r\n _this.replayBtn.classList.add(\"hide\");\r\n _this.pauseBtn.classList.remove(\"hide\");\r\n }\r\n else {\r\n _this.lrgPlayBtn.classList.remove(\"hide\");\r\n }\r\n // handles controls with keyboard\r\n _this.addEventListener(\"keydown\", _this.handleControlsKeyDown);\r\n // determines if the device is touchscreen to disable click on canvas to play\r\n _this.cpContainer.addEventListener(\"touchstart\", _this.handleTouchStart);\r\n // handles all click actions for the cp-controls\r\n _this.addEventListener(\"click\", _this.handleClick);\r\n // ensures player is paused if user moves to another tab in the broswer and resumes playing when user returns to tab with video\r\n Focus.addFocusListener((function () {\r\n return function () {\r\n if (Focus.isHidden()) {\r\n _this.resumePlay = !_this.player.paused;\r\n if (!_this.player.paused) {\r\n _this.togglePlay();\r\n }\r\n }\r\n else {\r\n if (_this.resumePlay && _this.player.paused) {\r\n _this.togglePlay();\r\n }\r\n }\r\n };\r\n })());\r\n _this.updateSeekBarHandleARIAValueText(_this.currentTimeA11y, (0, utilities_js_1.formatTimeA11y)(_this.duration));\r\n _this.seekBarHandle.setAttribute(\"aria-valuenow\", \"0\");\r\n });\r\n /*** SEEKBAR EVENT HANDLERS ***/\r\n this.seekBar.setOptions(this.sliderOptions); // setup seekbar to jump frames\r\n // while the seekbar is in use, pause the video\r\n this.seekBar.addEventListener(\"rm-slider-down\", this.handleRmSliderDown);\r\n // when the seekbar is used, keep video, timestamp, and seekbar in sync\r\n this.seekBar.addEventListener(\"change\", this.handleRMSliderChange);\r\n // on release of the slider-handle, play the video\r\n this.seekBar.addEventListener(\"rm-slider-up\", this.handleRMSliderUp);\r\n // update current time dynamically as the video plays\r\n this.player.on(\"timeupdate\", function () {\r\n if (!_this.isSeeking) {\r\n // Keeps the current time indicator in sync with the video.\r\n _this.updateCurrentTimeText();\r\n // fix for video contained in pop up (ensures player controls are shown correctly if user exits the video while it's playing)\r\n if (_this.player.paused && _this.currentTime === \"0:00\") {\r\n if (_this.playBtn.classList.contains(\"hide\") && _this.replayBtn.classList.contains(\"hide\")) {\r\n _this.playBtn.classList.remove(\"hide\");\r\n _this.pauseBtn.classList.add(\"hide\");\r\n }\r\n if (_this.lrgPlayBtn.classList.contains(\"hide\") && _this.lrgReplayBtn.classList.contains(\"hide\")) {\r\n _this.lrgPlayBtn.classList.remove(\"hide\");\r\n }\r\n }\r\n else if (_this.player.paused) {\r\n _this.pauseBtn.classList.add(\"hide\");\r\n if (_this.player.ended) {\r\n _this.replayBtn.classList.remove(\"hide\");\r\n }\r\n else {\r\n _this.playBtn.classList.remove(\"hide\");\r\n }\r\n }\r\n else if (!_this.player.paused && _this.pauseBtn.classList.contains(\"hide\")) {\r\n _this.playBtn.classList.add(\"hide\");\r\n _this.pauseBtn.classList.remove(\"hide\");\r\n }\r\n /*\r\n * Keeps the position of the handle on the seek bar in sync with\r\n * the video.\r\n */\r\n _this.ratio = _this.player.getCurrentTime() / _this.duration;\r\n _this.seekValue = _this.ratio * _this.seekBar.options.sections[1];\r\n _this.seekBar.value = Math.min(_this.seekBar.options.sections[1], _this.seekValue);\r\n /*\r\n * Keeps the accessibility text of the handle on the seek bar in\r\n * sync with the video.\r\n */\r\n _this.updateSeekBarHandleARIAValueText(_this.currentTimeA11y, (0, utilities_js_1.formatTimeA11y)(_this.duration));\r\n }\r\n });\r\n /*** END OF SEEKBAR EVENT HANDLERS ***/\r\n /*** HANDLE SHOW/HIDE FOR CONTROLS ***/\r\n this.addEventListener(\"mousemove\", this.handleMouseMove);\r\n // remove controls when mouse leaves video\r\n this.addEventListener(\"mouseleave\", this.handleMouseLeave);\r\n // show controls when focus is on the controls (keyboard accessiblity)\r\n this.playerControls.addEventListener(\"focusin\", this.handleFocusIn);\r\n // hide controls when focus leaves (keyboard accessiblity)\r\n this.playerControls.addEventListener(\"focusout\", this.handleFocusOut);\r\n /*** END OF HANDLE SHOW/HIDE FOR CONTROLS ***/\r\n // handle full screen toggle on double click (only when canvas is dbl clicked)\r\n this.cpContainer.querySelector(\"canvas\").addEventListener(\"dblclick\", this.handleDblClick);\r\n // ensures controls are accessible in full screen mode\r\n this.player.on(\"fullscreenchange\", function () {\r\n if (_this.player.isFullscreen()) {\r\n _this.ratio = _this.player.getCurrentTime() / _this.duration;\r\n _this.seekValue = _this.ratio * _this.seekBar.options.sections[1];\r\n // move controls to canvas player container\r\n _this.cpContainer.appendChild(_this.controlsContainer);\r\n _this.exitFullScreenBtn.focus();\r\n _this.fullScreenBtn.classList.add(\"hide\");\r\n _this.exitFullScreenBtn.classList.remove(\"hide\");\r\n // keeps the slider handle and current time at the same position\r\n setTimeout(function () {\r\n _this.seekBar.value = Math.min(_this.seekBar.options.sections[1], _this.seekValue);\r\n }, 0);\r\n }\r\n else {\r\n _this.ratio = _this.player.getCurrentTime() / _this.duration;\r\n _this.seekValue = _this.ratio * _this.seekBar.options.sections[1];\r\n // move controls back to original position\r\n _this.appendChild(_this.controlsContainer);\r\n _this.fullScreenBtn.focus();\r\n _this.fullScreenBtn.classList.remove(\"hide\");\r\n _this.exitFullScreenBtn.classList.add(\"hide\");\r\n // keeps the slider handle and current time at the same position\r\n setTimeout(function () {\r\n _this.seekBar.value = Math.min(_this.seekBar.options.sections[1], _this.seekValue);\r\n }, 0);\r\n }\r\n });\r\n // include captions\r\n this.player.on(\"captionChanged\", function (event) {\r\n var showCaptions = event.detail.off === undefined || event.detail.off === null || event.detail.off === false\r\n ? true\r\n : false;\r\n _this.captions.innerText = showCaptions ? _this.formatTranscript(event.detail.text) : \"\";\r\n // captions only display when they exist, captions can be on and hidden at the same time using .blank\r\n if (_this.showCaptionsBtn.classList.contains(\"hide\")) {\r\n if (_this.captions.innerText === \"\") {\r\n _this.captions.classList.add(\"blank\");\r\n _this.captionsEmpty = true;\r\n }\r\n else {\r\n _this.captions.classList.remove(\"blank\");\r\n _this.captionsEmpty = false;\r\n }\r\n }\r\n });\r\n // if the video ends, reset current time, set frame back to 0 and show play btn\r\n this.player.on(\"ended\", function () {\r\n _this.player.ended = true;\r\n _this.onEnd(_this.endAction);\r\n });\r\n if (this.overlay !== undefined && this.overlay !== null) {\r\n // resizing overlay when the canvas player resizes\r\n this.player.on(\"resizeEnd\", function () {\r\n var _a = _this.player.canvas.getBoundingClientRect(), width = _a.width, height = _a.height;\r\n _this.overlay.style.top = _this.player.canvas.style.top;\r\n _this.overlay.style.left = _this.player.canvas.style.left;\r\n _this.overlay.style.width = width + \"px\";\r\n _this.overlay.style.height = height + \"px\";\r\n });\r\n }\r\n };\r\n Object.defineProperty(RMCPControlsElement.prototype, \"frameLimit\", {\r\n /**\r\n * The following getter, setter, and clearFrameLimit() are used to set\r\n * a frameLimit when scrubbing with the slider. This is in cases when we\r\n * want to limit a user from scrubbing beyond a point (when there is a\r\n * selection in that particular frame)\r\n */\r\n get: function () {\r\n return this.frameStop;\r\n },\r\n set: function (frame) {\r\n if (frame >= 0 && frame < this.player.getTotalFrames()) {\r\n this.frameStop = frame;\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n RMCPControlsElement.prototype.clearFrameLimit = function () {\r\n this.frameStop = undefined;\r\n };\r\n // remove event listeners: added in case the canvas player is destroyed and rebuilt, event handlers aren't added twice to the player\r\n RMCPControlsElement.prototype.removeEventListeners = function () {\r\n this.removeEventListener(\"keydown\", this.handleControlsKeyDown);\r\n this.cpContainer.removeEventListener(\"touchstart\", this.handleTouchStart);\r\n this.seekBar.removeEventListener(\"rm-slider-down\", this.handleRmSliderDown);\r\n this.seekBar.removeEventListener(\"change\", this.handleRMSliderChange);\r\n this.seekBar.removeEventListener(\"rm-slider-up\", this.handleRMSliderUp);\r\n this.removeEventListener(\"mousemove\", this.handleMouseMove);\r\n this.removeEventListener(\"mouseleave\", this.handleMouseLeave);\r\n this.playerControls.removeEventListener(\"focusin\", this.handleFocusIn);\r\n this.playerControls.removeEventListener(\"focusout\", this.handleFocusOut);\r\n this.cpContainer.querySelector(\"canvas\").removeEventListener(\"dblclick\", this.handleDblClick);\r\n this.removeEventListener(\"click\", this.handleClick);\r\n };\r\n return RMCPControlsElement;\r\n}(custom_elements_1.HTMLCustomElement));\r\nexports.default = RMCPControlsElement;\r\n(0, custom_elements_1.registerElement)(\"rm-canvas-player-controls\", RMCPControlsElement);\r\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7O0FBQUEsT0FBTyx5Q0FBeUMsQ0FBQztBQUVqRCxPQUFPLEtBQUssS0FBSyxNQUFNLFlBQVksQ0FBQztBQUdwQyxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsZUFBZSxFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFDaEYsT0FBTyxFQUFFLFlBQVksRUFBRSxVQUFVLEVBQUUsY0FBYyxFQUFFLG1CQUFtQixFQUFFLElBQUksRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBS3JHLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUNoRCxPQUFPLEVBQUU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QoXCJoaWRlXCIpO1xuICAgICAgICAgICAgICAgIHRoaXMucGxheUluZGljYXRvci5jbGFzc0xpc3QucmVtb3ZlKFwiaGlkZVwiKTtcbiAgICAgICAgICAgICAgICB0aGlzLnBsYXlJbmRpY2F0b3IuY2xhc3NMaXN0LmFkZChcImZhZGUtb3V0XCIpO1xuICAgICAgICAgICAgICAgIHRoaXMucGxheUluZGljYXRvci5hZGRFdmVudExpc3RlbmVyKFwiYW5pbWF0aW9uZW5kXCIsIHRoaXMucmVzZXRJbmRpY2F0b3IpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0aGlzLnBhdXNlSW5kaWNhdG9yLmNsYXNzTGlzdC5hZGQoXCJoaWRlXCIpO1xuICAgICAgICAgICAgICAgIHRoaXMucGxheUluZGljYXRvci5jbGFzc0xpc3QuYWRkKFwiaGlkZVwiKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMucGxheUluZGljYXRvci5jbGFzc0xpc3QuYWRkKFwiaGlkZVwiKTtcbiAgICAgICAgICAgIHRoaXMucGF1c2VJbmRpY2F0b3IuY2xhc3NMaXN0LnJlbW92ZShcImhpZGVcIik7XG4gICAgICAgICAgICB0aGlzLnBsYXllci5wYXVzZSgpO1xuICAgICAgICAgICAgdGhpcy5wYXVzZUJ0bi5jbGFzc0xpc3QuYWRkKFwiaGlkZVwiKTtcbiAgICAgICAgICAgIHRoaXMucGxheUJ0bi5jbGFzc0xpc3QucmVtb3ZlKFwiaGlkZVwiKTtcbiAgICAgICAgICAgIGlmICghcHJldmVudEZvY3VzKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5wbGF5QnRuLmZvY3VzKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodGhpcy5hbGxvd0luZGljYXRvcnMgJiYgc2hvd0luZGljYXRvcikge1xuICAgICAgICAgICAgICAgIHRoaXMucGxheUluZGljYXRvci5jbGFzc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ZSB7XG4gICAgICAgICAgICAgICAgZWxlbWVudDEuY2xhc3NMaXN0LmFkZChcImhpZGVcIik7XG4gICAgICAgICAgICAgICAgZWxlbWVudDIuY2xhc3NMaXN0LnJlbW92ZShcImhpZGVcIik7XG4gICAgICAgICAgICAgICAgZWxlbWVudDIuZm9jdXMoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIHRvZ2dsZSBzaW5nbGUgZWxlbWVudFxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKGVsZW1lbnQxLmNsYXNzTGlzdC5jb250YWlucyhcImhpZGVcIikpIHtcbiAgICAgICAgICAgICAgICBlbGVtZW50MS5jbGFzc0xpc3QucmVtb3ZlKFwiaGlkZVwiKTtcbiAgICAgICAgICAgICAgICBlbGVtZW50MS5mb2N1cygpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBlbGVtZW50MS5jbGFzc0xpc3QuYWRkKFwiaGlkZVwiKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8vIHVwZGF0ZSB0aGUgY3VycmVudFRpbWUgYW5kIGN1cnJlbnRUaW1lVGV4dFxuICAgIHByaXZhdGUgdXBkYXRlQ3VycmVudFRpbWVUZXh0KCk6IHZvaWQge1xuICAgICAgICBjb25zdCB0ID0gTWF0aC5yb3VuZCh0aGlzLnBsYXllci5nZXRDdXJyZW50VGltZSgpKTtcbiAgICAgICAgdGhpcy5jdXJyZW50VGltZSA9IGZvcm1hdFRpbWUodCk7XG4gICAgICAgIHRoaXMuY3VycmVudFRpbWVBMTF5ID0gZm9ybWF0VGltZUExMXkodCk7XG4gICAgICAgIHRoaXMuY3VycmVudFRpbWVUZXh0LnRleHRDb250ZW50ID0gdGhpcy5jdXJyZW50VGltZTtcbiAgICB9XG5cbiAgICAvKlxuICAgICAqIGFwcGxpZXMgYWN0aW9uIHRvIGVuZCBvZiB2aWRlb1xuICAgICAqICBcInN0b3B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sYXNzTGlzdC5yZW1vdmUoXCJoaWRlXCIpO1xuICAgICAgICAgICAgICAgIHRoaXMucGF1c2VCdG4uY2xhc3NMaXN0LmFkZChcImhpZGVcIik7XG4gICAgICAgICAgICAgICAgdGhpcy5wbGF5QnRuLmNsYXNzTGlzdC5hZGQoXCJoaWRlXCIpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcImxvb3BcIjpcbiAgICAgICAgICAgICAgICB0aGlzLnBsYXllci5wYXVzZSgpO1xuICAgICAgICAgICAgICAgIHRoaXMucGxheWVyLmdvVG9GcmFtZSgwKTtcbiAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZUN1cnJlbnRUaW1lVGV4dCgpO1xuICAgICAgICAgICAgICAgIHRoaXMucGxheWVyLnBsYXkoKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJyZXNldFwiOlxuICAgICAgICAgICAgICAgIHRoaXMucGxheWVyLnBhdXNlKCk7XG4gICAgICAgICAgICAgICAgdGhpcy5wbGF5ZXIuZ29Ub0ZyYW1lKDApO1xuICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlQ3VycmVudFRpbWVUZXh0KCk7XG4gICAgICAgICAgICAgICAgdGhpcy5wbGF5QnRuLmNsYXNzTGlzdC5yZW1vdmUoXCJoaWRlXCIpO1xuICAgICAgICAgICAgICAgIHRoaXMucGF1c2VCdG4uY2xhc3NMaXN0LmFkZChcImhpZGVcIik7XG4gICAgICAgICAgICAgICAgdGhpcy5scmdQbGF5QnRuLmNsYXNzTGlzdC5yZW1vdmUoXCJoaWRlXCIpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLy8gcmVwbGF5cyB2aWRlb1xuICAgIHByaXZhdGUgcmVwbGF5KCk6IHZvaWQge1xuICAgICAgICB0aGlzLnBsYXllci5nb1RvRnJhbWUoMCk7XG4gICAgICAgIHRoaXMud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ge1xuICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucG9zaXRpb25DYXB0aW9ucygpO1xuICAgICAgICAgICAgICAgICAgICB9LCAzMDApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLnBsYXllckNvbnRyb2xzLmNsYXNzTGlzdC5hZGQoXCJoaWRkZW5cIik7XG4gICAgICAgICAgICAgICAgdGhpcy5wbGF5ZXJDb250cm9scy5zdHlsZS56SW5kZXggPSBcIi0xXCI7XG4gICAgICAgICAgICB9LCB0aGlzLnBsYXllckNvbnRyb2xzVGltZW91dCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBwcml2YXRlIHNob3dDb250cm9scygpOiB2b2lkIHtcbiAgICAgICAgY2xlYXJUaW1lb3V0KHRoaXMucGxheWVyQ29udHJvbHNUaW1lcik7XG4gICAgICAgIHRoaXMucGxheWVyQ29udHJvbHMuY2xhc3NMaXN0LnJlbW92ZShcImhpZGRlblwiKTtcbiAgICAgICAgdGhpcy5wbGF5ZXJDb250cm9scy5zdHlsZS56SW5kZXggPSBcIjFcIjtcbiAgICAgICAgaWYgKCF0aGlzLmNhcHRpb25zLmNsYXNzTGlzdC5jb250YWlucyhcImhpZGVcIikpIHtcbiAgICAgICAgICAgIHRoaXMucG9zaXRpb25DYXB0aW9ucygpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLyoqKiBDUC1DT05UUk9MUyBFVkVOVCBIQU5ETEVSUyAqKiovXG5cbiAgICAvLyBlbnN1cmVzIHRoZSBjb250cm9sIGZlYXR1cmVzIGFyZSBtYWludGFpbmVkIHdpdGgga2V5Ym9hcmQgYWNjZXNzaWJpbGl0eVxuICAgIHByaXZhdGUgaGFuZGxlQ29udHJvbHNLZXlEb3duKGV2ZW50OiBLZXlib2FyZEV2ZW50KTogdm9pZCB7XG4gICAgICAgIGNvbnN0IHRhcmdldCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRWxlbWVudDtcblxuICAgICAgICAvLyBwcmV2ZW50cyBjb250cm9scyBmcm9tIGJlaW5nIGhpZGRlbiB3aGlsZSBzZWVrYmFyIGlzIG5hdmlnYXRlZCB3aXRoIGtleWJvYXJkXG4gICAgICAgIGlmICh0YXJnZXQgPT09IHRoaXMuc2Vla0JhckhhbmRsZSkge1xuICAgICAgICAgICAgY29uc3Qga2V5cyA9IFtcIkFycm93UmlnaHRcIiwgXCJBcnJvd0xlZnRcIiwgXCJBcnJvd1VwXCIsIFwiQXJyb3dEb3duXCIsIFwiTGVmdFwiLCBcIlJpZ2h0XCIsIFwiVXBcIiwgXCJEb3duXCJdO1xuICAgICAgICAgICAgY29uc3Qga2V5Rm91bmQgPSBrZXlzLmluZGV4T2YoZXZlbnQua2V5KTtcblxuICAgICAgICAgICAgaWYgKGtleUZvdW5kID4gLTEpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnNob3dDb250cm9scygpO1xuICAgICAgICAgICAgICAgIHRoaXMuaGlkZUNvbnRyb2xzID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB0aGlzLmhpZGVDb250cm9sc09uVGltZW91dCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCF0aGlzLnJlcGxheUJ0bi5jbGFzc0xpc3QuY29udGFpbnMoXCJoaWRlXCIpICYmICF0aGlzLmxyZ1JlcGxheUJ0bi5jbGFzc0xpc3QuY29udGFpbnMoXCJoaWRlXCIpKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5scmdSZXBsYXlCdG4uY2xhc3NMaXN0LmFkZChcImhpZGVcIik7XG4gICAgICAgICAgICAgICAgdGhpcy5yZXBsYXlCdG4uY2xhc3NMaXN0LmFkZChcImhpZGVcIik7XG4gICAgICAgICAgICAgICAgdGhpcy5wbGF5QnRuLmNsYXNzTGlzdC5yZW1vdmUoXCJoaWRlXCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gcHJldmVudHMgdGhlIGNhcHRpb25zIGZyb20gbW92aW5nIGJlaGluZCB0aGUgY29udHJvbHMgaW5zdGVhZCBvZiBoaWRpbmcgdGhlbVxuICAgICAgICB9IGVsc2UgaWYgKHRhcmdldCA9PT0gdGhpcy5jYXB0aW9ucykge1xuICAgICAgICAgICAgaWYgKGV2ZW50LmtleSA9PT0gXCIgXCIgfHwgZXZlbnQua2V5ID09PSBcIlNwYWNlYmFyXCIpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnRvZ2dsZVZpc2liaWxpdHkodGhpcy5jYXB0aW9ucyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyByZW1vdmVzIHRoZSBjb250cm9scyB3aGVuIHZpZGVvIGlzIHBsYXllZCB1c2luZyBrZXlib2FyZCB1bmxlc3MgdmlkZW8gaXMgcGF1c2VkXG4gICAgICAgIH0gZWxzZSBpZiAodGFyZ2V0ID09PSB0aGlzLnBhdXNlQnRuKSB7XG4gICAgICAgICAgICBpZiAoZXZlbnQua2V5ID09PSBcIkVudGVyXCIgfHwgZXZlbnQua2V5ID09PSBcIiBcIiB8fCBldmVudC5rZXkgPT09IFwiU3BhY2ViYXJcIikge1xuICAgICAgICAgICAgICAgIHRoaXMuaGlkZUNvbnRyb2xzID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHRoaXMucGxheWVyQ29udHJvbHNUaW1lcik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aGlzLmhpZGVDb250cm9scyA9IHRydWU7XG4gICAgICAgICAgICB0aGlzLmhpZGVDb250cm9sc09uVGltZW91dCgpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLy8gZGV0ZXJtaW5lcyBpZiB0aGUgZGV2aWNlIGlzIHRvdWNoc2NyZWVuIHRvIGRpc2FibGUgY2xpY2sgb24gY2FudmFzIHRvIHBsYXlcbiAgICBwcml2YXRlIGhhbmRsZVRvdWNo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SBzZWVrYmFyIGluc3RlYWQgb2YgdGhlIHJlcGxheSBidXR0b25cbiAgICAgICAgaWYgKFxuICAgICAgICAgICAgdGFyZ2V0LmNsYXNzTGlzdC5jb250YWlucyhcInJtLXNsaWRlclwiKSB8fFxuICAgICAgICAgICAgdGFyZ2V0LmNsYXNzTGlzdC5jb250YWlucyhcInJtLXNsaWRlci10cmFja1wiKSB8fFxuICAgICAgICAgICAgdGFyZ2V0LmNsYXNzTGlzdC5jb250YWlucyhcInJtLXNsaWRlci10cmFjay1hZnRlclwiKSB8fFxuICAgICAgICAgICAgdGFyZ2V0LmNsYXNzTGlzdC5jb250YWlucyhcInJtLXNsaWRlci10cmFjay1iZWZvcmVcIikgfHxcbiAgICAgICAgICAgIHRhcmdldC5jbGFzc0xpc3QuY29udGFpbnMoXCJybS1zbGlkZXItaGFuZGxlXCIpXG4gICAgICAgICkge1xuICAgICAgICAgICAgaWYgKCF0aGlzLnJlcGxheUJ0bi5jbGFzc0xpc3QuY29udGFpbnMoXCJoaWRlXCIpICYmICF0aGlzLmxyZ1JlcGxheUJ0bi5jbGFzc0xpc3QuY29udGFpbnMoXCJoaWRlXCIpKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5scmdSZXBsYXlCdG4uY2xhc3NMaXN0LmFkZChcImhpZGVcIik7XG4gICAgICAgICAgICAgICAgdGhpcy5yZXBsYXlCdG4uY2xhc3NMaXN0LmFkZChcImhpZGVcIik7XG4gICAgICAgICAgICAgICAgdGhpcy5wbGF5QnRuLmNsYXNzTGlzdC5yZW1vdmUoXCJoaWRlXCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIC8vIGNsaWNraW5nIGFueXdoZXJlIG9uIHRoZSB2aWRlbyB3aWxsIHBsYXkvcGF1c2UgdGhlIHZpZGVvXG4gICAgICAgIGlmICh0YXJnZXQubm9kZU5hbWUudG9VcHBlckNhc2UoKSA9PT0gXCJDQU5WQVNcIikge1xuICAgICAgICAgICAgaWYgKHRoaXMudG91Y2hEZXZpY2UpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnBsYXllckNvbnRyb2xzLmNsYXNzTGlzdC5yZW1vdmUoXCJoaWRkZW5cIik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuY2xpY2tBY3Rpb25UaW1lciA9IHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXRoaXMucHJldmVudENsaWNrQWN0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnRvZ2dsZVBsYXkoZmFsc2UsIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY3BDb250YWluZXIuZm9jdXMoKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wcmV2ZW50Q2xpY2tBY3Rpb24gPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB9LCB0aGlzLmNsaWNrQWN0aW9uRGVsYXkpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKHRhcmdldC5jbGFzc0xpc3QuY29udGFpbnMoXCJjcC1sYXJnZS1yZXBsYXlcIikgfHwgdGFyZ2V0LmNsYXNzTGlzdC5jb250YWlucyhcImNwLXJlcGxheVwiKSkge1xuICAgICAgICAgICAgdGhpcy5yZXBsYXkoKTtcbiAgICAgICAgICAgIHRoaXMuY3BDb250YWluZXIuZm9jdXMoKTtcbiAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgIHRhcmdldC5jbGFzc0xpc3QuY29udGFpbnMoXCJjcC1wbGF5XCIpIHx8XG4gICAgICAgICAgICB0YXJnZXQuY2xhc3NMaXN0LmNvbnRhaW5zKFwiY3AtbGFyZ2UtcGxheVwiKSB8fFxuICAgICAgICAgICAgdGFyZ2V0LmNsYXNzTGlzdC5jb250YWlucyhcImNwLXBhdXNlXCIpXG4gICAgICAgICkge1xuICAgICAgICAgICAgdGhp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wiY3AtdHJhbnNjcmlwdFwiKSkge1xuICAgICAgICAgICAgbGV0IGZlYXR1cmVzID0gbnVsbDtcbiAgICAgICAgICAgIGlmICh0aGlzLnRyYW5zY3JpcHRXaW5kb3dGZWF0dXJlcyA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIGNvbnN0IGhlaWdodCA9IHdpbmRvdy5zY3JlZW4uYXZhaWxIZWlnaHQgLyAyO1xuICAgICAgICAgICAgICAgIGNvbnN0IHdpZHRoID0gd2luZG93LnNjcmVlbi5hdmFpbFdpZHRoIC8gMjtcbiAgICAgICAgICAgICAgICBmZWF0dXJlcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgcmVzaXphYmxlOiAxLFxuICAgICAgICAgICAgICAgICAgICBzY3JvbGxiYXJzOiAxLFxuICAgICAgICAgICAgICAgICAgICB0b3A6IHdpbmRvdy5zY3JlZW5Ub3AgKyB3aW5kb3cub3V0ZXJIZWlnaHQgLyAyIC0gaGVpZ2h0IC8gMixcbiAgICAgICAgICAgICAgICAgICAgbGVmdDogd2luZG93LnNjcmVlbkxlZnQgKyB3aW5kb3cub3V0ZXJXaWR0aCAvIDIgLSB3aWR0aCAvIDIsXG4gICAgICAgICAgICAgICAgICAgIGhlaWdodCxcbiAgICAgICAgICAgICAgICAgICAgd2lkdGgsXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgZmVhdHVyZXMgPSB0aGlzLnRyYW5zY3JpcHRXaW5kb3dGZWF0dXJlcztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZlYXR1cmVzID0gZ2V0U3RyaW5nRnJvbU9iamVjdChmZWF0dXJlcyBhcyBSZWNvcmQ8c3RyaW5nLCBudW1iZXI+KTtcblxuICAgICAgICAgICAgdGhpcy50cmFuc2NyaXB0TG9hZGVkID0gZmFsc2U7XG5cbiAgICAgICAgICAgIC8vIG9wZW4gbmV3IGJsYW5rIHdpbmRvdyB3aXRoIGRlZmF1bHQgZGVzY3JpcHRpb25zXG4gICAgICAgICAgICBpZiAodGhpcy50cmFuc2NyaXB0SFRNTFVybCA9PT0gXCJcIiAmJiB0aGlzLnRyYW5zY3JpcHRIVE1MUmVmID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgdGhpcy50cmFuc2NyaXB0V2luZG93ID0gd2luZG93Lm9wZW4odGhpcy50cmFuc2NyaXB0SFRNTFVybCwgXCJfYmxhbmtcIiwgZmVhdHVyZXMpO1xuICAgICAgICAgICAgICAgIHRoaXMuZGVzY3JpcHRpb25zLmZvckVhY2goKHRzOiBEZXNjcmlwdGlvbiwgaW5kZXgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRzLnRleHQgIT09IHVuZGVmaW5lZCAmJiB0cy50ZXh0ICE9PSBcIlwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5kZXggPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnRyYW5zY3JpcHRXaW5kb3cuZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZChkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwiaDFcIikpLmlubmVyVGV4dCA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiVmlkZW8gVHJhbnNjcmlwdFwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudHJhbnNjcmlwdFdpbmRvdy5kb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwicFwiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApLmlubmVyVGV4dCA9IHRoaXMuZm9ybWF0VHJhbnNjcmlwdCh0cy50ZXh0IGFzIHN0cmluZyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHRzLnRleHQgIT09IHRoaXMuZGVzY3JpcHRpb25zW2luZGV4IC0gMV0udGV4dCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudHJhbnNjcmlwdFdpbmRvdy5kb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwicFwiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApLmlubmVyVGV4dCA9IHRoaXMuZm9ybWF0VHJhbnNjcmlwdCh0cy50ZXh0IGFzIHN0cmluZyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB0aGlzLnRyYW5zY3JpcHRMb2FkZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIC8vIG9wZW4gbmV3IGJsYW5rIHdpbmRvdyB3aXRoIHByb3ZpZGVkIEhUTUwgRWxlbWVudChzKSBhcHBlbmRlZCB0byBib2R5XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMudHJhbnNjcmlwdEhUTUxVcmwgPT09IFwiXCIgJiYgdGhpcy50cmFuc2NyaXB0SFRNTFJlZiAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHRoaXMudHJhbnNjcmlwdFdpbmRvdyA9IHdpbmRvdy5vcGVuKHRoaXMudHJhbnNjcmlwdEhUTUxVcmwsIFwiX2JsYW5rXCIsIGZlYXR1cmVzKTtcbiAgICAgICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheSh0aGlzLnRyYW5zY3JpcHRIVE1MUmVmKSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnRyYW5zY3JpcHRIVE1MUmVmLmZvckVhY2goKGVsZW1lbnQpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGNoaWxkID0gY2xvbmVFbGVtZW50KHRoaXMudHJhbnNjcmlwdFdpbmRvdy5kb2N1bWVudCwgZWxlbWVudCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnRyYW5zY3JpcHRXaW5kb3cuZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZChjaGlsZCk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGNoaWxkID0gY2xvbmVFbGVtZW50KHRoaXMudHJhbnNjcmlwdFdpbmRvdy5kb2N1bWVudCwgdGhpcy50cmFuc2NyaXB0SFRNTFJlZik7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudHJhbnNjcmlwdFdpbmRvdy5kb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKGNoaWxkKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhpcy50cmFuc2NyaXB0TG9hZGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAvLyBvcGVuIHRoZSBwcm92aWRlZCBIVE1MIHVybCBpbiBhIG5ldyB3aW5kb3dcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy50cmFuc2NyaXB0SFRNTFVybCAhPT0gXCJcIiAmJiB0aGlzLnRyYW5zY3JpcHRIVE1MUmVmID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgdGhpcy50cmFuc2NyaXB0V2luZG93ID0gd2luZG93Lm9wZW4odGhpcy50cmFuc2NyaXB0SFRNTFVybCwgXCJfYmxhbmtcIiwgZmVhdHVyZXMpO1xuICAgICAgICAgICAgICAgIHRoaXMudHJhbnNjcmlwdExvYWRlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgLy8gb3BlbiB0aGUgcHJvdmlkZWQgSFRNTCB1cmwgaW4gYSBuZXcgd2luZG93IGFuZCBhcHBlbmQgdGhlIEhUTUwgRWxlbWVudChzKSB0byB0aGUgYm9keSBvZiB0aGUgd2luZG93IG9yIHRoZSBzcGVjaWZpZWQgY29udGFpbmVyXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGNvbnN0IGxvYWRUcmFuc2NyaXB0Q29udGVudCA9ICgpOiB2b2lkID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMudHJhbnNjcmlwdExvYWRlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0aGlzLnRyYW5zY3JpcHRXaW5kb3cuZG9jdW1lbnQuYm9keSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCgoKSA9PiBsb2FkVHJhbnNjcmlwdENvbnRlbnQoKSwgMTAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLnRyYW5zY3JpcHRIVE1MUmVmICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheSh0aGlzLnRyYW5zY3JpcHRIVE1MUmVmKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudHJhbnNjcmlwdEhUTUxSZWYuZm9yRWFjaCgoZWxlbWVudCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBjaGlsZCA9IGNsb25lRWxlbWVudCh0aGlzLnRyYW5zY3JpcHRXaW5kb3cuZG9jdW1lbnQsIGVsZW1lbnQpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLnRyYW5zY3JpcHRIVE1MQ29udGFpbmVyU2VsZWN0b3IpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudHJhbnNjcmlwdFdpbmRvdy5kb2N1bWVudC5ib2R5XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnF1ZXJ5U2VsZWN0b3IodGhpcy50cmFuc2NyaXB0SFRNTENvbnRhaW5lclNlbGVjdG9yKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5hcHBlbmRDaGlsZChjaGlsZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnRyYW5zY3JpcHRXaW5kb3cuZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZChjaGlsZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgY2hpbGQgPSBjbG9uZUVsZW1lbnQodGhpcy50cmFuc2NyaXB0V2luZG93LmRvY3VtZW50LCB0aGlzLnRyYW5zY3JpcHRIVE1MUmVmKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLnRyYW5zY3JpcHRIVE1MQ29udGFpbmVyU2VsZWN0b3IpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50cmFuc2NyaXB0V2luZG93LmRvY3VtZW50LmJvZHlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5xdWVyeVNlbGVjdG9yKHRoaXMudHJhbnNjcmlwdEhUTUxDb250YWluZXJTZWxlY3RvcilcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5hcHBlbmRDaGlsZChjaGlsZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50cmFuc2NyaXB0V2luZG93LmRvY3VtZW50LmJvZHkuYXBwZW5kQ2hpbGQoY2hpbGQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHRoaXMudHJhbnNjcmlwdExvYWRlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgIHRoaXMudHJhbnNjcmlwdFdpbmRvdyA9IHdpbmRvdy5vcGVuKHRoaXMudHJhbnNjcmlwdEhUTUxVcmwsIFwiX2JsYW5rXCIsIGZlYXR1cmVzKTtcbiAgICAgICAgICAgICAgICB0aGlzLnRyYW5zY3JpcHRXaW5kb3cub25sb2FkID0gKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXRoaXMudHJhbnNjcmlwdExvYWRlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbG9hZFRyYW5zY3JpcHRDb250ZW50KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgLypcbiAgICAgICAgICAgICAgICAgKiBJRTExIHJ1bnMgd2luZG93Lm9wZW4oKSBhcyBhIHN5bmNocm9ub3VzIHRhc2ssIHByZXZlbnRpbmcgYW55IGZ1cnRoZXJcbiAgICAgICAgICAgICAgICAgKiBKYXZhU2NyaXB0IGZyb20gcnVubmluZyB1bnRpbCB0aGUgd2luZG93IGhhcyBvcGVuZWQgYW5kIGxvYWRlZCwgc28gdGhlXG4gICAgICAgICAgICAgICAgICogb25sb2FkIGV2ZW50IHRoYXQgaXMgZGVjbGFyZWQgYWZ0ZXJ3YXJkcyBpcyBuZXZlciBmaXJlZCBiZWNhdXNlIHRoZSBuZXdcbiAgICAgICAgICAgICAgICAgKiB3aW5kb3cgaGFzIGFscmVhZHkgXCJsb2FkZWRcIi4gVG8gZ2V0IGFyb3VuZCB0aGlzLCBjaGVjayBpZiB0aGUgYnJvd3NlciBpc1xuICAgICAgICAgICAgICAgICAqIElFMTEgYW5kIGZpcmUgdGhlIGxvYWQgZXZlbnQgYWdhaW4uXG4gICAgICAgICAgICAgICAgICovXG4gICAgICAgICAgICAgICAgaWYgKGlzSUUoKSAmJiAhdGhpcy50cmFuc2NyaXB0TG9hZGVkKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGxvYWRUcmFuc2NyaXB0ID0gKCk6IHZvaWQgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCF0aGlzLnRyYW5zY3JpcHRXaW5kb3cuZG9jdW1lbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IGxvYWRUcmFuc2NyaXB0KCksIDEwMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKCF0aGlzLnRyYW5zY3JpcHRMb2FkZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2FkVHJhbnNjcmlwdENvbnRlbnQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgbG9hZFRyYW5zY3JpcHQoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAodGFyZ2V0LmNsYXNzTGlzdC5jb250YWlucyhcImNwLWZ1bGxzY3JlZW5cIikgfHwgdGFyZ2V0LmNsYXNzTGlzdC5jb250YWlucyhcImNwLWV4aXQtZnVsbHNjcmVlblwiKSkge1xuICAgICAgICAgICAgdGhpcy5wbGF5ZXIudG9nZ2xlRnVsbHNjcmVlbigpO1xuICAgICAgICAgICAgdGhpcy50b2dnbGVWaXNpYmlsaXR5KHRoaXMuZnVsbFNjcmVlbkJ0biwgdGhpcy5leGl0RnVsbFNjcmVlbkJ0bik7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvKioqIEVORCBPRiBDUC1DT05UUk9MUyBFV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GF5ZXIgaXMgcGF1c2VkIGlmIHVzZXIgbW92ZXMgdG8gYW5vdGhlciB0YWIgaW4gdGhlIGJyb3N3ZXIgYW5kIHJlc3VtZXMgcGxheWluZyB3aGVuIHVzZXIgcmV0dXJucyB0byB0YWIgd2l0aCB2aWRlb1xuICAgICAgICAgICAgRm9jdXMuYWRkRm9jdXNMaXN0ZW5lcihcbiAgICAgICAgICAgICAgICAoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKEZvY3VzLmlzSGlkZGVuKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlc3VtZVBsYXkgPSAhdGhpcy5wbGF5ZXIucGF1c2VkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghdGhpcy5wbGF5ZXIucGF1c2VkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudG9nZ2xlUGxheSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMucmVzdW1lUGxheSAmJiB0aGlzLnBsYXllci5wYXVzZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50b2dnbGVQbGF5KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH0pKCksXG4gICAgICAgICAgICApO1xuXG4gICAgICAgICAgICB0aGlzLnVwZGF0ZVNlZWtCYXJIYW5kbGVBUklBVmFsdWVUZXh0KHRoaXMuY3VycmVudFRpbWVBMTF5LCBmb3JtYXRUaW1lQTExeSh0aGlzLmR1cmF0aW9uKSk7XG4gICAgICAgICAgICB0aGlzLn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VlcHMgdGhlIGN1cnJlbnQgdGltZSBpbmRpY2F0b3IgaW4gc3luYyB3aXRoIHRoZSB2aWRlby5cbiAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZUN1cnJlbnRUaW1lVGV4dCgpO1xuXG4gICAgICAgICAgICAgICAgLy8gZml4IGZvciB2aWRlbyBjb250YWluZWQgaW4gcG9wIHVwIChlbnN1cmVzIHBsYXllciBjb250cm9scyBhcmUgc2hvd24gY29ycmVjdGx5IGlmIHVzZXIgZXhpdHMgdGhlIHZpZGVvIHdoaWxlIGl0J3MgcGxheWluZylcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5wbGF5ZXIucGF1c2VkICYmIHRoaXMuY3VycmVudFRpbWUgPT09IFwiMDowMFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLnBsYXlCdG4uY2xhc3NMaXN0LmNvbnRhaW5zKFwiaGlkZVwiKSAmJiB0aGlzLnJlcGxheUJ0bi5jbGFzc0xpc3QuY29udGFpbnMoXCJoaWRlXCIpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsYXlCdG4uY2xhc3NMaXN0LnJlbW92ZShcImhpZGVcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBhdXNlQnRuLmNsYXNzTGlzdC5hZGQoXCJoaWRlXCIpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmxyZ1BsYXlCdG4uY2xhc3NMaXN0LmNvbnRhaW5zKFwiaGlkZVwiKSAmJiB0aGlzLmxyZ1JlcGxheUJ0bi5jbGFzc0xpc3QuY29udGFpbnMoXCJoaWRlXCIpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmxyZ1BsYXlCdG4uY2xhc3NMaXN0LnJlbW92ZShcImhpZGVcIik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMucGxheWVyLnBhdXNlZCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnBhdXNlQnRuLmNsYXNzTGlzdC5hZGQoXCJoaWRlXCIpO1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5wbGF5ZXIuZW5kZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucmVwbGF5QnRuLmNsYXNzTGlzdC5yZW1vdmUoXCJoaWRlXCIpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbGF5QnRuLmNsYXNzTGlzdC5yZW1vdmUoXCJoaWRlXCIpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICghdGhpcy5wbGF5ZXIucGF1c2VkICYmIHRoaXMucGF1c2VCdG4uY2xhc3NMaXN0LmNvbnRhaW5zKFwiaGlkZVwiKSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnBsYXlCdG4uY2xhc3NMaXN0LmFkZChcImhpZGVcIik7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGF1c2VCdG4uY2xhc3NMaXN0LnJlbW92ZShcImhpZGVcIik7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLypcbiAgICAgICAgICAgICAgICAgKiBLZWVwcyB0aGUgcG9zaXRpb24gb2YgdGhlIGhhbmRsZSBvbiB0aGUgc2VlayBiYXIgaW4gc3luYyB3aXRoXG4gICAgICAgICAgICAgICAgICogdGhlIHZpZGVvLlxuICAgICAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgICAgIHRoaXMucmF0aW8gPSB0aGlzLnBsYXllci5nZXRDdXJyZW50VGltZSgpIC8gdGhpcy5kdXJhdGlvbjtcbiAgICAgICAgICAgICAgICB0aGlzLnNlZWtWYWx1ZSA9IHRoaXMucmF0aW8gKiB0aGlzLnNlZWtCYXIub3B0aW9ucy5zZWN0aW9uc1sxXTtcbiAgIC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yBjYW4gYmUgb24gYW5kIGhpZGRlbiBhdCB0aGUgc2FtZSB0aW1lIHVzaW5nIC5ibGFua1xuICAgICAgICAgICAgaWYgKHRoaXMuc2hvd0NhcHRpb25zQnRuLmNsYXNzTGlzdC5jb250YWlucyhcImhpZGVcIikpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5jYXB0aW9ucy5pbm5lclRleHQgPT09IFwiXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jYXB0aW9ucy5jbGFzc0xpc3QuYWRkKFwiYmxhbmtcIik7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY2FwdGlvbnNFbXB0eSA9IHRydWU7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jYXB0aW9ucy5jbGFzc0xpc3QucmVtb3ZlKFwiYmxhbmtcIik7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY2FwdGlvbnNFbXB0eSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgLy8gaWYgdGhlIHZpZGVvIGVuZHMsIHJlc2V0IGN1cnJlbnQgdGltZSwgc2V0IGZyYW1lIGJhY2sgdG8gMCBhbmQgc2hvdyBwbGF5IGJ0blxuICAgICAgICB0aGlzLnBsYXllci5vbihcImVuZGVkXCIsICgpID0+IHtcbiAgICAgICAgICAgIHRoaXMucGxheWVyLmVuZGVkID0gdHJ1ZTtcbiAgICAgICAgICAgIHRoaXMub25FbmQodGhpcy5lbmRBY3Rpb24pO1xuICAgICAgICB9KTtcblxuICAgICAgICBpZiAodGhpcy5vdmVybGF5ICE9PSB1bmRlZmluZWQgJiYgdGhpcy5vdmVybGF5ICE9PSBudWxsKSB7XG4gICAgICAgICAgICAvLyByZXNpemluZyBvdmVybGF5IHdoZW4gdGhlIGNhbnZhcyBwbGF5ZXIgcmVzaXplc1xuICAgICAgICAgICAgdG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XJVcCk7XG4gICAgICAgIHRoaXMucmVtb3ZlRXZlbnRMaXN0ZW5lcihcIm1vdXNlbW92ZVwiLCB0aGlzLmhhbmRsZU1vdXNlTW92ZSk7XG4gICAgICAgIHRoaXMucmVtb3ZlRXZlbnRMaXN0ZW5lcihcIm1vdXNlbGVhdmVcIiwgdGhpcy5oYW5kbGVNb3VzZUxlYXZlKTtcbiAgICAgICAgdGhpcy5wbGF5ZXJDb250cm9scy5yZW1vdmVFdmVudExpc3RlbmVyKFwiZm9jdXNpblwiLCB0aGlzLmhhbmRsZUZvY3VzSW4pO1xuICAgICAgICB0aGlzLnBsYXllckNvbnRyb2xzLnJlbW92ZUV2ZW50TGlzdGVuZXIoXCJmb2N1c291dFwiLCB0aGlzLmhhbmRsZUZvY3VzT3V0KTtcbiAgICAgICAgdGhpcy5jcENvbnRhaW5lci5xdWVyeVNlbGVjdG9yKFwiY2FudmFzXCIpLnJlbW92ZUV2ZW50TGlzdGVuZXIoXCJkYmxjbGlja1wiLCB0aGlzLmhhbmRsZURibENsaWNrKTtcbiAgICAgICAgdGhpcy5yZW1vdmVFdmVudExpc3RlbmVyKFwiY2xpY2tcIiwgdGhpcy5oYW5kbGVDbGljayk7XG4gICAgfVxufVxuXG5yZWdpc3RlckVsZW1lbnQoXCJybS1jYW52YXMtcGxheWVyLWNvbnRyb2xzXCIsIFJNQ1BDb250cm9sc0VsZW1lbnQpO1xuIl19\r\n//# sourceMappingURL=module.js.map\r\n});\r\n\r\n\r\nreturn __loader;\r\n}(window.__rmAmd, {\"createjs\": \"createjs\",\"jquery\": \"jQuery\"}))\r\n//# sourceMappingURL=rmlibrary.js.map","__rmAmd = (function (__loader, __globals) {\r\n\r\nvar define=__loader.define,defineAmd=__loader.defineAmd,require=__loader.require,i18n=__loader.i18n;\r\ndefine(\"createjs\", function () { return {default:createjs}; });\r\ndefine(\"jquery\", function () { return {default:jQuery}; });\r\n\r\ndefine(\"logic.ts\", function(require, exports, module) {\r\n\"use strict\";\r\n// import \"@rmlibrary/fetch\";\r\n//import { param } from \"jquery\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.getVideoData = void 0;\r\nvar clipsToReset = [];\r\nfunction buildTimeline() {\r\n return [\r\n //Q1\r\n \"scotia-intro-image\",\r\n \"scotia-intro\",\r\n \"scotia-q1\",\r\n //Goals\r\n \"scotia-goal-legacy\",\r\n \"scotia-goal-home\",\r\n \"scotia-goal-travel\",\r\n \"scotia-goal-children\",\r\n \"scotia-goal-expand-business\",\r\n \"scotia-goal-lifestyle\",\r\n \"scotia-goal-parents\",\r\n \"scotia-goal-start-business\",\r\n \"scotia-goal-succession\",\r\n \"scotia-goal-nest\",\r\n //Q2\r\n \"scotia-pre-q2\",\r\n \"scotia-q2\",\r\n //Q2 choices\r\n \"scotia-q2-choice-1\",\r\n \"scotia-q2-choice-2\",\r\n \"scotia-q2-choice-3\",\r\n \"scotia-q2-choice-4\",\r\n //Q3\r\n \"scotia-q3\",\r\n //Q3 choices\r\n \"scotia-q3-choice-1\",\r\n \"scotia-q3-choice-2\",\r\n \"scotia-q3-choice-3\",\r\n \"scotia-q3-choice-4\",\r\n //outro\r\n \"scotia-outro\",\r\n \"scotia-outro-image\"\r\n ];\r\n}\r\nfunction getVideoData() {\r\n var timeline = buildTimeline();\r\n return { clipsToReset: clipsToReset, timeline: timeline };\r\n}\r\nexports.getVideoData = getVideoData;\r\n//# sourceMappingURL=module.js.map\r\n});define(\"utilities.ts\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.sanitizeDescriptions = exports.hasQueryStringInURL = exports.getLanguage = exports.getDevicePixelRatio = exports.buildTranscriptHTML = void 0;\r\nfunction buildTranscriptHTML(descriptions) {\r\n return function () {\r\n return descriptions.map(function (description) {\r\n var paragraph = document.createElement(\"p\");\r\n paragraph.innerText = description;\r\n return paragraph;\r\n });\r\n };\r\n}\r\nexports.buildTranscriptHTML = buildTranscriptHTML;\r\nfunction getDevicePixelRatio() {\r\n return devicePixelRatio || 1;\r\n}\r\nexports.getDevicePixelRatio = getDevicePixelRatio;\r\nfunction getLanguage() {\r\n return document.documentElement.lang.toLowerCase().indexOf(\"en\") > -1 ? \"en\" : \"fr\";\r\n}\r\nexports.getLanguage = getLanguage;\r\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\nfunction hasQueryStringInURL(name) {\r\n var queryStrings = location.search.substring(1).split(\"&\");\r\n return queryStrings.some(function (queryString) {\r\n var key = queryString.split(\"=\")[0];\r\n return decodeURIComponent(key) === name;\r\n });\r\n}\r\nexports.hasQueryStringInURL = hasQueryStringInURL;\r\nfunction sanitizeDescriptions(descriptions, formatTranscript) {\r\n return descriptions\r\n .reduce(function (uniqueDescriptions, currentDescription) {\r\n var text = currentDescription.text;\r\n return !uniqueDescriptions || uniqueDescriptions.map(function (description) { return description.text; }).indexOf(text) > -1\r\n ? uniqueDescriptions\r\n : uniqueDescriptions.concat(currentDescription);\r\n }, [])\r\n .sort(function (descriptionA, descriptionB) {\r\n if (descriptionA.startTime === descriptionB.startTime) {\r\n if (descriptionA.type === \"caption\" && descriptionB.type === \"description\") {\r\n return 1;\r\n }\r\n else if (descriptionB.type === \"caption\" && descriptionA.type === \"description\") {\r\n return -1;\r\n }\r\n }\r\n return descriptionA.startTime - descriptionB.startTime;\r\n })\r\n .map(function (currentDescription) {\r\n return formatTranscript ? formatTranscript(currentDescription.text) : currentDescription.text;\r\n });\r\n}\r\nexports.sanitizeDescriptions = sanitizeDescriptions;\r\n//# sourceMappingURL=module.js.map\r\n});define(\"animation.ts\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.loadAnimations = void 0;\r\nvar utilities_1 = require(\"./utilities\");\r\nvar animationCache = {};\r\nvar language = (0, utilities_1.getLanguage)();\r\nfunction loadAnimation(filename) {\r\n var cacheKey = \"\".concat(filename, \"-\").concat(language);\r\n if (animationCache[cacheKey]) {\r\n return Promise.resolve(animationCache[cacheKey]);\r\n }\r\n return new Promise(function (resolve) {\r\n var script = document.createElement(\"script\");\r\n script.src = \"/ui/vendors/richmedia.modded/animate/\".concat(language, \"/\").concat(filename, \".js\");\r\n script.onload = function () {\r\n return setTimeout(function () {\r\n var animation = require(filename).default;\r\n var library = animation.composition.getLibrary();\r\n var manifest = library.properties.manifest;\r\n manifest.forEach(function (asset) {\r\n if (!asset.src.startsWith(\"http\")) {\r\n asset.src = \"/ui/vendors/richmedia.modded/animate/\".concat(language, \"/\").concat(asset.src);\r\n }\r\n });\r\n animationCache[filename] = animation;\r\n resolve(animation);\r\n });\r\n };\r\n document.head.appendChild(script);\r\n });\r\n}\r\nfunction loadAnimations(timeline) {\r\n var promises = timeline.map(function (section) { return loadAnimation(section); });\r\n return Promise.all(promises);\r\n}\r\nexports.loadAnimations = loadAnimations;\r\n//# sourceMappingURL=module.js.map\r\n});define(\"video.ts\", function(require, exports, module) {\r\n\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) { if (Object.prototype.hasOwnProperty.call(b, p)) { d[p] = b[p]; } } };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n { throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\"); }\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __assign = (this && this.__assign) || function () {\r\n __assign = Object.assign || function(t) {\r\n var arguments$1 = arguments;\r\n\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments$1[i];\r\n for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p))\r\n { t[p] = s[p]; } }\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nrequire(\"@rmlibrary/canvas-player-controls\");\r\nvar canvas_player_1 = require(\"@rmlibrary/canvas-player\");\r\nvar utilities_1 = require(\"./utilities\");\r\nvar custom_elements_1 = require(\"@rmlibrary/custom-elements\");\r\nvar animation_1 = require(\"./animation\");\r\nvar language = (0, utilities_1.getLanguage)();\r\nvar timelineSceneData = new Map();\r\nvar devicePixelRatio = (0, utilities_1.getDevicePixelRatio)();\r\nvar container = document.querySelector(\".cp-container\");\r\nvar playerControls = document.getElementsByTagName(\"rm-canvas-player-controls\")[0];\r\nvar DEBUG = true;\r\nvar testingUrlEn = \"https://publish1canadacentral.qa.scotiaweb.adobecqms.net/content/swm/swm/ca/en/connect-with-us.html\";\r\nvar testingUrlFr = \"https://publish1canadacentral.qa.scotiaweb.adobecqms.net/content/swm/swm/ca/fr/communiquez-avec-nous.html\";\r\nvar productionUrlEn = \"https://www.scotiawealthmanagement.com/ca/en/connect-with-us.html\";\r\nvar productionUrlFr = \"https://www.scotiawealthmanagement.com/ca/fr/communiquez-avec-nous.html\";\r\nvar RMDynamicVideo = /** @class */ (function (_super) {\r\n __extends(RMDynamicVideo, _super);\r\n function RMDynamicVideo() {\r\n var _this = this;\r\n _this.embedMode = false;\r\n _this.ready = false;\r\n _this.gettingSceneInfo = false;\r\n // @ts-ignore\r\n return _this = _super.call(this) || this;\r\n }\r\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\n RMDynamicVideo.prototype.connectedCallback = function () {\r\n this.container = document.getElementsByClassName(\"cp-container\")[0];\r\n this.controls = document.getElementsByTagName(\"rm-canvas-player-controls\")[0];\r\n this.largePlayButton = document.getElementsByClassName(\"cp-large-play\")[0];\r\n this.largeReplayButton = document.getElementsByClassName(\"cp-large-replay\")[0];\r\n this.pauseButton = document.getElementsByClassName(\"cp-pause\")[0];\r\n this.playButton = document.getElementsByClassName(\"cp-play\")[0];\r\n this.replayButton = document.getElementsByClassName(\"cp-replay\")[0];\r\n this.videoElem = document.getElementsByClassName(\"cp-video\")[0];\r\n this.videoElemAlt = document.getElementsByClassName(\"cp-video-preload\")[0];\r\n this.preloader = playerControls.querySelector(\".cp-preloader\");\r\n (0, canvas_player_1.iframeFix)();\r\n };\r\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\n RMDynamicVideo.prototype.disconnectedCallback = function () {\r\n var _a, _b;\r\n (_a = this.controls) === null || _a === void 0 ? void 0 : _a.removeEventListeners();\r\n (_b = this.player) === null || _b === void 0 ? void 0 : _b.destroy();\r\n };\r\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\n RMDynamicVideo.prototype.initVideo = function (data, embedMode) {\r\n var _this = this;\r\n var _a, _b;\r\n console.log(\"Initializing\");\r\n this.embedMode = embedMode;\r\n this.stageVars = data;\r\n this.initialLoad = true;\r\n //set src location of video\r\n var activeElem = document.querySelector(\".cp-video\");\r\n activeElem.src = \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/\" + \"scotia-intro.mp4\";\r\n var preloadElem = document.querySelector(\".cp-video-preload\");\r\n preloadElem.src = \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/\" + \"scotia-intro.mp4\";\r\n //prevent background click-to-play on initial load\r\n this.container.style.pointerEvents = \"none\";\r\n (0, animation_1.loadAnimations)(data.timeline).then(function (animations) { return _this.handleLoadedAnimations(animations); });\r\n (_a = this.videoElem) === null || _a === void 0 ? void 0 : _a.pause();\r\n (_b = this.videoElemAlt) === null || _b === void 0 ? void 0 : _b.pause();\r\n };\r\n RMDynamicVideo.prototype.updateAnimationTimeline = function (animations, startScene) {\r\n var _a, _b;\r\n (_a = this.player) === null || _a === void 0 ? void 0 : _a.reflow(animations, {\r\n scene: startScene\r\n });\r\n //\r\n (_b = this.player) === null || _b === void 0 ? void 0 : _b.play();\r\n this.largePlayButton.classList.add(\"hide\");\r\n this.pauseButton.classList.remove(\"hide\");\r\n this.playButton.classList.add(\"hide\");\r\n this.replayButton.classList.add(\"hide\");\r\n //this.updateCurrentScene(startScene);\r\n };\r\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\n RMDynamicVideo.prototype.playVideo = function () {\r\n var _this = this;\r\n if (this.player && this.ready) {\r\n setTimeout(function () {\r\n var _a, _b;\r\n (_a = _this.player) === null || _a === void 0 ? void 0 : _a.play();\r\n (_b = _this.largePlayButton) === null || _b === void 0 ? void 0 : _b.classList.add(\"hide\");\r\n }, 100);\r\n }\r\n };\r\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\n RMDynamicVideo.prototype.resetVideo = function () {\r\n var _a, _b, _c, _d, _e, _f;\r\n //this.player?.pause();\r\n (_a = this.player) === null || _a === void 0 ? void 0 : _a.goToFrame(0);\r\n (_b = this.pauseButton) === null || _b === void 0 ? void 0 : _b.classList.add(\"hide\");\r\n (_c = this.playButton) === null || _c === void 0 ? void 0 : _c.classList.add(\"hide\");\r\n (_d = this.largePlayButton) === null || _d === void 0 ? void 0 : _d.classList.add(\"hide\");\r\n (_e = this.replayButton) === null || _e === void 0 ? void 0 : _e.classList.add(\"hide\");\r\n var clipsToReset = ((_f = this.stageVars) === null || _f === void 0 ? void 0 : _f.clipsToReset) || [];\r\n while (clipsToReset.length) {\r\n var instance = clipsToReset.pop();\r\n instance.isSingleFrame = false;\r\n }\r\n };\r\n RMDynamicVideo.prototype.updateVideoData = function (data) {\r\n var _a;\r\n (_a = this.player) === null || _a === void 0 ? void 0 : _a.updateStageVars(data);\r\n if (this.controls) {\r\n this.controls.formatTranscript = this.formatTranscript();\r\n }\r\n this.updateTranscript();\r\n };\r\n RMDynamicVideo.prototype.formatTranscript = function () {\r\n return function (text) {\r\n //console.log(text, \"---tttext\");\r\n var formattedText = \"\";\r\n if (text) {\r\n formattedText = text;\r\n }\r\n return formattedText;\r\n };\r\n };\r\n RMDynamicVideo.prototype.loadBgMusic = function (src) {\r\n var _this = this;\r\n return new Promise(function (resolve, reject) {\r\n var queue = new createjs.LoadQueue(true);\r\n queue.installPlugin(createjs.Sound);\r\n queue.on(\"complete\", function () {\r\n var _a;\r\n try {\r\n var inst = createjs.Sound.play(\"bgMusic\", { loop: -1 });\r\n inst.paused = true;\r\n //if player is already playing, start the sound\r\n if (!((_a = _this.player) === null || _a === void 0 ? void 0 : _a.paused)) {\r\n inst.paused = false;\r\n }\r\n resolve(inst);\r\n }\r\n catch (e) {\r\n reject(e);\r\n }\r\n });\r\n queue.on(\"error\", function (e) {\r\n reject(new Error(e.message));\r\n });\r\n queue.loadFile({ id: \"bgMusic\", src: src });\r\n });\r\n };\r\n RMDynamicVideo.prototype.handleLoadedAnimations = function (animations) {\r\n var _this = this;\r\n var _a, _b;\r\n var overlay = null;\r\n var currentFrame;\r\n var stopFrames = [];\r\n var chapterData = [];\r\n var nextLockedFrame;\r\n var stoppedAtFrame = false;\r\n var bgSound;\r\n var hidden = \"\";\r\n var updatedTimeline;\r\n var isVideoLoading = true;\r\n var isScrubbing = false;\r\n var isPreloading = false;\r\n var videosSwapped = false;\r\n var pausedForLoading = false;\r\n var replaying = false;\r\n var onSelectionScreen = false;\r\n var preloadVideo = function (sceneName) {\r\n isPreloading = true;\r\n resetVideoSources();\r\n var activeElem = document.querySelector(\".cp-video\");\r\n activeElem.src = \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/\" + sceneName + \".mp4\";\r\n activeElem.pause();\r\n var altElem = document.querySelector(\".cp-video-preload\");\r\n altElem.pause();\r\n };\r\n var stringRemapper = function (varName) {\r\n var varFound = false;\r\n var objectRemaps = language == \"en\" ? objectRemapsEn : objectRemapsFr;\r\n for (var i = 0; i < Object.keys(objectRemaps).length; i++) {\r\n var key = Object.keys(objectRemaps)[i];\r\n var value = Object.values(objectRemaps)[i];\r\n if (key.includes(varName)) {\r\n varFound = true;\r\n return value;\r\n }\r\n if (!varFound) {\r\n \"no remap found for *\".concat(varName, \"*\");\r\n }\r\n }\r\n };\r\n var chapterObj = {\r\n chapterFrame: 0,\r\n activated: false,\r\n ariaLabel: \"\"\r\n };\r\n var videoObjs = {\r\n videoIntro: \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/scotia-intro.mp4\",\r\n videoPreQ2: \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/scotia-pre-q2.mp4\",\r\n videoGoalLegacy: \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/scotia-goal-legacy.mp4\",\r\n videoGoalHome: \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/scotia-goal-home.mp4\",\r\n videoGoalTravel: \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/scotia-goal-travel.mp4\",\r\n videoGoalChildren: \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/scotia-goal-children.mp4\",\r\n videoGoalExpandbusiness: \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/scotia-goal-expand-business.mp4\",\r\n videoGoalLifestyle: \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/scotia-goal-lifestyle.mp4\",\r\n videoGoalNest: \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/scotia-goal-nest.mp4\",\r\n videoGoalParents: \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/scotia-goal-parents.mp4\",\r\n videoGoalStartbusiness: \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/scotia-goal-start-business.mp4\",\r\n videoGoalSuccession: \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/scotia-goal-succession.mp4\",\r\n videoQ2C1: \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/scotia-q2-choice-1.mp4\",\r\n videoQ2C2: \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/scotia-q2-choice-2.mp4\",\r\n videoQ2C3: \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/scotia-q2-choice-3.mp4\",\r\n videoQ2C4: \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/scotia-q2-choice-4.mp4\",\r\n videoQ3C1: \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/scotia-q3-choice-1.mp4\",\r\n videoQ3C2: \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/scotia-q3-choice-2.mp4\",\r\n videoQ3C3: \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/scotia-q3-choice-3.mp4\",\r\n videoQ3C4: \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/scotia-q3-choice-4.mp4\",\r\n videoPreOutro: \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/scotia-pre-outro.mp4\",\r\n videoOutro: \"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/scotia-outro.mp4\"\r\n };\r\n //string remapping en\r\n var objectRemapsEn = {\r\n \"scotia-intro-image\": \"\",\r\n \"scotia-intro\": \"\",\r\n \"scotia-q1\": \"What is your top priority right now when you think about your goals for the future?\",\r\n //Goals\r\n \"scotia-goal-legacy\": \"Leave a legacy\",\r\n \"scotia-goal-home\": \"Purchase a second property\",\r\n \"scotia-goal-travel\": \"Enjoy leisure and travel\",\r\n \"scotia-goal-children\": \"Help children or grandchildren\",\r\n \"scotia-goal-expand-business\": \"Expand my business\",\r\n \"scotia-goal-lifestyle\": \"Maintain lifestyle\",\r\n \"scotia-goal-parents\": \"Help parents\",\r\n \"scotia-goal-start-business\": \"Start a business\",\r\n \"scotia-goal-succession\": \"Plan for business succession\",\r\n \"scotia-goal-nest\": \"Manage nest egg\",\r\n //Q2\r\n \"scotia-pre-q2\": \"\",\r\n \"scotia-q2\": \"Which potential future scenario would you prioritize planning for?\",\r\n //Q2 choices\r\n \"scotia-q2-choice-1\": \"No unexpected health issues\",\r\n \"scotia-q2-choice-2\": \"Unexpected health issue arises for me\",\r\n \"scotia-q2-choice-3\": \"Unexpected health issue for me or my partner\",\r\n \"scotia-q2-choice-4\": \"Unexpected health issue for both me and my partner\",\r\n //Q3\r\n \"scotia-q3\": \"In the absence of planning, how would you fund costs?\",\r\n //Q3 choices\r\n \"scotia-q3-choice-1\": \"Sell my house\",\r\n \"scotia-q3-choice-2\": \"Use my savings\",\r\n \"scotia-q3-choice-3\": \"I have insurance\",\r\n \"scotia-q3-choice-4\": \"I don’t know\",\r\n //outro\r\n \"scotia-q4\": \"Call To Action\",\r\n \"scotia-q4-choice-1\": \"Connect with us\",\r\n \"scotia-outro\": \"\",\r\n \"scotia-outro-image\": \"\"\r\n };\r\n //string remapping fr\r\n var objectRemapsFr = {\r\n \"scotia-intro-image\": \"\",\r\n \"scotia-intro\": \"\",\r\n \"scotia-q1\": \"Quelle est votre priorité aujourd’hui quand vous pensez à votre avenir?\",\r\n //Goals\r\n \"scotia-goal-legacy\": \"Laisser un héritage\",\r\n \"scotia-goal-home\": \"Acheter une propriété secondaire\",\r\n \"scotia-goal-travel\": \"M’adonner à des loisirs et voyager\",\r\n \"scotia-goal-children\": \"Aider mes enfants ou petits-enfants\",\r\n \"scotia-goal-expand-business\": \"Faire croître mon entreprise\",\r\n \"scotia-goal-lifestyle\": \"Maintenir mon mode de vie\",\r\n \"scotia-goal-parents\": \"Aider mes parents\",\r\n \"scotia-goal-start-business\": \"Démarrer une entreprise\",\r\n \"scotia-goal-succession\": \"Planifier la relève de mon entreprise\",\r\n \"scotia-goal-nest\": \"Gérer mon épargne\",\r\n //Q2\r\n \"scotia-pre-q2\": \"\",\r\n \"scotia-q2\": \"À quel scénario hypothétique voudriez-vous donner la priorité dans vos plans?\",\r\n //Q2 choices\r\n \"scotia-q2-choice-1\": \"Aucun problème de santé imprévu\",\r\n \"scotia-q2-choice-2\": \"J’ai un problème de santé imprévu\",\r\n \"scotia-q2-choice-3\": \"Mon partenaire ou moi avons un problème de santé imprévu\",\r\n \"scotia-q2-choice-4\": \"Mon partenaire et moi avons un problème de santé imprévu\",\r\n //Q3\r\n \"scotia-q3\": \"Détrompez-vous. Si vous ne faites aucun plan et que des problèmes de santé surviennent, comment paierez-vous les frais?\",\r\n //Q3 choices\r\n \"scotia-q3-choice-1\": \"Vendre ma maison\",\r\n \"scotia-q3-choice-2\": \"Utiliser mon épargne\",\r\n \"scotia-q3-choice-3\": \"J’ai une assurance\",\r\n \"scotia-q3-choice-4\": \"Je ne sais pas\",\r\n //outro\r\n \"scotia-q4\": \"appel à l'action\",\r\n \"scotia-q4-choice-1\": \"Nous joindre\",\r\n \"scotia-outro\": \"\",\r\n \"scotia-outro-image\": \"\"\r\n };\r\n var goalObjs = {\r\n selectedGoals: [],\r\n selectedScenario: [],\r\n selectedFunding: []\r\n };\r\n var proceedStates = {\r\n proceedBtn1Active: false,\r\n proceedBtn2Active: false,\r\n proceedBtn3Active: false\r\n };\r\n var defaultAnimations = animations.slice(0, 5); //intro seq\r\n defaultAnimations.push.apply(//intro seq\r\n defaultAnimations, animations.slice(13, 16)); //q2 seq\r\n defaultAnimations.push.apply(//q2 seq\r\n defaultAnimations, animations.slice(19, 21)); //q3 seq\r\n defaultAnimations.push.apply(//q3 seq\r\n defaultAnimations, animations.slice(24, 25)); //outro seq\r\n var introArray = [\"scotia-intro-image\", \"scotia-intro\", \"scotia-q1\"];\r\n var q2Array = [\"scotia-pre-q2\", \"scotia-q2\"];\r\n var q3Array = [\"scotia-q3\"];\r\n var outroArray = [\"scotia-outro\", \"scotia-outro-image\"];\r\n var defaultGoal = [\"scotia-goal-legacy\", \"scotia-goal-home\"];\r\n var defaultScenario = [\"scotia-q2-choice-1\"];\r\n var defaultFunding = [\"scotia-q3-choice-1\"];\r\n this.player = new canvas_player_1.default(this.container, animations, {\r\n autoplay: false,\r\n domOverlay: true,\r\n backgroundMusic: {\r\n fadeOut: true,\r\n // Update soundClipID when the background music has been added to the first Animate file in the timeline.\r\n soundClipID: \"\"\r\n },\r\n dynamicTimeline: defaultAnimations.map(function (animation) { return animation.meta.TITLE; }),\r\n enableCC: true,\r\n // Update fonts for client.\r\n fonts: [\"'Helvetica'\"],\r\n pixelDensity: devicePixelRatio,\r\n rootName: \"\",\r\n nativeAudio: true,\r\n stageVars: __assign(__assign({}, this.stageVars), { goalObjs: goalObjs, proceedStates: proceedStates, pauseForInputs: function () {\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n //resetVideoSources();\r\n onSelectionScreen = true;\r\n if (!stoppedAtFrame) {\r\n canvasPlayer.pause();\r\n //setTimeout(() => {\r\n stoppedAtFrame = canvasPlayer.exportRoot.currentFrame;\r\n //}, 100);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n _this.controls.resumePlay = false;\r\n _this.controls.preventClickAction = true;\r\n if (overlay)\r\n { overlay.style.pointerEvents = \"\"; }\r\n if (typeof bgSound !== \"undefined\" && bgSound.paused) {\r\n //bgSound.position = canvasPlayer.getCurrentTime() * 1000;\r\n bgSound.paused = false;\r\n }\r\n }\r\n if ((_a = _this.player) === null || _a === void 0 ? void 0 : _a.paused) {\r\n playerControls.getElementsByClassName(\"cp-controls-container\")[0].classList.add(\"hidden\");\r\n }\r\n //reset order of videos, then swap scenes if current video element is not playing next video in sequence\r\n //fixes cases where user returns to previous chapter and does not interact with menu video selections\r\n resetVideoSources();\r\n if (_this.currentScene.sceneName == \"scotia-q1\" &&\r\n !((_b = _this.videoElem) === null || _b === void 0 ? void 0 : _b.src.includes(goalObjs.selectedGoals[0])) &&\r\n ((_c = _this.nextScene) === null || _c === void 0 ? void 0 : _c.sceneName) == goalObjs.selectedGoals[0]) {\r\n swapVideoSources();\r\n }\r\n if (_this.currentScene.sceneName == \"scotia-q2\" &&\r\n !((_d = _this.videoElem) === null || _d === void 0 ? void 0 : _d.src.includes(goalObjs.selectedScenario[0])) &&\r\n ((_e = _this.nextScene) === null || _e === void 0 ? void 0 : _e.sceneName) == goalObjs.selectedScenario[0]) {\r\n swapVideoSources();\r\n }\r\n if (_this.currentScene.sceneName == \"scotia-q3\" &&\r\n !((_f = _this.videoElem) === null || _f === void 0 ? void 0 : _f.src.includes(goalObjs.selectedFunding[0])) &&\r\n ((_g = _this.nextScene) === null || _g === void 0 ? void 0 : _g.sceneName) == goalObjs.selectedFunding[0]) {\r\n swapVideoSources();\r\n }\r\n (_h = _this.videoElem) === null || _h === void 0 ? void 0 : _h.pause();\r\n (_j = _this.videoElemAlt) === null || _j === void 0 ? void 0 : _j.pause();\r\n }, continueVideo: function (_targetP, _targetB) {\r\n currentFrame = canvasPlayer.exportRoot.currentFrame;\r\n //validation check\r\n if (_targetB.name == \"q1_proceed\") {\r\n if (goalObjs.selectedGoals.length > 0) {\r\n //*Nest egg and lifestyle option are the same video\r\n //only play one of them\r\n if (goalObjs.selectedGoals.includes(\"scotia-goal-nest\") &&\r\n goalObjs.selectedGoals.includes(\"scotia-goal-lifestyle\")) {\r\n goalObjs.selectedGoals = goalObjs.selectedGoals.filter(function (scene) {\r\n return scene != \"scotia-goal-nest\";\r\n });\r\n }\r\n updatedTimeline = introArray.concat(goalObjs.selectedGoals, q2Array);\r\n //if selected scenario was already chosen, use that for new timeline, else use default\r\n if (goalObjs.selectedScenario.length > 0) {\r\n updatedTimeline = updatedTimeline.concat(goalObjs.selectedScenario, q3Array);\r\n }\r\n else {\r\n updatedTimeline = updatedTimeline.concat(defaultScenario, q3Array);\r\n }\r\n //if selected funding was already chosen, use that for new timeline, else use default\r\n if (goalObjs.selectedFunding.length > 0) {\r\n updatedTimeline = updatedTimeline.concat(goalObjs.selectedFunding, outroArray);\r\n }\r\n else {\r\n updatedTimeline = updatedTimeline.concat(defaultFunding, outroArray);\r\n }\r\n _this.updateAnimationTimeline(updatedTimeline, goalObjs.selectedGoals[0]);\r\n setupChapters();\r\n unlockChapter(0);\r\n playerControls\r\n .getElementsByClassName(\"cp-controls-container\")[0]\r\n .classList.remove(\"hidden\");\r\n onSelectionScreen = false;\r\n //let continueBtn = document.querySelector(\".proceed_btn\") as HTMLButtonElement;\r\n //continueBtn.disabled = false;\r\n //goalObjs.selectedGoals = [];\r\n }\r\n }\r\n else if (_targetB.name == \"q2_proceed\") {\r\n if (goalObjs.selectedScenario.length > 0) {\r\n //if selected goals were already chosen, use that for new timeline, else use default\r\n if (goalObjs.selectedGoals.length > 0) {\r\n updatedTimeline = introArray.concat(goalObjs.selectedGoals, q2Array);\r\n }\r\n else {\r\n updatedTimeline = introArray.concat(defaultGoal, q2Array);\r\n }\r\n //if selected scenario was already chosen, use that for new timeline, else use default\r\n if (goalObjs.selectedScenario.length > 0) {\r\n updatedTimeline = updatedTimeline.concat(goalObjs.selectedScenario, q3Array);\r\n }\r\n else {\r\n updatedTimeline = updatedTimeline.concat(defaultScenario, q3Array);\r\n }\r\n //if selected funding was already chosen, use that for new timeline, else use default\r\n if (goalObjs.selectedFunding.length > 0) {\r\n updatedTimeline = updatedTimeline.concat(goalObjs.selectedFunding, outroArray);\r\n }\r\n else {\r\n updatedTimeline = updatedTimeline.concat(defaultFunding, outroArray);\r\n }\r\n _this.updateAnimationTimeline(updatedTimeline, goalObjs.selectedScenario[0]);\r\n setupChapters();\r\n unlockChapter(1);\r\n playerControls\r\n .getElementsByClassName(\"cp-controls-container\")[0]\r\n .classList.remove(\"hidden\");\r\n onSelectionScreen = false;\r\n //let continueBtn = document.querySelector(\".proceed_btn\") as HTMLButtonElement;\r\n //continueBtn.disabled = false;\r\n }\r\n }\r\n else if (_targetB.name == \"q3_proceed\") {\r\n if (goalObjs.selectedFunding.length > 0) {\r\n //if selected goals were already chosen, use that for new timeline, else use default\r\n if (goalObjs.selectedGoals.length > 0) {\r\n updatedTimeline = introArray.concat(goalObjs.selectedGoals, q2Array);\r\n }\r\n else {\r\n updatedTimeline = introArray.concat(defaultGoal, q2Array);\r\n }\r\n //if selected scenario was already chosen, use that for new timeline, else use default\r\n if (goalObjs.selectedScenario.length > 0) {\r\n updatedTimeline = updatedTimeline.concat(goalObjs.selectedScenario, q3Array);\r\n }\r\n else {\r\n updatedTimeline = updatedTimeline.concat(defaultScenario, q3Array);\r\n }\r\n //if selected funding was already chosen, use that for new timeline, else use default\r\n if (goalObjs.selectedFunding.length > 0) {\r\n updatedTimeline = updatedTimeline.concat(goalObjs.selectedFunding, outroArray);\r\n }\r\n else {\r\n updatedTimeline = updatedTimeline.concat(defaultFunding, outroArray);\r\n }\r\n _this.updateAnimationTimeline(updatedTimeline, goalObjs.selectedFunding[0]);\r\n setupChapters();\r\n unlockChapter(2);\r\n playerControls\r\n .getElementsByClassName(\"cp-controls-container\")[0]\r\n .classList.remove(\"hidden\");\r\n onSelectionScreen = false;\r\n //let continueBtn = document.querySelector(\".proceed_btn\") as HTMLButtonElement;\r\n //continueBtn.disabled = false;\r\n }\r\n }\r\n isPreloading = false;\r\n }, sendDataResponse: function (_targetP, _targetB) {\r\n var customIVTopPriority = stringRemapper(\"scotia-q1\") + \"
    \";\r\n var customIVPlanningPriority = stringRemapper(\"scotia-q2\") + \"
    \";\r\n var customIVHealthcareCosts = stringRemapper(\"scotia-q3\") + \"
    \";\r\n\r\n goalObjs.selectedGoals.forEach(function (element) {\r\n customIVTopPriority += stringRemapper(element) + \"
    \";\r\n });\r\n\r\n customIVPlanningPriority += stringRemapper(goalObjs.selectedScenario[0]) + \"
    \";\r\n customIVHealthcareCosts += stringRemapper(goalObjs.selectedFunding[0]) + \"
    \";\r\n\r\n var formParams = MDM.Components.ModularContactForm.PresetForms.mdRichMedia;\r\n formParams.customIVTopPriority = customIVTopPriority;\r\n formParams.customIVPlanningPriority = customIVPlanningPriority;\r\n formParams.customIVHealthcareCosts = customIVHealthcareCosts\r\n\r\n const event = document.createEvent(\"Event\");\r\n MDM.Components.ModularContactForm.Instances.ModalHost.modalFormButtonActivate(event, formParams);\r\n }, resetStageVars: function (_targetP, _targetB) {\r\n //resets videodata\r\n //hide controls for scrubbing and show large replay button instead\r\n goalObjs.selectedGoals = [];\r\n goalObjs.selectedScenario = [];\r\n goalObjs.selectedFunding = [];\r\n $(\".cp-large-replay\").trigger(\"click\");\r\n proceedStates.proceedBtn1Active = false;\r\n proceedStates.proceedBtn2Active = false;\r\n proceedStates.proceedBtn3Active = false;\r\n console.log(\"Replaying\");\r\n chapterData = [];\r\n setupChapters();\r\n //reset bgsound\r\n replaying = false;\r\n bgSound.position = 0;\r\n bgSound.volume = 1;\r\n bgSound.paused = false;\r\n _this.largePlayButton.classList.add(\"hide\");\r\n _this.playButton.classList.add(\"hide\");\r\n playerControls.getElementsByClassName(\"cp-controls-container\")[0].classList.remove(\"hidden\");\r\n //reset framelimit to first locked frame\r\n _this.controls.frameLimit = chapterData[0].chapterFrame;\r\n //ensure playbutton overlay is hidden on replay, allow background clicks\r\n setTimeout(function () {\r\n _this.playButton.classList.add(\"hide\");\r\n _this.largePlayButton.classList.add(\"hide\");\r\n _this.container.style.pointerEvents = \"auto\";\r\n }, 500);\r\n }, fadeOutBGMusic: function () {\r\n //prevent controls interaction once music fades out, prevent background click\r\n playerControls.getElementsByClassName(\"cp-controls-container\")[0].classList.add(\"hidden\");\r\n _this.container.style.pointerEvents = \"none\";\r\n var vol = bgSound.volume;\r\n var interval = 100; // 100ms interval\r\n var fadeout = setInterval(function () {\r\n // Reduce volume by 0.05 as long as it is above 0\r\n // This works as long as you start with a multiple of 0.05!\r\n if (bgSound.volume > 0) {\r\n bgSound.paused = false;\r\n vol -= 0.1;\r\n bgSound.volume = vol;\r\n }\r\n else {\r\n // Stop the setInterval when 0 is reached\r\n clearInterval(fadeout);\r\n }\r\n }, interval);\r\n }, getVideoToPlay: function (sceneName) {\r\n playerControls.getElementsByClassName(\"cp-controls-container\")[0].classList.remove(\"hidden\");\r\n var videoFound = false;\r\n isScrubbing = false;\r\n for (var i = 0; i < Object.keys(videoObjs).length; i++) {\r\n var value = Object.values(videoObjs)[i];\r\n if (value.includes(sceneName)) {\r\n videoFound = true;\r\n return value;\r\n }\r\n }\r\n if (!videoFound) {\r\n console.log(\"no video path for *\".concat(sceneName, \"*, check animate video name matches video name in videos folder\"));\r\n }\r\n }, updateGoals: function (_targetP, checkbox) {\r\n //this.updateCurrentScene(\"scotia-q1\");\r\n if (checkbox.checked && goalObjs.selectedGoals.length < 3) {\r\n goalObjs.selectedGoals.push(checkbox.id);\r\n }\r\n else {\r\n goalObjs.selectedGoals = goalObjs.selectedGoals.filter(function (e) {\r\n checkbox.checked = false;\r\n return e !== checkbox.id;\r\n });\r\n }\r\n var container = document.querySelector(\".cp-overlay\");\r\n var proceed_btn;\r\n //proceed button is on separate shadow dom compared to input elements\r\n //in order to update it's styling based on input changes need to\r\n //ensure accessing correct shadow node\r\n if (container.childNodes[0].shadowRoot.children[1].id === \"proceed_btn\") {\r\n proceed_btn = container.childNodes[0].shadowRoot.children[1];\r\n }\r\n if (container.childNodes[1].shadowRoot.children[1].id === \"proceed_btn\") {\r\n proceed_btn = container.childNodes[1].shadowRoot.children[1];\r\n }\r\n if (goalObjs.selectedGoals[0]) {\r\n preloadVideo(goalObjs.selectedGoals[0]);\r\n proceedStates.proceedBtn1Active = true;\r\n proceed_btn.style.pointerEvents = \"auto\";\r\n proceed_btn.style.opacity = \"100%\";\r\n proceed_btn.setAttribute(\"aria-label\", language == \"en\" ? \"Proceed\" : \"Poursuivre\");\r\n }\r\n else {\r\n proceedStates.proceedBtn1Active = false;\r\n proceed_btn.style.pointerEvents = \"none\";\r\n proceed_btn.style.opacity = \"75%\";\r\n proceed_btn.setAttribute(\"aria-label\", language == \"en\"\r\n ? \"Proceed button unavailable please make a selection\"\r\n : \"Il est impossible de cliquer sur le bouton Poursuivre, veuillez choisir une option.\");\r\n }\r\n }, updateScenario: function (checkboxes, checkbox) {\r\n //this.updateCurrentScene(\"scotia-q2\");\r\n //resetVideoSources();\r\n if (checkbox.checked) {\r\n goalObjs.selectedScenario.pop();\r\n goalObjs.selectedScenario.push(checkbox.id);\r\n for (var i = 0; i < checkboxes.length; i++) {\r\n checkboxes[i].checked = false;\r\n }\r\n checkbox.checked = true;\r\n }\r\n else {\r\n goalObjs.selectedScenario.pop();\r\n }\r\n var container = document.querySelector(\".cp-overlay\");\r\n var proceed_btn;\r\n if (container.childNodes[0].shadowRoot.children[1].id === \"proceed_btn\") {\r\n proceed_btn = container.childNodes[0].shadowRoot.children[1];\r\n }\r\n if (container.childNodes[1].shadowRoot.children[1].id === \"proceed_btn\") {\r\n proceed_btn = container.childNodes[1].shadowRoot.children[1];\r\n }\r\n if (goalObjs.selectedScenario[0]) {\r\n preloadVideo(checkbox.id);\r\n proceedStates.proceedBtn2Active = true;\r\n proceed_btn.style.pointerEvents = \"auto\";\r\n proceed_btn.style.opacity = \"100%\";\r\n proceed_btn.setAttribute(\"aria-label\", language == \"en\" ? \"Proceed\" : \"Poursuivre\");\r\n }\r\n else {\r\n proceedStates.proceedBtn2Active = false;\r\n proceed_btn.style.pointerEvents = \"none\";\r\n proceed_btn.style.opacity = \"75%\";\r\n proceed_btn.setAttribute(\"aria-label\", language == \"en\"\r\n ? \"Proceed button unavailable please make a selection\"\r\n : \"Il est impossible de cliquer sur le bouton Poursuivre, veuillez choisir une option.\");\r\n }\r\n }, updateFunding: function (checkboxes, checkbox) {\r\n //this.updateCurrentScene(\"scotia-q3\");\r\n //resetVideoSources();\r\n if (checkbox.checked) {\r\n goalObjs.selectedFunding.pop();\r\n goalObjs.selectedFunding.push(checkbox.id);\r\n for (var i = 0; i < checkboxes.length; i++) {\r\n checkboxes[i].checked = false;\r\n }\r\n checkbox.checked = true;\r\n }\r\n else {\r\n goalObjs.selectedFunding.pop();\r\n }\r\n var container = document.querySelector(\".cp-overlay\");\r\n var proceed_btn;\r\n if (container.childNodes[0].shadowRoot.children[1].id === \"proceed_btn\") {\r\n proceed_btn = container.childNodes[0].shadowRoot.children[1];\r\n }\r\n if (container.childNodes[1].shadowRoot.children[1].id === \"proceed_btn\") {\r\n proceed_btn = container.childNodes[1].shadowRoot.children[1];\r\n }\r\n if (goalObjs.selectedFunding[0]) {\r\n preloadVideo(checkbox.id);\r\n proceedStates.proceedBtn3Active = true;\r\n proceed_btn.style.pointerEvents = \"auto\";\r\n proceed_btn.style.opacity = \"100%\";\r\n proceed_btn.setAttribute(\"aria-label\", language == \"en\" ? \"Proceed\" : \"Poursuivre\");\r\n }\r\n else {\r\n proceedStates.proceedBtn3Active = false;\r\n proceed_btn.style.pointerEvents = \"none\";\r\n proceed_btn.style.opacity = \"75%\";\r\n proceed_btn.setAttribute(\"aria-label\", language == \"en\"\r\n ? \"Proceed button unavailable please make a selection\"\r\n : \"Il est impossible de cliquer sur le bouton Poursuivre, veuillez choisir une option.\");\r\n }\r\n } })\r\n });\r\n var canvasPlayer = this.player;\r\n var lastEvent = \"keyboard\";\r\n //play controls used to trigger video elements at start\r\n //direct user interactivity required to begin videos\r\n var setupButtonListener = function (playButton) {\r\n playButton.addEventListener(\"click\", function (e) {\r\n var _a, _b;\r\n playButton.classList.add(\"hide\");\r\n if (_this.videoElem.readyState == 4) {\r\n _this.videoElem.play();\r\n }\r\n if (_this.initialLoad) {\r\n //allow background click-to-play after initial load\r\n _this.container.style.pointerEvents = \"auto\";\r\n _this.initialLoad = false;\r\n (_a = _this.videoElemAlt) === null || _a === void 0 ? void 0 : _a.play();\r\n (_b = _this.videoElemAlt) === null || _b === void 0 ? void 0 : _b.pause();\r\n pausedForLoading = true;\r\n }\r\n });\r\n };\r\n //adds seekbar listener, used to determine whether videos should pause or show preloader\r\n var setupScrubbingListener = function () {\r\n var _a;\r\n (_a = document.querySelector(\".cp-seekbar\")) === null || _a === void 0 ? void 0 : _a.addEventListener(\"change\", function (e) {\r\n var _a, _b, _c;\r\n isScrubbing = true;\r\n (_a = _this.videoElem) === null || _a === void 0 ? void 0 : _a.pause();\r\n (_b = _this.videoElemAlt) === null || _b === void 0 ? void 0 : _b.pause();\r\n (_c = _this.player) === null || _c === void 0 ? void 0 : _c.pause();\r\n resetVideoSources();\r\n setTimeout(function () {\r\n isScrubbing = false;\r\n //this.preloader?.classList.add(\"hide\");\r\n }, 1000);\r\n });\r\n };\r\n //function that grabs the current frame and runs through all the available scenes start/end times\r\n //to determine what the current scene name is\r\n var getCurrentScene = function () {\r\n var _a;\r\n _this.gettingSceneInfo = true;\r\n _this.animationCurrentTime =\r\n (_this.player.exportRoot.currentFrame * 1000) / _this.player.animationProperties.fps / 1000;\r\n //loop through all scenes in timeline and find which scene corresponds to currentframe\r\n for (var i = 0; i < timelineSceneData.size; i++) {\r\n var sceneCounter = (_a = timelineSceneData.get(i)) === null || _a === void 0 ? void 0 : _a.startTime;\r\n if (sceneCounter <= _this.animationCurrentTime) {\r\n _this.currentScene = timelineSceneData.get(i);\r\n _this.nextScene = timelineSceneData.get(i + 1);\r\n }\r\n }\r\n _this.gettingSceneInfo = false;\r\n };\r\n //return the video elems to their default state classnames\r\n var resetVideoSources = function () {\r\n _this.videoElem.classList.add(\"cp-video\");\r\n _this.videoElem.classList.remove(\"cp-video-preload\");\r\n _this.videoElemAlt.classList.add(\"cp-video-preload\");\r\n _this.videoElemAlt.classList.remove(\"cp-video\");\r\n };\r\n //animate files augmented with dynamic mp4 capabilities pull frames from the video elem with a \"cp-video\" classname\r\n //this function switches which video tag has that classname to allow for continous video frame rendering\r\n //used when one video ends and the next is setup for preloading\r\n var swapVideoSources = function () {\r\n var _a;\r\n if ((_a = _this.videoElem) === null || _a === void 0 ? void 0 : _a.classList.contains(\"cp-video\")) {\r\n _this.videoElem.classList.remove(\"cp-video\");\r\n _this.videoElem.classList.add(\"cp-video-preload\");\r\n _this.videoElemAlt.classList.remove(\"cp-video-preload\");\r\n _this.videoElemAlt.classList.add(\"cp-video\");\r\n }\r\n else {\r\n _this.videoElem.classList.add(\"cp-video\");\r\n _this.videoElem.classList.remove(\"cp-video-preload\");\r\n _this.videoElemAlt.classList.add(\"cp-video-preload\");\r\n _this.videoElemAlt.classList.remove(\"cp-video\");\r\n }\r\n };\r\n var showHideFocus = function (e) {\r\n if (e.type === \"keydown\" || e.type === \"keyup\") {\r\n lastEvent = \"keyboard\";\r\n }\r\n else {\r\n lastEvent = \"mouse\";\r\n }\r\n };\r\n playerControls.addEventListener(\"keydown\", showHideFocus, true);\r\n playerControls.addEventListener(\"keyup\", showHideFocus, true);\r\n playerControls.addEventListener(\"mousedown\", showHideFocus, true);\r\n playerControls.addEventListener(\"mouseup\", showHideFocus, true);\r\n\t\tplayerControls.addEventListener(\"focusin\", function () {\r\n if (lastEvent === \"keyboard\") {\r\n playerControls.classList.remove(\"hide-focus\");\r\n }\r\n else {\r\n playerControls.classList.add(\"hide-focus\");\r\n }\r\n }, true);\r\n //update chapter activated property, update chapter styling\r\n var unlockChapter = function (index) {\r\n if (!chapterData[index].activated) {\r\n chapterData[index].activated = true;\r\n if (chapterData[index + 1]) {\r\n nextLockedFrame = chapterData[index + 1].chapterFrame;\r\n _this.controls.clearFrameLimit();\r\n _this.controls.frameLimit = nextLockedFrame;\r\n }\r\n else {\r\n _this.controls.clearFrameLimit();\r\n }\r\n }\r\n chapterData.forEach(function (chapter, index) {\r\n var _a;\r\n if (chapter.activated) {\r\n (_a = document.querySelector(\"#chapter-\" + index)) === null || _a === void 0 ? void 0 : _a.classList.add(\"cp-chapter-unlocked\");\r\n }\r\n });\r\n };\r\n //update chapter breakpoints\r\n var setupChapterFrames = function () {\r\n currentFrame = canvasPlayer.exportRoot.currentFrame;\r\n stopFrames = []; //array of stopframes from current position onwards\r\n var ariaWord = language == \"en\" ? \"Chapter\" : \"Chapitre\";\r\n if (canvasPlayer.exportRoot.dynamicLabels) {\r\n canvasPlayer.exportRoot.dynamicLabels.forEach(function (l, index) {\r\n if (l.label.startsWith(\"stopFrame\")) {\r\n if (!chapterData[index]) {\r\n var chapterObj_1 = {\r\n chapterFrame: 0,\r\n activated: false,\r\n ariaLabel: ariaWord\r\n };\r\n chapterData.push(chapterObj_1);\r\n }\r\n chapterData[index].chapterFrame = l.position;\r\n chapterData[index].ariaLabel = ariaWord + \" \" + (index + 1);\r\n }\r\n });\r\n }\r\n if (!nextLockedFrame) {\r\n nextLockedFrame = chapterData[0].chapterFrame;\r\n _this.controls.clearFrameLimit();\r\n _this.controls.frameLimit = nextLockedFrame;\r\n }\r\n };\r\n //With RM library integration\r\n //adds chapter elements on timeline based on stopframes of animation\r\n /*\r\n const setupChapters = (): void => {\r\n //get new stop frame locations\r\n setupChapterFrames();\r\n\r\n //remove and add new markers\r\n this.controls!.addChapters(chapterData);\r\n\r\n document.querySelectorAll(\".cp-timeline-chapter\").forEach((chapterBtn, index) => {\r\n chapterBtn.addEventListener(\"mousedown\", (e) => {\r\n e.stopPropagation();\r\n console.log(\"INDEX CLICKED\", index);\r\n if (chapterData[index].activated) {\r\n this.player?.goToFrame(chapterData[index].chapterFrame);\r\n this.player?.pause();\r\n if (typeof bgSound !== \"undefined\" && bgSound.paused) {\r\n //bgSound.position = canvasPlayer.getCurrentTime() * 1000;\r\n bgSound.paused = false;\r\n }\r\n playerControls.getElementsByClassName(\"cp-controls-container\")[0].classList.add(\"hidden\");\r\n }\r\n });\r\n });\r\n };\r\n */\r\n //adds chapter elements on timeline based on stopframes of animation\r\n var setupChapters = function () {\r\n // //remove any old chapters\r\n removeChapters();\r\n //get new stop frame locations\r\n setupChapterFrames();\r\n var seekbar = playerControls.querySelector(\".cp-seekbar\");\r\n var animationDuration = _this.player.exportRoot.duration;\r\n var chapters = [];\r\n //for each stop frame, calculate what percentage in the video it occurs at\r\n chapterData.forEach(function (chapter) {\r\n chapters.push(chapter.chapterFrame / animationDuration);\r\n });\r\n // //chapter container gets overlayed ontop of seekbar\r\n var chapterContainer = document.createElement(\"div\");\r\n chapterContainer.classList.add(\"cp-chapter-container\");\r\n chapters.forEach(function (chapter, index) {\r\n var chapterBtn = document.createElement(\"button\");\r\n chapterBtn.id = \"chapter-\" + index;\r\n chapterBtn.style.left = chapter * 100 + \"%\"; //move chapter to correct percentage amount, subtract a bit to account for chapter width\r\n chapterBtn.style.transform = \"translate(-50%)\";\r\n chapterBtn.classList.add(\"cp-timeline-chapter\");\r\n chapterBtn.setAttribute(\"aria-label\", chapterData[index].ariaLabel);\r\n chapterBtn.addEventListener(\"mousedown\", function (e) {\r\n var _a, _b;\r\n e.stopPropagation();\r\n if (chapterData[index].activated) {\r\n (_a = _this.player) === null || _a === void 0 ? void 0 : _a.goToFrame(chapterData[index].chapterFrame);\r\n (_b = _this.player) === null || _b === void 0 ? void 0 : _b.pause();\r\n if (typeof bgSound !== \"undefined\" && bgSound.paused) {\r\n //bgSound.position = canvasPlayer.getCurrentTime() * 1000;\r\n bgSound.paused = false;\r\n }\r\n playerControls.getElementsByClassName(\"cp-controls-container\")[0].classList.add(\"hidden\");\r\n onSelectionScreen = true;\r\n switch (index) {\r\n case 0:\r\n preloadVideo(goalObjs.selectedGoals[0]);\r\n break;\r\n case 1:\r\n preloadVideo(goalObjs.selectedScenario[0]);\r\n break;\r\n case 2:\r\n preloadVideo(goalObjs.selectedFunding[0]);\r\n break;\r\n }\r\n }\r\n });\r\n chapterContainer.appendChild(chapterBtn);\r\n });\r\n seekbar === null || seekbar === void 0 ? void 0 : seekbar.appendChild(chapterContainer);\r\n chapterData.forEach(function (chapter, index) {\r\n var _a;\r\n if (chapter.activated) {\r\n (_a = document.querySelector(\"#chapter-\" + index)) === null || _a === void 0 ? void 0 : _a.classList.add(\"cp-chapter-unlocked\");\r\n }\r\n });\r\n };\r\n //removes chapter elements on timeline\r\n var removeChapters = function () {\r\n var _a;\r\n (_a = document.querySelector(\".cp-chapter-container\")) === null || _a === void 0 ? void 0 : _a.remove();\r\n };\r\n //gets array of all scenes and determine various start/end times and whether scene is a video or not\r\n var setupVideoScenes = function () {\r\n var totalTime = 0;\r\n //determine time ranges for each section in dynamic timeline\r\n //determine whether each section has a video\r\n for (var i = 0; i < _this.player.exportRoot.dynamicScenes.length; i++) {\r\n var frames = _this.player.exportRoot.dynamicScenes[i].duration;\r\n var fps = _this.player.animationProperties.fps;\r\n var duration = frames / fps;\r\n var sceneName = _this.player.exportRoot.dynamicScenes[i].id;\r\n var isVideo = false;\r\n for (var i_1 = 0; i_1 < Object.keys(videoObjs).length; i_1++) {\r\n var value = Object.values(videoObjs)[i_1];\r\n if (value.includes(sceneName + \".mp4\")) {\r\n isVideo = true;\r\n }\r\n }\r\n totalTime += duration;\r\n timelineSceneData.set(i, {\r\n sceneName: sceneName,\r\n isVideo: isVideo,\r\n duration: duration,\r\n startTime: totalTime - duration,\r\n endTime: totalTime\r\n });\r\n }\r\n };\r\n //focus listner to stop BG Music when the tab goes out of focus\r\n var addFocusListener = function (listener) {\r\n\t\t\tvar visibilityChange = \"\";\r\n if (typeof document.hidden !== \"undefined\") {\r\n // Opera 12.10 and Firefox 18 and later support\r\n hidden = \"hidden\";\r\n visibilityChange = \"visibilitychange\";\r\n }\r\n else if (typeof document.msHidden !== \"undefined\") {\r\n hidden = \"msHidden\";\r\n visibilityChange = \"msvisibilitychange\";\r\n }\r\n else if (typeof document.webkitHidden !== \"undefined\") {\r\n hidden = \"webkitHidden\";\r\n visibilityChange = \"webkitvisibilitychange\";\r\n }\r\n if (typeof document.addEventListener === \"undefined\" || typeof document.hidden === \"undefined\") {\r\n console.warn(\"focus/blur changes on tab require Google Chrome or Firefox\");\r\n }\r\n else {\r\n document.addEventListener(visibilityChange, listener, false);\r\n }\r\n };\r\n //adds listeners to various elements on initial load\r\n var initialLoadSetup = function () {\r\n setupButtonListener(_this.playButton);\r\n setupButtonListener(_this.largePlayButton);\r\n setupScrubbingListener();\r\n var playButton = document.querySelector(\".cp-play\");\r\n \r\n playerControls.getElementsByClassName(\"cp-controls-container\")[0].classList.add(\"hidden\");\r\n };\r\n this.player.on(\"canplay\", function () {\r\n var canvas = document.getElementsByTagName(\"canvas\")[0];\r\n canvas.style.backgroundColor = \"#000\";\r\n _this.updateTranscript();\r\n _this.ready = true;\r\n if (_this.embedMode) {\r\n parent.postMessage({ type: \"video_ready\" }, location.origin);\r\n }\r\n if (_this.initialLoad) {\r\n initialLoadSetup();\r\n }\r\n setupChapters();\r\n setupVideoScenes();\r\n });\r\n Promise.all([this.loadBgMusic(\"/ui/vendors/richmedia.modded/common/videos/\" + language + \"/background.mp3\")]).then(function (_a) {\r\n var bgSoundInstance = _a[0];\r\n bgSound = bgSoundInstance;\r\n bgSound.pause = true;\r\n var wasBgSound = false;\r\n var wasVideoPlaying = false;\r\n var videoLoading = false;\r\n _this.player.on(\"timeupdate\", function () {\r\n var _a, _b, _c, _d, _e, _f, _g, _h;\r\n currentFrame = canvasPlayer.exportRoot.currentFrame;\r\n if (stoppedAtFrame && stoppedAtFrame !== currentFrame) {\r\n stoppedAtFrame = false;\r\n if (canvasPlayer.paused && !onSelectionScreen) {\r\n canvasPlayer.play();\r\n }\r\n }\r\n if (!_this.gettingSceneInfo) {\r\n getCurrentScene();\r\n }\r\n //checks and sets video source on main active video element\r\n if (!((_a = _this.currentScene) === null || _a === void 0 ? void 0 : _a.isVideo)) {\r\n _this.videoElem.pause();\r\n _this.videoElemAlt.pause();\r\n }\r\n //checks and sets video source on secondary video element\r\n if (((_b = _this.nextScene) === null || _b === void 0 ? void 0 : _b.isVideo) && !videosSwapped) {\r\n var isVideoSrcSyncyed = void 0;\r\n if ((_c = _this.videoElem) === null || _c === void 0 ? void 0 : _c.classList.contains(\"cp-video\")) {\r\n isVideoSrcSyncyed = _this.videoElemAlt.src.includes(_this.nextScene.sceneName);\r\n }\r\n else {\r\n isVideoSrcSyncyed = _this.videoElem.src.includes(_this.nextScene.sceneName);\r\n }\r\n if (!isVideoSrcSyncyed) {\r\n var videoPath = void 0;\r\n for (var i = 0; i < Object.keys(videoObjs).length; i++) {\r\n var temp = Object.values(videoObjs)[i];\r\n if (temp.includes(_this.nextScene.sceneName)) {\r\n videoPath = temp;\r\n }\r\n }\r\n if ((_d = _this.videoElem) === null || _d === void 0 ? void 0 : _d.classList.contains(\"cp-video\")) {\r\n if (_this.videoElemAlt.src != videoPath) {\r\n _this.videoElemAlt.src = videoPath;\r\n _this.videoElemAlt.pause();\r\n }\r\n }\r\n else {\r\n if (_this.videoElem.src != videoPath) {\r\n _this.videoElem.src = videoPath;\r\n _this.videoElem.pause();\r\n }\r\n }\r\n }\r\n }\r\n //sets conditions for video swap\r\n //scene change happens when current scene gets to its end time - 1 frame\r\n var oneFrameLength = 1 / _this.player.animationProperties.fps;\r\n var condition1 = Number(parseFloat(_this.animationCurrentTime.toFixed(4))) >=\r\n Number(parseFloat((((_e = _this.currentScene) === null || _e === void 0 ? void 0 : _e.endTime) - oneFrameLength).toFixed(4)));\r\n var condition2 = (_f = _this.nextScene) === null || _f === void 0 ? void 0 : _f.isVideo;\r\n var condition3 = !videosSwapped;\r\n if (condition1 && condition2 && condition3) {\r\n if ((_g = _this.currentScene) === null || _g === void 0 ? void 0 : _g.isVideo) {\r\n swapVideoSources();\r\n document.querySelector(\".cp-video\").play();\r\n document.querySelector(\".cp-video-preload\").pause();\r\n (_h = _this.player) === null || _h === void 0 ? void 0 : _h.play();\r\n videosSwapped = true;\r\n setTimeout(function () {\r\n videosSwapped = false;\r\n }, 1000);\r\n }\r\n }\r\n });\r\n _this.player.on(\"play\", function () {\r\n _this.largePlayButton.classList.add(\"hide\");\r\n if (bgSound.paused) {\r\n bgSound.paused = false;\r\n }\r\n if (!overlay) {\r\n overlay = container.querySelector(\".cp-overlay\");\r\n }\r\n if (stoppedAtFrame && !onSelectionScreen) {\r\n stoppedAtFrame = false;\r\n }\r\n //ensure controls container is visible on play\r\n if (!playerControls.getElementsByClassName(\"cp-controls-container\")[0].classList.contains(\"hidden\")) {\r\n playerControls.getElementsByClassName(\"cp-controls-container\")[0].classList.remove(\"hidden\");\r\n }\r\n overlay.style.pointerEvents = \"none\";\r\n });\r\n _this.player.on(\"pause\", function () {\r\n bgSound.paused = true;\r\n\r\n });\r\n _this.player.on(\"fullscreenchange\", function () {\r\n setTimeout(function () {\r\n setupChapters();\r\n }, 100);\r\n });\r\n addFocusListener(function () {\r\n\t\t\t\tvar _a, _b;\r\n if (document.hidden) {\r\n if (!bgSound.paused) {\r\n wasBgSound = true;\r\n bgSound.paused = true;\r\n }\r\n if ((_a = _this.currentScene) === null || _a === void 0 ? void 0 : _a.isVideo) {\r\n wasVideoPlaying = !_this.videoElem.paused;\r\n _this.videoElem.pause();\r\n }\r\n }\r\n else {\r\n if (wasBgSound) {\r\n bgSound.paused = false;\r\n wasBgSound = false;\r\n }\r\n if (wasVideoPlaying) {\r\n _this.videoElem.play();\r\n (_b = _this.player) === null || _b === void 0 ? void 0 : _b.play();\r\n wasVideoPlaying = false;\r\n }\r\n }\r\n });\r\n });\r\n if (this.controls) {\r\n this.controls.formatTranscript = this.formatTranscript();\r\n }\r\n (_a = this.controls) === null || _a === void 0 ? void 0 : _a.toggleIndicators(true);\r\n (_b = this.controls) === null || _b === void 0 ? void 0 : _b.attachCanvasPlayer(this.player);\r\n };\r\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\r\n RMDynamicVideo.prototype.updateTranscript = function () {\r\n var _a, _b, _c;\r\n var descriptions = ((_a = this.player) === null || _a === void 0 ? void 0 : _a.generateTranscript()) || [];\r\n var sanitizedDescriptions = (0, utilities_1.sanitizeDescriptions)(descriptions, (_b = this.controls) === null || _b === void 0 ? void 0 : _b.formatTranscript);\r\n var htmlURL = \"/ui/vendors/richmedia.modded/\" + language + \"/\".concat(i18n(\"transcript\"), \".html\");\r\n (_c = this.controls) === null || _c === void 0 ? void 0 : _c.updateTranscript((0, utilities_1.buildTranscriptHTML)(sanitizedDescriptions), \"#transcript-body\", htmlURL);\r\n };\r\n return RMDynamicVideo;\r\n}(custom_elements_1.HTMLCustomElement));\r\n(0, custom_elements_1.registerElement)(\"rm-dynamic-video\", RMDynamicVideo);\r\nexports.default = RMDynamicVideo;\r\n//# sourceMappingURL=module.js.map\r\n});define(\"main.ts\", function(require, exports, module) {\r\n\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nrequire(\"@rmlibrary/animate-components\");\r\nrequire(\"./video\");\r\nvar logic_1 = require(\"./logic\");\r\nvar utilities_1 = require(\"./utilities\");\r\nvar videoContainer = document.getElementsByTagName(\"rm-dynamic-video\")[0];\r\nvar data = (0, logic_1.getVideoData)();\r\nvar embedMode = (0, utilities_1.hasQueryStringInURL)(\"embed\");\r\nvideoContainer.initVideo(data, embedMode);\r\nif (embedMode) {\r\n addEventListener(\"message\", function (_a) {\r\n var type = _a.data.type;\r\n switch (type) {\r\n case \"play_video\": {\r\n videoContainer.playVideo();\r\n break;\r\n }\r\n case \"reset_video\": {\r\n videoContainer.resetVideo();\r\n break;\r\n }\r\n case \"update_video_data\": {\r\n var videoData = (0, logic_1.getVideoData)();\r\n videoContainer.updateVideoData(videoData);\r\n break;\r\n }\r\n }\r\n });\r\n}\r\n//# sourceMappingURL=module.js.map\r\n});i18n.strings = {\r\n \"transcript\": {\r\n \"en\": \"transcript\",\r\n \"fr\": \"transcription\"\r\n }\r\n};\r\n\r\n\r\nrequire([\"main.ts\"])\r\nreturn __loader;\r\n}(window.__rmAmd, {\"createjs\": \"createjs\",\"jquery\": \"jQuery\"}))\r\n//# sourceMappingURL=main.js.map"]}