!function(T,_){!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{(void 0!==T?T:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).PIXI=t()}}(function(){return function o(s,a,h){function l(r,t){if(!a[r]){if(!s[r]){var e="function"==typeof require&&require;if(!t&&e)return e(r,!0);if(u)return u(r,!0);var i=new Error("Cannot find module '"+r+"'");throw i.code="MODULE_NOT_FOUND",i}var n=a[r]={exports:{}};s[r][0].call(n.exports,function(t){var e=s[r][1][t];return l(e||t)},n,n.exports,o,s,a,h)}return a[r].exports}for(var u="function"==typeof require&&require,t=0;t>31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t>>=e))<<3,e|=r=(15<(t>>>=r))<<2,(e|=r=(3<(t>>>=r))<<1)|(t>>>=r)>>1},r.log10=function(t){return 1e9<=t?9:1e8<=t?8:1e7<=t?7:1e6<=t?6:1e5<=t?5:1e4<=t?4:1e3<=t?3:100<=t?2:10<=t?1:0},r.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},r.countTrailingZeros=i,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},r.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var n=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,i=e,n=7;for(r>>>=1;r;r>>>=1)i<<=1,i|=1&r,--n;t[e]=i<>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},r.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},r.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},r.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},r.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},r.nextCombination=function(t){var e=t|t-1;return 1+e|(~e&-~e)-1>>>i(t)+1}},{}],2:[function(t,e,r){"use strict";function i(t,e,r){r=r||2;var i,n,o,s,a,h,l,u=e&&e.length,c=u?e[0]*r:t.length,d=g(t,0,c,r,!0),p=[];if(!d)return p;if(u&&(d=function(t,e,r,i){var n,o,s,a,h,l=[];for(n=0,o=e.length;n80*r){i=o=t[0],n=s=t[1];for(var f=r;fo.x?n.x>s.x?n.x:s.x:o.x>s.x?o.x:s.x,u=n.y>o.y?n.y>s.y?n.y:s.y:o.y>s.y?o.y:s.y,c=_(a,h,e,r,i),d=_(l,u,e,r,i),p=t.prevZ,f=t.nextZ;p&&p.z>=c&&f&&f.z<=d;){if(p!==t.prev&&p!==t.next&&T(n.x,n.y,o.x,o.y,s.x,s.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;if(p=p.prevZ,f!==t.prev&&f!==t.next&&T(n.x,n.y,o.x,o.y,s.x,s.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;f=f.nextZ}for(;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&T(n.x,n.y,o.x,o.y,s.x,s.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.prevZ}for(;f&&f.z<=d;){if(f!==t.prev&&f!==t.next&&T(n.x,n.y,o.x,o.y,s.x,s.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;f=f.nextZ}return!0}function d(t,e,r){var i=t;do{var n=i.prev,o=i.next.next;!a(n,o)&&f(n,i,i.next,o)&&E(n,o)&&E(o,n)&&(e.push(n.i/r),e.push(i.i/r),e.push(o.i/r),M(i),M(i.next),i=t=o),i=i.next}while(i!==t);return i}function p(t,e,r,i,n,o){var s,a,h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&(a=l,(s=h).next.i!==a.i&&s.prev.i!==a.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&f(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(s,a)&&E(s,a)&&E(a,s)&&function(t,e){var r=t,i=!1,n=(t.x+e.x)/2,o=(t.y+e.y)/2;for(;r.y>o!=r.next.y>o&&r.next.y!==r.y&&n<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next,r!==t;);return i}(s,a))){var u=S(h,l);return h=m(h,h.next),u=m(u,u.next),v(h,e,r,i,n,o),void v(u,e,r,i,n,o)}l=l.next}h=h.next}while(h!==t)}function y(t,e){return t.x-e.x}function x(t,e){if(e=function(t,e){var r,i=e,n=t.x,o=t.y,s=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var a=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=n&&s=i.x&&i.x>=u&&n!==i.x&&T(or.x)&&E(i,t)&&(r=i,d=h),i=i.next;return r}(t,e)){var r=S(e,t);m(r,r.next)}}function _(t,e,r,i,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*n)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*n)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function b(t){for(var e=t,r=t;e.x=t.byteLength?i.bufferSubData(this.type,e,t):i.bufferData(this.type,t,this.drawType),this.data=t},n.prototype.bind=function(){this.gl.bindBuffer(this.type,this.buffer)},n.createVertexBuffer=function(t,e,r){return new n(t,t.ARRAY_BUFFER,e,r)},n.createIndexBuffer=function(t,e,r){return new n(t,t.ELEMENT_ARRAY_BUFFER,e,r)},n.create=function(t,e,r,i){return new n(t,e,r,i)},n.prototype.destroy=function(){this.gl.deleteBuffer(this.buffer)},e.exports=n},{}],10:[function(t,e,r){function s(t,e,r){this.gl=t,this.framebuffer=t.createFramebuffer(),this.stencil=null,this.texture=null,this.width=e||100,this.height=r||100}var a=t("./GLTexture");s.prototype.enableTexture=function(t){var e=this.gl;this.texture=t||new a(e),this.texture.bind(),this.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture.texture,0)},s.prototype.enableStencil=function(){if(!this.stencil){var t=this.gl;this.stencil=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,this.stencil),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,this.stencil),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,this.width,this.height)}},s.prototype.clear=function(t,e,r,i){this.bind();var n=this.gl;n.clearColor(t,e,r,i),n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT)},s.prototype.bind=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer)},s.prototype.unbind=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,null)},s.prototype.resize=function(t,e){var r=this.gl;this.width=t,this.height=e,this.texture&&this.texture.uploadData(null,t,e),this.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,this.stencil),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e))},s.prototype.destroy=function(){var t=this.gl;this.texture&&this.texture.destroy(),t.deleteFramebuffer(this.framebuffer),this.gl=null,this.stencil=null,this.texture=null},s.createRGBA=function(t,e,r,i){var n=a.fromData(t,null,e,r);n.enableNearestScaling(),n.enableWrapClamp();var o=new s(t,e,r);return o.enableTexture(n),o.unbind(),o},s.createFloat32=function(t,e,r,i){var n=new a.fromData(t,i,e,r);n.enableNearestScaling(),n.enableWrapClamp();var o=new s(t,e,r);return o.enableTexture(n),o.unbind(),o},e.exports=s},{"./GLTexture":12}],11:[function(t,e,r){function i(t,e,r,i,n){this.gl=t,i&&(e=h(e,i),r=h(r,i)),this.program=o(t,e,r,n),this.attributes=s(t,this.program),this.uniformData=a(t,this.program),this.uniforms=l(t,this.uniformData)}var o=t("./shader/compileProgram"),s=t("./shader/extractAttributes"),a=t("./shader/extractUniforms"),h=t("./shader/setPrecision"),l=t("./shader/generateUniformAccessObject");i.prototype.bind=function(){return this.gl.useProgram(this.program),this},i.prototype.destroy=function(){this.attributes=null,this.uniformData=null,this.uniforms=null,this.gl.deleteProgram(this.program)},e.exports=i},{"./shader/compileProgram":17,"./shader/extractAttributes":19,"./shader/extractUniforms":20,"./shader/generateUniformAccessObject":21,"./shader/setPrecision":25}],12:[function(t,e,r){function o(t,e,r,i,n){this.gl=t,this.texture=t.createTexture(),this.mipmap=!1,this.premultiplyAlpha=!1,this.width=e||-1,this.height=r||-1,this.format=i||t.RGBA,this.type=n||t.UNSIGNED_BYTE}var n=!(o.prototype.upload=function(t){this.bind();var e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha);var r=t.videoWidth||t.width,i=t.videoHeight||t.height;i!==this.height||r!==this.width?e.texImage2D(e.TEXTURE_2D,0,this.format,this.format,this.type,t):e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.format,this.type,t),this.width=r,this.height=i});o.prototype.uploadData=function(t,e,r){this.bind();var i=this.gl;if(t instanceof Float32Array){if(!n){if(!i.getExtension("OES_texture_float"))throw new Error("floating point textures not available");n=!0}this.type=i.FLOAT}else this.type=this.type||i.UNSIGNED_BYTE;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),e!==this.width||r!==this.height?i.texImage2D(i.TEXTURE_2D,0,this.format,e,r,0,this.format,this.type,t||null):i.texSubImage2D(i.TEXTURE_2D,0,0,0,e,r,this.format,this.type,t||null),this.width=e,this.height=r},o.prototype.bind=function(t){var e=this.gl;void 0!==t&&e.activeTexture(e.TEXTURE0+t),e.bindTexture(e.TEXTURE_2D,this.texture)},o.prototype.unbind=function(){var t=this.gl;t.bindTexture(t.TEXTURE_2D,null)},o.prototype.minFilter=function(t){var e=this.gl;this.bind(),this.mipmap?e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR_MIPMAP_LINEAR:e.NEAREST_MIPMAP_NEAREST):e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR:e.NEAREST)},o.prototype.magFilter=function(t){var e=this.gl;this.bind(),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t?e.LINEAR:e.NEAREST)},o.prototype.enableMipmap=function(){var t=this.gl;this.bind(),this.mipmap=!0,t.generateMipmap(t.TEXTURE_2D)},o.prototype.enableLinearScaling=function(){this.minFilter(!0),this.magFilter(!0)},o.prototype.enableNearestScaling=function(){this.minFilter(!1),this.magFilter(!1)},o.prototype.enableWrapClamp=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE)},o.prototype.enableWrapRepeat=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT)},o.prototype.enableWrapMirrorRepeat=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.MIRRORED_REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.MIRRORED_REPEAT)},o.prototype.destroy=function(){this.gl.deleteTexture(this.texture)},o.fromSource=function(t,e,r){var i=new o(t);return i.premultiplyAlpha=r||!1,i.upload(e),i},o.fromData=function(t,e,r,i){var n=new o(t);return n.uploadData(e,r,i),n},e.exports=o},{}],13:[function(t,e,r){var n=t("./setVertexAttribArrays");function i(t,e){if(this.nativeVaoExtension=null,i.FORCE_NATIVE||(this.nativeVaoExtension=t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object")),this.nativeState=e,this.nativeVaoExtension){this.nativeVao=this.nativeVaoExtension.createVertexArrayOES();var r=t.getParameter(t.MAX_VERTEX_ATTRIBS);this.nativeState={tempAttribState:new Array(r),attribState:new Array(r)}}this.gl=t,this.attributes=[],this.indexBuffer=null,this.dirty=!1}i.prototype.constructor=i,(e.exports=i).FORCE_NATIVE=!1,i.prototype.bind=function(){if(this.nativeVao){if(this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao),this.dirty)return this.dirty=!1,this.activate(),this;this.indexBuffer&&this.indexBuffer.bind()}else this.activate();return this},i.prototype.unbind=function(){return this.nativeVao&&this.nativeVaoExtension.bindVertexArrayOES(null),this},i.prototype.activate=function(){for(var t=this.gl,e=null,r=0;r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=y-x,E=Math.floor,S=String.fromCharCode;function M(t){throw new RangeError(c[t])}function p(t,e){for(var r=t.length,i=[];r--;)i[r]=e(t[r]);return i}function f(t,e){var r=t.split("@"),i="";return 1>>10&1023|55296),t=56320|1023&t),e+=S(t)}).join("")}function C(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function I(t,e,r){var i=0;for(t=r?E(t/a):t>>1,t+=E(t/e);d*_>>1E((v-f)/s))&&M("overflow"),f+=h*s,!(h<(l=a<=m?x:m+_<=a?_:a-m));a+=y)s>E(v/(u=y-l))&&M("overflow"),s*=u;m=I(f-o,e=d.length+1,0==o),E(f/e)>v-g&&M("overflow"),g+=E(f/e),f%=e,d.splice(f++,0,g)}return P(d)}function m(t){var e,r,i,n,o,s,a,h,l,u,c,d,p,f,g,m=[];for(d=(t=D(t)).length,e=T,o=b,s=r=0;sE((v-r)/(p=i+1))&&M("overflow"),r+=(a-e)*p,e=a,s=0;sv&&M("overflow"),c==e){for(h=r,l=y;!(h<(u=l<=o?x:o+_<=l?_:l-o));l+=y)g=h-u,f=y-u,m.push(S(C(u+g%f,0))),h=E(g/f);m.push(S(C(h,0))),o=I(r,p,i==n),r=0,++i}++r,++e}return m.join("")}if(n={version:"1.4.1",ucs2:{decode:D,encode:P},decode:g,encode:m,toASCII:function(t){return f(t,function(t){return l.test(t)?"xn--"+m(t):t})},toUnicode:function(t){return f(t,function(t){return h.test(t)?g(t.slice(4).toLowerCase()):t})}},e&&r)if(O.exports==e)r.exports=n;else for(o in n)n.hasOwnProperty(o)&&(e[o]=n[o]);else t.punycode=n}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:void 0!==T?T:{})},{}],28:[function(t,e,r){"use strict";e.exports=function(t,e,r,i){e=e||"&",r=r||"=";var n={};if("string"!=typeof t||0===t.length)return n;var o=/\+/g;t=t.split(e);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var a,h,l=t.length;0>2,n[1]=(3&i[0])<<4|i[1]>>4,n[2]=(15&i[1])<<2|i[2]>>6,n[3]=63&i[2],r-(t.length-1)){case 2:n[3]=64,n[2]=64;break;case 1:n[3]=64}for(var s=0;s",'"',"`"," ","\r","\n","\t"]),N=["'"].concat(n),B=["%","/","?",";","#"].concat(N),F=["/","?","#"],U=/^[+a-z0-9A-Z_-]{0,63}$/,X=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,j={javascript:!0,"javascript:":!0},V={javascript:!0,"javascript:":!0},W={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Y=t("querystring");function o(t,e,r){if(t&&k.isObject(t)&&t instanceof D)return t;var i=new D;return i.parse(t,e,r),i}D.prototype.parse=function(t,e,r){if(!k.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),n=-1!==i&&ithis.renderer.width&&(t.width=this.renderer.width-t.x),t.y+t.height>this.renderer.height&&(t.height=this.renderer.height-t.y)},a.prototype.addChild=function(t){var e=this.pool.pop();e||((e=_.createElement("button")).style.width="100px",e.style.height="100px",e.style.backgroundColor=this.debug?"rgba(255,0,0,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=2,e.style.borderStyle="none",e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),t.accessibleTitle?e.title=t.accessibleTitle:t.accessibleTitle||t.accessibleHint||(e.title="displayObject "+this.tabIndex),t.accessibleHint&&e.setAttribute("aria-label",t.accessibleHint),t._accessibleActive=!0,(t._accessibleDiv=e).displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex},a.prototype._onClick=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"click",e.eventData)},a.prototype._onFocus=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseover",e.eventData)},a.prototype._onFocusOut=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseout",e.eventData)},a.prototype._onKeyDown=function(t){9===t.keyCode&&this.activate()},a.prototype._onMouseMove=function(){this.deactivate()},a.prototype.destroy=function(){this.div=null;for(var t=0;t]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,r.SHAPES={POLY:0,RECT:1,CIRC:2,ELIP:3,RREC:4},r.PRECISION={LOW:"lowp",MEDIUM:"mediump",HIGH:"highp"},r.TRANSFORM_MODE={STATIC:0,DYNAMIC:1},r.TEXT_GRADIENT={LINEAR_VERTICAL:0,LINEAR_HORIZONTAL:1},r.UPDATE_PRIORITY={INTERACTION:50,HIGH:25,NORMAL:0,LOW:-25,UTILITY:-50}},{}],47:[function(t,e,r){"use strict";r.__esModule=!0;var i=t("../math");var n=(o.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},o.prototype.clear=function(){this.updateID++,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},o.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?i.Rectangle.EMPTY:((t=t||new i.Rectangle(0,0,1,1)).x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},o.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},o.prototype.addQuad=function(t){var e=this.minX,r=this.minY,i=this.maxX,n=this.maxY,o=t[0],s=t[1];e=oi?t.maxX:i,this.maxY=t.maxY>n?t.maxY:n},o.prototype.addBoundsMask=function(t,e){var r=t.minX>e.minX?t.minX:e.minX,i=t.minY>e.minY?t.minY:e.minY,n=t.maxXe.x?t.minX:e.x,i=t.minY>e.y?t.minY:e.y,n=t.maxXthis.children.length)throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),t},c.prototype.swapChildren=function(t,e){if(t!==e){var r=this.getChildIndex(t),i=this.getChildIndex(e);this.children[r]=e,this.children[i]=t,this.onChildrenChange(r=this.children.length)throw new Error("The index "+e+" supplied is out of bounds "+this.children.length);var r=this.getChildIndex(t);(0,s.removeItems)(this.children,r,1),this.children.splice(e,0,t),this.onChildrenChange(e)},c.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},c.prototype.removeChild=function(t){var e=arguments.length;if(1>16&255)/255,r=(t.tint>>8&255)/255,i=(255&t.tint)/255,n=0;n>16&255)/255*e*255<<16)+((s>>8&255)/255*r*255<<8)+(255&s)/255*i*255,o._lineTint=((a>>16&255)/255*e*255<<16)+((a>>8&255)/255*r*255<<8)+(255&a)/255*i*255}},a.prototype.renderPolygon=function(t,e,r){r.moveTo(t[0],t[1]);for(var i=1;i=this.x&&t=this.y&&et.x+t.width&&(this.width=t.width-this.x,this.width<0&&(this.width=0)),this.y+this.height>t.y+t.height&&(this.height=t.height-this.y,this.height<0&&(this.height=0))},a.prototype.enlarge=function(t){var e=Math.min(this.x,t.x),r=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),n=Math.max(this.y+this.height,t.y+t.height);this.x=e,this.width=r-e,this.y=i,this.height=n-i},i(a,[{key:"left",get:function(){return this.x}},{key:"right",get:function(){return this.x+this.width}},{key:"top",get:function(){return this.y}},{key:"bottom",get:function(){return this.y+this.height}}],[{key:"EMPTY",get:function(){return new a(0,0,0,0)}}]),a);function a(){var t=0=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height){if(e>=this.y+this.radius&&e<=this.y+this.height-this.radius||t>=this.x+this.radius&&t<=this.x+this.width-this.radius)return!0;var r=t-(this.x+this.radius),i=e-(this.y+this.radius),n=this.radius*this.radius;if(r*r+i*i<=n)return!0;if((r=t-(this.x+this.width-this.radius))*r+i*i<=n)return!0;if(r*r+(i=e-(this.y+this.height-this.radius))*i<=n)return!0;if((r=t-(this.x+this.radius))*r+i*i<=n)return!0}return!1},s);function s(){var t=0this.checkCountMax&&(this.checkCount=0,this.run()))},h.prototype.run=function(){for(var t=this.renderer.textureManager,e=t._managedTextures,r=!1,i=0;ithis.maxIdle&&(t.destroyTexture(n,!0),r=!(e[i]=null))}if(r){for(var o=0,s=0;s 0.5)"," {"," color = vec4(1.0, 0.0, 0.0, 1.0);"," }"," else"," {"," color = vec4(0.0, 1.0, 0.0, 1.0);"," }"," gl_FragColor = mix(sample, masky, 0.5);"," gl_FragColor *= sample.a;","}"].join("\n")}}]),d);function d(t,e,r){for(var i in function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),this.vertexSrc=t||d.defaultVertexSrc,this.fragmentSrc=e||d.defaultFragmentSrc,this._blendMode=a.BLEND_MODES.NORMAL,this.uniformData=r||(0,o.default)(this.vertexSrc,this.fragmentSrc,"projectionMatrix|uSampler"),this.uniforms={},this.uniformData)this.uniforms[i]=this.uniformData[i].value,this.uniformData[i].type&&(this.uniformData[i].type=this.uniformData[i].type.toLowerCase());this.glShaders={},u[this.vertexSrc+this.fragmentSrc]||(u[this.vertexSrc+this.fragmentSrc]=(0,s.uid)()),this.glShaderKey=u[this.vertexSrc+this.fragmentSrc],this.padding=4,this.resolution=h.default.FILTER_RESOLUTION,this.enabled=!0,this.autoFit=!0}r.default=c},{"../../../const":46,"../../../settings":101,"../../../utils":125,"./extractUniformsFromSrc":87}],87:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t,e,r){var i=o(t),n=o(e);return Object.assign(i,n)};var i,n=t("pixi-gl-core");var c=((i=n)&&i.__esModule?i:{default:i}).default.shader.defaultValue;function o(t){for(var e=new RegExp("^(projectionMatrix|uSampler|filterArea|filterClamp)$"),r={},i=void 0,n=t.replace(/\s+/g," ").split(/\s*;\s*/),o=0;o=i&&d.x=n&&d.y>16)+(65280&t)+((255&t)<<16)}},{key:"texture",get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture=t,this.cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))}}]),f);function f(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f);var e=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,c.call(this));return e._anchor=new o.ObservablePoint(e._onAnchorUpdate,e),e._texture=null,e._width=0,e._height=0,e._tint=null,e._tintRGB=null,e.tint=16777215,e.blendMode=a.BLEND_MODES.NORMAL,e.shader=null,e.cachedTint=16777215,e.texture=t||h.default.EMPTY,e.vertexData=new Float32Array(8),e.vertexTrimmedData=null,e._transformID=-1,e._textureID=-1,e._transformTrimmedID=-1,e._textureTrimmedID=-1,e.pluginName="sprite",e}r.default=p},{"../const":46,"../display/Container":48,"../math":70,"../textures/Texture":115,"../utils":125}],103:[function(t,e,r){"use strict";r.__esModule=!0;var i=n(t("../../renderers/canvas/CanvasRenderer")),u=t("../../const"),c=t("../../math"),d=n(t("./CanvasTinter"));function n(t){return t&&t.__esModule?t:{default:t}}var p=new c.Matrix,o=(s.prototype.render=function(t){var e=t._texture,r=this.renderer,i=e._frame.width,n=e._frame.height,o=t.transform.worldTransform,s=0,a=0;if(!(e.orig.width<=0||e.orig.height<=0)&&e.baseTexture.source&&(r.setBlendMode(t.blendMode),e.valid)){r.context.globalAlpha=t.worldAlpha;var h=e.baseTexture.scaleMode===u.SCALE_MODES.LINEAR;r.smoothProperty&&r.context[r.smoothProperty]!==h&&(r.context[r.smoothProperty]=h),a=e.trim?(s=e.trim.width/2+e.trim.x-t.anchor.x*e.orig.width,e.trim.height/2+e.trim.y-t.anchor.y*e.orig.height):(s=(.5-t.anchor.x)*e.orig.width,(.5-t.anchor.y)*e.orig.height),e.rotate&&(o.copy(p),o=p,c.GroupD8.matrixAppendRotationInv(o,e.rotate,s,a),a=s=0),s-=i/2,a-=n/2,r.roundPixels?(r.context.setTransform(o.a,o.b,o.c,o.d,o.tx*r.resolution|0,o.ty*r.resolution|0),s|=0,a|=0):r.context.setTransform(o.a,o.b,o.c,o.d,o.tx*r.resolution,o.ty*r.resolution);var l=e.baseTexture.resolution;16777215!==t.tint?(t.cachedTint===t.tint&&t.tintedTexture.tintId===t._texture._updateID||(t.cachedTint=t.tint,t.tintedTexture=d.default.getTintedTexture(t,t.tint)),r.context.drawImage(t.tintedTexture,0,0,i*l,n*l,s*r.resolution,a*r.resolution,i*r.resolution,n*r.resolution)):r.context.drawImage(e.baseTexture.source,e._frame.x*l,e._frame.y*l,i*l,n*l,s*r.resolution,a*r.resolution,i*r.resolution,n*r.resolution)}},s.prototype.destroy=function(){this.renderer=null},s);function s(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),this.renderer=t}r.default=o,i.default.registerPlugin("sprite",o)},{"../../const":46,"../../math":70,"../../renderers/canvas/CanvasRenderer":77,"./CanvasTinter":104}],104:[function(t,e,r){"use strict";r.__esModule=!0;var i,p=t("../../utils"),n=t("../../renderers/canvas/utils/canUseNewCanvasBlendModes");var a={getTintedTexture:function(t,e){var r=t._texture,i="#"+("00000"+(0|(e=a.roundColor(e))).toString(16)).substr(-6);r.tintCache=r.tintCache||{};var n=r.tintCache[i],o=void 0;if(n){if(n.tintId===r._updateID)return r.tintCache[i];o=r.tintCache[i]}else o=a.canvas||_.createElement("canvas");if(a.tintMethod(r,e,o),o.tintId=r._updateID,a.convertTintToImage){var s=new Image;s.src=o.toDataURL(),r.tintCache[i]=s}else r.tintCache[i]=o,a.canvas=null;return o},tintWithMultiply:function(t,e,r){var i=r.getContext("2d"),n=t._frame.clone(),o=t.baseTexture.resolution;n.x*=o,n.y*=o,n.width*=o,n.height*=o,r.width=Math.ceil(n.width),r.height=Math.ceil(n.height),i.save(),i.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),i.fillRect(0,0,n.width,n.height),i.globalCompositeOperation="multiply",i.drawImage(t.baseTexture.source,n.x,n.y,n.width,n.height,0,0,n.width,n.height),i.globalCompositeOperation="destination-atop",i.drawImage(t.baseTexture.source,n.x,n.y,n.width,n.height,0,0,n.width,n.height),i.restore()},tintWithOverlay:function(t,e,r){var i=r.getContext("2d"),n=t._frame.clone(),o=t.baseTexture.resolution;n.x*=o,n.y*=o,n.width*=o,n.height*=o,r.width=Math.ceil(n.width),r.height=Math.ceil(n.height),i.save(),i.globalCompositeOperation="copy",i.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),i.fillRect(0,0,n.width,n.height),i.globalCompositeOperation="destination-atop",i.drawImage(t.baseTexture.source,n.x,n.y,n.width,n.height,0,0,n.width,n.height),i.restore()},tintWithPerPixel:function(t,e,r){var i=r.getContext("2d"),n=t._frame.clone(),o=t.baseTexture.resolution;n.x*=o,n.y*=o,n.width*=o,n.height*=o,r.width=Math.ceil(n.width),r.height=Math.ceil(n.height),i.save(),i.globalCompositeOperation="copy",i.drawImage(t.baseTexture.source,n.x,n.y,n.width,n.height,0,0,n.width,n.height),i.restore();for(var s=(0,p.hex2rgb)(e),a=s[0],h=s[1],l=s[2],u=i.getImageData(0,0,n.width,n.height),c=u.data,d=0;d=this.size&&this.flush(),t._texture._uvs&&(this.sprites[this.currentIndex++]=t)},d.prototype.flush=function(){if(0!==this.currentIndex){var t=this.renderer.gl,e=this.MAX_TEXTURES,r=U.default.nextPow2(this.currentIndex),i=U.default.log2(r),n=this.buffers[i],o=this.sprites,s=this.groups,a=n.float32View,h=n.uint32View,l=this.boundTextures,u=this.renderer.boundTextures,c=this.renderer.textureGC.count,d=0,p=void 0,f=void 0,g=1,m=0,v=s[0],y=void 0,x=void 0,_=B.premultiplyBlendMode[o[0]._texture.baseTexture.premultipliedAlpha?1:0][o[0].blendMode];v.textureCount=0,v.start=0,v.blend=_,X++;var b=void 0;for(b=0;bthis.baseTexture.width,s=r+n>this.baseTexture.height;if(o||s){var a=o&&s?"and":"or",h="X: "+e+" + "+i+" = "+(e+i)+" > "+this.baseTexture.width,l="Y: "+r+" + "+n+" = "+(r+n)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+h+" "+a+" "+l)}this.valid=i&&n&&this.baseTexture.hasLoaded,this.trim||this.rotate||(this.orig=t),this.valid&&this._updateUvs()}},{key:"rotate",get:function(){return this._rotate},set:function(t){this._rotate=t,this.valid&&this._updateUvs()}},{key:"width",get:function(){return this.orig.width}},{key:"height",get:function(){return this.orig.height}}]),g);function g(t,e,r,i,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,g);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,p.call(this));if(o.noFrame=!1,e||(o.noFrame=!0,e=new l.Rectangle(0,0,1,1)),t instanceof g&&(t=t.baseTexture),o.baseTexture=t,o._frame=e,o.trim=i,o.valid=!1,o.requiresUpdate=!1,o._uvs=null,o.orig=r||e,o._rotate=Number(n||0),!0===n)o._rotate=2;else if(o._rotate%2!=0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");return t.hasLoaded?(o.noFrame&&(e=new l.Rectangle(0,0,t.width,t.height),t.on("update",o.onBaseTextureUpdated,o)),o.frame=e):t.once("loaded",o.onBaseTextureLoaded,o),o._updateID=0,o.transform=null,o.textureCacheIds=[],o}function m(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}(r.default=f).EMPTY=new f(new o.default),m(f.EMPTY),m(f.EMPTY.baseTexture),f.WHITE=function(){var t=_.createElement("canvas");t.width=10,t.height=10;var e=t.getContext("2d");return e.fillStyle="white",e.fillRect(0,0,10,10),new f(new o.default(t))}(),m(f.WHITE),m(f.WHITE.baseTexture)},{"../math":70,"../settings":101,"../utils":125,"./BaseTexture":112,"./TextureUvs":117,"./VideoBaseTexture":118,eventemitter3:3}],116:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t};function n(t,e){for(var r=0;re.priority){t.connect(r);break}e=(r=e).next}t.previous||t.connect(r)}else t.connect(r);return this._startIfPossible(),this},u.prototype.remove=function(t,e){for(var r=this._head.next;r;)r=r.match(t,e)?r.destroy():r.next;return this._head.next||this._cancelIfNeeded(),this},u.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},u.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},u.prototype.destroy=function(){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null},u.prototype.update=function(t){var e=0this.lastTime){(r=this.elapsedMS=e-this.lastTime)>this._maxElapsedMS&&(r=this._maxElapsedMS),this.deltaTime=r*o.default.TARGET_FPMS*this.speed;for(var i=this._head,n=i.next;n;)n=n.emit(this.deltaTime);i.next||this._cancelIfNeeded()}else this.deltaTime=this.elapsedMS=0;this.lastTime=e},i(u,[{key:"FPS",get:function(){return 1e3/this.elapsedMS}},{key:"minFPS",get:function(){return 1e3/this._maxElapsedMS},set:function(t){var e=Math.min(Math.max(0,t)/1e3,o.default.TARGET_FPMS);this._maxElapsedMS=1/e}}]),u);function u(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),this._head=new a.default(null,null,1/0),this._requestId=null,this._maxElapsedMS=100,this.autoStart=!1,this.deltaTime=1,this.elapsedMS=1/o.default.TARGET_FPMS,this.lastTime=-1,this.speed=1,this.started=!1,this._tick=function(t){e._requestId=null,e.started&&(e.update(t),e.started&&null===e._requestId&&e._head.next&&(e._requestId=requestAnimationFrame(e._tick)))}}r.default=l},{"../const":46,"../settings":101,"./TickerListener":120}],120:[function(t,e,r){"use strict";r.__esModule=!0;var i=(n.prototype.match=function(t,e){return e=e||null,this.fn===t&&this.context===e},n.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var e=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),e},n.prototype.connect=function(t){(this.previous=t).next&&(t.next.previous=this),this.next=t.next,t.next=this},n.prototype.destroy=function(t){var e=0>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e},r.hex2string=function(t){return t=t.toString(16),"#"+(t="000000".substr(0,6-t.length)+t)},r.rgb2hex=function(t){return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},r.getResolutionOfUrl=function(t,e){var r=n.default.RETINA_PREFIX.exec(t);if(r)return parseFloat(r[1]);return void 0!==e?e:1},r.decomposeDataUri=function(t){var e=i.DATA_URI.exec(t);if(e)return{mediaType:e[1]?e[1].toLowerCase():void 0,subType:e[2]?e[2].toLowerCase():void 0,encoding:e[3]?e[3].toLowerCase():void 0,data:e[4]};return},r.getUrlFileExtension=function(t){var e=i.URL_FILE_EXTENSION.exec(t);if(e)return e[1].toLowerCase();return},r.getSvgSize=function(t){var e=i.SVG_SIZE.exec(t),r={};e&&(r[e[1]]=Math.round(parseFloat(e[3])),r[e[5]]=Math.round(parseFloat(e[7])));return r},r.skipHello=function(){g=!0},r.sayHello=function(t){if(g)return;if(-1>16&255,i=t>>8&255,n=255&t;return(255*e<<24)+((r=r*e+.5|0)<<16)+((i=i*e+.5|0)<<8)+(n=n*e+.5|0)},r.premultiplyRgba=function(t,e,r,i){r=r||new Float32Array(4),i||void 0===i?(r[0]=t[0]*e,r[1]=t[1]*e,r[2]=t[2]*e):(r[0]=t[0],r[1]=t[1],r[2]=t[2]);return r[3]=e,r},r.premultiplyTintToRgba=function(t,e,r,i){(r=r||new Float32Array(4))[0]=(t>>16&255)/255,r[1]=(t>>8&255)/255,r[2]=(255&t)/255,!i&&void 0!==i||(r[0]*=e,r[1]*=e,r[2]*=e);return r[3]=e,r};var i=t("../const"),n=p(t("../settings")),o=p(t("eventemitter3")),s=p(t("./pluginTarget")),a=d(t("./mixin")),h=d(t("ismobilejs")),l=p(t("remove-array-items")),u=p(t("./mapPremultipliedBlendModes")),c=p(t("earcut"));function d(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function p(t){return t&&t.__esModule?t:{default:t}}var f=0,g=!1;r.isMobile=h,r.removeItems=l.default,r.EventEmitter=o.default,r.pluginTarget=s.default,r.mixins=a,r.earcut=c.default;var m=r.TextureCache=Object.create(null),v=r.BaseTextureCache=Object.create(null);var y=r.premultiplyBlendMode=(0,u.default)()},{"../const":46,"../settings":101,"./mapPremultipliedBlendModes":126,"./mixin":128,"./pluginTarget":129,earcut:2,eventemitter3:3,ismobilejs:4,"remove-array-items":31}],126:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(){for(var t=[],e=[],r=0;r<32;r++)t[r]=r,e[r]=r;t[n.BLEND_MODES.NORMAL_NPM]=n.BLEND_MODES.NORMAL,t[n.BLEND_MODES.ADD_NPM]=n.BLEND_MODES.ADD,t[n.BLEND_MODES.SCREEN_NPM]=n.BLEND_MODES.SCREEN,e[n.BLEND_MODES.NORMAL]=n.BLEND_MODES.NORMAL_NPM,e[n.BLEND_MODES.ADD]=n.BLEND_MODES.ADD_NPM,e[n.BLEND_MODES.SCREEN]=n.BLEND_MODES.SCREEN_NPM;var i=[];return i.push(e),i.push(t),i};var n=t("../const")},{"../const":46}],127:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t){if(o.default.tablet||o.default.phone)return 4;return t};var i,n=t("ismobilejs"),o=(i=n)&&i.__esModule?i:{default:i}},{ismobilejs:4}],128:[function(t,e,r){"use strict";function i(t,e){if(t&&e)for(var r=Object.keys(e),i=0;i=this._durations[this.currentFrame];)i-=this._durations[this.currentFrame]*n,this._currentTime+=n;this._currentTime+=i/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):r!==this.currentFrame&&(this.loop&&this.onLoop&&(0r&&this.onLoop()),this.updateTexture())},h.prototype.updateTexture=function(){this._texture=this._textures[this.currentFrame],this._textureID=-1,this.cachedTint=16777215,this.onFrameChange&&this.onFrameChange(this.currentFrame)},h.prototype.destroy=function(t){this.stop(),s.prototype.destroy.call(this,t)},h.fromFrames=function(t){for(var e=[],r=0;rthis._maxWidth)S.utils.removeItems(i,l-c,p-l),p=l,l=-1,++c,n.push(u),a=Math.max(a,u),h++,r.x=0,r.y+=t.lineHeight,o=null;else{var g=t.chars[f];g&&(o&&g.kerning[o]&&(r.x+=g.kerning[o]),i.push({texture:g.texture,line:h,charCode:f,position:new S.Point(r.x+g.xOffset,r.y+g.yOffset)}),s=r.x+(g.texture.width+g.xOffset),r.x+=g.xAdvance,d=Math.max(d,g.yOffset+g.texture.height),o=f)}}n.push(s),a=Math.max(a,s);for(var m=[],v=0;v<=h;v++){var y=0;"right"===this._font.align?y=a-n[v]:"center"===this._font.align&&(y=(a-n[v])/2),m.push(y)}for(var x=i.length,_=this.tint,b=0;b=i&&h.x=n&&h.y>16&255)/255,s=(r>>8&255)/255,a=(255&r)/255,h=((i=i||3375104)>>16&255)/255,l=(i>>8&255)/255,u=(255&i)/255,c=[.3,.59,.11,0,0,o,s,a,t=t||.2,0,h,l,u,e=e||.15,0,o-h,s-l,a-u,0,0];this._loadMatrix(c,n)},h.prototype.night=function(t,e){var r=[-2*(t=t||.1),-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},h.prototype.predator=function(t,e){var r=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(r,e)},h.prototype.lsd=function(t){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},h.prototype.reset=function(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)},i(h,[{key:"matrix",get:function(){return this.uniforms.m},set:function(t){this.uniforms.m=t}},{key:"alpha",get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t}}]),h);function h(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,s.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\nuniform float uAlpha;\n\nvoid main(void)\n{\n vec4 c = texture2D(uSampler, vTextureCoord);\n\n if (uAlpha == 0.0) {\n gl_FragColor = c;\n return;\n }\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (c.a > 0.0) {\n c.rgb /= c.a;\n }\n\n vec4 result;\n\n result.r = (m[0] * c.r);\n result.r += (m[1] * c.g);\n result.r += (m[2] * c.b);\n result.r += (m[3] * c.a);\n result.r += m[4];\n\n result.g = (m[5] * c.r);\n result.g += (m[6] * c.g);\n result.g += (m[7] * c.b);\n result.g += (m[8] * c.a);\n result.g += m[9];\n\n result.b = (m[10] * c.r);\n result.b += (m[11] * c.g);\n result.b += (m[12] * c.b);\n result.b += (m[13] * c.a);\n result.b += m[14];\n\n result.a = (m[15] * c.r);\n result.a += (m[16] * c.g);\n result.a += (m[17] * c.b);\n result.a += (m[18] * c.a);\n result.a += m[19];\n\n vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n // Premultiply alpha again.\n rgb *= result.a;\n\n gl_FragColor = vec4(rgb, result.a);\n}\n"));return t.uniforms.m=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],t.alpha=1,t}(r.default=a).prototype.grayscale=a.prototype.greyscale},{"../../core":65,path:8}],151:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t};function n(t,e){for(var r=0;r lumaMax))\n color = vec4(rgbA, texColor.a);\n else\n color = vec4(rgbB, texColor.a);\n return color;\n}\n\nvoid main() {\n\n vec2 fragCoord = vTextureCoord * filterArea.xy;\n\n vec4 color;\n\n color = fxaa(uSampler, fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n gl_FragColor = color;\n}\n'))}r.default=o},{"../../core":65,path:8}],153:[function(t,e,r){"use strict";r.__esModule=!0;var i=t("./fxaa/FXAAFilter");Object.defineProperty(r,"FXAAFilter",{enumerable:!0,get:function(){return c(i).default}});var n=t("./noise/NoiseFilter");Object.defineProperty(r,"NoiseFilter",{enumerable:!0,get:function(){return c(n).default}});var o=t("./displacement/DisplacementFilter");Object.defineProperty(r,"DisplacementFilter",{enumerable:!0,get:function(){return c(o).default}});var s=t("./blur/BlurFilter");Object.defineProperty(r,"BlurFilter",{enumerable:!0,get:function(){return c(s).default}});var a=t("./blur/BlurXFilter");Object.defineProperty(r,"BlurXFilter",{enumerable:!0,get:function(){return c(a).default}});var h=t("./blur/BlurYFilter");Object.defineProperty(r,"BlurYFilter",{enumerable:!0,get:function(){return c(h).default}});var l=t("./colormatrix/ColorMatrixFilter");Object.defineProperty(r,"ColorMatrixFilter",{enumerable:!0,get:function(){return c(l).default}});var u=t("./alpha/AlphaFilter");function c(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(r,"AlphaFilter",{enumerable:!0,get:function(){return c(u).default}})},{"./alpha/AlphaFilter":143,"./blur/BlurFilter":144,"./blur/BlurXFilter":145,"./blur/BlurYFilter":146,"./colormatrix/ColorMatrixFilter":150,"./displacement/DisplacementFilter":151,"./fxaa/FXAAFilter":152,"./noise/NoiseFilter":154}],154:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t};function n(t,e){for(var r=0;r 0.0) {\n color.rgb /= color.a;\n }\n\n color.r += diff;\n color.g += diff;\n color.b += diff;\n\n // Premultiply alpha again.\n color.rgb *= color.a;\n\n gl_FragColor = color;\n}\n"));return r.noise=t,r.seed=e,r}r.default=a},{"../../core":65,path:8}],155:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t};function n(t,e){for(var r=0;r=s.length){if(!t.autoResize)break;s.push(this._generateOneMoreBuffer(t))}var f=s[d];f.uploadDynamic(e,c,p);var g=t._bufferUpdateIDs[c]||0;(u=u||f._updateID= 0.");if(null==e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=r}function re(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e}function ie(t){this.name=t}function ne(t,e){if(this.mix=1,this.bendDirection=0,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.bendDirection=t.bendDirection,this.bones=new Array;for(var r=0;r= 0.");if(null==e)throw new Error("name cannot be null.");if(null==r)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=r}function ge(t,e){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new at.Vector2,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 r=0;r>>1;;){if(t[(o+1)*r]<=e?i=o+1:n=o,i==n)return(i+1)*r;o=i+n>>>1}},n.linearSearch=function(t,e,r){for(var i=0,n=t.length-r;i<=n;i+=r)if(t[i]>e)return i;return-1},n);function n(t,e,r){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.duration=r}M.Animation=P,(t=D=M.MixPose||(M.MixPose={}))[t.setup=0]="setup",t[t.current=1]="current",t[t.currentLayered=2]="currentLayered",(e=m=M.MixDirection||(M.MixDirection={}))[e.in=0]="in",e[e.out=1]="out",(i=r=M.TimelineType||(M.TimelineType={}))[i.rotate=0]="rotate",i[i.translate=1]="translate",i[i.scale=2]="scale",i[i.shear=3]="shear",i[i.attachment=4]="attachment",i[i.color=5]="color",i[i.deform=6]="deform",i[i.event=7]="event",i[i.drawOrder=8]="drawOrder",i[i.ikConstraint=9]="ikConstraint",i[i.transformConstraint=10]="transformConstraint",i[i.pathConstraintPosition=11]="pathConstraintPosition",i[i.pathConstraintSpacing=12]="pathConstraintSpacing",i[i.pathConstraintMix=13]="pathConstraintMix",i[i.twoColor=14]="twoColor";var o=(y.prototype.getFrameCount=function(){return this.curves.length/y.BEZIER_SIZE+1},y.prototype.setLinear=function(t){this.curves[t*y.BEZIER_SIZE]=y.LINEAR},y.prototype.setStepped=function(t){this.curves[t*y.BEZIER_SIZE]=y.STEPPED},y.prototype.getCurveType=function(t){var e=t*y.BEZIER_SIZE;if(e==this.curves.length)return y.LINEAR;var r=this.curves[e];return r==y.LINEAR?y.LINEAR:r==y.STEPPED?y.STEPPED:y.BEZIER},y.prototype.setCurve=function(t,e,r,i,n){var o=.03*(2*-e+i),s=.03*(2*-r+n),a=.006*(3*(e-i)+1),h=.006*(3*(r-n)+1),l=2*o+a,u=2*s+h,c=.3*e+o+.16666667*a,d=.3*r+s+.16666667*h,p=t*y.BEZIER_SIZE,f=this.curves;f[p++]=y.BEZIER;for(var g=c,m=d,v=p+y.BEZIER_SIZE-1;p 0: "+t);this.curves=M.Utils.newFloatArray((t-1)*y.BEZIER_SIZE)}M.CurveTimeline=o;var s,a=(Jt(v,s=o),v.prototype.getPropertyId=function(){return(r.rotate<<24)+this.boneIndex},v.prototype.setFrame=function(t,e,r){t<<=1,this.frames[t]=e,this.frames[t+v.ROTATION]=r},v.prototype.apply=function(t,e,r,i,n,o,s){var a=this.frames,h=t.bones[this.boneIndex];if(r=a[a.length-v.ENTRIES])if(o==D.setup)h.rotation=h.data.rotation+a[a.length+v.PREV_ROTATION]*n;else{var u=h.data.rotation+a[a.length+v.PREV_ROTATION]-h.rotation;u-=360*(16384-(16384.499999999996-u/360|0)),h.rotation+=u*n}else{var c=P.binarySearch(a,r,v.ENTRIES),d=a[c+v.PREV_ROTATION],p=a[c],f=this.getCurvePercent((c>>1)-1,1-(r-p)/(a[c+v.PREV_TIME]-p)),g=a[c+v.ROTATION]-d;g=d+(g-=360*(16384-(16384.499999999996-g/360|0)))*f,o==D.setup?(g-=360*(16384-(16384.499999999996-g/360|0)),h.rotation=h.data.rotation+g*n):(g=h.data.rotation+g-h.rotation,g-=360*(16384-(16384.499999999996-g/360|0)),h.rotation+=g*n)}},v.ENTRIES=2,v.PREV_TIME=-2,v.PREV_ROTATION=-1,v.ROTATION=1,v);function v(t){var e=s.call(this,t)||this;return e.frames=M.Utils.newFloatArray(t<<1),e}M.RotateTimeline=a;var h,l=(Jt(f,h=o),f.prototype.getPropertyId=function(){return(r.translate<<24)+this.boneIndex},f.prototype.setFrame=function(t,e,r,i){t*=f.ENTRIES,this.frames[t]=e,this.frames[t+f.X]=r,this.frames[t+f.Y]=i},f.prototype.apply=function(t,e,r,i,n,o,s){var a=this.frames,h=t.bones[this.boneIndex];if(r=a[a.length-f.ENTRIES])l=a[a.length+f.PREV_X],u=a[a.length+f.PREV_Y];else{var c=P.binarySearch(a,r,f.ENTRIES);l=a[c+f.PREV_X],u=a[c+f.PREV_Y];var d=a[c],p=this.getCurvePercent(c/f.ENTRIES-1,1-(r-d)/(a[c+f.PREV_TIME]-d));l+=(a[c+f.X]-l)*p,u+=(a[c+f.Y]-u)*p}o==D.setup?(h.x=h.data.x+l*n,h.y=h.data.y+u*n):(h.x+=(h.data.x+l-h.x)*n,h.y+=(h.data.y+u-h.y)*n)}},f.ENTRIES=3,f.PREV_TIME=-3,f.PREV_X=-2,f.PREV_Y=-1,f.X=1,f.Y=2,f);function f(t){var e=h.call(this,t)||this;return e.frames=M.Utils.newFloatArray(t*f.ENTRIES),e}M.TranslateTimeline=l;var u,c=(Jt(x,u=l),x.prototype.getPropertyId=function(){return(r.scale<<24)+this.boneIndex},x.prototype.apply=function(t,e,r,i,n,o,s){var a=this.frames,h=t.bones[this.boneIndex];if(r=a[a.length-x.ENTRIES])l=a[a.length+x.PREV_X]*h.data.scaleX,u=a[a.length+x.PREV_Y]*h.data.scaleY;else{var c=P.binarySearch(a,r,x.ENTRIES);l=a[c+x.PREV_X],u=a[c+x.PREV_Y];var d=a[c],p=this.getCurvePercent(c/x.ENTRIES-1,1-(r-d)/(a[c+x.PREV_TIME]-d));l=(l+(a[c+x.X]-l)*p)*h.data.scaleX,u=(u+(a[c+x.Y]-u)*p)*h.data.scaleY}if(1==n)h.scaleX=l,h.scaleY=u;else{var f=0,g=0;g=o==D.setup?(f=h.data.scaleX,h.data.scaleY):(f=h.scaleX,h.scaleY),s==m.out?(l=Math.abs(l)*M.MathUtils.signum(f),u=Math.abs(u)*M.MathUtils.signum(g)):(f=Math.abs(f)*M.MathUtils.signum(l),g=Math.abs(g)*M.MathUtils.signum(u)),h.scaleX=f+(l-f)*n,h.scaleY=g+(u-g)*n}}},x);function x(t){return u.call(this,t)||this}M.ScaleTimeline=c;var d,p=(Jt(g,d=l),g.prototype.getPropertyId=function(){return(r.shear<<24)+this.boneIndex},g.prototype.apply=function(t,e,r,i,n,o,s){var a=this.frames,h=t.bones[this.boneIndex];if(r=a[a.length-g.ENTRIES])l=a[a.length+g.PREV_X],u=a[a.length+g.PREV_Y];else{var c=P.binarySearch(a,r,g.ENTRIES);l=a[c+g.PREV_X],u=a[c+g.PREV_Y];var d=a[c],p=this.getCurvePercent(c/g.ENTRIES-1,1-(r-d)/(a[c+g.PREV_TIME]-d));l+=(a[c+g.X]-l)*p,u+=(a[c+g.Y]-u)*p}o==D.setup?(h.shearX=h.data.shearX+l*n,h.shearY=h.data.shearY+u*n):(h.shearX+=(h.data.shearX+l-h.shearX)*n,h.shearY+=(h.data.shearY+u-h.shearY)*n)}},g);function g(t){return d.call(this,t)||this}M.ShearTimeline=p;var _,b=(Jt(T,_=o),T.prototype.getPropertyId=function(){return(r.color<<24)+this.slotIndex},T.prototype.setFrame=function(t,e,r,i,n,o){t*=T.ENTRIES,this.frames[t]=e,this.frames[t+T.R]=r,this.frames[t+T.G]=i,this.frames[t+T.B]=n,this.frames[t+T.A]=o},T.prototype.apply=function(t,e,r,i,n,o,s){var a=t.slots[this.slotIndex],h=this.frames;if(r=h[h.length-T.ENTRIES]){var g=h.length;c=h[g+T.PREV_R],d=h[g+T.PREV_G],p=h[g+T.PREV_B],f=h[g+T.PREV_A]}else{var m=P.binarySearch(h,r,T.ENTRIES);c=h[m+T.PREV_R],d=h[m+T.PREV_G],p=h[m+T.PREV_B],f=h[m+T.PREV_A];var v=h[m],y=this.getCurvePercent(m/T.ENTRIES-1,1-(r-v)/(h[m+T.PREV_TIME]-v));c+=(h[m+T.R]-c)*y,d+=(h[m+T.G]-d)*y,p+=(h[m+T.B]-p)*y,f+=(h[m+T.A]-f)*y}1==n?a.color.set(c,d,p,f):(l=a.color,o==D.setup&&l.setFromColor(a.data.color),l.add((c-l.r)*n,(d-l.g)*n,(p-l.b)*n,(f-l.a)*n))}},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=_.call(this,t)||this;return e.frames=M.Utils.newFloatArray(t*T.ENTRIES),e}M.ColorTimeline=b;var w,E=(Jt(S,w=o),S.prototype.getPropertyId=function(){return(r.twoColor<<24)+this.slotIndex},S.prototype.setFrame=function(t,e,r,i,n,o,s,a,h){t*=S.ENTRIES,this.frames[t]=e,this.frames[t+S.R]=r,this.frames[t+S.G]=i,this.frames[t+S.B]=n,this.frames[t+S.A]=o,this.frames[t+S.R2]=s,this.frames[t+S.G2]=a,this.frames[t+S.B2]=h},S.prototype.apply=function(t,e,r,i,n,o,s){var a=t.slots[this.slotIndex],h=this.frames;if(r=h[h.length-S.ENTRIES]){var _=h.length;p=h[_+S.PREV_R],f=h[_+S.PREV_G],g=h[_+S.PREV_B],m=h[_+S.PREV_A],v=h[_+S.PREV_R2],y=h[_+S.PREV_G2],x=h[_+S.PREV_B2]}else{var b=P.binarySearch(h,r,S.ENTRIES);p=h[b+S.PREV_R],f=h[b+S.PREV_G],g=h[b+S.PREV_B],m=h[b+S.PREV_A],v=h[b+S.PREV_R2],y=h[b+S.PREV_G2],x=h[b+S.PREV_B2];var T=h[b],w=this.getCurvePercent(b/S.ENTRIES-1,1-(r-T)/(h[b+S.PREV_TIME]-T));p+=(h[b+S.R]-p)*w,f+=(h[b+S.G]-f)*w,g+=(h[b+S.B]-g)*w,m+=(h[b+S.A]-m)*w,v+=(h[b+S.R2]-v)*w,y+=(h[b+S.G2]-y)*w,x+=(h[b+S.B2]-x)*w}1==n?(a.color.set(p,f,g,m),a.darkColor.set(v,y,x,1)):(l=a.color,u=a.darkColor,o==D.setup&&(l.setFromColor(a.data.color),u.setFromColor(a.data.darkColor)),l.add((p-l.r)*n,(f-l.g)*n,(g-l.b)*n,(m-l.a)*n),u.add((v-u.r)*n,(y-u.g)*n,(x-u.b)*n,0))}},S.ENTRIES=8,S.PREV_TIME=-8,S.PREV_R=-7,S.PREV_G=-6,S.PREV_B=-5,S.PREV_A=-4,S.PREV_R2=-3,S.PREV_G2=-2,S.PREV_B2=-1,S.R=1,S.G=2,S.B=3,S.A=4,S.R2=5,S.G2=6,S.B2=7,S);function S(t){var e=w.call(this,t)||this;return e.frames=M.Utils.newFloatArray(t*S.ENTRIES),e}M.TwoColorTimeline=E;var C=(I.prototype.getPropertyId=function(){return(r.attachment<<24)+this.slotIndex},I.prototype.getFrameCount=function(){return this.frames.length},I.prototype.setFrame=function(t,e,r){this.frames[t]=e,this.attachmentNames[t]=r},I.prototype.apply=function(t,e,r,i,n,o,s){var a=t.slots[this.slotIndex];if(s!=m.out||o!=D.setup){var h=this.frames;if(r=h[h.length-1]?h.length-1:P.binarySearch(h,r,1)-1;var c=this.attachmentNames[u];t.slots[this.slotIndex].setAttachment(null==c?null:t.getAttachment(this.slotIndex,c))}}else{var d=a.data.attachmentName;a.setAttachment(null==d?null:t.getAttachment(this.slotIndex,d))}},I);function I(t){this.frames=M.Utils.newFloatArray(t),this.attachmentNames=new Array(t)}M.AttachmentTimeline=C;var A,O=null,R=(Jt(k,A=o),k.prototype.getPropertyId=function(){return(r.deform<<27)+ +this.attachment.id+this.slotIndex},k.prototype.setFrame=function(t,e,r){this.frames[t]=e,this.frameVertices[t]=r},k.prototype.apply=function(t,e,r,i,n,o,s){var a=t.slots[this.slotIndex],h=a.getAttachment();if(h instanceof M.VertexAttachment&&h.applyDeform(this.attachment)){var l=a.attachmentVertices;0==l.length&&(n=1);var u=this.frameVertices,c=u[0].length,d=this.frames;if(r=d[d.length-1]){var y=u[d.length-1];if(1==n)M.Utils.arrayCopy(y,0,v,0,c);else if(o==D.setup)if(null==(p=h).bones)for(g=p.vertices,m=0;m=a[h-1])return;if(!(r=a[l];l++)i.push(this.events[l])}}},L);function L(t){this.frames=M.Utils.newFloatArray(t),this.events=new Array(t)}M.EventTimeline=G;var N=(B.prototype.getPropertyId=function(){return r.drawOrder<<24},B.prototype.getFrameCount=function(){return this.frames.length},B.prototype.setFrame=function(t,e,r){this.frames[t]=e,this.drawOrders[t]=r},B.prototype.apply=function(t,e,r,i,n,o,s){var a=t.drawOrder,h=t.slots;if(s!=m.out||o!=D.setup){var l=this.frames;if(r=l[l.length-1]?l.length-1:P.binarySearch(l,r)-1;var c=this.drawOrders[u];if(null==c)M.Utils.arrayCopy(h,0,a,0,h.length);else for(var d=0,p=c.length;d=a[a.length-X.ENTRIES])o==D.setup?(h.mix=h.data.mix+(a[a.length+X.PREV_MIX]-h.data.mix)*n,h.bendDirection=s==m.out?h.data.bendDirection:a[a.length+X.PREV_BEND_DIRECTION]):(h.mix+=(a[a.length+X.PREV_MIX]-h.mix)*n,s==m.in&&(h.bendDirection=a[a.length+X.PREV_BEND_DIRECTION]));else{var l=P.binarySearch(a,r,X.ENTRIES),u=a[l+X.PREV_MIX],c=a[l],d=this.getCurvePercent(l/X.ENTRIES-1,1-(r-c)/(a[l+X.PREV_TIME]-c));o==D.setup?(h.mix=h.data.mix+(u+(a[l+X.MIX]-u)*d-h.data.mix)*n,h.bendDirection=s==m.out?h.data.bendDirection:a[l+X.PREV_BEND_DIRECTION]):(h.mix+=(u+(a[l+X.MIX]-u)*d-h.mix)*n,s==m.in&&(h.bendDirection=a[l+X.PREV_BEND_DIRECTION]))}},X.ENTRIES=3,X.PREV_TIME=-3,X.PREV_MIX=-2,X.PREV_BEND_DIRECTION=-1,X.MIX=1,X.BEND_DIRECTION=2,X);function X(t){var e=F.call(this,t)||this;return e.frames=M.Utils.newFloatArray(t*X.ENTRIES),e}M.IkConstraintTimeline=U;var j,V=(Jt(W,j=o),W.prototype.getPropertyId=function(){return(r.transformConstraint<<24)+this.transformConstraintIndex},W.prototype.setFrame=function(t,e,r,i,n,o){t*=W.ENTRIES,this.frames[t]=e,this.frames[t+W.ROTATE]=r,this.frames[t+W.TRANSLATE]=i,this.frames[t+W.SCALE]=n,this.frames[t+W.SHEAR]=o},W.prototype.apply=function(t,e,r,i,n,o,s){var a=this.frames,h=t.transformConstraints[this.transformConstraintIndex];if(r=a[a.length-W.ENTRIES]){var f=a.length;u=a[f+W.PREV_ROTATE],c=a[f+W.PREV_TRANSLATE],d=a[f+W.PREV_SCALE],p=a[f+W.PREV_SHEAR]}else{var g=P.binarySearch(a,r,W.ENTRIES);u=a[g+W.PREV_ROTATE],c=a[g+W.PREV_TRANSLATE],d=a[g+W.PREV_SCALE],p=a[g+W.PREV_SHEAR];var m=a[g],v=this.getCurvePercent(g/W.ENTRIES-1,1-(r-m)/(a[g+W.PREV_TIME]-m));u+=(a[g+W.ROTATE]-u)*v,c+=(a[g+W.TRANSLATE]-c)*v,d+=(a[g+W.SCALE]-d)*v,p+=(a[g+W.SHEAR]-p)*v}o==D.setup?(l=h.data,h.rotateMix=l.rotateMix+(u-l.rotateMix)*n,h.translateMix=l.translateMix+(c-l.translateMix)*n,h.scaleMix=l.scaleMix+(d-l.scaleMix)*n,h.shearMix=l.shearMix+(p-l.shearMix)*n):(h.rotateMix+=(u-h.rotateMix)*n,h.translateMix+=(c-h.translateMix)*n,h.scaleMix+=(d-h.scaleMix)*n,h.shearMix+=(p-h.shearMix)*n)}},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=j.call(this,t)||this;return e.frames=M.Utils.newFloatArray(t*W.ENTRIES),e}M.TransformConstraintTimeline=V;var Y,H=(Jt(z,Y=o),z.prototype.getPropertyId=function(){return(r.pathConstraintPosition<<24)+this.pathConstraintIndex},z.prototype.setFrame=function(t,e,r){t*=z.ENTRIES,this.frames[t]=e,this.frames[t+z.VALUE]=r},z.prototype.apply=function(t,e,r,i,n,o,s){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(r=a[a.length-z.ENTRIES])l=a[a.length+z.PREV_VALUE];else{var u=P.binarySearch(a,r,z.ENTRIES);l=a[u+z.PREV_VALUE];var c=a[u],d=this.getCurvePercent(u/z.ENTRIES-1,1-(r-c)/(a[u+z.PREV_TIME]-c));l+=(a[u+z.VALUE]-l)*d}o==D.setup?h.position=h.data.position+(l-h.data.position)*n:h.position+=(l-h.position)*n}},z.ENTRIES=2,z.PREV_TIME=-2,z.PREV_VALUE=-1,z.VALUE=1,z);function z(t){var e=Y.call(this,t)||this;return e.frames=M.Utils.newFloatArray(t*z.ENTRIES),e}M.PathConstraintPositionTimeline=H;var q,K=(Jt(Z,q=H),Z.prototype.getPropertyId=function(){return(r.pathConstraintSpacing<<24)+this.pathConstraintIndex},Z.prototype.apply=function(t,e,r,i,n,o,s){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(r=a[a.length-Z.ENTRIES])l=a[a.length+Z.PREV_VALUE];else{var u=P.binarySearch(a,r,Z.ENTRIES);l=a[u+Z.PREV_VALUE];var c=a[u],d=this.getCurvePercent(u/Z.ENTRIES-1,1-(r-c)/(a[u+Z.PREV_TIME]-c));l+=(a[u+Z.VALUE]-l)*d}o==D.setup?h.spacing=h.data.spacing+(l-h.data.spacing)*n:h.spacing+=(l-h.spacing)*n}},Z);function Z(t){return q.call(this,t)||this}M.PathConstraintSpacingTimeline=K;var J,Q=(Jt($,J=o),$.prototype.getPropertyId=function(){return(r.pathConstraintMix<<24)+this.pathConstraintIndex},$.prototype.setFrame=function(t,e,r,i){t*=$.ENTRIES,this.frames[t]=e,this.frames[t+$.ROTATE]=r,this.frames[t+$.TRANSLATE]=i},$.prototype.apply=function(t,e,r,i,n,o,s){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(r=a[a.length-$.ENTRIES])l=a[a.length+$.PREV_ROTATE],u=a[a.length+$.PREV_TRANSLATE];else{var c=P.binarySearch(a,r,$.ENTRIES);l=a[c+$.PREV_ROTATE],u=a[c+$.PREV_TRANSLATE];var d=a[c],p=this.getCurvePercent(c/$.ENTRIES-1,1-(r-d)/(a[c+$.PREV_TIME]-d));l+=(a[c+$.ROTATE]-l)*p,u+=(a[c+$.TRANSLATE]-u)*p}o==D.setup?(h.rotateMix=h.data.rotateMix+(l-h.data.rotateMix)*n,h.translateMix=h.data.translateMix+(u-h.data.translateMix)*n):(h.rotateMix+=(l-h.rotateMix)*n,h.translateMix+=(u-h.translateMix)*n)}},$.ENTRIES=3,$.PREV_TIME=-3,$.PREV_ROTATE=-2,$.PREV_TRANSLATE=-1,$.ROTATE=1,$.TRANSLATE=2,$);function $(t){var e=J.call(this,t)||this;return e.frames=M.Utils.newFloatArray(t*$.ENTRIES),e}M.PathConstraintMixTimeline=Q})((t=Kt=Kt||{}).core||(t.core={})),function(w){var f=(E.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,r=0,i=e.length;r=n.trackEnd&&null==n.mixingFrom){e[r]=null,this.queue.end(n),this.disposeNext(n);continue}if(null!=n.mixingFrom&&this.updateMixingFrom(n,t)){var h=n.mixingFrom;for(n.mixingFrom=null;null!=h;)this.queue.end(h),h=h.mixingFrom}n.trackTime+=o}}this.queue.drain()},E.prototype.updateMixingFrom=function(t,e){var r=t.mixingFrom;if(null==r)return!0;var i=this.updateMixingFrom(r,e);return 0=t.mixDuration||0==t.timeScale)?(0==r.totalAlpha&&(t.mixingFrom=r.mixingFrom,t.interruptAlpha=r.interruptAlpha,this.queue.end(r)),i):(r.animationLast=r.nextAnimationLast,r.trackLast=r.nextTrackLast,r.trackTime+=e*r.timeScale,t.mixTime+=e*t.timeScale,!1)},E.prototype.apply=function(t){if(null==t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var e=this.events,r=this.tracks,i=!1,n=0,o=r.length;n=s.trackEnd&&null==s.next&&(h=0);var l=s.animationLast,u=s.getAnimationTime(),c=s.animation.timelines.length,d=s.animation.timelines;if(1==h)for(var p=0;p=E.FIRST?w.MixPose.setup:a;v instanceof w.RotateTimeline?this.applyRotateTimeline(v,t,u,h,y,m,p<<1,g):(w.Utils.webkit602BugfixHelper(h,y),v.apply(t,l,u,e,h,y,w.MixDirection.in))}}this.queueEvents(s,u),e.length=0,s.nextAnimationLast=u,s.nextTrackLast=s.trackTime}}return this.queue.drain(),i},E.prototype.applyMixingFrom=function(t,e,r){var i=t.mixingFrom;null!=i.mixingFrom&&this.applyMixingFrom(i,e,r);var n=0;0==t.mixDuration?(n=1,r=w.MixPose.setup):1<(n=t.mixTime/t.mixDuration)&&(n=1);var o=n=l[l.length-w.RotateTimeline.ENTRIES])c=u.data.rotation+l[l.length+w.RotateTimeline.PREV_ROTATION];else{var d=w.Animation.binarySearch(l,r,w.RotateTimeline.ENTRIES),p=l[d+w.RotateTimeline.PREV_ROTATION],f=l[d],g=h.getCurvePercent((d>>1)-1,1-(r-f)/(l[d+w.RotateTimeline.PREV_TIME]-f));c=l[d+w.RotateTimeline.ROTATION]-p,c=p+(c-=360*(16384-(16384.499999999996-c/360|0)))*g+u.data.rotation,c-=360*(16384-(16384.499999999996-c/360|0))}var m=n==w.MixPose.setup?u.data.rotation:u.rotation,v=0,y=c-m;if(0==y)v=o[s];else{y-=360*(16384-(16384.499999999996-y/360|0));var x=0,_=0;_=a?(x=0,y):(x=o[s],o[s+1]);var b=0i||this.queue.event(t,l)}for((t.loop?o>t.trackTime%n:i<=e&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var r=e;;){var i=r.mixingFrom;if(null==i)break;this.queue.end(i),r.mixingFrom=null,r=i}this.tracks[e.trackIndex]=null,this.queue.drain()}}},E.prototype.setCurrent=function(t,e,r){var i=this.expandToIndex(t);this.tracks[t]=e,null!=i&&(r&&this.queue.interrupt(i),e.mixingFrom=i,e.mixTime=0,null!=i.mixingFrom&&0=this.tracks.length?null:this.tracks[t]},E.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},E.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);0<=e&&this.listeners.splice(e,1)},E.prototype.clearListeners=function(){this.listeners.length=0},E.prototype.clearListenerNotifications=function(){this.queue.clear()},E.prototype.setAnimationByName=function(t,e,r){E.deprecatedWarning1||(E.deprecatedWarning1=!0,console.warn("Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.")),this.setAnimation(t,e,r)},E.prototype.addAnimationByName=function(t,e,r,i){E.deprecatedWarning2||(E.deprecatedWarning2=!0,console.warn("Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.")),this.addAnimation(t,e,r,i)},E.prototype.hasAnimation=function(t){return null!==this.data.skeletonData.findAnimation(t)},E.prototype.hasAnimationByName=function(t){return E.deprecatedWarning3||(E.deprecatedWarning3=!0,console.warn("Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.")),this.hasAnimation(t)},E.emptyAnimation=new w.Animation("",[],0),E.SUBSEQUENT=0,E.FIRST=1,E.DIP=2,E.DIP_MIX=3,E.deprecatedWarning1=!1,E.deprecatedWarning2=!1,E.deprecatedWarning3=!1,E);function E(t){this.tracks=new Array,this.events=new Array,this.listeners=new Array,this.queue=new i(this),this.propertyIDs=new w.IntSet,this.mixingTo=new Array,this.animationsChanged=!1,this.timeScale=1,this.trackEntryPool=new w.Pool(function(){return new e}),this.data=t}w.AnimationState=f;var e=(r.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.animation=null,this.listener=null,this.timelineData.length=0,this.timelineDipMix.length=0,this.timelinesRotation.length=0},r.prototype.setTimelineData=function(t,e,r){null!=t&&e.push(t);var i=null!=this.mixingFrom?this.mixingFrom.setTimelineData(this,e,r):this;null!=t&&e.pop();var n=e,o=e.length-1,s=this.animation.timelines,a=this.animation.timelines.length,h=w.Utils.setArraySize(this.timelineData,a);this.timelineDipMix.length=0;var l=w.Utils.setArraySize(this.timelineDipMix,a);t:for(var u=0;u=this.animationEnd-this.animationStart},r.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},Object.defineProperty(r.prototype,"time",{get:function(){return r.deprecatedWarning1||(r.deprecatedWarning1=!0,console.warn("Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.")),this.trackTime},set:function(t){r.deprecatedWarning1||(r.deprecatedWarning1=!0,console.warn("Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.")),this.trackTime=t},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"endTime",{get:function(){return r.deprecatedWarning2||(r.deprecatedWarning2=!0,console.warn("Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.")),this.trackTime},set:function(t){r.deprecatedWarning2||(r.deprecatedWarning2=!0,console.warn("Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.")),this.trackTime=t},enumerable:!0,configurable:!0}),r.prototype.loopsCount=function(){return Math.floor(this.trackTime/this.trackEnd)},r.deprecatedWarning1=!1,r.deprecatedWarning2=!1,r);function r(){this.timelineData=new Array,this.timelineDipMix=new Array,this.timelinesRotation=new Array}w.TrackEntry=e;var h,t,i=(n.prototype.start=function(t){this.objects.push(h.start),this.objects.push(t),this.animState.animationsChanged=!0},n.prototype.interrupt=function(t){this.objects.push(h.interrupt),this.objects.push(t)},n.prototype.end=function(t){this.objects.push(h.end),this.objects.push(t),this.animState.animationsChanged=!0},n.prototype.dispose=function(t){this.objects.push(h.dispose),this.objects.push(t)},n.prototype.complete=function(t){this.objects.push(h.complete),this.objects.push(t)},n.prototype.event=function(t,e){this.objects.push(h.event),this.objects.push(t),this.objects.push(e)},n.prototype.deprecateStuff=function(){return n.deprecatedWarning1||(n.deprecatedWarning1=!0,console.warn("Deprecation Warning: onComplete, onStart, onEnd, onEvent art deprecated, please use listeners from now on. 'state.addListener({ complete: function(track, event) { } })'")),!0},n.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,r=0;rq.MathUtils.PI?B-=q.MathUtils.PI2:B<-q.MathUtils.PI&&(B+=q.MathUtils.PI2),B*=e,F=Math.cos(B),U=Math.sin(B),C.a=F*k-U*L,C.c=F*G-U*N,C.b=U*k+F*L,C.d=U*G+F*N}P.appliedValid=!1}}}},se.prototype.computeWorldPositions=function(t,e,r,i,n){var o=this.target,s=this.position,a=this.spaces,h=q.Utils.setArraySize(this.positions,3*e+2),l=null,u=t.closed,c=t.worldVerticesLength,d=c/6,p=se.NONE;if(!t.constantSpeed){var f=t.lengths,g=f[d-=u?1:2];if(i&&(s*=g),n)for(var m=0;m=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},le.prototype.aabbIntersectsSegment=function(t,e,r,i){var n=this.minX,o=this.minY,s=this.maxX,a=this.maxY;if(t<=n&&r<=n||e<=o&&i<=o||s<=t&&s<=r||a<=e&&a<=i)return!1;var h=(i-e)/(r-t),l=h*(n-t)+e;if(ot.minX&&this.minYt.minY},le.prototype.containsPoint=function(t,e){for(var r=this.polygons,i=0,n=r.length;i>1,B=this.clipOutput,F=K.Utils.setArraySize(l,I+N*p),U=0;U>1;a=i.length&&(i.length=t+1),i[t]||(i[t]={}),i[t][e]=r},de.prototype.getAttachment=function(t,e){var r=this.attachments[t];return r?r[e]:null},de.prototype.attachAll=function(t,e){for(var r=0,i=0;i=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(),r=e.indexOf(":");if(-1==r)throw new Error("Invalid line: "+e);for(var i=0,n=r+1;i<3;i++){var o=e.indexOf(",",n);if(-1==o)break;t[i]=e.substr(n,o-n).trim(),n=o+1}return t[i]=e.substring(n).trim(),i+1},i);function i(t){this.index=0,this.lines=t.split(/\r\n|\r|\n/)}var M=(n.prototype.setFilters=function(){var t=this.baseTexture,e=this.minFilter;e==S.TextureFilter.Linear?t.scaleMode=PIXI.SCALE_MODES.LINEAR:this.minFilter==S.TextureFilter.Nearest?t.scaleMode=PIXI.SCALE_MODES.NEAREST:(t.mipmap=!0,e==S.TextureFilter.MipMapNearestNearest?t.scaleMode=PIXI.SCALE_MODES.NEAREST:t.scaleMode=PIXI.SCALE_MODES.LINEAR)},n);function n(){}S.TextureAtlasPage=M;var o,D=(o=S.TextureRegion,Jt(s,o),s);function s(){return null!==o&&o.apply(this,arguments)||this}S.TextureAtlasRegion=D}((ot=Kt=Kt||{}).core||(ot.core={})),st=Kt=Kt||{},at=st.core||(st.core={}),ge.prototype.apply=function(){this.update()},ge.prototype.update=function(){this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld()},ge.prototype.applyAbsoluteWorld=function(){for(var t=this.rotateMix,e=this.translateMix,r=this.scaleMix,i=this.shearMix,n=this.target,o=n.matrix,s=o.a,a=o.c,h=o.b,l=o.d,u=0at.MathUtils.PI?P-=at.MathUtils.PI2:P<-at.MathUtils.PI&&(P+=at.MathUtils.PI2),P*=t;var w=Math.cos(P),E=Math.sin(P);y.a=w*x-E*b,y.c=w*_-E*T,y.b=E*x+w*b,y.d=E*_+w*T,v=!0}if(0!=e){var S=this.temp;n.localToWorld(S.set(this.data.offsetX,this.data.offsetY)),y.tx+=(S.x-y.tx)*e,y.ty+=(S.y-y.ty)*e,v=!0}if(0at.MathUtils.PI?P-=at.MathUtils.PI2:P<-at.MathUtils.PI&&(P+=at.MathUtils.PI2),P=C+(P+d)*i,M=Math.sqrt(_*_+T*T),y.c=Math.cos(P)*M,y.d=Math.sin(P)*M,v=!0}v&&(m.appliedValid=!1)}},ge.prototype.applyRelativeWorld=function(){for(var t=this.rotateMix,e=this.translateMix,r=this.scaleMix,i=this.shearMix,n=this.target,o=n.matrix,s=o.a,a=o.c,h=o.b,l=o.d,u=0at.MathUtils.PI?m-=at.MathUtils.PI2:m<-at.MathUtils.PI&&(m+=at.MathUtils.PI2),m*=t;var E=Math.cos(m),S=Math.sin(m);x.a=E*_-S*T,x.c=E*b-S*w,x.b=S*_+E*T,x.d=S*b+E*w,y=!0}if(0!=e){var M=this.temp;n.localToWorld(M.set(this.data.offsetX,this.data.offsetY)),x.tx+=M.x*e,x.ty+=M.y*e,y=!0}if(0at.MathUtils.PI?m-=at.MathUtils.PI2:m<-at.MathUtils.PI&&(m+=at.MathUtils.PI2),b=x.c,w=x.d,m=Math.atan2(w,b)+(m-at.MathUtils.PI/2+d)*i,D=Math.sqrt(b*b+w*w),x.c=Math.cos(m)*D,x.d=Math.sin(m)*D,y=!0),y&&(v.appliedValid=!1)}},ge.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,r=this.scaleMix,i=this.shearMix,n=this.target;n.appliedValid||n.updateAppliedTransform();for(var o=this.bones,s=0,a=o.length;s>1,i=this.indicesArray,n=i.length=0;n=e?t:m.setArraySize(t,e,r)},m.newArray=function(t,e){for(var r=new Array(t),i=0;ithis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,1=this.values.length},M.prototype.addValue=function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0},M.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*o;var s=t.bone.skeleton,a=t.attachmentVertices,h=this.vertices,l=this.bones;if(null!=l){for(var u=0,c=0,d=0;dT.innerHeight?(GD.renderer.resize(GD.height,GD.width),GD.orientation<0?(GD.root.rotation=Math.PI/2,GD.root.x=GD.height):(GD.root.rotation=-Math.PI/2,GD.root.y=GD.width),GD.renderer.view.style.width=r/t+"px",n&&(n.style.width=r/t+"px")):(GD.renderer.resize(GD.width,GD.height),GD.root.rotation=0,GD.root.x=0,GD.root.y=0):T.innerWidth자동회전 기능을 켜 주세요."}s.innerHTML=u}r.appendChild(s)}0===l&&(_.body.appendChild(e),GD.orientationChange(!0),GD.renderer.view.style.visibility="hidden")}else 0T.innerHeight&&(90===GD.orientation?i.data.global={x:GD.width-i.data.global.y,y:i.data.global.x}:-90===GD.orientation&&(i.data.global={x:i.data.global.y,y:GD.height-i.data.global.x})),e&&e.call(r,i,t)},PIXI.Container.prototype.setRect=function(t,e,r,i){void 0===i&&(i=1);var n=new PIXI.Graphics;return n.beginFill(t,i),n.drawRect(0,0,e,r),n.endFill(),n},PIXI.Container.prototype.setDrawRect=function(t,e,r,i,n){t&&(void 0===n&&(n=1),t.clear(),t.beginFill(e,n),t.drawRect(0,0,r,i),t.endFill())},PIXI.Container.prototype.setRoundRect=function(t,e,r,i,n){void 0===i&&(i=1);var o=new PIXI.Graphics;return o.beginFill(t,i),o.drawRoundedRect(0,0,e,r,n),o.endFill(),o},PIXI.Container.prototype.setDrawRoundRect=function(t,e,r,i,n,o){t&&(void 0===n&&(n=1),t.clear(),t.beginFill(e,n),t.drawRoundedRect(0,0,r,i,o),t.endFill())},PIXI.Container.prototype.showDarkBg=function(t,e){e=e||.8,this.hideDarkBg(),GD.darkBg?GD.darkBg.clear():GD.darkBg=new PIXI.Graphics,GD.darkBg.beginFill(0,e),GD.darkBg.drawRect(0,0,GD.width,GD.height),GD.darkBg.endFill(),GD.darkBg.interactive=!0,t.addChildAt(GD.darkBg,0)},PIXI.Container.prototype.hideDarkBg=function(){GD.darkBg&&GD.darkBg.parent&&GD.darkBg.parent.removeChild(GD.darkBg)},Array.prototype.sortBy=function(r){return this.slice(0).sort(function(t,e){return t[r]>e[r]?1:t[r]this.viewTotal&&(i=this.viewTotal),e=0;ethis.itemHeight&&(this.moveY=this.itemHeight),this.moveUp()):(this.moveY<-this.itemHeight&&(this.moveY=-this.itemHeight),this.moveDown())}},GD.VList.prototype.moveUp=function(){for(var t,e,r=this.list.length;r--;){if(t=this.list[r],this.viewTotal=this.listData.length?t.visible=!1:(t.y=this.list[this.viewTotal-1].y+this.itemHeight+this.vSpace,t.ty=t.y,t.visible=!0),this.list.splice(r,1),this.list.push(t))}if(this.isScroll)if(0this.listH-this.listH/2)return void(this.moveY=-1);e.y-=this.moveY,e.y>this.listH&&0<=e.id-this.viewTotal&&(r=this.list[0].id-1,e.init(1+r,this.listData[r]),e.id===this.selectIndex&&e.select(!0),e.id<0?e.visible=!1:(e.y=this.list[0].y-this.itemHeight-this.vSpace,e.ty=e.y,e.visible=!0),this.list.splice(t,1),this.list.unshift(e))}if(this.isScroll)if((e=this.list[this.list.length-1]).id===this.listData.length-1&&e.y+this.itemHeightthis.listH)for(this.isMoveBack=!0,this.isScroll=!1,i=this.list.length,t=0;tthis.list.length?(this.moveUp(),this.moveY<0&&(this.moveY=0)):(this.moveDown(),0=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height},uniqueArray:function(t){for(var e=[],r=0,i=t.length;rr)return t.text=e.substr(0,i-1)+"...";t.text=e},Timer:function(t,e){var r,i,n=e;this.pause=function(){T.clearTimeout(r),n-=new Date-i},this.resume=function(){i=new Date,T.clearTimeout(r),r=T.setTimeout(t,n)},this.stop=function(){T.clearTimeout(r)},this.resume()},iosCheck:function(){return!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform)},getCookie:function(t){var e=_.cookie.match("(^|;) ?"+t+"=([^;]*)(;|$)");return e?e[2]:null},setCookie:function(t,e,r){var i=new Date;i.setTime(i.getTime()+24*r*60*60*1e3);var n="expires="+i.toUTCString();_.cookie=t+"="+e+";"+n+";path=/"}},(ke=function(){return new ke.fn.init}).fn=ke.prototype={constructor:ke,init:function(){return this},xorEncoder:function(t,e){for(var r=[],i=0;iGD.height&&0===T.orientation&&(e=n>=T.innerWidth?(t=.5*(T.innerHeight-i),-T.innerWidth):(t=0,-T.innerWidth+.5*(T.innerWidth-n)),Xe.adContainer.setAttribute("style","transform-origin: left top; transform:rotate(90deg) translateX("+t+"px) translateY("+e+"px)"));Xe.adsManager&&Xe.adsManager.resize(Xe.adWidth,Xe.adHeight,google.ima.ViewMode.NORMAL)},Xe.requestAds=function(t,e){this.callback=t,this.playType=1|e;var r=1;GD.Util.iosCheck()&&(r=2),1===r?this.showAD():gamen.relay_game_start_click()},Xe.showAD=function(){this.createAdDisplayContainer(),this.adDisplayContainer.initialize(),this.adsLoader=new google.ima.AdsLoader(this.adDisplayContainer),this.adsLoader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.onAdsManagerLoaded,!1),this.adsLoader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdError,!1);var t=new google.ima.AdsRequest;t.adTagUrl="https://googleads.g.doubleclick.net/pagead/ads?ad_type=video_image&client=ca-games-pub-4035509841477666&description_url=http%3A%2F%2Fwww.gamen.com&videoad_start_delay=0&hl=ko&max_ad_duration=30000",console.log(t.adTagUrl),t.nonLinearAdSlotWidth=this.adWidth,t.nonLinearAdSlotHeight=this.adHeight,this.adsLoader.requestAds(t)},Xe.onAdsManagerLoaded=function(t){var e=GD.renderer.view;e.currentTime=0;var r=new google.ima.AdsRenderingSettings;r.restoreCustomPlaybackStateOnAdBreakComplete=!0,Xe.adsManager=t.getAdsManager(e,r),Xe.adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,Xe.onAdError),Xe.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,Xe.onContentPauseRequested),Xe.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,Xe.onContentResumeRequested),Xe.adsManager.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,Xe.onAdEvent),Xe.adsManager.addEventListener(google.ima.AdEvent.Type.LOADED,Xe.onAdEvent),Xe.adsManager.addEventListener(google.ima.AdEvent.Type.STARTED,Xe.onAdEvent),Xe.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,Xe.onAdEvent),Xe.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPED,Xe.onAdEvent),Xe.adsManager.addEventListener(google.ima.AdEvent.Type.CLICK,Xe.onAdEvent);try{Xe.adsManager.init(Xe.adWidth,Xe.adHeight,google.ima.ViewMode.NORMAL),Xe.adsManager.start()}catch(t){console.log(t)}},Xe.onAdEvent=function(t){var e=t.getAd();switch(t.type){case google.ima.AdEvent.Type.LOADED:e.isLinear();break;case google.ima.AdEvent.Type.STARTED:e.isLinear()&&(Xe.intervalTimer=setInterval(function(){Xe.adsManager.getRemainingTime()},300));break;case google.ima.AdEvent.Type.CLICK:case google.ima.AdEvent.Type.SKIPPED:case google.ima.AdEvent.Type.COMPLETE:case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:Xe.adContainer.innerHTML="",Xe.adContainer.parentElement.removeChild(Xe.adContainer),Xe.callback&&setTimeout(function(){Xe.callback(!0)},1e3),e.isLinear()&&clearInterval(Xe.intervalTimer)}},Xe.onAdError=function(t){console.log(t.getError()),Xe.callback&&Xe.callback(!1)},Xe.onContentPauseRequested=function(){},Xe.onContentResumeRequested=function(){},T.addEventListener("resize",function(t){Xe.adContainer&&setTimeout(Xe.setAdPosition,200)}),Fe=_.getElementsByTagName("head")[0],(Ue=_.createElement("script")).type="text/javascript",Ue.src="//imasdk.googleapis.com/js/sdkloader/ima3.js?v="+CACHE_VER,Fe.appendChild(Ue),T.ImaManager=Xe,GD.SlotItem=function(){PIXI.Container.call(this),this.info=null,this.bg=this.createRect(0,0,380,70,16777215,1),this.profile=this.setSpriteTexture(this.profile,"texture","popup_ranking_thumb"),this.profile.anchor.set(.5),this.profile.scale.set(.55),this.profile.x=50,this.profile.y=35,this.maskCir=new PIXI.Graphics,this.maskCir.x=this.profile.x,this.maskCir.y=this.profile.y,this.profile.mask=this.maskCir,this.nameTxt=new PIXI.Text("",{fontFamily:"NanumSquare",fontSize:"20px",fill:"#000000"}),this.nameTxt.x=95,this.nameTxt.y=12,this.lvTxt=new PIXI.Text("",{fontFamily:"NanumSquare",fontSize:"18px",fill:"#FF0000"}),this.lvTxt.x=this.nameTxt.x,this.lvTxt.y=this.nameTxt.y+25,this.rankTxt=new GD.NumberText("c5_","right",0),this.rankTxt.x=350,this.rankTxt.y=15},GD.SlotItem.constructor=GD.SlotItem,GD.SlotItem.prototype=Object.create(PIXI.Container.prototype),GD.SlotItem.prototype.init=function(t,e){this.removeAll(),this.addChild(this.bg),this.info=t,this.info&&(this.addChild(this.profile),this.addChild(this.maskCir),this.addChild(this.nameTxt),this.addChild(this.lvTxt),this.addChild(this.rankTxt),this.profile.texture=PIXI.Texture.fromImage(t.img),t.nick?GD.Util.getOverString(this.nameTxt,t.nick,180):this.nameTxt.text="",this.lvTxt.text="LV. "+t.point,this.rankTxt.setValue(t.ranking),this.rankTxt.fileName=e?"c6_":"c5_",this.setMask(60))},GD.SlotItem.prototype.setMask=function(t){this.maskCir.clear(),this.maskCir.beginFill(16777215,1),this.maskCir.drawCircle(0,0,t/2),this.maskCir.endFill()},GD.SlotItem.prototype.setInteractive=function(t){},GD.SlotItem.prototype.removeAll=function(){this.removeChildren()},GD.SlotItem.getInstance=function(){return GD.SlotItem||(GD.SlotItem=new GD.SlotItem),GD.SlotItem},GD.SlotItem.prototype.updateTransform=function(){PIXI.Container.prototype.updateTransform.call(this)},GD.Lyto=function(){PIXI.Container.call(this),this.effectCount=0,this.callback=null,this.lyto=new PIXI.spine.Spine(GD.loader.resources.cha.spineData),this.lyto.x=GD.cw,this.lyto.y=280,this.somi=new PIXI.spine.Spine(GD.loader.resources.cha.spineData),this.somi.y=this.lyto.y,this.effectContainer=new PIXI.Container,this.effect=new PIXI.spine.Spine(GD.loader.resources.effect.spineData),this.effect.x=GD.cw,this.effect.y=GD.ch,this.addTimeText=new PIXI.spine.Spine(GD.loader.resources.effect.spineData),this.addTimeText.x=GD.cw,this.addTimeText.y=300,this.effects=[],this.tmpEffects=[]},GD.Lyto.constructor=GD.Lyto,GD.Lyto.prototype=Object.create(PIXI.Container.prototype),GD.Lyto.prototype.init=function(t,e){this.removeAll(),this.callback=t,this.effectCount=0,this.somi.x=-200,this.effect.x=-1e3,this.addTimeText.x=-1e3,this.lyto.x=-1e3,this.setSkin(e),this.addChild(this.somi),this.addChild(this.lyto),this.addChild(this.effect),this.addChild(this.addTimeText),this.somi.state.update(0),this.somi.state.clearTracks(),this.somi.skeleton.setToSetupPose(),TweenMax.delayedCall(.3,this.in.bind(this))},GD.Lyto.prototype.setSkin=function(t){this.lyto.skeleton.setSkin(null),this.lyto.skeleton.setSkinByName(t)},GD.Lyto.prototype.setSpine=function(t,e,r,i){switch(t.state.update(0),t.state.clearTracks(),t.skeleton.setToSetupPose(),t.state.setAnimation(e,r,i),r){case"effect_1":case"effect_2":t.x=GD.cw}},GD.Lyto.prototype.stopSpine=function(t,e){t.state.setEmptyAnimation(0),e&&(t.x=-1e3)},GD.Lyto.prototype.in=function(){this.lyto.x=GD.cw,this.setSpine(this.lyto,0,"lyto_in",!1),this.lyto.state.tracks[0].listener={complete:function(){this.callback(),this.default()}.bind(this)}},GD.Lyto.prototype.default=function(){this.setSpine(this.lyto,0,"lyto_basic",!0)},GD.Lyto.prototype.angry=function(){this.setSpine(this.lyto,0,"lyto_angry",!0),this.lyto.state.tracks[0].listener={complete:function(){this.default()}.bind(this)}},GD.Lyto.prototype.gameOver=function(){this.addChild(this.lyto),this.setSpine(this.lyto,0,"lyto_result",!1)},GD.Lyto.prototype.happy1=function(t,e){this.setSpine(this.lyto,0,"lyto_happy1",!0),this.setSpine(this.somi,0,"somi_basic",!1),this.somi.x=GD.cw,this.somi.y=this.lyto.y,this.somi.state.tracks[0].listener={complete:function(){TweenMax.to(this.somi,.2,{y:this.lyto.y+100,ease:Sine.easeIn,onComplete:function(){this.somi.x=-200,this.default(),this.stopSpine(this.effect,!0),this.stopSpine(this.addTimeText,!0)}.bind(this)}),TweenMax.to(this.addTimeText.scale,.2,{x:0,y:0,ease:Sine.easeIn}),TweenMax.to(this.effect,.3,{alpha:0})}.bind(this)},e||(this.setSpine(this.effect,0,"effect_1",!0),this.effect.alpha=1),t&&(this.setSpine(this.addTimeText,0,"effect_2",!1),this.addTimeText.scale.set(1),this.addTimeText.state.tracks[0].listener={complete:function(){TweenMax.to(this.addTimeText.scale,.2,{x:0,y:0,delay:.2,ease:Sine.easeIn})}.bind(this)},TweenMax.killTweensOf(this.addTimeText.scale),TweenMax.killTweensOf(this.somi),TweenMax.killTweensOf(this.effect))},GD.Lyto.prototype.effectPlay=function(){this.setSpine(this.effect,0,"effect_1",!1),this.effect.alpha=1,this.effect.state.tracks[0].listener={complete:function(){TweenMax.to(this.effect,.3,{alpha:0,onComplete:function(){this.stopSpine(this.effect,!0)}.bind(this)})}.bind(this)}},GD.Lyto.prototype.wrong=function(){this.setSpine(this.lyto,0,"lyto_wrong",!0),this.lyto.state.tracks[0].listener={complete:function(){this.default()}.bind(this)}},GD.Lyto.prototype.showStarEffect=function(t,e){var r;this.tmpEffects.length?r=this.tmpEffects.shift():(r=new PIXI.spine.Spine(GD.loader.resources.effect.spineData)).scale.set(1.2),r.x=t,r.y=e,r.id=this.effectCount,this.setSpine(r,0,"effect_3",!1),r.state.tracks[0].listener={complete:function(){this.stopSpine(r,!0),this.hideStarEffect(r.id)}.bind(this)},r.parent||this.addChild(r),this.effects.push(r),this.effectCount++},GD.Lyto.prototype.hideStarEffect=function(t){var e,r,i=this.effects.length;for(e=0;er?this.listContainer.y=-(this.slotMask.y+this.listContainer.height-this.slotMask.height):this.listContainer.y=this.slotMask.y,3GD.width/GD.height&&(t=T.innerHeight/GD.height);var e=160*t,r=.5*(T.innerWidth-parseInt(GD.renderer.view.style.width)),i=.5*(T.innerHeight-parseInt(GD.renderer.view.style.height));this.imgBtn.style.opacity=0,this.imgBtn.style.position="absolute",this.imgBtn.style.width=e+"px",this.imgBtn.style.height=e+"px",this.imgBtn.style.left=30*t+r+"px",this.imgBtn.style.top=165*t+i+"px"},GD.RankView.prototype.removeAll=function(){this.removeChildren(),this.setInteractive(!1)},GD.RankView.getInstance=function(){return GD.rankView||(GD.rankView=new GD.RankView),GD.rankView},GD.RankViewListItem=function(){PIXI.Container.call(this),this.id=null,this.listData=null,this.numTxt=this.setText("","Airl",2761269,45),this.numTxt.style.fontWeight="bold",this.numTxt.style.align="center",this.numTxt.anchor.set(.5),this.numTxt.x=32,this.numTxt.y=45,this.addChild(this.numTxt),this.topTxt=this.setSpriteTexture(null,"texture","rank_1"),this.topTxt.x=this.numTxt.x,this.topTxt.y=45,this.topTxt.anchor.set(.5),this.addChild(this.topTxt),this.profile=new GD.ProfileImg,this.profile.x=140,this.profile.y=45,this.addChild(this.profile),this.rankMedal=this.setSpriteTexture(null,"texture","rank_icon_1"),this.rankMedal.x=110,this.rankMedal.y=24,this.rankMedal.anchor.set(.5),this.nameTxt=this.setText("","Airl",16777215,30),this.nameTxt.x=this.profile.x+45,this.nameTxt.y=30,this.addChild(this.nameTxt),this.levelTxt=this.setText("","Airl",16777215,30),this.levelTxt.x=365,this.levelTxt.y=this.nameTxt.y,this.addChild(this.levelTxt),this.bg=this.setSpriteTexture(null,"texture","readerboard_line"),this.bg.y=90,this.addChild(this.bg)},GD.RankViewListItem.constructor=GD.RankViewListItem,GD.RankViewListItem.prototype=Object.create(PIXI.Container.prototype),GD.RankViewListItem.prototype.init=function(t,e){this.id=t-1,this.listData=e,this.reset(e)},GD.RankViewListItem.prototype.reset=function(t){t&&(this.profile.init(t.photo,70),t.rank<4?(this.numTxt.visible=!1,this.topTxt.visible=!0,this.setSprite(this.topTxt,"rank_"+t.rank+".png"),this.setSprite(this.rankMedal,"rank_icon_"+t.rank+".png"),this.addChild(this.rankMedal)):(this.numTxt.visible=!0,this.topTxt.visible=!1,this.numTxt.text=t.rank,this.removeChild(this.rankMedal)),GD.Util.getOverString(this.nameTxt,t.name,140),this.levelTxt.text=GD.Util.comma(t.level))},GD.Message=function(){PIXI.Container.call(this),this.callback=null,this.target=null,this.timer=null,this.tween=null,this.message=this.setSpriteTexture(this.message,"texture","t_ready"),this.message.x=GD.cw,this.message.y=GD.ch,this.message.anchor.set(.5),this.bg=this.createRect(0,330,GD.width,GD.height-330,2761269,.8)},GD.Message.constructor=GD.Message,GD.Message.prototype=Object.create(PIXI.Container.prototype),GD.Message.prototype.init=function(){this.removeAll()},GD.Message.prototype.show=function(t,e,r){this.clearTween(),e&&(this.callback=e,this.target=r);var i,n=500;switch(t){case"READY":i="t_ready",GD.sound.commonPlay("sound_readygo");break;case"GO":i="t_go";break;case"GAME_OVER":n=500,i="t_gameover",this.addChild(this.bg),GD.sound.commonPlay("sound_gameover")}this.setSpriteTexture(this.message,"texture",i),this.addChild(this.message),this.message.scale.set(2),this.tween=TweenMax.to(this.message.scale,.5,{x:1,y:1,ease:Power4.easeOut,onComplete:function(){this.tween=null,this.timer="READY"==t?new GD.Util.Timer(function(){this.show("GO")}.bind(this),n):new GD.Util.Timer(function(){this.callback&&this.callback.call(this.target),this.removeAll()}.bind(this),n)}.bind(this)})},GD.Message.prototype.pause=function(){this.tween&&this.tween.pause(),this.timer&&this.timer.pause()},GD.Message.prototype.resume=function(){this.tween&&this.tween.resume(),this.timer&&this.timer.resume()},GD.Message.prototype.removeAll=function(){this.removeChildren(),this.clearTween(),this.callback=null,this.target=null,this.tween=null,this.timer=null},GD.Message.prototype.clearTween=function(){TweenMax.killTweensOf(this.message.scale),this.timer&&this.timer.pause()},GD.Message.getInstance=function(){return GD.message||(GD.message=new GD.Message),GD.message},GD.Message.prototype.updateTransform=function(){PIXI.Container.prototype.updateTransform.call(this)},GD.OptionPopup=function(t){PIXI.Container.call(this),this.isBgmPlay=t,this.darkBg=this.createRect(0,0,GD.width,GD.height,0,.7),this.bg=this.setSpriteTexture(null,"texture","option_box_0"),this.bg.anchor.set(.5),this.bg.x=GD.cw,this.bg.y=GD.ch,this.closeBtn=this.setSpriteTexture(null,"texture","option_close_btn"),this.closeBtn.anchor.set(.5),this.closeBtn.x=200,this.closeBtn.y=-184,this.setTouchStart(this.closeBtn,function(){GD.sound.commonPlay("sound_click")},this),this.setTouchEnd(this.closeBtn,function(){this.setInteractive(!1),TweenMax.to(this.bg.scale,.1,{x:0,y:0,onComplete:function(){this.removeAll(),this.emit("OPTION_POPUP_CLOSE_EVENT")}.bind(this)})},this),this.bg.addChild(this.closeBtn),this.allBtn=this.setSpriteTexture(null,"texture","option_off_0"),this.allBtn.anchor.set(.5),this.allBtn.x=110,this.allBtn.y=-63,this.setTouchStart(this.allBtn,function(){GD.sound.commonPlay("sound_click")},this),this.setTouchEnd(this.allBtn,function(){GD.sound.isAllSound=!GD.sound.isAllSound,GD.sound.isAllSound?this.isBgmPlay&&GD.ui.isGameStart&&GD.sound.bgmPlay():GD.sound.allStop(),this.setSoundButton()},this),this.bg.addChild(this.allBtn),this.bgmBtn=this.setSpriteTexture(null,"texture","option_off_0"),this.bgmBtn.anchor.set(.5),this.bgmBtn.x=this.allBtn.x,this.bgmBtn.y=72,this.setTouchStart(this.bgmBtn,function(){GD.sound.commonPlay("sound_click")},this),this.setTouchEnd(this.bgmBtn,function(){GD.sound.isBgmSound=!GD.sound.isBgmSound,GD.sound.isBgmSound?this.isBgmPlay&&GD.ui.isGameStart&&GD.sound.bgmPlay():GD.sound.bgmStop(),this.setSoundButton()},this),this.bg.addChild(this.bgmBtn),this.effectBtn=this.setSpriteTexture(null,"texture","option_off_0"),this.effectBtn.anchor.set(.5),this.effectBtn.x=this.allBtn.x,this.effectBtn.y=164,this.setTouchStart(this.effectBtn,function(){GD.sound.commonPlay("sound_click")},this),this.setTouchEnd(this.effectBtn,function(){GD.sound.isEffectSound=!GD.sound.isEffectSound,this.setSoundButton()},this),this.bg.addChild(this.effectBtn)},GD.OptionPopup.constructor=GD.OptionPopup,GD.OptionPopup.prototype=Object.create(PIXI.Container.prototype),GD.OptionPopup.prototype.init=function(){this.removeAll(),this.addChild(this.darkBg),this.addChild(this.bg),this.setSoundButton(),this.bg.scale.set(0),TweenMax.to(this.bg.scale,.15,{x:1,y:1,onComplete:function(){this.setInteractive(!0)}.bind(this)})},GD.OptionPopup.prototype.setSoundButton=function(){GD.sound.isAllSound?this.setSpriteTexture(this.allBtn,"texture","option_on_0"):this.setSpriteTexture(this.allBtn,"texture","option_off_0"),GD.sound.isBgmSound?GD.sound.isAllSound?this.setSpriteTexture(this.bgmBtn,"texture","option_on_0"):this.setSpriteTexture(this.bgmBtn,"texture","option_on_1"):GD.sound.isAllSound?this.setSpriteTexture(this.bgmBtn,"texture","option_off_0"):this.setSpriteTexture(this.bgmBtn,"texture","option_off_1"),GD.sound.isEffectSound?GD.sound.isAllSound?this.setSpriteTexture(this.effectBtn,"texture","option_on_0"):this.setSpriteTexture(this.effectBtn,"texture","option_on_1"):GD.sound.isAllSound?this.setSpriteTexture(this.effectBtn,"texture","option_off_0"):this.setSpriteTexture(this.effectBtn,"texture","option_off_1")},GD.OptionPopup.prototype.removeAll=function(){this.removeChildren()},GD.OptionPopup.prototype.setInteractive=function(t){this.closeBtn.interactive=t,this.allBtn.interactive=t,this.bgmBtn.interactive=t,this.effectBtn.interactive=t},GD.ProfileConfirmPopup=function(){PIXI.Container.call(this),this.callback=null,this.darkBg=this.createRect(0,0,GD.width,GD.height,0,.7),this.bg=this.setSpriteTexture(null,"texture","popup_box"),this.bg.anchor.set(.5),this.bg.x=GD.cw,this.bg.y=GD.ch,this.closeBtn=this.setSpriteTexture(null,"texture","btn_cancel"),this.closeBtn.anchor.set(.5),this.closeBtn.x=-125,this.closeBtn.y=50,this.setTouchStartAction(this.closeBtn),this.setTouchEnd(this.closeBtn,function(){this.onClose(!1)},this),this.bg.addChild(this.closeBtn),this.confirmBtn=this.setSpriteTexture(null,"texture","btn_ok"),this.confirmBtn.anchor.set(.5),this.confirmBtn.x=-this.closeBtn.x,this.confirmBtn.y=this.closeBtn.y,this.setTouchStartAction(this.confirmBtn),this.setTouchEnd(this.confirmBtn,function(){this.onClose(!0)},this),this.bg.addChild(this.confirmBtn)},GD.ProfileConfirmPopup.constructor=GD.ProfileConfirmPopup,GD.ProfileConfirmPopup.prototype=Object.create(PIXI.Container.prototype),GD.ProfileConfirmPopup.prototype.init=function(t){this.callback=t,this.removeAll(),this.addChild(this.darkBg),this.addChild(this.bg),this.bg.scale.set(0),TweenMax.to(this.bg.scale,.15,{x:1,y:1,onComplete:function(){this.setInteractive(!0)}.bind(this)})},GD.ProfileConfirmPopup.prototype.onClose=function(t){TweenMax.to(this.bg.scale,.15,{x:0,y:0,ease:Sine.easeIn,onComplete:function(){this.removeAll(),this.callback&&this.callback(t)}.bind(this)})},GD.ProfileConfirmPopup.prototype.removeAll=function(){this.removeChildren()},GD.ProfileConfirmPopup.prototype.setInteractive=function(t){this.closeBtn.interactive=t,this.confirmBtn.interactive=t},PIXI.Container.prototype.setTouchStartAction=function(e,r,i){var n=this;e.mousedown=e.touchstart=function(t){t.stopPropagation(),e.textureName&&0<=e.textureName.indexOf("option_close_btn")?GD.sound.commonPlay("sound_close"):GD.sound.commonPlay("sound_click"),GD.buttonAction(e),n.dispatchTouchEvent(e,r,i,t)}.bind(i)},PIXI.Container.prototype.setTouchStart=function(e,r,i){var n=this;e.mousedown=e.touchstart=function(t){t.stopPropagation(),n.dispatchTouchEvent(e,r,i,t)}.bind(i)},PIXI.Container.prototype.setTouchEnd=function(e,r,i){var n=this;e.tap=function(t){t.stopPropagation(),GD.fullScreen(),n.dispatchTouchEvent(e,r,i,t)}.bind(i),GD.isMobile||(e.click=function(t){t.stopPropagation(),n.dispatchTouchEvent(e,r,i,t)}.bind(i))},PIXI.Container.prototype.setTouchMove=function(e,r,i){var n=this;e.mousemove=e.touchmove=function(t){t.stopPropagation(),n.dispatchTouchEvent(e,r,i,t)}.bind(i)},PIXI.Container.prototype.dispatchTouchEvent=function(t,e,r,i){GD.isOrientationFixed&&GD.isMobile&&T.innerWidth>T.innerHeight&&(90==GD.orientation?i.data.global={x:GD.WW-i.data.global.y,y:i.data.global.x}:-90==GD.orientation&&(i.data.global={x:i.data.global.y,y:GD.WH-i.data.global.x})),e&&e.call(r,i,t)},PIXI.Container.prototype.createRect=function(t,e,r,i,n,o){var s=new PIXI.Graphics;return s.beginFill(n,o),s.drawRect(t,e,r,i),s.endFill(),s},PIXI.Container.prototype.showLoading=function(){GD.loading=GD.LoadingView.getInstance(),GD.loading.init(),this.addChild(GD.loading)},PIXI.Container.prototype.hideLoading=function(){this.removeChild(GD.loading)},GD.CommonIntro=function(t){PIXI.Container.call(this),GD.isMenu&&(this.menuBtn=this.setSpriteTexture(null,"texture","bt_menu"),this.menuBtn.anchor.set(.5),this.menuBtn.x=GD.width-50,this.menuBtn.y=50,this.setTouchStartAction(this.menuBtn),this.setTouchEnd(this.menuBtn,function(){GD.isMenu&&gamen.sidebar&&(gamen.sidebar(),this.setInteractive(!1))},this)),this.rankBtn=null,this.shareBtn=null,this.startBtn=null,this.joinBtn=null,this.joinGuide=this.setSpriteTexture(null,"texture","intro_text"),this.joinGuide.anchor.set(.5),this.joinGuide.x=GD.cw,this.joinGuide.y=GD.height-100,this.bg=this.setSpriteTexture(null,"sprite",t),this.copyright=this.setSpriteTexture(null,"texture","copybar_w"),this.copyright.anchor.set(.5),this.copyright.x=GD.width/2,this.copyright.y=GD.height-25,gamen.loadend()},GD.CommonIntro.constructor=GD.CommonIntro,GD.CommonIntro.prototype=Object.create(PIXI.Container.prototype),GD.CommonIntro.prototype.init=function(){this.removeAll(),GD.LOGIN=gamen.ismember,GD.PLAY_TYPE=gamen.onlymember,this.addChild(this.bg),this.addChild(this.copyright),this.menuBtn&&this.addChild(this.menuBtn);"i"!=GD.PLAY_TYPE||GD.LOGIN?"y"==GD.PLAY_TYPE?(this.initJoin("intro_bt_login",GD.cw,1080,this.showLoginPage,this),this.addChild(this.joinGuide)):("share"===coid||(this.initRank("intro_bt_ranking",GD.cw-265,1140),this.initShare("intro_bt_share",GD.cw+265,1140)),this.initStart("intro_bt_start",GD.cw,1140,this.loginCheck,this)):(this.initStart("intro_bt_start2",GD.cw+160,1080,this.loginCheck,this),this.initJoin("intro_bt_login",GD.cw-160,1080,this.showLoginPage,this),this.addChild(this.joinGuide)),this.setInteractive(!0)},GD.CommonIntro.prototype.goGame=function(){gc.game=gc.Game.getInstance(),gc.game.init(),GD.stage.addChild(gc.game)},GD.CommonIntro.prototype.initRank=function(t,e,r){0!=gamen.intro_view_status&&"false"!=gamen.intro_view_status&&(this.rankBtn=this.setSpriteTexture(this.rankBtn,"texture",t),this.rankBtn.anchor.set(.5),this.rankBtn.x=e,this.rankBtn.y=r,this.rankBtn.scale.set(1),this.addChild(this.rankBtn),this.setTouchStartAction(this.rankBtn,function(){GD.exitFullScreen()},this),this.setTouchEnd(this.rankBtn,function(){gamen.rank("simple")},this),TweenMax.to(this.rankBtn,.3,{y:r,delay:.15}))},GD.CommonIntro.prototype.initShare=function(t,e,r){0!=gamen.intro_view_status&&"false"!=gamen.intro_view_status&&(this.shareBtn=this.setSpriteTexture(this.shareBtn,"texture",t),this.shareBtn.anchor.set(.5),this.shareBtn.x=e,this.shareBtn.y=r,this.shareBtn.scale.set(1),this.addChild(this.shareBtn),this.setTouchStartAction(this.shareBtn,function(){GD.exitFullScreen()},this),this.setTouchEnd(this.shareBtn,function(){gamen.share()},this),TweenMax.to(this.shareBtn,.3,{y:r,delay:.15}))},GD.CommonIntro.prototype.initStart=function(t,e,r,i,n){0!=gamen.intro_view_status&&"false"!=gamen.intro_view_status&&(this.startBtn=this.setSpriteTexture(this.startBtn,"texture",t),this.startBtn.anchor.set(.5),this.startBtn.x=e,this.startBtn.y=r,this.startBtn.scale.set(1),this.addChild(this.startBtn),this.setTouchStartAction(this.startBtn),this.setTouchEnd(this.startBtn,function(){GD.sound.allStop(),i.call(n)},this),this.startBtn.scale.set(0),TweenMax.to(this.startBtn.scale,.3,{x:1,y:1}))},GD.CommonIntro.prototype.initJoin=function(t,e,r,i,n){0!=gamen.intro_view_status&&"false"!=gamen.intro_view_status&&(this.joinBtn=this.setSpriteTexture(this.joinBtn,"texture",t),this.joinBtn.anchor.set(.5),this.joinBtn.x=e,this.joinBtn.y=r,this.joinBtn.scale.set(1),this.addChild(this.joinBtn),this.setTouchStartAction(this.joinBtn,function(){GD.exitFullScreen()},this),this.setTouchEnd(this.joinBtn,i,n),this.joinBtn.scale.set(0),TweenMax.to(this.joinBtn.scale,.3,{x:1,y:1}))},GD.CommonIntro.prototype.showLoginPage=function(){gamen.loginmore_login()},GD.CommonIntro.prototype.loginCheck=function(){this.setInteractive(!1),GD.LOGIN?(GD.showLoading(),DataManager.start(this.startDataComplete,this)):(DataManager.nonMemberStart(),this.startDataComplete()),GD.sound.bgmStop()},GD.CommonIntro.prototype.signedIn=function(){this.init()},GD.CommonIntro.prototype.sendStartData=function(){DataManager.start(this.startDataComplete,this)},GD.CommonIntro.prototype.startDataComplete=function(){GD.hideLoading(),GD.tutorial&&this.removeChild(GD.tutorial),GD.stage.removeChildren(),this.goGame()},GD.CommonIntro.prototype.setInteractive=function(t){this.menuBtn&&(this.menuBtn.interactive=t),this.rankBtn&&(this.rankBtn.interactive=t),this.shareBtn&&(this.shareBtn.interactive=t),this.startBtn&&(this.startBtn.interactive=t),this.joinBtn&&(this.joinBtn.interactive=t)},GD.CommonIntro.prototype.removeAll=function(){this.removeChildren(),this.setInteractive(!1)},GD.CommonIntro.getInstance=function(t){return GD.intro||(GD.intro=new GD.CommonIntro(t)),GD.intro},GD.CommonIntro.prototype.updateTransform=function(){Ce&&Le(),PIXI.Container.prototype.updateTransform.call(this)}}(window,document); //# sourceMappingURL=human.min.js.map