mirror of
https://github.com/photonstorm/phaser
synced 2024-12-25 20:43:26 +00:00
1 line
No EOL
339 KiB
JavaScript
1 line
No EOL
339 KiB
JavaScript
window.SpinePlugin=function(i){var n={};function r(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return i[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=i,r.c=n,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},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 i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},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=62)}([function(t,e){function s(t,e,i,n){for(var r in e)if(e.hasOwnProperty(r)){var s=(l=e,u=r,d=f=void 0,d=(c=i)?l[u]:Object.getOwnPropertyDescriptor(l,u),!c&&d.value&&"object"==typeof d.value&&(d=d.value),!(!d||!((f=d).get&&"function"==typeof f.get||f.set&&"function"==typeof f.set))&&(void 0===d.enumerable&&(d.enumerable=!0),void 0===d.configurable&&(d.configurable=!0),d));if(!1!==s){if(a=(n||t).prototype,o=r,h=void 0,(h=Object.getOwnPropertyDescriptor(a,o))&&(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 a,o,h,l,u,c,f,d}function a(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++)s(t,e[i].prototype||e[i])}}function p(t){var e,i,n;if((t=t||{}).initialize){if("function"!=typeof t.initialize)throw new Error("initialize must be a function");n=t.initialize,delete t.initialize}else{n=t.Extends?(i=t.Extends,function(){i.apply(this,arguments)}):function(){}}t.Extends?(n.prototype=Object.create(t.Extends.prototype),n.prototype.constructor=n,e=t.Extends,delete t.Extends):n.prototype.constructor=n;var r=null;return t.Mixins&&(r=t.Mixins,delete t.Mixins),a(n,r),s(n,t,!0,e),n}p.extend=s,p.mixin=a,p.ignoreFinals=!1,t.exports=p},function(t,e,i){var n=i(0),r=i(31),s=new n({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new s(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return r(this.x,t.x,e)&&r(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return 0<i&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&t<e&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)}});s.ZERO=new s,s.RIGHT=new s(1,0),s.LEFT=new s(-1,0),s.UP=new s(0,-1),s.DOWN=new s(0,1),s.ONE=new s(1,1),t.exports=s},function(t,e){var i={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=i},function(t,e){t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e,i,n){var r=t.length;if(e<0||r<e||i<=e||r<i||r<e+i){if(n)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e){t.exports=function(t,e,i){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1===e.indexOf("."))return i;for(var n=e.split("."),r=t,s=i,a=0;a<n.length;a++){if(!r.hasOwnProperty(n[a])){s=i;break}s=r[n[a]],r=r[n[a]]}return s}return i}},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e,i){var n=i(2);t.exports=function(t){return t>Math.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(2);t.exports=function(t){return t*n.RAD_TO_DEG}},function(t,e){t.exports=function(t,e,i){var n=typeof t;return t&&"number"!=n&&"string"!=n&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:i}},function(t,e,i){var n=i(0),r=i(25),s=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=r.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=s},function(t,e){t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19}},function(t,e,i){var n=i(23),r=i(56);t.exports=function(t,e){if(void 0===e&&(e=90),!n(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=r(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=r(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i<t.length;i++)t[i].reverse();t.reverse()}return t}},function(t,e){t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],r=e;r<i;r++)t[r]=t[r+1];return t.length=i,n}}},function(t,e){t.exports={SKIP_CHECK:-1,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,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e,i){var n=i(2);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i){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=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,r=t.z,s=e.x,a=e.y,o=e.z;return this.x=n*o-r*a,this.y=r*s-i*o,this.z=i*a-n*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,i){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=i||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,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return 0<n&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,a=t.z;return this.x=i*a-n*s,this.y=n*r-e*a,this.z=e*s-i*r,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,r=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=r+e*(t.z-r),this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=e*r[0]+i*r[3]+n*r[6],this.y=e*r[1]+i*r[4]+n*r[7],this.z=e*r[2]+i*r[5]+n*r[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12],this.y=r[1]*e+r[5]*i+r[9]*n+r[13],this.z=r[2]*e+r[6]*i+r[10]*n+r[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,r=t.val,s=e*r[0]+i*r[4]+n*r[8]+r[12],a=e*r[1]+i*r[5]+n*r[9]+r[13],o=e*r[2]+i*r[6]+n*r[10]+r[14],h=e*r[3]+i*r[7]+n*r[11]+r[15];return this.x=s/h,this.y=a/h,this.z=o/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,a=t.z,o=t.w,h=o*e+s*n-a*i,l=o*i+a*e-r*n,u=o*n+r*i-s*e,c=-r*e-s*i-a*n;return this.x=h*o+c*-r+l*-a-u*-s,this.y=l*o+c*-s+u*-r-h*-a,this.z=u*o+c*-a+h*-s-l*-r,this},project:function(t){var e=this.x,i=this.y,n=this.z,r=t.val,s=r[0],a=r[1],o=r[2],h=r[3],l=r[4],u=r[5],c=r[6],f=r[7],d=r[8],p=r[9],m=r[10],g=r[11],v=r[12],M=r[13],x=r[14],y=1/(e*h+i*f+n*g+r[15]);return this.x=(e*s+i*l+n*d+v)*y,this.y=(e*a+i*u+n*p+M)*y,this.z=(e*o+i*c+n*m+x)*y,this},unproject:function(t,e){var i=t.x,n=t.y,r=t.z,s=t.w,a=this.x-i,o=s-this.y-1-n,h=this.z;return this.x=2*a/r-1,this.y=2*o/s-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0,0),n.LEFT=new n(-1,0,0),n.UP=new n(0,-1,0),n.DOWN=new n(0,1,0),n.FORWARD=new n(0,0,1),n.BACK=new n(0,0,-1),n.ONE=new n(1,1,1),t.exports=n},function(t,e,i){var n=i(0),r=i(13),s=i(202),a=i(11),o=i(213),h=i(44),l=i(214),u=i(45),c=new n({initialize:function(t,e){this.loader=t,this.cache=a(e,"cache",!1),this.type=a(e,"type",!1),this.key=a(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.type||!this.key)throw new Error("Error calling 'Loader."+this.type+"' invalid key provided.");this.url=a(e,"url"),void 0===this.url?this.url=t.path+i+"."+a(e,"extension",""):"string"==typeof this.url&&0!==this.url.indexOf("blob:")&&0!==this.url.indexOf("data:")&&(this.url=t.path+this.url),this.src="",this.xhrSettings=u(a(e,"responseType",void 0)),a(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,a(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?r.FILE_POPULATED:r.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=a(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){(this.linkFile=t).linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===r.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=r.FILE_LOADING,this.src=o(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&0===t.responseURL.indexOf("file://")&&0===e.target.status,n=!(e.target&&200!==e.target.status)||i;4===t.readyState&&400<=t.status&&t.status<=599&&(n=!1),this.state=r.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,n)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(s.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=r.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=r.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=r.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(t){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(s.FILE_COMPLETE,e,i,t),this.loader.emit(s.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this)},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){var n;"function"==typeof URL?t.src=URL.createObjectURL(e):((n=new FileReader).onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e))},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},function(t,e){var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e,i){t.exports={ADDED_TO_SCENE:i(225),DESTROY:i(226),REMOVED_FROM_SCENE:i(227),VIDEO_COMPLETE:i(228),VIDEO_CREATED:i(229),VIDEO_ERROR:i(230),VIDEO_LOOP:i(231),VIDEO_PLAY:i(232),VIDEO_SEEKED:i(233),VIDEO_SEEKING:i(234),VIDEO_STOP:i(235),VIDEO_TIMEOUT:i(236),VIDEO_UNLOCKED:i(237)}},function(t,e){t.exports=function(t){if(!Array.isArray(t)||t.length<2||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i<t.length;i++)if(t[i].length!==e)return!1;return!0}},function(t,e,i){var n=i(0),r=i(313),s=i(60),a=i(314),o=i(25),h=i(315),l=i(320),u=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=o.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},function(t,e){t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},function(t,e,i){var u=i(8),c=function(){var t,e,i,n,r,s,a=arguments[0]||{},o=1,h=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[1]||{},o=2),h===o&&(a=this,--o);o<h;o++)if(null!=(t=arguments[o]))for(e in t)i=a[e],a!==(n=t[e])&&(l&&n&&(u(n)||(r=Array.isArray(n)))?(s=r?(r=!1,i&&Array.isArray(i)?i:[]):i&&u(i)?i:{},a[e]=c(l,s,n)):void 0!==n&&(a[e]=n));return a};t.exports=c},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t){return 0<=(t%=2*Math.PI)?t:t+2*Math.PI}},function(t,e,i){var n=i(6);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(6);t.exports=function(t){return n(t,-180,180)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e)<i}},function(t,e,i){var n=i(33);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e,i,n,r){var s=.5*(n-e),a=.5*(r-i),o=t*t;return(2*i-2*n+s+a)*(t*o)+(-3*i+3*n-2*s-a)*o+s*t+i}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e){t.exports=function(t,e,i){return t<=e?0:i<=t?1:(t=(t-e)/(i-e))*t*(3-2*t)}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},function(t,e){t.exports=function(t,e,i,n){var r=Math.cos(n),s=Math.sin(n),a=t.x-e,o=t.y-i;return t.x=a*r-o*s+e,t.y=a*s+o*r+i,t}},function(t,e){t.exports=function(t){return 0<t?Math.ceil(t):Math.floor(t)}},function(t,e,i){var m=i(1);t.exports=function(t,e,i,n,r,s,a,o){void 0===o&&(o=new m);var h=Math.sin(r),l=Math.cos(r),u=l*s,c=h*s,f=-h*a,d=l*a,p=1/(u*d+f*-c);return o.x=d*p*t+-f*p*e+(n*f-i*d)*p,o.y=u*p*e+-c*p*t+(-n*u+i*c)*p,o}},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=l*s-a*h,c=-l*r+a*o,f=h*r-s*o,d=e*u+i*c+n*f;return d?(d=1/d,t[0]=u*d,t[1]=(-l*i+n*h)*d,t[2]=(a*i-n*s)*d,t[3]=c*d,t[4]=(l*e-n*o)*d,t[5]=(-a*e+n*r)*d,t[6]=f*d,t[7]=(-h*e+i*o)*d,t[8]=(s*e-i*r)*d,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return t[0]=s*l-a*h,t[1]=n*h-i*l,t[2]=i*a-n*s,t[3]=a*o-r*l,t[4]=e*l-n*o,t[5]=n*r-e*a,t[6]=r*h-s*o,t[7]=i*o-e*h,t[8]=e*s-i*r,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return e*(l*s-a*h)+i*(-l*r+a*o)+n*(h*r-s*o)},multiply:function(t){var e=this.val,i=e[0],n=e[1],r=e[2],s=e[3],a=e[4],o=e[5],h=e[6],l=e[7],u=e[8],c=t.val,f=c[0],d=c[1],p=c[2],m=c[3],g=c[4],v=c[5],M=c[6],x=c[7],y=c[8];return e[0]=f*i+d*s+p*h,e[1]=f*n+d*a+p*l,e[2]=f*r+d*o+p*u,e[3]=m*i+g*s+v*h,e[4]=m*n+g*a+v*l,e[5]=m*r+g*o+v*u,e[6]=M*i+x*s+y*h,e[7]=M*n+x*a+y*l,e[8]=M*r+x*o+y*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],r=e[2],s=e[3],a=e[4],o=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*s,e[1]=l*n+h*a,e[2]=l*r+h*o,e[3]=l*s-h*i,e[4]=l*a-h*n,e[5]=l*o-h*r,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,r=t.w,s=e+e,a=i+i,o=n+n,h=e*s,l=e*a,u=e*o,c=i*a,f=i*o,d=n*o,p=r*s,m=r*a,g=r*o,v=this.val;return v[0]=1-(c+d),v[3]=l+g,v[6]=u-m,v[1]=l-g,v[4]=1-(h+d),v[7]=f+p,v[2]=u+m,v[5]=f-p,v[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],r=e[1],s=e[2],a=e[3],o=e[4],h=e[5],l=e[6],u=e[7],c=e[8],f=e[9],d=e[10],p=e[11],m=e[12],g=e[13],v=e[14],M=e[15],x=n*h-r*o,y=n*l-s*o,w=n*u-a*o,T=r*l-s*h,E=r*u-a*h,A=s*u-a*l,b=c*g-f*m,R=c*v-d*m,S=c*M-p*m,I=f*v-d*g,C=f*M-p*g,P=d*M-p*v,_=x*P-y*C+w*I+T*S-E*R+A*b;return _?(_=1/_,i[0]=(h*P-l*C+u*I)*_,i[1]=(l*S-o*P-u*R)*_,i[2]=(o*C-h*S+u*b)*_,i[3]=(s*C-r*P-a*I)*_,i[4]=(n*P-s*S+a*R)*_,i[5]=(r*S-n*C-a*b)*_,i[6]=(g*A-v*E+M*T)*_,i[7]=(v*w-m*A-M*y)*_,i[8]=(m*E-g*w+M*x)*_,this):null}});t.exports=n},function(t,e,i){var n=i(0),r=new n({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new r(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},zero:function(){var t=this.val;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=0,this},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[3],r=t[6],s=t[7],a=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=r,t[11]=t[14],t[12]=n,t[13]=s,t[14]=a,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],f=t[11],d=t[12],p=t[13],m=t[14],g=t[15],v=e*a-i*s,M=e*o-n*s,x=e*h-r*s,y=i*o-n*a,w=i*h-r*a,T=n*h-r*o,E=l*p-u*d,A=l*m-c*d,b=l*g-f*d,R=u*m-c*p,S=u*g-f*p,I=c*g-f*m,C=v*I-M*S+x*R+y*b-w*A+T*E;return C?(C=1/C,t[0]=(a*I-o*S+h*R)*C,t[1]=(n*S-i*I-r*R)*C,t[2]=(p*T-m*w+g*y)*C,t[3]=(c*w-u*T-f*y)*C,t[4]=(o*b-s*I-h*A)*C,t[5]=(e*I-n*b+r*A)*C,t[6]=(m*x-d*T-g*M)*C,t[7]=(l*T-c*x+f*M)*C,t[8]=(s*S-a*b+h*E)*C,t[9]=(i*b-e*S-r*E)*C,t[10]=(d*w-p*x+g*v)*C,t[11]=(u*x-l*w-f*v)*C,t[12]=(a*A-s*R-o*E)*C,t[13]=(e*R-i*A+n*E)*C,t[14]=(p*M-d*y-m*v)*C,t[15]=(l*y-u*M+c*v)*C,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],f=t[11],d=t[12],p=t[13],m=t[14],g=t[15];return t[0]=a*(c*g-f*m)-u*(o*g-h*m)+p*(o*f-h*c),t[1]=-(i*(c*g-f*m)-u*(n*g-r*m)+p*(n*f-r*c)),t[2]=i*(o*g-h*m)-a*(n*g-r*m)+p*(n*h-r*o),t[3]=-(i*(o*f-h*c)-a*(n*f-r*c)+u*(n*h-r*o)),t[4]=-(s*(c*g-f*m)-l*(o*g-h*m)+d*(o*f-h*c)),t[5]=e*(c*g-f*m)-l*(n*g-r*m)+d*(n*f-r*c),t[6]=-(e*(o*g-h*m)-s*(n*g-r*m)+d*(n*h-r*o)),t[7]=e*(o*f-h*c)-s*(n*f-r*c)+l*(n*h-r*o),t[8]=s*(u*g-f*p)-l*(a*g-h*p)+d*(a*f-h*u),t[9]=-(e*(u*g-f*p)-l*(i*g-r*p)+d*(i*f-r*u)),t[10]=e*(a*g-h*p)-s*(i*g-r*p)+d*(i*h-r*a),t[11]=-(e*(a*f-h*u)-s*(i*f-r*u)+l*(i*h-r*a)),t[12]=-(s*(u*m-c*p)-l*(a*m-o*p)+d*(a*c-o*u)),t[13]=e*(u*m-c*p)-l*(i*m-n*p)+d*(i*c-n*u),t[14]=-(e*(a*m-o*p)-s*(i*m-n*p)+d*(i*o-n*a)),t[15]=e*(a*c-o*u)-s*(i*c-n*u)+l*(i*o-n*a),this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],f=t[11],d=t[12],p=t[13],m=t[14],g=t[15];return(e*a-i*s)*(c*g-f*m)-(e*o-n*s)*(u*g-f*p)+(e*h-r*s)*(u*m-c*p)+(i*o-n*a)*(l*g-f*d)-(i*h-r*a)*(l*m-c*d)+(n*h-r*o)*(l*p-u*d)},multiply:function(t){var e=this.val,i=e[0],n=e[1],r=e[2],s=e[3],a=e[4],o=e[5],h=e[6],l=e[7],u=e[8],c=e[9],f=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15],M=t.val,x=M[0],y=M[1],w=M[2],T=M[3];return e[0]=x*i+y*a+w*u+T*p,e[1]=x*n+y*o+w*c+T*m,e[2]=x*r+y*h+w*f+T*g,e[3]=x*s+y*l+w*d+T*v,x=M[4],y=M[5],w=M[6],T=M[7],e[4]=x*i+y*a+w*u+T*p,e[5]=x*n+y*o+w*c+T*m,e[6]=x*r+y*h+w*f+T*g,e[7]=x*s+y*l+w*d+T*v,x=M[8],y=M[9],w=M[10],T=M[11],e[8]=x*i+y*a+w*u+T*p,e[9]=x*n+y*o+w*c+T*m,e[10]=x*r+y*h+w*f+T*g,e[11]=x*s+y*l+w*d+T*v,x=M[12],y=M[13],w=M[14],T=M[15],e[12]=x*i+y*a+w*u+T*p,e[13]=x*n+y*o+w*c+T*m,e[14]=x*r+y*h+w*f+T*g,e[15]=x*s+y*l+w*d+T*v,this},multiplyLocal:function(t){var e=[],i=this.val,n=t.val;return e[0]=i[0]*n[0]+i[1]*n[4]+i[2]*n[8]+i[3]*n[12],e[1]=i[0]*n[1]+i[1]*n[5]+i[2]*n[9]+i[3]*n[13],e[2]=i[0]*n[2]+i[1]*n[6]+i[2]*n[10]+i[3]*n[14],e[3]=i[0]*n[3]+i[1]*n[7]+i[2]*n[11]+i[3]*n[15],e[4]=i[4]*n[0]+i[5]*n[4]+i[6]*n[8]+i[7]*n[12],e[5]=i[4]*n[1]+i[5]*n[5]+i[6]*n[9]+i[7]*n[13],e[6]=i[4]*n[2]+i[5]*n[6]+i[6]*n[10]+i[7]*n[14],e[7]=i[4]*n[3]+i[5]*n[7]+i[6]*n[11]+i[7]*n[15],e[8]=i[8]*n[0]+i[9]*n[4]+i[10]*n[8]+i[11]*n[12],e[9]=i[8]*n[1]+i[9]*n[5]+i[10]*n[9]+i[11]*n[13],e[10]=i[8]*n[2]+i[9]*n[6]+i[10]*n[10]+i[11]*n[14],e[11]=i[8]*n[3]+i[9]*n[7]+i[10]*n[11]+i[11]*n[15],e[12]=i[12]*n[0]+i[13]*n[4]+i[14]*n[8]+i[15]*n[12],e[13]=i[12]*n[1]+i[13]*n[5]+i[14]*n[9]+i[15]*n[13],e[14]=i[12]*n[2]+i[13]*n[6]+i[14]*n[10]+i[15]*n[14],e[15]=i[12]*n[3]+i[13]*n[7]+i[14]*n[11]+i[15]*n[15],this.fromArray(e)},translate:function(t){var e=t.x,i=t.y,n=t.z,r=this.val;return r[12]=r[0]*e+r[4]*i+r[8]*n+r[12],r[13]=r[1]*e+r[5]*i+r[9]*n+r[13],r[14]=r[2]*e+r[6]*i+r[10]*n+r[14],r[15]=r[3]*e+r[7]*i+r[11]*n+r[15],this},translateXYZ:function(t,e,i){var n=this.val;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this},scale:function(t){var e=t.x,i=t.y,n=t.z,r=this.val;return r[0]=r[0]*e,r[1]=r[1]*e,r[2]=r[2]*e,r[3]=r[3]*e,r[4]=r[4]*i,r[5]=r[5]*i,r[6]=r[6]*i,r[7]=r[7]*i,r[8]=r[8]*n,r[9]=r[9]*n,r[10]=r[10]*n,r[11]=r[11]*n,this},scaleXYZ:function(t,e,i){var n=this.val;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),r=1-i,s=t.x,a=t.y,o=t.z,h=r*s,l=r*a;return this.fromArray([h*s+i,h*a-n*o,h*o+n*a,0,h*a+n*o,l*a+i,l*o-n*s,0,h*o-n*a,l*o+n*s,r*o*o+i,0,0,0,0,1]),this},rotate:function(t,e){var i=this.val,n=e.x,r=e.y,s=e.z,a=Math.sqrt(n*n+r*r+s*s);if(Math.abs(a)<1e-6)return null;n*=a=1/a,r*=a,s*=a;var o=Math.sin(t),h=Math.cos(t),l=1-h,u=i[0],c=i[1],f=i[2],d=i[3],p=i[4],m=i[5],g=i[6],v=i[7],M=i[8],x=i[9],y=i[10],w=i[11],T=n*n*l+h,E=r*n*l+s*o,A=s*n*l-r*o,b=n*r*l-s*o,R=r*r*l+h,S=s*r*l+n*o,I=n*s*l+r*o,C=r*s*l-n*o,P=s*s*l+h;return i[0]=u*T+p*E+M*A,i[1]=c*T+m*E+x*A,i[2]=f*T+g*E+y*A,i[3]=d*T+v*E+w*A,i[4]=u*b+p*R+M*S,i[5]=c*b+m*R+x*S,i[6]=f*b+g*R+y*S,i[7]=d*b+v*R+w*S,i[8]=u*I+p*C+M*P,i[9]=c*I+m*C+x*P,i[10]=f*I+g*C+y*P,i[11]=d*I+v*C+w*P,this},rotateX:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),r=e[4],s=e[5],a=e[6],o=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=r*n+h*i,e[5]=s*n+l*i,e[6]=a*n+u*i,e[7]=o*n+c*i,e[8]=h*n-r*i,e[9]=l*n-s*i,e[10]=u*n-a*i,e[11]=c*n-o*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),r=e[0],s=e[1],a=e[2],o=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=r*n-h*i,e[1]=s*n-l*i,e[2]=a*n-u*i,e[3]=o*n-c*i,e[8]=r*i+h*n,e[9]=s*i+l*n,e[10]=a*i+u*n,e[11]=o*i+c*n,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),r=e[0],s=e[1],a=e[2],o=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=r*n+h*i,e[1]=s*n+l*i,e[2]=a*n+u*i,e[3]=o*n+c*i,e[4]=h*n-r*i,e[5]=l*n-s*i,e[6]=u*n-a*i,e[7]=c*n-o*i,this},fromRotationTranslation:function(t,e){var i=this.val,n=t.x,r=t.y,s=t.z,a=t.w,o=n+n,h=r+r,l=s+s,u=n*o,c=n*h,f=n*l,d=r*h,p=r*l,m=s*l,g=a*o,v=a*h,M=a*l;return i[0]=1-(d+m),i[1]=c+M,i[2]=f-v,i[3]=0,i[4]=c-M,i[5]=1-(u+m),i[6]=p+g,i[7]=0,i[8]=f+v,i[9]=p-g,i[10]=1-(u+d),i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this},fromQuat:function(t){var e=this.val,i=t.x,n=t.y,r=t.z,s=t.w,a=i+i,o=n+n,h=r+r,l=i*a,u=i*o,c=i*h,f=n*o,d=n*h,p=r*h,m=s*a,g=s*o,v=s*h;return e[0]=1-(f+p),e[1]=u+v,e[2]=c-g,e[3]=0,e[4]=u-v,e[5]=1-(l+p),e[6]=d+m,e[7]=0,e[8]=c+g,e[9]=d-m,e[10]=1-(l+f),e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},frustum:function(t,e,i,n,r,s){var a=this.val,o=1/(e-t),h=1/(n-i),l=1/(r-s);return a[0]=2*r*o,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=2*r*h,a[6]=0,a[7]=0,a[8]=(e+t)*o,a[9]=(n+i)*h,a[10]=(s+r)*l,a[11]=-1,a[12]=0,a[13]=0,a[14]=s*r*2*l,a[15]=0,this},perspective:function(t,e,i,n){var r=this.val,s=1/Math.tan(t/2),a=1/(i-n);return r[0]=s/e,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=s,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=(n+i)*a,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*n*i*a,r[15]=0,this},perspectiveLH:function(t,e,i,n){var r=this.val;return r[0]=2*i/t,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=2*i/e,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=-n/(i-n),r[11]=1,r[12]=0,r[13]=0,r[14]=i*n/(i-n),r[15]=0,this},ortho:function(t,e,i,n,r,s){var a=this.val,o=0===(o=t-e)?o:1/o,h=0===(h=i-n)?h:1/h,l=0===(l=r-s)?l:1/l;return a[0]=-2*o,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=-2*h,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=2*l,a[11]=0,a[12]=(t+e)*o,a[13]=(n+i)*h,a[14]=(s+r)*l,a[15]=1,this},lookAt:function(t,e,i){var n=this.val,r=t.x,s=t.y,a=t.z,o=i.x,h=i.y,l=i.z,u=e.x,c=e.y,f=e.z;if(Math.abs(r-u)<1e-6&&Math.abs(s-c)<1e-6&&Math.abs(a-f)<1e-6)return this.identity();var d=r-u,p=s-c,m=a-f,g=1/Math.sqrt(d*d+p*p+m*m),v=h*(m*=g)-l*(p*=g),M=l*(d*=g)-o*m,x=o*p-h*d;(g=Math.sqrt(v*v+M*M+x*x))?(v*=g=1/g,M*=g,x*=g):x=M=v=0;var y=p*x-m*M,w=m*v-d*x,T=d*M-p*v;return(g=Math.sqrt(y*y+w*w+T*T))?(y*=g=1/g,w*=g,T*=g):T=w=y=0,n[0]=v,n[1]=y,n[2]=d,n[3]=0,n[4]=M,n[5]=w,n[6]=p,n[7]=0,n[8]=x,n[9]=T,n[10]=m,n[11]=0,n[12]=-(v*r+M*s+x*a),n[13]=-(y*r+w*s+T*a),n[14]=-(d*r+p*s+m*a),n[15]=1,this},yawPitchRoll:function(t,e,i){this.zero(),h.zero(),l.zero();var n=this.val,r=h.val,s=l.val,a=Math.sin(i),o=Math.cos(i);return n[10]=1,n[15]=1,n[0]=o,n[1]=a,n[4]=-a,n[5]=o,a=Math.sin(e),o=Math.cos(e),r[0]=1,r[15]=1,r[5]=o,r[10]=o,r[9]=-a,r[6]=a,a=Math.sin(t),o=Math.cos(t),s[5]=1,s[15]=1,s[0]=o,s[2]=-a,s[8]=a,s[10]=o,this.multiplyLocal(h),this.multiplyLocal(l),this},setWorldMatrix:function(t,e,i,n,r){return this.yawPitchRoll(t.y,t.x,t.z),h.scaling(i.x,i.y,i.z),l.xyz(e.x,e.y,e.z),this.multiplyLocal(h),this.multiplyLocal(l),void 0!==n&&this.multiplyLocal(n),void 0!==r&&this.multiplyLocal(r),this}}),h=new r,l=new r;t.exports=r},function(t,e,i){var n=i(0),r=i(19),s=i(41),o=new Int8Array([1,2,0]),h=new Float32Array([0,0,0]),a=new r(1,0,0),l=new r(0,1,0),u=new r,c=new s,f=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n;return 0<r&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=i*r,this.w=n*r),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,r=this.z,s=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=r+e*(t.z-r),this.w=s+e*(t.w-s),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(u.copy(a).cross(t).length()<1e-6&&u.copy(l).cross(t),u.normalize(),this.setAxisAngle(u,Math.PI)):.999999<i?(this.x=0,this.y=0,this.z=0,this.w=1,this):(u.copy(t).cross(e),this.x=u.x,this.y=u.y,this.z=u.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,r=this.w,s=t.x,a=t.y,o=t.z,h=t.w;return this.x=e*h+r*s+i*o-n*a,this.y=i*h+r*a+n*s-e*o,this.z=n*h+r*o+e*a-i*s,this.w=r*h-e*s-i*a-n*o,this},slerp:function(t,e){var i=this.x,n=this.y,r=this.z,s=this.w,a=t.x,o=t.y,h=t.z,l=t.w,u=i*a+n*o+r*h+s*l;u<0&&(u=-u,a=-a,o=-o,h=-h,l=-l);var c,f,d=1-e,p=e;return 1e-6<1-u&&(c=Math.acos(u),f=Math.sin(c),d=Math.sin((1-e)*c)/f,p=Math.sin(e*c)/f),this.x=d*i+p*a,this.y=d*n+p*o,this.z=d*r+p*h,this.w=d*s+p*l,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n,s=r?1/r:0;return this.x=-t*s,this.y=-e*s,this.z=-i*s,this.w=n*s,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),a=Math.cos(t);return this.x=e*a+r*s,this.y=i*a+n*s,this.z=n*a-i*s,this.w=r*a-e*s,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),a=Math.cos(t);return this.x=e*a-n*s,this.y=i*a+r*s,this.z=n*a+e*s,this.w=r*a-i*s,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),a=Math.cos(t);return this.x=e*a+i*s,this.y=i*a-e*s,this.z=n*a+r*s,this.w=r*a-n*s,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},fromMat3:function(t){var e,i,n,r,s=t.val,a=s[0]+s[4]+s[8];return 0<a?(r=Math.sqrt(a+1),this.w=.5*r,r=.5/r,this.x=(s[7]-s[5])*r,this.y=(s[2]-s[6])*r,this.z=(s[3]-s[1])*r):(e=0,s[4]>s[0]&&(e=1),s[8]>s[3*e+e]&&(e=2),i=o[e],n=o[i],r=Math.sqrt(s[3*e+e]-s[3*i+i]-s[3*n+n]+1),h[e]=.5*r,r=.5/r,h[i]=(s[3*i+e]+s[3*e+i])*r,h[n]=(s[3*n+e]+s[3*e+n])*r,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(s[3*n+i]-s[3*i+n])*r),this}});t.exports=f},function(t,e,i){var r=i(26),s=i(45);t.exports=function(t,e){var i=void 0===t?s():r({},t);if(e)for(var n in e)void 0!==e[n]&&(i[n]=e[n]);return i}},function(t,e){t.exports=function(t,e,i,n,r,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===r&&(r=0),void 0===s&&(s=!1),{responseType:t,async:e,user:i,password:n,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:s}}},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},function(t,e){var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e,i){var n=i(2),r=i(51),h=i(40),s=i(29),a=i(30),l=i(1),o={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,0===(this._scaleY=t)?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){0===(this._scaleX=t)?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){0===(this._scaleY=t)?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return a(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=a(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=s(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},setRandomPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),this.x=t+Math.random()*i,this.y=e+Math.random()*n,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new r),void 0===e&&(e=new r);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);for(t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);i;)e.applyITRS(i.x,i.y,i._rotation,i._scaleX,i._scaleY),e.multiply(t,t),i=i.parentContainer;return t},getLocalPoint:function(t,e,i,n){i=i||new l;var r=(n=n||this.scene.sys.cameras.main).scrollX,s=n.scrollY,a=t+r*this.scrollFactorX-r,o=e+s*this.scrollFactorY-s;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(a,o,i):h(a,o,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=o},function(t,e,i){var n=i(0),s=i(2),c=i(1),r=new n({initialize:function(t,e,i,n,r,s){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=1),void 0===r&&(r=0),void 0===s&&(s=0),this.matrix=new Float32Array([t,e,i,n,r,s,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0}},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],r=t[3];return e||i?0<i?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||r?s.TAU-(0<r?Math.acos(-n/this.scaleY):-Math.acos(n/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),n=this.matrix,r=n[0],s=n[1],a=n[2],o=n[3];return n[0]=r*i+a*e,n[1]=s*i+o*e,n[2]=r*-e+a*i,n[3]=s*-e+o*i,this},multiply:function(t,e){var i=this.matrix,n=t.matrix,r=i[0],s=i[1],a=i[2],o=i[3],h=i[4],l=i[5],u=n[0],c=n[1],f=n[2],d=n[3],p=n[4],m=n[5],g=void 0===e?this:e;return g.a=u*r+c*a,g.b=u*s+c*o,g.c=f*r+d*a,g.d=f*s+d*o,g.e=p*r+m*a+h,g.f=p*s+m*o+l,g},multiplyWithOffset:function(t,e,i){var n=this.matrix,r=t.matrix,s=n[0],a=n[1],o=n[2],h=n[3],l=e*s+i*o+n[4],u=e*a+i*h+n[5],c=r[0],f=r[1],d=r[2],p=r[3],m=r[4],g=r[5];return n[0]=c*s+f*o,n[1]=c*a+f*h,n[2]=d*s+p*o,n[3]=d*a+p*h,n[4]=m*s+g*o+l,n[5]=m*a+g*h+u,this},transform:function(t,e,i,n,r,s){var a=this.matrix,o=a[0],h=a[1],l=a[2],u=a[3],c=a[4],f=a[5];return a[0]=t*o+e*l,a[1]=t*h+e*u,a[2]=i*o+n*l,a[3]=i*h+n*u,a[4]=r*o+s*l+c,a[5]=r*h+s*u+f,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var n=this.matrix,r=n[0],s=n[1],a=n[2],o=n[3],h=n[4],l=n[5];return i.x=t*r+e*a+h,i.y=t*s+e*o+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],a=t[5],o=e*r-i*n;return t[0]=r/o,t[1]=-i/o,t[2]=-n/o,t[3]=e/o,t[4]=(n*a-r*s)/o,t[5]=-(e*a-i*s)/o,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,n,r,s){var a=this.matrix;return a[0]=t,a[1]=e,a[2]=i,a[3]=n,a[4]=r,a[5]=s,this},decomposeMatrix:function(){var t,e,i=this.decomposedMatrix,n=this.matrix,r=n[0],s=n[1],a=n[2],o=n[3],h=r*o-s*a;return i.translateX=n[4],i.translateY=n[5],r||s?(t=Math.sqrt(r*r+s*s),i.rotation=0<s?Math.acos(r/t):-Math.acos(r/t),i.scaleX=t,i.scaleY=h/t):a||o?(e=Math.sqrt(a*a+o*o),i.rotation=.5*Math.PI-(0<o?Math.acos(-a/e):-Math.acos(a/e)),i.scaleX=h/e,i.scaleY=e):(i.rotation=0,i.scaleX=0,i.scaleY=0),i},applyITRS:function(t,e,i,n,r){var s=this.matrix,a=Math.sin(i),o=Math.cos(i);return s[4]=t,s[5]=e,s[0]=o*n,s[1]=a*n,s[2]=-a*r,s[3]=o*r,this},applyInverse:function(t,e,i){void 0===i&&(i=new c);var n=this.matrix,r=n[0],s=n[1],a=n[2],o=n[3],h=n[4],l=n[5],u=1/(r*o+a*-s);return i.x=o*u*t+-a*u*e+(l*a-h*o)*u,i.y=r*u*e+-s*u*t+(-l*r+h*s)*u,i},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var n=this.getX(t,e);return i&&(n=Math.round(n)),n},getYRound:function(t,e,i){var n=this.getY(t,e);return i&&(n=Math.round(n)),n},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=r},function(t,e){var i={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=i},function(t,e,i){var n=i(0),r=i(54),s=i(219),a=i(55),o=i(22),h=new n({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new s(this)),this},setData:function(t,e){return this.data||(this.data=new s(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new s(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new s(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new s(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.input&&(this.input.enabled=!1),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),(t=e).parentContainer);)e=e.parentContainer;return i.unshift(this.scene.sys.displayList.getIndex(t)),i},destroy:function(t){var e;void 0===t&&(t=!1),this.scene&&!this.ignoreDestroy&&(this.preDestroy&&this.preDestroy.call(this),this.emit(o.DESTROY,this),e=this.scene.sys,t||e.displayList.remove(this),this.input&&(e.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),t||e.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners())}});h.RENDER_MASK=15,t.exports=h},function(t,e){t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},function(t,e,i){"use strict";var n=Object.prototype.hasOwnProperty,d="~";function r(){}function o(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function s(t,e,i,n,r){if("function"!=typeof i)throw new TypeError("The listener must be a function");var s=new o(i,n||t,r),a=d?d+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],s]:t._events[a].push(s):(t._events[a]=s,t._eventsCount++),t}function l(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(d=!1)),a.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(d?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},a.prototype.listeners=function(t){var e=d?d+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,r=i.length,s=new Array(r);n<r;n++)s[n]=i[n].fn;return s},a.prototype.listenerCount=function(t){var e=d?d+t:t,i=this._events[e];return i?i.fn?1:i.length:0},a.prototype.emit=function(t,e,i,n,r,s){var a=d?d+t:t;if(!this._events[a])return!1;var o,h=this._events[a],l=arguments.length;if(h.fn){switch(h.once&&this.removeListener(t,h.fn,void 0,!0),l){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,e),!0;case 3:return h.fn.call(h.context,e,i),!0;case 4:return h.fn.call(h.context,e,i,n),!0;case 5:return h.fn.call(h.context,e,i,n,r),!0;case 6:return h.fn.call(h.context,e,i,n,r,s),!0}for(f=1,o=new Array(l-1);f<l;f++)o[f-1]=arguments[f];h.fn.apply(h.context,o)}else for(var u,c=h.length,f=0;f<c;f++)switch(h[f].once&&this.removeListener(t,h[f].fn,void 0,!0),l){case 1:h[f].fn.call(h[f].context);break;case 2:h[f].fn.call(h[f].context,e);break;case 3:h[f].fn.call(h[f].context,e,i);break;case 4:h[f].fn.call(h[f].context,e,i,n);break;default:if(!o)for(u=1,o=new Array(l-1);u<l;u++)o[u-1]=arguments[u];h[f].fn.apply(h[f].context,o)}return!0},a.prototype.on=function(t,e,i){return s(this,t,e,i,!1)},a.prototype.once=function(t,e,i){return s(this,t,e,i,!0)},a.prototype.removeListener=function(t,e,i,n){var r=d?d+t:t;if(!this._events[r])return this;if(!e)return l(this,r),this;var s=this._events[r];if(s.fn)s.fn!==e||n&&!s.once||i&&s.context!==i||l(this,r);else{for(var a=0,o=[],h=s.length;a<h;a++)(s[a].fn!==e||n&&!s[a].once||i&&s[a].context!==i)&&o.push(s[a]);o.length?this._events[r]=1===o.length?o[0]:o:l(this,r)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=d?d+t:t,this._events[e]&&l(this,e)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=d,a.EventEmitter=a,t.exports=a},function(t,e){t.exports=function(t){for(var e=t.length,i=t[0].length,n=new Array(i),r=0;r<i;r++){n[r]=new Array(e);for(var s=e-1;-1<s;s--)n[r][s]=t[s][r]}return n}},function(t,e){t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var n,r,s=1;if(i){if(t<e[0][i])return e[0];for(;e[s][i]<t;)s++}else for(;e[s]<t;)s++;return s>e.length&&(s=e.length),i?(n=e[s-1][i],(r=e[s][i])-t<=t-n?e[s]:e[s-1]):(n=e[s-1],(r=e[s])-t<=t-n?r:n)}},function(t,e){t.exports=function(t){for(var e=t.length-1;0<e;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){t.exports={ADD_ANIMATION:i(291),ANIMATION_COMPLETE:i(292),ANIMATION_REPEAT:i(293),ANIMATION_RESTART:i(294),ANIMATION_START:i(295),PAUSE_ALL:i(296),REMOVE_ANIMATION:i(297),RESUME_ALL:i(298),SPRITE_ANIMATION_COMPLETE:i(299),SPRITE_ANIMATION_KEY_COMPLETE:i(300),SPRITE_ANIMATION_KEY_REPEAT:i(301),SPRITE_ANIMATION_KEY_RESTART:i(302),SPRITE_ANIMATION_KEY_START:i(303),SPRITE_ANIMATION_KEY_UPDATE:i(304),SPRITE_ANIMATION_REPEAT:i(305),SPRITE_ANIMATION_RESTART:i(306),SPRITE_ANIMATION_START:i(307),SPRITE_ANIMATION_UPDATE:i(308)}},function(t,e,i){var r=i(61),s=i(12);t.exports=function(t,e,i){if(void 0===i&&(i=new s),e<=0||1<=e)return i.x=t.x,i.y=t.y,i;var n=r(t)*e;return.5<e?(n-=t.width+t.height)<=t.width?(i.x=t.right-n,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(n-t.width)):n<=t.width?(i.x=t.x+n,i.y=t.y):(i.x=t.right,i.y=t.y+(n-t.width)),i}},function(t,e){t.exports=function(t){return 2*(t.width+t.height)}},function(t,e,i){var u=i(63),n=i(0),p=i(7),r=i(174),s=i(175),m=i(199),h=i(200),c=i(218),a=i(248),o=i(4),l=new n({Extends:s,initialize:function(t,e){s.call(this,t,e);var i=e.game;this.isWebGL=2===i.config.renderType,this.cache=i.cache.addCustom("spine"),this.spineTextures=i.cache.addCustom("spineTextures"),this.json=i.cache.json,this.textures=i.textures,this.drawDebug=!1,this.gl,this.renderer,this.sceneRenderer,this.skeletonRenderer,this.skeletonDebugRenderer,this.plugin=m,this.temp1,this.temp2,this.isWebGL?(this.runtime=m.webgl,this.renderer=i.renderer,this.gl=i.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=m.canvas,this.renderer=i.renderer,this.getAtlas=this.getAtlasCanvas),this.renderer||(this.renderer={width:i.scale.width,height:i.scale.height,preRender:o,postRender:o,render:o,destroy:o});var l=this;e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",function(t,e,i,n,r){var s=new c(this.scene,l,t,e,i,n,r);return this.displayList.add(s),this.updateList.add(s),s},function(t,e){void 0===t&&(t={});var i=p(t,"key",null),n=p(t,"animationName",null),r=p(t,"loop",!1),s=new c(this.scene,l,0,0,i,n,r);void 0!==e&&(t.add=e),u(this.scene,s,t);var a=p(t,"skinName",!1);a&&s.setSkinByName(a);var o=p(t,"slotName",!1),h=p(t,"attachmentName",null);return o&&s.setAttachment(o,h),s.refresh()}),e.registerGameObject("spinecontainer",function(t,e,i){var n=new a(this.scene,l,t,e,i);return this.displayList.add(n),n},function(t,e){void 0===t&&(t={});var i=p(t,"x",0),n=p(t,"y",0),r=p(t,"children",null),s=new a(this.scene,l,i,n,r);return void 0!==e&&(t.add=e),u(this.scene,s,t),s})},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 m.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){this.sceneRenderer=new m.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0);function t(t,e){var i;t===this.srcBlend&&e===this.dstBlend||(i=this.context.gl,this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),i.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 m.webgl.Vector3(0,0,0),this.temp2=new m.webgl.Vector3(0,0,0)},getAtlasCanvas:function(t){var e=this.cache.get(t);if(e){var i,n=this.spineTextures;return n.has(t)?n.get(t):(i=this.textures,new m.TextureAtlas(e.data,function(t){return new m.canvas.CanvasTexture(i.get(e.prefix+t).getSourceImage())}))}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var i,n,r=this.spineTextures,s=r.has(t)?r.get(t):(i=this.textures,(n=this.sceneRenderer.context.gl).pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),new m.TextureAtlas(e.data,function(t){return new m.webgl.GLTexture(n,i.get(e.prefix+t).getSourceImage(),!1)}));return s}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,i,n,r,s){var a;if(Array.isArray(t))for(var o=0;o<t.length;o++)a=new h(this,t[o]),this.addFile(a.files);else a=new h(this,t,e,i,n,r,s),this.addFile(a.files);return this},worldToLocal:function(t,e,i,n){var r=this.temp1,s=this.temp2,a=this.sceneRenderer.camera;r.set(t+i.x,e-i.y,0);var o=a.viewportWidth,h=a.viewportHeight;return a.screenToWorld(r,o,h),n&&null!==n.parent?(n.parent.worldToLocal(s.set(r.x-i.x,r.y-i.y,0)),new m.Vector2(s.x,s.y)):n?new m.Vector2(r.x-i.x,r.y-i.y):new m.Vector2(r.x,r.y)},getVector2:function(t,e){return new m.Vector2(t,e)},getVector3:function(t,e,i){return new m.webgl.Vector3(t,e,i)},setDebugBones:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawBones=t,this},setDebugRegionAttachments:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawRegionAttachments=t,this},setDebugBoundingBoxes:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawBoundingBoxes=t,this},setDebugMeshHull:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawMeshHull=t,this},setDebugMeshTriangles:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawMeshTriangles=t,this},setDebugPaths:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawPaths=t,this},setDebugSkeletonXY:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawSkeletonXY=t,this},setDebugClipping:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawClipping=t,this},setEffect:function(t){return this.sceneRenderer.skeletonRenderer.vertexEffect=t,this},createSkeleton:function(t,e){var i,n=t,r=t,s=-1!==t.indexOf(".");s&&(n=(i=t.split(".")).shift(),r=i.join("."));var a=this.cache.get(n),o=this.getAtlas(n);if(!o)return null;this.spineTextures.has(n)||this.spineTextures.add(n,o);var h,l,u=a.preMultipliedAlpha,c=new m.AtlasAttachmentLoader(o),f=new m.SkeletonJson(c);if(l=e||(h=this.json.get(n),s?p(h,r):h)){var d=f.readSkeletonData(l);return{skeletonData:d,skeleton:new m.Skeleton(d),preMultipliedAlpha:u}}return null},createAnimationState:function(t){var e=new m.AnimationStateData(t.data);return{stateData:e,state:new m.AnimationState(e)}},getBounds:function(t){var e=new m.Vector2,i=new m.Vector2;return t.getBounds(e,i,[]),{offset:e,size:i}},onResize:function(){var t=this.renderer,e=this.sceneRenderer,i=t.width,n=t.height;e.camera.position.x=i/2,e.camera.position.y=n/2,e.camera.viewportWidth=i,e.camera.viewportHeight=n},shutdown:function(){this.systems.events.off("shutdown",this.shutdown,this),this.isWebGL&&this.game.scale.off(r,this.onResize,this)},destroy:function(){this.shutdown(),this.sceneRenderer&&this.sceneRenderer.dispose(),this.pluginManager.removeGameObject("spine",!0,!0),this.pluginManager=null,this.game=null,this.scene=null,this.systems=null,this.cache=null,this.spineTextures=null,this.json=null,this.textures=null,this.sceneRenderer=null,this.skeletonRenderer=null,this.gl=null}});l.SpineGameObject=c,t.exports=l},function(t,e,i){var l=i(16),u=i(64);t.exports=function(t,e,i){e.x=u(i,"x",0),e.y=u(i,"y",0),e.depth=u(i,"depth",0),e.flipX=u(i,"flipX",!1),e.flipY=u(i,"flipY",!1);var n=u(i,"scale",null);"number"==typeof n?e.setScale(n):null!==n&&(e.scaleX=u(n,"x",1),e.scaleY=u(n,"y",1));var r=u(i,"scrollFactor",null);"number"==typeof r?e.setScrollFactor(r):null!==r&&(e.scrollFactorX=u(r,"x",1),e.scrollFactorY=u(r,"y",1)),e.rotation=u(i,"rotation",0);var s=u(i,"angle",null);null!==s&&(e.angle=s),e.alpha=u(i,"alpha",1);var a,o,h=u(i,"origin",null);return"number"==typeof h?e.setOrigin(h):null!==h&&(a=u(h,"x",.5),o=u(h,"y",.5),e.setOrigin(a,o)),e.blendMode=u(i,"blendMode",l.NORMAL),e.visible=u(i,"visible",!0),u(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},function(t,e,i){var r=i(65),s=i(7);t.exports=function(t,e,i){var n=s(t,e,null);if(null===n)return i;if(Array.isArray(n))return r.RND.pick(n);if("object"==typeof n){if(n.hasOwnProperty("randInt"))return r.RND.integerInRange(n.randInt[0],n.randInt[1]);if(n.hasOwnProperty("randFloat"))return r.RND.realInRange(n.randFloat[0],n.randFloat[1])}else if("function"==typeof n)return n(e);return n}},function(t,e,i){var n=i(2),r=i(26)(!1,r={Angle:i(66),Distance:i(75),Easing:i(83),Fuzzy:i(128),Interpolation:i(133),Pow2:i(141),Snap:i(145),RandomDataGenerator:i(149),Average:i(150),Bernstein:i(32),Between:i(151),CatmullRom:i(34),CeilTo:i(152),Clamp:i(3),DegToRad:i(18),Difference:i(153),Factorial:i(33),FloatBetween:i(17),FloorTo:i(154),FromPercent:i(155),GetSpeed:i(156),IsEven:i(157),IsEvenStrict:i(158),Linear:i(35),MaxAdd:i(159),MinSub:i(160),Percent:i(161),RadToDeg:i(10),RandomXY:i(162),RandomXYZ:i(163),RandomXYZW:i(164),Rotate:i(165),RotateAround:i(38),RotateAroundDistance:i(166),RotateTo:i(167),RoundAwayFromZero:i(39),RoundTo:i(168),SinCosTableGenerator:i(169),SmootherStep:i(37),SmoothStep:i(36),ToXY:i(170),TransformXY:i(40),Within:i(171),Wrap:i(6),Vector2:i(1),Vector3:i(19),Vector4:i(172),Matrix3:i(41),Matrix4:i(42),Quaternion:i(43),RotateVec3:i(173)},n);t.exports=r},function(t,e,i){t.exports={Between:i(27),BetweenPoints:i(67),BetweenPointsY:i(68),BetweenY:i(69),CounterClockwise:i(9),Normalize:i(28),Random:i(70),RandomDegrees:i(71),Reverse:i(72),RotateTo:i(73),ShortestBetween:i(74),Wrap:i(29),WrapDegrees:i(30)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(i-t,n-e)}},function(t,e,i){var n=i(17);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){var n=i(17);t.exports=function(){return n(-180,180)}},function(t,e,i){var n=i(28);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e<t?e+=n.PI2:e-=n.PI2),t<e?t+=i:e<t&&(t-=i))),t}},function(t,e){t.exports=function(t,e){var i=e-t;return 0==i?0:i-360*Math.floor((i+180)/360)}},function(t,e,i){t.exports={Between:i(76),BetweenPoints:i(77),BetweenPointsSquared:i(78),Chebyshev:i(79),Power:i(80),Snake:i(81),Squared:i(82)}},function(t,e){t.exports=function(t,e,i,n){var r=t-i,s=e-n;return Math.sqrt(r*r+s*s)}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return i*i+n*n}},function(t,e){t.exports=function(t,e,i,n){return Math.max(Math.abs(t-i),Math.abs(e-n))}},function(t,e){t.exports=function(t,e,i,n,r){return void 0===r&&(r=2),Math.sqrt(Math.pow(i-t,r)+Math.pow(n-e,r))}},function(t,e){t.exports=function(t,e,i,n){return Math.abs(t-i)+Math.abs(e-n)}},function(t,e){t.exports=function(t,e,i,n){var r=t-i,s=e-n;return r*r+s*s}},function(t,e,i){t.exports={Back:i(84),Bounce:i(88),Circular:i(92),Cubic:i(96),Elastic:i(100),Expo:i(104),Linear:i(108),Quadratic:i(110),Quartic:i(114),Quintic:i(118),Sine:i(122),Stepped:i(126)}},function(t,e,i){t.exports={In:i(85),Out:i(86),InOut:i(87)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((1+i)*t-i)*.5:.5*((t-=2)*t*((1+i)*t+i)+2)}},function(t,e,i){t.exports={In:i(89),Out:i(90),InOut:i(91)}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e,i){t.exports={In:i(93),Out:i(94),InOut:i(95)}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e,i){t.exports={In:i(97),Out:i(98),InOut:i(99)}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e,i){t.exports={In:i(101),Out:i(102),InOut:i(103)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*--t)*Math.sin((t-n)*(2*Math.PI)/i))}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*--t)*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*--t)*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},function(t,e,i){t.exports={In:i(105),Out:i(106),InOut:i(107)}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e,i){t.exports=i(109)},function(t,e){t.exports=function(t){return t}},function(t,e,i){t.exports={In:i(111),Out:i(112),InOut:i(113)}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e,i){t.exports={In:i(115),Out:i(116),InOut:i(117)}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e,i){t.exports={In:i(119),Out:i(120),InOut:i(121)}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e,i){t.exports={In:i(123),Out:i(124),InOut:i(125)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e,i){t.exports=i(127)},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:1<=t?1:1/e*(1+(e*t|0))}},function(t,e,i){t.exports={Ceil:i(129),Equal:i(31),Floor:i(130),GreaterThan:i(131),LessThan:i(132)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),e-i<t}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t<e+i}},function(t,e,i){t.exports={Bezier:i(134),CatmullRom:i(135),CubicBezier:i(136),Linear:i(137),QuadraticBezier:i(138),SmoothStep:i(139),SmootherStep:i(140)}},function(t,e,i){var s=i(32);t.exports=function(t,e){for(var i=0,n=t.length-1,r=0;r<=n;r++)i+=Math.pow(1-e,n-r)*Math.pow(e,r)*t[r]*s(n,r);return i}},function(t,e,i){var s=i(34);t.exports=function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n);return t[0]===t[i]?(e<0&&(r=Math.floor(n=i*(1+e))),s(n-r,t[(r-1+i)%i],t[r],t[(r+1)%i],t[(r+2)%i])):e<0?t[0]-(s(-n,t[0],t[0],t[1],t[1])-t[0]):1<e?t[i]-(s(n-i,t[i],t[i],t[i-1],t[i-1])-t[i]):s(n-r,t[r?r-1:0],t[r],t[i<r+1?i:r+1],t[i<r+2?i:r+2])}},function(t,e){t.exports=function(t,e,i,n,r){return(l=1-t)*l*l*e+3*(h=1-(o=t))*h*o*i+3*(1-(a=t))*a*a*n+(s=t)*s*s*r;var s,a,o,h,l}},function(t,e,i){var s=i(35);t.exports=function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n);return e<0?s(t[0],t[1],n):1<e?s(t[i],t[i-1],i-n):s(t[r],t[i<r+1?i:r+1],n-r)}},function(t,e){t.exports=function(t,e,i,n){return(a=1-t)*a*e+2*(1-(s=t))*s*i+(r=t)*r*n;var r,s,a}},function(t,e,i){var n=i(36);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){var n=i(37);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){t.exports={GetNext:i(142),IsSize:i(143),IsValue:i(144)}},function(t,e){t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<<Math.ceil(e)}},function(t,e){t.exports=function(t,e){return 0<t&&0==(t&t-1)&&0<e&&0==(e&e-1)}},function(t,e){t.exports=function(t){return 0<t&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(146),Floor:i(147),To:i(148)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),n?(i+t)/e:i+t)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),n?(i+t)/e:i+t)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),n?(i+t)/e:i+t)}},function(t,e,i){var n=new(i(0))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var n=0;n<t.length;n++)e=.02519603282416938*(i+=t.charCodeAt(n)),e-=i=e>>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*((this.n=i)>>>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<t.length&&null!=t[e];e++){var i=t[e];this.s0-=this.hash(i),this.s0+=~~(this.s0<0),this.s1-=this.hash(i),this.s1+=~~(this.s1<0),this.s2-=this.hash(i),this.s2+=~~(this.s2<0)}},integer:function(){return 4294967296*this.rnd()},frac:function(){return this.rnd()+11102230246251565e-32*(2097152*this.rnd()|0)},real:function(){return this.integer()+this.frac()},integerInRange:function(t,e){return Math.floor(this.realInRange(0,e-t+1)+t)},between:function(t,e){return Math.floor(this.realInRange(0,e-t+1)+t)},realInRange:function(t,e){return this.frac()*(e-t)+t},normal:function(){return 1-2*this.frac()},uuid:function(){for(var t="",e="",e=t="";t++<36;e+=~t%5|3*t&4?(15^t?8^this.frac()*(20^t?16:4):4).toString(16):"-");return e},pick:function(t){return t[this.integerInRange(0,t.length-1)]},sign:function(){return this.pick(this.signs)},weightedPick:function(t){return t[~~(Math.pow(this.frac(),2)*(t.length-1)+.5)]},timestamp:function(t,e){return this.realInRange(t||9466848e5,e||1577862e6)},angle:function(){return this.integerInRange(-180,180)},rotation:function(){return this.realInRange(-3.1415926,3.1415926)},state:function(t){return"string"==typeof t&&t.match(/^!rnd/)&&(t=t.split(","),this.c=parseFloat(t[1]),this.s0=parseFloat(t[2]),this.s1=parseFloat(t[3]),this.s2=parseFloat(t[4])),["!rnd",this.c,this.s0,this.s1,this.s2].join(",")},shuffle:function(t){for(var e=t.length-1;0<e;e--){var i=Math.floor(this.frac()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}});t.exports=n},function(t,e){t.exports=function(t){for(var e=0,i=0;i<t.length;i++)e+=+t[i];return e/t.length}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.ceil(t*n)/n}},function(t,e){t.exports=function(t,e){return Math.abs(t-e)}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.floor(t*n)/n}},function(t,e,i){var n=i(3);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e){t.exports=function(t,e){return t/e/1e3}},function(t,e){t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t,e,i){return Math.min(t+e,i)}},function(t,e){t.exports=function(t,e,i){return Math.max(t-e,i)}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=e+1);var r=(t-e)/(i-e);return 1<r?void 0!==n?(r=(n-t)/(n-i))<0&&(r=0):r=1:r<0&&(r=0),r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,r=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*r,t.y=Math.sin(i)*r,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e){t.exports=function(t,e){var i=t.x,n=t.y;return t.x=i*Math.cos(e)-n*Math.sin(e),t.y=i*Math.sin(e)+n*Math.cos(e),t}},function(t,e){t.exports=function(t,e,i,n,r){var s=n+Math.atan2(t.y-i,t.x-e);return t.x=e+r*Math.cos(s),t.y=i+r*Math.sin(s),t}},function(t,e){t.exports=function(t,e,i,n,r){return t.x=e+r*Math.cos(n),t.y=i+r*Math.sin(n),t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var r=[],s=[],a=0;a<t;a++)e+=(i-=e*n)*n,r[a]=i,s[a]=e;return{sin:s,cos:r,length:t}}},function(t,e,i){var a=i(1);t.exports=function(t,e,i,n){void 0===n&&(n=new a);var r=0,s=0;return 0<t&&t<=e*i&&(r=e-1<t?t-(s=Math.floor(t/e))*e:t,n.set(r,s)),n}},function(t,e){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},clone:function(){return new n(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n;return 0<r&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=i*r,this.w=n*r),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,r=this.z,s=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=r+e*(t.z-r),this.w=s+e*(t.w-s),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,r=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+r*r)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,r=t.w-this.w||0;return e*e+i*i+n*n+r*r},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,r=this.w,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12]*r,this.y=s[1]*e+s[5]*i+s[9]*n+s[13]*r,this.z=s[2]*e+s[6]*i+s[10]*n+s[14]*r,this.w=s[3]*e+s[7]*i+s[11]*n+s[15]*r,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,a=t.z,o=t.w,h=o*e+s*n-a*i,l=o*i+a*e-r*n,u=o*n+r*i-s*e,c=-r*e-s*i-a*n;return this.x=h*o+c*-r+l*-a-u*-s,this.y=l*o+c*-s+u*-r-h*-a,this.z=u*o+c*-a+h*-s-l*-r,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e,i){var n=i(19),r=i(42),s=i(43),a=new r,o=new s,h=new n;t.exports=function(t,e,i){return o.setAxisAngle(e,i),a.fromRotationTranslation(o,h.set(0,0,0)),t.transformMat4(a)}},function(t,e){t.exports="resize"},function(t,e,i){var n=i(176),r=i(0),s=i(177),a=new r({Extends:n,initialize:function(t,e){n.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once(s.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=a},function(t,e,i){var n=new(i(0))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=n},function(t,e,i){t.exports={ADDED_TO_SCENE:i(178),BOOT:i(179),CREATE:i(180),DESTROY:i(181),PAUSE:i(182),POST_UPDATE:i(183),PRE_UPDATE:i(184),READY:i(185),REMOVED_FROM_SCENE:i(186),RENDER:i(187),RESUME:i(188),SHUTDOWN:i(189),SLEEP:i(190),START:i(191),TRANSITION_COMPLETE:i(192),TRANSITION_INIT:i(193),TRANSITION_OUT:i(194),TRANSITION_START:i(195),TRANSITION_WAKE:i(196),UPDATE:i(197),WAKE:i(198)}},function(t,e){t.exports="addedtoscene"},function(t,e){t.exports="boot"},function(t,e){t.exports="create"},function(t,e){t.exports="destroy"},function(t,e){t.exports="pause"},function(t,e){t.exports="postupdate"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="ready"},function(t,e){t.exports="removedfromscene"},function(t,e){t.exports="render"},function(t,e){t.exports="resume"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="sleep"},function(t,e){t.exports="start"},function(t,e){t.exports="transitioncomplete"},function(t,e){t.exports="transitioninit"},function(t,e){t.exports="transitionout"},function(t,e){t.exports="transitionstart"},function(t,e){t.exports="transitionwake"},function(t,e){t.exports="update"},function(t,e){t.exports="wake"},function(si,t){(function(){var n,t,e,d,i,s,r,a,o,_,h,l,u,c,ht,f,p,m,g,j,v,M,x,y,w,T,E,A,b,R,S,I,C,P,K,F,L,O,k,N,D,V,B,Y,U,X,z,W,G,H,q,Q,Z,J,$,tt,et,it,nt,rt,st,at,ot,lt,ut,ct,ft,dt,pt,mt,gt,vt,Mt,xt,yt,wt,Tt,Et,At,bt,Rt,St,It,Ct,Pt,_t,Ft,Lt,Ot,kt,Nt,Dt,Vt,Bt,Yt,Ut,Xt,zt,Wt,Gt,Ht,qt,jt,Kt,Qt,Zt,Jt,$t,te,ee,ie,ne,re,se,ae,oe,he,le,ue,ce,fe,de,pe,me,ge,ve=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});function Me(t){if(this.animationToMixTime={},this.defaultMix=0,null==t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}function xe(t,e){void 0===e&&(e=""),this.assets={},this.errors={},this.toLoad=0,this.loaded=0,this.rawDataUris={},this.textureLoader=t,this.pathPrefix=e}function ye(t){this.atlas=t}function we(t,e,i){if(this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.appliedValid=!1,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,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.skeleton=e,this.parent=i,this.setToSetupPose()}function Te(t,e,i){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=u.Normal,this.skinRequired=!1,this.color=new l.Color,t<0)throw new Error("index must be >= 0.");if(null==e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=i}function Ee(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 i=0;i<t.bones.length;i++)this.bones.push(e.findBone(t.bones[i].name));this.target=e.findBone(t.target.name)}function Ae(t){var e=m.call(this,t,0,!1)||this;return e.bones=new Array,e.bendDirection=1,e.compress=!1,e.stretch=!1,e.uniform=!1,e.mix=1,e.softness=0,e}function be(t,e){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,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.bones=new Array;for(var i=0,n=t.bones.length;i<n;i++)this.bones.push(e.findBone(t.bones[i].name));this.target=e.findSlot(t.target.name),this.position=t.position,this.spacing=t.spacing,this.rotateMix=t.rotateMix,this.translateMix=t.translateMix}function Re(t){var e=x.call(this,t,0,!1)||this;return e.bones=new Array,e}function Se(t){this.toLoad=new Array,this.assets={},this.clientId=t}function Ie(t){void 0===t&&(t=""),this.clientAssets={},this.queuedAssets={},this.rawAssets={},this.errors={},this.pathPrefix=t}function Ce(t){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.scaleX=1,this.scaleY=1,this.x=0,this.y=0,null==t)throw new Error("data cannot be null.");this.data=t,this.bones=new Array;for(var e=0;e<t.bones.length;e++){var i,n=t.bones[e],r=void 0;null==n.parent?r=new S.Bone(n,this,null):(i=this.bones[n.parent.index],r=new S.Bone(n,this,i),i.children.push(r)),this.bones.push(r)}this.slots=new Array,this.drawOrder=new Array;for(e=0;e<t.slots.length;e++){var s=t.slots[e],r=this.bones[s.boneData.index],a=new S.Slot(s,r);this.slots.push(a),this.drawOrder.push(a)}this.ikConstraints=new Array;for(e=0;e<t.ikConstraints.length;e++){var o=t.ikConstraints[e];this.ikConstraints.push(new S.IkConstraint(o,this))}this.transformConstraints=new Array;for(e=0;e<t.transformConstraints.length;e++){var h=t.transformConstraints[e];this.transformConstraints.push(new S.TransformConstraint(h,this))}this.pathConstraints=new Array;for(e=0;e<t.pathConstraints.length;e++){var l=t.pathConstraints[e];this.pathConstraints.push(new S.PathConstraint(l,this))}this.color=new S.Color(1,1,1,1),this.updateCache()}function Pe(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new C.Pool(function(){return C.Utils.newFloatArray(16)})}function _e(){this.triangulator=new K.Triangulator,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array}function Fe(){this.bones=new Array,this.slots=new Array,this.skins=new Array,this.events=new Array,this.animations=new Array,this.ikConstraints=new Array,this.transformConstraints=new Array,this.pathConstraints=new Array,this.fps=0}function Le(t,e){if(this.deform=new Array,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("bone cannot be null.");this.data=t,this.bone=e,this.color=new k.Color,this.darkColor=null==t.darkColor?null:new k.Color,this.setToSetupPose()}function Oe(t,e,i){if(this.color=new D.Color(1,1,1,1),t<0)throw new Error("index must be >= 0.");if(null==e)throw new Error("name cannot be null.");if(null==i)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=i}function ke(t,e){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new V.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 i=0;i<t.bones.length;i++)this.bones.push(e.findBone(t.bones[i].name));this.target=e.findBone(t.target.name)}function Ne(t){var e=U.call(this,t,0,!1)||this;return e.bones=new Array,e.rotateMix=0,e.translateMix=0,e.scaleMix=0,e.shearMix=0,e.offsetRotation=0,e.offsetX=0,e.offsetY=0,e.offsetScaleX=0,e.offsetScaleY=0,e.offsetShearY=0,e.relative=!1,e.local=!1,e}function De(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new z.Pool(function(){return new Array}),this.polygonIndicesPool=new z.Pool(function(){return new Array})}function Ve(t){var e=Z.call(this,t)||this;return e.color=new Q.Color(1,1,1,1),e}function Be(t){var e=tt.call(this,t)||this;return e.color=new $.Color(.2275,.2275,.8078,1),e}function Ye(t){var e=nt.call(this,t)||this;return e.color=new it.Color(1,1,1,1),e.tempColor=new it.Color(0,0,0,0),e}function Ue(t){var e=at.call(this,t)||this;return e.closed=!1,e.constantSpeed=!1,e.color=new st.Color(1,1,1,1),e}function Xe(t){var e=ut.call(this,t)||this;return e.color=new lt.Color(.38,.94,0,1),e}function ze(t){var e=dt.call(this,t)||this;return e.x=0,e.y=0,e.scaleX=1,e.scaleY=1,e.rotation=0,e.width=0,e.height=0,e.color=new ft.Color(1,1,1,1),e.offset=ft.Utils.newFloatArray(8),e.uvs=ft.Utils.newFloatArray(8),e.tempColor=new ft.Color(1,1,1,1),e}function We(t,e){this.jitterX=0,this.jitterY=0,this.jitterX=t,this.jitterY=e}function Ge(t){this.centerX=0,this.centerY=0,this.radius=0,this.angle=0,this.worldX=0,this.worldY=0,this.radius=t}function He(t){return void 0===t&&(t=""),wt.call(this,function(t){return new xt.canvas.CanvasTexture(t)},t)||this}function qe(t){return bt.call(this,t)||this}function je(t){this.triangleRendering=!1,this.debugRendering=!1,this.vertices=St.Utils.newFloatArray(8192),this.tempColor=new St.Color,this.ctx=t}function Ke(e,t){return void 0===t&&(t=""),Ft.call(this,function(t){return new Pt.webgl.GLTexture(e,t)},t)||this}function Qe(t,e){this.position=new kt.Vector3(0,0,0),this.direction=new kt.Vector3(0,0,-1),this.up=new kt.Vector3(0,1,0),this.near=0,this.far=100,this.zoom=1,this.viewportWidth=0,this.viewportHeight=0,this.projectionView=new kt.Matrix4,this.inverseProjectionView=new kt.Matrix4,this.projection=new kt.Matrix4,this.view=new kt.Matrix4,this.tmp=new kt.Vector3,this.viewportWidth=t,this.viewportHeight=e,this.update()}function Ze(t,e,i){void 0===i&&(i=!1);var n=Bt.call(this,e)||this;return n.texture=null,n.boundUnit=0,n.useMipMaps=!1,n.context=t instanceof Vt.ManagedWebGLRenderingContext?t:new Vt.ManagedWebGLRenderingContext(t),n.useMipMaps=i,n.restore(),n.context.addRestorable(n),n}function Je(t,e,i){if(void 0===e&&(e=!0),void 0===i&&(i=10920),this.isDrawing=!1,this.shader=null,this.lastTexture=null,this.verticesLength=0,this.indicesLength=0,10920<i)throw new Error("Can't have more than 10920 triangles per batch: "+i);this.context=t instanceof Wt.ManagedWebGLRenderingContext?t:new Wt.ManagedWebGLRenderingContext(t);var n=e?[new Wt.Position2Attribute,new Wt.ColorAttribute,new Wt.TexCoordAttribute,new Wt.Color2Attribute]:[new Wt.Position2Attribute,new Wt.ColorAttribute,new Wt.TexCoordAttribute];this.mesh=new Wt.Mesh(t,n,i,3*i),this.srcBlend=this.context.gl.SRC_ALPHA,this.dstBlend=this.context.gl.ONE_MINUS_SRC_ALPHA}function $e(t,e,i){void 0===i&&(i=!0),this.twoColorTint=!1,this.activeRenderer=null,this.QUAD=[0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0],this.QUAD_TRIANGLES=[0,1,2,2,3,0],this.WHITE=new Ht.Color(1,1,1,1),this.canvas=t,this.context=e instanceof qt.ManagedWebGLRenderingContext?e:new qt.ManagedWebGLRenderingContext(e),this.twoColorTint=i,this.camera=new qt.OrthoCamera(t.width,t.height),this.batcherShader=i?qt.Shader.newTwoColoredTextured(this.context):qt.Shader.newColoredTextured(this.context),this.batcher=new qt.PolygonBatcher(this.context,i),this.shapesShader=qt.Shader.newColored(this.context),this.shapes=new qt.ShapeRenderer(this.context),this.skeletonRenderer=new qt.SkeletonRenderer(this.context,i),this.skeletonDebugRenderer=new qt.SkeletonDebugRenderer(this.context)}function ti(t,e,i){this.vertexShader=e,this.fragmentShader=i,this.vs=null,this.fs=null,this.program=null,this.tmp2x2=new Float32Array(4),this.tmp3x3=new Float32Array(9),this.tmp4x4=new Float32Array(16),this.vsSource=e,this.fsSource=i,this.context=t instanceof Jt.ManagedWebGLRenderingContext?t:new Jt.ManagedWebGLRenderingContext(t),this.context.addRestorable(this),this.compile()}function ei(t,e){if(void 0===e&&(e=10920),this.isDrawing=!1,this.shapeType=ie.Filled,this.color=new te.Color(1,1,1,1),this.vertexIndex=0,this.tmp=new te.Vector2,10920<e)throw new Error("Can't have more than 10920 triangles per batch: "+e);this.context=t instanceof ee.ManagedWebGLRenderingContext?t:new ee.ManagedWebGLRenderingContext(t),this.mesh=new ee.Mesh(t,[new ee.Position2Attribute,new ee.ColorAttribute],e,0),this.srcBlend=this.context.gl.SRC_ALPHA,this.dstBlend=this.context.gl.ONE_MINUS_SRC_ALPHA}function ii(t){this.boneLineColor=new se.Color(1,0,0,1),this.boneOriginColor=new se.Color(0,1,0,1),this.attachmentLineColor=new se.Color(0,0,1,.5),this.triangleLineColor=new se.Color(1,.64,0,.5),this.pathColor=(new se.Color).setFromString("FF7F00"),this.clipColor=new se.Color(.8,0,0,2),this.aabbColor=new se.Color(0,1,0,.5),this.drawBones=!0,this.drawRegionAttachments=!0,this.drawBoundingBoxes=!0,this.drawMeshHull=!0,this.drawMeshTriangles=!0,this.drawPaths=!0,this.drawSkeletonXY=!1,this.drawClipping=!0,this.premultipliedAlpha=!1,this.scale=1,this.boneWidth=2,this.bounds=new se.SkeletonBounds,this.temp=new Array,this.vertices=se.Utils.newFloatArray(2048),this.context=t instanceof ae.ManagedWebGLRenderingContext?t:new ae.ManagedWebGLRenderingContext(t)}function ni(t,e){void 0===e&&(e=!0),this.premultipliedAlpha=!1,this.vertexEffect=null,this.tempColor=new he.Color,this.tempColor2=new he.Color,this.vertexSize=8,this.twoColorTint=!1,this.renderable=new ue(null,0,0),this.clipper=new he.SkeletonClipping,this.temp=new he.Vector2,this.temp2=new he.Vector2,this.temp3=new he.Color,this.temp4=new he.Color,(this.twoColorTint=e)&&(this.vertexSize+=4),this.vertices=he.Utils.newFloatArray(1024*this.vertexSize)}function ri(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=0,this.y=0,this.z=0,this.x=t,this.y=e,this.z=i}!function(U){var X,t,g,e,i,n,z=(r.prototype.hasTimeline=function(t){return 1==this.timelineIds[t]},r.prototype.apply=function(t,e,i,n,r,s,a,o){if(null==t)throw new Error("skeleton cannot be null.");n&&0!=this.duration&&(i%=this.duration,0<e&&(e%=this.duration));for(var h=this.timelines,l=0,u=h.length;l<u;l++)h[l].apply(t,e,i,r,s,a,o)},r.binarySearch=function(t,e,i){void 0===i&&(i=1);var n=0,r=t.length/i-2;if(0==r)return i;for(var s=r>>>1;;){if(t[(s+1)*i]<=e?n=s+1:r=s,n==r)return(n+1)*i;s=n+r>>>1}},r.linearSearch=function(t,e,i){for(var n=0,r=t.length-i;n<=r;n+=i)if(t[n]>e)return n;return-1},r);function r(t,e,i){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 n=0;n<e.length;n++)this.timelineIds[e[n].getPropertyId()]=!0;this.duration=i}U.Animation=z,(t=X=U.MixBlend||(U.MixBlend={}))[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add",(e=g=U.MixDirection||(U.MixDirection={}))[e.mixIn=0]="mixIn",e[e.mixOut=1]="mixOut",(n=i=U.TimelineType||(U.TimelineType={}))[n.rotate=0]="rotate",n[n.translate=1]="translate",n[n.scale=2]="scale",n[n.shear=3]="shear",n[n.attachment=4]="attachment",n[n.color=5]="color",n[n.deform=6]="deform",n[n.event=7]="event",n[n.drawOrder=8]="drawOrder",n[n.ikConstraint=9]="ikConstraint",n[n.transformConstraint=10]="transformConstraint",n[n.pathConstraintPosition=11]="pathConstraintPosition",n[n.pathConstraintSpacing=12]="pathConstraintSpacing",n[n.pathConstraintMix=13]="pathConstraintMix",n[n.twoColor=14]="twoColor";var s=(M.prototype.getFrameCount=function(){return this.curves.length/M.BEZIER_SIZE+1},M.prototype.setLinear=function(t){this.curves[t*M.BEZIER_SIZE]=M.LINEAR},M.prototype.setStepped=function(t){this.curves[t*M.BEZIER_SIZE]=M.STEPPED},M.prototype.getCurveType=function(t){var e=t*M.BEZIER_SIZE;if(e==this.curves.length)return M.LINEAR;var i=this.curves[e];return i==M.LINEAR?M.LINEAR:i==M.STEPPED?M.STEPPED:M.BEZIER},M.prototype.setCurve=function(t,e,i,n,r){var s=.03*(2*-e+n),a=.03*(2*-i+r),o=.006*(3*(e-n)+1),h=.006*(3*(i-r)+1),l=2*s+o,u=2*a+h,c=.3*e+s+.16666667*o,f=.3*i+a+.16666667*h,d=t*M.BEZIER_SIZE,p=this.curves;p[d++]=M.BEZIER;for(var m=c,g=f,v=d+M.BEZIER_SIZE-1;d<v;d+=2)p[d]=m,p[d+1]=g,c+=l,f+=u,l+=o,u+=h,m+=c,g+=f},M.prototype.getCurvePercent=function(t,e){e=U.MathUtils.clamp(e,0,1);var i=this.curves,n=t*M.BEZIER_SIZE,r=i[n];if(r==M.LINEAR)return e;if(r==M.STEPPED)return 0;for(var s=0,a=++n,o=n+M.BEZIER_SIZE-1;n<o;n+=2)if(e<=(s=i[n])){var h=void 0,l=void 0;return(l=n==a?h=0:(h=i[n-2],i[n-1]))+(i[n+1]-l)*(e-h)/(s-h)}var u=i[n-1];return u+(1-u)*(e-s)/(1-s)},M.LINEAR=0,M.STEPPED=1,M.BEZIER=2,M.BEZIER_SIZE=19,M);function M(t){if(t<=0)throw new Error("frameCount must be > 0: "+t);this.curves=U.Utils.newFloatArray((t-1)*M.BEZIER_SIZE)}U.CurveTimeline=s;var a,o=(ve(v,a=s),v.prototype.getPropertyId=function(){return(i.rotate<<24)+this.boneIndex},v.prototype.setFrame=function(t,e,i){t<<=1,this.frames[t]=e,this.frames[t+v.ROTATION]=i},v.prototype.apply=function(t,e,i,n,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(i<o[0])switch(s){case X.setup:return void(h.rotation=h.data.rotation);case X.first:var l=h.data.rotation-h.rotation;h.rotation+=(l-360*(16384-(16384.499999999996-l/360|0)))*r}else if(i>=o[o.length-v.ENTRIES]){var u=o[o.length+v.PREV_ROTATION];switch(s){case X.setup:h.rotation=h.data.rotation+u*r;break;case X.first:case X.replace:u+=h.data.rotation-h.rotation,u-=360*(16384-(16384.499999999996-u/360|0));case X.add:h.rotation+=u*r}}else{var c=z.binarySearch(o,i,v.ENTRIES),f=o[c+v.PREV_ROTATION],d=o[c],p=this.getCurvePercent((c>>1)-1,1-(i-d)/(o[c+v.PREV_TIME]-d)),m=f+((m=o[c+v.ROTATION]-f)-360*(16384-(16384.499999999996-m/360|0)))*p;switch(s){case X.setup:h.rotation=h.data.rotation+(m-360*(16384-(16384.499999999996-m/360|0)))*r;break;case X.first:case X.replace:m+=h.data.rotation-h.rotation;case X.add:h.rotation+=(m-360*(16384-(16384.499999999996-m/360|0)))*r}}},v.ENTRIES=2,v.PREV_TIME=-2,v.PREV_ROTATION=-1,v.ROTATION=1,v);function v(t){var e=a.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t<<1),e}U.RotateTimeline=o;var h,l=(ve(p,h=s),p.prototype.getPropertyId=function(){return(i.translate<<24)+this.boneIndex},p.prototype.setFrame=function(t,e,i,n){t*=p.ENTRIES,this.frames[t]=e,this.frames[t+p.X]=i,this.frames[t+p.Y]=n},p.prototype.apply=function(t,e,i,n,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(i<o[0])switch(s){case X.setup:return h.x=h.data.x,void(h.y=h.data.y);case X.first:h.x+=(h.data.x-h.x)*r,h.y+=(h.data.y-h.y)*r}else{var l,u,c,f=0,d=0;switch(i>=o[o.length-p.ENTRIES]?(f=o[o.length+p.PREV_X],d=o[o.length+p.PREV_Y]):(f=o[(l=z.binarySearch(o,i,p.ENTRIES))+p.PREV_X],d=o[l+p.PREV_Y],u=o[l],c=this.getCurvePercent(l/p.ENTRIES-1,1-(i-u)/(o[l+p.PREV_TIME]-u)),f+=(o[l+p.X]-f)*c,d+=(o[l+p.Y]-d)*c),s){case X.setup:h.x=h.data.x+f*r,h.y=h.data.y+d*r;break;case X.first:case X.replace:h.x+=(h.data.x+f-h.x)*r,h.y+=(h.data.y+d-h.y)*r;break;case X.add:h.x+=f*r,h.y+=d*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=U.Utils.newFloatArray(t*p.ENTRIES),e}U.TranslateTimeline=l;var u,c=(ve(x,u=l),x.prototype.getPropertyId=function(){return(i.scale<<24)+this.boneIndex},x.prototype.apply=function(t,e,i,n,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(i<o[0])switch(s){case X.setup:return h.scaleX=h.data.scaleX,void(h.scaleY=h.data.scaleY);case X.first:h.scaleX+=(h.data.scaleX-h.scaleX)*r,h.scaleY+=(h.data.scaleY-h.scaleY)*r}else{var l,u,c,f=0,d=0;if(d=i>=o[o.length-x.ENTRIES]?(f=o[o.length+x.PREV_X]*h.data.scaleX,o[o.length+x.PREV_Y]*h.data.scaleY):(f=o[(l=z.binarySearch(o,i,x.ENTRIES))+x.PREV_X],d=o[l+x.PREV_Y],u=o[l],c=this.getCurvePercent(l/x.ENTRIES-1,1-(i-u)/(o[l+x.PREV_TIME]-u)),f=(f+(o[l+x.X]-f)*c)*h.data.scaleX,(d+(o[l+x.Y]-d)*c)*h.data.scaleY),1==r)s==X.add?(h.scaleX+=f-h.data.scaleX,h.scaleY+=d-h.data.scaleY):(h.scaleX=f,h.scaleY=d);else{var p=0,m=0;if(a==g.mixOut)switch(s){case X.setup:p=h.data.scaleX,m=h.data.scaleY,h.scaleX=p+(Math.abs(f)*U.MathUtils.signum(p)-p)*r,h.scaleY=m+(Math.abs(d)*U.MathUtils.signum(m)-m)*r;break;case X.first:case X.replace:p=h.scaleX,m=h.scaleY,h.scaleX=p+(Math.abs(f)*U.MathUtils.signum(p)-p)*r,h.scaleY=m+(Math.abs(d)*U.MathUtils.signum(m)-m)*r;break;case X.add:p=h.scaleX,m=h.scaleY,h.scaleX=p+(Math.abs(f)*U.MathUtils.signum(p)-h.data.scaleX)*r,h.scaleY=m+(Math.abs(d)*U.MathUtils.signum(m)-h.data.scaleY)*r}else switch(s){case X.setup:p=Math.abs(h.data.scaleX)*U.MathUtils.signum(f),m=Math.abs(h.data.scaleY)*U.MathUtils.signum(d),h.scaleX=p+(f-p)*r,h.scaleY=m+(d-m)*r;break;case X.first:case X.replace:p=Math.abs(h.scaleX)*U.MathUtils.signum(f),m=Math.abs(h.scaleY)*U.MathUtils.signum(d),h.scaleX=p+(f-p)*r,h.scaleY=m+(d-m)*r;break;case X.add:p=U.MathUtils.signum(f),m=U.MathUtils.signum(d),h.scaleX=Math.abs(h.scaleX)*p+(f-Math.abs(h.data.scaleX)*p)*r,h.scaleY=Math.abs(h.scaleY)*m+(d-Math.abs(h.data.scaleY)*m)*r}}}},x);function x(t){return u.call(this,t)||this}U.ScaleTimeline=c;var f,d=(ve(m,f=l),m.prototype.getPropertyId=function(){return(i.shear<<24)+this.boneIndex},m.prototype.apply=function(t,e,i,n,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(i<o[0])switch(s){case X.setup:return h.shearX=h.data.shearX,void(h.shearY=h.data.shearY);case X.first:h.shearX+=(h.data.shearX-h.shearX)*r,h.shearY+=(h.data.shearY-h.shearY)*r}else{var l,u,c,f=0,d=0;switch(i>=o[o.length-m.ENTRIES]?(f=o[o.length+m.PREV_X],d=o[o.length+m.PREV_Y]):(f=o[(l=z.binarySearch(o,i,m.ENTRIES))+m.PREV_X],d=o[l+m.PREV_Y],u=o[l],c=this.getCurvePercent(l/m.ENTRIES-1,1-(i-u)/(o[l+m.PREV_TIME]-u)),f+=(o[l+m.X]-f)*c,d+=(o[l+m.Y]-d)*c),s){case X.setup:h.shearX=h.data.shearX+f*r,h.shearY=h.data.shearY+d*r;break;case X.first:case X.replace:h.shearX+=(h.data.shearX+f-h.shearX)*r,h.shearY+=(h.data.shearY+d-h.shearY)*r;break;case X.add:h.shearX+=f*r,h.shearY+=d*r}}},m);function m(t){return f.call(this,t)||this}U.ShearTimeline=d;var y,w=(ve(T,y=s),T.prototype.getPropertyId=function(){return(i.color<<24)+this.slotIndex},T.prototype.setFrame=function(t,e,i,n,r,s){t*=T.ENTRIES,this.frames[t]=e,this.frames[t+T.R]=i,this.frames[t+T.G]=n,this.frames[t+T.B]=r,this.frames[t+T.A]=s},T.prototype.apply=function(t,e,i,n,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=this.frames;if(i<h[0])switch(s){case X.setup:return void o.color.setFromColor(o.data.color);case X.first:var l=o.color,u=o.data.color;l.add((u.r-l.r)*r,(u.g-l.g)*r,(u.b-l.b)*r,(u.a-l.a)*r)}else{var c,f,d,p,m=0,g=0,v=0,M=0;i>=h[h.length-T.ENTRIES]?(m=h[(c=h.length)+T.PREV_R],g=h[c+T.PREV_G],v=h[c+T.PREV_B],M=h[c+T.PREV_A]):(m=h[(f=z.binarySearch(h,i,T.ENTRIES))+T.PREV_R],g=h[f+T.PREV_G],v=h[f+T.PREV_B],M=h[f+T.PREV_A],d=h[f],p=this.getCurvePercent(f/T.ENTRIES-1,1-(i-d)/(h[f+T.PREV_TIME]-d)),m+=(h[f+T.R]-m)*p,g+=(h[f+T.G]-g)*p,v+=(h[f+T.B]-v)*p,M+=(h[f+T.A]-M)*p),1==r?o.color.set(m,g,v,M):(l=o.color,s==X.setup&&l.setFromColor(o.data.color),l.add((m-l.r)*r,(g-l.g)*r,(v-l.b)*r,(M-l.a)*r))}}},T.ENTRIES=5,T.PREV_TIME=-5,T.PREV_R=-4,T.PREV_G=-3,T.PREV_B=-2,T.PREV_A=-1,T.R=1,T.G=2,T.B=3,T.A=4,T);function T(t){var e=y.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*T.ENTRIES),e}U.ColorTimeline=w;var E,A=(ve(b,E=s),b.prototype.getPropertyId=function(){return(i.twoColor<<24)+this.slotIndex},b.prototype.setFrame=function(t,e,i,n,r,s,a,o,h){t*=b.ENTRIES,this.frames[t]=e,this.frames[t+b.R]=i,this.frames[t+b.G]=n,this.frames[t+b.B]=r,this.frames[t+b.A]=s,this.frames[t+b.R2]=a,this.frames[t+b.G2]=o,this.frames[t+b.B2]=h},b.prototype.apply=function(t,e,i,n,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=this.frames;if(i<h[0])switch(s){case X.setup:return o.color.setFromColor(o.data.color),void o.darkColor.setFromColor(o.data.darkColor);case X.first:var l=o.color,u=o.darkColor,c=o.data.color,f=o.data.darkColor;l.add((c.r-l.r)*r,(c.g-l.g)*r,(c.b-l.b)*r,(c.a-l.a)*r),u.add((f.r-u.r)*r,(f.g-u.g)*r,(f.b-u.b)*r,0)}else{var d,p,m,g,v=0,M=0,x=0,y=0,w=0,T=0,E=0;i>=h[h.length-b.ENTRIES]?(v=h[(d=h.length)+b.PREV_R],M=h[d+b.PREV_G],x=h[d+b.PREV_B],y=h[d+b.PREV_A],w=h[d+b.PREV_R2],T=h[d+b.PREV_G2],E=h[d+b.PREV_B2]):(v=h[(p=z.binarySearch(h,i,b.ENTRIES))+b.PREV_R],M=h[p+b.PREV_G],x=h[p+b.PREV_B],y=h[p+b.PREV_A],w=h[p+b.PREV_R2],T=h[p+b.PREV_G2],E=h[p+b.PREV_B2],m=h[p],g=this.getCurvePercent(p/b.ENTRIES-1,1-(i-m)/(h[p+b.PREV_TIME]-m)),v+=(h[p+b.R]-v)*g,M+=(h[p+b.G]-M)*g,x+=(h[p+b.B]-x)*g,y+=(h[p+b.A]-y)*g,w+=(h[p+b.R2]-w)*g,T+=(h[p+b.G2]-T)*g,E+=(h[p+b.B2]-E)*g),1==r?(o.color.set(v,M,x,y),o.darkColor.set(w,T,E,1)):(l=o.color,u=o.darkColor,s==X.setup&&(l.setFromColor(o.data.color),u.setFromColor(o.data.darkColor)),l.add((v-l.r)*r,(M-l.g)*r,(x-l.b)*r,(y-l.a)*r),u.add((w-u.r)*r,(T-u.g)*r,(E-u.b)*r,0))}}},b.ENTRIES=8,b.PREV_TIME=-8,b.PREV_R=-7,b.PREV_G=-6,b.PREV_B=-5,b.PREV_A=-4,b.PREV_R2=-3,b.PREV_G2=-2,b.PREV_B2=-1,b.R=1,b.G=2,b.B=3,b.A=4,b.R2=5,b.G2=6,b.B2=7,b);function b(t){var e=E.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*b.ENTRIES),e}U.TwoColorTimeline=A;var R=(S.prototype.getPropertyId=function(){return(i.attachment<<24)+this.slotIndex},S.prototype.getFrameCount=function(){return this.frames.length},S.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.attachmentNames[t]=i},S.prototype.apply=function(t,e,i,n,r,s,a){var o,h,l,u=t.slots[this.slotIndex];u.bone.active&&(a!=g.mixOut?i<(o=this.frames)[0]?s!=X.setup&&s!=X.first||this.setAttachment(t,u,u.data.attachmentName):(h=0,h=i>=o[o.length-1]?o.length-1:z.binarySearch(o,i,1)-1,l=this.attachmentNames[h],t.slots[this.slotIndex].setAttachment(null==l?null:t.getAttachment(this.slotIndex,l))):s==X.setup&&this.setAttachment(t,u,u.data.attachmentName))},S.prototype.setAttachment=function(t,e,i){e.attachment=null==i?null:t.getAttachment(this.slotIndex,i)},S);function S(t){this.frames=U.Utils.newFloatArray(t),this.attachmentNames=new Array(t)}U.AttachmentTimeline=R;var I,C=null,P=(ve(_,I=s),_.prototype.getPropertyId=function(){return(i.deform<<27)+ +this.attachment.id+this.slotIndex},_.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.frameVertices[t]=i},_.prototype.apply=function(t,e,i,n,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=o.getAttachment();if(h instanceof U.VertexAttachment&&h.deformAttachment==this.attachment){var l=o.deform;0==l.length&&(s=X.setup);var u=this.frameVertices,c=u[0].length,f=this.frames;if(i<f[0]){var d=h;switch(s){case X.setup:return void(l.length=0);case X.first:if(1==r){l.length=0;break}var p=U.Utils.setArraySize(l,c);if(null==d.bones)for(var m=d.vertices,g=0;g<c;g++)p[g]+=(m[g]-p[g])*r;else for(r=1-r,g=0;g<c;g++)p[g]*=r}}else{var v=U.Utils.setArraySize(l,c);if(i>=f[f.length-1]){var M=u[f.length-1];if(1==r)if(s==X.add)if(null==(d=h).bones)for(var m=d.vertices,x=0;x<c;x++)v[x]+=M[x]-m[x];else for(var y=0;y<c;y++)v[y]+=M[y];else U.Utils.arrayCopy(M,0,v,0,c);else switch(s){case X.setup:if(null==h.bones)for(var m=h.vertices,w=0;w<c;w++){var T=m[w];v[w]=T+(M[w]-T)*r}else for(var E=0;E<c;E++)v[E]=M[E]*r;break;case X.first:case X.replace:for(var A=0;A<c;A++)v[A]+=(M[A]-v[A])*r;break;case X.add:if(null==(d=h).bones)for(var m=d.vertices,b=0;b<c;b++)v[b]+=(M[b]-m[b])*r;else for(var R=0;R<c;R++)v[R]+=M[R]*r}}else{var S=z.binarySearch(f,i),I=u[S-1],C=u[S],P=f[S],_=this.getCurvePercent(S-1,1-(i-P)/(f[S-1]-P));if(1==r)if(s==X.add)if(null==(d=h).bones)for(var m=d.vertices,F=0;F<c;F++){var L=I[F];v[F]+=L+(C[F]-L)*_-m[F]}else for(var O=0;O<c;O++)L=I[O],v[O]+=L+(C[O]-L)*_;else for(var k=0;k<c;k++)L=I[k],v[k]=L+(C[k]-L)*_;else switch(s){case X.setup:if(null==h.bones)for(var m=h.vertices,N=0;N<c;N++)L=I[N],T=m[N],v[N]=T+(L+(C[N]-L)*_-T)*r;else for(var D=0;D<c;D++)L=I[D],v[D]=(L+(C[D]-L)*_)*r;break;case X.first:case X.replace:for(var V=0;V<c;V++)L=I[V],v[V]+=(L+(C[V]-L)*_-v[V])*r;break;case X.add:if(null==(d=h).bones)for(var m=d.vertices,B=0;B<c;B++)L=I[B],v[B]+=(L+(C[B]-L)*_-m[B])*r;else for(var Y=0;Y<c;Y++)L=I[Y],v[Y]+=(L+(C[Y]-L)*_)*r}}}}}},_);function _(t){var e=I.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t),e.frameVertices=new Array(t),null==C&&(C=U.Utils.newFloatArray(64)),e}U.DeformTimeline=P;var F=(L.prototype.getPropertyId=function(){return i.event<<24},L.prototype.getFrameCount=function(){return this.frames.length},L.prototype.setFrame=function(t,e){this.frames[t]=e.time,this.events[t]=e},L.prototype.apply=function(t,e,i,n,r,s,a){if(null!=n){var o=this.frames,h=this.frames.length;if(i<e)this.apply(t,e,Number.MAX_VALUE,n,r,s,a),e=-1;else if(e>=o[h-1])return;if(!(i<o[0])){var l=0;if(e<o[0])l=0;else for(var u=o[l=z.binarySearch(o,e)];0<l&&o[l-1]==u;)l--;for(;l<h&&i>=o[l];l++)n.push(this.events[l])}}},L);function L(t){this.frames=U.Utils.newFloatArray(t),this.events=new Array(t)}U.EventTimeline=F;var O=(k.prototype.getPropertyId=function(){return i.drawOrder<<24},k.prototype.getFrameCount=function(){return this.frames.length},k.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.drawOrders[t]=i},k.prototype.apply=function(t,e,i,n,r,s,a){var o=t.drawOrder,h=t.slots;if(a!=g.mixOut){var l=this.frames;if(i<l[0])s!=X.setup&&s!=X.first||U.Utils.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length);else{var u=0,u=i>=l[l.length-1]?l.length-1:z.binarySearch(l,i)-1,c=this.drawOrders[u];if(null==c)U.Utils.arrayCopy(h,0,o,0,h.length);else for(var f=0,d=c.length;f<d;f++)o[f]=h[c[f]]}}else s==X.setup&&U.Utils.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length)},k);function k(t){this.frames=U.Utils.newFloatArray(t),this.drawOrders=new Array(t)}U.DrawOrderTimeline=O;var N,D=(ve(V,N=s),V.prototype.getPropertyId=function(){return(i.ikConstraint<<24)+this.ikConstraintIndex},V.prototype.setFrame=function(t,e,i,n,r,s,a){t*=V.ENTRIES,this.frames[t]=e,this.frames[t+V.MIX]=i,this.frames[t+V.SOFTNESS]=n,this.frames[t+V.BEND_DIRECTION]=r,this.frames[t+V.COMPRESS]=s?1:0,this.frames[t+V.STRETCH]=a?1:0},V.prototype.apply=function(t,e,i,n,r,s,a){var o,h,l,u,c,f=this.frames,d=t.ikConstraints[this.ikConstraintIndex];if(d.active)if(i<f[0])switch(s){case X.setup:return d.mix=d.data.mix,d.softness=d.data.softness,d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,void(d.stretch=d.data.stretch);case X.first:d.mix+=(d.data.mix-d.mix)*r,d.softness+=(d.data.softness-d.softness)*r,d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,d.stretch=d.data.stretch}else i>=f[f.length-V.ENTRIES]?s==X.setup?(d.mix=d.data.mix+(f[f.length+V.PREV_MIX]-d.data.mix)*r,d.softness=d.data.softness+(f[f.length+V.PREV_SOFTNESS]-d.data.softness)*r,a==g.mixOut?(d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,d.stretch=d.data.stretch):(d.bendDirection=f[f.length+V.PREV_BEND_DIRECTION],d.compress=0!=f[f.length+V.PREV_COMPRESS],d.stretch=0!=f[f.length+V.PREV_STRETCH])):(d.mix+=(f[f.length+V.PREV_MIX]-d.mix)*r,d.softness+=(f[f.length+V.PREV_SOFTNESS]-d.softness)*r,a==g.mixIn&&(d.bendDirection=f[f.length+V.PREV_BEND_DIRECTION],d.compress=0!=f[f.length+V.PREV_COMPRESS],d.stretch=0!=f[f.length+V.PREV_STRETCH])):(h=f[(o=z.binarySearch(f,i,V.ENTRIES))+V.PREV_MIX],l=f[o+V.PREV_SOFTNESS],u=f[o],c=this.getCurvePercent(o/V.ENTRIES-1,1-(i-u)/(f[o+V.PREV_TIME]-u)),s==X.setup?(d.mix=d.data.mix+(h+(f[o+V.MIX]-h)*c-d.data.mix)*r,d.softness=d.data.softness+(l+(f[o+V.SOFTNESS]-l)*c-d.data.softness)*r,a==g.mixOut?(d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,d.stretch=d.data.stretch):(d.bendDirection=f[o+V.PREV_BEND_DIRECTION],d.compress=0!=f[o+V.PREV_COMPRESS],d.stretch=0!=f[o+V.PREV_STRETCH])):(d.mix+=(h+(f[o+V.MIX]-h)*c-d.mix)*r,d.softness+=(l+(f[o+V.SOFTNESS]-l)*c-d.softness)*r,a==g.mixIn&&(d.bendDirection=f[o+V.PREV_BEND_DIRECTION],d.compress=0!=f[o+V.PREV_COMPRESS],d.stretch=0!=f[o+V.PREV_STRETCH])))},V.ENTRIES=6,V.PREV_TIME=-6,V.PREV_MIX=-5,V.PREV_SOFTNESS=-4,V.PREV_BEND_DIRECTION=-3,V.PREV_COMPRESS=-2,V.PREV_STRETCH=-1,V.MIX=1,V.SOFTNESS=2,V.BEND_DIRECTION=3,V.COMPRESS=4,V.STRETCH=5,V);function V(t){var e=N.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*V.ENTRIES),e}U.IkConstraintTimeline=D;var B,Y=(ve(W,B=s),W.prototype.getPropertyId=function(){return(i.transformConstraint<<24)+this.transformConstraintIndex},W.prototype.setFrame=function(t,e,i,n,r,s){t*=W.ENTRIES,this.frames[t]=e,this.frames[t+W.ROTATE]=i,this.frames[t+W.TRANSLATE]=n,this.frames[t+W.SCALE]=r,this.frames[t+W.SHEAR]=s},W.prototype.apply=function(t,e,i,n,r,s,a){var o=this.frames,h=t.transformConstraints[this.transformConstraintIndex];if(h.active)if(i<o[0]){var l=h.data;switch(s){case X.setup:return h.rotateMix=l.rotateMix,h.translateMix=l.translateMix,h.scaleMix=l.scaleMix,void(h.shearMix=l.shearMix);case X.first:h.rotateMix+=(l.rotateMix-h.rotateMix)*r,h.translateMix+=(l.translateMix-h.translateMix)*r,h.scaleMix+=(l.scaleMix-h.scaleMix)*r,h.shearMix+=(l.shearMix-h.shearMix)*r}}else{var u,c,f,d,p=0,m=0,g=0,v=0;i>=o[o.length-W.ENTRIES]?(p=o[(u=o.length)+W.PREV_ROTATE],m=o[u+W.PREV_TRANSLATE],g=o[u+W.PREV_SCALE],v=o[u+W.PREV_SHEAR]):(p=o[(c=z.binarySearch(o,i,W.ENTRIES))+W.PREV_ROTATE],m=o[c+W.PREV_TRANSLATE],g=o[c+W.PREV_SCALE],v=o[c+W.PREV_SHEAR],f=o[c],d=this.getCurvePercent(c/W.ENTRIES-1,1-(i-f)/(o[c+W.PREV_TIME]-f)),p+=(o[c+W.ROTATE]-p)*d,m+=(o[c+W.TRANSLATE]-m)*d,g+=(o[c+W.SCALE]-g)*d,v+=(o[c+W.SHEAR]-v)*d),s==X.setup?(l=h.data,h.rotateMix=l.rotateMix+(p-l.rotateMix)*r,h.translateMix=l.translateMix+(m-l.translateMix)*r,h.scaleMix=l.scaleMix+(g-l.scaleMix)*r,h.shearMix=l.shearMix+(v-l.shearMix)*r):(h.rotateMix+=(p-h.rotateMix)*r,h.translateMix+=(m-h.translateMix)*r,h.scaleMix+=(g-h.scaleMix)*r,h.shearMix+=(v-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=B.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*W.ENTRIES),e}U.TransformConstraintTimeline=Y;var G,H=(ve(q,G=s),q.prototype.getPropertyId=function(){return(i.pathConstraintPosition<<24)+this.pathConstraintIndex},q.prototype.setFrame=function(t,e,i){t*=q.ENTRIES,this.frames[t]=e,this.frames[t+q.VALUE]=i},q.prototype.apply=function(t,e,i,n,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(i<o[0])switch(s){case X.setup:return void(h.position=h.data.position);case X.first:h.position+=(h.data.position-h.position)*r}else{var l,u,c,f=0;i>=o[o.length-q.ENTRIES]?f=o[o.length+q.PREV_VALUE]:(f=o[(l=z.binarySearch(o,i,q.ENTRIES))+q.PREV_VALUE],u=o[l],c=this.getCurvePercent(l/q.ENTRIES-1,1-(i-u)/(o[l+q.PREV_TIME]-u)),f+=(o[l+q.VALUE]-f)*c),s==X.setup?h.position=h.data.position+(f-h.data.position)*r:h.position+=(f-h.position)*r}},q.ENTRIES=2,q.PREV_TIME=-2,q.PREV_VALUE=-1,q.VALUE=1,q);function q(t){var e=G.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*q.ENTRIES),e}U.PathConstraintPositionTimeline=H;var j,K=(ve(Q,j=H),Q.prototype.getPropertyId=function(){return(i.pathConstraintSpacing<<24)+this.pathConstraintIndex},Q.prototype.apply=function(t,e,i,n,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(i<o[0])switch(s){case X.setup:return void(h.spacing=h.data.spacing);case X.first:h.spacing+=(h.data.spacing-h.spacing)*r}else{var l,u,c,f=0;i>=o[o.length-Q.ENTRIES]?f=o[o.length+Q.PREV_VALUE]:(f=o[(l=z.binarySearch(o,i,Q.ENTRIES))+Q.PREV_VALUE],u=o[l],c=this.getCurvePercent(l/Q.ENTRIES-1,1-(i-u)/(o[l+Q.PREV_TIME]-u)),f+=(o[l+Q.VALUE]-f)*c),s==X.setup?h.spacing=h.data.spacing+(f-h.data.spacing)*r:h.spacing+=(f-h.spacing)*r}},Q);function Q(t){return j.call(this,t)||this}U.PathConstraintSpacingTimeline=K;var Z,J=(ve($,Z=s),$.prototype.getPropertyId=function(){return(i.pathConstraintMix<<24)+this.pathConstraintIndex},$.prototype.setFrame=function(t,e,i,n){t*=$.ENTRIES,this.frames[t]=e,this.frames[t+$.ROTATE]=i,this.frames[t+$.TRANSLATE]=n},$.prototype.apply=function(t,e,i,n,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(i<o[0])switch(s){case X.setup:return h.rotateMix=h.data.rotateMix,void(h.translateMix=h.data.translateMix);case X.first:h.rotateMix+=(h.data.rotateMix-h.rotateMix)*r,h.translateMix+=(h.data.translateMix-h.translateMix)*r}else{var l,u,c,f=0,d=0;i>=o[o.length-$.ENTRIES]?(f=o[o.length+$.PREV_ROTATE],d=o[o.length+$.PREV_TRANSLATE]):(f=o[(l=z.binarySearch(o,i,$.ENTRIES))+$.PREV_ROTATE],d=o[l+$.PREV_TRANSLATE],u=o[l],c=this.getCurvePercent(l/$.ENTRIES-1,1-(i-u)/(o[l+$.PREV_TIME]-u)),f+=(o[l+$.ROTATE]-f)*c,d+=(o[l+$.TRANSLATE]-d)*c),s==X.setup?(h.rotateMix=h.data.rotateMix+(f-h.data.rotateMix)*r,h.translateMix=h.data.translateMix+(d-h.data.translateMix)*r):(h.rotateMix+=(f-h.rotateMix)*r,h.translateMix+=(d-h.translateMix)*r)}},$.ENTRIES=3,$.PREV_TIME=-3,$.PREV_ROTATE=-2,$.PREV_TRANSLATE=-1,$.ROTATE=1,$.TRANSLATE=2,$);function $(t){var e=Z.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*$.ENTRIES),e}U.PathConstraintMixTimeline=J}(me=me||{}),function(R){var t=(S.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,i=0,n=e.length;i<n;i++){var r=e[i];if(null!=r){r.animationLast=r.nextAnimationLast,r.trackLast=r.nextTrackLast;var s=t*r.timeScale;if(0<r.delay){if(r.delay-=s,0<r.delay)continue;s=-r.delay,r.delay=0}var a=r.next;if(null!=a){var o=r.trackLast-a.delay;if(0<=o){for(a.delay=0,a.trackTime+=0==r.timeScale?0:(o/r.timeScale+t)*a.timeScale,r.trackTime+=s,this.setCurrent(i,a,!0);null!=a.mixingFrom;)a.mixTime+=t,a=a.mixingFrom;continue}}else if(r.trackLast>=r.trackEnd&&null==r.mixingFrom){e[i]=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 i=t.mixingFrom;if(null==i)return!0;var n=this.updateMixingFrom(i,e);return i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,0<t.mixTime&&t.mixTime>=t.mixDuration?(0!=i.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=i.mixingFrom,null!=i.mixingFrom&&(i.mixingFrom.mixingTo=t),t.interruptAlpha=i.interruptAlpha,this.queue.end(i)),n):(i.trackTime+=e*i.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,i=this.tracks,n=!1,r=0,s=i.length;r<s;r++){var a=i[r];if(!(null==a||0<a.delay)){n=!0;var o=0==r?R.MixBlend.first:a.mixBlend,h=a.alpha;null!=a.mixingFrom?h*=this.applyMixingFrom(a,t,o):a.trackTime>=a.trackEnd&&null==a.next&&(h=0);var l=a.animationLast,u=a.getAnimationTime(),c=a.animation.timelines.length,f=a.animation.timelines;if(0==r&&1==h||o==R.MixBlend.add)for(var d=0;d<c;d++){R.Utils.webkit602BugfixHelper(h,o);var p=f[d];p instanceof R.AttachmentTimeline?this.applyAttachmentTimeline(p,t,u,o,!0):p.apply(t,l,u,e,h,o,R.MixDirection.mixIn)}else{var m=a.timelineMode,g=0==a.timelinesRotation.length;g&&R.Utils.setArraySize(a.timelinesRotation,c<<1,null);for(var v=a.timelinesRotation,d=0;d<c;d++){var M=f[d],x=m[d]==S.SUBSEQUENT?o:R.MixBlend.setup;M instanceof R.RotateTimeline?this.applyRotateTimeline(M,t,u,h,x,v,d<<1,g):M instanceof R.AttachmentTimeline?this.applyAttachmentTimeline(M,t,u,o,!0):(R.Utils.webkit602BugfixHelper(h,o),M.apply(t,l,u,e,h,x,R.MixDirection.mixIn))}}this.queueEvents(a,u),e.length=0,a.nextAnimationLast=u,a.nextTrackLast=a.trackTime}}for(var y=this.unkeyedState+S.SETUP,w=t.slots,T=0,E=t.slots.length;T<E;T++){var A,b=w[T];b.attachmentState==y&&(A=b.data.attachmentName,b.attachment=null==A?null:t.getAttachment(b.data.index,A))}return this.unkeyedState+=2,this.queue.drain(),n},S.prototype.applyMixingFrom=function(t,e,i){var n=t.mixingFrom;null!=n.mixingFrom&&this.applyMixingFrom(n,e,i);var r=0;0==t.mixDuration?(r=1,i==R.MixBlend.first&&(i=R.MixBlend.setup)):(1<(r=t.mixTime/t.mixDuration)&&(r=1),i!=R.MixBlend.first&&(i=n.mixBlend));var s=r<n.eventThreshold?this.events:null,a=r<n.attachmentThreshold,o=r<n.drawOrderThreshold,h=n.animationLast,l=n.getAnimationTime(),u=n.animation.timelines.length,c=n.animation.timelines,f=n.alpha*t.interruptAlpha,d=f*(1-r);if(i==R.MixBlend.add)for(var p=0;p<u;p++)c[p].apply(e,h,l,s,d,i,R.MixDirection.mixOut);else{var m=n.timelineMode,g=n.timelineHoldMix,v=0==n.timelinesRotation.length;v&&R.Utils.setArraySize(n.timelinesRotation,u<<1,null);for(var M=n.timelinesRotation,p=n.totalAlpha=0;p<u;p++){var x=c[p],y=R.MixDirection.mixOut,w=void 0,T=0;switch(m[p]){case S.SUBSEQUENT:if(!o&&x instanceof R.DrawOrderTimeline)continue;w=i,T=d;break;case S.FIRST:w=R.MixBlend.setup,T=d;break;case S.HOLD_SUBSEQUENT:w=i,T=f;break;case S.HOLD_FIRST:w=R.MixBlend.setup,T=f;break;default:w=R.MixBlend.setup;var E=g[p],T=f*Math.max(0,1-E.mixTime/E.mixDuration)}n.totalAlpha+=T,x instanceof R.RotateTimeline?this.applyRotateTimeline(x,e,l,T,w,M,p<<1,v):x instanceof R.AttachmentTimeline?this.applyAttachmentTimeline(x,e,l,w,a):(R.Utils.webkit602BugfixHelper(T,i),o&&x instanceof R.DrawOrderTimeline&&w==R.MixBlend.setup&&(y=R.MixDirection.mixIn),x.apply(e,h,l,s,T,w,y))}}return 0<t.mixDuration&&this.queueEvents(n,l),this.events.length=0,n.nextAnimationLast=l,n.nextTrackLast=n.trackTime,r},S.prototype.applyAttachmentTimeline=function(t,e,i,n,r){var s,a,o=e.slots[t.slotIndex];o.bone.active&&(i<(s=t.frames)[0]?n!=R.MixBlend.setup&&n!=R.MixBlend.first||this.setAttachment(e,o,o.data.attachmentName,r):(a=i>=s[s.length-1]?s.length-1:R.Animation.binarySearch(s,i)-1,this.setAttachment(e,o,t.attachmentNames[a],r)),o.attachmentState<=this.unkeyedState&&(o.attachmentState=this.unkeyedState+S.SETUP))},S.prototype.setAttachment=function(t,e,i,n){e.attachment=null==i?null:t.getAttachment(e.data.index,i),n&&(e.attachmentState=this.unkeyedState+S.CURRENT)},S.prototype.applyRotateTimeline=function(t,e,i,n,r,s,a,o){if(o&&(s[a]=0),1!=n){var h=t,l=h.frames,u=e.bones[h.boneIndex];if(u.active){var c=0,f=0;if(i<l[0])switch(r){case R.MixBlend.setup:u.rotation=u.data.rotation;default:return;case R.MixBlend.first:c=u.rotation,f=u.data.rotation}else{var d,p,m,g,c=r==R.MixBlend.setup?u.data.rotation:u.rotation;i>=l[l.length-R.RotateTimeline.ENTRIES]?f=u.data.rotation+l[l.length+R.RotateTimeline.PREV_ROTATION]:(p=l[(d=R.Animation.binarySearch(l,i,R.RotateTimeline.ENTRIES))+R.RotateTimeline.PREV_ROTATION],m=l[d],g=h.getCurvePercent((d>>1)-1,1-(i-m)/(l[d+R.RotateTimeline.PREV_TIME]-m)),f=l[d+R.RotateTimeline.ROTATION]-p,f=p+(f-=360*(16384-(16384.499999999996-f/360|0)))*g+u.data.rotation,f-=360*(16384-(16384.499999999996-f/360|0)))}var v,M,x,y,w=0,T=f-c;0==(T-=360*(16384-(16384.499999999996-T/360|0)))?w=s[a]:(M=v=0,M=o?(v=0,T):(v=s[a],s[a+1]),x=0<T,y=0<=v,R.MathUtils.signum(M)!=R.MathUtils.signum(T)&&Math.abs(M)<=90&&(180<Math.abs(v)&&(v+=360*R.MathUtils.signum(v)),y=x),w=T+v-v%360,y!=x&&(w+=360*R.MathUtils.signum(v)),s[a]=w),s[a+1]=T,c+=w*n,u.rotation=c-360*(16384-(16384.499999999996-c/360|0))}}else t.apply(e,0,i,null,1,r,R.MixDirection.mixIn)},S.prototype.queueEvents=function(t,e){for(var i=t.animationStart,n=t.animationEnd,r=n-i,s=t.trackLast%r,a=this.events,o=0,h=a.length;o<h;o++){var l=a[o];if(l.time<s)break;l.time>n||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:n<=e&&t.animationLast<n)&&this.queue.complete(t);o<h;o++)a[o].time<i||this.queue.event(t,a[o])},S.prototype.clearTracks=function(){var t=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var e=0,i=this.tracks.length;e<i;e++)this.clearTrack(e);this.tracks.length=0,this.queue.drainDisabled=t,this.queue.drain()},S.prototype.clearTrack=function(t){if(!(t>=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var i=e;;){var n=i.mixingFrom;if(null==n)break;this.queue.end(n),i.mixingFrom=null,i.mixingTo=null,i=n}this.tracks[e.trackIndex]=null,this.queue.drain()}}},S.prototype.setCurrent=function(t,e,i){var n=this.expandToIndex(t);this.tracks[t]=e,null!=n&&(i&&this.queue.interrupt(n),((e.mixingFrom=n).mixingTo=e).mixTime=0,null!=n.mixingFrom&&0<n.mixDuration&&(e.interruptAlpha*=Math.min(1,n.mixTime/n.mixDuration)),n.timelinesRotation.length=0),this.queue.start(e)},S.prototype.setAnimation=function(t,e,i){var n=this.data.skeletonData.findAnimation(e);if(null==n)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,n,i)},S.prototype.setAnimationWith=function(t,e,i){if(null==e)throw new Error("animation cannot be null.");var n=!0,r=this.expandToIndex(t);null!=r&&(-1==r.nextTrackLast?(this.tracks[t]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.disposeNext(r),r=r.mixingFrom,n=!1):this.disposeNext(r));var s=this.trackEntry(t,e,i,r);return this.setCurrent(t,s,n),this.queue.drain(),s},S.prototype.addAnimation=function(t,e,i,n){var r=this.data.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,i,n)},S.prototype.addAnimationWith=function(t,e,i,n){if(null==e)throw new Error("animation cannot be null.");var r=this.expandToIndex(t);if(null!=r)for(;null!=r.next;)r=r.next;var s,a=this.trackEntry(t,e,i,r);return null==r?(this.setCurrent(t,a,!0),this.queue.drain()):(r.next=a,n<=0&&(0!=(s=r.animationEnd-r.animationStart)?(r.loop?n+=s*(1+(r.trackTime/s|0)):n+=Math.max(s,r.trackTime),n-=this.data.getMix(r.animation,e)):n=r.trackTime)),a.delay=n,a},S.prototype.setEmptyAnimation=function(t,e){var i=this.setAnimationWith(t,S.emptyAnimation,!1);return i.mixDuration=e,i.trackEnd=e,i},S.prototype.addEmptyAnimation=function(t,e,i){i<=0&&(i-=e);var n=this.addAnimationWith(t,S.emptyAnimation,!1,i);return n.mixDuration=e,n.trackEnd=e,n},S.prototype.setEmptyAnimations=function(t){var e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var i=0,n=this.tracks.length;i<n;i++){var r=this.tracks[i];null!=r&&this.setEmptyAnimation(r.trackIndex,t)}this.queue.drainDisabled=e,this.queue.drain()},S.prototype.expandToIndex=function(t){return t<this.tracks.length?this.tracks[t]:(R.Utils.ensureArrayCapacity(this.tracks,t+1,null),this.tracks.length=t+1,null)},S.prototype.trackEntry=function(t,e,i,n){var r=this.trackEntryPool.obtain();return r.trackIndex=t,r.animation=e,r.loop=i,r.holdPrevious=!1,r.eventThreshold=0,r.attachmentThreshold=0,r.drawOrderThreshold=0,r.animationStart=0,r.animationEnd=e.duration,r.animationLast=-1,r.nextAnimationLast=-1,r.delay=0,r.trackTime=0,r.trackLast=-1,r.nextTrackLast=-1,r.trackEnd=Number.MAX_VALUE,r.timeScale=1,r.alpha=1,r.interruptAlpha=1,r.mixTime=0,r.mixDuration=null==n?0:this.data.getMix(n.animation,e),r.mixBlend=R.MixBlend.replace,r},S.prototype.disposeNext=function(t){for(var e=t.next;null!=e;)this.queue.dispose(e),e=e.next;t.next=null},S.prototype._animationsChanged=function(){this.animationsChanged=!1,this.propertyIDs.clear();for(var t=0,e=this.tracks.length;t<e;t++){var i=this.tracks[t];if(null!=i){for(;null!=i.mixingFrom;)i=i.mixingFrom;for(;null!=i.mixingFrom&&i.mixBlend==R.MixBlend.add||this.computeHold(i),null!=(i=i.mixingTo););}}},S.prototype.computeHold=function(t){var e=t.mixingTo,i=t.animation.timelines,n=t.animation.timelines.length,r=R.Utils.setArraySize(t.timelineMode,n);t.timelineHoldMix.length=0;var s=R.Utils.setArraySize(t.timelineHoldMix,n),a=this.propertyIDs;if(null!=e&&e.holdPrevious)for(var o=0;o<n;o++)r[o]=a.add(i[o].getPropertyId())?S.HOLD_FIRST:S.HOLD_SUBSEQUENT;else t:for(o=0;o<n;o++){var h=i[o],l=h.getPropertyId();if(a.add(l))if(null==e||h instanceof R.AttachmentTimeline||h instanceof R.DrawOrderTimeline||h instanceof R.EventTimeline||!e.animation.hasTimeline(l))r[o]=S.FIRST;else{for(var u=e.mixingTo;null!=u;u=u.mixingTo)if(!u.animation.hasTimeline(l)){if(0<t.mixDuration){r[o]=S.HOLD_MIX,s[o]=u;continue t}break}r[o]=S.HOLD_FIRST}else r[o]=S.SUBSEQUENT}},S.prototype.getCurrent=function(t){return t>=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("<empty>",[],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=(i.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},i.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)},i.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},i.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},i.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},i);function i(){this.mixBlend=R.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}R.TrackEntry=e;var o,n,r=(s.prototype.start=function(t){this.objects.push(o.start),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.interrupt=function(t){this.objects.push(o.interrupt),this.objects.push(t)},s.prototype.end=function(t){this.objects.push(o.end),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.dispose=function(t){this.objects.push(o.dispose),this.objects.push(t)},s.prototype.complete=function(t){this.objects.push(o.complete),this.objects.push(t)},s.prototype.event=function(t,e){this.objects.push(o.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,i=0;i<t.length;i+=2){var n=t[i],r=t[i+1];switch(n){case o.start:null!=r.listener&&r.listener.start&&r.listener.start(r);for(var s=0;s<e.length;s++)e[s].start&&e[s].start(r);break;case o.interrupt:for(null!=r.listener&&r.listener.interrupt&&r.listener.interrupt(r),s=0;s<e.length;s++)e[s].interrupt&&e[s].interrupt(r);break;case o.end:for(null!=r.listener&&r.listener.end&&r.listener.end(r),s=0;s<e.length;s++)e[s].end&&e[s].end(r);case o.dispose:for(null!=r.listener&&r.listener.dispose&&r.listener.dispose(r),s=0;s<e.length;s++)e[s].dispose&&e[s].dispose(r);this.animState.trackEntryPool.free(r);break;case o.complete:for(null!=r.listener&&r.listener.complete&&r.listener.complete(r),s=0;s<e.length;s++)e[s].complete&&e[s].complete(r);break;case o.event:var a=t[2+i++];for(null!=r.listener&&r.listener.event&&r.listener.event(r,a),s=0;s<e.length;s++)e[s].event&&e[s].event(r,a)}}this.clear(),this.drainDisabled=!1}},s.prototype.clear=function(){this.objects.length=0},s);function s(t){this.objects=[],this.drainDisabled=!1,this.animState=t}R.EventQueue=r,(n=o=R.EventType||(R.EventType={}))[n.start=0]="start",n[n.interrupt=1]="interrupt",n[n.end=2]="end",n[n.dispose=3]="dispose",n[n.complete=4]="complete",n[n.event=5]="event";var a=(h.prototype.start=function(t){},h.prototype.interrupt=function(t){},h.prototype.end=function(t){},h.prototype.dispose=function(t){},h.prototype.complete=function(t){},h.prototype.event=function(t,e){},h);function h(){}R.AnimationStateAdapter=a}(me=me||{}),t=me=me||{},Me.prototype.setMix=function(t,e,i){var n=this.skeletonData.findAnimation(t);if(null==n)throw new Error("Animation not found: "+t);var r=this.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);this.setMixWith(n,r,i)},Me.prototype.setMixWith=function(t,e,i){if(null==t)throw new Error("from cannot be null.");if(null==e)throw new Error("to cannot be null.");var n=t.name+"."+e.name;this.animationToMixTime[n]=i},Me.prototype.getMix=function(t,e){var i=t.name+"."+e.name,n=this.animationToMixTime[i];return void 0===n?this.defaultMix:n},e=Me,t.AnimationStateData=e,d=me=me||{},xe.prototype.downloadText=function(t,e,i){var n=new XMLHttpRequest;n.overrideMimeType("text/html"),this.rawDataUris[t]&&(t=this.rawDataUris[t]),n.open("GET",t,!0),n.onload=function(){200==n.status?e(n.responseText):i(n.status,n.responseText)},n.onerror=function(){i(n.status,n.responseText)},n.send()},xe.prototype.downloadBinary=function(t,e,i){var n=new XMLHttpRequest;this.rawDataUris[t]&&(t=this.rawDataUris[t]),n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status?e(new Uint8Array(n.response)):i(n.status,n.responseText)},n.onerror=function(){i(n.status,n.responseText)},n.send()},xe.prototype.setRawDataURI=function(t,e){this.rawDataUris[this.pathPrefix+t]=e},xe.prototype.loadBinary=function(i,e,n){var r=this;void 0===e&&(e=null),void 0===n&&(n=null),i=this.pathPrefix+i,this.toLoad++,this.downloadBinary(i,function(t){r.assets[i]=t,e&&e(i,t),r.toLoad--,r.loaded++},function(t,e){r.errors[i]="Couldn't load binary "+i+": status "+status+", "+e,n&&n(i,"Couldn't load binary "+i+": status "+status+", "+e),r.toLoad--,r.loaded++})},xe.prototype.loadText=function(i,e,n){var r=this;void 0===e&&(e=null),void 0===n&&(n=null),i=this.pathPrefix+i,this.toLoad++,this.downloadText(i,function(t){r.assets[i]=t,e&&e(i,t),r.toLoad--,r.loaded++},function(t,e){r.errors[i]="Couldn't load text "+i+": status "+status+", "+e,n&&n(i,"Couldn't load text "+i+": status "+status+", "+e),r.toLoad--,r.loaded++})},xe.prototype.loadTexture=function(i,n,e){var r=this;void 0===n&&(n=null),void 0===e&&(e=null);var s=i=this.pathPrefix+i;this.toLoad++;var a=new Image;a.crossOrigin="anonymous",a.onload=function(t){var e=r.textureLoader(a);r.assets[s]=e,r.toLoad--,r.loaded++,n&&n(i,a)},a.onerror=function(t){r.errors[i]="Couldn't load image "+i,r.toLoad--,r.loaded++,e&&e(i,"Couldn't load image "+i)},this.rawDataUris[i]&&(i=this.rawDataUris[i]),a.src=i},xe.prototype.loadTextureAtlas=function(h,l,u){var c=this;void 0===l&&(l=null),void 0===u&&(u=null);var f=0<=h.lastIndexOf("/")?h.substring(0,h.lastIndexOf("/")):"";h=this.pathPrefix+h,this.toLoad++,this.downloadText(h,function(s){var a={count:0},o=new Array;try{new d.TextureAtlas(s,function(t){o.push(""==f?t:f+"/"+t);var e=document.createElement("img");return e.width=16,e.height=16,new d.FakeTexture(e)})}catch(t){var e=t;return c.errors[h]="Couldn't load texture atlas "+h+": "+e.message,u&&u(h,"Couldn't load texture atlas "+h+": "+e.message),c.toLoad--,void c.loaded++}for(var t=0,i=o;t<i.length;t++)!function(t){var r=!1;c.loadTexture(t,function(t,e){if(a.count++,a.count==o.length)if(r)c.errors[h]="Couldn't load texture atlas page "+t+"} of atlas "+h,u&&u(h,"Couldn't load texture atlas page "+t+" of atlas "+h),c.toLoad--,c.loaded++;else try{var i=new d.TextureAtlas(s,function(t){return c.get(""==f?t:f+"/"+t)});c.assets[h]=i,l&&l(h,i),c.toLoad--,c.loaded++}catch(t){var n=t;c.errors[h]="Couldn't load texture atlas "+h+": "+n.message,u&&u(h,"Couldn't load texture atlas "+h+": "+n.message),c.toLoad--,c.loaded++}},function(t,e){r=!0,a.count++,a.count==o.length&&(c.errors[h]="Couldn't load texture atlas page "+t+"} of atlas "+h,u&&u(h,"Couldn't load texture atlas page "+t+" of atlas "+h),c.toLoad--,c.loaded++)})}(i[t])},function(t,e){c.errors[h]="Couldn't load texture atlas "+h+": status "+status+", "+e,u&&u(h,"Couldn't load texture atlas "+h+": status "+status+", "+e),c.toLoad--,c.loaded++})},xe.prototype.get=function(t){return t=this.pathPrefix+t,this.assets[t]},xe.prototype.remove=function(t){t=this.pathPrefix+t;var e=this.assets[t];e.dispose&&e.dispose(),this.assets[t]=null},xe.prototype.removeAll=function(){for(var t in this.assets){var e=this.assets[t];e.dispose&&e.dispose()}this.assets={}},xe.prototype.isLoadingComplete=function(){return 0==this.toLoad},xe.prototype.getToLoad=function(){return this.toLoad},xe.prototype.getLoaded=function(){return this.loaded},xe.prototype.dispose=function(){this.removeAll()},xe.prototype.hasErrors=function(){return 0<Object.keys(this.errors).length},xe.prototype.getErrors=function(){return this.errors},i=xe,d.AssetManager=i,s=me=me||{},ye.prototype.newRegionAttachment=function(t,e,i){var n=this.atlas.findRegion(i);if(null==n)throw new Error("Region not found in atlas: "+i+" (region attachment: "+e+")");n.renderObject=n;var r=new s.RegionAttachment(e);return r.setRegion(n),r},ye.prototype.newMeshAttachment=function(t,e,i){var n=this.atlas.findRegion(i);if(null==n)throw new Error("Region not found in atlas: "+i+" (mesh attachment: "+e+")");n.renderObject=n;var r=new s.MeshAttachment(e);return r.region=n,r},ye.prototype.newBoundingBoxAttachment=function(t,e){return new s.BoundingBoxAttachment(e)},ye.prototype.newPathAttachment=function(t,e){return new s.PathAttachment(e)},ye.prototype.newPointAttachment=function(t,e){return new s.PointAttachment(e)},ye.prototype.newClippingAttachment=function(t,e){return new s.ClippingAttachment(e)},r=ye,s.AtlasAttachmentLoader=r,a=me=me||{},(o=a.BlendMode||(a.BlendMode={}))[o.Normal=0]="Normal",o[o.Additive=1]="Additive",o[o.Multiply=2]="Multiply",o[o.Screen=3]="Screen",_=me=me||{},we.prototype.isActive=function(){return this.active},we.prototype.update=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},we.prototype.updateWorldTransform=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},we.prototype.updateWorldTransformWith=function(t,e,i,n,r,s,a){this.ax=t,this.ay=e,this.arotation=i,this.ascaleX=n,this.ascaleY=r,this.ashearX=s,this.ashearY=a,this.appliedValid=!0;var o=this.parent;if(null==o){var h=this.skeleton,l=i+90+a,u=h.scaleX,c=h.scaleY;return this.a=_.MathUtils.cosDeg(i+s)*n*u,this.b=_.MathUtils.cosDeg(l)*r*u,this.c=_.MathUtils.sinDeg(i+s)*n*c,this.d=_.MathUtils.sinDeg(l)*r*c,this.worldX=t*u+h.x,void(this.worldY=e*c+h.y)}var f=o.a,d=o.b,p=o.c,m=o.d;switch(this.worldX=f*t+d*e+o.worldX,this.worldY=p*t+m*e+o.worldY,this.data.transformMode){case _.TransformMode.Normal:var l=i+90+a,g=_.MathUtils.cosDeg(i+s)*n,v=_.MathUtils.cosDeg(l)*r,M=_.MathUtils.sinDeg(i+s)*n,x=_.MathUtils.sinDeg(l)*r;return this.a=f*g+d*M,this.b=f*v+d*x,this.c=p*g+m*M,void(this.d=p*v+m*x);case _.TransformMode.OnlyTranslation:l=i+90+a,this.a=_.MathUtils.cosDeg(i+s)*n,this.b=_.MathUtils.cosDeg(l)*r,this.c=_.MathUtils.sinDeg(i+s)*n,this.d=_.MathUtils.sinDeg(l)*r;break;case _.TransformMode.NoRotationOrReflection:var y=0,w=i+s-(y=1e-4<(E=f*f+p*p)?(E=Math.abs(f*m-d*p)/E,f/=this.skeleton.scaleX,d=(p/=this.skeleton.scaleY)*E,m=f*E,Math.atan2(p,f)*_.MathUtils.radDeg):(p=f=0,90-Math.atan2(m,d)*_.MathUtils.radDeg)),T=i+a-y+90,g=_.MathUtils.cosDeg(w)*n,v=_.MathUtils.cosDeg(T)*r,M=_.MathUtils.sinDeg(w)*n,x=_.MathUtils.sinDeg(T)*r;this.a=f*g-d*M,this.b=f*v-d*x,this.c=p*g+m*M,this.d=p*v+m*x;break;case _.TransformMode.NoScale:case _.TransformMode.NoScaleOrReflection:var E,A=_.MathUtils.cosDeg(i),b=_.MathUtils.sinDeg(i),R=(f*A+d*b)/this.skeleton.scaleX,S=(p*A+m*b)/this.skeleton.scaleY;1e-5<(E=Math.sqrt(R*R+S*S))&&(E=1/E),R*=E,S*=E,E=Math.sqrt(R*R+S*S),this.data.transformMode==_.TransformMode.NoScale&&f*m-d*p<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(E=-E);var I=Math.PI/2+Math.atan2(S,R),C=Math.cos(I)*E,P=Math.sin(I)*E,g=_.MathUtils.cosDeg(s)*n,v=_.MathUtils.cosDeg(90+a)*r,M=_.MathUtils.sinDeg(s)*n,x=_.MathUtils.sinDeg(90+a)*r;this.a=R*g+C*M,this.b=R*v+C*x,this.c=S*g+P*M,this.d=S*v+P*x}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY},we.prototype.setToSetupPose=function(){var t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY},we.prototype.getWorldRotationX=function(){return Math.atan2(this.c,this.a)*_.MathUtils.radDeg},we.prototype.getWorldRotationY=function(){return Math.atan2(this.d,this.b)*_.MathUtils.radDeg},we.prototype.getWorldScaleX=function(){return Math.sqrt(this.a*this.a+this.c*this.c)},we.prototype.getWorldScaleY=function(){return Math.sqrt(this.b*this.b+this.d*this.d)},we.prototype.updateAppliedTransform=function(){this.appliedValid=!0;var t=this.parent;if(null==t)return this.ax=this.worldX,this.ay=this.worldY,this.arotation=Math.atan2(this.c,this.a)*_.MathUtils.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*_.MathUtils.radDeg);var e=t.a,i=t.b,n=t.c,r=t.d,s=1/(e*r-i*n),a=this.worldX-t.worldX,o=this.worldY-t.worldY;this.ax=a*r*s-o*i*s,this.ay=o*e*s-a*n*s;var h,l=s*r,u=s*e,c=s*i,f=s*n,d=l*this.a-c*this.c,p=l*this.b-c*this.d,m=u*this.c-f*this.a,g=u*this.d-f*this.b;this.ashearX=0,this.ascaleX=Math.sqrt(d*d+m*m),1e-4<this.ascaleX?(h=d*g-p*m,this.ascaleY=h/this.ascaleX,this.ashearY=Math.atan2(d*p+m*g,h)*_.MathUtils.radDeg,this.arotation=Math.atan2(m,d)*_.MathUtils.radDeg):(this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+g*g),this.ashearY=0,this.arotation=90-Math.atan2(g,p)*_.MathUtils.radDeg)},we.prototype.worldToLocal=function(t){var e=this.a,i=this.b,n=this.c,r=this.d,s=1/(e*r-i*n),a=t.x-this.worldX,o=t.y-this.worldY;return t.x=a*r*s-o*i*s,t.y=o*e*s-a*n*s,t},we.prototype.localToWorld=function(t){var e=t.x,i=t.y;return t.x=e*this.a+i*this.b+this.worldX,t.y=e*this.c+i*this.d+this.worldY,t},we.prototype.worldToLocalRotation=function(t){var e=_.MathUtils.sinDeg(t),i=_.MathUtils.cosDeg(t);return Math.atan2(this.a*e-this.c*i,this.d*i-this.b*e)*_.MathUtils.radDeg+this.rotation-this.shearX},we.prototype.localToWorldRotation=function(t){t-=this.rotation-this.shearX;var e=_.MathUtils.sinDeg(t),i=_.MathUtils.cosDeg(t);return Math.atan2(i*this.c+e*this.d,i*this.a+e*this.b)*_.MathUtils.radDeg},we.prototype.rotateWorld=function(t){var e=this.a,i=this.b,n=this.c,r=this.d,s=_.MathUtils.cosDeg(t),a=_.MathUtils.sinDeg(t);this.a=s*e-a*n,this.b=s*i-a*r,this.c=a*e+s*n,this.d=a*i+s*r,this.appliedValid=!1},h=we,_.Bone=h,(l=me=me||{}).BoneData=Te,(c=u=l.TransformMode||(l.TransformMode={}))[c.Normal=0]="Normal",c[c.OnlyTranslation=1]="OnlyTranslation",c[c.NoRotationOrReflection=2]="NoRotationOrReflection",c[c.NoScale=3]="NoScale",c[c.NoScaleOrReflection=4]="NoScaleOrReflection",(me||(me={})).ConstraintData=function(t,e,i){this.name=t,this.order=e,this.skinRequired=i},(me||(me={})).Event=function(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e},(me||(me={})).EventData=function(t){this.name=t},ht=me=me||{},Ee.prototype.isActive=function(){return this.active},Ee.prototype.apply=function(){this.update()},Ee.prototype.update=function(){var t=this.target,e=this.bones;switch(e.length){case 1:this.apply1(e[0],t.worldX,t.worldY,this.compress,this.stretch,this.data.uniform,this.mix);break;case 2:this.apply2(e[0],e[1],t.worldX,t.worldY,this.bendDirection,this.stretch,this.softness,this.mix)}},Ee.prototype.apply1=function(t,e,i,n,r,s,a){t.appliedValid||t.updateAppliedTransform();var o=t.parent,h=o.a,l=o.b,u=o.c,c=o.d,f=-t.ashearX-t.arotation,d=0,p=0;switch(t.data.transformMode){case ht.TransformMode.OnlyTranslation:d=e-t.worldX,p=i-t.worldY;break;case ht.TransformMode.NoRotationOrReflection:var m=Math.abs(h*c-l*u)/(h*h+u*u),g=h/t.skeleton.scaleX,v=u/t.skeleton.scaleY,l=-v*m*t.skeleton.scaleX,c=g*m*t.skeleton.scaleY;f+=Math.atan2(v,g)*ht.MathUtils.radDeg;default:var M=e-o.worldX,x=i-o.worldY,y=h*c-l*u,d=(M*c-x*l)/y-t.ax,p=(x*h-M*u)/y-t.ay}f+=Math.atan2(p,d)*ht.MathUtils.radDeg,t.ascaleX<0&&(f+=180),180<f?f-=360:f<-180&&(f+=360);var w=t.ascaleX,T=t.ascaleY;if(n||r){switch(t.data.transformMode){case ht.TransformMode.NoScale:case ht.TransformMode.NoScaleOrReflection:d=e-t.worldX,p=i-t.worldY}var E=t.data.length*w,A=Math.sqrt(d*d+p*p);(n&&A<E||r&&E<A&&1e-4<E)&&(w*=m=(A/E-1)*a+1,s&&(T*=m))}t.updateWorldTransformWith(t.ax,t.ay,t.arotation+f*a,w,T,t.ashearX,t.ashearY)},Ee.prototype.apply2=function(t,e,i,n,r,s,a,o){if(0!=o){t.appliedValid||t.updateAppliedTransform(),e.appliedValid||e.updateAppliedTransform();var h=t.ax,l=t.ay,u=t.ascaleX,c=u,f=t.ascaleY,d=e.ascaleX,p=0,m=0,g=0,g=u<0?(u=-u,p=180,-1):(p=0,1);f<0&&(f=-f,g=-g),m=d<0?(d=-d,180):0;var v=e.ax,M=0,x=0,y=0,w=t.a,T=t.b,E=t.c,A=t.d,b=Math.abs(u-f)<=1e-4,y=b?(x=w*v+T*(M=e.ay)+t.worldX,E*v+A*M+t.worldY):(M=0,x=w*v+t.worldX,E*v+t.worldY),R=t.parent,w=R.a,T=R.b;E=R.c;var S,I=1/(w*(A=R.d)-T*E),C=x-R.worldX,P=y-R.worldY,_=(C*A-P*T)*I-h,F=(P*w-C*E)*I-l,L=Math.sqrt(_*_+F*F),O=e.data.length*d;if(L<1e-4)return this.apply1(t,i,n,!1,s,!1,o),void e.updateWorldTransformWith(v,M,0,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY);var k,N,D,V=((C=i-R.worldX)*A-(P=n-R.worldY)*T)*I-h,B=(P*w-C*E)*I-l,Y=V*V+B*B;0!=a&&(a*=u*(d+1)/2,0<(N=(k=Math.sqrt(Y))-L-O*u+a)&&(Y=(V-=(D=(N-a*(1-(D=Math.min(1,N/(2*a))-1)*D))/k)*V)*V+(B-=D*B)*B));t:if(b){var U=(Y-L*L-(O*=u)*O)/(2*L*O);U<-1?U=-1:1<U&&(U=1,s&&(c*=(Math.sqrt(Y)/(L+O)-1)*o+1)),S=Math.acos(U)*r,w=L+O*U,T=O*Math.sin(S),st=Math.atan2(B*w-V*T,V*w+B*T)}else{var X=(w=u*O)*w,z=(T=f*O)*T,W=Math.atan2(B,V),G=-2*z*L,H=z-X;if(0<=(A=G*G-4*H*(E=z*L*L+X*Y-X*z))){var q=Math.sqrt(A);G<0&&(q=-q);var j=(q=-(G+q)/2)/H,K=E/q,Q=Math.abs(j)<Math.abs(K)?j:K;if(Q*Q<=Y){P=Math.sqrt(Y-Q*Q)*r,st=W-Math.atan2(P,Q),S=Math.atan2(P/f,(Q-L)/u);break t}}var Z=ht.MathUtils.PI,J=L-w,$=J*J,tt=0,et=0,it=L+w,nt=it*it,rt=0;-1<=(E=-w*L/(X-z))&&E<=1&&(E=Math.acos(E),(A=(C=w*Math.cos(E)+L)*C+(P=T*Math.sin(E))*P)<$&&(Z=E,$=A,J=C,tt=P),nt<A&&(et=E,nt=A,it=C,rt=P)),S=Y<=($+nt)/2?(st=W-Math.atan2(tt*r,J),Z*r):(st=W-Math.atan2(rt*r,it),et*r)}var st,at=Math.atan2(M,v)*g,ot=t.arotation;180<(st=(st-at)*ht.MathUtils.radDeg+p-ot)?st-=360:st<-180&&(st+=360),t.updateWorldTransformWith(h,l,ot+st*o,c,t.ascaleY,0,0),ot=e.arotation,180<(S=((S+at)*ht.MathUtils.radDeg-e.ashearX)*g+m-ot)?S-=360:S<-180&&(S+=360),e.updateWorldTransformWith(v,M,ot+S*o,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)}else e.updateWorldTransform()},f=Ee,ht.IkConstraint=f,p=me=me||{},m=p.ConstraintData,ve(Ae,m),g=Ae,p.IkConstraintData=g,j=me=me||{},be.prototype.isActive=function(){return this.active},be.prototype.apply=function(){this.update()},be.prototype.update=function(){var t=this.target.getAttachment();if(t instanceof j.PathAttachment){var e=this.rotateMix,i=this.translateMix,n=0<e;if(0<i||n){var r=this.data,s=r.spacingMode==j.SpacingMode.Percent,a=r.rotateMode,o=a==j.RotateMode.Tangent,h=a==j.RotateMode.ChainScale,l=this.bones.length,u=o?l:l+1,c=this.bones,f=j.Utils.setArraySize(this.spaces,u),d=null,p=this.spacing;if(h||!s){h&&(d=j.Utils.setArraySize(this.lengths,l));for(var m=r.spacingMode==j.SpacingMode.Length,g=0,v=u-1;g<v;){var M,x,y=(R=c[g]).data.length;y<be.epsilon?(h&&(d[g]=0),f[++g]=0):s?(h&&(I=y*R.a,C=y*R.c,M=Math.sqrt(I*I+C*C),d[g]=M),f[++g]=p):(I=y*R.a,C=y*R.c,x=Math.sqrt(I*I+C*C),h&&(d[g]=x),f[++g]=(m?y+p:p)*x/y)}}else for(g=1;g<u;g++)f[g]=p;var w=this.computeWorldPositions(t,u,o,r.positionMode==j.PositionMode.Percent,s),T=w[0],E=w[1],A=r.offsetRotation,b=!1;0==A?b=a==j.RotateMode.Chain:(b=!1,A*=0<(S=this.target.bone).a*S.d-S.b*S.c?j.MathUtils.degRad:-j.MathUtils.degRad);for(var R,g=0,S=3;g<l;g++,S+=3){(R=c[g]).worldX+=(T-R.worldX)*i,R.worldY+=(E-R.worldY)*i;var I,C,P,_,F,L,O,k,N,D,V,B,Y=(I=w[S])-T,U=(C=w[S+1])-E;!h||0!=(P=d[g])&&(_=(Math.sqrt(Y*Y+U*U)/P-1)*e+1,R.a*=_,R.c*=_),T=I,E=C,n&&(F=R.a,L=R.b,O=R.c,k=R.d,D=N=B=0,B=o?w[S-1]:0==f[g+1]?w[S+2]:Math.atan2(U,Y),B-=Math.atan2(O,F),b?(N=Math.cos(B),D=Math.sin(B),T+=((V=R.data.length)*(N*F-D*O)-Y)*e,E+=(V*(D*F+N*O)-U)*e):B+=A,B>j.MathUtils.PI?B-=j.MathUtils.PI2:B<-j.MathUtils.PI&&(B+=j.MathUtils.PI2),B*=e,N=Math.cos(B),D=Math.sin(B),R.a=N*F-D*O,R.b=N*L-D*k,R.c=D*F+N*O,R.d=D*L+N*k),R.appliedValid=!1}}}},be.prototype.computeWorldPositions=function(t,e,i,n,r){var s=this.target,a=this.position,o=this.spaces,h=j.Utils.setArraySize(this.positions,3*e+2),l=null,u=t.closed,c=t.worldVerticesLength,f=c/6,d=be.NONE;if(!t.constantSpeed){var p=t.lengths,m=p[f-=u?1:2];if(n&&(a*=m),r)for(var g=1;g<e;g++)o[g]*=m;l=j.Utils.setArraySize(this.world,8);for(var g=0,v=0,M=0;g<e;g++,v+=3){var x=a+=z=o[g];if(u)(x%=m)<0&&(x+=m),M=0;else{if(x<0){d!=be.BEFORE&&(d=be.BEFORE,t.computeWorldVertices(s,2,4,l,0,2)),this.addBeforePosition(x,l,0,h,v);continue}if(m<x){d!=be.AFTER&&(d=be.AFTER,t.computeWorldVertices(s,c-6,4,l,0,2)),this.addAfterPosition(x-m,l,0,h,v);continue}}for(;;M++){var y=p[M];if(!(y<x)){0==M?x/=y:x=(x-(H=p[M-1]))/(y-H);break}}M!=d&&(d=M,u&&M==f?(t.computeWorldVertices(s,c-4,4,l,0,2),t.computeWorldVertices(s,0,4,l,4,2)):t.computeWorldVertices(s,6*M+2,8,l,0,2)),this.addCurvePosition(x,l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],h,v,i||0<g&&0==z)}return h}u?(c+=2,l=j.Utils.setArraySize(this.world,c),t.computeWorldVertices(s,2,c-4,l,0,2),t.computeWorldVertices(s,0,2,l,c-4,2),l[c-2]=l[0],l[c-1]=l[1]):(f--,c-=4,l=j.Utils.setArraySize(this.world,c),t.computeWorldVertices(s,2,c,l,0,2));for(var w=j.Utils.setArraySize(this.curves,f),T=0,E=l[0],A=l[1],b=0,R=0,S=0,I=0,C=0,P=0,_=0,F=0,L=0,O=0,k=0,N=0,D=0,V=0,g=0,B=2;g<f;g++,B+=6)b=l[B],R=l[B+1],S=l[B+2],I=l[B+3],k=2*(_=.1875*(E-2*b+S))+(L=.09375*(3*(b-S)-E+(C=l[B+4]))),N=2*(F=.1875*(A-2*R+I))+(O=.09375*(3*(R-I)-A+(P=l[B+5]))),D=.75*(b-E)+_+.16666667*L,V=.75*(R-A)+F+.16666667*O,T+=Math.sqrt(D*D+V*V),D+=k,V+=N,k+=L,N+=O,T+=Math.sqrt(D*D+V*V),D+=k,V+=N,T+=Math.sqrt(D*D+V*V),D+=k+L,V+=N+O,T+=Math.sqrt(D*D+V*V),w[g]=T,E=C,A=P;if(a*=n?T:T/t.lengths[f-1],r)for(g=1;g<e;g++)o[g]*=T;for(var Y=this.segments,U=0,g=0,v=0,M=0,X=0;g<e;g++,v+=3){var z,x=a+=z=o[g];if(u)(x%=T)<0&&(x+=T),M=0;else{if(x<0){this.addBeforePosition(x,l,0,h,v);continue}if(T<x){this.addAfterPosition(x-T,l,c-4,h,v);continue}}for(;;M++){var W=w[M];if(!(W<x)){0==M?x/=W:x=(x-(H=w[M-1]))/(W-H);break}}if(M!=d){var G=6*(d=M),E=l[G],A=l[G+1],b=l[G+2],R=l[G+3],S=l[G+4],I=l[G+5],k=2*(_=.03*(E-2*b+S))+(L=.006*(3*(b-S)-E+(C=l[G+6]))),N=2*(F=.03*(A-2*R+I))+(O=.006*(3*(R-I)-A+(P=l[G+7]))),D=.3*(b-E)+_+.16666667*L,V=.3*(R-A)+F+.16666667*O,U=Math.sqrt(D*D+V*V);for(Y[0]=U,G=1;G<8;G++)D+=k,V+=N,k+=L,N+=O,U+=Math.sqrt(D*D+V*V),Y[G]=U;D+=k,V+=N,U+=Math.sqrt(D*D+V*V),Y[8]=U,D+=k+L,V+=N+O,U+=Math.sqrt(D*D+V*V),Y[9]=U,X=0}for(x*=U;;X++){var H,q=Y[X];if(!(q<x)){0==X?x/=q:x=X+(x-(H=Y[X-1]))/(q-H);break}}this.addCurvePosition(.1*x,E,A,b,R,S,I,C,P,h,v,i||0<g&&0==z)}return h},be.prototype.addBeforePosition=function(t,e,i,n,r){var s=e[i],a=e[i+1],o=e[i+2]-s,h=e[i+3]-a,l=Math.atan2(h,o);n[r]=s+t*Math.cos(l),n[r+1]=a+t*Math.sin(l),n[r+2]=l},be.prototype.addAfterPosition=function(t,e,i,n,r){var s=e[i+2],a=e[i+3],o=s-e[i],h=a-e[i+1],l=Math.atan2(h,o);n[r]=s+t*Math.cos(l),n[r+1]=a+t*Math.sin(l),n[r+2]=l},be.prototype.addCurvePosition=function(t,e,i,n,r,s,a,o,h,l,u,c){if(0==t||isNaN(t))return l[u]=e,l[u+1]=i,void(l[u+2]=Math.atan2(r-i,n-e));var f=t*t,d=f*t,p=1-t,m=p*p,g=m*p,v=p*t,M=3*v,x=p*M,y=M*t,w=e*g+n*x+s*y+o*d,T=i*g+r*x+a*y+h*d;l[u]=w,l[u+1]=T,c&&(l[u+2]=t<.001?Math.atan2(r-i,n-e):Math.atan2(T-(i*m+r*v*2+a*f),w-(e*m+n*v*2+s*f)))},be.NONE=-1,be.BEFORE=-2,be.AFTER=-3,be.epsilon=1e-5,v=be,j.PathConstraint=v,M=me=me||{},x=M.ConstraintData,ve(Re,x),E=Re,M.PathConstraintData=E,(y=M.PositionMode||(M.PositionMode={}))[y.Fixed=0]="Fixed",y[y.Percent=1]="Percent",(w=M.SpacingMode||(M.SpacingMode={}))[w.Length=0]="Length",w[w.Fixed=1]="Fixed",w[w.Percent=2]="Percent",(T=M.RotateMode||(M.RotateMode={}))[T.Tangent=0]="Tangent",T[T.Chain=1]="Chain",T[T.ChainScale=2]="ChainScale",A=me=me||{},Se.prototype.loaded=function(){var t=0;for(var e in this.assets)t++;return t},b=Se,Ie.prototype.queueAsset=function(t,e,i){var n=this.clientAssets[t];return null==n&&(n=new b(t),this.clientAssets[t]=n),null!==e&&(n.textureLoader=e),n.toLoad.push(i),this.queuedAssets[i]!==i&&(this.queuedAssets[i]=i,!0)},Ie.prototype.loadText=function(t,e){var i,n=this;e=this.pathPrefix+e,this.queueAsset(t,null,e)&&((i=new XMLHttpRequest).overrideMimeType("text/html"),i.onreadystatechange=function(){i.readyState==XMLHttpRequest.DONE&&(200<=i.status&&i.status<300?n.rawAssets[e]=i.responseText:n.errors[e]="Couldn't load text "+e+": status "+i.status+", "+i.responseText)},i.open("GET",e,!0),i.send())},Ie.prototype.loadJson=function(t,e){var i,n=this;e=this.pathPrefix+e,this.queueAsset(t,null,e)&&((i=new XMLHttpRequest).overrideMimeType("text/html"),i.onreadystatechange=function(){i.readyState==XMLHttpRequest.DONE&&(200<=i.status&&i.status<300?n.rawAssets[e]=JSON.parse(i.responseText):n.errors[e]="Couldn't load text "+e+": status "+i.status+", "+i.responseText)},i.open("GET",e,!0),i.send())},Ie.prototype.loadTexture=function(t,e,i){var n,r=this;i=this.pathPrefix+i,this.queueAsset(t,e,i)&&((n=new Image).crossOrigin="anonymous",n.onload=function(t){r.rawAssets[i]=n},n.onerror=function(t){r.errors[i]="Couldn't load image "+i},n.src=i)},Ie.prototype.get=function(t,e){e=this.pathPrefix+e;var i=this.clientAssets[t];return null==i||i.assets[e]},Ie.prototype.updateClientAssets=function(t){for(var e=0;e<t.toLoad.length;e++){var i=t.toLoad[e],n=t.assets[i];if(null==n){var r=this.rawAssets[i];if(null==r)continue;r instanceof HTMLImageElement?t.assets[i]=t.textureLoader(r):t.assets[i]=r}}},Ie.prototype.isLoadingComplete=function(t){var e=this.clientAssets[t];return null==e||(this.updateClientAssets(e),e.toLoad.length==e.loaded())},Ie.prototype.dispose=function(){},Ie.prototype.hasErrors=function(){return 0<Object.keys(this.errors).length},Ie.prototype.getErrors=function(){return this.errors},R=Ie,A.SharedAssetManager=R,S=me=me||{},Ce.prototype.updateCache=function(){this._updateCache.length=0,this.updateCacheReset.length=0;for(var t=this.bones,e=0,i=t.length;e<i;e++)(r=t[e]).sorted=r.data.skinRequired,r.active=!r.sorted;if(null!=this.skin)for(var n=this.skin.bones,e=0,i=this.skin.bones.length;e<i;e++)for(var r=this.bones[n[e].index];r.sorted=!1,r.active=!0,null!=(r=r.parent););var s=this.ikConstraints,a=this.transformConstraints,o=this.pathConstraints,h=s.length,l=a.length,u=o.length,c=h+l+u;t:for(e=0;e<c;e++){for(var f=0;f<h;f++)if((d=s[f]).data.order==e){this.sortIkConstraint(d);continue t}for(f=0;f<l;f++)if((d=a[f]).data.order==e){this.sortTransformConstraint(d);continue t}for(var d,f=0;f<u;f++)if((d=o[f]).data.order==e){this.sortPathConstraint(d);continue t}}for(e=0,i=t.length;e<i;e++)this.sortBone(t[e])},Ce.prototype.sortIkConstraint=function(t){var e,i,n,r;t.active=t.target.isActive()&&(!t.data.skinRequired||null!=this.skin&&S.Utils.contains(this.skin.constraints,t.data,!0)),t.active&&(e=t.target,this.sortBone(e),n=(i=t.bones)[0],this.sortBone(n),1<i.length&&(r=i[i.length-1],-1<this._updateCache.indexOf(r)||this.updateCacheReset.push(r)),this._updateCache.push(t),this.sortReset(n.children),i[i.length-1].sorted=!0)},Ce.prototype.sortPathConstraint=function(t){if(t.active=t.target.bone.isActive()&&(!t.data.skinRequired||null!=this.skin&&S.Utils.contains(this.skin.constraints,t.data,!0)),t.active){var e=t.target,i=e.data.index,n=e.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,i,n),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,i,n);for(var r=0,s=this.data.skins.length;r<s;r++)this.sortPathConstraintAttachment(this.data.skins[r],i,n);var a=e.getAttachment();a instanceof S.PathAttachment&&this.sortPathConstraintAttachmentWith(a,n);for(var o=t.bones,h=o.length,r=0;r<h;r++)this.sortBone(o[r]);for(this._updateCache.push(t),r=0;r<h;r++)this.sortReset(o[r].children);for(r=0;r<h;r++)o[r].sorted=!0}},Ce.prototype.sortTransformConstraint=function(t){if(t.active=t.target.isActive()&&(!t.data.skinRequired||null!=this.skin&&S.Utils.contains(this.skin.constraints,t.data,!0)),t.active){this.sortBone(t.target);var e=t.bones,i=e.length;if(t.data.local)for(var n=0;n<i;n++){var r=e[n];this.sortBone(r.parent),-1<this._updateCache.indexOf(r)||this.updateCacheReset.push(r)}else for(n=0;n<i;n++)this.sortBone(e[n]);this._updateCache.push(t);for(var s=0;s<i;s++)this.sortReset(e[s].children);for(s=0;s<i;s++)e[s].sorted=!0}},Ce.prototype.sortPathConstraintAttachment=function(t,e,i){var n=t.attachments[e];if(n)for(var r in n)this.sortPathConstraintAttachmentWith(n[r],i)},Ce.prototype.sortPathConstraintAttachmentWith=function(t,e){if(t instanceof S.PathAttachment){var i=t.bones;if(null==i)this.sortBone(e);else for(var n=this.bones,r=0;r<i.length;)for(var s=i[r++],a=r+s;r<a;r++){var o=i[r];this.sortBone(n[o])}}},Ce.prototype.sortBone=function(t){var e;t.sorted||(null!=(e=t.parent)&&this.sortBone(e),t.sorted=!0,this._updateCache.push(t))},Ce.prototype.sortReset=function(t){for(var e=0,i=t.length;e<i;e++){var n=t[e];n.active&&(n.sorted&&this.sortReset(n.children),n.sorted=!1)}},Ce.prototype.updateWorldTransform=function(){for(var t=this.updateCacheReset,e=0,i=t.length;e<i;e++){var n=t[e];n.ax=n.x,n.ay=n.y,n.arotation=n.rotation,n.ascaleX=n.scaleX,n.ascaleY=n.scaleY,n.ashearX=n.shearX,n.ashearY=n.shearY,n.appliedValid=!0}for(var r=this._updateCache,e=0,i=r.length;e<i;e++)r[e].update()},Ce.prototype.setToSetupPose=function(){this.setBonesToSetupPose(),this.setSlotsToSetupPose()},Ce.prototype.setBonesToSetupPose=function(){for(var t=this.bones,e=0,i=t.length;e<i;e++)t[e].setToSetupPose();for(var n=this.ikConstraints,e=0,i=n.length;e<i;e++)(o=n[e]).mix=o.data.mix,o.softness=o.data.softness,o.bendDirection=o.data.bendDirection,o.compress=o.data.compress,o.stretch=o.data.stretch;for(var r=this.transformConstraints,e=0,i=r.length;e<i;e++){var s=(o=r[e]).data;o.rotateMix=s.rotateMix,o.translateMix=s.translateMix,o.scaleMix=s.scaleMix,o.shearMix=s.shearMix}for(var a=this.pathConstraints,e=0,i=a.length;e<i;e++){var o,s=(o=a[e]).data;o.position=s.position,o.spacing=s.spacing,o.rotateMix=s.rotateMix,o.translateMix=s.translateMix}},Ce.prototype.setSlotsToSetupPose=function(){var t=this.slots;S.Utils.arrayCopy(t,0,this.drawOrder,0,t.length);for(var e=0,i=t.length;e<i;e++)t[e].setToSetupPose()},Ce.prototype.getRootBone=function(){return 0==this.bones.length?null:this.bones[0]},Ce.prototype.findBone=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,i=0,n=e.length;i<n;i++){var r=e[i];if(r.data.name==t)return r}return null},Ce.prototype.findBoneIndex=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,i=0,n=e.length;i<n;i++)if(e[i].data.name==t)return i;return-1},Ce.prototype.findSlot=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,i=0,n=e.length;i<n;i++){var r=e[i];if(r.data.name==t)return r}return null},Ce.prototype.findSlotIndex=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,i=0,n=e.length;i<n;i++)if(e[i].data.name==t)return i;return-1},Ce.prototype.setSkinByName=function(t){var e=this.data.findSkin(t);if(null==e)throw new Error("Skin not found: "+t);this.setSkin(e)},Ce.prototype.setSkin=function(t){if(t!=this.skin){if(null!=t)if(null!=this.skin)t.attachAll(this,this.skin);else for(var e=this.slots,i=0,n=e.length;i<n;i++){var r,s=e[i],a=s.data.attachmentName;null==a||null!=(r=t.getAttachment(i,a))&&s.setAttachment(r)}this.skin=t,this.updateCache()}},Ce.prototype.getAttachmentByName=function(t,e){return this.getAttachment(this.data.findSlotIndex(t),e)},Ce.prototype.getAttachment=function(t,e){if(null==e)throw new Error("attachmentName cannot be null.");if(null!=this.skin){var i=this.skin.getAttachment(t,e);if(null!=i)return i}return null!=this.data.defaultSkin?this.data.defaultSkin.getAttachment(t,e):null},Ce.prototype.setAttachment=function(t,e){if(null==t)throw new Error("slotName cannot be null.");for(var i=this.slots,n=0,r=i.length;n<r;n++){var s=i[n];if(s.data.name==t){var a=null;if(null!=e&&null==(a=this.getAttachment(n,e)))throw new Error("Attachment not found: "+e+", for slot: "+t);return void s.setAttachment(a)}}throw new Error("Slot not found: "+t)},Ce.prototype.findIkConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.ikConstraints,i=0,n=e.length;i<n;i++){var r=e[i];if(r.data.name==t)return r}return null},Ce.prototype.findTransformConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.transformConstraints,i=0,n=e.length;i<n;i++){var r=e[i];if(r.data.name==t)return r}return null},Ce.prototype.findPathConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.pathConstraints,i=0,n=e.length;i<n;i++){var r=e[i];if(r.data.name==t)return r}return null},Ce.prototype.getBounds=function(t,e,i){if(void 0===i&&(i=new Array(2)),null==t)throw new Error("offset cannot be null.");if(null==e)throw new Error("size cannot be null.");for(var n=this.drawOrder,r=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY,h=0,l=n.length;h<l;h++){var u=n[h];if(u.bone.active){var c,f=0,d=null,p=u.getAttachment();if(p instanceof S.RegionAttachment?(f=8,d=S.Utils.setArraySize(i,f,0),p.computeWorldVertices(u.bone,d,0,2)):p instanceof S.MeshAttachment&&(f=(c=p).worldVerticesLength,d=S.Utils.setArraySize(i,f,0),c.computeWorldVertices(u,0,f,d,0,2)),null!=d)for(var m=0,g=d.length;m<g;m+=2)var v=d[m],M=d[m+1],r=Math.min(r,v),s=Math.min(s,M),a=Math.max(a,v),o=Math.max(o,M)}}t.set(r,s),e.set(a-r,o-s)},Ce.prototype.update=function(t){this.time+=t},I=Ce,S.Skeleton=I,function(W){var t=(G.prototype.readSkeletonData=function(t){var e=this.scale,i=new W.SkeletonData;i.name="";var n=new x(t);if(i.hash=n.readString(),i.version=n.readString(),"3.8.75"==i.version)throw new Error("Unsupported skeleton data, please export with a newer version of Spine.");i.x=n.readFloat(),i.y=n.readFloat(),i.width=n.readFloat(),i.height=n.readFloat();var r=n.readBoolean();r&&(i.fps=n.readFloat(),i.imagesPath=n.readString(),i.audioPath=n.readString());for(var s=0,s=n.readInt(!0),a=0;a<s;a++)n.strings.push(n.readString());for(s=n.readInt(!0),a=0;a<s;a++){var o=n.readString(),h=0==a?null:i.bones[n.readInt(!0)];(c=new W.BoneData(a,o,h)).rotation=n.readFloat(),c.x=n.readFloat()*e,c.y=n.readFloat()*e,c.scaleX=n.readFloat(),c.scaleY=n.readFloat(),c.shearX=n.readFloat(),c.shearY=n.readFloat(),c.length=n.readFloat()*e,c.transformMode=G.TransformModeValues[n.readInt(!0)],c.skinRequired=n.readBoolean(),r&&W.Color.rgba8888ToColor(c.color,n.readInt32()),i.bones.push(c)}for(s=n.readInt(!0),a=0;a<s;a++){var l=n.readString(),u=i.bones[n.readInt(!0)],c=new W.SlotData(a,l,u);W.Color.rgba8888ToColor(c.color,n.readInt32());var f=n.readInt32();-1!=f&&W.Color.rgb888ToColor(c.darkColor=new W.Color,f),c.attachmentName=n.readStringRef(),c.blendMode=G.BlendModeValues[n.readInt(!0)],i.slots.push(c)}s=n.readInt(!0);for(var a=0,d=void 0;a<s;a++){(c=new W.IkConstraintData(n.readString())).order=n.readInt(!0),c.skinRequired=n.readBoolean(),d=n.readInt(!0);for(var p=0;p<d;p++)c.bones.push(i.bones[n.readInt(!0)]);c.target=i.bones[n.readInt(!0)],c.mix=n.readFloat(),c.softness=n.readFloat()*e,c.bendDirection=n.readByte(),c.compress=n.readBoolean(),c.stretch=n.readBoolean(),c.uniform=n.readBoolean(),i.ikConstraints.push(c)}for(s=n.readInt(!0),d=void(a=0);a<s;a++){for((c=new W.TransformConstraintData(n.readString())).order=n.readInt(!0),c.skinRequired=n.readBoolean(),d=n.readInt(!0),p=0;p<d;p++)c.bones.push(i.bones[n.readInt(!0)]);c.target=i.bones[n.readInt(!0)],c.local=n.readBoolean(),c.relative=n.readBoolean(),c.offsetRotation=n.readFloat(),c.offsetX=n.readFloat()*e,c.offsetY=n.readFloat()*e,c.offsetScaleX=n.readFloat(),c.offsetScaleY=n.readFloat(),c.offsetShearY=n.readFloat(),c.rotateMix=n.readFloat(),c.translateMix=n.readFloat(),c.scaleMix=n.readFloat(),c.shearMix=n.readFloat(),i.transformConstraints.push(c)}for(s=n.readInt(!0),d=void(a=0);a<s;a++){for((c=new W.PathConstraintData(n.readString())).order=n.readInt(!0),c.skinRequired=n.readBoolean(),d=n.readInt(!0),p=0;p<d;p++)c.bones.push(i.bones[n.readInt(!0)]);c.target=i.slots[n.readInt(!0)],c.positionMode=G.PositionModeValues[n.readInt(!0)],c.spacingMode=G.SpacingModeValues[n.readInt(!0)],c.rotateMode=G.RotateModeValues[n.readInt(!0)],c.offsetRotation=n.readFloat(),c.position=n.readFloat(),c.positionMode==W.PositionMode.Fixed&&(c.position*=e),c.spacing=n.readFloat(),c.spacingMode!=W.SpacingMode.Length&&c.spacingMode!=W.SpacingMode.Fixed||(c.spacing*=e),c.rotateMix=n.readFloat(),c.translateMix=n.readFloat(),i.pathConstraints.push(c)}var m=this.readSkin(n,i,!0,r);for(null!=m&&(i.defaultSkin=m,i.skins.push(m)),a=i.skins.length,W.Utils.setArraySize(i.skins,s=a+n.readInt(!0));a<s;a++)i.skins[a]=this.readSkin(n,i,!1,r);for(s=this.linkedMeshes.length,a=0;a<s;a++){var g=this.linkedMeshes[a],v=null==g.skin?i.defaultSkin:i.findSkin(g.skin);if(null==v)throw new Error("Skin not found: "+g.skin);var M=v.getAttachment(g.slotIndex,g.parent);if(null==M)throw new Error("Parent mesh not found: "+g.parent);g.mesh.deformAttachment=g.inheritDeform?M:g.mesh,g.mesh.setParentMesh(M),g.mesh.updateUVs()}for(this.linkedMeshes.length=0,s=n.readInt(!0),a=0;a<s;a++)(c=new W.EventData(n.readStringRef())).intValue=n.readInt(!1),c.floatValue=n.readFloat(),c.stringValue=n.readString(),c.audioPath=n.readString(),null!=c.audioPath&&(c.volume=n.readFloat(),c.balance=n.readFloat()),i.events.push(c);for(s=n.readInt(!0),a=0;a<s;a++)i.animations.push(this.readAnimation(n,n.readString(),i));return i},G.prototype.readSkin=function(t,e,i,n){var r=null,s=0;if(i){if(0==(s=t.readInt(!0)))return null;r=new W.Skin("default")}else{(r=new W.Skin(t.readStringRef())).bones.length=t.readInt(!0);for(var a=0,o=r.bones.length;a<o;a++)r.bones[a]=e.bones[t.readInt(!0)];for(a=0,o=t.readInt(!0);a<o;a++)r.constraints.push(e.ikConstraints[t.readInt(!0)]);for(a=0,o=t.readInt(!0);a<o;a++)r.constraints.push(e.transformConstraints[t.readInt(!0)]);for(a=0,o=t.readInt(!0);a<o;a++)r.constraints.push(e.pathConstraints[t.readInt(!0)]);s=t.readInt(!0)}for(a=0;a<s;a++)for(var h=t.readInt(!0),l=0,u=t.readInt(!0);l<u;l++){var c=t.readStringRef(),f=this.readAttachment(t,e,r,h,c,n);null!=f&&r.setAttachment(h,c,f)}return r},G.prototype.readAttachment=function(t,e,i,n,r,s){var a=this.scale,o=t.readStringRef();null==o&&(o=r);var h=t.readByte();switch(G.AttachmentTypeValues[h]){case W.AttachmentType.Region:var l=t.readStringRef(),u=t.readFloat(),c=t.readFloat(),f=t.readFloat(),d=t.readFloat(),p=t.readFloat(),m=t.readFloat(),g=t.readFloat(),v=t.readInt32();null==l&&(l=o);var M=this.attachmentLoader.newRegionAttachment(i,o,l);return null==M?null:(M.path=l,M.x=c*a,M.y=f*a,M.scaleX=d,M.scaleY=p,M.rotation=u,M.width=m*a,M.height=g*a,W.Color.rgba8888ToColor(M.color,v),M.updateOffset(),M);case W.AttachmentType.BoundingBox:var x=t.readInt(!0),y=this.readVertices(t,x),v=s?t.readInt32():0,w=this.attachmentLoader.newBoundingBoxAttachment(i,o);return null==w?null:(w.worldVerticesLength=x<<1,w.vertices=y.vertices,w.bones=y.bones,s&&W.Color.rgba8888ToColor(w.color,v),w);case W.AttachmentType.Mesh:var l=t.readStringRef(),v=t.readInt32(),x=t.readInt(!0),T=this.readFloatArray(t,x<<1,1),E=this.readShortArray(t),y=this.readVertices(t,x),A=t.readInt(!0),b=null,m=0,g=0;return s&&(b=this.readShortArray(t),m=t.readFloat(),g=t.readFloat()),null==l&&(l=o),null==(R=this.attachmentLoader.newMeshAttachment(i,o,l))?null:(R.path=l,W.Color.rgba8888ToColor(R.color,v),R.bones=y.bones,R.vertices=y.vertices,R.worldVerticesLength=x<<1,R.triangles=E,R.regionUVs=T,R.updateUVs(),R.hullLength=A<<1,s&&(R.edges=b,R.width=m*a,R.height=g*a),R);case W.AttachmentType.LinkedMesh:var R,l=t.readStringRef(),v=t.readInt32(),S=t.readStringRef(),I=t.readStringRef(),C=t.readBoolean(),m=0,g=0;return s&&(m=t.readFloat(),g=t.readFloat()),null==l&&(l=o),null==(R=this.attachmentLoader.newMeshAttachment(i,o,l))?null:(R.path=l,W.Color.rgba8888ToColor(R.color,v),s&&(R.width=m*a,R.height=g*a),this.linkedMeshes.push(new V(R,S,n,I,C)),R);case W.AttachmentType.Path:for(var P=t.readBoolean(),_=t.readBoolean(),x=t.readInt(!0),y=this.readVertices(t,x),F=W.Utils.newArray(x/3,0),L=0,O=F.length;L<O;L++)F[L]=t.readFloat()*a;return v=s?t.readInt32():0,null==(l=this.attachmentLoader.newPathAttachment(i,o))?null:(l.closed=P,l.constantSpeed=_,l.worldVerticesLength=x<<1,l.vertices=y.vertices,l.bones=y.bones,l.lengths=F,s&&W.Color.rgba8888ToColor(l.color,v),l);case W.AttachmentType.Point:var u=t.readFloat(),c=t.readFloat(),f=t.readFloat(),v=s?t.readInt32():0,k=this.attachmentLoader.newPointAttachment(i,o);return null==k?null:(k.x=c*a,k.y=f*a,k.rotation=u,s&&W.Color.rgba8888ToColor(k.color,v),k);case W.AttachmentType.Clipping:var N=t.readInt(!0),x=t.readInt(!0),y=this.readVertices(t,x),v=s?t.readInt32():0,D=this.attachmentLoader.newClippingAttachment(i,o);return null==D?null:(D.endSlot=e.slots[N],D.worldVerticesLength=x<<1,D.vertices=y.vertices,D.bones=y.bones,s&&W.Color.rgba8888ToColor(D.color,v),D)}return null},G.prototype.readVertices=function(t,e){var i=e<<1,n=new u,r=this.scale;if(!t.readBoolean())return n.vertices=this.readFloatArray(t,i,r),n;for(var s=new Array,a=new Array,o=0;o<e;o++){var h=t.readInt(!0);a.push(h);for(var l=0;l<h;l++)a.push(t.readInt(!0)),s.push(t.readFloat()*r),s.push(t.readFloat()*r),s.push(t.readFloat())}return n.vertices=W.Utils.toFloatArray(s),n.bones=a,n},G.prototype.readFloatArray=function(t,e,i){var n=new Array(e);if(1==i)for(var r=0;r<e;r++)n[r]=t.readFloat();else for(r=0;r<e;r++)n[r]=t.readFloat()*i;return n},G.prototype.readShortArray=function(t){for(var e=t.readInt(!0),i=new Array(e),n=0;n<e;n++)i[n]=t.readShort();return i},G.prototype.readAnimation=function(t,e,i){for(var n=new Array,r=this.scale,s=0,a=new W.Color,o=new W.Color,h=0,l=t.readInt(!0);h<l;h++)for(var u=t.readInt(!0),c=0,f=t.readInt(!0);c<f;c++){var d=t.readByte(),p=t.readInt(!0);switch(d){case G.SLOT_ATTACHMENT:(M=new W.AttachmentTimeline(p)).slotIndex=u;for(var m=0;m<p;m++)M.setFrame(m,t.readFloat(),t.readStringRef());n.push(M),s=Math.max(s,M.frames[p-1]);break;case G.SLOT_COLOR:for((M=new W.ColorTimeline(p)).slotIndex=u,m=0;m<p;m++){var g=t.readFloat();W.Color.rgba8888ToColor(a,t.readInt32()),M.setFrame(m,g,a.r,a.g,a.b,a.a),m<p-1&&this.readCurve(t,m,M)}n.push(M),s=Math.max(s,M.frames[(p-1)*W.ColorTimeline.ENTRIES]);break;case G.SLOT_TWO_COLOR:for((M=new W.TwoColorTimeline(p)).slotIndex=u,m=0;m<p;m++)g=t.readFloat(),W.Color.rgba8888ToColor(a,t.readInt32()),W.Color.rgb888ToColor(o,t.readInt32()),M.setFrame(m,g,a.r,a.g,a.b,a.a,o.r,o.g,o.b),m<p-1&&this.readCurve(t,m,M);n.push(M),s=Math.max(s,M.frames[(p-1)*W.TwoColorTimeline.ENTRIES])}}for(h=0,l=t.readInt(!0);h<l;h++)for(var v=t.readInt(!0),c=0,f=t.readInt(!0);c<f;c++)switch(d=t.readByte(),p=t.readInt(!0),d){case G.BONE_ROTATE:for((M=new W.RotateTimeline(p)).boneIndex=v,m=0;m<p;m++)M.setFrame(m,t.readFloat(),t.readFloat()),m<p-1&&this.readCurve(t,m,M);n.push(M),s=Math.max(s,M.frames[(p-1)*W.RotateTimeline.ENTRIES]);break;case G.BONE_TRANSLATE:case G.BONE_SCALE:case G.BONE_SHEAR:var M=void 0,x=1;for(d==G.BONE_SCALE?M=new W.ScaleTimeline(p):d==G.BONE_SHEAR?M=new W.ShearTimeline(p):(M=new W.TranslateTimeline(p),x=r),M.boneIndex=v,m=0;m<p;m++)M.setFrame(m,t.readFloat(),t.readFloat()*x,t.readFloat()*x),m<p-1&&this.readCurve(t,m,M);n.push(M),s=Math.max(s,M.frames[(p-1)*W.TranslateTimeline.ENTRIES])}for(h=0,l=t.readInt(!0);h<l;h++){var y=t.readInt(!0),p=t.readInt(!0);for((M=new W.IkConstraintTimeline(p)).ikConstraintIndex=y,m=0;m<p;m++)M.setFrame(m,t.readFloat(),t.readFloat(),t.readFloat()*r,t.readByte(),t.readBoolean(),t.readBoolean()),m<p-1&&this.readCurve(t,m,M);n.push(M),s=Math.max(s,M.frames[(p-1)*W.IkConstraintTimeline.ENTRIES])}for(h=0,l=t.readInt(!0);h<l;h++){for(y=t.readInt(!0),p=t.readInt(!0),(M=new W.TransformConstraintTimeline(p)).transformConstraintIndex=y,m=0;m<p;m++)M.setFrame(m,t.readFloat(),t.readFloat(),t.readFloat(),t.readFloat(),t.readFloat()),m<p-1&&this.readCurve(t,m,M);n.push(M),s=Math.max(s,M.frames[(p-1)*W.TransformConstraintTimeline.ENTRIES])}for(h=0,l=t.readInt(!0);h<l;h++)for(var y=t.readInt(!0),w=i.pathConstraints[y],c=0,f=t.readInt(!0);c<f;c++)switch(d=t.readByte(),p=t.readInt(!0),d){case G.PATH_POSITION:case G.PATH_SPACING:var M=void 0,x=1;for(d==G.PATH_SPACING?(M=new W.PathConstraintSpacingTimeline(p),w.spacingMode!=W.SpacingMode.Length&&w.spacingMode!=W.SpacingMode.Fixed||(x=r)):(M=new W.PathConstraintPositionTimeline(p),w.positionMode==W.PositionMode.Fixed&&(x=r)),M.pathConstraintIndex=y,m=0;m<p;m++)M.setFrame(m,t.readFloat(),t.readFloat()*x),m<p-1&&this.readCurve(t,m,M);n.push(M),s=Math.max(s,M.frames[(p-1)*W.PathConstraintPositionTimeline.ENTRIES]);break;case G.PATH_MIX:for((M=new W.PathConstraintMixTimeline(p)).pathConstraintIndex=y,m=0;m<p;m++)M.setFrame(m,t.readFloat(),t.readFloat(),t.readFloat()),m<p-1&&this.readCurve(t,m,M);n.push(M),s=Math.max(s,M.frames[(p-1)*W.PathConstraintMixTimeline.ENTRIES])}for(h=0,l=t.readInt(!0);h<l;h++)for(var T=i.skins[t.readInt(!0)],c=0,f=t.readInt(!0);c<f;c++)for(var u=t.readInt(!0),E=0,A=t.readInt(!0);E<A;E++){var b=T.getAttachment(u,t.readStringRef()),R=null!=b.bones,S=b.vertices,I=R?S.length/3*2:S.length,p=t.readInt(!0);for((M=new W.DeformTimeline(p)).slotIndex=u,M.attachment=b,m=0;m<p;m++){var g=t.readFloat(),C=void 0,P=t.readInt(!0);if(0==P)C=R?W.Utils.newFloatArray(I):S;else{C=W.Utils.newFloatArray(I);var _=t.readInt(!0);if(P+=_,1==r)for(var F=_;F<P;F++)C[F]=t.readFloat();else for(F=_;F<P;F++)C[F]=t.readFloat()*r;if(!R)for(var F=0,L=C.length;F<L;F++)C[F]+=S[F]}M.setFrame(m,g,C),m<p-1&&this.readCurve(t,m,M)}n.push(M),s=Math.max(s,M.frames[p-1])}var O=t.readInt(!0);if(0<O){for(var M=new W.DrawOrderTimeline(O),k=i.slots.length,h=0;h<O;h++){for(var g=t.readFloat(),N=t.readInt(!0),D=W.Utils.newArray(k,0),c=k-1;0<=c;c--)D[c]=-1;for(var V=W.Utils.newArray(k-N,0),B=0,Y=0,c=0;c<N;c++){for(u=t.readInt(!0);B!=u;)V[Y++]=B++;D[B+t.readInt(!0)]=B++}for(;B<k;)V[Y++]=B++;for(c=k-1;0<=c;c--)-1==D[c]&&(D[c]=V[--Y]);M.setFrame(h,g,D)}n.push(M),s=Math.max(s,M.frames[O-1])}var U=t.readInt(!0);if(0<U){for(M=new W.EventTimeline(U),h=0;h<U;h++){var g=t.readFloat(),X=i.events[t.readInt(!0)],z=new W.Event(g,X);z.intValue=t.readInt(!1),z.floatValue=t.readFloat(),z.stringValue=t.readBoolean()?t.readString():X.stringValue,null!=z.data.audioPath&&(z.volume=t.readFloat(),z.balance=t.readFloat()),M.setFrame(h,z)}n.push(M),s=Math.max(s,M.frames[U-1])}return new W.Animation(e,n,s)},G.prototype.readCurve=function(t,e,i){switch(t.readByte()){case G.CURVE_STEPPED:i.setStepped(e);break;case G.CURVE_BEZIER:this.setCurve(i,e,t.readFloat(),t.readFloat(),t.readFloat(),t.readFloat())}},G.prototype.setCurve=function(t,e,i,n,r,s){t.setCurve(e,i,n,r,s)},G.AttachmentTypeValues=[0,1,2,3,4,5,6],G.TransformModeValues=[W.TransformMode.Normal,W.TransformMode.OnlyTranslation,W.TransformMode.NoRotationOrReflection,W.TransformMode.NoScale,W.TransformMode.NoScaleOrReflection],G.PositionModeValues=[W.PositionMode.Fixed,W.PositionMode.Percent],G.SpacingModeValues=[W.SpacingMode.Length,W.SpacingMode.Fixed,W.SpacingMode.Percent],G.RotateModeValues=[W.RotateMode.Tangent,W.RotateMode.Chain,W.RotateMode.ChainScale],G.BlendModeValues=[W.BlendMode.Normal,W.BlendMode.Additive,W.BlendMode.Multiply,W.BlendMode.Screen],G.BONE_ROTATE=0,G.BONE_TRANSLATE=1,G.BONE_SCALE=2,G.BONE_SHEAR=3,G.SLOT_ATTACHMENT=0,G.SLOT_COLOR=1,G.SLOT_TWO_COLOR=2,G.PATH_POSITION=0,G.PATH_SPACING=1,G.PATH_MIX=2,G.CURVE_LINEAR=0,G.CURVE_STEPPED=1,G.CURVE_BEZIER=2,G);function G(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}W.SkeletonBinary=t;var x=(e.prototype.readByte=function(){return this.buffer.getInt8(this.index++)},e.prototype.readShort=function(){var t=this.buffer.getInt16(this.index);return this.index+=2,t},e.prototype.readInt32=function(){var t=this.buffer.getInt32(this.index);return this.index+=4,t},e.prototype.readInt=function(t){var e=this.readByte(),i=127&e;return 0!=(128&e)&&(i|=(127&(e=this.readByte()))<<7,0!=(128&e)&&(i|=(127&(e=this.readByte()))<<14,0!=(128&e)&&(i|=(127&(e=this.readByte()))<<21,0!=(128&e)&&(i|=(127&this.readByte())<<28)))),t?i:i>>>1^-(1&i)},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="",i=0;i<t;){var n=this.readByte();switch(n>>4){case 12:case 13:e+=String.fromCharCode((31&n)<<6|63&this.readByte()),i+=2;break;case 14:e+=String.fromCharCode((15&n)<<12|(63&this.readByte())<<6|63&this.readByte()),i+=3;break;default:e+=String.fromCharCode(n),i++}}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,i,n){void 0===e&&(e=new Array),void 0===i&&(i=0),void 0===n&&(n=new DataView(t.buffer)),this.strings=e,this.index=i,this.buffer=n}var V=function(t,e,i,n,r){this.mesh=t,this.skin=e,this.slotIndex=i,this.parent=n,this.inheritDeform=r},u=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}(me=me||{}),C=me=me||{},Pe.prototype.update=function(t,e){if(null==t)throw new Error("skeleton cannot be null.");var i=this.boundingBoxes,n=this.polygons,r=this.polygonPool,s=t.slots,a=s.length;i.length=0,r.freeAll(n);for(var o=n.length=0;o<a;o++){var h,l,u,c=s[o];c.bone.active&&(h=c.getAttachment())instanceof C.BoundingBoxAttachment&&(l=h,i.push(l),(u=r.obtain()).length!=l.worldVerticesLength&&(u=C.Utils.newFloatArray(l.worldVerticesLength)),n.push(u),l.computeWorldVertices(c,0,l.worldVerticesLength,u,0,2))}e?this.aabbCompute():(this.minX=Number.POSITIVE_INFINITY,this.minY=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.maxY=Number.NEGATIVE_INFINITY)},Pe.prototype.aabbCompute=function(){for(var t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,n=Number.NEGATIVE_INFINITY,r=this.polygons,s=0,a=r.length;s<a;s++)for(var o=r[s],h=o,l=0,u=o.length;l<u;l+=2)var c=h[l],f=h[l+1],t=Math.min(t,c),e=Math.min(e,f),i=Math.max(i,c),n=Math.max(n,f);this.minX=t,this.minY=e,this.maxX=i,this.maxY=n},Pe.prototype.aabbContainsPoint=function(t,e){return t>=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},Pe.prototype.aabbIntersectsSegment=function(t,e,i,n){var r=this.minX,s=this.minY,a=this.maxX,o=this.maxY;if(t<=r&&i<=r||e<=s&&n<=s||a<=t&&a<=i||o<=e&&o<=n)return!1;var h=(n-e)/(i-t),l=h*(r-t)+e;if(s<l&&l<o)return!0;if(s<(l=h*(a-t)+e)&&l<o)return!0;var u=(s-e)/h+t;return r<u&&u<a||r<(u=(o-e)/h+t)&&u<a},Pe.prototype.aabbIntersectsSkeleton=function(t){return this.minX<t.maxX&&this.maxX>t.minX&&this.minY<t.maxY&&this.maxY>t.minY},Pe.prototype.containsPoint=function(t,e){for(var i=this.polygons,n=0,r=i.length;n<r;n++)if(this.containsPointPolygon(i[n],t,e))return this.boundingBoxes[n];return null},Pe.prototype.containsPointPolygon=function(t,e,i){for(var n=t,r=t.length,s=r-2,a=!1,o=0;o<r;o+=2){var h,l=n[o+1],u=n[s+1];!(l<i&&i<=u||u<i&&i<=l)||(h=n[o])+(i-l)/(u-l)*(n[s]-h)<e&&(a=!a),s=o}return a},Pe.prototype.intersectsSegment=function(t,e,i,n){for(var r=this.polygons,s=0,a=r.length;s<a;s++)if(this.intersectsSegmentPolygon(r[s],t,e,i,n))return this.boundingBoxes[s];return null},Pe.prototype.intersectsSegmentPolygon=function(t,e,i,n,r){for(var s=t,a=t.length,o=e-n,h=i-r,l=e*r-i*n,u=s[a-2],c=s[a-1],f=0;f<a;f+=2){var d=s[f],p=s[f+1],m=u*p-c*d,g=u-d,v=c-p,M=o*v-h*g,x=(l*g-o*m)/M;if((u<=x&&x<=d||d<=x&&x<=u)&&(e<=x&&x<=n||n<=x&&x<=e)){var y=(l*v-h*m)/M;if((c<=y&&y<=p||p<=y&&y<=c)&&(i<=y&&y<=r||r<=y&&y<=i))return!0}u=d,c=p}return!1},Pe.prototype.getPolygon=function(t){if(null==t)throw new Error("boundingBox cannot be null.");var e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]},Pe.prototype.getWidth=function(){return this.maxX-this.minX},Pe.prototype.getHeight=function(){return this.maxY-this.minY},P=Pe,C.SkeletonBounds=P,K=me=me||{},_e.prototype.clipStart=function(t,e){if(null!=this.clipAttachment)return 0;var i=(this.clipAttachment=e).worldVerticesLength,n=K.Utils.setArraySize(this.clippingPolygon,i);e.computeWorldVertices(t,0,i,n,0,2);var r=this.clippingPolygon;_e.makeClockwise(r);for(var s=this.clippingPolygons=this.triangulator.decompose(r,this.triangulator.triangulate(r)),a=0,o=s.length;a<o;a++){var h=s[a];_e.makeClockwise(h),h.push(h[0]),h.push(h[1])}return s.length},_e.prototype.clipEndWithSlot=function(t){null!=this.clipAttachment&&this.clipAttachment.endSlot==t.data&&this.clipEnd()},_e.prototype.clipEnd=function(){null!=this.clipAttachment&&(this.clipAttachment=null,this.clippingPolygons=null,this.clippedVertices.length=0,this.clippedTriangles.length=0,this.clippingPolygon.length=0)},_e.prototype.isClipping=function(){return null!=this.clipAttachment},_e.prototype.clipTriangles=function(t,e,i,n,r,s,a,o){var h=this.clipOutput,l=this.clippedVertices,u=this.clippedTriangles,c=this.clippingPolygons,f=this.clippingPolygons.length,d=o?12:8,p=0;l.length=0;t:for(var m=u.length=0;m<n;m+=3)for(var g=i[m]<<1,v=t[g],M=t[1+g],x=r[g],y=r[1+g],w=t[g=i[m+1]<<1],T=t[1+g],E=r[g],A=r[1+g],b=t[g=i[m+2]<<1],R=t[1+g],S=r[g],I=r[1+g],C=0;C<f;C++){var P=l.length;if(!this.clip(v,M,w,T,b,R,c[C],h)){(B=K.Utils.setArraySize(l,P+3*d))[P]=v,B[P+1]=M,B[P+2]=s.r,B[P+3]=s.g,B[P+4]=s.b,B[P+5]=s.a,o?(B[P+6]=x,B[P+7]=y,B[P+8]=a.r,B[P+9]=a.g,B[P+10]=a.b,B[P+11]=a.a,B[P+12]=w,B[P+13]=T,B[P+14]=s.r,B[P+15]=s.g,B[P+16]=s.b,B[P+17]=s.a,B[P+18]=E,B[P+19]=A,B[P+20]=a.r,B[P+21]=a.g,B[P+22]=a.b,B[P+23]=a.a,B[P+24]=b,B[P+25]=R,B[P+26]=s.r,B[P+27]=s.g,B[P+28]=s.b,B[P+29]=s.a,B[P+30]=S,B[P+31]=I,B[P+32]=a.r,B[P+33]=a.g,B[P+34]=a.b,B[P+35]=a.a):(B[P+6]=x,B[P+7]=y,B[P+8]=w,B[P+9]=T,B[P+10]=s.r,B[P+11]=s.g,B[P+12]=s.b,B[P+13]=s.a,B[P+14]=E,B[P+15]=A,B[P+16]=b,B[P+17]=R,B[P+18]=s.r,B[P+19]=s.g,B[P+20]=s.b,B[P+21]=s.a,B[P+22]=S,B[P+23]=I),P=u.length,(j=K.Utils.setArraySize(u,P+3))[P]=p,j[P+1]=p+1,j[P+2]=p+2,p+=3;continue t}var _=h.length;if(0!=_){for(var F=T-R,L=b-w,O=v-b,k=R-M,N=1/(F*O+L*(M-R)),D=_>>1,V=this.clipOutput,B=K.Utils.setArraySize(l,P+D*d),Y=0;Y<_;Y+=2){var U=V[Y],X=V[Y+1];B[P]=U,B[P+1]=X,B[P+2]=s.r,B[P+3]=s.g,B[P+4]=s.b,B[P+5]=s.a;var z=U-b,W=X-R,G=(F*z+L*W)*N,H=(k*z+O*W)*N,q=1-G-H;B[P+6]=x*G+E*H+S*q,B[P+7]=y*G+A*H+I*q,o&&(B[P+8]=a.r,B[P+9]=a.g,B[P+10]=a.b,B[P+11]=a.a),P+=d}P=u.length;var j=K.Utils.setArraySize(u,P+3*(D-2));for(D--,Y=1;Y<D;Y++)j[P]=p,j[P+1]=p+Y,j[P+2]=p+Y+1,P+=3;p+=1+D}}},_e.prototype.clip=function(t,e,i,n,r,s,a,o){var h=o,l=!1,u=null;2<=a.length%4?(u=o,o=this.scratch):u=this.scratch,u.length=0,u.push(t),u.push(e),u.push(i),u.push(n),u.push(r),u.push(s),u.push(t),u.push(e),o.length=0;for(var c=a,f=a.length-4,d=0;;d+=2){for(var p=c[d],m=c[d+1],g=c[d+2],v=c[d+3],M=p-g,x=m-v,y=u,w=u.length-2,T=o.length,E=0;E<w;E+=2){var A=y[E],b=y[E+1],R=y[E+2],S=y[E+3],I=0<M*(S-v)-x*(R-g);if(0<M*(b-v)-x*(A-g)){if(I){o.push(R),o.push(S);continue}var C,P,_,F=(C=S-b)*(g-p)-(P=R-A)*(v-m);1e-6<Math.abs(F)?(_=(P*(m-b)-C*(p-A))/F,o.push(p+(g-p)*_),o.push(m+(v-m)*_)):(o.push(p),o.push(m))}else I&&(F=(C=S-b)*(g-p)-(P=R-A)*(v-m),1e-6<Math.abs(F)?(_=(P*(m-b)-C*(p-A))/F,o.push(p+(g-p)*_),o.push(m+(v-m)*_)):(o.push(p),o.push(m)),o.push(R),o.push(S));l=!0}if(T==o.length)return!(h.length=0);if(o.push(o[0]),o.push(o[1]),d==f)break;var L=o;(o=u).length=0,u=L}if(h!=o)for(var d=h.length=0,O=o.length-2;d<O;d++)h[d]=o[d];else h.length=h.length-2;return l},_e.makeClockwise=function(t){for(var e,i,n,r=t,s=t.length,a=r[s-2]*r[1]-r[0]*r[s-1],o=0,h=s-3;o<h;o+=2)e=r[o],i=r[o+1],n=r[o+2],a+=e*r[o+3]-n*i;if(!(a<0))for(var o=0,l=s-2,h=s>>1;o<h;o+=2){var u=r[o],c=r[o+1],f=l-o;r[o]=r[f],r[o+1]=r[1+f],r[f]=u,r[1+f]=c}},F=_e,K.SkeletonClipping=F,L=me=me||{},Fe.prototype.findBone=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,i=0,n=e.length;i<n;i++){var r=e[i];if(r.name==t)return r}return null},Fe.prototype.findBoneIndex=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,i=0,n=e.length;i<n;i++)if(e[i].name==t)return i;return-1},Fe.prototype.findSlot=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,i=0,n=e.length;i<n;i++){var r=e[i];if(r.name==t)return r}return null},Fe.prototype.findSlotIndex=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,i=0,n=e.length;i<n;i++)if(e[i].name==t)return i;return-1},Fe.prototype.findSkin=function(t){if(null==t)throw new Error("skinName cannot be null.");for(var e=this.skins,i=0,n=e.length;i<n;i++){var r=e[i];if(r.name==t)return r}return null},Fe.prototype.findEvent=function(t){if(null==t)throw new Error("eventDataName cannot be null.");for(var e=this.events,i=0,n=e.length;i<n;i++){var r=e[i];if(r.name==t)return r}return null},Fe.prototype.findAnimation=function(t){if(null==t)throw new Error("animationName cannot be null.");for(var e=this.animations,i=0,n=e.length;i<n;i++){var r=e[i];if(r.name==t)return r}return null},Fe.prototype.findIkConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.ikConstraints,i=0,n=e.length;i<n;i++){var r=e[i];if(r.name==t)return r}return null},Fe.prototype.findTransformConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.transformConstraints,i=0,n=e.length;i<n;i++){var r=e[i];if(r.name==t)return r}return null},Fe.prototype.findPathConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.pathConstraints,i=0,n=e.length;i<n;i++){var r=e[i];if(r.name==t)return r}return null},Fe.prototype.findPathConstraintIndex=function(t){if(null==t)throw new Error("pathConstraintName cannot be null.");for(var e=this.pathConstraints,i=0,n=e.length;i<n;i++)if(e[i].name==t)return i;return-1},O=Fe,L.SkeletonData=O,function(tt){var t=(O.prototype.readSkeletonData=function(t){var e=this.scale,i=new tt.SkeletonData,n="string"==typeof t?JSON.parse(t):t,r=n.skeleton;if(null!=r){if(i.hash=r.hash,i.version=r.spine,"3.8.75"==i.version)throw new Error("Unsupported skeleton data, please export with a newer version of Spine.");i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height,i.fps=r.fps,i.imagesPath=r.images}if(n.bones)for(var s=0;s<n.bones.length;s++){var a=n.bones[s],o=null,h=this.getValue(a,"parent",null);if(null!=h&&null==(o=i.findBone(h)))throw new Error("Parent bone not found: "+h);(f=new tt.BoneData(i.bones.length,a.name,o)).length=this.getValue(a,"length",0)*e,f.x=this.getValue(a,"x",0)*e,f.y=this.getValue(a,"y",0)*e,f.rotation=this.getValue(a,"rotation",0),f.scaleX=this.getValue(a,"scaleX",1),f.scaleY=this.getValue(a,"scaleY",1),f.shearX=this.getValue(a,"shearX",0),f.shearY=this.getValue(a,"shearY",0),f.transformMode=O.transformModeFromString(this.getValue(a,"transform","normal")),f.skinRequired=this.getValue(a,"skin",!1),i.bones.push(f)}if(n.slots)for(s=0;s<n.slots.length;s++){var l=(A=n.slots[s]).name,u=A.bone,c=i.findBone(u);if(null==c)throw new Error("Slot bone not found: "+u);var f=new tt.SlotData(i.slots.length,l,c),d=this.getValue(A,"color",null);null!=d&&f.color.setFromString(d);var p=this.getValue(A,"dark",null);null!=p&&(f.darkColor=new tt.Color(1,1,1,1),f.darkColor.setFromString(p)),f.attachmentName=this.getValue(A,"attachment",null),f.blendMode=O.blendModeFromString(this.getValue(A,"blend","normal")),i.slots.push(f)}if(n.ik)for(s=0;s<n.ik.length;s++){var m=n.ik[s];(f=new tt.IkConstraintData(m.name)).order=this.getValue(m,"order",0),f.skinRequired=this.getValue(m,"skin",!1);for(var g=0;g<m.bones.length;g++){if(u=m.bones[g],null==(y=i.findBone(u)))throw new Error("IK bone not found: "+u);f.bones.push(y)}var v=m.target;if(f.target=i.findBone(v),null==f.target)throw new Error("IK target bone not found: "+v);f.mix=this.getValue(m,"mix",1),f.softness=this.getValue(m,"softness",0)*e,f.bendDirection=this.getValue(m,"bendPositive",!0)?1:-1,f.compress=this.getValue(m,"compress",!1),f.stretch=this.getValue(m,"stretch",!1),f.uniform=this.getValue(m,"uniform",!1),i.ikConstraints.push(f)}if(n.transform)for(s=0;s<n.transform.length;s++){for(m=n.transform[s],(f=new tt.TransformConstraintData(m.name)).order=this.getValue(m,"order",0),f.skinRequired=this.getValue(m,"skin",!1),g=0;g<m.bones.length;g++){if(u=m.bones[g],null==(y=i.findBone(u)))throw new Error("Transform constraint bone not found: "+u);f.bones.push(y)}if(v=m.target,f.target=i.findBone(v),null==f.target)throw new Error("Transform constraint target bone not found: "+v);f.local=this.getValue(m,"local",!1),f.relative=this.getValue(m,"relative",!1),f.offsetRotation=this.getValue(m,"rotation",0),f.offsetX=this.getValue(m,"x",0)*e,f.offsetY=this.getValue(m,"y",0)*e,f.offsetScaleX=this.getValue(m,"scaleX",0),f.offsetScaleY=this.getValue(m,"scaleY",0),f.offsetShearY=this.getValue(m,"shearY",0),f.rotateMix=this.getValue(m,"rotateMix",1),f.translateMix=this.getValue(m,"translateMix",1),f.scaleMix=this.getValue(m,"scaleMix",1),f.shearMix=this.getValue(m,"shearMix",1),i.transformConstraints.push(f)}if(n.path)for(s=0;s<n.path.length;s++){for(m=n.path[s],(f=new tt.PathConstraintData(m.name)).order=this.getValue(m,"order",0),f.skinRequired=this.getValue(m,"skin",!1),g=0;g<m.bones.length;g++){if(u=m.bones[g],null==(y=i.findBone(u)))throw new Error("Transform constraint bone not found: "+u);f.bones.push(y)}if(v=m.target,f.target=i.findSlot(v),null==f.target)throw new Error("Path target slot not found: "+v);f.positionMode=O.positionModeFromString(this.getValue(m,"positionMode","percent")),f.spacingMode=O.spacingModeFromString(this.getValue(m,"spacingMode","length")),f.rotateMode=O.rotateModeFromString(this.getValue(m,"rotateMode","tangent")),f.offsetRotation=this.getValue(m,"rotation",0),f.position=this.getValue(m,"position",0),f.positionMode==tt.PositionMode.Fixed&&(f.position*=e),f.spacing=this.getValue(m,"spacing",0),f.spacingMode!=tt.SpacingMode.Length&&f.spacingMode!=tt.SpacingMode.Fixed||(f.spacing*=e),f.rotateMix=this.getValue(m,"rotateMix",1),f.translateMix=this.getValue(m,"translateMix",1),i.pathConstraints.push(f)}if(n.skins)for(s=0;s<n.skins.length;s++){var M=n.skins[s],x=new tt.Skin(M.name);if(M.bones)for(var y,w=0;w<M.bones.length;w++){if(null==(y=i.findBone(M.bones[w])))throw new Error("Skin bone not found: "+M.bones[s]);x.bones.push(y)}if(M.ik)for(w=0;w<M.ik.length;w++){if(null==(T=i.findIkConstraint(M.ik[w])))throw new Error("Skin IK constraint not found: "+M.ik[s]);x.constraints.push(T)}if(M.transform)for(w=0;w<M.transform.length;w++){if(null==(T=i.findTransformConstraint(M.transform[w])))throw new Error("Skin transform constraint not found: "+M.transform[s]);x.constraints.push(T)}if(M.path)for(var T,w=0;w<M.path.length;w++){if(null==(T=i.findPathConstraint(M.path[w])))throw new Error("Skin path constraint not found: "+M.path[s]);x.constraints.push(T)}for(var l in M.attachments){var E=i.findSlot(l);if(null==E)throw new Error("Slot not found: "+l);var A=M.attachments[l];for(var b in A){var R=this.readAttachment(A[b],x,E.index,b,i);null!=R&&x.setAttachment(E.index,b,R)}}i.skins.push(x),"default"==x.name&&(i.defaultSkin=x)}for(var s=0,S=this.linkedMeshes.length;s<S;s++){var I=this.linkedMeshes[s];if(null==(x=null==I.skin?i.defaultSkin:i.findSkin(I.skin)))throw new Error("Skin not found: "+I.skin);var C=x.getAttachment(I.slotIndex,I.parent);if(null==C)throw new Error("Parent mesh not found: "+I.parent);I.mesh.deformAttachment=I.inheritDeform?C:I.mesh,I.mesh.setParentMesh(C),I.mesh.updateUVs()}if(this.linkedMeshes.length=0,n.events)for(var P in n.events){var _=n.events[P];(f=new tt.EventData(P)).intValue=this.getValue(_,"int",0),f.floatValue=this.getValue(_,"float",0),f.stringValue=this.getValue(_,"string",""),f.audioPath=this.getValue(_,"audio",null),null!=f.audioPath&&(f.volume=this.getValue(_,"volume",1),f.balance=this.getValue(_,"balance",0)),i.events.push(f)}if(n.animations)for(var F in n.animations){var L=n.animations[F];this.readAnimation(L,F,i)}return i},O.prototype.readAttachment=function(t,e,i,n,r){var s=this.scale;switch(n=this.getValue(t,"name",n),this.getValue(t,"type","region")){case"region":var a=this.getValue(t,"path",n),o=this.attachmentLoader.newRegionAttachment(e,n,a);return null==o?null:(o.path=a,o.x=this.getValue(t,"x",0)*s,o.y=this.getValue(t,"y",0)*s,o.scaleX=this.getValue(t,"scaleX",1),o.scaleY=this.getValue(t,"scaleY",1),o.rotation=this.getValue(t,"rotation",0),o.width=t.width*s,o.height=t.height*s,null!=(x=this.getValue(t,"color",null))&&o.color.setFromString(x),o.updateOffset(),o);case"boundingbox":var h=this.attachmentLoader.newBoundingBoxAttachment(e,n);return null==h?null:(this.readVertices(t,h,t.vertexCount<<1),null!=(x=this.getValue(t,"color",null))&&h.color.setFromString(x),h);case"mesh":case"linkedmesh":var a=this.getValue(t,"path",n),l=this.attachmentLoader.newMeshAttachment(e,n,a);if(null==l)return null;l.path=a,null!=(x=this.getValue(t,"color",null))&&l.color.setFromString(x),l.width=this.getValue(t,"width",0)*s,l.height=this.getValue(t,"height",0)*s;var u=this.getValue(t,"parent",null);if(null!=u)return this.linkedMeshes.push(new y(l,this.getValue(t,"skin",null),i,u,this.getValue(t,"deform",!0))),l;var c=t.uvs;return this.readVertices(t,l,c.length),l.triangles=t.triangles,l.regionUVs=c,l.updateUVs(),l.edges=this.getValue(t,"edges",null),l.hullLength=2*this.getValue(t,"hull",0),l;case"path":if(null==(a=this.attachmentLoader.newPathAttachment(e,n)))return null;a.closed=this.getValue(t,"closed",!1),a.constantSpeed=this.getValue(t,"constantSpeed",!0);var f=t.vertexCount;this.readVertices(t,a,f<<1);for(var d=tt.Utils.newArray(f/3,0),p=0;p<t.lengths.length;p++)d[p]=t.lengths[p]*s;return a.lengths=d,null!=(x=this.getValue(t,"color",null))&&a.color.setFromString(x),a;case"point":var m=this.attachmentLoader.newPointAttachment(e,n);return null==m?null:(m.x=this.getValue(t,"x",0)*s,m.y=this.getValue(t,"y",0)*s,m.rotation=this.getValue(t,"rotation",0),null!=(x=this.getValue(t,"color",null))&&m.color.setFromString(x),m);case"clipping":var g=this.attachmentLoader.newClippingAttachment(e,n);if(null==g)return null;var v=this.getValue(t,"end",null);if(null!=v){var M=r.findSlot(v);if(null==M)throw new Error("Clipping end slot not found: "+v);g.endSlot=M}var x,f=t.vertexCount;return this.readVertices(t,g,f<<1),null!=(x=this.getValue(t,"color",null))&&g.color.setFromString(x),g}return null},O.prototype.readVertices=function(t,e,i){var n=this.scale;e.worldVerticesLength=i;var r=t.vertices;if(i!=r.length){for(var s=new Array,a=new Array,o=0,h=r.length;o<h;){var l=r[o++];a.push(l);for(var u=o+4*l;o<u;o+=4)a.push(r[o]),s.push(r[o+1]*n),s.push(r[o+2]*n),s.push(r[o+3])}e.bones=a,e.vertices=tt.Utils.toFloatArray(s)}else{var c=tt.Utils.toFloatArray(r);if(1!=n)for(var o=0,h=r.length;o<h;o++)c[o]*=n;e.vertices=c}},O.prototype.readAnimation=function(t,e,i){var n=this.scale,r=new Array,s=0;if(t.slots)for(var a in t.slots){var o=t.slots[a];if(-1==(K=i.findSlotIndex(a)))throw new Error("Slot not found: "+a);for(var h in o){var l=o[h];if("attachment"==h){(x=new tt.AttachmentTimeline(l.length)).slotIndex=K;for(var u=0,c=0;c<l.length;c++){var f=l[c];x.setFrame(u++,this.getValue(f,"time",0),f.name)}r.push(x),s=Math.max(s,x.frames[x.getFrameCount()-1])}else if("color"==h){for((x=new tt.ColorTimeline(l.length)).slotIndex=K,c=u=0;c<l.length;c++){var f=l[c],d=new tt.Color;d.setFromString(f.color),x.setFrame(u,this.getValue(f,"time",0),d.r,d.g,d.b,d.a),this.readCurve(f,x,u),u++}r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.ColorTimeline.ENTRIES])}else{if("twoColor"!=h)throw new Error("Invalid timeline type for a slot: "+h+" ("+a+")");for((x=new tt.TwoColorTimeline(l.length)).slotIndex=K,c=u=0;c<l.length;c++){var f=l[c],p=new tt.Color,m=new tt.Color;p.setFromString(f.light),m.setFromString(f.dark),x.setFrame(u,this.getValue(f,"time",0),p.r,p.g,p.b,p.a,m.r,m.g,m.b),this.readCurve(f,x,u),u++}r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.TwoColorTimeline.ENTRIES])}}}if(t.bones)for(var g in t.bones){var v=t.bones[g],M=i.findBoneIndex(g);if(-1==M)throw new Error("Bone not found: "+g);for(var h in v)if(l=v[h],"rotate"===h){for((x=new tt.RotateTimeline(l.length)).boneIndex=M,c=u=0;c<l.length;c++)f=l[c],x.setFrame(u,this.getValue(f,"time",0),this.getValue(f,"angle",0)),this.readCurve(f,x,u),u++;r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.RotateTimeline.ENTRIES])}else{if("translate"!==h&&"scale"!==h&&"shear"!==h)throw new Error("Invalid timeline type for a bone: "+h+" ("+g+")");var x=null,y=1,w=0;for("scale"===h?(x=new tt.ScaleTimeline(l.length),w=1):"shear"===h?x=new tt.ShearTimeline(l.length):(x=new tt.TranslateTimeline(l.length),y=n),x.boneIndex=M,c=u=0;c<l.length;c++){var f=l[c],T=this.getValue(f,"x",w),E=this.getValue(f,"y",w);x.setFrame(u,this.getValue(f,"time",0),T*y,E*y),this.readCurve(f,x,u),u++}r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.TranslateTimeline.ENTRIES])}}if(t.ik)for(var A in t.ik){var b=t.ik[A],R=i.findIkConstraint(A);for((x=new tt.IkConstraintTimeline(b.length)).ikConstraintIndex=i.ikConstraints.indexOf(R),c=u=0;c<b.length;c++)f=b[c],x.setFrame(u,this.getValue(f,"time",0),this.getValue(f,"mix",1),this.getValue(f,"softness",0)*n,this.getValue(f,"bendPositive",!0)?1:-1,this.getValue(f,"compress",!1),this.getValue(f,"stretch",!1)),this.readCurve(f,x,u),u++;r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.IkConstraintTimeline.ENTRIES])}if(t.transform)for(var A in t.transform){for(b=t.transform[A],R=i.findTransformConstraint(A),(x=new tt.TransformConstraintTimeline(b.length)).transformConstraintIndex=i.transformConstraints.indexOf(R),c=u=0;c<b.length;c++)f=b[c],x.setFrame(u,this.getValue(f,"time",0),this.getValue(f,"rotateMix",1),this.getValue(f,"translateMix",1),this.getValue(f,"scaleMix",1),this.getValue(f,"shearMix",1)),this.readCurve(f,x,u),u++;r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.TransformConstraintTimeline.ENTRIES])}if(t.path)for(var A in t.path){var b=t.path[A],S=i.findPathConstraintIndex(A);if(-1==S)throw new Error("Path constraint not found: "+A);var I=i.pathConstraints[S];for(var h in b)if(l=b[h],"position"===h||"spacing"===h){var x=null,y=1;for("spacing"===h?(x=new tt.PathConstraintSpacingTimeline(l.length),I.spacingMode!=tt.SpacingMode.Length&&I.spacingMode!=tt.SpacingMode.Fixed||(y=n)):(x=new tt.PathConstraintPositionTimeline(l.length),I.positionMode==tt.PositionMode.Fixed&&(y=n)),x.pathConstraintIndex=S,c=u=0;c<l.length;c++)f=l[c],x.setFrame(u,this.getValue(f,"time",0),this.getValue(f,h,0)*y),this.readCurve(f,x,u),u++;r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.PathConstraintPositionTimeline.ENTRIES])}else if("mix"===h){for((x=new tt.PathConstraintMixTimeline(l.length)).pathConstraintIndex=S,c=u=0;c<l.length;c++)f=l[c],x.setFrame(u,this.getValue(f,"time",0),this.getValue(f,"rotateMix",1),this.getValue(f,"translateMix",1)),this.readCurve(f,x,u),u++;r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.PathConstraintMixTimeline.ENTRIES])}}if(t.deform)for(var C in t.deform){var P=t.deform[C],_=i.findSkin(C);if(null==_)throw new Error("Skin not found: "+C);for(var a in P){if(o=P[a],-1==(K=i.findSlotIndex(a)))throw new Error("Slot not found: "+o.name);for(var h in o){var l=o[h],F=_.getAttachment(K,h);if(null==F)throw new Error("Deform attachment not found: "+l.name);var L=null!=F.bones,O=F.vertices,k=L?O.length/3*2:O.length;(x=new tt.DeformTimeline(l.length)).slotIndex=K,x.attachment=F;for(var u=0,N=0;N<l.length;N++){var f=l[N],D=void 0,V=this.getValue(f,"vertices",null);if(null==V)D=L?tt.Utils.newFloatArray(k):O;else{D=tt.Utils.newFloatArray(k);var B=this.getValue(f,"offset",0);if(tt.Utils.arrayCopy(V,0,D,B,V.length),1!=n)for(var Y=(c=B)+V.length;c<Y;c++)D[c]*=n;if(!L)for(c=0;c<k;c++)D[c]+=O[c]}x.setFrame(u,this.getValue(f,"time",0),D),this.readCurve(f,x,u),u++}r.push(x),s=Math.max(s,x.frames[x.getFrameCount()-1])}}}var U=t.drawOrder;if(null==U&&(U=t.draworder),null!=U){for(var x=new tt.DrawOrderTimeline(U.length),X=i.slots.length,u=0,N=0;N<U.length;N++){var z=U[N],W=null,G=this.getValue(z,"offsets",null);if(null!=G){W=tt.Utils.newArray(X,-1);for(var H=tt.Utils.newArray(X-G.length,0),q=0,j=0,c=0;c<G.length;c++){var K,Q=G[c];if(-1==(K=i.findSlotIndex(Q.slot)))throw new Error("Slot not found: "+Q.slot);for(;q!=K;)H[j++]=q++;W[q+Q.offset]=q++}for(;q<X;)H[j++]=q++;for(c=X-1;0<=c;c--)-1==W[c]&&(W[c]=H[--j])}x.setFrame(u++,this.getValue(z,"time",0),W)}r.push(x),s=Math.max(s,x.frames[x.getFrameCount()-1])}if(t.events){for(x=new tt.EventTimeline(t.events.length),c=u=0;c<t.events.length;c++){var Z=t.events[c],J=i.findEvent(Z.name);if(null==J)throw new Error("Event not found: "+Z.name);var $=new tt.Event(tt.Utils.toSinglePrecision(this.getValue(Z,"time",0)),J);$.intValue=this.getValue(Z,"int",J.intValue),$.floatValue=this.getValue(Z,"float",J.floatValue),$.stringValue=this.getValue(Z,"string",J.stringValue),null!=$.data.audioPath&&($.volume=this.getValue(Z,"volume",1),$.balance=this.getValue(Z,"balance",0)),x.setFrame(u++,$)}r.push(x),s=Math.max(s,x.frames[x.getFrameCount()-1])}if(isNaN(s))throw new Error("Error while parsing animation, duration is NaN");i.animations.push(new tt.Animation(e,r,s))},O.prototype.readCurve=function(t,e,i){var n;t.hasOwnProperty("curve")&&("stepped"==t.curve?e.setStepped(i):(n=t.curve,e.setCurve(i,n,this.getValue(t,"c2",0),this.getValue(t,"c3",1),this.getValue(t,"c4",1))))},O.prototype.getValue=function(t,e,i){return void 0!==t[e]?t[e]:i},O.blendModeFromString=function(t){if("normal"==(t=t.toLowerCase()))return tt.BlendMode.Normal;if("additive"==t)return tt.BlendMode.Additive;if("multiply"==t)return tt.BlendMode.Multiply;if("screen"==t)return tt.BlendMode.Screen;throw new Error("Unknown blend mode: "+t)},O.positionModeFromString=function(t){if("fixed"==(t=t.toLowerCase()))return tt.PositionMode.Fixed;if("percent"==t)return tt.PositionMode.Percent;throw new Error("Unknown position mode: "+t)},O.spacingModeFromString=function(t){if("length"==(t=t.toLowerCase()))return tt.SpacingMode.Length;if("fixed"==t)return tt.SpacingMode.Fixed;if("percent"==t)return tt.SpacingMode.Percent;throw new Error("Unknown position mode: "+t)},O.rotateModeFromString=function(t){if("tangent"==(t=t.toLowerCase()))return tt.RotateMode.Tangent;if("chain"==t)return tt.RotateMode.Chain;if("chainscale"==t)return tt.RotateMode.ChainScale;throw new Error("Unknown rotate mode: "+t)},O.transformModeFromString=function(t){if("normal"==(t=t.toLowerCase()))return tt.TransformMode.Normal;if("onlytranslation"==t)return tt.TransformMode.OnlyTranslation;if("norotationorreflection"==t)return tt.TransformMode.NoRotationOrReflection;if("noscale"==t)return tt.TransformMode.NoScale;if("noscaleorreflection"==t)return tt.TransformMode.NoScaleOrReflection;throw new Error("Unknown transform mode: "+t)},O);function O(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}tt.SkeletonJson=t;var y=function(t,e,i,n,r){this.mesh=t,this.skin=e,this.slotIndex=i,this.parent=n,this.inheritDeform=r}}(me=me||{}),function(h){var s=function(t,e,i){this.slotIndex=t,this.name=e,this.attachment=i};h.SkinEntry=s;var t=(e.prototype.setAttachment=function(t,e,i){if(null==i)throw new Error("attachment cannot be null.");var n=this.attachments;t>=n.length&&(n.length=t+1),n[t]||(n[t]={}),n[t][e]=i},e.prototype.addSkin=function(t){for(var e=0;e<t.bones.length;e++){for(var i=t.bones[e],n=!1,r=0;r<this.bones.length;r++)if(this.bones[r]==i){n=!0;break}n||this.bones.push(i)}for(e=0;e<t.constraints.length;e++){for(var s=t.constraints[e],n=!1,r=0;r<this.constraints.length;r++)if(this.constraints[r]==s){n=!0;break}n||this.constraints.push(s)}for(var a=t.getAttachments(),e=0;e<a.length;e++){var o=a[e];this.setAttachment(o.slotIndex,o.name,o.attachment)}},e.prototype.copySkin=function(t){for(var e=0;e<t.bones.length;e++){for(var i=t.bones[e],n=!1,r=0;r<this.bones.length;r++)if(this.bones[r]==i){n=!0;break}n||this.bones.push(i)}for(e=0;e<t.constraints.length;e++){for(var s=t.constraints[e],n=!1,r=0;r<this.constraints.length;r++)if(this.constraints[r]==s){n=!0;break}n||this.constraints.push(s)}for(var a=t.getAttachments(),e=0;e<a.length;e++){var o=a[e];null!=o.attachment&&(o.attachment instanceof h.MeshAttachment?o.attachment=o.attachment.newLinkedMesh():o.attachment=o.attachment.copy(),this.setAttachment(o.slotIndex,o.name,o.attachment))}},e.prototype.getAttachment=function(t,e){var i=this.attachments[t];return i?i[e]:null},e.prototype.removeAttachment=function(t,e){var i=this.attachments[t];i&&(i[e]=null)},e.prototype.getAttachments=function(){for(var t=new Array,e=0;e<this.attachments.length;e++){var i=this.attachments[e];if(i)for(var n in i){var r=i[n];r&&t.push(new s(e,n,r))}}return t},e.prototype.getAttachmentsForSlot=function(t,e){var i=this.attachments[t];if(i)for(var n in i){var r=i[n];r&&e.push(new s(t,n,r))}},e.prototype.clear=function(){this.attachments.length=0,this.bones.length=0,this.constraints.length=0},e.prototype.attachAll=function(t,e){for(var i=0,n=0;n<t.slots.length;n++){var r=t.slots[n],s=r.getAttachment();if(s&&i<e.attachments.length){var a=e.attachments[i];for(var o in a)if(s==a[o]){var h=this.getAttachment(i,o);null!=h&&r.setAttachment(h);break}}i++}},e);function e(t){if(this.attachments=new Array,this.bones=Array(),this.constraints=new Array,null==t)throw new Error("name cannot be null.");this.name=t}h.Skin=t}(me=me||{}),k=me=me||{},Le.prototype.getSkeleton=function(){return this.bone.skeleton},Le.prototype.getAttachment=function(){return this.attachment},Le.prototype.setAttachment=function(t){this.attachment!=t&&(this.attachment=t,this.attachmentTime=this.bone.skeleton.time,this.deform.length=0)},Le.prototype.setAttachmentTime=function(t){this.attachmentTime=this.bone.skeleton.time-t},Le.prototype.getAttachmentTime=function(){return this.bone.skeleton.time-this.attachmentTime},Le.prototype.setToSetupPose=function(){this.color.setFromColor(this.data.color),null!=this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),null==this.data.attachmentName?this.attachment=null:(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName)))},N=Le,k.Slot=N,(D=me=me||{}).SlotData=Oe,function(t){var e,i,n,r,s=(a.prototype.getImage=function(){return this._image},a.filterFromString=function(t){switch(t.toLowerCase()){case"nearest":return e.Nearest;case"linear":return e.Linear;case"mipmap":return e.MipMap;case"mipmapnearestnearest":return e.MipMapNearestNearest;case"mipmaplinearnearest":return e.MipMapLinearNearest;case"mipmapnearestlinear":return e.MipMapNearestLinear;case"mipmaplinearlinear":return e.MipMapLinearLinear;default:throw new Error("Unknown texture filter "+t)}},a.wrapFromString=function(t){switch(t.toLowerCase()){case"mirroredtepeat":return n.MirroredRepeat;case"clamptoedge":return n.ClampToEdge;case"repeat":return n.Repeat;default:throw new Error("Unknown texture wrap "+t)}},a);function a(t){this._image=t}t.Texture=s,(i=e=t.TextureFilter||(t.TextureFilter={}))[i.Nearest=9728]="Nearest",i[i.Linear=9729]="Linear",i[i.MipMap=9987]="MipMap",i[i.MipMapNearestNearest=9984]="MipMapNearestNearest",i[i.MipMapLinearNearest=9985]="MipMapLinearNearest",i[i.MipMapNearestLinear=9986]="MipMapNearestLinear",i[i.MipMapLinearLinear=9987]="MipMapLinearLinear",(r=n=t.TextureWrap||(t.TextureWrap={}))[r.MirroredRepeat=33648]="MirroredRepeat",r[r.ClampToEdge=33071]="ClampToEdge",r[r.Repeat=10497]="Repeat";function o(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.rotate=!1,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0}t.TextureRegion=o;var h,l=(ve(u,h=s),u.prototype.setFilters=function(t,e){},u.prototype.setWraps=function(t,e){},u.prototype.dispose=function(){},u);function u(){return null!==h&&h.apply(this,arguments)||this}t.FakeTexture=l}(me=me||{}),function(d){var t=(e.prototype.load=function(t,e){if(null==e)throw new Error("textureLoader cannot be null.");for(var i=new p(t),n=new Array(4),r=null;;){var s,a,o,h,l,u,c,f=i.readLine();if(null==f)break;0==(f=f.trim()).length?r=null:r?((s=new g).name=f,s.page=r,"true"==(a=i.readValue()).toLocaleLowerCase()?s.degrees=90:"false"==a.toLocaleLowerCase()?s.degrees=0:s.degrees=parseFloat(a),s.rotate=90==s.degrees,i.readTuple(n),o=parseInt(n[0]),h=parseInt(n[1]),i.readTuple(n),l=parseInt(n[0]),u=parseInt(n[1]),s.u=o/r.width,s.v=h/r.height,s.rotate?(s.u2=(o+u)/r.width,s.v2=(h+l)/r.height):(s.u2=(o+l)/r.width,s.v2=(h+u)/r.height),s.x=o,s.y=h,s.width=Math.abs(l),s.height=Math.abs(u),4==i.readTuple(n)&&4==i.readTuple(n)&&i.readTuple(n),s.originalWidth=parseInt(n[0]),s.originalHeight=parseInt(n[1]),i.readTuple(n),s.offsetX=parseInt(n[0]),s.offsetY=parseInt(n[1]),s.index=parseInt(i.readValue()),s.texture=r.texture,this.regions.push(s)):((r=new m).name=f,2==i.readTuple(n)&&(r.width=parseInt(n[0]),r.height=parseInt(n[1]),i.readTuple(n)),i.readTuple(n),r.minFilter=d.Texture.filterFromString(n[0]),r.magFilter=d.Texture.filterFromString(n[1]),c=i.readValue(),r.uWrap=d.TextureWrap.ClampToEdge,r.vWrap=d.TextureWrap.ClampToEdge,"x"==c?r.uWrap=d.TextureWrap.Repeat:"y"==c?r.vWrap=d.TextureWrap.Repeat:"xy"==c&&(r.uWrap=r.vWrap=d.TextureWrap.Repeat),r.texture=e(f),r.texture.setFilters(r.minFilter,r.magFilter),r.texture.setWraps(r.uWrap,r.vWrap),r.width=r.texture.getImage().width,r.height=r.texture.getImage().height,this.pages.push(r))}},e.prototype.findRegion=function(t){for(var e=0;e<this.regions.length;e++)if(this.regions[e].name==t)return this.regions[e];return null},e.prototype.dispose=function(){for(var t=0;t<this.pages.length;t++)this.pages[t].texture.dispose()},e);function e(t,e){this.pages=new Array,this.regions=new Array,this.load(t,e)}d.TextureAtlas=t;var p=(i.prototype.readLine=function(){return this.index>=this.lines.length?null:this.lines[this.index++]},i.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()},i.prototype.readTuple=function(t){var e=this.readLine(),i=e.indexOf(":");if(-1==i)throw new Error("Invalid line: "+e);for(var n=0,r=i+1;n<3;n++){var s=e.indexOf(",",r);if(-1==s)break;t[n]=e.substr(r,s-r).trim(),r=s+1}return t[n]=e.substring(r).trim(),n+1},i);function i(t){this.index=0,this.lines=t.split(/\r\n|\r|\n/)}var m=function(){};d.TextureAtlasPage=m;var n,g=(n=d.TextureRegion,ve(r,n),r);function r(){return null!==n&&n.apply(this,arguments)||this}d.TextureAtlasRegion=g}(me=me||{}),V=me=me||{},ke.prototype.isActive=function(){return this.active},ke.prototype.apply=function(){this.update()},ke.prototype.update=function(){this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld()},ke.prototype.applyAbsoluteWorld=function(){for(var t=this.rotateMix,e=this.translateMix,i=this.scaleMix,n=this.shearMix,r=this.target,s=r.a,a=r.b,o=r.c,h=r.d,l=0<s*h-a*o?V.MathUtils.degRad:-V.MathUtils.degRad,u=this.data.offsetRotation*l,c=this.data.offsetShearY*l,f=this.bones,d=0,p=f.length;d<p;d++){var m,g,v,M,x,y,w,T,E,A,b,R=f[d],S=!1;0!=t&&(m=R.a,w=R.b,g=R.c,T=R.d,(A=Math.atan2(o,s)-Math.atan2(g,m)+u)>V.MathUtils.PI?A-=V.MathUtils.PI2:A<-V.MathUtils.PI&&(A+=V.MathUtils.PI2),A*=t,v=Math.cos(A),M=Math.sin(A),R.a=v*m-M*g,R.b=v*w-M*T,R.c=M*m+v*g,R.d=M*w+v*T,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),0<i&&(b=Math.sqrt(R.a*R.a+R.c*R.c),y=Math.sqrt(s*s+o*o),1e-5<b&&(b=(b+(y-b+this.data.offsetScaleX)*i)/b),R.a*=b,R.c*=b,b=Math.sqrt(R.b*R.b+R.d*R.d),y=Math.sqrt(a*a+h*h),1e-5<b&&(b=(b+(y-b+this.data.offsetScaleY)*i)/b),R.b*=b,R.d*=b,S=!0),0<n&&(w=R.b,T=R.d,E=Math.atan2(T,w),(A=Math.atan2(h,a)-Math.atan2(o,s)-(E-Math.atan2(R.c,R.a)))>V.MathUtils.PI?A-=V.MathUtils.PI2:A<-V.MathUtils.PI&&(A+=V.MathUtils.PI2),A=E+(A+c)*n,b=Math.sqrt(w*w+T*T),R.b=Math.cos(A)*b,R.d=Math.sin(A)*b,S=!0),S&&(R.appliedValid=!1)}},ke.prototype.applyRelativeWorld=function(){for(var t=this.rotateMix,e=this.translateMix,i=this.scaleMix,n=this.shearMix,r=this.target,s=r.a,a=r.b,o=r.c,h=r.d,l=0<s*h-a*o?V.MathUtils.degRad:-V.MathUtils.degRad,u=this.data.offsetRotation*l,c=this.data.offsetShearY*l,f=this.bones,d=0,p=f.length;d<p;d++){var m,g,v,M,x,y,w,T,E,A=f[d],b=!1;0!=t&&(m=A.a,w=A.b,g=A.c,T=A.d,(y=Math.atan2(o,s)+u)>V.MathUtils.PI?y-=V.MathUtils.PI2:y<-V.MathUtils.PI&&(y+=V.MathUtils.PI2),y*=t,v=Math.cos(y),M=Math.sin(y),A.a=v*m-M*g,A.b=v*w-M*T,A.c=M*m+v*g,A.d=M*w+v*T,b=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),A.worldX+=x.x*e,A.worldY+=x.y*e,b=!0),0<i&&(E=(Math.sqrt(s*s+o*o)-1+this.data.offsetScaleX)*i+1,A.a*=E,A.c*=E,E=(Math.sqrt(a*a+h*h)-1+this.data.offsetScaleY)*i+1,A.b*=E,A.d*=E,b=!0),0<n&&((y=Math.atan2(h,a)-Math.atan2(o,s))>V.MathUtils.PI?y-=V.MathUtils.PI2:y<-V.MathUtils.PI&&(y+=V.MathUtils.PI2),w=A.b,T=A.d,y=Math.atan2(T,w)+(y-V.MathUtils.PI/2+c)*n,E=Math.sqrt(w*w+T*T),A.b=Math.cos(y)*E,A.d=Math.sin(y)*E,b=!0),b&&(A.appliedValid=!1)}},ke.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,i=this.scaleMix,n=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,a=0,o=s.length;a<o;a++){var h=s[a];h.appliedValid||h.updateAppliedTransform();var l=h.arotation;0!=t&&(p=r.arotation-l+this.data.offsetRotation,l+=(p-=360*(16384-(16384.499999999996-p/360|0)))*t);var u=h.ax,c=h.ay;0!=e&&(u+=(r.ax-u+this.data.offsetX)*e,c+=(r.ay-c+this.data.offsetY)*e);var f=h.ascaleX,d=h.ascaleY;0!=i&&(1e-5<f&&(f=(f+(r.ascaleX-f+this.data.offsetScaleX)*i)/f),1e-5<d&&(d=(d+(r.ascaleY-d+this.data.offsetScaleY)*i)/d));var p,m=h.ashearY;0!=n&&(p=r.ashearY-m+this.data.offsetShearY,p-=360*(16384-(16384.499999999996-p/360|0)),h.shearY+=p*n),h.updateWorldTransformWith(u,c,l,f,d,h.ashearX,m)}},ke.prototype.applyRelativeLocal=function(){var t=this.rotateMix,e=this.translateMix,i=this.scaleMix,n=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,a=0,o=s.length;a<o;a++){var h=s[a];h.appliedValid||h.updateAppliedTransform();var l=h.arotation;0!=t&&(l+=(r.arotation+this.data.offsetRotation)*t);var u=h.ax,c=h.ay;0!=e&&(u+=(r.ax+this.data.offsetX)*e,c+=(r.ay+this.data.offsetY)*e);var f=h.ascaleX,d=h.ascaleY;0!=i&&(1e-5<f&&(f*=(r.ascaleX-1+this.data.offsetScaleX)*i+1),1e-5<d&&(d*=(r.ascaleY-1+this.data.offsetScaleY)*i+1));var p=h.ashearY;0!=n&&(p+=(r.ashearY+this.data.offsetShearY)*n),h.updateWorldTransformWith(u,c,l,f,d,h.ashearX,p)}},B=ke,V.TransformConstraint=B,Y=me=me||{},U=Y.ConstraintData,ve(Ne,U),X=Ne,Y.TransformConstraintData=X,z=me=me||{},De.prototype.triangulate=function(t){for(var e=t,i=t.length>>1,n=this.indicesArray,r=n.length=0;r<i;r++)n[r]=r;for(var s=this.isConcaveArray,r=s.length=0,a=i;r<a;++r)s[r]=De.isConcave(r,i,e,n);var o=this.triangles;for(o.length=0;3<i;){for(var h=i-1,r=0,l=1;;){t:if(!s[r]){for(var u=n[h]<<1,c=n[r]<<1,f=n[l]<<1,d=e[u],p=e[1+u],m=e[c],g=e[1+c],v=e[f],M=e[1+f],x=(l+1)%i;x!=h;x=(x+1)%i)if(s[x]){var y=n[x]<<1,w=e[y],T=e[1+y];if(De.positiveArea(v,M,d,p,w,T)&&De.positiveArea(d,p,m,g,w,T)&&De.positiveArea(m,g,v,M,w,T))break t}break}if(0==l){do{if(!s[r])break;r--}while(0<r);break}h=r,l=((r=l)+1)%i}o.push(n[(i+r-1)%i]),o.push(n[r]),o.push(n[(r+1)%i]),n.splice(r,1),s.splice(r,1);var E=(--i+r-1)%i,A=r==i?0:r;s[E]=De.isConcave(E,i,e,n),s[A]=De.isConcave(A,i,e,n)}return 3==i&&(o.push(n[2]),o.push(n[0]),o.push(n[1])),o},De.prototype.decompose=function(t,e){var i=t,n=this.convexPolygons;this.polygonPool.freeAll(n),n.length=0;var r=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(r),r.length=0;var s=this.polygonIndicesPool.obtain();s.length=0;for(var a=this.polygonPool.obtain(),o=-1,h=a.length=0,l=0,u=e.length;l<u;l+=3){var c=e[l]<<1,f=e[l+1]<<1,d=e[l+2]<<1,p=i[c],m=i[1+c],g=i[f],v=i[1+f],M=i[d],x=i[1+d],y=!1;o==c&&(w=a.length-4,S=De.winding(a[w],a[w+1],a[w+2],a[w+3],M,x),I=De.winding(M,x,a[0],a[1],a[2],a[3]),S==h&&I==h&&(a.push(M),a.push(x),s.push(d),y=!0)),y||(0<a.length?(n.push(a),r.push(s)):(this.polygonPool.free(a),this.polygonIndicesPool.free(s)),(a=this.polygonPool.obtain()).length=0,a.push(p),a.push(m),a.push(g),a.push(v),a.push(M),a.push(x),(s=this.polygonIndicesPool.obtain()).length=0,s.push(c),s.push(f),s.push(d),h=De.winding(p,m,g,v,M,x),o=c)}for(0<a.length&&(n.push(a),r.push(s)),l=0,u=n.length;l<u;l++)if(0!=(s=r[l]).length)for(var w,T,E,A,b,R,S,I,C=s[0],P=s[s.length-1],_=(a=n[l])[w=a.length-4],F=a[w+1],L=a[w+2],O=a[w+3],k=a[0],N=a[1],D=a[2],V=a[3],B=De.winding(_,F,L,O,k,N),Y=0;Y<u;Y++)Y!=l&&3==(T=r[Y]).length&&(E=T[0],A=T[1],b=T[2],M=(R=n[Y])[R.length-2],x=R[R.length-1],E==C&&A==P&&(S=De.winding(_,F,L,O,M,x),I=De.winding(M,x,k,N,D,V),S==B&&I==B&&(R.length=0,T.length=0,a.push(M),a.push(x),s.push(b),_=L,F=O,L=M,O=x,Y=0)));for(l=n.length-1;0<=l;l--)0==(a=n[l]).length&&(n.splice(l,1),this.polygonPool.free(a),s=r[l],r.splice(l,1),this.polygonIndicesPool.free(s));return n},De.isConcave=function(t,e,i,n){var r=n[(e+t-1)%e]<<1,s=n[t]<<1,a=n[(t+1)%e]<<1;return!this.positiveArea(i[r],i[1+r],i[s],i[1+s],i[a],i[1+a])},De.positiveArea=function(t,e,i,n,r,s){return 0<=t*(s-n)+i*(e-s)+r*(n-e)},De.winding=function(t,e,i,n,r,s){var a=i-t,o=n-e;return 0<=r*o-s*a+a*e-t*o?1:-1},W=De,z.Triangulator=W,function(t){var e=(i.prototype.add=function(t){var e=this.contains(t);return this.array[0|t]=0|t,!e},i.prototype.contains=function(t){return null!=this.array[0|t]},i.prototype.remove=function(t){this.array[0|t]=void 0},i.prototype.clear=function(){this.array.length=0},i);function i(){this.array=new Array}t.IntSet=e;var n=(r.prototype.set=function(t,e,i,n){return this.r=t,this.g=e,this.b=i,this.a=n,this.clamp(),this},r.prototype.setFromColor=function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this},r.prototype.setFromString=function(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=(8!=t.length?255:parseInt(t.substr(6,2),16))/255,this},r.prototype.add=function(t,e,i,n){return this.r+=t,this.g+=e,this.b+=i,this.a+=n,this.clamp(),this},r.prototype.clamp=function(){return this.r<0?this.r=0:1<this.r&&(this.r=1),this.g<0?this.g=0:1<this.g&&(this.g=1),this.b<0?this.b=0:1<this.b&&(this.b=1),this.a<0?this.a=0:1<this.a&&(this.a=1),this},r.rgba8888ToColor=function(t,e){t.r=((4278190080&e)>>>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,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.r=t,this.g=e,this.b=i,this.a=n}t.Color=n;var s=(a.clamp=function(t,e,i){return t<e?e:i<t?i:t},a.cosDeg=function(t){return Math.cos(t*a.degRad)},a.sinDeg=function(t){return Math.sin(t*a.degRad)},a.signum=function(t){return 0<t?1:t<0?-1:0},a.toInt=function(t){return 0<t?Math.floor(t):Math.ceil(t)},a.cbrt=function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e},a.randomTriangular=function(t,e){return a.randomTriangularWith(t,e,.5*(t+e))},a.randomTriangularWith=function(t,e,i){var n=Math.random(),r=e-t;return n<=(i-t)/r?t+Math.sqrt(n*r*(i-t)):e-Math.sqrt((1-n)*r*(e-i))},a.PI2=2*(a.PI=3.1415927),a.radDeg=a.radiansToDegrees=180/a.PI,a.degRad=a.degreesToRadians=a.PI/180,a);function a(){}t.MathUtils=s;var o=(h.prototype.apply=function(t,e,i){return t+(e-t)*this.applyInternal(i)},h);function h(){}t.Interpolation=o;var l,u=(ve(c,l=o),c.prototype.applyInternal=function(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1},c);function c(t){var e=l.call(this)||this;return e.power=2,e.power=t,e}t.Pow=u;var f,d=(ve(p,f=u),p.prototype.applyInternal=function(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1},p);function p(t){return f.call(this,t)||this}t.PowOut=d;var m=(g.arrayCopy=function(t,e,i,n,r){for(var s=e,a=n;s<e+r;s++,a++)i[a]=t[s]},g.setArraySize=function(t,e,i){void 0===i&&(i=0);var n=t.length;if(n==e)return t;if(n<(t.length=e))for(var r=n;r<e;r++)t[r]=i;return t},g.ensureArrayCapacity=function(t,e,i){return void 0===i&&(i=0),t.length>=e?t:g.setArraySize(t,e,i)},g.newArray=function(t,e){for(var i=new Array(t),n=0;n<t;n++)i[n]=e;return i},g.newFloatArray=function(t){if(g.SUPPORTS_TYPED_ARRAYS)return new Float32Array(t);for(var e=new Array(t),i=0;i<e.length;i++)e[i]=0;return e},g.newShortArray=function(t){if(g.SUPPORTS_TYPED_ARRAYS)return new Int16Array(t);for(var e=new Array(t),i=0;i<e.length;i++)e[i]=0;return e},g.toFloatArray=function(t){return g.SUPPORTS_TYPED_ARRAYS?new Float32Array(t):t},g.toSinglePrecision=function(t){return g.SUPPORTS_TYPED_ARRAYS?Math.fround(t):t},g.webkit602BugfixHelper=function(t,e){},g.contains=function(t,e,i){void 0===i&&(i=!0);for(var n=0;n<t.length;n++)if(t[n]==e)return!0;return!1},g.SUPPORTS_TYPED_ARRAYS="undefined"!=typeof Float32Array,g);function g(){}t.Utils=m;var v=(M.logBones=function(t){for(var e=0;e<t.bones.length;e++){var i=t.bones[e];console.log(i.data.name+", "+i.a+", "+i.b+", "+i.c+", "+i.d+", "+i.worldX+", "+i.worldY)}},M);function M(){}t.DebugUtils=v;var x=(y.prototype.obtain=function(){return 0<this.items.length?this.items.pop():this.instantiator()},y.prototype.free=function(t){t.reset&&t.reset(),this.items.push(t)},y.prototype.freeAll=function(t){for(var e=0;e<t.length;e++)this.free(t[e])},y.prototype.clear=function(){this.items.length=0},y);function y(t){this.items=new Array,this.instantiator=t}t.Pool=x;var w=(T.prototype.set=function(t,e){return this.x=t,this.y=e,this},T.prototype.length=function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},T.prototype.normalize=function(){var t=this.length();return 0!=t&&(this.x/=t,this.y/=t),this},T);function T(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e}t.Vector2=w;var E=(A.prototype.update=function(){var t=Date.now()/1e3;this.delta=t-this.lastTime,this.frameTime+=this.delta,this.totalTime+=this.delta,this.delta>this.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,1<this.frameTime&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)},A);function A(){this.maxDelta=.064,this.framesPerSecond=0,this.delta=0,this.totalTime=0,this.lastTime=Date.now()/1e3,this.frameCount=0,this.frameTime=0}t.TimeKeeper=E;var b=(R.prototype.hasEnoughData=function(){return this.addedValues>=this.values.length},R.prototype.addValue=function(t){this.addedValues<this.values.length&&this.addedValues++,this.values[this.lastValue++]=t,this.lastValue>this.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<this.values.length;e++)t+=this.values[e];this.mean=t/this.values.length,this.dirty=!1}return this.mean}return 0},R);function R(t){void 0===t&&(t=32),this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}t.WindowedMean=b}(me=me||{}),Math.fround||(Math.fround=(G=new Float32Array(1),function(t){return G[0]=t,G[0]})),function(e){function t(t){if(null==t)throw new Error("name cannot be null.");this.name=t}e.Attachment=t;var i,n=(ve(r,i=t),r.prototype.computeWorldVertices=function(t,e,i,n,r,s){i=r+(i>>1)*s;var a=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(null!=l){for(var u=0,c=0,f=0;f<e;f+=2)u+=(g=l[u])+1,c+=g;var d=a.bones;if(0==o.length)for(T=r,E=3*c;T<i;T+=s){var p=0,m=0,g=l[u++];for(g+=u;u<g;u++,E+=3){var v=d[l[u]],M=h[E],x=h[E+1],y=h[E+2];p+=(M*v.a+x*v.b+v.worldX)*y,m+=(M*v.c+x*v.d+v.worldY)*y}n[T]=p,n[T+1]=m}else for(var w=o,T=r,E=3*c,A=c<<1;T<i;T+=s){for(m=p=0,g=l[u++],g+=u;u<g;u++,E+=3,A+=2)v=d[l[u]],M=h[E]+w[A],x=h[E+1]+w[A+1],y=h[E+2],p+=(M*v.a+x*v.b+v.worldX)*y,m+=(M*v.c+x*v.d+v.worldY)*y;n[T]=p,n[T+1]=m}}else{0<o.length&&(h=o);for(var b=(v=t.bone).worldX,R=v.worldY,S=v.a,E=v.b,I=v.c,C=v.d,P=e,T=r;T<i;P+=2,T+=s){var M=h[P],x=h[P+1];n[T]=M*S+x*E+b,n[T+1]=M*I+x*C+R}}},r.prototype.copyTo=function(t){null!=this.bones?(t.bones=new Array(this.bones.length),e.Utils.arrayCopy(this.bones,0,t.bones,0,this.bones.length)):t.bones=null,null!=this.vertices?(t.vertices=e.Utils.newFloatArray(this.vertices.length),e.Utils.arrayCopy(this.vertices,0,t.vertices,0,this.vertices.length)):t.vertices=null,t.worldVerticesLength=this.worldVerticesLength,t.deformAttachment=this.deformAttachment},r.nextID=0,r);function r(t){var e=i.call(this,t)||this;return e.id=(65535&r.nextID++)<<11,e.worldVerticesLength=0,e.deformAttachment=e}e.VertexAttachment=n}(me=me||{}),H=me=me||{},(q=H.AttachmentType||(H.AttachmentType={}))[q.Region=0]="Region",q[q.BoundingBox=1]="BoundingBox",q[q.Mesh=2]="Mesh",q[q.LinkedMesh=3]="LinkedMesh",q[q.Path=4]="Path",q[q.Point=5]="Point",q[q.Clipping=6]="Clipping",Q=me=me||{},Z=Q.VertexAttachment,ve(Ve,Z),Ve.prototype.copy=function(){var t=new Ve(name);return this.copyTo(t),t.color.setFromColor(this.color),t},J=Ve,Q.BoundingBoxAttachment=J,$=me=me||{},tt=$.VertexAttachment,ve(Be,tt),Be.prototype.copy=function(){var t=new Be(name);return this.copyTo(t),t.endSlot=this.endSlot,t.color.setFromColor(this.color),t},et=Be,$.ClippingAttachment=et,it=me=me||{},nt=it.VertexAttachment,ve(Ye,nt),Ye.prototype.updateUVs=function(){var t=this.regionUVs;null!=this.uvs&&this.uvs.length==t.length||(this.uvs=it.Utils.newFloatArray(t.length));var e=this.uvs,i=this.uvs.length,n=this.region.u,r=this.region.v,s=0,a=0;if(this.region instanceof it.TextureAtlasRegion){var o=this.region,h=o.texture.getImage().width,l=o.texture.getImage().height;switch(o.degrees){case 90:n-=(o.originalHeight-o.offsetY-o.height)/h,r-=(o.originalWidth-o.offsetX-o.width)/l,s=o.originalHeight/h,a=o.originalWidth/l;for(var u=0;u<i;u+=2)e[u]=n+t[u+1]*s,e[u+1]=r+(1-t[u])*a;return;case 180:for(n-=(o.originalWidth-o.offsetX-o.width)/h,r-=o.offsetY/l,s=o.originalWidth/h,a=o.originalHeight/l,u=0;u<i;u+=2)e[u]=n+(1-t[u])*s,e[u+1]=r+(1-t[u+1])*a;return;case 270:for(n-=o.offsetY/h,r-=o.offsetX/l,s=o.originalHeight/h,a=o.originalWidth/l,u=0;u<i;u+=2)e[u]=n+(1-t[u+1])*s,e[u+1]=r+t[u]*a;return}n-=o.offsetX/h,r-=(o.originalHeight-o.offsetY-o.height)/l,s=o.originalWidth/h,a=o.originalHeight/l}else null==this.region?(n=r=0,s=a=1):(s=this.region.u2-n,a=this.region.v2-r);for(u=0;u<i;u+=2)e[u]=n+t[u]*s,e[u+1]=r+t[u+1]*a},Ye.prototype.getParentMesh=function(){return this.parentMesh},Ye.prototype.setParentMesh=function(t){null!=(this.parentMesh=t)&&(this.bones=t.bones,this.vertices=t.vertices,this.worldVerticesLength=t.worldVerticesLength,this.regionUVs=t.regionUVs,this.triangles=t.triangles,this.hullLength=t.hullLength,this.worldVerticesLength=t.worldVerticesLength)},Ye.prototype.copy=function(){if(null!=this.parentMesh)return this.newLinkedMesh();var t=new Ye(this.name);return t.region=this.region,t.path=this.path,t.color.setFromColor(this.color),this.copyTo(t),t.regionUVs=new Array(this.regionUVs.length),it.Utils.arrayCopy(this.regionUVs,0,t.regionUVs,0,this.regionUVs.length),t.uvs=new Array(this.uvs.length),it.Utils.arrayCopy(this.uvs,0,t.uvs,0,this.uvs.length),t.triangles=new Array(this.triangles.length),it.Utils.arrayCopy(this.triangles,0,t.triangles,0,this.triangles.length),t.hullLength=this.hullLength,null!=this.edges&&(t.edges=new Array(this.edges.length),it.Utils.arrayCopy(this.edges,0,t.edges,0,this.edges.length)),t.width=this.width,t.height=this.height,t},Ye.prototype.newLinkedMesh=function(){var t=new Ye(this.name);return t.region=this.region,t.path=this.path,t.color.setFromColor(this.color),t.deformAttachment=this.deformAttachment,t.setParentMesh(null!=this.parentMesh?this.parentMesh:this),t.updateUVs(),t},rt=Ye,it.MeshAttachment=rt,st=me=me||{},at=st.VertexAttachment,ve(Ue,at),Ue.prototype.copy=function(){var t=new Ue(name);return this.copyTo(t),t.lengths=new Array(this.lengths.length),st.Utils.arrayCopy(this.lengths,0,t.lengths,0,this.lengths.length),t.closed=closed,t.constantSpeed=this.constantSpeed,t.color.setFromColor(this.color),t},ot=Ue,st.PathAttachment=ot,lt=me=me||{},ut=lt.VertexAttachment,ve(Xe,ut),Xe.prototype.computeWorldPosition=function(t,e){return e.x=this.x*t.a+this.y*t.b+t.worldX,e.y=this.x*t.c+this.y*t.d+t.worldY,e},Xe.prototype.computeWorldRotation=function(t){var e=lt.MathUtils.cosDeg(this.rotation),i=lt.MathUtils.sinDeg(this.rotation),n=e*t.a+i*t.b,r=e*t.c+i*t.d;return Math.atan2(r,n)*lt.MathUtils.radDeg},Xe.prototype.copy=function(){var t=new Xe(name);return t.x=this.x,t.y=this.y,t.rotation=this.rotation,t.color.setFromColor(this.color),t},ct=Xe,lt.PointAttachment=ct,ft=me=me||{},dt=ft.Attachment,ve(ze,dt),ze.prototype.updateOffset=function(){var t=this.width/this.region.originalWidth*this.scaleX,e=this.height/this.region.originalHeight*this.scaleY,i=-this.width/2*this.scaleX+this.region.offsetX*t,n=-this.height/2*this.scaleY+this.region.offsetY*e,r=i+this.region.width*t,s=n+this.region.height*e,a=this.rotation*Math.PI/180,o=Math.cos(a),h=Math.sin(a),l=i*o+this.x,u=i*h,c=n*o+this.y,f=n*h,d=r*o+this.x,p=r*h,m=s*o+this.y,g=s*h,v=this.offset;v[ze.OX1]=l-f,v[ze.OY1]=c+u,v[ze.OX2]=l-g,v[ze.OY2]=m+u,v[ze.OX3]=d-g,v[ze.OY3]=m+p,v[ze.OX4]=d-f,v[ze.OY4]=c+p},ze.prototype.setRegion=function(t){this.region=t;var e=this.uvs;t.rotate?(e[2]=t.u,e[3]=t.v2,e[4]=t.u,e[5]=t.v,e[6]=t.u2,e[7]=t.v,e[0]=t.u2,e[1]=t.v2):(e[0]=t.u,e[1]=t.v2,e[2]=t.u,e[3]=t.v,e[4]=t.u2,e[5]=t.v,e[6]=t.u2,e[7]=t.v2)},ze.prototype.computeWorldVertices=function(t,e,i,n){var r=this.offset,s=t.worldX,a=t.worldY,o=t.a,h=t.b,l=t.c,u=t.d,c=r[ze.OX1],f=r[ze.OY1];e[i]=c*o+f*h+s,e[i+1]=c*l+f*u+a,i+=n,c=r[ze.OX2],f=r[ze.OY2],e[i]=c*o+f*h+s,e[i+1]=c*l+f*u+a,i+=n,c=r[ze.OX3],f=r[ze.OY3],e[i]=c*o+f*h+s,e[i+1]=c*l+f*u+a,i+=n,c=r[ze.OX4],f=r[ze.OY4],e[i]=c*o+f*h+s,e[i+1]=c*l+f*u+a},ze.prototype.copy=function(){var t=new ze(this.name);return t.region=this.region,t.rendererObject=this.rendererObject,t.path=this.path,t.x=this.x,t.y=this.y,t.scaleX=this.scaleX,t.scaleY=this.scaleY,t.rotation=this.rotation,t.width=this.width,t.height=this.height,ft.Utils.arrayCopy(this.uvs,0,t.uvs,0,8),ft.Utils.arrayCopy(this.offset,0,t.offset,0,8),t.color.setFromColor(this.color),t},ze.OX1=0,ze.OY1=1,ze.OX2=2,ze.OY2=3,ze.OX3=4,ze.OY3=5,ze.OX4=6,ze.OY4=7,ze.X1=0,ze.Y1=1,ze.C1R=2,ze.C1G=3,ze.C1B=4,ze.C1A=5,ze.U1=6,ze.V1=7,ze.X2=8,ze.Y2=9,ze.C2R=10,ze.C2G=11,ze.C2B=12,ze.C2A=13,ze.U2=14,ze.V2=15,ze.X3=16,ze.Y3=17,ze.C3R=18,ze.C3G=19,ze.C3B=20,ze.C3A=21,ze.U3=22,ze.V3=23,ze.X4=24,ze.Y4=25,ze.C4R=26,ze.C4G=27,ze.C4B=28,ze.C4A=29,ze.U4=30,ze.V4=31,pt=ze,ft.RegionAttachment=pt,mt=me=me||{},We.prototype.begin=function(t){},We.prototype.transform=function(t,e,i,n){t.x+=mt.MathUtils.randomTriangular(-this.jitterX,this.jitterY),t.y+=mt.MathUtils.randomTriangular(-this.jitterX,this.jitterY)},We.prototype.end=function(){},gt=We,mt.JitterEffect=gt,vt=me=me||{},Ge.prototype.begin=function(t){this.worldX=t.x+this.centerX,this.worldY=t.y+this.centerY},Ge.prototype.transform=function(t,e,i,n){var r,s,a,o=this.angle*vt.MathUtils.degreesToRadians,h=t.x-this.worldX,l=t.y-this.worldY,u=Math.sqrt(h*h+l*l);u<this.radius&&(r=Ge.interpolation.apply(0,o,(this.radius-u)/this.radius),s=Math.cos(r),a=Math.sin(r),t.x=s*h-a*l+this.worldX,t.y=a*h+s*l+this.worldY)},Ge.prototype.end=function(){},Ge.interpolation=new vt.PowOut(2),Mt=Ge,vt.SwirlEffect=Mt,xt=me=me||{},yt=xt.canvas||(xt.canvas={}),wt=xt.AssetManager,ve(He,wt),Tt=He,yt.AssetManager=Tt,Et=me=me||{},At=Et.canvas||(Et.canvas={}),bt=Et.Texture,ve(qe,bt),qe.prototype.setFilters=function(t,e){},qe.prototype.setWraps=function(t,e){},qe.prototype.dispose=function(){},Rt=qe,At.CanvasTexture=Rt,St=me=me||{},It=St.canvas||(St.canvas={}),je.prototype.draw=function(t){this.triangleRendering?this.drawTriangles(t):this.drawImages(t)},je.prototype.drawImages=function(t){var e=this.ctx,i=t.drawOrder;this.debugRendering&&(e.strokeStyle="green"),e.save();for(var n=0,r=i.length;n<r;n++){var s,a,o,h,l,u,c,f,d,p,m,g,v,M,x,y=i[n];y.bone.active&&(h=o=a=null,(s=y.getAttachment())instanceof St.RegionAttachment&&(h=(o=(a=s).region).texture.getImage(),l=y.bone.skeleton.color,u=y.color,c=a.color,f=l.a*u.a*c.a,(d=this.tempColor).set(l.r*u.r*c.r,l.g*u.g*c.g,l.b*u.b*c.b,f),p=s,m=y.bone,M=o.width,x=o.height,e.save(),e.transform(m.a,m.c,m.b,m.d,m.worldX,m.worldY),e.translate(s.offset[0],s.offset[1]),e.rotate(s.rotation*Math.PI/180),g=p.width/M,e.scale(g*s.scaleX,g*s.scaleY),e.translate(M/2,x/2),s.region.rotate&&(v=M,M=x,x=v,e.rotate(-Math.PI/2)),e.scale(1,-1),e.translate(-M/2,-x/2),1==d.r&&1==d.g&&1==d.b&&1==d.a||(e.globalAlpha=d.a),e.drawImage(h,o.x,o.y,M,x,0,0,M,x),this.debugRendering&&e.strokeRect(0,0,M,x),e.restore()))}e.restore()},je.prototype.drawTriangles=function(t){for(var e=null,i=this.vertices,n=null,r=t.drawOrder,s=0,a=r.length;s<a;s++){var o=r[s],h=o.getAttachment(),l=null;if(h instanceof St.RegionAttachment)var u=h,i=this.computeRegionVertices(o,u,!1),n=je.QUAD_TRIANGLES,l=u.region.texture.getImage();else{if(!(h instanceof St.MeshAttachment))continue;var c=h;i=this.computeMeshVertices(o,c,!1),n=c.triangles,l=c.region.renderObject.texture.getImage()}if(null!=l){var f=o.data.blendMode;f!=e&&(e=f);var d=o.bone.skeleton.color,p=o.color,m=h.color,g=d.a*p.a*m.a,v=this.tempColor;v.set(d.r*p.r*m.r,d.g*p.g*m.g,d.b*p.b*m.b,g);var M=this.ctx;1==v.r&&1==v.g&&1==v.b&&1==v.a||(M.globalAlpha=v.a);for(var x=0;x<n.length;x+=3){var y=8*n[x],w=8*n[x+1],T=8*n[x+2],E=i[y],A=i[1+y],b=i[6+y],R=i[7+y],S=i[w],I=i[1+w],C=i[6+w],P=i[7+w],_=i[T],F=i[1+T],L=i[6+T],O=i[7+T];this.drawTriangle(l,E,A,b,R,S,I,C,P,_,F,L,O),this.debugRendering&&(M.strokeStyle="green",M.beginPath(),M.moveTo(E,A),M.lineTo(S,I),M.lineTo(_,F),M.lineTo(E,A),M.stroke())}}}this.ctx.globalAlpha=1},je.prototype.drawTriangle=function(t,e,i,n,r,s,a,o,h,l,u,c,f){var d=this.ctx;n*=t.width,r*=t.height,o*=t.width,h*=t.height,c*=t.width,f*=t.height,d.beginPath(),d.moveTo(e,i),d.lineTo(s,a),d.lineTo(l,u),d.closePath();var p=1/((o-=n)*(f-=r)-(c-=n)*(h-=r)),m=(f*(s-=e)-h*(l-=e))*p,g=(f*(a-=i)-h*(u-=i))*p,v=(o*l-c*s)*p,M=(o*u-c*a)*p,x=e-m*n-v*r,y=i-g*n-M*r;d.save(),d.transform(m,g,v,M,x,y),d.clip(),d.drawImage(t,0,0),d.restore()},je.prototype.computeRegionVertices=function(t,e,i){var n=t.bone.skeleton.color,r=t.color,s=e.color,a=n.a*r.a*s.a,o=i?a:1,h=this.tempColor;h.set(n.r*r.r*s.r*o,n.g*r.g*s.g*o,n.b*r.b*s.b*o,a),e.computeWorldVertices(t.bone,this.vertices,0,je.VERTEX_SIZE);var l=this.vertices,u=e.uvs;return l[St.RegionAttachment.C1R]=h.r,l[St.RegionAttachment.C1G]=h.g,l[St.RegionAttachment.C1B]=h.b,l[St.RegionAttachment.C1A]=h.a,l[St.RegionAttachment.U1]=u[0],l[St.RegionAttachment.V1]=u[1],l[St.RegionAttachment.C2R]=h.r,l[St.RegionAttachment.C2G]=h.g,l[St.RegionAttachment.C2B]=h.b,l[St.RegionAttachment.C2A]=h.a,l[St.RegionAttachment.U2]=u[2],l[St.RegionAttachment.V2]=u[3],l[St.RegionAttachment.C3R]=h.r,l[St.RegionAttachment.C3G]=h.g,l[St.RegionAttachment.C3B]=h.b,l[St.RegionAttachment.C3A]=h.a,l[St.RegionAttachment.U3]=u[4],l[St.RegionAttachment.V3]=u[5],l[St.RegionAttachment.C4R]=h.r,l[St.RegionAttachment.C4G]=h.g,l[St.RegionAttachment.C4B]=h.b,l[St.RegionAttachment.C4A]=h.a,l[St.RegionAttachment.U4]=u[6],l[St.RegionAttachment.V4]=u[7],l},je.prototype.computeMeshVertices=function(t,e,i){var n=t.bone.skeleton.color,r=t.color,s=e.color,a=n.a*r.a*s.a,o=i?a:1,h=this.tempColor;h.set(n.r*r.r*s.r*o,n.g*r.g*s.g*o,n.b*r.b*s.b*o,a);var l=e.worldVerticesLength/2;this.vertices.length<e.worldVerticesLength&&(this.vertices=St.Utils.newFloatArray(e.worldVerticesLength));var u=this.vertices;e.computeWorldVertices(t,0,e.worldVerticesLength,u,0,je.VERTEX_SIZE);for(var c=e.uvs,f=0,d=l,p=0,m=2;f<d;f++)u[m++]=h.r,u[m++]=h.g,u[m++]=h.b,u[m++]=h.a,u[m++]=c[p++],u[m++]=c[p++],m+=2;return u},je.QUAD_TRIANGLES=[0,1,2,2,3,0],je.VERTEX_SIZE=8,Ct=je,It.SkeletonRenderer=Ct,Pt=me=me||{},_t=Pt.webgl||(Pt.webgl={}),Ft=Pt.AssetManager,ve(Ke,Ft),Lt=Ke,_t.AssetManager=Lt,Ot=me=me||{},kt=Ot.webgl||(Ot.webgl={}),Qe.prototype.update=function(){var t=this.projection,e=this.view,i=this.projectionView,n=this.inverseProjectionView,r=this.zoom,s=this.viewportWidth,a=this.viewportHeight;t.ortho(r*(-s/2),r*(s/2),r*(-a/2),r*(a/2),this.near,this.far),e.lookAt(this.position,this.direction,this.up),i.set(t.values),i.multiply(e),n.set(i.values).invert()},Qe.prototype.screenToWorld=function(t,e,i){var n=t.x,r=i-t.y-1,s=this.tmp;return s.x=2*n/e-1,s.y=2*r/i-1,s.z=2*t.z-1,s.project(this.inverseProjectionView),t.set(s.x,s.y,s.z),t},Qe.prototype.setViewport=function(t,e){this.viewportWidth=t,this.viewportHeight=e},Nt=Qe,kt.OrthoCamera=Nt,Dt=me=me||{},Vt=Dt.webgl||(Dt.webgl={}),Bt=Dt.Texture,ve(Ze,Bt),Ze.prototype.setFilters=function(t,e){var i=this.context.gl;this.bind(),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,Ze.validateMagFilter(e))},Ze.validateMagFilter=function(t){switch(t){case Dt.TextureFilter.MipMap:case Dt.TextureFilter.MipMapLinearLinear:case Dt.TextureFilter.MipMapLinearNearest:case Dt.TextureFilter.MipMapNearestLinear:case Dt.TextureFilter.MipMapNearestNearest:return Dt.TextureFilter.Linear;default:return t}},Ze.prototype.setWraps=function(t,e){var i=this.context.gl;this.bind(),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,e)},Ze.prototype.update=function(t){var e=this.context.gl;this.texture||(this.texture=this.context.gl.createTexture()),this.bind(),Ze.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL&&e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,this._image),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR_MIPMAP_LINEAR:e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t&&e.generateMipmap(e.TEXTURE_2D)},Ze.prototype.restore=function(){this.texture=null,this.update(this.useMipMaps)},Ze.prototype.bind=function(t){void 0===t&&(t=0);var e=this.context.gl;this.boundUnit=t,e.activeTexture(e.TEXTURE0+t),e.bindTexture(e.TEXTURE_2D,this.texture)},Ze.prototype.unbind=function(){var t=this.context.gl;t.activeTexture(t.TEXTURE0+this.boundUnit),t.bindTexture(t.TEXTURE_2D,null)},Ze.prototype.dispose=function(){this.context.removeRestorable(this),this.context.gl.deleteTexture(this.texture)},Ze.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL=!1,Yt=Ze,Vt.GLTexture=Yt,function(d){d.M00=0,d.M01=4,d.M02=8,d.M03=12,d.M10=1,d.M11=5,d.M12=9,d.M13=13,d.M20=2,d.M21=6,d.M22=10,d.M23=14,d.M30=3,d.M31=7,d.M32=11,d.M33=15;var t=(o.prototype.set=function(t){return this.values.set(t),this},o.prototype.transpose=function(){var t=this.temp,e=this.values;return t[d.M00]=e[d.M00],t[d.M01]=e[d.M10],t[d.M02]=e[d.M20],t[d.M03]=e[d.M30],t[d.M10]=e[d.M01],t[d.M11]=e[d.M11],t[d.M12]=e[d.M21],t[d.M13]=e[d.M31],t[d.M20]=e[d.M02],t[d.M21]=e[d.M12],t[d.M22]=e[d.M22],t[d.M23]=e[d.M32],t[d.M30]=e[d.M03],t[d.M31]=e[d.M13],t[d.M32]=e[d.M23],t[d.M33]=e[d.M33],this.set(t)},o.prototype.identity=function(){var t=this.values;return t[d.M00]=1,t[d.M01]=0,t[d.M02]=0,t[d.M03]=0,t[d.M10]=0,t[d.M11]=1,t[d.M12]=0,t[d.M13]=0,t[d.M20]=0,t[d.M21]=0,t[d.M22]=1,t[d.M23]=0,t[d.M30]=0,t[d.M31]=0,t[d.M32]=0,t[d.M33]=1,this},o.prototype.invert=function(){var t=this.values,e=this.temp,i=t[d.M30]*t[d.M21]*t[d.M12]*t[d.M03]-t[d.M20]*t[d.M31]*t[d.M12]*t[d.M03]-t[d.M30]*t[d.M11]*t[d.M22]*t[d.M03]+t[d.M10]*t[d.M31]*t[d.M22]*t[d.M03]+t[d.M20]*t[d.M11]*t[d.M32]*t[d.M03]-t[d.M10]*t[d.M21]*t[d.M32]*t[d.M03]-t[d.M30]*t[d.M21]*t[d.M02]*t[d.M13]+t[d.M20]*t[d.M31]*t[d.M02]*t[d.M13]+t[d.M30]*t[d.M01]*t[d.M22]*t[d.M13]-t[d.M00]*t[d.M31]*t[d.M22]*t[d.M13]-t[d.M20]*t[d.M01]*t[d.M32]*t[d.M13]+t[d.M00]*t[d.M21]*t[d.M32]*t[d.M13]+t[d.M30]*t[d.M11]*t[d.M02]*t[d.M23]-t[d.M10]*t[d.M31]*t[d.M02]*t[d.M23]-t[d.M30]*t[d.M01]*t[d.M12]*t[d.M23]+t[d.M00]*t[d.M31]*t[d.M12]*t[d.M23]+t[d.M10]*t[d.M01]*t[d.M32]*t[d.M23]-t[d.M00]*t[d.M11]*t[d.M32]*t[d.M23]-t[d.M20]*t[d.M11]*t[d.M02]*t[d.M33]+t[d.M10]*t[d.M21]*t[d.M02]*t[d.M33]+t[d.M20]*t[d.M01]*t[d.M12]*t[d.M33]-t[d.M00]*t[d.M21]*t[d.M12]*t[d.M33]-t[d.M10]*t[d.M01]*t[d.M22]*t[d.M33]+t[d.M00]*t[d.M11]*t[d.M22]*t[d.M33];if(0==i)throw new Error("non-invertible matrix");var n=1/i;return e[d.M00]=t[d.M12]*t[d.M23]*t[d.M31]-t[d.M13]*t[d.M22]*t[d.M31]+t[d.M13]*t[d.M21]*t[d.M32]-t[d.M11]*t[d.M23]*t[d.M32]-t[d.M12]*t[d.M21]*t[d.M33]+t[d.M11]*t[d.M22]*t[d.M33],e[d.M01]=t[d.M03]*t[d.M22]*t[d.M31]-t[d.M02]*t[d.M23]*t[d.M31]-t[d.M03]*t[d.M21]*t[d.M32]+t[d.M01]*t[d.M23]*t[d.M32]+t[d.M02]*t[d.M21]*t[d.M33]-t[d.M01]*t[d.M22]*t[d.M33],e[d.M02]=t[d.M02]*t[d.M13]*t[d.M31]-t[d.M03]*t[d.M12]*t[d.M31]+t[d.M03]*t[d.M11]*t[d.M32]-t[d.M01]*t[d.M13]*t[d.M32]-t[d.M02]*t[d.M11]*t[d.M33]+t[d.M01]*t[d.M12]*t[d.M33],e[d.M03]=t[d.M03]*t[d.M12]*t[d.M21]-t[d.M02]*t[d.M13]*t[d.M21]-t[d.M03]*t[d.M11]*t[d.M22]+t[d.M01]*t[d.M13]*t[d.M22]+t[d.M02]*t[d.M11]*t[d.M23]-t[d.M01]*t[d.M12]*t[d.M23],e[d.M10]=t[d.M13]*t[d.M22]*t[d.M30]-t[d.M12]*t[d.M23]*t[d.M30]-t[d.M13]*t[d.M20]*t[d.M32]+t[d.M10]*t[d.M23]*t[d.M32]+t[d.M12]*t[d.M20]*t[d.M33]-t[d.M10]*t[d.M22]*t[d.M33],e[d.M11]=t[d.M02]*t[d.M23]*t[d.M30]-t[d.M03]*t[d.M22]*t[d.M30]+t[d.M03]*t[d.M20]*t[d.M32]-t[d.M00]*t[d.M23]*t[d.M32]-t[d.M02]*t[d.M20]*t[d.M33]+t[d.M00]*t[d.M22]*t[d.M33],e[d.M12]=t[d.M03]*t[d.M12]*t[d.M30]-t[d.M02]*t[d.M13]*t[d.M30]-t[d.M03]*t[d.M10]*t[d.M32]+t[d.M00]*t[d.M13]*t[d.M32]+t[d.M02]*t[d.M10]*t[d.M33]-t[d.M00]*t[d.M12]*t[d.M33],e[d.M13]=t[d.M02]*t[d.M13]*t[d.M20]-t[d.M03]*t[d.M12]*t[d.M20]+t[d.M03]*t[d.M10]*t[d.M22]-t[d.M00]*t[d.M13]*t[d.M22]-t[d.M02]*t[d.M10]*t[d.M23]+t[d.M00]*t[d.M12]*t[d.M23],e[d.M20]=t[d.M11]*t[d.M23]*t[d.M30]-t[d.M13]*t[d.M21]*t[d.M30]+t[d.M13]*t[d.M20]*t[d.M31]-t[d.M10]*t[d.M23]*t[d.M31]-t[d.M11]*t[d.M20]*t[d.M33]+t[d.M10]*t[d.M21]*t[d.M33],e[d.M21]=t[d.M03]*t[d.M21]*t[d.M30]-t[d.M01]*t[d.M23]*t[d.M30]-t[d.M03]*t[d.M20]*t[d.M31]+t[d.M00]*t[d.M23]*t[d.M31]+t[d.M01]*t[d.M20]*t[d.M33]-t[d.M00]*t[d.M21]*t[d.M33],e[d.M22]=t[d.M01]*t[d.M13]*t[d.M30]-t[d.M03]*t[d.M11]*t[d.M30]+t[d.M03]*t[d.M10]*t[d.M31]-t[d.M00]*t[d.M13]*t[d.M31]-t[d.M01]*t[d.M10]*t[d.M33]+t[d.M00]*t[d.M11]*t[d.M33],e[d.M23]=t[d.M03]*t[d.M11]*t[d.M20]-t[d.M01]*t[d.M13]*t[d.M20]-t[d.M03]*t[d.M10]*t[d.M21]+t[d.M00]*t[d.M13]*t[d.M21]+t[d.M01]*t[d.M10]*t[d.M23]-t[d.M00]*t[d.M11]*t[d.M23],e[d.M30]=t[d.M12]*t[d.M21]*t[d.M30]-t[d.M11]*t[d.M22]*t[d.M30]-t[d.M12]*t[d.M20]*t[d.M31]+t[d.M10]*t[d.M22]*t[d.M31]+t[d.M11]*t[d.M20]*t[d.M32]-t[d.M10]*t[d.M21]*t[d.M32],e[d.M31]=t[d.M01]*t[d.M22]*t[d.M30]-t[d.M02]*t[d.M21]*t[d.M30]+t[d.M02]*t[d.M20]*t[d.M31]-t[d.M00]*t[d.M22]*t[d.M31]-t[d.M01]*t[d.M20]*t[d.M32]+t[d.M00]*t[d.M21]*t[d.M32],e[d.M32]=t[d.M02]*t[d.M11]*t[d.M30]-t[d.M01]*t[d.M12]*t[d.M30]-t[d.M02]*t[d.M10]*t[d.M31]+t[d.M00]*t[d.M12]*t[d.M31]+t[d.M01]*t[d.M10]*t[d.M32]-t[d.M00]*t[d.M11]*t[d.M32],e[d.M33]=t[d.M01]*t[d.M12]*t[d.M20]-t[d.M02]*t[d.M11]*t[d.M20]+t[d.M02]*t[d.M10]*t[d.M21]-t[d.M00]*t[d.M12]*t[d.M21]-t[d.M01]*t[d.M10]*t[d.M22]+t[d.M00]*t[d.M11]*t[d.M22],t[d.M00]=e[d.M00]*n,t[d.M01]=e[d.M01]*n,t[d.M02]=e[d.M02]*n,t[d.M03]=e[d.M03]*n,t[d.M10]=e[d.M10]*n,t[d.M11]=e[d.M11]*n,t[d.M12]=e[d.M12]*n,t[d.M13]=e[d.M13]*n,t[d.M20]=e[d.M20]*n,t[d.M21]=e[d.M21]*n,t[d.M22]=e[d.M22]*n,t[d.M23]=e[d.M23]*n,t[d.M30]=e[d.M30]*n,t[d.M31]=e[d.M31]*n,t[d.M32]=e[d.M32]*n,t[d.M33]=e[d.M33]*n,this},o.prototype.determinant=function(){var t=this.values;return t[d.M30]*t[d.M21]*t[d.M12]*t[d.M03]-t[d.M20]*t[d.M31]*t[d.M12]*t[d.M03]-t[d.M30]*t[d.M11]*t[d.M22]*t[d.M03]+t[d.M10]*t[d.M31]*t[d.M22]*t[d.M03]+t[d.M20]*t[d.M11]*t[d.M32]*t[d.M03]-t[d.M10]*t[d.M21]*t[d.M32]*t[d.M03]-t[d.M30]*t[d.M21]*t[d.M02]*t[d.M13]+t[d.M20]*t[d.M31]*t[d.M02]*t[d.M13]+t[d.M30]*t[d.M01]*t[d.M22]*t[d.M13]-t[d.M00]*t[d.M31]*t[d.M22]*t[d.M13]-t[d.M20]*t[d.M01]*t[d.M32]*t[d.M13]+t[d.M00]*t[d.M21]*t[d.M32]*t[d.M13]+t[d.M30]*t[d.M11]*t[d.M02]*t[d.M23]-t[d.M10]*t[d.M31]*t[d.M02]*t[d.M23]-t[d.M30]*t[d.M01]*t[d.M12]*t[d.M23]+t[d.M00]*t[d.M31]*t[d.M12]*t[d.M23]+t[d.M10]*t[d.M01]*t[d.M32]*t[d.M23]-t[d.M00]*t[d.M11]*t[d.M32]*t[d.M23]-t[d.M20]*t[d.M11]*t[d.M02]*t[d.M33]+t[d.M10]*t[d.M21]*t[d.M02]*t[d.M33]+t[d.M20]*t[d.M01]*t[d.M12]*t[d.M33]-t[d.M00]*t[d.M21]*t[d.M12]*t[d.M33]-t[d.M10]*t[d.M01]*t[d.M22]*t[d.M33]+t[d.M00]*t[d.M11]*t[d.M22]*t[d.M33]},o.prototype.translate=function(t,e,i){var n=this.values;return n[d.M03]+=t,n[d.M13]+=e,n[d.M23]+=i,this},o.prototype.copy=function(){return(new o).set(this.values)},o.prototype.projection=function(t,e,i,n){this.identity();var r=1/Math.tan(i*(Math.PI/180)/2),s=(e+t)/(t-e),a=2*e*t/(t-e),o=this.values;return o[d.M00]=r/n,o[d.M10]=0,o[d.M20]=0,o[d.M30]=0,o[d.M01]=0,o[d.M11]=r,o[d.M21]=0,o[d.M31]=0,o[d.M02]=0,o[d.M12]=0,o[d.M22]=s,o[d.M32]=-1,o[d.M03]=0,o[d.M13]=0,o[d.M23]=a,o[d.M33]=0,this},o.prototype.ortho2d=function(t,e,i,n){return this.ortho(t,t+i,e,e+n,0,1)},o.prototype.ortho=function(t,e,i,n,r,s){this.identity();var a=2/(e-t),o=2/(n-i),h=-2/(s-r),l=-(e+t)/(e-t),u=-(n+i)/(n-i),c=-(s+r)/(s-r),f=this.values;return f[d.M00]=a,f[d.M10]=0,f[d.M20]=0,f[d.M30]=0,f[d.M01]=0,f[d.M11]=o,f[d.M21]=0,f[d.M31]=0,f[d.M02]=0,f[d.M12]=0,f[d.M22]=h,f[d.M32]=0,f[d.M03]=l,f[d.M13]=u,f[d.M23]=c,f[d.M33]=1,this},o.prototype.multiply=function(t){var e=this.temp,i=this.values,n=t.values;return e[d.M00]=i[d.M00]*n[d.M00]+i[d.M01]*n[d.M10]+i[d.M02]*n[d.M20]+i[d.M03]*n[d.M30],e[d.M01]=i[d.M00]*n[d.M01]+i[d.M01]*n[d.M11]+i[d.M02]*n[d.M21]+i[d.M03]*n[d.M31],e[d.M02]=i[d.M00]*n[d.M02]+i[d.M01]*n[d.M12]+i[d.M02]*n[d.M22]+i[d.M03]*n[d.M32],e[d.M03]=i[d.M00]*n[d.M03]+i[d.M01]*n[d.M13]+i[d.M02]*n[d.M23]+i[d.M03]*n[d.M33],e[d.M10]=i[d.M10]*n[d.M00]+i[d.M11]*n[d.M10]+i[d.M12]*n[d.M20]+i[d.M13]*n[d.M30],e[d.M11]=i[d.M10]*n[d.M01]+i[d.M11]*n[d.M11]+i[d.M12]*n[d.M21]+i[d.M13]*n[d.M31],e[d.M12]=i[d.M10]*n[d.M02]+i[d.M11]*n[d.M12]+i[d.M12]*n[d.M22]+i[d.M13]*n[d.M32],e[d.M13]=i[d.M10]*n[d.M03]+i[d.M11]*n[d.M13]+i[d.M12]*n[d.M23]+i[d.M13]*n[d.M33],e[d.M20]=i[d.M20]*n[d.M00]+i[d.M21]*n[d.M10]+i[d.M22]*n[d.M20]+i[d.M23]*n[d.M30],e[d.M21]=i[d.M20]*n[d.M01]+i[d.M21]*n[d.M11]+i[d.M22]*n[d.M21]+i[d.M23]*n[d.M31],e[d.M22]=i[d.M20]*n[d.M02]+i[d.M21]*n[d.M12]+i[d.M22]*n[d.M22]+i[d.M23]*n[d.M32],e[d.M23]=i[d.M20]*n[d.M03]+i[d.M21]*n[d.M13]+i[d.M22]*n[d.M23]+i[d.M23]*n[d.M33],e[d.M30]=i[d.M30]*n[d.M00]+i[d.M31]*n[d.M10]+i[d.M32]*n[d.M20]+i[d.M33]*n[d.M30],e[d.M31]=i[d.M30]*n[d.M01]+i[d.M31]*n[d.M11]+i[d.M32]*n[d.M21]+i[d.M33]*n[d.M31],e[d.M32]=i[d.M30]*n[d.M02]+i[d.M31]*n[d.M12]+i[d.M32]*n[d.M22]+i[d.M33]*n[d.M32],e[d.M33]=i[d.M30]*n[d.M03]+i[d.M31]*n[d.M13]+i[d.M32]*n[d.M23]+i[d.M33]*n[d.M33],this.set(this.temp)},o.prototype.multiplyLeft=function(t){var e=this.temp,i=this.values,n=t.values;return e[d.M00]=n[d.M00]*i[d.M00]+n[d.M01]*i[d.M10]+n[d.M02]*i[d.M20]+n[d.M03]*i[d.M30],e[d.M01]=n[d.M00]*i[d.M01]+n[d.M01]*i[d.M11]+n[d.M02]*i[d.M21]+n[d.M03]*i[d.M31],e[d.M02]=n[d.M00]*i[d.M02]+n[d.M01]*i[d.M12]+n[d.M02]*i[d.M22]+n[d.M03]*i[d.M32],e[d.M03]=n[d.M00]*i[d.M03]+n[d.M01]*i[d.M13]+n[d.M02]*i[d.M23]+n[d.M03]*i[d.M33],e[d.M10]=n[d.M10]*i[d.M00]+n[d.M11]*i[d.M10]+n[d.M12]*i[d.M20]+n[d.M13]*i[d.M30],e[d.M11]=n[d.M10]*i[d.M01]+n[d.M11]*i[d.M11]+n[d.M12]*i[d.M21]+n[d.M13]*i[d.M31],e[d.M12]=n[d.M10]*i[d.M02]+n[d.M11]*i[d.M12]+n[d.M12]*i[d.M22]+n[d.M13]*i[d.M32],e[d.M13]=n[d.M10]*i[d.M03]+n[d.M11]*i[d.M13]+n[d.M12]*i[d.M23]+n[d.M13]*i[d.M33],e[d.M20]=n[d.M20]*i[d.M00]+n[d.M21]*i[d.M10]+n[d.M22]*i[d.M20]+n[d.M23]*i[d.M30],e[d.M21]=n[d.M20]*i[d.M01]+n[d.M21]*i[d.M11]+n[d.M22]*i[d.M21]+n[d.M23]*i[d.M31],e[d.M22]=n[d.M20]*i[d.M02]+n[d.M21]*i[d.M12]+n[d.M22]*i[d.M22]+n[d.M23]*i[d.M32],e[d.M23]=n[d.M20]*i[d.M03]+n[d.M21]*i[d.M13]+n[d.M22]*i[d.M23]+n[d.M23]*i[d.M33],e[d.M30]=n[d.M30]*i[d.M00]+n[d.M31]*i[d.M10]+n[d.M32]*i[d.M20]+n[d.M33]*i[d.M30],e[d.M31]=n[d.M30]*i[d.M01]+n[d.M31]*i[d.M11]+n[d.M32]*i[d.M21]+n[d.M33]*i[d.M31],e[d.M32]=n[d.M30]*i[d.M02]+n[d.M31]*i[d.M12]+n[d.M32]*i[d.M22]+n[d.M33]*i[d.M32],e[d.M33]=n[d.M30]*i[d.M03]+n[d.M31]*i[d.M13]+n[d.M32]*i[d.M23]+n[d.M33]*i[d.M33],this.set(this.temp)},o.prototype.lookAt=function(t,e,i){o.initTemps();var n=o.xAxis,r=o.yAxis,s=o.zAxis;s.setFrom(e).normalize(),n.setFrom(e).normalize(),n.cross(i).normalize(),r.setFrom(n).cross(s).normalize(),this.identity();var a=this.values;return a[d.M00]=n.x,a[d.M01]=n.y,a[d.M02]=n.z,a[d.M10]=r.x,a[d.M11]=r.y,a[d.M12]=r.z,a[d.M20]=-s.x,a[d.M21]=-s.y,a[d.M22]=-s.z,o.tmpMatrix.identity(),o.tmpMatrix.values[d.M03]=-t.x,o.tmpMatrix.values[d.M13]=-t.y,o.tmpMatrix.values[d.M23]=-t.z,this.multiply(o.tmpMatrix),this},o.initTemps=function(){null===o.xAxis&&(o.xAxis=new d.Vector3),null===o.yAxis&&(o.yAxis=new d.Vector3),null===o.zAxis&&(o.zAxis=new d.Vector3)},o.xAxis=null,o.yAxis=null,o.zAxis=null,o.tmpMatrix=new o,o);function o(){this.temp=new Float32Array(16),this.values=new Float32Array(16);var t=this.values;t[d.M00]=1,t[d.M11]=1,t[d.M22]=1,t[d.M33]=1}d.Matrix4=t}((Ut=me=me||{}).webgl||(Ut.webgl={})),function(s){var t=(e.prototype.getAttributes=function(){return this.attributes},e.prototype.maxVertices=function(){return this.vertices.length/this.elementsPerVertex},e.prototype.numVertices=function(){return this.verticesLength/this.elementsPerVertex},e.prototype.setVerticesLength=function(t){this.dirtyVertices=!0,this.verticesLength=t},e.prototype.getVertices=function(){return this.vertices},e.prototype.maxIndices=function(){return this.indices.length},e.prototype.numIndices=function(){return this.indicesLength},e.prototype.setIndicesLength=function(t){this.dirtyIndices=!0,this.indicesLength=t},e.prototype.getIndices=function(){return this.indices},e.prototype.getVertexSizeInFloats=function(){for(var t=0,e=0;e<this.attributes.length;e++)t+=this.attributes[e].numElements;return t},e.prototype.setVertices=function(t){if(this.dirtyVertices=!0,t.length>this.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,0<this.indicesLength?this.indicesLength:this.verticesLength/this.elementsPerVertex)},e.prototype.drawWithOffset=function(t,e,i,n){var r=this.context.gl;(this.dirtyVertices||this.dirtyIndices)&&this.update(),this.bind(t),0<this.indicesLength?r.drawElements(e,n,r.UNSIGNED_SHORT,2*i):r.drawArrays(e,i,n),this.unbind(t)},e.prototype.bind=function(t){var e=this.context.gl;e.bindBuffer(e.ARRAY_BUFFER,this.verticesBuffer);for(var i=0,n=0;n<this.attributes.length;n++){var r=this.attributes[n],s=t.getAttributeLocation(r.name);e.enableVertexAttribArray(s),e.vertexAttribPointer(s,r.numElements,e.FLOAT,!1,4*this.elementsPerVertex,4*i),i+=r.numElements}0<this.indicesLength&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indicesBuffer)},e.prototype.unbind=function(t){for(var e=this.context.gl,i=0;i<this.attributes.length;i++){var n=this.attributes[i],r=t.getAttributeLocation(n.name);e.disableVertexAttribArray(r)}e.bindBuffer(e.ARRAY_BUFFER,null),0<this.indicesLength&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null)},e.prototype.update=function(){var t=this.context.gl;this.dirtyVertices&&(this.verticesBuffer||(this.verticesBuffer=t.createBuffer()),t.bindBuffer(t.ARRAY_BUFFER,this.verticesBuffer),t.bufferData(t.ARRAY_BUFFER,this.vertices.subarray(0,this.verticesLength),t.DYNAMIC_DRAW),this.dirtyVertices=!1),this.dirtyIndices&&(this.indicesBuffer||(this.indicesBuffer=t.createBuffer()),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,this.indices.subarray(0,this.indicesLength),t.DYNAMIC_DRAW),this.dirtyIndices=!1)},e.prototype.restore=function(){this.verticesBuffer=null,this.indicesBuffer=null,this.update()},e.prototype.dispose=function(){this.context.removeRestorable(this);var t=this.context.gl;t.deleteBuffer(this.verticesBuffer),t.deleteBuffer(this.indicesBuffer)},e);function e(t,e,i,n){this.attributes=e,this.verticesLength=0,this.dirtyVertices=!1,this.indicesLength=0,this.dirtyIndices=!1,this.elementsPerVertex=0,this.context=t instanceof s.ManagedWebGLRenderingContext?t:new s.ManagedWebGLRenderingContext(t);for(var r=this.elementsPerVertex=0;r<e.length;r++)this.elementsPerVertex+=e[r].numElements;this.vertices=new Float32Array(i*this.elementsPerVertex),this.indices=new Uint16Array(n),this.context.addRestorable(this)}s.Mesh=t;function i(t,e,i){this.name=t,this.type=e,this.numElements=i}s.VertexAttribute=i;var n,r=(ve(a,n=i),a);function a(){return n.call(this,s.Shader.POSITION,v.Float,2)||this}s.Position2Attribute=r;var o,h=(ve(l,o=i),l);function l(){return o.call(this,s.Shader.POSITION,v.Float,3)||this}s.Position3Attribute=h;var u,c=(ve(f,u=i),f);function f(t){return void 0===t&&(t=0),u.call(this,s.Shader.TEXCOORDS+(0==t?"":t),v.Float,2)||this}s.TexCoordAttribute=c;var d,p=(ve(m,d=i),m);function m(){return d.call(this,s.Shader.COLOR,v.Float,4)||this}s.ColorAttribute=p;var g,v,M,x=(ve(y,g=i),y);function y(){return g.call(this,s.Shader.COLOR2,v.Float,4)||this}s.Color2Attribute=x,(M=v=s.VertexAttributeType||(s.VertexAttributeType={}))[M.Float=0]="Float"}((Xt=me=me||{}).webgl||(Xt.webgl={})),zt=me=me||{},Wt=zt.webgl||(zt.webgl={}),Je.prototype.begin=function(t){var e=this.context.gl;if(this.isDrawing)throw new Error("PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()");this.drawCalls=0,this.shader=t,this.lastTexture=null,this.isDrawing=!0,e.enable(e.BLEND),e.blendFunc(this.srcBlend,this.dstBlend)},Je.prototype.setBlendMode=function(t,e){var i=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),i.blendFunc(this.srcBlend,this.dstBlend))},Je.prototype.draw=function(t,e,i){t!=this.lastTexture?(this.flush(),this.lastTexture=t):(this.verticesLength+e.length>this.mesh.getVertices().length||this.indicesLength+i.length>this.mesh.getIndices().length)&&this.flush();var n=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,a=0;a<i.length;s++,a++)r[s]=i[a]+n;this.indicesLength+=i.length,this.mesh.setIndicesLength(this.indicesLength)},Je.prototype.flush=function(){var t=this.context.gl;0!=this.verticesLength&&(this.lastTexture.bind(),this.mesh.draw(this.shader,t.TRIANGLES),this.verticesLength=0,this.indicesLength=0,this.mesh.setVerticesLength(0),this.mesh.setIndicesLength(0),this.drawCalls++)},Je.prototype.end=function(){var t=this.context.gl;if(!this.isDrawing)throw new Error("PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()");(0<this.verticesLength||0<this.indicesLength)&&this.flush(),this.shader=null,this.lastTexture=null,this.isDrawing=!1,t.disable(t.BLEND)},Je.prototype.getDrawCalls=function(){return this.drawCalls},Je.prototype.dispose=function(){this.mesh.dispose()},Gt=Je,Wt.PolygonBatcher=Gt,Ht=me=me||{},qt=Ht.webgl||(Ht.webgl={}),$e.prototype.begin=function(){this.camera.update(),this.enableRenderer(this.batcher)},$e.prototype.drawSkeleton=function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=-1),void 0===n&&(n=-1),this.enableRenderer(this.batcher),this.skeletonRenderer.premultipliedAlpha=e,this.skeletonRenderer.draw(this.batcher,t,i,n)},$e.prototype.drawSkeletonDebug=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=null),this.enableRenderer(this.shapes),this.skeletonDebugRenderer.premultipliedAlpha=e,this.skeletonDebugRenderer.draw(this.shapes,t,i)},$e.prototype.drawTexture=function(t,e,i,n,r,s){void 0===s&&(s=null),this.enableRenderer(this.batcher),null===s&&(s=this.WHITE);var a=this.QUAD,o=0;a[o++]=e,a[o++]=i,a[o++]=s.r,a[o++]=s.g,a[o++]=s.b,a[o++]=s.a,a[o++]=0,a[o++]=1,this.twoColorTint&&(a[o++]=0,a[o++]=0,a[o++]=0,a[o++]=0),a[o++]=e+n,a[o++]=i,a[o++]=s.r,a[o++]=s.g,a[o++]=s.b,a[o++]=s.a,a[o++]=1,a[o++]=1,this.twoColorTint&&(a[o++]=0,a[o++]=0,a[o++]=0,a[o++]=0),a[o++]=e+n,a[o++]=i+r,a[o++]=s.r,a[o++]=s.g,a[o++]=s.b,a[o++]=s.a,a[o++]=1,a[o++]=0,this.twoColorTint&&(a[o++]=0,a[o++]=0,a[o++]=0,a[o++]=0),a[o++]=e,a[o++]=i+r,a[o++]=s.r,a[o++]=s.g,a[o++]=s.b,a[o++]=s.a,a[o++]=0,a[o++]=0,this.twoColorTint&&(a[o++]=0,a[o++]=0,a[o++]=0,a[o++]=0),this.batcher.draw(t,a,this.QUAD_TRIANGLES)},$e.prototype.drawTextureUV=function(t,e,i,n,r,s,a,o,h,l){void 0===l&&(l=null),this.enableRenderer(this.batcher),null===l&&(l=this.WHITE);var u=this.QUAD,c=0;u[c++]=e,u[c++]=i,u[c++]=l.r,u[c++]=l.g,u[c++]=l.b,u[c++]=l.a,u[c++]=s,u[c++]=a,this.twoColorTint&&(u[c++]=0,u[c++]=0,u[c++]=0,u[c++]=0),u[c++]=e+n,u[c++]=i,u[c++]=l.r,u[c++]=l.g,u[c++]=l.b,u[c++]=l.a,u[c++]=o,u[c++]=a,this.twoColorTint&&(u[c++]=0,u[c++]=0,u[c++]=0,u[c++]=0),u[c++]=e+n,u[c++]=i+r,u[c++]=l.r,u[c++]=l.g,u[c++]=l.b,u[c++]=l.a,u[c++]=o,u[c++]=h,this.twoColorTint&&(u[c++]=0,u[c++]=0,u[c++]=0,u[c++]=0),u[c++]=e,u[c++]=i+r,u[c++]=l.r,u[c++]=l.g,u[c++]=l.b,u[c++]=l.a,u[c++]=s,u[c++]=h,this.twoColorTint&&(u[c++]=0,u[c++]=0,u[c++]=0,u[c++]=0),this.batcher.draw(t,u,this.QUAD_TRIANGLES)},$e.prototype.drawTextureRotated=function(t,e,i,n,r,s,a,o,h,l){void 0===h&&(h=null),void 0===l&&(l=!1),this.enableRenderer(this.batcher),null===h&&(h=this.WHITE);var u,c,f=this.QUAD,d=e+s,p=i+a,m=-s,g=-a,v=n-s,M=r-a,x=m,y=g,w=m,T=M,E=v,A=M,b=v,R=g,S=0,I=0,C=0,P=0,_=0,F=0,L=0,O=0;P=0!=o?(C=(_=(u=Ht.MathUtils.cosDeg(o))*E-(c=Ht.MathUtils.sinDeg(o))*A)+((S=u*x-c*y)-(L=u*w-c*T)),(F=c*E+u*A)+((I=c*x+u*y)-(O=c*w+u*T))):(S=x,I=y,L=w,O=T,_=E,F=A,C=b,R),S+=d,I+=p,C+=d,P+=p,_+=d,F+=p,L+=d,O+=p;var k=0;f[k++]=S,f[k++]=I,f[k++]=h.r,f[k++]=h.g,f[k++]=h.b,f[k++]=h.a,f[k++]=0,f[k++]=1,this.twoColorTint&&(f[k++]=0,f[k++]=0,f[k++]=0,f[k++]=0),f[k++]=C,f[k++]=P,f[k++]=h.r,f[k++]=h.g,f[k++]=h.b,f[k++]=h.a,f[k++]=1,f[k++]=1,this.twoColorTint&&(f[k++]=0,f[k++]=0,f[k++]=0,f[k++]=0),f[k++]=_,f[k++]=F,f[k++]=h.r,f[k++]=h.g,f[k++]=h.b,f[k++]=h.a,f[k++]=1,f[k++]=0,this.twoColorTint&&(f[k++]=0,f[k++]=0,f[k++]=0,f[k++]=0),f[k++]=L,f[k++]=O,f[k++]=h.r,f[k++]=h.g,f[k++]=h.b,f[k++]=h.a,f[k++]=0,f[k++]=0,this.twoColorTint&&(f[k++]=0,f[k++]=0,f[k++]=0,f[k++]=0),this.batcher.draw(t,f,this.QUAD_TRIANGLES)},$e.prototype.drawRegion=function(t,e,i,n,r,s,a){void 0===s&&(s=null),void 0===a&&(a=!1),this.enableRenderer(this.batcher),null===s&&(s=this.WHITE);var o=this.QUAD,h=0;o[h++]=e,o[h++]=i,o[h++]=s.r,o[h++]=s.g,o[h++]=s.b,o[h++]=s.a,o[h++]=t.u,o[h++]=t.v2,this.twoColorTint&&(o[h++]=0,o[h++]=0,o[h++]=0,o[h++]=0),o[h++]=e+n,o[h++]=i,o[h++]=s.r,o[h++]=s.g,o[h++]=s.b,o[h++]=s.a,o[h++]=t.u2,o[h++]=t.v2,this.twoColorTint&&(o[h++]=0,o[h++]=0,o[h++]=0,o[h++]=0),o[h++]=e+n,o[h++]=i+r,o[h++]=s.r,o[h++]=s.g,o[h++]=s.b,o[h++]=s.a,o[h++]=t.u2,o[h++]=t.v,this.twoColorTint&&(o[h++]=0,o[h++]=0,o[h++]=0,o[h++]=0),o[h++]=e,o[h++]=i+r,o[h++]=s.r,o[h++]=s.g,o[h++]=s.b,o[h++]=s.a,o[h++]=t.u,o[h++]=t.v,this.twoColorTint&&(o[h++]=0,o[h++]=0,o[h++]=0,o[h++]=0),this.batcher.draw(t.texture,o,this.QUAD_TRIANGLES)},$e.prototype.line=function(t,e,i,n,r,s){void 0===r&&(r=null),void 0===s&&(s=null),this.enableRenderer(this.shapes),this.shapes.line(t,e,i,n,r)},$e.prototype.triangle=function(t,e,i,n,r,s,a,o,h,l){void 0===o&&(o=null),void 0===h&&(h=null),void 0===l&&(l=null),this.enableRenderer(this.shapes),this.shapes.triangle(t,e,i,n,r,s,a,o,h,l)},$e.prototype.quad=function(t,e,i,n,r,s,a,o,h,l,u,c,f){void 0===l&&(l=null),void 0===u&&(u=null),void 0===c&&(c=null),void 0===f&&(f=null),this.enableRenderer(this.shapes),this.shapes.quad(t,e,i,n,r,s,a,o,h,l,u,c,f)},$e.prototype.rect=function(t,e,i,n,r,s){void 0===s&&(s=null),this.enableRenderer(this.shapes),this.shapes.rect(t,e,i,n,r,s)},$e.prototype.rectLine=function(t,e,i,n,r,s,a){void 0===a&&(a=null),this.enableRenderer(this.shapes),this.shapes.rectLine(t,e,i,n,r,s,a)},$e.prototype.polygon=function(t,e,i,n){void 0===n&&(n=null),this.enableRenderer(this.shapes),this.shapes.polygon(t,e,i,n)},$e.prototype.circle=function(t,e,i,n,r,s){void 0===r&&(r=null),void 0===s&&(s=0),this.enableRenderer(this.shapes),this.shapes.circle(t,e,i,n,r,s)},$e.prototype.curve=function(t,e,i,n,r,s,a,o,h,l){void 0===l&&(l=null),this.enableRenderer(this.shapes),this.shapes.curve(t,e,i,n,r,s,a,o,h,l)},$e.prototype.end=function(){this.activeRenderer===this.batcher?this.batcher.end():this.activeRenderer===this.shapes&&this.shapes.end(),this.activeRenderer=null},$e.prototype.resize=function(t){var e,i,n,r,s,a=this.canvas,o=a.clientWidth,h=a.clientHeight;a.width==o&&a.height==h||(a.width=o,a.height=h),this.context.gl.viewport(0,0,a.width,a.height),t===jt.Stretch||(t===jt.Expand?this.camera.setViewport(o,h):t===jt.Fit&&(e=a.width,i=a.height,n=this.camera.viewportWidth,s=(r=this.camera.viewportHeight)/n<i/e?n/e:r/i,this.camera.viewportWidth=e*s,this.camera.viewportHeight=i*s)),this.camera.update()},$e.prototype.enableRenderer=function(t){this.activeRenderer!==t&&(this.end(),t instanceof qt.PolygonBatcher?(this.batcherShader.bind(),this.batcherShader.setUniform4x4f(qt.Shader.MVP_MATRIX,this.camera.projectionView.values),this.batcherShader.setUniformi("u_texture",0),this.batcher.begin(this.batcherShader),this.activeRenderer=this.batcher):t instanceof qt.ShapeRenderer?(this.shapesShader.bind(),this.shapesShader.setUniform4x4f(qt.Shader.MVP_MATRIX,this.camera.projectionView.values),this.shapes.begin(this.shapesShader),this.activeRenderer=this.shapes):this.activeRenderer=this.skeletonDebugRenderer)},$e.prototype.dispose=function(){this.batcher.dispose(),this.batcherShader.dispose(),this.shapes.dispose(),this.shapesShader.dispose(),this.skeletonDebugRenderer.dispose()},Qt=$e,qt.SceneRenderer=Qt,(Kt=jt=qt.ResizeMode||(qt.ResizeMode={}))[Kt.Stretch=0]="Stretch",Kt[Kt.Expand=1]="Expand",Kt[Kt.Fit=2]="Fit",Zt=me=me||{},Jt=Zt.webgl||(Zt.webgl={}),ti.prototype.getProgram=function(){return this.program},ti.prototype.getVertexShader=function(){return this.vertexShader},ti.prototype.getFragmentShader=function(){return this.fragmentShader},ti.prototype.getVertexShaderSource=function(){return this.vsSource},ti.prototype.getFragmentSource=function(){return this.fsSource},ti.prototype.compile=function(){var t=this.context.gl;try{this.vs=this.compileShader(t.VERTEX_SHADER,this.vertexShader),this.fs=this.compileShader(t.FRAGMENT_SHADER,this.fragmentShader),this.program=this.compileProgram(this.vs,this.fs)}catch(t){throw this.dispose(),t}},ti.prototype.compileShader=function(t,e){var i=this.context.gl,n=i.createShader(t);if(i.shaderSource(n,e),i.compileShader(n),!i.getShaderParameter(n,i.COMPILE_STATUS)){var r="Couldn't compile shader: "+i.getShaderInfoLog(n);if(i.deleteShader(n),!i.isContextLost())throw new Error(r)}return n},ti.prototype.compileProgram=function(t,e){var i=this.context.gl,n=i.createProgram();if(i.attachShader(n,t),i.attachShader(n,e),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS)){var r="Couldn't compile shader program: "+i.getProgramInfoLog(n);if(i.deleteProgram(n),!i.isContextLost())throw new Error(r)}return n},ti.prototype.restore=function(){this.compile()},ti.prototype.bind=function(){this.context.gl.useProgram(this.program)},ti.prototype.unbind=function(){this.context.gl.useProgram(null)},ti.prototype.setUniformi=function(t,e){this.context.gl.uniform1i(this.getUniformLocation(t),e)},ti.prototype.setUniformf=function(t,e){this.context.gl.uniform1f(this.getUniformLocation(t),e)},ti.prototype.setUniform2f=function(t,e,i){this.context.gl.uniform2f(this.getUniformLocation(t),e,i)},ti.prototype.setUniform3f=function(t,e,i,n){this.context.gl.uniform3f(this.getUniformLocation(t),e,i,n)},ti.prototype.setUniform4f=function(t,e,i,n,r){this.context.gl.uniform4f(this.getUniformLocation(t),e,i,n,r)},ti.prototype.setUniform2x2f=function(t,e){var i=this.context.gl;this.tmp2x2.set(e),i.uniformMatrix2fv(this.getUniformLocation(t),!1,this.tmp2x2)},ti.prototype.setUniform3x3f=function(t,e){var i=this.context.gl;this.tmp3x3.set(e),i.uniformMatrix3fv(this.getUniformLocation(t),!1,this.tmp3x3)},ti.prototype.setUniform4x4f=function(t,e){var i=this.context.gl;this.tmp4x4.set(e),i.uniformMatrix4fv(this.getUniformLocation(t),!1,this.tmp4x4)},ti.prototype.getUniformLocation=function(t){var e=this.context.gl,i=e.getUniformLocation(this.program,t);if(!i&&!e.isContextLost())throw new Error("Couldn't find location for uniform "+t);return i},ti.prototype.getAttributeLocation=function(t){var e=this.context.gl,i=e.getAttribLocation(this.program,t);if(-1==i&&!e.isContextLost())throw new Error("Couldn't find location for attribute "+t);return i},ti.prototype.dispose=function(){this.context.removeRestorable(this);var t=this.context.gl;this.vs&&(t.deleteShader(this.vs),this.vs=null),this.fs&&(t.deleteShader(this.fs),this.fs=null),this.program&&(t.deleteProgram(this.program),this.program=null)},ti.newColoredTextured=function(t){return new ti(t,"\n\t\t\t\tattribute vec4 "+ti.POSITION+";\n\t\t\t\tattribute vec4 "+ti.COLOR+";\n\t\t\t\tattribute vec2 "+ti.TEXCOORDS+";\n\t\t\t\tuniform mat4 "+ti.MVP_MATRIX+";\n\t\t\t\tvarying vec4 v_color;\n\t\t\t\tvarying vec2 v_texCoords;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_color = "+ti.COLOR+";\n\t\t\t\t\tv_texCoords = "+ti.TEXCOORDS+";\n\t\t\t\t\tgl_Position = "+ti.MVP_MATRIX+" * "+ti.POSITION+";\n\t\t\t\t}\n\t\t\t","\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_color;\n\t\t\t\tvarying vec2 v_texCoords;\n\t\t\t\tuniform sampler2D u_texture;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\n\t\t\t\t}\n\t\t\t")},ti.newTwoColoredTextured=function(t){return new ti(t,"\n\t\t\t\tattribute vec4 "+ti.POSITION+";\n\t\t\t\tattribute vec4 "+ti.COLOR+";\n\t\t\t\tattribute vec4 "+ti.COLOR2+";\n\t\t\t\tattribute vec2 "+ti.TEXCOORDS+";\n\t\t\t\tuniform mat4 "+ti.MVP_MATRIX+";\n\t\t\t\tvarying vec4 v_light;\n\t\t\t\tvarying vec4 v_dark;\n\t\t\t\tvarying vec2 v_texCoords;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_light = "+ti.COLOR+";\n\t\t\t\t\tv_dark = "+ti.COLOR2+";\n\t\t\t\t\tv_texCoords = "+ti.TEXCOORDS+";\n\t\t\t\t\tgl_Position = "+ti.MVP_MATRIX+" * "+ti.POSITION+";\n\t\t\t\t}\n\t\t\t","\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_light;\n\t\t\t\tvarying LOWP vec4 v_dark;\n\t\t\t\tvarying vec2 v_texCoords;\n\t\t\t\tuniform sampler2D u_texture;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tvec4 texColor = texture2D(u_texture, v_texCoords);\n\t\t\t\t\tgl_FragColor.a = texColor.a * v_light.a;\n\t\t\t\t\tgl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\n\t\t\t\t}\n\t\t\t")},ti.newColored=function(t){return new ti(t,"\n\t\t\t\tattribute vec4 "+ti.POSITION+";\n\t\t\t\tattribute vec4 "+ti.COLOR+";\n\t\t\t\tuniform mat4 "+ti.MVP_MATRIX+";\n\t\t\t\tvarying vec4 v_color;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_color = "+ti.COLOR+";\n\t\t\t\t\tgl_Position = "+ti.MVP_MATRIX+" * "+ti.POSITION+";\n\t\t\t\t}\n\t\t\t","\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_color;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tgl_FragColor = v_color;\n\t\t\t\t}\n\t\t\t")},ti.MVP_MATRIX="u_projTrans",ti.POSITION="a_position",ti.COLOR="a_color",ti.COLOR2="a_color2",ti.TEXCOORDS="a_texCoords",ti.SAMPLER="u_texture",$t=ti,Jt.Shader=$t,te=me=me||{},ee=te.webgl||(te.webgl={}),ei.prototype.begin=function(t){if(this.isDrawing)throw new Error("ShapeRenderer.begin() has already been called");this.shader=t,this.vertexIndex=0,this.isDrawing=!0;var e=this.context.gl;e.enable(e.BLEND),e.blendFunc(this.srcBlend,this.dstBlend)},ei.prototype.setBlendMode=function(t,e){var i=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),i.blendFunc(this.srcBlend,this.dstBlend))},ei.prototype.setColor=function(t){this.color.setFromColor(t)},ei.prototype.setColorWith=function(t,e,i,n){this.color.set(t,e,i,n)},ei.prototype.point=function(t,e,i){void 0===i&&(i=null),this.check(ie.Point,1),null===i&&(i=this.color),this.vertex(t,e,i)},ei.prototype.line=function(t,e,i,n,r){void 0===r&&(r=null),this.check(ie.Line,2),this.mesh.getVertices(),this.vertexIndex,null===r&&(r=this.color),this.vertex(t,e,r),this.vertex(i,n,r)},ei.prototype.triangle=function(t,e,i,n,r,s,a,o,h,l){void 0===o&&(o=null),void 0===h&&(h=null),void 0===l&&(l=null),this.check(t?ie.Filled:ie.Line,3),this.mesh.getVertices(),this.vertexIndex,null===o&&(o=this.color),null===h&&(h=this.color),null===l&&(l=this.color),t?(this.vertex(e,i,o),this.vertex(n,r,h),this.vertex(s,a,l)):(this.vertex(e,i,o),this.vertex(n,r,h),this.vertex(n,r,o),this.vertex(s,a,h),this.vertex(s,a,o),this.vertex(e,i,h))},ei.prototype.quad=function(t,e,i,n,r,s,a,o,h,l,u,c,f){void 0===l&&(l=null),void 0===u&&(u=null),void 0===c&&(c=null),void 0===f&&(f=null),this.check(t?ie.Filled:ie.Line,3),this.mesh.getVertices(),this.vertexIndex,null===l&&(l=this.color),null===u&&(u=this.color),null===c&&(c=this.color),null===f&&(f=this.color),t?(this.vertex(e,i,l),this.vertex(n,r,u),this.vertex(s,a,c),this.vertex(s,a,c)):(this.vertex(e,i,l),this.vertex(n,r,u),this.vertex(n,r,u),this.vertex(s,a,c),this.vertex(s,a,c),this.vertex(o,h,f)),this.vertex(o,h,f),this.vertex(e,i,l)},ei.prototype.rect=function(t,e,i,n,r,s){void 0===s&&(s=null),this.quad(t,e,i,e+n,i,e+n,i+r,e,i+r,s,s,s,s)},ei.prototype.rectLine=function(t,e,i,n,r,s,a){void 0===a&&(a=null),this.check(t?ie.Filled:ie.Line,8),null===a&&(a=this.color);var o=this.tmp.set(r-i,e-n);o.normalize(),s*=.5;var h=o.x*s,l=o.y*s;t?(this.vertex(e+h,i+l,a),this.vertex(e-h,i-l,a),this.vertex(n+h,r+l,a),this.vertex(n-h,r-l,a),this.vertex(n+h,r+l,a)):(this.vertex(e+h,i+l,a),this.vertex(e-h,i-l,a),this.vertex(n+h,r+l,a),this.vertex(n-h,r-l,a),this.vertex(n+h,r+l,a),this.vertex(e+h,i+l,a),this.vertex(n-h,r-l,a)),this.vertex(e-h,i-l,a)},ei.prototype.x=function(t,e,i){this.line(t-i,e-i,t+i,e+i),this.line(t-i,e+i,t+i,e-i)},ei.prototype.polygon=function(t,e,i,n){if(void 0===n&&(n=null),i<3)throw new Error("Polygon must contain at least 3 vertices");this.check(ie.Line,2*i),null===n&&(n=this.color),this.mesh.getVertices(),this.vertexIndex,i<<=1;for(var r=t[e<<=1],s=t[e+1],a=e+i,o=e,h=e+i-2;o<h;o+=2){var l=t[o],u=t[o+1],c=0,f=0,f=a<=o+2?(c=r,s):(c=t[o+2],t[o+3]);this.vertex(l,u,n),this.vertex(c,f,n)}},ei.prototype.circle=function(t,e,i,n,r,s){if(void 0===r&&(r=null),void 0===s&&(s=0),0===s&&(s=Math.max(1,6*te.MathUtils.cbrt(n)|0)),s<=0)throw new Error("segments must be > 0.");null===r&&(r=this.color);var a=2*te.MathUtils.PI/s,o=Math.cos(a),h=Math.sin(a),l=n,u=0;if(t){for(this.check(ie.Filled,3*s+3),s--,f=0;f<s;f++){this.vertex(e,i,r),this.vertex(e+l,i+u,r);var c=l;l=o*l-h*u,u=h*c+o*u,this.vertex(e+l,i+u,r)}this.vertex(e,i,r),this.vertex(e+l,i+u,r)}else{this.check(ie.Line,2*s+2);for(var f=0;f<s;f++){this.vertex(e+l,i+u,r);var d=l,l=o*l-h*u,u=h*d+o*u;this.vertex(e+l,i+u,r)}this.vertex(e+l,i+u,r)}l=n,u=0,this.vertex(e+l,i+u,r)},ei.prototype.curve=function(t,e,i,n,r,s,a,o,h,l){void 0===l&&(l=null),this.check(ie.Line,2*h+2),null===l&&(l=this.color);for(var u=1/h,c=u*u,f=u*u*u,d=3*u,p=3*c,m=6*c,g=6*f,v=t-2*i+r,M=e-2*n+s,x=3*(i-r)-t+a,y=3*(n-s)-e+o,w=t,T=e,E=(i-t)*d+v*p+x*f,A=(n-e)*d+M*p+y*f,b=v*m+x*g,R=M*m+y*g,S=x*g,I=y*g;0<h--;)this.vertex(w,T,l),w+=E,T+=A,E+=b,A+=R,b+=S,R+=I,this.vertex(w,T,l);this.vertex(w,T,l),this.vertex(a,o,l)},ei.prototype.vertex=function(t,e,i){var n=this.vertexIndex,r=this.mesh.getVertices();r[n++]=t,r[n++]=e,r[n++]=i.r,r[n++]=i.g,r[n++]=i.b,r[n++]=i.a,this.vertexIndex=n},ei.prototype.end=function(){if(!this.isDrawing)throw new Error("ShapeRenderer.begin() has not been called");this.flush(),this.context.gl.disable(this.context.gl.BLEND),this.isDrawing=!1},ei.prototype.flush=function(){0!=this.vertexIndex&&(this.mesh.setVerticesLength(this.vertexIndex),this.mesh.draw(this.shader,this.shapeType),this.vertexIndex=0)},ei.prototype.check=function(t,e){if(!this.isDrawing)throw new Error("ShapeRenderer.begin() has not been called");if(this.shapeType==t){if(!(this.mesh.maxVertices()-this.mesh.numVertices()<e))return;this.flush()}else this.flush(),this.shapeType=t},ei.prototype.dispose=function(){this.mesh.dispose()},re=ei,ee.ShapeRenderer=re,(ne=ie=ee.ShapeType||(ee.ShapeType={}))[ne.Point=0]="Point",ne[ne.Line=1]="Line",ne[ne.Filled=4]="Filled",se=me=me||{},ae=se.webgl||(se.webgl={}),ii.prototype.draw=function(t,e,i){void 0===i&&(i=null);var n=e.x,r=e.y,s=this.context.gl,a=this.premultipliedAlpha?s.ONE:s.SRC_ALPHA;t.setBlendMode(a,s.ONE_MINUS_SRC_ALPHA);var o=e.bones;if(this.drawBones){t.setColor(this.boneLineColor);for(var h=0,l=o.length;h<l;h++){var u=o[h];i&&-1<i.indexOf(u.data.name)||null!=u.parent&&(T=n+u.data.length*u.a+u.worldX,E=r+u.data.length*u.c+u.worldY,t.rectLine(!0,n+u.worldX,r+u.worldY,T,E,this.boneWidth*this.scale))}this.drawSkeletonXY&&t.x(n,r,4*this.scale)}if(this.drawRegionAttachments)for(t.setColor(this.attachmentLineColor),h=0,l=(B=e.slots).length;h<l;h++)(U=(Y=B[h]).getAttachment())instanceof se.RegionAttachment&&(f=this.vertices,U.computeWorldVertices(Y.bone,f,0,2),t.line(f[0],f[1],f[2],f[3]),t.line(f[2],f[3],f[4],f[5]),t.line(f[4],f[5],f[6],f[7]),t.line(f[6],f[7],f[0],f[1]));if(this.drawMeshHull||this.drawMeshTriangles)for(h=0,l=(B=e.slots).length;h<l;h++)if((Y=B[h]).bone.active&&(U=Y.getAttachment())instanceof se.MeshAttachment){var c=U,f=this.vertices;c.computeWorldVertices(Y,0,c.worldVerticesLength,f,0,2);var d=c.triangles,p=c.hullLength;if(this.drawMeshTriangles){t.setColor(this.triangleLineColor);for(var m=0,g=d.length;m<g;m+=3){var v=2*d[m],M=2*d[m+1],x=2*d[m+2];t.triangle(!1,f[v],f[1+v],f[M],f[1+M],f[x],f[1+x])}}if(this.drawMeshHull&&0<p){t.setColor(this.attachmentLineColor);for(var y=f[(p=2*(p>>1))-2],w=f[p-1],m=0,g=p;m<g;m+=2){var T=f[m],E=f[m+1];t.line(T,E,y,w),y=T,w=E}}}if(this.drawBoundingBoxes){var A=this.bounds;A.update(e,!0),t.setColor(this.aabbColor),t.rect(!1,A.minX,A.minY,A.getWidth(),A.getHeight());for(var b=A.polygons,R=A.boundingBoxes,h=0,l=b.length;h<l;h++){var S=b[h];t.setColor(R[h].color),t.polygon(S,0,S.length)}}if(this.drawPaths)for(h=0,l=(B=e.slots).length;h<l;h++)if((Y=B[h]).bone.active&&(U=Y.getAttachment())instanceof se.PathAttachment){var I=U,g=I.worldVerticesLength,C=this.temp=se.Utils.setArraySize(this.temp,g,0);I.computeWorldVertices(Y,0,g,C,0,2);var P=this.pathColor,_=C[2],F=C[3],L=0,O=0;for(I.closed&&(t.setColor(P),k=C[0],N=C[1],D=C[g-2],V=C[g-1],L=C[g-4],O=C[g-3],t.curve(_,F,k,N,D,V,L,O,32),t.setColor(ii.LIGHT_GRAY),t.line(_,F,k,N),t.line(L,O,D,V)),g-=4,m=4;m<g;m+=6){var k=C[m],N=C[m+1],D=C[m+2],V=C[m+3];L=C[m+4],O=C[m+5],t.setColor(P),t.curve(_,F,k,N,D,V,L,O,32),t.setColor(ii.LIGHT_GRAY),t.line(_,F,k,N),t.line(L,O,D,V),_=L,F=O}}if(this.drawBones)for(t.setColor(this.boneOriginColor),h=0,l=o.length;h<l;h++)u=o[h],i&&-1<i.indexOf(u.data.name)||t.circle(!0,n+u.worldX,r+u.worldY,3*this.scale,ii.GREEN,8);if(this.drawClipping){var B=e.slots;t.setColor(this.clipColor);for(var Y,U,h=0,l=B.length;h<l;h++)if((Y=B[h]).bone.active&&(U=Y.getAttachment())instanceof se.ClippingAttachment){var X=U,g=X.worldVerticesLength,C=this.temp=se.Utils.setArraySize(this.temp,g,0);X.computeWorldVertices(Y,0,g,C,0,2);for(var z=0,W=C.length;z<W;z+=2)T=C[z],E=C[z+1],L=C[(z+2)%C.length],O=C[(z+3)%C.length],t.line(T,E,L,O)}}},ii.prototype.dispose=function(){},ii.LIGHT_GRAY=new se.Color(192/255,192/255,192/255,1),ii.GREEN=new se.Color(0,1,0,1),oe=ii,ae.SkeletonDebugRenderer=oe,he=me=me||{},le=he.webgl||(he.webgl={}),ue=function(t,e,i){this.vertices=t,this.numVertices=e,this.numFloats=i},ni.prototype.draw=function(t,e,i,n){void 0===i&&(i=-1),void 0===n&&(n=-1);var r=this.clipper,s=this.premultipliedAlpha,a=this.twoColorTint,o=null,h=this.temp,l=this.temp2,u=this.temp3,c=this.temp4,f=this.renderable,d=null,p=null,m=e.drawOrder,g=null,v=e.color,M=a?12:8,x=!1;-1==i&&(x=!0);for(var y=0,w=m.length;y<w;y++){var T=r.isClipping()?2:M,E=m[y];if(E.bone.active)if(0<=i&&i==E.data.index&&(x=!0),x){0<=n&&n==E.data.index&&(x=!1);var A=E.getAttachment(),b=null;if(A instanceof he.RegionAttachment){var R=A;f.vertices=this.vertices,f.numVertices=4,f.numFloats=T<<2,R.computeWorldVertices(E.bone,f.vertices,0,T),p=ni.QUAD_TRIANGLES,d=R.uvs,b=R.region.renderObject.texture,g=R.color}else{if(!(A instanceof he.MeshAttachment)){if(A instanceof he.ClippingAttachment){r.clipStart(E,A);continue}r.clipEndWithSlot(E);continue}var S=A;f.vertices=this.vertices,f.numVertices=S.worldVerticesLength>>1,f.numFloats=f.numVertices*T,f.numFloats>f.vertices.length&&(f.vertices=this.vertices=he.Utils.newFloatArray(f.numFloats)),S.computeWorldVertices(E,0,S.worldVerticesLength,f.vertices,0,T),p=S.triangles,b=S.region.renderObject.texture,d=S.uvs,g=S.color}if(null!=b){var I=E.color,C=this.tempColor;C.r=v.r*I.r*g.r,C.g=v.g*I.g*g.g,C.b=v.b*I.b*g.b,C.a=v.a*I.a*g.a,s&&(C.r*=C.a,C.g*=C.a,C.b*=C.a);var P=this.tempColor2;null==E.darkColor?P.set(0,0,0,1):(s?(P.r=E.darkColor.r*C.a,P.g=E.darkColor.g*C.a,P.b=E.darkColor.b*C.a):P.setFromColor(E.darkColor),P.a=s?1:0);var _=E.data.blendMode;if(_!=o&&(o=_,t.setBlendMode(le.WebGLBlendModeConverter.getSourceGLBlendMode(o,s),le.WebGLBlendModeConverter.getDestGLBlendMode(o))),r.isClipping()){r.clipTriangles(f.vertices,f.numFloats,p,p.length,d,C,P,a);var F=new Float32Array(r.clippedVertices),L=r.clippedTriangles;if(null!=this.vertexEffect){var O=this.vertexEffect,k=F;if(a)for(var N=0,D=F.length;N<D;N+=M)h.x=k[N],h.y=k[N+1],u.set(k[N+2],k[N+3],k[N+4],k[N+5]),l.x=k[N+6],l.y=k[N+7],c.set(k[N+8],k[N+9],k[N+10],k[N+11]),O.transform(h,l,u,c),k[N]=h.x,k[N+1]=h.y,k[N+2]=u.r,k[N+3]=u.g,k[N+4]=u.b,k[N+5]=u.a,k[N+6]=l.x,k[N+7]=l.y,k[N+8]=c.r,k[N+9]=c.g,k[N+10]=c.b,k[N+11]=c.a;else for(var N=0,V=F.length;N<V;N+=M)h.x=k[N],h.y=k[N+1],u.set(k[N+2],k[N+3],k[N+4],k[N+5]),l.x=k[N+6],l.y=k[N+7],c.set(0,0,0,0),O.transform(h,l,u,c),k[N]=h.x,k[N+1]=h.y,k[N+2]=u.r,k[N+3]=u.g,k[N+4]=u.b,k[N+5]=u.a,k[N+6]=l.x,k[N+7]=l.y}t.draw(b,F,L)}else{if(k=f.vertices,null!=this.vertexEffect)if(O=this.vertexEffect,a)for(var N=0,B=0,Y=f.numFloats;N<Y;N+=M,B+=2)h.x=k[N],h.y=k[N+1],l.x=d[B],l.y=d[B+1],u.setFromColor(C),c.setFromColor(P),O.transform(h,l,u,c),k[N]=h.x,k[N+1]=h.y,k[N+2]=u.r,k[N+3]=u.g,k[N+4]=u.b,k[N+5]=u.a,k[N+6]=l.x,k[N+7]=l.y,k[N+8]=c.r,k[N+9]=c.g,k[N+10]=c.b,k[N+11]=c.a;else for(var N=0,B=0,U=f.numFloats;N<U;N+=M,B+=2)h.x=k[N],h.y=k[N+1],l.x=d[B],l.y=d[B+1],u.setFromColor(C),c.set(0,0,0,0),O.transform(h,l,u,c),k[N]=h.x,k[N+1]=h.y,k[N+2]=u.r,k[N+3]=u.g,k[N+4]=u.b,k[N+5]=u.a,k[N+6]=l.x,k[N+7]=l.y;else if(a)for(var N=2,B=0,X=f.numFloats;N<X;N+=M,B+=2)k[N]=C.r,k[N+1]=C.g,k[N+2]=C.b,k[N+3]=C.a,k[N+4]=d[B],k[N+5]=d[B+1],k[N+6]=P.r,k[N+7]=P.g,k[N+8]=P.b,k[N+9]=P.a;else for(var N=2,B=0,z=f.numFloats;N<z;N+=M,B+=2)k[N]=C.r,k[N+1]=C.g,k[N+2]=C.b,k[N+3]=C.a,k[N+4]=d[B],k[N+5]=d[B+1];var W=f.vertices.subarray(0,f.numFloats);t.draw(b,W,p)}}r.clipEndWithSlot(E)}else r.clipEndWithSlot(E);else r.clipEndWithSlot(E)}r.clipEnd()},ni.QUAD_TRIANGLES=[0,1,2,2,3,0],ce=ni,le.SkeletonRenderer=ce,fe=me=me||{},de=fe.webgl||(fe.webgl={}),ri.prototype.setFrom=function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},ri.prototype.set=function(t,e,i){return this.x=t,this.y=e,this.z=i,this},ri.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this},ri.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this},ri.prototype.scale=function(t){return this.x*=t,this.y*=t,this.z*=t,this},ri.prototype.normalize=function(){var t=this.length();return 0==t||(t=1/t,this.x*=t,this.y*=t,this.z*=t),this},ri.prototype.cross=function(t){return this.set(this.y*t.z-this.z*t.y,this.z*t.x-this.x*t.z,this.x*t.y-this.y*t.x)},ri.prototype.multiply=function(t){var e=t.values;return this.set(this.x*e[de.M00]+this.y*e[de.M01]+this.z*e[de.M02]+e[de.M03],this.x*e[de.M10]+this.y*e[de.M11]+this.z*e[de.M12]+e[de.M13],this.x*e[de.M20]+this.y*e[de.M21]+this.z*e[de.M22]+e[de.M23])},ri.prototype.project=function(t){var e=t.values,i=1/(this.x*e[de.M30]+this.y*e[de.M31]+this.z*e[de.M32]+e[de.M33]);return this.set((this.x*e[de.M00]+this.y*e[de.M01]+this.z*e[de.M02]+e[de.M03])*i,(this.x*e[de.M10]+this.y*e[de.M11]+this.z*e[de.M12]+e[de.M13])*i,(this.x*e[de.M20]+this.y*e[de.M21]+this.z*e[de.M22]+e[de.M23])*i)},ri.prototype.dot=function(t){return this.x*t.x+this.y*t.y+this.z*t.z},ri.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},ri.prototype.distance=function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z;return Math.sqrt(e*e+i*i+n*n)},pe=ri,de.Vector3=pe,function(t){var e=(i.prototype.addRestorable=function(t){this.restorables.push(t)},i.prototype.removeRestorable=function(t){var e=this.restorables.indexOf(t);-1<e&&this.restorables.splice(e,1)},i);function i(t,e){var i,n=this;void 0===e&&(e={alpha:"true"}),this.restorables=new Array,t instanceof HTMLCanvasElement?(i=t,this.gl=i.getContext("webgl2",e)||i.getContext("webgl",e),(this.canvas=i).addEventListener("webglcontextlost",function(t){t&&t.preventDefault()}),i.addEventListener("webglcontextrestored",function(t){for(var e=0,i=n.restorables.length;e<i;e++)n.restorables[e].restore()})):(this.gl=t,this.canvas=this.gl.canvas)}t.ManagedWebGLRenderingContext=e;var n=(r.getDestGLBlendMode=function(t){switch(t){case ge.BlendMode.Normal:return r.ONE_MINUS_SRC_ALPHA;case ge.BlendMode.Additive:return r.ONE;case ge.BlendMode.Multiply:case ge.BlendMode.Screen:return r.ONE_MINUS_SRC_ALPHA;default:throw new Error("Unknown blend mode: "+t)}},r.getSourceGLBlendMode=function(t,e){switch(void 0===e&&(e=!1),t){case ge.BlendMode.Normal:case ge.BlendMode.Additive:return e?r.ONE:r.SRC_ALPHA;case ge.BlendMode.Multiply:return r.DST_COLOR;case ge.BlendMode.Screen:return r.ONE;default:throw new Error("Unknown blend mode: "+t)}},r.ZERO=0,r.ONE=1,r.SRC_COLOR=768,r.ONE_MINUS_SRC_COLOR=769,r.SRC_ALPHA=770,r.ONE_MINUS_SRC_ALPHA=771,r.DST_ALPHA=772,r.ONE_MINUS_DST_ALPHA=773,r.DST_COLOR=774,r);function r(){}t.WebGLBlendModeConverter=n}((ge=me=me||{}).webgl||(ge.webgl={})),si.exports=me}).call(window)},function(t,e,i){var n=i(0),M=i(11),x=i(201),d=i(8),p=i(215),m=i(216),g=i(217),r=new n({Extends:m,initialize:function(t,e,i,n,r,s,a){var o,h,l,u=[],c=t.cacheManager.custom.spine;if(d(e)){var f=e;for(e=M(f,"key"),h=new p(t,{key:e,url:M(f,"jsonURL"),extension:M(f,"jsonExtension","json"),xhrSettings:M(f,"jsonXhrSettings")}),n=M(f,"atlasURL"),r=M(f,"preMultipliedAlpha"),Array.isArray(n)||(n=[n]),o=0;o<n.length;o++)(l=new g(t,{key:e+"_"+o,url:n[o],extension:M(f,"atlasExtension","atlas"),xhrSettings:M(f,"atlasXhrSettings")})).cache=c,u.push(l)}else for(h=new p(t,e,i,s),Array.isArray(n)||(n=[n]),o=0;o<n.length;o++)(l=new g(t,e+"_"+o,n[o],a)).cache=c,u.push(l);u.unshift(h),m.call(this,t,"spine",e,u),this.config.preMultipliedAlpha=r},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,"text"===t.type)){for(var e=t.data.split("\n"),i=[],n=0;n<e.length;n++){var r=e[n];""===r.trim()&&n<e.length-1&&(r=e[n+1],i.push(r))}var s=this.config,a=this.loader,o=a.baseURL,h=a.path,l=a.prefix,u=M(s,"baseURL",this.baseURL),c=M(s,"path",t.src.match(/^.*\//))[0],f=M(s,"prefix",this.prefix),d=M(s,"textureXhrSettings");a.setBaseURL(u),a.setPath(c),a.setPrefix(f);for(var p=0;p<i.length;p++){var m=i[p],g=this.prefix+m,v=new x(a,g,m,d);this.addToMultiFile(v),a.addFile(v)}a.setBaseURL(o),a.setPath(h),a.setPrefix(l)}},addToCache:function(){if(this.isReadyToProcess()){var t;this.files[0].addToCache();for(var e="",i="",n=!!this.config.preMultipliedAlpha,r=1;r<this.files.length;r++){var s,a,o,h=this.files[r];"text"===h.type?(e=h.key.replace(/_[\d]$/,""),t=h.cache,i=i.concat(h.data)):(a=(s=h.key.trim()).indexOf("_"),o=s.substr(a+1),this.loader.textureManager.addImage(o,h.data)),h.pendingDestroy()}t.add(e,{preMultipliedAlpha:n,data:i,prefix:this.prefix}),this.complete=!0}}});t.exports=r},function(t,e,i){var n=i(0),r=i(13),c=i(20),s=i(21),f=i(11),d=i(8),a=new n({Extends:c,initialize:function t(e,i,n,r,s){var a,o,h="png";d(i)&&(i=f(o=i,"key"),n=f(o,"url"),a=f(o,"normalMap"),r=f(o,"xhrSettings"),h=f(o,"extension",h),s=f(o,"frameConfig")),Array.isArray(n)&&(a=n[1],n=n[0]);var l,u={type:"image",cache:e.textureManager,extension:h,responseType:"blob",key:i,url:n,xhrSettings:r,config:s};c.call(this,e,u),a&&((l=new t(e,this.key,a,r,s)).type="normalMap",this.setLink(l),e.addFile(l))},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){c.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){c.revokeObjectURL(t.data),t.onProcessError()},c.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===r.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});s.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new a(this,t[n]));else this.addFile(new a(this,t,e,i));return this}),t.exports=a},function(t,e,i){t.exports={ADD:i(203),COMPLETE:i(204),FILE_COMPLETE:i(205),FILE_KEY_COMPLETE:i(206),FILE_LOAD_ERROR:i(207),FILE_LOAD:i(208),FILE_PROGRESS:i(209),POST_PROCESS:i(210),PROGRESS:i(211),START:i(212)}},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e,i){var s=i(44);t.exports=function(t,e){var i=s(e,t.xhrSettings),n=new XMLHttpRequest;if(n.open("GET",t.src,i.async,i.user,i.password),n.responseType=t.xhrSettings.responseType,n.timeout=i.timeout,i.headers)for(var r in i.headers)n.setRequestHeader(r,i.headers[r]);return i.header&&i.headerValue&&n.setRequestHeader(i.header,i.headerValue),i.requestedWith&&n.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&n.overrideMimeType(i.overrideMimeType),i.withCredentials&&(n.withCredentials=!0),n.onload=t.onLoad.bind(t,n),n.onerror=t.onError.bind(t,n),n.onprogress=t.onProgress.bind(t),n.send(),n}},function(t,e,i){var n=i(0),h=i(13),l=i(20),r=i(21),u=i(11),c=i(7),f=i(8),s=new n({Extends:l,initialize:function(t,e,i,n,r){var s,a="json";f(e)&&(e=u(s=e,"key"),i=u(s,"url"),n=u(s,"xhrSettings"),a=u(s,"extension",a),r=u(s,"dataKey",r));var o={type:"json",cache:t.cacheManager.json,extension:a,responseType:"text",key:e,url:i,xhrSettings:n,config:r};l.call(this,t,o),f(i)&&(this.data=r?c(i,r):i,this.state=h.FILE_POPULATED)},onProcess:function(){var t,e;this.state!==h.FILE_POPULATED&&(this.state=h.FILE_PROCESSING,t=JSON.parse(this.xhrLoader.responseText),e=this.config,this.data="string"==typeof e?c(t,e,t):t),this.onProcessComplete()}});r.register("json",function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new s(this,t[r]));else this.addFile(new s(this,t,e,n,i));return this}),t.exports=s},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.loader=t,this.type=e,this.key=i,this.multiKeyIndex=t.multiKeyIndex++,this.files=n,this.complete=!1,this.pending=n.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var r=0;r<n.length;r++)n[r].multiFile=this},isReadyToProcess:function(){return 0===this.pending&&0===this.failed&&!this.complete},addToMultiFile:function(t){return this.files.push(t),(t.multiFile=this).pending++,this.complete=!1,this},onFileComplete:function(t){-1!==this.files.indexOf(t)&&this.pending--},onFileFailed:function(t){-1!==this.files.indexOf(t)&&this.failed++}});t.exports=n},function(t,e,i){var n=i(0),r=i(13),o=i(20),s=i(21),h=i(11),l=i(8),a=new n({Extends:o,initialize:function(t,e,i,n){var r,s="txt";l(e)&&(e=h(r=e,"key"),i=h(r,"url"),n=h(r,"xhrSettings"),s=h(r,"extension",s));var a={type:"text",cache:t.cacheManager.text,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};o.call(this,t,a)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});s.register("text",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new a(this,t[n]));else this.addFile(new a(this,t,e,i));return this}),t.exports=a},function(t,e,i){var h=i(27),l=i(3),n=i(0),r=i(46),s=i(47),a=i(48),o=i(49),u=i(50),c=i(52),f=i(9),d=i(18),p=i(53),m=i(10),g=i(238),v=i(245),M=new n({Extends:p,Mixins:[r,s,a,o,u,c,v],initialize:function(t,e,i,n,r,s,a){p.call(this,t,"Spine"),this.plugin=e,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null,this.root=null,this.bounds=null,this.drawDebug=!1,this.timeScale=1,this.displayOriginX=0,this.displayOriginY=0,this.preMultipliedAlpha=!1,this.blendMode=-1,this.setPosition(i,n),r&&this.setSkeleton(r,s,a)},willRender:function(){return!0},setAlpha:function(t,e){var i;return void 0===t&&(t=1),e?(i=this.findSlot(e))&&(i.color.a=l(t,0,1)):this.alpha=t,this},alpha:{get:function(){return this.skeleton.color.a},set:function(t){var e=l(t,0,1);this.skeleton&&(this.skeleton.color.a=e),0===e?this.renderFlags&=-3:this.renderFlags|=2}},red:{get:function(){return this.skeleton.color.r},set:function(t){var e=l(t,0,1);this.skeleton&&(this.skeleton.color.r=e)}},green:{get:function(){return this.skeleton.color.g},set:function(t){var e=l(t,0,1);this.skeleton&&(this.skeleton.color.g=e)}},blue:{get:function(){return this.skeleton.color.b},set:function(t){var e=l(t,0,1);this.skeleton&&(this.skeleton.color.b=e)}},setColor:function(t,e){void 0===t&&(t=16777215);var i,n=(t>>16&255)/255,r=(t>>8&255)/255,s=(255&t)/255,a=16777215<t?(t>>>24)/255:null,o=this.skeleton;return!e||(i=this.findSlot(e))&&(o=i),o.color.r=n,o.color.g=r,o.color.b=s,null!==a&&(o.color.a=a),this},setSkeletonFromJSON:function(t,e,i,n){return this.setSkeleton(t,e,i,n)},setSkeleton:function(t,e,i,n){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var r=this.plugin.createSkeleton(t,n);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,i),this.root=this.getRootBone(),this.root&&(this.root.rotation=m(f(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=m(f(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,i,n){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===i&&(i=0),void 0===n&&(n=0),this.width=t,this.height=e,this.displayOriginX=r.x-i,this.displayOriginY=r.y-n,this},setOffset:function(t,e){var i=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=i.x-t,this.displayOriginY=i.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,i=this.scaleX,n=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=i,t.scaleY=n,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 i=0;i<e.bones.length;i++)t.push(e.bones[i].name);return t},getSkinList:function(){var t=[],e=this.skeletonData;if(e)for(var i=0;i<e.skins.length;i++)t.push(e.skins[i].name);return t},getSlotList:function(){for(var t=[],e=this.skeleton,i=0;i<e.slots.length;i++)t.push(e.slots[i].data.name);return t},getAnimationList:function(){var t=[],e=this.skeletonData;if(e)for(var i=0;i<e.animations.length;i++)t.push(e.animations[i].name);return t},getCurrentAnimation:function(t){void 0===t&&(t=0);var e=this.state.getCurrent(t);if(e)return e.animation},play:function(t,e,i){return this.setAnimation(0,t,e,i),this},setAnimation:function(t,e,i,n){if(void 0===i&&(i=!1),void 0===n&&(n=!1),n&&this.state){var r=this.state.getCurrent(0);if(r&&r.animation.name===e&&!r.isComplete())return}if(this.findAnimation(e))return this.state.setAnimation(t,e,i)},addAnimation:function(t,e,i,n){return this.state.addAnimation(t,e,i,n)},setEmptyAnimation:function(t,e){return this.state.setEmptyAnimation(t,e)},clearTrack:function(t){return this.state.clearTrack(t),this},clearTracks:function(){return this.state.clearTracks(),this},setSkinByName:function(t){var e=this.skeleton;return e.setSkinByName(t),e.setSlotsToSetupPose(),this.state.apply(e),this},setSkin:function(t){var e=this.skeleton;return e.setSkin(t),e.setSlotsToSetupPose(),this.state.apply(e),this},setMix:function(t,e,i){return this.stateData.setMix(t,e,i),this},getAttachment:function(t,e){return this.skeleton.getAttachment(t,e)},getAttachmentByName:function(t,e){return this.skeleton.getAttachmentByName(t,e)},setAttachment:function(t,e){if(Array.isArray(t)&&Array.isArray(e)&&t.length===e.length)for(var i=0;i<t.length;i++)this.skeleton.setAttachment(t[i],e[i]);else this.skeleton.setAttachment(t,e);return this},setToSetupPose:function(){return this.skeleton.setToSetupPose(),this},setSlotsToSetupPose:function(){return this.skeleton.setSlotsToSetupPose(),this},setBonesToSetupPose:function(){return this.skeleton.setBonesToSetupPose(),this},getRootBone:function(){return this.skeleton.getRootBone()},angleBoneToXY:function(t,e,i,n,r,s){void 0===n&&(n=0),void 0===r&&(r=0),void 0===s&&(s=360);var a=this.plugin.renderer.height,o=f(h(t.worldX,a-t.worldY,e,i)+d(n));return t.rotation=l(m(o),r,s),this},findBone:function(t){return this.skeleton.findBone(t)},findBoneIndex:function(t){return this.skeleton.findBoneIndex(t)},findSlot:function(t){return this.skeleton.findSlot(t)},findSlotIndex:function(t){return this.skeleton.findSlotIndex(t)},findSkin:function(t){return this.skeletonData.findSkin(t)},findEvent:function(t){return this.skeletonData.findEvent(t)},findAnimation:function(t){return this.skeletonData.findAnimation(t)},findIkConstraint:function(t){return this.skeletonData.findIkConstraint(t)},findTransformConstraint:function(t){return this.skeletonData.findTransformConstraint(t)},findPathConstraint:function(t){return this.skeletonData.findPathConstraint(t)},findPathConstraintIndex:function(t){return this.skeletonData.findPathConstraintIndex(t)},getBounds:function(){return this.plugin.getBounds(this.skeleton)},preUpdate:function(t,e){var i=this.skeleton;this.state.update(e/1e3*this.timeScale),this.state.apply(i)},preDestroy:function(){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.plugin=null,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null}});t.exports=M},function(t,e,i){var n=i(0),o=i(220),r=new n({initialize:function(t,e){this.parent=t,(this.events=e)||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;n<t.length;n++)i.push(e[t[n]]);return i}return e[t]},getAll:function(){var t={};for(var e in this.list)this.list.hasOwnProperty(e)&&(t[e]=this.list[e]);return t},query:function(t){var e={};for(var i in this.list)this.list.hasOwnProperty(i)&&i.match(t)&&(e[i]=this.list[i]);return e},set:function(t,e){if(this._frozen)return this;if("string"==typeof t)return this.setValue(t,e);for(var i in t)this.setValue(i,t[i]);return this},inc:function(t,e){if(this._frozen)return this;void 0===e&&(e=1);var i=this.get(t);return void 0===i&&(i=0),this.set(t,i+e),this},toggle:function(t){return this._frozen||this.set(t,!this.get(t)),this},setValue:function(i,t){return this._frozen||(this.has(i)?this.values[i]=t:(r=(n=this).list,s=this.events,a=this.parent,Object.defineProperty(this.values,i,{enumerable:!0,configurable:!0,get:function(){return r[i]},set:function(t){var e;n._frozen||(e=r[i],r[i]=t,s.emit(o.CHANGE_DATA,a,i,t,e),s.emit(o.CHANGE_DATA_KEY+i,a,t,e))}}),r[i]=t,s.emit(o.SET_DATA,a,i,t))),this;var n,r,s,a},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;n<arguments.length;n++)i.push(arguments[n]);for(var r in this.list)i[1]=r,i[2]=this.list[r],t.apply(e,i);return this},merge:function(t,e){for(var i in void 0===e&&(e=!0),t)t.hasOwnProperty(i)&&(e||!e&&!this.has(i))&&this.setValue(i,t[i]);return this},remove:function(t){if(this._frozen)return this;if(!Array.isArray(t))return this.removeValue(t);for(var e=0;e<t.length;e++)this.removeValue(t[e]);return this},removeValue:function(t){var e;return this.has(t)&&(e=this.list[t],delete this.list[t],delete this.values[t],this.events.emit(o.REMOVE_DATA,this.parent,t,e)),this},pop:function(t){var e=void 0;return!this._frozen&&this.has(t)&&(e=this.list[t],delete this.list[t],delete this.values[t],this.events.emit(o.REMOVE_DATA,this.parent,t,e)),e},has:function(t){return this.list.hasOwnProperty(t)},setFreeze:function(t){return this._frozen=t,this},reset:function(){for(var t in this.list)delete this.list[t],delete this.values[t];return this._frozen=!1,this},destroy:function(){this.reset(),this.events.off(o.CHANGE_DATA),this.events.off(o.SET_DATA),this.events.off(o.REMOVE_DATA),this.parent=null},freeze:{get:function(){return this._frozen},set:function(t){this._frozen=!!t}},count:{get:function(){var t=0;for(var e in this.list)void 0!==this.list[e]&&t++;return t}}});t.exports=r},function(t,e,i){t.exports={CHANGE_DATA:i(221),CHANGE_DATA_KEY:i(222),REMOVE_DATA:i(223),SET_DATA:i(224)}},function(t,e){t.exports="changedata"},function(t,e){t.exports="changedata-"},function(t,e){t.exports="removedata"},function(t,e){t.exports="setdata"},function(t,e){t.exports="addedtoscene"},function(t,e){t.exports="destroy"},function(t,e){t.exports="removedfromscene"},function(t,e){t.exports="complete"},function(t,e){t.exports="created"},function(t,e){t.exports="error"},function(t,e){t.exports="loop"},function(t,e){t.exports="play"},function(t,e){t.exports="seeked"},function(t,e){t.exports="seeking"},function(t,e){t.exports="stop"},function(t,e){t.exports="timeout"},function(t,e){t.exports="unlocked"},function(t,e,i){t.exports={COMPLETE:i(239),DISPOSE:i(240),END:i(241),EVENT:i(242),INTERRUPTED:i(243),START:i(244)}},function(t,e){t.exports="complete"},function(t,e){t.exports="dispose"},function(t,e){t.exports="end"},function(t,e){t.exports="event"},function(t,e){t.exports="interrupted"},function(t,e){t.exports="start"},function(t,e,i){var n=i(4),r=i(4),n=i(246),r=i(247);t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){var g=i(9),v=i(10),M=i(6);t.exports=function(t,e,i,n,r){var s,a,o,h,l,u,c=e.plugin,f=e.skeleton,d=f.color.a,p=c.sceneRenderer,m=!(15!==e.renderFlags||0!==e.cameraFilter&&e.cameraFilter&n.id||0===d);f&&m?(t.newType&&t.clearPipeline(),s=t._tempMatrix1,a=t._tempMatrix2,o=t._tempMatrix3,a.applyITRS(e.x,e.y,e.rotation,Math.abs(e.scaleX),Math.abs(e.scaleY)),s.copyFrom(n.matrix),r?(s.multiplyWithOffset(r,-n.scrollX*e.scrollFactorX,-n.scrollY*e.scrollFactorY),a.e=e.x,a.f=e.y):(a.e-=n.scrollX*e.scrollFactorX,a.f-=n.scrollY*e.scrollFactorY),s.multiply(a,o),h=t.height,f.x=o.tx,f.y=h-o.ty,f.scaleX=o.scaleX,f.scaleY=o.scaleY,e.scaleX<0?(f.scaleX*=-1,e.root.rotation=v(o.rotationNormalized)):e.root.rotation=M(v(g(o.rotationNormalized))+90,0,360),e.scaleY<0&&(f.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*v(o.rotationNormalized):e.root.rotation+=2*v(o.rotationNormalized)),!n.renderToTexture&&null===t.currentFramebuffer||(f.y=o.ty,f.scaleY*=-1),f.updateWorldTransform(),t.newType&&p.begin(),p.drawSkeleton(f,e.preMultipliedAlpha),(c.drawDebug||e.drawDebug)&&(l=f.x,u=f.y,f.x=0,f.y=0,p.drawSkeletonDebug(f,e.preMultipliedAlpha),f.x=l,f.y=u),t.nextTypeMatch||(p.end(),t.finalType||t.rebindPipeline(t.pipelines.MultiPipeline))):t.nextTypeMatch||(p.end(),t.finalType||(t.currentType="",t.rebindPipeline(t.pipelines.MultiPipeline)))}},function(t,e,i){var d=i(9),p=i(10),m=i(6);t.exports=function(t,e,i,n,r){var s,a,o,h=t.currentContext,l=e.plugin,u=e.skeleton,c=l.skeletonRenderer,f=!(15!==e.renderFlags||0!==e.cameraFilter&&e.cameraFilter&n.id);u&&f&&(s=t._tempMatrix1,a=t._tempMatrix2,o=t._tempMatrix3,a.applyITRS(e.x,e.y,e.rotation,Math.abs(e.scaleX),Math.abs(e.scaleY)),s.copyFrom(n.matrix),r?(s.multiplyWithOffset(r,-n.scrollX*e.scrollFactorX,-n.scrollY*e.scrollFactorY),a.e=e.x,a.f=e.y):(a.e-=n.scrollX*e.scrollFactorX,a.f-=n.scrollY*e.scrollFactorY),s.multiply(a,o),u.x=o.tx,u.y=o.ty,u.scaleX=o.scaleX,u.scaleY=-1*o.scaleY,e.scaleX<0?(u.scaleX*=-1,e.root.rotation=p(o.rotationNormalized)):e.root.rotation=m(p(d(o.rotationNormalized))+90,0,360),e.scaleY<0&&(u.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*p(o.rotationNormalized):e.root.rotation+=2*p(o.rotationNormalized)),n.renderToTexture&&(u.y=o.ty,u.scaleY*=-1),u.updateWorldTransform(),c.ctx=h,c.debugRendering=l.drawDebug||e.drawDebug,h.save(),c.draw(u),h.restore())}},function(t,e,i){var n=i(0),s=i(249),r=i(355),a=new n({Extends:s,Mixins:[r],initialize:function(t,e,i,n,r){s.call(this,t,i,n,r),this.type="Spine",this.plugin=e}});t.exports=a},function(t,e,i){var s=i(250),r=i(16),n=i(0),a=i(286),o=i(22),h=i(53),l=i(22),u=i(24),c=i(351),f=i(354),d=i(1),p=new n({Extends:h,Mixins:[a.AlphaSingle,a.BlendMode,a.ComputedSize,a.Depth,a.Mask,a.Transform,a.Visible,c],initialize:function(t,e,i,n){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new a.TransformMatrix,this.tempTransformMatrix=new a.TransformMatrix,this._displayList=t.sys.displayList,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(r.SKIP_CHECK),n&&this.add(n)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){var e;if(void 0===t&&(t=new u),t.setTo(this.x,this.y,0,0),this.parentContainer&&(e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y),t.setTo(e.x,e.y,0,0)),0<this.list.length){var i=this.list,n=new u,r=!1;t.setEmpty();for(var s=0;s<i.length;s++){var a=i[s];a.getBounds&&(a.getBounds(n),r?f(n,t,t):(t.setTo(n.x,n.y,n.width,n.height),r=!0))}}return t},addHandler:function(t){t.once(o.DESTROY,this.remove,this),this.exclusive&&(this._displayList.remove(t),t.parentContainer&&t.parentContainer.remove(t),t.parentContainer=this),this.scene.sys.displayList.exists(t)||t.emit(l.ADDED_TO_SCENE,t,this.scene)},removeHandler:function(t){t.off(o.DESTROY,this.remove),this.exclusive&&(t.parentContainer=null),this.scene.sys.displayList.exists(t)||t.emit(l.REMOVED_FROM_SCENE,t,this.scene)},pointToContainer:function(t,e){void 0===e&&(e=new d),this.parentContainer?this.parentContainer.pointToContainer(t,e):e=new d(t.x,t.y);var i=this.tempTransformMatrix;return i.applyITRS(this.x,this.y,this.rotation,this.scaleX,this.scaleY),i.invert(),i.transformPoint(t.x,t.y,e),e},getBoundsTransformMatrix:function(){return this.getWorldTransformMatrix(this.tempTransformMatrix,this.localTransform)},add:function(t){return s.Add(this.list,t,this.maxSize,this.addHandler,this),this},addAt:function(t,e){return s.AddAt(this.list,t,e,this.maxSize,this.addHandler,this),this},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(i,t){return i&&(void 0===t&&(t=function(t,e){return t[i]-e[i]}),s.StableSort.inplace(this.list,t)),this},getByName:function(t){return s.GetFirst(this.list,"name",t)},getRandom:function(t,e){return s.GetRandom(this.list,t,e)},getFirst:function(t,e,i,n){return s.GetFirst(this.list,t,e,i,n)},getAll:function(t,e,i,n){return s.GetAll(this.list,t,e,i,n)},count:function(t,e,i,n){return s.CountAllMatching(this.list,t,e,i,n)},swap:function(t,e){return s.Swap(this.list,t,e),this},moveTo:function(t,e){return s.MoveTo(this.list,t,e),this},remove:function(t,e){var i=s.Remove(this.list,t,this.removeHandler,this);if(e&&i){Array.isArray(i)||(i=[i]);for(var n=0;n<i.length;n++)i[n].destroy()}return this},removeAt:function(t,e){var i=s.RemoveAt(this.list,t,this.removeHandler,this);return e&&i&&i.destroy(),this},removeBetween:function(t,e,i){var n=s.RemoveBetween(this.list,t,e,this.removeHandler,this);if(i)for(var r=0;r<n.length;r++)n[r].destroy();return this},removeAll:function(t){var e=s.RemoveBetween(this.list,0,this.list.length,this.removeHandler,this);if(t)for(var i=0;i<e.length;i++)e[i].destroy();return this},bringToTop:function(t){return s.BringToTop(this.list,t),this},sendToBack:function(t){return s.SendToBack(this.list,t),this},moveUp:function(t){return s.MoveUp(this.list,t),this},moveDown:function(t){return s.MoveDown(this.list,t),this},reverse:function(){return this.list.reverse(),this},shuffle:function(){return s.Shuffle(this.list),this},replace:function(t,e,i){return s.Replace(this.list,t,e)&&(this.addHandler(e),this.removeHandler(t),i&&t.destroy()),this},exists:function(t){return-1<this.list.indexOf(t)},setAll:function(t,e,i,n){return s.SetAll(this.list,t,e,i,n),this},each:function(t,e){for(var i=[null],n=this.list.slice(),r=n.length,s=2;s<arguments.length;s++)i.push(arguments[s]);for(s=0;s<r;s++)i[0]=n[s],t.apply(e,i);return this},iterate:function(t,e){for(var i=[null],n=2;n<arguments.length;n++)i.push(arguments[n]);for(n=0;n<this.list.length;n++)i[0]=this.list[n],t.apply(e,i);return this},setScrollFactor:function(t,e,i){return void 0===e&&(e=t),void 0===i&&(i=!1),this.scrollFactorX=t,this.scrollFactorY=e,i&&(s.SetAll(this.list,"scrollFactorX",t),s.SetAll(this.list,"scrollFactorY",e)),this},length:{get:function(){return this.list.length}},first:{get:function(){return(this.position=0)<this.list.length?this.list[0]:null}},last:{get:function(){return 0<this.list.length?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position<this.list.length?(this.position++,this.list[this.position]):null}},previous:{get:function(){return 0<this.position?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null}});t.exports=p},function(t,e,i){t.exports={Matrix:i(251),Add:i(259),AddAt:i(260),BringToTop:i(261),CountAllMatching:i(262),Each:i(263),EachInRange:i(264),FindClosestInSorted:i(57),GetAll:i(265),GetFirst:i(266),GetRandom:i(267),MoveDown:i(268),MoveTo:i(269),MoveUp:i(270),NumberArray:i(271),NumberArrayStep:i(272),QuickSelect:i(273),Range:i(274),Remove:i(275),RemoveAt:i(276),RemoveBetween:i(277),RemoveRandomElement:i(278),Replace:i(279),RotateLeft:i(280),RotateRight:i(281),SafeRange:i(5),SendToBack:i(282),SetAll:i(283),Shuffle:i(58),SpliceOne:i(15),StableSort:i(284),Swap:i(285)}},function(t,e,i){t.exports={CheckMatrix:i(23),MatrixToString:i(252),ReverseColumns:i(254),ReverseRows:i(255),Rotate180:i(256),RotateLeft:i(257),RotateMatrix:i(14),RotateRight:i(258),TransposeMatrix:i(56)}},function(t,e,i){var a=i(253),o=i(23);t.exports=function(t){var e="";if(!o(t))return e;for(var i=0;i<t.length;i++){for(var n=0;n<t[i].length;n++){var r=t[i][n].toString();e+="undefined"!==r?a(r,2):"?",n<t[i].length-1&&(e+=" |")}if(i<t.length-1){e+="\n";for(var s=0;s<t[i].length;s++)e+="---",s<t[i].length-1&&(e+="+");e+="\n"}}return e}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=0),void 0===i&&(i=" "),void 0===n&&(n=3);var r;if(e+1>=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var s=Math.ceil((r=e-t.length)/2);t=new Array(1+(r-s)).join(i)+t+new Array(s+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e){t.exports=function(t){return t.reverse()}},function(t,e){t.exports=function(t){for(var e=0;e<t.length;e++)t[e].reverse();return t}},function(t,e,i){var n=i(14);t.exports=function(t){return n(t,180)}},function(t,e,i){var n=i(14);t.exports=function(t){return n(t,90)}},function(t,e,i){var n=i(14);t.exports=function(t){return n(t,-90)}},function(t,e){t.exports=function(t,e,i,n,r){if(void 0===r&&(r=t),0<i){var s=i-t.length;if(s<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),n&&n.call(r,e),e):null;for(var a=e.length-1;0<=a;)-1!==t.indexOf(e[a])&&e.splice(a,1),a--;if(0===(a=e.length))return null;0<i&&s<a&&(e.splice(s),a=s);for(var o=0;o<a;o++){var h=e[o];t.push(h),n&&n.call(r,h)}return e}},function(t,e){t.exports=function(t,e,i,n,r,s){if(void 0===i&&(i=0),void 0===s&&(s=t),0<n){var a=n-t.length;if(a<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),r&&r.call(s,e),e):null;for(var o=e.length-1;0<=o;)-1!==t.indexOf(e[o])&&e.pop(),o--;if(0===(o=e.length))return null;0<n&&a<o&&(e.splice(a),o=a);for(var h=o-1;0<=h;h--){var l=e[h];t.splice(i,0,l),r&&r.call(s,l)}return e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i<t.length&&(t.splice(i,1),t.push(e)),e}},function(t,e,i){var o=i(5);t.exports=function(t,e,i,n,r){void 0===n&&(n=0),void 0===r&&(r=t.length);var s=0;if(o(t,n,r))for(var a=n;a<r;a++){t[a][e]===i&&s++}return s}},function(t,e){t.exports=function(t,e,i){for(var n=[null],r=3;r<arguments.length;r++)n.push(arguments[r]);for(r=0;r<t.length;r++)n[0]=t[r],e.apply(i,n);return t}},function(t,e,i){var o=i(5);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),o(t,n,r)){for(var s=[null],a=5;a<arguments.length;a++)s.push(arguments[a]);for(a=n;a<r;a++)s[0]=t[a],e.apply(i,s)}return t}},function(t,e,i){var h=i(5);t.exports=function(t,e,i,n,r){void 0===n&&(n=0),void 0===r&&(r=t.length);var s=[];if(h(t,n,r))for(var a=n;a<r;a++){var o=t[a];(!e||e&&void 0===i&&o.hasOwnProperty(e)||e&&void 0!==i&&o[e]===i)&&s.push(o)}return s}},function(t,e,i){var o=i(5);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),o(t,n,r))for(var s=n;s<r;s++){var a=t[s];if(!e||e&&void 0===i&&a.hasOwnProperty(e)||e&&void 0!==i&&a[e]===i)return a}return null}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var n=e+Math.floor(Math.random()*i);return void 0===t[n]?null:t[n]}},function(t,e){t.exports=function(t,e){var i,n,r=t.indexOf(e);return 0<r&&(i=t[r-1],n=t.indexOf(i),t[r]=i,t[n]=e),t}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e);if(-1===n||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i,n,r=t.indexOf(e);return-1!==r&&r<t.length-1&&(i=t[r+1],n=t.indexOf(i),t[r]=i,t[n]=e),t}},function(t,e){t.exports=function(t,e,i,n){for(var r,s=[],a=t;a<=e;a++){i||n?(r=i?i+a.toString():a.toString(),n&&(r=r.concat(n)),s.push(r)):s.push(a)}return s}},function(t,e,i){var a=i(39);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var n=[],r=Math.max(a((e-t)/(i||1)),0),s=0;s<r;s++)n.push(t),t+=i;return n}},function(t,e){function m(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function g(t,e){return t<e?-1:e<t?1:0}var v=function(t,e,i,n,r){for(void 0===i&&(i=0),void 0===n&&(n=t.length-1),void 0===r&&(r=g);i<n;){var s,a,o,h,l,u,c;600<n-i&&(s=n-i+1,a=e-i+1,o=Math.log(s),h=.5*Math.exp(2*o/3),l=.5*Math.sqrt(o*h*(s-h)/s)*(a-s/2<0?-1:1),u=Math.max(i,Math.floor(e-a*h/s+l)),c=Math.min(n,Math.floor(e+(s-a)*h/s+l)),v(t,e,u,c,r));var f=t[e],d=i,p=n;for(m(t,i,e),0<r(t[n],f)&&m(t,i,n);d<p;){for(m(t,d,p),d++,p--;r(t[d],f)<0;)d++;for(;0<r(t[p],f);)p--}0===r(t[i],f)?m(t,i,p):m(t,++p,n),p<=e&&(i=p+1),e<=p&&(n=p-1)}};t.exports=v},function(t,e,i){var d=i(7),p=i(58);t.exports=function(t,e,i){var n,r=d(i,"max",0),s=d(i,"qty",1),a=d(i,"random",!1),o=d(i,"randomB",!1),h=d(i,"repeat",0),l=d(i,"yoyo",!1),u=[];o&&p(e),-1===h&&(h=0===r?0:(n=t.length*e.length*s,l&&(n*=2),Math.ceil(r/n)));for(var c=0;c<=h;c++){var f=function(t,e,i){for(var n=[],r=0;r<t.length;r++)for(var s=0;s<e.length;s++)for(var a=0;a<i;a++)n.push({a:t[r],b:e[s]});return n}(t,e,s);a&&p(f),u=u.concat(f),l&&(f.reverse(),u=u.concat(f))}return r&&u.splice(r),u}},function(t,e,i){var o=i(15);t.exports=function(t,e,i,n){if(void 0===n&&(n=t),!Array.isArray(e))return-1!==(s=t.indexOf(e))?(o(t,s),i&&i.call(n,e),e):null;for(var r=e.length-1;0<=r;){var s,a=e[r];-1!==(s=t.indexOf(a))?(o(t,s),i&&i.call(n,a)):e.pop(),r--}return e}},function(t,e,i){var s=i(15);t.exports=function(t,e,i,n){if(void 0===n&&(n=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var r=s(t,e);return i&&i.call(n,r),r}},function(t,e,i){var l=i(5);t.exports=function(t,e,i,n,r){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=t),l(t,e,i)){var s=i-e,a=t.splice(e,s);if(n)for(var o=0;o<a.length;o++){var h=a[o];n.call(r,h)}return a}return[]}},function(t,e,i){var r=i(15);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var n=e+Math.floor(Math.random()*i);return r(t,n)}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e),r=t.indexOf(i);return-1!==n&&-1===r&&(t[n]=i,!0)}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n<e;n++)i=t.shift(),t.push(i);return i}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n<e;n++)i=t.pop(),t.unshift(i);return i}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&0<i&&(t.splice(i,1),t.unshift(e)),e}},function(t,e,i){var o=i(5);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),o(t,n,r))for(var s=n;s<r;s++){var a=t[s];a.hasOwnProperty(e)&&(a[e]=i)}return t}},function(e,t,i){!function(){function t(t,e){return n(t.slice(),e)}function n(t,e){"function"!=typeof e&&(e=function(t,e){return String(t).localeCompare(e)});var i=t.length;if(i<=1)return t;for(var n=new Array(i),r=1;r<i;r*=2){a(t,e,r,n);var s=t;t=n,n=s}return t}t.inplace=function(t,e){var i=n(t,e);return i!==t&&a(i,null,t.length,t),t};var a=function(t,e,i,n){for(var r,s,a,o,h=t.length,l=0,u=2*i,c=0;c<h;c+=u)for(s=(r=c+i)+i,h<r&&(r=h),h<s&&(s=h),a=c,o=r;;)if(a<r&&o<s)e(t[a],t[o])<=0?n[l++]=t[a++]:n[l++]=t[o++];else if(a<r)n[l++]=t[a++];else{if(!(o<s))break;n[l++]=t[o++]}};e.exports=t}()},function(t,e){t.exports=function(t,e,i){if(e!==i){var n=t.indexOf(e),r=t.indexOf(i);if(n<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[n]=i,t[r]=e,t}}},function(t,e,i){t.exports={Alpha:i(287),AlphaSingle:i(288),Animation:i(289),BlendMode:i(310),ComputedSize:i(46),Crop:i(311),Depth:i(47),Flip:i(48),GetBounds:i(312),Mask:i(321),Origin:i(341),PathFollower:i(342),Pipeline:i(345),ScrollFactor:i(49),Size:i(346),Texture:i(347),TextureCrop:i(348),Tint:i(349),ToJSON:i(54),Transform:i(50),TransformMatrix:i(51),Visible:i(52)}},function(t,e,i){var r=i(3),n={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,n){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=r(t,0,1),this._alphaTR=r(e,0,1),this._alphaBL=r(i,0,1),this._alphaBR=r(n,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=r(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,0===(this._alphaBR=e)?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=r(t,0,1);0!==(this._alphaTL=e)&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=r(t,0,1);0!==(this._alphaTR=e)&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=r(t,0,1);0!==(this._alphaBL=e)&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=r(t,0,1);0!==(this._alphaBR=e)&&(this.renderFlags|=2)}}};t.exports=n},function(t,e,i){var n=i(3),r={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);0===(this._alpha=e)?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=r},function(t,e,i){var n=i(290),r=i(0),s=i(59),a=new r({initialize:function(t){this.parent=t,this.animationManager=t.scene.sys.anims,this.animationManager.once(s.REMOVE_ANIMATION,this.remove,this),this.isPlaying=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this._timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this._delay=0,this._repeat=0,this._repeatDelay=0,this._yoyo=!1,this.forward=!0,this._reverse=!1,this.accumulator=0,this.nextTick=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},chain:function(t){return t instanceof n&&(t=t.key),null===this.nextAnim?this.nextAnim=t:this.nextAnimsQueue.push(t),this.parent},setDelay:function(t){return void 0===t&&(t=0),this._delay=t,this.parent},getDelay:function(){return this._delay},delayedPlay:function(t,e,i){return this.play(e,!0,i),this.nextTick+=t,this.parent},getCurrentKey:function(){if(this.currentAnim)return this.currentAnim.key},load:function(t,e){return void 0===e&&(e=0),this.isPlaying&&this.stop(),this.animationManager.load(this,t,e),this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.updateFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.updateFrame(t),this.parent},isPaused:{get:function(){return this._paused}},play:function(t,e,i){return void 0===e&&(e=!1),void 0===i&&(i=0),t instanceof n&&(t=t.key),e&&this.isPlaying&&this.currentAnim.key===t?this.parent:(this.forward=!0,this._reverse=!1,this._paused=!1,this._wasPlaying=!0,this._startAnimation(t,i))},playReverse:function(t,e,i){return void 0===e&&(e=!1),void 0===i&&(i=0),t instanceof n&&(t=t.key),e&&this.isPlaying&&this.currentAnim.key===t?this.parent:(this.forward=!1,this._reverse=!0,this._startAnimation(t,i))},_startAnimation:function(t,e){this.load(t,e);var i=this.currentAnim,n=this.parent;if(!i)return n;this.repeatCounter=-1===this._repeat?Number.MAX_VALUE:this._repeat,i.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,i.showOnStart&&(n.visible=!0);var r=this.currentFrame;return i.emit(s.ANIMATION_START,i,r,n),n.emit(s.SPRITE_ANIMATION_KEY_START+t,i,r,n),n.emit(s.SPRITE_ANIMATION_START,i,r,n),n},reverse:function(){return this.isPlaying&&(this._reverse=!this._reverse,this.forward=!this.forward),this.parent},getProgress:function(){var t=this.currentFrame.progress;return this.forward||(t=1-t),t},setProgress:function(t){return this.forward||(t=1-t),this.setCurrentFrame(this.currentAnim.getFrameByProgress(t)),this.parent},remove:function(t,e){void 0===e&&(e=this.currentAnim),this.isPlaying&&e.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},getRepeat:function(){return this._repeat},setRepeat:function(t){return this._repeat=t,this.repeatCounter=-1===t?Number.MAX_VALUE:t,this.parent},getRepeatDelay:function(){return this._repeatDelay},setRepeatDelay:function(t){return this._repeatDelay=t,this.parent},restart:function(t){void 0===t&&(t=!1);var e=this.currentAnim;e.getFirstTick(this,t),this.forward=!0,this.isPlaying=!0,this.pendingRepeat=!1,this._paused=!1,this.updateFrame(e.frames[0]);var i=this.parent,n=this.currentFrame;return e.emit(s.ANIMATION_RESTART,e,n,i),i.emit(s.SPRITE_ANIMATION_KEY_RESTART+e.key,e,n,i),i.emit(s.SPRITE_ANIMATION_RESTART,e,n,i),this.parent},stop:function(){this._pendingStop=0,this.isPlaying=!1;var t,e=this.parent,i=this.currentAnim,n=this.currentFrame;return i&&(i.emit(s.ANIMATION_COMPLETE,i,n,e),e.emit(s.SPRITE_ANIMATION_KEY_COMPLETE+i.key,i,n,e),e.emit(s.SPRITE_ANIMATION_COMPLETE,i,n,e)),this.nextAnim&&(t=this.nextAnim,this.nextAnim=0<this.nextAnimsQueue.length?this.nextAnimsQueue.shift():null,this.play(t)),e},stopAfterDelay:function(t){return this._pendingStop=1,this._pendingStopValue=t,this.parent},stopOnRepeat:function(){return this._pendingStop=2,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},setTimeScale:function(t){return void 0===t&&(t=1),this._timeScale=t,this.parent},getTimeScale:function(){return this._timeScale},getTotalFrames:function(){return this.currentAnim.frames.length},update:function(t,e){if(this.currentAnim&&this.isPlaying&&!this.currentAnim.paused){if(this.accumulator+=e*this._timeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.currentAnim.completeAnimation(this);this.accumulator>=this.nextTick&&this.currentAnim.setFrame(this)}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),e},updateFrame:function(t){var e,i=this.setCurrentFrame(t);this.isPlaying&&(t.setAlpha&&(i.alpha=t.alpha),e=this.currentAnim,i.emit(s.SPRITE_ANIMATION_KEY_UPDATE+e.key,e,t,i),i.emit(s.SPRITE_ANIMATION_UPDATE,e,t,i),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this))},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off(s.REMOVE_ANIMATION,this.remove,this),this.animationManager=null,this.parent=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null}});t.exports=a},function(t,e,i){var n=i(3),r=i(0),s=i(55),a=i(59),o=i(57),m=i(309),g=i(7),h=new r({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,g(i,"frames",[]),g(i,"defaultTextureKey",null)),this.frameRate=g(i,"frameRate",null),this.duration=g(i,"duration",null),null===this.duration&&null===this.frameRate?(this.frameRate=24,this.duration=this.frameRate/this.frames.length*1e3):this.duration&&null===this.frameRate?this.frameRate=this.frames.length/(this.duration/1e3):this.duration=this.frames.length/this.frameRate*1e3,this.msPerFrame=1e3/this.frameRate,this.skipMissedFrames=g(i,"skipMissedFrames",!0),this.delay=g(i,"delay",0),this.repeat=g(i,"repeat",0),this.repeatDelay=g(i,"repeatDelay",0),this.yoyo=g(i,"yoyo",!1),this.showOnStart=g(i,"showOnStart",!1),this.hideOnComplete=g(i,"hideOnComplete",!1),this.paused=!1,this.manager.on(a.PAUSE_ALL,this.pause,this),this.manager.on(a.RESUME_ALL,this.resume,this)},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i,n,r=this.getFrames(this.manager.textureManager,e);return 0<r.length&&(0===t?this.frames=r.concat(this.frames):t===this.frames.length?this.frames=this.frames.concat(r):(i=this.frames.slice(0,t),n=this.frames.slice(t),this.frames=i.concat(r,n)),this.updateFrameSequence()),this},checkFrame:function(t){return 0<=t&&t<this.frames.length},completeAnimation:function(t){this.hideOnComplete&&(t.parent.visible=!1),t.stop()},getFirstTick:function(t,e){void 0===e&&(e=!0),t.accumulator=0,t.nextTick=t.msPerFrame+t.currentFrame.duration,e&&(t.nextTick+=t._delay)},getFrameAt:function(t){return this.frames[t]},getFrames:function(t,i,e){var n,r,s,a=[],o=1;if("string"==typeof i&&(r=i,s=t.get(r).getFrameNames(),i=[],s.forEach(function(t,e){i.push({key:r,frame:e})})),!Array.isArray(i)||0===i.length)return a;for(p=0;p<i.length;p++){var h,l,u,c=i[p],f=g(c,"key",e);f&&(h=g(c,"frame",0),l=t.getFrame(f,h),(u=new m(f,h,o,l)).duration=g(c,"duration",0),u.isFirst=!n,n&&((n.nextFrame=u).prevFrame=n),a.push(u),n=u,o++)}if(0<a.length){u.isLast=!0,u.nextFrame=a[0],a[0].prevFrame=u;for(var d=1/(a.length-1),p=0;p<a.length;p++)a[p].progress=p*d}return a},getNextTick:function(t){t.accumulator-=t.nextTick,t.nextTick=t.msPerFrame+t.currentFrame.duration},load:function(t,e){e>=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo);var i=this.frames[e];0!==e||t.forward||(i=this.getLastFrame()),t.updateFrame(i)},getFrameByProgress:function(t){return t=n(t,0,1),o(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?this.handleYoyoFrame(t,!1):0<t.repeatCounter?t._reverse&&t.forward?t.forward=!1:this.repeatAnimation(t):this.completeAnimation(t):this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){if(e=e||!1,t._reverse===!e&&0<t.repeatCounter)return t._repeatDelay&&!t.pendingRepeat||(t.forward=e),void this.repeatAnimation(t);var i;t._reverse===e||0!==t.repeatCounter?(i=(t.forward=e)?t.currentFrame.nextFrame:t.currentFrame.prevFrame,this.updateAndGetNextTick(t,i)):this.completeAnimation(t)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t._yoyo?this.handleYoyoFrame(t,!0):0<t.repeatCounter?(t._reverse&&!t.forward?t.currentFrame=this.getLastFrame():t.forward=!0,this.repeatAnimation(t)):this.completeAnimation(t):this.updateAndGetNextTick(t,e.prevFrame)},updateAndGetNextTick:function(t,e){t.updateFrame(e),this.getNextTick(t)},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){if(2===t._pendingStop)return this.completeAnimation(t);var e,i;0<t._repeatDelay&&!1===t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t._repeatDelay):(t.repeatCounter--,t.updateFrame(t.currentFrame[t.forward?"nextFrame":"prevFrame"]),t.isPlaying&&(this.getNextTick(t),t.pendingRepeat=!1,e=t.currentFrame,i=t.parent,this.emit(a.ANIMATION_REPEAT,this,e),i.emit(a.SPRITE_ANIMATION_KEY_REPEAT+this.key,this,e,t.repeatCounter,i),i.emit(a.SPRITE_ANIMATION_REPEAT,this,e,t.repeatCounter,i)))},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var e={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(t){e.frames.push(t.toJSON())}),e},updateFrameSequence:function(){for(var t,e=this.frames.length,i=1/(e-1),n=0;n<e;n++)(t=this.frames[n]).index=n+1,t.isFirst=!1,t.isLast=!1,t.progress=n*i,0===n?(t.isFirst=!0,1===e?(t.isLast=!0,(t.nextFrame=t).prevFrame=t):(t.isLast=!1,t.prevFrame=this.frames[e-1],t.nextFrame=this.frames[n+1])):n===e-1&&1<e?(t.isLast=!0,t.prevFrame=this.frames[e-2],t.nextFrame=this.frames[0]):1<e&&(t.prevFrame=this.frames[n-1],t.nextFrame=this.frames[n+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.removeAllListeners(),this.manager.off(a.PAUSE_ALL,this.pause,this),this.manager.off(a.RESUME_ALL,this.resume,this),this.manager.remove(this.key);for(var t=0;t<this.frames.length;t++)this.frames[t].destroy();this.frames=[],this.manager=null}});t.exports=h},function(t,e){t.exports="add"},function(t,e){t.exports="complete"},function(t,e){t.exports="repeat"},function(t,e){t.exports="restart"},function(t,e){t.exports="start"},function(t,e){t.exports="pauseall"},function(t,e){t.exports="remove"},function(t,e){t.exports="resumeall"},function(t,e){t.exports="animationcomplete"},function(t,e){t.exports="animationcomplete-"},function(t,e){t.exports="animationrepeat-"},function(t,e){t.exports="animationrestart-"},function(t,e){t.exports="animationstart-"},function(t,e){t.exports="animationupdate-"},function(t,e){t.exports="animationrepeat"},function(t,e){t.exports="animationrestart"},function(t,e){t.exports="animationstart"},function(t,e){t.exports="animationupdate"},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e,i){var n=i(16),r={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),-1<=(t|=0)&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=r},function(t,e){var i={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){return void 0===t?this.isCropped=!1:this.frame&&("number"==typeof t?this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY):this.frame.setCropUVs(this._crop,t.x,t.y,t.width,t.height,this.flipX,this.flipY),this.isCropped=!0),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=i},function(t,e,i){var u=i(24),n=i(38),r=i(1),s={prepareBoundsOutput:function(t,e){return void 0===e&&(e=!1),0!==this.rotation&&n(t,this.x,this.y,this.rotation),e&&this.parentContainer&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t),t},getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,n,r,s,a,o,h,l;return void 0===t&&(t=new u),h=(o=(this.parentContainer?(l=this.parentContainer.getBoundsTransformMatrix(),this.getTopLeft(t),l.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),l.transformPoint(t.x,t.y,t),n=t.x,r=t.y,this.getBottomLeft(t),l.transformPoint(t.x,t.y,t),s=t.x,a=t.y,this.getBottomRight(t),l.transformPoint(t.x,t.y,t)):(this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),n=t.x,r=t.y,this.getBottomLeft(t),s=t.x,a=t.y,this.getBottomRight(t)),t.x),t.y),t.x=Math.min(e,n,s,o),t.y=Math.min(i,r,a,h),t.width=Math.max(e,n,s,o)-t.x,t.height=Math.max(i,r,a,h)-t.y,t}};t.exports=s},function(t,e){t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i)}},function(t,e,i){var a=i(60),o=i(61);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0<i&&(e=o(t)/i);for(var r=0;r<e;r++){var s=r/e;n.push(a(t,s))}return n}},function(t,e,i){var n=i(0),r=i(316),s=i(317),a=i(25),o=i(319),h=i(1),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return s(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},function(t,e,i){var n=i(12);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e,i){var f=i(318),d=i(12);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0<i&&(e=f(t)/i);for(var r=t.x1,s=t.y1,a=t.x2,o=t.y2,h=0;h<e;h++){var l=h/e,u=r+(a-r)*l,c=s+(o-s)*l;n.push(new d(u,c))}return n}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e,i){var n=i(12);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},function(t,e,i){var n=i(12);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){var n=i(322),r=i(340),s={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t){return void 0===t&&(this.texture||this.shader)&&(t=this),new n(this.scene,t)},createGeometryMask:function(t){return void 0===t&&"Graphics"===this.type&&(t=this),new r(this.scene,t)}};t.exports=s},function(t,e,i){var n=i(0),l=i(323),r=new n({initialize:function(t,e){var i,n,r,s,a,o,h=t.sys.game.renderer;this.renderer=h,this.bitmapMask=e,this.maskTexture=null,this.mainTexture=null,this.dirty=!0,this.mainFramebuffer=null,this.maskFramebuffer=null,this.prevFramebuffer=null,this.invertAlpha=!1,this.isStencil=!1,h&&h.gl&&(i=h.width,n=h.height,r=0==(i&i-1)&&0==(n&n-1),s=h.gl,a=r?s.REPEAT:s.CLAMP_TO_EDGE,o=s.LINEAR,this.mainTexture=h.createTexture2D(0,o,o,a,a,s.RGBA,null,i,n),this.maskTexture=h.createTexture2D(0,o,o,a,a,s.RGBA,null,i,n),this.mainFramebuffer=h.createFramebuffer(i,n,this.mainTexture,!0),this.maskFramebuffer=h.createFramebuffer(i,n,this.maskTexture,!0),t.sys.game.events.on(l.CONTEXT_RESTORED,function(t){var e=t.width,i=t.height,n=0==(e&e-1)&&0==(i&i-1),r=t.gl,s=n?r.REPEAT:r.CLAMP_TO_EDGE,a=r.LINEAR;this.mainTexture=t.createTexture2D(0,a,a,s,s,r.RGBA,null,e,i),this.maskTexture=t.createTexture2D(0,a,a,s,s,r.RGBA,null,e,i),this.mainFramebuffer=t.createFramebuffer(e,i,this.mainTexture,!0),this.maskFramebuffer=t.createFramebuffer(e,i,this.maskTexture,!0)},this))},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BitmapMaskPipeline.beginMask(this,e,i)},postRenderWebGL:function(t,e){t.pipelines.BitmapMaskPipeline.endMask(this,e)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null;var t=this.renderer;t&&t.gl&&(t.deleteTexture(this.mainTexture),t.deleteTexture(this.maskTexture),t.deleteFramebuffer(this.mainFramebuffer),t.deleteFramebuffer(this.maskFramebuffer)),this.mainTexture=null,this.maskTexture=null,this.mainFramebuffer=null,this.maskFramebuffer=null,this.prevFramebuffer=null,this.renderer=null}});t.exports=r},function(t,e,i){t.exports={BLUR:i(324),BOOT:i(325),CONTEXT_LOST:i(326),CONTEXT_RESTORED:i(327),DESTROY:i(328),FOCUS:i(329),HIDDEN:i(330),PAUSE:i(331),POST_RENDER:i(332),POST_STEP:i(333),PRE_RENDER:i(334),PRE_STEP:i(335),READY:i(336),RESUME:i(337),STEP:i(338),VISIBLE:i(339)}},function(t,e){t.exports="blur"},function(t,e){t.exports="boot"},function(t,e){t.exports="contextlost"},function(t,e){t.exports="contextrestored"},function(t,e){t.exports="destroy"},function(t,e){t.exports="focus"},function(t,e){t.exports="hidden"},function(t,e){t.exports="pause"},function(t,e){t.exports="postrender"},function(t,e){t.exports="poststep"},function(t,e){t.exports="prerender"},function(t,e){t.exports="prestep"},function(t,e){t.exports="ready"},function(t,e){t.exports="resume"},function(t,e){t.exports="step"},function(t,e){t.exports="visible"},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,i){var n=t.gl;t.flush(),0===t.maskStack.length&&(n.enable(n.STENCIL_TEST),n.clear(n.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var n=t.gl,r=this.geometryMask,s=t.maskCount;n.colorMask(!1,!1,!1,!1),i?(n.stencilFunc(n.EQUAL,s,255),n.stencilOp(n.KEEP,n.KEEP,n.INCR)):(n.stencilFunc(n.EQUAL,s+1,255),n.stencilOp(n.KEEP,n.KEEP,n.DECR)),r.renderWebGL(t,r,0,e),t.flush(),n.colorMask(!0,!0,!0,!0),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),i?this.invertAlpha?n.stencilFunc(n.NOTEQUAL,s+1,255):n.stencilFunc(n.EQUAL,s+1,255):this.invertAlpha?n.stencilFunc(n.NOTEQUAL,s,255):n.stencilFunc(n.EQUAL,s,255)},postRenderWebGL:function(t){var e,i=t.gl;t.maskStack.pop(),t.maskCount--,0===t.maskStack.length?(t.flush(),t.currentMask.mask=null,i.disable(i.STENCIL_TEST)):(t.flush(),(e=t.maskStack[t.maskStack.length-1]).mask.applyStencil(t,e.camera,!1),t.currentCameraMask.mask!==e.mask?(t.currentMask.mask=e.mask,t.currentMask.camera=e.camera):t.currentMask.mask=null)},preRenderCanvas:function(t,e,i){var n=this.geometryMask;t.currentContext.save(),n.renderCanvas(t,n,0,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=n},function(t,e){var i={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=i},function(t,e,i){var h=i(18),a=i(343),o=i(7),l=i(344),u=i(1),n={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:l.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=o(t,"from",0),t.to=o(t,"to",1);var n=a(t,"positionOnPath",!1);this.rotateToPath=a(t,"rotateToPath",!1),this.pathRotationOffset=o(t,"rotationOffset",0);var r,s=o(t,"startAt",e);return s&&(t.onStart=function(t){var e=t.data[0];e.progress=s,e.elapsed=e.duration*s;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.target[e.key]=e.current}),this.pathOffset||(this.pathOffset=new u(this.x,this.y)),this.pathVector||(this.pathVector=new u),this.pathDelta||(this.pathDelta=new u),this.pathDelta.reset(),this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),n&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=l.PLAYING_FORWARD,this.rotateToPath&&(r=this.path.getPoint(.1),this.rotation=Math.atan2(r.y-this.y,r.x-this.x)+h(this.pathRotationOffset)),this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t){var e=t.data[0],i=this.pathDelta,n=this.pathVector;if(i.copy(n).negate(),e.state===l.COMPLETE)return this.path.getPoint(1,n),i.add(n),n.add(this.pathOffset),void this.setPosition(n.x,n.y);if(e.state!==l.PLAYING_FORWARD&&e.state!==l.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),n),i.add(n),n.add(this.pathOffset);var r=this.x,s=this.y;this.setPosition(n.x,n.y);var a=this.x-r,o=this.y-s;if(0==a&&0==o)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(o,a)+h(this.pathRotationOffset))}}};t.exports=n},function(t,e){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e){var i={defaultPipeline:null,pipeline:null,initPipeline:function(t){void 0===t&&(t="MultiPipeline");var e=this.scene.sys.game.renderer;return!!(e&&e.gl&&e.hasPipeline(t))&&(this.defaultPipeline=e.getPipeline(t),this.pipeline=this.defaultPipeline,!0)},setPipeline:function(t){var e=this.scene.sys.game.renderer;return e&&e.gl&&e.hasPipeline(t)&&(this.pipeline=e.getPipeline(t)),this},resetPipeline:function(){return this.pipeline=this.defaultPipeline,null!==this.pipeline},getPipelineName:function(){return this.pipeline.name}};t.exports=i},function(t,e){var i={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e){var i={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=i},function(t,e){var i={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){return void 0===t?this.isCropped=!1:this.frame&&("number"==typeof t?this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY):this.frame.setCropUVs(this._crop,t.x,t.y,t.width,t.height,this.flipX,this.flipY),this.isCropped=!0),this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=i},function(t,e,i){var r=i(350),n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,_isTinted:!1,tintFill:!1,clearTint:function(){return this.setTint(16777215),this._isTinted=!1,this},setTint:function(t,e,i,n){return void 0===t&&(t=16777215),void 0===e&&(n=i=e=t),this._tintTL=r(t),this._tintTR=r(e),this._tintBL=r(i),this._tintBR=r(n),this._isTinted=!0,this.tintFill=!1,this},setTintFill:function(t,e,i,n){return this.setTint(t,e,i,n),this.tintFill=!0,this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=r(t),this._isTinted=!0}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=r(t),this._isTinted=!0}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=r(t),this._isTinted=!0}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=r(t),this._isTinted=!0}},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){return this._isTinted}}};t.exports=n},function(t,e){t.exports=function(t){return(t>>16)+(65280&t)+((255&t)<<16)}},function(t,e,i){var n=i(4),r=i(4),n=i(352),r=i(353);t.exports={renderWebGL:n,renderCanvas:r}},function(t,e){t.exports=function(t,e,i,n,r){var s=e.list;if(0!==s.length){var a=e.localTransform;r?(a.loadIdentity(),a.multiply(r),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY)):a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var o=-1!==e.blendMode;o||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=s,f=s.length,d=0;d<f;d++){var p,m,g,v,M,x,y,w,T=s[d];T.willRender(n)&&(v=void 0!==T.alphaTopLeft?(p=T.alphaTopLeft,m=T.alphaTopRight,g=T.alphaBottomLeft,T.alphaBottomRight):g=m=p=T.alpha,M=T.scrollFactorX,x=T.scrollFactorY,o||T.blendMode===t.currentBlendMode||t.setBlendMode(T.blendMode),(y=T.mask)&&y.preRenderWebGL(t,T,n),(w=T.type)!==t.currentType&&(t.newType=!0,t.currentType=w),t.nextTypeMatch=d<f-1&&c[d+1].type===t.currentType,T.setScrollFactor(M*l,x*u),T.setAlpha(p*h,m*h,g*h,v*h),T.renderWebGL(t,T,i,n,a),T.setAlpha(p,m,g,v),T.setScrollFactor(M,x),y&&y.postRenderWebGL(t,n),t.newType=!1)}}}},function(t,e){t.exports=function(t,e,i,n,r){var s=e.list;if(0!==s.length){var a=e.localTransform;r?(a.loadIdentity(),a.multiply(r),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY)):a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var o=-1!==e.blendMode;o||t.setBlendMode(0);var h=e._alpha,l=e.scrollFactorX,u=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,n);for(var c=0;c<s.length;c++){var f,d,p,m=s[c];m.willRender(n)&&(f=m.alpha,d=m.scrollFactorX,p=m.scrollFactorY,o||m.blendMode===t.currentBlendMode||t.setBlendMode(m.blendMode),m.setScrollFactor(d*l,p*u),m.setAlpha(f*h),m.renderCanvas(t,m,i,n,a),m.setAlpha(f),m.setScrollFactor(d,p))}e.mask&&e.mask.postRenderCanvas(t)}}},function(t,e,i){var o=i(24);t.exports=function(t,e,i){void 0===i&&(i=new o);var n=Math.min(t.x,e.x),r=Math.min(t.y,e.y),s=Math.max(t.right,e.right)-n,a=Math.max(t.bottom,e.bottom)-r;return i.setTo(n,r,s,a)}},function(t,e,i){var n=i(4),r=i(4),n=i(356),r=i(357);t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){var y=i(9),w=i(3),T=i(10),E=i(6);t.exports=function(t,e,i,n,r){var s=e.plugin.sceneRenderer,a=e.list;if(0!==a.length){var o=e.localTransform;r?(o.loadIdentity(),o.multiply(r),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var h=e.alpha,l=e.scrollFactorX,u=e.scrollFactorY;t.newType&&s.begin();for(var c=0;c<a.length;c++){var f,d,p,m,g=a[c],v=g.skeleton,M=v.color.a,x=!(15!==g.renderFlags||0!==g.cameraFilter&&g.cameraFilter&n.id||0===M);v&&x&&(f=t._tempMatrix1,d=t._tempMatrix2,p=t._tempMatrix3,d.applyITRS(g.x,g.y,g.rotation,Math.abs(g.scaleX),Math.abs(g.scaleY)),f.copyFrom(n.matrix),f.multiplyWithOffset(o,-n.scrollX*l,-n.scrollY*u),d.e=g.x,d.f=g.y,f.multiply(d,p),m=t.height,v.x=p.tx,v.y=m-p.ty,v.scaleX=p.scaleX,v.scaleY=p.scaleY,g.scaleX<0?(v.scaleX*=-1,g.root.rotation=T(p.rotationNormalized)):g.root.rotation=E(T(y(p.rotationNormalized))+90,0,360),g.scaleY<0&&(v.scaleY*=-1,g.scaleX<0?g.root.rotation-=2*T(p.rotationNormalized):g.root.rotation+=2*T(p.rotationNormalized)),!n.renderToTexture&&null===t.currentFramebuffer||(v.y=p.ty,v.scaleY*=-1),v.updateWorldTransform(),v.color.a=w(M*h,0,1),s.drawSkeleton(v,g.preMultipliedAlpha),v.color.a=M)}t.nextTypeMatch||(s.end(),t.finalType||t.rebindPipeline(t.pipelines.MultiPipeline))}else s.batcher.isDrawing&&t.finalType&&s.end()}},function(t,e){t.exports=function(t,e,i,n,r){var s=e.list;if(0!==s.length){var a=e.localTransform;r?(a.loadIdentity(),a.multiply(r),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY)):a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var o=-1!==e.blendMode;o||t.setBlendMode(0);var h=e._alpha,l=e.scrollFactorX,u=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,n);for(var c=0;c<s.length;c++){var f,d,p,m=s[c];m.willRender(n)&&(f=m.alpha,d=m.scrollFactorX,p=m.scrollFactorY,o||m.blendMode===t.currentBlendMode||t.setBlendMode(m.blendMode),m.setScrollFactor(d*l,p*u),m.setAlpha(f*h),m.renderCanvas(t,m,i,n,a),m.setAlpha(f),m.setScrollFactor(d,p))}e.mask&&e.mask.postRenderCanvas(t)}}}]); |