(function(c,u){"use strict";class z extends u.Texture{constructor(e){super(e)}getImage(){return{width:this.sourceWidth,height:this.sourceHeight}}setFilters(e,t){}setWraps(e,t){}}class $ extends spine.AssetManager{constructor(e="",t,s){super((i,h)=>s[h]=new z(i.bitmap),e,t)}}var P=spine.Color,j=spine.SkeletonClipping,Q=spine.Vector2,Y=spine.Utils,ee=spine.RegionAttachment,te=spine.MeshAttachment,ie=spine.ClippingAttachment;class se{constructor(e,t,s){this.vertices=e,this.numVertices=t,this.numFloats=s}}class N{constructor(e=!0){this.vertexEffect=null,this.tempColor=new P,this.tempColor2=new P,this.vertexSize=8,this.twoColorTint=!1,this.renderable=new se(null,0,0),this.clipper=new j,this.temp=new Q,this.temp2=new Q,this.temp3=new P,this.temp4=new P,this.twoColorTint=e,e&&(this.vertexSize+=4),this.vertices=Y.newFloatArray(this.vertexSize*1024)}draw(e,t=-1,s=-1,i,h){let y=this.clipper,K=this.premultipliedAlpha,T=!1,f=this.temp,g=this.temp2,k=this.temp3,R=this.temp4,d=this.renderable,b=null,B=null,X=e.drawOrder,D=null,F=e.color,L=8,W=!1;t==-1&&(W=!0);for(let G=0,ge=X.length;G=0&&t==S.data.index&&(W=!0),!W){y.clipEndWithSlot(S);continue}s>=0&&s==S.data.index&&(W=!1);let C=S.getAttachment(),J=null,M;if(C instanceof ee){let p=C;d.vertices=this.vertices,d.numVertices=4,d.numFloats=U<<2,p.computeWorldVertices(S.bone,d.vertices,0,U),B=N.QUAD_TRIANGLES,b=p.uvs,J=p.region.renderObject.page.name,M=h[J],D=p.color}else if(C instanceof te){let p=C;d.vertices=this.vertices,d.numVertices=p.worldVerticesLength>>1,d.numFloats=d.numVertices*U,d.numFloats>d.vertices.length&&(d.vertices=this.vertices=Y.newFloatArray(d.numFloats)),p.computeWorldVertices(S,0,p.worldVerticesLength,d.vertices,0,U),B=p.triangles,J=p.region.renderObject.page.name,M=h[J],b=p.uvs,D=p.color}else if(C instanceof ie){let p=C;y.clipStart(S,p);continue}else{y.clipEndWithSlot(S);continue}if(M!=null){let p=S.color,m=this.tempColor;m.r=F.r*p.r*D.r,m.g=F.g*p.g*D.g,m.b=F.b*p.b*D.b,m.a=F.a*p.a*D.a,K&&(m.r*=m.a,m.g*=m.a,m.b*=m.a);let Z=S.data.blendMode;if(y.isClipping()){y.clipTriangles(d.vertices,d.numFloats,B,B.length,b,m,null,T);let n=new Float32Array(y.clippedVertices),I=y.clippedTriangles,w=[],x=[],v=[];if(this.vertexEffect!=null){let r=this.vertexEffect,a=n;for(let l=0,_e=n.length;l<_e;l+=L)f.x=a[l],f.y=a[l+1],k.set(a[l+2],a[l+3],a[l+4],a[l+5]),g.x=a[l+6],g.y=a[l+7],R.set(0,0,0,0),r.transform(f,g,k,R),a[l]=f.x,a[l+1]=f.y,a[l+2]=k.r,a[l+3]=k.g,a[l+4]=k.b,a[l+5]=k.a,a[l+6]=g.x,a[l+7]=g.y,w.push(a[l],-a[l+1]),v.push(a[l+2],a[l+3],a[l+4],a[l+5]),x.push(a[l+6],a[l+7])}else{let r=0;for(;Number.isFinite(n[r+6])&&Number.isFinite(n[r+7]);)w.push(n[r]),w.push(-n[r+1]),v.push(n[r+2]),v.push(n[r+3]),v.push(n[r+4]),v.push(n[r+5]),x.push(n[r+6]),x.push(n[r+7]),r+=this.vertexSize}let O=null,E=null,o;switch(Z){case 1:o="light";break;case 2:o="multiply";break;case 3:o="screen";break;default:o="normal"}E=(255<<24)+v[0]*255|0+(v[1]*255<<8)+(v[2]*255<<16),i.graphics.drawTriangles(M,0,0,w,x,new Uint16Array(I),u.Matrix.EMPTY,v[3],O,o,E)}else{let n=d.vertices,I=[],w=[],x=[];if(this.vertexEffect!=null){let o=this.vertexEffect;for(let r=0,a=0,l=d.numFloats;rh)throw new Error("SpineSkeleton: start must less than end.");if(typeof T=="number"&&(T=this.getAniNameByIndex(e)),s||this._pause||this._currAniName!=T){this._currAniName=T,this.state.setAnimation(this.trackIndex,T,t);let f=this.state.getCurrent(this.trackIndex);f.animationStart=i,h&&h0&&this._onAniSoundStoped(!0))}paused(){if(!this._pause&&(this._pause=!0,this.timer.clear(this,this._update),this.event(u.Event.PAUSED),this._soundChannelArr.length>0)){let e;for(let t=this._soundChannelArr.length,s=0;s0)){let e;for(let t=this._soundChannelArr.length,s=0;s0&&this._onAniSoundStoped(!0)}get templet(){return this._templet}addAnimation(e,t=!1,s=0){s/=1e3;let i=e;typeof i=="number"&&(i=this.getAniNameByIndex(i)),this._currAniName=i,this.state.addAnimation(this.trackIndex,i,t,s)}setMix(e,t,s){s/=1e3;let i=e;typeof i=="number"&&(i=this.getAniNameByIndex(i));let h=t;typeof h=="number"&&(h=this.getAniNameByIndex(h)),this.stateData.setMix(i,h,s)}getBoneByName(e){return this.skeleton.findBone(e)}getSkeleton(){return this.skeleton}setSlotAttachment(e,t){this.skeleton.setAttachment(e,t)}set currentTime(e){if(!(!this._currAniName||!this._templet)){if(e/=1e3,ethis._playEnd||e>this._duration)throw new Error("AnimationPlayer: value must large than playStartTime,small than playEndTime.");this.state.update(e-this.currentPlayTime),this.currentPlayTime=e}}get playState(){return this._currAniName?this._pause?A.paused:A.playing:A.stopped}}A.stopped=0,A.paused=1,A.playing=2,u.ILaya.regClass(A),u.ClassUtils.regClass("laya.layaspine.SpineSkeleton",A),u.ClassUtils.regClass("Laya.SpineSkeleton",A);class V extends u.Resource{constructor(){super(),this._isDestroyed=!1,this._textureDic={},this._layaPremultipliedAlpha=!0,this._spinePremultipliedAlpha=!1}get templet(){return this._templet}set templet(e){this._templet=e}get isDestroyed(){return this._isDestroyed}set isDestroyed(e){this._isDestroyed=e}get spinePremultipliedAlpha(){return this._spinePremultipliedAlpha}set spinePremultipliedAlpha(e){this._spinePremultipliedAlpha=e}buildArmature(){return new A(this)}getAniNameByIndex(e){let t=this.skeletonData.animations[e];return t?t.name:null}getSkinIndexByName(e){let t=this.skeletonData.skins,s;for(let i=0,h=t.length;i