window.SpinePlugin=function(n){var i={};function r(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=n,r.c=i,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=35)}([function(t,e){function s(t,e,n,i){for(var r in e)if(e.hasOwnProperty(r)){var s=(l=e,u=r,f=d=void 0,f=(c=n)?l[u]:Object.getOwnPropertyDescriptor(l,u),!c&&f.value&&"object"==typeof f.value&&(f=f.value),!(!f||!((d=f).get&&"function"==typeof d.get||d.set&&"function"==typeof d.set))&&(void 0===f.enumerable&&(f.enumerable=!0),void 0===f.configurable&&(f.configurable=!0),f));if(!1!==s){if(o=(i||t).prototype,a=r,h=void 0,(h=Object.getOwnPropertyDescriptor(o,a))&&(h.value&&"object"==typeof h.value&&(h=h.value),!1===h.configurable)){if(p.ignoreFinals)continue;throw new Error("cannot override final property '"+r+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,r,s)}else t.prototype[r]=e[r]}var o,a,h,l,u,c,d,f}function o(t,e){if(e){Array.isArray(e)||(e=[e]);for(var n=0;nMath.PI&&(t-=i.PI2),Math.abs(((t+i.TAU)%i.PI2-i.PI2)%i.PI2)}},function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e){t.exports=function(t,e,n){return Math.max(e,Math.min(n,t))}},function(t,e,n){var i=n(1);t.exports=function(t){return t*i.RAD_TO_DEG}},function(t,e,n){var i=new(n(0))({initialize:function(t,e,n){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=n||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new i(this.x,this.y,this.z)},crossVectors:function(t,e){var n=t.x,i=t.y,r=t.z,s=e.x,o=e.y,a=e.z;return this.x=i*a-r*o,this.y=r*s-n*a,this.z=n*o-i*s,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0;return Math.sqrt(e*e+n*n+i*i)},distanceSq:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0;return e*e+n*n+i*i},length:function(){var t=this.x,e=this.y,n=this.z;return Math.sqrt(t*t+e*e+n*n)},lengthSq:function(){var t=this.x,e=this.y,n=this.z;return t*t+e*e+n*n},normalize:function(){var t=this.x,e=this.y,n=this.z,i=t*t+e*e+n*n;return 0s[0]&&(e=1),s[8]>s[3*e+e]&&(e=2),n=a[e],i=a[n],r=Math.sqrt(s[3*e+e]-s[3*n+n]-s[3*i+i]+1),h[e]=.5*r,r=.5/r,h[n]=(s[3*n+e]+s[3*e+n])*r,h[i]=(s[3*i+e]+s[3*e+i])*r,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(s[3*i+n]-s[3*n+i])*r),this}});t.exports=d},function(t,e,n){var r=n(15),s=n(33);t.exports=function(t,e){var n=void 0===t?s():r({},t);if(e)for(var i in e)void 0!==e[i]&&(n[i]=e[i]);return n}},function(t,e){t.exports=function(t,e,n,i,r,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===n&&(n=""),void 0===i&&(i=""),void 0===r&&(r=0),void 0===s&&(s=!1),{responseType:t,async:e,user:n,password:i,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:s}}},function(t,e){t.exports=function(){}},function(t,e,n){var u=n(36),i=n(0),p=n(12),r=n(150),s=n(151),v=n(175),h=n(176),c=n(194),o=new i({Extends:s,initialize:function(t,e){s.call(this,t,e);var n=e.game;this.isWebGL=2===n.config.renderType,this.cache=n.cache.addCustom("spine"),this.spineTextures=n.cache.addCustom("spineTextures"),this.json=n.cache.json,this.textures=n.textures,this.drawDebug=!1,this.gl,this.renderer,this.sceneRenderer,this.skeletonRenderer,this.skeletonDebugRenderer,this.plugin=v,this.temp1,this.temp2,this.isWebGL?(this.runtime=v.webgl,this.renderer=n.renderer,this.gl=n.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=v.canvas,this.renderer=n.renderer,this.getAtlas=this.getAtlasCanvas);var l=this;e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",function(t,e,n,i,r){var s=new c(this.scene,l,t,e,n,i,r);return this.displayList.add(s),this.updateList.add(s),s},function(t,e){void 0===t&&(t={});var n=p(t,"key",null),i=p(t,"animationName",null),r=p(t,"loop",!1),s=new c(this.scene,l,0,0,n,i,r);void 0!==e&&(t.add=e),u(this.scene,s,t);var o=p(t,"skinName",!1);o&&s.setSkinByName(o);var a=p(t,"slotName",!1),h=p(t,"attachmentName",null);return a&&s.setAttachment(a,h),s.refresh()})},boot:function(){this.isWebGL?(this.bootWebGL(),this.onResize(),this.game.scale.on(r,this.onResize,this)):this.bootCanvas();var t=this.systems.events;t.once("shutdown",this.shutdown,this),t.once("destroy",this.destroy,this)},bootCanvas:function(){this.skeletonRenderer=new v.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){this.sceneRenderer=new v.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0);function t(t,e){var n;t===this.srcBlend&&e===this.dstBlend||(n=this.context.gl,this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),n.blendFunc(this.srcBlend,this.dstBlend)))}this.sceneRenderer.batcher.setBlendMode=t,this.sceneRenderer.shapes.setBlendMode=t,this.skeletonRenderer=this.sceneRenderer.skeletonRenderer,this.skeletonDebugRenderer=this.sceneRenderer.skeletonDebugRenderer,this.temp1=new v.webgl.Vector3(0,0,0),this.temp2=new v.webgl.Vector3(0,0,0)},getAtlasCanvas:function(t){var e=this.cache.get(t);if(e){var n,i=this.spineTextures;return i.has(t)?i.get(t):(n=this.textures,new v.TextureAtlas(e.data,function(t){return new v.canvas.CanvasTexture(n.get(e.prefix+t).getSourceImage())}))}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var n,i,r=this.spineTextures,s=r.has(t)?r.get(t):(n=this.textures,(i=this.sceneRenderer.context.gl).pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),new v.TextureAtlas(e.data,function(t){return new v.webgl.GLTexture(i,n.get(e.prefix+t).getSourceImage(),!1)}));return s}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,n,i,r,s){var o;if(Array.isArray(t))for(var a=0;a=i.PI2-n?t=e:(Math.abs(e-t)>Math.PI&&(e>>0,n=(e*=n)>>>0,n+=4294967296*(e-=n);return 2.3283064365386963e-10*((this.n=n)>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e= 0.");if(null==e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=n}function de(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var n=0;n= 0.");if(null==e)throw new Error("name cannot be null.");if(null==n)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=n}function be(t,e){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new N.Vector2,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.rotateMix=t.rotateMix,this.translateMix=t.translateMix,this.scaleMix=t.scaleMix,this.shearMix=t.shearMix,this.bones=new Array;for(var n=0;n>>1;;){if(t[(s+1)*n]<=e?i=s+1:r=s,i==r)return(i+1)*n;s=i+r>>>1}},r.linearSearch=function(t,e,n){for(var i=0,r=t.length-n;i<=r;i+=n)if(t[i]>e)return i;return-1},r);function r(t,e,n){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.timelineIds=[];for(var i=0;i 0: "+t);this.curves=X.Utils.newFloatArray((t-1)*m.BEZIER_SIZE)}X.CurveTimeline=s;var o,a=(oe(M,o=s),M.prototype.getPropertyId=function(){return(n.rotate<<24)+this.boneIndex},M.prototype.setFrame=function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+M.ROTATION]=n},M.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=a[a.length-M.ENTRIES]){var u=a[a.length+M.PREV_ROTATION];switch(s){case Y.setup:h.rotation=h.data.rotation+u*r;break;case Y.first:case Y.replace:u+=h.data.rotation-h.rotation,u-=360*(16384-(16384.499999999996-u/360|0));case Y.add:h.rotation+=u*r}}else{var c=z.binarySearch(a,n,M.ENTRIES),d=a[c+M.PREV_ROTATION],f=a[c],p=this.getCurvePercent((c>>1)-1,1-(n-f)/(a[c+M.PREV_TIME]-f)),v=d+((v=a[c+M.ROTATION]-d)-360*(16384-(16384.499999999996-v/360|0)))*p;switch(s){case Y.setup:h.rotation=h.data.rotation+(v-360*(16384-(16384.499999999996-v/360|0)))*r;break;case Y.first:case Y.replace:v+=h.data.rotation-h.rotation;case Y.add:h.rotation+=(v-360*(16384-(16384.499999999996-v/360|0)))*r}}},M.ENTRIES=2,M.PREV_TIME=-2,M.PREV_ROTATION=-1,M.ROTATION=1,M);function M(t){var e=o.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t<<1),e}X.RotateTimeline=a;var h,l=(oe(p,h=s),p.prototype.getPropertyId=function(){return(n.translate<<24)+this.boneIndex},p.prototype.setFrame=function(t,e,n,i){t*=p.ENTRIES,this.frames[t]=e,this.frames[t+p.X]=n,this.frames[t+p.Y]=i},p.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=a[a.length-p.ENTRIES]?(d=a[a.length+p.PREV_X],f=a[a.length+p.PREV_Y]):(d=a[(l=z.binarySearch(a,n,p.ENTRIES))+p.PREV_X],f=a[l+p.PREV_Y],u=a[l],c=this.getCurvePercent(l/p.ENTRIES-1,1-(n-u)/(a[l+p.PREV_TIME]-u)),d+=(a[l+p.X]-d)*c,f+=(a[l+p.Y]-f)*c),s){case Y.setup:h.x=h.data.x+d*r,h.y=h.data.y+f*r;break;case Y.first:case Y.replace:h.x+=(h.data.x+d-h.x)*r,h.y+=(h.data.y+f-h.y)*r;break;case Y.add:h.x+=d*r,h.y+=f*r}}},p.ENTRIES=3,p.PREV_TIME=-3,p.PREV_X=-2,p.PREV_Y=-1,p.X=1,p.Y=2,p);function p(t){var e=h.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*p.ENTRIES),e}X.TranslateTimeline=l;var u,c=(oe(x,u=l),x.prototype.getPropertyId=function(){return(n.scale<<24)+this.boneIndex},x.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=a[a.length-x.ENTRIES]?(d=a[a.length+x.PREV_X]*h.data.scaleX,a[a.length+x.PREV_Y]*h.data.scaleY):(d=a[(l=z.binarySearch(a,n,x.ENTRIES))+x.PREV_X],f=a[l+x.PREV_Y],u=a[l],c=this.getCurvePercent(l/x.ENTRIES-1,1-(n-u)/(a[l+x.PREV_TIME]-u)),d=(d+(a[l+x.X]-d)*c)*h.data.scaleX,(f+(a[l+x.Y]-f)*c)*h.data.scaleY),1==r)s==Y.add?(h.scaleX+=d-h.data.scaleX,h.scaleY+=f-h.data.scaleY):(h.scaleX=d,h.scaleY=f);else{var p=0,v=0;if(o==g.mixOut)switch(s){case Y.setup:p=h.data.scaleX,v=h.data.scaleY,h.scaleX=p+(Math.abs(d)*X.MathUtils.signum(p)-p)*r,h.scaleY=v+(Math.abs(f)*X.MathUtils.signum(v)-v)*r;break;case Y.first:case Y.replace:p=h.scaleX,v=h.scaleY,h.scaleX=p+(Math.abs(d)*X.MathUtils.signum(p)-p)*r,h.scaleY=v+(Math.abs(f)*X.MathUtils.signum(v)-v)*r;break;case Y.add:p=h.scaleX,v=h.scaleY,h.scaleX=p+(Math.abs(d)*X.MathUtils.signum(p)-h.data.scaleX)*r,h.scaleY=v+(Math.abs(f)*X.MathUtils.signum(v)-h.data.scaleY)*r}else switch(s){case Y.setup:p=Math.abs(h.data.scaleX)*X.MathUtils.signum(d),v=Math.abs(h.data.scaleY)*X.MathUtils.signum(f),h.scaleX=p+(d-p)*r,h.scaleY=v+(f-v)*r;break;case Y.first:case Y.replace:p=Math.abs(h.scaleX)*X.MathUtils.signum(d),v=Math.abs(h.scaleY)*X.MathUtils.signum(f),h.scaleX=p+(d-p)*r,h.scaleY=v+(f-v)*r;break;case Y.add:p=X.MathUtils.signum(d),v=X.MathUtils.signum(f),h.scaleX=Math.abs(h.scaleX)*p+(d-Math.abs(h.data.scaleX)*p)*r,h.scaleY=Math.abs(h.scaleY)*v+(f-Math.abs(h.data.scaleY)*v)*r}}}},x);function x(t){return u.call(this,t)||this}X.ScaleTimeline=c;var d,f=(oe(v,d=l),v.prototype.getPropertyId=function(){return(n.shear<<24)+this.boneIndex},v.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=a[a.length-v.ENTRIES]?(d=a[a.length+v.PREV_X],f=a[a.length+v.PREV_Y]):(d=a[(l=z.binarySearch(a,n,v.ENTRIES))+v.PREV_X],f=a[l+v.PREV_Y],u=a[l],c=this.getCurvePercent(l/v.ENTRIES-1,1-(n-u)/(a[l+v.PREV_TIME]-u)),d+=(a[l+v.X]-d)*c,f+=(a[l+v.Y]-f)*c),s){case Y.setup:h.shearX=h.data.shearX+d*r,h.shearY=h.data.shearY+f*r;break;case Y.first:case Y.replace:h.shearX+=(h.data.shearX+d-h.shearX)*r,h.shearY+=(h.data.shearY+f-h.shearY)*r;break;case Y.add:h.shearX+=d*r,h.shearY+=f*r}}},v);function v(t){return d.call(this,t)||this}X.ShearTimeline=f;var y,w=(oe(E,y=s),E.prototype.getPropertyId=function(){return(n.color<<24)+this.slotIndex},E.prototype.setFrame=function(t,e,n,i,r,s){t*=E.ENTRIES,this.frames[t]=e,this.frames[t+E.R]=n,this.frames[t+E.G]=i,this.frames[t+E.B]=r,this.frames[t+E.A]=s},E.prototype.apply=function(t,e,n,i,r,s,o){var a=t.slots[this.slotIndex];if(a.bone.active){var h=this.frames;if(n=h[h.length-E.ENTRIES]?(v=h[(c=h.length)+E.PREV_R],g=h[c+E.PREV_G],M=h[c+E.PREV_B],m=h[c+E.PREV_A]):(v=h[(d=z.binarySearch(h,n,E.ENTRIES))+E.PREV_R],g=h[d+E.PREV_G],M=h[d+E.PREV_B],m=h[d+E.PREV_A],f=h[d],p=this.getCurvePercent(d/E.ENTRIES-1,1-(n-f)/(h[d+E.PREV_TIME]-f)),v+=(h[d+E.R]-v)*p,g+=(h[d+E.G]-g)*p,M+=(h[d+E.B]-M)*p,m+=(h[d+E.A]-m)*p),1==r?a.color.set(v,g,M,m):(l=a.color,s==Y.setup&&l.setFromColor(a.data.color),l.add((v-l.r)*r,(g-l.g)*r,(M-l.b)*r,(m-l.a)*r))}}},E.ENTRIES=5,E.PREV_TIME=-5,E.PREV_R=-4,E.PREV_G=-3,E.PREV_B=-2,E.PREV_A=-1,E.R=1,E.G=2,E.B=3,E.A=4,E);function E(t){var e=y.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*E.ENTRIES),e}X.ColorTimeline=w;var T,b=(oe(A,T=s),A.prototype.getPropertyId=function(){return(n.twoColor<<24)+this.slotIndex},A.prototype.setFrame=function(t,e,n,i,r,s,o,a,h){t*=A.ENTRIES,this.frames[t]=e,this.frames[t+A.R]=n,this.frames[t+A.G]=i,this.frames[t+A.B]=r,this.frames[t+A.A]=s,this.frames[t+A.R2]=o,this.frames[t+A.G2]=a,this.frames[t+A.B2]=h},A.prototype.apply=function(t,e,n,i,r,s,o){var a=t.slots[this.slotIndex];if(a.bone.active){var h=this.frames;if(n=h[h.length-A.ENTRIES]?(M=h[(f=h.length)+A.PREV_R],m=h[f+A.PREV_G],x=h[f+A.PREV_B],y=h[f+A.PREV_A],w=h[f+A.PREV_R2],E=h[f+A.PREV_G2],T=h[f+A.PREV_B2]):(M=h[(p=z.binarySearch(h,n,A.ENTRIES))+A.PREV_R],m=h[p+A.PREV_G],x=h[p+A.PREV_B],y=h[p+A.PREV_A],w=h[p+A.PREV_R2],E=h[p+A.PREV_G2],T=h[p+A.PREV_B2],v=h[p],g=this.getCurvePercent(p/A.ENTRIES-1,1-(n-v)/(h[p+A.PREV_TIME]-v)),M+=(h[p+A.R]-M)*g,m+=(h[p+A.G]-m)*g,x+=(h[p+A.B]-x)*g,y+=(h[p+A.A]-y)*g,w+=(h[p+A.R2]-w)*g,E+=(h[p+A.G2]-E)*g,T+=(h[p+A.B2]-T)*g),1==r?(a.color.set(M,m,x,y),a.darkColor.set(w,E,T,1)):(l=a.color,u=a.darkColor,s==Y.setup&&(l.setFromColor(a.data.color),u.setFromColor(a.data.darkColor)),l.add((M-l.r)*r,(m-l.g)*r,(x-l.b)*r,(y-l.a)*r),u.add((w-u.r)*r,(E-u.g)*r,(T-u.b)*r,0))}}},A.ENTRIES=8,A.PREV_TIME=-8,A.PREV_R=-7,A.PREV_G=-6,A.PREV_B=-5,A.PREV_A=-4,A.PREV_R2=-3,A.PREV_G2=-2,A.PREV_B2=-1,A.R=1,A.G=2,A.B=3,A.A=4,A.R2=5,A.G2=6,A.B2=7,A);function A(t){var e=T.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*A.ENTRIES),e}X.TwoColorTimeline=b;var R=(S.prototype.getPropertyId=function(){return(n.attachment<<24)+this.slotIndex},S.prototype.getFrameCount=function(){return this.frames.length},S.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},S.prototype.apply=function(t,e,n,i,r,s,o){var a,h,l,u=t.slots[this.slotIndex];u.bone.active&&(o!=g.mixOut?n<(a=this.frames)[0]?s!=Y.setup&&s!=Y.first||this.setAttachment(t,u,u.data.attachmentName):(h=0,h=n>=a[a.length-1]?a.length-1:z.binarySearch(a,n,1)-1,l=this.attachmentNames[h],t.slots[this.slotIndex].setAttachment(null==l?null:t.getAttachment(this.slotIndex,l))):s==Y.setup&&this.setAttachment(t,u,u.data.attachmentName))},S.prototype.setAttachment=function(t,e,n){e.attachment=null==n?null:t.getAttachment(this.slotIndex,n)},S);function S(t){this.frames=X.Utils.newFloatArray(t),this.attachmentNames=new Array(t)}X.AttachmentTimeline=R;var I,C=null,P=(oe(L,I=s),L.prototype.getPropertyId=function(){return(n.deform<<27)+ +this.attachment.id+this.slotIndex},L.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},L.prototype.apply=function(t,e,n,i,r,s,o){var a=t.slots[this.slotIndex];if(a.bone.active){var h=a.getAttachment();if(h instanceof X.VertexAttachment&&h.deformAttachment==this.attachment){var l=a.deform;0==l.length&&(s=Y.setup);var u=this.frameVertices,c=u[0].length,d=this.frames;if(n=d[d.length-1]){var m=u[d.length-1];if(1==r)if(s==Y.add)if(null==(f=h).bones)for(var v=f.vertices,x=0;x=a[h-1])return;if(!(n=a[l];l++)i.push(this.events[l])}}},k);function k(t){this.frames=X.Utils.newFloatArray(t),this.events=new Array(t)}X.EventTimeline=_;var F=(O.prototype.getPropertyId=function(){return n.drawOrder<<24},O.prototype.getFrameCount=function(){return this.frames.length},O.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},O.prototype.apply=function(t,e,n,i,r,s,o){var a=t.drawOrder,h=t.slots;if(o!=g.mixOut){var l=this.frames;if(n=l[l.length-1]?l.length-1:z.binarySearch(l,n)-1,c=this.drawOrders[u];if(null==c)X.Utils.arrayCopy(h,0,a,0,h.length);else for(var d=0,f=c.length;d=d[d.length-N.ENTRIES]?s==Y.setup?(f.mix=f.data.mix+(d[d.length+N.PREV_MIX]-f.data.mix)*r,f.softness=f.data.softness+(d[d.length+N.PREV_SOFTNESS]-f.data.softness)*r,o==g.mixOut?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=d[d.length+N.PREV_BEND_DIRECTION],f.compress=0!=d[d.length+N.PREV_COMPRESS],f.stretch=0!=d[d.length+N.PREV_STRETCH])):(f.mix+=(d[d.length+N.PREV_MIX]-f.mix)*r,f.softness+=(d[d.length+N.PREV_SOFTNESS]-f.softness)*r,o==g.mixIn&&(f.bendDirection=d[d.length+N.PREV_BEND_DIRECTION],f.compress=0!=d[d.length+N.PREV_COMPRESS],f.stretch=0!=d[d.length+N.PREV_STRETCH])):(h=d[(a=z.binarySearch(d,n,N.ENTRIES))+N.PREV_MIX],l=d[a+N.PREV_SOFTNESS],u=d[a],c=this.getCurvePercent(a/N.ENTRIES-1,1-(n-u)/(d[a+N.PREV_TIME]-u)),s==Y.setup?(f.mix=f.data.mix+(h+(d[a+N.MIX]-h)*c-f.data.mix)*r,f.softness=f.data.softness+(l+(d[a+N.SOFTNESS]-l)*c-f.data.softness)*r,o==g.mixOut?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=d[a+N.PREV_BEND_DIRECTION],f.compress=0!=d[a+N.PREV_COMPRESS],f.stretch=0!=d[a+N.PREV_STRETCH])):(f.mix+=(h+(d[a+N.MIX]-h)*c-f.mix)*r,f.softness+=(l+(d[a+N.SOFTNESS]-l)*c-f.softness)*r,o==g.mixIn&&(f.bendDirection=d[a+N.PREV_BEND_DIRECTION],f.compress=0!=d[a+N.PREV_COMPRESS],f.stretch=0!=d[a+N.PREV_STRETCH])))},N.ENTRIES=6,N.PREV_TIME=-6,N.PREV_MIX=-5,N.PREV_SOFTNESS=-4,N.PREV_BEND_DIRECTION=-3,N.PREV_COMPRESS=-2,N.PREV_STRETCH=-1,N.MIX=1,N.SOFTNESS=2,N.BEND_DIRECTION=3,N.COMPRESS=4,N.STRETCH=5,N);function N(t){var e=V.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*N.ENTRIES),e}X.IkConstraintTimeline=D;var U,B=(oe(W,U=s),W.prototype.getPropertyId=function(){return(n.transformConstraint<<24)+this.transformConstraintIndex},W.prototype.setFrame=function(t,e,n,i,r,s){t*=W.ENTRIES,this.frames[t]=e,this.frames[t+W.ROTATE]=n,this.frames[t+W.TRANSLATE]=i,this.frames[t+W.SCALE]=r,this.frames[t+W.SHEAR]=s},W.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.transformConstraints[this.transformConstraintIndex];if(h.active)if(n=a[a.length-W.ENTRIES]?(p=a[(u=a.length)+W.PREV_ROTATE],v=a[u+W.PREV_TRANSLATE],g=a[u+W.PREV_SCALE],M=a[u+W.PREV_SHEAR]):(p=a[(c=z.binarySearch(a,n,W.ENTRIES))+W.PREV_ROTATE],v=a[c+W.PREV_TRANSLATE],g=a[c+W.PREV_SCALE],M=a[c+W.PREV_SHEAR],d=a[c],f=this.getCurvePercent(c/W.ENTRIES-1,1-(n-d)/(a[c+W.PREV_TIME]-d)),p+=(a[c+W.ROTATE]-p)*f,v+=(a[c+W.TRANSLATE]-v)*f,g+=(a[c+W.SCALE]-g)*f,M+=(a[c+W.SHEAR]-M)*f),s==Y.setup?(l=h.data,h.rotateMix=l.rotateMix+(p-l.rotateMix)*r,h.translateMix=l.translateMix+(v-l.translateMix)*r,h.scaleMix=l.scaleMix+(g-l.scaleMix)*r,h.shearMix=l.shearMix+(M-l.shearMix)*r):(h.rotateMix+=(p-h.rotateMix)*r,h.translateMix+=(v-h.translateMix)*r,h.scaleMix+=(g-h.scaleMix)*r,h.shearMix+=(M-h.shearMix)*r)}},W.ENTRIES=5,W.PREV_TIME=-5,W.PREV_ROTATE=-4,W.PREV_TRANSLATE=-3,W.PREV_SCALE=-2,W.PREV_SHEAR=-1,W.ROTATE=1,W.TRANSLATE=2,W.SCALE=3,W.SHEAR=4,W);function W(t){var e=U.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*W.ENTRIES),e}X.TransformConstraintTimeline=B;var q,G=(oe(H,q=s),H.prototype.getPropertyId=function(){return(n.pathConstraintPosition<<24)+this.pathConstraintIndex},H.prototype.setFrame=function(t,e,n){t*=H.ENTRIES,this.frames[t]=e,this.frames[t+H.VALUE]=n},H.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=a[a.length-H.ENTRIES]?d=a[a.length+H.PREV_VALUE]:(d=a[(l=z.binarySearch(a,n,H.ENTRIES))+H.PREV_VALUE],u=a[l],c=this.getCurvePercent(l/H.ENTRIES-1,1-(n-u)/(a[l+H.PREV_TIME]-u)),d+=(a[l+H.VALUE]-d)*c),s==Y.setup?h.position=h.data.position+(d-h.data.position)*r:h.position+=(d-h.position)*r}},H.ENTRIES=2,H.PREV_TIME=-2,H.PREV_VALUE=-1,H.VALUE=1,H);function H(t){var e=q.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*H.ENTRIES),e}X.PathConstraintPositionTimeline=G;var j,Z=(oe(K,j=G),K.prototype.getPropertyId=function(){return(n.pathConstraintSpacing<<24)+this.pathConstraintIndex},K.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=a[a.length-K.ENTRIES]?d=a[a.length+K.PREV_VALUE]:(d=a[(l=z.binarySearch(a,n,K.ENTRIES))+K.PREV_VALUE],u=a[l],c=this.getCurvePercent(l/K.ENTRIES-1,1-(n-u)/(a[l+K.PREV_TIME]-u)),d+=(a[l+K.VALUE]-d)*c),s==Y.setup?h.spacing=h.data.spacing+(d-h.data.spacing)*r:h.spacing+=(d-h.spacing)*r}},K);function K(t){return j.call(this,t)||this}X.PathConstraintSpacingTimeline=Z;var Q,J=(oe($,Q=s),$.prototype.getPropertyId=function(){return(n.pathConstraintMix<<24)+this.pathConstraintIndex},$.prototype.setFrame=function(t,e,n,i){t*=$.ENTRIES,this.frames[t]=e,this.frames[t+$.ROTATE]=n,this.frames[t+$.TRANSLATE]=i},$.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=a[a.length-$.ENTRIES]?(d=a[a.length+$.PREV_ROTATE],f=a[a.length+$.PREV_TRANSLATE]):(d=a[(l=z.binarySearch(a,n,$.ENTRIES))+$.PREV_ROTATE],f=a[l+$.PREV_TRANSLATE],u=a[l],c=this.getCurvePercent(l/$.ENTRIES-1,1-(n-u)/(a[l+$.PREV_TIME]-u)),d+=(a[l+$.ROTATE]-d)*c,f+=(a[l+$.TRANSLATE]-f)*c),s==Y.setup?(h.rotateMix=h.data.rotateMix+(d-h.data.rotateMix)*r,h.translateMix=h.data.translateMix+(f-h.data.translateMix)*r):(h.rotateMix+=(d-h.rotateMix)*r,h.translateMix+=(f-h.translateMix)*r)}},$.ENTRIES=3,$.PREV_TIME=-3,$.PREV_ROTATE=-2,$.PREV_TRANSLATE=-1,$.ROTATE=1,$.TRANSLATE=2,$);function $(t){var e=Q.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*$.ENTRIES),e}X.PathConstraintMixTimeline=J}(re=re||{}),function(R){var t=(S.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,n=0,i=e.length;n=r.trackEnd&&null==r.mixingFrom){e[n]=null,this.queue.end(r),this.disposeNext(r);continue}if(null!=r.mixingFrom&&this.updateMixingFrom(r,t)){var h=r.mixingFrom;for((r.mixingFrom=null)!=h&&(h.mixingTo=null);null!=h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=s}}this.queue.drain()},S.prototype.updateMixingFrom=function(t,e){var n=t.mixingFrom;if(null==n)return!0;var i=this.updateMixingFrom(n,e);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,0=t.mixDuration?(0!=n.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=n.mixingFrom,null!=n.mixingFrom&&(n.mixingFrom.mixingTo=t),t.interruptAlpha=n.interruptAlpha,this.queue.end(n)),i):(n.trackTime+=e*n.timeScale,t.mixTime+=e,!1)},S.prototype.apply=function(t){if(null==t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var e=this.events,n=this.tracks,i=!1,r=0,s=n.length;r=o.trackEnd&&null==o.next&&(h=0);var l=o.animationLast,u=o.getAnimationTime(),c=o.animation.timelines.length,d=o.animation.timelines;if(0==r&&1==h||a==R.MixBlend.add)for(var f=0;f=s[s.length-1]?s.length-1:R.Animation.binarySearch(s,n)-1,this.setAttachment(e,a,t.attachmentNames[o],r)),a.attachmentState<=this.unkeyedState&&(a.attachmentState=this.unkeyedState+S.SETUP))},S.prototype.setAttachment=function(t,e,n,i){e.attachment=null==n?null:t.getAttachment(e.data.index,n),i&&(e.attachmentState=this.unkeyedState+S.CURRENT)},S.prototype.applyRotateTimeline=function(t,e,n,i,r,s,o,a){if(a&&(s[o]=0),1!=i){var h=t,l=h.frames,u=e.bones[h.boneIndex];if(u.active){var c=0,d=0;if(n=l[l.length-R.RotateTimeline.ENTRIES]?d=u.data.rotation+l[l.length+R.RotateTimeline.PREV_ROTATION]:(p=l[(f=R.Animation.binarySearch(l,n,R.RotateTimeline.ENTRIES))+R.RotateTimeline.PREV_ROTATION],v=l[f],g=h.getCurvePercent((f>>1)-1,1-(n-v)/(l[f+R.RotateTimeline.PREV_TIME]-v)),d=l[f+R.RotateTimeline.ROTATION]-p,d=p+(d-=360*(16384-(16384.499999999996-d/360|0)))*g+u.data.rotation,d-=360*(16384-(16384.499999999996-d/360|0)))}var M,m,x,y,w=0,E=d-c;0==(E-=360*(16384-(16384.499999999996-E/360|0)))?w=s[o]:(m=M=0,m=a?(M=0,E):(M=s[o],s[o+1]),x=0i||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:i<=e&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var n=e;;){var i=n.mixingFrom;if(null==i)break;this.queue.end(i),n.mixingFrom=null,n.mixingTo=null,n=i}this.tracks[e.trackIndex]=null,this.queue.drain()}}},S.prototype.setCurrent=function(t,e,n){var i=this.expandToIndex(t);this.tracks[t]=e,null!=i&&(n&&this.queue.interrupt(i),((e.mixingFrom=i).mixingTo=e).mixTime=0,null!=i.mixingFrom&&0=this.tracks.length?null:this.tracks[t]},S.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},S.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);0<=e&&this.listeners.splice(e,1)},S.prototype.clearListeners=function(){this.listeners.length=0},S.prototype.clearListenerNotifications=function(){this.queue.clear()},S.emptyAnimation=new R.Animation("",[],0),S.SUBSEQUENT=0,S.FIRST=1,S.HOLD_SUBSEQUENT=2,S.HOLD_FIRST=3,S.HOLD_MIX=4,S.SETUP=1,S.CURRENT=2,S);function S(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new r(this),this.propertyIDs=new R.IntSet,this.animationsChanged=!1,this.trackEntryPool=new R.Pool(function(){return new e}),this.data=t}R.AnimationState=t;var e=(n.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},n.prototype.getAnimationTime=function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},n.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},n.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},n.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},n);function n(){this.mixBlend=R.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}R.TrackEntry=e;var a,i,r=(s.prototype.start=function(t){this.objects.push(a.start),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.interrupt=function(t){this.objects.push(a.interrupt),this.objects.push(t)},s.prototype.end=function(t){this.objects.push(a.end),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.dispose=function(t){this.objects.push(a.dispose),this.objects.push(t)},s.prototype.complete=function(t){this.objects.push(a.complete),this.objects.push(t)},s.prototype.event=function(t,e){this.objects.push(a.event),this.objects.push(t),this.objects.push(e)},s.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,n=0;nj.MathUtils.PI?U-=j.MathUtils.PI2:U<-j.MathUtils.PI&&(U+=j.MathUtils.PI2),U*=e,V=Math.cos(U),D=Math.sin(U),R.a=V*_-D*F,R.b=V*k-D*O,R.c=D*_+V*F,R.d=D*k+V*O),R.appliedValid=!1}}}},pe.prototype.computeWorldPositions=function(t,e,n,i,r){var s=this.target,o=this.position,a=this.spaces,h=j.Utils.setArraySize(this.positions,3*e+2),l=null,u=t.closed,c=t.worldVerticesLength,d=c/6,f=pe.NONE;if(!t.constantSpeed){var p=t.lengths,v=p[d-=u?1:2];if(i&&(o*=v),r)for(var g=1;g>>1^-(1&n)},e.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},e.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",n=0;n>4){case 12:case 13:e+=String.fromCharCode((31&i)<<6|63&this.readByte()),n+=2;break;case 14:e+=String.fromCharCode((15&i)<<12|(63&this.readByte())<<6|63&this.readByte()),n+=3;break;default:e+=String.fromCharCode(i),n++}}return e},e.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},e.prototype.readBoolean=function(){return 0!=this.readByte()},e);function e(t,e,n,i){void 0===e&&(e=new Array),void 0===n&&(n=0),void 0===i&&(i=new DataView(t.buffer)),this.strings=e,this.index=n,this.buffer=i}var N=function(t,e,n,i,r){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=i,this.inheritDeform=r},u=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}(re=re||{}),C=re=re||{},xe.prototype.update=function(t,e){if(null==t)throw new Error("skeleton cannot be null.");var n=this.boundingBoxes,i=this.polygons,r=this.polygonPool,s=t.slots,o=s.length;n.length=0,r.freeAll(i);for(var a=i.length=0;a=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},xe.prototype.aabbIntersectsSegment=function(t,e,n,i){var r=this.minX,s=this.minY,o=this.maxX,a=this.maxY;if(t<=r&&n<=r||e<=s&&i<=s||o<=t&&o<=n||a<=e&&a<=i)return!1;var h=(i-e)/(n-t),l=h*(r-t)+e;if(st.minX&&this.minYt.minY},xe.prototype.containsPoint=function(t,e){for(var n=this.polygons,i=0,r=n.length;i>1,N=this.clipOutput,U=Z.Utils.setArraySize(l,P+D*f),B=0;B>1;a=i.length&&(i.length=t+1),i[t]||(i[t]={}),i[t][e]=n},e.prototype.addSkin=function(t){for(var e=0;e=this.lines.length?null:this.lines[this.index++]},n.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},n.prototype.readTuple=function(t){var e=this.readLine(),n=e.indexOf(":");if(-1==n)throw new Error("Invalid line: "+e);for(var i=0,r=n+1;i<3;i++){var s=e.indexOf(",",r);if(-1==s)break;t[i]=e.substr(r,s-r).trim(),r=s+1}return t[i]=e.substring(r).trim(),i+1},n);function n(t){this.index=0,this.lines=t.split(/\r\n|\r|\n/)}var v=function(){};f.TextureAtlasPage=v;var i,g=(i=f.TextureRegion,oe(r,i),r);function r(){return null!==i&&i.apply(this,arguments)||this}f.TextureAtlasRegion=g}(re=re||{}),N=re=re||{},be.prototype.isActive=function(){return this.active},be.prototype.apply=function(){this.update()},be.prototype.update=function(){this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld()},be.prototype.applyAbsoluteWorld=function(){for(var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target,s=r.a,o=r.b,a=r.c,h=r.d,l=0N.MathUtils.PI?b-=N.MathUtils.PI2:b<-N.MathUtils.PI&&(b+=N.MathUtils.PI2),b*=t,M=Math.cos(b),m=Math.sin(b),R.a=M*v-m*g,R.b=M*w-m*E,R.c=m*v+M*g,R.d=m*w+M*E,S=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),R.worldX+=(x.x-R.worldX)*e,R.worldY+=(x.y-R.worldY)*e,S=!0),0N.MathUtils.PI?b-=N.MathUtils.PI2:b<-N.MathUtils.PI&&(b+=N.MathUtils.PI2),b=T+(b+c)*i,A=Math.sqrt(w*w+E*E),R.b=Math.cos(b)*A,R.d=Math.sin(b)*A,S=!0),S&&(R.appliedValid=!1)}},be.prototype.applyRelativeWorld=function(){for(var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target,s=r.a,o=r.b,a=r.c,h=r.d,l=0N.MathUtils.PI?y-=N.MathUtils.PI2:y<-N.MathUtils.PI&&(y+=N.MathUtils.PI2),y*=t,M=Math.cos(y),m=Math.sin(y),b.a=M*v-m*g,b.b=M*w-m*E,b.c=m*v+M*g,b.d=m*w+M*E,A=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),b.worldX+=x.x*e,b.worldY+=x.y*e,A=!0),0N.MathUtils.PI?y-=N.MathUtils.PI2:y<-N.MathUtils.PI&&(y+=N.MathUtils.PI2),w=b.b,E=b.d,y=Math.atan2(E,w)+(y-N.MathUtils.PI/2+c)*i,T=Math.sqrt(w*w+E*E),b.b=Math.cos(y)*T,b.d=Math.sin(y)*T,A=!0),A&&(b.appliedValid=!1)}},be.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,o=0,a=s.length;o>1,i=this.indicesArray,r=i.length=0;r>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},r.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},r.WHITE=new r(1,1,1,1),r.RED=new r(1,0,0,1),r.GREEN=new r(0,1,0,1),r.BLUE=new r(0,0,1,1),r.MAGENTA=new r(1,0,1,1),r);function r(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.r=t,this.g=e,this.b=n,this.a=i}t.Color=i;var s=(o.clamp=function(t,e,n){return t=e?t:g.setArraySize(t,e,n)},g.newArray=function(t,e){for(var n=new Array(t),i=0;ithis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,1=this.values.length},R.prototype.addValue=function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0},R.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*s;var o=t.bone.skeleton,a=t.deform,h=this.vertices,l=this.bones;if(null!=l){for(var u=0,c=0,d=0;dthis.vertices.length)throw Error("Mesh can't store more than "+this.maxVertices()+" vertices");this.vertices.set(t,0),this.verticesLength=t.length},e.prototype.setIndices=function(t){if(this.dirtyIndices=!0,t.length>this.indices.length)throw Error("Mesh can't store more than "+this.maxIndices()+" indices");this.indices.set(t,0),this.indicesLength=t.length},e.prototype.draw=function(t,e){this.drawWithOffset(t,e,0,0this.mesh.getVertices().length||this.indicesLength+n.length>this.mesh.getIndices().length)&&this.flush();var i=this.mesh.numVertices();this.mesh.getVertices().set(e,this.verticesLength),this.verticesLength+=e.length,this.mesh.setVerticesLength(this.verticesLength);for(var r=this.mesh.getIndices(),s=this.indicesLength,o=0;o 0.");null===r&&(r=this.color);var o=2*zt.MathUtils.PI/s,a=Math.cos(o),h=Math.sin(o),l=i,u=0;if(t){for(this.check(qt.Filled,3*s+3),s--,d=0;d>1))-2],w=d[p-1],v=0,g=p;v>1,d.numFloats=d.numVertices*E,d.numFloats>d.vertices.length&&(d.vertices=this.vertices=Qt.Utils.newFloatArray(d.numFloats)),S.computeWorldVertices(T,0,S.worldVerticesLength,d.vertices,0,E),p=S.triangles,A=S.region.renderObject.texture,f=S.uvs,g=S.color}if(null!=A){var I=T.color,C=this.tempColor;C.r=M.r*I.r*g.r,C.g=M.g*I.g*g.g,C.b=M.b*I.b*g.b,C.a=M.a*I.a*g.a,s&&(C.r*=C.a,C.g*=C.a,C.b*=C.a);var P=this.tempColor2;null==T.darkColor?P.set(0,0,0,1):(s?(P.r=T.darkColor.r*C.a,P.g=T.darkColor.g*C.a,P.b=T.darkColor.b*C.a):P.setFromColor(T.darkColor),P.a=s?1:0);var L=T.data.blendMode;if(L!=a&&(a=L,t.setBlendMode(Jt.WebGLBlendModeConverter.getSourceGLBlendMode(a,s),Jt.WebGLBlendModeConverter.getDestGLBlendMode(a))),r.isClipping()){r.clipTriangles(d.vertices,d.numFloats,p,p.length,f,C,P,o);var _=new Float32Array(r.clippedVertices),k=r.clippedTriangles;if(null!=this.vertexEffect){var F=this.vertexEffect,O=_;if(o)for(var V=0,D=_.length;V>16&255)/255,r=(t>>8&255)/255,s=(255&t)/255,o=16777215>>24)/255:null,a=this.skeleton;return!e||(n=this.findSlot(e))&&(a=n),a.color.r=i,a.color.g=r,a.color.b=s,null!==o&&(a.color.a=o),this},setSkeletonFromJSON:function(t,e,n,i){return this.setSkeleton(t,e,n,i)},setSkeleton:function(t,e,n,i){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var r=this.plugin.createSkeleton(t,i);this.skeletonData=r.skeletonData,this.preMultipliedAlpha=r.preMultipliedAlpha;var s=r.skeleton;return s.setSkin(),s.setToSetupPose(),this.skeleton=s,r=this.plugin.createAnimationState(s),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=r.state,this.stateData=r.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,n),this.root=this.getRootBone(),this.root&&(this.root.rotation=v(d(this.rotation))+90),this.state.apply(s),s.updateCache(),this.updateSize()},onComplete:function(t){this.emit(g.COMPLETE,t)},onDispose:function(t){this.emit(g.DISPOSE,t)},onEnd:function(t){this.emit(g.END,t)},onEvent:function(t,e){this.emit(g.EVENT,t,e)},onInterrupted:function(t){this.emit(g.INTERRUPTED,t)},onStart:function(t){this.emit(g.START,t)},refresh:function(){return this.root&&(this.root.rotation=v(d(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,n,i){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===n&&(n=0),void 0===i&&(i=0),this.width=t,this.height=e,this.displayOriginX=r.x-n,this.displayOriginY=r.y-i,this},setOffset:function(t,e){var n=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=n.x-t,this.displayOriginY=n.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,n=this.scaleX,i=this.scaleY;t.x=this.x,t.y=e-this.y,t.scaleX=1,t.scaleY=1,t.updateWorldTransform();var r=this.getBounds();return this.width=r.size.x,this.height=r.size.y,this.displayOriginX=this.x-r.offset.x,this.displayOriginY=this.y-(e-(this.height+r.offset.y)),t.scaleX=n,t.scaleY=i,t.updateWorldTransform(),this},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,this.refresh()}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,this.refresh()}},getBoneList:function(){var t=[],e=this.skeletonData;if(e)for(var n=0;n