Difference between revisions of "MediaWiki:Gadget-pixiJsWithSpine.js"

From Girls' Frontline Wiki
Jump to navigation Jump to search
(Different approach: Don't remember the transformation. Rather "reset" it.)
(Added Logging)
 
Line 1: Line 1:
/*!
+
/**
 +
* Dear user who copies this code: You need a valid Spine License to use this framework.
 +
*/
 +
 +
/**
 +
* Spine Runtimes License Agreement
 +
Last updated May 1, 2019. Replaces all prior versions.
 +
 
 +
Copyright (c) 2013-2019, Esoteric Software LLC
 +
 
 +
Integration of the Spine Runtimes into software or otherwise creating
 +
derivative works of the Spine Runtimes is permitted under the terms and
 +
conditions of Section 2 of the Spine Editor License Agreement:
 +
http://esotericsoftware.com/spine-editor-license
 +
 
 +
Otherwise, it is permitted to integrate the Spine Runtimes into software
 +
or otherwise create derivative works of the Spine Runtimes (collectively,
 +
"Products"), provided that each user of the Products must obtain their own
 +
Spine Editor license and redistribution of the Products in any form must
 +
include this license and copyright notice.
 +
 
 +
THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY EXPRESS
 +
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 +
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
 +
NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY DIRECT, INDIRECT,
 +
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 +
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS
 +
INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY
 +
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 +
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 +
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 +
**/
 +
 +
/**
 
  * pixi.js - v4.6.2
 
  * pixi.js - v4.6.2
 
  * Compiled Thu, 30 Nov 2017 15:19:59 UTC
 
  * Compiled Thu, 30 Nov 2017 15:19:59 UTC
Line 30: Line 63:
 
!function t(e,n,i){function a(o,s){if(!n[o]){if(!e[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(r)return r(o,!0);var h=new Error("Cannot find module '"+o+"'");throw h.code="MODULE_NOT_FOUND",h}var m=n[o]={exports:{}};e[o][0].call(m.exports,function(t){var n=e[o][1][t];return a(n?n:t)},m,m.exports,t,e,n,i)}return n[o].exports}for(var r="function"==typeof require&&require,o=0;o<i.length;o++)a(i[o]);return a}({1:[function(t,e,n){e.exports=PIXI.spine={Spine:t("./Spine"),SpineRuntime:t("./SpineRuntime"),loaders:t("./loaders")}},{"./Spine":43,"./SpineRuntime":41,"./loaders":47}],2:[function(t,e,n){var i=t("../SpineUtil");i.Animation=function(t,e,n){this.name=t,this.timelines=e,this.duration=n},i.Animation.prototype={apply:function(t,e,n,i,a){i&&0!=this.duration&&(n%=this.duration,e%=this.duration);for(var r=this.timelines,o=0,s=r.length;s>o;o++)r[o].apply(t,e,n,a,1)},mix:function(t,e,n,i,a,r){i&&0!=this.duration&&(n%=this.duration,e%=this.duration);for(var o=this.timelines,s=0,l=o.length;l>s;s++)o[s].apply(t,e,n,a,r)}},i.Animation.binarySearch=function(t,e,n){var i=0,a=Math.floor(t.length/n)-2;if(!a)return n;for(var r=a>>>1;;){if(t[(r+1)*n]<=e?i=r+1:a=r,i==a)return(i+1)*n;r=i+a>>>1}},i.Animation.binarySearch1=function(t,e){var n=0,i=t.length-2;if(!i)return 1;for(var a=i>>>1;;){if(t[a+1]<=e?n=a+1:i=a,n==i)return n+1;a=n+i>>>1}},i.Animation.linearSearch=function(t,e,n){for(var i=0,a=t.length-n;a>=i;i+=n)if(t[i]>e)return i;return-1},e.exports=i.Animation},{"../SpineUtil":42}],3:[function(t,e,n){var i=t("../SpineUtil");i.TrackEntry=t("./TrackEntry"),i.AnimationState=function(t){this.data=t,this.tracks=[],this.events=[]},i.AnimationState.prototype={onStart:null,onEnd:null,onComplete:null,onEvent:null,timeScale:1,update:function(t){t*=this.timeScale;for(var e=0;e<this.tracks.length;e++){var n=this.tracks[e];if(n){if(n.time+=t*n.timeScale,n.previous){var i=t*n.previous.timeScale;n.previous.time+=i,n.mixTime+=i}var a=n.next;a?(a.time=n.lastTime-a.delay,a.time>=0&&this.setCurrent(e,a)):!n.loop&&n.lastTime>=n.endTime&&this.clearTrack(e)}}},apply:function(t){/*t.resetDrawOrder();*/for(var e=0;e<this.tracks.length;e++){var n=this.tracks[e];if(n){this.events.length=0;var i=n.time,a=n.lastTime,r=n.endTime,o=n.loop;!o&&i>r&&(i=r);var s=n.previous;if(s){var l=s.time;!s.loop&&l>s.endTime&&(l=s.endTime),s.animation.apply(t,l,l,s.loop,null);var h=n.mixTime/n.mixDuration*n.mix;h>=1&&(h=1,n.previous=null),n.animation.mix(t,n.lastTime,i,o,this.events,h)}else 1==n.mix?n.animation.apply(t,n.lastTime,i,o,this.events):n.animation.mix(t,n.lastTime,i,o,this.events,n.mix);for(var m=0,u=this.events.length;u>m;m++){var f=this.events[m];n.onEvent&&n.onEvent(e,f),this.onEvent&&this.onEvent(e,f)}if(o?a%r>i%r:r>a&&i>=r){var c=Math.floor(i/r);n.onComplete&&n.onComplete(e,c),this.onComplete&&this.onComplete(e,c)}n.lastTime=n.time}}},clearTracks:function(){for(var t=0,e=this.tracks.length;e>t;t++)this.clearTrack(t);this.tracks.length=0},clearTrack:function(t){if(!(t>=this.tracks.length)){var e=this.tracks[t];e&&(e.onEnd&&e.onEnd(t),this.onEnd&&this.onEnd(t),this.tracks[t]=null)}},_expandToIndex:function(t){if(t<this.tracks.length)return this.tracks[t];for(;t>=this.tracks.length;)this.tracks.push(null);return null},setCurrent:function(t,e){var n=this._expandToIndex(t);if(n){var i=n.previous;n.previous=null,n.onEnd&&n.onEnd(t),this.onEnd&&this.onEnd(t),e.mixDuration=this.data.getMix(n.animation,e.animation),e.mixDuration>0&&(e.mixTime=0,i&&n.mixTime/n.mixDuration<.5?e.previous=i:e.previous=n)}this.tracks[t]=e,e.onStart&&e.onStart(t),this.onStart&&this.onStart(t)},setAnimationByName:function(t,e,n){var i=this.data.skeletonData.findAnimation(e);if(!i)throw"Animation not found: "+e;return this.setAnimation(t,i,n)},setAnimation:function(t,e,n){var a=new i.TrackEntry;return a.animation=e,a.loop=n,a.endTime=e.duration,this.setCurrent(t,a),a},addAnimationByName:function(t,e,n,i){var a=this.data.skeletonData.findAnimation(e);if(!a)throw"Animation not found: "+e;return this.addAnimation(t,a,n,i)},addAnimation:function(t,e,n,a){var r=new i.TrackEntry;r.animation=e,r.loop=n,r.endTime=e.duration;var o=this._expandToIndex(t);if(o){for(;o.next;)o=o.next;o.next=r}else this.tracks[t]=r;return 0>=a&&(o?a+=o.endTime-this.data.getMix(o.animation,e):a=0),r.delay=a,r},getCurrent:function(t){return t>=this.tracks.length?null:this.tracks[t]}},e.exports=i.AnimationState},{"../SpineUtil":42,"./TrackEntry":39}],4:[function(t,e,n){var i=t("../SpineUtil");i.AnimationStateData=function(t){this.skeletonData=t,this.animationToMixTime={}},i.AnimationStateData.prototype={defaultMix:0,setMixByName:function(t,e,n){var i=this.skeletonData.findAnimation(t);if(!i)throw"Animation not found: "+t;var a=this.skeletonData.findAnimation(e);if(!a)throw"Animation not found: "+e;this.setMix(i,a,n)},setMix:function(t,e,n){this.animationToMixTime[t.name+":"+e.name]=n},getMix:function(t,e){var n=t.name+":"+e.name;return this.animationToMixTime.hasOwnProperty(n)?this.animationToMixTime[n]:this.defaultMix}},e.exports=i.AnimationStateData},{"../SpineUtil":42}],5:[function(t,e,n){var i=t("../SpineUtil");i.AtlasReader=t("./AtlasReader"),i.AtlasPage=t("./AtlasPage"),i.AtlasRegion=t("./AtlasRegion");var a=t("../loaders/syncImageLoaderAdapter.js");i.Atlas=function(t,e,n){function r(){for(;;){var t=h.readLine();var orig=t;if(null===t)return n&&n(l);if(t=h.trim(t),t.length){t=orig;if(!u){u=new i.AtlasPage,u.name=t,2==h.readTuple(m)&&(u.width=parseInt(m[0]),u.height=parseInt(m[1]),h.readTuple(m)),u.format=i.Atlas.Format[m[0]],h.readTuple(m),u.minFilter=i.Atlas.TextureFilter[m[0]],u.magFilter=i.Atlas.TextureFilter[m[1]];var a=h.readValue();u.uWrap=i.Atlas.TextureWrap.clampToEdge,u.vWrap=i.Atlas.TextureWrap.clampToEdge,"x"==a?u.uWrap=i.Atlas.TextureWrap.repeat:"y"==a?u.vWrap=i.Atlas.TextureWrap.repeat:"xy"==a&&(u.uWrap=u.vWrap=i.Atlas.TextureWrap.repeat),e(t,function(t){u.rendererObject=t,l.pages.push(u),u.width&&u.height||(u.width=t.width,u.height=t.height,u.width&&u.height||console.log("ERROR spine atlas page "+u.name+": meshes wont work if you dont specify size in atlas (http://www.html5gamedevs.com/topic/18888-pixi-spines-and-meshes/?p=107121)")),r()});break}var o=new i.AtlasRegion;o.name=t,o.page=u,o.rotate="true"==h.readValue(),h.readTuple(m);var s=parseInt(m[0]),f=parseInt(m[1]);h.readTuple(m);var c=parseInt(m[0]),p=parseInt(m[1]);o.u=s/u.width,o.v=f/u.height,o.rotate?(o.u2=(s+p)/u.width,o.v2=(f+c)/u.height):(o.u2=(s+c)/u.width,o.v2=(f+p)/u.height);var d=u.rendererObject.resolution;o.x=s/d,o.y=f/d,o.width=Math.abs(c)/d,o.height=Math.abs(p)/d,4==h.readTuple(m)&&(o.splits=[parseInt(m[0]),parseInt(m[1]),parseInt(m[2]),parseInt(m[3])],4==h.readTuple(m)&&(o.pads=[parseInt(m[0]),parseInt(m[1]),parseInt(m[2]),parseInt(m[3])],h.readTuple(m))),o.originalWidth=parseInt(m[0])/d,o.originalHeight=parseInt(m[1])/d,h.readTuple(m),o.offsetX=parseInt(m[0])/d,o.offsetY=parseInt(m[1])/d,o.index=parseInt(h.readValue()),l.regions.push(o)}else u=null}}if("function"!=typeof e){var o=e,s=n;e=a(o,s),n=null}this.pages=[],this.regions=[],this.texturesLoading=0;var l=this,h=new i.AtlasReader(t),m=[];m.length=4;var u=null;r()},i.Atlas.prototype={findRegion:function(t){for(var e=this.regions,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null},dispose:function(){for(var t=this.pages,e=0,n=t.length;n>e;e++)t[e].rendererObject.destroy(!0)},updateUVs:function(t){for(var e=this.regions,n=0,i=e.length;i>n;n++){var a=e[n];a.page==t&&(a.u=a.x/t.width,a.v=a.y/t.height,a.rotate?(a.u2=(a.x+a.height)/t.width,a.v2=(a.y+a.width)/t.height):(a.u2=(a.x+a.width)/t.width,a.v2=(a.y+a.height)/t.height))}}},i.Atlas.Format={alpha:0,intensity:1,luminanceAlpha:2,rgb565:3,rgba4444:4,rgb888:5,rgba8888:6},i.Atlas.TextureFilter={nearest:0,linear:1,mipMap:2,mipMapNearestNearest:3,mipMapLinearNearest:4,mipMapNearestLinear:5,mipMapLinearLinear:6},i.Atlas.TextureWrap={mirroredRepeat:0,clampToEdge:1,repeat:2},e.exports=i.Atlas},{"../SpineUtil":42,"../loaders/syncImageLoaderAdapter.js":48,"./AtlasPage":7,"./AtlasReader":8,"./AtlasRegion":9}],6:[function(t,e,n){var i=t("../SpineUtil");i.RegionAttachment=t("./RegionAttachment"),i.MeshAttachment=t("./MeshAttachment"),i.SkinnedMeshAttachment=t("./SkinnedMeshAttachment"),i.BoundingBoxAttachment=t("./BoundingBoxAttachment"),i.AtlasAttachmentParser=function(t){this.atlas=t},i.AtlasAttachmentParser.prototype={newRegionAttachment:function(t,e,n){var a=this.atlas.findRegion(n);if(!a)throw"Region not found in atlas: "+n+" (region attachment: "+e+")";var r=new i.RegionAttachment(e);return r.rendererObject=a,r.setUVs(a.u,a.v,a.u2,a.v2,a.rotate),r.regionOffsetX=a.offsetX,r.regionOffsetY=a.offsetY,r.regionWidth=a.width,r.regionHeight=a.height,r.regionOriginalWidth=a.originalWidth,r.regionOriginalHeight=a.originalHeight,r},newMeshAttachment:function(t,e,n){var a=this.atlas.findRegion(n);if(!a)throw"Region not found in atlas: "+n+" (mesh attachment: "+e+")";var r=new i.MeshAttachment(e);return r.rendererObject=a,r.regionU=a.u,r.regionV=a.v,r.regionU2=a.u2,r.regionV2=a.v2,r.regionRotate=a.rotate,r.regionOffsetX=a.offsetX,r.regionOffsetY=a.offsetY,r.regionWidth=a.width,r.regionHeight=a.height,r.regionOriginalWidth=a.originalWidth,r.regionOriginalHeight=a.originalHeight,r},newSkinnedMeshAttachment:function(t,e,n){var a=this.atlas.findRegion(n);if(!a)throw"Region not found in atlas: "+n+" (skinned mesh attachment: "+e+")";var r=new i.SkinnedMeshAttachment(e);return r.rendererObject=a,r.regionU=a.u,r.regionV=a.v,r.regionU2=a.u2,r.regionV2=a.v2,r.regionRotate=a.rotate,r.regionOffsetX=a.offsetX,r.regionOffsetY=a.offsetY,r.regionWidth=a.width,r.regionHeight=a.height,r.regionOriginalWidth=a.originalWidth,r.regionOriginalHeight=a.originalHeight,r},newBoundingBoxAttachment:function(t,e){return new i.BoundingBoxAttachment(e)}},e.exports=i.AtlasAttachmentParser},{"../SpineUtil":42,"./BoundingBoxAttachment":14,"./MeshAttachment":27,"./RegionAttachment":28,"./SkinnedMeshAttachment":36}],7:[function(t,e,n){var i=t("../SpineUtil");i.AtlasPage=function(){},i.AtlasPage.prototype={name:null,format:null,minFilter:null,magFilter:null,uWrap:null,vWrap:null,rendererObject:null,width:0,height:0},e.exports=i.AtlasPage},{"../SpineUtil":42}],8:[function(t,e,n){var i=t("../SpineUtil");i.AtlasReader=function(t){this.lines=t.split(/\r\n|\r|\n/)},i.AtlasReader.prototype={index:0,trim:function(t){return t.replace(/^\s+|\s+$/g,"")},readLine:function(){return this.index>=this.lines.length?null:this.lines[this.index++]},readValue:function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw"Invalid line: "+t;return this.trim(t.substring(e+1))},readTuple:function(t){var e=this.readLine(),n=e.indexOf(":");if(-1==n)throw"Invalid line: "+e;for(var i=0,a=n+1;3>i;i++){var r=e.indexOf(",",a);if(-1==r)break;t[i]=this.trim(e.substr(a,r-a)),a=r+1}return t[i]=this.trim(e.substring(a)),i+1}},e.exports=i.AtlasReader},{"../SpineUtil":42}],9:[function(t,e,n){var i=t("../SpineUtil");i.AtlasRegion=function(){},i.AtlasRegion.prototype={page:null,name:null,x:0,y:0,width:0,height:0,u:0,v:0,u2:0,v2:0,offsetX:0,offsetY:0,originalWidth:0,originalHeight:0,index:0,rotate:!1,splits:null,pads:null},e.exports=i.AtlasRegion},{"../SpineUtil":42}],10:[function(t,e,n){var i=t("../SpineUtil");i.Curves=t("./Curves"),i.Animation=t("./Animation"),i.AttachmentTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=t,this.attachmentNames=[],this.attachmentNames.length=t},i.AttachmentTimeline.prototype={slotIndex:0,getFrameCount:function(){return this.frames.length},setFrame:function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},apply:function(t,e,n,a,r){var o=this.frames;if(n<o[0])return void(e>n&&this.apply(t,e,Number.MAX_VALUE,null,0));e>n&&(e=-1);var s=n>=o[o.length-1]?o.length-1:i.Animation.binarySearch1(o,n)-1;if(!(o[s]<e)){var l=this.attachmentNames[s];t.slots[this.slotIndex].setAttachment(l?t.getAttachmentBySlotIndex(this.slotIndex,l):null)}}},e.exports=i.AttachmentTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],11:[function(t,e,n){var i=t("../SpineUtil");i.AttachmentType={region:0,boundingbox:1,mesh:2,skinnedmesh:3},e.exports=i.AttachmentType},{"../SpineUtil":42}],12:[function(t,e,n){var i=t("../SpineUtil");i.Bone=function(t,e,n){this.data=t,this.skeleton=e,this.parent=n,this.setToSetupPose()},i.Bone.yDown=!1,i.Bone.prototype={x:0,y:0,rotation:0,rotationIK:0,scaleX:1,scaleY:1,flipX:!1,flipY:!1,m00:0,m01:0,worldX:0,m10:0,m11:0,worldY:0,worldRotation:0,worldScaleX:1,worldScaleY:1,worldFlipX:!1,worldFlipY:!1,updateWorldTransform:function(){var t=this.parent;if(t)this.worldX=this.x*t.m00+this.y*t.m01+t.worldX,this.worldY=this.x*t.m10+this.y*t.m11+t.worldY,this.data.inheritScale?(this.worldScaleX=t.worldScaleX*this.scaleX,this.worldScaleY=t.worldScaleY*this.scaleY):(this.worldScaleX=this.scaleX,this.worldScaleY=this.scaleY),this.worldRotation=this.data.inheritRotation?t.worldRotation+this.rotationIK:this.rotationIK,this.worldFlipX=t.worldFlipX!=this.flipX,this.worldFlipY=t.worldFlipY!=this.flipY;else{var e=this.skeleton.flipX,n=this.skeleton.flipY;this.worldX=e?-this.x:this.x,this.worldY=n!=i.Bone.yDown?-this.y:this.y,this.worldScaleX=this.scaleX,this.worldScaleY=this.scaleY,this.worldRotation=this.rotationIK,this.worldFlipX=e!=this.flipX,this.worldFlipY=n!=this.flipY}var a=this.worldRotation*i.degRad,r=Math.cos(a),o=Math.sin(a);this.worldFlipX?(this.m00=-r*this.worldScaleX,this.m01=o*this.worldScaleY):(this.m00=r*this.worldScaleX,this.m01=-o*this.worldScaleY),this.worldFlipY!=i.Bone.yDown?(this.m10=-o*this.worldScaleX,this.m11=-r*this.worldScaleY):(this.m10=o*this.worldScaleX,this.m11=r*this.worldScaleY)},setToSetupPose:function(){var t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.rotationIK=this.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.flipX=t.flipX,this.flipY=t.flipY},worldToLocal:function(t){var e=t[0]-this.worldX,n=t[1]-this.worldY,a=this.m00,r=this.m10,o=this.m01,s=this.m11;this.worldFlipX!=(this.worldFlipY!=i.Bone.yDown)&&(a=-a,s=-s);var l=1/(a*s-o*r);t[0]=e*a*l-n*o*l,t[1]=n*s*l-e*r*l},localToWorld:function(t){var e=t[0],n=t[1];t[0]=e*this.m00+n*this.m01+this.worldX,t[1]=e*this.m10+n*this.m11+this.worldY}},e.exports=i.Bone},{"../SpineUtil":42}],13:[function(t,e,n){var i=t("../SpineUtil");i.BoneData=function(t,e){this.name=t,this.parent=e},i.BoneData.prototype={length:0,x:0,y:0,rotation:0,scaleX:1,scaleY:1,inheritScale:!0,inheritRotation:!0,flipX:!1,flipY:!1},e.exports=i.BoneData},{"../SpineUtil":42}],14:[function(t,e,n){var i=t("../SpineUtil");i.AttachmentType=t("./AttachmentType"),i.BoundingBoxAttachment=function(t){this.name=t,this.vertices=[]},i.BoundingBoxAttachment.prototype={type:i.AttachmentType.boundingbox,computeWorldVertices:function(t,e,n,i){t+=n.worldX,e+=n.worldY;for(var a=n.m00,r=n.m01,o=n.m10,s=n.m11,l=this.vertices,h=0,m=l.length;m>h;h+=2){var u=l[h],f=l[h+1];i[h]=u*a+f*r+t,i[h+1]=u*o+f*s+e}}},e.exports=i.BoundingBoxAttachment},{"../SpineUtil":42,"./AttachmentType":11}],15:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.ColorTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=5*t},i.ColorTimeline.prototype={slotIndex:0,getFrameCount:function(){return this.frames.length/5},setFrame:function(t,e,n,i,a,r){t*=5,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=i,this.frames[t+3]=a,this.frames[t+4]=r},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s,l,h,m;if(n>=o[o.length-5]){var u=o.length-1;s=o[u-3],l=o[u-2],h=o[u-1],m=o[u]}else{var f=i.Animation.binarySearch(o,n,5),c=o[f-4],p=o[f-3],d=o[f-2],g=o[f-1],v=o[f],A=1-(n-v)/(o[f-5]-v);A=this.curves.getCurvePercent(f/5-1,A),s=c+(o[f+1]-c)*A,l=p+(o[f+2]-p)*A,h=d+(o[f+3]-d)*A,m=g+(o[f+4]-g)*A}var S=t.slots[this.slotIndex];1>r?(S.r+=(s-S.r)*r,S.g+=(l-S.g)*r,S.b+=(h-S.b)*r,S.a+=(m-S.a)*r):(S.r=s,S.g=l,S.b=h,S.a=m)}}},e.exports=i.ColorTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],16:[function(t,e,n){var i=t("../SpineUtil");i.Curves=function(t){this.curves=[]},i.Curves.prototype={setLinear:function(t){this.curves[19*t]=0},setStepped:function(t){this.curves[19*t]=1},setCurve:function(t,e,n,i,a){var r=.1,o=r*r,s=o*r,l=3*r,h=3*o,m=6*o,u=6*s,f=2*-e+i,c=2*-n+a,p=3*(e-i)+1,d=3*(n-a)+1,g=e*l+f*h+p*s,v=n*l+c*h+d*s,A=f*m+p*u,S=c*m+d*u,y=p*u,w=d*u,x=19*t,T=this.curves;T[x++]=2;for(var b=g,C=v,k=x+19-1;k>x;x+=2)T[x]=b,T[x+1]=C,g+=A,v+=S,A+=y,S+=w,b+=g,C+=v},getCurvePercent:function(t,e){e=0>e?0:e>1?1:e;var n=this.curves,i=19*t,a=n[i];if(0===a)return e;if(1==a)return 0;i++;for(var r=0,o=i,s=i+19-1;s>i;i+=2)if(r=n[i],r>=e){var l,h;return i==o?(l=0,h=0):(l=n[i-2],h=n[i-1]),h+(n[i+1]-h)*(e-l)/(r-l)}var m=n[i-1];return m+(1-m)*(e-r)/(1-r)}},e.exports=i.Curves},{"../SpineUtil":42}],17:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.DrawOrderTimeline=function(t){this.frames=[],this.frames.length=t,this.drawOrders=[],this.drawOrders.length=t},i.DrawOrderTimeline.prototype={getFrameCount:function(){return this.frames.length},setFrame:function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s;s=n>=o[o.length-1]?o.length-1:i.Animation.binarySearch1(o,n)-1;var l=t.drawOrder,h=(t.slots,this.drawOrders[s]);if(h)for(var m=0,u=h.length;u>m;m++)l[m]=h[m]}}},e.exports=i.DrawOrderTimeline},{"../SpineUtil":42,"./Animation":2}],18:[function(t,e,n){var i=t("../SpineUtil");i.Event=function(t){this.data=t},i.Event.prototype={intValue:0,floatValue:0,stringValue:null},e.exports=i.Event},{"../SpineUtil":42}],19:[function(t,e,n){var i=t("../SpineUtil");i.EventData=function(t){this.name=t},i.EventData.prototype={intValue:0,floatValue:0,stringValue:null},e.exports=i.EventData},{"../SpineUtil":42}],20:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.EventTimeline=function(t){this.frames=[],this.frames.length=t,this.events=[],this.events.length=t},i.EventTimeline.prototype={getFrameCount:function(){return this.frames.length},setFrame:function(t,e,n){this.frames[t]=e,this.events[t]=n},apply:function(t,e,n,a,r){if(a){var o=this.frames,s=o.length;if(e>n)this.apply(t,e,Number.MAX_VALUE,a,r),e=-1;else if(e>=o[s-1])return;if(!(n<o[0])){var l;if(e<o[0])l=0;else{l=i.Animation.binarySearch1(o,e);for(var h=o[l];l>0&&o[l-1]==h;)l--}for(var m=this.events;s>l&&n>=o[l];l++)a.push(m[l])}}}},e.exports=i.EventTimeline},{"../SpineUtil":42,"./Animation":2}],21:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.FfdTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=t,this.frameVertices=[],this.frameVertices.length=t},i.FfdTimeline.prototype={slotIndex:0,attachment:0,getFrameCount:function(){return this.frames.length},setFrame:function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},apply:function(t,e,n,a,r){var o=t.slots[this.slotIndex];if(o.attachment==this.attachment){var s=this.frames;if(!(n<s[0])){var l=this.frameVertices,h=l[0].length,m=o.attachmentVertices;if(m.length!=h){m=o.attachmentVertices=[];for(var u=0;h>u;u++)m.push(0);r=1}if(n>=s[s.length-1]){var f=l[s.length-1];if(1>r)for(var c=0;h>c;c++)m[c]+=(f[c]-m[c])*r;else for(var c=0;h>c;c++)m[c]=f[c]}else{var p=i.Animation.binarySearch1(s,n),d=s[p],g=1-(n-d)/(s[p-1]-d);g=this.curves.getCurvePercent(p-1,0>g?0:g>1?1:g);var v=l[p-1],A=l[p];if(1>r)for(var c=0;h>c;c++){var S=v[c];m[c]+=(S+(A[c]-S)*g-m[c])*r}else for(var c=0;h>c;c++){var S=v[c];m[c]=S+(A[c]-S)*g}}}}}},e.exports=i.FfdTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],22:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.FlipXTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=2*t},i.FlipXTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/2},setFrame:function(t,e,n){t*=2,this.frames[t]=e,this.frames[t+1]=n?1:0},apply:function(t,e,n,a,r){var o=this.frames;if(n<o[0])return void(e>n&&this.apply(t,e,Number.MAX_VALUE,null,0));e>n&&(e=-1);var s=(n>=o[o.length-2]?o.length:i.Animation.binarySearch(o,n,2))-2;o[s]<e||(t.bones[this.boneIndex].flipX=0!=o[s+1])}},e.exports=i.FlipXTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],23:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.FlipYTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=2*t},i.FlipYTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/2},setFrame:function(t,e,n){t*=2,this.frames[t]=e,this.frames[t+1]=n?1:0},apply:function(t,e,n,a,r){var o=this.frames;if(n<o[0])return void(e>n&&this.apply(t,e,Number.MAX_VALUE,null,0));e>n&&(e=-1);var s=(n>=o[o.length-2]?o.length:i.Animation.binarySearch(o,n,2))-2;o[s]<e||(t.bones[this.boneIndex].flipY=0!=o[s+1])}},e.exports=i.FlipYTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],24:[function(t,e,n){var i=t("../SpineUtil");i.IkConstraint=function(t,e){this.data=t,this.mix=t.mix,this.bendDirection=t.bendDirection,this.bones=[];for(var n=0,i=t.bones.length;i>n;n++)this.bones.push(e.findBone(t.bones[n].name));this.target=e.findBone(t.target.name)},i.IkConstraint.prototype={apply:function(){var t=this.target,e=this.bones;switch(e.length){case 1:i.IkConstraint.apply1(e[0],t.worldX,t.worldY,this.mix);break;case 2:i.IkConstraint.apply2(e[0],e[1],t.worldX,t.worldY,this.bendDirection,this.mix)}}},i.IkConstraint.apply1=function(t,e,n,a){var r=t.data.inheritRotation&&t.parent?t.parent.worldRotation:0,o=t.rotation,s=(i.Bone.yDown?-i.radDeg:i.radDeg)*Math.atan2(n-t.worldY,e-t.worldX)-r;t.rotationIK=o+(s-o)*a},i.IkConstraint.apply2=function(t,e,n,a,r,o){var s=e.rotation,l=t.rotation;if(!o)return e.rotationIK=s,void(t.rotationIK=l);var h,m,u=i.temp,f=t.parent;f?(u[0]=n,u[1]=a,f.worldToLocal(u),n=(u[0]-t.x)*f.worldScaleX,a=(u[1]-t.y)*f.worldScaleY):(n-=t.x,a-=t.y),e.parent==t?(h=e.x,m=e.y):(u[0]=e.x,u[1]=e.y,e.parent.localToWorld(u),t.worldToLocal(u),h=u[0],m=u[1]);var c=h*t.worldScaleX,p=m*t.worldScaleY,d=Math.atan2(p,c),g=Math.sqrt(c*c+p*p),v=e.data.length*e.worldScaleX,A=2*g*v;if(1e-4>A)return void(e.rotationIK=s+(Math.atan2(a,n)*i.radDeg-l-s)*o);var S=(n*n+a*a-g*g-v*v)/A;-1>S?S=-1:S>1&&(S=1);var y=Math.acos(S)*r,w=g+v*S,x=v*Math.sin(y),T=Math.atan2(a*w-n*x,n*w+a*x),b=(T-d)*i.radDeg-l;b>180?b-=360:-180>b&&(b+=360),t.rotationIK=l+b*o,b=(y+d)*i.radDeg-s,b>180?b-=360:-180>b&&(b+=360),e.rotationIK=s+(b+t.worldRotation-e.parent.worldRotation)*o},e.exports=i.IkConstraint},{"../SpineUtil":42}],25:[function(t,e,n){var i=t("../SpineUtil")||{};i.IkConstraintData=function(t){this.name=t,this.bones=[]},i.IkConstraintData.prototype={target:null,bendDirection:1,mix:1},e.exports=i.IkConstraintData},{"../SpineUtil":42}],26:[function(t,e,n){var i=t("../SpineUtil")||{};i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.IkConstraintTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=3*t},i.IkConstraintTimeline.prototype={ikConstraintIndex:0,getFrameCount:function(){return this.frames.length/3},setFrame:function(t,e,n,i){t*=3,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=i},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s=t.ikConstraints[this.ikConstraintIndex];if(n>=o[o.length-3])return s.mix+=(o[o.length-2]-s.mix)*r,void(s.bendDirection=o[o.length-1]);var l=i.Animation.binarySearch(o,n,3),h=o[l+-2],m=o[l],u=1-(n-m)/(o[l+-3]-m);u=this.curves.getCurvePercent(l/3-1,u);var f=h+(o[l+1]-h)*u;s.mix+=(f-s.mix)*r,s.bendDirection=o[l+-1]}}},e.exports=i.IkConstraintTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],27:[function(t,e,n){var i=t("../SpineUtil")||{};i.AttachmentType=t("./AttachmentType"),i.MeshAttachment=function(t){this.name=t},i.MeshAttachment.prototype={type:i.AttachmentType.mesh,vertices:null,uvs:null,regionUVs:null,triangles:null,hullLength:0,r:1,g:1,b:1,a:1,path:null,rendererObject:null,regionU:0,regionV:0,regionU2:0,regionV2:0,regionRotate:!1,regionOffsetX:0,regionOffsetY:0,regionWidth:0,regionHeight:0,regionOriginalWidth:0,regionOriginalHeight:0,edges:null,width:0,height:0,updateUVs:function(){var t=this.regionU2-this.regionU,e=this.regionV2-this.regionV,n=this.regionUVs.length;if(this.uvs&&this.uvs.length==n||(this.uvs=new i.Float32Array(n)),this.regionRotate)for(var a=0;n>a;a+=2)this.uvs[a]=this.regionU+this.regionUVs[a+1]*t,this.uvs[a+1]=this.regionV+e-this.regionUVs[a]*e;else for(var a=0;n>a;a+=2)this.uvs[a]=this.regionU+this.regionUVs[a]*t,this.uvs[a+1]=this.regionV+this.regionUVs[a+1]*e},computeWorldVertices:function(t,e,n,i){var a=n.bone;t+=a.worldX,e+=a.worldY;var r=a.m00,o=a.m01,s=a.m10,l=a.m11,h=this.vertices,m=h.length;n.attachmentVertices.length==m&&(h=n.attachmentVertices);for(var u=0;m>u;u+=2){var f=h[u],c=h[u+1];i[u]=f*r+c*o+t,i[u+1]=f*s+c*l+e}}},e.exports=i.MeshAttachment},{"../SpineUtil":42,"./AttachmentType":11}],28:[function(t,e,n){var i=t("../SpineUtil");i.AttachmentType=t("./AttachmentType"),i.RegionAttachment=function(t){this.name=t,this.offset=[],this.offset.length=8,this.uvs=[],this.uvs.length=8},i.RegionAttachment.prototype={type:i.AttachmentType.region,x:0,y:0,rotation:0,scaleX:1,scaleY:1,width:0,height:0,r:1,g:1,b:1,a:1,path:null,rendererObject:null,regionOffsetX:0,regionOffsetY:0,regionWidth:0,regionHeight:0,regionOriginalWidth:0,regionOriginalHeight:0,setUVs:function(t,e,n,i,a){var r=this.uvs;a?(r[2]=t,r[3]=i,r[4]=t,r[5]=e,r[6]=n,r[7]=e,r[0]=n,r[1]=i):(r[0]=t,r[1]=i,r[2]=t,r[3]=e,r[4]=n,r[5]=e,r[6]=n,r[7]=i)},updateOffset:function(){var t=this.width/this.regionOriginalWidth*this.scaleX,e=this.height/this.regionOriginalHeight*this.scaleY,n=-this.width/2*this.scaleX+this.regionOffsetX*t,a=-this.height/2*this.scaleY+this.regionOffsetY*e,r=n+this.regionWidth*t,o=a+this.regionHeight*e,s=this.rotation*i.degRad,l=Math.cos(s),h=Math.sin(s),m=n*l+this.x,u=n*h,f=a*l+this.y,c=a*h,p=r*l+this.x,d=r*h,g=o*l+this.y,v=o*h,A=this.offset;A[0]=m-c,A[1]=f+u,A[2]=m-v,A[3]=g+u,A[4]=p-v,A[5]=g+d,A[6]=p-c,A[7]=f+d},computeVertices:function(t,e,n,i){t+=n.worldX,e+=n.worldY;var a=n.m00,r=n.m01,o=n.m10,s=n.m11,l=this.offset;i[0]=l[0]*a+l[1]*r+t,i[1]=l[0]*o+l[1]*s+e,i[2]=l[2]*a+l[3]*r+t,i[3]=l[2]*o+l[3]*s+e,i[4]=l[4]*a+l[5]*r+t,i[5]=l[4]*o+l[5]*s+e,i[6]=l[6]*a+l[7]*r+t,i[7]=l[6]*o+l[7]*s+e}},e.exports=i.RegionAttachment},{"../SpineUtil":42,"./AttachmentType":11}],29:[function(t,e,n){var i=t("../SpineUtil")||{};i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.RotateTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=2*t},i.RotateTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/2},setFrame:function(t,e,n){t*=2,this.frames[t]=e,this.frames[t+1]=n},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s=t.bones[this.boneIndex];if(n>=o[o.length-2]){for(var l=s.data.rotation+o[o.length-1]-s.rotation;l>180;)l-=360;for(;-180>l;)l+=360;return void(s.rotation+=l*r)}var h=i.Animation.binarySearch(o,n,2),m=o[h-1],u=o[h],f=1-(n-u)/(o[h-2]-u);f=this.curves.getCurvePercent(h/2-1,f);for(var l=o[h+1]-m;l>180;)l-=360;for(;-180>l;)l+=360;for(l=s.data.rotation+(m+l*f)-s.rotation;l>180;)l-=360;for(;-180>l;)l+=360;s.rotation+=l*r}}},e.exports=i.RotateTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],30:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.ScaleTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=3*t},i.ScaleTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/3},setFrame:function(t,e,n,i){t*=3,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=i},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s=t.bones[this.boneIndex];if(n>=o[o.length-3])return s.scaleX+=(s.data.scaleX*o[o.length-2]-s.scaleX)*r,void(s.scaleY+=(s.data.scaleY*o[o.length-1]-s.scaleY)*r);var l=i.Animation.binarySearch(o,n,3),h=o[l-2],m=o[l-1],u=o[l],f=1-(n-u)/(o[l+-3]-u);f=this.curves.getCurvePercent(l/3-1,f),s.scaleX+=(s.data.scaleX*(h+(o[l+1]-h)*f)-s.scaleX)*r,s.scaleY+=(s.data.scaleY*(m+(o[l+2]-m)*f)-s.scaleY)*r}}},e.exports=i.ScaleTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],31:[function(t,e,n){var i=t("../SpineUtil");i.Bone=t("./Bone"),i.Slot=t("./Slot"),i.IkConstraint=t("./IkConstraint"),i.Skeleton=function(t){this.data=t,this.bones=[];for(var e=0,n=t.bones.length;n>e;e++){var a=t.bones[e],r=a.parent?this.bones[t.bones.indexOf(a.parent)]:null;this.bones.push(new i.Bone(a,this,r))}this.slots=[],this.drawOrder=[];for(var e=0,n=t.slots.length;n>e;e++){var o=t.slots[e],s=this.bones[t.bones.indexOf(o.boneData)],l=new i.Slot(o,s);this.slots.push(l),this.drawOrder.push(e)}this.ikConstraints=[];for(var e=0,n=t.ikConstraints.length;n>e;e++)this.ikConstraints.push(new i.IkConstraint(t.ikConstraints[e],this));this.boneCache=[],this.updateCache()},i.Skeleton.prototype={x:0,y:0,skin:null,r:1,g:1,b:1,a:1,time:0,flipX:!1,flipY:!1,updateCache:function(){var t=this.ikConstraints,e=t.length,n=e+1,i=this.boneCache;i.length>n&&(i.length=n);for(var a=0,r=i.length;r>a;a++)i[a].length=0;for(;i.length<n;)i[i.length]=[];var o=i[0],s=this.bones;t:for(var a=0,r=s.length;r>a;a++){var l=s[a],h=l;do{for(var m=0;e>m;m++)for(var u=t[m],f=u.bones[0],c=u.bones[u.bones.length-1];;){if(h==c){i[m].push(l),i[m+1].push(l);continue t}if(c==f)break;c=c.parent}h=h.parent}while(h);o[o.length]=l}},updateWorldTransform:function(){for(var t=this.bones,e=0,n=t.length;n>e;e++){var i=t[e];i.rotationIK=i.rotation}for(var e=0,a=this.boneCache.length-1;;){for(var r=this.boneCache[e],o=0,s=r.length;s>o;o++)r[o].updateWorldTransform();if(e==a)break;this.ikConstraints[e].apply(),e++}},setToSetupPose:function(){this.setBonesToSetupPose(),this.setSlotsToSetupPose()},setBonesToSetupPose:function(){for(var t=this.bones,e=0,n=t.length;n>e;e++)t[e].setToSetupPose();for(var i=this.ikConstraints,e=0,n=i.length;n>e;e++){var a=i[e];a.bendDirection=a.data.bendDirection,a.mix=a.data.mix}},setSlotsToSetupPose:function(){for(var t=this.slots,e=0,n=t.length;n>e;e++)t[e].setToSetupPose(e);this.resetDrawOrder()},getRootBone:function(){return this.bones.length?this.bones[0]:null},findBone:function(t){for(var e=this.bones,n=0,i=e.length;i>n;n++)if(e[n].data.name==t)return e[n];return null},findBoneIndex:function(t){for(var e=this.bones,n=0,i=e.length;i>n;n++)if(e[n].data.name==t)return n;return-1},findSlot:function(t){for(var e=this.slots,n=0,i=e.length;i>n;n++)if(e[n].data.name==t)return e[n];return null},findSlotIndex:function(t){for(var e=this.slots,n=0,i=e.length;i>n;n++)if(e[n].data.name==t)return n;return-1},setSkinByName:function(t){var e=this.data.findSkin(t);if(!e)throw"Skin not found: "+t;this.setSkin(e)},setSkin:function(t){if(t)if(this.skin)t._attachAll(this,this.skin);else for(var e=this.slots,n=0,i=e.length;i>n;n++){var a=e[n],r=a.data.attachmentName;if(r){var o=t.getAttachment(n,r);o&&a.setAttachment(o)}}this.skin=t},getAttachmentBySlotName:function(t,e){return this.getAttachmentBySlotIndex(this.data.findSlotIndex(t),e)},getAttachmentBySlotIndex:function(t,e){if(this.skin){var n=this.skin.getAttachment(t,e);if(n)return n}return this.data.defaultSkin?this.data.defaultSkin.getAttachment(t,e):null},setAttachment:function(t,e){for(var n=this.slots,i=0,a=n.length;a>i;i++){var r=n[i];if(r.data.name==t){var o=null;if(e&&(o=this.getAttachmentBySlotIndex(i,e),!o))throw"Attachment not found: "+e+", for slot: "+t;return void r.setAttachment(o)}}throw"Slot not found: "+t},findIkConstraint:function(t){for(var e=this.ikConstraints,n=0,i=e.length;i>n;n++)if(e[n].data.name==t)return e[n];return null},update:function(t){this.time+=t},resetDrawOrder:function(){for(var t=0,e=this.drawOrder.length;e>t;t++)this.drawOrder[t]=t}},e.exports=i.Skeleton},{"../SpineUtil":42,"./Bone":12,"./IkConstraint":24,"./Slot":37}],32:[function(t,e,n){var i=t("../SpineRuntime")||{};i.AttachmentType=t("./AttachmentType"),i.SkeletonBounds=function(){this.polygonPool=[],this.polygons=[],this.boundingBoxes=[]},i.SkeletonBounds.prototype={
 
!function t(e,n,i){function a(o,s){if(!n[o]){if(!e[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(r)return r(o,!0);var h=new Error("Cannot find module '"+o+"'");throw h.code="MODULE_NOT_FOUND",h}var m=n[o]={exports:{}};e[o][0].call(m.exports,function(t){var n=e[o][1][t];return a(n?n:t)},m,m.exports,t,e,n,i)}return n[o].exports}for(var r="function"==typeof require&&require,o=0;o<i.length;o++)a(i[o]);return a}({1:[function(t,e,n){e.exports=PIXI.spine={Spine:t("./Spine"),SpineRuntime:t("./SpineRuntime"),loaders:t("./loaders")}},{"./Spine":43,"./SpineRuntime":41,"./loaders":47}],2:[function(t,e,n){var i=t("../SpineUtil");i.Animation=function(t,e,n){this.name=t,this.timelines=e,this.duration=n},i.Animation.prototype={apply:function(t,e,n,i,a){i&&0!=this.duration&&(n%=this.duration,e%=this.duration);for(var r=this.timelines,o=0,s=r.length;s>o;o++)r[o].apply(t,e,n,a,1)},mix:function(t,e,n,i,a,r){i&&0!=this.duration&&(n%=this.duration,e%=this.duration);for(var o=this.timelines,s=0,l=o.length;l>s;s++)o[s].apply(t,e,n,a,r)}},i.Animation.binarySearch=function(t,e,n){var i=0,a=Math.floor(t.length/n)-2;if(!a)return n;for(var r=a>>>1;;){if(t[(r+1)*n]<=e?i=r+1:a=r,i==a)return(i+1)*n;r=i+a>>>1}},i.Animation.binarySearch1=function(t,e){var n=0,i=t.length-2;if(!i)return 1;for(var a=i>>>1;;){if(t[a+1]<=e?n=a+1:i=a,n==i)return n+1;a=n+i>>>1}},i.Animation.linearSearch=function(t,e,n){for(var i=0,a=t.length-n;a>=i;i+=n)if(t[i]>e)return i;return-1},e.exports=i.Animation},{"../SpineUtil":42}],3:[function(t,e,n){var i=t("../SpineUtil");i.TrackEntry=t("./TrackEntry"),i.AnimationState=function(t){this.data=t,this.tracks=[],this.events=[]},i.AnimationState.prototype={onStart:null,onEnd:null,onComplete:null,onEvent:null,timeScale:1,update:function(t){t*=this.timeScale;for(var e=0;e<this.tracks.length;e++){var n=this.tracks[e];if(n){if(n.time+=t*n.timeScale,n.previous){var i=t*n.previous.timeScale;n.previous.time+=i,n.mixTime+=i}var a=n.next;a?(a.time=n.lastTime-a.delay,a.time>=0&&this.setCurrent(e,a)):!n.loop&&n.lastTime>=n.endTime&&this.clearTrack(e)}}},apply:function(t){/*t.resetDrawOrder();*/for(var e=0;e<this.tracks.length;e++){var n=this.tracks[e];if(n){this.events.length=0;var i=n.time,a=n.lastTime,r=n.endTime,o=n.loop;!o&&i>r&&(i=r);var s=n.previous;if(s){var l=s.time;!s.loop&&l>s.endTime&&(l=s.endTime),s.animation.apply(t,l,l,s.loop,null);var h=n.mixTime/n.mixDuration*n.mix;h>=1&&(h=1,n.previous=null),n.animation.mix(t,n.lastTime,i,o,this.events,h)}else 1==n.mix?n.animation.apply(t,n.lastTime,i,o,this.events):n.animation.mix(t,n.lastTime,i,o,this.events,n.mix);for(var m=0,u=this.events.length;u>m;m++){var f=this.events[m];n.onEvent&&n.onEvent(e,f),this.onEvent&&this.onEvent(e,f)}if(o?a%r>i%r:r>a&&i>=r){var c=Math.floor(i/r);n.onComplete&&n.onComplete(e,c),this.onComplete&&this.onComplete(e,c)}n.lastTime=n.time}}},clearTracks:function(){for(var t=0,e=this.tracks.length;e>t;t++)this.clearTrack(t);this.tracks.length=0},clearTrack:function(t){if(!(t>=this.tracks.length)){var e=this.tracks[t];e&&(e.onEnd&&e.onEnd(t),this.onEnd&&this.onEnd(t),this.tracks[t]=null)}},_expandToIndex:function(t){if(t<this.tracks.length)return this.tracks[t];for(;t>=this.tracks.length;)this.tracks.push(null);return null},setCurrent:function(t,e){var n=this._expandToIndex(t);if(n){var i=n.previous;n.previous=null,n.onEnd&&n.onEnd(t),this.onEnd&&this.onEnd(t),e.mixDuration=this.data.getMix(n.animation,e.animation),e.mixDuration>0&&(e.mixTime=0,i&&n.mixTime/n.mixDuration<.5?e.previous=i:e.previous=n)}this.tracks[t]=e,e.onStart&&e.onStart(t),this.onStart&&this.onStart(t)},setAnimationByName:function(t,e,n){var i=this.data.skeletonData.findAnimation(e);if(!i)throw"Animation not found: "+e;return this.setAnimation(t,i,n)},setAnimation:function(t,e,n){var a=new i.TrackEntry;return a.animation=e,a.loop=n,a.endTime=e.duration,this.setCurrent(t,a),a},addAnimationByName:function(t,e,n,i){var a=this.data.skeletonData.findAnimation(e);if(!a)throw"Animation not found: "+e;return this.addAnimation(t,a,n,i)},addAnimation:function(t,e,n,a){var r=new i.TrackEntry;r.animation=e,r.loop=n,r.endTime=e.duration;var o=this._expandToIndex(t);if(o){for(;o.next;)o=o.next;o.next=r}else this.tracks[t]=r;return 0>=a&&(o?a+=o.endTime-this.data.getMix(o.animation,e):a=0),r.delay=a,r},getCurrent:function(t){return t>=this.tracks.length?null:this.tracks[t]}},e.exports=i.AnimationState},{"../SpineUtil":42,"./TrackEntry":39}],4:[function(t,e,n){var i=t("../SpineUtil");i.AnimationStateData=function(t){this.skeletonData=t,this.animationToMixTime={}},i.AnimationStateData.prototype={defaultMix:0,setMixByName:function(t,e,n){var i=this.skeletonData.findAnimation(t);if(!i)throw"Animation not found: "+t;var a=this.skeletonData.findAnimation(e);if(!a)throw"Animation not found: "+e;this.setMix(i,a,n)},setMix:function(t,e,n){this.animationToMixTime[t.name+":"+e.name]=n},getMix:function(t,e){var n=t.name+":"+e.name;return this.animationToMixTime.hasOwnProperty(n)?this.animationToMixTime[n]:this.defaultMix}},e.exports=i.AnimationStateData},{"../SpineUtil":42}],5:[function(t,e,n){var i=t("../SpineUtil");i.AtlasReader=t("./AtlasReader"),i.AtlasPage=t("./AtlasPage"),i.AtlasRegion=t("./AtlasRegion");var a=t("../loaders/syncImageLoaderAdapter.js");i.Atlas=function(t,e,n){function r(){for(;;){var t=h.readLine();var orig=t;if(null===t)return n&&n(l);if(t=h.trim(t),t.length){t=orig;if(!u){u=new i.AtlasPage,u.name=t,2==h.readTuple(m)&&(u.width=parseInt(m[0]),u.height=parseInt(m[1]),h.readTuple(m)),u.format=i.Atlas.Format[m[0]],h.readTuple(m),u.minFilter=i.Atlas.TextureFilter[m[0]],u.magFilter=i.Atlas.TextureFilter[m[1]];var a=h.readValue();u.uWrap=i.Atlas.TextureWrap.clampToEdge,u.vWrap=i.Atlas.TextureWrap.clampToEdge,"x"==a?u.uWrap=i.Atlas.TextureWrap.repeat:"y"==a?u.vWrap=i.Atlas.TextureWrap.repeat:"xy"==a&&(u.uWrap=u.vWrap=i.Atlas.TextureWrap.repeat),e(t,function(t){u.rendererObject=t,l.pages.push(u),u.width&&u.height||(u.width=t.width,u.height=t.height,u.width&&u.height||console.log("ERROR spine atlas page "+u.name+": meshes wont work if you dont specify size in atlas (http://www.html5gamedevs.com/topic/18888-pixi-spines-and-meshes/?p=107121)")),r()});break}var o=new i.AtlasRegion;o.name=t,o.page=u,o.rotate="true"==h.readValue(),h.readTuple(m);var s=parseInt(m[0]),f=parseInt(m[1]);h.readTuple(m);var c=parseInt(m[0]),p=parseInt(m[1]);o.u=s/u.width,o.v=f/u.height,o.rotate?(o.u2=(s+p)/u.width,o.v2=(f+c)/u.height):(o.u2=(s+c)/u.width,o.v2=(f+p)/u.height);var d=u.rendererObject.resolution;o.x=s/d,o.y=f/d,o.width=Math.abs(c)/d,o.height=Math.abs(p)/d,4==h.readTuple(m)&&(o.splits=[parseInt(m[0]),parseInt(m[1]),parseInt(m[2]),parseInt(m[3])],4==h.readTuple(m)&&(o.pads=[parseInt(m[0]),parseInt(m[1]),parseInt(m[2]),parseInt(m[3])],h.readTuple(m))),o.originalWidth=parseInt(m[0])/d,o.originalHeight=parseInt(m[1])/d,h.readTuple(m),o.offsetX=parseInt(m[0])/d,o.offsetY=parseInt(m[1])/d,o.index=parseInt(h.readValue()),l.regions.push(o)}else u=null}}if("function"!=typeof e){var o=e,s=n;e=a(o,s),n=null}this.pages=[],this.regions=[],this.texturesLoading=0;var l=this,h=new i.AtlasReader(t),m=[];m.length=4;var u=null;r()},i.Atlas.prototype={findRegion:function(t){for(var e=this.regions,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null},dispose:function(){for(var t=this.pages,e=0,n=t.length;n>e;e++)t[e].rendererObject.destroy(!0)},updateUVs:function(t){for(var e=this.regions,n=0,i=e.length;i>n;n++){var a=e[n];a.page==t&&(a.u=a.x/t.width,a.v=a.y/t.height,a.rotate?(a.u2=(a.x+a.height)/t.width,a.v2=(a.y+a.width)/t.height):(a.u2=(a.x+a.width)/t.width,a.v2=(a.y+a.height)/t.height))}}},i.Atlas.Format={alpha:0,intensity:1,luminanceAlpha:2,rgb565:3,rgba4444:4,rgb888:5,rgba8888:6},i.Atlas.TextureFilter={nearest:0,linear:1,mipMap:2,mipMapNearestNearest:3,mipMapLinearNearest:4,mipMapNearestLinear:5,mipMapLinearLinear:6},i.Atlas.TextureWrap={mirroredRepeat:0,clampToEdge:1,repeat:2},e.exports=i.Atlas},{"../SpineUtil":42,"../loaders/syncImageLoaderAdapter.js":48,"./AtlasPage":7,"./AtlasReader":8,"./AtlasRegion":9}],6:[function(t,e,n){var i=t("../SpineUtil");i.RegionAttachment=t("./RegionAttachment"),i.MeshAttachment=t("./MeshAttachment"),i.SkinnedMeshAttachment=t("./SkinnedMeshAttachment"),i.BoundingBoxAttachment=t("./BoundingBoxAttachment"),i.AtlasAttachmentParser=function(t){this.atlas=t},i.AtlasAttachmentParser.prototype={newRegionAttachment:function(t,e,n){var a=this.atlas.findRegion(n);if(!a)throw"Region not found in atlas: "+n+" (region attachment: "+e+")";var r=new i.RegionAttachment(e);return r.rendererObject=a,r.setUVs(a.u,a.v,a.u2,a.v2,a.rotate),r.regionOffsetX=a.offsetX,r.regionOffsetY=a.offsetY,r.regionWidth=a.width,r.regionHeight=a.height,r.regionOriginalWidth=a.originalWidth,r.regionOriginalHeight=a.originalHeight,r},newMeshAttachment:function(t,e,n){var a=this.atlas.findRegion(n);if(!a)throw"Region not found in atlas: "+n+" (mesh attachment: "+e+")";var r=new i.MeshAttachment(e);return r.rendererObject=a,r.regionU=a.u,r.regionV=a.v,r.regionU2=a.u2,r.regionV2=a.v2,r.regionRotate=a.rotate,r.regionOffsetX=a.offsetX,r.regionOffsetY=a.offsetY,r.regionWidth=a.width,r.regionHeight=a.height,r.regionOriginalWidth=a.originalWidth,r.regionOriginalHeight=a.originalHeight,r},newSkinnedMeshAttachment:function(t,e,n){var a=this.atlas.findRegion(n);if(!a)throw"Region not found in atlas: "+n+" (skinned mesh attachment: "+e+")";var r=new i.SkinnedMeshAttachment(e);return r.rendererObject=a,r.regionU=a.u,r.regionV=a.v,r.regionU2=a.u2,r.regionV2=a.v2,r.regionRotate=a.rotate,r.regionOffsetX=a.offsetX,r.regionOffsetY=a.offsetY,r.regionWidth=a.width,r.regionHeight=a.height,r.regionOriginalWidth=a.originalWidth,r.regionOriginalHeight=a.originalHeight,r},newBoundingBoxAttachment:function(t,e){return new i.BoundingBoxAttachment(e)}},e.exports=i.AtlasAttachmentParser},{"../SpineUtil":42,"./BoundingBoxAttachment":14,"./MeshAttachment":27,"./RegionAttachment":28,"./SkinnedMeshAttachment":36}],7:[function(t,e,n){var i=t("../SpineUtil");i.AtlasPage=function(){},i.AtlasPage.prototype={name:null,format:null,minFilter:null,magFilter:null,uWrap:null,vWrap:null,rendererObject:null,width:0,height:0},e.exports=i.AtlasPage},{"../SpineUtil":42}],8:[function(t,e,n){var i=t("../SpineUtil");i.AtlasReader=function(t){this.lines=t.split(/\r\n|\r|\n/)},i.AtlasReader.prototype={index:0,trim:function(t){return t.replace(/^\s+|\s+$/g,"")},readLine:function(){return this.index>=this.lines.length?null:this.lines[this.index++]},readValue:function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw"Invalid line: "+t;return this.trim(t.substring(e+1))},readTuple:function(t){var e=this.readLine(),n=e.indexOf(":");if(-1==n)throw"Invalid line: "+e;for(var i=0,a=n+1;3>i;i++){var r=e.indexOf(",",a);if(-1==r)break;t[i]=this.trim(e.substr(a,r-a)),a=r+1}return t[i]=this.trim(e.substring(a)),i+1}},e.exports=i.AtlasReader},{"../SpineUtil":42}],9:[function(t,e,n){var i=t("../SpineUtil");i.AtlasRegion=function(){},i.AtlasRegion.prototype={page:null,name:null,x:0,y:0,width:0,height:0,u:0,v:0,u2:0,v2:0,offsetX:0,offsetY:0,originalWidth:0,originalHeight:0,index:0,rotate:!1,splits:null,pads:null},e.exports=i.AtlasRegion},{"../SpineUtil":42}],10:[function(t,e,n){var i=t("../SpineUtil");i.Curves=t("./Curves"),i.Animation=t("./Animation"),i.AttachmentTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=t,this.attachmentNames=[],this.attachmentNames.length=t},i.AttachmentTimeline.prototype={slotIndex:0,getFrameCount:function(){return this.frames.length},setFrame:function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},apply:function(t,e,n,a,r){var o=this.frames;if(n<o[0])return void(e>n&&this.apply(t,e,Number.MAX_VALUE,null,0));e>n&&(e=-1);var s=n>=o[o.length-1]?o.length-1:i.Animation.binarySearch1(o,n)-1;if(!(o[s]<e)){var l=this.attachmentNames[s];t.slots[this.slotIndex].setAttachment(l?t.getAttachmentBySlotIndex(this.slotIndex,l):null)}}},e.exports=i.AttachmentTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],11:[function(t,e,n){var i=t("../SpineUtil");i.AttachmentType={region:0,boundingbox:1,mesh:2,skinnedmesh:3},e.exports=i.AttachmentType},{"../SpineUtil":42}],12:[function(t,e,n){var i=t("../SpineUtil");i.Bone=function(t,e,n){this.data=t,this.skeleton=e,this.parent=n,this.setToSetupPose()},i.Bone.yDown=!1,i.Bone.prototype={x:0,y:0,rotation:0,rotationIK:0,scaleX:1,scaleY:1,flipX:!1,flipY:!1,m00:0,m01:0,worldX:0,m10:0,m11:0,worldY:0,worldRotation:0,worldScaleX:1,worldScaleY:1,worldFlipX:!1,worldFlipY:!1,updateWorldTransform:function(){var t=this.parent;if(t)this.worldX=this.x*t.m00+this.y*t.m01+t.worldX,this.worldY=this.x*t.m10+this.y*t.m11+t.worldY,this.data.inheritScale?(this.worldScaleX=t.worldScaleX*this.scaleX,this.worldScaleY=t.worldScaleY*this.scaleY):(this.worldScaleX=this.scaleX,this.worldScaleY=this.scaleY),this.worldRotation=this.data.inheritRotation?t.worldRotation+this.rotationIK:this.rotationIK,this.worldFlipX=t.worldFlipX!=this.flipX,this.worldFlipY=t.worldFlipY!=this.flipY;else{var e=this.skeleton.flipX,n=this.skeleton.flipY;this.worldX=e?-this.x:this.x,this.worldY=n!=i.Bone.yDown?-this.y:this.y,this.worldScaleX=this.scaleX,this.worldScaleY=this.scaleY,this.worldRotation=this.rotationIK,this.worldFlipX=e!=this.flipX,this.worldFlipY=n!=this.flipY}var a=this.worldRotation*i.degRad,r=Math.cos(a),o=Math.sin(a);this.worldFlipX?(this.m00=-r*this.worldScaleX,this.m01=o*this.worldScaleY):(this.m00=r*this.worldScaleX,this.m01=-o*this.worldScaleY),this.worldFlipY!=i.Bone.yDown?(this.m10=-o*this.worldScaleX,this.m11=-r*this.worldScaleY):(this.m10=o*this.worldScaleX,this.m11=r*this.worldScaleY)},setToSetupPose:function(){var t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.rotationIK=this.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.flipX=t.flipX,this.flipY=t.flipY},worldToLocal:function(t){var e=t[0]-this.worldX,n=t[1]-this.worldY,a=this.m00,r=this.m10,o=this.m01,s=this.m11;this.worldFlipX!=(this.worldFlipY!=i.Bone.yDown)&&(a=-a,s=-s);var l=1/(a*s-o*r);t[0]=e*a*l-n*o*l,t[1]=n*s*l-e*r*l},localToWorld:function(t){var e=t[0],n=t[1];t[0]=e*this.m00+n*this.m01+this.worldX,t[1]=e*this.m10+n*this.m11+this.worldY}},e.exports=i.Bone},{"../SpineUtil":42}],13:[function(t,e,n){var i=t("../SpineUtil");i.BoneData=function(t,e){this.name=t,this.parent=e},i.BoneData.prototype={length:0,x:0,y:0,rotation:0,scaleX:1,scaleY:1,inheritScale:!0,inheritRotation:!0,flipX:!1,flipY:!1},e.exports=i.BoneData},{"../SpineUtil":42}],14:[function(t,e,n){var i=t("../SpineUtil");i.AttachmentType=t("./AttachmentType"),i.BoundingBoxAttachment=function(t){this.name=t,this.vertices=[]},i.BoundingBoxAttachment.prototype={type:i.AttachmentType.boundingbox,computeWorldVertices:function(t,e,n,i){t+=n.worldX,e+=n.worldY;for(var a=n.m00,r=n.m01,o=n.m10,s=n.m11,l=this.vertices,h=0,m=l.length;m>h;h+=2){var u=l[h],f=l[h+1];i[h]=u*a+f*r+t,i[h+1]=u*o+f*s+e}}},e.exports=i.BoundingBoxAttachment},{"../SpineUtil":42,"./AttachmentType":11}],15:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.ColorTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=5*t},i.ColorTimeline.prototype={slotIndex:0,getFrameCount:function(){return this.frames.length/5},setFrame:function(t,e,n,i,a,r){t*=5,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=i,this.frames[t+3]=a,this.frames[t+4]=r},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s,l,h,m;if(n>=o[o.length-5]){var u=o.length-1;s=o[u-3],l=o[u-2],h=o[u-1],m=o[u]}else{var f=i.Animation.binarySearch(o,n,5),c=o[f-4],p=o[f-3],d=o[f-2],g=o[f-1],v=o[f],A=1-(n-v)/(o[f-5]-v);A=this.curves.getCurvePercent(f/5-1,A),s=c+(o[f+1]-c)*A,l=p+(o[f+2]-p)*A,h=d+(o[f+3]-d)*A,m=g+(o[f+4]-g)*A}var S=t.slots[this.slotIndex];1>r?(S.r+=(s-S.r)*r,S.g+=(l-S.g)*r,S.b+=(h-S.b)*r,S.a+=(m-S.a)*r):(S.r=s,S.g=l,S.b=h,S.a=m)}}},e.exports=i.ColorTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],16:[function(t,e,n){var i=t("../SpineUtil");i.Curves=function(t){this.curves=[]},i.Curves.prototype={setLinear:function(t){this.curves[19*t]=0},setStepped:function(t){this.curves[19*t]=1},setCurve:function(t,e,n,i,a){var r=.1,o=r*r,s=o*r,l=3*r,h=3*o,m=6*o,u=6*s,f=2*-e+i,c=2*-n+a,p=3*(e-i)+1,d=3*(n-a)+1,g=e*l+f*h+p*s,v=n*l+c*h+d*s,A=f*m+p*u,S=c*m+d*u,y=p*u,w=d*u,x=19*t,T=this.curves;T[x++]=2;for(var b=g,C=v,k=x+19-1;k>x;x+=2)T[x]=b,T[x+1]=C,g+=A,v+=S,A+=y,S+=w,b+=g,C+=v},getCurvePercent:function(t,e){e=0>e?0:e>1?1:e;var n=this.curves,i=19*t,a=n[i];if(0===a)return e;if(1==a)return 0;i++;for(var r=0,o=i,s=i+19-1;s>i;i+=2)if(r=n[i],r>=e){var l,h;return i==o?(l=0,h=0):(l=n[i-2],h=n[i-1]),h+(n[i+1]-h)*(e-l)/(r-l)}var m=n[i-1];return m+(1-m)*(e-r)/(1-r)}},e.exports=i.Curves},{"../SpineUtil":42}],17:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.DrawOrderTimeline=function(t){this.frames=[],this.frames.length=t,this.drawOrders=[],this.drawOrders.length=t},i.DrawOrderTimeline.prototype={getFrameCount:function(){return this.frames.length},setFrame:function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s;s=n>=o[o.length-1]?o.length-1:i.Animation.binarySearch1(o,n)-1;var l=t.drawOrder,h=(t.slots,this.drawOrders[s]);if(h)for(var m=0,u=h.length;u>m;m++)l[m]=h[m]}}},e.exports=i.DrawOrderTimeline},{"../SpineUtil":42,"./Animation":2}],18:[function(t,e,n){var i=t("../SpineUtil");i.Event=function(t){this.data=t},i.Event.prototype={intValue:0,floatValue:0,stringValue:null},e.exports=i.Event},{"../SpineUtil":42}],19:[function(t,e,n){var i=t("../SpineUtil");i.EventData=function(t){this.name=t},i.EventData.prototype={intValue:0,floatValue:0,stringValue:null},e.exports=i.EventData},{"../SpineUtil":42}],20:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.EventTimeline=function(t){this.frames=[],this.frames.length=t,this.events=[],this.events.length=t},i.EventTimeline.prototype={getFrameCount:function(){return this.frames.length},setFrame:function(t,e,n){this.frames[t]=e,this.events[t]=n},apply:function(t,e,n,a,r){if(a){var o=this.frames,s=o.length;if(e>n)this.apply(t,e,Number.MAX_VALUE,a,r),e=-1;else if(e>=o[s-1])return;if(!(n<o[0])){var l;if(e<o[0])l=0;else{l=i.Animation.binarySearch1(o,e);for(var h=o[l];l>0&&o[l-1]==h;)l--}for(var m=this.events;s>l&&n>=o[l];l++)a.push(m[l])}}}},e.exports=i.EventTimeline},{"../SpineUtil":42,"./Animation":2}],21:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.FfdTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=t,this.frameVertices=[],this.frameVertices.length=t},i.FfdTimeline.prototype={slotIndex:0,attachment:0,getFrameCount:function(){return this.frames.length},setFrame:function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},apply:function(t,e,n,a,r){var o=t.slots[this.slotIndex];if(o.attachment==this.attachment){var s=this.frames;if(!(n<s[0])){var l=this.frameVertices,h=l[0].length,m=o.attachmentVertices;if(m.length!=h){m=o.attachmentVertices=[];for(var u=0;h>u;u++)m.push(0);r=1}if(n>=s[s.length-1]){var f=l[s.length-1];if(1>r)for(var c=0;h>c;c++)m[c]+=(f[c]-m[c])*r;else for(var c=0;h>c;c++)m[c]=f[c]}else{var p=i.Animation.binarySearch1(s,n),d=s[p],g=1-(n-d)/(s[p-1]-d);g=this.curves.getCurvePercent(p-1,0>g?0:g>1?1:g);var v=l[p-1],A=l[p];if(1>r)for(var c=0;h>c;c++){var S=v[c];m[c]+=(S+(A[c]-S)*g-m[c])*r}else for(var c=0;h>c;c++){var S=v[c];m[c]=S+(A[c]-S)*g}}}}}},e.exports=i.FfdTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],22:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.FlipXTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=2*t},i.FlipXTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/2},setFrame:function(t,e,n){t*=2,this.frames[t]=e,this.frames[t+1]=n?1:0},apply:function(t,e,n,a,r){var o=this.frames;if(n<o[0])return void(e>n&&this.apply(t,e,Number.MAX_VALUE,null,0));e>n&&(e=-1);var s=(n>=o[o.length-2]?o.length:i.Animation.binarySearch(o,n,2))-2;o[s]<e||(t.bones[this.boneIndex].flipX=0!=o[s+1])}},e.exports=i.FlipXTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],23:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.FlipYTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=2*t},i.FlipYTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/2},setFrame:function(t,e,n){t*=2,this.frames[t]=e,this.frames[t+1]=n?1:0},apply:function(t,e,n,a,r){var o=this.frames;if(n<o[0])return void(e>n&&this.apply(t,e,Number.MAX_VALUE,null,0));e>n&&(e=-1);var s=(n>=o[o.length-2]?o.length:i.Animation.binarySearch(o,n,2))-2;o[s]<e||(t.bones[this.boneIndex].flipY=0!=o[s+1])}},e.exports=i.FlipYTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],24:[function(t,e,n){var i=t("../SpineUtil");i.IkConstraint=function(t,e){this.data=t,this.mix=t.mix,this.bendDirection=t.bendDirection,this.bones=[];for(var n=0,i=t.bones.length;i>n;n++)this.bones.push(e.findBone(t.bones[n].name));this.target=e.findBone(t.target.name)},i.IkConstraint.prototype={apply:function(){var t=this.target,e=this.bones;switch(e.length){case 1:i.IkConstraint.apply1(e[0],t.worldX,t.worldY,this.mix);break;case 2:i.IkConstraint.apply2(e[0],e[1],t.worldX,t.worldY,this.bendDirection,this.mix)}}},i.IkConstraint.apply1=function(t,e,n,a){var r=t.data.inheritRotation&&t.parent?t.parent.worldRotation:0,o=t.rotation,s=(i.Bone.yDown?-i.radDeg:i.radDeg)*Math.atan2(n-t.worldY,e-t.worldX)-r;t.rotationIK=o+(s-o)*a},i.IkConstraint.apply2=function(t,e,n,a,r,o){var s=e.rotation,l=t.rotation;if(!o)return e.rotationIK=s,void(t.rotationIK=l);var h,m,u=i.temp,f=t.parent;f?(u[0]=n,u[1]=a,f.worldToLocal(u),n=(u[0]-t.x)*f.worldScaleX,a=(u[1]-t.y)*f.worldScaleY):(n-=t.x,a-=t.y),e.parent==t?(h=e.x,m=e.y):(u[0]=e.x,u[1]=e.y,e.parent.localToWorld(u),t.worldToLocal(u),h=u[0],m=u[1]);var c=h*t.worldScaleX,p=m*t.worldScaleY,d=Math.atan2(p,c),g=Math.sqrt(c*c+p*p),v=e.data.length*e.worldScaleX,A=2*g*v;if(1e-4>A)return void(e.rotationIK=s+(Math.atan2(a,n)*i.radDeg-l-s)*o);var S=(n*n+a*a-g*g-v*v)/A;-1>S?S=-1:S>1&&(S=1);var y=Math.acos(S)*r,w=g+v*S,x=v*Math.sin(y),T=Math.atan2(a*w-n*x,n*w+a*x),b=(T-d)*i.radDeg-l;b>180?b-=360:-180>b&&(b+=360),t.rotationIK=l+b*o,b=(y+d)*i.radDeg-s,b>180?b-=360:-180>b&&(b+=360),e.rotationIK=s+(b+t.worldRotation-e.parent.worldRotation)*o},e.exports=i.IkConstraint},{"../SpineUtil":42}],25:[function(t,e,n){var i=t("../SpineUtil")||{};i.IkConstraintData=function(t){this.name=t,this.bones=[]},i.IkConstraintData.prototype={target:null,bendDirection:1,mix:1},e.exports=i.IkConstraintData},{"../SpineUtil":42}],26:[function(t,e,n){var i=t("../SpineUtil")||{};i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.IkConstraintTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=3*t},i.IkConstraintTimeline.prototype={ikConstraintIndex:0,getFrameCount:function(){return this.frames.length/3},setFrame:function(t,e,n,i){t*=3,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=i},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s=t.ikConstraints[this.ikConstraintIndex];if(n>=o[o.length-3])return s.mix+=(o[o.length-2]-s.mix)*r,void(s.bendDirection=o[o.length-1]);var l=i.Animation.binarySearch(o,n,3),h=o[l+-2],m=o[l],u=1-(n-m)/(o[l+-3]-m);u=this.curves.getCurvePercent(l/3-1,u);var f=h+(o[l+1]-h)*u;s.mix+=(f-s.mix)*r,s.bendDirection=o[l+-1]}}},e.exports=i.IkConstraintTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],27:[function(t,e,n){var i=t("../SpineUtil")||{};i.AttachmentType=t("./AttachmentType"),i.MeshAttachment=function(t){this.name=t},i.MeshAttachment.prototype={type:i.AttachmentType.mesh,vertices:null,uvs:null,regionUVs:null,triangles:null,hullLength:0,r:1,g:1,b:1,a:1,path:null,rendererObject:null,regionU:0,regionV:0,regionU2:0,regionV2:0,regionRotate:!1,regionOffsetX:0,regionOffsetY:0,regionWidth:0,regionHeight:0,regionOriginalWidth:0,regionOriginalHeight:0,edges:null,width:0,height:0,updateUVs:function(){var t=this.regionU2-this.regionU,e=this.regionV2-this.regionV,n=this.regionUVs.length;if(this.uvs&&this.uvs.length==n||(this.uvs=new i.Float32Array(n)),this.regionRotate)for(var a=0;n>a;a+=2)this.uvs[a]=this.regionU+this.regionUVs[a+1]*t,this.uvs[a+1]=this.regionV+e-this.regionUVs[a]*e;else for(var a=0;n>a;a+=2)this.uvs[a]=this.regionU+this.regionUVs[a]*t,this.uvs[a+1]=this.regionV+this.regionUVs[a+1]*e},computeWorldVertices:function(t,e,n,i){var a=n.bone;t+=a.worldX,e+=a.worldY;var r=a.m00,o=a.m01,s=a.m10,l=a.m11,h=this.vertices,m=h.length;n.attachmentVertices.length==m&&(h=n.attachmentVertices);for(var u=0;m>u;u+=2){var f=h[u],c=h[u+1];i[u]=f*r+c*o+t,i[u+1]=f*s+c*l+e}}},e.exports=i.MeshAttachment},{"../SpineUtil":42,"./AttachmentType":11}],28:[function(t,e,n){var i=t("../SpineUtil");i.AttachmentType=t("./AttachmentType"),i.RegionAttachment=function(t){this.name=t,this.offset=[],this.offset.length=8,this.uvs=[],this.uvs.length=8},i.RegionAttachment.prototype={type:i.AttachmentType.region,x:0,y:0,rotation:0,scaleX:1,scaleY:1,width:0,height:0,r:1,g:1,b:1,a:1,path:null,rendererObject:null,regionOffsetX:0,regionOffsetY:0,regionWidth:0,regionHeight:0,regionOriginalWidth:0,regionOriginalHeight:0,setUVs:function(t,e,n,i,a){var r=this.uvs;a?(r[2]=t,r[3]=i,r[4]=t,r[5]=e,r[6]=n,r[7]=e,r[0]=n,r[1]=i):(r[0]=t,r[1]=i,r[2]=t,r[3]=e,r[4]=n,r[5]=e,r[6]=n,r[7]=i)},updateOffset:function(){var t=this.width/this.regionOriginalWidth*this.scaleX,e=this.height/this.regionOriginalHeight*this.scaleY,n=-this.width/2*this.scaleX+this.regionOffsetX*t,a=-this.height/2*this.scaleY+this.regionOffsetY*e,r=n+this.regionWidth*t,o=a+this.regionHeight*e,s=this.rotation*i.degRad,l=Math.cos(s),h=Math.sin(s),m=n*l+this.x,u=n*h,f=a*l+this.y,c=a*h,p=r*l+this.x,d=r*h,g=o*l+this.y,v=o*h,A=this.offset;A[0]=m-c,A[1]=f+u,A[2]=m-v,A[3]=g+u,A[4]=p-v,A[5]=g+d,A[6]=p-c,A[7]=f+d},computeVertices:function(t,e,n,i){t+=n.worldX,e+=n.worldY;var a=n.m00,r=n.m01,o=n.m10,s=n.m11,l=this.offset;i[0]=l[0]*a+l[1]*r+t,i[1]=l[0]*o+l[1]*s+e,i[2]=l[2]*a+l[3]*r+t,i[3]=l[2]*o+l[3]*s+e,i[4]=l[4]*a+l[5]*r+t,i[5]=l[4]*o+l[5]*s+e,i[6]=l[6]*a+l[7]*r+t,i[7]=l[6]*o+l[7]*s+e}},e.exports=i.RegionAttachment},{"../SpineUtil":42,"./AttachmentType":11}],29:[function(t,e,n){var i=t("../SpineUtil")||{};i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.RotateTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=2*t},i.RotateTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/2},setFrame:function(t,e,n){t*=2,this.frames[t]=e,this.frames[t+1]=n},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s=t.bones[this.boneIndex];if(n>=o[o.length-2]){for(var l=s.data.rotation+o[o.length-1]-s.rotation;l>180;)l-=360;for(;-180>l;)l+=360;return void(s.rotation+=l*r)}var h=i.Animation.binarySearch(o,n,2),m=o[h-1],u=o[h],f=1-(n-u)/(o[h-2]-u);f=this.curves.getCurvePercent(h/2-1,f);for(var l=o[h+1]-m;l>180;)l-=360;for(;-180>l;)l+=360;for(l=s.data.rotation+(m+l*f)-s.rotation;l>180;)l-=360;for(;-180>l;)l+=360;s.rotation+=l*r}}},e.exports=i.RotateTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],30:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.ScaleTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=3*t},i.ScaleTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/3},setFrame:function(t,e,n,i){t*=3,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=i},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s=t.bones[this.boneIndex];if(n>=o[o.length-3])return s.scaleX+=(s.data.scaleX*o[o.length-2]-s.scaleX)*r,void(s.scaleY+=(s.data.scaleY*o[o.length-1]-s.scaleY)*r);var l=i.Animation.binarySearch(o,n,3),h=o[l-2],m=o[l-1],u=o[l],f=1-(n-u)/(o[l+-3]-u);f=this.curves.getCurvePercent(l/3-1,f),s.scaleX+=(s.data.scaleX*(h+(o[l+1]-h)*f)-s.scaleX)*r,s.scaleY+=(s.data.scaleY*(m+(o[l+2]-m)*f)-s.scaleY)*r}}},e.exports=i.ScaleTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],31:[function(t,e,n){var i=t("../SpineUtil");i.Bone=t("./Bone"),i.Slot=t("./Slot"),i.IkConstraint=t("./IkConstraint"),i.Skeleton=function(t){this.data=t,this.bones=[];for(var e=0,n=t.bones.length;n>e;e++){var a=t.bones[e],r=a.parent?this.bones[t.bones.indexOf(a.parent)]:null;this.bones.push(new i.Bone(a,this,r))}this.slots=[],this.drawOrder=[];for(var e=0,n=t.slots.length;n>e;e++){var o=t.slots[e],s=this.bones[t.bones.indexOf(o.boneData)],l=new i.Slot(o,s);this.slots.push(l),this.drawOrder.push(e)}this.ikConstraints=[];for(var e=0,n=t.ikConstraints.length;n>e;e++)this.ikConstraints.push(new i.IkConstraint(t.ikConstraints[e],this));this.boneCache=[],this.updateCache()},i.Skeleton.prototype={x:0,y:0,skin:null,r:1,g:1,b:1,a:1,time:0,flipX:!1,flipY:!1,updateCache:function(){var t=this.ikConstraints,e=t.length,n=e+1,i=this.boneCache;i.length>n&&(i.length=n);for(var a=0,r=i.length;r>a;a++)i[a].length=0;for(;i.length<n;)i[i.length]=[];var o=i[0],s=this.bones;t:for(var a=0,r=s.length;r>a;a++){var l=s[a],h=l;do{for(var m=0;e>m;m++)for(var u=t[m],f=u.bones[0],c=u.bones[u.bones.length-1];;){if(h==c){i[m].push(l),i[m+1].push(l);continue t}if(c==f)break;c=c.parent}h=h.parent}while(h);o[o.length]=l}},updateWorldTransform:function(){for(var t=this.bones,e=0,n=t.length;n>e;e++){var i=t[e];i.rotationIK=i.rotation}for(var e=0,a=this.boneCache.length-1;;){for(var r=this.boneCache[e],o=0,s=r.length;s>o;o++)r[o].updateWorldTransform();if(e==a)break;this.ikConstraints[e].apply(),e++}},setToSetupPose:function(){this.setBonesToSetupPose(),this.setSlotsToSetupPose()},setBonesToSetupPose:function(){for(var t=this.bones,e=0,n=t.length;n>e;e++)t[e].setToSetupPose();for(var i=this.ikConstraints,e=0,n=i.length;n>e;e++){var a=i[e];a.bendDirection=a.data.bendDirection,a.mix=a.data.mix}},setSlotsToSetupPose:function(){for(var t=this.slots,e=0,n=t.length;n>e;e++)t[e].setToSetupPose(e);this.resetDrawOrder()},getRootBone:function(){return this.bones.length?this.bones[0]:null},findBone:function(t){for(var e=this.bones,n=0,i=e.length;i>n;n++)if(e[n].data.name==t)return e[n];return null},findBoneIndex:function(t){for(var e=this.bones,n=0,i=e.length;i>n;n++)if(e[n].data.name==t)return n;return-1},findSlot:function(t){for(var e=this.slots,n=0,i=e.length;i>n;n++)if(e[n].data.name==t)return e[n];return null},findSlotIndex:function(t){for(var e=this.slots,n=0,i=e.length;i>n;n++)if(e[n].data.name==t)return n;return-1},setSkinByName:function(t){var e=this.data.findSkin(t);if(!e)throw"Skin not found: "+t;this.setSkin(e)},setSkin:function(t){if(t)if(this.skin)t._attachAll(this,this.skin);else for(var e=this.slots,n=0,i=e.length;i>n;n++){var a=e[n],r=a.data.attachmentName;if(r){var o=t.getAttachment(n,r);o&&a.setAttachment(o)}}this.skin=t},getAttachmentBySlotName:function(t,e){return this.getAttachmentBySlotIndex(this.data.findSlotIndex(t),e)},getAttachmentBySlotIndex:function(t,e){if(this.skin){var n=this.skin.getAttachment(t,e);if(n)return n}return this.data.defaultSkin?this.data.defaultSkin.getAttachment(t,e):null},setAttachment:function(t,e){for(var n=this.slots,i=0,a=n.length;a>i;i++){var r=n[i];if(r.data.name==t){var o=null;if(e&&(o=this.getAttachmentBySlotIndex(i,e),!o))throw"Attachment not found: "+e+", for slot: "+t;return void r.setAttachment(o)}}throw"Slot not found: "+t},findIkConstraint:function(t){for(var e=this.ikConstraints,n=0,i=e.length;i>n;n++)if(e[n].data.name==t)return e[n];return null},update:function(t){this.time+=t},resetDrawOrder:function(){for(var t=0,e=this.drawOrder.length;e>t;t++)this.drawOrder[t]=t}},e.exports=i.Skeleton},{"../SpineUtil":42,"./Bone":12,"./IkConstraint":24,"./Slot":37}],32:[function(t,e,n){var i=t("../SpineRuntime")||{};i.AttachmentType=t("./AttachmentType"),i.SkeletonBounds=function(){this.polygonPool=[],this.polygons=[],this.boundingBoxes=[]},i.SkeletonBounds.prototype={
 
minX:0,minY:0,maxX:0,maxY:0,update:function(t,e){var n=t.slots,a=n.length,r=t.x,o=t.y,s=this.boundingBoxes,l=this.polygonPool,h=this.polygons;s.length=0;for(var m=0,u=h.length;u>m;m++)l.push(h[m]);h.length=0;for(var m=0;a>m;m++){var f=n[m],c=f.attachment;if(c.type==i.AttachmentType.boundingbox){s.push(c);var p,d=l.length;d>0?(p=l[d-1],l.splice(d-1,1)):p=[],h.push(p),p.length=c.vertices.length,c.computeWorldVertices(r,o,f.bone,p)}}e&&this.aabbCompute()},aabbCompute:function(){for(var t=this.polygons,e=Number.MAX_VALUE,n=Number.MAX_VALUE,i=Number.MIN_VALUE,a=Number.MIN_VALUE,r=0,o=t.length;o>r;r++)for(var s=t[r],l=0,h=s.length;h>l;l+=2){var m=s[l],u=s[l+1];e=Math.min(e,m),n=Math.min(n,u),i=Math.max(i,m),a=Math.max(a,u)}this.minX=e,this.minY=n,this.maxX=i,this.maxY=a},aabbContainsPoint:function(t,e){return t>=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},aabbIntersectsSegment:function(t,e,n,i){var a=this.minX,r=this.minY,o=this.maxX,s=this.maxY;if(a>=t&&a>=n||r>=e&&r>=i||t>=o&&n>=o||e>=s&&i>=s)return!1;var l=(i-e)/(n-t),h=l*(a-t)+e;if(h>r&&s>h)return!0;if(h=l*(o-t)+e,h>r&&s>h)return!0;var m=(r-e)/l+t;return m>a&&o>m?!0:(m=(s-e)/l+t,m>a&&o>m?!0:!1)},aabbIntersectsSkeleton:function(t){return this.minX<t.maxX&&this.maxX>t.minX&&this.minY<t.maxY&&this.maxY>t.minY},containsPoint:function(t,e){for(var n=this.polygons,i=0,a=n.length;a>i;i++)if(this.polygonContainsPoint(n[i],t,e))return this.boundingBoxes[i];return null},intersectsSegment:function(t,e,n,i){for(var a=this.polygons,r=0,o=a.length;o>r;r++)if(a[r].intersectsSegment(t,e,n,i))return this.boundingBoxes[r];return null},polygonContainsPoint:function(t,e,n){for(var i=t.length,a=i-2,r=!1,o=0;i>o;o+=2){var s=t[o+1],l=t[a+1];if(n>s&&l>=n||n>l&&s>=n){var h=t[o];h+(n-s)/(l-s)*(t[a]-h)<e&&(r=!r)}a=o}return r},polygonIntersectsSegment:function(t,e,n,i,a){for(var r=t.length,o=e-i,s=n-a,l=e*a-n*i,h=t[r-2],m=t[r-1],u=0;r>u;u+=2){var f=t[u],c=t[u+1],p=h*c-m*f,d=h-f,g=m-c,v=o*g-s*d,A=(l*d-o*p)/v;if((A>=h&&f>=A||A>=f&&h>=A)&&(A>=e&&i>=A||A>=i&&e>=A)){var S=(l*g-s*p)/v;if((S>=m&&c>=S||S>=c&&m>=S)&&(S>=n&&a>=S||S>=a&&n>=S))return!0}h=f,m=c}return!1},getPolygon:function(t){var e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]},getWidth:function(){return this.maxX-this.minX},getHeight:function(){return this.maxY-this.minY}},e.exports=i.SkeletonBounds},{"../SpineRuntime":41,"./AttachmentType":11}],33:[function(t,e,n){var i=t("../SpineUtil");i.SkeletonData=function(){this.bones=[],this.slots=[],this.skins=[],this.events=[],this.animations=[],this.ikConstraints=[]},i.SkeletonData.prototype={name:null,defaultSkin:null,width:0,height:0,version:null,hash:null,findBone:function(t){for(var e=this.bones,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null},findBoneIndex:function(t){for(var e=this.bones,n=0,i=e.length;i>n;n++)if(e[n].name==t)return n;return-1},findSlot:function(t){for(var e=this.slots,n=0,i=e.length;i>n;n++)if(e[n].name==t)return this.slots[n];return null},findSlotIndex:function(t){for(var e=this.slots,n=0,i=e.length;i>n;n++)if(e[n].name==t)return n;return-1},findSkin:function(t){for(var e=this.skins,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null},findEvent:function(t){for(var e=this.events,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null},findAnimation:function(t){for(var e=this.animations,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null},findIkConstraint:function(t){for(var e=this.ikConstraints,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null}},e.exports=i.SkeletonData},{"../SpineUtil":42}],34:[function(t,e,n){var i=t("../SpineUtil");i.SkeletonData=t("./SkeletonData"),i.BoneData=t("./BoneData"),i.IkConstraintData=t("./IkConstraintData"),i.SlotData=t("./SlotData"),i.Skin=t("./Skin"),i.EventData=t("./EventData"),i.AttachmentType=t("./AttachmentType"),i.ColorTimeline=t("./ColorTimeline"),i.AttachmentTimeline=t("./AttachmentTimeline"),i.RotateTimeline=t("./RotateTimeline"),i.ScaleTimeline=t("./ScaleTimeline"),i.TranslateTimeline=t("./TranslateTimeline"),i.FlipXTimeline=t("./FlipXTimeline"),i.FlipYTimeline=t("./FlipYTimeline"),i.IkConstraintTimeline=t("./IkConstraintTimeline"),i.FfdTimeline=t("./FfdTimeline"),i.DrawOrderTimeline=t("./DrawOrderTimeline"),i.EventTimeline=t("./EventTimeline"),i.Event=t("./Event"),i.Animation=t("./Animation"),i.SkeletonJsonParser=function(t){this.attachmentLoader=t},i.SkeletonJsonParser.prototype={scale:1,readSkeletonData:function(t,e){var n=new i.SkeletonData;n.name=e;var a=t.skeleton;a&&(n.hash=a.hash,n.version=a.spine,n.width=a.width||0,n.height=a.height||0);for(var r=t.bones,o=0,s=r.length;s>o;o++){var l=r[o],h=null;if(l.parent&&(h=n.findBone(l.parent),!h))throw"Parent bone not found: "+l.parent;var m=new i.BoneData(l.name,h);m.length=(l.length||0)*this.scale,m.x=(l.x||0)*this.scale,m.y=(l.y||0)*this.scale,m.rotation=l.rotation||0,m.scaleX=l.hasOwnProperty("scaleX")?l.scaleX:1,m.scaleY=l.hasOwnProperty("scaleY")?l.scaleY:1,m.inheritScale=l.hasOwnProperty("inheritScale")?l.inheritScale:!0,m.inheritRotation=l.hasOwnProperty("inheritRotation")?l.inheritRotation:!0,n.bones.push(m)}var u=t.ik;if(u)for(var o=0,s=u.length;s>o;o++){for(var f=u[o],c=new i.IkConstraintData(f.name),r=f.bones,p=0,d=r.length;d>p;p++){var g=n.findBone(r[p]);if(!g)throw"IK bone not found: "+r[p];c.bones.push(g)}if(c.target=n.findBone(f.target),!c.target)throw"Target bone not found: "+f.target;c.bendDirection=!f.hasOwnProperty("bendPositive")||f.bendPositive?1:-1,c.mix=f.hasOwnProperty("mix")?f.mix:1,n.ikConstraints.push(c)}for(var v=t.slots,o=0,s=v.length;s>o;o++){var A=v[o],m=n.findBone(A.bone);if(!m)throw"Slot bone not found: "+A.bone;var S=new i.SlotData(A.name,m),y=A.color;y&&(S.r=this.toColor(y,0),S.g=this.toColor(y,1),S.b=this.toColor(y,2),S.a=this.toColor(y,3)),S.attachmentName=A.attachment,S.blendMode=A.blend&&i.SlotData.PIXI_BLEND_MODE_MAP[A.blend]||i.SlotData.PIXI_BLEND_MODE_MAP.normal,n.slots.push(S)}var w=t.skins;for(var x in w)if(w.hasOwnProperty(x)){var T=w[x],b=new i.Skin(x);for(var C in T)if(T.hasOwnProperty(C)){var k=n.findSlotIndex(C),I=T[C];for(var D in I)if(I.hasOwnProperty(D)){var U=this.readAttachment(b,D,I[D]);U&&b.addAttachment(k,D,U)}}n.skins.push(b),"default"==b.name&&(n.defaultSkin=b)}var X=t.events;for(var O in X)if(X.hasOwnProperty(O)){var P=X[O],M=new i.EventData(O);M.intValue=P["int"]||0,M.floatValue=P["float"]||0,M.stringValue=P.string||null,n.events.push(M)}var F=t.animations;for(var Y in F)F.hasOwnProperty(Y)&&this.readAnimation(Y,F[Y],n);return n},readAttachment:function(t,e,n){e=n.name||e;var a=i.AttachmentType[n.type||"region"],r=n.path||e,o=this.scale;if(a==i.AttachmentType.region){var s=this.attachmentLoader.newRegionAttachment(t,e,r);if(!s)return null;s.path=r,s.x=(n.x||0)*o,s.y=(n.y||0)*o,s.scaleX=n.hasOwnProperty("scaleX")?n.scaleX:1,s.scaleY=n.hasOwnProperty("scaleY")?n.scaleY:1,s.rotation=n.rotation||0,s.width=(n.width||0)*o,s.height=(n.height||0)*o;var l=n.color;return l&&(s.r=this.toColor(l,0),s.g=this.toColor(l,1),s.b=this.toColor(l,2),s.a=this.toColor(l,3)),s.updateOffset(),s}if(a==i.AttachmentType.mesh){var h=this.attachmentLoader.newMeshAttachment(t,e,r);return h?(h.path=r,h.vertices=this.getFloatArray(n,"vertices",o),h.triangles=this.getIntArray(n,"triangles"),h.regionUVs=this.getFloatArray(n,"uvs",1),h.updateUVs(),l=n.color,l&&(h.r=this.toColor(l,0),h.g=this.toColor(l,1),h.b=this.toColor(l,2),h.a=this.toColor(l,3)),h.hullLength=2*(n.hull||0),n.edges&&(h.edges=this.getIntArray(n,"edges")),h.width=(n.width||0)*o,h.height=(n.height||0)*o,h):null}if(a==i.AttachmentType.skinnedmesh){var h=this.attachmentLoader.newSkinnedMeshAttachment(t,e,r);if(!h)return null;h.path=r;for(var m=this.getFloatArray(n,"uvs",1),u=this.getFloatArray(n,"vertices",1),f=[],c=[],p=0,d=u.length;d>p;){var g=0|u[p++];c[c.length]=g;for(var v=p+4*g;v>p;)c[c.length]=u[p],f[f.length]=u[p+1]*o,f[f.length]=u[p+2]*o,f[f.length]=u[p+3],p+=4}return h.bones=c,h.weights=f,h.triangles=this.getIntArray(n,"triangles"),h.regionUVs=m,h.updateUVs(),l=n.color,l&&(h.r=this.toColor(l,0),h.g=this.toColor(l,1),h.b=this.toColor(l,2),h.a=this.toColor(l,3)),h.hullLength=2*(n.hull||0),n.edges&&(h.edges=this.getIntArray(n,"edges")),h.width=(n.width||0)*o,h.height=(n.height||0)*o,h}if(a==i.AttachmentType.boundingbox){for(var A=this.attachmentLoader.newBoundingBoxAttachment(t,e),u=n.vertices,p=0,d=u.length;d>p;p++)A.vertices.push(u[p]*o);return A}throw"Unknown attachment type: "+a},readAnimation:function(t,e,n){var a=[],r=0,o=e.slots;for(var s in o)if(o.hasOwnProperty(s)){var l=o[s],h=n.findSlotIndex(s);for(var m in l)if(l.hasOwnProperty(m)){var u=l[m];if("color"==m){var f=new i.ColorTimeline(u.length);f.slotIndex=h;for(var c=0,p=0,d=u.length;d>p;p++){var g=u[p],v=g.color,A=this.toColor(v,0),S=this.toColor(v,1),y=this.toColor(v,2),w=this.toColor(v,3);f.setFrame(c,g.time,A,S,y,w),this.readCurve(f,c,g),c++}a.push(f),r=Math.max(r,f.frames[5*f.getFrameCount()-5])}else{if("attachment"!=m)throw"Invalid timeline type for a slot: "+m+" ("+s+")";var f=new i.AttachmentTimeline(u.length);f.slotIndex=h;for(var c=0,p=0,d=u.length;d>p;p++){var g=u[p];f.setFrame(c++,g.time,g.name)}a.push(f),r=Math.max(r,f.frames[f.getFrameCount()-1])}}}var x=e.bones;for(var T in x)if(x.hasOwnProperty(T)){var b=n.findBoneIndex(T);if(-1==b)throw"Bone not found: "+T;var C=x[T];for(var m in C)if(C.hasOwnProperty(m)){var u=C[m];if("rotate"==m){var f=new i.RotateTimeline(u.length);f.boneIndex=b;for(var c=0,p=0,d=u.length;d>p;p++){var g=u[p];f.setFrame(c,g.time,g.angle),this.readCurve(f,c,g),c++}a.push(f),r=Math.max(r,f.frames[2*f.getFrameCount()-2])}else if("translate"==m||"scale"==m){var f,k=1;"scale"==m?f=new i.ScaleTimeline(u.length):(f=new i.TranslateTimeline(u.length),k=this.scale),f.boneIndex=b;for(var c=0,p=0,d=u.length;d>p;p++){var g=u[p],I=(g.x||0)*k,D=(g.y||0)*k;f.setFrame(c,g.time,I,D),this.readCurve(f,c,g),c++}a.push(f),r=Math.max(r,f.frames[3*f.getFrameCount()-3])}else{if("flipX"!=m&&"flipY"!=m)throw"Invalid timeline type for a bone: "+m+" ("+T+")";var I="flipX"==m,f=I?new i.FlipXTimeline(u.length):new i.FlipYTimeline(u.length);f.boneIndex=b;for(var U=I?"x":"y",c=0,p=0,d=u.length;d>p;p++){var g=u[p];f.setFrame(c,g.time,g[U]||!1),c++}a.push(f),r=Math.max(r,f.frames[2*f.getFrameCount()-2])}}}var X=e.ik;for(var O in X)if(X.hasOwnProperty(O)){var P=n.findIkConstraint(O),u=X[O],f=new i.IkConstraintTimeline(u.length);f.ikConstraintIndex=n.ikConstraints.indexOf(P);for(var c=0,p=0,d=u.length;d>p;p++){var g=u[p],M=g.hasOwnProperty("mix")?g.mix:1,F=!g.hasOwnProperty("bendPositive")||g.bendPositive?1:-1;f.setFrame(c,g.time,M,F),this.readCurve(f,c,g),c++}a.push(f),r=Math.max(r,f.frames[3*f.getFrameCount()-3])}var Y=e.ffd;for(var R in Y){var E=n.findSkin(R),l=Y[R];for(s in l){var h=n.findSlotIndex(s),B=l[s];for(var V in B){var u=B[V],f=new i.FfdTimeline(u.length),L=E.getAttachment(h,V);if(!L)throw"FFD attachment not found: "+V;f.slotIndex=h,f.attachment=L;var N,W=L.type==i.AttachmentType.mesh;N=W?L.vertices.length:L.weights.length/3*2;for(var c=0,p=0,d=u.length;d>p;p++){var _,g=u[p];if(g.vertices){var j=g.vertices;_=[];for(var H=0;N>H;++H)_.push(0);var K=g.offset||0,J=j.length;if(1==this.scale)for(var q=0;J>q;q++)_[q+K]=j[q];else for(var q=0;J>q;q++)_[q+K]=j[q]*this.scale;if(W)for(var z=L.vertices,q=0,J=_.length;J>q;q++)_[q]+=z[q]}else if(W)_=L.vertices;else{_=[];for(var H=0;N>H;++H)_.push(0)}f.setFrame(c,g.time,_),this.readCurve(f,c,g),c++}a[a.length]=f,r=Math.max(r,f.frames[f.getFrameCount()-1])}}}var G=e.drawOrder;if(G||(G=e.draworder),G){for(var f=new i.DrawOrderTimeline(G.length),$=n.slots.length,c=0,p=0,d=G.length;d>p;p++){var Q=G[p],Z=null;if(Q.offsets){Z=[],Z.length=$;for(var q=$-1;q>=0;q--)Z[q]=-1;var tt=Q.offsets,et=[];et.length=$-tt.length;for(var nt=0,it=0,q=0,J=tt.length;J>q;q++){var at=tt[q],h=n.findSlotIndex(at.slot);if(-1==h)throw"Slot not found: "+at.slot;for(;nt!=h;)et[it++]=nt++;Z[nt+at.offset]=nt++}for(;$>nt;)et[it++]=nt++;for(var q=$-1;q>=0;q--)-1==Z[q]&&(Z[q]=et[--it])}f.setFrame(c++,Q.time,Z)}a.push(f),r=Math.max(r,f.frames[f.getFrameCount()-1])}var rt=e.events;if(rt){for(var f=new i.EventTimeline(rt.length),c=0,p=0,d=rt.length;d>p;p++){var ot=rt[p],st=n.findEvent(ot.name);if(!st)throw"Event not found: "+ot.name;var lt=new i.Event(st);lt.intValue=ot.hasOwnProperty("int")?ot["int"]:st.intValue,lt.floatValue=ot.hasOwnProperty("float")?ot["float"]:st.floatValue,lt.stringValue=ot.hasOwnProperty("string")?ot.string:st.stringValue,f.setFrame(c++,ot.time,lt)}a.push(f),r=Math.max(r,f.frames[f.getFrameCount()-1])}n.animations.push(new i.Animation(t,a,r))},readCurve:function(t,e,n){var i=n.curve;i?"stepped"==i?t.curves.setStepped(e):i instanceof Array&&t.curves.setCurve(e,i[0],i[1],i[2],i[3]):t.curves.setLinear(e)},toColor:function(t,e){if(8!=t.length)throw"Color hexidecimal length must be 8, recieved: "+t;return parseInt(t.substring(2*e,2*e+2),16)/255},getFloatArray:function(t,e,n){var a=t[e],r=new i.Float32Array(a.length),o=0,s=a.length;if(1==n)for(;s>o;o++)r[o]=a[o];else for(;s>o;o++)r[o]=a[o]*n;return r},getIntArray:function(t,e){for(var n=t[e],a=new i.Uint16Array(n.length),r=0,o=n.length;o>r;r++)a[r]=0|n[r];return a}},e.exports=i.SkeletonJsonParser},{"../SpineUtil":42,"./Animation":2,"./AttachmentTimeline":10,"./AttachmentType":11,"./BoneData":13,"./ColorTimeline":15,"./DrawOrderTimeline":17,"./Event":18,"./EventData":19,"./EventTimeline":20,"./FfdTimeline":21,"./FlipXTimeline":22,"./FlipYTimeline":23,"./IkConstraintData":25,"./IkConstraintTimeline":26,"./RotateTimeline":29,"./ScaleTimeline":30,"./SkeletonData":33,"./Skin":35,"./SlotData":38,"./TranslateTimeline":40}],35:[function(t,e,n){var i=t("../SpineUtil");i.Skin=function(t){this.name=t,this.attachments={}},i.Skin.prototype={addAttachment:function(t,e,n){this.attachments[t+":"+e]=n},getAttachment:function(t,e){return this.attachments[t+":"+e]},_attachAll:function(t,e){for(var n in e.attachments){var i=n.indexOf(":"),a=parseInt(n.substring(0,i)),r=n.substring(i+1),o=t.slots[a];if(o.attachment&&o.attachment.name==r){var s=this.getAttachment(a,r);s&&o.setAttachment(s)}}}},e.exports=i.Skin},{"../SpineUtil":42}],36:[function(t,e,n){var i=t("../SpineUtil")||{};i.AttachmentType=t("./AttachmentType"),i.SkinnedMeshAttachment=function(t){this.name=t},i.SkinnedMeshAttachment.prototype={type:i.AttachmentType.skinnedmesh,bones:null,weights:null,uvs:null,regionUVs:null,triangles:null,hullLength:0,r:1,g:1,b:1,a:1,path:null,rendererObject:null,regionU:0,regionV:0,regionU2:0,regionV2:0,regionRotate:!1,regionOffsetX:0,regionOffsetY:0,regionWidth:0,regionHeight:0,regionOriginalWidth:0,regionOriginalHeight:0,edges:null,width:0,height:0,updateUVs:function(t,e,n,a,r){var o=this.regionU2-this.regionU,s=this.regionV2-this.regionV,l=this.regionUVs.length;if(this.uvs&&this.uvs.length==l||(this.uvs=new i.Float32Array(l)),this.regionRotate)for(var h=0;l>h;h+=2)this.uvs[h]=this.regionU+this.regionUVs[h+1]*o,this.uvs[h+1]=this.regionV+s-this.regionUVs[h]*s;else for(var h=0;l>h;h+=2)this.uvs[h]=this.regionU+this.regionUVs[h]*o,this.uvs[h+1]=this.regionV+this.regionUVs[h+1]*s},computeWorldVertices:function(t,e,n,i){var a,r,o,s,l,h,m,u=n.bone.skeleton.bones,f=this.weights,c=this.bones,p=0,d=0,g=0,v=0,A=c.length;if(n.attachmentVertices.length)for(var S=n.attachmentVertices;A>d;p+=2){for(r=0,o=0,a=c[d++]+d;a>d;d++,g+=3,v+=2)s=u[c[d]],l=f[g]+S[v],h=f[g+1]+S[v+1],m=f[g+2],r+=(l*s.m00+h*s.m01+s.worldX)*m,o+=(l*s.m10+h*s.m11+s.worldY)*m;i[p]=r+t,i[p+1]=o+e}else for(;A>d;p+=2){for(r=0,o=0,a=c[d++]+d;a>d;d++,g+=3)s=u[c[d]],l=f[g],h=f[g+1],m=f[g+2],r+=(l*s.m00+h*s.m01+s.worldX)*m,o+=(l*s.m10+h*s.m11+s.worldY)*m;i[p]=r+t,i[p+1]=o+e}}},e.exports=i.SkinnedMeshAttachment},{"../SpineUtil":42,"./AttachmentType":11}],37:[function(t,e,n){var i=t("../SpineUtil");i.Slot=function(t,e){this.data=t,this.bone=e,this.setToSetupPose()},i.Slot.prototype={r:1,g:1,b:1,a:1,_attachmentTime:0,attachment:null,attachmentVertices:[],setAttachment:function(t){this.attachment=t,this._attachmentTime=this.bone.skeleton.time,this.attachmentVertices.length=0},setAttachmentTime:function(t){this._attachmentTime=this.bone.skeleton.time-t},getAttachmentTime:function(){return this.bone.skeleton.time-this._attachmentTime},setToSetupPose:function(){var t=this.data;this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this.blendMode=t.blendMode;for(var e=this.bone.skeleton.data.slots,n=0,i=e.length;i>n;n++)if(e[n]==t){this.setAttachment(t.attachmentName?this.bone.skeleton.getAttachmentBySlotIndex(n,t.attachmentName):null);break}}},e.exports=i.Slot},{"../SpineUtil":42}],38:[function(t,e,n){var i=t("../SpineUtil");i.SlotData=function(t,e){this.name=t,this.boneData=e},i.SlotData.PIXI_BLEND_MODE_MAP={multiply:PIXI.BLEND_MODES.MULTIPLY,screen:PIXI.BLEND_MODES.SCREEN,additive:PIXI.BLEND_MODES.ADD,normal:PIXI.BLEND_MODES.NORMAL},i.SlotData.prototype={r:1,g:1,b:1,a:1,attachmentName:null,blendMode:PIXI.BLEND_MODES.NORMAL},e.exports=i.SlotData},{"../SpineUtil":42}],39:[function(t,e,n){var i=t("../SpineUtil");i.TrackEntry=function(){},i.TrackEntry.prototype={next:null,previous:null,animation:null,loop:!1,delay:0,time:0,lastTime:-1,endTime:0,timeScale:1,mixTime:0,mixDuration:0,mix:1,onStart:null,onEnd:null,onComplete:null,onEvent:null},e.exports=i.TrackEntry},{"../SpineUtil":42}],40:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.TranslateTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=3*t},i.TranslateTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/3},setFrame:function(t,e,n,i){t*=3,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=i},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s=t.bones[this.boneIndex];if(n>=o[o.length-3])return s.x+=(s.data.x+o[o.length-2]-s.x)*r,void(s.y+=(s.data.y+o[o.length-1]-s.y)*r);var l=i.Animation.binarySearch(o,n,3),h=o[l-2],m=o[l-1],u=o[l],f=1-(n-u)/(o[l+-3]-u);f=this.curves.getCurvePercent(l/3-1,f),s.x+=(s.data.x+h+(o[l+1]-h)*f-s.x)*r,s.y+=(s.data.y+m+(o[l+2]-m)*f-s.y)*r}}},e.exports=i.TranslateTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],41:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.AnimationStateData=t("./AnimationStateData"),i.AnimationState=t("./AnimationState"),i.AtlasAttachmentParser=t("./AtlasAttachmentParser"),i.Atlas=t("./Atlas"),i.AtlasPage=t("./AtlasPage"),i.AtlasReader=t("./AtlasReader"),i.AtlasRegion=t("./AtlasRegion"),i.AttachmentTimeline=t("./AttachmentTimeline"),i.AttachmentType=t("./AttachmentType"),i.BoneData=t("./BoneData"),i.Bone=t("./Bone"),i.BoundingBoxAttachment=t("./BoundingBoxAttachment"),i.ColorTimeline=t("./ColorTimeline"),i.Curves=t("./Curves"),i.DrawOrderTimeline=t("./DrawOrderTimeline"),i.EventData=t("./EventData"),i.Event=t("./Event"),i.EventTimeline=t("./EventTimeline"),i.FfdTimeline=t("./FfdTimeline"),i.FlipXTimeline=t("./FlipXTimeline"),i.FlipYTimeline=t("./FlipYTimeline"),i.IkConstraintData=t("./IkConstraintData"),i.IkConstraint=t("./IkConstraint"),i.IkConstraintTimeline=t("./IkConstraintTimeline"),i.MeshAttachment=t("./MeshAttachment"),i.RegionAttachment=t("./RegionAttachment"),i.RotateTimeline=t("./RotateTimeline"),i.ScaleTimeline=t("./ScaleTimeline"),i.SkeletonBounds=t("./SkeletonBounds"),i.SkeletonData=t("./SkeletonData"),i.Skeleton=t("./Skeleton"),i.SkeletonJsonParser=t("./SkeletonJsonParser"),i.Skin=t("./Skin.js"),i.SkinnedMeshAttachment=t("./SkinnedMeshAttachment"),i.SlotData=t("./SlotData"),i.Slot=t("./Slot"),i.TrackEntry=t("./TrackEntry"),i.TranslateTimeline=t("./TranslateTimeline"),e.exports=i},{"../SpineUtil":42,"./Animation":2,"./AnimationState":3,"./AnimationStateData":4,"./Atlas":5,"./AtlasAttachmentParser":6,"./AtlasPage":7,"./AtlasReader":8,"./AtlasRegion":9,"./AttachmentTimeline":10,"./AttachmentType":11,"./Bone":12,"./BoneData":13,"./BoundingBoxAttachment":14,"./ColorTimeline":15,"./Curves":16,"./DrawOrderTimeline":17,"./Event":18,"./EventData":19,"./EventTimeline":20,"./FfdTimeline":21,"./FlipXTimeline":22,"./FlipYTimeline":23,"./IkConstraint":24,"./IkConstraintData":25,"./IkConstraintTimeline":26,"./MeshAttachment":27,"./RegionAttachment":28,"./RotateTimeline":29,"./ScaleTimeline":30,"./Skeleton":31,"./SkeletonBounds":32,"./SkeletonData":33,"./SkeletonJsonParser":34,"./Skin.js":35,"./SkinnedMeshAttachment":36,"./Slot":37,"./SlotData":38,"./TrackEntry":39,"./TranslateTimeline":40}],42:[function(t,e,n){e.exports={radDeg:180/Math.PI,degRad:Math.PI/180,temp:[],Float32Array:"undefined"==typeof Float32Array?Array:Float32Array,Uint16Array:"undefined"==typeof Uint16Array?Array:Uint16Array}},{}],43:[function(t,e,n){function i(t){if(PIXI.Container.call(this),!t)throw new Error("The spineData param is required.");if("string"==typeof t)throw new Error('spineData param cant be string. Please use PIXI.spine.Spine.fromAtlas("YOUR_RESOURCE_NAME") from now on.');this.spineData=t,this.skeleton=new a.Skeleton(t),this.skeleton.updateWorldTransform(),this.stateData=new a.AnimationStateData(t),this.state=new a.AnimationState(this.stateData),this.slotContainers=[];for(var e=0,n=this.skeleton.slots.length;n>e;e++){var i=this.skeleton.slots[e],r=i.attachment,o=new PIXI.Container;if(this.slotContainers.push(o),this.addChild(o),r instanceof a.RegionAttachment){var s=r.rendererObject.name,l=this.createSprite(i,r);i.currentSprite=l,i.currentSpriteName=s,o.addChild(l)}else{if(!(r instanceof a.MeshAttachment))continue;var h=this.createMesh(i,r);i.currentMesh=h,i.currentMeshName=r.name,o.addChild(h)}}this.autoUpdate=!0}var a=t("../SpineRuntime"),r=t("../loaders/atlasParser");a.Bone.yDown=!0,i.fromAtlas=function(t){var e=r.AnimCache[t];if(!e)throw new Error('Spine data "'+t+'" does not exist in the animation cache');return new i(e)},i.prototype=Object.create(PIXI.Container.prototype),i.prototype.constructor=i,e.exports=i,i.globalAutoUpdate=!0,Object.defineProperties(i.prototype,{autoUpdate:{get:function(){return this.updateTransform===i.prototype.autoUpdateTransform},set:function(t){this.updateTransform=t?i.prototype.autoUpdateTransform:PIXI.Container.prototype.updateTransform}}}),i.prototype.update=function(t){this.state.update(t),this.state.apply(this.skeleton),this.skeleton.updateWorldTransform();for(var e=this.skeleton.drawOrder,n=this.skeleton.slots,i=0,r=e.length;r>i;i++)this.children[i]=this.slotContainers[e[i]];for(i=0,r=n.length;r>i;i++){var o=n[i],s=o.attachment,l=this.slotContainers[i];if(s){var h=s.type;/*AttachBugfixStart*/if (o && typeof o.oldAttType === 'undefined') {o.oldAttType = h;}var attachmentChanged = h !== o.oldAttType;if (attachmentChanged) {o.oldAttType = h;if(h===a.AttachmentType.region){if(o.meshes)for(x in o.meshes)o.meshes[x].visible=!1;o.sprites&&o.sprites[s.rendererObject.name]&&(o.sprites[s.rendererObject.name].visible=!0)}else{if(l.position.x=0,l.position.y=0,l.scale.x=1,l.scale.y=1,l.rotation=0,o.sprites)for(x in o.sprites)o.sprites[x].visible=!1;o.meshes&&o.meshes[s.name]&&(o.meshes[s.name].visible=!0)}}/*AttachBugfixEnd*/if(h===a.AttachmentType.region){if(s.rendererObject&&(!o.currentSpriteName||o.currentSpriteName!==s.rendererObject.name)){var m=s.rendererObject.name;if(void 0!==o.currentSprite&&(o.currentSprite.visible=!1),o.sprites=o.sprites||{},void 0!==o.sprites[m])o.sprites[m].visible=!0;else{var u=this.createSprite(o,s);l.addChild(u)}o.currentSprite=o.sprites[m],o.currentSpriteName=m}var f=o.bone;l.position.x=f.worldX+s.x*f.m00+s.y*f.m01,l.position.y=f.worldY+s.x*f.m10+s.y*f.m11,l.scale.x=f.worldScaleX,l.scale.y=f.worldScaleY,l.rotation=-(o.bone.worldRotation*a.degRad),f.worldFlipX&&(l.scale.x=-l.scale.x,l.rotation=-l.rotation),f.worldFlipY==a.Bone.yDown&&(l.scale.y=-l.scale.y,l.rotation=-l.rotation),o.currentSprite.blendMode=o.blendMode,o.currentSprite.tint=PIXI.utils.rgb2hex([o.r,o.g,o.b])}else{if(h!==a.AttachmentType.skinnedmesh&&h!==a.AttachmentType.mesh){l.visible=!1;continue}if(!o.currentMeshName||o.currentMeshName!==s.name){var c=s.name;if(void 0!==o.currentMesh&&(o.currentMesh.visible=!1),o.meshes=o.meshes||{},void 0!==o.meshes[c])o.meshes[c].visible=!0;else{var p=this.createMesh(o,s);l.addChild(p)}o.currentMesh=o.meshes[c],o.currentMeshName=c}s.computeWorldVertices(o.bone.skeleton.x,o.bone.skeleton.y,o,o.currentMesh.vertices)}l.visible=!0,l.alpha=o.a}else l.visible=!1}},i.prototype.autoUpdateTransform=function(){if(i.globalAutoUpdate){this.lastTime=this.lastTime||Date.now();var t=.001*(Date.now()-this.lastTime);this.lastTime=Date.now(),this.update(t)}else this.lastTime=0;PIXI.Container.prototype.updateTransform.call(this)},i.prototype.createSprite=function(t,e){var n=e.rendererObject,i=n.page.rendererObject,r=new PIXI.Rectangle(n.x,n.y,n.rotate?n.height:n.width,n.rotate?n.width:n.height),o=new PIXI.Texture(i,r),s=new PIXI.Sprite(o),l=n.rotate?.5*Math.PI:0;return s.scale.x=e.width/n.originalWidth*e.scaleX,s.scale.y=e.height/n.originalHeight*e.scaleY,s.rotation=l-e.rotation*a.degRad,s.anchor.x=(.5*n.originalWidth-n.offsetX)/n.width,s.anchor.y=1-(.5*n.originalHeight-n.offsetY)/n.height,s.alpha=e.a,t.sprites=t.sprites||{},t.sprites[n.name]=s,s},i.prototype.createMesh=function(t,e){var n=e.rendererObject,i=n.page.rendererObject,a=new PIXI.Texture(i),r=new PIXI.mesh.Mesh(a,new Float32Array(e.uvs.length),new Float32Array(e.uvs),new Uint16Array(e.triangles),PIXI.mesh.Mesh.DRAW_MODES.TRIANGLES);return r.canvasPadding=1.5,r.alpha=e.a,t.meshes=t.meshes||{},t.meshes[e.name]=r,r}},{"../SpineRuntime":41,"../loaders/atlasParser":45}],44:[function(t,e,n){var i=t("./atlasParser");PIXI.loaders.Loader.addPixiMiddleware(i),PIXI.loader.use(i())},{"./atlasParser":45}],45:[function(t,e,n){var i=PIXI.loaders.Resource,a=t("../SpineRuntime"),r=t("./imageLoaderAdapter"),o=e.exports=function(){return function(t,e){if(!t.data||!t.isJson||!t.data.bones)return e();var n=t.url.substr(0,t.url.lastIndexOf("."))+".atlas",s={crossOrigin:t.crossOrigin,xhrType:i.XHR_RESPONSE_TYPE.TEXT,metadata:t.metadata.spineMetadata},l={crossOrigin:t.crossOrigin,metadata:t.metadata.imageMetadata},h=t.url.substr(0,t.url.lastIndexOf("/")+1),m=r(this,t.name+"_atlas_page_",h,l);this.add(t.name+"_atlas",n,s,function(n){new a.Atlas(this.xhr.responseText,m,function(n){var i=new a.SkeletonJsonParser(new a.AtlasAttachmentParser(n)),r=i.readSkeletonData(t.data);t.spineData=r,t.spineAtlas=n,o.enableCaching&&(o.AnimCache[t.name]=t.spineData),e()})})}};o.AnimCache={},o.enableCaching=!0},{"../SpineRuntime":41,"./imageLoaderAdapter":46}],46:[function(t,e,n){t("../SpineRuntime");e.exports=function(t,e,n,i){return n&&n.lastIndexOf("/")!==n.length-1&&(n+="/"),function(a,r){var o=e+a,s=n+a;t.add(o,s,i,function(t){r(t.texture.baseTexture)})}}},{"../SpineRuntime":41}],47:[function(t,e,n){e.exports={atlasParser:t("./atlasParser"),Loader:t("./Loader"),syncImageLoaderAdapter:t("./syncImageLoaderAdapter"),imageLoaderAdapter:t("./imageLoaderAdapter")}},{"./Loader":44,"./atlasParser":45,"./imageLoaderAdapter":46,"./syncImageLoaderAdapter":48}],48:[function(t,e,n){t("../SpineRuntime");e.exports=function(t,e){return t&&t.lastIndexOf("/")!==t.length-1&&(t+="/"),function(t,n){n(PIXI.BaseTexture.fromImage(t,e))}}},{"../SpineRuntime":41}]},{},[1]);
 
minX:0,minY:0,maxX:0,maxY:0,update:function(t,e){var n=t.slots,a=n.length,r=t.x,o=t.y,s=this.boundingBoxes,l=this.polygonPool,h=this.polygons;s.length=0;for(var m=0,u=h.length;u>m;m++)l.push(h[m]);h.length=0;for(var m=0;a>m;m++){var f=n[m],c=f.attachment;if(c.type==i.AttachmentType.boundingbox){s.push(c);var p,d=l.length;d>0?(p=l[d-1],l.splice(d-1,1)):p=[],h.push(p),p.length=c.vertices.length,c.computeWorldVertices(r,o,f.bone,p)}}e&&this.aabbCompute()},aabbCompute:function(){for(var t=this.polygons,e=Number.MAX_VALUE,n=Number.MAX_VALUE,i=Number.MIN_VALUE,a=Number.MIN_VALUE,r=0,o=t.length;o>r;r++)for(var s=t[r],l=0,h=s.length;h>l;l+=2){var m=s[l],u=s[l+1];e=Math.min(e,m),n=Math.min(n,u),i=Math.max(i,m),a=Math.max(a,u)}this.minX=e,this.minY=n,this.maxX=i,this.maxY=a},aabbContainsPoint:function(t,e){return t>=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},aabbIntersectsSegment:function(t,e,n,i){var a=this.minX,r=this.minY,o=this.maxX,s=this.maxY;if(a>=t&&a>=n||r>=e&&r>=i||t>=o&&n>=o||e>=s&&i>=s)return!1;var l=(i-e)/(n-t),h=l*(a-t)+e;if(h>r&&s>h)return!0;if(h=l*(o-t)+e,h>r&&s>h)return!0;var m=(r-e)/l+t;return m>a&&o>m?!0:(m=(s-e)/l+t,m>a&&o>m?!0:!1)},aabbIntersectsSkeleton:function(t){return this.minX<t.maxX&&this.maxX>t.minX&&this.minY<t.maxY&&this.maxY>t.minY},containsPoint:function(t,e){for(var n=this.polygons,i=0,a=n.length;a>i;i++)if(this.polygonContainsPoint(n[i],t,e))return this.boundingBoxes[i];return null},intersectsSegment:function(t,e,n,i){for(var a=this.polygons,r=0,o=a.length;o>r;r++)if(a[r].intersectsSegment(t,e,n,i))return this.boundingBoxes[r];return null},polygonContainsPoint:function(t,e,n){for(var i=t.length,a=i-2,r=!1,o=0;i>o;o+=2){var s=t[o+1],l=t[a+1];if(n>s&&l>=n||n>l&&s>=n){var h=t[o];h+(n-s)/(l-s)*(t[a]-h)<e&&(r=!r)}a=o}return r},polygonIntersectsSegment:function(t,e,n,i,a){for(var r=t.length,o=e-i,s=n-a,l=e*a-n*i,h=t[r-2],m=t[r-1],u=0;r>u;u+=2){var f=t[u],c=t[u+1],p=h*c-m*f,d=h-f,g=m-c,v=o*g-s*d,A=(l*d-o*p)/v;if((A>=h&&f>=A||A>=f&&h>=A)&&(A>=e&&i>=A||A>=i&&e>=A)){var S=(l*g-s*p)/v;if((S>=m&&c>=S||S>=c&&m>=S)&&(S>=n&&a>=S||S>=a&&n>=S))return!0}h=f,m=c}return!1},getPolygon:function(t){var e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]},getWidth:function(){return this.maxX-this.minX},getHeight:function(){return this.maxY-this.minY}},e.exports=i.SkeletonBounds},{"../SpineRuntime":41,"./AttachmentType":11}],33:[function(t,e,n){var i=t("../SpineUtil");i.SkeletonData=function(){this.bones=[],this.slots=[],this.skins=[],this.events=[],this.animations=[],this.ikConstraints=[]},i.SkeletonData.prototype={name:null,defaultSkin:null,width:0,height:0,version:null,hash:null,findBone:function(t){for(var e=this.bones,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null},findBoneIndex:function(t){for(var e=this.bones,n=0,i=e.length;i>n;n++)if(e[n].name==t)return n;return-1},findSlot:function(t){for(var e=this.slots,n=0,i=e.length;i>n;n++)if(e[n].name==t)return this.slots[n];return null},findSlotIndex:function(t){for(var e=this.slots,n=0,i=e.length;i>n;n++)if(e[n].name==t)return n;return-1},findSkin:function(t){for(var e=this.skins,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null},findEvent:function(t){for(var e=this.events,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null},findAnimation:function(t){for(var e=this.animations,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null},findIkConstraint:function(t){for(var e=this.ikConstraints,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null}},e.exports=i.SkeletonData},{"../SpineUtil":42}],34:[function(t,e,n){var i=t("../SpineUtil");i.SkeletonData=t("./SkeletonData"),i.BoneData=t("./BoneData"),i.IkConstraintData=t("./IkConstraintData"),i.SlotData=t("./SlotData"),i.Skin=t("./Skin"),i.EventData=t("./EventData"),i.AttachmentType=t("./AttachmentType"),i.ColorTimeline=t("./ColorTimeline"),i.AttachmentTimeline=t("./AttachmentTimeline"),i.RotateTimeline=t("./RotateTimeline"),i.ScaleTimeline=t("./ScaleTimeline"),i.TranslateTimeline=t("./TranslateTimeline"),i.FlipXTimeline=t("./FlipXTimeline"),i.FlipYTimeline=t("./FlipYTimeline"),i.IkConstraintTimeline=t("./IkConstraintTimeline"),i.FfdTimeline=t("./FfdTimeline"),i.DrawOrderTimeline=t("./DrawOrderTimeline"),i.EventTimeline=t("./EventTimeline"),i.Event=t("./Event"),i.Animation=t("./Animation"),i.SkeletonJsonParser=function(t){this.attachmentLoader=t},i.SkeletonJsonParser.prototype={scale:1,readSkeletonData:function(t,e){var n=new i.SkeletonData;n.name=e;var a=t.skeleton;a&&(n.hash=a.hash,n.version=a.spine,n.width=a.width||0,n.height=a.height||0);for(var r=t.bones,o=0,s=r.length;s>o;o++){var l=r[o],h=null;if(l.parent&&(h=n.findBone(l.parent),!h))throw"Parent bone not found: "+l.parent;var m=new i.BoneData(l.name,h);m.length=(l.length||0)*this.scale,m.x=(l.x||0)*this.scale,m.y=(l.y||0)*this.scale,m.rotation=l.rotation||0,m.scaleX=l.hasOwnProperty("scaleX")?l.scaleX:1,m.scaleY=l.hasOwnProperty("scaleY")?l.scaleY:1,m.inheritScale=l.hasOwnProperty("inheritScale")?l.inheritScale:!0,m.inheritRotation=l.hasOwnProperty("inheritRotation")?l.inheritRotation:!0,n.bones.push(m)}var u=t.ik;if(u)for(var o=0,s=u.length;s>o;o++){for(var f=u[o],c=new i.IkConstraintData(f.name),r=f.bones,p=0,d=r.length;d>p;p++){var g=n.findBone(r[p]);if(!g)throw"IK bone not found: "+r[p];c.bones.push(g)}if(c.target=n.findBone(f.target),!c.target)throw"Target bone not found: "+f.target;c.bendDirection=!f.hasOwnProperty("bendPositive")||f.bendPositive?1:-1,c.mix=f.hasOwnProperty("mix")?f.mix:1,n.ikConstraints.push(c)}for(var v=t.slots,o=0,s=v.length;s>o;o++){var A=v[o],m=n.findBone(A.bone);if(!m)throw"Slot bone not found: "+A.bone;var S=new i.SlotData(A.name,m),y=A.color;y&&(S.r=this.toColor(y,0),S.g=this.toColor(y,1),S.b=this.toColor(y,2),S.a=this.toColor(y,3)),S.attachmentName=A.attachment,S.blendMode=A.blend&&i.SlotData.PIXI_BLEND_MODE_MAP[A.blend]||i.SlotData.PIXI_BLEND_MODE_MAP.normal,n.slots.push(S)}var w=t.skins;for(var x in w)if(w.hasOwnProperty(x)){var T=w[x],b=new i.Skin(x);for(var C in T)if(T.hasOwnProperty(C)){var k=n.findSlotIndex(C),I=T[C];for(var D in I)if(I.hasOwnProperty(D)){var U=this.readAttachment(b,D,I[D]);U&&b.addAttachment(k,D,U)}}n.skins.push(b),"default"==b.name&&(n.defaultSkin=b)}var X=t.events;for(var O in X)if(X.hasOwnProperty(O)){var P=X[O],M=new i.EventData(O);M.intValue=P["int"]||0,M.floatValue=P["float"]||0,M.stringValue=P.string||null,n.events.push(M)}var F=t.animations;for(var Y in F)F.hasOwnProperty(Y)&&this.readAnimation(Y,F[Y],n);return n},readAttachment:function(t,e,n){e=n.name||e;var a=i.AttachmentType[n.type||"region"],r=n.path||e,o=this.scale;if(a==i.AttachmentType.region){var s=this.attachmentLoader.newRegionAttachment(t,e,r);if(!s)return null;s.path=r,s.x=(n.x||0)*o,s.y=(n.y||0)*o,s.scaleX=n.hasOwnProperty("scaleX")?n.scaleX:1,s.scaleY=n.hasOwnProperty("scaleY")?n.scaleY:1,s.rotation=n.rotation||0,s.width=(n.width||0)*o,s.height=(n.height||0)*o;var l=n.color;return l&&(s.r=this.toColor(l,0),s.g=this.toColor(l,1),s.b=this.toColor(l,2),s.a=this.toColor(l,3)),s.updateOffset(),s}if(a==i.AttachmentType.mesh){var h=this.attachmentLoader.newMeshAttachment(t,e,r);return h?(h.path=r,h.vertices=this.getFloatArray(n,"vertices",o),h.triangles=this.getIntArray(n,"triangles"),h.regionUVs=this.getFloatArray(n,"uvs",1),h.updateUVs(),l=n.color,l&&(h.r=this.toColor(l,0),h.g=this.toColor(l,1),h.b=this.toColor(l,2),h.a=this.toColor(l,3)),h.hullLength=2*(n.hull||0),n.edges&&(h.edges=this.getIntArray(n,"edges")),h.width=(n.width||0)*o,h.height=(n.height||0)*o,h):null}if(a==i.AttachmentType.skinnedmesh){var h=this.attachmentLoader.newSkinnedMeshAttachment(t,e,r);if(!h)return null;h.path=r;for(var m=this.getFloatArray(n,"uvs",1),u=this.getFloatArray(n,"vertices",1),f=[],c=[],p=0,d=u.length;d>p;){var g=0|u[p++];c[c.length]=g;for(var v=p+4*g;v>p;)c[c.length]=u[p],f[f.length]=u[p+1]*o,f[f.length]=u[p+2]*o,f[f.length]=u[p+3],p+=4}return h.bones=c,h.weights=f,h.triangles=this.getIntArray(n,"triangles"),h.regionUVs=m,h.updateUVs(),l=n.color,l&&(h.r=this.toColor(l,0),h.g=this.toColor(l,1),h.b=this.toColor(l,2),h.a=this.toColor(l,3)),h.hullLength=2*(n.hull||0),n.edges&&(h.edges=this.getIntArray(n,"edges")),h.width=(n.width||0)*o,h.height=(n.height||0)*o,h}if(a==i.AttachmentType.boundingbox){for(var A=this.attachmentLoader.newBoundingBoxAttachment(t,e),u=n.vertices,p=0,d=u.length;d>p;p++)A.vertices.push(u[p]*o);return A}throw"Unknown attachment type: "+a},readAnimation:function(t,e,n){var a=[],r=0,o=e.slots;for(var s in o)if(o.hasOwnProperty(s)){var l=o[s],h=n.findSlotIndex(s);for(var m in l)if(l.hasOwnProperty(m)){var u=l[m];if("color"==m){var f=new i.ColorTimeline(u.length);f.slotIndex=h;for(var c=0,p=0,d=u.length;d>p;p++){var g=u[p],v=g.color,A=this.toColor(v,0),S=this.toColor(v,1),y=this.toColor(v,2),w=this.toColor(v,3);f.setFrame(c,g.time,A,S,y,w),this.readCurve(f,c,g),c++}a.push(f),r=Math.max(r,f.frames[5*f.getFrameCount()-5])}else{if("attachment"!=m)throw"Invalid timeline type for a slot: "+m+" ("+s+")";var f=new i.AttachmentTimeline(u.length);f.slotIndex=h;for(var c=0,p=0,d=u.length;d>p;p++){var g=u[p];f.setFrame(c++,g.time,g.name)}a.push(f),r=Math.max(r,f.frames[f.getFrameCount()-1])}}}var x=e.bones;for(var T in x)if(x.hasOwnProperty(T)){var b=n.findBoneIndex(T);if(-1==b)throw"Bone not found: "+T;var C=x[T];for(var m in C)if(C.hasOwnProperty(m)){var u=C[m];if("rotate"==m){var f=new i.RotateTimeline(u.length);f.boneIndex=b;for(var c=0,p=0,d=u.length;d>p;p++){var g=u[p];f.setFrame(c,g.time,g.angle),this.readCurve(f,c,g),c++}a.push(f),r=Math.max(r,f.frames[2*f.getFrameCount()-2])}else if("translate"==m||"scale"==m){var f,k=1;"scale"==m?f=new i.ScaleTimeline(u.length):(f=new i.TranslateTimeline(u.length),k=this.scale),f.boneIndex=b;for(var c=0,p=0,d=u.length;d>p;p++){var g=u[p],I=(g.x||0)*k,D=(g.y||0)*k;f.setFrame(c,g.time,I,D),this.readCurve(f,c,g),c++}a.push(f),r=Math.max(r,f.frames[3*f.getFrameCount()-3])}else{if("flipX"!=m&&"flipY"!=m)throw"Invalid timeline type for a bone: "+m+" ("+T+")";var I="flipX"==m,f=I?new i.FlipXTimeline(u.length):new i.FlipYTimeline(u.length);f.boneIndex=b;for(var U=I?"x":"y",c=0,p=0,d=u.length;d>p;p++){var g=u[p];f.setFrame(c,g.time,g[U]||!1),c++}a.push(f),r=Math.max(r,f.frames[2*f.getFrameCount()-2])}}}var X=e.ik;for(var O in X)if(X.hasOwnProperty(O)){var P=n.findIkConstraint(O),u=X[O],f=new i.IkConstraintTimeline(u.length);f.ikConstraintIndex=n.ikConstraints.indexOf(P);for(var c=0,p=0,d=u.length;d>p;p++){var g=u[p],M=g.hasOwnProperty("mix")?g.mix:1,F=!g.hasOwnProperty("bendPositive")||g.bendPositive?1:-1;f.setFrame(c,g.time,M,F),this.readCurve(f,c,g),c++}a.push(f),r=Math.max(r,f.frames[3*f.getFrameCount()-3])}var Y=e.ffd;for(var R in Y){var E=n.findSkin(R),l=Y[R];for(s in l){var h=n.findSlotIndex(s),B=l[s];for(var V in B){var u=B[V],f=new i.FfdTimeline(u.length),L=E.getAttachment(h,V);if(!L)throw"FFD attachment not found: "+V;f.slotIndex=h,f.attachment=L;var N,W=L.type==i.AttachmentType.mesh;N=W?L.vertices.length:L.weights.length/3*2;for(var c=0,p=0,d=u.length;d>p;p++){var _,g=u[p];if(g.vertices){var j=g.vertices;_=[];for(var H=0;N>H;++H)_.push(0);var K=g.offset||0,J=j.length;if(1==this.scale)for(var q=0;J>q;q++)_[q+K]=j[q];else for(var q=0;J>q;q++)_[q+K]=j[q]*this.scale;if(W)for(var z=L.vertices,q=0,J=_.length;J>q;q++)_[q]+=z[q]}else if(W)_=L.vertices;else{_=[];for(var H=0;N>H;++H)_.push(0)}f.setFrame(c,g.time,_),this.readCurve(f,c,g),c++}a[a.length]=f,r=Math.max(r,f.frames[f.getFrameCount()-1])}}}var G=e.drawOrder;if(G||(G=e.draworder),G){for(var f=new i.DrawOrderTimeline(G.length),$=n.slots.length,c=0,p=0,d=G.length;d>p;p++){var Q=G[p],Z=null;if(Q.offsets){Z=[],Z.length=$;for(var q=$-1;q>=0;q--)Z[q]=-1;var tt=Q.offsets,et=[];et.length=$-tt.length;for(var nt=0,it=0,q=0,J=tt.length;J>q;q++){var at=tt[q],h=n.findSlotIndex(at.slot);if(-1==h)throw"Slot not found: "+at.slot;for(;nt!=h;)et[it++]=nt++;Z[nt+at.offset]=nt++}for(;$>nt;)et[it++]=nt++;for(var q=$-1;q>=0;q--)-1==Z[q]&&(Z[q]=et[--it])}f.setFrame(c++,Q.time,Z)}a.push(f),r=Math.max(r,f.frames[f.getFrameCount()-1])}var rt=e.events;if(rt){for(var f=new i.EventTimeline(rt.length),c=0,p=0,d=rt.length;d>p;p++){var ot=rt[p],st=n.findEvent(ot.name);if(!st)throw"Event not found: "+ot.name;var lt=new i.Event(st);lt.intValue=ot.hasOwnProperty("int")?ot["int"]:st.intValue,lt.floatValue=ot.hasOwnProperty("float")?ot["float"]:st.floatValue,lt.stringValue=ot.hasOwnProperty("string")?ot.string:st.stringValue,f.setFrame(c++,ot.time,lt)}a.push(f),r=Math.max(r,f.frames[f.getFrameCount()-1])}n.animations.push(new i.Animation(t,a,r))},readCurve:function(t,e,n){var i=n.curve;i?"stepped"==i?t.curves.setStepped(e):i instanceof Array&&t.curves.setCurve(e,i[0],i[1],i[2],i[3]):t.curves.setLinear(e)},toColor:function(t,e){if(8!=t.length)throw"Color hexidecimal length must be 8, recieved: "+t;return parseInt(t.substring(2*e,2*e+2),16)/255},getFloatArray:function(t,e,n){var a=t[e],r=new i.Float32Array(a.length),o=0,s=a.length;if(1==n)for(;s>o;o++)r[o]=a[o];else for(;s>o;o++)r[o]=a[o]*n;return r},getIntArray:function(t,e){for(var n=t[e],a=new i.Uint16Array(n.length),r=0,o=n.length;o>r;r++)a[r]=0|n[r];return a}},e.exports=i.SkeletonJsonParser},{"../SpineUtil":42,"./Animation":2,"./AttachmentTimeline":10,"./AttachmentType":11,"./BoneData":13,"./ColorTimeline":15,"./DrawOrderTimeline":17,"./Event":18,"./EventData":19,"./EventTimeline":20,"./FfdTimeline":21,"./FlipXTimeline":22,"./FlipYTimeline":23,"./IkConstraintData":25,"./IkConstraintTimeline":26,"./RotateTimeline":29,"./ScaleTimeline":30,"./SkeletonData":33,"./Skin":35,"./SlotData":38,"./TranslateTimeline":40}],35:[function(t,e,n){var i=t("../SpineUtil");i.Skin=function(t){this.name=t,this.attachments={}},i.Skin.prototype={addAttachment:function(t,e,n){this.attachments[t+":"+e]=n},getAttachment:function(t,e){return this.attachments[t+":"+e]},_attachAll:function(t,e){for(var n in e.attachments){var i=n.indexOf(":"),a=parseInt(n.substring(0,i)),r=n.substring(i+1),o=t.slots[a];if(o.attachment&&o.attachment.name==r){var s=this.getAttachment(a,r);s&&o.setAttachment(s)}}}},e.exports=i.Skin},{"../SpineUtil":42}],36:[function(t,e,n){var i=t("../SpineUtil")||{};i.AttachmentType=t("./AttachmentType"),i.SkinnedMeshAttachment=function(t){this.name=t},i.SkinnedMeshAttachment.prototype={type:i.AttachmentType.skinnedmesh,bones:null,weights:null,uvs:null,regionUVs:null,triangles:null,hullLength:0,r:1,g:1,b:1,a:1,path:null,rendererObject:null,regionU:0,regionV:0,regionU2:0,regionV2:0,regionRotate:!1,regionOffsetX:0,regionOffsetY:0,regionWidth:0,regionHeight:0,regionOriginalWidth:0,regionOriginalHeight:0,edges:null,width:0,height:0,updateUVs:function(t,e,n,a,r){var o=this.regionU2-this.regionU,s=this.regionV2-this.regionV,l=this.regionUVs.length;if(this.uvs&&this.uvs.length==l||(this.uvs=new i.Float32Array(l)),this.regionRotate)for(var h=0;l>h;h+=2)this.uvs[h]=this.regionU+this.regionUVs[h+1]*o,this.uvs[h+1]=this.regionV+s-this.regionUVs[h]*s;else for(var h=0;l>h;h+=2)this.uvs[h]=this.regionU+this.regionUVs[h]*o,this.uvs[h+1]=this.regionV+this.regionUVs[h+1]*s},computeWorldVertices:function(t,e,n,i){var a,r,o,s,l,h,m,u=n.bone.skeleton.bones,f=this.weights,c=this.bones,p=0,d=0,g=0,v=0,A=c.length;if(n.attachmentVertices.length)for(var S=n.attachmentVertices;A>d;p+=2){for(r=0,o=0,a=c[d++]+d;a>d;d++,g+=3,v+=2)s=u[c[d]],l=f[g]+S[v],h=f[g+1]+S[v+1],m=f[g+2],r+=(l*s.m00+h*s.m01+s.worldX)*m,o+=(l*s.m10+h*s.m11+s.worldY)*m;i[p]=r+t,i[p+1]=o+e}else for(;A>d;p+=2){for(r=0,o=0,a=c[d++]+d;a>d;d++,g+=3)s=u[c[d]],l=f[g],h=f[g+1],m=f[g+2],r+=(l*s.m00+h*s.m01+s.worldX)*m,o+=(l*s.m10+h*s.m11+s.worldY)*m;i[p]=r+t,i[p+1]=o+e}}},e.exports=i.SkinnedMeshAttachment},{"../SpineUtil":42,"./AttachmentType":11}],37:[function(t,e,n){var i=t("../SpineUtil");i.Slot=function(t,e){this.data=t,this.bone=e,this.setToSetupPose()},i.Slot.prototype={r:1,g:1,b:1,a:1,_attachmentTime:0,attachment:null,attachmentVertices:[],setAttachment:function(t){this.attachment=t,this._attachmentTime=this.bone.skeleton.time,this.attachmentVertices.length=0},setAttachmentTime:function(t){this._attachmentTime=this.bone.skeleton.time-t},getAttachmentTime:function(){return this.bone.skeleton.time-this._attachmentTime},setToSetupPose:function(){var t=this.data;this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this.blendMode=t.blendMode;for(var e=this.bone.skeleton.data.slots,n=0,i=e.length;i>n;n++)if(e[n]==t){this.setAttachment(t.attachmentName?this.bone.skeleton.getAttachmentBySlotIndex(n,t.attachmentName):null);break}}},e.exports=i.Slot},{"../SpineUtil":42}],38:[function(t,e,n){var i=t("../SpineUtil");i.SlotData=function(t,e){this.name=t,this.boneData=e},i.SlotData.PIXI_BLEND_MODE_MAP={multiply:PIXI.BLEND_MODES.MULTIPLY,screen:PIXI.BLEND_MODES.SCREEN,additive:PIXI.BLEND_MODES.ADD,normal:PIXI.BLEND_MODES.NORMAL},i.SlotData.prototype={r:1,g:1,b:1,a:1,attachmentName:null,blendMode:PIXI.BLEND_MODES.NORMAL},e.exports=i.SlotData},{"../SpineUtil":42}],39:[function(t,e,n){var i=t("../SpineUtil");i.TrackEntry=function(){},i.TrackEntry.prototype={next:null,previous:null,animation:null,loop:!1,delay:0,time:0,lastTime:-1,endTime:0,timeScale:1,mixTime:0,mixDuration:0,mix:1,onStart:null,onEnd:null,onComplete:null,onEvent:null},e.exports=i.TrackEntry},{"../SpineUtil":42}],40:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.TranslateTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=3*t},i.TranslateTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/3},setFrame:function(t,e,n,i){t*=3,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=i},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s=t.bones[this.boneIndex];if(n>=o[o.length-3])return s.x+=(s.data.x+o[o.length-2]-s.x)*r,void(s.y+=(s.data.y+o[o.length-1]-s.y)*r);var l=i.Animation.binarySearch(o,n,3),h=o[l-2],m=o[l-1],u=o[l],f=1-(n-u)/(o[l+-3]-u);f=this.curves.getCurvePercent(l/3-1,f),s.x+=(s.data.x+h+(o[l+1]-h)*f-s.x)*r,s.y+=(s.data.y+m+(o[l+2]-m)*f-s.y)*r}}},e.exports=i.TranslateTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],41:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.AnimationStateData=t("./AnimationStateData"),i.AnimationState=t("./AnimationState"),i.AtlasAttachmentParser=t("./AtlasAttachmentParser"),i.Atlas=t("./Atlas"),i.AtlasPage=t("./AtlasPage"),i.AtlasReader=t("./AtlasReader"),i.AtlasRegion=t("./AtlasRegion"),i.AttachmentTimeline=t("./AttachmentTimeline"),i.AttachmentType=t("./AttachmentType"),i.BoneData=t("./BoneData"),i.Bone=t("./Bone"),i.BoundingBoxAttachment=t("./BoundingBoxAttachment"),i.ColorTimeline=t("./ColorTimeline"),i.Curves=t("./Curves"),i.DrawOrderTimeline=t("./DrawOrderTimeline"),i.EventData=t("./EventData"),i.Event=t("./Event"),i.EventTimeline=t("./EventTimeline"),i.FfdTimeline=t("./FfdTimeline"),i.FlipXTimeline=t("./FlipXTimeline"),i.FlipYTimeline=t("./FlipYTimeline"),i.IkConstraintData=t("./IkConstraintData"),i.IkConstraint=t("./IkConstraint"),i.IkConstraintTimeline=t("./IkConstraintTimeline"),i.MeshAttachment=t("./MeshAttachment"),i.RegionAttachment=t("./RegionAttachment"),i.RotateTimeline=t("./RotateTimeline"),i.ScaleTimeline=t("./ScaleTimeline"),i.SkeletonBounds=t("./SkeletonBounds"),i.SkeletonData=t("./SkeletonData"),i.Skeleton=t("./Skeleton"),i.SkeletonJsonParser=t("./SkeletonJsonParser"),i.Skin=t("./Skin.js"),i.SkinnedMeshAttachment=t("./SkinnedMeshAttachment"),i.SlotData=t("./SlotData"),i.Slot=t("./Slot"),i.TrackEntry=t("./TrackEntry"),i.TranslateTimeline=t("./TranslateTimeline"),e.exports=i},{"../SpineUtil":42,"./Animation":2,"./AnimationState":3,"./AnimationStateData":4,"./Atlas":5,"./AtlasAttachmentParser":6,"./AtlasPage":7,"./AtlasReader":8,"./AtlasRegion":9,"./AttachmentTimeline":10,"./AttachmentType":11,"./Bone":12,"./BoneData":13,"./BoundingBoxAttachment":14,"./ColorTimeline":15,"./Curves":16,"./DrawOrderTimeline":17,"./Event":18,"./EventData":19,"./EventTimeline":20,"./FfdTimeline":21,"./FlipXTimeline":22,"./FlipYTimeline":23,"./IkConstraint":24,"./IkConstraintData":25,"./IkConstraintTimeline":26,"./MeshAttachment":27,"./RegionAttachment":28,"./RotateTimeline":29,"./ScaleTimeline":30,"./Skeleton":31,"./SkeletonBounds":32,"./SkeletonData":33,"./SkeletonJsonParser":34,"./Skin.js":35,"./SkinnedMeshAttachment":36,"./Slot":37,"./SlotData":38,"./TrackEntry":39,"./TranslateTimeline":40}],42:[function(t,e,n){e.exports={radDeg:180/Math.PI,degRad:Math.PI/180,temp:[],Float32Array:"undefined"==typeof Float32Array?Array:Float32Array,Uint16Array:"undefined"==typeof Uint16Array?Array:Uint16Array}},{}],43:[function(t,e,n){function i(t){if(PIXI.Container.call(this),!t)throw new Error("The spineData param is required.");if("string"==typeof t)throw new Error('spineData param cant be string. Please use PIXI.spine.Spine.fromAtlas("YOUR_RESOURCE_NAME") from now on.');this.spineData=t,this.skeleton=new a.Skeleton(t),this.skeleton.updateWorldTransform(),this.stateData=new a.AnimationStateData(t),this.state=new a.AnimationState(this.stateData),this.slotContainers=[];for(var e=0,n=this.skeleton.slots.length;n>e;e++){var i=this.skeleton.slots[e],r=i.attachment,o=new PIXI.Container;if(this.slotContainers.push(o),this.addChild(o),r instanceof a.RegionAttachment){var s=r.rendererObject.name,l=this.createSprite(i,r);i.currentSprite=l,i.currentSpriteName=s,o.addChild(l)}else{if(!(r instanceof a.MeshAttachment))continue;var h=this.createMesh(i,r);i.currentMesh=h,i.currentMeshName=r.name,o.addChild(h)}}this.autoUpdate=!0}var a=t("../SpineRuntime"),r=t("../loaders/atlasParser");a.Bone.yDown=!0,i.fromAtlas=function(t){var e=r.AnimCache[t];if(!e)throw new Error('Spine data "'+t+'" does not exist in the animation cache');return new i(e)},i.prototype=Object.create(PIXI.Container.prototype),i.prototype.constructor=i,e.exports=i,i.globalAutoUpdate=!0,Object.defineProperties(i.prototype,{autoUpdate:{get:function(){return this.updateTransform===i.prototype.autoUpdateTransform},set:function(t){this.updateTransform=t?i.prototype.autoUpdateTransform:PIXI.Container.prototype.updateTransform}}}),i.prototype.update=function(t){this.state.update(t),this.state.apply(this.skeleton),this.skeleton.updateWorldTransform();for(var e=this.skeleton.drawOrder,n=this.skeleton.slots,i=0,r=e.length;r>i;i++)this.children[i]=this.slotContainers[e[i]];for(i=0,r=n.length;r>i;i++){var o=n[i],s=o.attachment,l=this.slotContainers[i];if(s){var h=s.type;/*AttachBugfixStart*/if (o && typeof o.oldAttType === 'undefined') {o.oldAttType = h;}var attachmentChanged = h !== o.oldAttType;if (attachmentChanged) {o.oldAttType = h;if(h===a.AttachmentType.region){if(o.meshes)for(x in o.meshes)o.meshes[x].visible=!1;o.sprites&&o.sprites[s.rendererObject.name]&&(o.sprites[s.rendererObject.name].visible=!0)}else{if(l.position.x=0,l.position.y=0,l.scale.x=1,l.scale.y=1,l.rotation=0,o.sprites)for(x in o.sprites)o.sprites[x].visible=!1;o.meshes&&o.meshes[s.name]&&(o.meshes[s.name].visible=!0)}}/*AttachBugfixEnd*/if(h===a.AttachmentType.region){if(s.rendererObject&&(!o.currentSpriteName||o.currentSpriteName!==s.rendererObject.name)){var m=s.rendererObject.name;if(void 0!==o.currentSprite&&(o.currentSprite.visible=!1),o.sprites=o.sprites||{},void 0!==o.sprites[m])o.sprites[m].visible=!0;else{var u=this.createSprite(o,s);l.addChild(u)}o.currentSprite=o.sprites[m],o.currentSpriteName=m}var f=o.bone;l.position.x=f.worldX+s.x*f.m00+s.y*f.m01,l.position.y=f.worldY+s.x*f.m10+s.y*f.m11,l.scale.x=f.worldScaleX,l.scale.y=f.worldScaleY,l.rotation=-(o.bone.worldRotation*a.degRad),f.worldFlipX&&(l.scale.x=-l.scale.x,l.rotation=-l.rotation),f.worldFlipY==a.Bone.yDown&&(l.scale.y=-l.scale.y,l.rotation=-l.rotation),o.currentSprite.blendMode=o.blendMode,o.currentSprite.tint=PIXI.utils.rgb2hex([o.r,o.g,o.b])}else{if(h!==a.AttachmentType.skinnedmesh&&h!==a.AttachmentType.mesh){l.visible=!1;continue}if(!o.currentMeshName||o.currentMeshName!==s.name){var c=s.name;if(void 0!==o.currentMesh&&(o.currentMesh.visible=!1),o.meshes=o.meshes||{},void 0!==o.meshes[c])o.meshes[c].visible=!0;else{var p=this.createMesh(o,s);l.addChild(p)}o.currentMesh=o.meshes[c],o.currentMeshName=c}s.computeWorldVertices(o.bone.skeleton.x,o.bone.skeleton.y,o,o.currentMesh.vertices)}l.visible=!0,l.alpha=o.a}else l.visible=!1}},i.prototype.autoUpdateTransform=function(){if(i.globalAutoUpdate){this.lastTime=this.lastTime||Date.now();var t=.001*(Date.now()-this.lastTime);this.lastTime=Date.now(),this.update(t)}else this.lastTime=0;PIXI.Container.prototype.updateTransform.call(this)},i.prototype.createSprite=function(t,e){var n=e.rendererObject,i=n.page.rendererObject,r=new PIXI.Rectangle(n.x,n.y,n.rotate?n.height:n.width,n.rotate?n.width:n.height),o=new PIXI.Texture(i,r),s=new PIXI.Sprite(o),l=n.rotate?.5*Math.PI:0;return s.scale.x=e.width/n.originalWidth*e.scaleX,s.scale.y=e.height/n.originalHeight*e.scaleY,s.rotation=l-e.rotation*a.degRad,s.anchor.x=(.5*n.originalWidth-n.offsetX)/n.width,s.anchor.y=1-(.5*n.originalHeight-n.offsetY)/n.height,s.alpha=e.a,t.sprites=t.sprites||{},t.sprites[n.name]=s,s},i.prototype.createMesh=function(t,e){var n=e.rendererObject,i=n.page.rendererObject,a=new PIXI.Texture(i),r=new PIXI.mesh.Mesh(a,new Float32Array(e.uvs.length),new Float32Array(e.uvs),new Uint16Array(e.triangles),PIXI.mesh.Mesh.DRAW_MODES.TRIANGLES);return r.canvasPadding=1.5,r.alpha=e.a,t.meshes=t.meshes||{},t.meshes[e.name]=r,r}},{"../SpineRuntime":41,"../loaders/atlasParser":45}],44:[function(t,e,n){var i=t("./atlasParser");PIXI.loaders.Loader.addPixiMiddleware(i),PIXI.loader.use(i())},{"./atlasParser":45}],45:[function(t,e,n){var i=PIXI.loaders.Resource,a=t("../SpineRuntime"),r=t("./imageLoaderAdapter"),o=e.exports=function(){return function(t,e){if(!t.data||!t.isJson||!t.data.bones)return e();var n=t.url.substr(0,t.url.lastIndexOf("."))+".atlas",s={crossOrigin:t.crossOrigin,xhrType:i.XHR_RESPONSE_TYPE.TEXT,metadata:t.metadata.spineMetadata},l={crossOrigin:t.crossOrigin,metadata:t.metadata.imageMetadata},h=t.url.substr(0,t.url.lastIndexOf("/")+1),m=r(this,t.name+"_atlas_page_",h,l);this.add(t.name+"_atlas",n,s,function(n){new a.Atlas(this.xhr.responseText,m,function(n){var i=new a.SkeletonJsonParser(new a.AtlasAttachmentParser(n)),r=i.readSkeletonData(t.data);t.spineData=r,t.spineAtlas=n,o.enableCaching&&(o.AnimCache[t.name]=t.spineData),e()})})}};o.AnimCache={},o.enableCaching=!0},{"../SpineRuntime":41,"./imageLoaderAdapter":46}],46:[function(t,e,n){t("../SpineRuntime");e.exports=function(t,e,n,i){return n&&n.lastIndexOf("/")!==n.length-1&&(n+="/"),function(a,r){var o=e+a,s=n+a;t.add(o,s,i,function(t){r(t.texture.baseTexture)})}}},{"../SpineRuntime":41}],47:[function(t,e,n){e.exports={atlasParser:t("./atlasParser"),Loader:t("./Loader"),syncImageLoaderAdapter:t("./syncImageLoaderAdapter"),imageLoaderAdapter:t("./imageLoaderAdapter")}},{"./Loader":44,"./atlasParser":45,"./imageLoaderAdapter":46,"./syncImageLoaderAdapter":48}],48:[function(t,e,n){t("../SpineRuntime");e.exports=function(t,e){return t&&t.lastIndexOf("/")!==t.length-1&&(t+="/"),function(t,n){n(PIXI.BaseTexture.fromImage(t,e))}}},{"../SpineRuntime":41}]},{},[1]);
console.log("loaded pixi.js");
+
 
 +
console.log("Loaded PIXI.JS (with Spine) Gadget.");

Latest revision as of 16:12, 11 October 2019

/**
 * Dear user who copies this code: You need a valid Spine License to use this framework.
 */
 
/**
 * Spine Runtimes License Agreement
Last updated May 1, 2019. Replaces all prior versions.

Copyright (c) 2013-2019, Esoteric Software LLC

Integration of the Spine Runtimes into software or otherwise creating
derivative works of the Spine Runtimes is permitted under the terms and
conditions of Section 2 of the Spine Editor License Agreement:
http://esotericsoftware.com/spine-editor-license

Otherwise, it is permitted to integrate the Spine Runtimes into software
or otherwise create derivative works of the Spine Runtimes (collectively,
"Products"), provided that each user of the Products must obtain their own
Spine Editor license and redistribution of the Products in any form must
include this license and copyright notice.

THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS
INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**/
 
/**
 * pixi.js - v4.6.2
 * Compiled Thu, 30 Nov 2017 15:19:59 UTC
 *
 * pixi.js is licensed under the MIT License.
 * http://www.opensource.org/licenses/mit-license
 */
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).PIXI=t()}}(function(){return function t(e,r,n){function i(s,a){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var h=new Error("Cannot find module '"+s+"'");throw h.code="MODULE_NOT_FOUND",h}var l=r[s]={exports:{}};e[s][0].call(l.exports,function(t){var r=e[s][1][t];return i(r||t)},l,l.exports,t,e,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e,r){"use strict";"use restrict";r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(t){return(t>0)-(t<0)},r.abs=function(t){var e=t>>31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t<e)},r.max=function(t,e){return t^(t^e)&-(t<e)},r.isPow2=function(t){return!(t&t-1||!t)},r.log2=function(t){var e,r;return e=(t>65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},r.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},r.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24};function n(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}r.countTrailingZeros=n,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},r.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<<i&255}}(i),r.reverse=function(t){return i[255&t]<<24|i[t>>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},r.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},r.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},r.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},r.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>n(t)+1}},{}],2:[function(t,e,r){"use strict";e.exports=n,e.exports.default=n;function n(t,e,r){r=r||2;var n=e&&e.length,a=n?e[0]*r:t.length,u=i(t,0,a,r,!0),h=[];if(!u)return h;var l,f,v,g,y,m,_;if(n&&(u=function(t,e,r,n){var s,a,u,h,l,f=[];for(s=0,a=e.length;s<a;s++)u=e[s]*n,h=s<a-1?e[s+1]*n:t.length,(l=i(t,u,h,n,!1))===l.next&&(l.steiner=!0),f.push(p(l));for(f.sort(c),s=0;s<f.length;s++)d(f[s],r),r=o(r,r.next);return r}(t,e,u,r)),t.length>80*r){l=v=t[0],f=g=t[1];for(var b=r;b<a;b+=r)y=t[b],m=t[b+1],y<l&&(l=y),m<f&&(f=m),y>v&&(v=y),m>g&&(g=m);_=0!==(_=Math.max(v-l,g-f))?1/_:0}return s(u,h,r,l,f,_),h}function i(t,e,r,n,i){var o,s;if(i===E(t,e,r,n)>0)for(o=e;o<r;o+=n)s=x(o,t[o],t[o+1],s);else for(o=r-n;o>=e;o-=n)s=x(o,t[o],t[o+1],s);return s&&y(s,s.next)&&(T(s),s=s.next),s}function o(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!y(n,n.next)&&0!==g(n.prev,n,n.next))n=n.next;else{if(T(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function s(t,e,r,n,i,c,d){if(t){!d&&c&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=f(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,o,s,a,u,h=1;do{for(r=t,t=null,o=null,s=0;r;){for(s++,n=r,a=0,e=0;e<h&&(a++,n=n.nextZ);e++);for(u=h;a>0||u>0&&n;)0!==a&&(0===u||!n||r.z<=n.z)?(i=r,r=r.nextZ,a--):(i=n,n=n.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;r=n}o.nextZ=null,h*=2}while(s>1)}(i)}(t,n,i,c);for(var p,v,g=t;t.prev!==t.next;)if(p=t.prev,v=t.next,c?u(t,n,i,c):a(t))e.push(p.i/r),e.push(t.i/r),e.push(v.i/r),T(t),t=v.next,g=v.next;else if((t=v)===g){d?1===d?s(t=h(t,e,r),e,r,n,i,c,2):2===d&&l(t,e,r,n,i,c):s(o(t),e,r,n,i,c,1);break}}}function a(t){var e=t.prev,r=t,n=t.next;if(g(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(v(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&g(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function u(t,e,r,n){var i=t.prev,o=t,s=t.next;if(g(i,o,s)>=0)return!1;for(var a=i.x<o.x?i.x<s.x?i.x:s.x:o.x<s.x?o.x:s.x,u=i.y<o.y?i.y<s.y?i.y:s.y:o.y<s.y?o.y:s.y,h=i.x>o.x?i.x>s.x?i.x:s.x:o.x>s.x?o.x:s.x,l=i.y>o.y?i.y>s.y?i.y:s.y:o.y>s.y?o.y:s.y,c=f(a,u,e,r,n),d=f(h,l,e,r,n),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&v(i.x,i.y,o.x,o.y,s.x,s.y,p.x,p.y)&&g(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&v(i.x,i.y,o.x,o.y,s.x,s.y,p.x,p.y)&&g(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function h(t,e,r){var n=t;do{var i=n.prev,o=n.next.next;!y(i,o)&&m(i,n,n.next,o)&&_(i,o)&&_(o,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(o.i/r),T(n),T(n.next),n=t=o),n=n.next}while(n!==t);return n}function l(t,e,r,n,i,a){var u=t;do{for(var h=u.next.next;h!==u.prev;){if(u.i!==h.i&&(c=u,d=h,c.next.i!==d.i&&c.prev.i!==d.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&m(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(c,d)&&_(c,d)&&_(d,c)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(c,d))){var l=b(u,h);return u=o(u,u.next),l=o(l,l.next),s(u,e,r,n,i,a),void s(l,e,r,n,i,a)}h=h.next}u=u.next}while(u!==t);var c,d}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var r,n=e,i=t.x,o=t.y,s=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var a=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=i&&a>s){if(s=a,a===i){if(o===n.y)return n;if(o===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!r)return null;if(i===s)return r.prev;var u,h=r,l=r.x,c=r.y,d=1/0;n=r.next;for(;n!==h;)i>=n.x&&n.x>=l&&i!==n.x&&v(o<c?i:s,o,l,c,o<c?s:i,o,n.x,n.y)&&((u=Math.abs(o-n.y)/(i-n.x))<d||u===d&&n.x>r.x)&&_(n,t)&&(r=n,d=u),n=n.next;return r}(t,e)){var r=b(e,t);o(r,r.next)}}function f(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,r=t;do{e.x<r.x&&(r=e),e=e.next}while(e!==t);return r}function v(t,e,r,n,i,o,s,a){return(i-s)*(e-a)-(t-s)*(o-a)>=0&&(t-s)*(n-a)-(r-s)*(e-a)>=0&&(r-s)*(o-a)-(i-s)*(n-a)>=0}function g(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function m(t,e,r,n){return!!(y(t,e)&&y(r,n)||y(t,n)&&y(r,e))||g(t,e,r)>0!=g(t,e,n)>0&&g(r,n,t)>0!=g(r,n,e)>0}function _(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function b(t,e){var r=new w(t.i,t.x,t.y),n=new w(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function x(t,e,r,n){var i=new w(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function T(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function w(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}n.deviation=function(t,e,r,n){var i=e&&e.length,o=i?e[0]*r:t.length,s=Math.abs(E(t,0,o,r));if(i)for(var a=0,u=e.length;a<u;a++){var h=e[a]*r,l=a<u-1?e[a+1]*r:t.length;s-=Math.abs(E(t,h,l,r))}var c=0;for(a=0;a<n.length;a+=3){var d=n[a]*r,f=n[a+1]*r,p=n[a+2]*r;c+=Math.abs((t[d]-t[p])*(t[f+1]-t[d+1])-(t[d]-t[f])*(t[p+1]-t[d+1]))}return 0===s&&0===c?0:Math.abs((c-s)/s)};function E(t,e,r,n){for(var i=0,o=e,s=r-n;o<r;o+=n)i+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return i}n.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var s=0;s<e;s++)r.vertices.push(t[i][o][s]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],3:[function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,i="~";function o(){}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1));function s(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function a(){this._events=new o,this._eventsCount=0}a.prototype.eventNames=function(){var t,e,r=[];if(0===this._eventsCount)return r;for(e in t=this._events)n.call(t,e)&&r.push(i?e.slice(1):e);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},a.prototype.listeners=function(t,e){var r=i?i+t:t,n=this._events[r];if(e)return!!n;if(!n)return[];if(n.fn)return[n.fn];for(var o=0,s=n.length,a=new Array(s);o<s;o++)a[o]=n[o].fn;return a},a.prototype.emit=function(t,e,r,n,o,s){var a=i?i+t:t;if(!this._events[a])return!1;var u,h,l=this._events[a],c=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,r),!0;case 4:return l.fn.call(l.context,e,r,n),!0;case 5:return l.fn.call(l.context,e,r,n,o),!0;case 6:return l.fn.call(l.context,e,r,n,o,s),!0}for(h=1,u=new Array(c-1);h<c;h++)u[h-1]=arguments[h];l.fn.apply(l.context,u)}else{var d,f=l.length;for(h=0;h<f;h++)switch(l[h].once&&this.removeListener(t,l[h].fn,void 0,!0),c){case 1:l[h].fn.call(l[h].context);break;case 2:l[h].fn.call(l[h].context,e);break;case 3:l[h].fn.call(l[h].context,e,r);break;case 4:l[h].fn.call(l[h].context,e,r,n);break;default:if(!u)for(d=1,u=new Array(c-1);d<c;d++)u[d-1]=arguments[d];l[h].fn.apply(l[h].context,u)}}return!0},a.prototype.on=function(t,e,r){var n=new s(e,r||this),o=i?i+t:t;return this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],n]:this._events[o].push(n):(this._events[o]=n,this._eventsCount++),this},a.prototype.once=function(t,e,r){var n=new s(e,r||this,!0),o=i?i+t:t;return this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],n]:this._events[o].push(n):(this._events[o]=n,this._eventsCount++),this},a.prototype.removeListener=function(t,e,r,n){var s=i?i+t:t;if(!this._events[s])return this;if(!e)return 0==--this._eventsCount?this._events=new o:delete this._events[s],this;var a=this._events[s];if(a.fn)a.fn!==e||n&&!a.once||r&&a.context!==r||(0==--this._eventsCount?this._events=new o:delete this._events[s]);else{for(var u=0,h=[],l=a.length;u<l;u++)(a[u].fn!==e||n&&!a[u].once||r&&a[u].context!==r)&&h.push(a[u]);h.length?this._events[s]=1===h.length?h[0]:h:0==--this._eventsCount?this._events=new o:delete this._events[s]}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&(0==--this._eventsCount?this._events=new o:delete this._events[e])):(this._events=new o,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prototype.setMaxListeners=function(){return this},a.prefixed=i,a.EventEmitter=a,void 0!==e&&(e.exports=a)},{}],4:[function(t,e,r){
/**
 * isMobile.js v0.4.1
 *
 * A simple library to detect Apple phones and tablets,
 * Android phones and tablets, other mobile devices (like blackberry, mini-opera and windows phone),
 * and any kind of seven inch device, via user agent sniffing.
 *
 * @author: Kai Mallea ([email protected])
 *
 * @license: http://creativecommons.org/publicdomain/zero/1.0/
 */
!function(t){var r=/iPhone/i,n=/iPod/i,i=/iPad/i,o=/(?=.*\bAndroid\b)(?=.*\bMobile\b)/i,s=/Android/i,a=/(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i,u=/(?=.*\bAndroid\b)(?=.*\b(?:KFOT|KFTT|KFJWI|KFJWA|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|KFARWI|KFASWI|KFSAWI|KFSAWA)\b)/i,h=/Windows Phone/i,l=/(?=.*\bWindows\b)(?=.*\bARM\b)/i,c=/BlackBerry/i,d=/BB10/i,f=/Opera Mini/i,p=/(CriOS|Chrome)(?=.*\bMobile\b)/i,v=/(?=.*\bFirefox\b)(?=.*\bMobile\b)/i,g=new RegExp("(?:Nexus 7|BNTV250|Kindle Fire|Silk|GT-P1000)","i"),y=function(t,e){return t.test(e)},m=function(t){var e=t||navigator.userAgent,m=e.split("[FBAN");if(void 0!==m[1]&&(e=m[0]),void 0!==(m=e.split("Twitter"))[1]&&(e=m[0]),this.apple={phone:y(r,e),ipod:y(n,e),tablet:!y(r,e)&&y(i,e),device:y(r,e)||y(n,e)||y(i,e)},this.amazon={phone:y(a,e),tablet:!y(a,e)&&y(u,e),device:y(a,e)||y(u,e)},this.android={phone:y(a,e)||y(o,e),tablet:!y(a,e)&&!y(o,e)&&(y(u,e)||y(s,e)),device:y(a,e)||y(u,e)||y(o,e)||y(s,e)},this.windows={phone:y(h,e),tablet:y(l,e),device:y(h,e)||y(l,e)},this.other={blackberry:y(c,e),blackberry10:y(d,e),opera:y(f,e),firefox:y(v,e),chrome:y(p,e),device:y(c,e)||y(d,e)||y(f,e)||y(v,e)||y(p,e)},this.seven_inch=y(g,e),this.any=this.apple.device||this.android.device||this.windows.device||this.other.device||this.seven_inch,this.phone=this.apple.phone||this.android.phone||this.windows.phone,this.tablet=this.apple.tablet||this.android.tablet||this.windows.tablet,"undefined"==typeof window)return this},_=function(){var t=new m;return t.Class=m,t};void 0!==e&&e.exports&&"undefined"==typeof window?e.exports=m:void 0!==e&&e.exports&&"undefined"!=typeof window?e.exports=_():t.isMobile=_()}(this)},{}],5:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(e,r,n){void 0===r&&(r=!1),i(this,t),this._fn=e,this._once=r,this._thisArg=n,this._next=this._prev=this._owner=null}return n(t,[{key:"detach",value:function(){return null!==this._owner&&(this._owner.detach(this),!0)}}]),t}();function s(t,e){return t._head?(t._tail._next=e,e._prev=t._tail,t._tail=e):(t._head=e,t._tail=e),e._owner=t,e}var a=function(){function t(){i(this,t),this._head=this._tail=void 0}return n(t,[{key:"handlers",value:function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],e=this._head;if(t)return!!e;for(var r=[];e;)r.push(e),e=e._next;return r}},{key:"has",value:function(t){if(!(t instanceof o))throw new Error("MiniSignal#has(): First arg must be a MiniSignalBinding object.");return t._owner===this}},{key:"dispatch",value:function(){var t=this._head;if(!t)return!1;for(;t;)t._once&&this.detach(t),t._fn.apply(t._thisArg,arguments),t=t._next;return!0}},{key:"add",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if("function"!=typeof t)throw new Error("MiniSignal#add(): First arg must be a Function.");return s(this,new o(t,!1,e))}},{key:"once",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if("function"!=typeof t)throw new Error("MiniSignal#once(): First arg must be a Function.");return s(this,new o(t,!0,e))}},{key:"detach",value:function(t){if(!(t instanceof o))throw new Error("MiniSignal#detach(): First arg must be a MiniSignalBinding object.");return t._owner!==this?this:(t._prev&&(t._prev._next=t._next),t._next&&(t._next._prev=t._prev),t===this._head?(this._head=t._next,null===t._next&&(this._tail=null)):t===this._tail&&(this._tail=t._prev,this._tail._next=null),t._owner=null,this)}},{key:"detachAll",value:function(){var t=this._head;if(!t)return this;for(this._head=this._tail=null;t;)t._owner=null,t=t._next;return this}}]),t}();a.MiniSignalBinding=o,r.default=a,e.exports=r.default},{}],6:[function(t,e,r){
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
"use strict";var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,s,a=function(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u<arguments.length;u++){r=Object(arguments[u]);for(var h in r)i.call(r,h)&&(a[h]=r[h]);if(n){s=n(r);for(var l=0;l<s.length;l++)o.call(r,s[l])&&(a[s[l]]=r[s[l]])}}return a}},{}],7:[function(t,e,r){"use strict";e.exports=function(t,e){e=e||{};for(var r={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)[email protected])?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)[email protected])?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},n=r.parser[e.strictMode?"strict":"loose"].exec(t),i={},o=14;o--;)i[r.key[o]]=n[o]||"";return i[r.q.name]={},i[r.key[12]].replace(r.q.parser,function(t,e,n){e&&(i[r.q.name][e]=n)}),i}},{}],8:[function(t,e,r){(function(t){function e(t,e){for(var r=0,n=t.length-1;n>=0;n--){var i=t[n];"."===i?t.splice(n,1):".."===i?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}var n=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(t){return n.exec(t).slice(1)};r.resolve=function(){for(var r="",n=!1,i=arguments.length-1;i>=-1&&!n;i--){var s=i>=0?arguments[i]:t.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(r=s+"/"+r,n="/"===s.charAt(0))}return r=e(o(r.split("/"),function(t){return!!t}),!n).join("/"),(n?"/":"")+r||"."},r.normalize=function(t){var n=r.isAbsolute(t),i="/"===s(t,-1);return(t=e(o(t.split("/"),function(t){return!!t}),!n).join("/"))||n||(t="."),t&&i&&(t+="/"),(n?"/":"")+t},r.isAbsolute=function(t){return"/"===t.charAt(0)},r.join=function(){var t=Array.prototype.slice.call(arguments,0);return r.normalize(o(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},r.relative=function(t,e){t=r.resolve(t).substr(1),e=r.resolve(e).substr(1);function n(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}for(var i=n(t.split("/")),o=n(e.split("/")),s=Math.min(i.length,o.length),a=s,u=0;u<s;u++)if(i[u]!==o[u]){a=u;break}var h=[];for(u=a;u<i.length;u++)h.push("..");return(h=h.concat(o.slice(a))).join("/")},r.sep="/",r.delimiter=":",r.dirname=function(t){var e=i(t),r=e[0],n=e[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},r.basename=function(t,e){var r=i(t)[2];return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},r.extname=function(t){return i(t)[3]};function o(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n<t.length;n++)e(t[n],n,t)&&r.push(t[n]);return r}var s="b"==="ab".substr(-1)?function(t,e,r){return t.substr(e,r)}:function(t,e,r){return e<0&&(e=t.length+e),t.substr(e,r)}}).call(this,t("_process"))},{_process:26}],9:[function(t,e,r){var n=new ArrayBuffer(0),i=function(t,e,r,i){this.gl=t,this.buffer=t.createBuffer(),this.type=e||t.ARRAY_BUFFER,this.drawType=i||t.STATIC_DRAW,this.data=n,r&&this.upload(r),this._updateID=0};i.prototype.upload=function(t,e,r){r||this.bind();var n=this.gl;t=t||this.data,e=e||0,this.data.byteLength>=t.byteLength?n.bufferSubData(this.type,e,t):n.bufferData(this.type,t,this.drawType),this.data=t},i.prototype.bind=function(){this.gl.bindBuffer(this.type,this.buffer)},i.createVertexBuffer=function(t,e,r){return new i(t,t.ARRAY_BUFFER,e,r)},i.createIndexBuffer=function(t,e,r){return new i(t,t.ELEMENT_ARRAY_BUFFER,e,r)},i.create=function(t,e,r,n){return new i(t,e,r,n)},i.prototype.destroy=function(){this.gl.deleteBuffer(this.buffer)},e.exports=i},{}],10:[function(t,e,r){var n=t("./GLTexture"),i=function(t,e,r){this.gl=t,this.framebuffer=t.createFramebuffer(),this.stencil=null,this.texture=null,this.width=e||100,this.height=r||100};i.prototype.enableTexture=function(t){var e=this.gl;this.texture=t||new n(e),this.texture.bind(),this.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture.texture,0)},i.prototype.enableStencil=function(){if(!this.stencil){var t=this.gl;this.stencil=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,this.stencil),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,this.stencil),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,this.width,this.height)}},i.prototype.clear=function(t,e,r,n){this.bind();var i=this.gl;i.clearColor(t,e,r,n),i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT)},i.prototype.bind=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer)},i.prototype.unbind=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,null)},i.prototype.resize=function(t,e){var r=this.gl;this.width=t,this.height=e,this.texture&&this.texture.uploadData(null,t,e),this.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,this.stencil),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e))},i.prototype.destroy=function(){var t=this.gl;this.texture&&this.texture.destroy(),t.deleteFramebuffer(this.framebuffer),this.gl=null,this.stencil=null,this.texture=null},i.createRGBA=function(t,e,r,o){var s=n.fromData(t,null,e,r);s.enableNearestScaling(),s.enableWrapClamp();var a=new i(t,e,r);return a.enableTexture(s),a.unbind(),a},i.createFloat32=function(t,e,r,o){var s=new n.fromData(t,o,e,r);s.enableNearestScaling(),s.enableWrapClamp();var a=new i(t,e,r);return a.enableTexture(s),a.unbind(),a},e.exports=i},{"./GLTexture":12}],11:[function(t,e,r){var n=t("./shader/compileProgram"),i=t("./shader/extractAttributes"),o=t("./shader/extractUniforms"),s=t("./shader/setPrecision"),a=t("./shader/generateUniformAccessObject"),u=function(t,e,r,u,h){this.gl=t,u&&(e=s(e,u),r=s(r,u)),this.program=n(t,e,r,h),this.attributes=i(t,this.program),this.uniformData=o(t,this.program),this.uniforms=a(t,this.uniformData)};u.prototype.bind=function(){return this.gl.useProgram(this.program),this},u.prototype.destroy=function(){this.attributes=null,this.uniformData=null,this.uniforms=null;this.gl.deleteProgram(this.program)},e.exports=u},{"./shader/compileProgram":17,"./shader/extractAttributes":19,"./shader/extractUniforms":20,"./shader/generateUniformAccessObject":21,"./shader/setPrecision":25}],12:[function(t,e,r){var n=function(t,e,r,n,i){this.gl=t,this.texture=t.createTexture(),this.mipmap=!1,this.premultiplyAlpha=!1,this.width=e||-1,this.height=r||-1,this.format=n||t.RGBA,this.type=i||t.UNSIGNED_BYTE};n.prototype.upload=function(t){this.bind();var e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha);var r=t.videoWidth||t.width,n=t.videoHeight||t.height;n!==this.height||r!==this.width?e.texImage2D(e.TEXTURE_2D,0,this.format,this.format,this.type,t):e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.format,this.type,t),this.width=r,this.height=n};var i=!1;n.prototype.uploadData=function(t,e,r){this.bind();var n=this.gl;if(t instanceof Float32Array){if(!i){if(!n.getExtension("OES_texture_float"))throw new Error("floating point textures not available");i=!0}this.type=n.FLOAT}else this.type=this.type||n.UNSIGNED_BYTE;n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),e!==this.width||r!==this.height?n.texImage2D(n.TEXTURE_2D,0,this.format,e,r,0,this.format,this.type,t||null):n.texSubImage2D(n.TEXTURE_2D,0,0,0,e,r,this.format,this.type,t||null),this.width=e,this.height=r},n.prototype.bind=function(t){var e=this.gl;void 0!==t&&e.activeTexture(e.TEXTURE0+t),e.bindTexture(e.TEXTURE_2D,this.texture)},n.prototype.unbind=function(){var t=this.gl;t.bindTexture(t.TEXTURE_2D,null)},n.prototype.minFilter=function(t){var e=this.gl;this.bind(),this.mipmap?e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR_MIPMAP_LINEAR:e.NEAREST_MIPMAP_NEAREST):e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR:e.NEAREST)},n.prototype.magFilter=function(t){var e=this.gl;this.bind(),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t?e.LINEAR:e.NEAREST)},n.prototype.enableMipmap=function(){var t=this.gl;this.bind(),this.mipmap=!0,t.generateMipmap(t.TEXTURE_2D)},n.prototype.enableLinearScaling=function(){this.minFilter(!0),this.magFilter(!0)},n.prototype.enableNearestScaling=function(){this.minFilter(!1),this.magFilter(!1)},n.prototype.enableWrapClamp=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE)},n.prototype.enableWrapRepeat=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT)},n.prototype.enableWrapMirrorRepeat=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.MIRRORED_REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.MIRRORED_REPEAT)},n.prototype.destroy=function(){this.gl.deleteTexture(this.texture)},n.fromSource=function(t,e,r){var i=new n(t);return i.premultiplyAlpha=r||!1,i.upload(e),i},n.fromData=function(t,e,r,i){var o=new n(t);return o.uploadData(e,r,i),o},e.exports=n},{}],13:[function(t,e,r){var n=t("./setVertexAttribArrays");function i(t,e){if(this.nativeVaoExtension=null,i.FORCE_NATIVE||(this.nativeVaoExtension=t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object")),this.nativeState=e,this.nativeVaoExtension){this.nativeVao=this.nativeVaoExtension.createVertexArrayOES();var r=t.getParameter(t.MAX_VERTEX_ATTRIBS);this.nativeState={tempAttribState:new Array(r),attribState:new Array(r)}}this.gl=t,this.attributes=[],this.indexBuffer=null,this.dirty=!1}i.prototype.constructor=i,e.exports=i,i.FORCE_NATIVE=!1,i.prototype.bind=function(){if(this.nativeVao){if(this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao),this.dirty)return this.dirty=!1,this.activate(),this;this.indexBuffer&&this.indexBuffer.bind()}else this.activate();return this},i.prototype.unbind=function(){return this.nativeVao&&this.nativeVaoExtension.bindVertexArrayOES(null),this},i.prototype.activate=function(){for(var t=this.gl,e=null,r=0;r<this.attributes.length;r++){var i=this.attributes[r];e!==i.buffer&&(i.buffer.bind(),e=i.buffer),t.vertexAttribPointer(i.attribute.location,i.attribute.size,i.type||t.FLOAT,i.normalized||!1,i.stride||0,i.start||0)}return n(t,this.attributes,this.nativeState),this.indexBuffer&&this.indexBuffer.bind(),this},i.prototype.addAttribute=function(t,e,r,n,i,o){return this.attributes.push({buffer:t,attribute:e,location:e.location,type:r||this.gl.FLOAT,normalized:n||!1,stride:i||0,start:o||0}),this.dirty=!0,this},i.prototype.addIndex=function(t){return this.indexBuffer=t,this.dirty=!0,this},i.prototype.clear=function(){return this.nativeVao&&this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao),this.attributes.length=0,this.indexBuffer=null,this},i.prototype.draw=function(t,e,r){var n=this.gl;return this.indexBuffer?n.drawElements(t,e||this.indexBuffer.data.length,n.UNSIGNED_SHORT,2*(r||0)):n.drawArrays(t,r,e||this.getSize()),this},i.prototype.destroy=function(){this.gl=null,this.indexBuffer=null,this.attributes=null,this.nativeState=null,this.nativeVao&&this.nativeVaoExtension.deleteVertexArrayOES(this.nativeVao),this.nativeVaoExtension=null,this.nativeVao=null},i.prototype.getSize=function(){var t=this.attributes[0];return t.buffer.data.length/(t.stride/4||t.attribute.size)}},{"./setVertexAttribArrays":16}],14:[function(t,e,r){e.exports=function(t,e){var r=t.getContext("webgl",e)||t.getContext("experimental-webgl",e);if(!r)throw new Error("This browser does not support webGL. Try using the canvas renderer");return r}},{}],15:[function(t,e,r){var n={createContext:t("./createContext"),setVertexAttribArrays:t("./setVertexAttribArrays"),GLBuffer:t("./GLBuffer"),GLFramebuffer:t("./GLFramebuffer"),GLShader:t("./GLShader"),GLTexture:t("./GLTexture"),VertexArrayObject:t("./VertexArrayObject"),shader:t("./shader")};void 0!==e&&e.exports&&(e.exports=n),"undefined"!=typeof window&&(window.PIXI=window.PIXI||{},window.PIXI.glCore=n)},{"./GLBuffer":9,"./GLFramebuffer":10,"./GLShader":11,"./GLTexture":12,"./VertexArrayObject":13,"./createContext":14,"./setVertexAttribArrays":16,"./shader":22}],16:[function(t,e,r){e.exports=function(t,e,r){var n;if(r){var i=r.tempAttribState,o=r.attribState;for(n=0;n<i.length;n++)i[n]=!1;for(n=0;n<e.length;n++)i[e[n].attribute.location]=!0;for(n=0;n<o.length;n++)o[n]!==i[n]&&(o[n]=i[n],r.attribState[n]?t.enableVertexAttribArray(n):t.disableVertexAttribArray(n))}else for(n=0;n<e.length;n++){var s=e[n];t.enableVertexAttribArray(s.attribute.location)}}},{}],17:[function(t,e,r){var n=function(t,e,r){var n=t.createShader(e);return t.shaderSource(n,r),t.compileShader(n),t.getShaderParameter(n,t.COMPILE_STATUS)?n:(console.log(t.getShaderInfoLog(n)),null)};e.exports=function(t,e,r,i){var o=n(t,t.VERTEX_SHADER,e),s=n(t,t.FRAGMENT_SHADER,r),a=t.createProgram();if(t.attachShader(a,o),t.attachShader(a,s),i)for(var u in i)t.bindAttribLocation(a,i[u],u);return t.linkProgram(a),t.getProgramParameter(a,t.LINK_STATUS)||(console.error("Pixi.js Error: Could not initialize shader."),console.error("gl.VALIDATE_STATUS",t.getProgramParameter(a,t.VALIDATE_STATUS)),console.error("gl.getError()",t.getError()),""!==t.getProgramInfoLog(a)&&console.warn("Pixi.js Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(a)),t.deleteProgram(a),a=null),t.deleteShader(o),t.deleteShader(s),a}},{}],18:[function(t,e,r){var n=function(t){for(var e=new Array(t),r=0;r<e.length;r++)e[r]=!1;return e};e.exports=function(t,e){switch(t){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"sampler2D":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"bool":return!1;case"bvec2":return n(2*e);case"bvec3":return n(3*e);case"bvec4":return n(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}}},{}],19:[function(t,e,r){var n=t("./mapType"),i=t("./mapSize"),o=function(t,e,r,n){gl.vertexAttribPointer(this.location,this.size,t||gl.FLOAT,e||!1,r||0,n||0)};e.exports=function(t,e){for(var r={},s=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),a=0;a<s;a++){var u=t.getActiveAttrib(e,a),h=n(t,u.type);r[u.name]={type:h,size:i(h),location:t.getAttribLocation(e,u.name),pointer:o}}return r}},{"./mapSize":23,"./mapType":24}],20:[function(t,e,r){var n=t("./mapType"),i=t("./defaultValue");e.exports=function(t,e){for(var r={},o=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),s=0;s<o;s++){var a=t.getActiveUniform(e,s),u=a.name.replace(/\[.*?\]/,""),h=n(t,a.type);r[u]={type:h,size:a.size,location:t.getUniformLocation(e,u),value:i(h,a.size)}}return r}},{"./defaultValue":18,"./mapType":24}],21:[function(t,e,r){var n=function(t){return function(){return this.data[t].value}},i={float:function(t,e,r){t.uniform1f(e,r)},vec2:function(t,e,r){t.uniform2f(e,r[0],r[1])},vec3:function(t,e,r){t.uniform3f(e,r[0],r[1],r[2])},vec4:function(t,e,r){t.uniform4f(e,r[0],r[1],r[2],r[3])},int:function(t,e,r){t.uniform1i(e,r)},ivec2:function(t,e,r){t.uniform2i(e,r[0],r[1])},ivec3:function(t,e,r){t.uniform3i(e,r[0],r[1],r[2])},ivec4:function(t,e,r){t.uniform4i(e,r[0],r[1],r[2],r[3])},bool:function(t,e,r){t.uniform1i(e,r)},bvec2:function(t,e,r){t.uniform2i(e,r[0],r[1])},bvec3:function(t,e,r){t.uniform3i(e,r[0],r[1],r[2])},bvec4:function(t,e,r){t.uniform4i(e,r[0],r[1],r[2],r[3])},mat2:function(t,e,r){t.uniformMatrix2fv(e,!1,r)},mat3:function(t,e,r){t.uniformMatrix3fv(e,!1,r)},mat4:function(t,e,r){t.uniformMatrix4fv(e,!1,r)},sampler2D:function(t,e,r){t.uniform1i(e,r)}},o={float:function(t,e,r){t.uniform1fv(e,r)},vec2:function(t,e,r){t.uniform2fv(e,r)},vec3:function(t,e,r){t.uniform3fv(e,r)},vec4:function(t,e,r){t.uniform4fv(e,r)},int:function(t,e,r){t.uniform1iv(e,r)},ivec2:function(t,e,r){t.uniform2iv(e,r)},ivec3:function(t,e,r){t.uniform3iv(e,r)},ivec4:function(t,e,r){t.uniform4iv(e,r)},bool:function(t,e,r){t.uniform1iv(e,r)},bvec2:function(t,e,r){t.uniform2iv(e,r)},bvec3:function(t,e,r){t.uniform3iv(e,r)},bvec4:function(t,e,r){t.uniform4iv(e,r)},sampler2D:function(t,e,r){t.uniform1iv(e,r)}};function s(t,e){return function(r){this.data[t].value=r;var n=this.data[t].location;1===e.size?i[e.type](this.gl,n,r):o[e.type](this.gl,n,r)}}function a(t,e){for(var r=e,n=0;n<t.length-1;n++){var i=r[t[n]]||{data:{}};r[t[n]]=i,r=i}return r}e.exports=function(t,e){var r={data:{}};r.gl=t;for(var i=Object.keys(e),o=0;o<i.length;o++){var u=i[o],h=u.split("."),l=h[h.length-1],c=a(h,r),d=e[u];c.data[l]=d,c.gl=t,Object.defineProperty(c,l,{get:n(l),set:s(l,d)})}return r}},{}],22:[function(t,e,r){e.exports={compileProgram:t("./compileProgram"),defaultValue:t("./defaultValue"),extractAttributes:t("./extractAttributes"),extractUniforms:t("./extractUniforms"),generateUniformAccessObject:t("./generateUniformAccessObject"),setPrecision:t("./setPrecision"),mapSize:t("./mapSize"),mapType:t("./mapType")}},{"./compileProgram":17,"./defaultValue":18,"./extractAttributes":19,"./extractUniforms":20,"./generateUniformAccessObject":21,"./mapSize":23,"./mapType":24,"./setPrecision":25}],23:[function(t,e,r){var n={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};e.exports=function(t){return n[t]}},{}],24:[function(t,e,r){var n=null,i={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D"};e.exports=function(t,e){if(!n){var r=Object.keys(i);n={};for(var o=0;o<r.length;++o){var s=r[o];n[t[s]]=i[s]}}return n[e]}},{}],25:[function(t,e,r){e.exports=function(t,e){return"precision"!==t.substring(0,9)?"precision "+e+" float;\n"+t:t}},{}],26:[function(t,e,r){var n,i,o=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(t){n=s}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}var h,l=[],c=!1,d=-1;function f(){c&&h&&(c=!1,h.length?l=h.concat(l):d=-1,l.length&&p())}function p(){if(!c){var t=u(f);c=!0;for(var e=l.length;e;){for(h=l,l=[];++d<e;)h&&h[d].run();d=-1,e=l.length}h=null,c=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];l.push(new v(t,e)),1!==l.length||c||u(p)};function v(t,e){this.fun=t,this.array=e}v.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={};function g(){}o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],27:[function(t,e,r){(function(t){!function(n){var i="object"==typeof r&&r&&!r.nodeType&&r,o="object"==typeof e&&e&&!e.nodeType&&e,s="object"==typeof t&&t;s.global!==s&&s.window!==s&&s.self!==s||(n=s);var a,u,h=2147483647,l=36,c=1,d=26,f=38,p=700,v=72,g=128,y="-",m=/^xn--/,_=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},T=l-c,w=Math.floor,E=String.fromCharCode;function S(t){throw new RangeError(x[t])}function O(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function M(t,e){var r=t.split("@"),n="";r.length>1&&(n=r[0]+"@",t=r[1]);return n+O((t=t.replace(b,".")).split("."),e).join(".")}function P(t){for(var e,r,n=[],i=0,o=t.length;i<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(r=t.charCodeAt(i++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--):n.push(e);return n}function C(t){return O(t,function(t){var e="";return t>65535&&(e+=E((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=E(t)}).join("")}function R(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function A(t,e,r){var n=0;for(t=r?w(t/p):t>>1,t+=w(t/e);t>T*d>>1;n+=l)t=w(t/T);return w(n+(T+1)*t/(t+f))}function I(t){var e,r,n,i,o,s,a,u,f,p,m=[],_=t.length,b=0,x=g,T=v;for((r=t.lastIndexOf(y))<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&S("not-basic"),m.push(t.charCodeAt(n));for(i=r>0?r+1:0;i<_;){for(o=b,s=1,a=l;i>=_&&S("invalid-input"),((u=(E=t.charCodeAt(i++))-48<10?E-22:E-65<26?E-65:E-97<26?E-97:l)>=l||u>w((h-b)/s))&&S("overflow"),b+=u*s,!(u<(f=a<=T?c:a>=T+d?d:a-T));a+=l)s>w(h/(p=l-f))&&S("overflow"),s*=p;T=A(b-o,e=m.length+1,0==o),w(b/e)>h-x&&S("overflow"),x+=w(b/e),b%=e,m.splice(b++,0,x)}var E;return C(m)}function D(t){var e,r,n,i,o,s,a,u,f,p,m,_,b,x,T,O=[];for(_=(t=P(t)).length,e=g,r=0,o=v,s=0;s<_;++s)(m=t[s])<128&&O.push(E(m));for(n=i=O.length,i&&O.push(y);n<_;){for(a=h,s=0;s<_;++s)(m=t[s])>=e&&m<a&&(a=m);for(a-e>w((h-r)/(b=n+1))&&S("overflow"),r+=(a-e)*b,e=a,s=0;s<_;++s)if((m=t[s])<e&&++r>h&&S("overflow"),m==e){for(u=r,f=l;!(u<(p=f<=o?c:f>=o+d?d:f-o));f+=l)T=u-p,x=l-p,O.push(E(R(p+T%x,0))),u=w(T/x);O.push(E(R(u,0))),o=A(r,b,n==i),r=0,++n}++r,++e}return O.join("")}if(a={version:"1.4.1",ucs2:{decode:P,encode:C},decode:I,encode:D,toASCII:function(t){return M(t,function(t){return _.test(t)?"xn--"+D(t):t})},toUnicode:function(t){return M(t,function(t){return m.test(t)?I(t.slice(4).toLowerCase()):t})}},i&&o)if(e.exports==i)o.exports=a;else for(u in a)a.hasOwnProperty(u)&&(i[u]=a[u]);else n.punycode=a}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],28:[function(t,e,r){"use strict";e.exports=function(t,e,r,i){e=e||"&",r=r||"=";var o={};if("string"!=typeof t||0===t.length)return o;var s=/\+/g;t=t.split(e);var a=1e3;i&&"number"==typeof i.maxKeys&&(a=i.maxKeys);var u=t.length;a>0&&u>a&&(u=a);for(var h=0;h<u;++h){var l,c,d,f,p=t[h].replace(s,"%20"),v=p.indexOf(r);v>=0?(l=p.substr(0,v),c=p.substr(v+1)):(l=p,c=""),d=decodeURIComponent(l),f=decodeURIComponent(c),g=o,y=d,Object.prototype.hasOwnProperty.call(g,y)?n(o[d])?o[d].push(f):o[d]=[o[d],f]:o[d]=f}var g,y;return o};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],29:[function(t,e,r){"use strict";var n=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};e.exports=function(t,e,r,a){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?o(s(t),function(s){var a=encodeURIComponent(n(s))+r;return i(t[s])?o(t[s],function(t){return a+encodeURIComponent(n(t))}).join(e):a+encodeURIComponent(n(t[s]))}).join(e):a?encodeURIComponent(n(a))+r+encodeURIComponent(n(t)):""};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function o(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n<t.length;n++)r.push(e(t[n],n));return r}var s=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},{}],30:[function(t,e,r){"use strict";r.decode=r.parse=t("./decode"),r.encode=r.stringify=t("./encode")},{"./decode":28,"./encode":29}],31:[function(t,e,r){"use strict";e.exports=function(t,e,r){var n,i=t.length;if(!(e>=i||0===r)){var o=i-(r=e+r>i?i-e:r);for(n=e;n<o;++n)t[n]=t[n+r];t.length=o}}},{}],32:[function(t,e,r){"use strict";r.__esModule=!0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=u(t("mini-signals")),o=u(t("parse-uri")),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("./async")),a=u(t("./Resource"));function u(t){return t&&t.__esModule?t:{default:t}}var h=/(#[\w-]+)?$/,l=function(){function t(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.baseUrl=r,this.progress=0,this.loading=!1,this.defaultQueryString="",this._beforeMiddleware=[],this._afterMiddleware=[],this._resourcesParsing=[],this._boundLoadResource=function(t,r){return e._loadResource(t,r)},this._queue=s.queue(this._boundLoadResource,n),this._queue.pause(),this.resources={},this.onProgress=new i.default,this.onError=new i.default,this.onLoad=new i.default,this.onStart=new i.default,this.onComplete=new i.default}return t.prototype.add=function(t,e,r,i){if(Array.isArray(t)){for(var o=0;o<t.length;++o)this.add(t[o]);return this}if("object"===(void 0===t?"undefined":n(t))&&(i=e||t.callback||t.onComplete,r=t,e=t.url,t=t.name||t.key||t.url),"string"!=typeof e&&(i=r,r=e,e=t),"string"!=typeof e)throw new Error("No url passed to add resource to loader.");if("function"==typeof r&&(i=r,r=null),this.loading&&(!r||!r.parentResource))throw new Error("Cannot add resources while the loader is running.");if(this.resources[t])throw new Error('Resource named "'+t+'" already exists.');if(e=this._prepareUrl(e),this.resources[t]=new a.default(t,e,r),"function"==typeof i&&this.resources[t].onAfterMiddleware.once(i),this.loading){for(var s=r.parentResource,u=[],h=0;h<s.children.length;++h)s.children[h].isComplete||u.push(s.children[h]);var l=s.progressChunk*(u.length+1)/(u.length+2);s.children.push(this.resources[t]),s.progressChunk=l;for(var c=0;c<u.length;++c)u[c].progressChunk=l;this.resources[t].progressChunk=l}return this._queue.push(this.resources[t]),this},t.prototype.pre=function(t){return this._beforeMiddleware.push(t),this},t.prototype.use=function(t){return this._afterMiddleware.push(t),this},t.prototype.reset=function(){this.progress=0,this.loading=!1,this._queue.kill(),this._queue.pause();for(var t in this.resources){var e=this.resources[t];e._onLoadBinding&&e._onLoadBinding.detach(),e.isLoading&&e.abort()}return this.resources={},this},t.prototype.load=function(t){if("function"==typeof t&&this.onComplete.once(t),this.loading)return this;for(var e=100/this._queue._tasks.length,r=0;r<this._queue._tasks.length;++r)this._queue._tasks[r].data.progressChunk=e;return this.loading=!0,this.onStart.dispatch(this),this._queue.resume(),this},t.prototype._prepareUrl=function(t){var e=(0,o.default)(t,{strictMode:!0}),r=void 0;if(r=e.protocol||!e.path||0===t.indexOf("//")?t:this.baseUrl.length&&this.baseUrl.lastIndexOf("/")!==this.baseUrl.length-1&&"/"!==t.charAt(0)?this.baseUrl+"/"+t:this.baseUrl+t,this.defaultQueryString){var n=h.exec(r)[0];-1!==(r=r.substr(0,r.length-n.length)).indexOf("?")?r+="&"+this.defaultQueryString:r+="?"+this.defaultQueryString,r+=n}return r},t.prototype._loadResource=function(t,e){var r=this;t._dequeue=e,s.eachSeries(this._beforeMiddleware,function(e,n){e.call(r,t,function(){n(t.isComplete?{}:null)})},function(){t.isComplete?r._onLoad(t):(t._onLoadBinding=t.onComplete.once(r._onLoad,r),t.load())},!0)},t.prototype._onComplete=function(){this.loading=!1,this.onComplete.dispatch(this,this.resources)},t.prototype._onLoad=function(t){var e=this;t._onLoadBinding=null,this._resourcesParsing.push(t),t._dequeue(),s.eachSeries(this._afterMiddleware,function(r,n){r.call(e,t,n)},function(){t.onAfterMiddleware.dispatch(t),e.progress+=t.progressChunk,e.onProgress.dispatch(e,t),t.error?e.onError.dispatch(t.error,e,t):e.onLoad.dispatch(e,t),e._resourcesParsing.splice(e._resourcesParsing.indexOf(t),1),e._queue.idle()&&0===e._resourcesParsing.length&&(e.progress=100,e._onComplete())},!0)},t}();r.default=l},{"./Resource":33,"./async":34,"mini-signals":5,"parse-uri":7}],33:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=s(t("parse-uri")),o=s(t("mini-signals"));function s(t){return t&&t.__esModule?t:{default:t}}var a=!(!window.XDomainRequest||"withCredentials"in new XMLHttpRequest),u=null;function h(){}var l=function(){t.setExtensionLoadType=function(e,r){c(t._loadTypeMap,e,r)},t.setExtensionXhrType=function(e,r){c(t._xhrTypeMap,e,r)};function t(e,r,n){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),"string"!=typeof e||"string"!=typeof r)throw new Error("Both name and url are required for constructing a resource.");n=n||{},this._flags=0,this._setFlag(t.STATUS_FLAGS.DATA_URL,0===r.indexOf("data:")),this.name=e,this.url=r,this.extension=this._getExtension(),this.data=null,this.crossOrigin=!0===n.crossOrigin?"anonymous":n.crossOrigin,this.loadType=n.loadType||this._determineLoadType(),this.xhrType=n.xhrType,this.metadata=n.metadata||{},this.error=null,this.xhr=null,this.children=[],this.type=t.TYPE.UNKNOWN,this.progressChunk=0,this._dequeue=h,this._onLoadBinding=null,this._boundComplete=this.complete.bind(this),this._boundOnError=this._onError.bind(this),this._boundOnProgress=this._onProgress.bind(this),this._boundXhrOnError=this._xhrOnError.bind(this),this._boundXhrOnAbort=this._xhrOnAbort.bind(this),this._boundXhrOnLoad=this._xhrOnLoad.bind(this),this._boundXdrOnTimeout=this._xdrOnTimeout.bind(this),this.onStart=new o.default,this.onProgress=new o.default,this.onComplete=new o.default,this.onAfterMiddleware=new o.default}return t.prototype.complete=function(){if(this.data&&this.data.removeEventListener&&(this.data.removeEventListener("error",this._boundOnError,!1),this.data.removeEventListener("load",this._boundComplete,!1),this.data.removeEventListener("progress",this._boundOnProgress,!1),this.data.removeEventListener("canplaythrough",this._boundComplete,!1)),this.xhr&&(this.xhr.removeEventListener?(this.xhr.removeEventListener("error",this._boundXhrOnError,!1),this.xhr.removeEventListener("abort",this._boundXhrOnAbort,!1),this.xhr.removeEventListener("progress",this._boundOnProgress,!1),this.xhr.removeEventListener("load",this._boundXhrOnLoad,!1)):(this.xhr.onerror=null,this.xhr.ontimeout=null,this.xhr.onprogress=null,this.xhr.onload=null)),this.isComplete)throw new Error("Complete called again for an already completed resource.");this._setFlag(t.STATUS_FLAGS.COMPLETE,!0),this._setFlag(t.STATUS_FLAGS.LOADING,!1),this.onComplete.dispatch(this)},t.prototype.abort=function(e){if(!this.error){if(this.error=new Error(e),this.xhr)this.xhr.abort();else if(this.xdr)this.xdr.abort();else if(this.data)if(this.data.src)this.data.src=t.EMPTY_GIF;else for(;this.data.firstChild;)this.data.removeChild(this.data.firstChild);this.complete()}},t.prototype.load=function(e){var r=this;if(!this.isLoading)if(this.isComplete)e&&setTimeout(function(){return e(r)},1);else switch(e&&this.onComplete.once(e),this._setFlag(t.STATUS_FLAGS.LOADING,!0),this.onStart.dispatch(this),!1!==this.crossOrigin&&"string"==typeof this.crossOrigin||(this.crossOrigin=this._determineCrossOrigin(this.url)),this.loadType){case t.LOAD_TYPE.IMAGE:this.type=t.TYPE.IMAGE,this._loadElement("image");break;case t.LOAD_TYPE.AUDIO:this.type=t.TYPE.AUDIO,this._loadSourceElement("audio");break;case t.LOAD_TYPE.VIDEO:this.type=t.TYPE.VIDEO,this._loadSourceElement("video");break;case t.LOAD_TYPE.XHR:default:a&&this.crossOrigin?this._loadXdr():this._loadXhr()}},t.prototype._hasFlag=function(t){return!!(this._flags&t)},t.prototype._setFlag=function(t,e){this._flags=e?this._flags|t:this._flags&~t},t.prototype._loadElement=function(t){this.metadata.loadElement?this.data=this.metadata.loadElement:"image"===t&&void 0!==window.Image?this.data=new Image:this.data=document.createElement(t),this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),this.metadata.skipSource||(this.data.src=this.url),this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1)},t.prototype._loadSourceElement=function(t){if(this.metadata.loadElement?this.data=this.metadata.loadElement:"audio"===t&&void 0!==window.Audio?this.data=new Audio:this.data=document.createElement(t),null!==this.data){if(!this.metadata.skipSource)if(navigator.isCocoonJS)this.data.src=Array.isArray(this.url)?this.url[0]:this.url;else if(Array.isArray(this.url))for(var e=this.metadata.mimeType,r=0;r<this.url.length;++r)this.data.appendChild(this._createSource(t,this.url[r],Array.isArray(e)?e[r]:e));else{var n=this.metadata.mimeType;this.data.appendChild(this._createSource(t,this.url,Array.isArray(n)?n[0]:n))}this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.data.addEventListener("canplaythrough",this._boundComplete,!1),this.data.load()}else this.abort("Unsupported element: "+t)},t.prototype._loadXhr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var e=this.xhr=new XMLHttpRequest;e.open("GET",this.url,!0),this.xhrType===t.XHR_RESPONSE_TYPE.JSON||this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT?e.responseType=t.XHR_RESPONSE_TYPE.TEXT:e.responseType=this.xhrType,e.addEventListener("error",this._boundXhrOnError,!1),e.addEventListener("abort",this._boundXhrOnAbort,!1),e.addEventListener("progress",this._boundOnProgress,!1),e.addEventListener("load",this._boundXhrOnLoad,!1),e.send()},t.prototype._loadXdr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var t=this.xhr=new XDomainRequest;t.timeout=5e3,t.onerror=this._boundXhrOnError,t.ontimeout=this._boundXdrOnTimeout,t.onprogress=this._boundOnProgress,t.onload=this._boundXhrOnLoad,t.open("GET",this.url,!0),setTimeout(function(){return t.send()},1)},t.prototype._createSource=function(t,e,r){r||(r=t+"/"+this._getExtension(e));var n=document.createElement("source");return n.src=e,n.type=r,n},t.prototype._onError=function(t){this.abort("Failed to load element using: "+t.target.nodeName)},t.prototype._onProgress=function(t){t&&t.lengthComputable&&this.onProgress.dispatch(this,t.loaded/t.total)},t.prototype._xhrOnError=function(){var t=this.xhr;this.abort(d(t)+" Request failed. Status: "+t.status+', text: "'+t.statusText+'"')},t.prototype._xhrOnAbort=function(){this.abort(d(this.xhr)+" Request was aborted by the user.")},t.prototype._xdrOnTimeout=function(){this.abort(d(this.xhr)+" Request timed out.")},t.prototype._xhrOnLoad=function(){var e=this.xhr,r="",n=void 0===e.status?200:e.status;""!==e.responseType&&"text"!==e.responseType&&void 0!==e.responseType||(r=e.responseText),0===n&&r.length>0?n=200:1223===n&&(n=204);if(2===(n/100|0)){if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=r,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(r),this.type=t.TYPE.JSON}catch(t){return void this.abort("Error trying to parse loaded json: "+t)}else if(this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var i=new DOMParser;this.data=i.parseFromString(r,"text/xml")}else{var o=document.createElement("div");o.innerHTML=r,this.data=o}this.type=t.TYPE.XML}catch(t){return void this.abort("Error trying to parse loaded xml: "+t)}else this.data=e.response||r;this.complete()}else this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL)},t.prototype._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";e=e||window.location,u||(u=document.createElement("a")),u.href=t;var r=!(t=(0,i.default)(u.href,{strictMode:!0})).port&&""===e.port||t.port===e.port,n=t.protocol?t.protocol+":":"";return t.host===e.hostname&&r&&n===e.protocol?"":"anonymous"},t.prototype._determineXhrType=function(){return t._xhrTypeMap[this.extension]||t.XHR_RESPONSE_TYPE.TEXT},t.prototype._determineLoadType=function(){return t._loadTypeMap[this.extension]||t.LOAD_TYPE.XHR},t.prototype._getExtension=function(){var t=this.url,e="";if(this.isDataUrl){var r=t.indexOf("/");e=t.substring(r+1,t.indexOf(";",r))}else{var n=t.indexOf("?"),i=t.indexOf("#"),o=Math.min(n>-1?n:t.length,i>-1?i:t.length);e=(t=t.substring(0,o)).substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},t.prototype._getMimeFromXhrType=function(e){switch(e){case t.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case t.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case t.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case t.XHR_RESPONSE_TYPE.JSON:return"application/json";case t.XHR_RESPONSE_TYPE.DEFAULT:case t.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},n(t,[{key:"isDataUrl",get:function(){return this._hasFlag(t.STATUS_FLAGS.DATA_URL)}},{key:"isComplete",get:function(){return this._hasFlag(t.STATUS_FLAGS.COMPLETE)}},{key:"isLoading",get:function(){return this._hasFlag(t.STATUS_FLAGS.LOADING)}}]),t}();r.default=l,l.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},l.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},l.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},l.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},l._loadTypeMap={gif:l.LOAD_TYPE.IMAGE,png:l.LOAD_TYPE.IMAGE,bmp:l.LOAD_TYPE.IMAGE,jpg:l.LOAD_TYPE.IMAGE,jpeg:l.LOAD_TYPE.IMAGE,tif:l.LOAD_TYPE.IMAGE,tiff:l.LOAD_TYPE.IMAGE,webp:l.LOAD_TYPE.IMAGE,tga:l.LOAD_TYPE.IMAGE,svg:l.LOAD_TYPE.IMAGE,"svg+xml":l.LOAD_TYPE.IMAGE,mp3:l.LOAD_TYPE.AUDIO,ogg:l.LOAD_TYPE.AUDIO,wav:l.LOAD_TYPE.AUDIO,mp4:l.LOAD_TYPE.VIDEO,webm:l.LOAD_TYPE.VIDEO},l._xhrTypeMap={xhtml:l.XHR_RESPONSE_TYPE.DOCUMENT,html:l.XHR_RESPONSE_TYPE.DOCUMENT,htm:l.XHR_RESPONSE_TYPE.DOCUMENT,xml:l.XHR_RESPONSE_TYPE.DOCUMENT,tmx:l.XHR_RESPONSE_TYPE.DOCUMENT,svg:l.XHR_RESPONSE_TYPE.DOCUMENT,tsx:l.XHR_RESPONSE_TYPE.DOCUMENT,gif:l.XHR_RESPONSE_TYPE.BLOB,png:l.XHR_RESPONSE_TYPE.BLOB,bmp:l.XHR_RESPONSE_TYPE.BLOB,jpg:l.XHR_RESPONSE_TYPE.BLOB,jpeg:l.XHR_RESPONSE_TYPE.BLOB,tif:l.XHR_RESPONSE_TYPE.BLOB,tiff:l.XHR_RESPONSE_TYPE.BLOB,webp:l.XHR_RESPONSE_TYPE.BLOB,tga:l.XHR_RESPONSE_TYPE.BLOB,json:l.XHR_RESPONSE_TYPE.JSON,text:l.XHR_RESPONSE_TYPE.TEXT,txt:l.XHR_RESPONSE_TYPE.TEXT,ttf:l.XHR_RESPONSE_TYPE.BUFFER,otf:l.XHR_RESPONSE_TYPE.BUFFER},l.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";function c(t,e,r){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=r)}function d(t){return t.toString().replace("object ","")}},{"mini-signals":5,"parse-uri":7}],34:[function(t,e,r){"use strict";r.__esModule=!0,r.eachSeries=function(t,e,r,n){var i=0,o=t.length;!function s(a){a||i===o?r&&r(a):n?setTimeout(function(){e(t[i++],s)},1):e(t[i++],s)}()},r.queue=function(t,e){if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var r=0,o={_tasks:[],concurrency:e,saturated:n,unsaturated:n,buffer:e/4,empty:n,drain:n,error:n,started:!1,paused:!1,push:function(t,e){s(t,!1,e)},kill:function(){r=0,o.drain=n,o.started=!1,o._tasks=[]},unshift:function(t,e){s(t,!0,e)},process:function(){for(;!o.paused&&r<o.concurrency&&o._tasks.length;){var e=o._tasks.shift();0===o._tasks.length&&o.empty(),(r+=1)===o.concurrency&&o.saturated(),t(e.data,i(a(e)))}},length:function(){return o._tasks.length},running:function(){return r},idle:function(){return o._tasks.length+r===0},pause:function(){!0!==o.paused&&(o.paused=!0)},resume:function(){if(!1!==o.paused){o.paused=!1;for(var t=1;t<=o.concurrency;t++)o.process()}}};function s(t,e,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");if(o.started=!0,null==t&&o.idle())setTimeout(function(){return o.drain()},1);else{var i={data:t,callback:"function"==typeof r?r:n};e?o._tasks.unshift(i):o._tasks.push(i),setTimeout(function(){return o.process()},1)}}function a(t){return function(){r-=1,t.callback.apply(t,arguments),null!=arguments[0]&&o.error(arguments[0],t.data),r<=o.concurrency-o.buffer&&o.unsaturated(),o.idle()&&o.drain(),o.process()}}return o};function n(){}function i(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}}},{}],35:[function(t,e,r){"use strict";r.__esModule=!0,r.encodeBinary=function(t){var e="",r=0;for(;r<t.length;){for(var i=[0,0,0],o=[0,0,0,0],s=0;s<i.length;++s)r<t.length?i[s]=255&t.charCodeAt(r++):i[s]=0;o[0]=i[0]>>2,o[1]=(3&i[0])<<4|i[1]>>4,o[2]=(15&i[1])<<2|i[2]>>6,o[3]=63&i[2];var a=r-(t.length-1);switch(a){case 2:o[3]=64,o[2]=64;break;case 1:o[3]=64}for(var u=0;u<o.length;++u)e+=n.charAt(o[u])}return e};var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},{}],36:[function(t,e,r){"use strict";var n=t("./Loader").default,i=t("./Resource").default,o=t("./async"),s=t("./b64");n.Resource=i,n.async=o,n.base64=s,e.exports=n,e.exports.default=n},{"./Loader":32,"./Resource":33,"./async":34,"./b64":35}],37:[function(t,e,r){"use strict";r.__esModule=!0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};r.blobMiddlewareFactory=function(){return function(t,e){if(t.data){if(t.xhr&&t.xhrType===i.default.XHR_RESPONSE_TYPE.BLOB)if(window.Blob&&"string"!=typeof t.data){if(0===t.data.type.indexOf("image")){var r=function(){var r=a.createObjectURL(t.data);return t.blob=t.data,t.data=new Image,t.data.src=r,t.type=i.default.TYPE.IMAGE,t.data.onload=function(){a.revokeObjectURL(r),t.data.onload=null,e()},{v:void 0}}();if("object"===(void 0===r?"undefined":n(r)))return r.v}}else{var s=t.xhr.getResponseHeader("content-type");if(s&&0===s.indexOf("image"))return t.data=new Image,t.data.src="data:"+s+";base64,"+o.default.encodeBinary(t.xhr.responseText),t.type=i.default.TYPE.IMAGE,void(t.data.onload=function(){t.data.onload=null,e()})}e()}else e()}};var i=s(t("../../Resource")),o=s(t("../../b64"));function s(t){return t&&t.__esModule?t:{default:t}}var a=window.URL||window.webkitURL},{"../../Resource":33,"../../b64":35}],38:[function(t,e,r){"use strict";var n=t("punycode"),i=t("./util");r.parse=_,r.resolve=function(t,e){return _(t,!1,!0).resolve(e)},r.resolveObject=function(t,e){return t?_(t,!1,!0).resolveObject(e):e},r.format=function(t){i.isString(t)&&(t=_(t));return t instanceof o?t.format():o.prototype.format.call(t)},r.Url=o;function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,h=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(h),c=["%","/","?",";","#"].concat(l),d=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=t("querystring");function _(t,e,r){if(t&&i.isObject(t)&&t instanceof o)return t;var n=new o;return n.parse(t,e,r),n}o.prototype.parse=function(t,e,r){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),a=-1!==o&&o<t.indexOf("#")?"?":"#",h=t.split(a);h[0]=h[0].replace(/\\/g,"/");var _=t=h.join(a);if(_=_.trim(),!r&&1===t.split("#").length){var b=u.exec(_);if(b)return this.path=_,this.href=_,this.pathname=b[1],b[2]?(this.search=b[2],this.query=e?m.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var x=s.exec(_);if(x){var T=(x=x[0]).toLowerCase();this.protocol=T,_=_.substr(x.length)}if(r||x||_.match(/^\/\/[^@\/][email protected][^@\/]+/)){var w="//"===_.substr(0,2);!w||x&&g[x]||(_=_.substr(2),this.slashes=!0)}if(!g[x]&&(w||x&&!y[x])){for(var E=-1,S=0;S<d.length;S++){-1!==(P=_.indexOf(d[S]))&&(-1===E||P<E)&&(E=P)}var O,M;-1!==(M=-1===E?_.lastIndexOf("@"):_.lastIndexOf("@",E))&&(O=_.slice(0,M),_=_.slice(M+1),this.auth=decodeURIComponent(O)),E=-1;for(S=0;S<c.length;S++){var P;-1!==(P=_.indexOf(c[S]))&&(-1===E||P<E)&&(E=P)}-1===E&&(E=_.length),this.host=_.slice(0,E),_=_.slice(E),this.parseHost(),this.hostname=this.hostname||"";var C="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!C)for(var R=this.hostname.split(/\./),A=(S=0,R.length);S<A;S++){var I=R[S];if(I&&!I.match(f)){for(var D="",L=0,N=I.length;L<N;L++)I.charCodeAt(L)>127?D+="x":D+=I[L];if(!D.match(f)){var F=R.slice(0,S),B=R.slice(S+1),k=I.match(p);k&&(F.push(k[1]),B.unshift(k[2])),B.length&&(_="/"+B.join(".")+_),this.hostname=F.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),C||(this.hostname=n.toASCII(this.hostname));var j=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+j,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==_[0]&&(_="/"+_))}if(!v[T])for(S=0,A=l.length;S<A;S++){var X=l[S];if(-1!==_.indexOf(X)){var G=encodeURIComponent(X);G===X&&(G=escape(X)),_=_.split(X).join(G)}}var W=_.indexOf("#");-1!==W&&(this.hash=_.substr(W),_=_.slice(0,W));var H=_.indexOf("?");if(-1!==H?(this.search=_.substr(H),this.query=_.substr(H+1),e&&(this.query=m.parse(this.query)),_=_.slice(0,H)):e&&(this.search="",this.query={}),_&&(this.pathname=_),y[T]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){j=this.pathname||"";var Y=this.search||"";this.path=j+Y}return this.href=this.format(),this};o.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,s="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(s=m.stringify(this.query));var a=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||y[e])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),e+o+(r=r.replace(/[?#]/g,function(t){return encodeURIComponent(t)}))+(a=a.replace("#","%23"))+n};o.prototype.resolve=function(t){return this.resolveObject(_(t,!1,!0)).format()};o.prototype.resolveObject=function(t){if(i.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var r=new o,n=Object.keys(this),s=0;s<n.length;s++){var a=n[s];r[a]=this[a]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var u=Object.keys(t),h=0;h<u.length;h++){var l=u[h];"protocol"!==l&&(r[l]=t[l])}return y[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!y[t.protocol]){for(var c=Object.keys(t),d=0;d<c.length;d++){var f=c[d];r[f]=t[f]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||g[t.protocol])r.pathname=t.pathname;else{for(var p=(t.pathname||"").split("/");p.length&&!(t.host=p.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var v=r.pathname||"",m=r.search||"";r.path=v+m}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var _=r.pathname&&"/"===r.pathname.charAt(0),b=t.host||t.pathname&&"/"===t.pathname.charAt(0),x=b||_||r.host&&t.pathname,T=x,w=r.pathname&&r.pathname.split("/")||[],E=(p=t.pathname&&t.pathname.split("/")||[],r.protocol&&!y[r.protocol]);if(E&&(r.hostname="",r.port=null,r.host&&(""===w[0]?w[0]=r.host:w.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===p[0]?p[0]=t.host:p.unshift(t.host)),t.host=null),x=x&&(""===p[0]||""===w[0])),b)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,w=p;else if(p.length)w||(w=[]),w.pop(),w=w.concat(p),r.search=t.search,r.query=t.query;else if(!i.isNullOrUndefined(t.search)){if(E){r.hostname=r.host=w.shift();(R=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=R.shift(),r.host=r.hostname=R.shift())}return r.search=t.search,r.query=t.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!w.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var S=w.slice(-1)[0],O=(r.host||t.host||w.length>1)&&("."===S||".."===S)||""===S,M=0,P=w.length;P>=0;P--)"."===(S=w[P])?w.splice(P,1):".."===S?(w.splice(P,1),M++):M&&(w.splice(P,1),M--);if(!x&&!T)for(;M--;M)w.unshift("..");!x||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),O&&"/"!==w.join("/").substr(-1)&&w.push("");var C=""===w[0]||w[0]&&"/"===w[0].charAt(0);if(E){r.hostname=r.host=C?"":w.length?w.shift():"";var R;(R=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=R.shift(),r.host=r.hostname=R.shift())}return(x=x||r.host&&w.length)&&!C&&w.unshift(""),w.length?r.pathname=w.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":39,punycode:27,querystring:30}],39:[function(t,e,r){"use strict";e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],40:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../core")),i=s(t("ismobilejs")),o=s(t("./accessibleTarget"));function s(t){return t&&t.__esModule?t:{default:t}}n.utils.mixins.delayMixin(n.DisplayObject.prototype,o.default);var a=100,u=0,h=0,l=2,c=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!i.default.tablet&&!i.default.phone||navigator.isCocoonJS||this.createTouchHook();var r=document.createElement("div");r.style.width=a+"px",r.style.height=a+"px",r.style.position="absolute",r.style.top=u+"px",r.style.left=h+"px",r.style.zIndex=l,this.div=r,this.pool=[],this.renderId=0,this.debug=!1,this.renderer=e,this.children=[],this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this.isActive=!1,this.isMobileAccessabillity=!1,window.addEventListener("keydown",this._onKeyDown,!1)}return t.prototype.createTouchHook=function(){var t=this,e=document.createElement("button");e.style.width="1px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.left="-1000px",e.style.zIndex=2,e.style.backgroundColor="#FF0000",e.title="HOOK DIV",e.addEventListener("focus",function(){t.isMobileAccessabillity=!0,t.activate(),document.body.removeChild(e)}),document.body.appendChild(e)},t.prototype.activate=function(){this.isActive||(this.isActive=!0,window.document.addEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),this.renderer.view.parentNode&&this.renderer.view.parentNode.appendChild(this.div))},t.prototype.deactivate=function(){this.isActive&&!this.isMobileAccessabillity&&(this.isActive=!1,window.document.removeEventListener("mousemove",this._onMouseMove),window.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),this.div.parentNode&&this.div.parentNode.removeChild(this.div))},t.prototype.updateAccessibleObjects=function(t){if(t.visible){t.accessible&&t.interactive&&(t._accessibleActive||this.addChild(t),t.renderId=this.renderId);for(var e=t.children,r=e.length-1;r>=0;r--)this.updateAccessibleObjects(e[r])}},t.prototype.update=function(){if(this.renderer.renderingToScreen){this.updateAccessibleObjects(this.renderer._lastObjectRendered);var t=this.renderer.view.getBoundingClientRect(),e=t.width/this.renderer.width,r=t.height/this.renderer.height,i=this.div;i.style.left=t.left+"px",i.style.top=t.top+"px",i.style.width=this.renderer.width+"px",i.style.height=this.renderer.height+"px";for(var o=0;o<this.children.length;o++){var s=this.children[o];if(s.renderId!==this.renderId)s._accessibleActive=!1,n.utils.removeItems(this.children,o,1),this.div.removeChild(s._accessibleDiv),this.pool.push(s._accessibleDiv),s._accessibleDiv=null,o--,0===this.children.length&&this.deactivate();else{i=s._accessibleDiv;var a=s.hitArea,u=s.worldTransform;s.hitArea?(i.style.left=(u.tx+a.x*u.a)*e+"px",i.style.top=(u.ty+a.y*u.d)*r+"px",i.style.width=a.width*u.a*e+"px",i.style.height=a.height*u.d*r+"px"):(a=s.getBounds(),this.capHitArea(a),i.style.left=a.x*e+"px",i.style.top=a.y*r+"px",i.style.width=a.width*e+"px",i.style.height=a.height*r+"px")}}this.renderId++}},t.prototype.capHitArea=function(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0),t.x+t.width>this.renderer.width&&(t.width=this.renderer.width-t.x),t.y+t.height>this.renderer.height&&(t.height=this.renderer.height-t.y)},t.prototype.addChild=function(t){var e=this.pool.pop();e||((e=document.createElement("button")).style.width=a+"px",e.style.height=a+"px",e.style.backgroundColor=this.debug?"rgba(255,0,0,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=l,e.style.borderStyle="none",e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),t.accessibleTitle?e.title=t.accessibleTitle:t.accessibleTitle||t.accessibleHint||(e.title="displayObject "+this.tabIndex),t.accessibleHint&&e.setAttribute("aria-label",t.accessibleHint),t._accessibleActive=!0,t._accessibleDiv=e,e.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex},t.prototype._onClick=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"click",e.eventData)},t.prototype._onFocus=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseover",e.eventData)},t.prototype._onFocusOut=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseout",e.eventData)},t.prototype._onKeyDown=function(t){9===t.keyCode&&this.activate()},t.prototype._onMouseMove=function(){this.deactivate()},t.prototype.destroy=function(){this.div=null;for(var t=0;t<this.children.length;t++)this.children[t].div=null;window.document.removeEventListener("mousemove",this._onMouseMove),window.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},t}();r.default=c,n.WebGLRenderer.registerPlugin("accessibility",c),n.CanvasRenderer.registerPlugin("accessibility",c)},{"../core":65,"./accessibleTarget":41,ismobilejs:4}],41:[function(t,e,r){"use strict";r.__esModule=!0,r.default={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:!1}},{}],42:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("./accessibleTarget");Object.defineProperty(r,"accessibleTarget",{enumerable:!0,get:function(){return o(n).default}});var i=t("./AccessibilityManager");Object.defineProperty(r,"AccessibilityManager",{enumerable:!0,get:function(){return o(i).default}});function o(t){return t&&t.__esModule?t:{default:t}}},{"./AccessibilityManager":40,"./accessibleTarget":41}],43:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=t("./autoDetectRenderer"),o=h(t("./display/Container")),s=t("./ticker"),a=h(t("./settings")),u=t("./const");function h(t){return t&&t.__esModule?t:{default:t}}var l=function(){function t(e,r,n,u,h){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),"number"==typeof e&&(e=Object.assign({width:e,height:r||a.default.RENDER_OPTIONS.height,forceCanvas:!!u,sharedTicker:!!h},n)),this._options=e=Object.assign({autoStart:!0,sharedTicker:!1,forceCanvas:!1,sharedLoader:!1},e),this.renderer=(0,i.autoDetectRenderer)(e),this.stage=new o.default,this._ticker=null,this.ticker=e.sharedTicker?s.shared:new s.Ticker,e.autoStart&&this.start()}return t.prototype.render=function(){this.renderer.render(this.stage)},t.prototype.stop=function(){this._ticker.stop()},t.prototype.start=function(){this._ticker.start()},t.prototype.destroy=function(t){var e=this._ticker;this.ticker=null,e.destroy(),this.stage.destroy(),this.stage=null,this.renderer.destroy(t),this.renderer=null,this._options=null},n(t,[{key:"ticker",set:function(t){this._ticker&&this._ticker.remove(this.render,this),this._ticker=t,t&&t.add(this.render,this,u.UPDATE_PRIORITY.LOW)},get:function(){return this._ticker}},{key:"view",get:function(){return this.renderer.view}},{key:"screen",get:function(){return this.renderer.screen}}]),t}();r.default=l},{"./autoDetectRenderer":45,"./const":46,"./display/Container":48,"./settings":101,"./ticker":121}],44:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=t("pixi-gl-core"),o=t("./settings"),s=(n=o,n&&n.__esModule?n:{default:n});function a(t,e){if(t instanceof Array){if("precision"!==t[0].substring(0,9)){var r=t.slice(0);return r.unshift("precision "+e+" float;"),r}}else if("precision"!==t.substring(0,9))return"precision "+e+" float;\n"+t;return t}var u=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r,n,i){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,a(n,s.default.PRECISION_VERTEX),a(i,s.default.PRECISION_FRAGMENT)))}return e}(i.GLShader);r.default=u},{"./settings":101,"pixi-gl-core":15}],45:[function(t,e,r){"use strict";r.__esModule=!0,r.autoDetectRenderer=function(t,e,r,s){var a=t&&t.forceCanvas;void 0!==s&&(a=s);if(!a&&n.isWebGLSupported())return new o.default(t,e,r);return new i.default(t,e,r)};var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("./utils")),i=s(t("./renderers/canvas/CanvasRenderer")),o=s(t("./renderers/webgl/WebGLRenderer"));function s(t){return t&&t.__esModule?t:{default:t}}},{"./renderers/canvas/CanvasRenderer":77,"./renderers/webgl/WebGLRenderer":84,"./utils":125}],46:[function(t,e,r){"use strict";r.__esModule=!0;r.VERSION="4.6.2",r.PI_2=2*Math.PI,r.RAD_TO_DEG=180/Math.PI,r.DEG_TO_RAD=Math.PI/180,r.RENDERER_TYPE={UNKNOWN:0,WEBGL:1,CANVAS:2},r.BLEND_MODES={NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,NORMAL_NPM:17,ADD_NPM:18,SCREEN_NPM:19},r.DRAW_MODES={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},r.SCALE_MODES={LINEAR:0,NEAREST:1},r.WRAP_MODES={CLAMP:0,REPEAT:1,MIRRORED_REPEAT:2},r.GC_MODES={AUTO:0,MANUAL:1},r.URL_FILE_EXTENSION=/\.(\w{3,4})(?:$|\?|#)/i,r.DATA_URI=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;(charset=[\w-]+|base64))?,(.*)/i,r.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,r.SHAPES={POLY:0,RECT:1,CIRC:2,ELIP:3,RREC:4},r.PRECISION={LOW:"lowp",MEDIUM:"mediump",HIGH:"highp"},r.TRANSFORM_MODE={STATIC:0,DYNAMIC:1},r.TEXT_GRADIENT={LINEAR_VERTICAL:0,LINEAR_HORIZONTAL:1},r.UPDATE_PRIORITY={INTERACTION:50,HIGH:25,NORMAL:0,LOW:-25,UTILITY:-50}},{}],47:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("../math");var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){this.updateID++,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},t.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?n.Rectangle.EMPTY:((t=t||new n.Rectangle(0,0,1,1)).x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},t.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},t.prototype.addQuad=function(t){var e=this.minX,r=this.minY,n=this.maxX,i=this.maxY,o=t[0],s=t[1];e=o<e?o:e,r=s<r?s:r,n=o>n?o:n,i=s>i?s:i,o=t[2],s=t[3],e=o<e?o:e,r=s<r?s:r,n=o>n?o:n,i=s>i?s:i,o=t[4],s=t[5],e=o<e?o:e,r=s<r?s:r,n=o>n?o:n,i=s>i?s:i,o=t[6],s=t[7],e=o<e?o:e,r=s<r?s:r,n=o>n?o:n,i=s>i?s:i,this.minX=e,this.minY=r,this.maxX=n,this.maxY=i},t.prototype.addFrame=function(t,e,r,n,i){var o=t.worldTransform,s=o.a,a=o.b,u=o.c,h=o.d,l=o.tx,c=o.ty,d=this.minX,f=this.minY,p=this.maxX,v=this.maxY,g=s*e+u*r+l,y=a*e+h*r+c;d=g<d?g:d,f=y<f?y:f,p=g>p?g:p,v=y>v?y:v,y=a*n+h*r+c,d=(g=s*n+u*r+l)<d?g:d,f=y<f?y:f,p=g>p?g:p,v=y>v?y:v,y=a*e+h*i+c,d=(g=s*e+u*i+l)<d?g:d,f=y<f?y:f,p=g>p?g:p,v=y>v?y:v,y=a*n+h*i+c,d=(g=s*n+u*i+l)<d?g:d,f=y<f?y:f,p=g>p?g:p,v=y>v?y:v,this.minX=d,this.minY=f,this.maxX=p,this.maxY=v},t.prototype.addVertices=function(t,e,r,n){for(var i=t.worldTransform,o=i.a,s=i.b,a=i.c,u=i.d,h=i.tx,l=i.ty,c=this.minX,d=this.minY,f=this.maxX,p=this.maxY,v=r;v<n;v+=2){var g=e[v],y=e[v+1],m=o*g+a*y+h,_=u*y+s*g+l;c=m<c?m:c,d=_<d?_:d,f=m>f?m:f,p=_>p?_:p}this.minX=c,this.minY=d,this.maxX=f,this.maxY=p},t.prototype.addBounds=function(t){var e=this.minX,r=this.minY,n=this.maxX,i=this.maxY;this.minX=t.minX<e?t.minX:e,this.minY=t.minY<r?t.minY:r,this.maxX=t.maxX>n?t.maxX:n,this.maxY=t.maxY>i?t.maxY:i},t.prototype.addBoundsMask=function(t,e){var r=t.minX>e.minX?t.minX:e.minX,n=t.minY>e.minY?t.minY:e.minY,i=t.maxX<e.maxX?t.maxX:e.maxX,o=t.maxY<e.maxY?t.maxY:e.maxY;if(r<=i&&n<=o){var s=this.minX,a=this.minY,u=this.maxX,h=this.maxY;this.minX=r<s?r:s,this.minY=n<a?n:a,this.maxX=i>u?i:u,this.maxY=o>h?o:h}},t.prototype.addBoundsArea=function(t,e){var r=t.minX>e.x?t.minX:e.x,n=t.minY>e.y?t.minY:e.y,i=t.maxX<e.x+e.width?t.maxX:e.x+e.width,o=t.maxY<e.y+e.height?t.maxY:e.y+e.height;if(r<=i&&n<=o){var s=this.minX,a=this.minY,u=this.maxX,h=this.maxY;this.minX=r<s?r:s,this.minY=n<a?n:a,this.maxX=i>u?i:u,this.maxY=o>h?o:h}},t}();r.default=i},{"../math":70}],48:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=t("../utils"),s=t("./DisplayObject");var a=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return r.children=[],r}return e.prototype.onChildrenChange=function(){},e.prototype.addChild=function(t){var e=arguments.length;if(e>1)for(var r=0;r<e;r++)this.addChild(arguments[r]);else t.parent&&t.parent.removeChild(t),t.parent=this,t.transform._parentID=-1,this.children.push(t),this._boundsID++,this.onChildrenChange(this.children.length-1),t.emit("added",this);return t},e.prototype.addChildAt=function(t,e){if(e<0||e>this.children.length)throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),t},e.prototype.swapChildren=function(t,e){if(t!==e){var r=this.getChildIndex(t),n=this.getChildIndex(e);this.children[r]=e,this.children[n]=t,this.onChildrenChange(r<n?r:n)}},e.prototype.getChildIndex=function(t){var e=this.children.indexOf(t);if(-1===e)throw new Error("The supplied DisplayObject must be a child of the caller");return e},e.prototype.setChildIndex=function(t,e){if(e<0||e>=this.children.length)throw new Error("The supplied index is out of bounds");var r=this.getChildIndex(t);(0,o.removeItems)(this.children,r,1),this.children.splice(e,0,t),this.onChildrenChange(e)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},e.prototype.removeChild=function(t){var e=arguments.length;if(e>1)for(var r=0;r<e;r++)this.removeChild(arguments[r]);else{var n=this.children.indexOf(t);if(-1===n)return null;t.parent=null,t.transform._parentID=-1,(0,o.removeItems)(this.children,n,1),this._boundsID++,this.onChildrenChange(n),t.emit("removed",this)}return t},e.prototype.removeChildAt=function(t){var e=this.getChildAt(t);return e.parent=null,e.transform._parentID=-1,(0,o.removeItems)(this.children,t,1),this._boundsID++,this.onChildrenChange(t),e.emit("removed",this),e},e.prototype.removeChildren=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments[1],r=t,n="number"==typeof e?e:this.children.length,i=n-r,o=void 0;if(i>0&&i<=n){o=this.children.splice(r,i);for(var s=0;s<o.length;++s)o[s].parent=null,o[s].transform&&(o[s].transform._parentID=-1);this._boundsID++,this.onChildrenChange(t);for(var a=0;a<o.length;++a)o[a].emit("removed",this);return o}if(0===i&&0===this.children.length)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},e.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,e=this.children.length;t<e;++t){var r=this.children[t];r.visible&&r.updateTransform()}},e.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var t=0;t<this.children.length;t++){var e=this.children[t];e.visible&&e.renderable&&(e.calculateBounds(),e._mask?(e._mask.calculateBounds(),this._bounds.addBoundsMask(e._bounds,e._mask._bounds)):e.filterArea?this._bounds.addBoundsArea(e._bounds,e.filterArea):this._bounds.addBounds(e._bounds))}this._lastBoundsID=this._boundsID},e.prototype._calculateBounds=function(){},e.prototype.renderWebGL=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this._filters)this.renderAdvancedWebGL(t);else{this._renderWebGL(t);for(var e=0,r=this.children.length;e<r;++e)this.children[e].renderWebGL(t)}},e.prototype.renderAdvancedWebGL=function(t){t.flush();var e=this._filters,r=this._mask;if(e){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var n=0;n<e.length;n++)e[n].enabled&&this._enabledFilters.push(e[n]);this._enabledFilters.length&&t.filterManager.pushFilter(this,this._enabledFilters)}r&&t.maskManager.pushMask(this,this._mask),this._renderWebGL(t);for(var i=0,o=this.children.length;i<o;i++)this.children[i].renderWebGL(t);t.flush(),r&&t.maskManager.popMask(this,this._mask),e&&this._enabledFilters&&this._enabledFilters.length&&t.filterManager.popFilter()},e.prototype._renderWebGL=function(t){},e.prototype._renderCanvas=function(t){},e.prototype.renderCanvas=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable){this._mask&&t.maskManager.pushMask(this._mask),this._renderCanvas(t);for(var e=0,r=this.children.length;e<r;++e)this.children[e].renderCanvas(t);this._mask&&t.maskManager.popMask(t)}},e.prototype.destroy=function(e){t.prototype.destroy.call(this);var r="boolean"==typeof e?e:e&&e.children,n=this.removeChildren(0,this.children.length);if(r)for(var i=0;i<n.length;++i)n[i].destroy(e)},i(e,[{key:"width",get:function(){return this.scale.x*this.getLocalBounds().width},set:function(t){var e=this.getLocalBounds().width;this.scale.x=0!==e?t/e:1,this._width=t}},{key:"height",get:function(){return this.scale.y*this.getLocalBounds().height},set:function(t){var e=this.getLocalBounds().height;this.scale.y=0!==e?t/e:1,this._height=t}}]),e}((n=s,n&&n.__esModule?n:{default:n}).default);r.default=a,a.prototype.containerUpdateTransform=a.prototype.updateTransform},{"../utils":125,"./DisplayObject":49}],49:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=c(t("eventemitter3")),o=t("../const"),s=c(t("../settings")),a=c(t("./TransformStatic")),u=c(t("./Transform")),h=c(t("./Bounds")),l=t("../math");function c(t){return t&&t.__esModule?t:{default:t}}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this)),n=s.default.TRANSFORM_MODE===o.TRANSFORM_MODE.STATIC?a.default:u.default;return r.tempDisplayObjectParent=null,r.transform=new n,r.alpha=1,r.visible=!0,r.renderable=!0,r.parent=null,r.worldAlpha=1,r.filterArea=null,r._filters=null,r._enabledFilters=null,r._bounds=new h.default,r._boundsID=0,r._lastBoundsID=-1,r._boundsRect=null,r._localBoundsRect=null,r._mask=null,r._destroyed=!1,r}return e.prototype.updateTransform=function(){this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha,this._bounds.updateID++},e.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},e.prototype.getBounds=function(t,e){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._boundsID!==this._lastBoundsID&&this.calculateBounds(),e||(this._boundsRect||(this._boundsRect=new l.Rectangle),e=this._boundsRect),this._bounds.getRectangle(e)},e.prototype.getLocalBounds=function(t){var e=this.transform,r=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform,t||(this._localBoundsRect||(this._localBoundsRect=new l.Rectangle),t=this._localBoundsRect);var n=this.getBounds(!1,t);return this.parent=r,this.transform=e,n},e.prototype.toGlobal=function(t,e){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,e)},e.prototype.toLocal=function(t,e,r,n){return e&&(t=e.toGlobal(t,r,n)),n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,r)},e.prototype.renderWebGL=function(t){},e.prototype.renderCanvas=function(t){},e.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},e.prototype.setTransform=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0;return this.position.x=t,this.position.y=e,this.scale.x=r||1,this.scale.y=n||1,this.rotation=i,this.skew.x=o,this.skew.y=s,this.pivot.x=a,this.pivot.y=u,this},e.prototype.destroy=function(){this.removeAllListeners(),this.parent&&this.parent.removeChild(this),this.transform=null,this.parent=null,this._bounds=null,this._currentBounds=null,this._mask=null,this.filterArea=null,this.interactive=!1,this.interactiveChildren=!1,this._destroyed=!0},n(e,[{key:"_tempDisplayObjectParent",get:function(){return null===this.tempDisplayObjectParent&&(this.tempDisplayObjectParent=new e),this.tempDisplayObjectParent}},{key:"x",get:function(){return this.position.x},set:function(t){this.transform.position.x=t}},{key:"y",get:function(){return this.position.y},set:function(t){this.transform.position.y=t}},{key:"worldTransform",get:function(){return this.transform.worldTransform}},{key:"localTransform",get:function(){return this.transform.localTransform}},{key:"position",get:function(){return this.transform.position},set:function(t){this.transform.position.copy(t)}},{key:"scale",get:function(){return this.transform.scale},set:function(t){this.transform.scale.copy(t)}},{key:"pivot",get:function(){return this.transform.pivot},set:function(t){this.transform.pivot.copy(t)}},{key:"skew",get:function(){return this.transform.skew},set:function(t){this.transform.skew.copy(t)}},{key:"rotation",get:function(){return this.transform.rotation},set:function(t){this.transform.rotation=t}},{key:"worldVisible",get:function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}},{key:"mask",get:function(){return this._mask},set:function(t){this._mask&&(this._mask.renderable=!0),this._mask=t,this._mask&&(this._mask.renderable=!1)}},{key:"filters",get:function(){return this._filters&&this._filters.slice()},set:function(t){this._filters=t&&t.slice()}}]),e}(i.default);r.default=d,d.prototype.displayObjectUpdateTransform=d.prototype.updateTransform},{"../const":46,"../math":70,"../settings":101,"./Bounds":47,"./Transform":50,"./TransformStatic":52,eventemitter3:3}],50:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=t("../math"),s=t("./TransformBase");var a=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return r.position=new o.Point(0,0),r.scale=new o.Point(1,1),r.skew=new o.ObservablePoint(r.updateSkew,r,0,0),r.pivot=new o.Point(0,0),r._rotation=0,r._cx=1,r._sx=0,r._cy=0,r._sy=1,r}return e.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew._y),this._sx=Math.sin(this._rotation+this.skew._y),this._cy=-Math.sin(this._rotation-this.skew._x),this._sy=Math.cos(this._rotation-this.skew._x)},e.prototype.updateLocalTransform=function(){var t=this.localTransform;t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d)},e.prototype.updateTransform=function(t){var e=this.localTransform;e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d);var r=t.worldTransform,n=this.worldTransform;n.a=e.a*r.a+e.b*r.c,n.b=e.a*r.b+e.b*r.d,n.c=e.c*r.a+e.d*r.c,n.d=e.c*r.b+e.d*r.d,n.tx=e.tx*r.a+e.ty*r.c+r.tx,n.ty=e.tx*r.b+e.ty*r.d+r.ty,this._worldID++},e.prototype.setFromMatrix=function(t){t.decompose(this)},i(e,[{key:"rotation",get:function(){return this._rotation},set:function(t){this._rotation=t,this.updateSkew()}}]),e}((n=s,n&&n.__esModule?n:{default:n}).default);r.default=a},{"../math":70,"./TransformBase":51}],51:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("../math");var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.worldTransform=new n.Matrix,this.localTransform=new n.Matrix,this._worldID=0,this._parentID=0}return t.prototype.updateLocalTransform=function(){},t.prototype.updateTransform=function(t){var e=t.worldTransform,r=this.worldTransform,n=this.localTransform;r.a=n.a*e.a+n.b*e.c,r.b=n.a*e.b+n.b*e.d,r.c=n.c*e.a+n.d*e.c,r.d=n.c*e.b+n.d*e.d,r.tx=n.tx*e.a+n.ty*e.c+e.tx,r.ty=n.tx*e.b+n.ty*e.d+e.ty,this._worldID++},t}();r.default=i,i.prototype.updateWorldTransform=i.prototype.updateTransform,i.IDENTITY=new i},{"../math":70}],52:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=t("../math"),s=t("./TransformBase");var a=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return r.position=new o.ObservablePoint(r.onChange,r,0,0),r.scale=new o.ObservablePoint(r.onChange,r,1,1),r.pivot=new o.ObservablePoint(r.onChange,r,0,0),r.skew=new o.ObservablePoint(r.updateSkew,r,0,0),r._rotation=0,r._cx=1,r._sx=0,r._cy=0,r._sy=1,r._localID=0,r._currentLocalID=0,r}return e.prototype.onChange=function(){this._localID++},e.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew._y),this._sx=Math.sin(this._rotation+this.skew._y),this._cy=-Math.sin(this._rotation-this.skew._x),this._sy=Math.cos(this._rotation-this.skew._x),this._localID++},e.prototype.updateLocalTransform=function(){var t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale._x,t.b=this._sx*this.scale._x,t.c=this._cy*this.scale._y,t.d=this._sy*this.scale._y,t.tx=this.position._x-(this.pivot._x*t.a+this.pivot._y*t.c),t.ty=this.position._y-(this.pivot._x*t.b+this.pivot._y*t.d),this._currentLocalID=this._localID,this._parentID=-1)},e.prototype.updateTransform=function(t){var e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale._x,e.b=this._sx*this.scale._x,e.c=this._cy*this.scale._y,e.d=this._sy*this.scale._y,e.tx=this.position._x-(this.pivot._x*e.a+this.pivot._y*e.c),e.ty=this.position._y-(this.pivot._x*e.b+this.pivot._y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){var r=t.worldTransform,n=this.worldTransform;n.a=e.a*r.a+e.b*r.c,n.b=e.a*r.b+e.b*r.d,n.c=e.c*r.a+e.d*r.c,n.d=e.c*r.b+e.d*r.d,n.tx=e.tx*r.a+e.ty*r.c+r.tx,n.ty=e.tx*r.b+e.ty*r.d+r.ty,this._parentID=t._worldID,this._worldID++}},e.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},i(e,[{key:"rotation",get:function(){return this._rotation},set:function(t){this._rotation=t,this.updateSkew()}}]),e}((n=s,n&&n.__esModule?n:{default:n}).default);r.default=a},{"../math":70,"./TransformBase":51}],53:[function(t,e,r){"use strict";r.__esModule=!0;var n=p(t("../display/Container")),i=p(t("../textures/RenderTexture")),o=p(t("../textures/Texture")),s=p(t("./GraphicsData")),a=p(t("../sprites/Sprite")),u=t("../math"),h=t("../utils"),l=t("../const"),c=p(t("../display/Bounds")),d=p(t("./utils/bezierCurveTo")),f=p(t("../renderers/canvas/CanvasRenderer"));function p(t){return t&&t.__esModule?t:{default:t}}var v=void 0,g=new u.Matrix,y=new u.Point,m=new Float32Array(4),_=new Float32Array(4),b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return n.fillAlpha=1,n.lineWidth=0,n.nativeLines=r,n.lineColor=0,n.graphicsData=[],n.tint=16777215,n._prevTint=16777215,n.blendMode=l.BLEND_MODES.NORMAL,n.currentPath=null,n._webGL={},n.isMask=!1,n.boundsPadding=0,n._localBounds=new c.default,n.dirty=0,n.fastRectDirty=-1,n.clearDirty=0,n.boundsDirty=-1,n.cachedSpriteDirty=!1,n._spriteRect=null,n._fastRect=!1,n}return e.prototype.clone=function(){var t=new e;t.renderable=this.renderable,t.fillAlpha=this.fillAlpha,t.lineWidth=this.lineWidth,t.lineColor=this.lineColor,t.tint=this.tint,t.blendMode=this.blendMode,t.isMask=this.isMask,t.boundsPadding=this.boundsPadding,t.dirty=0,t.cachedSpriteDirty=this.cachedSpriteDirty;for(var r=0;r<this.graphicsData.length;++r)t.graphicsData.push(this.graphicsData[r].clone());return t.currentPath=t.graphicsData[t.graphicsData.length-1],t.updateLocalBounds(),t},e.prototype.lineStyle=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(this.lineWidth=t,this.lineColor=e,this.lineAlpha=r,this.currentPath)if(this.currentPath.shape.points.length){var n=new u.Polygon(this.currentPath.shape.points.slice(-2));n.closed=!1,this.drawShape(n)}else this.currentPath.lineWidth=this.lineWidth,this.currentPath.lineColor=this.lineColor,this.currentPath.lineAlpha=this.lineAlpha;return this},e.prototype.moveTo=function(t,e){var r=new u.Polygon([t,e]);return r.closed=!1,this.drawShape(r),this},e.prototype.lineTo=function(t,e){return this.currentPath.shape.points.push(t,e),this.dirty++,this},e.prototype.quadraticCurveTo=function(t,e,r,n){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var i=this.currentPath.shape.points,o=0,s=0;0===i.length&&this.moveTo(0,0);for(var a=i[i.length-2],u=i[i.length-1],h=1;h<=20;++h){var l=h/20;o=a+(t-a)*l,s=u+(e-u)*l,i.push(o+(t+(r-t)*l-o)*l,s+(e+(n-e)*l-s)*l)}return this.dirty++,this},e.prototype.bezierCurveTo=function(t,e,r,n,i,o){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var s=this.currentPath.shape.points,a=s[s.length-2],u=s[s.length-1];return s.length-=2,(0,d.default)(a,u,t,e,r,n,i,o,s),this.dirty++,this},e.prototype.arcTo=function(t,e,r,n,i){this.currentPath?0===this.currentPath.shape.points.length&&this.currentPath.shape.points.push(t,e):this.moveTo(t,e);var o=this.currentPath.shape.points,s=o[o.length-2],a=o[o.length-1]-e,u=s-t,h=n-e,l=r-t,c=Math.abs(a*l-u*h);if(c<1e-8||0===i)o[o.length-2]===t&&o[o.length-1]===e||o.push(t,e);else{var d=a*a+u*u,f=h*h+l*l,p=a*h+u*l,v=i*Math.sqrt(d)/c,g=i*Math.sqrt(f)/c,y=v*p/d,m=g*p/f,_=v*l+g*u,b=v*h+g*a,x=u*(g+y),T=a*(g+y),w=l*(v+m),E=h*(v+m),S=Math.atan2(T-b,x-_),O=Math.atan2(E-b,w-_);this.arc(_+t,b+e,i,S,O,u*h>l*a)}return this.dirty++,this},e.prototype.arc=function(t,e,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(n===i)return this;!o&&i<=n?i+=2*Math.PI:o&&n<=i&&(n+=2*Math.PI);var s=i-n,a=40*Math.ceil(Math.abs(s)/(2*Math.PI));if(0===s)return this;var u=t+Math.cos(n)*r,h=e+Math.sin(n)*r,l=this.currentPath?this.currentPath.shape.points:null;l?l[l.length-2]===u&&l[l.length-1]===h||l.push(u,h):(this.moveTo(u,h),l=this.currentPath.shape.points);for(var c=s/(2*a),d=2*c,f=Math.cos(c),p=Math.sin(c),v=a-1,g=v%1/v,y=0;y<=v;++y){var m=c+n+d*(y+g*y),_=Math.cos(m),b=-Math.sin(m);l.push((f*_+p*b)*r+t,(f*-b+p*_)*r+e)}return this.dirty++,this},e.prototype.beginFill=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.filling=!0,this.fillColor=t,this.fillAlpha=e,this.currentPath&&this.currentPath.shape.points.length<=2&&(this.currentPath.fill=this.filling,this.currentPath.fillColor=this.fillColor,this.currentPath.fillAlpha=this.fillAlpha),this},e.prototype.endFill=function(){return this.filling=!1,this.fillColor=null,this.fillAlpha=1,this},e.prototype.drawRect=function(t,e,r,n){return this.drawShape(new u.Rectangle(t,e,r,n)),this},e.prototype.drawRoundedRect=function(t,e,r,n,i){return this.drawShape(new u.RoundedRectangle(t,e,r,n,i)),this},e.prototype.drawCircle=function(t,e,r){return this.drawShape(new u.Circle(t,e,r)),this},e.prototype.drawEllipse=function(t,e,r,n){return this.drawShape(new u.Ellipse(t,e,r,n)),this},e.prototype.drawPolygon=function(t){var e=t,r=!0;if(e instanceof u.Polygon&&(r=e.closed,e=e.points),!Array.isArray(e)){e=new Array(arguments.length);for(var n=0;n<e.length;++n)e[n]=arguments[n]}var i=new u.Polygon(e);return i.closed=r,this.drawShape(i),this},e.prototype.clear=function(){return(this.lineWidth||this.filling||this.graphicsData.length>0)&&(this.lineWidth=0,this.filling=!1,this.boundsDirty=-1,this.dirty++,this.clearDirty++,this.graphicsData.length=0),this.currentPath=null,this._spriteRect=null,this},e.prototype.isFastRect=function(){return 1===this.graphicsData.length&&this.graphicsData[0].shape.type===l.SHAPES.RECT&&!this.graphicsData[0].lineWidth},e.prototype._renderWebGL=function(t){this.dirty!==this.fastRectDirty&&(this.fastRectDirty=this.dirty,this._fastRect=this.isFastRect()),this._fastRect?this._renderSpriteRect(t):(t.setObjectRenderer(t.plugins.graphics),t.plugins.graphics.render(this))},e.prototype._renderSpriteRect=function(t){var e=this.graphicsData[0].shape;this._spriteRect||(this._spriteRect=new a.default(new o.default(o.default.WHITE)));var r=this._spriteRect;if(16777215===this.tint)r.tint=this.graphicsData[0].fillColor;else{var n=m,i=_;(0,h.hex2rgb)(this.graphicsData[0].fillColor,n),(0,h.hex2rgb)(this.tint,i),n[0]*=i[0],n[1]*=i[1],n[2]*=i[2],r.tint=(0,h.rgb2hex)(n)}r.alpha=this.graphicsData[0].fillAlpha,r.worldAlpha=this.worldAlpha*r.alpha,r.blendMode=this.blendMode,r._texture._frame.width=e.width,r._texture._frame.height=e.height,r.transform.worldTransform=this.transform.worldTransform,r.anchor.set(-e.x/e.width,-e.y/e.height),r._onAnchorUpdate(),r._renderWebGL(t)},e.prototype._renderCanvas=function(t){!0!==this.isMask&&t.plugins.graphics.render(this)},e.prototype._calculateBounds=function(){this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.updateLocalBounds(),this.cachedSpriteDirty=!0);var t=this._localBounds;this._bounds.addFrame(this.transform,t.minX,t.minY,t.maxX,t.maxY)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,y);for(var e=this.graphicsData,r=0;r<e.length;++r){var n=e[r];if(n.fill&&(n.shape&&n.shape.contains(y.x,y.y))){if(n.holes)for(var i=0;i<n.holes.length;i++){if(n.holes[i].contains(y.x,y.y))return!1}return!0}}return!1},e.prototype.updateLocalBounds=function(){var t=1/0,e=-1/0,r=1/0,n=-1/0;if(this.graphicsData.length)for(var i=0,o=0,s=0,a=0,u=0,h=0;h<this.graphicsData.length;h++){var c=this.graphicsData[h],d=c.type,f=c.lineWidth;if(i=c.shape,d===l.SHAPES.RECT||d===l.SHAPES.RREC)o=i.x-f/2,s=i.y-f/2,a=i.width+f,u=i.height+f,t=o<t?o:t,e=o+a>e?o+a:e,r=s<r?s:r,n=s+u>n?s+u:n;else if(d===l.SHAPES.CIRC)o=i.x,s=i.y,a=i.radius+f/2,u=i.radius+f/2,t=o-a<t?o-a:t,e=o+a>e?o+a:e,r=s-u<r?s-u:r,n=s+u>n?s+u:n;else if(d===l.SHAPES.ELIP)o=i.x,s=i.y,a=i.width+f/2,u=i.height+f/2,t=o-a<t?o-a:t,e=o+a>e?o+a:e,r=s-u<r?s-u:r,n=s+u>n?s+u:n;else for(var p=i.points,v=0,g=0,y=0,m=0,_=0,b=0,x=0,T=0,w=0;w+2<p.length;w+=2)o=p[w],s=p[w+1],v=p[w+2],g=p[w+3],y=Math.abs(v-o),m=Math.abs(g-s),u=f,(a=Math.sqrt(y*y+m*m))<1e-9||(b=(u/a*y+m)/2,T=(g+s)/2,t=(x=(v+o)/2)-(_=(u/a*m+y)/2)<t?x-_:t,e=x+_>e?x+_:e,r=T-b<r?T-b:r,n=T+b>n?T+b:n)}else t=0,e=0,r=0,n=0;var E=this.boundsPadding;this._localBounds.minX=t-E,this._localBounds.maxX=e+E,this._localBounds.minY=r-E,this._localBounds.maxY=n+E},e.prototype.drawShape=function(t){this.currentPath&&this.currentPath.shape.points.length<=2&&this.graphicsData.pop(),this.currentPath=null;var e=new s.default(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.filling,this.nativeLines,t);return this.graphicsData.push(e),e.type===l.SHAPES.POLY&&(e.shape.closed=e.shape.closed||this.filling,this.currentPath=e),this.dirty++,e},e.prototype.generateCanvasTexture=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=this.getLocalBounds(),n=i.default.create(r.width,r.height,t,e);v||(v=new f.default),this.transform.updateLocalTransform(),this.transform.localTransform.copy(g),g.invert(),g.tx-=r.x,g.ty-=r.y,v.render(this,n,!0,g);var s=o.default.fromCanvas(n.baseTexture._canvasRenderTarget.canvas,t,"graphics");return s.baseTexture.resolution=e,s.baseTexture.update(),s},e.prototype.closePath=function(){var t=this.currentPath;return t&&t.shape&&t.shape.close(),this},e.prototype.addHole=function(){var t=this.graphicsData.pop();return this.currentPath=this.graphicsData[this.graphicsData.length-1],this.currentPath.addHole(t.shape),this.currentPath=null,this},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e);for(var r=0;r<this.graphicsData.length;++r)this.graphicsData[r].destroy();for(var n in this._webgl)for(var i=0;i<this._webgl[n].data.length;++i)this._webgl[n].data[i].destroy();this._spriteRect&&this._spriteRect.destroy(),this.graphicsData=null,this.currentPath=null,this._webgl=null,this._localBounds=null},e}(n.default);r.default=b,b._SPRITE_TEXTURE=null},{"../const":46,"../display/Bounds":47,"../display/Container":48,"../math":70,"../renderers/canvas/CanvasRenderer":77,"../sprites/Sprite":102,"../textures/RenderTexture":113,"../textures/Texture":115,"../utils":125,"./GraphicsData":54,"./utils/bezierCurveTo":56}],54:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(e,r,n,i,o,s,a,u){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.lineWidth=e,this.nativeLines=a,this.lineColor=r,this.lineAlpha=n,this._lineTint=r,this.fillColor=i,this.fillAlpha=o,this._fillTint=i,this.fill=s,this.holes=[],this.shape=u,this.type=u.type}return t.prototype.clone=function(){return new t(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.fill,this.nativeLines,this.shape)},t.prototype.addHole=function(t){this.holes.push(t)},t.prototype.destroy=function(){this.shape=null,this.holes=null},t}();r.default=n},{}],55:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=t("../../renderers/canvas/CanvasRenderer"),o=(n=i,n&&n.__esModule?n:{default:n}),s=t("../../const");var a=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e}return t.prototype.render=function(t){var e=this.renderer,r=e.context,n=t.worldAlpha,i=t.transform.worldTransform,o=e.resolution;this._prevTint!==this.tint&&(this.dirty=!0),r.setTransform(i.a*o,i.b*o,i.c*o,i.d*o,i.tx*o,i.ty*o),t.dirty&&(this.updateGraphicsTint(t),t.dirty=!1),e.setBlendMode(t.blendMode);for(var a=0;a<t.graphicsData.length;a++){var u=t.graphicsData[a],h=u.shape,l=u._fillTint,c=u._lineTint;if(r.lineWidth=u.lineWidth,u.type===s.SHAPES.POLY){r.beginPath(),this.renderPolygon(h.points,h.closed,r);for(var d=0;d<u.holes.length;d++)this.renderPolygon(u.holes[d].points,!0,r);u.fill&&(r.globalAlpha=u.fillAlpha*n,r.fillStyle="#"+("00000"+(0|l).toString(16)).substr(-6),r.fill()),u.lineWidth&&(r.globalAlpha=u.lineAlpha*n,r.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.stroke())}else if(u.type===s.SHAPES.RECT)(u.fillColor||0===u.fillColor)&&(r.globalAlpha=u.fillAlpha*n,r.fillStyle="#"+("00000"+(0|l).toString(16)).substr(-6),r.fillRect(h.x,h.y,h.width,h.height)),u.lineWidth&&(r.globalAlpha=u.lineAlpha*n,r.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.strokeRect(h.x,h.y,h.width,h.height));else if(u.type===s.SHAPES.CIRC)r.beginPath(),r.arc(h.x,h.y,h.radius,0,2*Math.PI),r.closePath(),u.fill&&(r.globalAlpha=u.fillAlpha*n,r.fillStyle="#"+("00000"+(0|l).toString(16)).substr(-6),r.fill()),u.lineWidth&&(r.globalAlpha=u.lineAlpha*n,r.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.stroke());else if(u.type===s.SHAPES.ELIP){var f=2*h.width,p=2*h.height,v=h.x-f/2,g=h.y-p/2;r.beginPath();var y=f/2*.5522848,m=p/2*.5522848,_=v+f,b=g+p,x=v+f/2,T=g+p/2;r.moveTo(v,T),r.bezierCurveTo(v,T-m,x-y,g,x,g),r.bezierCurveTo(x+y,g,_,T-m,_,T),r.bezierCurveTo(_,T+m,x+y,b,x,b),r.bezierCurveTo(x-y,b,v,T+m,v,T),r.closePath(),u.fill&&(r.globalAlpha=u.fillAlpha*n,r.fillStyle="#"+("00000"+(0|l).toString(16)).substr(-6),r.fill()),u.lineWidth&&(r.globalAlpha=u.lineAlpha*n,r.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.stroke())}else if(u.type===s.SHAPES.RREC){var w=h.x,E=h.y,S=h.width,O=h.height,M=h.radius,P=Math.min(S,O)/2|0;M=M>P?P:M,r.beginPath(),r.moveTo(w,E+M),r.lineTo(w,E+O-M),r.quadraticCurveTo(w,E+O,w+M,E+O),r.lineTo(w+S-M,E+O),r.quadraticCurveTo(w+S,E+O,w+S,E+O-M),r.lineTo(w+S,E+M),r.quadraticCurveTo(w+S,E,w+S-M,E),r.lineTo(w+M,E),r.quadraticCurveTo(w,E,w,E+M),r.closePath(),(u.fillColor||0===u.fillColor)&&(r.globalAlpha=u.fillAlpha*n,r.fillStyle="#"+("00000"+(0|l).toString(16)).substr(-6),r.fill()),u.lineWidth&&(r.globalAlpha=u.lineAlpha*n,r.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.stroke())}}},t.prototype.updateGraphicsTint=function(t){t._prevTint=t.tint;for(var e=(t.tint>>16&255)/255,r=(t.tint>>8&255)/255,n=(255&t.tint)/255,i=0;i<t.graphicsData.length;++i){var o=t.graphicsData[i],s=0|o.fillColor,a=0|o.lineColor;o._fillTint=((s>>16&255)/255*e*255<<16)+((s>>8&255)/255*r*255<<8)+(255&s)/255*n*255,o._lineTint=((a>>16&255)/255*e*255<<16)+((a>>8&255)/255*r*255<<8)+(255&a)/255*n*255}},t.prototype.renderPolygon=function(t,e,r){r.moveTo(t[0],t[1]);for(var n=1;n<t.length/2;++n)r.lineTo(t[2*n],t[2*n+1]);e&&r.closePath()},t.prototype.destroy=function(){this.renderer=null},t}();r.default=a,o.default.registerPlugin("graphics",a)},{"../../const":46,"../../renderers/canvas/CanvasRenderer":77}],56:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t,e,r,n,i,o,s,a){var u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:[],h=0,l=0,c=0,d=0,f=0;u.push(t,e);for(var p=1,v=0;p<=20;++p)c=(l=(h=1-(v=p/20))*h)*h,f=(d=v*v)*v,u.push(c*t+3*l*v*r+3*h*d*i+f*s,c*e+3*l*v*n+3*h*d*o+f*a);return u}},{}],57:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("../../utils"),i=t("../../const"),o=f(t("../../renderers/webgl/utils/ObjectRenderer")),s=f(t("../../renderers/webgl/WebGLRenderer")),a=f(t("./WebGLGraphicsData")),u=f(t("./shaders/PrimitiveShader")),h=f(t("./utils/buildPoly")),l=f(t("./utils/buildRectangle")),c=f(t("./utils/buildRoundedRectangle")),d=f(t("./utils/buildCircle"));function f(t){return t&&t.__esModule?t:{default:t}}var p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.graphicsDataPool=[],n.primitiveShader=null,n.gl=r.gl,n.CONTEXT_UID=0,n}return e.prototype.onContextChange=function(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.primitiveShader=new u.default(this.gl)},e.prototype.destroy=function(){o.default.prototype.destroy.call(this);for(var t=0;t<this.graphicsDataPool.length;++t)this.graphicsDataPool[t].destroy();this.graphicsDataPool=null},e.prototype.render=function(t){var e=this.renderer,r=e.gl,i=void 0,o=t._webGL[this.CONTEXT_UID];o&&t.dirty===o.dirty||(this.updateGraphics(t),o=t._webGL[this.CONTEXT_UID]);var s=this.primitiveShader;e.bindShader(s),e.state.setBlendMode(t.blendMode);for(var a=0,u=o.data.length;a<u;a++){var h=(i=o.data[a]).shader;e.bindShader(h),h.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),h.uniforms.tint=(0,n.hex2rgb)(t.tint),h.uniforms.alpha=t.worldAlpha,e.bindVao(i.vao),i.nativeLines?r.drawArrays(r.LINES,0,i.points.length/6):i.vao.draw(r.TRIANGLE_STRIP,i.indices.length)}},e.prototype.updateGraphics=function(t){var e=this.renderer.gl,r=t._webGL[this.CONTEXT_UID];if(r||(r=t._webGL[this.CONTEXT_UID]={lastIndex:0,data:[],gl:e,clearDirty:-1,dirty:-1}),r.dirty=t.dirty,t.clearDirty!==r.clearDirty){r.clearDirty=t.clearDirty;for(var n=0;n<r.data.length;n++)this.graphicsDataPool.push(r.data[n]);r.data.length=0,r.lastIndex=0}for(var o=void 0,s=void 0,a=r.lastIndex;a<t.graphicsData.length;a++){var u=t.graphicsData[a];o=this.getWebGLData(r,0),u.nativeLines&&u.lineWidth&&(s=this.getWebGLData(r,0,!0),r.lastIndex++),u.type===i.SHAPES.POLY&&(0,h.default)(u,o,s),u.type===i.SHAPES.RECT?(0,l.default)(u,o,s):u.type===i.SHAPES.CIRC||u.type===i.SHAPES.ELIP?(0,d.default)(u,o,s):u.type===i.SHAPES.RREC&&(0,c.default)(u,o,s),r.lastIndex++}this.renderer.bindVao(null);for(var f=0;f<r.data.length;f++)(o=r.data[f]).dirty&&o.upload()},e.prototype.getWebGLData=function(t,e,r){var n=t.data[t.data.length-1];return(!n||n.nativeLines!==r||n.points.length>32e4)&&((n=this.graphicsDataPool.pop()||new a.default(this.renderer.gl,this.primitiveShader,this.renderer.state.attribsState)).nativeLines=r,n.reset(e),t.data.push(n)),n.dirty=!0,n},e}(o.default);r.default=p,s.default.registerPlugin("graphics",p)},{"../../const":46,"../../renderers/webgl/WebGLRenderer":84,"../../renderers/webgl/utils/ObjectRenderer":94,"../../utils":125,"./WebGLGraphicsData":58,"./shaders/PrimitiveShader":59,"./utils/buildCircle":60,"./utils/buildPoly":62,"./utils/buildRectangle":63,"./utils/buildRoundedRectangle":64}],58:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=t("pixi-gl-core"),o=(n=i,n&&n.__esModule?n:{default:n});var s=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.gl=e,this.color=[0,0,0],this.points=[],this.indices=[],this.buffer=o.default.GLBuffer.createVertexBuffer(e),this.indexBuffer=o.default.GLBuffer.createIndexBuffer(e),this.dirty=!0,this.nativeLines=!1,this.glPoints=null,this.glIndices=null,this.shader=r,this.vao=new o.default.VertexArrayObject(e,n).addIndex(this.indexBuffer).addAttribute(this.buffer,r.attributes.aVertexPosition,e.FLOAT,!1,24,0).addAttribute(this.buffer,r.attributes.aColor,e.FLOAT,!1,24,8)}return t.prototype.reset=function(){this.points.length=0,this.indices.length=0},t.prototype.upload=function(){this.glPoints=new Float32Array(this.points),this.buffer.upload(this.glPoints),this.glIndices=new Uint16Array(this.indices),this.indexBuffer.upload(this.glIndices),this.dirty=!1},t.prototype.destroy=function(){this.color=null,this.points=null,this.indices=null,this.vao.destroy(),this.buffer.destroy(),this.indexBuffer.destroy(),this.gl=null,this.buffer=null,this.indexBuffer=null,this.glPoints=null,this.glIndices=null},t}();r.default=s},{"pixi-gl-core":15}],59:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=t("../../../Shader");var o=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,["attribute vec2 aVertexPosition;","attribute vec4 aColor;","uniform mat3 translationMatrix;","uniform mat3 projectionMatrix;","uniform float alpha;","uniform vec3 tint;","varying vec4 vColor;","void main(void){","   gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);","   vColor = aColor * vec4(tint * alpha, alpha);","}"].join("\n"),["varying vec4 vColor;","void main(void){","   gl_FragColor = vColor;","}"].join("\n")))}return e}((n=i,n&&n.__esModule?n:{default:n}).default);r.default=o},{"../../../Shader":44}],60:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t,e,r){var n=t.shape,i=n.x,u=n.y,h=void 0,l=void 0;t.type===s.SHAPES.CIRC?(h=n.radius,l=n.radius):(h=n.width,l=n.height);if(0===h||0===l)return;var c=Math.floor(30*Math.sqrt(n.radius))||Math.floor(15*Math.sqrt(n.width+n.height)),d=2*Math.PI/c;if(t.fill){var f=(0,a.hex2rgb)(t.fillColor),p=t.fillAlpha,v=f[0]*p,g=f[1]*p,y=f[2]*p,m=e.points,_=e.indices,b=m.length/6;_.push(b);for(var x=0;x<c+1;x++)m.push(i,u,v,g,y,p),m.push(i+Math.sin(d*x)*h,u+Math.cos(d*x)*l,v,g,y,p),_.push(b++,b++);_.push(b-1)}if(t.lineWidth){var T=t.points;t.points=[];for(var w=0;w<c+1;w++)t.points.push(i+Math.sin(d*w)*h,u+Math.cos(d*w)*l);(0,o.default)(t,e,r),t.points=T}};var n,i=t("./buildLine"),o=(n=i,n&&n.__esModule?n:{default:n}),s=t("../../../const"),a=t("../../../utils")},{"../../../const":46,"../../../utils":125,"./buildLine":61}],61:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t,e,r){t.nativeLines?function(t,e){var r=0,n=t.points;if(0===n.length)return;var o=e.points,s=n.length/2,a=(0,i.hex2rgb)(t.lineColor),u=t.lineAlpha,h=a[0]*u,l=a[1]*u,c=a[2]*u;for(r=1;r<s;r++){var d=n[2*(r-1)],f=n[2*(r-1)+1],p=n[2*r],v=n[2*r+1];o.push(d,f),o.push(h,l,c,u),o.push(p,v),o.push(h,l,c,u)}}(t,r):function(t,e){var r=t.points;if(0===r.length)return;var o=new n.Point(r[0],r[1]),s=new n.Point(r[r.length-2],r[r.length-1]);if(o.x===s.x&&o.y===s.y){(r=r.slice()).pop(),r.pop();var a=(s=new n.Point(r[r.length-2],r[r.length-1])).x+.5*(o.x-s.x),u=s.y+.5*(o.y-s.y);r.unshift(a,u),r.push(a,u)}var h=e.points,l=e.indices,c=r.length/2,d=r.length,f=h.length/6,p=t.lineWidth/2,v=(0,i.hex2rgb)(t.lineColor),g=t.lineAlpha,y=v[0]*g,m=v[1]*g,_=v[2]*g,b=r[0],x=r[1],T=r[2],w=r[3],E=0,S=0,O=-(x-w),M=b-T,P=0,C=0,R=0,A=0,I=Math.sqrt(O*O+M*M);O/=I,M/=I,O*=p,M*=p,h.push(b-O,x-M,y,m,_,g),h.push(b+O,x+M,y,m,_,g);for(var D=1;D<c-1;++D){b=r[2*(D-1)],x=r[2*(D-1)+1],T=r[2*D],w=r[2*D+1],E=r[2*(D+1)],S=r[2*(D+1)+1],O=-(x-w),M=b-T,I=Math.sqrt(O*O+M*M),O/=I,M/=I,O*=p,M*=p,P=-(w-S),C=T-E,I=Math.sqrt(P*P+C*C),P/=I,C/=I;var L=-M+x-(-M+w),N=-O+T-(-O+b),F=(-O+b)*(-M+w)-(-O+T)*(-M+x),B=-(C*=p)+S-(-C+w),k=-(P*=p)+T-(-P+E),j=(-P+E)*(-C+w)-(-P+T)*(-C+S),U=L*k-B*N;if(Math.abs(U)<.1)U+=10.1,h.push(T-O,w-M,y,m,_,g),h.push(T+O,w+M,y,m,_,g);else{var X=(N*j-k*F)/U,G=(B*F-L*j)/U,W=(X-T)*(X-T)+(G-w)*(G-w);W>196*p*p?(R=O-P,A=M-C,I=Math.sqrt(R*R+A*A),R/=I,A/=I,R*=p,A*=p,h.push(T-R,w-A),h.push(y,m,_,g),h.push(T+R,w+A),h.push(y,m,_,g),h.push(T-R,w-A),h.push(y,m,_,g),d++):(h.push(X,G),h.push(y,m,_,g),h.push(T-(X-T),w-(G-w)),h.push(y,m,_,g))}}b=r[2*(c-2)],x=r[2*(c-2)+1],T=r[2*(c-1)],w=r[2*(c-1)+1],O=-(x-w),M=b-T,I=Math.sqrt(O*O+M*M),O/=I,M/=I,O*=p,M*=p,h.push(T-O,w-M),h.push(y,m,_,g),h.push(T+O,w+M),h.push(y,m,_,g),l.push(f);for(var H=0;H<d;++H)l.push(f++);l.push(f-1)}(t,e)};var n=t("../../../math"),i=t("../../../utils")},{"../../../math":70,"../../../utils":125}],62:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t,e,r){t.points=t.shape.points.slice();var s=t.points;if(t.fill&&s.length>=6){for(var a=[],u=t.holes,h=0;h<u.length;h++){var l=u[h];a.push(s.length/2),s=s.concat(l.points)}var c=e.points,d=e.indices,f=s.length/2,p=(0,i.hex2rgb)(t.fillColor),v=t.fillAlpha,g=p[0]*v,y=p[1]*v,m=p[2]*v,_=(0,o.default)(s,a,2);if(!_)return;for(var b=c.length/6,x=0;x<_.length;x+=3)d.push(_[x]+b),d.push(_[x]+b),d.push(_[x+1]+b),d.push(_[x+2]+b),d.push(_[x+2]+b);for(var T=0;T<f;T++)c.push(s[2*T],s[2*T+1],g,y,m,v)}t.lineWidth>0&&(0,n.default)(t,e,r)};var n=s(t("./buildLine")),i=t("../../../utils"),o=s(t("earcut"));function s(t){return t&&t.__esModule?t:{default:t}}},{"../../../utils":125,"./buildLine":61,earcut:2}],63:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t,e,r){var n=t.shape,i=n.x,a=n.y,u=n.width,h=n.height;if(t.fill){var l=(0,s.hex2rgb)(t.fillColor),c=t.fillAlpha,d=l[0]*c,f=l[1]*c,p=l[2]*c,v=e.points,g=e.indices,y=v.length/6;v.push(i,a),v.push(d,f,p,c),v.push(i+u,a),v.push(d,f,p,c),v.push(i,a+h),v.push(d,f,p,c),v.push(i+u,a+h),v.push(d,f,p,c),g.push(y,y,y+1,y+2,y+3,y+3)}if(t.lineWidth){var m=t.points;t.points=[i,a,i+u,a,i+u,a+h,i,a+h,i,a],(0,o.default)(t,e,r),t.points=m}};var n,i=t("./buildLine"),o=(n=i,n&&n.__esModule?n:{default:n}),s=t("../../../utils")},{"../../../utils":125,"./buildLine":61}],64:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t,e,r){var s=t.shape,a=s.x,h=s.y,l=s.width,c=s.height,d=s.radius,f=[];if(f.push(a,h+d),u(a,h+c-d,a,h+c,a+d,h+c,f),u(a+l-d,h+c,a+l,h+c,a+l,h+c-d,f),u(a+l,h+d,a+l,h,a+l-d,h,f),u(a+d,h,a,h,a,h+d+1e-10,f),t.fill){for(var p=(0,o.hex2rgb)(t.fillColor),v=t.fillAlpha,g=p[0]*v,y=p[1]*v,m=p[2]*v,_=e.points,b=e.indices,x=_.length/6,T=(0,n.default)(f,null,2),w=0,E=T.length;w<E;w+=3)b.push(T[w]+x),b.push(T[w]+x),b.push(T[w+1]+x),b.push(T[w+2]+x),b.push(T[w+2]+x);for(var S=0,O=f.length;S<O;S++)_.push(f[S],f[++S],g,y,m,v)}if(t.lineWidth){var M=t.points;t.points=f,(0,i.default)(t,e,r),t.points=M}};var n=s(t("earcut")),i=s(t("./buildLine")),o=t("../../../utils");function s(t){return t&&t.__esModule?t:{default:t}}function a(t,e,r){return t+(e-t)*r}function u(t,e,r,n,i,o){for(var s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[],u=0,h=0,l=0,c=0,d=0,f=0,p=0,v=0;p<=20;++p)u=a(t,r,v=p/20),h=a(e,n,v),l=a(r,i,v),c=a(n,o,v),d=a(u,l,v),f=a(h,c,v),s.push(d,f);return s}},{"../../../utils":125,"./buildLine":61,earcut:2}],65:[function(t,e,r){"use strict";r.__esModule=!0,r.autoDetectRenderer=r.Application=r.Filter=r.SpriteMaskFilter=r.Quad=r.RenderTarget=r.ObjectRenderer=r.WebGLManager=r.Shader=r.CanvasRenderTarget=r.TextureUvs=r.VideoBaseTexture=r.BaseRenderTexture=r.RenderTexture=r.BaseTexture=r.TextureMatrix=r.Texture=r.Spritesheet=r.CanvasGraphicsRenderer=r.GraphicsRenderer=r.GraphicsData=r.Graphics=r.TextMetrics=r.TextStyle=r.Text=r.SpriteRenderer=r.CanvasTinter=r.CanvasSpriteRenderer=r.Sprite=r.TransformBase=r.TransformStatic=r.Transform=r.Container=r.DisplayObject=r.Bounds=r.glCore=r.WebGLRenderer=r.CanvasRenderer=r.ticker=r.utils=r.settings=void 0;var n=t("./const");Object.keys(n).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(r,t,{enumerable:!0,get:function(){return n[t]}})});var i=t("./math");Object.keys(i).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(r,t,{enumerable:!0,get:function(){return i[t]}})});var o=t("pixi-gl-core");Object.defineProperty(r,"glCore",{enumerable:!0,get:function(){return z(o).default}});var s=t("./display/Bounds");Object.defineProperty(r,"Bounds",{enumerable:!0,get:function(){return z(s).default}});var a=t("./display/DisplayObject");Object.defineProperty(r,"DisplayObject",{enumerable:!0,get:function(){return z(a).default}});var u=t("./display/Container");Object.defineProperty(r,"Container",{enumerable:!0,get:function(){return z(u).default}});var h=t("./display/Transform");Object.defineProperty(r,"Transform",{enumerable:!0,get:function(){return z(h).default}});var l=t("./display/TransformStatic");Object.defineProperty(r,"TransformStatic",{enumerable:!0,get:function(){return z(l).default}});var c=t("./display/TransformBase");Object.defineProperty(r,"TransformBase",{enumerable:!0,get:function(){return z(c).default}});var d=t("./sprites/Sprite");Object.defineProperty(r,"Sprite",{enumerable:!0,get:function(){return z(d).default}});var f=t("./sprites/canvas/CanvasSpriteRenderer");Object.defineProperty(r,"CanvasSpriteRenderer",{enumerable:!0,get:function(){return z(f).default}});var p=t("./sprites/canvas/CanvasTinter");Object.defineProperty(r,"CanvasTinter",{enumerable:!0,get:function(){return z(p).default}});var v=t("./sprites/webgl/SpriteRenderer");Object.defineProperty(r,"SpriteRenderer",{enumerable:!0,get:function(){return z(v).default}});var g=t("./text/Text");Object.defineProperty(r,"Text",{enumerable:!0,get:function(){return z(g).default}});var y=t("./text/TextStyle");Object.defineProperty(r,"TextStyle",{enumerable:!0,get:function(){return z(y).default}});var m=t("./text/TextMetrics");Object.defineProperty(r,"TextMetrics",{enumerable:!0,get:function(){return z(m).default}});var _=t("./graphics/Graphics");Object.defineProperty(r,"Graphics",{enumerable:!0,get:function(){return z(_).default}});var b=t("./graphics/GraphicsData");Object.defineProperty(r,"GraphicsData",{enumerable:!0,get:function(){return z(b).default}});var x=t("./graphics/webgl/GraphicsRenderer");Object.defineProperty(r,"GraphicsRenderer",{enumerable:!0,get:function(){return z(x).default}});var T=t("./graphics/canvas/CanvasGraphicsRenderer");Object.defineProperty(r,"CanvasGraphicsRenderer",{enumerable:!0,get:function(){return z(T).default}});var w=t("./textures/Spritesheet");Object.defineProperty(r,"Spritesheet",{enumerable:!0,get:function(){return z(w).default}});var E=t("./textures/Texture");Object.defineProperty(r,"Texture",{enumerable:!0,get:function(){return z(E).default}});var S=t("./textures/TextureMatrix");Object.defineProperty(r,"TextureMatrix",{enumerable:!0,get:function(){return z(S).default}});var O=t("./textures/BaseTexture");Object.defineProperty(r,"BaseTexture",{enumerable:!0,get:function(){return z(O).default}});var M=t("./textures/RenderTexture");Object.defineProperty(r,"RenderTexture",{enumerable:!0,get:function(){return z(M).default}});var P=t("./textures/BaseRenderTexture");Object.defineProperty(r,"BaseRenderTexture",{enumerable:!0,get:function(){return z(P).default}});var C=t("./textures/VideoBaseTexture");Object.defineProperty(r,"VideoBaseTexture",{enumerable:!0,get:function(){return z(C).default}});var R=t("./textures/TextureUvs");Object.defineProperty(r,"TextureUvs",{enumerable:!0,get:function(){return z(R).default}});var A=t("./renderers/canvas/utils/CanvasRenderTarget");Object.defineProperty(r,"CanvasRenderTarget",{enumerable:!0,get:function(){return z(A).default}});var I=t("./Shader");Object.defineProperty(r,"Shader",{enumerable:!0,get:function(){return z(I).default}});var D=t("./renderers/webgl/managers/WebGLManager");Object.defineProperty(r,"WebGLManager",{enumerable:!0,get:function(){return z(D).default}});var L=t("./renderers/webgl/utils/ObjectRenderer");Object.defineProperty(r,"ObjectRenderer",{enumerable:!0,get:function(){return z(L).default}});var N=t("./renderers/webgl/utils/RenderTarget");Object.defineProperty(r,"RenderTarget",{enumerable:!0,get:function(){return z(N).default}});var F=t("./renderers/webgl/utils/Quad");Object.defineProperty(r,"Quad",{enumerable:!0,get:function(){return z(F).default}});var B=t("./renderers/webgl/filters/spriteMask/SpriteMaskFilter");Object.defineProperty(r,"SpriteMaskFilter",{enumerable:!0,get:function(){return z(B).default}});var k=t("./renderers/webgl/filters/Filter");Object.defineProperty(r,"Filter",{enumerable:!0,get:function(){return z(k).default}});var j=t("./Application");Object.defineProperty(r,"Application",{enumerable:!0,get:function(){return z(j).default}});var U=t("./autoDetectRenderer");Object.defineProperty(r,"autoDetectRenderer",{enumerable:!0,get:function(){return U.autoDetectRenderer}});var X=V(t("./utils")),G=V(t("./ticker")),W=z(t("./settings")),H=z(t("./renderers/canvas/CanvasRenderer")),Y=z(t("./renderers/webgl/WebGLRenderer"));function V(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function z(t){return t&&t.__esModule?t:{default:t}}r.settings=W.default,r.utils=X,r.ticker=G,r.CanvasRenderer=H.default,r.WebGLRenderer=Y.default},{"./Application":43,"./Shader":44,"./autoDetectRenderer":45,"./const":46,"./display/Bounds":47,"./display/Container":48,"./display/DisplayObject":49,"./display/Transform":50,"./display/TransformBase":51,"./display/TransformStatic":52,"./graphics/Graphics":53,"./graphics/GraphicsData":54,"./graphics/canvas/CanvasGraphicsRenderer":55,"./graphics/webgl/GraphicsRenderer":57,"./math":70,"./renderers/canvas/CanvasRenderer":77,"./renderers/canvas/utils/CanvasRenderTarget":79,"./renderers/webgl/WebGLRenderer":84,"./renderers/webgl/filters/Filter":86,"./renderers/webgl/filters/spriteMask/SpriteMaskFilter":89,"./renderers/webgl/managers/WebGLManager":93,"./renderers/webgl/utils/ObjectRenderer":94,"./renderers/webgl/utils/Quad":95,"./renderers/webgl/utils/RenderTarget":96,"./settings":101,"./sprites/Sprite":102,"./sprites/canvas/CanvasSpriteRenderer":103,"./sprites/canvas/CanvasTinter":104,"./sprites/webgl/SpriteRenderer":106,"./text/Text":108,"./text/TextMetrics":109,"./text/TextStyle":110,"./textures/BaseRenderTexture":111,"./textures/BaseTexture":112,"./textures/RenderTexture":113,"./textures/Spritesheet":114,"./textures/Texture":115,"./textures/TextureMatrix":116,"./textures/TextureUvs":117,"./textures/VideoBaseTexture":118,"./ticker":121,"./utils":125,"pixi-gl-core":15}],66:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=t("./Matrix"),o=(n=i,n&&n.__esModule?n:{default:n});var s=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],a=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],u=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],h=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],l=[],c=[];function d(t){return t<0?-1:t>0?1:0}!function(){for(var t=0;t<16;t++){var e=[];c.push(e);for(var r=0;r<16;r++)for(var n=d(s[t]*s[r]+u[t]*a[r]),i=d(a[t]*s[r]+h[t]*a[r]),f=d(s[t]*u[r]+u[t]*h[r]),p=d(a[t]*u[r]+h[t]*h[r]),v=0;v<16;v++)if(s[v]===n&&a[v]===i&&u[v]===f&&h[v]===p){e.push(v);break}}for(var g=0;g<16;g++){var y=new o.default;y.set(s[g],a[g],u[g],h[g],0,0),l.push(y)}}();var f={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MIRROR_HORIZONTAL:12,uX:function(t){return s[t]},uY:function(t){return a[t]},vX:function(t){return u[t]},vY:function(t){return h[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return c[t][e]},sub:function(t,e){return c[t][f.inv(e)]},rotate180:function(t){return 4^t},isVertical:function(t){return 2==(3&t)},byDirection:function(t,e){return 2*Math.abs(t)<=Math.abs(e)?e>=0?f.S:f.N:2*Math.abs(e)<=Math.abs(t)?t>0?f.E:f.W:e>0?t>0?f.SE:f.SW:t>0?f.NE:f.NW},matrixAppendRotationInv:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=l[f.inv(e)];i.tx=r,i.ty=n,t.append(i)}};r.default=f},{"./Matrix":67}],67:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=t("./Point"),s=(n=o,n&&n.__esModule?n:{default:n});var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.a=e,this.b=r,this.c=n,this.d=i,this.tx=o,this.ty=s,this.array=null}return t.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},t.prototype.set=function(t,e,r,n,i,o){return this.a=t,this.b=e,this.c=r,this.d=n,this.tx=i,this.ty=o,this},t.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var r=e||this.array;return t?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r},t.prototype.apply=function(t,e){e=e||new s.default;var r=t.x,n=t.y;return e.x=this.a*r+this.c*n+this.tx,e.y=this.b*r+this.d*n+this.ty,e},t.prototype.applyInverse=function(t,e){e=e||new s.default;var r=1/(this.a*this.d+this.c*-this.b),n=t.x,i=t.y;return e.x=this.d*r*n+-this.c*r*i+(this.ty*this.c-this.tx*this.d)*r,e.y=this.a*r*i+-this.b*r*n+(-this.ty*this.a+this.tx*this.b)*r,e},t.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},t.prototype.scale=function(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this},t.prototype.rotate=function(t){var e=Math.cos(t),r=Math.sin(t),n=this.a,i=this.c,o=this.tx;return this.a=n*e-this.b*r,this.b=n*r+this.b*e,this.c=i*e-this.d*r,this.d=i*r+this.d*e,this.tx=o*e-this.ty*r,this.ty=o*r+this.ty*e,this},t.prototype.append=function(t){var e=this.a,r=this.b,n=this.c,i=this.d;return this.a=t.a*e+t.b*n,this.b=t.a*r+t.b*i,this.c=t.c*e+t.d*n,this.d=t.c*r+t.d*i,this.tx=t.tx*e+t.ty*n+this.tx,this.ty=t.tx*r+t.ty*i+this.ty,this},t.prototype.setTransform=function(t,e,r,n,i,o,s,a,u){var h=Math.sin(s),l=Math.cos(s),c=Math.cos(u),d=Math.sin(u),f=-Math.sin(a),p=Math.cos(a),v=l*i,g=h*i,y=-h*o,m=l*o;return this.a=c*v+d*y,this.b=c*g+d*m,this.c=f*v+p*y,this.d=f*g+p*m,this.tx=t+(r*v+n*y),this.ty=e+(r*g+n*m),this},t.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var r=this.a,n=this.c;this.a=r*t.a+this.b*t.c,this.b=r*t.b+this.b*t.d,this.c=n*t.a+this.d*t.c,this.d=n*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this},t.prototype.decompose=function(t){var e=this.a,r=this.b,n=this.c,i=this.d,o=-Math.atan2(-n,i),s=Math.atan2(r,e);return Math.abs(o+s)<1e-5?(t.rotation=s,e<0&&i>=0&&(t.rotation+=t.rotation<=0?Math.PI:-Math.PI),t.skew.x=t.skew.y=0):(t.skew.x=o,t.skew.y=s),t.scale.x=Math.sqrt(e*e+r*r),t.scale.y=Math.sqrt(n*n+i*i),t.position.x=this.tx,t.position.y=this.ty,t},t.prototype.invert=function(){var t=this.a,e=this.b,r=this.c,n=this.d,i=this.tx,o=t*n-e*r;return this.a=n/o,this.b=-e/o,this.c=-r/o,this.d=t/o,this.tx=(r*this.ty-n*i)/o,this.ty=-(t*this.ty-e*i)/o,this},t.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},t.prototype.clone=function(){var e=new t;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},t.prototype.copy=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},i(t,null,[{key:"IDENTITY",get:function(){return new t}},{key:"TEMP_MATRIX",get:function(){return new t}}]),t}();r.default=a},{"./Point":69}],68:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();var i=function(){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._x=n,this._y=i,this.cb=e,this.scope=r}return t.prototype.set=function(t,e){var r=t||0,n=e||(0!==e?r:0);this._x===r&&this._y===n||(this._x=r,this._y=n,this.cb.call(this.scope))},t.prototype.copy=function(t){this._x===t.x&&this._y===t.y||(this._x=t.x,this._y=t.y,this.cb.call(this.scope))},n(t,[{key:"x",get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}},{key:"y",get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}]),t}();r.default=i},{}],69:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.x=e,this.y=r}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copy=function(t){this.set(t.x,t.y)},t.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},t.prototype.set=function(t,e){this.x=t||0,this.y=e||(0!==e?this.x:0)},t}();r.default=n},{}],70:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("./Point");Object.defineProperty(r,"Point",{enumerable:!0,get:function(){return d(n).default}});var i=t("./ObservablePoint");Object.defineProperty(r,"ObservablePoint",{enumerable:!0,get:function(){return d(i).default}});var o=t("./Matrix");Object.defineProperty(r,"Matrix",{enumerable:!0,get:function(){return d(o).default}});var s=t("./GroupD8");Object.defineProperty(r,"GroupD8",{enumerable:!0,get:function(){return d(s).default}});var a=t("./shapes/Circle");Object.defineProperty(r,"Circle",{enumerable:!0,get:function(){return d(a).default}});var u=t("./shapes/Ellipse");Object.defineProperty(r,"Ellipse",{enumerable:!0,get:function(){return d(u).default}});var h=t("./shapes/Polygon");Object.defineProperty(r,"Polygon",{enumerable:!0,get:function(){return d(h).default}});var l=t("./shapes/Rectangle");Object.defineProperty(r,"Rectangle",{enumerable:!0,get:function(){return d(l).default}});var c=t("./shapes/RoundedRectangle");Object.defineProperty(r,"RoundedRectangle",{enumerable:!0,get:function(){return d(c).default}});function d(t){return t&&t.__esModule?t:{default:t}}},{"./GroupD8":66,"./Matrix":67,"./ObservablePoint":68,"./Point":69,"./shapes/Circle":71,"./shapes/Ellipse":72,"./shapes/Polygon":73,"./shapes/Rectangle":74,"./shapes/RoundedRectangle":75}],71:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=t("./Rectangle"),o=(n=i,n&&n.__esModule?n:{default:n}),s=t("../../const");var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.x=e,this.y=r,this.radius=n,this.type=s.SHAPES.CIRC}return t.prototype.clone=function(){return new t(this.x,this.y,this.radius)},t.prototype.contains=function(t,e){if(this.radius<=0)return!1;var r=this.radius*this.radius,n=this.x-t,i=this.y-e;return(n*=n)+(i*=i)<=r},t.prototype.getBounds=function(){return new o.default(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)},t}();r.default=a},{"../../const":46,"./Rectangle":74}],72:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=t("./Rectangle"),o=(n=i,n&&n.__esModule?n:{default:n}),s=t("../../const");var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.x=e,this.y=r,this.width=n,this.height=i,this.type=s.SHAPES.ELIP}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;var r=(t-this.x)/this.width,n=(e-this.y)/this.height;return(r*=r)+(n*=n)<=1},t.prototype.getBounds=function(){return new o.default(this.x-this.width,this.y-this.height,this.width,this.height)},t}();r.default=a},{"../../const":46,"./Rectangle":74}],73:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=t("../Point"),o=(n=i,n&&n.__esModule?n:{default:n}),s=t("../../const");var a=function(){function t(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Array.isArray(r[0])&&(r=r[0]),r[0]instanceof o.default){for(var i=[],a=0,u=r.length;a<u;a++)i.push(r[a].x,r[a].y);r=i}this.closed=!0,this.points=r,this.type=s.SHAPES.POLY}return t.prototype.clone=function(){return new t(this.points.slice())},t.prototype.close=function(){var t=this.points;t[0]===t[t.length-2]&&t[1]===t[t.length-1]||t.push(t[0],t[1])},t.prototype.contains=function(t,e){for(var r=!1,n=this.points.length/2,i=0,o=n-1;i<n;o=i++){var s=this.points[2*i],a=this.points[2*i+1],u=this.points[2*o],h=this.points[2*o+1];a>e!=h>e&&t<(e-a)/(h-a)*(u-s)+s&&(r=!r)}return r},t}();r.default=a},{"../../const":46,"../Point":69}],74:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=t("../../const");var o=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.x=Number(e),this.y=Number(r),this.width=Number(n),this.height=Number(o),this.type=i.SHAPES.RECT}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},t.prototype.contains=function(t,e){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t<this.x+this.width&&e>=this.y&&e<this.y+this.height)},t.prototype.pad=function(t,e){t=t||0,e=e||(0!==e?t:0),this.x-=t,this.y-=e,this.width+=2*t,this.height+=2*e},t.prototype.fit=function(t){this.x<t.x&&(this.width+=this.x,this.width<0&&(this.width=0),this.x=t.x),this.y<t.y&&(this.height+=this.y,this.height<0&&(this.height=0),this.y=t.y),this.x+this.width>t.x+t.width&&(this.width=t.width-this.x,this.width<0&&(this.width=0)),this.y+this.height>t.y+t.height&&(this.height=t.height-this.y,this.height<0&&(this.height=0))},t.prototype.enlarge=function(t){var e=Math.min(this.x,t.x),r=Math.max(this.x+this.width,t.x+t.width),n=Math.min(this.y,t.y),i=Math.max(this.y+this.height,t.y+t.height);this.x=e,this.width=r-e,this.y=n,this.height=i-n},n(t,[{key:"left",get:function(){return this.x}},{key:"right",get:function(){return this.x+this.width}},{key:"top",get:function(){return this.y}},{key:"bottom",get:function(){return this.y+this.height}}],[{key:"EMPTY",get:function(){return new t(0,0,0,0)}}]),t}();r.default=o},{"../../const":46}],75:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("../../const");var i=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.x=e,this.y=r,this.width=i,this.height=o,this.radius=s,this.type=n.SHAPES.RREC}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height,this.radius)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height){if(e>=this.y+this.radius&&e<=this.y+this.height-this.radius||t>=this.x+this.radius&&t<=this.x+this.width-this.radius)return!0;var r=t-(this.x+this.radius),n=e-(this.y+this.radius),i=this.radius*this.radius;if(r*r+n*n<=i)return!0;if((r=t-(this.x+this.width-this.radius))*r+n*n<=i)return!0;if(r*r+(n=e-(this.y+this.height-this.radius))*n<=i)return!0;if((r=t-(this.x+this.radius))*r+n*n<=i)return!0}return!1},t}();r.default=i},{"../../const":46}],76:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=t("../utils"),o=t("../math"),s=t("../const"),a=c(t("../settings")),u=c(t("../display/Container")),h=c(t("../textures/RenderTexture")),l=c(t("eventemitter3"));function c(t){return t&&t.__esModule?t:{default:t}}var d=new o.Matrix,f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r,n,h,l){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var c=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return(0,i.sayHello)(r),"number"==typeof n&&(n=Object.assign({width:n,height:h||a.default.RENDER_OPTIONS.height},l)),n=Object.assign({},a.default.RENDER_OPTIONS,n),c.options=n,c.type=s.RENDERER_TYPE.UNKNOWN,c.screen=new o.Rectangle(0,0,n.width,n.height),c.view=n.view||document.createElement("canvas"),c.resolution=n.resolution||a.default.RESOLUTION,c.transparent=n.transparent,c.autoResize=n.autoResize||!1,c.blendModes=null,c.preserveDrawingBuffer=n.preserveDrawingBuffer,c.clearBeforeRender=n.clearBeforeRender,c.roundPixels=n.roundPixels,c._backgroundColor=0,c._backgroundColorRgba=[0,0,0,0],c._backgroundColorString="#000000",c.backgroundColor=n.backgroundColor||c._backgroundColor,c._tempDisplayObjectParent=new u.default,c._lastObjectRendered=c._tempDisplayObjectParent,c}return e.prototype.resize=function(t,e){this.screen.width=t,this.screen.height=e,this.view.width=t*this.resolution,this.view.height=e*this.resolution,this.autoResize&&(this.view.style.width=t+"px",this.view.style.height=e+"px")},e.prototype.generateTexture=function(t,e,r,n){n=n||t.getLocalBounds();var i=h.default.create(0|n.width,0|n.height,e,r);return d.tx=-n.x,d.ty=-n.y,this.render(t,i,!1,d,!0),i},e.prototype.destroy=function(t){t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view),this.type=s.RENDERER_TYPE.UNKNOWN,this.view=null,this.screen=null,this.resolution=0,this.transparent=!1,this.autoResize=!1,this.blendModes=null,this.options=null,this.preserveDrawingBuffer=!1,this.clearBeforeRender=!1,this.roundPixels=!1,this._backgroundColor=0,this._backgroundColorRgba=null,this._backgroundColorString=null,this._tempDisplayObjectParent=null,this._lastObjectRendered=null},n(e,[{key:"width",get:function(){return this.view.width}},{key:"height",get:function(){return this.view.height}},{key:"backgroundColor",get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._backgroundColorString=(0,i.hex2string)(t),(0,i.hex2rgb)(t,this._backgroundColorRgba)}}]),e}(l.default);r.default=f},{"../const":46,"../display/Container":48,"../math":70,"../settings":101,"../textures/RenderTexture":113,"../utils":125,eventemitter3:3}],77:[function(t,e,r){"use strict";r.__esModule=!0;var n=l(t("../SystemRenderer")),i=l(t("./utils/CanvasMaskManager")),o=l(t("./utils/CanvasRenderTarget")),s=l(t("./utils/mapCanvasBlendModesToPixi")),a=t("../../utils"),u=t("../../const"),h=l(t("../../settings"));function l(t){return t&&t.__esModule?t:{default:t}}var c=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r,n,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,"Canvas",r,n,o));return a.type=u.RENDERER_TYPE.CANVAS,a.rootContext=a.view.getContext("2d",{alpha:a.transparent}),a.context=a.rootContext,a.refresh=!0,a.maskManager=new i.default(a),a.smoothProperty="imageSmoothingEnabled",a.rootContext.imageSmoothingEnabled||(a.rootContext.webkitImageSmoothingEnabled?a.smoothProperty="webkitImageSmoothingEnabled":a.rootContext.mozImageSmoothingEnabled?a.smoothProperty="mozImageSmoothingEnabled":a.rootContext.oImageSmoothingEnabled?a.smoothProperty="oImageSmoothingEnabled":a.rootContext.msImageSmoothingEnabled&&(a.smoothProperty="msImageSmoothingEnabled")),a.initPlugins(),a.blendModes=(0,s.default)(),a._activeBlendMode=null,a.renderingToScreen=!1,a.resize(a.options.width,a.options.height),a}return e.prototype.render=function(t,e,r,n,i){if(this.view){this.renderingToScreen=!e,this.emit("prerender");var s=this.resolution;e?((e=e.baseTexture||e)._canvasRenderTarget||(e._canvasRenderTarget=new o.default(e.width,e.height,e.resolution),e.source=e._canvasRenderTarget.canvas,e.valid=!0),this.context=e._canvasRenderTarget.context,this.resolution=e._canvasRenderTarget.resolution):this.context=this.rootContext;var a=this.context;if(e||(this._lastObjectRendered=t),!i){var h=t.parent,l=this._tempDisplayObjectParent.transform.worldTransform;n?(n.copy(l),this._tempDisplayObjectParent.transform._worldID=-1):l.identity(),t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=h}a.save(),a.setTransform(1,0,0,1,0,0),a.globalAlpha=1,this._activeBlendMode=u.BLEND_MODES.NORMAL,a.globalCompositeOperation=this.blendModes[u.BLEND_MODES.NORMAL],navigator.isCocoonJS&&this.view.screencanvas&&(a.fillStyle="black",a.clear()),(void 0!==r?r:this.clearBeforeRender)&&this.renderingToScreen&&(this.transparent?a.clearRect(0,0,this.width,this.height):(a.fillStyle=this._backgroundColorString,a.fillRect(0,0,this.width,this.height)));var c=this.context;this.context=a,t.renderCanvas(this),this.context=c,a.restore(),this.resolution=s,this.emit("postrender")}},e.prototype.clear=function(t){var e=this.context;t=t||this._backgroundColorString,!this.transparent&&t?(e.fillStyle=t,e.fillRect(0,0,this.width,this.height)):e.clearRect(0,0,this.width,this.height)},e.prototype.setBlendMode=function(t){this._activeBlendMode!==t&&(this._activeBlendMode=t,this.context.globalCompositeOperation=this.blendModes[t])},e.prototype.destroy=function(e){this.destroyPlugins(),t.prototype.destroy.call(this,e),this.context=null,this.refresh=!0,this.maskManager.destroy(),this.maskManager=null,this.smoothProperty=null},e.prototype.resize=function(e,r){t.prototype.resize.call(this,e,r),this.smoothProperty&&(this.rootContext[this.smoothProperty]=h.default.SCALE_MODE===u.SCALE_MODES.LINEAR)},e.prototype.invalidateBlendMode=function(){this._activeBlendMode=this.blendModes.indexOf(this.context.globalCompositeOperation)},e}(n.default);r.default=c,a.pluginTarget.mixin(c)},{"../../const":46,"../../settings":101,"../../utils":125,"../SystemRenderer":76,"./utils/CanvasMaskManager":78,"./utils/CanvasRenderTarget":79,"./utils/mapCanvasBlendModesToPixi":81}],78:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("../../../const");var i=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e}return t.prototype.pushMask=function(t){var e=this.renderer;e.context.save();var r=t.alpha,n=t.transform.worldTransform,i=e.resolution;e.context.setTransform(n.a*i,n.b*i,n.c*i,n.d*i,n.tx*i,n.ty*i),t._texture||(this.renderGraphicsShape(t),e.context.clip()),t.worldAlpha=r},t.prototype.renderGraphicsShape=function(t){var e=this.renderer.context,r=t.graphicsData.length;if(0!==r){e.beginPath();for(var i=0;i<r;i++){var o=t.graphicsData[i],s=o.shape;if(o.type===n.SHAPES.POLY){var a=s.points;e.moveTo(a[0],a[1]);for(var u=1;u<a.length/2;u++)e.lineTo(a[2*u],a[2*u+1]);a[0]===a[a.length-2]&&a[1]===a[a.length-1]&&e.closePath()}else if(o.type===n.SHAPES.RECT)e.rect(s.x,s.y,s.width,s.height),e.closePath();else if(o.type===n.SHAPES.CIRC)e.arc(s.x,s.y,s.radius,0,2*Math.PI),e.closePath();else if(o.type===n.SHAPES.ELIP){var h=2*s.width,l=2*s.height,c=s.x-h/2,d=s.y-l/2,f=h/2*.5522848,p=l/2*.5522848,v=c+h,g=d+l,y=c+h/2,m=d+l/2;e.moveTo(c,m),e.bezierCurveTo(c,m-p,y-f,d,y,d),e.bezierCurveTo(y+f,d,v,m-p,v,m),e.bezierCurveTo(v,m+p,y+f,g,y,g),e.bezierCurveTo(y-f,g,c,m+p,c,m),e.closePath()}else if(o.type===n.SHAPES.RREC){var _=s.x,b=s.y,x=s.width,T=s.height,w=s.radius,E=Math.min(x,T)/2|0;w=w>E?E:w,e.moveTo(_,b+w),e.lineTo(_,b+T-w),e.quadraticCurveTo(_,b+T,_+w,b+T),e.lineTo(_+x-w,b+T),e.quadraticCurveTo(_+x,b+T,_+x,b+T-w),e.lineTo(_+x,b+w),e.quadraticCurveTo(_+x,b,_+x-w,b),e.lineTo(_+w,b),e.quadraticCurveTo(_,b,_,b+w),e.closePath()}}}},t.prototype.popMask=function(t){t.context.restore(),t.invalidateBlendMode()},t.prototype.destroy=function(){},t}();r.default=i},{"../../../const":46}],79:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=t("../../../settings"),s=(n=o,n&&n.__esModule?n:{default:n});var a=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=n||s.default.RESOLUTION,this.resize(e,r)}return t.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},t.prototype.resize=function(t,e){this.canvas.width=t*this.resolution,this.canvas.height=e*this.resolution},t.prototype.destroy=function(){this.context=null,this.canvas=null},i(t,[{key:"width",get:function(){return this.canvas.width},set:function(t){this.canvas.width=t}},{key:"height",get:function(){return this.canvas.height},set:function(t){this.canvas.height=t}}]),t}();r.default=a},{"../../../settings":101}],80:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(){if("undefined"==typeof document)return!1;var t=n("#ff00ff"),e=n("#ffff00"),r=document.createElement("canvas");r.width=6,r.height=1;var i=r.getContext("2d");i.globalCompositeOperation="multiply",i.drawImage(t,0,0),i.drawImage(e,2,0);var o=i.getImageData(2,0,1,1);if(!o)return!1;var s=o.data;return 255===s[0]&&0===s[1]&&0===s[2]};function n(t){var e=document.createElement("canvas");e.width=6,e.height=1;var r=e.getContext("2d");return r.fillStyle=t,r.fillRect(0,0,6,1),e}},{}],81:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];(0,s.default)()?(t[i.BLEND_MODES.NORMAL]="source-over",t[i.BLEND_MODES.ADD]="lighter",t[i.BLEND_MODES.MULTIPLY]="multiply",t[i.BLEND_MODES.SCREEN]="screen",t[i.BLEND_MODES.OVERLAY]="overlay",t[i.BLEND_MODES.DARKEN]="darken",t[i.BLEND_MODES.LIGHTEN]="lighten",t[i.BLEND_MODES.COLOR_DODGE]="color-dodge",t[i.BLEND_MODES.COLOR_BURN]="color-burn",t[i.BLEND_MODES.HARD_LIGHT]="hard-light",t[i.BLEND_MODES.SOFT_LIGHT]="soft-light",t[i.BLEND_MODES.DIFFERENCE]="difference",t[i.BLEND_MODES.EXCLUSION]="exclusion",t[i.BLEND_MODES.HUE]="hue",t[i.BLEND_MODES.SATURATION]="saturate",t[i.BLEND_MODES.COLOR]="color",t[i.BLEND_MODES.LUMINOSITY]="luminosity"):(t[i.BLEND_MODES.NORMAL]="source-over",t[i.BLEND_MODES.ADD]="lighter",t[i.BLEND_MODES.MULTIPLY]="source-over",t[i.BLEND_MODES.SCREEN]="source-over",t[i.BLEND_MODES.OVERLAY]="source-over",t[i.BLEND_MODES.DARKEN]="source-over",t[i.BLEND_MODES.LIGHTEN]="source-over",t[i.BLEND_MODES.COLOR_DODGE]="source-over",t[i.BLEND_MODES.COLOR_BURN]="source-over",t[i.BLEND_MODES.HARD_LIGHT]="source-over",t[i.BLEND_MODES.SOFT_LIGHT]="source-over",t[i.BLEND_MODES.DIFFERENCE]="source-over",t[i.BLEND_MODES.EXCLUSION]="source-over",t[i.BLEND_MODES.HUE]="source-over",t[i.BLEND_MODES.SATURATION]="source-over",t[i.BLEND_MODES.COLOR]="source-over",t[i.BLEND_MODES.LUMINOSITY]="source-over");return t[i.BLEND_MODES.NORMAL_NPM]=t[i.BLEND_MODES.NORMAL],t[i.BLEND_MODES.ADD_NPM]=t[i.BLEND_MODES.ADD],t[i.BLEND_MODES.SCREEN_NPM]=t[i.BLEND_MODES.SCREEN],t};var n,i=t("../../../const"),o=t("./canUseNewCanvasBlendModes"),s=(n=o,n&&n.__esModule?n:{default:n})},{"../../../const":46,"./canUseNewCanvasBlendModes":80}],82:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=t("../../const"),o=t("../../settings"),s=(n=o,n&&n.__esModule?n:{default:n});var a=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=s.default.GC_MAX_IDLE,this.checkCountMax=s.default.GC_MAX_CHECK_COUNT,this.mode=s.default.GC_MODE}return t.prototype.update=function(){this.count++,this.mode!==i.GC_MODES.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run()))},t.prototype.run=function(){for(var t=this.renderer.textureManager,e=t._managedTextures,r=!1,n=0;n<e.length;n++){var i=e[n];!i._glRenderTargets&&this.count-i.touched>this.maxIdle&&(t.destroyTexture(i,!0),e[n]=null,r=!0)}if(r){for(var o=0,s=0;s<e.length;s++)null!==e[s]&&(e[o++]=e[s]);e.length=o}},t.prototype.unload=function(t){var e=this.renderer.textureManager;t._texture&&t._texture._glRenderTargets&&e.destroyTexture(t._texture,!0);for(var r=t.children.length-1;r>=0;r--)this.unload(t.children[r])},t}();r.default=a},{"../../const":46,"../../settings":101}],83:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=t("pixi-gl-core"),o=t("../../const"),s=t("./utils/RenderTarget"),a=(n=s,n&&n.__esModule?n:{default:n}),u=t("../../utils");var h=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e,this.gl=e.gl,this._managedTextures=[]}return t.prototype.bindTexture=function(){},t.prototype.getTexture=function(){},t.prototype.updateTexture=function(t,e){var r=this.gl,n=!!t._glRenderTargets;if(!t.hasLoaded)return null;var s=this.renderer.boundTextures;if(void 0===e){e=0;for(var u=0;u<s.length;++u)if(s[u]===t){e=u;break}}s[e]=t,r.activeTexture(r.TEXTURE0+e);var h=t._glTextures[this.renderer.CONTEXT_UID];if(h)n?t._glRenderTargets[this.renderer.CONTEXT_UID].resize(t.width,t.height):h.upload(t.source);else{if(n){var l=new a.default(this.gl,t.width,t.height,t.scaleMode,t.resolution);l.resize(t.width,t.height),t._glRenderTargets[this.renderer.CONTEXT_UID]=l,h=l.texture}else(h=new i.GLTexture(this.gl,null,null,null,null)).bind(e),h.premultiplyAlpha=!0,h.upload(t.source);t._glTextures[this.renderer.CONTEXT_UID]=h,t.on("update",this.updateTexture,this),t.on("dispose",this.destroyTexture,this),this._managedTextures.push(t),t.isPowerOfTwo?(t.mipmap&&h.enableMipmap(),t.wrapMode===o.WRAP_MODES.CLAMP?h.enableWrapClamp():t.wrapMode===o.WRAP_MODES.REPEAT?h.enableWrapRepeat():h.enableWrapMirrorRepeat()):h.enableWrapClamp(),t.scaleMode===o.SCALE_MODES.NEAREST?h.enableNearestScaling():h.enableLinearScaling()}return h},t.prototype.destroyTexture=function(t,e){if((t=t.baseTexture||t).hasLoaded){var r=this.renderer.CONTEXT_UID,n=t._glTextures,i=t._glRenderTargets;if(n[r]&&(this.renderer.unbindTexture(t),n[r].destroy(),t.off("update",this.updateTexture,this),t.off("dispose",this.destroyTexture,this),delete n[r],!e)){var o=this._managedTextures.indexOf(t);-1!==o&&(0,u.removeItems)(this._managedTextures,o,1)}i&&i[r]&&(i[r].destroy(),delete i[r])}},t.prototype.removeAll=function(){for(var t=0;t<this._managedTextures.length;++t){var e=this._managedTextures[t];e._glTextures[this.renderer.CONTEXT_UID]&&delete e._glTextures[this.renderer.CONTEXT_UID]}},t.prototype.destroy=function(){for(var t=0;t<this._managedTextures.length;++t){var e=this._managedTextures[t];this.destroyTexture(e,!0),e.off("update",this.updateTexture,this),e.off("dispose",this.destroyTexture,this)}this._managedTextures=null},t}();r.default=h},{"../../const":46,"../../utils":125,"./utils/RenderTarget":96,"pixi-gl-core":15}],84:[function(t,e,r){"use strict";r.__esModule=!0;var n=m(t("../SystemRenderer")),i=m(t("./managers/MaskManager")),o=m(t("./managers/StencilManager")),s=m(t("./managers/FilterManager")),a=m(t("./utils/RenderTarget")),u=m(t("./utils/ObjectRenderer")),h=m(t("./TextureManager")),l=m(t("../../textures/BaseTexture")),c=m(t("./TextureGarbageCollector")),d=m(t("./WebGLState")),f=m(t("./utils/mapWebGLDrawModesToPixi")),p=m(t("./utils/validateContext")),v=t("../../utils"),g=m(t("pixi-gl-core")),y=t("../../const");function m(t){return t&&t.__esModule?t:{default:t}}var _=0,b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r,n,s){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,"WebGL",r,n,s));return a.legacy=a.options.legacy,a.legacy&&(g.default.VertexArrayObject.FORCE_NATIVE=!0),a.type=y.RENDERER_TYPE.WEBGL,a.handleContextLost=a.handleContextLost.bind(a),a.handleContextRestored=a.handleContextRestored.bind(a),a.view.addEventListener("webglcontextlost",a.handleContextLost,!1),a.view.addEventListener("webglcontextrestored",a.handleContextRestored,!1),a._contextOptions={alpha:a.transparent,antialias:a.options.antialias,premultipliedAlpha:a.transparent&&"notMultiplied"!==a.transparent,stencil:!0,preserveDrawingBuffer:a.options.preserveDrawingBuffer,powerPreference:a.options.powerPreference},a._backgroundColorRgba[3]=a.transparent?0:1,a.maskManager=new i.default(a),a.stencilManager=new o.default(a),a.emptyRenderer=new u.default(a),a.currentRenderer=a.emptyRenderer,a.textureManager=null,a.filterManager=null,a.initPlugins(),a.options.context&&(0,p.default)(a.options.context),a.gl=a.options.context||g.default.createContext(a.view,a._contextOptions),a.CONTEXT_UID=_++,a.state=new d.default(a.gl),a.renderingToScreen=!0,a.boundTextures=null,a._activeShader=null,a._activeVao=null,a._activeRenderTarget=null,a._initContext(),a.drawModes=(0,f.default)(a.gl),a._nextTextureLocation=0,a.setBlendMode(0),a}return e.prototype._initContext=function(){var t=this.gl;t.isContextLost()&&t.getExtension("WEBGL_lose_context")&&t.getExtension("WEBGL_lose_context").restoreContext();var e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this._activeShader=null,this._activeVao=null,this.boundTextures=new Array(e),this.emptyTextures=new Array(e),this.textureManager=new h.default(this),this.filterManager=new s.default(this),this.textureGC=new c.default(this),this.state.resetToDefault(),this.rootRenderTarget=new a.default(t,this.width,this.height,null,this.resolution,!0),this.rootRenderTarget.clearColor=this._backgroundColorRgba,this.bindRenderTarget(this.rootRenderTarget);var r=new g.default.GLTexture.fromData(t,null,1,1),n={_glTextures:{}};n._glTextures[this.CONTEXT_UID]={};for(var i=0;i<e;i++){var o=new l.default;o._glTextures[this.CONTEXT_UID]=r,this.boundTextures[i]=n,this.emptyTextures[i]=o,this.bindTexture(null,i)}this.emit("context",t),this.resize(this.screen.width,this.screen.height)},e.prototype.render=function(t,e,r,n,i){if(this.renderingToScreen=!e,this.emit("prerender"),this.gl&&!this.gl.isContextLost()){if(this._nextTextureLocation=0,e||(this._lastObjectRendered=t),!i){var o=t.parent;t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=o}this.bindRenderTexture(e,n),this.currentRenderer.start(),(void 0!==r?r:this.clearBeforeRender)&&this._activeRenderTarget.clear(),t.renderWebGL(this),this.currentRenderer.flush(),this.textureGC.update(),this.emit("postrender")}},e.prototype.setObjectRenderer=function(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())},e.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.resize=function(t,e){n.default.prototype.resize.call(this,t,e),this.rootRenderTarget.resize(t,e),this._activeRenderTarget===this.rootRenderTarget&&(this.rootRenderTarget.activate(),this._activeShader&&(this._activeShader.uniforms.projectionMatrix=this.rootRenderTarget.projectionMatrix.toArray(!0)))},e.prototype.setBlendMode=function(t){this.state.setBlendMode(t)},e.prototype.clear=function(t){this._activeRenderTarget.clear(t)},e.prototype.setTransform=function(t){this._activeRenderTarget.transform=t},e.prototype.clearRenderTexture=function(t,e){var r=t.baseTexture._glRenderTargets[this.CONTEXT_UID];return r&&r.clear(e),this},e.prototype.bindRenderTexture=function(t,e){var r=void 0;if(t){var n=t.baseTexture;n._glRenderTargets[this.CONTEXT_UID]||this.textureManager.updateTexture(n,0),this.unbindTexture(n),(r=n._glRenderTargets[this.CONTEXT_UID]).setFrame(t.frame)}else r=this.rootRenderTarget;return r.transform=e,this.bindRenderTarget(r),this},e.prototype.bindRenderTarget=function(t){return t!==this._activeRenderTarget&&(this._activeRenderTarget=t,t.activate(),this._activeShader&&(this._activeShader.uniforms.projectionMatrix=t.projectionMatrix.toArray(!0)),this.stencilManager.setMaskStack(t.stencilMaskStack)),this},e.prototype.bindShader=function(t,e){return this._activeShader!==t&&(this._activeShader=t,t.bind(),!1!==e&&(t.uniforms.projectionMatrix=this._activeRenderTarget.projectionMatrix.toArray(!0))),this},e.prototype.bindTexture=function(t,e,r){if((t=(t=t||this.emptyTextures[e]).baseTexture||t).touched=this.textureGC.count,r)e=e||0;else{for(var n=0;n<this.boundTextures.length;n++)if(this.boundTextures[n]===t)return n;void 0===e&&(this._nextTextureLocation++,this._nextTextureLocation%=this.boundTextures.length,e=this.boundTextures.length-this._nextTextureLocation-1)}var i=this.gl,o=t._glTextures[this.CONTEXT_UID];return o?(this.boundTextures[e]=t,i.activeTexture(i.TEXTURE0+e),i.bindTexture(i.TEXTURE_2D,o.texture)):this.textureManager.updateTexture(t,e),e},e.prototype.unbindTexture=function(t){var e=this.gl;t=t.baseTexture||t;for(var r=0;r<this.boundTextures.length;r++)this.boundTextures[r]===t&&(this.boundTextures[r]=this.emptyTextures[r],e.activeTexture(e.TEXTURE0+r),e.bindTexture(e.TEXTURE_2D,this.emptyTextures[r]._glTextures[this.CONTEXT_UID].texture));return this},e.prototype.createVao=function(){return new g.default.VertexArrayObject(this.gl,this.state.attribState)},e.prototype.bindVao=function(t){return this._activeVao===t?this:(t?t.bind():this._activeVao&&this._activeVao.unbind(),this._activeVao=t,this)},e.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer),this.bindVao(null),this._activeShader=null,this._activeRenderTarget=this.rootRenderTarget;for(var t=0;t<this.boundTextures.length;t++)this.boundTextures[t]=this.emptyTextures[t];return this.rootRenderTarget.activate(),this.state.resetToDefault(),this},e.prototype.handleContextLost=function(t){t.preventDefault()},e.prototype.handleContextRestored=function(){this.textureManager.removeAll(),this.filterManager.destroy(!0),this._initContext()},e.prototype.destroy=function(e){this.destroyPlugins(),this.view.removeEventListener("webglcontextlost",this.handleContextLost),this.view.removeEventListener("webglcontextrestored",this.handleContextRestored),this.textureManager.destroy(),t.prototype.destroy.call(this,e),this.uid=0,this.maskManager.destroy(),this.stencilManager.destroy(),this.filterManager.destroy(),this.maskManager=null,this.filterManager=null,this.textureManager=null,this.currentRenderer=null,this.handleContextLost=null,this.handleContextRestored=null,this._contextOptions=null,this.gl.useProgram(null),this.gl.getExtension("WEBGL_lose_context")&&this.gl.getExtension("WEBGL_lose_context").loseContext(),this.gl=null},e}(n.default);r.default=b,v.pluginTarget.mixin(b)},{"../../const":46,"../../textures/BaseTexture":112,"../../utils":125,"../SystemRenderer":76,"./TextureGarbageCollector":82,"./TextureManager":83,"./WebGLState":85,"./managers/FilterManager":90,"./managers/MaskManager":91,"./managers/StencilManager":92,"./utils/ObjectRenderer":94,"./utils/RenderTarget":96,"./utils/mapWebGLDrawModesToPixi":99,"./utils/validateContext":100,"pixi-gl-core":15}],85:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=t("./utils/mapWebGLBlendModesToPixi"),o=(n=i,n&&n.__esModule?n:{default:n});var s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.activeState=new Uint8Array(16),this.defaultState=new Uint8Array(16),this.defaultState[0]=1,this.stackIndex=0,this.stack=[],this.gl=e,this.maxAttribs=e.getParameter(e.MAX_VERTEX_ATTRIBS),this.attribState={tempAttribState:new Array(this.maxAttribs),attribState:new Array(this.maxAttribs)},this.blendModes=(0,o.default)(e),this.nativeVaoExtension=e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object")}return t.prototype.push=function(){var t=this.stack[this.stackIndex];t||(t=this.stack[this.stackIndex]=new Uint8Array(16)),++this.stackIndex;for(var e=0;e<this.activeState.length;e++)t[e]=this.activeState[e]},t.prototype.pop=function(){var t=this.stack[--this.stackIndex];this.setState(t)},t.prototype.setState=function(t){this.setBlend(t[0]),this.setDepthTest(t[1]),this.setFrontFace(t[2]),this.setCullFace(t[3]),this.setBlendMode(t[4])},t.prototype.setBlend=function(t){t=t?1:0,this.activeState[0]!==t&&(this.activeState[0]=t,this.gl[t?"enable":"disable"](this.gl.BLEND))},t.prototype.setBlendMode=function(t){if(t!==this.activeState[4]){this.activeState[4]=t;var e=this.blendModes[t];2===e.length?this.gl.blendFunc(e[0],e[1]):this.gl.blendFuncSeparate(e[0],e[1],e[2],e[3])}},t.prototype.setDepthTest=function(t){t=t?1:0,this.activeState[1]!==t&&(this.activeState[1]=t,this.gl[t?"enable":"disable"](this.gl.DEPTH_TEST))},t.prototype.setCullFace=function(t){t=t?1:0,this.activeState[3]!==t&&(this.activeState[3]=t,this.gl[t?"enable":"disable"](this.gl.CULL_FACE))},t.prototype.setFrontFace=function(t){t=t?1:0,this.activeState[2]!==t&&(this.activeState[2]=t,this.gl.frontFace(this.gl[t?"CW":"CCW"]))},t.prototype.resetAttributes=function(){for(var t=0;t<this.attribState.tempAttribState.length;t++)this.attribState.tempAttribState[t]=0;for(var e=0;e<this.attribState.attribState.length;e++)this.attribState.attribState[e]=0;for(var r=1;r<this.maxAttribs;r++)this.gl.disableVertexAttribArray(r)},t.prototype.resetToDefault=function(){this.nativeVaoExtension&&this.nativeVaoExtension.bindVertexArrayOES(null),this.resetAttributes();for(var t=0;t<this.activeState.length;++t)this.activeState[t]=32;this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.setState(this.defaultState)},t}();r.default=s},{"./utils/mapWebGLBlendModesToPixi":98}],86:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=u(t("./extractUniformsFromSrc")),o=t("../../../utils"),s=t("../../../const"),a=u(t("../../../settings"));function u(t){return t&&t.__esModule?t:{default:t}}var h={},l=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.vertexSrc=e||t.defaultVertexSrc,this.fragmentSrc=r||t.defaultFragmentSrc,this._blendMode=s.BLEND_MODES.NORMAL,this.uniformData=n||(0,i.default)(this.vertexSrc,this.fragmentSrc,"projectionMatrix|uSampler"),this.uniforms={};for(var u in this.uniformData)this.uniforms[u]=this.uniformData[u].value,this.uniformData[u].type&&(this.uniformData[u].type=this.uniformData[u].type.toLowerCase());this.glShaders={},h[this.vertexSrc+this.fragmentSrc]||(h[this.vertexSrc+this.fragmentSrc]=(0,o.uid)()),this.glShaderKey=h[this.vertexSrc+this.fragmentSrc],this.padding=4,this.resolution=a.default.RESOLUTION,this.enabled=!0,this.autoFit=!0}return t.prototype.apply=function(t,e,r,n,i){t.applyFilter(this,e,r,n)},n(t,[{key:"blendMode",get:function(){return this._blendMode},set:function(t){this._blendMode=t}}],[{key:"defaultVertexSrc",get:function(){return["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform mat3 projectionMatrix;","uniform mat3 filterMatrix;","varying vec2 vTextureCoord;","varying vec2 vFilterCoord;","void main(void){","   gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);","   vFilterCoord = ( filterMatrix * vec3( aTextureCoord, 1.0)  ).xy;","   vTextureCoord = aTextureCoord ;","}"].join("\n")}},{key:"defaultFragmentSrc",get:function(){return["varying vec2 vTextureCoord;","varying vec2 vFilterCoord;","uniform sampler2D uSampler;","uniform sampler2D filterSampler;","void main(void){","   vec4 masky = texture2D(filterSampler, vFilterCoord);","   vec4 sample = texture2D(uSampler, vTextureCoord);","   vec4 color;","   if(mod(vFilterCoord.x, 1.0) > 0.5)","   {","     color = vec4(1.0, 0.0, 0.0, 1.0);","   }","   else","   {","     color = vec4(0.0, 1.0, 0.0, 1.0);","   }","   gl_FragColor = mix(sample, masky, 0.5);","   gl_FragColor *= sample.a;","}"].join("\n")}}]),t}();r.default=l},{"../../../const":46,"../../../settings":101,"../../../utils":125,"./extractUniformsFromSrc":87}],87:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t,e,r){var n=s(t),i=s(e);return Object.assign(n,i)};var n,i=t("pixi-gl-core");var o=(n=i,n&&n.__esModule?n:{default:n}).default.shader.defaultValue;function s(t){for(var e=new RegExp("^(projectionMatrix|uSampler|filterArea|filterClamp)$"),r={},n=void 0,i=t.replace(/\s+/g," ").split(/\s*;\s*/),s=0;s<i.length;s++){var a=i[s].trim();if(a.indexOf("uniform")>-1){var u=a.split(" "),h=u[1],l=u[2],c=1;l.indexOf("[")>-1&&(l=(n=l.split(/\[|]/))[0],c*=Number(n[1])),l.match(e)||(r[l]={value:o(h,c),name:l,type:h})}}return r}},{"pixi-gl-core":15}],88:[function(t,e,r){"use strict";r.__esModule=!0,r.calculateScreenSpaceMatrix=function(t,e,r){var n=t.identity();return n.translate(e.x/r.width,e.y/r.height),n.scale(r.width,r.height),n},r.calculateNormalizedScreenSpaceMatrix=function(t,e,r){var n=t.identity();n.translate(e.x/r.width,e.y/r.height);var i=r.width/e.width,o=r.height/e.height;return n.scale(i,o),n},r.calculateSpriteMatrix=function(t,e,r,i){var o=i._texture.orig,s=t.set(r.width,0,0,r.height,e.x,e.y),a=i.worldTransform.copy(n.Matrix.TEMP_MATRIX);return a.invert(),s.prepend(a),s.scale(1/o.width,1/o.height),s.translate(i.anchor.x,i.anchor.y),s};var n=t("../../../math")},{"../../../math":70}],89:[function(t,e,r){"use strict";r.__esModule=!0;var n=s(t("../Filter")),i=t("../../../../math"),o=(t("path"),s(t("../../../../textures/TextureMatrix")));function s(t){return t&&t.__esModule?t:{default:t}}var a=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=new i.Matrix,o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0)  ).xy;\n}\n","varying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform sampler2D mask;\nuniform float alpha;\nuniform vec4 maskClamp;\n\nvoid main(void)\n{\n    float clip = step(3.5,\n        step(maskClamp.x, vMaskCoord.x) +\n        step(maskClamp.y, vMaskCoord.y) +\n        step(vMaskCoord.x, maskClamp.z) +\n        step(vMaskCoord.y, maskClamp.w));\n\n    vec4 original = texture2D(uSampler, vTextureCoord);\n    vec4 masky = texture2D(mask, vMaskCoord);\n\n    original *= (masky.r * masky.a * alpha * clip);\n\n    gl_FragColor = original;\n}\n"));return r.renderable=!1,o.maskSprite=r,o.maskMatrix=n,o}return e.prototype.apply=function(t,e,r){var n=this.maskSprite,i=this.maskSprite.texture;i.valid&&(i.transform||(i.transform=new o.default(i,0)),i.transform.update(),this.uniforms.mask=i,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,n).prepend(i.transform.mapCoord),this.uniforms.alpha=n.worldAlpha,this.uniforms.maskClamp=i.transform.uClampFrame,t.applyFilter(this,e,r))},e}(n.default);r.default=a},{"../../../../math":70,"../../../../textures/TextureMatrix":116,"../Filter":86,path:8}],90:[function(t,e,r){"use strict";r.__esModule=!0;var n=l(t("./WebGLManager")),i=l(t("../utils/RenderTarget")),o=l(t("../utils/Quad")),s=t("../../../math"),a=l(t("../../../Shader")),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../filters/filterTransforms")),h=l(t("bit-twiddle"));function l(t){return t&&t.__esModule?t:{default:t}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var d=function t(){c(this,t),this.renderTarget=null,this.sourceFrame=new s.Rectangle,this.destinationFrame=new s.Rectangle,this.filters=[],this.target=null,this.resolution=1},f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r){c(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.gl=n.renderer.gl,n.quad=new o.default(n.gl,r.state.attribState),n.shaderCache={},n.pool={},n.filterData=null,n.managedFilters=[],n}return e.prototype.pushFilter=function(t,e){var r=this.renderer,n=this.filterData;if(!n){n=this.renderer._activeRenderTarget.filterStack;var i=new d;i.sourceFrame=i.destinationFrame=this.renderer._activeRenderTarget.size,i.renderTarget=r._activeRenderTarget,this.renderer._activeRenderTarget.filterData=n={index:0,stack:[i]},this.filterData=n}var o=n.stack[++n.index];o||(o=n.stack[n.index]=new d);var s=e[0].resolution,a=0|e[0].padding,u=t.filterArea||t.getBounds(!0),h=o.sourceFrame,l=o.destinationFrame;h.x=(u.x*s|0)/s,h.y=(u.y*s|0)/s,h.width=(u.width*s|0)/s,h.height=(u.height*s|0)/s,n.stack[0].renderTarget.transform||e[0].autoFit&&h.fit(n.stack[0].destinationFrame),h.pad(a),l.width=h.width,l.height=h.height;var c=this.getPotRenderTarget(r.gl,h.width,h.height,s);o.target=t,o.filters=e,o.resolution=s,o.renderTarget=c,c.setFrame(l,h),r.bindRenderTarget(c),c.clear()},e.prototype.popFilter=function(){var t=this.filterData,e=t.stack[t.index-1],r=t.stack[t.index];this.quad.map(r.renderTarget.size,r.sourceFrame).upload();var n=r.filters;if(1===n.length)n[0].apply(this,r.renderTarget,e.renderTarget,!1,r),this.freePotRenderTarget(r.renderTarget);else{var i=r.renderTarget,o=this.getPotRenderTarget(this.renderer.gl,r.sourceFrame.width,r.sourceFrame.height,r.resolution);o.setFrame(r.destinationFrame,r.sourceFrame),o.clear();var s=0;for(s=0;s<n.length-1;++s){n[s].apply(this,i,o,!0,r);var a=i;i=o,o=a}n[s].apply(this,i,e.renderTarget,!1,r),this.freePotRenderTarget(i),this.freePotRenderTarget(o)}t.index--,0===t.index&&(this.filterData=null)},e.prototype.applyFilter=function(t,e,r,n){var i=this.renderer,o=i.gl,s=t.glShaders[i.CONTEXT_UID];s||(t.glShaderKey?(s=this.shaderCache[t.glShaderKey])||(s=new a.default(this.gl,t.vertexSrc,t.fragmentSrc),t.glShaders[i.CONTEXT_UID]=this.shaderCache[t.glShaderKey]=s,this.managedFilters.push(t)):(s=t.glShaders[i.CONTEXT_UID]=new a.default(this.gl,t.vertexSrc,t.fragmentSrc),this.managedFilters.push(t)),i.bindVao(null),this.quad.initVao(s)),i.bindVao(this.quad.vao),i.bindRenderTarget(r),n&&(o.disable(o.SCISSOR_TEST),i.clear(),o.enable(o.SCISSOR_TEST)),r===i.maskManager.scissorRenderTarget&&i.maskManager.pushScissorMask(null,i.maskManager.scissorData),i.bindShader(s);var u=this.renderer.emptyTextures[0];this.renderer.boundTextures[0]=u,this.syncUniforms(s,t),i.state.setBlendMode(t.blendMode),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,e.texture.texture),this.quad.vao.draw(this.renderer.gl.TRIANGLES,6,0),o.bindTexture(o.TEXTURE_2D,u._glTextures[this.renderer.CONTEXT_UID].texture)},e.prototype.syncUniforms=function(t,e){var r=e.uniformData,n=e.uniforms,i=1,o=void 0;if(t.uniforms.filterArea){o=this.filterData.stack[this.filterData.index];var s=t.uniforms.filterArea;s[0]=o.renderTarget.size.width,s[1]=o.renderTarget.size.height,s[2]=o.sourceFrame.x,s[3]=o.sourceFrame.y,t.uniforms.filterArea=s}if(t.uniforms.filterClamp){o=o||this.filterData.stack[this.filterData.index];var a=t.uniforms.filterClamp;a[0]=0,a[1]=0,a[2]=(o.sourceFrame.width-1)/o.renderTarget.size.width,a[3]=(o.sourceFrame.height-1)/o.renderTarget.size.height,t.uniforms.filterClamp=a}for(var u in r){var h=r[u].type;if("sampler2d"===h&&0!==n[u]){if(n[u].baseTexture)t.uniforms[u]=this.renderer.bindTexture(n[u].baseTexture,i);else{t.uniforms[u]=i;var l=this.renderer.gl;this.renderer.boundTextures[i]=this.renderer.emptyTextures[i],l.activeTexture(l.TEXTURE0+i),n[u].texture.bind()}i++}else if("mat3"===h)void 0!==n[u].a?t.uniforms[u]=n[u].toArray(!0):t.uniforms[u]=n[u];else if("vec2"===h)if(void 0!==n[u].x){var c=t.uniforms[u]||new Float32Array(2);c[0]=n[u].x,c[1]=n[u].y,t.uniforms[u]=c}else t.uniforms[u]=n[u];else"float"===h?t.uniforms.data[u].value!==r[u]&&(t.uniforms[u]=n[u]):t.uniforms[u]=n[u]}},e.prototype.getRenderTarget=function(t,e){var r=this.filterData.stack[this.filterData.index],n=this.getPotRenderTarget(this.renderer.gl,r.sourceFrame.width,r.sourceFrame.height,e||r.resolution);return n.setFrame(r.destinationFrame,r.sourceFrame),n},e.prototype.returnRenderTarget=function(t){this.freePotRenderTarget(t)},e.prototype.calculateScreenSpaceMatrix=function(t){var e=this.filterData.stack[this.filterData.index];return u.calculateScreenSpaceMatrix(t,e.sourceFrame,e.renderTarget.size)},e.prototype.calculateNormalizedScreenSpaceMatrix=function(t){var e=this.filterData.stack[this.filterData.index];return u.calculateNormalizedScreenSpaceMatrix(t,e.sourceFrame,e.renderTarget.size,e.destinationFrame)},e.prototype.calculateSpriteMatrix=function(t,e){var r=this.filterData.stack[this.filterData.index];return u.calculateSpriteMatrix(t,r.sourceFrame,r.renderTarget.size,e)},e.prototype.destroy=function(){for(var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.renderer,r=this.managedFilters,n=0;n<r.length;n++)t||r[n].glShaders[e.CONTEXT_UID].destroy(),delete r[n].glShaders[e.CONTEXT_UID];this.shaderCache={},t?this.pool={}:this.emptyPool()},e.prototype.getPotRenderTarget=function(t,e,r,n){var o=(65535&(e=h.default.nextPow2(e*n)))<<16|65535&(r=h.default.nextPow2(r*n));this.pool[o]||(this.pool[o]=[]);var s=this.pool[o].pop();if(!s){var a=this.renderer.boundTextures[0];t.activeTexture(t.TEXTURE0),s=new i.default(t,e,r,null,1),t.bindTexture(t.TEXTURE_2D,a._glTextures[this.renderer.CONTEXT_UID].texture)}return s.resolution=n,s.defaultFrame.width=s.size.width=e/n,s.defaultFrame.height=s.size.height=r/n,s},e.prototype.emptyPool=function(){for(var t in this.pool){var e=this.pool[t];if(e)for(var r=0;r<e.length;r++)e[r].destroy(!0)}this.pool={}},e.prototype.freePotRenderTarget=function(t){var e=(65535&t.size.width*t.resolution)<<16|65535&t.size.height*t.resolution;this.pool[e].push(t)},e}(n.default);r.default=f},{"../../../Shader":44,"../../../math":70,"../filters/filterTransforms":88,"../utils/Quad":95,"../utils/RenderTarget":96,"./WebGLManager":93,"bit-twiddle":1}],91:[function(t,e,r){"use strict";r.__esModule=!0;var n=o(t("./WebGLManager")),i=o(t("../filters/spriteMask/SpriteMaskFilter"));function o(t){return t&&t.__esModule?t:{default:t}}var s=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.scissor=!1,n.scissorData=null,n.scissorRenderTarget=null,n.enableScissor=!0,n.alphaMaskPool=[],n.alphaMaskIndex=0,n}return e.prototype.pushMask=function(t,e){if(e.texture)this.pushSpriteMask(t,e);else if(this.enableScissor&&!this.scissor&&this.renderer._activeRenderTarget.root&&!this.renderer.stencilManager.stencilMaskStack.length&&e.isFastRect()){var r=e.worldTransform,n=Math.atan2(r.b,r.a);(n=Math.round(n*(180/Math.PI)))%90?this.pushStencilMask(e):this.pushScissorMask(t,e)}else this.pushStencilMask(e)},e.prototype.popMask=function(t,e){e.texture?this.popSpriteMask(t,e):this.enableScissor&&!this.renderer.stencilManager.stencilMaskStack.length?this.popScissorMask(t,e):this.popStencilMask(t,e)},e.prototype.pushSpriteMask=function(t,e){var r=this.alphaMaskPool[this.alphaMaskIndex];r||(r=this.alphaMaskPool[this.alphaMaskIndex]=[new i.default(e)]),r[0].resolution=this.renderer.resolution,r[0].maskSprite=e,t.filterArea=e.getBounds(!0),this.renderer.filterManager.pushFilter(t,r),this.alphaMaskIndex++},e.prototype.popSpriteMask=function(){this.renderer.filterManager.popFilter(),this.alphaMaskIndex--},e.prototype.pushStencilMask=function(t){this.renderer.currentRenderer.stop(),this.renderer.stencilManager.pushStencil(t)},e.prototype.popStencilMask=function(){this.renderer.currentRenderer.stop(),this.renderer.stencilManager.popStencil()},e.prototype.pushScissorMask=function(t,e){e.renderable=!0;var r=this.renderer._activeRenderTarget,n=e.getBounds();n.fit(r.size),e.renderable=!1,this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST);var i=this.renderer.resolution;this.renderer.gl.scissor(n.x*i,(r.root?r.size.height-n.y-n.height:n.y)*i,n.width*i,n.height*i),this.scissorRenderTarget=r,this.scissorData=e,this.scissor=!0},e.prototype.popScissorMask=function(){this.scissorRenderTarget=null,this.scissorData=null,this.scissor=!1;var t=this.renderer.gl;t.disable(t.SCISSOR_TEST)},e}(n.default);r.default=s},{"../filters/spriteMask/SpriteMaskFilter":89,"./WebGLManager":93}],92:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=t("./WebGLManager"),o=(n=i,n&&n.__esModule?n:{default:n});var s=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.stencilMaskStack=null,n}return e.prototype.setMaskStack=function(t){this.stencilMaskStack=t;var e=this.renderer.gl;0===t.length?e.disable(e.STENCIL_TEST):e.enable(e.STENCIL_TEST)},e.prototype.pushStencil=function(t){this.renderer.setObjectRenderer(this.renderer.plugins.graphics),this.renderer._activeRenderTarget.attachStencilBuffer();var e=this.renderer.gl,r=this.stencilMaskStack.length;0===r&&e.enable(e.STENCIL_TEST),this.stencilMaskStack.push(t),e.colorMask(!1,!1,!1,!1),e.stencilFunc(e.EQUAL,r,this._getBitwiseMask()),e.stencilOp(e.KEEP,e.KEEP,e.INCR),this.renderer.plugins.graphics.render(t),this._useCurrent()},e.prototype.popStencil=function(){this.renderer.setObjectRenderer(this.renderer.plugins.graphics);var t=this.renderer.gl,e=this.stencilMaskStack.pop();0===this.stencilMaskStack.length?(t.disable(t.STENCIL_TEST),t.clear(t.STENCIL_BUFFER_BIT),t.clearStencil(0)):(t.colorMask(!1,!1,!1,!1),t.stencilOp(t.KEEP,t.KEEP,t.DECR),this.renderer.plugins.graphics.render(e),this._useCurrent())},e.prototype._useCurrent=function(){var t=this.renderer.gl;t.colorMask(!0,!0,!0,!0),t.stencilFunc(t.EQUAL,this.stencilMaskStack.length,this._getBitwiseMask()),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)},e.prototype._getBitwiseMask=function(){return(1<<this.stencilMaskStack.length)-1},e.prototype.destroy=function(){o.default.prototype.destroy.call(this),this.stencilMaskStack.stencilStack=null},e}(o.default);r.default=s},{"./WebGLManager":93}],93:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e,this.renderer.on("context",this.onContextChange,this)}return t.prototype.onContextChange=function(){},t.prototype.destroy=function(){this.renderer.off("context",this.onContextChange,this),this.renderer=null},t}();r.default=n},{}],94:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=t("../managers/WebGLManager");var o=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return e.prototype.start=function(){},e.prototype.stop=function(){this.flush()},e.prototype.flush=function(){},e.prototype.render=function(t){},e}((n=i,n&&n.__esModule?n:{default:n}).default);r.default=o},{"../managers/WebGLManager":93}],95:[function(t,e,r){"use strict";r.__esModule=!0;var n=o(t("pixi-gl-core")),i=o(t("../../../utils/createIndicesForQuads"));function o(t){return t&&t.__esModule?t:{default:t}}var s=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.gl=e,this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.interleaved=new Float32Array(16);for(var o=0;o<4;o++)this.interleaved[4*o]=this.vertices[2*o],this.interleaved[4*o+1]=this.vertices[2*o+1],this.interleaved[4*o+2]=this.uvs[2*o],this.interleaved[4*o+3]=this.uvs[2*o+1];this.indices=(0,i.default)(1),this.vertexBuffer=n.default.GLBuffer.createVertexBuffer(e,this.interleaved,e.STATIC_DRAW),this.indexBuffer=n.default.GLBuffer.createIndexBuffer(e,this.indices,e.STATIC_DRAW),this.vao=new n.default.VertexArrayObject(e,r)}return t.prototype.initVao=function(t){this.vao.clear().addIndex(this.indexBuffer).addAttribute(this.vertexBuffer,t.attributes.aVertexPosition,this.gl.FLOAT,!1,16,0).addAttribute(this.vertexBuffer,t.attributes.aTextureCoord,this.gl.FLOAT,!1,16,8)},t.prototype.map=function(t,e){var r=0,n=0;return this.uvs[0]=r,this.uvs[1]=n,this.uvs[2]=r+e.width/t.width,this.uvs[3]=n,this.uvs[4]=r+e.width/t.width,this.uvs[5]=n+e.height/t.height,this.uvs[6]=r,this.uvs[7]=n+e.height/t.height,r=e.x,n=e.y,this.vertices[0]=r,this.vertices[1]=n,this.vertices[2]=r+e.width,this.vertices[3]=n,this.vertices[4]=r+e.width,this.vertices[5]=n+e.height,this.vertices[6]=r,this.vertices[7]=n+e.height,this},t.prototype.upload=function(){for(var t=0;t<4;t++)this.interleaved[4*t]=this.vertices[2*t],this.interleaved[4*t+1]=this.vertices[2*t+1],this.interleaved[4*t+2]=this.uvs[2*t],this.interleaved[4*t+3]=this.uvs[2*t+1];return this.vertexBuffer.upload(this.interleaved),this},t.prototype.destroy=function(){var t=this.gl;t.deleteBuffer(this.vertexBuffer),t.deleteBuffer(this.indexBuffer)},t}();r.default=s},{"../../../utils/createIndicesForQuads":123,"pixi-gl-core":15}],96:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=t("../../../math"),o=t("../../../const"),s=t("../../../settings"),a=(n=s,n&&n.__esModule?n:{default:n}),u=t("pixi-gl-core");var h=function(){function t(e,r,n,s,h,l){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.gl=e,this.frameBuffer=null,this.texture=null,this.clearColor=[0,0,0,0],this.size=new i.Rectangle(0,0,1,1),this.resolution=h||a.default.RESOLUTION,this.projectionMatrix=new i.Matrix,this.transform=null,this.frame=null,this.defaultFrame=new i.Rectangle,this.destinationFrame=null,this.sourceFrame=null,this.stencilBuffer=null,this.stencilMaskStack=[],this.filterData=null,this.scaleMode=void 0!==s?s:a.default.SCALE_MODE,this.root=l,this.root?(this.frameBuffer=new u.GLFramebuffer(e,100,100),this.frameBuffer.framebuffer=null):(this.frameBuffer=u.GLFramebuffer.createRGBA(e,100,100),this.scaleMode===o.SCALE_MODES.NEAREST?this.frameBuffer.texture.enableNearestScaling():this.frameBuffer.texture.enableLinearScaling(),this.texture=this.frameBuffer.texture),this.setFrame(),this.resize(r,n)}return t.prototype.clear=function(t){var e=t||this.clearColor;this.frameBuffer.clear(e[0],e[1],e[2],e[3])},t.prototype.attachStencilBuffer=function(){this.root||this.frameBuffer.enableStencil()},t.prototype.setFrame=function(t,e){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=e||this.sourceFrame||this.destinationFrame},t.prototype.activate=function(){var t=this.gl;this.frameBuffer.bind(),this.calculateProjection(this.destinationFrame,this.sourceFrame),this.transform&&this.projectionMatrix.append(this.transform),this.destinationFrame!==this.sourceFrame?(t.enable(t.SCISSOR_TEST),t.scissor(0|this.destinationFrame.x,0|this.destinationFrame.y,this.destinationFrame.width*this.resolution|0,this.destinationFrame.height*this.resolution|0)):t.disable(t.SCISSOR_TEST),t.viewport(0|this.destinationFrame.x,0|this.destinationFrame.y,this.destinationFrame.width*this.resolution|0,this.destinationFrame.height*this.resolution|0)},t.prototype.calculateProjection=function(t,e){var r=this.projectionMatrix;e=e||t,r.identity(),this.root?(r.a=1/t.width*2,r.d=-1/t.height*2,r.tx=-1-e.x*r.a,r.ty=1-e.y*r.d):(r.a=1/t.width*2,r.d=1/t.height*2,r.tx=-1-e.x*r.a,r.ty=-1-e.y*r.d)},t.prototype.resize=function(t,e){if(t|=0,e|=0,this.size.width!==t||this.size.height!==e){this.size.width=t,this.size.height=e,this.defaultFrame.width=t,this.defaultFrame.height=e,this.frameBuffer.resize(t*this.resolution,e*this.resolution);var r=this.frame||this.size;this.calculateProjection(r)}},t.prototype.destroy=function(){this.frameBuffer.destroy(),this.frameBuffer=null,this.texture=null},t}();r.default=h},{"../../../const":46,"../../../math":70,"../../../settings":101,"pixi-gl-core":15}],97:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t,e){var r=!e;if(0===t)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");if(r){var n=document.createElement("canvas");n.width=1,n.height=1,e=o.default.createContext(n)}var i=e.createShader(e.FRAGMENT_SHADER);for(;;){var u=s.replace(/%forloop%/gi,a(t));if(e.shaderSource(i,u),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS))break;t=t/2|0}r&&e.getExtension("WEBGL_lose_context")&&e.getExtension("WEBGL_lose_context").loseContext();return t};var n,i=t("pixi-gl-core"),o=(n=i,n&&n.__esModule?n:{default:n});var s=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n");function a(t){for(var e="",r=0;r<t;++r)r>0&&(e+="\nelse "),r<t-1&&(e+="if(test == "+r+".0){}");return e}},{"pixi-gl-core":15}],98:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e[n.BLEND_MODES.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.ADD]=[t.ONE,t.DST_ALPHA],e[n.BLEND_MODES.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.SCREEN]=[t.ONE,t.ONE_MINUS_SRC_COLOR],e[n.BLEND_MODES.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.NORMAL_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.ADD_NPM]=[t.SRC_ALPHA,t.DST_ALPHA,t.ONE,t.DST_ALPHA],e[n.BLEND_MODES.SCREEN_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_COLOR],e};var n=t("../../../const")},{"../../../const":46}],99:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e[n.DRAW_MODES.POINTS]=t.POINTS,e[n.DRAW_MODES.LINES]=t.LINES,e[n.DRAW_MODES.LINE_LOOP]=t.LINE_LOOP,e[n.DRAW_MODES.LINE_STRIP]=t.LINE_STRIP,e[n.DRAW_MODES.TRIANGLES]=t.TRIANGLES,e[n.DRAW_MODES.TRIANGLE_STRIP]=t.TRIANGLE_STRIP,e[n.DRAW_MODES.TRIANGLE_FAN]=t.TRIANGLE_FAN,e};var n=t("../../../const")},{"../../../const":46}],100:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t){t.getContextAttributes().stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly")}},{}],101:[function(t,e,r){"use strict";r.__esModule=!0;var n=o(t("./utils/maxRecommendedTextures")),i=o(t("./utils/canUploadSameBuffer"));function o(t){return t&&t.__esModule?t:{default:t}}r.default={TARGET_FPMS:.06,MIPMAP_TEXTURES:!0,RESOLUTION:1,FILTER_RESOLUTION:1,SPRITE_MAX_TEXTURES:(0,n.default)(32),SPRITE_BATCH_SIZE:4096,RETINA_PREFIX:/@([0-9\.]+)x/,RENDER_OPTIONS:{view:null,antialias:!1,forceFXAA:!1,autoResize:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,roundPixels:!1,width:800,height:600,legacy:!1},TRANSFORM_MODE:0,GC_MODE:0,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:0,SCALE_MODE:0,PRECISION_VERTEX:"highp",PRECISION_FRAGMENT:"mediump",CAN_UPLOAD_SAME_BUFFER:(0,i.default)()}},{"./utils/canUploadSameBuffer":122,"./utils/maxRecommendedTextures":127}],102:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=t("../math"),o=t("../utils"),s=t("../const"),a=h(t("../textures/Texture")),u=h(t("../display/Container"));function h(t){return t&&t.__esModule?t:{default:t}}var l=new i.Point,c=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return n._anchor=new i.ObservablePoint(n._onAnchorUpdate,n),n._texture=null,n._width=0,n._height=0,n._tint=null,n._tintRGB=null,n.tint=16777215,n.blendMode=s.BLEND_MODES.NORMAL,n.shader=null,n.cachedTint=16777215,n.texture=r||a.default.EMPTY,n.vertexData=new Float32Array(8),n.vertexTrimmedData=null,n._transformID=-1,n._textureID=-1,n._transformTrimmedID=-1,n._textureTrimmedID=-1,n.pluginName="sprite",n}return e.prototype._onTextureUpdate=function(){this._textureID=-1,this._textureTrimmedID=-1,this.cachedTint=16777215,this._width&&(this.scale.x=(0,o.sign)(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=(0,o.sign)(this.scale.y)*this._height/this._texture.orig.height)},e.prototype._onAnchorUpdate=function(){this._transformID=-1,this._transformTrimmedID=-1},e.prototype.calculateVertices=function(){if(this._transformID!==this.transform._worldID||this._textureID!==this._texture._updateID){this._transformID=this.transform._worldID,this._textureID=this._texture._updateID;var t=this._texture,e=this.transform.worldTransform,r=e.a,n=e.b,i=e.c,o=e.d,s=e.tx,a=e.ty,u=this.vertexData,h=t.trim,l=t.orig,c=this._anchor,d=0,f=0,p=0,v=0;h?(d=(f=h.x-c._x*l.width)+h.width,p=(v=h.y-c._y*l.height)+h.height):(d=(f=-c._x*l.width)+l.width,p=(v=-c._y*l.height)+l.height),u[0]=r*f+i*v+s,u[1]=o*v+n*f+a,u[2]=r*d+i*v+s,u[3]=o*v+n*d+a,u[4]=r*d+i*p+s,u[5]=o*p+n*d+a,u[6]=r*f+i*p+s,u[7]=o*p+n*f+a}},e.prototype.calculateTrimmedVertices=function(){if(this.vertexTrimmedData){if(this._transformTrimmedID===this.transform._worldID&&this._textureTrimmedID===this._texture._updateID)return}else this.vertexTrimmedData=new Float32Array(8);this._transformTrimmedID=this.transform._worldID,this._textureTrimmedID=this._texture._updateID;var t=this._texture,e=this.vertexTrimmedData,r=t.orig,n=this._anchor,i=this.transform.worldTransform,o=i.a,s=i.b,a=i.c,u=i.d,h=i.tx,l=i.ty,c=-n._x*r.width,d=c+r.width,f=-n._y*r.height,p=f+r.height;e[0]=o*c+a*f+h,e[1]=u*f+s*c+l,e[2]=o*d+a*f+h,e[3]=u*f+s*d+l,e[4]=o*d+a*p+h,e[5]=u*p+s*d+l,e[6]=o*c+a*p+h,e[7]=u*p+s*c+l},e.prototype._renderWebGL=function(t){this.calculateVertices(),t.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this)},e.prototype._renderCanvas=function(t){t.plugins[this.pluginName].render(this)},e.prototype._calculateBounds=function(){var t=this._texture.trim,e=this._texture.orig;!t||t.width===e.width&&t.height===e.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._texture.orig.width*-this._anchor._x,this._bounds.minY=this._texture.orig.height*-this._anchor._y,this._bounds.maxX=this._texture.orig.width*(1-this._anchor._x),this._bounds.maxY=this._texture.orig.height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new i.Rectangle),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,l);var e=this._texture.orig.width,r=this._texture.orig.height,n=-e*this.anchor.x,i=0;return l.x>=n&&l.x<n+e&&(i=-r*this.anchor.y,l.y>=i&&l.y<i+r)},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this._anchor=null;if("boolean"==typeof e?e:e&&e.texture){var r="boolean"==typeof e?e:e&&e.baseTexture;this._texture.destroy(!!r)}this._texture=null,this.shader=null},e.from=function(t){return new e(a.default.from(t))},e.fromFrame=function(t){var r=o.TextureCache[t];if(!r)throw new Error('The frameId "'+t+'" does not exist in the texture cache');return new e(r)},e.fromImage=function(t,r,n){return new e(a.default.fromImage(t,r,n))},n(e,[{key:"width",get:function(){return Math.abs(this.scale.x)*this._texture.orig.width},set:function(t){var e=(0,o.sign)(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t}},{key:"height",get:function(){return Math.abs(this.scale.y)*this._texture.orig.height},set:function(t){var e=(0,o.sign)(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t}},{key:"anchor",get:function(){return this._anchor},set:function(t){this._anchor.copy(t)}},{key:"tint",get:function(){return this._tint},set:function(t){this._tint=t,this._tintRGB=(t>>16)+(65280&t)+((255&t)<<16)}},{key:"texture",get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture=t,this.cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))}}]),e}(u.default);r.default=c},{"../const":46,"../display/Container":48,"../math":70,"../textures/Texture":115,"../utils":125}],103:[function(t,e,r){"use strict";r.__esModule=!0;var n=a(t("../../renderers/canvas/CanvasRenderer")),i=t("../../const"),o=t("../../math"),s=a(t("./CanvasTinter"));function a(t){return t&&t.__esModule?t:{default:t}}var u=new o.Matrix,h=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e}return t.prototype.render=function(t){var e=t._texture,r=this.renderer,n=e._frame.width,a=e._frame.height,h=t.transform.worldTransform,l=0,c=0;if(!(e.orig.width<=0||e.orig.height<=0)&&e.baseTexture.source&&(r.setBlendMode(t.blendMode),e.valid)){r.context.globalAlpha=t.worldAlpha;var d=e.baseTexture.scaleMode===i.SCALE_MODES.LINEAR;r.smoothProperty&&r.context[r.smoothProperty]!==d&&(r.context[r.smoothProperty]=d),e.trim?(l=e.trim.width/2+e.trim.x-t.anchor.x*e.orig.width,c=e.trim.height/2+e.trim.y-t.anchor.y*e.orig.height):(l=(.5-t.anchor.x)*e.orig.width,c=(.5-t.anchor.y)*e.orig.height),e.rotate&&(h.copy(u),h=u,o.GroupD8.matrixAppendRotationInv(h,e.rotate,l,c),l=0,c=0),l-=n/2,c-=a/2,r.roundPixels?(r.context.setTransform(h.a,h.b,h.c,h.d,h.tx*r.resolution|0,h.ty*r.resolution|0),l|=0,c|=0):r.context.setTransform(h.a,h.b,h.c,h.d,h.tx*r.resolution,h.ty*r.resolution);var f=e.baseTexture.resolution;16777215!==t.tint?(t.cachedTint===t.tint&&t.tintedTexture.tintId===t._texture._updateID||(t.cachedTint=t.tint,t.tintedTexture=s.default.getTintedTexture(t,t.tint)),r.context.drawImage(t.tintedTexture,0,0,n*f,a*f,l*r.resolution,c*r.resolution,n*r.resolution,a*r.resolution)):r.context.drawImage(e.baseTexture.source,e._frame.x*f,e._frame.y*f,n*f,a*f,l*r.resolution,c*r.resolution,n*r.resolution,a*r.resolution)}},t.prototype.destroy=function(){this.renderer=null},t}();r.default=h,n.default.registerPlugin("sprite",h)},{"../../const":46,"../../math":70,"../../renderers/canvas/CanvasRenderer":77,"./CanvasTinter":104}],104:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=t("../../utils"),o=t("../../renderers/canvas/utils/canUseNewCanvasBlendModes");var s={getTintedTexture:function(t,e){var r=t._texture,n="#"+("00000"+(0|(e=s.roundColor(e))).toString(16)).substr(-6);r.tintCache=r.tintCache||{};var i=r.tintCache[n],o=void 0;if(i){if(i.tintId===r._updateID)return r.tintCache[n];o=r.tintCache[n]}else o=s.canvas||document.createElement("canvas");if(s.tintMethod(r,e,o),o.tintId=r._updateID,s.convertTintToImage){var a=new Image;a.src=o.toDataURL(),r.tintCache[n]=a}else r.tintCache[n]=o,s.canvas=null;return o},tintWithMultiply:function(t,e,r){var n=r.getContext("2d"),i=t._frame.clone(),o=t.baseTexture.resolution;i.x*=o,i.y*=o,i.width*=o,i.height*=o,r.width=Math.ceil(i.width),r.height=Math.ceil(i.height),n.save(),n.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),n.fillRect(0,0,i.width,i.height),n.globalCompositeOperation="multiply",n.drawImage(t.baseTexture.source,i.x,i.y,i.width,i.height,0,0,i.width,i.height),n.globalCompositeOperation="destination-atop",n.drawImage(t.baseTexture.source,i.x,i.y,i.width,i.height,0,0,i.width,i.height),n.restore()},tintWithOverlay:function(t,e,r){var n=r.getContext("2d"),i=t._frame.clone(),o=t.baseTexture.resolution;i.x*=o,i.y*=o,i.width*=o,i.height*=o,r.width=Math.ceil(i.width),r.height=Math.ceil(i.height),n.save(),n.globalCompositeOperation="copy",n.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),n.fillRect(0,0,i.width,i.height),n.globalCompositeOperation="destination-atop",n.drawImage(t.baseTexture.source,i.x,i.y,i.width,i.height,0,0,i.width,i.height),n.restore()},tintWithPerPixel:function(t,e,r){var n=r.getContext("2d"),o=t._frame.clone(),s=t.baseTexture.resolution;o.x*=s,o.y*=s,o.width*=s,o.height*=s,r.width=Math.ceil(o.width),r.height=Math.ceil(o.height),n.save(),n.globalCompositeOperation="copy",n.drawImage(t.baseTexture.source,o.x,o.y,o.width,o.height,0,0,o.width,o.height),n.restore();for(var a=(0,i.hex2rgb)(e),u=a[0],h=a[1],l=a[2],c=n.getImageData(0,0,o.width,o.height),d=c.data,f=0;f<d.length;f+=4)d[f+0]*=u,d[f+1]*=h,d[f+2]*=l;n.putImageData(c,0,0)},roundColor:function(t){var e=s.cacheStepsPerColorChannel,r=(0,i.hex2rgb)(t);return r[0]=Math.min(255,r[0]/e*e),r[1]=Math.min(255,r[1]/e*e),r[2]=Math.min(255,r[2]/e*e),(0,i.rgb2hex)(r)},cacheStepsPerColorChannel:8,convertTintToImage:!1,canUseMultiply:(0,(n=o,n&&n.__esModule?n:{default:n}).default)(),tintMethod:0};s.tintMethod=s.canUseMultiply?s.tintWithMultiply:s.tintWithPerPixel,r.default=s},{"../../renderers/canvas/utils/canUseNewCanvasBlendModes":80,"../../utils":125}],105:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.vertices=new ArrayBuffer(e),this.float32View=new Float32Array(this.vertices),this.uint32View=new Uint32Array(this.vertices)}return t.prototype.destroy=function(){this.vertices=null,this.positions=null,this.uvs=null,this.colors=null},t}();r.default=n},{}],106:[function(t,e,r){"use strict";r.__esModule=!0;var n=f(t("../../renderers/webgl/utils/ObjectRenderer")),i=f(t("../../renderers/webgl/WebGLRenderer")),o=f(t("../../utils/createIndicesForQuads")),s=f(t("./generateMultiTextureShader")),a=f(t("../../renderers/webgl/utils/checkMaxIfStatmentsInShader")),u=f(t("./BatchBuffer")),h=f(t("../../settings")),l=t("../../utils"),c=f(t("pixi-gl-core")),d=f(t("bit-twiddle"));function f(t){return t&&t.__esModule?t:{default:t}}var p=0,v=0,g=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));n.vertSize=5,n.vertByteSize=4*n.vertSize,n.size=h.default.SPRITE_BATCH_SIZE,n.buffers=[];for(var i=1;i<=d.default.nextPow2(n.size);i*=2)n.buffers.push(new u.default(4*i*n.vertByteSize));n.indices=(0,o.default)(n.size),n.shader=null,n.currentIndex=0,n.groups=[];for(var s=0;s<n.size;s++)n.groups[s]={textures:[],textureCount:0,ids:[],size:0,start:0,blend:0};return n.sprites=[],n.vertexBuffers=[],n.vaos=[],n.vaoMax=2,n.vertexCount=0,n.renderer.on("prerender",n.onPrerender,n),n}return e.prototype.onContextChange=function(){var t=this.renderer.gl;this.renderer.legacy?this.MAX_TEXTURES=1:(this.MAX_TEXTURES=Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),h.default.SPRITE_MAX_TEXTURES),this.MAX_TEXTURES=(0,a.default)(this.MAX_TEXTURES,t)),this.shader=(0,s.default)(t,this.MAX_TEXTURES),this.indexBuffer=c.default.GLBuffer.createIndexBuffer(t,this.indices,t.STATIC_DRAW),this.renderer.bindVao(null);for(var e=this.shader.attributes,r=0;r<this.vaoMax;r++){var n=this.vertexBuffers[r]=c.default.GLBuffer.createVertexBuffer(t,null,t.STREAM_DRAW),i=this.renderer.createVao().addIndex(this.indexBuffer).addAttribute(n,e.aVertexPosition,t.FLOAT,!1,this.vertByteSize,0).addAttribute(n,e.aTextureCoord,t.UNSIGNED_SHORT,!0,this.vertByteSize,8).addAttribute(n,e.aColor,t.UNSIGNED_BYTE,!0,this.vertByteSize,12);e.aTextureId&&i.addAttribute(n,e.aTextureId,t.FLOAT,!1,this.vertByteSize,16),this.vaos[r]=i}this.vao=this.vaos[0],this.currentBlendMode=99999,this.boundTextures=new Array(this.MAX_TEXTURES)},e.prototype.onPrerender=function(){this.vertexCount=0},e.prototype.render=function(t){this.currentIndex>=this.size&&this.flush(),t._texture._uvs&&(this.sprites[this.currentIndex++]=t)},e.prototype.flush=function(){if(0!==this.currentIndex){var t=this.renderer.gl,e=this.MAX_TEXTURES,r=d.default.nextPow2(this.currentIndex),n=d.default.log2(r),i=this.buffers[n],o=this.sprites,s=this.groups,a=i.float32View,u=i.uint32View,f=this.boundTextures,g=this.renderer.boundTextures,y=this.renderer.textureGC.count,m=0,_=void 0,b=void 0,x=1,T=0,w=s[0],E=void 0,S=void 0,O=l.premultiplyBlendMode[o[0]._texture.baseTexture.premultipliedAlpha?1:0][o[0].blendMode];w.textureCount=0,w.start=0,w.blend=O,p++;var M=void 0;for(M=0;M<e;++M){var P=g[M];P._enabled!==p?(f[M]=P,P._virtalBoundId=M,P._enabled=p):f[M]=this.renderer.emptyTextures[M]}for(p++,M=0;M<this.currentIndex;++M){var C=o[M];_=C._texture.baseTexture;var R=l.premultiplyBlendMode[Number(_.premultipliedAlpha)][C.blendMode];if(O!==R&&(O=R,b=null,T=e,p++),b!==_&&(b=_,_._enabled!==p)){if(T===e&&(p++,w.size=M-w.start,T=0,(w=s[x++]).blend=O,w.textureCount=0,w.start=M),_.touched=y,-1===_._virtalBoundId)for(var A=0;A<e;++A){var I=(A+v)%e,D=f[I];if(D._enabled!==p){v++,D._virtalBoundId=-1,_._virtalBoundId=I,f[I]=_;break}}_._enabled=p,w.textureCount++,w.ids[T]=_._virtalBoundId,w.textures[T++]=_}if(E=C.vertexData,S=C._texture._uvs.uvsUint32,this.renderer.roundPixels){var L=this.renderer.resolution;a[m]=(E[0]*L|0)/L,a[m+1]=(E[1]*L|0)/L,a[m+5]=(E[2]*L|0)/L,a[m+6]=(E[3]*L|0)/L,a[m+10]=(E[4]*L|0)/L,a[m+11]=(E[5]*L|0)/L,a[m+15]=(E[6]*L|0)/L,a[m+16]=(E[7]*L|0)/L}else a[m]=E[0],a[m+1]=E[1],a[m+5]=E[2],a[m+6]=E[3],a[m+10]=E[4],a[m+11]=E[5],a[m+15]=E[6],a[m+16]=E[7];u[m+2]=S[0],u[m+7]=S[1],u[m+12]=S[2],u[m+17]=S[3];var N=Math.min(C.worldAlpha,1),F=N<1&&_.premultipliedAlpha?(0,l.premultiplyTint)(C._tintRGB,N):C._tintRGB+(255*N<<24);u[m+3]=u[m+8]=u[m+13]=u[m+18]=F,a[m+4]=a[m+9]=a[m+14]=a[m+19]=_._virtalBoundId,m+=20}if(w.size=M-w.start,h.default.CAN_UPLOAD_SAME_BUFFER)this.vertexBuffers[this.vertexCount].upload(i.vertices,0,!0);else{if(this.vaoMax<=this.vertexCount){this.vaoMax++;var B=this.shader.attributes,k=this.vertexBuffers[this.vertexCount]=c.default.GLBuffer.createVertexBuffer(t,null,t.STREAM_DRAW),j=this.renderer.createVao().addIndex(this.indexBuffer).addAttribute(k,B.aVertexPosition,t.FLOAT,!1,this.vertByteSize,0).addAttribute(k,B.aTextureCoord,t.UNSIGNED_SHORT,!0,this.vertByteSize,8).addAttribute(k,B.aColor,t.UNSIGNED_BYTE,!0,this.vertByteSize,12);B.aTextureId&&j.addAttribute(k,B.aTextureId,t.FLOAT,!1,this.vertByteSize,16),this.vaos[this.vertexCount]=j}this.renderer.bindVao(this.vaos[this.vertexCount]),this.vertexBuffers[this.vertexCount].upload(i.vertices,0,!1),this.vertexCount++}for(M=0;M<e;++M)g[M]._virtalBoundId=-1;for(M=0;M<x;++M){for(var U=s[M],X=U.textureCount,G=0;G<X;G++)b=U.textures[G],g[U.ids[G]]!==b&&this.renderer.bindTexture(b,U.ids[G],!0),b._virtalBoundId=-1;this.renderer.state.setBlendMode(U.blend),t.drawElements(t.TRIANGLES,6*U.size,t.UNSIGNED_SHORT,6*U.start*2)}this.currentIndex=0}},e.prototype.start=function(){this.renderer.bindShader(this.shader),h.default.CAN_UPLOAD_SAME_BUFFER&&(this.renderer.bindVao(this.vaos[this.vertexCount]),this.vertexBuffers[this.vertexCount].bind())},e.prototype.stop=function(){this.flush()},e.prototype.destroy=function(){for(var e=0;e<this.vaoMax;e++)this.vertexBuffers[e]&&this.vertexBuffers[e].destroy(),this.vaos[e]&&this.vaos[e].destroy();this.indexBuffer&&this.indexBuffer.destroy(),this.renderer.off("prerender",this.onPrerender,this),t.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.vertexBuffers=null,this.vaos=null,this.indexBuffer=null,this.indices=null,this.sprites=null;for(var r=0;r<this.buffers.length;++r)this.buffers[r].destroy()},e}(n.default);r.default=g,i.default.registerPlugin("sprite",g)},{"../../renderers/webgl/WebGLRenderer":84,"../../renderers/webgl/utils/ObjectRenderer":94,"../../renderers/webgl/utils/checkMaxIfStatmentsInShader":97,"../../settings":101,"../../utils":125,"../../utils/createIndicesForQuads":123,"./BatchBuffer":105,"./generateMultiTextureShader":107,"bit-twiddle":1,"pixi-gl-core":15}],107:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t,e){var r=s;r=(r=r.replace(/%count%/gi,e)).replace(/%forloop%/gi,function(t){var e="";e+="\n",e+="\n";for(var r=0;r<t;r++)r>0&&(e+="\nelse "),r<t-1&&(e+="if(textureId == "+r+".0)"),e+="\n{",e+="\n\tcolor = texture2D(uSamplers["+r+"], vTextureCoord);",e+="\n}";return e+="\n",e+="\n"}(e));for(var n=new o.default(t,"precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vTextureId = aTextureId;\n    vColor = aColor;\n}\n",r),i=[],a=0;a<e;a++)i[a]=a;return n.bind(),n.uniforms.uSamplers=i,n};var n,i=t("../../Shader"),o=(n=i,n&&n.__esModule?n:{default:n});t("path");var s=["varying vec2 vTextureCoord;","varying vec4 vColor;","varying float vTextureId;","uniform sampler2D uSamplers[%count%];","void main(void){","vec4 color;","float textureId = floor(vTextureId+0.5);","%forloop%","gl_FragColor = color * vColor;","}"].join("\n")},{"../../Shader":44,path:8}],108:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=f(t("../sprites/Sprite")),o=f(t("../textures/Texture")),s=t("../math"),a=t("../utils"),u=t("../const"),h=f(t("../settings")),l=f(t("./TextStyle")),c=f(t("./TextMetrics")),d=f(t("../utils/trimCanvas"));function f(t){return t&&t.__esModule?t:{default:t}}var p={texture:!0,children:!1,baseTexture:!0},v=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(i=i||document.createElement("canvas")).width=3,i.height=3;var a=o.default.fromCanvas(i,h.default.SCALE_MODE,"text");a.orig=new s.Rectangle,a.trim=new s.Rectangle;var u=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,a));return o.default.addToCache(u._texture,u._texture.baseTexture.textureCacheIds[0]),u.canvas=i,u.context=u.canvas.getContext("2d"),u.resolution=h.default.RESOLUTION,u._text=null,u._style=null,u._styleListener=null,u._font="",u.text=r,u.style=n,u.localStyleID=-1,u}return e.prototype.updateText=function(t){var e=this._style;if(this.localStyleID!==e.styleID&&(this.dirty=!0,this.localStyleID=e.styleID),this.dirty||!t){this._font=this._style.toFontString();var r=this.context,n=c.default.measureText(this._text,this._style,this._style.wordWrap,this.canvas),i=n.width,o=n.height,s=n.lines,a=n.lineHeight,u=n.lineWidths,h=n.maxLineWidth,l=n.fontProperties;this.canvas.width=Math.ceil((i+2*e.padding)*this.resolution),this.canvas.height=Math.ceil((o+2*e.padding)*this.resolution),r.scale(this.resolution,this.resolution),r.clearRect(0,0,this.canvas.width,this.canvas.height),r.font=this._font,r.strokeStyle=e.stroke,r.lineWidth=e.strokeThickness,r.textBaseline=e.textBaseline,r.lineJoin=e.lineJoin,r.miterLimit=e.miterLimit;var d=void 0,f=void 0;if(e.dropShadow){r.fillStyle=e.dropShadowColor,r.globalAlpha=e.dropShadowAlpha,r.shadowBlur=e.dropShadowBlur,e.dropShadowBlur>0&&(r.shadowColor=e.dropShadowColor);for(var p=Math.cos(e.dropShadowAngle)*e.dropShadowDistance,v=Math.sin(e.dropShadowAngle)*e.dropShadowDistance,g=0;g<s.length;g++)d=e.strokeThickness/2,f=e.strokeThickness/2+g*a+l.ascent,"right"===e.align?d+=h-u[g]:"center"===e.align&&(d+=(h-u[g])/2),e.fill&&(this.drawLetterSpacing(s[g],d+p+e.padding,f+v+e.padding),e.stroke&&e.strokeThickness&&(r.strokeStyle=e.dropShadowColor,this.drawLetterSpacing(s[g],d+p+e.padding,f+v+e.padding,!0),r.strokeStyle=e.stroke))}r.shadowBlur=0,r.globalAlpha=1,r.fillStyle=this._generateFillStyle(e,s);for(var y=0;y<s.length;y++)d=e.strokeThickness/2,f=e.strokeThickness/2+y*a+l.ascent,"right"===e.align?d+=h-u[y]:"center"===e.align&&(d+=(h-u[y])/2),e.stroke&&e.strokeThickness&&this.drawLetterSpacing(s[y],d+e.padding,f+e.padding,!0),e.fill&&this.drawLetterSpacing(s[y],d+e.padding,f+e.padding);this.updateTexture()}},e.prototype.drawLetterSpacing=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this._style.letterSpacing;if(0!==i)for(var o=String.prototype.split.call(t,""),s=e,a=0,u="";a<t.length;)u=o[a++],n?this.context.strokeText(u,s,r):this.context.fillText(u,s,r),s+=this.context.measureText(u).width+i;else n?this.context.strokeText(t,e,r):this.context.fillText(t,e,r)},e.prototype.updateTexture=function(){var t=this.canvas;if(this._style.trim){var e=(0,d.default)(t);t.width=e.width,t.height=e.height,this.context.putImageData(e.data,0,0)}var r=this._texture,n=this._style,i=n.trim?0:n.padding,o=r.baseTexture;o.hasLoaded=!0,o.resolution=this.resolution,o.realWidth=t.width,o.realHeight=t.height,o.width=t.width/this.resolution,o.height=t.height/this.resolution,r.trim.width=r._frame.width=t.width/this.resolution,r.trim.height=r._frame.height=t.height/this.resolution,r.trim.x=-i,r.trim.y=-i,r.orig.width=r._frame.width-2*i,r.orig.height=r._frame.height-2*i,this._onTextureUpdate(),o.emit("update",o),this.dirty=!1},e.prototype.renderWebGL=function(e){this.resolution!==e.resolution&&(this.resolution=e.resolution,this.dirty=!0),this.updateText(!0),t.prototype.renderWebGL.call(this,e)},e.prototype._renderCanvas=function(e){this.resolution!==e.resolution&&(this.resolution=e.resolution,this.dirty=!0),this.updateText(!0),t.prototype._renderCanvas.call(this,e)},e.prototype.getLocalBounds=function(e){return this.updateText(!0),t.prototype.getLocalBounds.call(this,e)},e.prototype._calculateBounds=function(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)},e.prototype._onStyleChange=function(){this.dirty=!0},e.prototype._generateFillStyle=function(t,e){if(!Array.isArray(t.fill))return t.fill;if(navigator.isCocoonJS)return t.fill[0];var r=void 0,n=void 0,i=void 0,o=void 0,s=this.canvas.width/this.resolution,a=this.canvas.height/this.resolution,h=t.fill.slice(),l=t.fillGradientStops.slice();if(!l.length)for(var c=h.length+1,d=1;d<c;++d)l.push(d/c);if(h.unshift(t.fill[0]),l.unshift(0),h.push(t.fill[t.fill.length-1]),l.push(1),t.fillGradientType===u.TEXT_GRADIENT.LINEAR_VERTICAL){r=this.context.createLinearGradient(s/2,0,s/2,a),n=(h.length+1)*e.length,i=0;for(var f=0;f<e.length;f++){i+=1;for(var p=0;p<h.length;p++)o="number"==typeof l[p]?l[p]/e.length+f/e.length:i/n,r.addColorStop(o,h[p]),i++}}else{r=this.context.createLinearGradient(0,a/2,s,a/2),n=h.length+1,i=1;for(var v=0;v<h.length;v++)o="number"==typeof l[v]?l[v]:i/n,r.addColorStop(o,h[v]),i++}return r},e.prototype.destroy=function(e){"boolean"==typeof e&&(e={children:e}),e=Object.assign({},p,e),t.prototype.destroy.call(this,e),this.context=null,this.canvas=null,this._style=null},n(e,[{key:"width",get:function(){return this.updateText(!0),Math.abs(this.scale.x)*this._texture.orig.width},set:function(t){this.updateText(!0);var e=(0,a.sign)(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t}},{key:"height",get:function(){return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height},set:function(t){this.updateText(!0);var e=(0,a.sign)(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t}},{key:"style",get:function(){return this._style},set:function(t){(t=t||{})instanceof l.default?this._style=t:this._style=new l.default(t),this.localStyleID=-1,this.dirty=!0}},{key:"text",get:function(){return this._text},set:function(t){t=String(""===t||null===t||void 0===t?" ":t),this._text!==t&&(this._text=t,this.dirty=!0)}}]),e}(i.default);r.default=v},{"../const":46,"../math":70,"../settings":101,"../sprites/Sprite":102,"../textures/Texture":115,"../utils":125,"../utils/trimCanvas":130,"./TextMetrics":109,"./TextStyle":110}],109:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(e,r,n,i,o,s,a,u,h){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.text=e,this.style=r,this.width=n,this.height=i,this.lines=o,this.lineWidths=s,this.lineHeight=a,this.maxLineWidth=u,this.fontProperties=h}return t.measureText=function(e,r,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t._canvas;n=n||r.wordWrap;var o=r.toFontString(),s=t.measureFont(o),a=i.getContext("2d");a.font=o;for(var u=(n?t.wordWrap(e,r,i):e).split(/(?:\r\n|\r|\n)/),h=new Array(u.length),l=0,c=0;c<u.length;c++){var d=a.measureText(u[c]).width+(u[c].length-1)*r.letterSpacing;h[c]=d,l=Math.max(l,d)}var f=l+r.strokeThickness;r.dropShadow&&(f+=r.dropShadowDistance);var p=r.lineHeight||s.fontSize+r.strokeThickness,v=Math.max(p,s.fontSize+r.strokeThickness)+(u.length-1)*(p+r.leading);return r.dropShadow&&(v+=r.dropShadowDistance),new t(e,r,f,v,u,h,p+r.leading,l,s)},t.wordWrap=function(e,r){for(var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:t._canvas).getContext("2d"),i="",o=e.charAt(0),s=e.split("\n"),a=r.wordWrapWidth,u={},h=0;h<s.length;h++){for(var l=a,c=s[h].split(" "),d=0;d<c.length;d++){var f=n.measureText(c[d]).width;if(r.breakWords&&f>a)for(var p=c[d].split(""),v=0;v<p.length;v++){var g=p[v],y=u[g];void 0===y&&(y=n.measureText(g).width,u[g]=y),y>l?(i+="\n"+g,l=a-y):(0===v&&(d>0||" "===o)&&(i+=" "),i+=g,l-=y)}else{var m=f+n.measureText(" ").width;0===d||m>l?(d>0&&(i+="\n"),i+=c[d],l=a-f):(l-=m,i+=" "+c[d])}}h<s.length-1&&(i+="\n")}return i},t.measureFont=function(e){if(t._fonts[e])return t._fonts[e];var r={},n=t._canvas,i=t._context;i.font=e;var o=Math.ceil(i.measureText("|MÉq").width),s=Math.ceil(i.measureText("M").width),a=2*s;s=1.4*s|0,n.width=o,n.height=a,i.fillStyle="#f00",i.fillRect(0,0,o,a),i.font=e,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText("|MÉq",0,s);var u=i.getImageData(0,0,o,a).data,h=u.length,l=4*o,c=0,d=0,f=!1;for(c=0;c<s;++c){for(var p=0;p<l;p+=4)if(255!==u[d+p]){f=!0;break}if(f)break;d+=l}for(r.ascent=s-c,d=h-l,f=!1,c=a;c>s;--c){for(var v=0;v<l;v+=4)if(255!==u[d+v]){f=!0;break}if(f)break;d-=l}return r.descent=c-s,r.fontSize=r.ascent+r.descent,t._fonts[e]=r,r},t}();r.default=n;var i=document.createElement("canvas");i.width=i.height=10,n._canvas=i,n._context=i.getContext("2d"),n._fonts={}},{}],110:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=t("../const"),o=t("../utils");var s={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:i.TEXT_GRADIENT.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,wordWrap:!1,wordWrapWidth:100,leading:0},a=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.styleID=0,this.reset(),l(this,e,e)}return t.prototype.clone=function(){var e={};return l(e,this,s),new t(e)},t.prototype.reset=function(){l(this,s,s)},t.prototype.toFontString=function(){var t="number"==typeof this.fontSize?this.fontSize+"px":this.fontSize,e=this.fontFamily;Array.isArray(this.fontFamily)||(e=this.fontFamily.split(","));for(var r=e.length-1;r>=0;r--){var n=e[r].trim();/([\"\'])[^\'\"]+\1/.test(n)||(n='"'+n+'"'),e[r]=n}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+t+" "+e.join(",")},n(t,[{key:"align",get:function(){return this._align},set:function(t){this._align!==t&&(this._align=t,this.styleID++)}},{key:"breakWords",get:function(){return this._breakWords},set:function(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)}},{key:"dropShadow",get:function(){return this._dropShadow},set:function(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)}},{key:"dropShadowAlpha",get:function(){return this._dropShadowAlpha},set:function(t){this._dropShadowAlpha!==t&&(this._dropShadowAlpha=t,this.styleID++)}},{key:"dropShadowAngle",get:function(){return this._dropShadowAngle},set:function(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)}},{key:"dropShadowBlur",get:function(){return this._dropShadowBlur},set:function(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)}},{key:"dropShadowColor",get:function(){return this._dropShadowColor},set:function(t){var e=h(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)}},{key:"dropShadowDistance",get:function(){return this._dropShadowDistance},set:function(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)}},{key:"fill",get:function(){return this._fill},set:function(t){var e=h(t);this._fill!==e&&(this._fill=e,this.styleID++)}},{key:"fillGradientType",get:function(){return this._fillGradientType},set:function(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)}},{key:"fillGradientStops",get:function(){return this._fillGradientStops},set:function(t){(function(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0})(this._fillGradientStops,t)||(this._fillGradientStops=t,this.styleID++)}},{key:"fontFamily",get:function(){return this._fontFamily},set:function(t){this.fontFamily!==t&&(this._fontFamily=t,this.styleID++)}},{key:"fontSize",get:function(){return this._fontSize},set:function(t){this._fontSize!==t&&(this._fontSize=t,this.styleID++)}},{key:"fontStyle",get:function(){return this._fontStyle},set:function(t){this._fontStyle!==t&&(this._fontStyle=t,this.styleID++)}},{key:"fontVariant",get:function(){return this._fontVariant},set:function(t){this._fontVariant!==t&&(this._fontVariant=t,this.styleID++)}},{key:"fontWeight",get:function(){return this._fontWeight},set:function(t){this._fontWeight!==t&&(this._fontWeight=t,this.styleID++)}},{key:"letterSpacing",get:function(){return this._letterSpacing},set:function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.styleID++)}},{key:"lineHeight",get:function(){return this._lineHeight},set:function(t){this._lineHeight!==t&&(this._lineHeight=t,this.styleID++)}},{key:"leading",get:function(){return this._leading},set:function(t){this._leading!==t&&(this._leading=t,this.styleID++)}},{key:"lineJoin",get:function(){return this._lineJoin},set:function(t){this._lineJoin!==t&&(this._lineJoin=t,this.styleID++)}},{key:"miterLimit",get:function(){return this._miterLimit},set:function(t){this._miterLimit!==t&&(this._miterLimit=t,this.styleID++)}},{key:"padding",get:function(){return this._padding},set:function(t){this._padding!==t&&(this._padding=t,this.styleID++)}},{key:"stroke",get:function(){return this._stroke},set:function(t){var e=h(t);this._stroke!==e&&(this._stroke=e,this.styleID++)}},{key:"strokeThickness",get:function(){return this._strokeThickness},set:function(t){this._strokeThickness!==t&&(this._strokeThickness=t,this.styleID++)}},{key:"textBaseline",get:function(){return this._textBaseline},set:function(t){this._textBaseline!==t&&(this._textBaseline=t,this.styleID++)}},{key:"trim",get:function(){return this._trim},set:function(t){this._trim!==t&&(this._trim=t,this.styleID++)}},{key:"wordWrap",get:function(){return this._wordWrap},set:function(t){this._wordWrap!==t&&(this._wordWrap=t,this.styleID++)}},{key:"wordWrapWidth",get:function(){return this._wordWrapWidth},set:function(t){this._wordWrapWidth!==t&&(this._wordWrapWidth=t,this.styleID++)}}]),t}();r.default=a;function u(t){return"number"==typeof t?(0,o.hex2string)(t):("string"==typeof t&&0===t.indexOf("0x")&&(t=t.replace("0x","#")),t)}function h(t){if(Array.isArray(t)){for(var e=0;e<t.length;++e)t[e]=u(t[e]);return t}return u(t)}function l(t,e,r){for(var n in r)Array.isArray(e[n])?t[n]=e[n].slice():t[n]=e[n]}},{"../const":46,"../utils":125}],111:[function(t,e,r){"use strict";r.__esModule=!0;var n=o(t("./BaseTexture")),i=o(t("../settings"));function o(t){return t&&t.__esModule?t:{default:t}}var s=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,o=arguments[2],s=arguments[3];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,null,o));return a.resolution=s||i.default.RESOLUTION,a.width=Math.ceil(r),a.height=Math.ceil(n),a.realWidth=a.width*a.resolution,a.realHeight=a.height*a.resolution,a.scaleMode=void 0!==o?o:i.default.SCALE_MODE,a.hasLoaded=!0,a._glRenderTargets={},a._canvasRenderTarget=null,a.valid=!1,a}return e.prototype.resize=function(t,e){t=Math.ceil(t),e=Math.ceil(e),t===this.width&&e===this.height||(this.valid=t>0&&e>0,this.width=t,this.height=e,this.realWidth=this.width*this.resolution,this.realHeight=this.height*this.resolution,this.valid&&this.emit("update",this))},e.prototype.destroy=function(){t.prototype.destroy.call(this,!0),this.renderer=null},e}(n.default);r.default=s},{"../settings":101,"./BaseTexture":112}],112:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("../utils"),i=u(t("../settings")),o=u(t("eventemitter3")),s=u(t("../utils/determineCrossOrigin")),a=u(t("bit-twiddle"));function u(t){return t&&t.__esModule?t:{default:t}}var h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r,o,s){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return a.uid=(0,n.uid)(),a.touched=0,a.resolution=s||i.default.RESOLUTION,a.width=100,a.height=100,a.realWidth=100,a.realHeight=100,a.scaleMode=void 0!==o?o:i.default.SCALE_MODE,a.hasLoaded=!1,a.isLoading=!1,a.source=null,a.origSource=null,a.imageType=null,a.sourceScale=1,a.premultipliedAlpha=!0,a.imageUrl=null,a.isPowerOfTwo=!1,a.mipmap=i.default.MIPMAP_TEXTURES,a.wrapMode=i.default.WRAP_MODE,a._glTextures={},a._enabled=0,a._virtalBoundId=-1,a._destroyed=!1,a.textureCacheIds=[],r&&a.loadSource(r),a}return e.prototype.update=function(){"svg"!==this.imageType&&(this.realWidth=this.source.naturalWidth||this.source.videoWidth||this.source.width,this.realHeight=this.source.naturalHeight||this.source.videoHeight||this.source.height,this._updateDimensions()),this.emit("update",this)},e.prototype._updateDimensions=function(){this.width=this.realWidth/this.resolution,this.height=this.realHeight/this.resolution,this.isPowerOfTwo=a.default.isPow2(this.realWidth)&&a.default.isPow2(this.realHeight)},e.prototype.loadSource=function(t){var e=this.isLoading;this.hasLoaded=!1,this.isLoading=!1,e&&this.source&&(this.source.onload=null,this.source.onerror=null);var r=!this.source;if(this.source=t,(t.src&&t.complete||t.getContext)&&t.width&&t.height)this._updateImageType(),"svg"===this.imageType?this._loadSvgSource():this._sourceLoaded(),r&&this.emit("loaded",this);else if(!t.getContext){this.isLoading=!0;var n=this;if(t.onload=function(){n._updateImageType(),t.onload=null,t.onerror=null,n.isLoading&&(n.isLoading=!1,n._sourceLoaded(),"svg"!==n.imageType?n.emit("loaded",n):n._loadSvgSource())},t.onerror=function(){t.onload=null,t.onerror=null,n.isLoading&&(n.isLoading=!1,n.emit("error",n))},t.complete&&t.src){if(t.onload=null,t.onerror=null,"svg"===n.imageType)return void n._loadSvgSource();this.isLoading=!1,t.width&&t.height?(this._sourceLoaded(),e&&this.emit("loaded",this)):e&&this.emit("error",this)}}},e.prototype._updateImageType=function(){if(this.imageUrl){var t=(0,n.decomposeDataUri)(this.imageUrl),e=void 0;if(t&&"image"===t.mediaType){var r=t.subType.split("+")[0];if(!(e=(0,n.getUrlFileExtension)("."+r)))throw new Error("Invalid image type in data URI.")}else(e=(0,n.getUrlFileExtension)(this.imageUrl))||(e="png");this.imageType=e}},e.prototype._loadSvgSource=function(){if("svg"===this.imageType){var t=(0,n.decomposeDataUri)(this.imageUrl);t?this._loadSvgSourceUsingDataUri(t):this._loadSvgSourceUsingXhr()}},e.prototype._loadSvgSourceUsingDataUri=function(t){var e=void 0;if("base64"===t.encoding){if(!atob)throw new Error("Your browser doesn't support base64 conversions.");e=atob(t.data)}else e=t.data;this._loadSvgSourceUsingString(e)},e.prototype._loadSvgSourceUsingXhr=function(){var t=this,e=new XMLHttpRequest;e.onload=function(){if(e.readyState!==e.DONE||200!==e.status)throw new Error("Failed to load SVG using XHR.");t._loadSvgSourceUsingString(e.response)},e.onerror=function(){return t.emit("error",t)},e.open("GET",this.imageUrl,!0),e.send()},e.prototype._loadSvgSourceUsingString=function(t){var r=(0,n.getSvgSize)(t),i=r.width,o=r.height;if(!i||!o)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");this.realWidth=Math.round(i*this.sourceScale),this.realHeight=Math.round(o*this.sourceScale),this._updateDimensions();var s=document.createElement("canvas");s.width=this.realWidth,s.height=this.realHeight,s._pixiId="canvas_"+(0,n.uid)(),s.getContext("2d").drawImage(this.source,0,0,i,o,0,0,this.realWidth,this.realHeight),this.origSource=this.source,this.source=s,e.addToCache(this,s._pixiId),this.isLoading=!1,this._sourceLoaded(),this.emit("loaded",this)},e.prototype._sourceLoaded=function(){this.hasLoaded=!0,this.update()},e.prototype.destroy=function(){this.imageUrl&&(delete n.TextureCache[this.imageUrl],this.imageUrl=null,navigator.isCocoonJS||(this.source.src="")),this.source=null,this.dispose(),e.removeFromCache(this),this.textureCacheIds=null,this._destroyed=!0},e.prototype.dispose=function(){this.emit("dispose",this)},e.prototype.updateSourceImage=function(t){this.source.src=t,this.loadSource(this.source)},e.fromImage=function(t,r,i,o){var a=n.BaseTextureCache[t];if(!a){var u=new Image;void 0===r&&0!==t.indexOf("data:")?u.crossOrigin=(0,s.default)(t):r&&(u.crossOrigin="string"==typeof r?r:"anonymous"),(a=new e(u,i)).imageUrl=t,o&&(a.sourceScale=o),a.resolution=(0,n.getResolutionOfUrl)(t),u.src=t,e.addToCache(a,t)}return a},e.fromCanvas=function(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"canvas";t._pixiId||(t._pixiId=i+"_"+(0,n.uid)());var o=n.BaseTextureCache[t._pixiId];return o||(o=new e(t,r),e.addToCache(o,t._pixiId)),o},e.from=function(t,r,i){if("string"==typeof t)return e.fromImage(t,void 0,r,i);if(t instanceof HTMLImageElement){var o=t.src,s=n.BaseTextureCache[o];return s||((s=new e(t,r)).imageUrl=o,i&&(s.sourceScale=i),s.resolution=(0,n.getResolutionOfUrl)(o),e.addToCache(s,o)),s}return t instanceof HTMLCanvasElement?e.fromCanvas(t,r):t},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),n.BaseTextureCache[e]&&console.warn("BaseTexture added to the cache with an id ["+e+"] that already had an entry"),n.BaseTextureCache[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=n.BaseTextureCache[t];if(e){var r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete n.BaseTextureCache[t],e}}else if(t&&t.textureCacheIds){for(var i=0;i<t.textureCacheIds.length;++i)delete n.BaseTextureCache[t.textureCacheIds[i]];return t.textureCacheIds.length=0,t}return null},e}(o.default);r.default=h},{"../settings":101,"../utils":125,"../utils/determineCrossOrigin":124,"bit-twiddle":1,eventemitter3:3}],113:[function(t,e,r){"use strict";r.__esModule=!0;var n=i(t("./BaseRenderTexture"));function i(t){return t&&t.__esModule?t:{default:t}}var o=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=null;if(!(r instanceof n.default)){var s=arguments[1],a=arguments[2],u=arguments[3],h=arguments[4];console.warn("Please use RenderTexture.create("+s+", "+a+") instead of the ctor directly."),o=arguments[0],i=null,r=new n.default(s,a,u,h)}var l=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,i));return l.legacyRenderer=o,l.valid=!0,l._updateUvs(),l}return e.prototype.resize=function(t,e,r){t=Math.ceil(t),e=Math.ceil(e),this.valid=t>0&&e>0,this._frame.width=this.orig.width=t,this._frame.height=this.orig.height=e,r||this.baseTexture.resize(t,e),this._updateUvs()},e.create=function(t,r,i,o){return new e(new n.default(t,r,i,o))},e}(i(t("./Texture")).default);r.default=o},{"./BaseRenderTexture":111,"./Texture":115}],114:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=t("../"),o=t("../utils");var s=function(){n(t,null,[{key:"BATCH_SIZE",get:function(){return 1e3}}]);function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.baseTexture=e,this.textures={},this.data=r,this.resolution=this._updateResolution(n||this.baseTexture.imageUrl),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}return t.prototype._updateResolution=function(t){var e=this.data.meta.scale,r=(0,o.getResolutionOfUrl)(t,null);return null===r&&(r=void 0!==e?parseFloat(e):1),1!==r&&(this.baseTexture.resolution=r,this.baseTexture.update()),r},t.prototype.parse=function(e){this._batchIndex=0,this._callback=e,this._frameKeys.length<=t.BATCH_SIZE?(this._processFrames(0),this._parseComplete()):this._nextBatch()},t.prototype._processFrames=function(e){for(var r=e,n=t.BATCH_SIZE,o=this.baseTexture.sourceScale;r-e<n&&r<this._frameKeys.length;){var s=this._frameKeys[r],a=this._frames[s].frame;if(a){var u=null,h=null,l=new i.Rectangle(0,0,Math.floor(this._frames[s].sourceSize.w*o)/this.resolution,Math.floor(this._frames[s].sourceSize.h*o)/this.resolution);u=this._frames[s].rotated?new i.Rectangle(Math.floor(a.x*o)/this.resolution,Math.floor(a.y*o)/this.resolution,Math.floor(a.h*o)/this.resolution,Math.floor(a.w*o)/this.resolution):new i.Rectangle(Math.floor(a.x*o)/this.resolution,Math.floor(a.y*o)/this.resolution,Math.floor(a.w*o)/this.resolution,Math.floor(a.h*o)/this.resolution),this._frames[s].trimmed&&(h=new i.Rectangle(Math.floor(this._frames[s].spriteSourceSize.x*o)/this.resolution,Math.floor(this._frames[s].spriteSourceSize.y*o)/this.resolution,Math.floor(a.w*o)/this.resolution,Math.floor(a.h*o)/this.resolution)),this.textures[s]=new i.Texture(this.baseTexture,u,l,h,this._frames[s].rotated?2:0),i.Texture.addToCache(this.textures[s],s)}r++}},t.prototype._parseComplete=function(){var t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)},t.prototype._nextBatch=function(){var e=this;this._processFrames(this._batchIndex*t.BATCH_SIZE),this._batchIndex++,setTimeout(function(){e._batchIndex*t.BATCH_SIZE<e._frameKeys.length?e._nextBatch():e._parseComplete()},0)},t.prototype.destroy=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];for(var e in this.textures)this.textures[e].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&this.baseTexture.destroy(),this.baseTexture=null},t}();r.default=s},{"../":65,"../utils":125}],115:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=c(t("./BaseTexture")),o=c(t("./VideoBaseTexture")),s=c(t("./TextureUvs")),a=c(t("eventemitter3")),u=t("../math"),h=t("../utils"),l=c(t("../settings"));function c(t){return t&&t.__esModule?t:{default:t}}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r,n,i,o,s){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));if(a.noFrame=!1,n||(a.noFrame=!0,n=new u.Rectangle(0,0,1,1)),r instanceof e&&(r=r.baseTexture),a.baseTexture=r,a._frame=n,a.trim=o,a.valid=!1,a.requiresUpdate=!1,a._uvs=null,a.orig=i||n,a._rotate=Number(s||0),!0===s)a._rotate=2;else if(a._rotate%2!=0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");return r.hasLoaded?(a.noFrame&&(n=new u.Rectangle(0,0,r.width,r.height),r.on("update",a.onBaseTextureUpdated,a)),a.frame=n):r.once("loaded",a.onBaseTextureLoaded,a),a._updateID=0,a.transform=null,a.textureCacheIds=[],a}return e.prototype.update=function(){this.baseTexture.update()},e.prototype.onBaseTextureLoaded=function(t){this._updateID++,this.noFrame?this.frame=new u.Rectangle(0,0,t.width,t.height):this.frame=this._frame,this.baseTexture.on("update",this.onBaseTextureUpdated,this),this.emit("update",this)},e.prototype.onBaseTextureUpdated=function(t){this._updateID++,this._frame.width=t.width,this._frame.height=t.height,this.emit("update",this)},e.prototype.destroy=function(t){this.baseTexture&&(t&&(h.TextureCache[this.baseTexture.imageUrl]&&e.removeFromCache(this.baseTexture.imageUrl),this.baseTexture.destroy()),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture.off("loaded",this.onBaseTextureLoaded,this),this.baseTexture=null),this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,e.removeFromCache(this),this.textureCacheIds=null},e.prototype.clone=function(){return new e(this.baseTexture,this.frame,this.orig,this.trim,this.rotate)},e.prototype._updateUvs=function(){this._uvs||(this._uvs=new s.default),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++},e.fromImage=function(t,r,n,o){var s=h.TextureCache[t];return s||(s=new e(i.default.fromImage(t,r,n,o)),e.addToCache(s,t)),s},e.fromFrame=function(t){var e=h.TextureCache[t];if(!e)throw new Error('The frameId "'+t+'" does not exist in the texture cache');return e},e.fromCanvas=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"canvas";return new e(i.default.fromCanvas(t,r,n))},e.fromVideo=function(t,r){return"string"==typeof t?e.fromVideoUrl(t,r):new e(o.default.fromVideo(t,r))},e.fromVideoUrl=function(t,r){return new e(o.default.fromUrl(t,r))},e.from=function(t){if("string"==typeof t){var r=h.TextureCache[t];if(!r){return null!==t.match(/\.(mp4|webm|ogg|h264|avi|mov)$/)?e.fromVideoUrl(t):e.fromImage(t)}return r}return t instanceof HTMLImageElement?new e(i.default.from(t)):t instanceof HTMLCanvasElement?e.fromCanvas(t,l.default.SCALE_MODE,"HTMLCanvasElement"):t instanceof HTMLVideoElement?e.fromVideo(t):t instanceof i.default?new e(t):t},e.fromLoader=function(t,r,n){var o=new i.default(t,void 0,(0,h.getResolutionOfUrl)(r)),s=new e(o);return o.imageUrl=r,n||(n=r),i.default.addToCache(s.baseTexture,n),e.addToCache(s,n),n!==r&&(i.default.addToCache(s.baseTexture,r),e.addToCache(s,r)),s},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),h.TextureCache[e]&&console.warn("Texture added to the cache with an id ["+e+"] that already had an entry"),h.TextureCache[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=h.TextureCache[t];if(e){var r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete h.TextureCache[t],e}}else if(t&&t.textureCacheIds){for(var n=0;n<t.textureCacheIds.length;++n)h.TextureCache[t.textureCacheIds[n]]===t&&delete h.TextureCache[t.textureCacheIds[n]];return t.textureCacheIds.length=0,t}return null},n(e,[{key:"frame",get:function(){return this._frame},set:function(t){this._frame=t,this.noFrame=!1;var e=t.x,r=t.y,n=t.width,i=t.height,o=e+n>this.baseTexture.width,s=r+i>this.baseTexture.height;if(o||s){var a=o&&s?"and":"or",u="X: "+e+" + "+n+" = "+(e+n)+" > "+this.baseTexture.width,h="Y: "+r+" + "+i+" = "+(r+i)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+u+" "+a+" "+h)}this.valid=n&&i&&this.baseTexture.hasLoaded,this.trim||this.rotate||(this.orig=t),this.valid&&this._updateUvs()}},{key:"rotate",get:function(){return this._rotate},set:function(t){this._rotate=t,this.valid&&this._updateUvs()}},{key:"width",get:function(){return this.orig.width}},{key:"height",get:function(){return this.orig.height}}]),e}(a.default);r.default=d;function f(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}d.EMPTY=new d(new i.default),f(d.EMPTY),f(d.EMPTY.baseTexture),d.WHITE=function(){var t=document.createElement("canvas");t.width=10,t.height=10;var e=t.getContext("2d");return e.fillStyle="white",e.fillRect(0,0,10,10),new d(new i.default(t))}(),f(d.WHITE),f(d.WHITE.baseTexture)},{"../math":70,"../settings":101,"../utils":125,"./BaseTexture":112,"./TextureUvs":117,"./VideoBaseTexture":118,eventemitter3:3}],116:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=t("../math/Matrix"),s=(n=o,n&&n.__esModule?n:{default:n});var a=new s.default,u=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._texture=e,this.mapCoord=new s.default,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._lastTextureID=-1,this.clampOffset=0,this.clampMargin=void 0===r?.5:r}return t.prototype.multiplyUvs=function(t,e){void 0===e&&(e=t);for(var r=this.mapCoord,n=0;n<t.length;n+=2){var i=t[n],o=t[n+1];e[n]=i*r.a+o*r.c+r.tx,e[n+1]=i*r.b+o*r.d+r.ty}return e},t.prototype.update=function(t){var e=this._texture;if(!e||!e.valid)return!1;if(!t&&this._lastTextureID===e._updateID)return!1;this._lastTextureID=e._updateID;var r=e._uvs;this.mapCoord.set(r.x1-r.x0,r.y1-r.y0,r.x3-r.x0,r.y3-r.y0,r.x0,r.y0);var n=e.orig,i=e.trim;i&&(a.set(n.width/i.width,0,0,n.height/i.height,-i.x/i.width,-i.y/i.height),this.mapCoord.append(a));var o=e.baseTexture,s=this.uClampFrame,u=this.clampMargin/o.resolution,h=this.clampOffset;return s[0]=(e._frame.x+u+h)/o.width,s[1]=(e._frame.y+u+h)/o.height,s[2]=(e._frame.x+e._frame.width-u+h)/o.width,s[3]=(e._frame.y+e._frame.height-u+h)/o.height,this.uClampOffset[0]=h/o.realWidth,this.uClampOffset[1]=h/o.realHeight,!0},i(t,[{key:"texture",get:function(){return this._texture},set:function(t){this._texture=t,this._lastTextureID=-1}}]),t}();r.default=u},{"../math/Matrix":67}],117:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=t("../math/GroupD8"),o=(n=i,n&&n.__esModule?n:{default:n});var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsUint32=new Uint32Array(4)}return t.prototype.set=function(t,e,r){var n=e.width,i=e.height;if(r){var s=t.width/2/n,a=t.height/2/i,u=t.x/n+s,h=t.y/i+a;r=o.default.add(r,o.default.NW),this.x0=u+s*o.default.uX(r),this.y0=h+a*o.default.uY(r),r=o.default.add(r,2),this.x1=u+s*o.default.uX(r),this.y1=h+a*o.default.uY(r),r=o.default.add(r,2),this.x2=u+s*o.default.uX(r),this.y2=h+a*o.default.uY(r),r=o.default.add(r,2),this.x3=u+s*o.default.uX(r),this.y3=h+a*o.default.uY(r)}else this.x0=t.x/n,this.y0=t.y/i,this.x1=(t.x+t.width)/n,this.y1=t.y/i,this.x2=(t.x+t.width)/n,this.y2=(t.y+t.height)/i,this.x3=t.x/n,this.y3=(t.y+t.height)/i;this.uvsUint32[0]=(65535*this.y0&65535)<<16|65535*this.x0&65535,this.uvsUint32[1]=(65535*this.y1&65535)<<16|65535*this.x1&65535,this.uvsUint32[2]=(65535*this.y2&65535)<<16|65535*this.x2&65535,this.uvsUint32[3]=(65535*this.y3&65535)<<16|65535*this.x3&65535},t}();r.default=s},{"../math/GroupD8":66}],118:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=h(t("./BaseTexture")),o=t("../utils"),s=t("../ticker"),a=t("../const"),u=h(t("../utils/determineCrossOrigin"));function h(t){return t&&t.__esModule?t:{default:t}}var l=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r,n){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),!r)throw new Error("No video source element specified.");(r.readyState===r.HAVE_ENOUGH_DATA||r.readyState===r.HAVE_FUTURE_DATA)&&r.width&&r.height&&(r.complete=!0);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,n));return i.width=r.videoWidth,i.height=r.videoHeight,i._autoUpdate=!0,i._isAutoUpdating=!1,i.autoPlay=!0,i.update=i.update.bind(i),i._onCanPlay=i._onCanPlay.bind(i),r.addEventListener("play",i._onPlayStart.bind(i)),r.addEventListener("pause",i._onPlayStop.bind(i)),i.hasLoaded=!1,i.__loaded=!1,i._isSourceReady()?i._onCanPlay():(r.addEventListener("canplay",i._onCanPlay),r.addEventListener("canplaythrough",i._onCanPlay)),i}return e.prototype._isSourcePlaying=function(){var t=this.source;return t.currentTime>0&&!1===t.paused&&!1===t.ended&&t.readyState>2},e.prototype._isSourceReady=function(){return 3===this.source.readyState||4===this.source.readyState},e.prototype._onPlayStart=function(){this.hasLoaded||this._onCanPlay(),!this._isAutoUpdating&&this.autoUpdate&&(s.shared.add(this.update,this,a.UPDATE_PRIORITY.HIGH),this._isAutoUpdating=!0)},e.prototype._onPlayStop=function(){this._isAutoUpdating&&(s.shared.remove(this.update,this),this._isAutoUpdating=!1)},e.prototype._onCanPlay=function(){this.hasLoaded=!0,this.source&&(this.source.removeEventListener("canplay",this._onCanPlay),this.source.removeEventListener("canplaythrough",this._onCanPlay),this.width=this.source.videoWidth,this.height=this.source.videoHeight,this.__loaded||(this.__loaded=!0,this.emit("loaded",this)),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.source.play())},e.prototype.destroy=function(){this._isAutoUpdating&&s.shared.remove(this.update,this),this.source&&this.source._pixiId&&(i.default.removeFromCache(this.source._pixiId),delete this.source._pixiId,this.source.pause(),this.source.src="",this.source.load()),t.prototype.destroy.call(this)},e.fromVideo=function(t,r){t._pixiId||(t._pixiId="video_"+(0,o.uid)());var n=o.BaseTextureCache[t._pixiId];return n||(n=new e(t,r),i.default.addToCache(n,t._pixiId)),n},e.fromUrl=function(t,r,n){var i=document.createElement("video");i.setAttribute("webkit-playsinline",""),i.setAttribute("playsinline","");var o=Array.isArray(t)?t[0].src||t[0]:t.src||t;if(void 0===n&&0!==o.indexOf("data:")?i.crossOrigin=(0,u.default)(o):n&&(i.crossOrigin="string"==typeof n?n:"anonymous"),Array.isArray(t))for(var s=0;s<t.length;++s)i.appendChild(c(t[s].src||t[s],t[s].mime));else i.appendChild(c(o,t.mime));return i.load(),e.fromVideo(i,r)},n(e,[{key:"autoUpdate",get:function(){return this._autoUpdate},set:function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isAutoUpdating?(s.shared.remove(this.update,this),this._isAutoUpdating=!1):this._autoUpdate&&!this._isAutoUpdating&&(s.shared.add(this.update,this,a.UPDATE_PRIORITY.HIGH),this._isAutoUpdating=!0))}}]),e}(i.default);r.default=l,l.fromUrls=l.fromUrl;function c(t,e){e||(e="video/"+t.substr(t.lastIndexOf(".")+1));var r=document.createElement("source");return r.src=t,r.type=e,r}},{"../const":46,"../ticker":121,"../utils":125,"../utils/determineCrossOrigin":124,"./BaseTexture":112}],119:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=a(t("../settings")),o=t("../const"),s=a(t("./TickerListener"));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._head=new s.default(null,null,1/0),this._requestId=null,this._maxElapsedMS=100,this.autoStart=!1,this.deltaTime=1,this.elapsedMS=1/i.default.TARGET_FPMS,this.lastTime=-1,this.speed=1,this.started=!1,this._tick=function(t){e._requestId=null,e.started&&(e.update(t),e.started&&null===e._requestId&&e._head.next&&(e._requestId=requestAnimationFrame(e._tick)))}}return t.prototype._requestIfNeeded=function(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._requestId=requestAnimationFrame(this._tick))},t.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},t.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},t.prototype.add=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.UPDATE_PRIORITY.NORMAL;return this._addListener(new s.default(t,e,r))},t.prototype.addOnce=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.UPDATE_PRIORITY.NORMAL;return this._addListener(new s.default(t,e,r,!0))},t.prototype._addListener=function(t){var e=this._head.next,r=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(r);break}r=e,e=e.next}t.previous||t.connect(r)}else t.connect(r);return this._startIfPossible(),this},t.prototype.remove=function(t,e){for(var r=this._head.next;r;)r=r.match(t,e)?r.destroy():r.next;return this._head.next||this._cancelIfNeeded(),this},t.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},t.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},t.prototype.destroy=function(){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null},t.prototype.update=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:performance.now(),e=void 0;if(t>this.lastTime){(e=this.elapsedMS=t-this.lastTime)>this._maxElapsedMS&&(e=this._maxElapsedMS),this.deltaTime=e*i.default.TARGET_FPMS*this.speed;for(var r=this._head,n=r.next;n;)n=n.emit(this.deltaTime);r.next||this._cancelIfNeeded()}else this.deltaTime=this.elapsedMS=0;this.lastTime=t},n(t,[{key:"FPS",get:function(){return 1e3/this.elapsedMS}},{key:"minFPS",get:function(){return 1e3/this._maxElapsedMS},set:function(t){var e=Math.min(Math.max(0,t)/1e3,i.default.TARGET_FPMS);this._maxElapsedMS=1/e}}]),t}();r.default=u},{"../const":46,"../settings":101,"./TickerListener":120}],120:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.fn=e,this.context=r,this.priority=n,this.once=i,this.next=null,this.previous=null,this._destroyed=!1}return t.prototype.match=function(t,e){return e=e||null,this.fn===t&&this.context===e},t.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var e=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),e},t.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},t.prototype.destroy=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var e=this.previous;return this.next=t?null:e,this.previous=null,e},t}();r.default=n},{}],121:[function(t,e,r){"use strict";r.__esModule=!0,r.Ticker=r.shared=void 0;var n,i=t("./Ticker"),o=(n=i,n&&n.__esModule?n:{default:n});var s=new o.default;s.autoStart=!0,s.destroy=function(){},r.shared=s,r.Ticker=o.default},{"./Ticker":119}],122:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(){return!(navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform))}},{}],123:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t){for(var e=6*t,r=new Uint16Array(e),n=0,i=0;n<e;n+=6,i+=4)r[n+0]=i+0,r[n+1]=i+1,r[n+2]=i+2,r[n+3]=i+0,r[n+4]=i+2,r[n+5]=i+3;return r}},{}],124:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location;if(0===t.indexOf("data:"))return"";e=e||window.location,s||(s=document.createElement("a"));s.href=t;var r=!(t=o.default.parse(s.href)).port&&""===e.port||t.port===e.port;if(t.hostname!==e.hostname||!r||t.protocol!==e.protocol)return"anonymous";return""};var n,i=t("url"),o=(n=i,n&&n.__esModule?n:{default:n});var s=void 0},{url:38}],125:[function(t,e,r){"use strict";r.__esModule=!0,r.premultiplyBlendMode=r.BaseTextureCache=r.TextureCache=r.mixins=r.pluginTarget=r.EventEmitter=r.removeItems=r.isMobile=void 0,r.uid=function(){return++f},r.hex2rgb=function(t,e){return(e=e||[])[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e},r.hex2string=function(t){return t=t.toString(16),"#"+(t="000000".substr(0,6-t.length)+t)},r.rgb2hex=function(t){return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},r.getResolutionOfUrl=function(t,e){var r=i.default.RETINA_PREFIX.exec(t);if(r)return parseFloat(r[1]);return void 0!==e?e:1},r.decomposeDataUri=function(t){var e=n.DATA_URI.exec(t);if(e)return{mediaType:e[1]?e[1].toLowerCase():void 0,subType:e[2]?e[2].toLowerCase():void 0,encoding:e[3]?e[3].toLowerCase():void 0,data:e[4]};return},r.getUrlFileExtension=function(t){var e=n.URL_FILE_EXTENSION.exec(t);if(e)return e[1].toLowerCase();return},r.getSvgSize=function(t){var e=n.SVG_SIZE.exec(t),r={};e&&(r[e[1]]=Math.round(parseFloat(e[3])),r[e[5]]=Math.round(parseFloat(e[7])));return r},r.skipHello=function(){p=!0},r.sayHello=function(t){if(p)return;if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var e=["\n %c %c %c PixiJS "+n.VERSION+" - ? "+t+" ?  %c  %c  http://www.pixijs.com/  %c %c ?%c?%c? \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];window.console.log.apply(console,e)}else window.console&&window.console.log("PixiJS "+n.VERSION+" - "+t+" - http://www.pixijs.com/");p=!0},r.isWebGLSupported=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:!0};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),r=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),n=!(!r||!r.getContextAttributes().stencil);if(r){var i=r.getExtension("WEBGL_lose_context");i&&i.loseContext()}return r=null,n}catch(t){return!1}},r.sign=function(t){return 0===t?0:t<0?-1:1},r.destroyTextureCache=function(){var t=void 0;for(t in v)v[t].destroy();for(t in g)g[t].destroy()},r.clearTextureCache=function(){var t=void 0;for(t in v)delete v[t];for(t in g)delete g[t]},r.correctBlendMode=function(t,e){return y[e?1:0][t]},r.premultiplyTint=function(t,e){if(1===e)return(255*e<<24)+t;if(0===e)return 0;var r=t>>16&255,n=t>>8&255,i=255&t;return(255*e<<24)+((r=r*e+.5|0)<<16)+((n=n*e+.5|0)<<8)+(i=i*e+.5|0)},r.premultiplyRgba=function(t,e,r,n){r=r||new Float32Array(4),n||void 0===n?(r[0]=t[0]*e,r[1]=t[1]*e,r[2]=t[2]*e):(r[0]=t[0],r[1]=t[1],r[2]=t[2]);return r[3]=e,r},r.premultiplyTintToRgba=function(t,e,r,n){(r=r||new Float32Array(4))[0]=(t>>16&255)/255,r[1]=(t>>8&255)/255,r[2]=(255&t)/255,(n||void 0===n)&&(r[0]*=e,r[1]*=e,r[2]*=e);return r[3]=e,r};var n=t("../const"),i=d(t("../settings")),o=d(t("eventemitter3")),s=d(t("./pluginTarget")),a=c(t("./mixin")),u=c(t("ismobilejs")),h=d(t("remove-array-items")),l=d(t("./mapPremultipliedBlendModes"));function c(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function d(t){return t&&t.__esModule?t:{default:t}}var f=0,p=!1;r.isMobile=u,r.removeItems=h.default,r.EventEmitter=o.default,r.pluginTarget=s.default,r.mixins=a;var v=r.TextureCache=Object.create(null),g=r.BaseTextureCache=Object.create(null);var y=r.premultiplyBlendMode=(0,l.default)()},{"../const":46,"../settings":101,"./mapPremultipliedBlendModes":126,"./mixin":128,"./pluginTarget":129,eventemitter3:3,ismobilejs:4,"remove-array-items":31}],126:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(){for(var t=[],e=[],r=0;r<32;r++)t[r]=r,e[r]=r;t[n.BLEND_MODES.NORMAL_NPM]=n.BLEND_MODES.NORMAL,t[n.BLEND_MODES.ADD_NPM]=n.BLEND_MODES.ADD,t[n.BLEND_MODES.SCREEN_NPM]=n.BLEND_MODES.SCREEN,e[n.BLEND_MODES.NORMAL]=n.BLEND_MODES.NORMAL_NPM,e[n.BLEND_MODES.ADD]=n.BLEND_MODES.ADD_NPM,e[n.BLEND_MODES.SCREEN]=n.BLEND_MODES.SCREEN_NPM;var i=[];return i.push(e),i.push(t),i};var n=t("../const")},{"../const":46}],127:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t){if(o.default.tablet||o.default.phone)return 4;return t};var n,i=t("ismobilejs"),o=(n=i,n&&n.__esModule?n:{default:n})},{ismobilejs:4}],128:[function(t,e,r){"use strict";r.__esModule=!0,r.mixin=n,r.delayMixin=function(t,e){i.push(t,e)},r.performMixins=function(){for(var t=0;t<i.length;t+=2)n(i[t],i[t+1]);i.length=0};function n(t,e){if(t&&e)for(var r=Object.keys(e),n=0;n<r.length;++n){var i=r[n];Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}}var i=[]},{}],129:[function(t,e,r){"use strict";r.__esModule=!0;r.default={mixin:function(t){(e=t).__plugins={},e.registerPlugin=function(t,r){e.__plugins[t]=r},e.prototype.initPlugins=function(){this.plugins=this.plugins||{};for(var t in e.__plugins)this.plugins[t]=new e.__plugins[t](this)},e.prototype.destroyPlugins=function(){for(var t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null;this.plugins=null};var e}}},{}],130:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t){var e=t.width,r=t.height,n=t.getContext("2d"),i=n.getImageData(0,0,e,r).data,o=i.length,s={top:null,left:null,right:null,bottom:null},a=void 0,u=void 0,h=void 0;for(a=0;a<o;a+=4)0!==i[a+3]&&(u=a/4%e,h=~~(a/4/e),null===s.top&&(s.top=h),null===s.left?s.left=u:u<s.left&&(s.left=u),null===s.right?s.right=u+1:s.right<u&&(s.right=u+1),null===s.bottom?s.bottom=h:s.bottom<h&&(s.bottom=h));e=s.right-s.left,r=s.bottom-s.top+1;var l=n.getImageData(s.left,s.top,e,r);return{height:r,width:e,data:l}}},{}],131:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t){var e=t.mesh,r=t.particles,i=t.extras,o=t.filters,s=t.prepare,a=t.loaders,u=t.interaction;Object.defineProperties(t,{SpriteBatch:{get:function(){throw new ReferenceError("SpriteBatch does not exist any more, please use the new ParticleContainer instead.")}},AssetLoader:{get:function(){throw new ReferenceError("The loader system was overhauled in PixiJS v3, please see the new PIXI.loaders.Loader class.")}},Stage:{get:function(){return n("You do not need to use a PIXI Stage any more, you can simply render any container."),t.Container}},DisplayObjectContainer:{get:function(){return n("DisplayObjectContainer has been shortened to Container, please use Container from now on."),t.Container}},Strip:{get:function(){return n("The Strip class has been renamed to Mesh and moved to mesh.Mesh, please use mesh.Mesh from now on."),e.Mesh}},Rope:{get:function(){return n("The Rope class has been moved to mesh.Rope, please use mesh.Rope from now on."),e.Rope}},ParticleContainer:{get:function(){return n("The ParticleContainer class has been moved to particles.ParticleContainer, please use particles.ParticleContainer from now on."),r.ParticleContainer}},MovieClip:{get:function(){return n("The MovieClip class has been moved to extras.AnimatedSprite, please use extras.AnimatedSprite."),i.AnimatedSprite}},TilingSprite:{get:function(){return n("The TilingSprite class has been moved to extras.TilingSprite, please use extras.TilingSprite from now on."),i.TilingSprite}},BitmapText:{get:function(){return n("The BitmapText class has been moved to extras.BitmapText, please use extras.BitmapText from now on."),i.BitmapText}},blendModes:{get:function(){return n("The blendModes has been moved to BLEND_MODES, please use BLEND_MODES from now on."),t.BLEND_MODES}},scaleModes:{get:function(){return n("The scaleModes has been moved to SCALE_MODES, please use SCALE_MODES from now on."),t.SCALE_MODES}},BaseTextureCache:{get:function(){return n("The BaseTextureCache class has been moved to utils.BaseTextureCache, please use utils.BaseTextureCache from now on."),t.utils.BaseTextureCache}},TextureCache:{get:function(){return n("The TextureCache class has been moved to utils.TextureCache, please use utils.TextureCache from now on."),t.utils.TextureCache}},math:{get:function(){return n("The math namespace is deprecated, please access members already accessible on PIXI."),t}},AbstractFilter:{get:function(){return n("AstractFilter has been renamed to Filter, please use PIXI.Filter"),t.Filter}},TransformManual:{get:function(){return n("TransformManual has been renamed to TransformBase, please update your pixi-spine"),t.TransformBase}},TARGET_FPMS:{get:function(){return n("PIXI.TARGET_FPMS has been deprecated, please use PIXI.settings.TARGET_FPMS"),t.settings.TARGET_FPMS},set:function(e){n("PIXI.TARGET_FPMS has been deprecated, please use PIXI.settings.TARGET_FPMS"),t.settings.TARGET_FPMS=e}},FILTER_RESOLUTION:{get:function(){return n("PIXI.FILTER_RESOLUTION has been deprecated, please use PIXI.settings.FILTER_RESOLUTION"),t.settings.FILTER_RESOLUTION},set:function(e){n("PIXI.FILTER_RESOLUTION has been deprecated, please use PIXI.settings.FILTER_RESOLUTION"),t.settings.FILTER_RESOLUTION=e}},RESOLUTION:{get:function(){return n("PIXI.RESOLUTION has been deprecated, please use PIXI.settings.RESOLUTION"),t.settings.RESOLUTION},set:function(e){n("PIXI.RESOLUTION has been deprecated, please use PIXI.settings.RESOLUTION"),t.settings.RESOLUTION=e}},MIPMAP_TEXTURES:{get:function(){return n("PIXI.MIPMAP_TEXTURES has been deprecated, please use PIXI.settings.MIPMAP_TEXTURES"),t.settings.MIPMAP_TEXTURES},set:function(e){n("PIXI.MIPMAP_TEXTURES has been deprecated, please use PIXI.settings.MIPMAP_TEXTURES"),t.settings.MIPMAP_TEXTURES=e}},SPRITE_BATCH_SIZE:{get:function(){return n("PIXI.SPRITE_BATCH_SIZE has been deprecated, please use PIXI.settings.SPRITE_BATCH_SIZE"),t.settings.SPRITE_BATCH_SIZE},set:function(e){n("PIXI.SPRITE_BATCH_SIZE has been deprecated, please use PIXI.settings.SPRITE_BATCH_SIZE"),t.settings.SPRITE_BATCH_SIZE=e}},SPRITE_MAX_TEXTURES:{get:function(){return n("PIXI.SPRITE_MAX_TEXTURES has been deprecated, please use PIXI.settings.SPRITE_MAX_TEXTURES"),t.settings.SPRITE_MAX_TEXTURES},set:function(e){n("PIXI.SPRITE_MAX_TEXTURES has been deprecated, please use PIXI.settings.SPRITE_MAX_TEXTURES"),t.settings.SPRITE_MAX_TEXTURES=e}},RETINA_PREFIX:{get:function(){return n("PIXI.RETINA_PREFIX has been deprecated, please use PIXI.settings.RETINA_PREFIX"),t.settings.RETINA_PREFIX},set:function(e){n("PIXI.RETINA_PREFIX has been deprecated, please use PIXI.settings.RETINA_PREFIX"),t.settings.RETINA_PREFIX=e}},DEFAULT_RENDER_OPTIONS:{get:function(){return n("PIXI.DEFAULT_RENDER_OPTIONS has been deprecated, please use PIXI.settings.DEFAULT_RENDER_OPTIONS"),t.settings.RENDER_OPTIONS}}});for(var h=[{parent:"TRANSFORM_MODE",target:"TRANSFORM_MODE"},{parent:"GC_MODES",target:"GC_MODE"},{parent:"WRAP_MODES",target:"WRAP_MODE"},{parent:"SCALE_MODES",target:"SCALE_MODE"},{parent:"PRECISION",target:"PRECISION_FRAGMENT"}],l=function(e){var r=h[e];Object.defineProperty(t[r.parent],"DEFAULT",{get:function(){return n("PIXI."+r.parent+".DEFAULT has been deprecated, please use PIXI.settings."+r.target),t.settings[r.target]},set:function(e){n("PIXI."+r.parent+".DEFAULT has been deprecated, please use PIXI.settings."+r.target),t.settings[r.target]=e}})},c=0;c<h.length;c++)l(c);Object.defineProperties(t.settings,{PRECISION:{get:function(){return n("PIXI.settings.PRECISION has been deprecated, please use PIXI.settings.PRECISION_FRAGMENT"),t.settings.PRECISION_FRAGMENT},set:function(e){n("PIXI.settings.PRECISION has been deprecated, please use PIXI.settings.PRECISION_FRAGMENT"),t.settings.PRECISION_FRAGMENT=e}}}),i.AnimatedSprite&&Object.defineProperties(i,{MovieClip:{get:function(){return n("The MovieClip class has been renamed to AnimatedSprite, please use AnimatedSprite from now on."),i.AnimatedSprite}}});i&&Object.defineProperties(i,{TextureTransform:{get:function(){return n("The TextureTransform class has been renamed to TextureMatrix, please use PIXI.TextureMatrix from now on."),t.TextureMatrix}}});t.DisplayObject.prototype.generateTexture=function(t,e,r){return n("generateTexture has moved to the renderer, please use renderer.generateTexture(displayObject)"),t.generateTexture(this,e,r)},t.Graphics.prototype.generateTexture=function(t,e){return n("graphics generate texture has moved to the renderer. Or to render a graphics to a texture using canvas please use generateCanvasTexture"),this.generateCanvasTexture(t,e)},t.GroupD8.isSwapWidthHeight=function(e){return n("GroupD8.isSwapWidthHeight was renamed to GroupD8.isVertical"),t.GroupD8.isVertical(e)},t.RenderTexture.prototype.render=function(t,e,r,i){this.legacyRenderer.render(t,this,r,e,!i),n("RenderTexture.render is now deprecated, please use renderer.render(displayObject, renderTexture)")},t.RenderTexture.prototype.getImage=function(t){return n("RenderTexture.getImage is now deprecated, please use renderer.extract.image(target)"),this.legacyRenderer.extract.image(t)},t.RenderTexture.prototype.getBase64=function(t){return n("RenderTexture.getBase64 is now deprecated, please use renderer.extract.base64(target)"),this.legacyRenderer.extract.base64(t)},t.RenderTexture.prototype.getCanvas=function(t){return n("RenderTexture.getCanvas is now deprecated, please use renderer.extract.canvas(target)"),this.legacyRenderer.extract.canvas(t)},t.RenderTexture.prototype.getPixels=function(t){return n("RenderTexture.getPixels is now deprecated, please use renderer.extract.pixels(target)"),this.legacyRenderer.pixels(t)},t.Sprite.prototype.setTexture=function(t){this.texture=t,n("setTexture is now deprecated, please use the texture property, e.g : sprite.texture = texture;")},i.BitmapText&&(i.BitmapText.prototype.setText=function(t){this.text=t,n("setText is now deprecated, please use the text property, e.g : myBitmapText.text = 'my text';")});t.Text.prototype.setText=function(t){this.text=t,n("setText is now deprecated, please use the text property, e.g : myText.text = 'my text';")},t.Text.calculateFontProperties=function(e){return n("Text.calculateFontProperties is now deprecated, please use the TextMetrics.measureFont"),t.TextMetrics.measureFont(e)},Object.defineProperties(t.Text,{fontPropertiesCache:{get:function(){return n("Text.fontPropertiesCache is deprecated"),t.TextMetrics._fonts}},fontPropertiesCanvas:{get:function(){return n("Text.fontPropertiesCanvas is deprecated"),t.TextMetrics._canvas}},fontPropertiesContext:{get:function(){return n("Text.fontPropertiesContext is deprecated"),t.TextMetrics._context}}}),t.Text.prototype.setStyle=function(t){this.style=t,n("setStyle is now deprecated, please use the style property, e.g : myText.style = style;")},t.Text.prototype.determineFontProperties=function(e){return n("determineFontProperties is now deprecated, please use TextMetrics.measureFont method"),t.TextMetrics.measureFont(e)},t.Text.getFontStyle=function(e){return n("getFontStyle is now deprecated, please use TextStyle.toFontString() instead"),(e=e||{})instanceof t.TextStyle||(e=new t.TextStyle(e)),e.toFontString()},Object.defineProperties(t.TextStyle.prototype,{font:{get:function(){n("text style property 'font' is now deprecated, please use the 'fontFamily', 'fontSize', 'fontStyle', 'fontVariant' and 'fontWeight' properties from now on");var t="number"==typeof this._fontSize?this._fontSize+"px":this._fontSize;return this._fontStyle+" "+this._fontVariant+" "+this._fontWeight+" "+t+" "+this._fontFamily},set:function(t){n("text style property 'font' is now deprecated, please use the 'fontFamily','fontSize',fontStyle','fontVariant' and 'fontWeight' properties from now on"),t.indexOf("italic")>1?this._fontStyle="italic":t.indexOf("oblique")>-1?this._fontStyle="oblique":this._fontStyle="normal",t.indexOf("small-caps")>-1?this._fontVariant="small-caps":this._fontVariant="normal";var e=t.split(" "),r=-1;this._fontSize=26;for(var i=0;i<e.length;++i)if(e[i].match(/(px|pt|em|%)/)){r=i,this._fontSize=e[i];break}this._fontWeight="normal";for(var o=0;o<r;++o)if(e[o].match(/(bold|bolder|lighter|100|200|300|400|500|600|700|800|900)/)){this._fontWeight=e[o];break}if(r>-1&&r<e.length-1){this._fontFamily="";for(var s=r+1;s<e.length;++s)this._fontFamily+=e[s]+" ";this._fontFamily=this._fontFamily.slice(0,-1)}else this._fontFamily="Arial";this.styleID++}}}),t.Texture.prototype.setFrame=function(t){this.frame=t,n("setFrame is now deprecated, please use the frame property, e.g: myTexture.frame = frame;")},t.Texture.addTextureToCache=function(e,r){t.Texture.addToCache(e,r),n("Texture.addTextureToCache is deprecated, please use Texture.addToCache from now on.")},t.Texture.removeTextureFromCache=function(e){return n("Texture.removeTextureFromCache is deprecated, please use Texture.removeFromCache from now on. Be aware that Texture.removeFromCache does not automatically its BaseTexture from the BaseTextureCache. For that, use BaseTexture.removeFromCache"),t.BaseTexture.removeFromCache(e),t.Texture.removeFromCache(e)},Object.defineProperties(o,{AbstractFilter:{get:function(){return n("AstractFilter has been renamed to Filter, please use PIXI.Filter"),t.AbstractFilter}},SpriteMaskFilter:{get:function(){return n("filters.SpriteMaskFilter is an undocumented alias, please use SpriteMaskFilter from now on."),t.SpriteMaskFilter}},VoidFilter:{get:function(){return n("VoidFilter has been renamed to AlphaFilter, please use PIXI.filters.AlphaFilter"),o.AlphaFilter}}}),t.utils.uuid=function(){return n("utils.uuid() is deprecated, please use utils.uid() from now on."),t.utils.uid()},t.utils.canUseNewCanvasBlendModes=function(){return n("utils.canUseNewCanvasBlendModes() is deprecated, please use CanvasTinter.canUseMultiply from now on"),t.CanvasTinter.canUseMultiply};var d=!0;Object.defineProperty(t.utils,"_saidHello",{set:function(t){t&&(n("PIXI.utils._saidHello is deprecated, please use PIXI.utils.skipHello()"),this.skipHello()),d=t},get:function(){return d}}),s.BasePrepare&&(s.BasePrepare.prototype.register=function(t,e){return n("renderer.plugins.prepare.register is now deprecated, please use renderer.plugins.prepare.registerFindHook & renderer.plugins.prepare.registerUploadHook"),t&&this.registerFindHook(t),e&&this.registerUploadHook(e),this});s.canvas&&Object.defineProperty(s.canvas,"UPLOADS_PER_FRAME",{set:function(){n("PIXI.CanvasPrepare.UPLOADS_PER_FRAME has been removed. Please set renderer.plugins.prepare.limiter.maxItemsPerFrame on your renderer")},get:function(){return n("PIXI.CanvasPrepare.UPLOADS_PER_FRAME has been removed. Please use renderer.plugins.prepare.limiter"),NaN}});s.webgl&&Object.defineProperty(s.webgl,"UPLOADS_PER_FRAME",{set:function(){n("PIXI.WebGLPrepare.UPLOADS_PER_FRAME has been removed. Please set renderer.plugins.prepare.limiter.maxItemsPerFrame on your renderer")},get:function(){return n("PIXI.WebGLPrepare.UPLOADS_PER_FRAME has been removed. Please use renderer.plugins.prepare.limiter"),NaN}});if(a.Loader){var f=a.Resource,p=a.Loader;Object.defineProperties(f.prototype,{isJson:{get:function(){return n("The isJson property is deprecated, please use `resource.type === Resource.TYPE.JSON`."),this.type===f.TYPE.JSON}},isXml:{get:function(){return n("The isXml property is deprecated, please use `resource.type === Resource.TYPE.XML`."),this.type===f.TYPE.XML}},isImage:{get:function(){return n("The isImage property is deprecated, please use `resource.type === Resource.TYPE.IMAGE`."),this.type===f.TYPE.IMAGE}},isAudio:{get:function(){return n("The isAudio property is deprecated, please use `resource.type === Resource.TYPE.AUDIO`."),this.type===f.TYPE.AUDIO}},isVideo:{get:function(){return n("The isVideo property is deprecated, please use `resource.type === Resource.TYPE.VIDEO`."),this.type===f.TYPE.VIDEO}}}),Object.defineProperties(p.prototype,{before:{get:function(){return n("The before() method is deprecated, please use pre()."),this.pre}},after:{get:function(){return n("The after() method is deprecated, please use use()."),this.use}}})}u.interactiveTarget&&Object.defineProperty(u.interactiveTarget,"defaultCursor",{set:function(t){n("Property defaultCursor has been replaced with 'cursor'. "),this.cursor=t},get:function(){return n("Property defaultCursor has been replaced with 'cursor'. "),this.cursor}});u.InteractionManager&&(Object.defineProperty(u.InteractionManager,"defaultCursorStyle",{set:function(t){n("Property defaultCursorStyle has been replaced with 'cursorStyles.default'. "),this.cursorStyles.default=t},get:function(){return n("Property defaultCursorStyle has been replaced with 'cursorStyles.default'. "),this.cursorStyles.default}}),Object.defineProperty(u.InteractionManager,"currentCursorStyle",{set:function(t){n("Property currentCursorStyle has been removed.See the currentCursorMode property, which works differently."),this.currentCursorMode=t},get:function(){return n("Property currentCursorStyle has been removed.See the currentCursorMode property, which works differently."),this.currentCursorMode}}))};function n(t){var e=(new Error).stack;void 0===e?console.warn("Deprecation Warning: ",t):(e=e.split("\n").splice(3).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cDeprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",t),console.warn(e),console.groupEnd()):(console.warn("Deprecation Warning: ",t),console.warn(e)))}},{}],132:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../../core"));var i=new n.Rectangle,o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e,e.extract=this}return t.prototype.image=function(t){var e=new Image;return e.src=this.base64(t),e},t.prototype.base64=function(t){return this.canvas(t).toDataURL()},t.prototype.canvas=function(t){var e=this.renderer,r=void 0,o=void 0,s=void 0,a=void 0;t&&(a=t instanceof n.RenderTexture?t:e.generateTexture(t)),a?(r=a.baseTexture._canvasRenderTarget.context,o=a.baseTexture._canvasRenderTarget.resolution,s=a.frame):(r=e.rootContext,(s=i).width=this.renderer.width,s.height=this.renderer.height);var u=s.width*o,h=s.height*o,l=new n.CanvasRenderTarget(u,h),c=r.getImageData(s.x*o,s.y*o,u,h);return l.context.putImageData(c,0,0),l.canvas},t.prototype.pixels=function(t){var e=this.renderer,r=void 0,o=void 0,s=void 0,a=void 0;return t&&(a=t instanceof n.RenderTexture?t:e.generateTexture(t)),a?(r=a.baseTexture._canvasRenderTarget.context,o=a.baseTexture._canvasRenderTarget.resolution,s=a.frame):(r=e.rootContext,(s=i).width=e.width,s.height=e.height),r.getImageData(0,0,s.width*o,s.height*o).data},t.prototype.destroy=function(){this.renderer.extract=null,this.renderer=null},t}();r.default=o,n.CanvasRenderer.registerPlugin("extract",o)},{"../../core":65}],133:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("./webgl/WebGLExtract");Object.defineProperty(r,"webgl",{enumerable:!0,get:function(){return o(n).default}});var i=t("./canvas/CanvasExtract");Object.defineProperty(r,"canvas",{enumerable:!0,get:function(){return o(i).default}});function o(t){return t&&t.__esModule?t:{default:t}}},{"./canvas/CanvasExtract":132,"./webgl/WebGLExtract":134}],134:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../../core"));var i=new n.Rectangle,o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e,e.extract=this}return t.prototype.image=function(t){var e=new Image;return e.src=this.base64(t),e},t.prototype.base64=function(t){return this.canvas(t).toDataURL()},t.prototype.canvas=function(t){var e=this.renderer,r=void 0,o=void 0,s=void 0,a=!1,u=void 0;t&&(u=t instanceof n.RenderTexture?t:this.renderer.generateTexture(t)),u?(o=(r=u.baseTexture._glRenderTargets[this.renderer.CONTEXT_UID]).resolution,s=u.frame,a=!1):(o=(r=this.renderer.rootRenderTarget).resolution,a=!0,(s=i).width=r.size.width,s.height=r.size.height);var h=s.width*o,l=s.height*o,c=new n.CanvasRenderTarget(h,l);if(r){e.bindRenderTarget(r);var d=new Uint8Array(4*h*l),f=e.gl;f.readPixels(s.x*o,s.y*o,h,l,f.RGBA,f.UNSIGNED_BYTE,d);var p=c.context.getImageData(0,0,h,l);p.data.set(d),c.context.putImageData(p,0,0),a&&(c.context.scale(1,-1),c.context.drawImage(c.canvas,0,-l))}return c.canvas},t.prototype.pixels=function(t){var e=this.renderer,r=void 0,o=void 0,s=void 0,a=void 0;t&&(a=t instanceof n.RenderTexture?t:this.renderer.generateTexture(t)),a?(o=(r=a.baseTexture._glRenderTargets[this.renderer.CONTEXT_UID]).resolution,s=a.frame):(o=(r=this.renderer.rootRenderTarget).resolution,(s=i).width=r.size.width,s.height=r.size.height);var u=s.width*o,h=s.height*o,l=new Uint8Array(4*u*h);if(r){e.bindRenderTarget(r);var c=e.gl;c.readPixels(s.x*o,s.y*o,u,h,c.RGBA,c.UNSIGNED_BYTE,l)}return l},t.prototype.destroy=function(){this.renderer.extract=null,this.renderer=null},t}();r.default=o,n.WebGLRenderer.registerPlugin("extract",o)},{"../../core":65}],135:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../core"));var o=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r[0]instanceof i.Texture?r[0]:r[0].texture));return o._textures=null,o._durations=null,o.textures=r,o._autoUpdate=!1!==n,o.animationSpeed=1,o.loop=!0,o.onComplete=null,o.onFrameChange=null,o.onLoop=null,o._currentTime=0,o.playing=!1,o}return e.prototype.stop=function(){this.playing&&(this.playing=!1,this._autoUpdate&&i.ticker.shared.remove(this.update,this))},e.prototype.play=function(){this.playing||(this.playing=!0,this._autoUpdate&&i.ticker.shared.add(this.update,this,i.UPDATE_PRIORITY.HIGH))},e.prototype.gotoAndStop=function(t){this.stop();var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()},e.prototype.gotoAndPlay=function(t){var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture(),this.play()},e.prototype.update=function(t){var e=this.animationSpeed*t,r=this.currentFrame;if(null!==this._durations){var n=this._currentTime%1*this._durations[this.currentFrame];for(n+=e/60*1e3;n<0;)this._currentTime--,n+=this._durations[this.currentFrame];var i=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);n>=this._durations[this.currentFrame];)n-=this._durations[this.currentFrame]*i,this._currentTime+=i;this._currentTime+=n/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):r!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFrame<r?this.onLoop():this.animationSpeed<0&&this.currentFrame>r&&this.onLoop()),this.updateTexture())},e.prototype.updateTexture=function(){this._texture=this._textures[this.currentFrame],this._textureID=-1,this.cachedTint=16777215,this.onFrameChange&&this.onFrameChange(this.currentFrame)},e.prototype.destroy=function(e){this.stop(),t.prototype.destroy.call(this,e)},e.fromFrames=function(t){for(var r=[],n=0;n<t.length;++n)r.push(i.Texture.fromFrame(t[n]));return new e(r)},e.fromImages=function(t){for(var r=[],n=0;n<t.length;++n)r.push(i.Texture.fromImage(t[n]));return new e(r)},n(e,[{key:"totalFrames",get:function(){return this._textures.length}},{key:"textures",get:function(){return this._textures},set:function(t){if(t[0]instanceof i.Texture)this._textures=t,this._durations=null;else{this._textures=[],this._durations=[];for(var e=0;e<t.length;e++)this._textures.push(t[e].texture),this._durations.push(t[e].time)}this.gotoAndStop(0),this.updateTexture()}},{key:"currentFrame",get:function(){var t=Math.floor(this._currentTime)%this._textures.length;return t<0&&(t+=this._textures.length),t}}]),e}(i.Sprite);r.default=o},{"../core":65}],136:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../core")),o=u(t("../core/math/ObservablePoint")),s=t("../core/utils"),a=u(t("../core/settings"));function u(t){return t&&t.__esModule?t:{default:t}}var h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return i._textWidth=0,i._textHeight=0,i._glyphs=[],i._font={tint:void 0!==n.tint?n.tint:16777215,align:n.align||"left",name:null,size:0},i.font=n.font,i._text=r,i._maxWidth=0,i._maxLineHeight=0,i._anchor=new o.default(function(){i.dirty=!0},i,0,0),i.dirty=!1,i.updateText(),i}return e.prototype.updateText=function(){for(var t=e.fonts[this._font.name],r=this._font.size/t.size,n=new i.Point,o=[],s=[],a=null,u=0,h=0,l=0,c=-1,d=0,f=0,p=0,v=0;v<this.text.length;v++){var g=this.text.charCodeAt(v);if(/(\s)/.test(this.text.charAt(v))&&(c=v,d=u),/(?:\r\n|\r|\n)/.test(this.text.charAt(v)))s.push(u),h=Math.max(h,u),l++,n.x=0,n.y+=t.lineHeight,a=null;else if(-1!==c&&this._maxWidth>0&&n.x*r>this._maxWidth)i.utils.removeItems(o,c-f,v-c),v=c,c=-1,++f,s.push(d),h=Math.max(h,d),l++,n.x=0,n.y+=t.lineHeight,a=null;else{var y=t.chars[g];y&&(a&&y.kerning[a]&&(n.x+=y.kerning[a]),o.push({texture:y.texture,line:l,charCode:g,position:new i.Point(n.x+y.xOffset,n.y+y.yOffset)}),u=n.x+(y.texture.width+y.xOffset),n.x+=y.xAdvance,p=Math.max(p,y.yOffset+y.texture.height),a=g)}}s.push(u),h=Math.max(h,u);for(var m=[],_=0;_<=l;_++){var b=0;"right"===this._font.align?b=h-s[_]:"center"===this._font.align&&(b=(h-s[_])/2),m.push(b)}for(var x=o.length,T=this.tint,w=0;w<x;w++){var E=this._glyphs[w];E?E.texture=o[w].texture:(E=new i.Sprite(o[w].texture),this._glyphs.push(E)),E.position.x=(o[w].position.x+m[o[w].line])*r,E.position.y=o[w].position.y*r,E.scale.x=E.scale.y=r,E.tint=T,E.parent||this.addChild(E)}for(var S=x;S<this._glyphs.length;++S)this.removeChild(this._glyphs[S]);if(this._textWidth=h*r,this._textHeight=(n.y+t.lineHeight)*r,0!==this.anchor.x||0!==this.anchor.y)for(var O=0;O<x;O++)this._glyphs[O].x-=this._textWidth*this.anchor.x,this._glyphs[O].y-=this._textHeight*this.anchor.y;this._maxLineHeight=p*r},e.prototype.updateTransform=function(){this.validate(),this.containerUpdateTransform()},e.prototype.getLocalBounds=function(){return this.validate(),t.prototype.getLocalBounds.call(this)},e.prototype.validate=function(){this.dirty&&(this.updateText(),this.dirty=!1)},e.registerFont=function(t,r){var n={},o=t.getElementsByTagName("info")[0],u=t.getElementsByTagName("common")[0],h=t.getElementsByTagName("page")[0].getAttribute("file"),l=(0,s.getResolutionOfUrl)(h,a.default.RESOLUTION);n.font=o.getAttribute("face"),n.size=parseInt(o.getAttribute("size"),10),n.lineHeight=parseInt(u.getAttribute("lineHeight"),10)/l,n.chars={};for(var c=t.getElementsByTagName("char"),d=0;d<c.length;d++){var f=c[d],p=parseInt(f.getAttribute("id"),10),v=new i.Rectangle(parseInt(f.getAttribute("x"),10)/l+r.frame.x/l,parseInt(f.getAttribute("y"),10)/l+r.frame.y/l,parseInt(f.getAttribute("width"),10)/l,parseInt(f.getAttribute("height"),10)/l);n.chars[p]={xOffset:parseInt(f.getAttribute("xoffset"),10)/l,yOffset:parseInt(f.getAttribute("yoffset"),10)/l,xAdvance:parseInt(f.getAttribute("xadvance"),10)/l,kerning:{},texture:new i.Texture(r.baseTexture,v)}}for(var g=t.getElementsByTagName("kerning"),y=0;y<g.length;y++){var m=g[y],_=parseInt(m.getAttribute("first"),10)/l,b=parseInt(m.getAttribute("second"),10)/l,x=parseInt(m.getAttribute("amount"),10)/l;n.chars[b]&&(n.chars[b].kerning[_]=x)}return e.fonts[n.font]=n,n},n(e,[{key:"tint",get:function(){return this._font.tint},set:function(t){this._font.tint="number"==typeof t&&t>=0?t:16777215,this.dirty=!0}},{key:"align",get:function(){return this._font.align},set:function(t){this._font.align=t||"left",this.dirty=!0}},{key:"anchor",get:function(){return this._anchor},set:function(t){"number"==typeof t?this._anchor.set(t):this._anchor.copy(t)}},{key:"font",get:function(){return this._font},set:function(t){t&&("string"==typeof t?(t=t.split(" "),this._font.name=1===t.length?t[0]:t.slice(1).join(" "),this._font.size=t.length>=2?parseInt(t[0],10):e.fonts[this._font.name].size):(this._font.name=t.name,this._font.size="number"==typeof t.size?t.size:parseInt(t.size,10)),this.dirty=!0)}},{key:"text",get:function(){return this._text},set:function(t){t=t.toString()||" ",this._text!==t&&(this._text=t,this.dirty=!0)}},{key:"maxWidth",get:function(){return this._maxWidth},set:function(t){this._maxWidth!==t&&(this._maxWidth=t,this.dirty=!0)}},{key:"maxLineHeight",get:function(){return this.validate(),this._maxLineHeight}},{key:"textWidth",get:function(){return this.validate(),this._textWidth}},{key:"textHeight",get:function(){return this.validate(),this._textHeight}}]),e}(i.Container);r.default=h,h.fonts={}},{"../core":65,"../core/math/ObservablePoint":68,"../core/settings":101,"../core/utils":125}],137:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../core")),s=t("../core/sprites/canvas/CanvasTinter"),a=(n=s,n&&n.__esModule?n:{default:n});var u=new o.Point,h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var s=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return s.tileTransform=new o.TransformStatic,s._width=n,s._height=i,s._canvasPattern=null,s.uvTransform=r.transform||new o.TextureMatrix(r),s.pluginName="tilingSprite",s.uvRespectAnchor=!1,s}return e.prototype._onTextureUpdate=function(){this.uvTransform&&(this.uvTransform.texture=this._texture),this.cachedTint=16777215},e.prototype._renderWebGL=function(t){var e=this._texture;e&&e.valid&&(this.tileTransform.updateLocalTransform(),this.uvTransform.update(),t.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this))},e.prototype._renderCanvas=function(t){var e=this._texture;if(e.baseTexture.hasLoaded){var r=t.context,n=this.worldTransform,i=t.resolution,s=e.baseTexture,u=s.resolution,h=this.tilePosition.x/this.tileScale.x%e._frame.width*u,l=this.tilePosition.y/this.tileScale.y%e._frame.height*u;if(this._textureID!==this._texture._updateID||this.cachedTint!==this.tint){this._textureID=this._texture._updateID;var c=new o.CanvasRenderTarget(e._frame.width,e._frame.height,u);16777215!==this.tint?(this.tintedTexture=a.default.getTintedTexture(this,this.tint),c.context.drawImage(this.tintedTexture,0,0)):c.context.drawImage(s.source,-e._frame.x*u,-e._frame.y*u),this.cachedTint=this.tint,this._canvasPattern=c.context.createPattern(c.canvas,"repeat")}r.globalAlpha=this.worldAlpha,r.setTransform(n.a*i,n.b*i,n.c*i,n.d*i,n.tx*i,n.ty*i),t.setBlendMode(this.blendMode),r.fillStyle=this._canvasPattern,r.scale(this.tileScale.x/u,this.tileScale.y/u);var d=this.anchor.x*-this._width,f=this.anchor.y*-this._height;this.uvRespectAnchor?(r.translate(h,l),r.fillRect(-h+d,-l+f,this._width/this.tileScale.x*u,this._height/this.tileScale.y*u)):(r.translate(h+d,l+f),r.fillRect(-h,-l,this._width/this.tileScale.x*u,this._height/this.tileScale.y*u))}},e.prototype._calculateBounds=function(){var t=this._width*-this._anchor._x,e=this._height*-this._anchor._y,r=this._width*(1-this._anchor._x),n=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,t,e,r,n)},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._x),e||(this._localBoundsRect||(this._localBoundsRect=new o.Rectangle),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,u);var e=this._width,r=this._height,n=-e*this.anchor._x;if(u.x>=n&&u.x<n+e){var i=-r*this.anchor._y;if(u.y>=i&&u.y<i+r)return!0}return!1},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this.tileTransform=null,this.uvTransform=null},e.from=function(t,r,n){return new e(o.Texture.from(t),r,n)},e.fromFrame=function(t,r,n){var i=o.utils.TextureCache[t];if(!i)throw new Error('The frameId "'+t+'" does not exist in the texture cache '+this);return new e(i,r,n)},e.fromImage=function(t,r,n,i,s){return new e(o.Texture.fromImage(t,i,s),r,n)},i(e,[{key:"clampMargin",get:function(){return this.uvTransform.clampMargin},set:function(t){this.uvTransform.clampMargin=t,this.uvTransform.update(!0)}},{key:"tileScale",get:function(){return this.tileTransform.scale},set:function(t){this.tileTransform.scale.copy(t)}},{key:"tilePosition",get:function(){return this.tileTransform.position},set:function(t){this.tileTransform.position.copy(t)}},{key:"width",get:function(){return this._width},set:function(t){this._width=t}},{key:"height",get:function(){return this._height},set:function(t){this._height=t}}]),e}(o.Sprite);r.default=h},{"../core":65,"../core/sprites/canvas/CanvasTinter":104}],138:[function(t,e,r){"use strict";var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../core")),i=a(t("../core/textures/Texture")),o=a(t("../core/textures/BaseTexture")),s=t("../core/utils");function a(t){return t&&t.__esModule?t:{default:t}}var u=n.DisplayObject,h=new n.Matrix;u.prototype._cacheAsBitmap=!1,u.prototype._cacheData=!1;var l=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.textureCacheId=null,this.originalRenderWebGL=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalHitTest=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.sprite=null};Object.defineProperties(u.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){if(this._cacheAsBitmap!==t){this._cacheAsBitmap=t;var e=void 0;t?(this._cacheData||(this._cacheData=new l),(e=this._cacheData).originalRenderWebGL=this.renderWebGL,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this._calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.renderWebGL=this._renderCachedWebGL,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):((e=this._cacheData).sprite&&this._destroyCachedDisplayObject(),this.renderWebGL=e.originalRenderWebGL,this.renderCanvas=e.originalRenderCanvas,this._calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea)}}}}),u.prototype._renderCachedWebGL=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite._transformID=-1,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderWebGL(t))},u.prototype._initCachedDisplayObject=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.alpha;this.alpha=1,t.currentRenderer.flush();var r=this.getLocalBounds().clone();if(this._filters){var a=this._filters[0].padding;r.pad(a)}var u=t._activeRenderTarget,l=t.filterManager.filterStack,c=n.RenderTexture.create(0|r.width,0|r.height),d="cacheAsBitmap_"+(0,s.uid)();this._cacheData.textureCacheId=d,o.default.addToCache(c.baseTexture,d),i.default.addToCache(c,d);var f=h;f.tx=-r.x,f.ty=-r.y,this.transform.worldTransform.identity(),this.renderWebGL=this._cacheData.originalRenderWebGL,t.render(this,c,!0,f,!0),t.bindRenderTarget(u),t.filterManager.filterStack=l,this.renderWebGL=this._renderCachedWebGL,this.updateTransform=this.displayObjectUpdateTransform,this._mask=null,this.filterArea=null;var p=new n.Sprite(c);p.transform.worldTransform=this.transform.worldTransform,p.anchor.x=-r.x/r.width,p.anchor.y=-r.y/r.height,p.alpha=e,p._bounds=this._bounds,this._calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._cacheData.sprite=p,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=p.containsPoint.bind(p)}},u.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite.renderCanvas(t))},u.prototype._initCachedDisplayObjectCanvas=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.getLocalBounds(),r=this.alpha;this.alpha=1;var a=t.context,u=n.RenderTexture.create(0|e.width,0|e.height),l="cacheAsBitmap_"+(0,s.uid)();this._cacheData.textureCacheId=l,o.default.addToCache(u.baseTexture,l),i.default.addToCache(u,l);var c=h;this.transform.localTransform.copy(c),c.invert(),c.tx-=e.x,c.ty-=e.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,u,!0,c,!1),t.context=a,this.renderCanvas=this._renderCachedCanvas,this._calculateBounds=this._calculateCachedBounds,this._mask=null,this.filterArea=null;var d=new n.Sprite(u);d.transform.worldTransform=this.transform.worldTransform,d.anchor.x=-e.x/e.width,d.anchor.y=-e.y/e.height,d._bounds=this._bounds,d.alpha=r,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.updateTransform=this.displayObjectUpdateTransform,this._cacheData.sprite=d,this.containsPoint=d.containsPoint.bind(d)}},u.prototype._calculateCachedBounds=function(){this._cacheData.sprite._calculateBounds()},u.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds()},u.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,o.default.removeFromCache(this._cacheData.textureCacheId),i.default.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},u.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)}},{"../core":65,"../core/textures/BaseTexture":112,"../core/textures/Texture":115,"../core/utils":125}],139:[function(t,e,r){"use strict";var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../core"));n.DisplayObject.prototype.name=null,n.Container.prototype.getChildByName=function(t){for(var e=0;e<this.children.length;e++)if(this.children[e].name===t)return this.children[e];return null}},{"../core":65}],140:[function(t,e,r){"use strict";var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../core"));n.DisplayObject.prototype.getGlobalPosition=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new n.Point,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.parent?this.parent.toGlobal(this.position,t,e):(t.x=this.position.x,t.y=this.position.y),t}},{"../core":65}],141:[function(t,e,r){"use strict";r.__esModule=!0,r.BitmapText=r.TilingSpriteRenderer=r.TilingSprite=r.AnimatedSprite=void 0;var n=t("./AnimatedSprite");Object.defineProperty(r,"AnimatedSprite",{enumerable:!0,get:function(){return a(n).default}});var i=t("./TilingSprite");Object.defineProperty(r,"TilingSprite",{enumerable:!0,get:function(){return a(i).default}});var o=t("./webgl/TilingSpriteRenderer");Object.defineProperty(r,"TilingSpriteRenderer",{enumerable:!0,get:function(){return a(o).default}});var s=t("./BitmapText");Object.defineProperty(r,"BitmapText",{enumerable:!0,get:function(){return a(s).default}}),t("./cacheAsBitmap"),t("./getChildByName"),t("./getGlobalPosition");function a(t){return t&&t.__esModule?t:{default:t}}},{"./AnimatedSprite":135,"./BitmapText":136,"./TilingSprite":137,"./cacheAsBitmap":138,"./getChildByName":139,"./getGlobalPosition":140,"./webgl/TilingSpriteRenderer":142}],142:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../../core")),i=t("../../core/const");t("path");var o=new n.Matrix,s=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.shader=null,n.simpleShader=null,n.quad=null,n}return e.prototype.onContextChange=function(){var t=this.renderer.gl;this.shader=new n.Shader(t,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n    vec2 coord = mod(vTextureCoord - uClampOffset, vec2(1.0, 1.0)) + uClampOffset;\n    coord = (uMapCoord * vec3(coord, 1.0)).xy;\n    coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n    vec4 sample = texture2D(uSampler, coord);\n    gl_FragColor = sample * uColor;\n}\n"),this.simpleShader=new n.Shader(t,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\n\nvoid main(void)\n{\n    vec4 sample = texture2D(uSampler, vTextureCoord);\n    gl_FragColor = sample * uColor;\n}\n"),this.renderer.bindVao(null),this.quad=new n.Quad(t,this.renderer.state.attribState),this.quad.initVao(this.shader)},e.prototype.render=function(t){var e=this.renderer,r=this.quad;e.bindVao(r.vao);var s=r.vertices;s[0]=s[6]=t._width*-t.anchor.x,s[1]=s[3]=t._height*-t.anchor.y,s[2]=s[4]=t._width*(1-t.anchor.x),s[5]=s[7]=t._height*(1-t.anchor.y),t.uvRespectAnchor&&((s=r.uvs)[0]=s[6]=-t.anchor.x,s[1]=s[3]=-t.anchor.y,s[2]=s[4]=1-t.anchor.x,s[5]=s[7]=1-t.anchor.y),r.upload();var a=t._texture,u=a.baseTexture,h=t.tileTransform.localTransform,l=t.uvTransform,c=u.isPowerOfTwo&&a.frame.width===u.width&&a.frame.height===u.height;c&&(u._glTextures[e.CONTEXT_UID]?c=u.wrapMode!==i.WRAP_MODES.CLAMP:u.wrapMode===i.WRAP_MODES.CLAMP&&(u.wrapMode=i.WRAP_MODES.REPEAT));var d=c?this.simpleShader:this.shader;e.bindShader(d);var f=a.width,p=a.height,v=t._width,g=t._height;o.set(h.a*f/v,h.b*f/g,h.c*p/v,h.d*p/g,h.tx/v,h.ty/g),o.invert(),c?o.prepend(l.mapCoord):(d.uniforms.uMapCoord=l.mapCoord.toArray(!0),d.uniforms.uClampFrame=l.uClampFrame,d.uniforms.uClampOffset=l.uClampOffset),d.uniforms.uTransform=o.toArray(!0),d.uniforms.uColor=n.utils.premultiplyTintToRgba(t.tint,t.worldAlpha,d.uniforms.uColor,u.premultipliedAlpha),d.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),d.uniforms.uSampler=e.bindTexture(a),e.setBlendMode(n.utils.correctBlendMode(t.blendMode,u.premultipliedAlpha)),r.vao.draw(this.renderer.gl.TRIANGLES,6,0)},e}(n.ObjectRenderer);r.default=s,n.WebGLRenderer.registerPlugin("tilingSprite",s)},{"../../core":65,"../../core/const":46,path:8}],143:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../../core"));t("path");var o=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n    vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float uAlpha;\n\nvoid main(void)\n{\n   gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;\n}\n"));return n.alpha=r,n.glShaderKey="alpha",n}return n(e,[{key:"alpha",get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t}}]),e}(i.Filter);r.default=o},{"../../core":65,path:8}],144:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../../core")),o=a(t("./BlurXFilter")),s=a(t("./BlurYFilter"));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r,n,a,u){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var h=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return h.blurXFilter=new o.default(r,n,a,u),h.blurYFilter=new s.default(r,n,a,u),h.padding=0,h.resolution=a||i.settings.RESOLUTION,h.quality=n||4,h.blur=r||8,h}return e.prototype.apply=function(t,e,r){var n=t.getRenderTarget(!0);this.blurXFilter.apply(t,e,n,!0),this.blurYFilter.apply(t,n,r,!1),t.returnRenderTarget(n)},n(e,[{key:"blur",get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=this.blurYFilter.blur=t,this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))}},{key:"quality",get:function(){return this.blurXFilter.quality},set:function(t){this.blurXFilter.quality=this.blurYFilter.quality=t}},{key:"blurX",get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=t,this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))}},{key:"blurY",get:function(){return this.blurYFilter.blur},set:function(t){this.blurYFilter.blur=t,this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))}},{key:"blendMode",get:function(){return this.blurYFilter._blendMode},set:function(t){this.blurYFilter._blendMode=t}}]),e}(i.Filter);r.default=u},{"../../core":65,"./BlurXFilter":145,"./BlurYFilter":146}],145:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../../core")),o=u(t("./generateBlurVertSource")),s=u(t("./generateBlurFragSource")),a=u(t("./getMaxBlurKernelSize"));function u(t){return t&&t.__esModule?t:{default:t}}var h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r,n,a,u){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),u=u||5;var h=(0,o.default)(u,!0),l=(0,s.default)(u),c=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,h,l));return c.resolution=a||i.settings.RESOLUTION,c._quality=0,c.quality=n||4,c.strength=r||8,c.firstRun=!0,c}return e.prototype.apply=function(t,e,r,n){if(this.firstRun){var i=t.renderer.gl,u=(0,a.default)(i);this.vertexSrc=(0,o.default)(u,!0),this.fragmentSrc=(0,s.default)(u),this.firstRun=!1}if(this.uniforms.strength=1/r.size.width*(r.size.width/e.size.width),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,r,n);else{for(var h=t.getRenderTarget(!0),l=e,c=h,d=0;d<this.passes-1;d++){t.applyFilter(this,l,c,!0);var f=c;c=l,l=f}t.applyFilter(this,l,r,n),t.returnRenderTarget(h)}},n(e,[{key:"blur",get:function(){return this.strength},set:function(t){this.padding=2*Math.abs(t),this.strength=t}},{key:"quality",get:function(){return this._quality},set:function(t){this._quality=t,this.passes=t}}]),e}(i.Filter);r.default=h},{"../../core":65,"./generateBlurFragSource":147,"./generateBlurVertSource":148,"./getMaxBlurKernelSize":149}],146:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../../core")),o=u(t("./generateBlurVertSource")),s=u(t("./generateBlurFragSource")),a=u(t("./getMaxBlurKernelSize"));function u(t){return t&&t.__esModule?t:{default:t}}var h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r,n,a,u){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),u=u||5;var h=(0,o.default)(u,!1),l=(0,s.default)(u),c=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,h,l));return c.resolution=a||i.settings.RESOLUTION,c._quality=0,c.quality=n||4,c.strength=r||8,c.firstRun=!0,c}return e.prototype.apply=function(t,e,r,n){if(this.firstRun){var i=t.renderer.gl,u=(0,a.default)(i);this.vertexSrc=(0,o.default)(u,!1),this.fragmentSrc=(0,s.default)(u),this.firstRun=!1}if(this.uniforms.strength=1/r.size.height*(r.size.height/e.size.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,r,n);else{for(var h=t.getRenderTarget(!0),l=e,c=h,d=0;d<this.passes-1;d++){t.applyFilter(this,l,c,!0);var f=c;c=l,l=f}t.applyFilter(this,l,r,n),t.returnRenderTarget(h)}},n(e,[{key:"blur",get:function(){return this.strength},set:function(t){this.padding=2*Math.abs(t),this.strength=t}},{key:"quality",get:function(){return this._quality},set:function(t){this._quality=t,this.passes=t}}]),e}(i.Filter);r.default=h},{"../../core":65,"./generateBlurFragSource":147,"./generateBlurVertSource":148,"./getMaxBlurKernelSize":149}],147:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t){for(var e=n[t],r=e.length,o=i,s="",a=void 0,u=0;u<t;u++){var h="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;".replace("%index%",u);a=u,u>=r&&(a=t-u-1),h=h.replace("%value%",e[a]),s+=h,s+="\n"}return o=(o=o.replace("%blur%",s)).replace("%size%",t)};var n={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},i=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{","    gl_FragColor = vec4(0.0);","    %blur%","}"].join("\n")},{}],148:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t,e){var r=Math.ceil(t/2),i=n,o="",s=void 0;s=e?"vBlurTexCoords[%index%] = aTextureCoord + vec2(%sampleIndex% * strength, 0.0);":"vBlurTexCoords[%index%] = aTextureCoord + vec2(0.0, %sampleIndex% * strength);";for(var a=0;a<t;a++){var u=s.replace("%index%",a);u=u.replace("%sampleIndex%",a-(r-1)+".0"),o+=u,o+="\n"}return i=(i=i.replace("%blur%",o)).replace("%size%",t)};var n=["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform float strength;","uniform mat3 projectionMatrix;","varying vec2 vBlurTexCoords[%size%];","void main(void)","{","gl_Position = vec4((projectionMatrix * vec3((aVertexPosition), 1.0)).xy, 0.0, 1.0);","%blur%","}"].join("\n")},{}],149:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t){var e=t.getParameter(t.MAX_VARYING_VECTORS),r=15;for(;r>e;)r-=2;return r}},{}],150:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../../core"));t("path");var o=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n    vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\nuniform float uAlpha;\n\nvoid main(void)\n{\n    vec4 c = texture2D(uSampler, vTextureCoord);\n\n    if (uAlpha == 0.0) {\n        gl_FragColor = c;\n        return;\n    }\n\n    // Un-premultiply alpha before applying the color matrix. See issue #3539.\n    if (c.a > 0.0) {\n      c.rgb /= c.a;\n    }\n\n    vec4 result;\n\n    result.r = (m[0] * c.r);\n        result.r += (m[1] * c.g);\n        result.r += (m[2] * c.b);\n        result.r += (m[3] * c.a);\n        result.r += m[4];\n\n    result.g = (m[5] * c.r);\n        result.g += (m[6] * c.g);\n        result.g += (m[7] * c.b);\n        result.g += (m[8] * c.a);\n        result.g += m[9];\n\n    result.b = (m[10] * c.r);\n       result.b += (m[11] * c.g);\n       result.b += (m[12] * c.b);\n       result.b += (m[13] * c.a);\n       result.b += m[14];\n\n    result.a = (m[15] * c.r);\n       result.a += (m[16] * c.g);\n       result.a += (m[17] * c.b);\n       result.a += (m[18] * c.a);\n       result.a += m[19];\n\n    vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n    // Premultiply alpha again.\n    rgb *= result.a;\n\n    gl_FragColor = vec4(rgb, result.a);\n}\n"));return r.uniforms.m=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],r.alpha=1,r}return e.prototype._loadMatrix=function(t){var e=t;arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(this._multiply(e,this.uniforms.m,t),e=this._colorMatrix(e)),this.uniforms.m=e},e.prototype._multiply=function(t,e,r){return t[0]=e[0]*r[0]+e[1]*r[5]+e[2]*r[10]+e[3]*r[15],t[1]=e[0]*r[1]+e[1]*r[6]+e[2]*r[11]+e[3]*r[16],t[2]=e[0]*r[2]+e[1]*r[7]+e[2]*r[12]+e[3]*r[17],t[3]=e[0]*r[3]+e[1]*r[8]+e[2]*r[13]+e[3]*r[18],t[4]=e[0]*r[4]+e[1]*r[9]+e[2]*r[14]+e[3]*r[19]+e[4],t[5]=e[5]*r[0]+e[6]*r[5]+e[7]*r[10]+e[8]*r[15],t[6]=e[5]*r[1]+e[6]*r[6]+e[7]*r[11]+e[8]*r[16],t[7]=e[5]*r[2]+e[6]*r[7]+e[7]*r[12]+e[8]*r[17],t[8]=e[5]*r[3]+e[6]*r[8]+e[7]*r[13]+e[8]*r[18],t[9]=e[5]*r[4]+e[6]*r[9]+e[7]*r[14]+e[8]*r[19]+e[9],t[10]=e[10]*r[0]+e[11]*r[5]+e[12]*r[10]+e[13]*r[15],t[11]=e[10]*r[1]+e[11]*r[6]+e[12]*r[11]+e[13]*r[16],t[12]=e[10]*r[2]+e[11]*r[7]+e[12]*r[12]+e[13]*r[17],t[13]=e[10]*r[3]+e[11]*r[8]+e[12]*r[13]+e[13]*r[18],t[14]=e[10]*r[4]+e[11]*r[9]+e[12]*r[14]+e[13]*r[19]+e[14],t[15]=e[15]*r[0]+e[16]*r[5]+e[17]*r[10]+e[18]*r[15],t[16]=e[15]*r[1]+e[16]*r[6]+e[17]*r[11]+e[18]*r[16],t[17]=e[15]*r[2]+e[16]*r[7]+e[17]*r[12]+e[18]*r[17],t[18]=e[15]*r[3]+e[16]*r[8]+e[17]*r[13]+e[18]*r[18],t[19]=e[15]*r[4]+e[16]*r[9]+e[17]*r[14]+e[18]*r[19]+e[19],t},e.prototype._colorMatrix=function(t){var e=new Float32Array(t);return e[4]/=255,e[9]/=255,e[14]/=255,e[19]/=255,e},e.prototype.brightness=function(t,e){var r=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.greyscale=function(t,e){var r=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.blackAndWhite=function(t){this._loadMatrix([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],t)},e.prototype.hue=function(t,e){t=(t||0)/180*Math.PI;var r=Math.cos(t),n=Math.sin(t),i=(0,Math.sqrt)(1/3),o=[r+1/3*(1-r),1/3*(1-r)-i*n,1/3*(1-r)+i*n,0,0,1/3*(1-r)+i*n,r+1/3*(1-r),1/3*(1-r)-i*n,0,0,1/3*(1-r)-i*n,1/3*(1-r)+i*n,r+1/3*(1-r),0,0,0,0,0,1,0];this._loadMatrix(o,e)},e.prototype.contrast=function(t,e){var r=(t||0)+1,n=-.5*(r-1),i=[r,0,0,0,n,0,r,0,0,n,0,0,r,0,n,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.saturate=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments[1],r=2*t/3+1,n=-.5*(r-1),i=[r,n,n,0,0,n,r,n,0,0,n,n,r,0,0,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.desaturate=function(){this.saturate(-1)},e.prototype.negative=function(t){this._loadMatrix([0,1,1,0,0,1,0,1,0,0,1,1,0,0,0,0,0,0,1,0],t)},e.prototype.sepia=function(t){this._loadMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],t)},e.prototype.technicolor=function(t){this._loadMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],t)},e.prototype.polaroid=function(t){this._loadMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],t)},e.prototype.toBGR=function(t){this._loadMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t)},e.prototype.kodachrome=function(t){this._loadMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],t)},e.prototype.browni=function(t){this._loadMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],t)},e.prototype.vintage=function(t){this._loadMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],t)},e.prototype.colorTone=function(t,e,r,n,i){t=t||.2,e=e||.15;var o=((r=r||16770432)>>16&255)/255,s=(r>>8&255)/255,a=(255&r)/255,u=((n=n||3375104)>>16&255)/255,h=(n>>8&255)/255,l=(255&n)/255,c=[.3,.59,.11,0,0,o,s,a,t,0,u,h,l,e,0,o-u,s-h,a-l,0,0];this._loadMatrix(c,i)},e.prototype.night=function(t,e){var r=[-2*(t=t||.1),-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.predator=function(t,e){var r=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(r,e)},e.prototype.lsd=function(t){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},e.prototype.reset=function(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)},n(e,[{key:"matrix",get:function(){return this.uniforms.m},set:function(t){this.uniforms.m=t}},{key:"alpha",get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t}}]),e}(i.Filter);r.default=o,o.prototype.grayscale=o.prototype.greyscale},{"../../core":65,path:8}],151:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../../core"));t("path");var o=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=new i.Matrix;r.renderable=!1;var s=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nvoid main(void)\n{\n   gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n   vFilterCoord = ( filterMatrix * vec3( aTextureCoord, 1.0)  ).xy;\n   vTextureCoord = aTextureCoord;\n}","varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\n\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform vec4 filterClamp;\n\nvoid main(void)\n{\n   vec4 map =  texture2D(mapSampler, vFilterCoord);\n\n   map -= 0.5;\n   map.xy *= scale;\n\n   gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), filterClamp.xy, filterClamp.zw));\n}\n"));return s.maskSprite=r,s.maskMatrix=o,s.uniforms.mapSampler=r._texture,s.uniforms.filterMatrix=o,s.uniforms.scale={x:1,y:1},null!==n&&void 0!==n||(n=20),s.scale=new i.Point(n,n),s}return e.prototype.apply=function(t,e,r){var n=1/r.destinationFrame.width*(r.size.width/e.size.width);this.uniforms.filterMatrix=t.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x*n,this.uniforms.scale.y=this.scale.y*n,t.applyFilter(this,e,r)},n(e,[{key:"map",get:function(){return this.uniforms.mapSampler},set:function(t){this.uniforms.mapSampler=t}}]),e}(i.Filter);r.default=o},{"../../core":65,path:8}],152:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../../core"));t("path");var i=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,"\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nuniform vec4 filterArea;\n\nvarying vec2 vTextureCoord;\n\nvec2 mapCoord( vec2 coord )\n{\n    coord *= filterArea.xy;\n    coord += filterArea.zw;\n\n    return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n    coord -= filterArea.zw;\n    coord /= filterArea.xy;\n\n    return coord;\n}\n\nvoid texcoords(vec2 fragCoord, vec2 resolution,\n               out vec2 v_rgbNW, out vec2 v_rgbNE,\n               out vec2 v_rgbSW, out vec2 v_rgbSE,\n               out vec2 v_rgbM) {\n    vec2 inverseVP = 1.0 / resolution.xy;\n    v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n    v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n    v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n    v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n    v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n   gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n   vTextureCoord = aTextureCoord;\n\n   vec2 fragCoord = vTextureCoord * filterArea.xy;\n\n   texcoords(fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}",'varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it\'s\n unsupported by WebGL.\n \n --\n \n From:\n https://github.com/mitsuhiko/webgl-meincraft\n \n Copyright (c) 2011 by Armin Ronacher.\n \n Some rights reserved.\n \n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n \n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n \n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n \n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n \n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN   (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL   (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX     8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 resolution,\n          vec2 v_rgbNW, vec2 v_rgbNE,\n          vec2 v_rgbSW, vec2 v_rgbSE,\n          vec2 v_rgbM) {\n    vec4 color;\n    mediump vec2 inverseVP = vec2(1.0 / resolution.x, 1.0 / resolution.y);\n    vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n    vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n    vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n    vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n    vec4 texColor = texture2D(tex, v_rgbM);\n    vec3 rgbM  = texColor.xyz;\n    vec3 luma = vec3(0.299, 0.587, 0.114);\n    float lumaNW = dot(rgbNW, luma);\n    float lumaNE = dot(rgbNE, luma);\n    float lumaSW = dot(rgbSW, luma);\n    float lumaSE = dot(rgbSE, luma);\n    float lumaM  = dot(rgbM,  luma);\n    float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n    float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n    \n    mediump vec2 dir;\n    dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n    dir.y =  ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n    \n    float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n                          (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n    \n    float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n    dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n              max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n                  dir * rcpDirMin)) * inverseVP;\n    \n    vec3 rgbA = 0.5 * (\n                       texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n                       texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n    vec3 rgbB = rgbA * 0.5 + 0.25 * (\n                                     texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n                                     texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\n    \n    float lumaB = dot(rgbB, luma);\n    if ((lumaB < lumaMin) || (lumaB > lumaMax))\n        color = vec4(rgbA, texColor.a);\n    else\n        color = vec4(rgbB, texColor.a);\n    return color;\n}\n\nvoid main() {\n\n      vec2 fragCoord = vTextureCoord * filterArea.xy;\n\n      vec4 color;\n\n    color = fxaa(uSampler, fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n      gl_FragColor = color;\n}\n'))}return e}(n.Filter);r.default=i},{"../../core":65,path:8}],153:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("./fxaa/FXAAFilter");Object.defineProperty(r,"FXAAFilter",{enumerable:!0,get:function(){return c(n).default}});var i=t("./noise/NoiseFilter");Object.defineProperty(r,"NoiseFilter",{enumerable:!0,get:function(){return c(i).default}});var o=t("./displacement/DisplacementFilter");Object.defineProperty(r,"DisplacementFilter",{enumerable:!0,get:function(){return c(o).default}});var s=t("./blur/BlurFilter");Object.defineProperty(r,"BlurFilter",{enumerable:!0,get:function(){return c(s).default}});var a=t("./blur/BlurXFilter");Object.defineProperty(r,"BlurXFilter",{enumerable:!0,get:function(){return c(a).default}});var u=t("./blur/BlurYFilter");Object.defineProperty(r,"BlurYFilter",{enumerable:!0,get:function(){return c(u).default}});var h=t("./colormatrix/ColorMatrixFilter");Object.defineProperty(r,"ColorMatrixFilter",{enumerable:!0,get:function(){return c(h).default}});var l=t("./alpha/AlphaFilter");Object.defineProperty(r,"AlphaFilter",{enumerable:!0,get:function(){return c(l).default}});function c(t){return t&&t.__esModule?t:{default:t}}},{"./alpha/AlphaFilter":143,"./blur/BlurFilter":144,"./blur/BlurXFilter":145,"./blur/BlurYFilter":146,"./colormatrix/ColorMatrixFilter":150,"./displacement/DisplacementFilter":151,"./fxaa/FXAAFilter":152,"./noise/NoiseFilter":154}],154:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../../core"));t("path");var o=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.5,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Math.random();!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n    vTextureCoord = aTextureCoord;\n}","precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n    return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n    vec4 color = texture2D(uSampler, vTextureCoord);\n    float randomValue = rand(gl_FragCoord.xy * uSeed);\n    float diff = (randomValue - 0.5) * uNoise;\n\n    // Un-premultiply alpha before applying the color matrix. See issue #3539.\n    if (color.a > 0.0) {\n        color.rgb /= color.a;\n    }\n\n    color.r += diff;\n    color.g += diff;\n    color.b += diff;\n\n    // Premultiply alpha again.\n    color.rgb *= color.a;\n\n    gl_FragColor = color;\n}\n"));return i.noise=r,i.seed=n,i}return n(e,[{key:"noise",get:function(){return this.uniforms.uNoise},set:function(t){this.uniforms.uNoise=t}},{key:"seed",get:function(){return this.uniforms.uSeed},set:function(t){this.uniforms.uSeed=t}}]),e}(i.Filter);r.default=o},{"../../core":65,path:8}],155:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../core"));var o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.global=new i.Point,this.target=null,this.originalEvent=null,this.identifier=null,this.isPrimary=!1,this.button=0,this.buttons=0,this.width=0,this.height=0,this.tiltX=0,this.tiltY=0,this.pointerType=null,this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0}return t.prototype.getLocalPosition=function(t,e,r){return t.worldTransform.applyInverse(r||this.global,e)},t.prototype._copyEvent=function(t){t.isPrimary&&(this.isPrimary=!0),this.button=t.button,this.buttons=t.buttons,this.width=t.width,this.height=t.height,this.tiltX=t.tiltX,this.tiltY=t.tiltY,this.pointerType=t.pointerType,this.pressure=t.pressure,this.rotationAngle=t.rotationAngle,this.twist=t.twist||0,this.tangentialPressure=t.tangentialPressure||0},t.prototype._reset=function(){this.isPrimary=!1},n(t,[{key:"pointerId",get:function(){return this.identifier}}]),t}();r.default=o},{"../core":65}],156:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.stopped=!1,this.target=null,this.currentTarget=null,this.type=null,this.data=null}return t.prototype.stopPropagation=function(){this.stopped=!0},t.prototype._reset=function(){this.stopped=!1,this.currentTarget=null,this.target=null},t}();r.default=n},{}],157:[function(t,e,r){"use strict";r.__esModule=!0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../core")),o=l(t("./InteractionData")),s=l(t("./InteractionEvent")),a=l(t("./InteractionTrackingData")),u=l(t("eventemitter3")),h=l(t("./interactiveTarget"));function l(t){return t&&t.__esModule?t:{default:t}}i.utils.mixins.delayMixin(i.DisplayObject.prototype,h.default);var c="MOUSE",d={target:null,data:{global:null}},f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return n=n||{},a.renderer=r,a.autoPreventDefault=void 0===n.autoPreventDefault||n.autoPreventDefault,a.interactionFrequency=n.interactionFrequency||10,a.mouse=new o.default,a.mouse.identifier=c,a.mouse.global.set(-999999),a.activeInteractionData={},a.activeInteractionData[c]=a.mouse,a.interactionDataPool=[],a.eventData=new s.default,a.interactionDOMElement=null,a.moveWhenInside=!1,a.eventsAdded=!1,a.mouseOverRenderer=!1,a.supportsTouchEvents="ontouchstart"in window,a.supportsPointerEvents=!!window.PointerEvent,a.onPointerUp=a.onPointerUp.bind(a),a.processPointerUp=a.processPointerUp.bind(a),a.onPointerCancel=a.onPointerCancel.bind(a),a.processPointerCancel=a.processPointerCancel.bind(a),a.onPointerDown=a.onPointerDown.bind(a),a.processPointerDown=a.processPointerDown.bind(a),a.onPointerMove=a.onPointerMove.bind(a),a.processPointerMove=a.processPointerMove.bind(a),a.onPointerOut=a.onPointerOut.bind(a),a.processPointerOverOut=a.processPointerOverOut.bind(a),a.onPointerOver=a.onPointerOver.bind(a),a.cursorStyles={default:"inherit",pointer:"pointer"},a.currentCursorMode=null,a.cursor=null,a._tempPoint=new i.Point,a.resolution=1,a.setTargetElement(a.renderer.view,a.renderer.resolution),a}return e.prototype.hitTest=function(t,e){return d.target=null,d.data.global=t,e||(e=this.renderer._lastObjectRendered),this.processInteractive(d,e,null,!0),d.target},e.prototype.setTargetElement=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.removeEvents(),this.interactionDOMElement=t,this.resolution=e,this.addEvents()},e.prototype.addEvents=function(){this.interactionDOMElement&&(i.ticker.shared.add(this.update,this,i.UPDATE_PRIORITY.INTERACTION),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="none",this.interactionDOMElement.style["-ms-touch-action"]="none"):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]="none"),this.supportsPointerEvents?(window.document.addEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,!0),window.addEventListener("pointercancel",this.onPointerCancel,!0),window.addEventListener("pointerup",this.onPointerUp,!0)):(window.document.addEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,!0),window.addEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,!0)),this.eventsAdded=!0)},e.prototype.removeEvents=function(){this.interactionDOMElement&&(i.ticker.shared.remove(this.update,this),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="",this.interactionDOMElement.style["-ms-touch-action"]=""):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]=""),this.supportsPointerEvents?(window.document.removeEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,!0),window.removeEventListener("pointercancel",this.onPointerCancel,!0),window.removeEventListener("pointerup",this.onPointerUp,!0)):(window.document.removeEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,!0),window.removeEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,!0)),this.interactionDOMElement=null,this.eventsAdded=!1)},e.prototype.update=function(t){if(this._deltaTime+=t,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.interactionDOMElement))if(this.didMove)this.didMove=!1;else{this.cursor=null;for(var e in this.activeInteractionData)if(this.activeInteractionData.hasOwnProperty(e)){var r=this.activeInteractionData[e];if(r.originalEvent&&"touch"!==r.pointerType){var n=this.configureInteractionEventForDOMEvent(this.eventData,r.originalEvent,r);this.processInteractive(n,this.renderer._lastObjectRendered,this.processPointerOverOut,!0)}}this.setCursorMode(this.cursor)}},e.prototype.setCursorMode=function(t){if(t=t||"default",this.currentCursorMode!==t){this.currentCursorMode=t;var e=this.cursorStyles[t];if(e)switch(void 0===e?"undefined":n(e)){case"string":this.interactionDOMElement.style.cursor=e;break;case"function":e(t);break;case"object":Object.assign(this.interactionDOMElement.style,e)}else"string"!=typeof t||Object.prototype.hasOwnProperty.call(this.cursorStyles,t)||(this.interactionDOMElement.style.cursor=t)}},e.prototype.dispatchEvent=function(t,e,r){r.stopped||(r.currentTarget=t,r.type=e,t.emit(e,r),t[e]&&t[e](r))},e.prototype.mapPositionToPoint=function(t,e,r){var n=void 0;n=this.interactionDOMElement.parentElement?this.interactionDOMElement.getBoundingClientRect():{x:0,y:0,width:0,height:0};var i=navigator.isCocoonJS?this.resolution:1/this.resolution;t.x=(e-n.left)*(this.interactionDOMElement.width/n.width)*i,t.y=(r-n.top)*(this.interactionDOMElement.height/n.height)*i},e.prototype.processInteractive=function(t,e,r,n,i){if(!e||!e.visible)return!1;var o=t.data.global,s=!1,a=i=e.interactive||i;if(e.hitArea?a=!1:n&&e._mask&&(e._mask.containsPoint(o)||(n=!1)),e.interactiveChildren&&e.children)for(var u=e.children,h=u.length-1;h>=0;h--){var l=u[h],c=this.processInteractive(t,l,r,n,a);if(c){if(!l.parent)continue;a=!1,c&&(t.target&&(n=!1),s=!0)}}return i&&(n&&!t.target&&(e.hitArea?(e.worldTransform.applyInverse(o,this._tempPoint),e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)&&(s=!0)):e.containsPoint&&e.containsPoint(o)&&(s=!0)),e.interactive&&(s&&!t.target&&(t.target=e),r&&r(t,e,!!s))),s},e.prototype.onPointerDown=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t);this.autoPreventDefault&&e[0].isNormalized&&t.preventDefault();for(var r=e.length,n=0;n<r;n++){var i=e[n],o=this.getInteractionDataForPointerId(i),s=this.configureInteractionEventForDOMEvent(this.eventData,i,o);if(s.data.originalEvent=t,this.processInteractive(s,this.renderer._lastObjectRendered,this.processPointerDown,!0),this.emit("pointerdown",s),"touch"===i.pointerType)this.emit("touchstart",s);else if("mouse"===i.pointerType||"pen"===i.pointerType){var a=2===i.button;this.emit(a?"rightdown":"mousedown",this.eventData)}}}},e.prototype.processPointerDown=function(t,e,r){var n=t.data,i=t.data.identifier;if(r)if(e.trackedPointers[i]||(e.trackedPointers[i]=new a.default(i)),this.dispatchEvent(e,"pointerdown",t),"touch"===n.pointerType)this.dispatchEvent(e,"touchstart",t);else if("mouse"===n.pointerType||"pen"===n.pointerType){var o=2===n.button;o?e.trackedPointers[i].rightDown=!0:e.trackedPointers[i].leftDown=!0,this.dispatchEvent(e,o?"rightdown":"mousedown",t)}},e.prototype.onPointerComplete=function(t,e,r){for(var n=this.normalizeToPointerData(t),i=n.length,o=t.target!==this.interactionDOMElement?"outside":"",s=0;s<i;s++){var a=n[s],u=this.getInteractionDataForPointerId(a),h=this.configureInteractionEventForDOMEvent(this.eventData,a,u);if(h.data.originalEvent=t,this.processInteractive(h,this.renderer._lastObjectRendered,r,e||!o),this.emit(e?"pointercancel":"pointerup"+o,h),"mouse"===a.pointerType||"pen"===a.pointerType){var l=2===a.button;this.emit(l?"rightup"+o:"mouseup"+o,h)}else"touch"===a.pointerType&&(this.emit(e?"touchcancel":"touchend"+o,h),this.releaseInteractionDataForPointerId(a.pointerId,u))}},e.prototype.onPointerCancel=function(t){this.supportsTouchEvents&&"touch"===t.pointerType||this.onPointerComplete(t,!0,this.processPointerCancel)},e.prototype.processPointerCancel=function(t,e){var r=t.data,n=t.data.identifier;void 0!==e.trackedPointers[n]&&(delete e.trackedPointers[n],this.dispatchEvent(e,"pointercancel",t),"touch"===r.pointerType&&this.dispatchEvent(e,"touchcancel",t))},e.prototype.onPointerUp=function(t){this.supportsTouchEvents&&"touch"===t.pointerType||this.onPointerComplete(t,!1,this.processPointerUp)},e.prototype.processPointerUp=function(t,e,r){var n=t.data,i=t.data.identifier,o=e.trackedPointers[i],s="touch"===n.pointerType;if("mouse"===n.pointerType||"pen"===n.pointerType){var u=2===n.button,h=a.default.FLAGS,l=u?h.RIGHT_DOWN:h.LEFT_DOWN,c=void 0!==o&&o.flags&l;r?(this.dispatchEvent(e,u?"rightup":"mouseup",t),c&&this.dispatchEvent(e,u?"rightclick":"click",t)):c&&this.dispatchEvent(e,u?"rightupoutside":"mouseupoutside",t),o&&(u?o.rightDown=!1:o.leftDown=!1)}r?(this.dispatchEvent(e,"pointerup",t),s&&this.dispatchEvent(e,"touchend",t),o&&(this.dispatchEvent(e,"pointertap",t),s&&(this.dispatchEvent(e,"tap",t),o.over=!1))):o&&(this.dispatchEvent(e,"pointerupoutside",t),s&&this.dispatchEvent(e,"touchendoutside",t)),o&&o.none&&delete e.trackedPointers[i]},e.prototype.onPointerMove=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t);"mouse"===e[0].pointerType&&(this.didMove=!0,this.cursor=null);for(var r=e.length,n=0;n<r;n++){var i=e[n],o=this.getInteractionDataForPointerId(i),s=this.configureInteractionEventForDOMEvent(this.eventData,i,o);s.data.originalEvent=t;var a="touch"!==i.pointerType||this.moveWhenInside;this.processInteractive(s,this.renderer._lastObjectRendered,this.processPointerMove,a),this.emit("pointermove",s),"touch"===i.pointerType&&this.emit("touchmove",s),"mouse"!==i.pointerType&&"pen"!==i.pointerType||this.emit("mousemove",s)}"mouse"===e[0].pointerType&&this.setCursorMode(this.cursor)}},e.prototype.processPointerMove=function(t,e,r){var n=t.data,i="touch"===n.pointerType,o="mouse"===n.pointerType||"pen"===n.pointerType;o&&this.processPointerOverOut(t,e,r),this.moveWhenInside&&!r||(this.dispatchEvent(e,"pointermove",t),i&&this.dispatchEvent(e,"touchmove",t),o&&this.dispatchEvent(e,"mousemove",t))},e.prototype.onPointerOut=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t)[0];"mouse"===e.pointerType&&(this.mouseOverRenderer=!1,this.setCursorMode(null));var r=this.getInteractionDataForPointerId(e),n=this.configureInteractionEventForDOMEvent(this.eventData,e,r);n.data.originalEvent=e,this.processInteractive(n,this.renderer._lastObjectRendered,this.processPointerOverOut,!1),this.emit("pointerout",n),"mouse"===e.pointerType||"pen"===e.pointerType?this.emit("mouseout",n):this.releaseInteractionDataForPointerId(r.identifier)}},e.prototype.processPointerOverOut=function(t,e,r){var n=t.data,i=t.data.identifier,o="mouse"===n.pointerType||"pen"===n.pointerType,s=e.trackedPointers[i];r&&!s&&(s=e.trackedPointers[i]=new a.default(i)),void 0!==s&&(r&&this.mouseOverRenderer?(s.over||(s.over=!0,this.dispatchEvent(e,"pointerover",t),o&&this.dispatchEvent(e,"mouseover",t)),o&&null===this.cursor&&(this.cursor=e.cursor)):s.over&&(s.over=!1,this.dispatchEvent(e,"pointerout",this.eventData),o&&this.dispatchEvent(e,"mouseout",t),s.none&&delete e.trackedPointers[i]))},e.prototype.onPointerOver=function(t){var e=this.normalizeToPointerData(t)[0],r=this.getInteractionDataForPointerId(e),n=this.configureInteractionEventForDOMEvent(this.eventData,e,r);n.data.originalEvent=e,"mouse"===e.pointerType&&(this.mouseOverRenderer=!0),this.emit("pointerover",n),"mouse"!==e.pointerType&&"pen"!==e.pointerType||this.emit("mouseover",n)},e.prototype.getInteractionDataForPointerId=function(t){var e=t.pointerId,r=void 0;return e===c||"mouse"===t.pointerType?r=this.mouse:this.activeInteractionData[e]?r=this.activeInteractionData[e]:((r=this.interactionDataPool.pop()||new o.default).identifier=e,this.activeInteractionData[e]=r),r._copyEvent(t),r},e.prototype.releaseInteractionDataForPointerId=function(t){var e=this.activeInteractionData[t];e&&(delete this.activeInteractionData[t],e._reset(),this.interactionDataPool.push(e))},e.prototype.configureInteractionEventForDOMEvent=function(t,e,r){return t.data=r,this.mapPositionToPoint(r.global,e.clientX,e.clientY),navigator.isCocoonJS&&"touch"===e.pointerType&&(r.global.x=r.global.x/this.resolution,r.global.y=r.global.y/this.resolution),"touch"===e.pointerType&&(e.globalX=r.global.x,e.globalY=r.global.y),r.originalEvent=e,t._reset(),t},e.prototype.normalizeToPointerData=function(t){var e=[];if(this.supportsTouchEvents&&t instanceof TouchEvent)for(var r=0,n=t.changedTouches.length;r<n;r++){var i=t.changedTouches[r];void 0===i.button&&(i.button=t.touches.length?1:0),void 0===i.buttons&&(i.buttons=t.touches.length?1:0),void 0===i.isPrimary&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),void 0===i.width&&(i.width=i.radiusX||1),void 0===i.height&&(i.height=i.radiusY||1),void 0===i.tiltX&&(i.tiltX=0),void 0===i.tiltY&&(i.tiltY=0),void 0===i.pointerType&&(i.pointerType="touch"),void 0===i.pointerId&&(i.pointerId=i.identifier||0),void 0===i.pressure&&(i.pressure=i.force||.5),i.twist=0,i.tangentialPressure=0,void 0===i.layerX&&(i.layerX=i.offsetX=i.clientX),void 0===i.layerY&&(i.layerY=i.offsetY=i.clientY),i.isNormalized=!0,e.push(i)}else!(t instanceof MouseEvent)||this.supportsPointerEvents&&t instanceof window.PointerEvent?e.push(t):(void 0===t.isPrimary&&(t.isPrimary=!0),void 0===t.width&&(t.width=1),void 0===t.height&&(t.height=1),void 0===t.tiltX&&(t.tiltX=0),void 0===t.tiltY&&(t.tiltY=0),void 0===t.pointerType&&(t.pointerType="mouse"),void 0===t.pointerId&&(t.pointerId=c),void 0===t.pressure&&(t.pressure=.5),t.twist=0,t.tangentialPressure=0,t.isNormalized=!0,e.push(t));return e},e.prototype.destroy=function(){this.removeEvents(),this.removeAllListeners(),this.renderer=null,this.mouse=null,this.eventData=null,this.interactionDOMElement=null,this.onPointerDown=null,this.processPointerDown=null,this.onPointerUp=null,this.processPointerUp=null,this.onPointerCancel=null,this.processPointerCancel=null,this.onPointerMove=null,this.processPointerMove=null,this.onPointerOut=null,this.processPointerOverOut=null,this.onPointerOver=null,this._tempPoint=null},e}(u.default);r.default=f,i.WebGLRenderer.registerPlugin("interaction",f),i.CanvasRenderer.registerPlugin("interaction",f)},{"../core":65,"./InteractionData":155,"./InteractionEvent":156,"./InteractionTrackingData":158,"./interactiveTarget":160,eventemitter3:3}],158:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();var i=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._pointerId=e,this._flags=t.FLAGS.NONE}return t.prototype._doSet=function(t,e){this._flags=e?this._flags|t:this._flags&~t},n(t,[{key:"pointerId",get:function(){return this._pointerId}},{key:"flags",get:function(){return this._flags},set:function(t){this._flags=t}},{key:"none",get:function(){return this._flags===this.constructor.FLAGS.NONE}},{key:"over",get:function(){return 0!=(this._flags&this.constructor.FLAGS.OVER)},set:function(t){this._doSet(this.constructor.FLAGS.OVER,t)}},{key:"rightDown",get:function(){return 0!=(this._flags&this.constructor.FLAGS.RIGHT_DOWN)},set:function(t){this._doSet(this.constructor.FLAGS.RIGHT_DOWN,t)}},{key:"leftDown",get:function(){return 0!=(this._flags&this.constructor.FLAGS.LEFT_DOWN)},set:function(t){this._doSet(this.constructor.FLAGS.LEFT_DOWN,t)}}]),t}();r.default=i,i.FLAGS=Object.freeze({NONE:0,OVER:1,LEFT_DOWN:2,RIGHT_DOWN:4})},{}],159:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("./InteractionData");Object.defineProperty(r,"InteractionData",{enumerable:!0,get:function(){return u(n).default}});var i=t("./InteractionManager");Object.defineProperty(r,"InteractionManager",{enumerable:!0,get:function(){return u(i).default}});var o=t("./interactiveTarget");Object.defineProperty(r,"interactiveTarget",{enumerable:!0,get:function(){return u(o).default}});var s=t("./InteractionTrackingData");Object.defineProperty(r,"InteractionTrackingData",{enumerable:!0,get:function(){return u(s).default}});var a=t("./InteractionEvent");Object.defineProperty(r,"InteractionEvent",{enumerable:!0,get:function(){return u(a).default}});function u(t){return t&&t.__esModule?t:{default:t}}},{"./InteractionData":155,"./InteractionEvent":156,"./InteractionManager":157,"./InteractionTrackingData":158,"./interactiveTarget":160}],160:[function(t,e,r){"use strict";r.__esModule=!0,r.default={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return"pointer"===this.cursor},set buttonMode(t){t?this.cursor="pointer":"pointer"===this.cursor&&(this.cursor=null)},cursor:null,get trackedPointers(){return void 0===this._trackedPointers&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0}},{}],161:[function(t,e,r){"use strict";r.__esModule=!0,r.parse=a,r.default=function(){return function(t,e){if(t.data&&t.type===o.Resource.TYPE.XML)if(0!==t.data.getElementsByTagName("page").length&&0!==t.data.getElementsByTagName("info").length&&null!==t.data.getElementsByTagName("info")[0].getAttribute("face")){var r=t.isDataUrl?"":n.dirname(t.url);t.isDataUrl&&("."===r&&(r=""),this.baseUrl&&r&&"/"===this.baseUrl.charAt(this.baseUrl.length-1)&&(r+="/")),(r=r.replace(this.baseUrl,""))&&"/"!==r.charAt(r.length-1)&&(r+="/");var s=r+t.data.getElementsByTagName("page")[0].getAttribute("file");if(i.utils.TextureCache[s])a(t,i.utils.TextureCache[s]),e();else{var u={crossOrigin:t.crossOrigin,loadType:o.Resource.LOAD_TYPE.IMAGE,metadata:t.metadata.imageMetadata,parentResource:t};this.add(t.name+"_image",s,u,function(r){a(t,r.texture),e()})}}else e();else e()}};var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("path")),i=t("../core"),o=t("resource-loader"),s=t("../extras");function a(t,e){t.bitmapFont=s.BitmapText.registerFont(t.data,e)}},{"../core":65,"../extras":141,path:8,"resource-loader":36}],162:[function(t,e,r){"use strict";r.__esModule=!0,r.shared=r.Resource=r.textureParser=r.getResourcePath=r.spritesheetParser=r.parseBitmapFontData=r.bitmapFontParser=r.Loader=void 0;var n=t("./bitmapFontParser");Object.defineProperty(r,"bitmapFontParser",{enumerable:!0,get:function(){return h(n).default}}),Object.defineProperty(r,"parseBitmapFontData",{enumerable:!0,get:function(){return n.parse}});var i=t("./spritesheetParser");Object.defineProperty(r,"spritesheetParser",{enumerable:!0,get:function(){return h(i).default}}),Object.defineProperty(r,"getResourcePath",{enumerable:!0,get:function(){return i.getResourcePath}});var o=t("./textureParser");Object.defineProperty(r,"textureParser",{enumerable:!0,get:function(){return h(o).default}});var s=t("resource-loader");Object.defineProperty(r,"Resource",{enumerable:!0,get:function(){return s.Resource}});var a=h(t("../core/Application")),u=h(t("./loader"));function h(t){return t&&t.__esModule?t:{default:t}}r.Loader=u.default;var l=new u.default;l.destroy=function(){},r.shared=l;var c=a.default.prototype;c._loader=null,Object.defineProperty(c,"loader",{get:function(){if(!this._loader){var t=this._options.sharedLoader;this._loader=t?l:new u.default}return this._loader}}),c._parentDestroy=c.destroy,c.destroy=function(t){this._loader&&(this._loader.destroy(),this._loader=null),this._parentDestroy(t)}},{"../core/Application":43,"./bitmapFontParser":161,"./loader":163,"./spritesheetParser":164,"./textureParser":165,"resource-loader":36}],163:[function(t,e,r){"use strict";r.__esModule=!0;var n=h(t("resource-loader")),i=t("resource-loader/lib/middlewares/parsing/blob"),o=h(t("eventemitter3")),s=h(t("./textureParser")),a=h(t("./spritesheetParser")),u=h(t("./bitmapFontParser"));function h(t){return t&&t.__esModule?t:{default:t}}var l=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,n));o.default.call(i);for(var s=0;s<e._pixiMiddleware.length;++s)i.use(e._pixiMiddleware[s]());return i.onStart.add(function(t){return i.emit("start",t)}),i.onProgress.add(function(t,e){return i.emit("progress",t,e)}),i.onError.add(function(t,e,r){return i.emit("error",t,e,r)}),i.onLoad.add(function(t,e){return i.emit("load",t,e)}),i.onComplete.add(function(t,e){return i.emit("complete",t,e)}),i}return e.addPixiMiddleware=function(t){e._pixiMiddleware.push(t)},e.prototype.destroy=function(){this.removeAllListeners(),this.reset()},e}(n.default);r.default=l;for(var c in o.default.prototype)l.prototype[c]=o.default.prototype[c];l._pixiMiddleware=[i.blobMiddlewareFactory,s.default,a.default,u.default];var d=n.default.Resource;d.setExtensionXhrType("fnt",d.XHR_RESPONSE_TYPE.DOCUMENT)},{"./bitmapFontParser":161,"./spritesheetParser":164,"./textureParser":165,eventemitter3:3,"resource-loader":36,"resource-loader/lib/middlewares/parsing/blob":37}],164:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(){return function(t,e){var r=t.name+"_image";if(t.data&&t.type===i.Resource.TYPE.JSON&&t.data.frames&&!this.resources[r]){var n={crossOrigin:t.crossOrigin,loadType:i.Resource.LOAD_TYPE.IMAGE,metadata:t.metadata.imageMetadata,parentResource:t},o=u(t,this.baseUrl);this.add(r,o,n,function(r){var n=new a.Spritesheet(r.texture.baseTexture,t.data,t.url);n.parse(function(){t.spritesheet=n,t.textures=n.textures,e()})})}else e()}},r.getResourcePath=u;var n,i=t("resource-loader"),o=t("url"),s=(n=o,n&&n.__esModule?n:{default:n}),a=t("../core");function u(t,e){return t.isDataUrl?t.data.meta.image:s.default.resolve(t.url.replace(e,""),t.data.meta.image)}},{"../core":65,"resource-loader":36,url:38}],165:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(){return function(t,e){t.data&&t.type===i.Resource.TYPE.IMAGE&&(t.texture=s.default.fromLoader(t.data,t.url,t.name)),e()}};var n,i=t("resource-loader"),o=t("../core/textures/Texture"),s=(n=o,n&&n.__esModule?n:{default:n})},{"../core/textures/Texture":115,"resource-loader":36}],166:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../core")),s=t("../core/textures/Texture"),a=(n=s,n&&n.__esModule?n:{default:n});var u=new o.Point,h=new o.Polygon,l=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r,n,i,s,u){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var h=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return h._texture=r||a.default.EMPTY,h.uvs=i||new Float32Array([0,0,1,0,1,1,0,1]),h.vertices=n||new Float32Array([0,0,100,0,100,100,0,100]),h.indices=s||new Uint16Array([0,1,3,2]),h.dirty=0,h.indexDirty=0,h.blendMode=o.BLEND_MODES.NORMAL,h.canvasPadding=0,h.drawMode=u||e.DRAW_MODES.TRIANGLE_MESH,h.shader=null,h.tintRgb=new Float32Array([1,1,1]),h._glDatas={},h._uvTransform=new o.TextureMatrix(h._texture),h.uploadUvTransform=!1,h.pluginName="mesh",h}return e.prototype._renderWebGL=function(t){this.refresh(),t.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this)},e.prototype._renderCanvas=function(t){this.refresh(),t.plugins[this.pluginName].render(this)},e.prototype._onTextureUpdate=function(){this._uvTransform.texture=this._texture,this.refresh()},e.prototype.multiplyUvs=function(){this.uploadUvTransform||this._uvTransform.multiplyUvs(this.uvs)},e.prototype.refresh=function(t){this._uvTransform.update(t)&&this._refresh()},e.prototype._refresh=function(){},e.prototype._calculateBounds=function(){this._bounds.addVertices(this.transform,this.vertices,0,this.vertices.length)},e.prototype.containsPoint=function(t){if(!this.getBounds().contains(t.x,t.y))return!1;this.worldTransform.applyInverse(t,u);for(var r=this.vertices,n=h.points,i=this.indices,o=this.indices.length,s=this.drawMode===e.DRAW_MODES.TRIANGLES?3:1,a=0;a+2<o;a+=s){var l=2*i[a],c=2*i[a+1],d=2*i[a+2];if(n[0]=r[l],n[1]=r[l+1],n[2]=r[c],n[3]=r[c+1],n[4]=r[d],n[5]=r[d+1],h.contains(u.x,u.y))return!0}return!1},i(e,[{key:"texture",get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture=t,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))}},{key:"tint",get:function(){return o.utils.rgb2hex(this.tintRgb)},set:function(t){this.tintRgb=o.utils.hex2rgb(t,this.tintRgb)}}]),e}(o.Container);r.default=l,l.DRAW_MODES={TRIANGLE_MESH:0,TRIANGLES:1}},{"../core":65,"../core/textures/Texture":115}],167:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=t("./Plane");var s=10,a=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r,n,i,o,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var u=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,4,4));return u._origWidth=r.orig.width,u._origHeight=r.orig.height,u._width=u._origWidth,u._height=u._origHeight,u.leftWidth=void 0!==n?n:s,u.rightWidth=void 0!==o?o:s,u.topHeight=void 0!==i?i:s,u.bottomHeight=void 0!==a?a:s,u.refresh(!0),u}return e.prototype.updateHorizontalVertices=function(){var t=this.vertices;t[9]=t[11]=t[13]=t[15]=this._topHeight,t[17]=t[19]=t[21]=t[23]=this._height-this._bottomHeight,t[25]=t[27]=t[29]=t[31]=this._height},e.prototype.updateVerticalVertices=function(){var t=this.vertices;t[2]=t[10]=t[18]=t[26]=this._leftWidth,t[4]=t[12]=t[20]=t[28]=this._width-this._rightWidth,t[6]=t[14]=t[22]=t[30]=this._width},e.prototype._renderCanvas=function(t){var e=t.context;e.globalAlpha=this.worldAlpha;var r=this.worldTransform,n=t.resolution;t.roundPixels?e.setTransform(r.a*n,r.b*n,r.c*n,r.d*n,r.tx*n|0,r.ty*n|0):e.setTransform(r.a*n,r.b*n,r.c*n,r.d*n,r.tx*n,r.ty*n);var i=this._texture.baseTexture,o=i.source,s=i.width*i.resolution,a=i.height*i.resolution;this.drawSegment(e,o,s,a,0,1,10,11),this.drawSegment(e,o,s,a,2,3,12,13),this.drawSegment(e,o,s,a,4,5,14,15),this.drawSegment(e,o,s,a,8,9,18,19),this.drawSegment(e,o,s,a,10,11,20,21),this.drawSegment(e,o,s,a,12,13,22,23),this.drawSegment(e,o,s,a,16,17,26,27),this.drawSegment(e,o,s,a,18,19,28,29),this.drawSegment(e,o,s,a,20,21,30,31)},e.prototype.drawSegment=function(t,e,r,n,i,o,s,a){var u=this.uvs,h=this.vertices,l=(u[s]-u[i])*r,c=(u[a]-u[o])*n,d=h[s]-h[i],f=h[a]-h[o];l<1&&(l=1),c<1&&(c=1),d<1&&(d=1),f<1&&(f=1),t.drawImage(e,u[i]*r,u[o]*n,l,c,h[i],h[o],d,f)},e.prototype._refresh=function(){t.prototype._refresh.call(this);var e=this.uvs,r=this._texture;this._origWidth=r.orig.width,this._origHeight=r.orig.height;var n=1/this._origWidth,i=1/this._origHeight;e[0]=e[8]=e[16]=e[24]=0,e[1]=e[3]=e[5]=e[7]=0,e[6]=e[14]=e[22]=e[30]=1,e[25]=e[27]=e[29]=e[31]=1,e[2]=e[10]=e[18]=e[26]=n*this._leftWidth,e[4]=e[12]=e[20]=e[28]=1-n*this._rightWidth,e[9]=e[11]=e[13]=e[15]=i*this._topHeight,e[17]=e[19]=e[21]=e[23]=1-i*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.dirty++,this.multiplyUvs()},i(e,[{key:"width",get:function(){return this._width},set:function(t){this._width=t,this._refresh()}},{key:"height",get:function(){return this._height},set:function(t){this._height=t,this._refresh()}},{key:"leftWidth",get:function(){return this._leftWidth},set:function(t){this._leftWidth=t,this._refresh()}},{key:"rightWidth",get:function(){return this._rightWidth},set:function(t){this._rightWidth=t,this._refresh()}},{key:"topHeight",get:function(){return this._topHeight},set:function(t){this._topHeight=t,this._refresh()}},{key:"bottomHeight",get:function(){return this._bottomHeight},set:function(t){this._bottomHeight=t,this._refresh()}}]),e}((n=o,n&&n.__esModule?n:{default:n}).default);r.default=a},{"./Plane":168}],168:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=t("./Mesh"),o=(n=i,n&&n.__esModule?n:{default:n});var s=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var s=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return s._ready=!0,s.verticesX=n||10,s.verticesY=i||10,s.drawMode=o.default.DRAW_MODES.TRIANGLES,s.refresh(),s}return e.prototype._refresh=function(){for(var t=this._texture,e=this.verticesX*this.verticesY,r=[],n=[],i=[],o=this.verticesX-1,s=this.verticesY-1,a=t.width/o,u=t.height/s,h=0;h<e;h++){var l=h%this.verticesX,c=h/this.verticesX|0;r.push(l*a,c*u),n.push(l/o,c/s)}for(var d=o*s,f=0;f<d;f++){var p=f%o,v=f/o|0,g=v*this.verticesX+p,y=v*this.verticesX+p+1,m=(v+1)*this.verticesX+p,_=(v+1)*this.verticesX+p+1;i.push(g,y,m),i.push(y,_,m)}this.vertices=new Float32Array(r),this.uvs=new Float32Array(n),this.colors=new Float32Array([]),this.indices=new Uint16Array(i),this.dirty++,this.indexDirty++,this.multiplyUvs()},e.prototype._onTextureUpdate=function(){o.default.prototype._onTextureUpdate.call(this),this._ready&&this.refresh()},e}(o.default);r.default=s},{"./Mesh":166}],169:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=t("./Mesh");var o=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return i.points=n,i.vertices=new Float32Array(4*n.length),i.uvs=new Float32Array(4*n.length),i.colors=new Float32Array(2*n.length),i.indices=new Uint16Array(2*n.length),i.autoUpdate=!0,i.refresh(),i}return e.prototype._refresh=function(){var t=this.points;if(!(t.length<1)&&this._texture._uvs){this.vertices.length/4!==t.length&&(this.vertices=new Float32Array(4*t.length),this.uvs=new Float32Array(4*t.length),this.colors=new Float32Array(2*t.length),this.indices=new Uint16Array(2*t.length));var e=this.uvs,r=this.indices,n=this.colors;e[0]=0,e[1]=0,e[2]=0,e[3]=1,n[0]=1,n[1]=1,r[0]=0,r[1]=1;for(var i=t.length,o=1;o<i;o++){var s=4*o,a=o/(i-1);e[s]=a,e[s+1]=0,e[s+2]=a,e[s+3]=1,n[s=2*o]=1,n[s+1]=1,r[s=2*o]=s,r[s+1]=s+1}this.dirty++,this.indexDirty++,this.multiplyUvs(),this.refreshVertices()}},e.prototype.refreshVertices=function(){var t=this.points;if(!(t.length<1))for(var e=t[0],r=void 0,n=0,i=0,o=this.vertices,s=t.length,a=0;a<s;a++){var u=t[a],h=4*a;i=-((r=a<t.length-1?t[a+1]:u).x-e.x),n=r.y-e.y;var l=10*(1-a/(s-1));l>1&&(l=1);var c=Math.sqrt(n*n+i*i),d=this._texture.height/2;n/=c,i/=c,n*=d,i*=d,o[h]=u.x+n,o[h+1]=u.y+i,o[h+2]=u.x-n,o[h+3]=u.y-i,e=u}},e.prototype.updateTransform=function(){this.autoUpdate&&this.refreshVertices(),this.containerUpdateTransform()},e}((n=i,n&&n.__esModule?n:{default:n}).default);r.default=o},{"./Mesh":166}],170:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../../core")),o=t("../Mesh"),s=(n=o,n&&n.__esModule?n:{default:n});var a=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.renderer=e}return t.prototype.render=function(t){var e=this.renderer,r=e.context,n=t.worldTransform,i=e.resolution;e.roundPixels?r.setTransform(n.a*i,n.b*i,n.c*i,n.d*i,n.tx*i|0,n.ty*i|0):r.setTransform(n.a*i,n.b*i,n.c*i,n.d*i,n.tx*i,n.ty*i),e.setBlendMode(t.blendMode),t.drawMode===s.default.DRAW_MODES.TRIANGLE_MESH?this._renderTriangleMesh(t):this._renderTriangles(t)},t.prototype._renderTriangleMesh=function(t){for(var e=t.vertices.length/2,r=0;r<e-2;r++){var n=2*r;this._renderDrawTriangle(t,n,n+2,n+4)}},t.prototype._renderTriangles=function(t){for(var e=t.indices,r=e.length,n=0;n<r;n+=3){var i=2*e[n],o=2*e[n+1],s=2*e[n+2];this._renderDrawTriangle(t,i,o,s)}},t.prototype._renderDrawTriangle=function(t,e,r,n){var i=this.renderer.context,o=t.uvs,s=t.vertices,a=t._texture;if(a.valid){var u=a.baseTexture,h=u.source,l=u.width,c=u.height,d=void 0,f=void 0,p=void 0,v=void 0,g=void 0,y=void 0;if(t.uploadUvTransform){var m=t._uvTransform.mapCoord;d=(o[e]*m.a+o[e+1]*m.c+m.tx)*u.width,f=(o[r]*m.a+o[r+1]*m.c+m.tx)*u.width,p=(o[n]*m.a+o[n+1]*m.c+m.tx)*u.width,v=(o[e]*m.b+o[e+1]*m.d+m.ty)*u.height,g=(o[r]*m.b+o[r+1]*m.d+m.ty)*u.height,y=(o[n]*m.b+o[n+1]*m.d+m.ty)*u.height}else d=o[e]*u.width,f=o[r]*u.width,p=o[n]*u.width,v=o[e+1]*u.height,g=o[r+1]*u.height,y=o[n+1]*u.height;var _=s[e],b=s[r],x=s[n],T=s[e+1],w=s[r+1],E=s[n+1];if(t.canvasPadding>0){var S=t.canvasPadding/t.worldTransform.a,O=t.canvasPadding/t.worldTransform.d,M=(_+b+x)/3,P=(T+w+E)/3,C=_-M,R=T-P,A=Math.sqrt(C*C+R*R);_=M+C/A*(A+S),T=P+R/A*(A+O),R=w-P,b=M+(C=b-M)/(A=Math.sqrt(C*C+R*R))*(A+S),w=P+R/A*(A+O),R=E-P,x=M+(C=x-M)/(A=Math.sqrt(C*C+R*R))*(A+S),E=P+R/A*(A+O)}i.save(),i.beginPath(),i.moveTo(_,T),i.lineTo(b,w),i.lineTo(x,E),i.closePath(),i.clip();var I=d*g+v*p+f*y-g*p-v*f-d*y,D=_*g+v*x+b*y-g*x-v*b-_*y,L=d*b+_*p+f*x-b*p-_*f-d*x,N=d*g*x+v*b*p+_*f*y-_*g*p-v*f*x-d*b*y,F=T*g+v*E+w*y-g*E-v*w-T*y,B=d*w+T*p+f*E-w*p-T*f-d*E,k=d*g*E+v*w*p+T*f*y-T*g*p-v*f*E-d*w*y;i.transform(D/I,F/I,L/I,B/I,N/I,k/I),i.drawImage(h,0,0,l*u.resolution,c*u.resolution,0,0,l,c),i.restore(),this.renderer.invalidateBlendMode()}},t.prototype.renderMeshFlat=function(t){var e=this.renderer.context,r=t.vertices,n=r.length/2;e.beginPath();for(var i=1;i<n-2;++i){var o=2*i,s=r[o],a=r[o+1],u=r[o+2],h=r[o+3],l=r[o+4],c=r[o+5];e.moveTo(s,a),e.lineTo(u,h),e.lineTo(l,c)}e.fillStyle="#FF0000",e.fill(),e.closePath()},t.prototype.destroy=function(){this.renderer=null},t}();r.default=a,i.CanvasRenderer.registerPlugin("mesh",a)},{"../../core":65,"../Mesh":166}],171:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("./Mesh");Object.defineProperty(r,"Mesh",{enumerable:!0,get:function(){return h(n).default}});var i=t("./webgl/MeshRenderer");Object.defineProperty(r,"MeshRenderer",{enumerable:!0,get:function(){return h(i).default}});var o=t("./canvas/CanvasMeshRenderer");Object.defineProperty(r,"CanvasMeshRenderer",{enumerable:!0,get:function(){return h(o).default}});var s=t("./Plane");Object.defineProperty(r,"Plane",{enumerable:!0,get:function(){return h(s).default}});var a=t("./NineSlicePlane");Object.defineProperty(r,"NineSlicePlane",{enumerable:!0,get:function(){return h(a).default}});var u=t("./Rope");Object.defineProperty(r,"Rope",{enumerable:!0,get:function(){return h(u).default}});function h(t){return t&&t.__esModule?t:{default:t}}},{"./Mesh":166,"./NineSlicePlane":167,"./Plane":168,"./Rope":169,"./canvas/CanvasMeshRenderer":170,"./webgl/MeshRenderer":172}],172:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../../core")),i=s(t("pixi-gl-core")),o=s(t("../Mesh"));t("path");function s(t){return t&&t.__esModule?t:{default:t}}var a=n.Matrix.IDENTITY,u=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.shader=null,n}return e.prototype.onContextChange=function(){var t=this.renderer.gl;this.shader=new n.Shader(t,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\nuniform vec4 uColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n    gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;\n}\n")},e.prototype.render=function(t){var e=this.renderer,r=e.gl,s=t._texture;if(s.valid){var u=t._glDatas[e.CONTEXT_UID];u||(e.bindVao(null),(u={shader:this.shader,vertexBuffer:i.default.GLBuffer.createVertexBuffer(r,t.vertices,r.STREAM_DRAW),uvBuffer:i.default.GLBuffer.createVertexBuffer(r,t.uvs,r.STREAM_DRAW),indexBuffer:i.default.GLBuffer.createIndexBuffer(r,t.indices,r.STATIC_DRAW),vao:null,dirty:t.dirty,indexDirty:t.indexDirty}).vao=new i.default.VertexArrayObject(r).addIndex(u.indexBuffer).addAttribute(u.vertexBuffer,u.shader.attributes.aVertexPosition,r.FLOAT,!1,8,0).addAttribute(u.uvBuffer,u.shader.attributes.aTextureCoord,r.FLOAT,!1,8,0),t._glDatas[e.CONTEXT_UID]=u),e.bindVao(u.vao),t.dirty!==u.dirty&&(u.dirty=t.dirty,u.uvBuffer.upload(t.uvs)),t.indexDirty!==u.indexDirty&&(u.indexDirty=t.indexDirty,u.indexBuffer.upload(t.indices)),u.vertexBuffer.upload(t.vertices),e.bindShader(u.shader),u.shader.uniforms.uSampler=e.bindTexture(s),e.state.setBlendMode(n.utils.correctBlendMode(t.blendMode,s.baseTexture.premultipliedAlpha)),u.shader.uniforms.uTransform&&(t.uploadUvTransform?u.shader.uniforms.uTransform=t._uvTransform.mapCoord.toArray(!0):u.shader.uniforms.uTransform=a.toArray(!0)),u.shader.uniforms.translationMatrix=t.worldTransform.toArray(!0),u.shader.uniforms.uColor=n.utils.premultiplyRgba(t.tintRgb,t.worldAlpha,u.shader.uniforms.uColor,s.baseTexture.premultipliedAlpha);var h=t.drawMode===o.default.DRAW_MODES.TRIANGLE_MESH?r.TRIANGLE_STRIP:r.TRIANGLES;u.vao.draw(h,t.indices.length,0)}},e}(n.ObjectRenderer);r.default=u,n.WebGLRenderer.registerPlugin("mesh",u)},{"../../core":65,"../Mesh":166,path:8,"pixi-gl-core":15}],173:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../core")),o=t("../core/utils");var s=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1500,n=arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16384,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return o>16384&&(o=16384),o>r&&(o=r),a._properties=[!1,!0,!1,!1,!1],a._maxSize=r,a._batchSize=o,a._glBuffers={},a._bufferToUpdate=0,a.interactiveChildren=!1,a.blendMode=i.BLEND_MODES.NORMAL,a.autoResize=s,a.roundPixels=!0,a.baseTexture=null,a.setProperties(n),a._tint=0,a.tintRgb=new Float32Array(4),a.tint=16777215,a}return e.prototype.setProperties=function(t){t&&(this._properties[0]="scale"in t?!!t.scale:this._properties[0],this._properties[1]="position"in t?!!t.position:this._properties[1],this._properties[2]="rotation"in t?!!t.rotation:this._properties[2],this._properties[3]="uvs"in t?!!t.uvs:this._properties[3],this._properties[4]="alpha"in t||"tint"in t?!!t.alpha||!!t.tint:this._properties[4])},e.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},e.prototype.renderWebGL=function(t){var e=this;this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.hasLoaded||this.baseTexture.once("update",function(){return e.onChildrenChange(0)})),t.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},e.prototype.onChildrenChange=function(t){var e=Math.floor(t/this._batchSize);e<this._bufferToUpdate&&(this._bufferToUpdate=e)},e.prototype.renderCanvas=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable){var e=t.context,r=this.worldTransform,n=!0,i=0,o=0,s=0,a=0;t.setBlendMode(this.blendMode),e.globalAlpha=this.worldAlpha,this.displayObjectUpdateTransform();for(var u=0;u<this.children.length;++u){var h=this.children[u];if(h.visible){var l=h._texture.frame;if(e.globalAlpha=this.worldAlpha*h.alpha,h.rotation%(2*Math.PI)==0)n&&(e.setTransform(r.a,r.b,r.c,r.d,r.tx*t.resolution,r.ty*t.resolution),n=!1),i=h.anchor.x*(-l.width*h.scale.x)+h.position.x+.5,o=h.anchor.y*(-l.height*h.scale.y)+h.position.y+.5,s=l.width*h.scale.x,a=l.height*h.scale.y;else{n||(n=!0),h.displayObjectUpdateTransform();var c=h.worldTransform;t.roundPixels?e.setTransform(c.a,c.b,c.c,c.d,c.tx*t.resolution|0,c.ty*t.resolution|0):e.setTransform(c.a,c.b,c.c,c.d,c.tx*t.resolution,c.ty*t.resolution),i=h.anchor.x*-l.width+.5,o=h.anchor.y*-l.height+.5,s=l.width,a=l.height}var d=h._texture.baseTexture.resolution;e.drawImage(h._texture.baseTexture.source,l.x*d,l.y*d,l.width*d,l.height*d,i*t.resolution,o*t.resolution,s*t.resolution,a*t.resolution)}}}},e.prototype.destroy=function(e){if(t.prototype.destroy.call(this,e),this._buffers)for(var r=0;r<this._buffers.length;++r)this._buffers[r].destroy();this._properties=null,this._buffers=null},n(e,[{key:"tint",get:function(){return this._tint},set:function(t){this._tint=t,(0,o.hex2rgb)(t,this.tintRgb)}}]),e}(i.Container);r.default=s},{"../core":65,"../core/utils":125}],174:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("./ParticleContainer");Object.defineProperty(r,"ParticleContainer",{enumerable:!0,get:function(){return o(n).default}});var i=t("./webgl/ParticleRenderer");Object.defineProperty(r,"ParticleRenderer",{enumerable:!0,get:function(){return o(i).default}});function o(t){return t&&t.__esModule?t:{default:t}}},{"./ParticleContainer":173,"./webgl/ParticleRenderer":176}],175:[function(t,e,r){"use strict";r.__esModule=!0;var n=o(t("pixi-gl-core")),i=o(t("../../core/utils/createIndicesForQuads"));function o(t){return t&&t.__esModule?t:{default:t}}var s=function(){function t(e,r,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.gl=e,this.size=i,this.dynamicProperties=[],this.staticProperties=[];for(var o=0;o<r.length;++o){var s=r[o];s={attribute:s.attribute,size:s.size,uploadFunction:s.uploadFunction,unsignedByte:s.unsignedByte,offset:s.offset},n[o]?this.dynamicProperties.push(s):this.staticProperties.push(s)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.initBuffers()}return t.prototype.initBuffers=function(){var t=this.gl,e=0;this.indices=(0,i.default)(this.size),this.indexBuffer=n.default.GLBuffer.createIndexBuffer(t,this.indices,t.STATIC_DRAW),this.dynamicStride=0;for(var r=0;r<this.dynamicProperties.length;++r){var o=this.dynamicProperties[r];o.offset=e,e+=o.size,this.dynamicStride+=o.size}var s=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(s),this.dynamicDataUint32=new Uint32Array(s),this.dynamicBuffer=n.default.GLBuffer.createVertexBuffer(t,s,t.STREAM_DRAW);var a=0;this.staticStride=0;for(var u=0;u<this.staticProperties.length;++u){var h=this.staticProperties[u];h.offset=a,a+=h.size,this.staticStride+=h.size}var l=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(l),this.staticDataUint32=new Uint32Array(l),this.staticBuffer=n.default.GLBuffer.createVertexBuffer(t,l,t.STATIC_DRAW),this.vao=new n.default.VertexArrayObject(t).addIndex(this.indexBuffer);for(var c=0;c<this.dynamicProperties.length;++c){var d=this.dynamicProperties[c];d.unsignedByte?this.vao.addAttribute(this.dynamicBuffer,d.attribute,t.UNSIGNED_BYTE,!0,4*this.dynamicStride,4*d.offset):this.vao.addAttribute(this.dynamicBuffer,d.attribute,t.FLOAT,!1,4*this.dynamicStride,4*d.offset)}for(var f=0;f<this.staticProperties.length;++f){var p=this.staticProperties[f];p.unsignedByte?this.vao.addAttribute(this.staticBuffer,p.attribute,t.UNSIGNED_BYTE,!0,4*this.staticStride,4*p.offset):this.vao.addAttribute(this.staticBuffer,p.attribute,t.FLOAT,!1,4*this.staticStride,4*p.offset)}},t.prototype.uploadDynamic=function(t,e,r){for(var n=0;n<this.dynamicProperties.length;n++){var i=this.dynamicProperties[n];i.uploadFunction(t,e,r,i.unsignedByte?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,i.offset)}this.dynamicBuffer.upload()},t.prototype.uploadStatic=function(t,e,r){for(var n=0;n<this.staticProperties.length;n++){var i=this.staticProperties[n];i.uploadFunction(t,e,r,i.unsignedByte?this.staticDataUint32:this.staticData,this.staticStride,i.offset)}this.staticBuffer.upload()},t.prototype.destroy=function(){this.dynamicProperties=null,this.dynamicBuffer.destroy(),this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer.destroy(),this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null},t}();r.default=s},{"../../core/utils/createIndicesForQuads":123,"pixi-gl-core":15}],176:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../../core")),i=a(t("./ParticleShader")),o=a(t("./ParticleBuffer")),s=t("../../core/utils");function a(t){return t&&t.__esModule?t:{default:t}}var u=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return i.shader=null,i.indexBuffer=null,i.properties=null,i.tempMatrix=new n.Matrix,i.CONTEXT_UID=0,i}return e.prototype.onContextChange=function(){var t=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.shader=new i.default(t),this.properties=[{attribute:this.shader.attributes.aVertexPosition,size:2,uploadFunction:this.uploadVertices,offset:0},{attribute:this.shader.attributes.aPositionCoord,size:2,uploadFunction:this.uploadPosition,offset:0},{attribute:this.shader.attributes.aRotation,size:1,uploadFunction:this.uploadRotation,offset:0},{attribute:this.shader.attributes.aTextureCoord,size:2,uploadFunction:this.uploadUvs,offset:0},{attribute:this.shader.attributes.aColor,size:1,unsignedByte:!0,uploadFunction:this.uploadTint,offset:0}]},e.prototype.start=function(){this.renderer.bindShader(this.shader)},e.prototype.render=function(t){var e=t.children,r=t._maxSize,i=t._batchSize,o=this.renderer,s=e.length;if(0!==s){s>r&&(s=r);var a=t._glBuffers[o.CONTEXT_UID];a||(a=t._glBuffers[o.CONTEXT_UID]=this.generateBuffers(t));var u=e[0]._texture.baseTexture;this.renderer.setBlendMode(n.utils.correctBlendMode(t.blendMode,u.premultipliedAlpha));var h=o.gl,l=t.worldTransform.copy(this.tempMatrix);l.prepend(o._activeRenderTarget.projectionMatrix),this.shader.uniforms.projectionMatrix=l.toArray(!0),this.shader.uniforms.uColor=n.utils.premultiplyRgba(t.tintRgb,t.worldAlpha,this.shader.uniforms.uColor,u.premultipliedAlpha),this.shader.uniforms.uSampler=o.bindTexture(u);for(var c=0,d=0;c<s;c+=i,d+=1){var f=s-c;if(f>i&&(f=i),d>=a.length){if(!t.autoResize)break;a.push(this._generateOneMoreBuffer(t))}var p=a[d];p.uploadDynamic(e,c,f),t._bufferToUpdate===d&&(p.uploadStatic(e,c,f),t._bufferToUpdate=d+1),o.bindVao(p.vao),p.vao.draw(h.TRIANGLES,6*f)}}},e.prototype.generateBuffers=function(t){for(var e=this.renderer.gl,r=[],n=t._maxSize,i=t._batchSize,s=t._properties,a=0;a<n;a+=i)r.push(new o.default(e,this.properties,s,i));return r},e.prototype._generateOneMoreBuffer=function(t){var e=this.renderer.gl,r=t._batchSize,n=t._properties;return new o.default(e,this.properties,n,r)},e.prototype.uploadVertices=function(t,e,r,n,i,o){for(var s=0,a=0,u=0,h=0,l=0;l<r;++l){var c=t[e+l],d=c._texture,f=c.scale.x,p=c.scale.y,v=d.trim,g=d.orig;v?(s=(a=v.x-c.anchor.x*g.width)+v.width,u=(h=v.y-c.anchor.y*g.height)+v.height):(s=g.width*(1-c.anchor.x),a=g.width*-c.anchor.x,u=g.height*(1-c.anchor.y),h=g.height*-c.anchor.y),n[o]=a*f,n[o+1]=h*p,n[o+i]=s*f,n[o+i+1]=h*p,n[o+2*i]=s*f,n[o+2*i+1]=u*p,n[o+3*i]=a*f,n[o+3*i+1]=u*p,o+=4*i}},e.prototype.uploadPosition=function(t,e,r,n,i,o){for(var s=0;s<r;s++){var a=t[e+s].position;n[o]=a.x,n[o+1]=a.y,n[o+i]=a.x,n[o+i+1]=a.y,n[o+2*i]=a.x,n[o+2*i+1]=a.y,n[o+3*i]=a.x,n[o+3*i+1]=a.y,o+=4*i}},e.prototype.uploadRotation=function(t,e,r,n,i,o){for(var s=0;s<r;s++){var a=t[e+s].rotation;n[o]=a,n[o+i]=a,n[o+2*i]=a,n[o+3*i]=a,o+=4*i}},e.prototype.uploadUvs=function(t,e,r,n,i,o){for(var s=0;s<r;++s){var a=t[e+s]._texture._uvs;a?(n[o]=a.x0,n[o+1]=a.y0,n[o+i]=a.x1,n[o+i+1]=a.y1,n[o+2*i]=a.x2,n[o+2*i+1]=a.y2,n[o+3*i]=a.x3,n[o+3*i+1]=a.y3,o+=4*i):(n[o]=0,n[o+1]=0,n[o+i]=0,n[o+i+1]=0,n[o+2*i]=0,n[o+2*i+1]=0,n[o+3*i]=0,n[o+3*i+1]=0,o+=4*i)}},e.prototype.uploadTint=function(t,e,r,n,i,o){for(var a=0;a<r;++a){var u=t[e+a],h=u._texture.baseTexture.premultipliedAlpha,l=u.alpha,c=l<1&&h?(0,s.premultiplyTint)(u._tintRGB,l):u._tintRGB+(255*l<<24);n[o]=c,n[o+i]=c,n[o+2*i]=c,n[o+3*i]=c,o+=4*i}},e.prototype.destroy=function(){this.renderer.gl&&this.renderer.gl.deleteBuffer(this.indexBuffer),t.prototype.destroy.call(this),this.shader.destroy(),this.indices=null,this.tempMatrix=null},e}(n.ObjectRenderer);r.default=u,n.WebGLRenderer.registerPlugin("particle",u)},{"../../core":65,"../../core/utils":125,"./ParticleBuffer":175,"./ParticleShader":177}],177:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=t("../../core/Shader");var o=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","attribute vec4 aColor;","attribute vec2 aPositionCoord;","attribute vec2 aScale;","attribute float aRotation;","uniform mat3 projectionMatrix;","uniform vec4 uColor;","varying vec2 vTextureCoord;","varying vec4 vColor;","void main(void){","   float x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);","   float y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);","   vec2 v = vec2(x, y);","   v = v + aPositionCoord;","   gl_Position = vec4((projectionMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);","   vTextureCoord = aTextureCoord;","   vColor = aColor * uColor;","}"].join("\n"),["varying vec2 vTextureCoord;","varying vec4 vColor;","uniform sampler2D uSampler;","void main(void){","  vec4 color = texture2D(uSampler, vTextureCoord) * vColor;","  gl_FragColor = color;","}"].join("\n")))}return e}((n=i,n&&n.__esModule?n:{default:n}).default);r.default=o},{"../../core/Shader":44}],178:[function(t,e,r){"use strict";Math.sign||(Math.sign=function(t){return 0===(t=Number(t))||isNaN(t)?t:t>0?1:-1})},{}],179:[function(t,e,r){"use strict";var n,i=t("object-assign"),o=(n=i,n&&n.__esModule?n:{default:n});Object.assign||(Object.assign=o.default)},{"object-assign":6}],180:[function(t,e,r){"use strict";t("./Object.assign"),t("./requestAnimationFrame"),t("./Math.sign"),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array)},{"./Math.sign":178,"./Object.assign":179,"./requestAnimationFrame":181}],181:[function(t,e,r){(function(t){"use strict";if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!t.performance||!t.performance.now){var e=Date.now();t.performance||(t.performance={}),t.performance.now=function(){return Date.now()-e}}for(var r=Date.now(),n=["ms","moz","webkit","o"],i=0;i<n.length&&!t.requestAnimationFrame;++i){var o=n[i];t.requestAnimationFrame=t[o+"RequestAnimationFrame"],t.cancelAnimationFrame=t[o+"CancelAnimationFrame"]||t[o+"CancelRequestAnimationFrame"]}t.requestAnimationFrame||(t.requestAnimationFrame=function(t){if("function"!=typeof t)throw new TypeError(t+"is not a function");var e=Date.now(),n=16+r-e;return n<0&&(n=0),r=e,setTimeout(function(){r=Date.now(),t(performance.now())},n)}),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(t){return clearTimeout(t)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],182:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../core")),o=t("./limiters/CountLimiter"),s=(n=o,n&&n.__esModule?n:{default:n});var a=i.ticker.shared;i.settings.UPLOADS_PER_FRAME=4;var u=function(){function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.limiter=new s.default(i.settings.UPLOADS_PER_FRAME),this.renderer=e,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=function(){r.queue&&r.prepareItems()},this.registerFindHook(p),this.registerFindHook(v),this.registerFindHook(h),this.registerFindHook(l),this.registerFindHook(c),this.registerUploadHook(d),this.registerUploadHook(f)}return t.prototype.upload=function(t,e){"function"==typeof t&&(e=t,t=null),t&&this.add(t),this.queue.length?(e&&this.completes.push(e),this.ticking||(this.ticking=!0,a.addOnce(this.tick,this,i.UPDATE_PRIORITY.UTILITY))):e&&e()},t.prototype.tick=function(){setTimeout(this.delayedTick,0)},t.prototype.prepareItems=function(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){var t=this.queue[0],e=!1;if(t&&!t._destroyed)for(var r=0,n=this.uploadHooks.length;r<n;r++)if(this.uploadHooks[r](this.uploadHookHelper,t)){this.queue.shift(),e=!0;break}e||this.queue.shift()}if(this.queue.length)a.addOnce(this.tick,this,i.UPDATE_PRIORITY.UTILITY);else{this.ticking=!1;var o=this.completes.slice(0);this.completes.length=0;for(var s=0,u=o.length;s<u;s++)o[s]()}},t.prototype.registerFindHook=function(t){return t&&this.addHooks.push(t),this},t.prototype.registerUploadHook=function(t){return t&&this.uploadHooks.push(t),this},t.prototype.add=function(t){for(var e=0,r=this.addHooks.length;e<r&&!this.addHooks[e](t,this.queue);e++);if(t instanceof i.Container)for(var n=t.children.length-1;n>=0;n--)this.add(t.children[n]);return this},t.prototype.destroy=function(){this.ticking&&a.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null},t}();r.default=u;function h(t,e){var r=!1;if(t&&t._textures&&t._textures.length)for(var n=0;n<t._textures.length;n++)if(t._textures[n]instanceof i.Texture){var o=t._textures[n].baseTexture;-1===e.indexOf(o)&&(e.push(o),r=!0)}return r}function l(t,e){return t instanceof i.BaseTexture&&(-1===e.indexOf(t)&&e.push(t),!0)}function c(t,e){if(t._texture&&t._texture instanceof i.Texture){var r=t._texture.baseTexture;return-1===e.indexOf(r)&&e.push(r),!0}return!1}function d(t,e){return e instanceof i.Text&&(e.updateText(!0),!0)}function f(t,e){if(e instanceof i.TextStyle){var r=e.toFontString();return i.TextMetrics.measureFont(r),!0}return!1}function p(t,e){if(t instanceof i.Text){-1===e.indexOf(t.style)&&e.push(t.style),-1===e.indexOf(t)&&e.push(t);var r=t._texture.baseTexture;return-1===e.indexOf(r)&&e.push(r),!0}return!1}function v(t,e){return t instanceof i.TextStyle&&(-1===e.indexOf(t)&&e.push(t),!0)}},{"../core":65,"./limiters/CountLimiter":185}],183:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../../core")),o=t("../BasePrepare");var s=16,a=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.uploadHookHelper=n,n.canvas=document.createElement("canvas"),n.canvas.width=s,n.canvas.height=s,n.ctx=n.canvas.getContext("2d"),n.registerUploadHook(u),n}return e.prototype.destroy=function(){t.prototype.destroy.call(this),this.ctx=null,this.canvas=null},e}((n=o,n&&n.__esModule?n:{default:n}).default);r.default=a;function u(t,e){if(e instanceof i.BaseTexture){var r=e.source,n=0===r.width?t.canvas.width:Math.min(t.canvas.width,r.width),o=0===r.height?t.canvas.height:Math.min(t.canvas.height,r.height);return t.ctx.drawImage(r,0,0,n,o,0,0,t.canvas.width,t.canvas.height),!0}return!1}i.CanvasRenderer.registerPlugin("prepare",a)},{"../../core":65,"../BasePrepare":182}],184:[function(t,e,r){"use strict";r.__esModule=!0;var n=t("./webgl/WebGLPrepare");Object.defineProperty(r,"webgl",{enumerable:!0,get:function(){return u(n).default}});var i=t("./canvas/CanvasPrepare");Object.defineProperty(r,"canvas",{enumerable:!0,get:function(){return u(i).default}});var o=t("./BasePrepare");Object.defineProperty(r,"BasePrepare",{enumerable:!0,get:function(){return u(o).default}});var s=t("./limiters/CountLimiter");Object.defineProperty(r,"CountLimiter",{enumerable:!0,get:function(){return u(s).default}});var a=t("./limiters/TimeLimiter");Object.defineProperty(r,"TimeLimiter",{enumerable:!0,get:function(){return u(a).default}});function u(t){return t&&t.__esModule?t:{default:t}}},{"./BasePrepare":182,"./canvas/CanvasPrepare":183,"./limiters/CountLimiter":185,"./limiters/TimeLimiter":186,"./webgl/WebGLPrepare":187}],185:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.maxItemsPerFrame=e,this.itemsLeft=0}return t.prototype.beginFrame=function(){this.itemsLeft=this.maxItemsPerFrame},t.prototype.allowedToUpload=function(){return this.itemsLeft-- >0},t}();r.default=n},{}],186:[function(t,e,r){"use strict";r.__esModule=!0;var n=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.maxMilliseconds=e,this.frameStart=0}return t.prototype.beginFrame=function(){this.frameStart=Date.now()},t.prototype.allowedToUpload=function(){return Date.now()-this.frameStart<this.maxMilliseconds},t}();r.default=n},{}],187:[function(t,e,r){"use strict";r.__esModule=!0;var n,i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../../core")),o=t("../BasePrepare");var s=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t);function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r));return n.uploadHookHelper=n.renderer,n.registerFindHook(h),n.registerUploadHook(a),n.registerUploadHook(u),n}return e}((n=o,n&&n.__esModule?n:{default:n}).default);r.default=s;function a(t,e){return e instanceof i.BaseTexture&&(e._glTextures[t.CONTEXT_UID]||t.textureManager.updateTexture(e),!0)}function u(t,e){return e instanceof i.Graphics&&((e.dirty||e.clearDirty||!e._webGL[t.plugins.graphics.CONTEXT_UID])&&t.plugins.graphics.updateGraphics(e),!0)}function h(t,e){return t instanceof i.Graphics&&(e.push(t),!0)}i.WebGLRenderer.registerPlugin("prepare",s)},{"../../core":65,"../BasePrepare":182}],188:[function(t,e,r){(function(e){"use strict";r.__esModule=!0,r.loader=r.prepare=r.particles=r.mesh=r.loaders=r.interaction=r.filters=r.extras=r.extract=r.accessibility=void 0;var n=t("./polyfill");Object.keys(n).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(r,t,{enumerable:!0,get:function(){return n[t]}})});var i=t("./core");Object.keys(i).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(r,t,{enumerable:!0,get:function(){return i[t]}})});var o,s=t("./deprecation"),a=(o=s,o&&o.__esModule?o:{default:o}),u=y(t("./accessibility")),h=y(t("./extract")),l=y(t("./extras")),c=y(t("./filters")),d=y(t("./interaction")),f=y(t("./loaders")),p=y(t("./mesh")),v=y(t("./particles")),g=y(t("./prepare"));function y(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}i.utils.mixins.performMixins();var m=f.shared||null;r.accessibility=u,r.extract=h,r.extras=l,r.filters=c,r.interaction=d,r.loaders=f,r.mesh=p,r.particles=v,r.prepare=g,r.loader=m,"function"==typeof a.default&&(0,a.default)(r),e.PIXI=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./accessibility":42,"./core":65,"./deprecation":131,"./extract":133,"./extras":141,"./filters":153,"./interaction":159,"./loaders":162,"./mesh":171,"./particles":174,"./polyfill":180,"./prepare":184}]},{},[188])(188)});


// PIXI Spine
!function t(e,n,i){function a(o,s){if(!n[o]){if(!e[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(r)return r(o,!0);var h=new Error("Cannot find module '"+o+"'");throw h.code="MODULE_NOT_FOUND",h}var m=n[o]={exports:{}};e[o][0].call(m.exports,function(t){var n=e[o][1][t];return a(n?n:t)},m,m.exports,t,e,n,i)}return n[o].exports}for(var r="function"==typeof require&&require,o=0;o<i.length;o++)a(i[o]);return a}({1:[function(t,e,n){e.exports=PIXI.spine={Spine:t("./Spine"),SpineRuntime:t("./SpineRuntime"),loaders:t("./loaders")}},{"./Spine":43,"./SpineRuntime":41,"./loaders":47}],2:[function(t,e,n){var i=t("../SpineUtil");i.Animation=function(t,e,n){this.name=t,this.timelines=e,this.duration=n},i.Animation.prototype={apply:function(t,e,n,i,a){i&&0!=this.duration&&(n%=this.duration,e%=this.duration);for(var r=this.timelines,o=0,s=r.length;s>o;o++)r[o].apply(t,e,n,a,1)},mix:function(t,e,n,i,a,r){i&&0!=this.duration&&(n%=this.duration,e%=this.duration);for(var o=this.timelines,s=0,l=o.length;l>s;s++)o[s].apply(t,e,n,a,r)}},i.Animation.binarySearch=function(t,e,n){var i=0,a=Math.floor(t.length/n)-2;if(!a)return n;for(var r=a>>>1;;){if(t[(r+1)*n]<=e?i=r+1:a=r,i==a)return(i+1)*n;r=i+a>>>1}},i.Animation.binarySearch1=function(t,e){var n=0,i=t.length-2;if(!i)return 1;for(var a=i>>>1;;){if(t[a+1]<=e?n=a+1:i=a,n==i)return n+1;a=n+i>>>1}},i.Animation.linearSearch=function(t,e,n){for(var i=0,a=t.length-n;a>=i;i+=n)if(t[i]>e)return i;return-1},e.exports=i.Animation},{"../SpineUtil":42}],3:[function(t,e,n){var i=t("../SpineUtil");i.TrackEntry=t("./TrackEntry"),i.AnimationState=function(t){this.data=t,this.tracks=[],this.events=[]},i.AnimationState.prototype={onStart:null,onEnd:null,onComplete:null,onEvent:null,timeScale:1,update:function(t){t*=this.timeScale;for(var e=0;e<this.tracks.length;e++){var n=this.tracks[e];if(n){if(n.time+=t*n.timeScale,n.previous){var i=t*n.previous.timeScale;n.previous.time+=i,n.mixTime+=i}var a=n.next;a?(a.time=n.lastTime-a.delay,a.time>=0&&this.setCurrent(e,a)):!n.loop&&n.lastTime>=n.endTime&&this.clearTrack(e)}}},apply:function(t){/*t.resetDrawOrder();*/for(var e=0;e<this.tracks.length;e++){var n=this.tracks[e];if(n){this.events.length=0;var i=n.time,a=n.lastTime,r=n.endTime,o=n.loop;!o&&i>r&&(i=r);var s=n.previous;if(s){var l=s.time;!s.loop&&l>s.endTime&&(l=s.endTime),s.animation.apply(t,l,l,s.loop,null);var h=n.mixTime/n.mixDuration*n.mix;h>=1&&(h=1,n.previous=null),n.animation.mix(t,n.lastTime,i,o,this.events,h)}else 1==n.mix?n.animation.apply(t,n.lastTime,i,o,this.events):n.animation.mix(t,n.lastTime,i,o,this.events,n.mix);for(var m=0,u=this.events.length;u>m;m++){var f=this.events[m];n.onEvent&&n.onEvent(e,f),this.onEvent&&this.onEvent(e,f)}if(o?a%r>i%r:r>a&&i>=r){var c=Math.floor(i/r);n.onComplete&&n.onComplete(e,c),this.onComplete&&this.onComplete(e,c)}n.lastTime=n.time}}},clearTracks:function(){for(var t=0,e=this.tracks.length;e>t;t++)this.clearTrack(t);this.tracks.length=0},clearTrack:function(t){if(!(t>=this.tracks.length)){var e=this.tracks[t];e&&(e.onEnd&&e.onEnd(t),this.onEnd&&this.onEnd(t),this.tracks[t]=null)}},_expandToIndex:function(t){if(t<this.tracks.length)return this.tracks[t];for(;t>=this.tracks.length;)this.tracks.push(null);return null},setCurrent:function(t,e){var n=this._expandToIndex(t);if(n){var i=n.previous;n.previous=null,n.onEnd&&n.onEnd(t),this.onEnd&&this.onEnd(t),e.mixDuration=this.data.getMix(n.animation,e.animation),e.mixDuration>0&&(e.mixTime=0,i&&n.mixTime/n.mixDuration<.5?e.previous=i:e.previous=n)}this.tracks[t]=e,e.onStart&&e.onStart(t),this.onStart&&this.onStart(t)},setAnimationByName:function(t,e,n){var i=this.data.skeletonData.findAnimation(e);if(!i)throw"Animation not found: "+e;return this.setAnimation(t,i,n)},setAnimation:function(t,e,n){var a=new i.TrackEntry;return a.animation=e,a.loop=n,a.endTime=e.duration,this.setCurrent(t,a),a},addAnimationByName:function(t,e,n,i){var a=this.data.skeletonData.findAnimation(e);if(!a)throw"Animation not found: "+e;return this.addAnimation(t,a,n,i)},addAnimation:function(t,e,n,a){var r=new i.TrackEntry;r.animation=e,r.loop=n,r.endTime=e.duration;var o=this._expandToIndex(t);if(o){for(;o.next;)o=o.next;o.next=r}else this.tracks[t]=r;return 0>=a&&(o?a+=o.endTime-this.data.getMix(o.animation,e):a=0),r.delay=a,r},getCurrent:function(t){return t>=this.tracks.length?null:this.tracks[t]}},e.exports=i.AnimationState},{"../SpineUtil":42,"./TrackEntry":39}],4:[function(t,e,n){var i=t("../SpineUtil");i.AnimationStateData=function(t){this.skeletonData=t,this.animationToMixTime={}},i.AnimationStateData.prototype={defaultMix:0,setMixByName:function(t,e,n){var i=this.skeletonData.findAnimation(t);if(!i)throw"Animation not found: "+t;var a=this.skeletonData.findAnimation(e);if(!a)throw"Animation not found: "+e;this.setMix(i,a,n)},setMix:function(t,e,n){this.animationToMixTime[t.name+":"+e.name]=n},getMix:function(t,e){var n=t.name+":"+e.name;return this.animationToMixTime.hasOwnProperty(n)?this.animationToMixTime[n]:this.defaultMix}},e.exports=i.AnimationStateData},{"../SpineUtil":42}],5:[function(t,e,n){var i=t("../SpineUtil");i.AtlasReader=t("./AtlasReader"),i.AtlasPage=t("./AtlasPage"),i.AtlasRegion=t("./AtlasRegion");var a=t("../loaders/syncImageLoaderAdapter.js");i.Atlas=function(t,e,n){function r(){for(;;){var t=h.readLine();var orig=t;if(null===t)return n&&n(l);if(t=h.trim(t),t.length){t=orig;if(!u){u=new i.AtlasPage,u.name=t,2==h.readTuple(m)&&(u.width=parseInt(m[0]),u.height=parseInt(m[1]),h.readTuple(m)),u.format=i.Atlas.Format[m[0]],h.readTuple(m),u.minFilter=i.Atlas.TextureFilter[m[0]],u.magFilter=i.Atlas.TextureFilter[m[1]];var a=h.readValue();u.uWrap=i.Atlas.TextureWrap.clampToEdge,u.vWrap=i.Atlas.TextureWrap.clampToEdge,"x"==a?u.uWrap=i.Atlas.TextureWrap.repeat:"y"==a?u.vWrap=i.Atlas.TextureWrap.repeat:"xy"==a&&(u.uWrap=u.vWrap=i.Atlas.TextureWrap.repeat),e(t,function(t){u.rendererObject=t,l.pages.push(u),u.width&&u.height||(u.width=t.width,u.height=t.height,u.width&&u.height||console.log("ERROR spine atlas page "+u.name+": meshes wont work if you dont specify size in atlas (http://www.html5gamedevs.com/topic/18888-pixi-spines-and-meshes/?p=107121)")),r()});break}var o=new i.AtlasRegion;o.name=t,o.page=u,o.rotate="true"==h.readValue(),h.readTuple(m);var s=parseInt(m[0]),f=parseInt(m[1]);h.readTuple(m);var c=parseInt(m[0]),p=parseInt(m[1]);o.u=s/u.width,o.v=f/u.height,o.rotate?(o.u2=(s+p)/u.width,o.v2=(f+c)/u.height):(o.u2=(s+c)/u.width,o.v2=(f+p)/u.height);var d=u.rendererObject.resolution;o.x=s/d,o.y=f/d,o.width=Math.abs(c)/d,o.height=Math.abs(p)/d,4==h.readTuple(m)&&(o.splits=[parseInt(m[0]),parseInt(m[1]),parseInt(m[2]),parseInt(m[3])],4==h.readTuple(m)&&(o.pads=[parseInt(m[0]),parseInt(m[1]),parseInt(m[2]),parseInt(m[3])],h.readTuple(m))),o.originalWidth=parseInt(m[0])/d,o.originalHeight=parseInt(m[1])/d,h.readTuple(m),o.offsetX=parseInt(m[0])/d,o.offsetY=parseInt(m[1])/d,o.index=parseInt(h.readValue()),l.regions.push(o)}else u=null}}if("function"!=typeof e){var o=e,s=n;e=a(o,s),n=null}this.pages=[],this.regions=[],this.texturesLoading=0;var l=this,h=new i.AtlasReader(t),m=[];m.length=4;var u=null;r()},i.Atlas.prototype={findRegion:function(t){for(var e=this.regions,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null},dispose:function(){for(var t=this.pages,e=0,n=t.length;n>e;e++)t[e].rendererObject.destroy(!0)},updateUVs:function(t){for(var e=this.regions,n=0,i=e.length;i>n;n++){var a=e[n];a.page==t&&(a.u=a.x/t.width,a.v=a.y/t.height,a.rotate?(a.u2=(a.x+a.height)/t.width,a.v2=(a.y+a.width)/t.height):(a.u2=(a.x+a.width)/t.width,a.v2=(a.y+a.height)/t.height))}}},i.Atlas.Format={alpha:0,intensity:1,luminanceAlpha:2,rgb565:3,rgba4444:4,rgb888:5,rgba8888:6},i.Atlas.TextureFilter={nearest:0,linear:1,mipMap:2,mipMapNearestNearest:3,mipMapLinearNearest:4,mipMapNearestLinear:5,mipMapLinearLinear:6},i.Atlas.TextureWrap={mirroredRepeat:0,clampToEdge:1,repeat:2},e.exports=i.Atlas},{"../SpineUtil":42,"../loaders/syncImageLoaderAdapter.js":48,"./AtlasPage":7,"./AtlasReader":8,"./AtlasRegion":9}],6:[function(t,e,n){var i=t("../SpineUtil");i.RegionAttachment=t("./RegionAttachment"),i.MeshAttachment=t("./MeshAttachment"),i.SkinnedMeshAttachment=t("./SkinnedMeshAttachment"),i.BoundingBoxAttachment=t("./BoundingBoxAttachment"),i.AtlasAttachmentParser=function(t){this.atlas=t},i.AtlasAttachmentParser.prototype={newRegionAttachment:function(t,e,n){var a=this.atlas.findRegion(n);if(!a)throw"Region not found in atlas: "+n+" (region attachment: "+e+")";var r=new i.RegionAttachment(e);return r.rendererObject=a,r.setUVs(a.u,a.v,a.u2,a.v2,a.rotate),r.regionOffsetX=a.offsetX,r.regionOffsetY=a.offsetY,r.regionWidth=a.width,r.regionHeight=a.height,r.regionOriginalWidth=a.originalWidth,r.regionOriginalHeight=a.originalHeight,r},newMeshAttachment:function(t,e,n){var a=this.atlas.findRegion(n);if(!a)throw"Region not found in atlas: "+n+" (mesh attachment: "+e+")";var r=new i.MeshAttachment(e);return r.rendererObject=a,r.regionU=a.u,r.regionV=a.v,r.regionU2=a.u2,r.regionV2=a.v2,r.regionRotate=a.rotate,r.regionOffsetX=a.offsetX,r.regionOffsetY=a.offsetY,r.regionWidth=a.width,r.regionHeight=a.height,r.regionOriginalWidth=a.originalWidth,r.regionOriginalHeight=a.originalHeight,r},newSkinnedMeshAttachment:function(t,e,n){var a=this.atlas.findRegion(n);if(!a)throw"Region not found in atlas: "+n+" (skinned mesh attachment: "+e+")";var r=new i.SkinnedMeshAttachment(e);return r.rendererObject=a,r.regionU=a.u,r.regionV=a.v,r.regionU2=a.u2,r.regionV2=a.v2,r.regionRotate=a.rotate,r.regionOffsetX=a.offsetX,r.regionOffsetY=a.offsetY,r.regionWidth=a.width,r.regionHeight=a.height,r.regionOriginalWidth=a.originalWidth,r.regionOriginalHeight=a.originalHeight,r},newBoundingBoxAttachment:function(t,e){return new i.BoundingBoxAttachment(e)}},e.exports=i.AtlasAttachmentParser},{"../SpineUtil":42,"./BoundingBoxAttachment":14,"./MeshAttachment":27,"./RegionAttachment":28,"./SkinnedMeshAttachment":36}],7:[function(t,e,n){var i=t("../SpineUtil");i.AtlasPage=function(){},i.AtlasPage.prototype={name:null,format:null,minFilter:null,magFilter:null,uWrap:null,vWrap:null,rendererObject:null,width:0,height:0},e.exports=i.AtlasPage},{"../SpineUtil":42}],8:[function(t,e,n){var i=t("../SpineUtil");i.AtlasReader=function(t){this.lines=t.split(/\r\n|\r|\n/)},i.AtlasReader.prototype={index:0,trim:function(t){return t.replace(/^\s+|\s+$/g,"")},readLine:function(){return this.index>=this.lines.length?null:this.lines[this.index++]},readValue:function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw"Invalid line: "+t;return this.trim(t.substring(e+1))},readTuple:function(t){var e=this.readLine(),n=e.indexOf(":");if(-1==n)throw"Invalid line: "+e;for(var i=0,a=n+1;3>i;i++){var r=e.indexOf(",",a);if(-1==r)break;t[i]=this.trim(e.substr(a,r-a)),a=r+1}return t[i]=this.trim(e.substring(a)),i+1}},e.exports=i.AtlasReader},{"../SpineUtil":42}],9:[function(t,e,n){var i=t("../SpineUtil");i.AtlasRegion=function(){},i.AtlasRegion.prototype={page:null,name:null,x:0,y:0,width:0,height:0,u:0,v:0,u2:0,v2:0,offsetX:0,offsetY:0,originalWidth:0,originalHeight:0,index:0,rotate:!1,splits:null,pads:null},e.exports=i.AtlasRegion},{"../SpineUtil":42}],10:[function(t,e,n){var i=t("../SpineUtil");i.Curves=t("./Curves"),i.Animation=t("./Animation"),i.AttachmentTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=t,this.attachmentNames=[],this.attachmentNames.length=t},i.AttachmentTimeline.prototype={slotIndex:0,getFrameCount:function(){return this.frames.length},setFrame:function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},apply:function(t,e,n,a,r){var o=this.frames;if(n<o[0])return void(e>n&&this.apply(t,e,Number.MAX_VALUE,null,0));e>n&&(e=-1);var s=n>=o[o.length-1]?o.length-1:i.Animation.binarySearch1(o,n)-1;if(!(o[s]<e)){var l=this.attachmentNames[s];t.slots[this.slotIndex].setAttachment(l?t.getAttachmentBySlotIndex(this.slotIndex,l):null)}}},e.exports=i.AttachmentTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],11:[function(t,e,n){var i=t("../SpineUtil");i.AttachmentType={region:0,boundingbox:1,mesh:2,skinnedmesh:3},e.exports=i.AttachmentType},{"../SpineUtil":42}],12:[function(t,e,n){var i=t("../SpineUtil");i.Bone=function(t,e,n){this.data=t,this.skeleton=e,this.parent=n,this.setToSetupPose()},i.Bone.yDown=!1,i.Bone.prototype={x:0,y:0,rotation:0,rotationIK:0,scaleX:1,scaleY:1,flipX:!1,flipY:!1,m00:0,m01:0,worldX:0,m10:0,m11:0,worldY:0,worldRotation:0,worldScaleX:1,worldScaleY:1,worldFlipX:!1,worldFlipY:!1,updateWorldTransform:function(){var t=this.parent;if(t)this.worldX=this.x*t.m00+this.y*t.m01+t.worldX,this.worldY=this.x*t.m10+this.y*t.m11+t.worldY,this.data.inheritScale?(this.worldScaleX=t.worldScaleX*this.scaleX,this.worldScaleY=t.worldScaleY*this.scaleY):(this.worldScaleX=this.scaleX,this.worldScaleY=this.scaleY),this.worldRotation=this.data.inheritRotation?t.worldRotation+this.rotationIK:this.rotationIK,this.worldFlipX=t.worldFlipX!=this.flipX,this.worldFlipY=t.worldFlipY!=this.flipY;else{var e=this.skeleton.flipX,n=this.skeleton.flipY;this.worldX=e?-this.x:this.x,this.worldY=n!=i.Bone.yDown?-this.y:this.y,this.worldScaleX=this.scaleX,this.worldScaleY=this.scaleY,this.worldRotation=this.rotationIK,this.worldFlipX=e!=this.flipX,this.worldFlipY=n!=this.flipY}var a=this.worldRotation*i.degRad,r=Math.cos(a),o=Math.sin(a);this.worldFlipX?(this.m00=-r*this.worldScaleX,this.m01=o*this.worldScaleY):(this.m00=r*this.worldScaleX,this.m01=-o*this.worldScaleY),this.worldFlipY!=i.Bone.yDown?(this.m10=-o*this.worldScaleX,this.m11=-r*this.worldScaleY):(this.m10=o*this.worldScaleX,this.m11=r*this.worldScaleY)},setToSetupPose:function(){var t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.rotationIK=this.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.flipX=t.flipX,this.flipY=t.flipY},worldToLocal:function(t){var e=t[0]-this.worldX,n=t[1]-this.worldY,a=this.m00,r=this.m10,o=this.m01,s=this.m11;this.worldFlipX!=(this.worldFlipY!=i.Bone.yDown)&&(a=-a,s=-s);var l=1/(a*s-o*r);t[0]=e*a*l-n*o*l,t[1]=n*s*l-e*r*l},localToWorld:function(t){var e=t[0],n=t[1];t[0]=e*this.m00+n*this.m01+this.worldX,t[1]=e*this.m10+n*this.m11+this.worldY}},e.exports=i.Bone},{"../SpineUtil":42}],13:[function(t,e,n){var i=t("../SpineUtil");i.BoneData=function(t,e){this.name=t,this.parent=e},i.BoneData.prototype={length:0,x:0,y:0,rotation:0,scaleX:1,scaleY:1,inheritScale:!0,inheritRotation:!0,flipX:!1,flipY:!1},e.exports=i.BoneData},{"../SpineUtil":42}],14:[function(t,e,n){var i=t("../SpineUtil");i.AttachmentType=t("./AttachmentType"),i.BoundingBoxAttachment=function(t){this.name=t,this.vertices=[]},i.BoundingBoxAttachment.prototype={type:i.AttachmentType.boundingbox,computeWorldVertices:function(t,e,n,i){t+=n.worldX,e+=n.worldY;for(var a=n.m00,r=n.m01,o=n.m10,s=n.m11,l=this.vertices,h=0,m=l.length;m>h;h+=2){var u=l[h],f=l[h+1];i[h]=u*a+f*r+t,i[h+1]=u*o+f*s+e}}},e.exports=i.BoundingBoxAttachment},{"../SpineUtil":42,"./AttachmentType":11}],15:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.ColorTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=5*t},i.ColorTimeline.prototype={slotIndex:0,getFrameCount:function(){return this.frames.length/5},setFrame:function(t,e,n,i,a,r){t*=5,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=i,this.frames[t+3]=a,this.frames[t+4]=r},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s,l,h,m;if(n>=o[o.length-5]){var u=o.length-1;s=o[u-3],l=o[u-2],h=o[u-1],m=o[u]}else{var f=i.Animation.binarySearch(o,n,5),c=o[f-4],p=o[f-3],d=o[f-2],g=o[f-1],v=o[f],A=1-(n-v)/(o[f-5]-v);A=this.curves.getCurvePercent(f/5-1,A),s=c+(o[f+1]-c)*A,l=p+(o[f+2]-p)*A,h=d+(o[f+3]-d)*A,m=g+(o[f+4]-g)*A}var S=t.slots[this.slotIndex];1>r?(S.r+=(s-S.r)*r,S.g+=(l-S.g)*r,S.b+=(h-S.b)*r,S.a+=(m-S.a)*r):(S.r=s,S.g=l,S.b=h,S.a=m)}}},e.exports=i.ColorTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],16:[function(t,e,n){var i=t("../SpineUtil");i.Curves=function(t){this.curves=[]},i.Curves.prototype={setLinear:function(t){this.curves[19*t]=0},setStepped:function(t){this.curves[19*t]=1},setCurve:function(t,e,n,i,a){var r=.1,o=r*r,s=o*r,l=3*r,h=3*o,m=6*o,u=6*s,f=2*-e+i,c=2*-n+a,p=3*(e-i)+1,d=3*(n-a)+1,g=e*l+f*h+p*s,v=n*l+c*h+d*s,A=f*m+p*u,S=c*m+d*u,y=p*u,w=d*u,x=19*t,T=this.curves;T[x++]=2;for(var b=g,C=v,k=x+19-1;k>x;x+=2)T[x]=b,T[x+1]=C,g+=A,v+=S,A+=y,S+=w,b+=g,C+=v},getCurvePercent:function(t,e){e=0>e?0:e>1?1:e;var n=this.curves,i=19*t,a=n[i];if(0===a)return e;if(1==a)return 0;i++;for(var r=0,o=i,s=i+19-1;s>i;i+=2)if(r=n[i],r>=e){var l,h;return i==o?(l=0,h=0):(l=n[i-2],h=n[i-1]),h+(n[i+1]-h)*(e-l)/(r-l)}var m=n[i-1];return m+(1-m)*(e-r)/(1-r)}},e.exports=i.Curves},{"../SpineUtil":42}],17:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.DrawOrderTimeline=function(t){this.frames=[],this.frames.length=t,this.drawOrders=[],this.drawOrders.length=t},i.DrawOrderTimeline.prototype={getFrameCount:function(){return this.frames.length},setFrame:function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s;s=n>=o[o.length-1]?o.length-1:i.Animation.binarySearch1(o,n)-1;var l=t.drawOrder,h=(t.slots,this.drawOrders[s]);if(h)for(var m=0,u=h.length;u>m;m++)l[m]=h[m]}}},e.exports=i.DrawOrderTimeline},{"../SpineUtil":42,"./Animation":2}],18:[function(t,e,n){var i=t("../SpineUtil");i.Event=function(t){this.data=t},i.Event.prototype={intValue:0,floatValue:0,stringValue:null},e.exports=i.Event},{"../SpineUtil":42}],19:[function(t,e,n){var i=t("../SpineUtil");i.EventData=function(t){this.name=t},i.EventData.prototype={intValue:0,floatValue:0,stringValue:null},e.exports=i.EventData},{"../SpineUtil":42}],20:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.EventTimeline=function(t){this.frames=[],this.frames.length=t,this.events=[],this.events.length=t},i.EventTimeline.prototype={getFrameCount:function(){return this.frames.length},setFrame:function(t,e,n){this.frames[t]=e,this.events[t]=n},apply:function(t,e,n,a,r){if(a){var o=this.frames,s=o.length;if(e>n)this.apply(t,e,Number.MAX_VALUE,a,r),e=-1;else if(e>=o[s-1])return;if(!(n<o[0])){var l;if(e<o[0])l=0;else{l=i.Animation.binarySearch1(o,e);for(var h=o[l];l>0&&o[l-1]==h;)l--}for(var m=this.events;s>l&&n>=o[l];l++)a.push(m[l])}}}},e.exports=i.EventTimeline},{"../SpineUtil":42,"./Animation":2}],21:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.FfdTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=t,this.frameVertices=[],this.frameVertices.length=t},i.FfdTimeline.prototype={slotIndex:0,attachment:0,getFrameCount:function(){return this.frames.length},setFrame:function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},apply:function(t,e,n,a,r){var o=t.slots[this.slotIndex];if(o.attachment==this.attachment){var s=this.frames;if(!(n<s[0])){var l=this.frameVertices,h=l[0].length,m=o.attachmentVertices;if(m.length!=h){m=o.attachmentVertices=[];for(var u=0;h>u;u++)m.push(0);r=1}if(n>=s[s.length-1]){var f=l[s.length-1];if(1>r)for(var c=0;h>c;c++)m[c]+=(f[c]-m[c])*r;else for(var c=0;h>c;c++)m[c]=f[c]}else{var p=i.Animation.binarySearch1(s,n),d=s[p],g=1-(n-d)/(s[p-1]-d);g=this.curves.getCurvePercent(p-1,0>g?0:g>1?1:g);var v=l[p-1],A=l[p];if(1>r)for(var c=0;h>c;c++){var S=v[c];m[c]+=(S+(A[c]-S)*g-m[c])*r}else for(var c=0;h>c;c++){var S=v[c];m[c]=S+(A[c]-S)*g}}}}}},e.exports=i.FfdTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],22:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.FlipXTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=2*t},i.FlipXTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/2},setFrame:function(t,e,n){t*=2,this.frames[t]=e,this.frames[t+1]=n?1:0},apply:function(t,e,n,a,r){var o=this.frames;if(n<o[0])return void(e>n&&this.apply(t,e,Number.MAX_VALUE,null,0));e>n&&(e=-1);var s=(n>=o[o.length-2]?o.length:i.Animation.binarySearch(o,n,2))-2;o[s]<e||(t.bones[this.boneIndex].flipX=0!=o[s+1])}},e.exports=i.FlipXTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],23:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.FlipYTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=2*t},i.FlipYTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/2},setFrame:function(t,e,n){t*=2,this.frames[t]=e,this.frames[t+1]=n?1:0},apply:function(t,e,n,a,r){var o=this.frames;if(n<o[0])return void(e>n&&this.apply(t,e,Number.MAX_VALUE,null,0));e>n&&(e=-1);var s=(n>=o[o.length-2]?o.length:i.Animation.binarySearch(o,n,2))-2;o[s]<e||(t.bones[this.boneIndex].flipY=0!=o[s+1])}},e.exports=i.FlipYTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],24:[function(t,e,n){var i=t("../SpineUtil");i.IkConstraint=function(t,e){this.data=t,this.mix=t.mix,this.bendDirection=t.bendDirection,this.bones=[];for(var n=0,i=t.bones.length;i>n;n++)this.bones.push(e.findBone(t.bones[n].name));this.target=e.findBone(t.target.name)},i.IkConstraint.prototype={apply:function(){var t=this.target,e=this.bones;switch(e.length){case 1:i.IkConstraint.apply1(e[0],t.worldX,t.worldY,this.mix);break;case 2:i.IkConstraint.apply2(e[0],e[1],t.worldX,t.worldY,this.bendDirection,this.mix)}}},i.IkConstraint.apply1=function(t,e,n,a){var r=t.data.inheritRotation&&t.parent?t.parent.worldRotation:0,o=t.rotation,s=(i.Bone.yDown?-i.radDeg:i.radDeg)*Math.atan2(n-t.worldY,e-t.worldX)-r;t.rotationIK=o+(s-o)*a},i.IkConstraint.apply2=function(t,e,n,a,r,o){var s=e.rotation,l=t.rotation;if(!o)return e.rotationIK=s,void(t.rotationIK=l);var h,m,u=i.temp,f=t.parent;f?(u[0]=n,u[1]=a,f.worldToLocal(u),n=(u[0]-t.x)*f.worldScaleX,a=(u[1]-t.y)*f.worldScaleY):(n-=t.x,a-=t.y),e.parent==t?(h=e.x,m=e.y):(u[0]=e.x,u[1]=e.y,e.parent.localToWorld(u),t.worldToLocal(u),h=u[0],m=u[1]);var c=h*t.worldScaleX,p=m*t.worldScaleY,d=Math.atan2(p,c),g=Math.sqrt(c*c+p*p),v=e.data.length*e.worldScaleX,A=2*g*v;if(1e-4>A)return void(e.rotationIK=s+(Math.atan2(a,n)*i.radDeg-l-s)*o);var S=(n*n+a*a-g*g-v*v)/A;-1>S?S=-1:S>1&&(S=1);var y=Math.acos(S)*r,w=g+v*S,x=v*Math.sin(y),T=Math.atan2(a*w-n*x,n*w+a*x),b=(T-d)*i.radDeg-l;b>180?b-=360:-180>b&&(b+=360),t.rotationIK=l+b*o,b=(y+d)*i.radDeg-s,b>180?b-=360:-180>b&&(b+=360),e.rotationIK=s+(b+t.worldRotation-e.parent.worldRotation)*o},e.exports=i.IkConstraint},{"../SpineUtil":42}],25:[function(t,e,n){var i=t("../SpineUtil")||{};i.IkConstraintData=function(t){this.name=t,this.bones=[]},i.IkConstraintData.prototype={target:null,bendDirection:1,mix:1},e.exports=i.IkConstraintData},{"../SpineUtil":42}],26:[function(t,e,n){var i=t("../SpineUtil")||{};i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.IkConstraintTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=3*t},i.IkConstraintTimeline.prototype={ikConstraintIndex:0,getFrameCount:function(){return this.frames.length/3},setFrame:function(t,e,n,i){t*=3,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=i},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s=t.ikConstraints[this.ikConstraintIndex];if(n>=o[o.length-3])return s.mix+=(o[o.length-2]-s.mix)*r,void(s.bendDirection=o[o.length-1]);var l=i.Animation.binarySearch(o,n,3),h=o[l+-2],m=o[l],u=1-(n-m)/(o[l+-3]-m);u=this.curves.getCurvePercent(l/3-1,u);var f=h+(o[l+1]-h)*u;s.mix+=(f-s.mix)*r,s.bendDirection=o[l+-1]}}},e.exports=i.IkConstraintTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],27:[function(t,e,n){var i=t("../SpineUtil")||{};i.AttachmentType=t("./AttachmentType"),i.MeshAttachment=function(t){this.name=t},i.MeshAttachment.prototype={type:i.AttachmentType.mesh,vertices:null,uvs:null,regionUVs:null,triangles:null,hullLength:0,r:1,g:1,b:1,a:1,path:null,rendererObject:null,regionU:0,regionV:0,regionU2:0,regionV2:0,regionRotate:!1,regionOffsetX:0,regionOffsetY:0,regionWidth:0,regionHeight:0,regionOriginalWidth:0,regionOriginalHeight:0,edges:null,width:0,height:0,updateUVs:function(){var t=this.regionU2-this.regionU,e=this.regionV2-this.regionV,n=this.regionUVs.length;if(this.uvs&&this.uvs.length==n||(this.uvs=new i.Float32Array(n)),this.regionRotate)for(var a=0;n>a;a+=2)this.uvs[a]=this.regionU+this.regionUVs[a+1]*t,this.uvs[a+1]=this.regionV+e-this.regionUVs[a]*e;else for(var a=0;n>a;a+=2)this.uvs[a]=this.regionU+this.regionUVs[a]*t,this.uvs[a+1]=this.regionV+this.regionUVs[a+1]*e},computeWorldVertices:function(t,e,n,i){var a=n.bone;t+=a.worldX,e+=a.worldY;var r=a.m00,o=a.m01,s=a.m10,l=a.m11,h=this.vertices,m=h.length;n.attachmentVertices.length==m&&(h=n.attachmentVertices);for(var u=0;m>u;u+=2){var f=h[u],c=h[u+1];i[u]=f*r+c*o+t,i[u+1]=f*s+c*l+e}}},e.exports=i.MeshAttachment},{"../SpineUtil":42,"./AttachmentType":11}],28:[function(t,e,n){var i=t("../SpineUtil");i.AttachmentType=t("./AttachmentType"),i.RegionAttachment=function(t){this.name=t,this.offset=[],this.offset.length=8,this.uvs=[],this.uvs.length=8},i.RegionAttachment.prototype={type:i.AttachmentType.region,x:0,y:0,rotation:0,scaleX:1,scaleY:1,width:0,height:0,r:1,g:1,b:1,a:1,path:null,rendererObject:null,regionOffsetX:0,regionOffsetY:0,regionWidth:0,regionHeight:0,regionOriginalWidth:0,regionOriginalHeight:0,setUVs:function(t,e,n,i,a){var r=this.uvs;a?(r[2]=t,r[3]=i,r[4]=t,r[5]=e,r[6]=n,r[7]=e,r[0]=n,r[1]=i):(r[0]=t,r[1]=i,r[2]=t,r[3]=e,r[4]=n,r[5]=e,r[6]=n,r[7]=i)},updateOffset:function(){var t=this.width/this.regionOriginalWidth*this.scaleX,e=this.height/this.regionOriginalHeight*this.scaleY,n=-this.width/2*this.scaleX+this.regionOffsetX*t,a=-this.height/2*this.scaleY+this.regionOffsetY*e,r=n+this.regionWidth*t,o=a+this.regionHeight*e,s=this.rotation*i.degRad,l=Math.cos(s),h=Math.sin(s),m=n*l+this.x,u=n*h,f=a*l+this.y,c=a*h,p=r*l+this.x,d=r*h,g=o*l+this.y,v=o*h,A=this.offset;A[0]=m-c,A[1]=f+u,A[2]=m-v,A[3]=g+u,A[4]=p-v,A[5]=g+d,A[6]=p-c,A[7]=f+d},computeVertices:function(t,e,n,i){t+=n.worldX,e+=n.worldY;var a=n.m00,r=n.m01,o=n.m10,s=n.m11,l=this.offset;i[0]=l[0]*a+l[1]*r+t,i[1]=l[0]*o+l[1]*s+e,i[2]=l[2]*a+l[3]*r+t,i[3]=l[2]*o+l[3]*s+e,i[4]=l[4]*a+l[5]*r+t,i[5]=l[4]*o+l[5]*s+e,i[6]=l[6]*a+l[7]*r+t,i[7]=l[6]*o+l[7]*s+e}},e.exports=i.RegionAttachment},{"../SpineUtil":42,"./AttachmentType":11}],29:[function(t,e,n){var i=t("../SpineUtil")||{};i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.RotateTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=2*t},i.RotateTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/2},setFrame:function(t,e,n){t*=2,this.frames[t]=e,this.frames[t+1]=n},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s=t.bones[this.boneIndex];if(n>=o[o.length-2]){for(var l=s.data.rotation+o[o.length-1]-s.rotation;l>180;)l-=360;for(;-180>l;)l+=360;return void(s.rotation+=l*r)}var h=i.Animation.binarySearch(o,n,2),m=o[h-1],u=o[h],f=1-(n-u)/(o[h-2]-u);f=this.curves.getCurvePercent(h/2-1,f);for(var l=o[h+1]-m;l>180;)l-=360;for(;-180>l;)l+=360;for(l=s.data.rotation+(m+l*f)-s.rotation;l>180;)l-=360;for(;-180>l;)l+=360;s.rotation+=l*r}}},e.exports=i.RotateTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],30:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.ScaleTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=3*t},i.ScaleTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/3},setFrame:function(t,e,n,i){t*=3,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=i},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s=t.bones[this.boneIndex];if(n>=o[o.length-3])return s.scaleX+=(s.data.scaleX*o[o.length-2]-s.scaleX)*r,void(s.scaleY+=(s.data.scaleY*o[o.length-1]-s.scaleY)*r);var l=i.Animation.binarySearch(o,n,3),h=o[l-2],m=o[l-1],u=o[l],f=1-(n-u)/(o[l+-3]-u);f=this.curves.getCurvePercent(l/3-1,f),s.scaleX+=(s.data.scaleX*(h+(o[l+1]-h)*f)-s.scaleX)*r,s.scaleY+=(s.data.scaleY*(m+(o[l+2]-m)*f)-s.scaleY)*r}}},e.exports=i.ScaleTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],31:[function(t,e,n){var i=t("../SpineUtil");i.Bone=t("./Bone"),i.Slot=t("./Slot"),i.IkConstraint=t("./IkConstraint"),i.Skeleton=function(t){this.data=t,this.bones=[];for(var e=0,n=t.bones.length;n>e;e++){var a=t.bones[e],r=a.parent?this.bones[t.bones.indexOf(a.parent)]:null;this.bones.push(new i.Bone(a,this,r))}this.slots=[],this.drawOrder=[];for(var e=0,n=t.slots.length;n>e;e++){var o=t.slots[e],s=this.bones[t.bones.indexOf(o.boneData)],l=new i.Slot(o,s);this.slots.push(l),this.drawOrder.push(e)}this.ikConstraints=[];for(var e=0,n=t.ikConstraints.length;n>e;e++)this.ikConstraints.push(new i.IkConstraint(t.ikConstraints[e],this));this.boneCache=[],this.updateCache()},i.Skeleton.prototype={x:0,y:0,skin:null,r:1,g:1,b:1,a:1,time:0,flipX:!1,flipY:!1,updateCache:function(){var t=this.ikConstraints,e=t.length,n=e+1,i=this.boneCache;i.length>n&&(i.length=n);for(var a=0,r=i.length;r>a;a++)i[a].length=0;for(;i.length<n;)i[i.length]=[];var o=i[0],s=this.bones;t:for(var a=0,r=s.length;r>a;a++){var l=s[a],h=l;do{for(var m=0;e>m;m++)for(var u=t[m],f=u.bones[0],c=u.bones[u.bones.length-1];;){if(h==c){i[m].push(l),i[m+1].push(l);continue t}if(c==f)break;c=c.parent}h=h.parent}while(h);o[o.length]=l}},updateWorldTransform:function(){for(var t=this.bones,e=0,n=t.length;n>e;e++){var i=t[e];i.rotationIK=i.rotation}for(var e=0,a=this.boneCache.length-1;;){for(var r=this.boneCache[e],o=0,s=r.length;s>o;o++)r[o].updateWorldTransform();if(e==a)break;this.ikConstraints[e].apply(),e++}},setToSetupPose:function(){this.setBonesToSetupPose(),this.setSlotsToSetupPose()},setBonesToSetupPose:function(){for(var t=this.bones,e=0,n=t.length;n>e;e++)t[e].setToSetupPose();for(var i=this.ikConstraints,e=0,n=i.length;n>e;e++){var a=i[e];a.bendDirection=a.data.bendDirection,a.mix=a.data.mix}},setSlotsToSetupPose:function(){for(var t=this.slots,e=0,n=t.length;n>e;e++)t[e].setToSetupPose(e);this.resetDrawOrder()},getRootBone:function(){return this.bones.length?this.bones[0]:null},findBone:function(t){for(var e=this.bones,n=0,i=e.length;i>n;n++)if(e[n].data.name==t)return e[n];return null},findBoneIndex:function(t){for(var e=this.bones,n=0,i=e.length;i>n;n++)if(e[n].data.name==t)return n;return-1},findSlot:function(t){for(var e=this.slots,n=0,i=e.length;i>n;n++)if(e[n].data.name==t)return e[n];return null},findSlotIndex:function(t){for(var e=this.slots,n=0,i=e.length;i>n;n++)if(e[n].data.name==t)return n;return-1},setSkinByName:function(t){var e=this.data.findSkin(t);if(!e)throw"Skin not found: "+t;this.setSkin(e)},setSkin:function(t){if(t)if(this.skin)t._attachAll(this,this.skin);else for(var e=this.slots,n=0,i=e.length;i>n;n++){var a=e[n],r=a.data.attachmentName;if(r){var o=t.getAttachment(n,r);o&&a.setAttachment(o)}}this.skin=t},getAttachmentBySlotName:function(t,e){return this.getAttachmentBySlotIndex(this.data.findSlotIndex(t),e)},getAttachmentBySlotIndex:function(t,e){if(this.skin){var n=this.skin.getAttachment(t,e);if(n)return n}return this.data.defaultSkin?this.data.defaultSkin.getAttachment(t,e):null},setAttachment:function(t,e){for(var n=this.slots,i=0,a=n.length;a>i;i++){var r=n[i];if(r.data.name==t){var o=null;if(e&&(o=this.getAttachmentBySlotIndex(i,e),!o))throw"Attachment not found: "+e+", for slot: "+t;return void r.setAttachment(o)}}throw"Slot not found: "+t},findIkConstraint:function(t){for(var e=this.ikConstraints,n=0,i=e.length;i>n;n++)if(e[n].data.name==t)return e[n];return null},update:function(t){this.time+=t},resetDrawOrder:function(){for(var t=0,e=this.drawOrder.length;e>t;t++)this.drawOrder[t]=t}},e.exports=i.Skeleton},{"../SpineUtil":42,"./Bone":12,"./IkConstraint":24,"./Slot":37}],32:[function(t,e,n){var i=t("../SpineRuntime")||{};i.AttachmentType=t("./AttachmentType"),i.SkeletonBounds=function(){this.polygonPool=[],this.polygons=[],this.boundingBoxes=[]},i.SkeletonBounds.prototype={
minX:0,minY:0,maxX:0,maxY:0,update:function(t,e){var n=t.slots,a=n.length,r=t.x,o=t.y,s=this.boundingBoxes,l=this.polygonPool,h=this.polygons;s.length=0;for(var m=0,u=h.length;u>m;m++)l.push(h[m]);h.length=0;for(var m=0;a>m;m++){var f=n[m],c=f.attachment;if(c.type==i.AttachmentType.boundingbox){s.push(c);var p,d=l.length;d>0?(p=l[d-1],l.splice(d-1,1)):p=[],h.push(p),p.length=c.vertices.length,c.computeWorldVertices(r,o,f.bone,p)}}e&&this.aabbCompute()},aabbCompute:function(){for(var t=this.polygons,e=Number.MAX_VALUE,n=Number.MAX_VALUE,i=Number.MIN_VALUE,a=Number.MIN_VALUE,r=0,o=t.length;o>r;r++)for(var s=t[r],l=0,h=s.length;h>l;l+=2){var m=s[l],u=s[l+1];e=Math.min(e,m),n=Math.min(n,u),i=Math.max(i,m),a=Math.max(a,u)}this.minX=e,this.minY=n,this.maxX=i,this.maxY=a},aabbContainsPoint:function(t,e){return t>=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},aabbIntersectsSegment:function(t,e,n,i){var a=this.minX,r=this.minY,o=this.maxX,s=this.maxY;if(a>=t&&a>=n||r>=e&&r>=i||t>=o&&n>=o||e>=s&&i>=s)return!1;var l=(i-e)/(n-t),h=l*(a-t)+e;if(h>r&&s>h)return!0;if(h=l*(o-t)+e,h>r&&s>h)return!0;var m=(r-e)/l+t;return m>a&&o>m?!0:(m=(s-e)/l+t,m>a&&o>m?!0:!1)},aabbIntersectsSkeleton:function(t){return this.minX<t.maxX&&this.maxX>t.minX&&this.minY<t.maxY&&this.maxY>t.minY},containsPoint:function(t,e){for(var n=this.polygons,i=0,a=n.length;a>i;i++)if(this.polygonContainsPoint(n[i],t,e))return this.boundingBoxes[i];return null},intersectsSegment:function(t,e,n,i){for(var a=this.polygons,r=0,o=a.length;o>r;r++)if(a[r].intersectsSegment(t,e,n,i))return this.boundingBoxes[r];return null},polygonContainsPoint:function(t,e,n){for(var i=t.length,a=i-2,r=!1,o=0;i>o;o+=2){var s=t[o+1],l=t[a+1];if(n>s&&l>=n||n>l&&s>=n){var h=t[o];h+(n-s)/(l-s)*(t[a]-h)<e&&(r=!r)}a=o}return r},polygonIntersectsSegment:function(t,e,n,i,a){for(var r=t.length,o=e-i,s=n-a,l=e*a-n*i,h=t[r-2],m=t[r-1],u=0;r>u;u+=2){var f=t[u],c=t[u+1],p=h*c-m*f,d=h-f,g=m-c,v=o*g-s*d,A=(l*d-o*p)/v;if((A>=h&&f>=A||A>=f&&h>=A)&&(A>=e&&i>=A||A>=i&&e>=A)){var S=(l*g-s*p)/v;if((S>=m&&c>=S||S>=c&&m>=S)&&(S>=n&&a>=S||S>=a&&n>=S))return!0}h=f,m=c}return!1},getPolygon:function(t){var e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]},getWidth:function(){return this.maxX-this.minX},getHeight:function(){return this.maxY-this.minY}},e.exports=i.SkeletonBounds},{"../SpineRuntime":41,"./AttachmentType":11}],33:[function(t,e,n){var i=t("../SpineUtil");i.SkeletonData=function(){this.bones=[],this.slots=[],this.skins=[],this.events=[],this.animations=[],this.ikConstraints=[]},i.SkeletonData.prototype={name:null,defaultSkin:null,width:0,height:0,version:null,hash:null,findBone:function(t){for(var e=this.bones,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null},findBoneIndex:function(t){for(var e=this.bones,n=0,i=e.length;i>n;n++)if(e[n].name==t)return n;return-1},findSlot:function(t){for(var e=this.slots,n=0,i=e.length;i>n;n++)if(e[n].name==t)return this.slots[n];return null},findSlotIndex:function(t){for(var e=this.slots,n=0,i=e.length;i>n;n++)if(e[n].name==t)return n;return-1},findSkin:function(t){for(var e=this.skins,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null},findEvent:function(t){for(var e=this.events,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null},findAnimation:function(t){for(var e=this.animations,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null},findIkConstraint:function(t){for(var e=this.ikConstraints,n=0,i=e.length;i>n;n++)if(e[n].name==t)return e[n];return null}},e.exports=i.SkeletonData},{"../SpineUtil":42}],34:[function(t,e,n){var i=t("../SpineUtil");i.SkeletonData=t("./SkeletonData"),i.BoneData=t("./BoneData"),i.IkConstraintData=t("./IkConstraintData"),i.SlotData=t("./SlotData"),i.Skin=t("./Skin"),i.EventData=t("./EventData"),i.AttachmentType=t("./AttachmentType"),i.ColorTimeline=t("./ColorTimeline"),i.AttachmentTimeline=t("./AttachmentTimeline"),i.RotateTimeline=t("./RotateTimeline"),i.ScaleTimeline=t("./ScaleTimeline"),i.TranslateTimeline=t("./TranslateTimeline"),i.FlipXTimeline=t("./FlipXTimeline"),i.FlipYTimeline=t("./FlipYTimeline"),i.IkConstraintTimeline=t("./IkConstraintTimeline"),i.FfdTimeline=t("./FfdTimeline"),i.DrawOrderTimeline=t("./DrawOrderTimeline"),i.EventTimeline=t("./EventTimeline"),i.Event=t("./Event"),i.Animation=t("./Animation"),i.SkeletonJsonParser=function(t){this.attachmentLoader=t},i.SkeletonJsonParser.prototype={scale:1,readSkeletonData:function(t,e){var n=new i.SkeletonData;n.name=e;var a=t.skeleton;a&&(n.hash=a.hash,n.version=a.spine,n.width=a.width||0,n.height=a.height||0);for(var r=t.bones,o=0,s=r.length;s>o;o++){var l=r[o],h=null;if(l.parent&&(h=n.findBone(l.parent),!h))throw"Parent bone not found: "+l.parent;var m=new i.BoneData(l.name,h);m.length=(l.length||0)*this.scale,m.x=(l.x||0)*this.scale,m.y=(l.y||0)*this.scale,m.rotation=l.rotation||0,m.scaleX=l.hasOwnProperty("scaleX")?l.scaleX:1,m.scaleY=l.hasOwnProperty("scaleY")?l.scaleY:1,m.inheritScale=l.hasOwnProperty("inheritScale")?l.inheritScale:!0,m.inheritRotation=l.hasOwnProperty("inheritRotation")?l.inheritRotation:!0,n.bones.push(m)}var u=t.ik;if(u)for(var o=0,s=u.length;s>o;o++){for(var f=u[o],c=new i.IkConstraintData(f.name),r=f.bones,p=0,d=r.length;d>p;p++){var g=n.findBone(r[p]);if(!g)throw"IK bone not found: "+r[p];c.bones.push(g)}if(c.target=n.findBone(f.target),!c.target)throw"Target bone not found: "+f.target;c.bendDirection=!f.hasOwnProperty("bendPositive")||f.bendPositive?1:-1,c.mix=f.hasOwnProperty("mix")?f.mix:1,n.ikConstraints.push(c)}for(var v=t.slots,o=0,s=v.length;s>o;o++){var A=v[o],m=n.findBone(A.bone);if(!m)throw"Slot bone not found: "+A.bone;var S=new i.SlotData(A.name,m),y=A.color;y&&(S.r=this.toColor(y,0),S.g=this.toColor(y,1),S.b=this.toColor(y,2),S.a=this.toColor(y,3)),S.attachmentName=A.attachment,S.blendMode=A.blend&&i.SlotData.PIXI_BLEND_MODE_MAP[A.blend]||i.SlotData.PIXI_BLEND_MODE_MAP.normal,n.slots.push(S)}var w=t.skins;for(var x in w)if(w.hasOwnProperty(x)){var T=w[x],b=new i.Skin(x);for(var C in T)if(T.hasOwnProperty(C)){var k=n.findSlotIndex(C),I=T[C];for(var D in I)if(I.hasOwnProperty(D)){var U=this.readAttachment(b,D,I[D]);U&&b.addAttachment(k,D,U)}}n.skins.push(b),"default"==b.name&&(n.defaultSkin=b)}var X=t.events;for(var O in X)if(X.hasOwnProperty(O)){var P=X[O],M=new i.EventData(O);M.intValue=P["int"]||0,M.floatValue=P["float"]||0,M.stringValue=P.string||null,n.events.push(M)}var F=t.animations;for(var Y in F)F.hasOwnProperty(Y)&&this.readAnimation(Y,F[Y],n);return n},readAttachment:function(t,e,n){e=n.name||e;var a=i.AttachmentType[n.type||"region"],r=n.path||e,o=this.scale;if(a==i.AttachmentType.region){var s=this.attachmentLoader.newRegionAttachment(t,e,r);if(!s)return null;s.path=r,s.x=(n.x||0)*o,s.y=(n.y||0)*o,s.scaleX=n.hasOwnProperty("scaleX")?n.scaleX:1,s.scaleY=n.hasOwnProperty("scaleY")?n.scaleY:1,s.rotation=n.rotation||0,s.width=(n.width||0)*o,s.height=(n.height||0)*o;var l=n.color;return l&&(s.r=this.toColor(l,0),s.g=this.toColor(l,1),s.b=this.toColor(l,2),s.a=this.toColor(l,3)),s.updateOffset(),s}if(a==i.AttachmentType.mesh){var h=this.attachmentLoader.newMeshAttachment(t,e,r);return h?(h.path=r,h.vertices=this.getFloatArray(n,"vertices",o),h.triangles=this.getIntArray(n,"triangles"),h.regionUVs=this.getFloatArray(n,"uvs",1),h.updateUVs(),l=n.color,l&&(h.r=this.toColor(l,0),h.g=this.toColor(l,1),h.b=this.toColor(l,2),h.a=this.toColor(l,3)),h.hullLength=2*(n.hull||0),n.edges&&(h.edges=this.getIntArray(n,"edges")),h.width=(n.width||0)*o,h.height=(n.height||0)*o,h):null}if(a==i.AttachmentType.skinnedmesh){var h=this.attachmentLoader.newSkinnedMeshAttachment(t,e,r);if(!h)return null;h.path=r;for(var m=this.getFloatArray(n,"uvs",1),u=this.getFloatArray(n,"vertices",1),f=[],c=[],p=0,d=u.length;d>p;){var g=0|u[p++];c[c.length]=g;for(var v=p+4*g;v>p;)c[c.length]=u[p],f[f.length]=u[p+1]*o,f[f.length]=u[p+2]*o,f[f.length]=u[p+3],p+=4}return h.bones=c,h.weights=f,h.triangles=this.getIntArray(n,"triangles"),h.regionUVs=m,h.updateUVs(),l=n.color,l&&(h.r=this.toColor(l,0),h.g=this.toColor(l,1),h.b=this.toColor(l,2),h.a=this.toColor(l,3)),h.hullLength=2*(n.hull||0),n.edges&&(h.edges=this.getIntArray(n,"edges")),h.width=(n.width||0)*o,h.height=(n.height||0)*o,h}if(a==i.AttachmentType.boundingbox){for(var A=this.attachmentLoader.newBoundingBoxAttachment(t,e),u=n.vertices,p=0,d=u.length;d>p;p++)A.vertices.push(u[p]*o);return A}throw"Unknown attachment type: "+a},readAnimation:function(t,e,n){var a=[],r=0,o=e.slots;for(var s in o)if(o.hasOwnProperty(s)){var l=o[s],h=n.findSlotIndex(s);for(var m in l)if(l.hasOwnProperty(m)){var u=l[m];if("color"==m){var f=new i.ColorTimeline(u.length);f.slotIndex=h;for(var c=0,p=0,d=u.length;d>p;p++){var g=u[p],v=g.color,A=this.toColor(v,0),S=this.toColor(v,1),y=this.toColor(v,2),w=this.toColor(v,3);f.setFrame(c,g.time,A,S,y,w),this.readCurve(f,c,g),c++}a.push(f),r=Math.max(r,f.frames[5*f.getFrameCount()-5])}else{if("attachment"!=m)throw"Invalid timeline type for a slot: "+m+" ("+s+")";var f=new i.AttachmentTimeline(u.length);f.slotIndex=h;for(var c=0,p=0,d=u.length;d>p;p++){var g=u[p];f.setFrame(c++,g.time,g.name)}a.push(f),r=Math.max(r,f.frames[f.getFrameCount()-1])}}}var x=e.bones;for(var T in x)if(x.hasOwnProperty(T)){var b=n.findBoneIndex(T);if(-1==b)throw"Bone not found: "+T;var C=x[T];for(var m in C)if(C.hasOwnProperty(m)){var u=C[m];if("rotate"==m){var f=new i.RotateTimeline(u.length);f.boneIndex=b;for(var c=0,p=0,d=u.length;d>p;p++){var g=u[p];f.setFrame(c,g.time,g.angle),this.readCurve(f,c,g),c++}a.push(f),r=Math.max(r,f.frames[2*f.getFrameCount()-2])}else if("translate"==m||"scale"==m){var f,k=1;"scale"==m?f=new i.ScaleTimeline(u.length):(f=new i.TranslateTimeline(u.length),k=this.scale),f.boneIndex=b;for(var c=0,p=0,d=u.length;d>p;p++){var g=u[p],I=(g.x||0)*k,D=(g.y||0)*k;f.setFrame(c,g.time,I,D),this.readCurve(f,c,g),c++}a.push(f),r=Math.max(r,f.frames[3*f.getFrameCount()-3])}else{if("flipX"!=m&&"flipY"!=m)throw"Invalid timeline type for a bone: "+m+" ("+T+")";var I="flipX"==m,f=I?new i.FlipXTimeline(u.length):new i.FlipYTimeline(u.length);f.boneIndex=b;for(var U=I?"x":"y",c=0,p=0,d=u.length;d>p;p++){var g=u[p];f.setFrame(c,g.time,g[U]||!1),c++}a.push(f),r=Math.max(r,f.frames[2*f.getFrameCount()-2])}}}var X=e.ik;for(var O in X)if(X.hasOwnProperty(O)){var P=n.findIkConstraint(O),u=X[O],f=new i.IkConstraintTimeline(u.length);f.ikConstraintIndex=n.ikConstraints.indexOf(P);for(var c=0,p=0,d=u.length;d>p;p++){var g=u[p],M=g.hasOwnProperty("mix")?g.mix:1,F=!g.hasOwnProperty("bendPositive")||g.bendPositive?1:-1;f.setFrame(c,g.time,M,F),this.readCurve(f,c,g),c++}a.push(f),r=Math.max(r,f.frames[3*f.getFrameCount()-3])}var Y=e.ffd;for(var R in Y){var E=n.findSkin(R),l=Y[R];for(s in l){var h=n.findSlotIndex(s),B=l[s];for(var V in B){var u=B[V],f=new i.FfdTimeline(u.length),L=E.getAttachment(h,V);if(!L)throw"FFD attachment not found: "+V;f.slotIndex=h,f.attachment=L;var N,W=L.type==i.AttachmentType.mesh;N=W?L.vertices.length:L.weights.length/3*2;for(var c=0,p=0,d=u.length;d>p;p++){var _,g=u[p];if(g.vertices){var j=g.vertices;_=[];for(var H=0;N>H;++H)_.push(0);var K=g.offset||0,J=j.length;if(1==this.scale)for(var q=0;J>q;q++)_[q+K]=j[q];else for(var q=0;J>q;q++)_[q+K]=j[q]*this.scale;if(W)for(var z=L.vertices,q=0,J=_.length;J>q;q++)_[q]+=z[q]}else if(W)_=L.vertices;else{_=[];for(var H=0;N>H;++H)_.push(0)}f.setFrame(c,g.time,_),this.readCurve(f,c,g),c++}a[a.length]=f,r=Math.max(r,f.frames[f.getFrameCount()-1])}}}var G=e.drawOrder;if(G||(G=e.draworder),G){for(var f=new i.DrawOrderTimeline(G.length),$=n.slots.length,c=0,p=0,d=G.length;d>p;p++){var Q=G[p],Z=null;if(Q.offsets){Z=[],Z.length=$;for(var q=$-1;q>=0;q--)Z[q]=-1;var tt=Q.offsets,et=[];et.length=$-tt.length;for(var nt=0,it=0,q=0,J=tt.length;J>q;q++){var at=tt[q],h=n.findSlotIndex(at.slot);if(-1==h)throw"Slot not found: "+at.slot;for(;nt!=h;)et[it++]=nt++;Z[nt+at.offset]=nt++}for(;$>nt;)et[it++]=nt++;for(var q=$-1;q>=0;q--)-1==Z[q]&&(Z[q]=et[--it])}f.setFrame(c++,Q.time,Z)}a.push(f),r=Math.max(r,f.frames[f.getFrameCount()-1])}var rt=e.events;if(rt){for(var f=new i.EventTimeline(rt.length),c=0,p=0,d=rt.length;d>p;p++){var ot=rt[p],st=n.findEvent(ot.name);if(!st)throw"Event not found: "+ot.name;var lt=new i.Event(st);lt.intValue=ot.hasOwnProperty("int")?ot["int"]:st.intValue,lt.floatValue=ot.hasOwnProperty("float")?ot["float"]:st.floatValue,lt.stringValue=ot.hasOwnProperty("string")?ot.string:st.stringValue,f.setFrame(c++,ot.time,lt)}a.push(f),r=Math.max(r,f.frames[f.getFrameCount()-1])}n.animations.push(new i.Animation(t,a,r))},readCurve:function(t,e,n){var i=n.curve;i?"stepped"==i?t.curves.setStepped(e):i instanceof Array&&t.curves.setCurve(e,i[0],i[1],i[2],i[3]):t.curves.setLinear(e)},toColor:function(t,e){if(8!=t.length)throw"Color hexidecimal length must be 8, recieved: "+t;return parseInt(t.substring(2*e,2*e+2),16)/255},getFloatArray:function(t,e,n){var a=t[e],r=new i.Float32Array(a.length),o=0,s=a.length;if(1==n)for(;s>o;o++)r[o]=a[o];else for(;s>o;o++)r[o]=a[o]*n;return r},getIntArray:function(t,e){for(var n=t[e],a=new i.Uint16Array(n.length),r=0,o=n.length;o>r;r++)a[r]=0|n[r];return a}},e.exports=i.SkeletonJsonParser},{"../SpineUtil":42,"./Animation":2,"./AttachmentTimeline":10,"./AttachmentType":11,"./BoneData":13,"./ColorTimeline":15,"./DrawOrderTimeline":17,"./Event":18,"./EventData":19,"./EventTimeline":20,"./FfdTimeline":21,"./FlipXTimeline":22,"./FlipYTimeline":23,"./IkConstraintData":25,"./IkConstraintTimeline":26,"./RotateTimeline":29,"./ScaleTimeline":30,"./SkeletonData":33,"./Skin":35,"./SlotData":38,"./TranslateTimeline":40}],35:[function(t,e,n){var i=t("../SpineUtil");i.Skin=function(t){this.name=t,this.attachments={}},i.Skin.prototype={addAttachment:function(t,e,n){this.attachments[t+":"+e]=n},getAttachment:function(t,e){return this.attachments[t+":"+e]},_attachAll:function(t,e){for(var n in e.attachments){var i=n.indexOf(":"),a=parseInt(n.substring(0,i)),r=n.substring(i+1),o=t.slots[a];if(o.attachment&&o.attachment.name==r){var s=this.getAttachment(a,r);s&&o.setAttachment(s)}}}},e.exports=i.Skin},{"../SpineUtil":42}],36:[function(t,e,n){var i=t("../SpineUtil")||{};i.AttachmentType=t("./AttachmentType"),i.SkinnedMeshAttachment=function(t){this.name=t},i.SkinnedMeshAttachment.prototype={type:i.AttachmentType.skinnedmesh,bones:null,weights:null,uvs:null,regionUVs:null,triangles:null,hullLength:0,r:1,g:1,b:1,a:1,path:null,rendererObject:null,regionU:0,regionV:0,regionU2:0,regionV2:0,regionRotate:!1,regionOffsetX:0,regionOffsetY:0,regionWidth:0,regionHeight:0,regionOriginalWidth:0,regionOriginalHeight:0,edges:null,width:0,height:0,updateUVs:function(t,e,n,a,r){var o=this.regionU2-this.regionU,s=this.regionV2-this.regionV,l=this.regionUVs.length;if(this.uvs&&this.uvs.length==l||(this.uvs=new i.Float32Array(l)),this.regionRotate)for(var h=0;l>h;h+=2)this.uvs[h]=this.regionU+this.regionUVs[h+1]*o,this.uvs[h+1]=this.regionV+s-this.regionUVs[h]*s;else for(var h=0;l>h;h+=2)this.uvs[h]=this.regionU+this.regionUVs[h]*o,this.uvs[h+1]=this.regionV+this.regionUVs[h+1]*s},computeWorldVertices:function(t,e,n,i){var a,r,o,s,l,h,m,u=n.bone.skeleton.bones,f=this.weights,c=this.bones,p=0,d=0,g=0,v=0,A=c.length;if(n.attachmentVertices.length)for(var S=n.attachmentVertices;A>d;p+=2){for(r=0,o=0,a=c[d++]+d;a>d;d++,g+=3,v+=2)s=u[c[d]],l=f[g]+S[v],h=f[g+1]+S[v+1],m=f[g+2],r+=(l*s.m00+h*s.m01+s.worldX)*m,o+=(l*s.m10+h*s.m11+s.worldY)*m;i[p]=r+t,i[p+1]=o+e}else for(;A>d;p+=2){for(r=0,o=0,a=c[d++]+d;a>d;d++,g+=3)s=u[c[d]],l=f[g],h=f[g+1],m=f[g+2],r+=(l*s.m00+h*s.m01+s.worldX)*m,o+=(l*s.m10+h*s.m11+s.worldY)*m;i[p]=r+t,i[p+1]=o+e}}},e.exports=i.SkinnedMeshAttachment},{"../SpineUtil":42,"./AttachmentType":11}],37:[function(t,e,n){var i=t("../SpineUtil");i.Slot=function(t,e){this.data=t,this.bone=e,this.setToSetupPose()},i.Slot.prototype={r:1,g:1,b:1,a:1,_attachmentTime:0,attachment:null,attachmentVertices:[],setAttachment:function(t){this.attachment=t,this._attachmentTime=this.bone.skeleton.time,this.attachmentVertices.length=0},setAttachmentTime:function(t){this._attachmentTime=this.bone.skeleton.time-t},getAttachmentTime:function(){return this.bone.skeleton.time-this._attachmentTime},setToSetupPose:function(){var t=this.data;this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this.blendMode=t.blendMode;for(var e=this.bone.skeleton.data.slots,n=0,i=e.length;i>n;n++)if(e[n]==t){this.setAttachment(t.attachmentName?this.bone.skeleton.getAttachmentBySlotIndex(n,t.attachmentName):null);break}}},e.exports=i.Slot},{"../SpineUtil":42}],38:[function(t,e,n){var i=t("../SpineUtil");i.SlotData=function(t,e){this.name=t,this.boneData=e},i.SlotData.PIXI_BLEND_MODE_MAP={multiply:PIXI.BLEND_MODES.MULTIPLY,screen:PIXI.BLEND_MODES.SCREEN,additive:PIXI.BLEND_MODES.ADD,normal:PIXI.BLEND_MODES.NORMAL},i.SlotData.prototype={r:1,g:1,b:1,a:1,attachmentName:null,blendMode:PIXI.BLEND_MODES.NORMAL},e.exports=i.SlotData},{"../SpineUtil":42}],39:[function(t,e,n){var i=t("../SpineUtil");i.TrackEntry=function(){},i.TrackEntry.prototype={next:null,previous:null,animation:null,loop:!1,delay:0,time:0,lastTime:-1,endTime:0,timeScale:1,mixTime:0,mixDuration:0,mix:1,onStart:null,onEnd:null,onComplete:null,onEvent:null},e.exports=i.TrackEntry},{"../SpineUtil":42}],40:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.Curves=t("./Curves"),i.TranslateTimeline=function(t){this.curves=new i.Curves(t),this.frames=[],this.frames.length=3*t},i.TranslateTimeline.prototype={boneIndex:0,getFrameCount:function(){return this.frames.length/3},setFrame:function(t,e,n,i){t*=3,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=i},apply:function(t,e,n,a,r){var o=this.frames;if(!(n<o[0])){var s=t.bones[this.boneIndex];if(n>=o[o.length-3])return s.x+=(s.data.x+o[o.length-2]-s.x)*r,void(s.y+=(s.data.y+o[o.length-1]-s.y)*r);var l=i.Animation.binarySearch(o,n,3),h=o[l-2],m=o[l-1],u=o[l],f=1-(n-u)/(o[l+-3]-u);f=this.curves.getCurvePercent(l/3-1,f),s.x+=(s.data.x+h+(o[l+1]-h)*f-s.x)*r,s.y+=(s.data.y+m+(o[l+2]-m)*f-s.y)*r}}},e.exports=i.TranslateTimeline},{"../SpineUtil":42,"./Animation":2,"./Curves":16}],41:[function(t,e,n){var i=t("../SpineUtil");i.Animation=t("./Animation"),i.AnimationStateData=t("./AnimationStateData"),i.AnimationState=t("./AnimationState"),i.AtlasAttachmentParser=t("./AtlasAttachmentParser"),i.Atlas=t("./Atlas"),i.AtlasPage=t("./AtlasPage"),i.AtlasReader=t("./AtlasReader"),i.AtlasRegion=t("./AtlasRegion"),i.AttachmentTimeline=t("./AttachmentTimeline"),i.AttachmentType=t("./AttachmentType"),i.BoneData=t("./BoneData"),i.Bone=t("./Bone"),i.BoundingBoxAttachment=t("./BoundingBoxAttachment"),i.ColorTimeline=t("./ColorTimeline"),i.Curves=t("./Curves"),i.DrawOrderTimeline=t("./DrawOrderTimeline"),i.EventData=t("./EventData"),i.Event=t("./Event"),i.EventTimeline=t("./EventTimeline"),i.FfdTimeline=t("./FfdTimeline"),i.FlipXTimeline=t("./FlipXTimeline"),i.FlipYTimeline=t("./FlipYTimeline"),i.IkConstraintData=t("./IkConstraintData"),i.IkConstraint=t("./IkConstraint"),i.IkConstraintTimeline=t("./IkConstraintTimeline"),i.MeshAttachment=t("./MeshAttachment"),i.RegionAttachment=t("./RegionAttachment"),i.RotateTimeline=t("./RotateTimeline"),i.ScaleTimeline=t("./ScaleTimeline"),i.SkeletonBounds=t("./SkeletonBounds"),i.SkeletonData=t("./SkeletonData"),i.Skeleton=t("./Skeleton"),i.SkeletonJsonParser=t("./SkeletonJsonParser"),i.Skin=t("./Skin.js"),i.SkinnedMeshAttachment=t("./SkinnedMeshAttachment"),i.SlotData=t("./SlotData"),i.Slot=t("./Slot"),i.TrackEntry=t("./TrackEntry"),i.TranslateTimeline=t("./TranslateTimeline"),e.exports=i},{"../SpineUtil":42,"./Animation":2,"./AnimationState":3,"./AnimationStateData":4,"./Atlas":5,"./AtlasAttachmentParser":6,"./AtlasPage":7,"./AtlasReader":8,"./AtlasRegion":9,"./AttachmentTimeline":10,"./AttachmentType":11,"./Bone":12,"./BoneData":13,"./BoundingBoxAttachment":14,"./ColorTimeline":15,"./Curves":16,"./DrawOrderTimeline":17,"./Event":18,"./EventData":19,"./EventTimeline":20,"./FfdTimeline":21,"./FlipXTimeline":22,"./FlipYTimeline":23,"./IkConstraint":24,"./IkConstraintData":25,"./IkConstraintTimeline":26,"./MeshAttachment":27,"./RegionAttachment":28,"./RotateTimeline":29,"./ScaleTimeline":30,"./Skeleton":31,"./SkeletonBounds":32,"./SkeletonData":33,"./SkeletonJsonParser":34,"./Skin.js":35,"./SkinnedMeshAttachment":36,"./Slot":37,"./SlotData":38,"./TrackEntry":39,"./TranslateTimeline":40}],42:[function(t,e,n){e.exports={radDeg:180/Math.PI,degRad:Math.PI/180,temp:[],Float32Array:"undefined"==typeof Float32Array?Array:Float32Array,Uint16Array:"undefined"==typeof Uint16Array?Array:Uint16Array}},{}],43:[function(t,e,n){function i(t){if(PIXI.Container.call(this),!t)throw new Error("The spineData param is required.");if("string"==typeof t)throw new Error('spineData param cant be string. Please use PIXI.spine.Spine.fromAtlas("YOUR_RESOURCE_NAME") from now on.');this.spineData=t,this.skeleton=new a.Skeleton(t),this.skeleton.updateWorldTransform(),this.stateData=new a.AnimationStateData(t),this.state=new a.AnimationState(this.stateData),this.slotContainers=[];for(var e=0,n=this.skeleton.slots.length;n>e;e++){var i=this.skeleton.slots[e],r=i.attachment,o=new PIXI.Container;if(this.slotContainers.push(o),this.addChild(o),r instanceof a.RegionAttachment){var s=r.rendererObject.name,l=this.createSprite(i,r);i.currentSprite=l,i.currentSpriteName=s,o.addChild(l)}else{if(!(r instanceof a.MeshAttachment))continue;var h=this.createMesh(i,r);i.currentMesh=h,i.currentMeshName=r.name,o.addChild(h)}}this.autoUpdate=!0}var a=t("../SpineRuntime"),r=t("../loaders/atlasParser");a.Bone.yDown=!0,i.fromAtlas=function(t){var e=r.AnimCache[t];if(!e)throw new Error('Spine data "'+t+'" does not exist in the animation cache');return new i(e)},i.prototype=Object.create(PIXI.Container.prototype),i.prototype.constructor=i,e.exports=i,i.globalAutoUpdate=!0,Object.defineProperties(i.prototype,{autoUpdate:{get:function(){return this.updateTransform===i.prototype.autoUpdateTransform},set:function(t){this.updateTransform=t?i.prototype.autoUpdateTransform:PIXI.Container.prototype.updateTransform}}}),i.prototype.update=function(t){this.state.update(t),this.state.apply(this.skeleton),this.skeleton.updateWorldTransform();for(var e=this.skeleton.drawOrder,n=this.skeleton.slots,i=0,r=e.length;r>i;i++)this.children[i]=this.slotContainers[e[i]];for(i=0,r=n.length;r>i;i++){var o=n[i],s=o.attachment,l=this.slotContainers[i];if(s){var h=s.type;/*AttachBugfixStart*/if (o && typeof o.oldAttType === 'undefined') {o.oldAttType = h;}var attachmentChanged = h !== o.oldAttType;if (attachmentChanged) {o.oldAttType = h;if(h===a.AttachmentType.region){if(o.meshes)for(x in o.meshes)o.meshes[x].visible=!1;o.sprites&&o.sprites[s.rendererObject.name]&&(o.sprites[s.rendererObject.name].visible=!0)}else{if(l.position.x=0,l.position.y=0,l.scale.x=1,l.scale.y=1,l.rotation=0,o.sprites)for(x in o.sprites)o.sprites[x].visible=!1;o.meshes&&o.meshes[s.name]&&(o.meshes[s.name].visible=!0)}}/*AttachBugfixEnd*/if(h===a.AttachmentType.region){if(s.rendererObject&&(!o.currentSpriteName||o.currentSpriteName!==s.rendererObject.name)){var m=s.rendererObject.name;if(void 0!==o.currentSprite&&(o.currentSprite.visible=!1),o.sprites=o.sprites||{},void 0!==o.sprites[m])o.sprites[m].visible=!0;else{var u=this.createSprite(o,s);l.addChild(u)}o.currentSprite=o.sprites[m],o.currentSpriteName=m}var f=o.bone;l.position.x=f.worldX+s.x*f.m00+s.y*f.m01,l.position.y=f.worldY+s.x*f.m10+s.y*f.m11,l.scale.x=f.worldScaleX,l.scale.y=f.worldScaleY,l.rotation=-(o.bone.worldRotation*a.degRad),f.worldFlipX&&(l.scale.x=-l.scale.x,l.rotation=-l.rotation),f.worldFlipY==a.Bone.yDown&&(l.scale.y=-l.scale.y,l.rotation=-l.rotation),o.currentSprite.blendMode=o.blendMode,o.currentSprite.tint=PIXI.utils.rgb2hex([o.r,o.g,o.b])}else{if(h!==a.AttachmentType.skinnedmesh&&h!==a.AttachmentType.mesh){l.visible=!1;continue}if(!o.currentMeshName||o.currentMeshName!==s.name){var c=s.name;if(void 0!==o.currentMesh&&(o.currentMesh.visible=!1),o.meshes=o.meshes||{},void 0!==o.meshes[c])o.meshes[c].visible=!0;else{var p=this.createMesh(o,s);l.addChild(p)}o.currentMesh=o.meshes[c],o.currentMeshName=c}s.computeWorldVertices(o.bone.skeleton.x,o.bone.skeleton.y,o,o.currentMesh.vertices)}l.visible=!0,l.alpha=o.a}else l.visible=!1}},i.prototype.autoUpdateTransform=function(){if(i.globalAutoUpdate){this.lastTime=this.lastTime||Date.now();var t=.001*(Date.now()-this.lastTime);this.lastTime=Date.now(),this.update(t)}else this.lastTime=0;PIXI.Container.prototype.updateTransform.call(this)},i.prototype.createSprite=function(t,e){var n=e.rendererObject,i=n.page.rendererObject,r=new PIXI.Rectangle(n.x,n.y,n.rotate?n.height:n.width,n.rotate?n.width:n.height),o=new PIXI.Texture(i,r),s=new PIXI.Sprite(o),l=n.rotate?.5*Math.PI:0;return s.scale.x=e.width/n.originalWidth*e.scaleX,s.scale.y=e.height/n.originalHeight*e.scaleY,s.rotation=l-e.rotation*a.degRad,s.anchor.x=(.5*n.originalWidth-n.offsetX)/n.width,s.anchor.y=1-(.5*n.originalHeight-n.offsetY)/n.height,s.alpha=e.a,t.sprites=t.sprites||{},t.sprites[n.name]=s,s},i.prototype.createMesh=function(t,e){var n=e.rendererObject,i=n.page.rendererObject,a=new PIXI.Texture(i),r=new PIXI.mesh.Mesh(a,new Float32Array(e.uvs.length),new Float32Array(e.uvs),new Uint16Array(e.triangles),PIXI.mesh.Mesh.DRAW_MODES.TRIANGLES);return r.canvasPadding=1.5,r.alpha=e.a,t.meshes=t.meshes||{},t.meshes[e.name]=r,r}},{"../SpineRuntime":41,"../loaders/atlasParser":45}],44:[function(t,e,n){var i=t("./atlasParser");PIXI.loaders.Loader.addPixiMiddleware(i),PIXI.loader.use(i())},{"./atlasParser":45}],45:[function(t,e,n){var i=PIXI.loaders.Resource,a=t("../SpineRuntime"),r=t("./imageLoaderAdapter"),o=e.exports=function(){return function(t,e){if(!t.data||!t.isJson||!t.data.bones)return e();var n=t.url.substr(0,t.url.lastIndexOf("."))+".atlas",s={crossOrigin:t.crossOrigin,xhrType:i.XHR_RESPONSE_TYPE.TEXT,metadata:t.metadata.spineMetadata},l={crossOrigin:t.crossOrigin,metadata:t.metadata.imageMetadata},h=t.url.substr(0,t.url.lastIndexOf("/")+1),m=r(this,t.name+"_atlas_page_",h,l);this.add(t.name+"_atlas",n,s,function(n){new a.Atlas(this.xhr.responseText,m,function(n){var i=new a.SkeletonJsonParser(new a.AtlasAttachmentParser(n)),r=i.readSkeletonData(t.data);t.spineData=r,t.spineAtlas=n,o.enableCaching&&(o.AnimCache[t.name]=t.spineData),e()})})}};o.AnimCache={},o.enableCaching=!0},{"../SpineRuntime":41,"./imageLoaderAdapter":46}],46:[function(t,e,n){t("../SpineRuntime");e.exports=function(t,e,n,i){return n&&n.lastIndexOf("/")!==n.length-1&&(n+="/"),function(a,r){var o=e+a,s=n+a;t.add(o,s,i,function(t){r(t.texture.baseTexture)})}}},{"../SpineRuntime":41}],47:[function(t,e,n){e.exports={atlasParser:t("./atlasParser"),Loader:t("./Loader"),syncImageLoaderAdapter:t("./syncImageLoaderAdapter"),imageLoaderAdapter:t("./imageLoaderAdapter")}},{"./Loader":44,"./atlasParser":45,"./imageLoaderAdapter":46,"./syncImageLoaderAdapter":48}],48:[function(t,e,n){t("../SpineRuntime");e.exports=function(t,e){return t&&t.lastIndexOf("/")!==t.length-1&&(t+="/"),function(t,n){n(PIXI.BaseTexture.fromImage(t,e))}}},{"../SpineRuntime":41}]},{},[1]);

console.log("Loaded PIXI.JS (with Spine) Gadget.");