text: !function(t){function e(r){if(i[r])return i[r].exports;var n=i[r]={exports:{},id:r,loaded:!1};return t[r].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var i={};return e.m=t,e.c=i,e.p="/",e(0)}([function(t,e,i){t.exports=i(1)},function(t,e,i){var r,n,o;!function(s,a){n=[i(209),i(2),i(3)],r=a,o="function"==typeof r?r.apply(e,n):r,!(void 0!==o&&(t.exports=o))}(this,function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var n=(r(t),r(e)),o=r(i);console.log(n["default"]),console.log(o["default"]);var s=o["default"].autoDetectRenderer(256,256);s.view.style.position="absolute",s.view.style.display="block",s.autoResize=!0,s.resize(window.innerWidth,window.innerHeight),document.body.appendChild(s.view);var a=new o["default"].Container;s.render(a)})},function(t,e,i){!function(e,i){t.exports=i()}(this,function(){return function(t){function e(r){if(i[r])return i[r].exports;var n=i[r]={exports:{},id:r,loaded:!1};return t[r].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var i={};return e.m=t,e.c=i,e.p="/",e(0)}([function(t,e,i){t.exports=i(1)},function(t,e,i){var r,n,o,r,n,o;!function(s,a){n=[t,e,i(3),i(2)],r=a,o="function"==typeof r?r.apply(e,n):r,!(void 0!==o&&(t.exports=o))}(this,function(t,e){!function(s,a){n=[t,e,i(3),i(2)],r=a,o="function"==typeof r?r.apply(e,n):r,!(void 0!==o&&(t.exports=o))}(this,function(t,e,i,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(){for(var t=[],e=[1,2,3,4,5,6,7,8,9],i=0;i<3;i++)for(var r=0;r<3;r++)t[r]||(t[r]=[]),t[r][i]=[],t[r][i]=e.splice(Math.floor(Math.random()*e.length),1)[0];return t}function s(t,e){for(var i=[],r=0;r<3;r++)i=i.concat(t[r]);return i[e]}function a(t,e){for(var i=[[0,0,0],[0,0,0],[0,0,0]],r=0;r<3;r++)for(var n=0;n<3;n++)i[r][n]=s(t,e[r][n]);return i}function h(t){return JSON.parse(JSON.stringify(t))}function u(t){var e=Math.floor((t-1)/9),i=Math.floor(t%9/3),r=Math.floor(t%9%3);return{i:e,j:i,k:r}}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),c=function(){function t(){n(this,t),this.createType=r.CreateTypes.RANDOM}return l(t,[{key:"setType",value:function(t){this.createType=t||r.CreateTypes.RANDOM}},{key:"getType",value:function(){var t=this.createType||r.CreateTypes.RANDOM;return t}},{key:"createGame",value:function(){var t=o(),e=Math.floor(Math.random()*i.GamePattern.length),n=i.GamePattern[e],s=[];if(s=n.map(function(e,r){return a(t,i.TilePattern[e])}),this.createType===r.CreateTypes.RANDOM){for(var l=40,c=25,p=Math.floor(Math.random()*(l-c+1)+c),d=h(s),f=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80"],v=0;v<p;v++){var g=Math.floor(Math.random()*f.length),y=u(f[g]);d[y.i][y.j][y.k]=void 0,f.splice(g,1)}s={correctData:s,data:d}}return s}},{key:"gameDataCheck",value:function(t){for(var e={state:r.PlayTypes.SUCCESS,box:{},rows:{},cols:{}},i=!1,n=!1,o=function(r){var o=[];t[r].forEach(function(t,s){t.forEach(function(t,a){var h=o.indexOf(t);if(h>=0&&t){n=!0;var u=""+r+s+a;e.box[u]={_i:r,_j:s,_k:a};var l=Math.floor(h/3),c=h%3,p=""+r+l+c;e.box[p]={_i:r,_j:l,_k:c}}else t||(i=!0);o.push(t)})})},s=0;s<9;s++)o(s);for(var a=function(r){for(var o=function(o){var s=[],a=t[r][o].concat(t[r+1][o],t[r+2][o]);a.forEach(function(t,a){var h=r+Math.floor(a/3),u=a%3,l=s.indexOf(t);if(l>=0&&t){n=!0;var c=""+h+o+u;e.rows[c]={_i:h,_j:o,_k:u};var p=r+Math.floor(l/3),d=l%3,f=""+p+o+d;e.rows[f]={_i:p,_j:o,_k:d}}else t||(i=!0);s.push(t)})},s=0;s<3;s++)o(s)},h=0;h<9;h+=3)a(h);for(var u=function(r){for(var o=function(o){var s=[],a=0,h=[];h.push(t[r][a][o]),h.push(t[r][a+1][o]),h.push(t[r][a+2][o]),h.push(t[r+3][a][o]),h.push(t[r+3][a+1][o]),h.push(t[r+3][a+2][o]),h.push(t[r+6][a][o]),h.push(t[r+6][a+1][o]),h.push(t[r+6][a+2][o]),h.forEach(function(t,a){var h=3*Math.floor(a/3)+r,u=a%3,l=s.indexOf(t);if(l>=0&&t){n=!0;var c=""+h+u+o;e.cols[c]={_i:h,_j:u,_k:o};var p=3*Math.floor(l/3)+r,d=l%3,f=""+p+d+o;e.cols[f]={_i:p,_j:d,_k:o}}else t||(i=!0);s.push(t)})},s=0;s<3;s++)o(s)},l=0;l<3;l++)u(l);return n?e.state=r.PlayTypes.FAIL:i?e.state=r.PlayTypes.SOLVING:r.PlayTypes.state=r.PlayTypes.SUCCESS,e}}]),t}();e["default"]=new c,t.exports=e["default"]})})},function(t,e,i){var r,n,o,r,n,o;!function(i,s){n=[e],r=s,o="function"==typeof r?r.apply(e,n):r,!(void 0!==o&&(t.exports=o))}(this,function(e){!function(i,s){n=[e],r=s,o="function"==typeof r?r.apply(e,n):r,!(void 0!==o&&(t.exports=o))}(this,function(t){"use strict";"use strict;";Object.defineProperty(t,"__esModule",{value:!0});var e={SUCCESS:"SUCCESS",FAIL:"FAIL",SOLVING:"SOLVING"},i={RANDOM:"RANDOM"};t.PlayTypes=e,t.CreateTypes=i})})},function(t,e,i){var r,n,o,r,n,o;!function(i,s){n=[e],r=s,o="function"==typeof r?r.apply(e,n):r,!(void 0!==o&&(t.exports=o))}(this,function(e){!function(i,s){n=[e],r=s,o="function"==typeof r?r.apply(e,n):r,!(void 0!==o&&(t.exports=o))}(this,function(t){"use strict";"use strict;";Object.defineProperty(t,"__esModule",{value:!0});var e={};e.A=[[0,1,2],[3,4,5],[6,7,8]],e.B=[[1,2,0],[4,5,3],[7,8,6]],e.C=[[2,0,1],[5,3,4],[8,6,7]],e.D=[[3,4,5],[6,7,8],[0,1,2]],e.E=[[4,5,3],[7,8,6],[1,2,0]],e.F=[[5,3,4],[8,6,7],[2,0,1]],e.G=[[6,7,8],[0,1,2],[3,4,5]],e.H=[[7,8,6],[1,2,0],[4,5,3]],e.I=[[8,6,7],[2,0,1],[5,3,4]],e.J=[[8,7,6],[2,1,0],[5,4,3]],e.K=[[4,3,5],[7,6,8],[1,0,2]],e.L=[[6,8,7],[0,2,1],[3,5,4]],e.M=[[4,8,1],[7,5,6],[2,0,3]],e.N=[[8,2,4],[5,6,7],[1,3,0]],e.O=[[6,5,8],[0,7,2],[3,4,1]],e.P=[[7,2,6],[4,3,0],[8,1,5]],e.Q=[[5,6,7],[1,0,3],[2,8,4]],e.R=[[7,4,3],[6,1,8],[0,5,2]],e.S=[[3,0,5],[2,8,1],[4,6,7]],e.T=[[1,3,0],[8,2,4],[5,7,6]],e.U=[[4,2,0],[5,3,1],[8,6,7]],e.V=[[7,5,4],[1,8,3],[2,0,6]],e.W=[[8,5,3],[7,0,6],[2,4,1]],e.X=[[6,1,7],[0,2,8],[4,3,5]],e.Y=[[1,8,2],[5,6,0],[3,7,4]],e.Z=[[6,4,7],[2,1,8],[0,3,5]],e.AA=[[5,8,3],[7,6,4],[1,2,0]],e.AB=[[3,0,6],[4,7,2],[8,5,1]];var i=[];i[0]=["A","D","G","B","E","H","C","F","I"],i[1]=["A","G","D","B","H","E","C","I","F"],i[2]=["A","G","D","C","I","F","B","H","E"],i[3]=["A","J","F","I","K","A","B","L","E"],i[4]=["A","G","D","F","C","I","E","B","H"],i[5]=["A","O","R","M","P","S","N","Q","T"],i[6]=["A","R","O","M","S","P","N","T","Q"],i[7]=["A","R","O","N","T","Q","M","S","P"],i[8]=["A","O","R","N","Q","T","M","P","S"],i[9]=["A","W","Z","U","X","AA","V","Y","AB"],i[10]=["A","Z","W","U","AA","X","V","AB","Y"],i[11]=["A","Z","W","V","AB","Y","U","AA","X"],i[12]=["A","W","Z","V","Y","AB","U","X","AA"],t.TilePattern=e,t.GamePattern=i})})}])})},function(t,e,i){(function(e){i(4);var r=t.exports=i(9);r.extras=i(112),r.filters=i(120),r.interaction=i(132),r.loaders=i(136),r.mesh=i(188),r.particles=i(194),r.accessibility=i(199),r.extract=i(202),r.prepare=i(205),r.loader=new r.loaders.Loader,Object.assign(r,i(208)),e.PIXI=r}).call(e,function(){return this}())},function(t,e,i){i(5),i(7),i(8),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array)},function(t,e,i){Object.assign||(Object.assign=i(6))},function(t,e){"use strict";function i(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function r(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},i=0;i<10;i++)e["_"+String.fromCharCode(i)]=i;var r=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==r.join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(o){return!1}}var n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=r()?Object.assign:function(t,e){for(var r,s,a=i(t),h=1;h<arguments.length;h++){r=Object(arguments[h]);for(var u in r)n.call(r,u)&&(a[u]=r[u]);if(Object.getOwnPropertySymbols){s=Object.getOwnPropertySymbols(r);for(var l=0;l<s.length;l++)o.call(r,s[l])&&(a[s[l]]=r[s[l]])}}return a}},function(t,e){(function(t){if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!t.performance||!t.performance.now){var e=Date.now();t.performance||(t.performance={}),t.performance.now=function(){return Date.now()-e}}for(var i=Date.now(),r=["ms","moz","webkit","o"],n=0;n<r.length&&!t.requestAnimationFrame;++n)t.requestAnimationFrame=t[r[n]+"RequestAnimationFrame"],t.cancelAnimationFrame=t[r[n]+"CancelAnimationFrame"]||t[r[n]+"CancelRequestAnimationFrame"];t.requestAnimationFrame||(t.requestAnimationFrame=function(t){if("function"!=typeof t)throw new TypeError(t+"is not a function");var e=Date.now(),r=16+i-e;return r<0&&(r=0),i=e,setTimeout(function(){i=Date.now(),t(performance.now())},r)}),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(t){clearTimeout(t)})}).call(e,function(){return this}())},function(t,e){Math.sign||(Math.sign=function(t){return t=+t,0===t||isNaN(t)?t:t>0?1:-1})},function(t,e,i){var r=t.exports=Object.assign(i(10),i(13),{utils:i(23),ticker:i(26),DisplayObject:i(28),Container:i(33),Transform:i(31),TransformStatic:i(29),TransformBase:i(30),Sprite:i(34),CanvasSpriteRenderer:i(47),CanvasTinter:i(56),SpriteRenderer:i(57),Text:i(97),TextStyle:i(98),Graphics:i(99),GraphicsData:i(100),GraphicsRenderer:i(102),CanvasGraphicsRenderer:i(111),Texture:i(35),BaseTexture:i(36),RenderTexture:i(50),BaseRenderTexture:i(51),VideoBaseTexture:i(45),TextureUvs:i(46),CanvasRenderer:i(48),CanvasRenderTarget:i(53),Shader:i(86),WebGLRenderer:i(60),WebGLManager:i(59),ObjectRenderer:i(58),RenderTarget:i(83),Quad:i(84),SpriteMaskFilter:i(62),Filter:i(63),glCore:i(65),autoDetectRenderer:function(t,e,i,n){return t=t||800,e=e||600,!n&&r.utils.isWebGLSupported()?new r.WebGLRenderer(t,e,i):new r.CanvasRenderer(t,e,i)}})},function(t,e,i){var r={VERSION:"4.0.1",PI_2:2*Math.PI,RAD_TO_DEG:180/Math.PI,DEG_TO_RAD:Math.PI/180,TARGET_FPMS:.06,RENDERER_TYPE:{UNKNOWN:0,WEBGL:1,CANVAS:2},BLEND_MODES:{NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16},DRAW_MODES:{POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},SCALE_MODES:{DEFAULT:0,LINEAR:0,NEAREST:1},WRAP_MODES:{DEFAULT:0,CLAMP:0,REPEAT:1,MIRRORED_REPEAT:2},GC_MODES:{DEFAULT:0,AUTO:0,MANUAL:1},MIPMAP_TEXTURES:!0,RETINA_PREFIX:/@(.+)x/,RESOLUTION:1,FILTER_RESOLUTION:1,DEFAULT_RENDER_OPTIONS:{view:null,resolution:1,antialias:!1,forceFXAA:!1,autoResize:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,roundPixels:!1},SHAPES:{POLY:0,RECT:1,CIRC:2,ELIP:3,RREC:4},PRECISION:{DEFAULT:"mediump",LOW:"lowp",MEDIUM:"mediump",HIGH:"highp"},TRANSFORM_MODE:{DEFAULT:0,STATIC:0,DYNAMIC:1},TEXT_GRADIENT:{LINEAR_VERTICAL:0,LINEAR_HORIZONTAL:1},SPRITE_BATCH_SIZE:4096,SPRITE_MAX_TEXTURES:i(11)(32)};t.exports=r},function(t,e,i){var r=i(12),n=function(t){return r.tablet||r.phone?2:t};t.exports=n},function(t,e,i){var r,n,o;!function(i){var s=/iPhone/i,a=/iPod/i,h=/iPad/i,u=/(?=.*\bAndroid\b)(?=.*\bMobile\b)/i,l=/Android/i,c=/(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i,p=/(?=.*\bAndroid\b)(?=.*\b(?:KFOT|KFTT|KFJWI|KFJWA|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|KFARWI|KFASWI|KFSAWI|KFSAWA)\b)/i,d=/IEMobile/i,f=/(?=.*\bWindows\b)(?=.*\bARM\b)/i,v=/BlackBerry/i,g=/BB10/i,y=/Opera Mini/i,x=/(CriOS|Chrome)(?=.*\bMobile\b)/i,m=/(?=.*\bFirefox\b)(?=.*\bMobile\b)/i,_=new RegExp("(?:Nexus 7|BNTV250|Kindle Fire|Silk|GT-P1000)","i"),T=function(t,e){return t.test(e)},b=function(t){var e=t||navigator.userAgent,i=e.split("[FBAN");if("undefined"!=typeof i[1]&&(e=i[0]),i=e.split("Twitter"),"undefined"!=typeof i[1]&&(e=i[0]),this.apple={phone:T(s,e),ipod:T(a,e),tablet:!T(s,e)&&T(h,e),device:T(s,e)||T(a,e)||T(h,e)},this.amazon={phone:T(c,e),tablet:!T(c,e)&&T(p,e),device:T(c,e)||T(p,e)},this.android={phone:T(c,e)||T(u,e),tablet:!T(c,e)&&!T(u,e)&&(T(p,e)||T(l,e)),device:T(c,e)||T(p,e)||T(u,e)||T(l,e)},this.windows={phone:T(d,e),tablet:T(f,e),device:T(d,e)||T(f,e)},this.other={blackberry:T(v,e),blackberry10:T(g,e),opera:T(y,e),firefox:T(m,e),chrome:T(x,e),device:T(v,e)||T(g,e)||T(y,e)||T(m,e)||T(x,e)},this.seven_inch=T(_,e),this.any=this.apple.device||this.android.device||this.windows.device||this.other.device||this.seven_inch,this.phone=this.apple.phone||this.android.phone||this.windows.phone,this.tablet=this.apple.tablet||this.android.tablet||this.windows.tablet,"undefined"==typeof window)return this},E=function(){var t=new b;return t.Class=b,t};"undefined"!=typeof t&&t.exports&&"undefined"==typeof window?t.exports=b:"undefined"!=typeof t&&t.exports&&"undefined"!=typeof window?t.exports=E():(n=[],r=i.isMobile=E(),o="function"==typeof r?r.apply(e,n):r,!(void 0!==o&&(t.exports=o)))}(this)},function(t,e,i){t.exports={Point:i(14),ObservablePoint:i(15),Matrix:i(16),GroupD8:i(17),Circle:i(18),Ellipse:i(20),Polygon:i(21),Rectangle:i(19),RoundedRectangle:i(22)}},function(t,e){function i(t,e){this.x=t||0,this.y=e||0}i.prototype.constructor=i,t.exports=i,i.prototype.clone=function(){return new i(this.x,this.y)},i.prototype.copy=function(t){this.set(t.x,t.y)},i.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},i.prototype.set=function(t,e){this.x=t||0,this.y=e||(0!==e?this.x:0)}},function(t,e){function i(t,e,i,r){this._x=i||0,this._y=r||0,this.cb=t,this.scope=e}i.prototype.constructor=i,t.exports=i,Object.defineProperties(i.prototype,{x:{get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}},y:{get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}}),i.prototype.set=function(t,e){var i=t||0,r=e||(0!==e?i:0);this._x===i&&this._y===r||(this._x=i,this._y=r,this.cb.call(this.scope))},i.prototype.copy=function(t){this._x===t.x&&this._y===t.y||(this._x=t.x,this._y=t.y,this.cb.call(this.scope))}},function(t,e,i){function r(){this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this.array=null}var n=i(14);r.prototype.constructor=r,t.exports=r,r.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},r.prototype.set=function(t,e,i,r,n,o){return this.a=t,this.b=e,this.c=i,this.d=r,this.tx=n,this.ty=o,this},r.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var i=e||this.array;return t?(i[0]=this.a,i[1]=this.b,i[2]=0,i[3]=this.c,i[4]=this.d,i[5]=0,i[6]=this.tx,i[7]=this.ty,i[8]=1):(i[0]=this.a,i[1]=this.c,i[2]=this.tx,i[3]=this.b,i[4]=this.d,i[5]=this.ty,i[6]=0,i[7]=0,i[8]=1),i},r.prototype.apply=function(t,e){e=e||new n;var i=t.x,r=t.y;return e.x=this.a*i+this.c*r+this.tx,e.y=this.b*i+this.d*r+this.ty,e},r.prototype.applyInverse=function(t,e){e=e||new n;var i=1/(this.a*this.d+this.c*-this.b),r=t.x,o=t.y;return e.x=this.d*i*r+-this.c*i*o+(this.ty*this.c-this.tx*this.d)*i,e.y=this.a*i*o+-this.b*i*r+(-this.ty*this.a+this.tx*this.b)*i,e},r.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},r.prototype.scale=function(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this},r.prototype.rotate=function(t){var e=Math.cos(t),i=Math.sin(t),r=this.a,n=this.c,o=this.tx;return this.a=r*e-this.b*i,this.b=r*i+this.b*e,this.c=n*e-this.d*i,this.d=n*i+this.d*e,this.tx=o*e-this.ty*i,this.ty=o*i+this.ty*e,this},r.prototype.append=function(t){var e=this.a,i=this.b,r=this.c,n=this.d;return this.a=t.a*e+t.b*r,this.b=t.a*i+t.b*n,this.c=t.c*e+t.d*r,this.d=t.c*i+t.d*n,this.tx=t.tx*e+t.ty*r+this.tx,this.ty=t.tx*i+t.ty*n+this.ty,this},r.prototype.setTransform=function(t,e,i,r,n,o,s,a,h){var u,l,c,p,d,f,v,g,y,x;return d=Math.sin(s),f=Math.cos(s),v=Math.cos(h),g=Math.sin(h),y=-Math.sin(a),x=Math.cos(a),u=f*n,l=d*n,c=-d*o,p=f*o,this.a=v*u+g*c,this.b=v*l+g*p,this.c=y*u+x*c,this.d=y*l+x*p,this.tx=t+(i*u+r*c),this.ty=e+(i*l+r*p),this},r.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var i=this.a,r=this.c;this.a=i*t.a+this.b*t.c,this.b=i*t.b+this.b*t.d,this.c=r*t.a+this.d*t.c,this.d=r*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this},r.prototype.decompose=function(t){var e=this.a,i=this.b,r=this.c,n=this.d,o=Math.atan2(-r,n),s=Math.atan2(i,e),a=Math.abs(1-o/s);return a<1e-5?(t.rotation=s,e<0&&n>=0&&(t.rotation+=t.rotation<=0?Math.PI:-Math.PI),t.skew.x=t.skew.y=0):(t.skew.x=o,t.skew.y=s),t.scale.x=Math.sqrt(e*e+i*i),t.scale.y=Math.sqrt(r*r+n*n),t.position.x=this.tx,t.position.y=this.ty,t},r.prototype.invert=function(){var t=this.a,e=this.b,i=this.c,r=this.d,n=this.tx,o=t*r-e*i;return this.a=r/o,this.b=-e/o,this.c=-i/o,this.d=t/o,this.tx=(i*this.ty-r*n)/o,this.ty=-(t*this.ty-e*n)/o,this},r.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},r.prototype.clone=function(){var t=new r;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},r.prototype.copy=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},r.IDENTITY=new r,r.TEMP_MATRIX=new r},function(t,e,i){function r(t){return t<0?-1:t>0?1:0}function n(){for(var t=0;t<16;t++){var e=[];c.push(e);for(var i=0;i<16;i++)for(var n=r(o[t]*o[i]+a[t]*s[i]),p=r(s[t]*o[i]+h[t]*s[i]),d=r(o[t]*a[i]+a[t]*h[i]),f=r(s[t]*a[i]+h[t]*h[i]),v=0;v<16;v++)if(o[v]===n&&s[v]===p&&a[v]===d&&h[v]===f){e.push(v);break}}for(t=0;t<16;t++){var g=new l;g.set(o[t],s[t],a[t],h[t],0,0),u.push(g)}}var o=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],s=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],a=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],h=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],u=[],l=i(16),c=[];n();var p={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MIRROR_HORIZONTAL:12,uX:function(t){return o[t]},uY:function(t){return s[t]},vX:function(t){return a[t]},vY:function(t){return h[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return c[t][e]},sub:function(t,e){return c[t][p.inv(e)]},rotate180:function(t){return 4^t},isSwapWidthHeight:function(t){return 2===(3&t)},byDirection:function(t,e){return 2*Math.abs(t)<=Math.abs(e)?e>=0?p.S:p.N:2*Math.abs(e)<=Math.abs(t)?t>0?p.E:p.W:e>0?t>0?p.SE:p.SW:t>0?p.NE:p.NW},matrixAppendRotationInv:function(t,e,i,r){var n=u[p.inv(e)];i=i||0,r=r||0,n.tx=i,n.ty=r,t.append(n)}};t.exports=p},function(t,e,i){function r(t,e,i){this.x=t||0,this.y=e||0,this.radius=i||0,this.type=o.SHAPES.CIRC}var n=i(19),o=i(10);r.prototype.constructor=r,t.exports=r,r.prototype.clone=function(){return new r(this.x,this.y,this.radius)},r.prototype.contains=function(t,e){if(this.radius<=0)return!1;var i=this.x-t,r=this.y-e,n=this.radius*this.radius;return i*=i,r*=r,i+r<=n},r.prototype.getBounds=function(){return new n(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)}},function(t,e,i){function r(t,e,i,r){this.x=t||0,this.y=e||0,this.width=i||0,this.height=r||0,this.type=n.SHAPES.RECT}var n=i(10);r.prototype.constructor=r,t.exports=r,r.EMPTY=new r(0,0,0,0),r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},r.prototype.contains=function(t,e){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t<this.x+this.width&&e>=this.y&&e<this.y+this.height)},r.prototype.pad=function(t,e){t=t||0,e=e||(0!==e?t:0),this.x-=t,this.y-=e,this.width+=2*t,this.height+=2*e},r.prototype.fit=function(t){this.x<t.x&&(this.width+=this.x,this.width<0&&(this.width=0),this.x=t.x),this.y<t.y&&(this.height+=this.y,this.height<0&&(this.height=0),this.y=t.y),this.x+this.width>t.x+t.width&&(this.width=t.width-this.x,this.width<0&&(this.width=0)),this.y+this.height>t.y+t.height&&(this.height=t.height-this.y,this.height<0&&(this.height=0))},r.prototype.enlarge=function(t){if(t!==r.EMPTY){var e=Math.min(this.x,t.x),i=Math.max(this.x+this.width,t.x+t.width),n=Math.min(this.y,t.y),o=Math.max(this.y+this.height,t.y+t.height);this.x=e,this.width=i-e,this.y=n,this.height=o-n}}},function(t,e,i){function r(t,e,i,r){this.x=t||0,this.y=e||0,this.width=i||0,this.height=r||0,this.type=o.SHAPES.ELIP}var n=i(19),o=i(10);r.prototype.constructor=r,t.exports=r,r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;var i=(t-this.x)/this.width,r=(e-this.y)/this.height;return i*=i,r*=r,i+r<=1},r.prototype.getBounds=function(){return new n(this.x-this.width,this.y-this.height,this.width,this.height)}},function(t,e,i){function r(t){var e=t;if(!Array.isArray(e)){e=new Array(arguments.length);for(var i=0;i<e.length;++i)e[i]=arguments[i]}if(e[0]instanceof n){for(var r=[],s=0,a=e.length;s<a;s++)r.push(e[s].x,e[s].y);e=r}this.closed=!0,this.points=e,this.type=o.SHAPES.POLY}var n=i(14),o=i(10);r.prototype.constructor=r,t.exports=r,r.prototype.clone=function(){return new r(this.points.slice())},r.prototype.close=function(){var t=this.points;t[0]===t[t.length-2]&&t[1]===t[t.length-1]||t.push(t[0],t[1])},r.prototype.contains=function(t,e){for(var i=!1,r=this.points.length/2,n=0,o=r-1;n<r;o=n++){var s=this.points[2*n],a=this.points[2*n+1],h=this.points[2*o],u=this.points[2*o+1],l=a>e!=u>e&&t<(h-s)*(e-a)/(u-a)+s;l&&(i=!i)}return i}},function(t,e,i){function r(t,e,i,r,o){this.x=t||0,this.y=e||0,this.width=i||0,this.height=r||0,this.radius=o||20,this.type=n.SHAPES.RREC}var n=i(10);r.prototype.constructor=r,t.exports=r,r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height,this.radius)},r.prototype.contains=function(t,e){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height)}},function(t,e,i){var r=i(10),n=t.exports={_uid:0,_saidHello:!1,EventEmitter:i(24),pluginTarget:i(25),uid:function(){return++n._uid},hex2rgb:function(t,e){return e=e||[],e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e},hex2string:function(t){return t=t.toString(16),t="000000".substr(0,6-t.length)+t,"#"+t},rgb2hex:function(t){return(255*t[0]<<16)+(255*t[1]<<8)+255*t[2]},getResolutionOfUrl:function(t){var e=r.RETINA_PREFIX.exec(t);return e?parseFloat(e[1]):1},sayHello:function(t){if(!n._saidHello){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var e=["\n %c %c %c Pixi.js "+r.VERSION+" - ✰ "+t+" ✰  %c  %c  http://www.pixijs.com/  %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];window.console.log.apply(console,e)}else window.console&&window.console.log("Pixi.js "+r.VERSION+" - "+t+" - http://www.pixijs.com/");n._saidHello=!0}},isWebGLSupported:function(){var t={stencil:!0,failIfMajorPerformanceCaveat:!0};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),i=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),r=!(!i||!i.getContextAttributes().stencil);if(i){var n=i.getExtension("WEBGL_lose_context");n&&n.loseContext()}return i=null,r}catch(o){return!1}},sign:function(t){return t?t<0?-1:1:0},removeItems:function(t,e,i){var r=t.length;if(!(e>=r||0===i)){i=e+i>r?r-e:i;for(var n=e,o=r-i;n<o;++n)t[n]=t[n+i];t.length=o}},TextureCache:{},BaseTextureCache:{}}},function(t,e,i){"use strict";function r(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function n(){}var o=Object.prototype.hasOwnProperty,s="function"!=typeof Object.create&&"~";n.prototype._events=void 0,n.prototype.eventNames=function(){var t,e=this._events,i=[];if(!e)return i;for(t in e)o.call(e,t)&&i.push(s?t.slice(1):t);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},n.prototype.listeners=function(t,e){var i=s?s+t:t,r=this._events&&this._events[i];if(e)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var n=0,o=r.length,a=new Array(o);n<o;n++)a[n]=r[n].fn;return a},n.prototype.emit=function(t,e,i,r,n,o){var a=s?s+t:t;if(!this._events||!this._events[a])return!1;var h,u,l=this._events[a],c=arguments.length;if("function"==typeof l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,i),!0;case 4:return l.fn.call(l.context,e,i,r),!0;case 5:return l.fn.call(l.context,e,i,r,n),!0;case 6:return l.fn.call(l.context,e,i,r,n,o),!0}for(u=1,h=new Array(c-1);u<c;u++)h[u-1]=arguments[u];l.fn.apply(l.context,h)}else{var p,d=l.length;for(u=0;u<d;u++)switch(l[u].once&&this.removeListener(t,l[u].fn,void 0,!0),c){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,e);break;case 3:l[u].fn.call(l[u].context,e,i);break;default:if(!h)for(p=1,h=new Array(c-1);p<c;p++)h[p-1]=arguments[p];l[u].fn.apply(l[u].context,h)}}return!0},n.prototype.on=function(t,e,i){var n=new r(e,i||this),o=s?s+t:t;return this._events||(this._events=s?{}:Object.create(null)),this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],n]:this._events[o].push(n):this._events[o]=n,this},n.prototype.once=function(t,e,i){var n=new r(e,i||this,(!0)),o=s?s+t:t;return this._events||(this._events=s?{}:Object.create(null)),this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],n]:this._events[o].push(n):this._events[o]=n,this},n.prototype.removeListener=function(t,e,i,r){var n=s?s+t:t;if(!this._events||!this._events[n])return this;var o=this._events[n],a=[];if(e)if(o.fn)(o.fn!==e||r&&!o.once||i&&o.context!==i)&&a.push(o);else for(var h=0,u=o.length;h<u;h++)(o[h].fn!==e||r&&!o[h].once||i&&o[h].context!==i)&&a.push(o[h]);return a.length?this._events[n]=1===a.length?a[0]:a:delete this._events[n],this},n.prototype.removeAllListeners=function(t){return this._events?(t?delete this._events[s?s+t:t]:this._events=s?{}:Object.create(null),this):this},n.prototype.off=n.prototype.removeListener,n.prototype.addListener=n.prototype.on,n.prototype.setMaxListeners=function(){return this},n.prefixed=s,t.exports=n},function(t,e){function i(t){t.__plugins={},t.registerPlugin=function(e,i){t.__plugins[e]=i},t.prototype.initPlugins=function(){this.plugins=this.plugins||{};for(var e in t.__plugins)this.plugins[e]=new t.__plugins[e](this)},t.prototype.destroyPlugins=function(){for(var t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null;this.plugins=null}}t.exports={mixin:function(t){i(t)}}},function(t,e,i){var r=i(27),n=new r;n.autoStart=!0,t.exports={shared:n,Ticker:r}},function(t,e,i){function r(){var t=this;this._tick=function(e){t._requestId=null,t.started&&(t.update(e),t.started&&null===t._requestId&&t._emitter.listeners(s,!0)&&(t._requestId=requestAnimationFrame(t._tick)))},this._emitter=new o,this._requestId=null,this._maxElapsedMS=100,this.autoStart=!1,this.deltaTime=1,this.elapsedMS=1/n.TARGET_FPMS,this.lastTime=0,this.speed=1,this.started=!1}var n=i(10),o=i(24),s="tick";Object.defineProperties(r.prototype,{FPS:{get:function(){return 1e3/this.elapsedMS}},minFPS:{get:function(){return 1e3/this._maxElapsedMS},set:function(t){var e=Math.min(Math.max(0,t)/1e3,n.TARGET_FPMS);this._maxElapsedMS=1/e}}}),r.prototype._requestIfNeeded=function(){null===this._requestId&&this._emitter.listeners(s,!0)&&(this.lastTime=performance.now(),this._requestId=requestAnimationFrame(this._tick))},r.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},r.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},r.prototype.add=function(t,e){return this._emitter.on(s,t,e),this._startIfPossible(),this},r.prototype.addOnce=function(t,e){return this._emitter.once(s,t,e),this._startIfPossible(),this},r.prototype.remove=function(t,e){return this._emitter.off(s,t,e),this._emitter.listeners(s,!0)||this._cancelIfNeeded(),this},r.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},r.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},r.prototype.update=function(t){var e;t=t||performance.now(),t>this.lastTime?(e=this.elapsedMS=t-this.lastTime,e>this._maxElapsedMS&&(e=this._maxElapsedMS),this.deltaTime=e*n.TARGET_FPMS*this.speed,this._emitter.emit(s,this.deltaTime)):this.deltaTime=this.elapsedMS=0,this.lastTime=t},t.exports=r},function(t,e,i){function r(){n.call(this);var t=o.TRANSFORM_MODE.DEFAULT===o.TRANSFORM_MODE.STATIC?s:a;this.transform=new t,this.alpha=1,this.visible=!0,this.renderable=!0,this.parent=null,this.worldAlpha=1,this.filterArea=null,this._filters=null,this._enabledFilters=null,this._bounds=new h,this._boundsID=0,this._lastBoundsID=-1,this._boundsRect=null,this._localBoundsRect=null,this._mask=null}var n=i(24),o=i(10),s=i(29),a=i(31),h=i(32),u=i(13),l=new r;r.prototype=Object.create(n.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{x:{get:function(){return this.position.x},set:function(t){this.transform.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.transform.position.y=t}},worldTransform:{get:function(){return this.transform.worldTransform}},localTransform:{get:function(){return this.transform.localTransform}},position:{get:function(){return this.transform.position},set:function(t){this.transform.position.copy(t)}},scale:{get:function(){return this.transform.scale},set:function(t){this.transform.scale.copy(t)}},pivot:{get:function(){return this.transform.pivot},set:function(t){this.transform.pivot.copy(t)}},skew:{get:function(){return this.transform.skew},set:function(t){this.transform.skew.copy(t)}},rotation:{get:function(){return this.transform.rotation},set:function(t){this.transform.rotation=t}},worldVisible:{get:function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}},mask:{get:function(){return this._mask},set:function(t){this._mask&&(this._mask.renderable=!0),this._mask=t,this._mask&&(this._mask.renderable=!1)}},filters:{get:function(){return this._filters&&this._filters.slice()},set:function(t){this._filters=t&&t.slice()}}}),r.prototype.updateTransform=function(){this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha,this._bounds.updateID++},r.prototype.displayObjectUpdateTransform=r.prototype.updateTransform,r.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(l.transform)},r.prototype.getBounds=function(t,e){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=l,this.parent.transform._worldID++,this.updateTransform(),this.parent=null)),this._boundsID!==this._lastBoundsID&&this.calculateBounds(),e||(this._boundsRect||(this._boundsRect=new u.Rectangle),e=this._boundsRect),this._bounds.getRectangle(e)},r.prototype.getLocalBounds=function(t){var e=this.transform,i=this.parent;this.parent=null,this.transform=l.transform,t||(this._localBoundsRect||(this._localBoundsRect=new u.Rectangle),t=this._localBoundsRect);var r=this.getBounds(!1,t);return this.parent=i,this.transform=e,r},r.prototype.toGlobal=function(t,e,i){return i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=l,
  this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,e)},r.prototype.toLocal=function(t,e,i,r){return e&&(t=e.toGlobal(t,i,r)),r||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=l,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,i)},r.prototype.renderWebGL=function(t){},r.prototype.renderCanvas=function(t){},r.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},r.prototype.setTransform=function(t,e,i,r,n,o,s,a,h){return this.position.x=t||0,this.position.y=e||0,this.scale.x=i?i:1,this.scale.y=r?r:1,this.rotation=n||0,this.skew.x=o||0,this.skew.y=s||0,this.pivot.x=a||0,this.pivot.y=h||0,this},r.prototype.destroy=function(){this.removeAllListeners(),this.parent&&this.parent.removeChild(this),this.transform=null,this.parent=null,this._bounds=null,this._currentBounds=null,this._mask=null,this.filterArea=null,this.interactive=!1,this.interactiveChildren=!1}},function(t,e,i){function r(){o.call(this),this.position=new n.ObservablePoint(this.onChange,this,0,0),this.scale=new n.ObservablePoint(this.onChange,this,1,1),this.pivot=new n.ObservablePoint(this.onChange,this,0,0),this.skew=new n.ObservablePoint(this.updateSkew,this,0,0),this._rotation=0,this._sr=Math.sin(0),this._cr=Math.cos(0),this._cy=Math.cos(0),this._sy=Math.sin(0),this._nsx=Math.sin(0),this._cx=Math.cos(0),this._localID=0,this._currentLocalID=0}var n=i(13),o=i(30);r.prototype=Object.create(o.prototype),r.prototype.constructor=r,r.prototype.onChange=function(){this._localID++},r.prototype.updateSkew=function(){this._cy=Math.cos(this.skew._y),this._sy=Math.sin(this.skew._y),this._nsx=Math.sin(this.skew._x),this._cx=Math.cos(this.skew._x),this._localID++},r.prototype.updateLocalTransform=function(){var t=this.localTransform;if(this._localID!==this._currentLocalID){var e,i,r,n;e=this._cr*this.scale._x,i=this._sr*this.scale._x,r=-this._sr*this.scale._y,n=this._cr*this.scale._y,t.a=this._cy*e+this._sy*r,t.b=this._cy*i+this._sy*n,t.c=this._nsx*e+this._cx*r,t.d=this._nsx*i+this._cx*n,t.tx=this.position._x-(this.pivot._x*t.a+this.pivot._y*t.c),t.ty=this.position._y-(this.pivot._x*t.b+this.pivot._y*t.d),this._currentLocalID=this._localID,this._parentID=-1}},r.prototype.updateTransform=function(t){var e=t.worldTransform,i=this.worldTransform,r=this.localTransform;if(this._localID!==this._currentLocalID){var n,o,s,a;n=this._cr*this.scale._x,o=this._sr*this.scale._x,s=-this._sr*this.scale._y,a=this._cr*this.scale._y,r.a=this._cy*n+this._sy*s,r.b=this._cy*o+this._sy*a,r.c=this._nsx*n+this._cx*s,r.d=this._nsx*o+this._cx*a,r.tx=this.position._x-(this.pivot._x*r.a+this.pivot._y*r.c),r.ty=this.position._y-(this.pivot._x*r.b+this.pivot._y*r.d),this._currentLocalID=this._localID,this._parentID=-1}this._parentID!==t._worldID&&(i.a=r.a*e.a+r.b*e.c,i.b=r.a*e.b+r.b*e.d,i.c=r.c*e.a+r.d*e.c,i.d=r.c*e.b+r.d*e.d,i.tx=r.tx*e.a+r.ty*e.c+e.tx,i.ty=r.tx*e.b+r.ty*e.d+e.ty,this._parentID=t._worldID,this._worldID++)},r.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},Object.defineProperties(r.prototype,{rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,this._sr=Math.sin(t),this._cr=Math.cos(t),this._localID++}}}),t.exports=r},function(t,e,i){function r(){this.worldTransform=new n.Matrix,this.localTransform=new n.Matrix,this._worldID=0}var n=i(13);r.prototype.constructor=r,r.prototype.updateLocalTransform=function(){},r.prototype.updateTransform=function(t){var e=t.worldTransform,i=this.worldTransform,r=this.localTransform;i.a=r.a*e.a+r.b*e.c,i.b=r.a*e.b+r.b*e.d,i.c=r.c*e.a+r.d*e.c,i.d=r.c*e.b+r.d*e.d,i.tx=r.tx*e.a+r.ty*e.c+e.tx,i.ty=r.tx*e.b+r.ty*e.d+e.ty,this._worldID++},r.prototype.updateWorldTransform=r.prototype.updateTransform,r.IDENTITY=new r,t.exports=r},function(t,e,i){function r(){o.call(this),this.position=new n.Point(0,0),this.scale=new n.Point(1,1),this.skew=new n.ObservablePoint(this.updateSkew,this,0,0),this.pivot=new n.Point(0,0),this._rotation=0,this._sr=Math.sin(0),this._cr=Math.cos(0),this._cy=Math.cos(0),this._sy=Math.sin(0),this._nsx=Math.sin(0),this._cx=Math.cos(0)}var n=i(13),o=i(30);r.prototype=Object.create(o.prototype),r.prototype.constructor=r,r.prototype.updateSkew=function(){this._cy=Math.cos(this.skew.y),this._sy=Math.sin(this.skew.y),this._nsx=Math.sin(this.skew.x),this._cx=Math.cos(this.skew.x)},r.prototype.updateLocalTransform=function(){var t,e,i,r,n=this.localTransform;t=this._cr*this.scale.x,e=this._sr*this.scale.x,i=-this._sr*this.scale.y,r=this._cr*this.scale.y,n.a=this._cy*t+this._sy*i,n.b=this._cy*e+this._sy*r,n.c=this._nsx*t+this._cx*i,n.d=this._nsx*e+this._cx*r},r.prototype.updateTransform=function(t){var e,i,r,n,o=t.worldTransform,s=this.worldTransform,a=this.localTransform;e=this._cr*this.scale.x,i=this._sr*this.scale.x,r=-this._sr*this.scale.y,n=this._cr*this.scale.y,a.a=this._cy*e+this._sy*r,a.b=this._cy*i+this._sy*n,a.c=this._nsx*e+this._cx*r,a.d=this._nsx*i+this._cx*n,a.tx=this.position.x-(this.pivot.x*a.a+this.pivot.y*a.c),a.ty=this.position.y-(this.pivot.x*a.b+this.pivot.y*a.d),s.a=a.a*o.a+a.b*o.c,s.b=a.a*o.b+a.b*o.d,s.c=a.c*o.a+a.d*o.c,s.d=a.c*o.b+a.d*o.d,s.tx=a.tx*o.a+a.ty*o.c+o.tx,s.ty=a.tx*o.b+a.ty*o.d+o.ty,this._worldID++},r.prototype.setFromMatrix=function(t){t.decompose(this)},Object.defineProperties(r.prototype,{rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,this._sr=Math.sin(t),this._cr=Math.cos(t)}}}),t.exports=r},function(t,e,i){function r(){this.minX=1/0,this.minY=1/0,this.maxX=-(1/0),this.maxY=-(1/0),this.rect=null}var n=i(13),o=n.Rectangle;r.prototype.constructor=r,t.exports=r,r.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},r.prototype.clear=function(){this.updateID++,this.minX=1/0,this.minY=1/0,this.maxX=-(1/0),this.maxY=-(1/0)},r.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?o.EMPTY:(t=t||new o(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},r.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)},r.prototype.addQuad=function(t){var e=this.minX,i=this.minY,r=this.maxX,n=this.maxY,o=t[0],s=t[1];e=o<e?o:e,i=s<i?s:i,r=o>r?o:r,n=s>n?s:n,o=t[2],s=t[3],e=o<e?o:e,i=s<i?s:i,r=o>r?o:r,n=s>n?s:n,o=t[4],s=t[5],e=o<e?o:e,i=s<i?s:i,r=o>r?o:r,n=s>n?s:n,o=t[6],s=t[7],e=o<e?o:e,i=s<i?s:i,r=o>r?o:r,n=s>n?s:n,this.minX=e,this.minY=i,this.maxX=r,this.maxY=n},r.prototype.addFrame=function(t,e,i,r,n){var o=t.worldTransform,s=o.a,a=o.b,h=o.c,u=o.d,l=o.tx,c=o.ty,p=this.minX,d=this.minY,f=this.maxX,v=this.maxY,g=s*e+h*i+l,y=a*e+u*i+c;p=g<p?g:p,d=y<d?y:d,f=g>f?g:f,v=y>v?y:v,g=s*r+h*i+l,y=a*r+u*i+c,p=g<p?g:p,d=y<d?y:d,f=g>f?g:f,v=y>v?y:v,g=s*e+h*n+l,y=a*e+u*n+c,p=g<p?g:p,d=y<d?y:d,f=g>f?g:f,v=y>v?y:v,g=s*r+h*n+l,y=a*r+u*n+c,p=g<p?g:p,d=y<d?y:d,f=g>f?g:f,v=y>v?y:v,this.minX=p,this.minY=d,this.maxX=f,this.maxY=v},r.prototype.addVertices=function(t,e,i,r){for(var n=t.worldTransform,o=n.a,s=n.b,a=n.c,h=n.d,u=n.tx,l=n.ty,c=this.minX,p=this.minY,d=this.maxX,f=this.maxY,v=i;v<r;v+=2){var g=e[v],y=e[v+1],x=o*g+a*y+u,m=h*y+s*g+l;c=x<c?x:c,p=m<p?m:p,d=x>d?x:d,f=m>f?m:f}this.minX=c,this.minY=p,this.maxX=d,this.maxY=f},r.prototype.addBounds=function(t){var e=this.minX,i=this.minY,r=this.maxX,n=this.maxY;this.minX=t.minX<e?t.minX:e,this.minY=t.minY<i?t.minY:i,this.maxX=t.maxX>r?t.maxX:r,this.maxY=t.maxY>n?t.maxY:n}},function(t,e,i){function r(){o.call(this),this.children=[]}var n=i(23),o=i(28);r.prototype=Object.create(o.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{width:{get:function(){return this.scale.x*this.getLocalBounds().width},set:function(t){var e=this.getLocalBounds().width;0!==e?this.scale.x=t/e:this.scale.x=1,this._width=t}},height:{get:function(){return this.scale.y*this.getLocalBounds().height},set:function(t){var e=this.getLocalBounds().height;0!==e?this.scale.y=t/e:this.scale.y=1,this._height=t}}}),r.prototype.onChildrenChange=function(){},r.prototype.addChild=function(t){var e=arguments.length;if(e>1)for(var i=0;i<e;i++)this.addChild(arguments[i]);else t.parent&&t.parent.removeChild(t),t.parent=this,this.transform._parentID=-1,this.children.push(t),this.onChildrenChange(this.children.length-1),t.emit("added",this);return t},r.prototype.addChildAt=function(t,e){if(e>=0&&e<=this.children.length)return t.parent&&t.parent.removeChild(t),t.parent=this,this.children.splice(e,0,t),this.onChildrenChange(e),t.emit("added",this),t;throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length)},r.prototype.swapChildren=function(t,e){if(t!==e){var i=this.getChildIndex(t),r=this.getChildIndex(e);if(i<0||r<0)throw new Error("swapChildren: Both the supplied DisplayObjects must be children of the caller.");this.children[i]=e,this.children[r]=t,this.onChildrenChange(i<r?i:r)}},r.prototype.getChildIndex=function(t){var e=this.children.indexOf(t);if(e===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return e},r.prototype.setChildIndex=function(t,e){if(e<0||e>=this.children.length)throw new Error("The supplied index is out of bounds");var i=this.getChildIndex(t);n.removeItems(this.children,i,1),this.children.splice(e,0,t),this.onChildrenChange(e)},r.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Supplied index "+t+" does not exist in the child list, or the supplied DisplayObject is not a child of the caller");return this.children[t]},r.prototype.removeChild=function(t){var e=arguments.length;if(e>1)for(var i=0;i<e;i++)this.removeChild(arguments[i]);else{var r=this.children.indexOf(t);if(r===-1)return;t.parent=null,n.removeItems(this.children,r,1),this.onChildrenChange(r),t.emit("removed",this)}return t},r.prototype.removeChildAt=function(t){var e=this.getChildAt(t);return e.parent=null,n.removeItems(this.children,t,1),this.onChildrenChange(t),e.emit("removed",this),e},r.prototype.removeChildren=function(t,e){var i,r,n=t||0,o="number"==typeof e?e:this.children.length,s=o-n;if(s>0&&s<=o){for(i=this.children.splice(n,s),r=0;r<i.length;++r)i[r].parent=null;for(this.onChildrenChange(t),r=0;r<i.length;++r)i[r].emit("removed",this);return i}if(0===s&&0===this.children.length)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},r.prototype.updateTransform=function(){if(this._boundsID++,this.visible){this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,e=this.children.length;t<e;++t)this.children[t].updateTransform()}},r.prototype.containerUpdateTransform=r.prototype.updateTransform,r.prototype.calculateBounds=function(){if(this._bounds.clear(),this.visible){this._calculateBounds();for(var t=0;t<this.children.length;t++){var e=this.children[t];e.calculateBounds(),this._bounds.addBounds(e._bounds)}this._boundsID=this._lastBoundsID}},r.prototype._calculateBounds=function(){},r.prototype.renderWebGL=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this._filters)this.renderAdvancedWebGL(t);else{this._renderWebGL(t);for(var e=0,i=this.children.length;e<i;++e)this.children[e].renderWebGL(t)}},r.prototype.renderAdvancedWebGL=function(t){t.currentRenderer.flush();var e,i,r=this._filters,n=this._mask;if(r){for(this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0,e=0;e<r.length;e++)r[e].enabled&&this._enabledFilters.push(r[e]);this._enabledFilters.length&&t.filterManager.pushFilter(this,this._enabledFilters)}for(n&&t.maskManager.pushMask(this,this._mask),t.currentRenderer.start(),this._renderWebGL(t),e=0,i=this.children.length;e<i;e++)this.children[e].renderWebGL(t);t.currentRenderer.flush(),n&&t.maskManager.popMask(this,this._mask),r&&this._enabledFilters&&this._enabledFilters.length&&t.filterManager.popFilter(),t.currentRenderer.start()},r.prototype._renderWebGL=function(t){},r.prototype._renderCanvas=function(t){},r.prototype.renderCanvas=function(t){if(this.visible&&!(this.alpha<=0)&&this.renderable){this._mask&&t.maskManager.pushMask(this._mask),this._renderCanvas(t);for(var e=0,i=this.children.length;e<i;++e)this.children[e].renderCanvas(t);this._mask&&t.maskManager.popMask(t)}},r.prototype.destroy=function(t){o.prototype.destroy.call(this);var e="boolean"==typeof t?t:t&&t.children,i=this.children;if(this.children=null,e)for(var r=i.length-1;r>=0;r--){var n=i[r];n.parent=null,n.destroy(t)}}},function(t,e,i){function r(t){s.call(this),this.anchor=new n.ObservablePoint(this.onAnchorUpdate,this),this._texture=null,this._width=0,this._height=0,this._tint=null,this._tintRGB=null,this.tint=16777215,this.blendMode=h.BLEND_MODES.NORMAL,this.shader=null,this.cachedTint=16777215,this.texture=t||o.EMPTY,this.vertexData=new Float32Array(8),this.vertexTrimmedData=null,this._transformID=-1,this._textureID=-1}var n=i(13),o=i(35),s=i(33),a=i(23),h=i(10),u=new n.Point;r.prototype=Object.create(s.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{width:{get:function(){return Math.abs(this.scale.x)*this.texture.orig.width},set:function(t){var e=a.sign(this.scale.x)||1;this.scale.x=e*t/this.texture.orig.width,this._width=t}},height:{get:function(){return Math.abs(this.scale.y)*this.texture.orig.height},set:function(t){var e=a.sign(this.scale.y)||1;this.scale.y=e*t/this.texture.orig.height,this._height=t}},tint:{get:function(){return this._tint},set:function(t){this._tint=t,this._tintRGB=(t>>16)+(65280&t)+((255&t)<<16)}},texture:{get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture=t,this.cachedTint=16777215,this._textureID=-1,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))}}}),r.prototype._onTextureUpdate=function(){this._textureID=-1,this._width&&(this.scale.x=a.sign(this.scale.x)*this._width/this.texture.orig.width),this._height&&(this.scale.y=a.sign(this.scale.y)*this._height/this.texture.orig.height)},r.prototype.onAnchorUpdate=function(){this._transformID=-1},r.prototype.calculateVertices=function(){if(this._transformID!==this.transform._worldID||this._textureID!==this._texture._updateID){this._transformID=this.transform._worldID,this._textureID=this._texture._updateID;var t,e,i,r,n=this._texture,o=this.transform.worldTransform,s=o.a,a=o.b,h=o.c,u=o.d,l=o.tx,c=o.ty,p=this.vertexData,d=n.trim,f=n.orig;d?(e=d.x-this.anchor._x*f.width,t=e+d.width,r=d.y-this.anchor._y*f.height,i=r+d.height):(t=f.width*(1-this.anchor._x),e=f.width*-this.anchor._x,i=f.height*(1-this.anchor._y),r=f.height*-this.anchor._y),p[0]=s*e+h*r+l,p[1]=u*r+a*e+c,p[2]=s*t+h*r+l,p[3]=u*r+a*t+c,p[4]=s*t+h*i+l,p[5]=u*i+a*t+c,p[6]=s*e+h*i+l,p[7]=u*i+a*e+c}},r.prototype.calculateTrimmedVertices=function(){this.vertexTrimmedData||(this.vertexTrimmedData=new Float32Array(8));var t,e,i,r,n=this._texture,o=this.vertexTrimmedData,s=n.orig,a=this.transform.worldTransform,h=a.a,u=a.b,l=a.c,c=a.d,p=a.tx,d=a.ty;t=s.width*(1-this.anchor._x),e=s.width*-this.anchor._x,i=s.height*(1-this.anchor._y),r=s.height*-this.anchor._y,o[0]=h*e+l*r+p,o[1]=c*r+u*e+d,o[2]=h*t+l*r+p,o[3]=c*r+u*t+d,o[4]=h*t+l*i+p,o[5]=c*i+u*t+d,o[6]=h*e+l*i+p,o[7]=c*i+u*e+d},r.prototype._renderWebGL=function(t){this.calculateVertices(),t.setObjectRenderer(t.plugins.sprite),t.plugins.sprite.render(this)},r.prototype._renderCanvas=function(t){t.plugins.sprite.render(this)},r.prototype._calculateBounds=function(){var t=this._texture.trim,e=this._texture.orig;!t||t.width===e.width&&t.height===e.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))},r.prototype.getLocalBounds=function(t){return 0===this.children.length?(this._bounds.minX=-this._texture.orig.width*this.anchor._x,this._bounds.minY=-this._texture.orig.height*this.anchor._y,this._bounds.maxX=this._texture.orig.width,this._bounds.maxY=this._texture.orig.height,t||(this._localBoundsRect||(this._localBoundsRect=new n.Rectangle),t=this._localBoundsRect),this._bounds.getRectangle(t)):s.prototype.getLocalBounds.call(this,t)},r.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,u);var e,i=this._texture.orig.width,r=this._texture.orig.height,n=-i*this.anchor.x;return u.x>n&&u.x<n+i&&(e=-r*this.anchor.y,u.y>e&&u.y<e+r)},r.prototype.destroy=function(t){s.prototype.destroy.call(this,t),this.anchor=null;var e="boolean"==typeof t?t:t&&t.texture;if(e){var i="boolean"==typeof t?t:t&&t.baseTexture;this._texture.destroy(!!i)}this._texture=null,this.shader=null},r.from=function(t){return new r(o.from(t))},r.fromFrame=function(t){var e=a.TextureCache[t];if(!e)throw new Error('The frameId "'+t+'" does not exist in the texture cache');return new r(e)},r.fromImage=function(t,e,i){return new r(o.fromImage(t,e,i))}},function(t,e,i){function r(t,e,i,n,o){if(a.call(this),this.noFrame=!1,e||(this.noFrame=!0,e=new h.Rectangle(0,0,1,1)),t instanceof r&&(t=t.baseTexture),this.baseTexture=t,this._frame=e,this.trim=n,this.valid=!1,this.requiresUpdate=!1,this._uvs=null,this.orig=i||e,this._rotate=+(o||0),o===!0)this._rotate=2;else if(this._rotate%2!==0)throw"attempt to use diamond-shaped UVs. If you are sure, set rotation manually";t.hasLoaded?(this.noFrame&&(e=new h.Rectangle(0,0,t.width,t.height),t.on("update",this.onBaseTextureUpdated,this)),this.frame=e):t.once("loaded",this.onBaseTextureLoaded,this),this._updateID=0}var n=i(36),o=i(45),s=i(46),a=i(24),h=i(13),u=i(23);r.prototype=Object.create(a.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{frame:{get:function(){return this._frame},set:function(t){if(this._frame=t,this.noFrame=!1,t.x+t.width>this.baseTexture.width||t.y+t.height>this.baseTexture.height)throw new Error("Texture Error: frame does not fit inside the base Texture dimensions "+this);this.valid=t&&t.width&&t.height&&this.baseTexture.hasLoaded,this.trim||this.rotate||(this.orig=t),this.valid&&this._updateUvs()}},rotate:{get:function(){return this._rotate},set:function(t){this._rotate=t,this.valid&&this._updateUvs()}},width:{get:function(){return this.orig?this.orig.width:0}},height:{get:function(){return this.orig?this.orig.height:0}}}),r.prototype.update=function(){this.baseTexture.update()},r.prototype.onBaseTextureLoaded=function(t){this._updateID++,this.noFrame?this.frame=new h.Rectangle(0,0,t.width,t.height):this.frame=this._frame,this.baseTexture.on("update",this.onBaseTextureUpdated,this),this.emit("update",this)},r.prototype.onBaseTextureUpdated=function(t){this._updateID++,this._frame.width=t.width,this._frame.height=t.height,this.emit("update",this)},r.prototype.destroy=function(t){this.baseTexture&&(t&&(u.TextureCache[this.baseTexture.imageUrl]&&delete u.TextureCache[this.baseTexture.imageUrl],this.baseTexture.destroy()),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture.off("loaded",this.onBaseTextureLoaded,this),this.baseTexture=null),this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,this.off("dispose",this.dispose,this),this.off("update",this.update,this)},r.prototype.clone=function(){return new r(this.baseTexture,this.frame,this.orig,this.trim,this.rotate)},r.prototype._updateUvs=function(){this._uvs||(this._uvs=new s),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++},r.fromImage=function(t,e,i){var o=u.TextureCache[t];return o||(o=new r(n.fromImage(t,e,i)),u.TextureCache[t]=o),o},r.fromFrame=function(t){var e=u.TextureCache[t];if(!e)throw new Error('The frameId "'+t+'" does not exist in the texture cache');return e},r.fromCanvas=function(t,e){return new r(n.fromCanvas(t,e))},r.fromVideo=function(t,e){return"string"==typeof t?r.fromVideoUrl(t,e):new r(o.fromVideo(t,e))},r.fromVideoUrl=function(t,e){return new r(o.fromUrl(t,e))},r.from=function(t){if("string"==typeof t){var e=u.TextureCache[t];if(!e){var i=null!==t.match(/\.(mp4|webm|ogg|h264|avi|mov)$/);return i?r.fromVideoUrl(t):r.fromImage(t)}return e}return t instanceof HTMLCanvasElement?r.fromCanvas(t):t instanceof HTMLVideoElement?r.fromVideo(t):t instanceof n?new r(n):t},r.addTextureToCache=function(t,e){u.TextureCache[e]=t},r.removeTextureFromCache=function(t){var e=u.TextureCache[t];return delete u.TextureCache[t],delete u.BaseTextureCache[t],e},r.EMPTY=new r(new n),r.EMPTY.destroy=function(){},r.EMPTY.on=function(){},r.EMPTY.once=function(){},r.EMPTY.emit=function(){}},function(t,e,i){function r(t,e,i){s.call(this),this.uid=n.uid(),this.touched=0,this.resolution=i||o.RESOLUTION,this.width=100,this.height=100,this.realWidth=100,this.realHeight=100,this.scaleMode=e||o.SCALE_MODES.DEFAULT,this.hasLoaded=!1,this.isLoading=!1,this.source=null,this.premultipliedAlpha=!0,this.imageUrl=null,this.isPowerOfTwo=!1,this.mipmap=o.MIPMAP_TEXTURES,this.wrapMode=o.WRAP_MODES.DEFAULT,this._glTextures=[],this._enabled=0,this._id=0,t&&this.loadSource(t)}var n=i(23),o=i(10),s=i(24),a=i(37),h=i(44);r.prototype=Object.create(s.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.update=function(){this.realWidth=this.source.naturalWidth||this.source.videoWidth||this.source.width,this.realHeight=this.source.naturalHeight||this.source.videoHeight||this.source.height,this.width=this.realWidth/this.resolution,this.height=this.realHeight/this.resolution,this.isPowerOfTwo=h.isPow2(this.realWidth)&&h.isPow2(this.realHeight),this.emit("update",this)},r.prototype.loadSource=function(t){var e=this.isLoading;if(this.hasLoaded=!1,this.isLoading=!1,e&&this.source&&(this.source.onload=null,this.source.onerror=null),this.source=t,(this.source.complete||this.source.getContext)&&this.source.width&&this.source.height)this._sourceLoaded();else if(!t.getContext){this.isLoading=!0;var i=this;t.onload=function(){t.onload=null,t.onerror=null,i.isLoading&&(i.isLoading=!1,i._sourceLoaded(),i.emit("loaded",i))},t.onerror=function(){t.onload=null,t.onerror=null,i.isLoading&&(i.isLoading=!1,i.emit("error",i))},t.complete&&t.src&&(this.isLoading=!1,t.onload=null,t.onerror=null,t.width&&t.height?(this._sourceLoaded(),e&&this.emit("loaded",this)):e&&this.emit("error",this))}},r.prototype._sourceLoaded=function(){this.hasLoaded=!0,this.update()},r.prototype.destroy=function(){this.imageUrl?(delete n.BaseTextureCache[this.imageUrl],delete n.TextureCache[this.imageUrl],this.imageUrl=null,navigator.isCocoonJS||(this.source.src="")):this.source&&this.source._pixiId&&delete n.BaseTextureCache[this.source._pixiId],this.source=null,this.dispose()},r.prototype.dispose=function(){this.emit("dispose",this)},r.prototype.updateSourceImage=function(t){this.source.src=t,this.loadSource(this.source)},r.fromImage=function(t,e,i){var o=n.BaseTextureCache[t];if(!o){var s=new Image;void 0===e&&0!==t.indexOf("data:")&&(s.crossOrigin=a(t)),o=new r(s,i),o.imageUrl=t,s.src=t,n.BaseTextureCache[t]=o,o.resolution=n.getResolutionOfUrl(t)}return o},r.fromCanvas=function(t,e){t._pixiId||(t._pixiId="canvas_"+n.uid());var i=n.BaseTextureCache[t._pixiId];return i||(i=new r(t,e),n.BaseTextureCache[t._pixiId]=i),i}},function(t,e,i){var r,n=i(38),o=function(t,e){if(0===t.indexOf("data:"))return"";e=e||window.location,r||(r=document.createElement("a")),r.href=t,t=n.parse(r.href);var i=!t.port&&""===e.port||t.port===e.port;return t.hostname===e.hostname&&i&&t.protocol===e.protocol?"":"anonymous"};t.exports=o},function(t,e,i){function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function n(t,e,i){if(t&&u(t)&&t instanceof r)return t;var n=new r;return n.parse(t,e,i),n}function o(t){return h(t)&&(t=n(t)),t instanceof r?t.format():r.prototype.format.call(t)}function s(t,e){return n(t,!1,!0).resolve(e)}function a(t,e){return t?n(t,!1,!0).resolveObject(e):e}function h(t){return"string"==typeof t}function u(t){return"object"==typeof t&&null!==t}function l(t){return null===t}function c(t){return null==t}var p=i(39);e.parse=n,e.resolve=s,e.resolveObject=a,e.format=o,e.Url=r;var d=/^([a-z0-9.+-]+:)/i,f=/:[0-9]*$/,v=["<",">",'"',"`"," ","\r","\n","\t"],g=["{","}","|","\\","^","`"].concat(v),y=["'"].concat(g),x=["%","/","?",";","#"].concat(y),m=["/","?","#"],_=255,T=/^[a-z0-9A-Z_-]{0,63}$/,b=/^([a-z0-9A-Z_-]{0,63})(.*)$/,E={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},S={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},C=i(41);r.prototype.parse=function(t,e,i){if(!h(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var r=t;r=r.trim();var n=d.exec(r);if(n){n=n[0];var o=n.toLowerCase();this.protocol=o,r=r.substr(n.length)}if(i||n||r.match(/^\/\/[^@\/]+@[^@\/]+/)){var s="//"===r.substr(0,2);!s||n&&w[n]||(r=r.substr(2),this.slashes=!0)}if(!w[n]&&(s||n&&!S[n])){for(var a=-1,u=0;u<m.length;u++){var l=r.indexOf(m[u]);l!==-1&&(a===-1||l<a)&&(a=l)}var c,f;f=a===-1?r.lastIndexOf("@"):r.lastIndexOf("@",a),f!==-1&&(c=r.slice(0,f),r=r.slice(f+1),this.auth=decodeURIComponent(c)),a=-1;for(var u=0;u<x.length;u++){var l=r.indexOf(x[u]);l!==-1&&(a===-1||l<a)&&(a=l)}a===-1&&(a=r.length),this.host=r.slice(0,a),r=r.slice(a),this.parseHost(),this.hostname=this.hostname||"";var v="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!v)for(var g=this.hostname.split(/\./),u=0,A=g.length;u<A;u++){var M=g[u];if(M&&!M.match(T)){for(var R="",O=0,D=M.length;O<D;O++)R+=M.charCodeAt(O)>127?"x":M[O];if(!R.match(T)){var P=g.slice(0,u),I=g.slice(u+1),L=M.match(b);L&&(P.push(L[1]),I.unshift(L[2])),I.length&&(r="/"+I.join(".")+r),this.hostname=P.join(".");break}}}if(this.hostname.length>_?this.hostname="":this.hostname=this.hostname.toLowerCase(),!v){for(var N=this.hostname.split("."),F=[],u=0;u<N.length;++u){var B=N[u];F.push(B.match(/[^A-Za-z0-9_-]/)?"xn--"+p.encode(B):B)}this.hostname=F.join(".")}var U=this.port?":"+this.port:"",k=this.hostname||"";this.host=k+U,this.href+=this.host,v&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==r[0]&&(r="/"+r))}if(!E[o])for(var u=0,A=y.length;u<A;u++){var j=y[u],X=encodeURIComponent(j);X===j&&(X=escape(j)),r=r.split(j).join(X)}var W=r.indexOf("#");W!==-1&&(this.hash=r.substr(W),r=r.slice(0,W));var G=r.indexOf("?");if(G!==-1?(this.search=r.substr(G),this.query=r.substr(G+1),e&&(this.query=C.parse(this.query)),r=r.slice(0,G)):e&&(this.search="",this.query={}),r&&(this.pathname=r),S[o]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var U=this.pathname||"",B=this.search||"";this.path=U+B}return this.href=this.format(),this},r.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",i=this.pathname||"",r=this.hash||"",n=!1,o="";this.host?n=t+this.host:this.hostname&&(n=t+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(n+=":"+this.port)),this.query&&u(this.query)&&Object.keys(this.query).length&&(o=C.stringify(this.query));var s=this.search||o&&"?"+o||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||S[e])&&n!==!1?(n="//"+(n||""),i&&"/"!==i.charAt(0)&&(i="/"+i)):n||(n=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),i=i.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),s=s.replace("#","%23"),e+n+i+s+r},r.prototype.resolve=function(t){return this.resolveObject(n(t,!1,!0)).format()},r.prototype.resolveObject=function(t){if(h(t)){var e=new r;e.parse(t,!1,!0),t=e}var i=new r;if(Object.keys(this).forEach(function(t){i[t]=this[t]},this),i.hash=t.hash,""===t.href)return i.href=i.format(),i;if(t.slashes&&!t.protocol)return Object.keys(t).forEach(function(e){"protocol"!==e&&(i[e]=t[e])}),S[i.protocol]&&i.hostname&&!i.pathname&&(i.path=i.pathname="/"),i.href=i.format(),i;if(t.protocol&&t.protocol!==i.protocol){if(!S[t.protocol])return Object.keys(t).forEach(function(e){i[e]=t[e]}),i.href=i.format(),i;if(i.protocol=t.protocol,t.host||w[t.protocol])i.pathname=t.pathname;else{for(var n=(t.pathname||"").split("/");n.length&&!(t.host=n.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==n[0]&&n.unshift(""),n.length<2&&n.unshift(""),i.pathname=n.join("/")}if(i.search=t.search,i.query=t.query,i.host=t.host||"",i.auth=t.auth,i.hostname=t.hostname||t.host,i.port=t.port,i.pathname||i.search){var o=i.pathname||"",s=i.search||"";i.path=o+s}return i.slashes=i.slashes||t.slashes,i.href=i.format(),i}var a=i.pathname&&"/"===i.pathname.charAt(0),u=t.host||t.pathname&&"/"===t.pathname.charAt(0),p=u||a||i.host&&t.pathname,d=p,f=i.pathname&&i.pathname.split("/")||[],n=t.pathname&&t.pathname.split("/")||[],v=i.protocol&&!S[i.protocol];if(v&&(i.hostname="",i.port=null,i.host&&(""===f[0]?f[0]=i.host:f.unshift(i.host)),i.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===n[0]?n[0]=t.host:n.unshift(t.host)),t.host=null),p=p&&(""===n[0]||""===f[0])),u)i.host=t.host||""===t.host?t.host:i.host,i.hostname=t.hostname||""===t.hostname?t.hostname:i.hostname,i.search=t.search,i.query=t.query,f=n;else if(n.length)f||(f=[]),f.pop(),f=f.concat(n),i.search=t.search,i.query=t.query;else if(!c(t.search)){if(v){i.hostname=i.host=f.shift();var g=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@");g&&(i.auth=g.shift(),i.host=i.hostname=g.shift())}return i.search=t.search,i.query=t.query,l(i.pathname)&&l(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.href=i.format(),i}if(!f.length)return i.pathname=null,i.search?i.path="/"+i.search:i.path=null,i.href=i.format(),i;for(var y=f.slice(-1)[0],x=(i.host||t.host)&&("."===y||".."===y)||""===y,m=0,_=f.length;_>=0;_--)y=f[_],"."==y?f.splice(_,1):".."===y?(f.splice(_,1),m++):m&&(f.splice(_,1),m--);if(!p&&!d)for(;m--;m)f.unshift("..");!p||""===f[0]||f[0]&&"/"===f[0].charAt(0)||f.unshift(""),x&&"/"!==f.join("/").substr(-1)&&f.push("");var T=""===f[0]||f[0]&&"/"===f[0].charAt(0);if(v){i.hostname=i.host=T?"":f.length?f.shift():"";var g=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@");g&&(i.auth=g.shift(),i.host=i.hostname=g.shift())}return p=p||i.host&&f.length,p&&!T&&f.unshift(""),f.length?i.pathname=f.join("/"):(i.pathname=null,i.path=null),l(i.pathname)&&l(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.auth=t.auth||i.auth,i.slashes=i.slashes||t.slashes,i.href=i.format(),i},r.prototype.parseHost=function(){var t=this.host,e=f.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,i){var r;(function(t,n){!function(o){function s(t){throw RangeError(P[t])}function a(t,e){for(var i=t.length,r=[];i--;)r[i]=e(t[i]);return r}function h(t,e){var i=t.split("@"),r="";i.length>1&&(r=i[0]+"@",t=i[1]),t=t.replace(D,".");var n=t.split("."),o=a(n,e).join(".");return r+o}function u(t){for(var e,i,r=[],n=0,o=t.length;n<o;)e=t.charCodeAt(n++),e>=55296&&e<=56319&&n<o?(i=t.charCodeAt(n++),56320==(64512&i)?r.push(((1023&e)<<10)+(1023&i)+65536):(r.push(e),n--)):r.push(e);return r}function l(t){return a(t,function(t){var e="";return t>65535&&(t-=65536,e+=N(t>>>10&1023|55296),t=56320|1023&t),e+=N(t)}).join("")}function c(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:T}function p(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function d(t,e,i){var r=0;for(t=i?L(t/S):t>>1,t+=L(t/e);t>I*E>>1;r+=T)t=L(t/I);return L(r+(I+1)*t/(t+w))}function f(t){var e,i,r,n,o,a,h,u,p,f,v=[],g=t.length,y=0,x=A,m=C;for(i=t.lastIndexOf(M),i<0&&(i=0),r=0;r<i;++r)t.charCodeAt(r)>=128&&s("not-basic"),v.push(t.charCodeAt(r));for(n=i>0?i+1:0;n<g;){for(o=y,a=1,h=T;n>=g&&s("invalid-input"),u=c(t.charCodeAt(n++)),(u>=T||u>L((_-y)/a))&&s("overflow"),y+=u*a,p=h<=m?b:h>=m+E?E:h-m,!(u<p);h+=T)f=T-p,a>L(_/f)&&s("overflow"),
  a*=f;e=v.length+1,m=d(y-o,e,0==o),L(y/e)>_-x&&s("overflow"),x+=L(y/e),y%=e,v.splice(y++,0,x)}return l(v)}function v(t){var e,i,r,n,o,a,h,l,c,f,v,g,y,x,m,w=[];for(t=u(t),g=t.length,e=A,i=0,o=C,a=0;a<g;++a)v=t[a],v<128&&w.push(N(v));for(r=n=w.length,n&&w.push(M);r<g;){for(h=_,a=0;a<g;++a)v=t[a],v>=e&&v<h&&(h=v);for(y=r+1,h-e>L((_-i)/y)&&s("overflow"),i+=(h-e)*y,e=h,a=0;a<g;++a)if(v=t[a],v<e&&++i>_&&s("overflow"),v==e){for(l=i,c=T;f=c<=o?b:c>=o+E?E:c-o,!(l<f);c+=T)m=l-f,x=T-f,w.push(N(p(f+m%x,0))),l=L(m/x);w.push(N(p(l,0))),o=d(i,y,r==n),i=0,++r}++i,++e}return w.join("")}function g(t){return h(t,function(t){return R.test(t)?f(t.slice(4).toLowerCase()):t})}function y(t){return h(t,function(t){return O.test(t)?"xn--"+v(t):t})}var x=("object"==typeof e&&e&&!e.nodeType&&e,"object"==typeof t&&t&&!t.nodeType&&t,"object"==typeof n&&n);x.global!==x&&x.window!==x&&x.self!==x||(o=x);var m,_=2147483647,T=36,b=1,E=26,w=38,S=700,C=72,A=128,M="-",R=/^xn--/,O=/[^\x20-\x7E]/,D=/[\x2E\u3002\uFF0E\uFF61]/g,P={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=T-b,L=Math.floor,N=String.fromCharCode;m={version:"1.3.2",ucs2:{decode:u,encode:l},decode:f,encode:v,toASCII:y,toUnicode:g},r=function(){return m}.call(e,i,e,t),!(void 0!==r&&(t.exports=r))}(this)}).call(e,i(40)(t),function(){return this}())},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,i){"use strict";e.decode=e.parse=i(42),e.encode=e.stringify=i(43)},function(t,e){"use strict";function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,r,n){e=e||"&",r=r||"=";var o={};if("string"!=typeof t||0===t.length)return o;var s=/\+/g;t=t.split(e);var a=1e3;n&&"number"==typeof n.maxKeys&&(a=n.maxKeys);var h=t.length;a>0&&h>a&&(h=a);for(var u=0;u<h;++u){var l,c,p,d,f=t[u].replace(s,"%20"),v=f.indexOf(r);v>=0?(l=f.substr(0,v),c=f.substr(v+1)):(l=f,c=""),p=decodeURIComponent(l),d=decodeURIComponent(c),i(o,p)?Array.isArray(o[p])?o[p].push(d):o[p]=[o[p],d]:o[p]=d}return o}},function(t,e){"use strict";var i=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,r,n){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map(function(n){var o=encodeURIComponent(i(n))+r;return Array.isArray(t[n])?t[n].map(function(t){return o+encodeURIComponent(i(t))}).join(e):o+encodeURIComponent(i(t[n]))}).join(e):n?encodeURIComponent(i(n))+r+encodeURIComponent(i(t)):""}},function(t,e){"use strict";"use restrict";function i(t){var e=32;return t&=-t,t&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}var r=32;e.INT_BITS=r,e.INT_MAX=2147483647,e.INT_MIN=-1<<r-1,e.sign=function(t){return(t>0)-(t<0)},e.abs=function(t){var e=t>>r-1;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t<e)},e.max=function(t,e){return t^(t^e)&-(t<e)},e.isPow2=function(t){return!(t&t-1||!t)},e.log2=function(t){var e,i;return e=(t>65535)<<4,t>>>=e,i=(t>255)<<3,t>>>=i,e|=i,i=(t>15)<<2,t>>>=i,e|=i,i=(t>3)<<1,t>>>=i,e|=i,e|t>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return t-=t>>>1&1431655765,t=(858993459&t)+(t>>>2&858993459),16843009*(t+(t>>>4)&252645135)>>>24},e.countTrailingZeros=i,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t+1},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,t&=15,27030>>>t&1};var n=new Array(256);!function(t){for(var e=0;e<256;++e){var i=e,r=e,n=7;for(i>>>=1;i;i>>>=1)r<<=1,r|=1&i,--n;t[e]=r<<n&255}}(n),e.reverse=function(t){return n[255&t]<<24|n[t>>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},e.interleave2=function(t,e){return t&=65535,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e&=65535,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1},e.deinterleave2=function(t,e){return t=t>>>e&1431655765,t=858993459&(t|t>>>1),t=252645135&(t|t>>>2),t=16711935&(t|t>>>4),t=65535&(t|t>>>16),t<<16>>16},e.interleave3=function(t,e,i){return t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),e&=1023,e=4278190335&(e|e<<16),e=251719695&(e|e<<8),e=3272356035&(e|e<<4),e=1227133513&(e|e<<2),t|=e<<1,i&=1023,i=4278190335&(i|i<<16),i=251719695&(i|i<<8),i=3272356035&(i|i<<4),i=1227133513&(i|i<<2),t|i<<2},e.deinterleave3=function(t,e){return t=t>>>e&1227133513,t=3272356035&(t|t>>>2),t=251719695&(t|t>>>4),t=4278190335&(t|t>>>8),t=1023&(t|t>>>16),t<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>i(t)+1}},function(t,e,i){function r(t,e){if(!t)throw new Error("No video source element specified.");(t.readyState===t.HAVE_ENOUGH_DATA||t.readyState===t.HAVE_FUTURE_DATA)&&t.width&&t.height&&(t.complete=!0),o.call(this,t,e),this.autoUpdate=!1,this._onUpdate=this._onUpdate.bind(this),this._onCanPlay=this._onCanPlay.bind(this),t.complete||(t.addEventListener("canplay",this._onCanPlay),t.addEventListener("canplaythrough",this._onCanPlay),t.addEventListener("play",this._onPlayStart.bind(this)),t.addEventListener("pause",this._onPlayStop.bind(this))),this.__loaded=!1}function n(t,e){e||(e="video/"+t.substr(t.lastIndexOf(".")+1));var i=document.createElement("source");return i.src=t,i.type=e,i}var o=i(36),s=i(23);r.prototype=Object.create(o.prototype),r.prototype.constructor=r,t.exports=r,r.prototype._onUpdate=function(){this.autoUpdate&&(window.requestAnimationFrame(this._onUpdate),this.update())},r.prototype._onPlayStart=function(){this.hasLoaded||this._onCanPlay(),this.autoUpdate||(window.requestAnimationFrame(this._onUpdate),this.autoUpdate=!0)},r.prototype._onPlayStop=function(){this.autoUpdate=!1},r.prototype._onCanPlay=function(){this.hasLoaded=!0,this.source&&(this.source.removeEventListener("canplay",this._onCanPlay),this.source.removeEventListener("canplaythrough",this._onCanPlay),this.width=this.source.videoWidth,this.height=this.source.videoHeight,this.source.play(),this.__loaded||(this.__loaded=!0,this.emit("loaded",this)))},r.prototype.destroy=function(){this.source&&this.source._pixiId&&(delete s.BaseTextureCache[this.source._pixiId],delete this.source._pixiId),o.prototype.destroy.call(this)},r.fromVideo=function(t,e){t._pixiId||(t._pixiId="video_"+s.uid());var i=s.BaseTextureCache[t._pixiId];return i||(i=new r(t,e),s.BaseTextureCache[t._pixiId]=i),i},r.fromUrl=function(t,e){var i=document.createElement("video");if(Array.isArray(t))for(var o=0;o<t.length;++o)i.appendChild(n(t[o].src||t[o],t[o].mime));else i.appendChild(n(t.src||t,t.mime));return i.load(),i.play(),r.fromVideo(i,e)},r.fromUrls=r.fromUrl},function(t,e,i){function r(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsUint32=new Uint32Array(4)}t.exports=r;var n=i(17);r.prototype.set=function(t,e,i){var r=e.width,o=e.height;if(i){var s=t.width/2/r,a=t.height/2/o,h=t.x/r+s,u=t.y/o+a;i=n.add(i,n.NW),this.x0=h+s*n.uX(i),this.y0=u+a*n.uY(i),i=n.add(i,2),this.x1=h+s*n.uX(i),this.y1=u+a*n.uY(i),i=n.add(i,2),this.x2=h+s*n.uX(i),this.y2=u+a*n.uY(i),i=n.add(i,2),this.x3=h+s*n.uX(i),this.y3=u+a*n.uY(i)}else this.x0=t.x/r,this.y0=t.y/o,this.x1=(t.x+t.width)/r,this.y1=t.y/o,this.x2=(t.x+t.width)/r,this.y2=(t.y+t.height)/o,this.x3=t.x/r,this.y3=(t.y+t.height)/o;this.uvsUint32[0]=(65535*this.y0&65535)<<16|65535*this.x0&65535,this.uvsUint32[1]=(65535*this.y1&65535)<<16|65535*this.x1&65535,this.uvsUint32[2]=(65535*this.y2&65535)<<16|65535*this.x2&65535,this.uvsUint32[3]=(65535*this.y3&65535)<<16|65535*this.x3&65535}},function(t,e,i){function r(t){this.renderer=t}var n=i(48),o=i(10),s=i(13),a=new s.Matrix,h=i(56);r.prototype.constructor=r,t.exports=r,n.registerPlugin("sprite",r),r.prototype.render=function(t){var e,i,r=t._texture,n=this.renderer,u=t.transform.worldTransform,l=r._frame.width,c=r._frame.height;if(!(r.orig.width<=0||r.orig.height<=0)&&r.baseTexture.source&&(n.setBlendMode(t.blendMode),r.valid)){n.context.globalAlpha=t.worldAlpha;var p=r.baseTexture.scaleMode===o.SCALE_MODES.LINEAR;n.smoothProperty&&n.context[n.smoothProperty]!==p&&(n.context[n.smoothProperty]=p),r.trim?(e=r.trim.width/2+r.trim.x-t.anchor.x*r.orig.width,i=r.trim.height/2+r.trim.y-t.anchor.y*r.orig.height):(e=(.5-t.anchor.x)*r.orig.width,i=(.5-t.anchor.y)*r.orig.height),r.rotate&&(u.copy(a),u=a,s.GroupD8.matrixAppendRotationInv(u,r.rotate,e,i),e=0,i=0),e-=l/2,i-=c/2,n.roundPixels?(n.context.setTransform(u.a,u.b,u.c,u.d,u.tx*n.resolution|0,u.ty*n.resolution|0),e=0|e,i=0|i):n.context.setTransform(u.a,u.b,u.c,u.d,u.tx*n.resolution,u.ty*n.resolution);var d=r.baseTexture.resolution;16777215!==t.tint?(t.cachedTint!==t.tint&&(t.cachedTint=t.tint,t.tintedTexture=h.getTintedTexture(t,t.tint)),n.context.drawImage(t.tintedTexture,0,0,l*d,c*d,e*n.resolution,i*n.resolution,l*n.resolution,c*n.resolution)):n.context.drawImage(r.baseTexture.source,r._frame.x*d,r._frame.y*d,l*d,c*d,e*n.resolution,i*n.resolution,l*n.resolution,c*n.resolution)}},r.prototype.destroy=function(){this.renderer=null}},function(t,e,i){function r(t,e,i){i=i||{},n.call(this,"Canvas",t,e,i),this.type=u.RENDERER_TYPE.CANVAS,this.rootContext=this.view.getContext("2d",{alpha:this.transparent}),this.rootResolution=this.resolution,this.refresh=!0,this.maskManager=new o(this),this.smoothProperty="imageSmoothingEnabled",this.rootContext.imageSmoothingEnabled||(this.rootContext.webkitImageSmoothingEnabled?this.smoothProperty="webkitImageSmoothingEnabled":this.rootContext.mozImageSmoothingEnabled?this.smoothProperty="mozImageSmoothingEnabled":this.rootContext.oImageSmoothingEnabled?this.smoothProperty="oImageSmoothingEnabled":this.rootContext.msImageSmoothingEnabled&&(this.smoothProperty="msImageSmoothingEnabled")),this.initPlugins(),this.blendModes=a(),this._activeBlendMode=null,this.context=null,this.renderingToScreen=!1,this.resize(t,e)}var n=i(49),o=i(52),s=i(53),a=i(54),h=i(23),u=i(10);r.prototype=Object.create(n.prototype),r.prototype.constructor=r,t.exports=r,h.pluginTarget.mixin(r),r.prototype.render=function(t,e,i,r,n){if(this.view){this.renderingToScreen=!e,this.emit("prerender"),e?(e=e.baseTexture||e,e._canvasRenderTarget||(e._canvasRenderTarget=new s(e.width,e.height,e.resolution),e.source=e._canvasRenderTarget.canvas,e.valid=!0),this.context=e._canvasRenderTarget.context,this.resolution=e._canvasRenderTarget.resolution):(this.context=this.rootContext,this.resolution=this.rootResolution);var o=this.context;if(e||(this._lastObjectRendered=t),!n){var a=t.parent,h=this._tempDisplayObjectParent.transform.worldTransform;r?r.copy(h):h.identity(),t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=a}o.setTransform(1,0,0,1,0,0),o.globalAlpha=1,o.globalCompositeOperation=this.blendModes[u.BLEND_MODES.NORMAL],navigator.isCocoonJS&&this.view.screencanvas&&(o.fillStyle="black",o.clear()),(void 0!==i?i:this.clearBeforeRender)&&this.renderingToScreen&&(this.transparent?o.clearRect(0,0,this.width,this.height):(o.fillStyle=this._backgroundColorString,o.fillRect(0,0,this.width,this.height)));var l=this.context;this.context=o,t.renderCanvas(this),this.context=l,this.emit("postrender")}},r.prototype.setBlendMode=function(t){this._activeBlendMode!==t&&(this.context.globalCompositeOperation=this.blendModes[t])},r.prototype.destroy=function(t){this.destroyPlugins(),n.prototype.destroy.call(this,t),this.context=null,this.refresh=!0,this.maskManager.destroy(),this.maskManager=null,this.smoothProperty=null},r.prototype.resize=function(t,e){n.prototype.resize.call(this,t,e),this.smoothProperty&&(this.rootContext[this.smoothProperty]=u.SCALE_MODES.DEFAULT===u.SCALE_MODES.LINEAR)}},function(t,e,i){function r(t,e,i,r){if(u.call(this),n.sayHello(t),r)for(var o in s.DEFAULT_RENDER_OPTIONS)"undefined"==typeof r[o]&&(r[o]=s.DEFAULT_RENDER_OPTIONS[o]);else r=s.DEFAULT_RENDER_OPTIONS;this.type=s.RENDERER_TYPE.UNKNOWN,this.width=e||800,this.height=i||600,this.view=r.view||document.createElement("canvas"),this.resolution=r.resolution,this.transparent=r.transparent,this.autoResize=r.autoResize||!1,this.blendModes=null,this.preserveDrawingBuffer=r.preserveDrawingBuffer,this.clearBeforeRender=r.clearBeforeRender,this.roundPixels=r.roundPixels,this._backgroundColor=0,this._backgroundColorRgba=[0,0,0,0],this._backgroundColorString="#000000",this.backgroundColor=r.backgroundColor||this._backgroundColor,this._tempDisplayObjectParent=new a,this._lastObjectRendered=this._tempDisplayObjectParent}var n=i(23),o=i(13),s=i(10),a=i(33),h=i(50),u=i(24),l=new o.Matrix;r.prototype=Object.create(u.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{backgroundColor:{get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._backgroundColorString=n.hex2string(t),n.hex2rgb(t,this._backgroundColorRgba)}}}),r.prototype.resize=function(t,e){this.width=t*this.resolution,this.height=e*this.resolution,this.view.width=this.width,this.view.height=this.height,this.autoResize&&(this.view.style.width=this.width/this.resolution+"px",this.view.style.height=this.height/this.resolution+"px")},r.prototype.generateTexture=function(t,e,i){var r=t.getLocalBounds(),n=h.create(0|r.width,0|r.height,e,i);return l.tx=-r.x,l.ty=-r.y,this.render(t,n,!1,l,!0),n},r.prototype.destroy=function(t){t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view),this.type=s.RENDERER_TYPE.UNKNOWN,this.width=0,this.height=0,this.view=null,this.resolution=0,this.transparent=!1,this.autoResize=!1,this.blendModes=null,this.preserveDrawingBuffer=!1,this.clearBeforeRender=!1,this.roundPixels=!1,this._backgroundColor=0,this._backgroundColorRgba=null,this._backgroundColorString=null,this.backgroundColor=0,this._tempDisplayObjectParent=null,this._lastObjectRendered=null}},function(t,e,i){function r(t,e){if(this.legacyRenderer=null,!(t instanceof n)){var i=arguments[1],r=arguments[2],s=arguments[3]||0,a=arguments[4]||1;console.warn("v4 RenderTexture now expects a new BaseRenderTexture. Please use RenderTexture.create("+i+", "+r+")"),this.legacyRenderer=arguments[0],e=null,t=new n(i,r,s,a)}o.call(this,t,e),this.valid=!0,this._updateUvs()}var n=i(51),o=i(35);r.prototype=Object.create(o.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.resize=function(t,e,i){this.valid=t>0&&e>0,this._frame.width=this.orig.width=t,this._frame.height=this.orig.height=e,i||this.baseTexture.resize(t,e),this._updateUvs()},r.create=function(t,e,i,o){return new r(new n(t,e,i,o))}},function(t,e,i){function r(t,e,i,r){n.call(this,null,i),this.resolution=r||o.RESOLUTION,this.width=t||100,this.height=e||100,this.realWidth=this.width*this.resolution,this.realHeight=this.height*this.resolution,this.scaleMode=i||o.SCALE_MODES.DEFAULT,this.hasLoaded=!0,this._glRenderTargets=[],this._canvasRenderTarget=null,this.valid=!1}var n=i(36),o=i(10);r.prototype=Object.create(n.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.resize=function(t,e){t===this.width&&e===this.height||(this.valid=t>0&&e>0,this.width=t,this.height=e,this.realWidth=this.width*this.resolution,this.realHeight=this.height*this.resolution,this.valid&&this.emit("update",this))},r.prototype.destroy=function(){n.prototype.destroy.call(this,!0),this.renderer=null}},function(t,e,i){function r(t){this.renderer=t}var n=i(10);r.prototype.constructor=r,t.exports=r,r.prototype.pushMask=function(t){var e=this.renderer;e.context.save();var i=t.alpha,r=t.transform.worldTransform,n=e.resolution;e.context.setTransform(r.a*n,r.b*n,r.c*n,r.d*n,r.tx*n,r.ty*n),t._texture||(this.renderGraphicsShape(t),e.context.clip()),t.worldAlpha=i},r.prototype.renderGraphicsShape=function(t){var e=this.renderer.context,i=t.graphicsData.length;if(0!==i){e.beginPath();for(var r=0;r<i;r++){var o=t.graphicsData[r],s=o.shape;if(o.type===n.SHAPES.POLY){var a=s.points;e.moveTo(a[0],a[1]);for(var h=1;h<a.length/2;h++)e.lineTo(a[2*h],a[2*h+1]);a[0]===a[a.length-2]&&a[1]===a[a.length-1]&&e.closePath()}else if(o.type===n.SHAPES.RECT)e.rect(s.x,s.y,s.width,s.height),e.closePath();else if(o.type===n.SHAPES.CIRC)e.arc(s.x,s.y,s.radius,0,2*Math.PI),e.closePath();else if(o.type===n.SHAPES.ELIP){var u=2*s.width,l=2*s.height,c=s.x-u/2,p=s.y-l/2,d=.5522848,f=u/2*d,v=l/2*d,g=c+u,y=p+l,x=c+u/2,m=p+l/2;e.moveTo(c,m),e.bezierCurveTo(c,m-v,x-f,p,x,p),e.bezierCurveTo(x+f,p,g,m-v,g,m),e.bezierCurveTo(g,m+v,x+f,y,x,y),e.bezierCurveTo(x-f,y,c,m+v,c,m),e.closePath()}else if(o.type===n.SHAPES.RREC){var _=s.x,T=s.y,b=s.width,E=s.height,w=s.radius,S=Math.min(b,E)/2|0;w=w>S?S:w,e.moveTo(_,T+w),e.lineTo(_,T+E-w),e.quadraticCurveTo(_,T+E,_+w,T+E),e.lineTo(_+b-w,T+E),e.quadraticCurveTo(_+b,T+E,_+b,T+E-w),e.lineTo(_+b,T+w),e.quadraticCurveTo(_+b,T,_+b-w,T),e.lineTo(_+w,T),e.quadraticCurveTo(_,T,_,T+w),e.closePath()}}}},r.prototype.popMask=function(t){t.context.restore()},r.prototype.destroy=function(){}},function(t,e,i){function r(t,e,i){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=i||n.RESOLUTION,this.resize(t,e)}var n=i(10);r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{width:{get:function(){return this.canvas.width},set:function(t){this.canvas.width=t}},height:{get:function(){return this.canvas.height},set:function(t){this.canvas.height=t}}}),r.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},r.prototype.resize=function(t,e){this.canvas.width=t*this.resolution,this.canvas.height=e*this.resolution},r.prototype.destroy=function(){this.context=null,this.canvas=null}},function(t,e,i){function r(t){return t=t||[],o()?(t[n.BLEND_MODES.NORMAL]="source-over",t[n.BLEND_MODES.ADD]="lighter",t[n.BLEND_MODES.MULTIPLY]="multiply",t[n.BLEND_MODES.SCREEN]="screen",t[n.BLEND_MODES.OVERLAY]="overlay",t[n.BLEND_MODES.DARKEN]="darken",t[n.BLEND_MODES.LIGHTEN]="lighten",t[n.BLEND_MODES.COLOR_DODGE]="color-dodge",t[n.BLEND_MODES.COLOR_BURN]="color-burn",t[n.BLEND_MODES.HARD_LIGHT]="hard-light",t[n.BLEND_MODES.SOFT_LIGHT]="soft-light",t[n.BLEND_MODES.DIFFERENCE]="difference",t[n.BLEND_MODES.EXCLUSION]="exclusion",t[n.BLEND_MODES.HUE]="hue",t[n.BLEND_MODES.SATURATION]="saturate",t[n.BLEND_MODES.COLOR]="color",t[n.BLEND_MODES.LUMINOSITY]="luminosity"):(t[n.BLEND_MODES.NORMAL]="source-over",t[n.BLEND_MODES.ADD]="lighter",t[n.BLEND_MODES.MULTIPLY]="source-over",t[n.BLEND_MODES.SCREEN]="source-over",t[n.BLEND_MODES.OVERLAY]="source-over",t[n.BLEND_MODES.DARKEN]="source-over",t[n.BLEND_MODES.LIGHTEN]="source-over",t[n.BLEND_MODES.COLOR_DODGE]="source-over",t[n.BLEND_MODES.COLOR_BURN]="source-over",t[n.BLEND_MODES.HARD_LIGHT]="source-over",t[n.BLEND_MODES.SOFT_LIGHT]="source-over",t[n.BLEND_MODES.DIFFERENCE]="source-over",t[n.BLEND_MODES.EXCLUSION]="source-over",t[n.BLEND_MODES.HUE]="source-over",t[n.BLEND_MODES.SATURATION]="source-over",t[n.BLEND_MODES.COLOR]="source-over",t[n.BLEND_MODES.LUMINOSITY]="source-over"),t}var n=i(10),o=i(55);t.exports=r},function(t,e){var i=function(t){var e=document.createElement("canvas");e.width=6,e.height=1;var i=e.getContext("2d");return i.fillStyle=t,i.fillRect(0,0,6,1),e},r=function(){if("undefined"==typeof document)return!1;var t=i("#ff00ff"),e=i("#ffff00"),r=document.createElement("canvas");r.width=6,r.height=1;var n=r.getContext("2d");n.globalCompositeOperation="multiply",n.drawImage(t,0,0),n.drawImage(e,2,0);var o=n.getImageData(2,0,1,1);if(!o)return!1;var s=o.data;return 255===s[0]&&0===s[1]&&0===s[2]};t.exports=r},function(t,e,i){var r=i(23),n=i(55),o=t.exports={getTintedTexture:function(t,e){var i=t.texture;e=o.roundColor(e);var r="#"+("00000"+(0|e).toString(16)).substr(-6);if(i.tintCache=i.tintCache||{},i.tintCache[r])return i.tintCache[r];var n=o.canvas||document.createElement("canvas");if(o.tintMethod(i,e,n),o.convertTintToImage){var s=new Image;s.src=n.toDataURL(),i.tintCache[r]=s}else i.tintCache[r]=n,o.canvas=null;return n},tintWithMultiply:function(t,e,i){var r=i.getContext("2d"),n=t._frame.clone(),o=t.baseTexture.resolution;n.x*=o,n.y*=o,n.width*=o,n.height*=o,i.width=n.width,i.height=n.height,r.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),r.fillRect(0,0,n.width,n.height),r.globalCompositeOperation="multiply",r.drawImage(t.baseTexture.source,n.x,n.y,n.width,n.height,0,0,n.width,n.height),r.globalCompositeOperation="destination-atop",r.drawImage(t.baseTexture.source,n.x,n.y,n.width,n.height,0,0,n.width,n.height)},tintWithOverlay:function(t,e,i){var r=i.getContext("2d"),n=t._frame.clone(),o=t.baseTexture.resolution;n.x*=o,n.y*=o,n.width*=o,n.height*=o,i.width=n.width,i.height=n.height,r.globalCompositeOperation="copy",r.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),r.fillRect(0,0,n.width,n.height),r.globalCompositeOperation="destination-atop",r.drawImage(t.baseTexture.source,n.x,n.y,n.width,n.height,0,0,n.width,n.height)},tintWithPerPixel:function(t,e,i){var n=i.getContext("2d"),o=t._frame.clone(),s=t.baseTexture.resolution;o.x*=s,o.y*=s,o.width*=s,o.height*=s,i.width=o.width,i.height=o.height,n.globalCompositeOperation="copy",n.drawImage(t.baseTexture.source,o.x,o.y,o.width,o.height,0,0,o.width,o.height);for(var a=r.hex2rgb(e),h=a[0],u=a[1],l=a[2],c=n.getImageData(0,0,o.width,o.height),p=c.data,d=0;d<p.length;d+=4)p[d+0]*=h,p[d+1]*=u,p[d+2]*=l;n.putImageData(c,0,0)},roundColor:function(t){var e=o.cacheStepsPerColorChannel,i=r.hex2rgb(t);return i[0]=Math.min(255,i[0]/e*e),i[1]=Math.min(255,i[1]/e*e),i[2]=Math.min(255,i[2]/e*e),r.rgb2hex(i)},cacheStepsPerColorChannel:8,convertTintToImage:!1,canUseMultiply:n(),tintMethod:0};o.tintMethod=o.canUseMultiply?o.tintWithMultiply:o.tintWithPerPixel},function(t,e,i){function r(t){n.call(this,t),this.vertSize=5,this.vertByteSize=4*this.vertSize,this.size=l.SPRITE_BATCH_SIZE,this.buffers=[];for(var e=1;e<=p.nextPow2(this.size);e*=2){var i=4*e*this.vertByteSize;this.buffers.push(new u(i))}this.indices=s(this.size),this.shaders=null,this.currentIndex=0,d=0,this.groups=[];for(var r=0;r<this.size;r++)this.groups[r]={textures:[],textureCount:0,ids:[],size:0,start:0,blend:0};this.sprites=[],this.vertexBuffers=[],this.vaos=[],this.vaoMax=2,this.vertexCount=0,this.renderer.on("prerender",this.onPrerender,this)}var n=i(58),o=i(60),s=i(85),a=i(94),h=i(95),u=i(96),l=i(10),c=i(65),p=i(44),d=0;r.prototype=Object.create(n.prototype),r.prototype.constructor=r,t.exports=r,o.registerPlugin("sprite",r),r.prototype.onContextChange=function(){var t=this.renderer.gl;this.MAX_TEXTURES=Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),l.SPRITE_MAX_TEXTURES),this.MAX_TEXTURES=h(this.MAX_TEXTURES,t),this.shaders=new Array(this.MAX_TEXTURES),this.shaders[0]=a(t,1),this.shaders[1]=a(t,2),this.indexBuffer=c.GLBuffer.createIndexBuffer(t,this.indices,t.STATIC_DRAW);for(var e=this.shaders[1],i=0;i<this.vaoMax;i++)this.vertexBuffers[i]=c.GLBuffer.createVertexBuffer(t,null,t.STREAM_DRAW),this.vaos[i]=this.renderer.createVao().addIndex(this.indexBuffer).addAttribute(this.vertexBuffers[i],e.attributes.aVertexPosition,t.FLOAT,!1,this.vertByteSize,0).addAttribute(this.vertexBuffers[i],e.attributes.aTextureCoord,t.UNSIGNED_SHORT,!0,this.vertByteSize,8).addAttribute(this.vertexBuffers[i],e.attributes.aColor,t.UNSIGNED_BYTE,!0,this.vertByteSize,12).addAttribute(this.vertexBuffers[i],e.attributes.aTextureId,t.FLOAT,!1,this.vertByteSize,16);this.vao=this.vaos[0],this.currentBlendMode=99999},r.prototype.onPrerender=function(){this.vertexCount=0},r.prototype.render=function(t){this.currentIndex>=this.size&&this.flush(),t.texture._uvs&&(this.sprites[this.currentIndex++]=t)},r.prototype.flush=function(){if(0!==this.currentIndex){var t,e,i,r,n,o,s,h=this.renderer.gl,u=p.nextPow2(this.currentIndex),l=p.log2(u),f=this.buffers[l],v=this.sprites,g=this.groups,y=f.float32View,x=f.uint32View,m=0,_=1,T=0,b=g[0],E=v[0].blendMode;b.textureCount=0,b.start=0,b.blend=E,d++;for(var w=0;w<this.currentIndex;w++){var S=v[w];if(t=S._texture.baseTexture,E!==S.blendMode&&(E=S.blendMode,e=null,T=this.MAX_TEXTURES,d++),e!==t&&(e=t,t._enabled!==d&&(T===this.MAX_TEXTURES&&(d++,T=0,b.size=w-b.start,b=g[_++],b.textureCount=0,b.blend=E,b.start=w),t._enabled=d,t._id=T,b.textures[b.textureCount++]=t,T++)),i=S.vertexData,r=S._tintRGB+(255*S.worldAlpha<<24),n=S._texture._uvs.uvsUint32,o=t._id,this.renderer.roundPixels){var C=this.renderer.resolution;y[m]=(i[0]*C|0)/C,y[m+1]=(i[1]*C|0)/C,y[m+5]=(i[2]*C|0)/C,y[m+6]=(i[3]*C|0)/C,y[m+10]=(i[4]*C|0)/C,y[m+11]=(i[5]*C|0)/C,y[m+15]=(i[6]*C|0)/C,y[m+16]=(i[7]*C|0)/C}else y[m]=i[0],y[m+1]=i[1],y[m+5]=i[2],y[m+6]=i[3],y[m+10]=i[4],y[m+11]=i[5],y[m+15]=i[6],y[m+16]=i[7];x[m+2]=n[0],x[m+7]=n[1],x[m+12]=n[2],x[m+17]=n[3],x[m+3]=x[m+8]=x[m+13]=x[m+18]=r,y[m+4]=y[m+9]=y[m+14]=y[m+19]=o,m+=20}for(b.size=w-b.start,this.vertexCount++,this.vaoMax<=this.vertexCount&&(this.vaoMax++,s=this.shaders[1],this.vertexBuffers[this.vertexCount]=c.GLBuffer.createVertexBuffer(h,null,h.STREAM_DRAW),this.vaos[this.vertexCount]=this.renderer.createVao().addIndex(this.indexBuffer).addAttribute(this.vertexBuffers[this.vertexCount],s.attributes.aVertexPosition,h.FLOAT,!1,this.vertByteSize,0).addAttribute(this.vertexBuffers[this.vertexCount],s.attributes.aTextureCoord,h.UNSIGNED_SHORT,!0,this.vertByteSize,8).addAttribute(this.vertexBuffers[this.vertexCount],s.attributes.aColor,h.UNSIGNED_BYTE,!0,this.vertByteSize,12).addAttribute(this.vertexBuffers[this.vertexCount],s.attributes.aTextureId,h.FLOAT,!1,this.vertByteSize,16)),this.vertexBuffers[this.vertexCount].upload(f.vertices,0),this.vao=this.vaos[this.vertexCount].bind(),w=0;w<_;w++){var A=g[w],M=A.textureCount;s=this.shaders[M-1],s||(s=this.shaders[M-1]=a(h,M)),this.renderer.bindShader(s);for(var R=0;R<M;R++)this.renderer.bindTexture(A.textures[R],R);this.renderer.state.setBlendMode(A.blend),h.drawElements(h.TRIANGLES,6*A.size,h.UNSIGNED_SHORT,6*A.start*2)}this.currentIndex=0}},r.prototype.start=function(){},r.prototype.stop=function(){this.flush(),this.vao.unbind()},r.prototype.destroy=function(){for(var t=0;t<this.vaoMax;t++)this.vertexBuffers[t].destroy(),this.vaos[t].destroy();for(this.indexBuffer.destroy(),this.renderer.off("prerender",this.onPrerender,this),n.prototype.destroy.call(this),t=0;t<this.shaders.length;t++)this.shaders[t]&&this.shaders[t].destroy();for(this.vertexBuffers=null,this.vaos=null,this.indexBuffer=null,this.indices=null,this.sprites=null,t=0;t<this.buffers.length;t++)this.buffers[t].destroy()}},function(t,e,i){function r(t){n.call(this,t)}var n=i(59);r.prototype=Object.create(n.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.start=function(){},r.prototype.stop=function(){this.flush()},r.prototype.flush=function(){},r.prototype.render=function(t){}},function(t,e){function i(t){this.renderer=t,this.renderer.on("context",this.onContextChange,this)}i.prototype.constructor=i,t.exports=i,i.prototype.onContextChange=function(){},i.prototype.destroy=function(){this.renderer.off("context",this.onContextChange,this),this.renderer=null}},function(t,e,i){function r(t,e,i){i=i||{},n.call(this,"WebGL",t,e,i),this.type=x.RENDERER_TYPE.WEBGL,this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this),this.view.addEventListener("webglcontextlost",this.handleContextLost,!1),this.view.addEventListener("webglcontextrestored",this.handleContextRestored,!1),this._contextOptions={alpha:this.transparent,antialias:i.antialias,premultipliedAlpha:this.transparent&&"notMultiplied"!==this.transparent,stencil:!0,preserveDrawingBuffer:i.preserveDrawingBuffer},this._backgroundColorRgba[3]=this.transparent?0:1,this.maskManager=new o(this),this.stencilManager=new s(this),this.emptyRenderer=new u(this),this.currentRenderer=this.emptyRenderer,this.initPlugins(),i.context&&v(i.context),this.gl=i.context||d(this.view,this._contextOptions),this.CONTEXT_UID=m++,this.state=new p(this.gl),this.renderingToScreen=!0,this._initContext(),this.filterManager=new a(this),this.drawModes=f(this.gl),this._activeShader=null,this._activeRenderTarget=null,this._activeTextureLocation=999,this._activeTexture=null,this.setBlendMode(0)}var n=i(49),o=i(61),s=i(81),a=i(82),h=i(83),u=i(58),l=i(88),c=i(89),p=i(90),d=i(65).createContext,f=i(92),v=i(93),g=i(23),y=i(65),x=i(10),m=0;r.prototype=Object.create(n.prototype),r.prototype.constructor=r,t.exports=r,g.pluginTarget.mixin(r),r.prototype._initContext=function(){var t=this.gl;this.textureManager=new l(this),this.textureGC=new c(this),this.state.resetToDefault(),this.rootRenderTarget=new h(t,this.width,this.height,null,this.resolution,(!0)),this.rootRenderTarget.clearColor=this._backgroundColorRgba,this.bindRenderTarget(this.rootRenderTarget),this.emit("context",t),this.resize(this.width,this.height)},r.prototype.render=function(t,e,i,r,n){if(this.renderingToScreen=!e,this.emit("prerender"),this.gl&&!this.gl.isContextLost()){if(e||(this._lastObjectRendered=t),!n){var o=t.parent;t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=o}this.bindRenderTexture(e,r),this.currentRenderer.start(),(void 0!==i?i:this.clearBeforeRender)&&this._activeRenderTarget.clear(),t.renderWebGL(this),this.currentRenderer.flush(),this.textureGC.update(),this.emit("postrender")}},r.prototype.setObjectRenderer=function(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())},r.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},r.prototype.resize=function(t,e){n.prototype.resize.call(this,t,e),this.rootRenderTarget.resize(t,e),this._activeRenderTarget===this.rootRenderTarget&&(this.rootRenderTarget.activate(),this._activeShader&&(this._activeShader.uniforms.projectionMatrix=this.rootRenderTarget.projectionMatrix.toArray(!0)))},r.prototype.setBlendMode=function(t){this.state.setBlendMode(t)},r.prototype.clear=function(t){this._activeRenderTarget.clear(t)},r.prototype.setTransform=function(t){this._activeRenderTarget.transform=t},r.prototype.bindRenderTexture=function(t,e){var i;if(t){var r=t.baseTexture,n=this.gl;r._glRenderTargets[this.CONTEXT_UID]?(this._activeTextureLocation=r._id,n.activeTexture(n.TEXTURE0+r._id),n.bindTexture(n.TEXTURE_2D,null)):(this.textureManager.updateTexture(r),n.bindTexture(n.TEXTURE_2D,null)),i=r._glRenderTargets[this.CONTEXT_UID],i.setFrame(t.frame)}else i=this.rootRenderTarget;return i.transform=e,this.bindRenderTarget(i),this},r.prototype.bindRenderTarget=function(t){return t!==this._activeRenderTarget&&(this._activeRenderTarget=t,t.activate(),this._activeShader&&(this._activeShader.uniforms.projectionMatrix=t.projectionMatrix.toArray(!0)),this.stencilManager.setMaskStack(t.stencilMaskStack)),this},r.prototype.bindShader=function(t){return this._activeShader!==t&&(this._activeShader=t,t.bind(),t.uniforms.projectionMatrix=this._activeRenderTarget.projectionMatrix.toArray(!0)),this},r.prototype.bindTexture=function(t,e){t=t.baseTexture||t;var i=this.gl;return e=e||0,this._activeTextureLocation!==e&&(this._activeTextureLocation=e,i.activeTexture(i.TEXTURE0+e)),this._activeTexture=t,t._glTextures[this.CONTEXT_UID]?(t.touched=this.textureGC.count,t._glTextures[this.CONTEXT_UID].bind()):this.textureManager.updateTexture(t),this},r.prototype.createVao=function(){return new y.VertexArrayObject(this.gl,this.state.attribState)},r.prototype.reset=function(){return this.setObjectRenderer(this.emptyRenderer),this._activeShader=null,this._activeRenderTarget=this.rootRenderTarget,this._activeTextureLocation=999,this._activeTexture=null,this.rootRenderTarget.activate(),this.state.resetToDefault(),this},r.prototype.handleContextLost=function(t){t.preventDefault()},r.prototype.handleContextRestored=function(){this._initContext(),this.textureManager.removeAll();
  },r.prototype.destroy=function(t){this.destroyPlugins(),this.view.removeEventListener("webglcontextlost",this.handleContextLost),this.view.removeEventListener("webglcontextrestored",this.handleContextRestored),this.textureManager.destroy(),n.prototype.destroy.call(this,t),this.uid=0,this.maskManager.destroy(),this.stencilManager.destroy(),this.filterManager.destroy(),this.maskManager=null,this.filterManager=null,this.textureManager=null,this.currentRenderer=null,this.handleContextLost=null,this.handleContextRestored=null,this._contextOptions=null,this.gl.useProgram(null),this.gl.getExtension("WEBGL_lose_context")&&this.gl.getExtension("WEBGL_lose_context").loseContext(),this.gl=null}},function(t,e,i){function r(t){n.call(this,t),this.scissor=!1,this.scissorData=null,this.scissorRenderTarget=null,this.enableScissor=!0,this.alphaMaskPool=[],this.alphaMaskIndex=0}var n=i(59),o=i(62);r.prototype=Object.create(n.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.pushMask=function(t,e){if(e.texture)this.pushSpriteMask(t,e);else if(this.enableScissor&&!this.scissor&&!this.renderer.stencilManager.stencilMaskStack.length&&e.isFastRect()){var i=e.worldTransform,r=Math.atan2(i.b,i.a);r=Math.round(r*(180/Math.PI)),r%90?this.pushStencilMask(e):this.pushScissorMask(t,e)}else this.pushStencilMask(e)},r.prototype.popMask=function(t,e){e.texture?this.popSpriteMask(t,e):this.enableScissor&&!this.renderer.stencilManager.stencilMaskStack.length?this.popScissorMask(t,e):this.popStencilMask(t,e)},r.prototype.pushSpriteMask=function(t,e){var i=this.alphaMaskPool[this.alphaMaskIndex];i||(i=this.alphaMaskPool[this.alphaMaskIndex]=[new o(e)]),i[0].resolution=this.renderer.resolution,i[0].maskSprite=e,t.filterArea=e.getBounds(!0),this.renderer.filterManager.pushFilter(t,i),this.alphaMaskIndex++},r.prototype.popSpriteMask=function(){this.renderer.filterManager.popFilter(),this.alphaMaskIndex--},r.prototype.pushStencilMask=function(t){this.renderer.currentRenderer.stop(),this.renderer.stencilManager.pushStencil(t)},r.prototype.popStencilMask=function(){this.renderer.currentRenderer.stop(),this.renderer.stencilManager.popStencil()},r.prototype.pushScissorMask=function(t,e){e.renderable=!0;var i=this.renderer._activeRenderTarget,r=e.getBounds();r.fit(i.size),e.renderable=!1,this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST);var n=this.renderer.resolution;this.renderer.gl.scissor(r.x*n,(i.root?i.size.height-r.y-r.height:r.y)*n,r.width*n,r.height*n),this.scissorRenderTarget=i,this.scissorData=e,this.scissor=!0},r.prototype.popScissorMask=function(){this.scissorRenderTarget=null,this.scissorData=null,this.scissor=!1;var t=this.renderer.gl;t.disable(t.SCISSOR_TEST)}},function(t,e,i){function r(t){var e=new o.Matrix;n.call(this,"#define GLSLIFY 1\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n    vTextureCoord = aTextureCoord;\n    vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0)  ).xy;\n}\n","#define GLSLIFY 1\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float alpha;\nuniform sampler2D mask;\n\nvoid main(void)\n{\n    // check clip! this will stop the mask bleeding out from the edges\n    vec2 text = abs( vMaskCoord - 0.5 );\n    text = step(0.5, text);\n    float clip = 1.0 - max(text.y, text.x);\n    vec4 original = texture2D(uSampler, vTextureCoord);\n    vec4 masky = texture2D(mask, vMaskCoord);\n    original *= (masky.r * masky.a * alpha * clip);\n    gl_FragColor = original;\n}\n"),t.renderable=!1,this.maskSprite=t,this.maskMatrix=e}var n=i(63),o=i(13);r.prototype=Object.create(n.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.apply=function(t,e,i){var r=this.maskSprite;this.uniforms.mask=r._texture,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,r),this.uniforms.alpha=r.worldAlpha,t.applyFilter(this,e,i)}},function(t,e,i){function r(t,e,i){this.vertexSrc=t||r.defaultVertexSrc,this.fragmentSrc=e||r.defaultFragmentSrc,this.blendMode=s.BLEND_MODES.NORMAL,this.uniformData=i||n(this.vertexSrc,this.fragmentSrc,"projectionMatrix|uSampler"),this.uniforms={};for(var h in this.uniformData)this.uniforms[h]=this.uniformData[h].value;this.glShaders=[],a[this.vertexSrc+this.fragmentSrc]||(a[this.vertexSrc+this.fragmentSrc]=o.uid()),this.glShaderKey=a[this.vertexSrc+this.fragmentSrc],this.padding=4,this.resolution=1,this.enabled=!0}var n=i(64),o=i(23),s=i(10),a={};t.exports=r,r.prototype.apply=function(t,e,i,r){t.applyFilter(this,e,i,r)},r.defaultVertexSrc=["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform mat3 projectionMatrix;","uniform mat3 filterMatrix;","varying vec2 vTextureCoord;","varying vec2 vFilterCoord;","void main(void){","   gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);","   vFilterCoord = ( filterMatrix * vec3( aTextureCoord, 1.0)  ).xy;","   vTextureCoord = aTextureCoord ;","}"].join("\n"),r.defaultFragmentSrc=["varying vec2 vTextureCoord;","varying vec2 vFilterCoord;","uniform sampler2D uSampler;","uniform sampler2D filterSampler;","void main(void){","   vec4 masky = texture2D(filterSampler, vFilterCoord);","   vec4 sample = texture2D(uSampler, vTextureCoord);","   vec4 color;","   if(mod(vFilterCoord.x, 1.0) > 0.5)","   {","     color = vec4(1.0, 0.0, 0.0, 1.0);","   }","   else","   {","     color = vec4(0.0, 1.0, 0.0, 1.0);","   }","   gl_FragColor = mix(sample, masky, 0.5);","   gl_FragColor *= sample.a;","}"].join("\n")},function(t,e,i){function r(t,e,i){var r=n(t,i),o=n(e,i);return Object.assign(r,o)}function n(t){for(var e,i=new RegExp("^(projectionMatrix|uSampler|filterArea)$"),r={},n=t.replace(/\s+/g," ").split(/\s*;\s*/),s=0;s<n.length;s++){var a=n[s].trim();if(a.indexOf("uniform")>-1){var h=a.split(" "),u=h[1],l=h[2],c=1;l.indexOf("[")>-1&&(e=l.split(/\[|\]/),l=e[0],c*=Number(e[1])),l.match(i)||(r[l]={value:o(u,c),name:l,type:u})}}return r}var o=i(65).shader.defaultValue;t.exports=r},function(t,e,i){var r={createContext:i(66),setVertexAttribArrays:i(67),GLBuffer:i(68),GLFramebuffer:i(69),GLShader:i(71),GLTexture:i(70),VertexArrayObject:i(79),shader:i(80)};"undefined"!=typeof t&&t.exports&&(t.exports=r),"undefined"!=typeof window&&(window.pixi={gl:r})},function(t,e){var i=function(t,e){var i=t.getContext("webgl",e)||t.getContext("experimental-webgl",e);if(!i)throw new Error("This browser does not support webGL. Try using the canvas renderer");return i};t.exports=i},function(t,e){var i=function(t,e,i){var r;if(i){var n=i.tempAttribState,o=i.attribState;for(r=0;r<n.length;r++)n[r]=!1;for(r=0;r<e.length;r++)n[e[r].attribute.location]=!0;for(r=0;r<o.length;r++)o[r]!==n[r]&&(o[r]=n[r],i.attribState[r]?t.enableVertexAttribArray(r):t.disableVertexAttribArray(r))}else for(r=0;r<e.length;r++){var s=e[r];t.enableVertexAttribArray(s.attribute.location)}};t.exports=i},function(t,e){var i=new ArrayBuffer(0),r=function(t,e,r,n){this.gl=t,this.buffer=t.createBuffer(),this.type=e||t.ARRAY_BUFFER,this.drawType=n||t.STATIC_DRAW,this.data=i,r&&this.upload(r)};r.prototype.upload=function(t,e,i){i||this.bind();var r=this.gl;t=t||this.data,e=e||0,this.data.byteLength>=t.byteLength?r.bufferSubData(this.type,e,t):r.bufferData(this.type,t,this.drawType),this.data=t},r.prototype.bind=function(){var t=this.gl;t.bindBuffer(this.type,this.buffer)},r.createVertexBuffer=function(t,e,i){return new r(t,t.ARRAY_BUFFER,e,i)},r.createIndexBuffer=function(t,e,i){return new r(t,t.ELEMENT_ARRAY_BUFFER,e,i)},r.create=function(t,e,i,n){return new r(t,e,n)},r.prototype.destroy=function(){this.gl.deleteBuffer(this.buffer)},t.exports=r},function(t,e,i){var r=i(70),n=function(t,e,i){this.gl=t,this.framebuffer=t.createFramebuffer(),this.stencil=null,this.texture=null,this.width=e||100,this.height=i||100};n.prototype.enableTexture=function(t){var e=this.gl;this.texture=t||new r(e),this.texture.bind(),this.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture.texture,0)},n.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)}},n.prototype.clear=function(t,e,i,r){this.bind();var n=this.gl;n.clearColor(t,e,i,r),n.clear(n.COLOR_BUFFER_BIT)},n.prototype.bind=function(){var t=this.gl;this.texture&&this.texture.unbind(),t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer)},n.prototype.unbind=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,null)},n.prototype.resize=function(t,e){var i=this.gl;this.width=t,this.height=e,this.texture&&this.texture.uploadData(null,t,e),this.stencil&&(i.bindRenderbuffer(i.RENDERBUFFER,this.stencil),i.renderbufferStorage(i.RENDERBUFFER,i.DEPTH_STENCIL,t,e))},n.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},n.createRGBA=function(t,e,i){var o=r.fromData(t,null,e,i);o.enableNearestScaling(),o.enableWrapClamp();var s=new n(t,e,i);return s.enableTexture(o),s.unbind(),s},n.createFloat32=function(t,e,i,o){var s=new r.fromData(t,o,e,i);s.enableNearestScaling(),s.enableWrapClamp();var a=new n(t,e,i);return a.enableTexture(s),a.unbind(),a},t.exports=n},function(t,e){var i=function(t,e,i,r,n){this.gl=t,this.texture=t.createTexture(),this.mipmap=!1,this.premultiplyAlpha=!1,this.width=e||0,this.height=i||0,this.format=r||t.RGBA,this.type=n||t.UNSIGNED_BYTE};i.prototype.upload=function(t){this.bind();var e=this.gl;this.width=t.videoWidth||t.width,this.height=t.videoHeight||t.height,e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),e.texImage2D(e.TEXTURE_2D,0,this.format,this.format,this.type,t)};var r=!1;i.prototype.uploadData=function(t,e,i){this.bind();var n=this.gl;if(this.width=e||this.width,this.height=i||this.height,t instanceof Float32Array){if(!r){var o=n.getExtension("OES_texture_float");if(!o)throw new Error("floating point textures not available");r=!0}this.type=n.FLOAT}else this.type=n.UNSIGNED_BYTE;n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),n.texImage2D(n.TEXTURE_2D,0,this.format,this.width,this.height,0,this.format,this.type,t||null)},i.prototype.bind=function(t){var e=this.gl;void 0!==t&&e.activeTexture(e.TEXTURE0+t),e.bindTexture(e.TEXTURE_2D,this.texture)},i.prototype.unbind=function(){var t=this.gl;t.bindTexture(t.TEXTURE_2D,null)},i.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)},i.prototype.magFilter=function(t){var e=this.gl;this.bind(),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t?e.LINEAR:e.NEAREST)},i.prototype.enableMipmap=function(){var t=this.gl;this.bind(),this.mipmap=!0,t.generateMipmap(t.TEXTURE_2D)},i.prototype.enableLinearScaling=function(){this.minFilter(!0),this.magFilter(!0)},i.prototype.enableNearestScaling=function(){this.minFilter(!1),this.magFilter(!1)},i.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)},i.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)},i.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)},i.prototype.destroy=function(){var t=this.gl;t.deleteTexture(this.texture)},i.fromSource=function(t,e,r){var n=new i(t);return n.premultiplyAlpha=r||!1,n.upload(e),n},i.fromData=function(t,e,r,n){var o=new i(t);return o.uploadData(e,r,n),o},t.exports=i},function(t,e,i){var r=i(72),n=i(73),o=i(76),s=i(78),a=function(t,e,i){this.gl=t,this.program=r(t,e,i),this.attributes=n(t,this.program);var a=o(t,this.program);this.uniforms=s(t,a)};a.prototype.bind=function(){this.gl.useProgram(this.program)},a.prototype.destroy=function(){},t.exports=a},function(t,e){var i=function(t,e,i){var n=r(t,t.VERTEX_SHADER,e),o=r(t,t.FRAGMENT_SHADER,i),s=t.createProgram();return t.attachShader(s,n),t.attachShader(s,o),t.linkProgram(s),t.getProgramParameter(s,t.LINK_STATUS)||(console.error("Pixi.js Error: Could not initialize shader."),console.error("gl.VALIDATE_STATUS",t.getProgramParameter(s,t.VALIDATE_STATUS)),console.error("gl.getError()",t.getError()),""!==t.getProgramInfoLog(s)&&console.warn("Pixi.js Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(s)),t.deleteProgram(s),s=null),t.deleteShader(n),t.deleteShader(o),s},r=function(t,e,i){var r=t.createShader(e);return t.shaderSource(r,i),t.compileShader(r),t.getShaderParameter(r,t.COMPILE_STATUS)?r:(console.log(t.getShaderInfoLog(r)),null)};t.exports=i},function(t,e,i){var r=i(74),n=i(75),o=function(t,e){for(var i={},o=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),a=0;a<o;a++){var h=t.getActiveAttrib(e,a),u=r(t,h.type);i[h.name]={type:u,size:n(u),location:t.getAttribLocation(e,h.name),pointer:s}}return i},s=function(t,e,i,r){gl.vertexAttribPointer(this.location,this.size,t||gl.FLOAT,e||!1,i||0,r||0)};t.exports=o},function(t,e){var i=function(t,e){if(!r){var i=Object.keys(n);r={};for(var o=0;o<i.length;++o){var s=i[o];r[t[s]]=n[s]}}return r[e]},r=null,n={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D"};t.exports=i},function(t,e){var i=function(t){return r[t]},r={"float":1,vec2:2,vec3:3,vec4:4,"int":1,ivec2:2,ivec3:3,ivec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};t.exports=i},function(t,e,i){var r=i(74),n=i(77),o=function(t,e){for(var i={},o=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),s=0;s<o;s++){var a=t.getActiveUniform(e,s),h=a.name.replace(/\[.*?\]/,""),u=r(t,a.type);i[h]={type:u,size:a.size,location:t.getUniformLocation(e,h),value:n(u,a.size)}}return i};t.exports=o},function(t,e){var i=function(t,e){switch(t){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"sampler2D":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"bool":return!1;case"bvec2":return r(2*e);case"bvec3":return r(3*e);case"bvec4":return r(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}},r=function(t){for(var e=new Array(t),i=0;i<e.length;i++)e[i]=!1;return e};t.exports=i},function(t,e){var i=function(t,e){var i={data:{}};i.gl=t;for(var s=Object.keys(e),a=0;a<s.length;a++){var h=s[a],u=h.split("."),l=u[u.length-1],c=o(u,i),p=e[h];c.data[l]=p,c.gl=t,Object.defineProperty(c,l,{get:r(l),set:n(l,p)})}return i},r=function(t){var e=s.replace("%%",t);return new Function(e)},n=function(t,e){var i,r=a.replace(/%%/g,t);return i=1===e.size?h[e.type]:u[e.type],i&&(r+="\nthis.gl."+i+";"),new Function("value",r)},o=function(t,e){for(var i=e,r=0;r<t.length-1;r++){var n=i[t[r]]||{data:{}};i[t[r]]=n,i=n}return i},s=["return this.data.%%.value;"].join("\n"),a=["this.data.%%.value = value;","var location = this.data.%%.location;"].join("\n"),h={"float":"uniform1f(location, value)",vec2:"uniform2f(location, value[0], value[1])",vec3:"uniform3f(location, value[0], value[1], value[2])",vec4:"uniform4f(location, value[0], value[1], value[2], value[3])","int":"uniform1i(location, value)",ivec2:"uniform2i(location, value[0], value[1])",ivec3:"uniform3i(location, value[0], value[1], value[2])",ivec4:"uniform4i(location, value[0], value[1], value[2], value[3])",bool:"uniform1i(location, value)",bvec2:"uniform2i(location, value[0], value[1])",bvec3:"uniform3i(location, value[0], value[1], value[2])",bvec4:"uniform4i(location, value[0], value[1], value[2], value[3])",mat2:"uniformMatrix2fv(location, false, value)",mat3:"uniformMatrix3fv(location, false, value)",mat4:"uniformMatrix4fv(location, false, value)",sampler2D:"uniform1i(location, value)"},u={"float":"uniform1fv(location, value)",vec2:"uniform2fv(location, value)",vec3:"uniform3fv(location, value)",vec4:"uniform4fv(location, value)","int":"uniform1iv(location, value)",ivec2:"uniform2iv(location, value)",ivec3:"uniform3iv(location, value)",ivec4:"uniform4iv(location, value)",bool:"uniform1iv(location, value)",bvec2:"uniform2iv(location, value)",bvec3:"uniform3iv(location, value)",bvec4:"uniform4iv(location, value)",sampler2D:"uniform1iv(location, value)"};t.exports=i},function(t,e,i){function r(t,e){if(this.nativeVaoExtension=null,r.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 i=t.getParameter(t.MAX_VERTEX_ATTRIBS);this.nativeState={tempAttribState:new Array(i),attribState:new Array(i)}}this.gl=t,this.attributes=[],this.indexBuffer=null,this.dirty=!1}var n=i(67);r.prototype.constructor=r,t.exports=r,r.FORCE_NATIVE=!1,r.prototype.bind=function(){return this.nativeVao?(this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao),this.dirty&&(this.dirty=!1,this.activate())):this.activate(),this},r.prototype.unbind=function(){return this.nativeVao&&this.nativeVaoExtension.bindVertexArrayOES(null),this},r.prototype.activate=function(){for(var t=this.gl,e=null,i=0;i<this.attributes.length;i++){var r=this.attributes[i];e!==r.buffer&&(r.buffer.bind(),e=r.buffer),t.vertexAttribPointer(r.attribute.location,r.attribute.size,r.type||t.FLOAT,r.normalized||!1,r.stride||0,r.start||0)}return n(t,this.attributes,this.nativeState),this.indexBuffer.bind(),this},r.prototype.addAttribute=function(t,e,i,r,n,o){return this.attributes.push({buffer:t,attribute:e,location:e.location,type:i||this.gl.FLOAT,normalized:r||!1,stride:n||0,start:o||0}),this.dirty=!0,this},r.prototype.addIndex=function(t){return this.indexBuffer=t,this.dirty=!0,this},r.prototype.clear=function(){return this.nativeVao&&this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao),this.attributes.length=0,this.indexBuffer=null,this},r.prototype.draw=function(t,e,i){var r=this.gl;return r.drawElements(t,e,r.UNSIGNED_SHORT,i||0),this},r.prototype.destroy=function(){this.gl=null,this.indexBuffer=null,this.attributes=null,this.nativeState=null,this.nativeVao&&this.nativeVaoExtension.deleteVertexArrayOES(this.nativeVao),this.nativeVaoExtension=null,this.nativeVao=null}},function(t,e,i){t.exports={compileProgram:i(72),defaultValue:i(77),extractAttributes:i(73),extractUniforms:i(76),generateUniformAccessObject:i(78),mapSize:i(75),mapType:i(74)}},function(t,e,i){function r(t){n.call(this,t),this.stencilMaskStack=null}var n=i(59);r.prototype=Object.create(n.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.setMaskStack=function(t){this.stencilMaskStack=t;var e=this.renderer.gl;0===t.length?e.disable(e.STENCIL_TEST):e.enable(e.STENCIL_TEST)},r.prototype.pushStencil=function(t){this.renderer.setObjectRenderer(this.renderer.plugins.graphics),this.renderer._activeRenderTarget.attachStencilBuffer();var e=this.renderer.gl,i=this.stencilMaskStack;0===i.length&&(e.enable(e.STENCIL_TEST),e.clear(e.STENCIL_BUFFER_BIT),e.stencilFunc(e.ALWAYS,1,1)),i.push(t),e.colorMask(!1,!1,!1,!1),e.stencilOp(e.KEEP,e.KEEP,e.INCR),this.renderer.plugins.graphics.render(t),e.colorMask(!0,!0,!0,!0),e.stencilFunc(e.NOTEQUAL,0,i.length),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)},r.prototype.popStencil=function(){this.renderer.setObjectRenderer(this.renderer.plugins.graphics);var t=this.renderer.gl,e=this.stencilMaskStack,i=e.pop();0===e.length?t.disable(t.STENCIL_TEST):(t.colorMask(!1,!1,!1,!1),t.stencilOp(t.KEEP,t.KEEP,t.DECR),this.renderer.plugins.graphics.render(i),t.colorMask(!0,!0,!0,!0),t.stencilFunc(t.NOTEQUAL,0,e.length),t.stencilOp(t.KEEP,t.KEEP,t.KEEP))},r.prototype.destroy=function(){n.prototype.destroy.call(this),this.stencilMaskStack.stencilStack=null}},function(t,e,i){function r(t){n.call(this,t),this.gl=this.renderer.gl,this.quad=new s(this.gl,t.state.attribState),this.shaderCache={},this.pool={},this.filterData=null}var n=i(59),o=i(83),s=i(84),a=i(13),h=i(86),u=i(87),l=i(44),c=function(){this.renderTarget=null,this.sourceFrame=new a.Rectangle,this.destinationFrame=new a.Rectangle,this.filters=[],this.target=null,this.resolution=1};r.prototype=Object.create(n.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.pushFilter=function(t,e){var i=this.renderer,r=this.filterData;if(!r){r=this.renderer._activeRenderTarget.filterStack;var n=new c;n.sourceFrame=n.destinationFrame=this.renderer._activeRenderTarget.size,n.renderTarget=i._activeRenderTarget,this.renderer._activeRenderTarget.filterData=r={index:0,stack:[n]},this.filterData=r}var o=r.stack[++r.index];o||(o=r.stack[r.index]=new c);var s=e[0].resolution,a=e[0].padding,h=t.filterArea||t.getBounds(!0),u=o.sourceFrame,l=o.destinationFrame;u.x=(h.x*s|0)/s,u.y=(h.y*s|0)/s,u.width=(h.width*s|0)/s,u.height=(h.height*s|0)/s,r.stack[0].renderTarget.transform||u.fit(r.stack[0].destinationFrame),l.width=u.width,l.height=u.height,u.pad(a);var p=this.getPotRenderTarget(i.gl,u.width,u.height,s);o.target=t,o.filters=e,o.resolution=s,o.renderTarget=p,p.setFrame(l,u),i.bindRenderTarget(p),i.clear()},r.prototype.popFilter=function(){var t=this.filterData,e=t.stack[t.index-1],i=t.stack[t.index];this.quad.map(i.renderTarget.size,i.sourceFrame).upload();var r=i.filters;if(1===r.length)r[0].apply(this,i.renderTarget,e.renderTarget,!1),this.freePotRenderTarget(i.renderTarget);else{var n=i.renderTarget,o=this.getPotRenderTarget(this.renderer.gl,i.sourceFrame.width,i.sourceFrame.height,1);o.setFrame(i.destinationFrame,i.sourceFrame);for(var s=0;s<r.length-1;s++){r[s].apply(this,n,o,!0);var a=n;n=o,o=a}r[s].apply(this,n,e.renderTarget,!1),this.freePotRenderTarget(n),this.freePotRenderTarget(o)}t.index--,0===t.index&&(this.filterData=null)},r.prototype.applyFilter=function(t,e,i,r){var n=this.renderer,o=t.glShaders[n.CONTEXT_UID];if(o||(t.glShaderKey?(o=this.shaderCache[t.glShaderKey],o||(o=t.glShaders[n.CONTEXT_UID]=this.shaderCache[t.glShaderKey]=new h(this.gl,t.vertexSrc,t.fragmentSrc))):o=t.glShaders[n.CONTEXT_UID]=new h(this.gl,t.vertexSrc,t.fragmentSrc),this.quad.initVao(o)),n.bindRenderTarget(i),r){var s=n.gl;s.disable(s.SCISSOR_TEST),n.clear(),s.enable(s.SCISSOR_TEST)}i===n.maskManager.scissorRenderTarget&&n.maskManager.pushScissorMask(null,n.maskManager.scissorData),n.bindShader(o),this.syncUniforms(o,t),e.texture.bind(0),n._activeTextureLocation=0,n.state.setBlendMode(t.blendMode),this.quad.draw()},r.prototype.syncUniforms=function(t,e){var i,r=e.uniformData,n=e.uniforms,o=1;if(t.uniforms.data.filterArea){i=this.filterData.stack[this.filterData.index];var s=t.uniforms.filterArea;s[0]=i.renderTarget.size.width,s[1]=i.renderTarget.size.height,s[2]=i.sourceFrame.x,s[3]=i.sourceFrame.y,t.uniforms.filterArea=s}if(t.uniforms.data.filterClamp){i=this.filterData.stack[this.filterData.index];var a=t.uniforms.filterClamp;a[0]=.5/i.renderTarget.size.width,a[1]=.5/i.renderTarget.size.height,a[2]=(i.sourceFrame.width-.5)/i.renderTarget.size.width,a[3]=(i.sourceFrame.height-.5)/i.renderTarget.size.height,t.uniforms.filterClamp=a}var h;for(var u in r)if("sampler2D"===r[u].type){if(t.uniforms[u]=o,n[u].baseTexture)this.renderer.bindTexture(n[u].baseTexture,o);else{var l=this.renderer.gl;this.renderer._activeTextureLocation=l.TEXTURE0+o,l.activeTexture(l.TEXTURE0+o),n[u].texture.bind()}o++}else"mat3"===r[u].type?void 0!==n[u].a?t.uniforms[u]=n[u].toArray(!0):t.uniforms[u]=n[u]:"vec2"===r[u].type?void 0!==n[u].x?(h=t.uniforms[u]||new Float32Array(2),h[0]=n[u].x,h[1]=n[u].y,t.uniforms[u]=h):t.uniforms[u]=n[u]:"float"===r[u].type?t.uniforms.data[u].value!==r[u]&&(t.uniforms[u]=n[u]):t.uniforms[u]=n[u]},r.prototype.getRenderTarget=function(t,e){var i=this.filterData.stack[this.filterData.index],r=this.getPotRenderTarget(this.renderer.gl,i.sourceFrame.width,i.sourceFrame.height,e||i.resolution);return r.setFrame(i.destinationFrame,i.sourceFrame),r},r.prototype.returnRenderTarget=function(t){return this.freePotRenderTarget(t)},r.prototype.calculateScreenSpaceMatrix=function(t){var e=this.filterData.stack[this.filterData.index];return u.calculateScreenSpaceMatrix(t,e.sourceFrame,e.renderTarget.size)},r.prototype.calculateNormalizedScreenSpaceMatrix=function(t){var e=this.filterData.stack[this.filterData.index];return u.calculateNormalizedScreenSpaceMatrix(t,e.sourceFrame,e.renderTarget.size,e.destinationFrame)},r.prototype.calculateSpriteMatrix=function(t,e){var i=this.filterData.stack[this.filterData.index];return u.calculateSpriteMatrix(t,i.sourceFrame,i.renderTarget.size,e)},r.prototype.destroy=function(){this.shaderCache=[],this.emptyPool()},r.prototype.getPotRenderTarget=function(t,e,i,r){e=l.nextPow2(e*r),i=l.nextPow2(i*r);var n=(65535&e)<<16|65535&i;this.pool[n]||(this.pool[n]=[]);var s=this.pool[n].pop()||new o(t,e,i,null,1);return s.resolution=r,s.defaultFrame.width=s.size.width=e/r,s.defaultFrame.height=s.size.height=i/r,s},r.prototype.emptyPool=function(){for(var t in this.pool){var e=this.pool[t];if(e)for(var i=0;i<e.length;i++)e[i].destroy(!0)}this.pool={}},r.prototype.freePotRenderTarget=function(t){var e=t.size.width*t.resolution,i=t.size.height*t.resolution,r=(65535&e)<<16|65535&i;this.pool[r].push(t)}},function(t,e,i){var r=i(13),n=i(10),o=i(65).GLFramebuffer,s=function(t,e,i,s,a,h){this.gl=t,this.frameBuffer=null,this.texture=null,this.clearColor=[0,0,0,0],this.size=new r.Rectangle(0,0,1,1),this.resolution=a||n.RESOLUTION,this.projectionMatrix=new r.Matrix,this.transform=null,this.frame=null,this.defaultFrame=new r.Rectangle,this.destinationFrame=null,this.sourceFrame=null,this.stencilBuffer=null,this.stencilMaskStack=[],this.filterData=null,this.scaleMode=s||n.SCALE_MODES.DEFAULT,this.root=h,this.root?(this.frameBuffer=new o(t,100,100),this.frameBuffer.framebuffer=null):(this.frameBuffer=o.createRGBA(t,100,100),this.scaleMode===n.SCALE_MODES.NEAREST?this.frameBuffer.texture.enableNearestScaling():this.frameBuffer.texture.enableLinearScaling(),this.texture=this.frameBuffer.texture),this.setFrame(),this.resize(e,i)};s.prototype.constructor=s,t.exports=s,s.prototype.clear=function(t){var e=t||this.clearColor;this.frameBuffer.clear(e[0],e[1],e[2],e[3])},s.prototype.attachStencilBuffer=function(){this.root||this.frameBuffer.enableStencil()},s.prototype.setFrame=function(t,e){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=e||this.sourceFrame||t},s.prototype.activate=function(){var t=this.gl;this.frameBuffer.bind(),this.calculateProjection(this.destinationFrame,this.sourceFrame),this.transform&&this.projectionMatrix.append(this.transform),this.destinationFrame!==this.sourceFrame?(t.enable(t.SCISSOR_TEST),t.scissor(0|this.destinationFrame.x,0|this.destinationFrame.y,this.destinationFrame.width*this.resolution|0,this.destinationFrame.height*this.resolution|0)):t.disable(t.SCISSOR_TEST),t.viewport(0|this.destinationFrame.x,0|this.destinationFrame.y,this.destinationFrame.width*this.resolution|0,this.destinationFrame.height*this.resolution|0)},s.prototype.calculateProjection=function(t,e){var i=this.projectionMatrix;e=e||t,i.identity(),this.root?(i.a=1/t.width*2,i.d=-1/t.height*2,i.tx=-1-e.x*i.a,i.ty=1-e.y*i.d):(i.a=1/t.width*2,i.d=1/t.height*2,i.tx=-1-e.x*i.a,i.ty=-1-e.y*i.d)},s.prototype.resize=function(t,e){if(t=0|t,e=0|e,this.size.width!==t||this.size.height!==e){this.size.width=t,this.size.height=e,this.defaultFrame.width=t,this.defaultFrame.height=e,this.frameBuffer.resize(t*this.resolution,e*this.resolution);var i=this.frame||this.size;this.calculateProjection(i)}},s.prototype.destroy=function(){this.frameBuffer.destroy(),this.frameBuffer=null,this.texture=null}},function(t,e,i){function r(t,e){this.gl=t,this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.interleaved=new Float32Array(16);for(var i=0;i<4;i++)this.interleaved[4*i]=this.vertices[2*i],this.interleaved[4*i+1]=this.vertices[2*i+1],this.interleaved[4*i+2]=this.uvs[2*i],this.interleaved[4*i+3]=this.uvs[2*i+1];this.indices=o(1),this.vertexBuffer=n.GLBuffer.createVertexBuffer(t,this.interleaved,t.STATIC_DRAW),this.indexBuffer=n.GLBuffer.createIndexBuffer(t,this.indices,t.STATIC_DRAW),this.vao=new n.VertexArrayObject(t,e)}var n=i(65),o=i(85);r.prototype.constructor=r,r.prototype.initVao=function(t){this.vao.clear().addIndex(this.indexBuffer).addAttribute(this.vertexBuffer,t.attributes.aVertexPosition,this.gl.FLOAT,!1,16,0).addAttribute(this.vertexBuffer,t.attributes.aTextureCoord,this.gl.FLOAT,!1,16,8)},r.prototype.map=function(t,e){var i=0,r=0;return this.uvs[0]=i,this.uvs[1]=r,this.uvs[2]=i+e.width/t.width,this.uvs[3]=r,this.uvs[4]=i+e.width/t.width,this.uvs[5]=r+e.height/t.height,this.uvs[6]=i,this.uvs[7]=r+e.height/t.height,i=e.x,r=e.y,this.vertices[0]=i,this.vertices[1]=r,this.vertices[2]=i+e.width,this.vertices[3]=r,this.vertices[4]=i+e.width,this.vertices[5]=r+e.height,this.vertices[6]=i,this.vertices[7]=r+e.height,this},r.prototype.draw=function(){return this.vao.bind().draw(this.gl.TRIANGLES,6,0).unbind(),this},r.prototype.upload=function(){for(var t=0;t<4;t++)this.interleaved[4*t]=this.vertices[2*t],this.interleaved[4*t+1]=this.vertices[2*t+1],this.interleaved[4*t+2]=this.uvs[2*t],this.interleaved[4*t+3]=this.uvs[2*t+1];return this.vertexBuffer.upload(this.interleaved),this},r.prototype.destroy=function(){var t=this.gl;t.deleteBuffer(this.vertexBuffer),t.deleteBuffer(this.indexBuffer)},t.exports=r},function(t,e){var i=function(t){for(var e=6*t,i=new Uint16Array(e),r=0,n=0;r<e;r+=6,n+=4)i[r+0]=n+0,i[r+1]=n+1,i[r+2]=n+2,i[r+3]=n+0,i[r+4]=n+2,i[r+5]=n+3;return i};t.exports=i},function(t,e,i){function r(t){if(t instanceof Array){if("precision"!==t[0].substring(0,9)){var e=t.slice(0);return e.unshift("precision "+o.PRECISION.DEFAULT+" float;"),e}}else if("precision"!==t.substring(0,9))return"precision "+o.PRECISION.DEFAULT+" float;\n"+t;return t}var n=i(65).GLShader,o=i(10),s=function(t,e,i){n.call(this,t,r(e),r(i))};s.prototype=Object.create(n.prototype),s.prototype.constructor=s,t.exports=s},function(t,e,i){var r=i(13),n=function(t,e,i){var r=t.identity();return r.translate(e.x/i.width,e.y/i.height),r.scale(i.width,i.height),r},o=function(t,e,i){var r=t.identity();r.translate(e.x/i.width,e.y/i.height);var n=i.width/e.width,o=i.height/e.height;return r.scale(n,o),r},s=function(t,e,i,n){var o=n.worldTransform.copy(r.Matrix.TEMP_MATRIX),s=n._texture.baseTexture,a=t.identity(),h=i.height/i.width;a.translate(e.x/i.width,e.y/i.height),a.scale(1,h);var u=i.width/s.width,l=i.height/s.height;return o.tx/=s.width*u,o.ty/=s.width*u,o.invert(),a.prepend(o),a.scale(1,1/h),a.scale(u,l),a.translate(n.anchor.x,n.anchor.y),a};t.exports={calculateScreenSpaceMatrix:n,calculateNormalizedScreenSpaceMatrix:o,calculateSpriteMatrix:s}},function(t,e,i){var r=i(65).GLTexture,n=i(10),o=i(83),s=i(23),a=function(t){this.renderer=t,this.gl=t.gl,this._managedTextures=[]};a.prototype.bindTexture=function(){},a.prototype.getTexture=function(){},a.prototype.updateTexture=function(t){t=t.baseTexture||t;var e=!!t._glRenderTargets;
  if(t.hasLoaded){var i=t._glTextures[this.renderer.CONTEXT_UID];if(i)e?t._glRenderTargets[this.renderer.CONTEXT_UID].resize(t.width,t.height):i.upload(t.source);else{if(e){var s=new o(this.gl,t.width,t.height,t.scaleMode,t.resolution);s.resize(t.width,t.height),t._glRenderTargets[this.renderer.CONTEXT_UID]=s,i=s.texture}else i=new r(this.gl),i.premultiplyAlpha=!0,i.upload(t.source);t._glTextures[this.renderer.CONTEXT_UID]=i,t.on("update",this.updateTexture,this),t.on("dispose",this.destroyTexture,this),this._managedTextures.push(t),t.isPowerOfTwo?(t.mipmap&&i.enableMipmap(),t.wrapMode===n.WRAP_MODES.CLAMP?i.enableWrapClamp():t.wrapMode===n.WRAP_MODES.REPEAT?i.enableWrapRepeat():i.enableWrapMirrorRepeat()):i.enableWrapClamp(),t.scaleMode===n.SCALE_MODES.NEAREST?i.enableNearestScaling():i.enableLinearScaling()}return i}},a.prototype.destroyTexture=function(t,e){if(t=t.baseTexture||t,t.hasLoaded&&t._glTextures[this.renderer.CONTEXT_UID]&&(t._glTextures[this.renderer.CONTEXT_UID].destroy(),t.off("update",this.updateTexture,this),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.renderer.CONTEXT_UID],!e)){var i=this._managedTextures.indexOf(t);i!==-1&&s.removeItems(this._managedTextures,i,1)}},a.prototype.removeAll=function(){for(var t=0;t<this._managedTextures.length;++t){var e=this._managedTextures[t];e._glTextures[this.renderer.CONTEXT_UID]&&delete e._glTextures[this.renderer.CONTEXT_UID]}},a.prototype.destroy=function(){for(var t=0;t<this._managedTextures.length;++t){var e=this._managedTextures[t];this.destroyTexture(e,!0),e.off("update",this.updateTexture,this),e.off("dispose",this.destroyTexture,this)}this._managedTextures=null},t.exports=a},function(t,e,i){function r(t){this.renderer=t,this.count=0,this.checkCount=0,this.maxIdle=3600,this.checkCountMax=600,this.mode=n.GC_MODES.DEFAULT}var n=i(10);r.prototype.constructor=r,t.exports=r,r.prototype.update=function(){this.count++,this.mode!==n.GC_MODES.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run()))},r.prototype.run=function(){var t,e,i=this.renderer.textureManager,r=i._managedTextures,n=!1;for(t=0;t<r.length;t++){var o=r[t];!o._glRenderTargets&&this.count-o.touched>this.maxIdle&&(i.destroyTexture(o,!0),r[t]=null,n=!0)}if(n){for(e=0,t=0;t<r.length;t++)null!==r[t]&&(r[e++]=r[t]);r.length=e}},r.prototype.unload=function(t){var e=this.renderer.textureManager;t._texture&&e.destroyTexture(t._texture,!0);for(var i=t.children.length-1;i>=0;i--)this.unload(t.children[i])}},function(t,e,i){function r(t){this.activeState=new Uint8Array(16),this.defaultState=new Uint8Array(16),this.defaultState[0]=1,this.stackIndex=0,this.stack=[],this.gl=t,this.maxAttribs=t.getParameter(t.MAX_VERTEX_ATTRIBS),this.attribState={tempAttribState:new Array(this.maxAttribs),attribState:new Array(this.maxAttribs)},this.blendModes=n(t),this.nativeVaoExtension=t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object")}var n=i(91);r.prototype.push=function(){var t=this.stack[++this.stackIndex];t||(t=this.stack[this.stackIndex]=new Uint8Array(16));for(var e=0;e<this.activeState.length;e++)this.activeState[e]=t[e]};var o=0,s=1,a=2,h=3,u=4;r.prototype.pop=function(){var t=this.stack[--this.stackIndex];this.setState(t)},r.prototype.setState=function(t){this.setBlend(t[o]),this.setDepthTest(t[s]),this.setFrontFace(t[a]),this.setCullFace(t[h]),this.setBlendMode(t[u])},r.prototype.setBlend=function(t){if(!(this.activeState[o]===t|0)){this.activeState[o]=0|t;var e=this.gl;t?e.enable(e.BLEND):e.disable(e.BLEND)}},r.prototype.setBlendMode=function(t){t!==this.activeState[u]&&(this.activeState[u]=t,this.gl.blendFunc(this.blendModes[t][0],this.blendModes[t][1]))},r.prototype.setDepthTest=function(t){if(!(this.activeState[s]===t|0)){this.activeState[s]=0|t;var e=this.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST)}},r.prototype.setCullFace=function(t){if(!(this.activeState[h]===t|0)){this.activeState[h]=0|t;var e=this.gl;t?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE)}},r.prototype.setFrontFace=function(t){if(!(this.activeState[a]===t|0)){this.activeState[a]=0|t;var e=this.gl;t?e.frontFace(e.CW):e.frontFace(e.CCW)}},r.prototype.resetAttributes=function(){var t;for(t=0;t<this.attribState.tempAttribState.length;t++)this.attribState.tempAttribState[t]=0;for(t=0;t<this.attribState.attribState.length;t++)this.attribState.attribState[t]=0;var e=this.gl;for(t=1;t<this.maxAttribs;t++)e.disableVertexAttribArray(t)},r.prototype.resetToDefault=function(){this.nativeVaoExtension&&this.nativeVaoExtension.bindVertexArrayOES(null),this.resetAttributes();for(var t=0;t<this.activeState.length;t++)this.activeState[t]=32;var e=this.gl;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!1),this.setState(this.defaultState)},t.exports=r},function(t,e,i){function r(t,e){return e=e||[],e[n.BLEND_MODES.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.ADD]=[t.ONE,t.DST_ALPHA],e[n.BLEND_MODES.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.SCREEN]=[t.ONE,t.ONE_MINUS_SRC_COLOR],e[n.BLEND_MODES.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[n.BLEND_MODES.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e}var n=i(10);t.exports=r},function(t,e,i){function r(t,e){e=e||{},e[n.DRAW_MODES.POINTS]=t.POINTS,e[n.DRAW_MODES.LINES]=t.LINES,e[n.DRAW_MODES.LINE_LOOP]=t.LINE_LOOP,e[n.DRAW_MODES.LINE_STRIP]=t.LINE_STRIP,e[n.DRAW_MODES.TRIANGLES]=t.TRIANGLES,e[n.DRAW_MODES.TRIANGLE_STRIP]=t.TRIANGLE_STRIP,e[n.DRAW_MODES.TRIANGLE_FAN]=t.TRIANGLE_FAN}var n=i(10);t.exports=r},function(t,e){function i(t){var e=t.getContextAttributes();e.stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly")}t.exports=i},function(t,e,i){function r(t,e){var i="#define GLSLIFY 1\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n   gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n   vTextureCoord = aTextureCoord;\n   vTextureId = aTextureId;\n   vColor = vec4(aColor.rgb * aColor.a, aColor.a);\n}\n",r=s;r=r.replace(/%count%/gi,e),r=r.replace(/%forloop%/gi,n(e));for(var a=new o(t,i,r),h=[],u=0;u<e;u++)h[u]=u;return a.bind(),a.uniforms.uSamplers=h,a}function n(t){var e="";e+="\n",e+="\n";for(var i=0;i<t;i++)i>0&&(e+="\nelse "),i<t-1&&(e+="if(textureId == "+i+".0)"),e+="\n{",e+="\n\tcolor = texture2D(uSamplers["+i+"], vTextureCoord);",e+="\n}";return e+="\n",e+="\n"}var o=i(86),s=["varying vec2 vTextureCoord;","varying vec4 vColor;","varying float vTextureId;","uniform sampler2D uSamplers[%count%];","void main(void){","vec4 color;","float textureId = floor(vTextureId+0.5);","%forloop%","gl_FragColor = color * vColor;","}"].join("\n");t.exports=r},function(t,e,i){function r(t){for(var e="",i=0;i<t;i++)i>0&&(e+="\nelse "),i<t-1&&(e+="if(test == "+i+".0){}");return e}var n=i(65),o=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n"),s=function(t,e){var i=!e;if(i){var s=document.createElement("canvas");s.width=1,s.height=1,e=n.createContext(s)}for(var a=e.createShader(e.FRAGMENT_SHADER);;){var h=o.replace(/%forloop%/gi,r(t));if(e.shaderSource(a,h),e.compileShader(a),e.getShaderParameter(a,e.COMPILE_STATUS))break;t=t/2|0}return i&&e.getExtension("WEBGL_lose_context")&&e.getExtension("WEBGL_lose_context").loseContext(),t};t.exports=s},function(t,e){var i=function(t){this.vertices=new ArrayBuffer(t),this.float32View=new Float32Array(this.vertices),this.uint32View=new Uint32Array(this.vertices)};t.exports=i,i.prototype.destroy=function(){this.vertices=null,this.positions=null,this.uvs=null,this.colors=null}},function(t,e,i){function r(t,e){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=h.RESOLUTION,this._text=null,this._style=null,this._styleListener=null,this._font="";var i=o.fromCanvas(this.canvas);i.orig=new s.Rectangle,i.trim=new s.Rectangle,n.call(this,i),this.text=t,this.style=e,this.localStyleID=-1}var n=i(34),o=i(35),s=i(13),a=i(23),h=i(10),u=i(98),l={texture:!0,children:!1,baseTexture:!0};r.prototype=Object.create(n.prototype),r.prototype.constructor=r,t.exports=r,r.fontPropertiesCache={},r.fontPropertiesCanvas=document.createElement("canvas"),r.fontPropertiesContext=r.fontPropertiesCanvas.getContext("2d"),Object.defineProperties(r.prototype,{width:{get:function(){return this.updateText(!0),Math.abs(this.scale.x)*this.texture.orig.width},set:function(t){this.updateText(!0);var e=a.sign(this.scale.x)||1;this.scale.x=e*t/this.texture.orig.width,this._width=t}},height:{get:function(){return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height},set:function(t){this.updateText(!0);var e=a.sign(this.scale.y)||1;this.scale.y=e*t/this.texture.orig.height,this._height=t}},style:{get:function(){return this._style},set:function(t){t=t||{},t instanceof u?this._style=t:this._style=new u(t),this.localStyleID=-1,this.dirty=!0}},text:{get:function(){return this._text},set:function(t){t=t||" ",t=t.toString(),this._text!==t&&(this._text=t,this.dirty=!0)}}}),r.prototype.updateText=function(t){var e=this._style;if(this.localStyleID!==e.styleID&&(this.dirty=!0,this.localStyleID=e.styleID),this.dirty||!t){var i="number"==typeof e.fontSize?e.fontSize+"px":e.fontSize;this._font=e.fontStyle+" "+e.fontVariant+" "+e.fontWeight+" "+i+" "+e.fontFamily,this.context.font=this._font;var r,n=e.wordWrap?this.wordWrap(this._text):this._text,o=n.split(/(?:\r\n|\r|\n)/),s=new Array(o.length),a=0,h=this.determineFontProperties(this._font);for(r=0;r<o.length;r++){var u=this.context.measureText(o[r]).width+(o[r].length-1)*e.letterSpacing;s[r]=u,a=Math.max(a,u)}var l=a+e.strokeThickness;e.dropShadow&&(l+=e.dropShadowDistance),l+=2*e.padding,this.canvas.width=Math.ceil((l+this.context.lineWidth)*this.resolution);var c=this.style.lineHeight||h.fontSize+e.strokeThickness,p=Math.max(c,h.fontSize+e.strokeThickness)+(o.length-1)*c;e.dropShadow&&(p+=e.dropShadowDistance),this.canvas.height=Math.ceil((p+2*this._style.padding)*this.resolution),this.context.scale(this.resolution,this.resolution),navigator.isCocoonJS&&this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this.context.font=this._font,this.context.strokeStyle=e.stroke,this.context.lineWidth=e.strokeThickness,this.context.textBaseline=e.textBaseline,this.context.lineJoin=e.lineJoin,this.context.miterLimit=e.miterLimit;var d,f;if(e.dropShadow){e.dropShadowBlur>0?(this.context.shadowColor=e.dropShadowColor,this.context.shadowBlur=e.dropShadowBlur):this.context.fillStyle=e.dropShadowColor;var v=Math.cos(e.dropShadowAngle)*e.dropShadowDistance,g=Math.sin(e.dropShadowAngle)*e.dropShadowDistance;for(r=0;r<o.length;r++)d=e.strokeThickness/2,f=e.strokeThickness/2+r*c+h.ascent,"right"===e.align?d+=a-s[r]:"center"===e.align&&(d+=(a-s[r])/2),e.fill&&(this.drawLetterSpacing(o[r],d+v+e.padding,f+g+e.padding),e.stroke&&e.strokeThickness&&(this.context.strokeStyle=e.dropShadowColor,this.drawLetterSpacing(o[r],d+v+e.padding,f+g+e.padding,!0),this.context.strokeStyle=e.stroke))}for(this.context.fillStyle=this._generateFillStyle(e,o),r=0;r<o.length;r++)d=e.strokeThickness/2,f=e.strokeThickness/2+r*c+h.ascent,"right"===e.align?d+=a-s[r]:"center"===e.align&&(d+=(a-s[r])/2),e.stroke&&e.strokeThickness&&this.drawLetterSpacing(o[r],d+e.padding,f+e.padding,!0),e.fill&&this.drawLetterSpacing(o[r],d+e.padding,f+e.padding);this.updateTexture()}},r.prototype.drawLetterSpacing=function(t,e,i,r){var n=this._style,o=n.letterSpacing;if(0===o)return void(r?this.context.strokeText(t,e,i):this.context.fillText(t,e,i));for(var s,a=String.prototype.split.call(t,""),h=0,u=e;h<t.length;)s=a[h++],r?this.context.strokeText(s,u,i):this.context.fillText(s,u,i),u+=this.context.measureText(s).width+o},r.prototype.updateTexture=function(){var t=this._texture,e=this._style;t.baseTexture.hasLoaded=!0,t.baseTexture.resolution=this.resolution,t.baseTexture.realWidth=this.canvas.width,t.baseTexture.realHeight=this.canvas.height,t.baseTexture.width=this.canvas.width/this.resolution,t.baseTexture.height=this.canvas.height/this.resolution,t.trim.width=t._frame.width=this.canvas.width/this.resolution,t.trim.height=t._frame.height=this.canvas.height/this.resolution,t.trim.x=-e.padding,t.trim.y=-e.padding,t.orig.width=t._frame.width-2*e.padding,t.orig.height=t._frame.height-2*e.padding,this._onTextureUpdate(),t.baseTexture.emit("update",t.baseTexture),this.dirty=!1},r.prototype.renderWebGL=function(t){this.resolution!==t.resolution&&(this.resolution=t.resolution,this.dirty=!0),this.updateText(!0),n.prototype.renderWebGL.call(this,t)},r.prototype._renderCanvas=function(t){this.resolution!==t.resolution&&(this.resolution=t.resolution,this.dirty=!0),this.updateText(!0),n.prototype._renderCanvas.call(this,t)},r.prototype.determineFontProperties=function(t){var e=r.fontPropertiesCache[t];if(!e){e={};var i=r.fontPropertiesCanvas,n=r.fontPropertiesContext;n.font=t;var o=Math.ceil(n.measureText("|MÉq").width),s=Math.ceil(n.measureText("M").width),a=2*s;s=1.4*s|0,i.width=o,i.height=a,n.fillStyle="#f00",n.fillRect(0,0,o,a),n.font=t,n.textBaseline="alphabetic",n.fillStyle="#000",n.fillText("|MÉq",0,s);var h,u,l=n.getImageData(0,0,o,a).data,c=l.length,p=4*o,d=0,f=!1;for(h=0;h<s;h++){for(u=0;u<p;u+=4)if(255!==l[d+u]){f=!0;break}if(f)break;d+=p}for(e.ascent=s-h,d=c-p,f=!1,h=a;h>s;h--){for(u=0;u<p;u+=4)if(255!==l[d+u]){f=!0;break}if(f)break;d-=p}e.descent=h-s,e.fontSize=e.ascent+e.descent,r.fontPropertiesCache[t]=e}return e},r.prototype.wordWrap=function(t){for(var e="",i=t.split("\n"),r=this._style.wordWrapWidth,n=0;n<i.length;n++){for(var o=r,s=i[n].split(" "),a=0;a<s.length;a++){var h=this.context.measureText(s[a]).width;if(this._style.breakWords&&h>r)for(var u=s[a].split(""),l=0;l<u.length;l++){var c=this.context.measureText(u[l]).width;c>o?(e+="\n"+u[l],o=r-c):(0===l&&(e+=" "),e+=u[l],o-=c)}else{var p=h+this.context.measureText(" ").width;0===a||p>o?(a>0&&(e+="\n"),e+=s[a],o=r-h):(o-=p,e+=" "+s[a])}}n<i.length-1&&(e+="\n")}return e},r.prototype._calculateBounds=function(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)},r.prototype._onStyleChange=function(){this.dirty=!0},r.prototype._generateFillStyle=function(t,e){if(Array.isArray(t.fill)){var i,r,n,o,s,a=this.canvas.width/this.resolution,u=this.canvas.height/this.resolution;if(t.fillGradientType===h.TEXT_GRADIENT.LINEAR_VERTICAL)for(r=this.context.createLinearGradient(a/2,0,a/2,u),n=(t.fill.length+1)*e.length,o=0,i=0;i<e.length;i++){o+=1;for(var l=0;l<t.fill.length;l++)s=o/n,r.addColorStop(s,t.fill[l]),o++}else for(r=this.context.createLinearGradient(0,u/2,a,u/2),n=t.fill.length+1,o=1,i=0;i<t.fill.length;i++)s=o/n,r.addColorStop(s,t.fill[i]),o++;return r}return t.fill},r.prototype.destroy=function(t){"boolean"==typeof t&&(t={children:t}),t=Object.assign({},l,t),n.prototype.destroy.call(this,t),this.context=null,this.canvas=null,this._style=null}},function(t,e,i){function r(t){this.styleID=0,Object.assign(this,this._defaults,t)}function n(t){if("number"==typeof t)return s.hex2string(t);if(Array.isArray(t))for(var e=0;e<t.length;++e)"number"==typeof t[e]&&(t[e]=s.hex2string(t[e]));return t}var o=i(10),s=i(23);r.prototype.constructor=r,t.exports=r,r.prototype._defaults={align:"left",breakWords:!1,dropShadow:!1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"#000000",dropShadowDistance:5,fill:"black",fillGradientType:o.TEXT_GRADIENT.LINEAR_VERTICAL,fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",wordWrap:!1,wordWrapWidth:100},r.prototype.clone=function(){var t={};for(var e in this._defaults)t[e]=this[e];return new r(t)},r.prototype.reset=function(){Object.assign(this,this._defaults)},Object.defineProperties(r.prototype,{align:{get:function(){return this._align},set:function(t){this._align!==t&&(this._align=t,this.styleID++)}},breakWords:{get:function(){return this._breakWords},set:function(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)}},dropShadow:{get:function(){return this._dropShadow},set:function(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)}},dropShadowAngle:{get:function(){return this._dropShadowAngle},set:function(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)}},dropShadowBlur:{get:function(){return this._dropShadowBlur},set:function(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)}},dropShadowColor:{get:function(){return this._dropShadowColor},set:function(t){var e=n(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)}},dropShadowDistance:{get:function(){return this._dropShadowDistance},set:function(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)}},fill:{get:function(){return this._fill},set:function(t){var e=n(t);this._fill!==e&&(this._fill=e,this.styleID++)}},fillGradientType:{get:function(){return this._fillGradientType},set:function(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)}},fontFamily:{get:function(){return this._fontFamily},set:function(t){this.fontFamily!==t&&(this._fontFamily=t,this.styleID++)}},fontSize:{get:function(){return this._fontSize},set:function(t){this._fontSize!==t&&(this._fontSize=t,this.styleID++)}},fontStyle:{get:function(){return this._fontStyle},set:function(t){this._fontStyle!==t&&(this._fontStyle=t,this.styleID++)}},fontVariant:{get:function(){return this._fontVariant},set:function(t){this._fontVariant!==t&&(this._fontVariant=t,this.styleID++)}},fontWeight:{get:function(){return this._fontWeight},set:function(t){this._fontWeight!==t&&(this._fontWeight=t,this.styleID++)}},letterSpacing:{get:function(){return this._letterSpacing},set:function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.styleID++)}},lineHeight:{get:function(){return this._lineHeight},set:function(t){this._lineHeight!==t&&(this._lineHeight=t,this.styleID++)}},lineJoin:{get:function(){return this._lineJoin},set:function(t){this._lineJoin!==t&&(this._lineJoin=t,this.styleID++)}},miterLimit:{get:function(){return this._miterLimit},set:function(t){this._miterLimit!==t&&(this._miterLimit=t,this.styleID++)}},padding:{get:function(){return this._padding},set:function(t){this._padding!==t&&(this._padding=t,this.styleID++)}},stroke:{get:function(){return this._stroke},set:function(t){var e=n(t);this._stroke!==e&&(this._stroke=e,this.styleID++)}},strokeThickness:{get:function(){return this._strokeThickness},set:function(t){this._strokeThickness!==t&&(this._strokeThickness=t,this.styleID++)}},textBaseline:{get:function(){return this._textBaseline},set:function(t){this._textBaseline!==t&&(this._textBaseline=t,this.styleID++)}},wordWrap:{get:function(){return this._wordWrap},set:function(t){this._wordWrap!==t&&(this._wordWrap=t,this.styleID++)}},wordWrapWidth:{get:function(){return this._wordWrapWidth},set:function(t){this._wordWrapWidth!==t&&(this._wordWrapWidth=t,this.styleID++)}}})},function(t,e,i){function r(){o.call(this),this.fillAlpha=1,this.lineWidth=0,this.lineColor=0,this.graphicsData=[],this.tint=16777215,this._prevTint=16777215,this.blendMode=c.BLEND_MODES.NORMAL,this.currentPath=null,this._webGL={},this.isMask=!1,this.boundsPadding=0,this._localBounds=new d,this.dirty=0,this.fastRectDirty=-1,this.clearDirty=0,this.boundsDirty=-1,this.cachedSpriteDirty=!1,this._spriteRect=null,this._fastRect=!1}var n,o=i(33),s=i(50),a=i(35),h=i(100),u=i(34),l=i(13),c=i(10),p=i(23),d=i(32),f=i(101),v=i(48),g=new l.Matrix,y=new l.Point,x=new Float32Array(4),m=new Float32Array(4);r._SPRITE_TEXTURE=null,r.prototype=Object.create(o.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.clone=function(){var t=new r;t.renderable=this.renderable,t.fillAlpha=this.fillAlpha,t.lineWidth=this.lineWidth,t.lineColor=this.lineColor,t.tint=this.tint,t.blendMode=this.blendMode,t.isMask=this.isMask,t.boundsPadding=this.boundsPadding,t.dirty=0,t.cachedSpriteDirty=this.cachedSpriteDirty;for(var e=0;e<this.graphicsData.length;++e)t.graphicsData.push(this.graphicsData[e].clone());return t.currentPath=t.graphicsData[t.graphicsData.length-1],t.updateLocalBounds(),t},r.prototype.lineStyle=function(t,e,i){if(this.lineWidth=t||0,this.lineColor=e||0,this.lineAlpha=void 0===i?1:i,this.currentPath)if(this.currentPath.shape.points.length){var r=new l.Polygon(this.currentPath.shape.points.slice(-2));r.closed=!1,this.drawShape(r)}else this.currentPath.lineWidth=this.lineWidth,this.currentPath.lineColor=this.lineColor,this.currentPath.lineAlpha=this.lineAlpha;return this},r.prototype.moveTo=function(t,e){var i=new l.Polygon([t,e]);return i.closed=!1,this.drawShape(i),this},r.prototype.lineTo=function(t,e){return this.currentPath.shape.points.push(t,e),this.dirty++,this},r.prototype.quadraticCurveTo=function(t,e,i,r){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var n,o,s=20,a=this.currentPath.shape.points;0===a.length&&this.moveTo(0,0);for(var h=a[a.length-2],u=a[a.length-1],l=0,c=1;c<=s;++c)l=c/s,n=h+(t-h)*l,o=u+(e-u)*l,a.push(n+(t+(i-t)*l-n)*l,o+(e+(r-e)*l-o)*l);return this.dirty++,this},r.prototype.bezierCurveTo=function(t,e,i,r,n,o){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var s=this.currentPath.shape.points,a=s[s.length-2],h=s[s.length-1];return s.length-=2,f(a,h,t,e,i,r,n,o,s),this.dirty++,this},r.prototype.arcTo=function(t,e,i,r,n){this.currentPath?0===this.currentPath.shape.points.length&&this.currentPath.shape.points.push(t,e):this.moveTo(t,e);var o=this.currentPath.shape.points,s=o[o.length-2],a=o[o.length-1],h=a-e,u=s-t,l=r-e,c=i-t,p=Math.abs(h*c-u*l);if(p<1e-8||0===n)o[o.length-2]===t&&o[o.length-1]===e||o.push(t,e);else{var d=h*h+u*u,f=l*l+c*c,v=h*l+u*c,g=n*Math.sqrt(d)/p,y=n*Math.sqrt(f)/p,x=g*v/d,m=y*v/f,_=g*c+y*u,T=g*l+y*h,b=u*(y+x),E=h*(y+x),w=c*(g+m),S=l*(g+m),C=Math.atan2(E-T,b-_),A=Math.atan2(S-T,w-_);this.arc(_+t,T+e,n,C,A,u*l>c*h)}return this.dirty++,this},r.prototype.arc=function(t,e,i,r,n,o){if(o=o||!1,r===n)return this;!o&&n<=r?n+=2*Math.PI:o&&r<=n&&(r+=2*Math.PI);var s=o?(r-n)*-1:n-r,a=40*Math.ceil(Math.abs(s)/(2*Math.PI));if(0===s)return this;var h=t+Math.cos(r)*i,u=e+Math.sin(r)*i;this.currentPath?this.currentPath.shape.points.push(h,u):this.moveTo(h,u);for(var l=this.currentPath.shape.points,c=s/(2*a),p=2*c,d=Math.cos(c),f=Math.sin(c),v=a-1,g=v%1/v,y=0;y<=v;y++){var x=y+g*y,m=c+r+p*x,_=Math.cos(m),T=-Math.sin(m);l.push((d*_+f*T)*i+t,(d*-T+f*_)*i+e)}return this.dirty++,this},r.prototype.beginFill=function(t,e){return this.filling=!0,this.fillColor=t||0,this.fillAlpha=void 0===e?1:e,this.currentPath&&this.currentPath.shape.points.length<=2&&(this.currentPath.fill=this.filling,this.currentPath.fillColor=this.fillColor,this.currentPath.fillAlpha=this.fillAlpha),this},r.prototype.endFill=function(){return this.filling=!1,this.fillColor=null,this.fillAlpha=1,this},r.prototype.drawRect=function(t,e,i,r){return this.drawShape(new l.Rectangle(t,e,i,r)),this},r.prototype.drawRoundedRect=function(t,e,i,r,n){return this.drawShape(new l.RoundedRectangle(t,e,i,r,n)),this},r.prototype.drawCircle=function(t,e,i){return this.drawShape(new l.Circle(t,e,i)),this},r.prototype.drawEllipse=function(t,e,i,r){return this.drawShape(new l.Ellipse(t,e,i,r)),this},r.prototype.drawPolygon=function(t){var e=t,i=!0;if(e instanceof l.Polygon&&(i=e.closed,e=e.points),!Array.isArray(e)){e=new Array(arguments.length);for(var r=0;r<e.length;++r)e[r]=arguments[r]}var n=new l.Polygon(e);return n.closed=i,this.drawShape(n),this},r.prototype.clear=function(){return this.lineWidth=0,this.filling=!1,this.dirty++,this.clearDirty++,this.graphicsData=[],this},r.prototype.isFastRect=function(){return 1===this.graphicsData.length&&this.graphicsData[0].shape.type===c.SHAPES.RECT&&!this.graphicsData[0].lineWidth},r.prototype._renderWebGL=function(t){this.dirty!==this.fastRectDirty&&(this.fastRectDirty=this.dirty,this._fastRect=this.isFastRect()),this._fastRect?this._renderSpriteRect(t):(t.setObjectRenderer(t.plugins.graphics),t.plugins.graphics.render(this))},r.prototype._renderSpriteRect=function(t){var e=this.graphicsData[0].shape;if(!this._spriteRect){if(!r._SPRITE_TEXTURE){r._SPRITE_TEXTURE=s.create(10,10);var i=t._activeRenderTarget;t.bindRenderTexture(r._SPRITE_TEXTURE),t.clear([1,1,1,1]),t.bindRenderTarget(i)}this._spriteRect=new u(r._SPRITE_TEXTURE)}if(16777215===this.tint)this._spriteRect.tint=this.graphicsData[0].fillColor;else{var n=x,o=m;p.hex2rgb(this.graphicsData[0].fillColor,n),p.hex2rgb(this.tint,o),n[0]*=o[0],n[1]*=o[1],n[2]*=o[2],this._spriteRect.tint=p.rgb2hex(n)}this._spriteRect.alpha=this.graphicsData[0].fillAlpha,this._spriteRect.worldAlpha=this.worldAlpha*this._spriteRect.alpha,r._SPRITE_TEXTURE._frame.width=e.width,r._SPRITE_TEXTURE._frame.height=e.height,this._spriteRect.transform.worldTransform=this.transform.worldTransform,this._spriteRect.anchor.set(-e.x/e.width,-e.y/e.height),this._spriteRect.onAnchorUpdate(),this._spriteRect._renderWebGL(t)},r.prototype._renderCanvas=function(t){this.isMask!==!0&&t.plugins.graphics.render(this)},r.prototype._calculateBounds=function(){if(this.renderable){this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.updateLocalBounds(),this.dirty++,this.cachedSpriteDirty=!0);var t=this._localBounds;this._bounds.addFrame(this.transform,t.minX,t.minY,t.maxX,t.maxY)}},r.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,y);for(var e=this.graphicsData,i=0;i<e.length;i++){var r=e[i];if(r.fill&&r.shape&&r.shape.contains(y.x,y.y))return!0}return!1},r.prototype.updateLocalBounds=function(){var t=1/0,e=-(1/0),i=1/0,r=-(1/0);if(this.graphicsData.length)for(var n,o,s,a,h,u,l=0;l<this.graphicsData.length;l++){var p=this.graphicsData[l],d=p.type,f=p.lineWidth;if(n=p.shape,d===c.SHAPES.RECT||d===c.SHAPES.RREC)s=n.x-f/2,a=n.y-f/2,h=n.width+f,u=n.height+f,t=s<t?s:t,e=s+h>e?s+h:e,i=a<i?a:i,r=a+u>r?a+u:r;else if(d===c.SHAPES.CIRC)s=n.x,a=n.y,h=n.radius+f/2,u=n.radius+f/2,t=s-h<t?s-h:t,e=s+h>e?s+h:e,i=a-u<i?a-u:i,r=a+u>r?a+u:r;else if(d===c.SHAPES.ELIP)s=n.x,a=n.y,h=n.width+f/2,u=n.height+f/2,t=s-h<t?s-h:t,e=s+h>e?s+h:e,i=a-u<i?a-u:i,r=a+u>r?a+u:r;else{o=n.points;for(var v=0;v<o.length;v+=2)s=o[v],a=o[v+1],t=s-f<t?s-f:t,e=s+f>e?s+f:e,i=a-f<i?a-f:i,r=a+f>r?a+f:r}}else t=0,e=0,i=0,r=0;var g=this.boundsPadding;this._localBounds.minX=t-g,this._localBounds.maxX=e+2*g,this._localBounds.minY=i-g,this._localBounds.maxY=r+2*g},r.prototype.drawShape=function(t){this.currentPath&&this.currentPath.shape.points.length<=2&&this.graphicsData.pop(),this.currentPath=null;var e=new h(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.filling,t);return this.graphicsData.push(e),e.type===c.SHAPES.POLY&&(e.shape.closed=e.shape.closed||this.filling,this.currentPath=e),this.dirty++,e},r.prototype.generateCanvasTexture=function(t,e){e=e||1;var i=this.getLocalBounds(),r=new s.create(i.width*e,i.height*e);n||(n=new v),g.tx=-i.x,g.ty=-i.y,n.render(this,r,!1,g);var o=a.fromCanvas(r.baseTexture._canvasRenderTarget.canvas,t);return o.baseTexture.resolution=e,o},r.prototype.closePath=function(){var t=this.currentPath;return t&&t.shape&&t.shape.close(),this},r.prototype.addHole=function(){var t=this.graphicsData.pop();return this.currentPath=this.graphicsData[this.graphicsData.length-1],this.currentPath.addHole(t.shape),this.currentPath=null,this},r.prototype.destroy=function(){o.prototype.destroy.apply(this,arguments);for(var t=0;t<this.graphicsData.length;++t)this.graphicsData[t].destroy();for(var e in this._webgl)for(var i=0;i<this._webgl[e].data.length;++i)this._webgl[e].data[i].destroy();this._spriteRect&&this._spriteRect.destroy(),this.graphicsData=null,this.currentPath=null,this._webgl=null,this._localBounds=null}},function(t,e){function i(t,e,i,r,n,o,s){this.lineWidth=t,this.lineColor=e,this.lineAlpha=i,this._lineTint=e,this.fillColor=r,this.fillAlpha=n,this._fillTint=r,this.fill=o,this.holes=[],this.shape=s,this.type=s.type}i.prototype.constructor=i,t.exports=i,i.prototype.clone=function(){return new i(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.fill,this.shape)},i.prototype.addHole=function(t){this.holes.push(t)},i.prototype.destroy=function(){this.shape=null,this.holes=null}},function(t,e){var i=function(t,e,i,r,n,o,s,a,h){h=h||[];var u,l,c,p,d,f=20;h.push(t,e);for(var v=0,g=1;g<=f;++g)v=g/f,u=1-v,l=u*u,c=l*u,p=v*v,d=p*v,h.push(c*t+3*l*v*i+3*u*p*n+d*s,c*e+3*l*v*r+3*u*p*o+d*a);return h};t.exports=i},function(t,e,i){function r(t){s.call(this,t),this.graphicsDataPool=[],this.primitiveShader=null,this.gl=t.gl,this.CONTEXT_UID=0}var n=i(23),o=i(10),s=i(58),a=i(60),h=i(103),u=i(104),l=i(105),c=i(108),p=i(109),d=i(110);r.prototype=Object.create(s.prototype),r.prototype.constructor=r,t.exports=r,a.registerPlugin("graphics",r),r.prototype.onContextChange=function(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.primitiveShader=new u(this.gl)},r.prototype.destroy=function(){s.prototype.destroy.call(this);for(var t=0;t<this.graphicsDataPool.length;++t)this.graphicsDataPool[t].destroy();this.graphicsDataPool=null},r.prototype.render=function(t){var e,i=this.renderer,r=i.gl,o=t._webGL[this.CONTEXT_UID];o&&t.dirty===o.dirty||(this.updateGraphics(t),o=t._webGL[this.CONTEXT_UID]);var s=this.primitiveShader;i.bindShader(s),i.state.setBlendMode(t.blendMode);for(var a=0,h=o.data.length;a<h;a++){e=o.data[a];var u=e.shader;i.bindShader(u),u.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),u.uniforms.tint=n.hex2rgb(t.tint),u.uniforms.alpha=t.worldAlpha,e.vao.bind().draw(r.TRIANGLE_STRIP,e.indices.length).unbind()}},r.prototype.updateGraphics=function(t){var e=this.renderer.gl,i=t._webGL[this.CONTEXT_UID];i||(i=t._webGL[this.CONTEXT_UID]={lastIndex:0,data:[],gl:e,clearDirty:-1,dirty:-1}),i.dirty=t.dirty;var r;if(t.clearDirty!==i.clearDirty){for(i.clearDirty=t.clearDirty,r=0;r<i.data.length;r++){var n=i.data[r];this.graphicsDataPool.push(n)}i.data=[],i.lastIndex=0}var s;for(r=i.lastIndex;r<t.graphicsData.length;r++){var a=t.graphicsData[r];s=this.getWebGLData(i,0),a.type===o.SHAPES.POLY&&l(a,s),a.type===o.SHAPES.RECT?c(a,s):a.type===o.SHAPES.CIRC||a.type===o.SHAPES.ELIP?d(a,s):a.type===o.SHAPES.RREC&&p(a,s),i.lastIndex++}for(r=0;r<i.data.length;r++)s=i.data[r],s.dirty&&s.upload()},r.prototype.getWebGLData=function(t,e){var i=t.data[t.data.length-1];return(!i||i.points.length>32e4)&&(i=this.graphicsDataPool.pop()||new h(this.renderer.gl,this.primitiveShader,this.renderer.state.attribsState),i.reset(e),t.data.push(i)),i.dirty=!0,i}},function(t,e,i){function r(t,e,i){this.gl=t,this.color=[0,0,0],this.points=[],this.indices=[],this.buffer=n.GLBuffer.createVertexBuffer(t),this.indexBuffer=n.GLBuffer.createIndexBuffer(t),this.dirty=!0,this.glPoints=null,this.glIndices=null,this.shader=e,this.vao=new n.VertexArrayObject(t,i).addIndex(this.indexBuffer).addAttribute(this.buffer,e.attributes.aVertexPosition,t.FLOAT,!1,24,0).addAttribute(this.buffer,e.attributes.aColor,t.FLOAT,!1,24,8);
  }var n=i(65);r.prototype.constructor=r,t.exports=r,r.prototype.reset=function(){this.points.length=0,this.indices.length=0},r.prototype.upload=function(){this.glPoints=new Float32Array(this.points),this.buffer.upload(this.glPoints),this.glIndices=new Uint16Array(this.indices),this.indexBuffer.upload(this.glIndices),this.dirty=!1},r.prototype.destroy=function(){this.color=null,this.points=null,this.indices=null,this.vao.destroy(),this.buffer.destroy(),this.indexBuffer.destroy(),this.gl=null,this.buffer=null,this.indexBuffer=null,this.glPoints=null,this.glIndices=null}},function(t,e,i){function r(t){n.call(this,t,["attribute vec2 aVertexPosition;","attribute vec4 aColor;","uniform mat3 translationMatrix;","uniform mat3 projectionMatrix;","uniform float alpha;","uniform vec3 tint;","varying vec4 vColor;","void main(void){","   gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);","   vColor = aColor * vec4(tint * alpha, alpha);","}"].join("\n"),["varying vec4 vColor;","void main(void){","   gl_FragColor = vColor;","}"].join("\n"))}var n=i(86);r.prototype=Object.create(n.prototype),r.prototype.constructor=r,t.exports=r},function(t,e,i){var r=i(106),n=i(23),o=i(107),s=function(t,e){t.points=t.shape.points.slice();var i=t.points;if(t.fill&&i.length>=6){for(var s=[],a=t.holes,h=0;h<a.length;h++){var u=a[h];s.push(i.length/2),i=i.concat(u.points)}var l=e.points,c=e.indices,p=i.length/2,d=n.hex2rgb(t.fillColor),f=t.fillAlpha,v=d[0]*f,g=d[1]*f,y=d[2]*f,x=o(i,s,2);if(!x)return;var m=l.length/6;for(h=0;h<x.length;h+=3)c.push(x[h]+m),c.push(x[h]+m),c.push(x[h+1]+m),c.push(x[h+2]+m),c.push(x[h+2]+m);for(h=0;h<p;h++)l.push(i[2*h],i[2*h+1],v,g,y,f)}t.lineWidth>0&&r(t,e)};t.exports=s},function(t,e,i){var r=i(13),n=i(23),o=function(t,e){var i=0,o=t.points;if(0!==o.length){var s=new r.Point(o[0],o[1]),a=new r.Point(o[o.length-2],o[o.length-1]);if(s.x===a.x&&s.y===a.y){o=o.slice(),o.pop(),o.pop(),a=new r.Point(o[o.length-2],o[o.length-1]);var h=a.x+.5*(s.x-a.x),u=a.y+.5*(s.y-a.y);o.unshift(h,u),o.push(h,u)}var l,c,p,d,f,v,g,y,x,m,_,T,b,E,w,S,C,A,M,R,O,D,P,I=e.points,L=e.indices,N=o.length/2,F=o.length,B=I.length/6,U=t.lineWidth/2,k=n.hex2rgb(t.lineColor),j=t.lineAlpha,X=k[0]*j,W=k[1]*j,G=k[2]*j;for(p=o[0],d=o[1],f=o[2],v=o[3],x=-(d-v),m=p-f,P=Math.sqrt(x*x+m*m),x/=P,m/=P,x*=U,m*=U,I.push(p-x,d-m,X,W,G,j),I.push(p+x,d+m,X,W,G,j),i=1;i<N-1;i++)p=o[2*(i-1)],d=o[2*(i-1)+1],f=o[2*i],v=o[2*i+1],g=o[2*(i+1)],y=o[2*(i+1)+1],x=-(d-v),m=p-f,P=Math.sqrt(x*x+m*m),x/=P,m/=P,x*=U,m*=U,_=-(v-y),T=f-g,P=Math.sqrt(_*_+T*T),_/=P,T/=P,_*=U,T*=U,w=-m+d-(-m+v),S=-x+f-(-x+p),C=(-x+p)*(-m+v)-(-x+f)*(-m+d),A=-T+y-(-T+v),M=-_+f-(-_+g),R=(-_+g)*(-T+v)-(-_+f)*(-T+y),O=w*M-A*S,Math.abs(O)<.1?(O+=10.1,I.push(f-x,v-m,X,W,G,j),I.push(f+x,v+m,X,W,G,j)):(l=(S*R-M*C)/O,c=(A*C-w*R)/O,D=(l-f)*(l-f)+(c-v)*(c-v),D>19600?(b=x-_,E=m-T,P=Math.sqrt(b*b+E*E),b/=P,E/=P,b*=U,E*=U,I.push(f-b,v-E),I.push(X,W,G,j),I.push(f+b,v+E),I.push(X,W,G,j),I.push(f-b,v-E),I.push(X,W,G,j),F++):(I.push(l,c),I.push(X,W,G,j),I.push(f-(l-f),v-(c-v)),I.push(X,W,G,j)));for(p=o[2*(N-2)],d=o[2*(N-2)+1],f=o[2*(N-1)],v=o[2*(N-1)+1],x=-(d-v),m=p-f,P=Math.sqrt(x*x+m*m),x/=P,m/=P,x*=U,m*=U,I.push(f-x,v-m),I.push(X,W,G,j),I.push(f+x,v+m),I.push(X,W,G,j),L.push(B),i=0;i<F;i++)L.push(B++);L.push(B-1)}};t.exports=o},function(t,e){"use strict";function i(t,e,i){i=i||2;var n=e&&e.length,s=n?e[0]*i:t.length,a=r(t,0,s,i,!0),h=[];if(!a)return h;var u,c,p,d,f,v,g;if(n&&(a=l(t,e,a,i)),t.length>80*i){u=p=t[0],c=d=t[1];for(var y=i;y<s;y+=i)f=t[y],v=t[y+1],f<u&&(u=f),v<c&&(c=v),f>p&&(p=f),v>d&&(d=v);g=Math.max(p-u,d-c)}return o(a,h,i,u,c,g),h}function r(t,e,i,r,n){var o,s;if(n===O(t,e,i,r)>0)for(o=e;o<i;o+=r)s=A(o,t[o],t[o+1],s);else for(o=i-r;o>=e;o-=r)s=A(o,t[o],t[o+1],s);return s&&T(s,s.next)&&(M(s),s=s.next),s}function n(t,e){if(!t)return t;e||(e=t);var i,r=t;do if(i=!1,r.steiner||!T(r,r.next)&&0!==_(r.prev,r,r.next))r=r.next;else{if(M(r),r=e=r.prev,r===r.next)return null;i=!0}while(i||r!==e);return e}function o(t,e,i,r,l,c,p){if(t){!p&&c&&f(t,r,l,c);for(var d,v,g=t;t.prev!==t.next;)if(d=t.prev,v=t.next,c?a(t,r,l,c):s(t))e.push(d.i/i),e.push(t.i/i),e.push(v.i/i),M(t),t=v.next,g=v.next;else if(t=v,t===g){p?1===p?(t=h(t,e,i),o(t,e,i,r,l,c,2)):2===p&&u(t,e,i,r,l,c):o(n(t),e,i,r,l,c,1);break}}}function s(t){var e=t.prev,i=t,r=t.next;if(_(e,i,r)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(x(e.x,e.y,i.x,i.y,r.x,r.y,n.x,n.y)&&_(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function a(t,e,i,r){var n=t.prev,o=t,s=t.next;if(_(n,o,s)>=0)return!1;for(var a=n.x<o.x?n.x<s.x?n.x:s.x:o.x<s.x?o.x:s.x,h=n.y<o.y?n.y<s.y?n.y:s.y:o.y<s.y?o.y:s.y,u=n.x>o.x?n.x>s.x?n.x:s.x:o.x>s.x?o.x:s.x,l=n.y>o.y?n.y>s.y?n.y:s.y:o.y>s.y?o.y:s.y,c=g(a,h,e,i,r),p=g(u,l,e,i,r),d=t.nextZ;d&&d.z<=p;){if(d!==t.prev&&d!==t.next&&x(n.x,n.y,o.x,o.y,s.x,s.y,d.x,d.y)&&_(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=c;){if(d!==t.prev&&d!==t.next&&x(n.x,n.y,o.x,o.y,s.x,s.y,d.x,d.y)&&_(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function h(t,e,i){var r=t;do{var n=r.prev,o=r.next.next;!T(n,o)&&b(n,r,r.next,o)&&w(n,o)&&w(o,n)&&(e.push(n.i/i),e.push(r.i/i),e.push(o.i/i),M(r),M(r.next),r=t=o),r=r.next}while(r!==t);return r}function u(t,e,i,r,s,a){var h=t;do{for(var u=h.next.next;u!==h.prev;){if(h.i!==u.i&&m(h,u)){var l=C(h,u);return h=n(h,h.next),l=n(l,l.next),o(h,e,i,r,s,a),void o(l,e,i,r,s,a)}u=u.next}h=h.next}while(h!==t)}function l(t,e,i,o){var s,a,h,u,l,d=[];for(s=0,a=e.length;s<a;s++)h=e[s]*o,u=s<a-1?e[s+1]*o:t.length,l=r(t,h,u,o,!1),l===l.next&&(l.steiner=!0),d.push(y(l));for(d.sort(c),s=0;s<d.length;s++)p(d[s],i),i=n(i,i.next);return i}function c(t,e){return t.x-e.x}function p(t,e){if(e=d(t,e)){var i=C(e,t);n(i,i.next)}}function d(t,e){var i,r=e,n=t.x,o=t.y,s=-(1/0);do{if(o<=r.y&&o>=r.next.y){var a=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=n&&a>s){if(s=a,a===n){if(o===r.y)return r;if(o===r.next.y)return r.next}i=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!i)return null;if(n===s)return i.prev;var h,u=i,l=i.x,c=i.y,p=1/0;for(r=i.next;r!==u;)n>=r.x&&r.x>=l&&x(o<c?n:s,o,l,c,o<c?s:n,o,r.x,r.y)&&(h=Math.abs(o-r.y)/(n-r.x),(h<p||h===p&&r.x>i.x)&&w(r,t)&&(i=r,p=h)),r=r.next;return i}function f(t,e,i,r){var n=t;do null===n.z&&(n.z=g(n.x,n.y,e,i,r)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,v(n)}function v(t){var e,i,r,n,o,s,a,h,u=1;do{for(i=t,t=null,o=null,s=0;i;){for(s++,r=i,a=0,e=0;e<u&&(a++,r=r.nextZ,r);e++);for(h=u;a>0||h>0&&r;)0===a?(n=r,r=r.nextZ,h--):0!==h&&r?i.z<=r.z?(n=i,i=i.nextZ,a--):(n=r,r=r.nextZ,h--):(n=i,i=i.nextZ,a--),o?o.nextZ=n:t=n,n.prevZ=o,o=n;i=r}o.nextZ=null,u*=2}while(s>1);return t}function g(t,e,i,r,n){return t=32767*(t-i)/n,e=32767*(e-r)/n,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1}function y(t){var e=t,i=t;do e.x<i.x&&(i=e),e=e.next;while(e!==t);return i}function x(t,e,i,r,n,o,s,a){return(n-s)*(e-a)-(t-s)*(o-a)>=0&&(t-s)*(r-a)-(i-s)*(e-a)>=0&&(i-s)*(o-a)-(n-s)*(r-a)>=0}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!E(t,e)&&w(t,e)&&w(e,t)&&S(t,e)}function _(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function T(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,i,r){return!!(T(t,e)&&T(i,r)||T(t,r)&&T(i,e))||_(t,e,i)>0!=_(t,e,r)>0&&_(i,r,t)>0!=_(i,r,e)>0}function E(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&b(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}function w(t,e){return _(t.prev,t,t.next)<0?_(t,e,t.next)>=0&&_(t,t.prev,e)>=0:_(t,e,t.prev)<0||_(t,t.next,e)<0}function S(t,e){var i=t,r=!1,n=(t.x+e.x)/2,o=(t.y+e.y)/2;do i.y>o!=i.next.y>o&&n<(i.next.x-i.x)*(o-i.y)/(i.next.y-i.y)+i.x&&(r=!r),i=i.next;while(i!==t);return r}function C(t,e){var i=new R(t.i,t.x,t.y),r=new R(e.i,e.x,e.y),n=t.next,o=e.prev;return t.next=e,e.prev=t,i.next=n,n.prev=i,r.next=i,i.prev=r,o.next=r,r.prev=o,r}function A(t,e,i,r){var n=new R(t,e,i);return r?(n.next=r.next,n.prev=r,r.next.prev=n,r.next=n):(n.prev=n,n.next=n),n}function M(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function R(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function O(t,e,i,r){for(var n=0,o=e,s=i-r;o<i;o+=r)n+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return n}t.exports=i,i.deviation=function(t,e,i,r){var n=e&&e.length,o=n?e[0]*i:t.length,s=Math.abs(O(t,0,o,i));if(n)for(var a=0,h=e.length;a<h;a++){var u=e[a]*i,l=a<h-1?e[a+1]*i:t.length;s-=Math.abs(O(t,u,l,i))}var c=0;for(a=0;a<r.length;a+=3){var p=r[a]*i,d=r[a+1]*i,f=r[a+2]*i;c+=Math.abs((t[p]-t[f])*(t[d+1]-t[p+1])-(t[p]-t[d])*(t[f+1]-t[p+1]))}return 0===s&&0===c?0:Math.abs((c-s)/s)},i.flatten=function(t){for(var e=t[0][0].length,i={vertices:[],holes:[],dimensions:e},r=0,n=0;n<t.length;n++){for(var o=0;o<t[n].length;o++)for(var s=0;s<e;s++)i.vertices.push(t[n][o][s]);n>0&&(r+=t[n-1].length,i.holes.push(r))}return i}},function(t,e,i){var r=i(106),n=i(23),o=function(t,e){var i=t.shape,o=i.x,s=i.y,a=i.width,h=i.height;if(t.fill){var u=n.hex2rgb(t.fillColor),l=t.fillAlpha,c=u[0]*l,p=u[1]*l,d=u[2]*l,f=e.points,v=e.indices,g=f.length/6;f.push(o,s),f.push(c,p,d,l),f.push(o+a,s),f.push(c,p,d,l),f.push(o,s+h),f.push(c,p,d,l),f.push(o+a,s+h),f.push(c,p,d,l),v.push(g,g,g+1,g+2,g+3,g+3)}if(t.lineWidth){var y=t.points;t.points=[o,s,o+a,s,o+a,s+h,o,s+h,o,s],r(t,e),t.points=y}};t.exports=o},function(t,e,i){var r=i(107),n=i(106),o=i(23),s=function(t,e){var i=t.shape,s=i.x,h=i.y,u=i.width,l=i.height,c=i.radius,p=[];if(p.push(s,h+c),a(s,h+l-c,s,h+l,s+c,h+l,p),a(s+u-c,h+l,s+u,h+l,s+u,h+l-c,p),a(s+u,h+c,s+u,h,s+u-c,h,p),a(s+c,h,s,h,s,h+c+1e-10,p),t.fill){var d=o.hex2rgb(t.fillColor),f=t.fillAlpha,v=d[0]*f,g=d[1]*f,y=d[2]*f,x=e.points,m=e.indices,_=x.length/6,T=r(p,null,2),b=0;for(b=0;b<T.length;b+=3)m.push(T[b]+_),m.push(T[b]+_),m.push(T[b+1]+_),m.push(T[b+2]+_),m.push(T[b+2]+_);for(b=0;b<p.length;b++)x.push(p[b],p[++b],v,g,y,f)}if(t.lineWidth){var E=t.points;t.points=p,n(t,e),t.points=E}},a=function(t,e,i,r,n,o,s){function a(t,e,i){var r=e-t;return t+r*i}for(var h,u,l,c,p,d,f=20,v=s||[],g=0,y=0;y<=f;y++)g=y/f,h=a(t,i,g),u=a(e,r,g),l=a(i,n,g),c=a(r,o,g),p=a(h,l,g),d=a(u,c,g),v.push(p,d);return v};t.exports=s},function(t,e,i){var r=i(106),n=i(10),o=i(23),s=function(t,e){var i,s,a=t.shape,h=a.x,u=a.y;t.type===n.SHAPES.CIRC?(i=a.radius,s=a.radius):(i=a.width,s=a.height);var l=Math.floor(30*Math.sqrt(a.radius))||Math.floor(15*Math.sqrt(a.width+a.height)),c=2*Math.PI/l,p=0;if(t.fill){var d=o.hex2rgb(t.fillColor),f=t.fillAlpha,v=d[0]*f,g=d[1]*f,y=d[2]*f,x=e.points,m=e.indices,_=x.length/6;for(m.push(_),p=0;p<l+1;p++)x.push(h,u,v,g,y,f),x.push(h+Math.sin(c*p)*i,u+Math.cos(c*p)*s,v,g,y,f),m.push(_++,_++);m.push(_-1)}if(t.lineWidth){var T=t.points;for(t.points=[],p=0;p<l+1;p++)t.points.push(h+Math.sin(c*p)*i,u+Math.cos(c*p)*s);r(t,e),t.points=T}};t.exports=s},function(t,e,i){function r(t){this.renderer=t}var n=i(48),o=i(10);r.prototype.constructor=r,t.exports=r,n.registerPlugin("graphics",r),r.prototype.render=function(t){var e=this.renderer,i=e.context,r=t.worldAlpha,n=t.transform.worldTransform,s=e.resolution;this._prevTint!==this.tint&&(this.dirty=!0),i.setTransform(n.a*s,n.b*s,n.c*s,n.d*s,n.tx*s,n.ty*s),t.dirty&&(this.updateGraphicsTint(t),t.dirty=!1),e.setBlendMode(t.blendMode);for(var a=0;a<t.graphicsData.length;a++){var h=t.graphicsData[a],u=h.shape,l=h._fillTint,c=h._lineTint;if(i.lineWidth=h.lineWidth,h.type===o.SHAPES.POLY){i.beginPath(),this.renderPolygon(u.points,u.closed,i);for(var p=0;p<h.holes.length;p++){var d=h.holes[p];this.renderPolygon(d.points,!0,i)}h.fill&&(i.globalAlpha=h.fillAlpha*r,i.fillStyle="#"+("00000"+(0|l).toString(16)).substr(-6),i.fill()),h.lineWidth&&(i.globalAlpha=h.lineAlpha*r,i.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),i.stroke())}else if(h.type===o.SHAPES.RECT)(h.fillColor||0===h.fillColor)&&(i.globalAlpha=h.fillAlpha*r,i.fillStyle="#"+("00000"+(0|l).toString(16)).substr(-6),i.fillRect(u.x,u.y,u.width,u.height)),h.lineWidth&&(i.globalAlpha=h.lineAlpha*r,i.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),i.strokeRect(u.x,u.y,u.width,u.height));else if(h.type===o.SHAPES.CIRC)i.beginPath(),i.arc(u.x,u.y,u.radius,0,2*Math.PI),i.closePath(),h.fill&&(i.globalAlpha=h.fillAlpha*r,i.fillStyle="#"+("00000"+(0|l).toString(16)).substr(-6),i.fill()),h.lineWidth&&(i.globalAlpha=h.lineAlpha*r,i.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),i.stroke());else if(h.type===o.SHAPES.ELIP){var f=2*u.width,v=2*u.height,g=u.x-f/2,y=u.y-v/2;i.beginPath();var x=.5522848,m=f/2*x,_=v/2*x,T=g+f,b=y+v,E=g+f/2,w=y+v/2;i.moveTo(g,w),i.bezierCurveTo(g,w-_,E-m,y,E,y),i.bezierCurveTo(E+m,y,T,w-_,T,w),i.bezierCurveTo(T,w+_,E+m,b,E,b),i.bezierCurveTo(E-m,b,g,w+_,g,w),i.closePath(),h.fill&&(i.globalAlpha=h.fillAlpha*r,i.fillStyle="#"+("00000"+(0|l).toString(16)).substr(-6),i.fill()),h.lineWidth&&(i.globalAlpha=h.lineAlpha*r,i.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),i.stroke())}else if(h.type===o.SHAPES.RREC){var S=u.x,C=u.y,A=u.width,M=u.height,R=u.radius,O=Math.min(A,M)/2|0;R=R>O?O:R,i.beginPath(),i.moveTo(S,C+R),i.lineTo(S,C+M-R),i.quadraticCurveTo(S,C+M,S+R,C+M),i.lineTo(S+A-R,C+M),i.quadraticCurveTo(S+A,C+M,S+A,C+M-R),i.lineTo(S+A,C+R),i.quadraticCurveTo(S+A,C,S+A-R,C),i.lineTo(S+R,C),i.quadraticCurveTo(S,C,S,C+R),i.closePath(),(h.fillColor||0===h.fillColor)&&(i.globalAlpha=h.fillAlpha*r,i.fillStyle="#"+("00000"+(0|l).toString(16)).substr(-6),i.fill()),h.lineWidth&&(i.globalAlpha=h.lineAlpha*r,i.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),i.stroke())}}},r.prototype.updateGraphicsTint=function(t){t._prevTint=t.tint;for(var e=(t.tint>>16&255)/255,i=(t.tint>>8&255)/255,r=(255&t.tint)/255,n=0;n<t.graphicsData.length;n++){var o=t.graphicsData[n],s=0|o.fillColor,a=0|o.lineColor;o._fillTint=((s>>16&255)/255*e*255<<16)+((s>>8&255)/255*i*255<<8)+(255&s)/255*r*255,o._lineTint=((a>>16&255)/255*e*255<<16)+((a>>8&255)/255*i*255<<8)+(255&a)/255*r*255}},r.prototype.renderPolygon=function(t,e,i){i.moveTo(t[0],t[1]);for(var r=1;r<t.length/2;r++)i.lineTo(t[2*r],t[2*r+1]);e&&i.closePath()},r.prototype.destroy=function(){this.renderer=null}},function(t,e,i){i(113),i(114),i(115),t.exports={MovieClip:i(116),TilingSprite:i(117),BitmapText:i(119)}},function(t,e,i){var r=i(9),n=r.DisplayObject,o=new r.Matrix;n.prototype._cacheAsBitmap=!1,n.prototype._cacheData=!1;var s=function(){this.originalRenderWebGL=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalHitTest=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.sprite=null};Object.defineProperties(n.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){if(this._cacheAsBitmap!==t){this._cacheAsBitmap=t;var e;t?(this._cacheData||(this._cacheData=new s),e=this._cacheData,e.originalRenderWebGL=this.renderWebGL,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this._calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.renderWebGL=this._renderCachedWebGL,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):(e=this._cacheData,e.sprite&&this._destroyCachedDisplayObject(),this.renderWebGL=e.originalRenderWebGL,this.renderCanvas=e.originalRenderCanvas,this._calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea)}}}}),n.prototype._renderCachedWebGL=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite._transformID=-1,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderWebGL(t))},n.prototype._initCachedDisplayObject=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.alpha;this.alpha=1,t.currentRenderer.flush();var i=this.getLocalBounds().clone();if(this._filters){var n=this._filters[0].padding;i.pad(n)}var s=t._activeRenderTarget,a=t.filterManager.filterStack,h=r.RenderTexture.create(0|i.width,0|i.height),u=o;u.tx=-i.x,u.ty=-i.y,this.transform.worldTransform.identity(),this.renderWebGL=this._cacheData.originalRenderWebGL,t.render(this,h,!0,u,!0),t.bindRenderTarget(s),t.filterManager.filterStack=a,this.renderWebGL=this._renderCachedWebGL,this.updateTransform=this.displayObjectUpdateTransform,this._mask=null,this.filterArea=null;var l=new r.Sprite(h);l.transform.worldTransform=this.transform.worldTransform,l.anchor.x=-(i.x/i.width),l.anchor.y=-(i.y/i.height),l.alpha=e,l._bounds=this._bounds,this._calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._cacheData.sprite=l,this.transform._parentID=-1,this.updateTransform(),this.containsPoint=l.containsPoint.bind(l)}},n.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite.renderCanvas(t))},n.prototype._initCachedDisplayObjectCanvas=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.getLocalBounds(),i=this.alpha;this.alpha=1;var n=t.context,s=new r.RenderTexture.create(0|e.width,0|e.height),a=o;this.transform.worldTransform.copy(a),a.invert(),a.tx-=e.x,a.ty-=e.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,s,!0,a,!1),t.context=n,this.renderCanvas=this._renderCachedCanvas,this._calculateBounds=this._calculateCachedBounds,this._mask=null,this.filterArea=null;var h=new r.Sprite(s);h.transform.worldTransform=this.transform.worldTransform,h.anchor.x=-(e.x/e.width),h.anchor.y=-(e.y/e.height),h._bounds=this._bounds,h.alpha=i,this.updateTransform(),this.updateTransform=this.displayObjectUpdateTransform,this._cacheData.sprite=h,this.containsPoint=h.containsPoint.bind(h)}},n.prototype._calculateCachedBounds=function(){return this._cacheData.sprite._calculateBounds()},n.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds()},n.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null},n.prototype._cacheAsBitmapDestroy=function(){this.cacheAsBitmap=!1,this.destroy()}},function(t,e,i){var r=i(9);r.DisplayObject.prototype.name=null,r.Container.prototype.getChildByName=function(t){for(var e=0;e<this.children.length;e++)if(this.children[e].name===t)return this.children[e];return null}},function(t,e,i){var r=i(9);r.DisplayObject.prototype.getGlobalPosition=function(t){return t=t||new r.Point,this.parent?(this.displayObjectUpdateTransform(),t.x=this.worldTransform.tx,t.y=this.worldTransform.ty):(t.x=this.position.x,t.y=this.position.y),t}},function(t,e,i){function r(t){n.Sprite.call(this,t[0]instanceof n.Texture?t[0]:t[0].texture),this._textures=null,this._durations=null,this.textures=t,this.animationSpeed=1,this.loop=!0,this.onComplete=null,this._currentTime=0,this.playing=!1}var n=i(9);r.prototype=Object.create(n.Sprite.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{totalFrames:{get:function(){return this._textures.length}},textures:{get:function(){return this._textures},set:function(t){if(t[0]instanceof n.Texture)this._textures=t,this._durations=null;else{this._textures=[],this._durations=[];for(var e=0;e<t.length;e++)this._textures.push(t[e].texture),this._durations.push(t[e].time)}}},currentFrame:{get:function(){var t=Math.floor(this._currentTime)%this._textures.length;return t<0&&(t+=this._textures.length),t}}}),r.prototype.stop=function(){this.playing&&(this.playing=!1,n.ticker.shared.remove(this.update,this))},r.prototype.play=function(){this.playing||(this.playing=!0,n.ticker.shared.add(this.update,this))},r.prototype.gotoAndStop=function(t){this.stop(),this._currentTime=t,this._texture=this._textures[this.currentFrame],this._textureID=-1},r.prototype.gotoAndPlay=function(t){this._currentTime=t,this.play()},r.prototype.update=function(t){var e=this.animationSpeed*t;if(null!==this._durations){var i=this._currentTime%1*this._durations[this.currentFrame];for(i+=e/60*1e3;i<0;)this._currentTime--,i+=this._durations[this.currentFrame];var r=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);i>=this._durations[this.currentFrame];)i-=this._durations[this.currentFrame]*r,this._currentTime+=r;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()):(this._texture=this._textures[this.currentFrame],this._textureID=-1)},r.prototype.destroy=function(){this.stop(),n.Sprite.prototype.destroy.call(this)},r.fromFrames=function(t){for(var e=[],i=0;i<t.length;++i)e.push(n.Texture.fromFrame(t[i]));return new r(e)},r.fromImages=function(t){for(var e=[],i=0;i<t.length;++i)e.push(n.Texture.fromImage(t[i]));return new r(e)}},function(t,e,i){function r(t,e,i){n.Sprite.call(this,t),this.tileScale=new n.Point(1,1),this.tilePosition=new n.Point(0,0),this._width=e||100,this._height=i||100,this._uvs=new n.TextureUvs,this._canvasPattern=null,this._glDatas=[]}var n=i(9),o=new n.Point,s=i(35),a=i(56),h=i(118),u=new Float32Array(4);r.prototype=Object.create(n.Sprite.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{width:{get:function(){return this._width},set:function(t){this._width=t}},height:{get:function(){return this._height},set:function(t){this._height=t}}}),r.prototype._onTextureUpdate=function(){},r.prototype._renderWebGL=function(t){var e=this._texture;if(e&&e._uvs){t.flush();var i=t.gl,r=this._glDatas[t.CONTEXT_UID];r||(r={shader:new h(i),quad:new n.Quad(i)},this._glDatas[t.CONTEXT_UID]=r,r.quad.initVao(r.shader));var o=r.quad.vertices;o[0]=o[6]=this._width*-this.anchor.x,o[1]=o[3]=this._height*-this.anchor.y,o[2]=o[4]=this._width*(1-this.anchor.x),o[5]=o[7]=this._height*(1-this.anchor.y),r.quad.upload(),t.bindShader(r.shader);var s=e._uvs,a=e._frame.width,l=e._frame.height,c=e.baseTexture.width,p=e.baseTexture.height,d=r.shader.uniforms.uPixelSize;d[0]=1/c,d[1]=1/p,r.shader.uniforms.uPixelSize=d;var f=r.shader.uniforms.uFrame;f[0]=s.x0,f[1]=s.y0,f[2]=s.x1-s.x0,f[3]=s.y2-s.y0,r.shader.uniforms.uFrame=f;var v=r.shader.uniforms.uTransform;v[0]=this.tilePosition.x%(a*this.tileScale.x)/this._width,v[1]=this.tilePosition.y%(l*this.tileScale.y)/this._height,v[2]=c/this._width*this.tileScale.x,v[3]=p/this._height*this.tileScale.y,r.shader.uniforms.uTransform=v,r.shader.uniforms.translationMatrix=this.worldTransform.toArray(!0);var g=u;n.utils.hex2rgb(this.tint,g),g[3]=this.worldAlpha,r.shader.uniforms.uColor=g,t.bindTexture(this._texture,0),t.state.setBlendMode(this.blendMode),r.quad.draw()}},r.prototype._renderCanvas=function(t){var e=this._texture;if(e.baseTexture.hasLoaded){var i=t.context,r=this.worldTransform,o=t.resolution,s=e.baseTexture,h=this.tilePosition.x/this.tileScale.x%e._frame.width,u=this.tilePosition.y/this.tileScale.y%e._frame.height;if(!this._canvasPattern){var l=new n.CanvasRenderTarget(e._frame.width,e._frame.height);16777215!==this.tint?(this.cachedTint!==this.tint&&(this.cachedTint=this.tint,this.tintedTexture=a.getTintedTexture(this,this.tint)),l.context.drawImage(this.tintedTexture,0,0)):l.context.drawImage(s.source,-e._frame.x,-e._frame.y),this._canvasPattern=l.context.createPattern(l.canvas,"repeat")}i.globalAlpha=this.worldAlpha,i.setTransform(r.a*o,r.b*o,r.c*o,r.d*o,r.tx*o,r.ty*o),i.scale(this.tileScale.x,this.tileScale.y),i.translate(h+this.anchor.x*-this._width,u+this.anchor.y*-this._height);var c=t.blendModes[this.blendMode];c!==t.context.globalCompositeOperation&&(i.globalCompositeOperation=c),i.fillStyle=this._canvasPattern,i.fillRect(-h,-u,this._width/this.tileScale.x,this._height/this.tileScale.y)}},r.prototype.getBounds=function(){var t,e,i,r,n=this._width,o=this._height,s=n*(1-this.anchor.x),a=n*-this.anchor.x,h=o*(1-this.anchor.y),u=o*-this.anchor.y,l=this.worldTransform,c=l.a,p=l.b,d=l.c,f=l.d,v=l.tx,g=l.ty,y=c*a+d*u+v,x=f*u+p*a+g,m=c*s+d*u+v,_=f*u+p*s+g,T=c*s+d*h+v,b=f*h+p*s+g,E=c*a+d*h+v,w=f*h+p*a+g;t=y,t=m<t?m:t,t=T<t?T:t,t=E<t?E:t,i=x,i=_<i?_:i,i=b<i?b:i,i=w<i?w:i,e=y,e=m>e?m:e,e=T>e?T:e,e=E>e?E:e,r=x,r=_>r?_:r,r=b>r?b:r,r=w>r?w:r;var S=this._bounds;return S.x=t,S.width=e-t,S.y=i,S.height=r-i,this._currentBounds=S,S},r.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,o);var e,i=this._width,r=this._height,n=-i*this.anchor.x;return o.x>n&&o.x<n+i&&(e=-r*this.anchor.y,o.y>e&&o.y<e+r)},r.prototype.destroy=function(){n.Sprite.prototype.destroy.call(this),this.tileScale=null,this._tileScaleOffset=null,this.tilePosition=null,this._uvs=null},r.from=function(t,e,i){return new r(s.from(t),e,i)},r.fromFrame=function(t,e,i){var o=n.utils.TextureCache[t];if(!o)throw new Error('The frameId "'+t+'" does not exist in the texture cache '+this);return new r(o,e,i)},r.fromImage=function(t,e,i,o,s){return new r(n.Texture.fromImage(t,o,s),e,i)}},function(t,e,i){function r(t){n.call(this,t,"#define GLSLIFY 1\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\n\nuniform vec4 uFrame;\nuniform vec4 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vec2 coord = aTextureCoord;\n    coord -= uTransform.xy;\n    coord /= uTransform.zw;\n    vTextureCoord = coord;\n}\n","#define GLSLIFY 1\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform vec4 uFrame;\nuniform vec2 uPixelSize;\n\nvoid main(void)\n{\n\n   \tvec2 coord = mod(vTextureCoord, uFrame.zw);\n   \tcoord = clamp(coord, uPixelSize, uFrame.zw - uPixelSize);\n   \tcoord += uFrame.xy;\n\n   \tvec4 sample = texture2D(uSampler, coord);\n  \tvec4 color = vec4(uColor.rgb * uColor.a, uColor.a);\n\n   \tgl_FragColor = sample * color ;\n}\n")}var n=i(86);r.prototype=Object.create(n.prototype),r.prototype.constructor=r,t.exports=r},function(t,e,i){function r(t,e){n.Container.call(this),e=e||{},this.textWidth=0,this.textHeight=0,this._glyphs=[],this._font={tint:void 0!==e.tint?e.tint:16777215,align:e.align||"left",name:null,size:0},this.font=e.font,this._text=t,this.maxWidth=0,this.maxLineHeight=0,this._anchor=new o(this.makeDirty,this,0,0),this.dirty=!1,this.updateText()}var n=i(9),o=i(15);r.prototype=Object.create(n.Container.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{tint:{get:function(){return this._font.tint},set:function(t){this._font.tint="number"==typeof t&&t>=0?t:16777215,this.dirty=!0}},align:{get:function(){return this._font.align},set:function(t){this._font.align=t||"left",this.dirty=!0}},anchor:{get:function(){return this._anchor},set:function(t){"number"==typeof t?this._anchor.set(t):this._anchor.copy(t)}},font:{get:function(){return this._font},set:function(t){t&&("string"==typeof t?(t=t.split(" "),this._font.name=1===t.length?t[0]:t.slice(1).join(" "),this._font.size=t.length>=2?parseInt(t[0],10):r.fonts[this._font.name].size):(this._font.name=t.name,this._font.size="number"==typeof t.size?t.size:parseInt(t.size,10)),this.dirty=!0)}},text:{get:function(){return this._text},set:function(t){t=t.toString()||" ",this._text!==t&&(this._text=t,this.dirty=!0)}}}),r.prototype.updateText=function(){for(var t=r.fonts[this._font.name],e=new n.Point,i=null,o=[],s=0,a=0,h=[],u=0,l=this._font.size/t.size,c=-1,p=0,d=0,f=0;f<this.text.length;f++){var v=this.text.charCodeAt(f);if(/(\s)/.test(this.text.charAt(f))&&(c=f,p=s),/(?:\r\n|\r|\n)/.test(this.text.charAt(f)))h.push(s),a=Math.max(a,s),u++,e.x=0,e.y+=t.lineHeight,i=null;else if(c!==-1&&this.maxWidth>0&&e.x*l>this.maxWidth)n.utils.removeItems(o,c,f-c),f=c,c=-1,h.push(p),a=Math.max(a,p),u++,e.x=0,e.y+=t.lineHeight,i=null;else{var g=t.chars[v];g&&(i&&g.kerning[i]&&(e.x+=g.kerning[i]),o.push({texture:g.texture,line:u,charCode:v,position:new n.Point(e.x+g.xOffset,e.y+g.yOffset)}),s=e.x+(g.texture.width+g.xOffset),e.x+=g.xAdvance,d=Math.max(d,g.yOffset+g.texture.height),i=v)}}h.push(s),a=Math.max(a,s);var y=[];for(f=0;f<=u;f++){var x=0;"right"===this._font.align?x=a-h[f]:"center"===this._font.align&&(x=(a-h[f])/2),y.push(x)}var m=o.length,_=this.tint;for(f=0;f<m;f++){var T=this._glyphs[f];T?T.texture=o[f].texture:(T=new n.Sprite(o[f].texture),this._glyphs.push(T)),T.position.x=(o[f].position.x+y[o[f].line])*l,T.position.y=o[f].position.y*l,T.scale.x=T.scale.y=l,T.tint=_,T.parent||this.addChild(T)}for(f=m;f<this._glyphs.length;++f)this.removeChild(this._glyphs[f]);if(this.textWidth=a*l,this.textHeight=(e.y+t.lineHeight)*l,0!==this.anchor.x||0!==this.anchor.y)for(f=0;f<m;f++)this._glyphs[f].x-=this.textWidth*this.anchor.x,this._glyphs[f].y-=this.textHeight*this.anchor.y;this.maxLineHeight=d*l},r.prototype.updateTransform=function(){this.validate(),this.containerUpdateTransform()},r.prototype.getLocalBounds=function(){return this.validate(),n.Container.prototype.getLocalBounds.call(this)},r.prototype.validate=function(){this.dirty&&(this.updateText(),this.dirty=!1)},r.prototype.makeDirty=function(){this.dirty=!0},r.fonts={}},function(t,e,i){t.exports={FXAAFilter:i(121),NoiseFilter:i(122),DisplacementFilter:i(123),BlurFilter:i(124),BlurXFilter:i(125),BlurYFilter:i(129),ColorMatrixFilter:i(130),VoidFilter:i(131)}},function(t,e,i){function r(){n.Filter.call(this,"#define GLSLIFY 1\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nuniform vec4 filterArea;\n\nvarying vec2 vTextureCoord;\n\nvec2 mapCoord( vec2 coord )\n{\n    coord *= filterArea.xy;\n    coord += filterArea.zw;\n\n    return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n    coord -= filterArea.zw;\n    coord /= filterArea.xy;\n\n    return coord;\n}\n\nvoid texcoords(vec2 fragCoord, vec2 resolution,\n               out vec2 v_rgbNW, out vec2 v_rgbNE,\n               out vec2 v_rgbSW, out vec2 v_rgbSE,\n               out vec2 v_rgbM) {\n    vec2 inverseVP = 1.0 / resolution.xy;\n    v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n    v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n    v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n    v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n    v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n   gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n   vTextureCoord = aTextureCoord;\n\n   vec2 fragCoord = vTextureCoord * filterArea.xy;\n\n   texcoords(fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}",'#define GLSLIFY 1\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it\'s\n unsupported by WebGL.\n \n --\n \n From:\n https://github.com/mitsuhiko/webgl-meincraft\n \n Copyright (c) 2011 by Armin Ronacher.\n \n Some rights reserved.\n \n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n \n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n \n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n \n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n \n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN   (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL   (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX     8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 resolution,\n          vec2 v_rgbNW, vec2 v_rgbNE,\n          vec2 v_rgbSW, vec2 v_rgbSE,\n          vec2 v_rgbM) {\n    vec4 color;\n    mediump vec2 inverseVP = vec2(1.0 / resolution.x, 1.0 / resolution.y);\n    vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n    vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n    vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n    vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n    vec4 texColor = texture2D(tex, v_rgbM);\n    vec3 rgbM  = texColor.xyz;\n    vec3 luma = vec3(0.299, 0.587, 0.114);\n    float lumaNW = dot(rgbNW, luma);\n    float lumaNE = dot(rgbNE, luma);\n    float lumaSW = dot(rgbSW, luma);\n    float lumaSE = dot(rgbSE, luma);\n    float lumaM  = dot(rgbM,  luma);\n    float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n    float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n    \n    mediump vec2 dir;\n    dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n    dir.y =  ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n    \n    float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n                          (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n    \n    float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n    dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n              max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n                  dir * rcpDirMin)) * inverseVP;\n    \n    vec3 rgbA = 0.5 * (\n                       texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n                       texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n    vec3 rgbB = rgbA * 0.5 + 0.25 * (\n                                     texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n                                     texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\n    \n    float lumaB = dot(rgbB, luma);\n    if ((lumaB < lumaMin) || (lumaB > lumaMax))\n        color = vec4(rgbA, texColor.a);\n    else\n        color = vec4(rgbB, texColor.a);\n    return color;\n}\n\nvoid main() {\n\n  \tvec2 fragCoord = vTextureCoord * filterArea.xy;\n\n  \tvec4 color;\n\n    color = fxaa(uSampler, fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n  \tgl_FragColor = color;\n}\n');
  }var n=i(9);r.prototype=Object.create(n.Filter.prototype),r.prototype.constructor=r,t.exports=r},function(t,e,i){function r(){n.Filter.call(this,"#define GLSLIFY 1\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n    vTextureCoord = aTextureCoord;\n}","precision highp float;\n#define GLSLIFY 1\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float noise;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n    return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n    vec4 color = texture2D(uSampler, vTextureCoord);\n\n    float diff = (rand(gl_FragCoord.xy) - 0.5) * noise;\n\n    color.r += diff;\n    color.g += diff;\n    color.b += diff;\n\n    gl_FragColor = color;\n}\n"),this.noise=.5}var n=i(9);r.prototype=Object.create(n.Filter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{noise:{get:function(){return this.uniforms.noise},set:function(t){this.uniforms.noise=t}}})},function(t,e,i){function r(t,e){var i=new n.Matrix;t.renderable=!1,n.Filter.call(this,"#define GLSLIFY 1\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nvoid main(void)\n{\n   gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n   vFilterCoord = ( filterMatrix * vec3( aTextureCoord, 1.0)  ).xy;\n   vTextureCoord = aTextureCoord;\n}","#define GLSLIFY 1\nvarying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\n\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform vec4 filterClamp;\n\nvoid main(void)\n{\n   vec4 map =  texture2D(mapSampler, vFilterCoord);\n\n   map -= 0.5;\n   map.xy *= scale;\n\n   gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), filterClamp.xy, filterClamp.zw));\n}\n"),this.maskSprite=t,this.maskMatrix=i,this.uniforms.mapSampler=t.texture,this.uniforms.filterMatrix=i.toArray(!0),this.uniforms.scale={x:1,y:1},null!==e&&void 0!==e||(e=20),this.scale=new n.Point(e,e)}var n=i(9);r.prototype=Object.create(n.Filter.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.apply=function(t,e,i){var r=1/i.destinationFrame.width*(i.size.width/e.size.width);this.uniforms.filterMatrix=t.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x*r,this.uniforms.scale.y=this.scale.y*r,t.applyFilter(this,e,i)},Object.defineProperties(r.prototype,{map:{get:function(){return this.uniforms.mapSampler},set:function(t){this.uniforms.mapSampler=t}}})},function(t,e,i){function r(t,e,i){n.Filter.call(this),this.blurXFilter=new o,this.blurYFilter=new s,this.resolution=1,this.padding=0,this.resolution=i||1,this.quality=e||4,this.blur=t||8}var n=i(9),o=i(125),s=i(129);r.prototype=Object.create(n.Filter.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.apply=function(t,e,i){var r=t.getRenderTarget(!0);this.blurXFilter.apply(t,e,r,!0),this.blurYFilter.apply(t,r,i,!1),t.returnRenderTarget(r)},Object.defineProperties(r.prototype,{blur:{get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=this.blurYFilter.blur=t,this.padding=2*Math.max(Math.abs(this.blurYFilter.strength),Math.abs(this.blurYFilter.strength))}},quality:{get:function(){return this.blurXFilter.quality},set:function(t){this.blurXFilter.quality=this.blurYFilter.quality=t}},blurX:{get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=t,this.padding=2*Math.max(Math.abs(this.blurYFilter.strength),Math.abs(this.blurYFilter.strength))}},blurY:{get:function(){return this.blurYFilter.blur},set:function(t){this.blurYFilter.blur=t,this.padding=2*Math.max(Math.abs(this.blurYFilter.strength),Math.abs(this.blurYFilter.strength))}}})},function(t,e,i){function r(t,e,i){var r=o(5,!0),a=s(5);n.Filter.call(this,r,a),this.resolution=i||1,this._quality=0,this.quality=e||4,this.strength=t||8,this.firstRun=!0}var n=i(9),o=i(126),s=i(127),a=i(128);r.prototype=Object.create(n.Filter.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.apply=function(t,e,i,r){if(this.firstRun){var n=t.renderer.gl,h=a(n);this.vertexSrc=o(h,!0),this.fragmentSrc=s(h),this.firstRun=!1}if(this.uniforms.strength=1/i.size.width*(i.size.width/e.size.width),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,i,r);else{for(var u=t.getRenderTarget(!0),l=e,c=u,p=0;p<this.passes-1;p++){t.applyFilter(this,l,c,!0);var d=c;c=l,l=d}t.applyFilter(this,l,i,r),t.returnRenderTarget(u)}},Object.defineProperties(r.prototype,{blur:{get:function(){return this.strength},set:function(t){this.padding=2*Math.abs(t),this.strength=t}},quality:{get:function(){return this._quality},set:function(t){this._quality=t,this.passes=t}}})},function(t,e){var i=["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform float strength;","uniform mat3 projectionMatrix;","varying vec2 vBlurTexCoords[%size%];","void main(void)","{","gl_Position = vec4((projectionMatrix * vec3((aVertexPosition), 1.0)).xy, 0.0, 1.0);","%blur%","}"].join("\n"),r=function(t,e){var r,n,o=Math.ceil(t/2),s=i,a="";r=e?"vBlurTexCoords[%index%] = aTextureCoord + vec2(%sampleIndex% * strength, 0.0);":"vBlurTexCoords[%index%] = aTextureCoord + vec2(0.0, %sampleIndex% * strength);";for(var h=0;h<t;h++){var u=r.replace("%index%",h);n=h,h>=o&&(n=t-h-1),u=u.replace("%sampleIndex%",h-(o-1)+".0"),a+=u,a+="\n"}return s=s.replace("%blur%",a),s=s.replace("%size%",t)};t.exports=r},function(t,e){var i={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},r=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{","\tgl_FragColor = vec4(0.0);","\t%blur%","}"].join("\n"),n=function(t){for(var e,n=i[t],o=n.length,s=r,a="",h="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;",u=0;u<t;u++){var l=h.replace("%index%",u);e=u,u>=o&&(e=t-u-1),l=l.replace("%value%",n[e]),a+=l,a+="\n"}return s=s.replace("%blur%",a),s=s.replace("%size%",t)};t.exports=n},function(t,e){var i=function(t){for(var e=t.getParameter(t.MAX_VARYING_VECTORS),i=15;i>e;)i-=2;return i};t.exports=i},function(t,e,i){function r(t,e,i){var r=o(5,!1),a=s(5);n.Filter.call(this,r,a),this.resolution=i||1,this._quality=0,this.quality=e||4,this.strength=t||8,this.firstRun=!0}var n=i(9),o=i(126),s=i(127),a=i(128);r.prototype=Object.create(n.Filter.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.apply=function(t,e,i,r){if(this.firstRun){var n=t.renderer.gl,h=a(n);this.vertexSrc=o(h,!1),this.fragmentSrc=s(h),this.firstRun=!1}if(this.uniforms.strength=1/i.size.height*(i.size.height/e.size.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,i,r);else{for(var u=t.getRenderTarget(!0),l=e,c=u,p=0;p<this.passes-1;p++){t.applyFilter(this,l,c,!0);var d=c;c=l,l=d}t.applyFilter(this,l,i,r),t.returnRenderTarget(u)}},Object.defineProperties(r.prototype,{blur:{get:function(){return this.strength},set:function(t){this.padding=2*Math.abs(t),this.strength=t}},quality:{get:function(){return this._quality},set:function(t){this._quality=t,this.passes=t}}})},function(t,e,i){function r(){n.Filter.call(this,"#define GLSLIFY 1\nattribute 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}","#define GLSLIFY 1\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\n\nvoid main(void)\n{\n\n    vec4 c = texture2D(uSampler, vTextureCoord);\n\n    gl_FragColor.r = (m[0] * c.r);\n        gl_FragColor.r += (m[1] * c.g);\n        gl_FragColor.r += (m[2] * c.b);\n        gl_FragColor.r += (m[3] * c.a);\n        gl_FragColor.r += m[4] * c.a;\n\n    gl_FragColor.g = (m[5] * c.r);\n        gl_FragColor.g += (m[6] * c.g);\n        gl_FragColor.g += (m[7] * c.b);\n        gl_FragColor.g += (m[8] * c.a);\n        gl_FragColor.g += m[9] * c.a;\n\n     gl_FragColor.b = (m[10] * c.r);\n        gl_FragColor.b += (m[11] * c.g);\n        gl_FragColor.b += (m[12] * c.b);\n        gl_FragColor.b += (m[13] * c.a);\n        gl_FragColor.b += m[14] * c.a;\n\n     gl_FragColor.a = (m[15] * c.r);\n        gl_FragColor.a += (m[16] * c.g);\n        gl_FragColor.a += (m[17] * c.b);\n        gl_FragColor.a += (m[18] * c.a);\n        gl_FragColor.a += m[19] * c.a;\n\n//    gl_FragColor = vec4(m[0]);\n}\n"),this.uniforms.m=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]}var n=i(9);r.prototype=Object.create(n.Filter.prototype),r.prototype.constructor=r,t.exports=r,r.prototype._loadMatrix=function(t,e){e=!!e;var i=t;e&&(this._multiply(i,this.uniforms.m,t),i=this._colorMatrix(i)),this.uniforms.m=i},r.prototype._multiply=function(t,e,i){return t[0]=e[0]*i[0]+e[1]*i[5]+e[2]*i[10]+e[3]*i[15],t[1]=e[0]*i[1]+e[1]*i[6]+e[2]*i[11]+e[3]*i[16],t[2]=e[0]*i[2]+e[1]*i[7]+e[2]*i[12]+e[3]*i[17],t[3]=e[0]*i[3]+e[1]*i[8]+e[2]*i[13]+e[3]*i[18],t[4]=e[0]*i[4]+e[1]*i[9]+e[2]*i[14]+e[3]*i[19],t[5]=e[5]*i[0]+e[6]*i[5]+e[7]*i[10]+e[8]*i[15],t[6]=e[5]*i[1]+e[6]*i[6]+e[7]*i[11]+e[8]*i[16],t[7]=e[5]*i[2]+e[6]*i[7]+e[7]*i[12]+e[8]*i[17],t[8]=e[5]*i[3]+e[6]*i[8]+e[7]*i[13]+e[8]*i[18],t[9]=e[5]*i[4]+e[6]*i[9]+e[7]*i[14]+e[8]*i[19],t[10]=e[10]*i[0]+e[11]*i[5]+e[12]*i[10]+e[13]*i[15],t[11]=e[10]*i[1]+e[11]*i[6]+e[12]*i[11]+e[13]*i[16],t[12]=e[10]*i[2]+e[11]*i[7]+e[12]*i[12]+e[13]*i[17],t[13]=e[10]*i[3]+e[11]*i[8]+e[12]*i[13]+e[13]*i[18],t[14]=e[10]*i[4]+e[11]*i[9]+e[12]*i[14]+e[13]*i[19],t[15]=e[15]*i[0]+e[16]*i[5]+e[17]*i[10]+e[18]*i[15],t[16]=e[15]*i[1]+e[16]*i[6]+e[17]*i[11]+e[18]*i[16],t[17]=e[15]*i[2]+e[16]*i[7]+e[17]*i[12]+e[18]*i[17],t[18]=e[15]*i[3]+e[16]*i[8]+e[17]*i[13]+e[18]*i[18],t[19]=e[15]*i[4]+e[16]*i[9]+e[17]*i[14]+e[18]*i[19],t},r.prototype._colorMatrix=function(t){var e=new Float32Array(t);return e[4]/=255,e[9]/=255,e[14]/=255,e[19]/=255,e},r.prototype.brightness=function(t,e){var i=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(i,e)},r.prototype.greyscale=function(t,e){var i=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(i,e)},r.prototype.grayscale=r.prototype.greyscale,r.prototype.blackAndWhite=function(t){var e=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(e,t)},r.prototype.hue=function(t,e){t=(t||0)/180*Math.PI;var i=Math.cos(t),r=Math.sin(t),n=Math.sqrt,o=1/3,s=n(o),a=i+(1-i)*o,h=o*(1-i)-s*r,u=o*(1-i)+s*r,l=o*(1-i)+s*r,c=i+o*(1-i),p=o*(1-i)-s*r,d=o*(1-i)-s*r,f=o*(1-i)+s*r,v=i+o*(1-i),g=[a,h,u,0,0,l,c,p,0,0,d,f,v,0,0,0,0,0,1,0];this._loadMatrix(g,e)},r.prototype.contrast=function(t,e){var i=(t||0)+1,r=-128*(i-1),n=[i,0,0,0,r,0,i,0,0,r,0,0,i,0,r,0,0,0,1,0];this._loadMatrix(n,e)},r.prototype.saturate=function(t,e){var i=2*(t||0)/3+1,r=(i-1)*-.5,n=[i,r,r,0,0,r,i,r,0,0,r,r,i,0,0,0,0,0,1,0];this._loadMatrix(n,e)},r.prototype.desaturate=function(){this.saturate(-1)},r.prototype.negative=function(t){var e=[0,1,1,0,0,1,0,1,0,0,1,1,0,0,0,0,0,0,1,0];this._loadMatrix(e,t)},r.prototype.sepia=function(t){var e=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(e,t)},r.prototype.technicolor=function(t){var e=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(e,t)},r.prototype.polaroid=function(t){var e=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(e,t)},r.prototype.toBGR=function(t){var e=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(e,t)},r.prototype.kodachrome=function(t){var e=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(e,t)},r.prototype.browni=function(t){var e=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(e,t)},r.prototype.vintage=function(t){var e=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(e,t)},r.prototype.colorTone=function(t,e,i,r,n){t=t||.2,e=e||.15,i=i||16770432,r=r||3375104;var o=(i>>16&255)/255,s=(i>>8&255)/255,a=(255&i)/255,h=(r>>16&255)/255,u=(r>>8&255)/255,l=(255&r)/255,c=[.3,.59,.11,0,0,o,s,a,t,0,h,u,l,e,0,o-h,s-u,a-l,0,0];this._loadMatrix(c,n)},r.prototype.night=function(t,e){t=t||.1;var i=[t*-2,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(i,e)},r.prototype.predator=function(t,e){var i=[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(i,e)},r.prototype.lsd=function(t){var e=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(e,t)},r.prototype.reset=function(){var t=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(t,!1)},Object.defineProperties(r.prototype,{matrix:{get:function(){return this.uniforms.m},set:function(t){this.uniforms.m=t}}})},function(t,e,i){function r(){n.Filter.call(this,"#define GLSLIFY 1\nattribute 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}","#define GLSLIFY 1\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n   gl_FragColor = texture2D(uSampler, vTextureCoord);\n}\n"),this.glShaderKey="void"}var n=i(9);r.prototype=Object.create(n.Filter.prototype),r.prototype.constructor=r,t.exports=r},function(t,e,i){t.exports={InteractionData:i(133),InteractionManager:i(134),interactiveTarget:i(135)}},function(t,e,i){function r(){this.global=new n.Point,this.target=null,this.originalEvent=null}var n=i(9);r.prototype.constructor=r,t.exports=r,r.prototype.getLocalPosition=function(t,e,i){return t.worldTransform.applyInverse(i||this.global,e)}},function(t,e,i){function r(t,e){s.call(this),e=e||{},this.renderer=t,this.autoPreventDefault=void 0===e.autoPreventDefault||e.autoPreventDefault,this.interactionFrequency=e.interactionFrequency||10,this.mouse=new o,this.mouse.global.set(-999999),this.eventData={stopped:!1,target:null,type:null,data:this.mouse,stopPropagation:function(){this.stopped=!0}},this.interactiveDataPool=[],this.interactionDOMElement=null,this.moveWhenInside=!1,this.eventsAdded=!1,this.onMouseUp=this.onMouseUp.bind(this),this.processMouseUp=this.processMouseUp.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.processMouseDown=this.processMouseDown.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.processMouseMove=this.processMouseMove.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.processMouseOverOut=this.processMouseOverOut.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.processTouchStart=this.processTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.processTouchEnd=this.processTouchEnd.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.processTouchMove=this.processTouchMove.bind(this),this.defaultCursorStyle="inherit",this.currentCursorStyle="inherit",this._tempPoint=new n.Point,this.resolution=1,this.setTargetElement(this.renderer.view,this.renderer.resolution)}var n=i(9),o=i(133),s=i(24);Object.assign(n.DisplayObject.prototype,i(135)),r.prototype=Object.create(s.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.setTargetElement=function(t,e){this.removeEvents(),this.interactionDOMElement=t,this.resolution=e||1,this.addEvents()},r.prototype.addEvents=function(){this.interactionDOMElement&&(n.ticker.shared.add(this.update,this),window.navigator.msPointerEnabled&&(this.interactionDOMElement.style["-ms-content-zooming"]="none",this.interactionDOMElement.style["-ms-touch-action"]="none"),window.document.addEventListener("mousemove",this.onMouseMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onMouseDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onMouseOut,!0),this.interactionDOMElement.addEventListener("mouseover",this.onMouseOver,!0),this.interactionDOMElement.addEventListener("touchstart",this.onTouchStart,!0),this.interactionDOMElement.addEventListener("touchend",this.onTouchEnd,!0),this.interactionDOMElement.addEventListener("touchmove",this.onTouchMove,!0),window.addEventListener("mouseup",this.onMouseUp,!0),this.eventsAdded=!0)},r.prototype.removeEvents=function(){this.interactionDOMElement&&(n.ticker.shared.remove(this.update),window.navigator.msPointerEnabled&&(this.interactionDOMElement.style["-ms-content-zooming"]="",this.interactionDOMElement.style["-ms-touch-action"]=""),window.document.removeEventListener("mousemove",this.onMouseMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onMouseDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onMouseOut,!0),this.interactionDOMElement.removeEventListener("mouseover",this.onMouseOver,!0),this.interactionDOMElement.removeEventListener("touchstart",this.onTouchStart,!0),this.interactionDOMElement.removeEventListener("touchend",this.onTouchEnd,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onTouchMove,!0),this.interactionDOMElement=null,window.removeEventListener("mouseup",this.onMouseUp,!0),this.eventsAdded=!1)},r.prototype.update=function(t){if(this._deltaTime+=t,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.interactionDOMElement)){if(this.didMove)return void(this.didMove=!1);this.cursor=this.defaultCursorStyle,this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseOverOut,!0),this.currentCursorStyle!==this.cursor&&(this.currentCursorStyle=this.cursor,this.interactionDOMElement.style.cursor=this.cursor)}},r.prototype.dispatchEvent=function(t,e,i){i.stopped||(i.target=t,i.type=e,t.emit(e,i),t[e]&&t[e](i))},r.prototype.mapPositionToPoint=function(t,e,i){var r;r=this.interactionDOMElement.parentElement?this.interactionDOMElement.getBoundingClientRect():{x:0,y:0,width:0,height:0},t.x=(e-r.left)*(this.interactionDOMElement.width/r.width)/this.resolution,t.y=(i-r.top)*(this.interactionDOMElement.height/r.height)/this.resolution},r.prototype.processInteractive=function(t,e,i,r,n){if(!e||!e.visible)return!1;var o=!1,s=n=e.interactive||n;if(e.hitArea&&(s=!1),r&&e._mask&&(e._mask.containsPoint(t)||(r=!1)),r&&e.filterArea&&(e.filterArea.contains(t.x,t.y)||(r=!1)),e.interactiveChildren)for(var a=e.children,h=a.length-1;h>=0;h--){var u=a[h];if(this.processInteractive(t,u,i,r,s)){if(!u.parent)continue;o=!0,s=!1,r=!1}}return n&&(r&&!o&&(e.hitArea?(e.worldTransform.applyInverse(t,this._tempPoint),o=e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)):e.containsPoint&&(o=e.containsPoint(t))),e.interactive&&i(e,o)),o},r.prototype.onMouseDown=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.autoPreventDefault&&this.mouse.originalEvent.preventDefault(),this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseDown,!0);var e=2===t.button||3===t.which;this.emit(e?"rightdown":"mousedown",this.eventData)},r.prototype.processMouseDown=function(t,e){var i=this.mouse.originalEvent,r=2===i.button||3===i.which;e&&(t[r?"_isRightDown":"_isLeftDown"]=!0,this.dispatchEvent(t,r?"rightdown":"mousedown",this.eventData))},r.prototype.onMouseUp=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseUp,!0);var e=2===t.button||3===t.which;this.emit(e?"rightup":"mouseup",this.eventData)},r.prototype.processMouseUp=function(t,e){var i=this.mouse.originalEvent,r=2===i.button||3===i.which,n=r?"_isRightDown":"_isLeftDown";e?(this.dispatchEvent(t,r?"rightup":"mouseup",this.eventData),t[n]&&(t[n]=!1,this.dispatchEvent(t,r?"rightclick":"click",this.eventData))):t[n]&&(t[n]=!1,this.dispatchEvent(t,r?"rightupoutside":"mouseupoutside",this.eventData))},r.prototype.onMouseMove=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.didMove=!0,this.cursor=this.defaultCursorStyle,this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseMove,!0),this.emit("mousemove",this.eventData),this.currentCursorStyle!==this.cursor&&(this.currentCursorStyle=this.cursor,this.interactionDOMElement.style.cursor=this.cursor)},r.prototype.processMouseMove=function(t,e){this.processMouseOverOut(t,e),this.moveWhenInside&&!e||this.dispatchEvent(t,"mousemove",this.eventData)},r.prototype.onMouseOut=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.interactionDOMElement.style.cursor=this.defaultCursorStyle,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseOverOut,!1),this.emit("mouseout",this.eventData)},r.prototype.processMouseOverOut=function(t,e){e?(t._over||(t._over=!0,this.dispatchEvent(t,"mouseover",this.eventData)),t.buttonMode&&(this.cursor=t.defaultCursor)):t._over&&(t._over=!1,this.dispatchEvent(t,"mouseout",this.eventData))},r.prototype.onMouseOver=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.emit("mouseover",this.eventData)},r.prototype.onTouchStart=function(t){this.autoPreventDefault&&t.preventDefault();for(var e=t.changedTouches,i=e.length,r=0;r<i;r++){var n=e[r],o=this.getTouchData(n);o.originalEvent=t,this.eventData.data=o,this.eventData.stopped=!1,this.processInteractive(o.global,this.renderer._lastObjectRendered,this.processTouchStart,!0),this.emit("touchstart",this.eventData),this.returnTouchData(o)}},r.prototype.processTouchStart=function(t,e){e&&(t._touchDown=!0,this.dispatchEvent(t,"touchstart",this.eventData))},r.prototype.onTouchEnd=function(t){this.autoPreventDefault&&t.preventDefault();for(var e=t.changedTouches,i=e.length,r=0;r<i;r++){var n=e[r],o=this.getTouchData(n);o.originalEvent=t,this.eventData.data=o,this.eventData.stopped=!1,this.processInteractive(o.global,this.renderer._lastObjectRendered,this.processTouchEnd,!0),this.emit("touchend",this.eventData),this.returnTouchData(o)}},r.prototype.processTouchEnd=function(t,e){e?(this.dispatchEvent(t,"touchend",this.eventData),t._touchDown&&(t._touchDown=!1,this.dispatchEvent(t,"tap",this.eventData))):t._touchDown&&(t._touchDown=!1,this.dispatchEvent(t,"touchendoutside",this.eventData))},r.prototype.onTouchMove=function(t){this.autoPreventDefault&&t.preventDefault();for(var e=t.changedTouches,i=e.length,r=0;r<i;r++){var n=e[r],o=this.getTouchData(n);o.originalEvent=t,this.eventData.data=o,this.eventData.stopped=!1,this.processInteractive(o.global,this.renderer._lastObjectRendered,this.processTouchMove,this.moveWhenInside),this.emit("touchmove",this.eventData),this.returnTouchData(o)}},r.prototype.processTouchMove=function(t,e){this.moveWhenInside&&!e||this.dispatchEvent(t,"touchmove",this.eventData)},r.prototype.getTouchData=function(t){var e=this.interactiveDataPool.pop();return e||(e=new o),e.identifier=t.identifier,this.mapPositionToPoint(e.global,t.clientX,t.clientY),navigator.isCocoonJS&&(e.global.x=e.global.x/this.resolution,e.global.y=e.global.y/this.resolution),t.globalX=e.global.x,t.globalY=e.global.y,e},r.prototype.returnTouchData=function(t){this.interactiveDataPool.push(t)},r.prototype.destroy=function(){this.removeEvents(),this.removeAllListeners(),this.renderer=null,this.mouse=null,this.eventData=null,this.interactiveDataPool=null,this.interactionDOMElement=null,this.onMouseUp=null,this.processMouseUp=null,this.onMouseDown=null,this.processMouseDown=null,this.onMouseMove=null,this.processMouseMove=null,this.onMouseOut=null,this.processMouseOverOut=null,this.onMouseOver=null,this.onTouchStart=null,this.processTouchStart=null,this.onTouchEnd=null,this.processTouchEnd=null,this.onTouchMove=null,this.processTouchMove=null,this._tempPoint=null},n.WebGLRenderer.registerPlugin("interaction",r),n.CanvasRenderer.registerPlugin("interaction",r)},function(t,e){var i={interactive:!1,interactiveChildren:!0,hitArea:null,buttonMode:!1,defaultCursor:"pointer",_over:!1,_isLeftDown:!1,_isRightDown:!1,_touchDown:!1};t.exports=i},function(t,e,i){t.exports={Loader:i(137),bitmapFontParser:i(187),spritesheetParser:i(185),textureParser:i(184),Resource:i(138).Resource}},function(t,e,i){function r(t,e){n.call(this,t,e);for(var i=0;i<r._pixiMiddleware.length;++i)this.use(r._pixiMiddleware[i]())}var n=i(138),o=i(184),s=i(185),a=i(187);r.prototype=Object.create(n.prototype),r.prototype.constructor=r,t.exports=r,r._pixiMiddleware=[n.middleware.parsing.blob,o,s,a],r.addPixiMiddleware=function(t){r._pixiMiddleware.push(t)};var h=n.Resource;h.setExtensionXhrType("fnt",h.XHR_RESPONSE_TYPE.DOCUMENT)},function(t,e,i){"use strict";t.exports=i(139),t.exports.Resource=i(180),t.exports.middleware={caching:{memory:i(181)},parsing:{blob:i(182)}}},function(t,e,i){"use strict";function r(t,e){h.call(this),e=e||u,this.baseUrl=t||"",this.progress=0,this.loading=!1,this._progressChunk=0,this._beforeMiddleware=[],this._afterMiddleware=[],this._boundLoadResource=this._loadResource.bind(this),this._buffer=[],this._numToLoad=0,this._queue=n(this._boundLoadResource,e),this.resources={}}var n=i(140),o=i(159),s=i(38),a=i(180),h=i(24),u=10,l=100;r.prototype=Object.create(h.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.add=r.prototype.enqueue=function(t,e,i,r){if(Array.isArray(t)){for(var n=0;n<t.length;++n)this.add(t[n]);return this}if("object"==typeof t&&(r=e||t.callback||t.onComplete,i=t,e=t.url,t=t.name||t.key||t.url),"string"!=typeof e&&(r=i,i=e,e=t),"string"!=typeof e)throw new Error("No url passed to add resource to loader.");if("function"==typeof i&&(r=i,i=null),this.resources[t])throw new Error('Resource with name "'+t+'" already exists.');return e=this._prepareUrl(e),this.resources[t]=new a(t,e,i),"function"==typeof r&&this.resources[t].once("afterMiddleware",r),this._numToLoad++,this._queue.started?(this._queue.push(this.resources[t]),this._progressChunk=(l-this.progress)/(this._queue.length()+this._queue.running())):(this._buffer.push(this.resources[t]),this._progressChunk=l/this._buffer.length),this},r.prototype.before=r.prototype.pre=function(t){return this._beforeMiddleware.push(t),this},r.prototype.after=r.prototype.use=function(t){return this._afterMiddleware.push(t),this},r.prototype.reset=function(){this.progress=0,this.loading=!1,this._progressChunk=0,this._buffer.length=0,this._numToLoad=0,this._queue.kill(),this._queue.started=!1;for(var t in this.resources){var e=this.resources[t];e.off("complete",this._onLoad,this),e.isLoading&&e.abort()}return this.resources={},this},r.prototype.load=function(t){if("function"==typeof t&&this.once("complete",t),this._queue.started)return this;this.emit("start",this),this.loading=!0;for(var e=0;e<this._buffer.length;++e)this._queue.push(this._buffer[e]);return this._buffer.length=0,this},r.prototype._prepareUrl=function(t){var e=s.parse(t);return e.protocol||!e.pathname||0===e.pathname.indexOf("//")?t:this.baseUrl.length&&this.baseUrl.lastIndexOf("/")!==this.baseUrl.length-1&&"/"!==t.charAt(0)?this.baseUrl+"/"+t:this.baseUrl+t},r.prototype._loadResource=function(t,e){var i=this;t._dequeue=e,o(this._beforeMiddleware,function(e,r){e.call(i,t,function(){r(t.isComplete?{}:null)})},function(){t.isComplete?i._onLoad(t):(t.once("complete",i._onLoad,i),t.load())})},r.prototype._onComplete=function(){this.loading=!1,this.emit("complete",this,this.resources)},r.prototype._onLoad=function(t){var e=this;o(this._afterMiddleware,function(i,r){i.call(e,t,r)},function(){t.emit("afterMiddleware",t),e._numToLoad--,e.progress+=e._progressChunk,e.emit("progress",e,t),t.error?e.emit("error",t.error,e,t):e.emit("load",e,t),0===e._numToLoad&&(e.progress=100,e._onComplete())}),t._dequeue()},r.LOAD_TYPE=a.LOAD_TYPE,r.XHR_RESPONSE_TYPE=a.XHR_RESPONSE_TYPE},function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=function(t,e){return(0,o["default"])(function(e,i){t(e[0],i)},e,1)};var n=i(141),o=r(n);t.exports=e["default"]},function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function n(t,e,i){function r(t,e,i){if(null!=i&&"function"!=typeof i)throw new Error("task callback must be a function");return u.started=!0,(0,h["default"])(t)||(t=[t]),0===t.length&&u.idle()?(0,g["default"])(function(){u.drain()}):((0,s["default"])(t,function(t){var r={data:t,callback:i||l["default"]};e?u._tasks.unshift(r):u._tasks.push(r)}),void(0,g["default"])(u.process))}function n(t){return(0,p["default"])(function(e){o-=1,(0,s["default"])(t,function(t){(0,s["default"])(a,function(e,i){if(e===t)return a.splice(i,1),!1}),t.callback.apply(t,e),null!=e[0]&&u.error(e[0],t.data)}),o<=u.concurrency-u.buffer&&u.unsaturated(),u.idle()&&u.drain(),u.process()})}if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var o=0,a=[],u={_tasks:new x["default"],concurrency:e,payload:i,saturated:l["default"],unsaturated:l["default"],buffer:e/4,empty:l["default"],drain:l["default"],error:l["default"],started:!1,paused:!1,push:function(t,e){r(t,!1,e)},kill:function(){u.drain=l["default"],u._tasks.empty()},unshift:function(t,e){r(t,!0,e)},process:function(){for(;!u.paused&&o<u.concurrency&&u._tasks.length;){var e=[],i=[],r=u._tasks.length;u.payload&&(r=Math.min(r,u.payload));for(var s=0;s<r;s++){var h=u._tasks.shift();e.push(h),i.push(h.data)}0===u._tasks.length&&u.empty(),o+=1,a.push(e[0]),o===u.concurrency&&u.saturated();var l=(0,f["default"])(n(e));t(i,l)}},length:function(){return u._tasks.length},running:function(){return o},workersList:function(){return a},idle:function(){return u._tasks.length+o===0},pause:function(){u.paused=!0},resume:function(){if(u.paused!==!1){u.paused=!1;for(var t=Math.min(u.concurrency,u._tasks.length),e=1;e<=t;e++)(0,g["default"])(u.process)}}};return u}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n;var o=i(142),s=r(o),a=i(143),h=r(a),u=i(144),l=r(u),c=i(145),p=r(c),d=i(154),f=r(d),v=i(155),g=r(v),y=i(158),x=r(y);t.exports=e["default"]},function(t,e){function i(t,e){for(var i=-1,r=t?t.length:0;++i<r&&e(t[i],i,t)!==!1;);
  return t}t.exports=i},function(t,e){var i=Array.isArray;t.exports=i},function(t,e){function i(){}t.exports=i},function(t,e,i){function r(t,e){if("function"!=typeof t)throw new TypeError(s);return e=void 0===e?e:o(e),n(t,e)}var n=i(146),o=i(148),s="Expected a function";t.exports=r},function(t,e,i){function r(t,e){return e=o(void 0===e?t.length-1:e,0),function(){for(var i=arguments,r=-1,s=o(i.length-e,0),a=Array(s);++r<s;)a[r]=i[e+r];r=-1;for(var h=Array(e+1);++r<e;)h[r]=i[r];return h[e]=a,n(t,this,h)}}var n=i(147),o=Math.max;t.exports=r},function(t,e){function i(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)}t.exports=i},function(t,e,i){function r(t){var e=n(t),i=e%1;return e===e?i?e-i:e:0}var n=i(149);t.exports=r},function(t,e,i){function r(t){if(!t)return 0===t?t:0;if(t=n(t),t===o||t===-o){var e=t<0?-1:1;return e*s}return t===t?t:0}var n=i(150),o=1/0,s=1.7976931348623157e308;t.exports=r},function(t,e,i){function r(t){if("number"==typeof t)return t;if(o(t))return s;if(n(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=n(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(a,"");var i=u.test(t);return i||l.test(t)?c(t.slice(2),i?2:8):h.test(t)?s:+t}var n=i(151),o=i(152),s=NaN,a=/^\s+|\s+$/g,h=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;t.exports=r},function(t,e){function i(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}t.exports=i},function(t,e,i){function r(t){return"symbol"==typeof t||n(t)&&a.call(t)==o}var n=i(153),o="[object Symbol]",s=Object.prototype,a=s.toString;t.exports=r},function(t,e){function i(t){return!!t&&"object"==typeof t}t.exports=i},function(t,e){"use strict";function i(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=i,t.exports=e["default"]},function(t,e,i){(function(t,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t){setTimeout(t,0)}function s(t){return(0,u["default"])(function(e,i){t(function(){e.apply(null,i)})})}Object.defineProperty(e,"__esModule",{value:!0}),e.hasNextTick=e.hasSetImmediate=void 0,e.fallback=o,e.wrap=s;var a,h=i(145),u=n(h),l=e.hasSetImmediate="function"==typeof t&&t,c=e.hasNextTick="object"==typeof r&&"function"==typeof r.nextTick;a=l?t:c?r.nextTick:o,e["default"]=s(a)}).call(e,i(156).setImmediate,i(157))},function(t,e,i){(function(t,r){function n(t,e){this._id=t,this._clearFn=e}var o=i(157).nextTick,s=Function.prototype.apply,a=Array.prototype.slice,h={},u=0;e.setTimeout=function(){return new n(s.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new n(s.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t.close()},n.prototype.unref=n.prototype.ref=function(){},n.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},e.setImmediate="function"==typeof t?t:function(t){var i=u++,r=!(arguments.length<2)&&a.call(arguments,1);return h[i]=!0,o(function(){h[i]&&(r?t.apply(null,r):t.call(null),e.clearImmediate(i))}),i},e.clearImmediate="function"==typeof r?r:function(t){delete h[t]}}).call(e,i(156).setImmediate,i(156).clearImmediate)},function(t,e){function i(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function n(t){if(l===setTimeout)return setTimeout(t,0);if((l===i||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function o(t){if(c===clearTimeout)return clearTimeout(t);if((c===r||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(t);try{return c(t)}catch(e){try{return c.call(null,t)}catch(e){return c.call(this,t)}}}function s(){v&&d&&(v=!1,d.length?f=d.concat(f):g=-1,f.length&&a())}function a(){if(!v){var t=n(s);v=!0;for(var e=f.length;e;){for(d=f,f=[];++g<e;)d&&d[g].run();g=-1,e=f.length}d=null,v=!1,o(t)}}function h(t,e){this.fun=t,this.array=e}function u(){}var l,c,p=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:i}catch(t){l=i}try{c="function"==typeof clearTimeout?clearTimeout:r}catch(t){c=r}}();var d,f=[],v=!1,g=-1;p.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];f.push(new h(t,e)),1!==f.length||v||n(a)},h.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=u,p.addListener=u,p.once=u,p.off=u,p.removeListener=u,p.removeAllListeners=u,p.emit=u,p.binding=function(t){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(t){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(t,e){"use strict";function i(){this.head=this.tail=null,this.length=0}function r(t,e){t.length=1,t.head=t.tail=e}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=i,i.prototype.removeLink=function(t){return t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev,t.prev=t.next=null,this.length-=1,t},i.prototype.empty=i,i.prototype.insertAfter=function(t,e){e.prev=t,e.next=t.next,t.next?t.next.prev=e:this.tail=e,t.next=e,this.length+=1},i.prototype.insertBefore=function(t,e){e.prev=t.prev,e.next=t,t.prev?t.prev.next=e:this.head=e,t.prev=e,this.length+=1},i.prototype.unshift=function(t){this.head?this.insertBefore(this.head,t):r(this,t)},i.prototype.push=function(t){this.tail?this.insertAfter(this.tail,t):r(this,t)},i.prototype.shift=function(){return this.head&&this.removeLink(this.head)},i.prototype.pop=function(){return this.tail&&this.removeLink(this.tail)},t.exports=e["default"]},function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(160),o=r(n),s=i(179),a=r(s);e["default"]=(0,a["default"])(o["default"],1),t.exports=e["default"]},function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function n(t,e,i,r){(0,s["default"])(e)(t,(0,h["default"])(i),r)}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n;var o=i(161),s=r(o),a=i(178),h=r(a);t.exports=e["default"]},function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function n(t){return function(e,i,r){function n(t){if(c-=1,t)u=!0,r(t);else{if(u&&c<=0)return r(null);o()}}function o(){for(;c<t&&!u;){var e=a();if(null===e)return u=!0,void(c<=0&&r(null));c+=1,i(e.value,e.key,(0,p["default"])(n))}}if(r=(0,h["default"])(r||s["default"]),t<=0||!e)return r(null);var a=(0,l["default"])(e),u=!1,c=0;o()}}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n;var o=i(144),s=r(o),a=i(162),h=r(a),u=i(163),l=r(u),c=i(154),p=r(c);t.exports=e["default"]},function(t,e){"use strict";function i(t){return function(){if(null!==t){var e=t;t=null,e.apply(this,arguments)}}}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=i,t.exports=e["default"]},function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function n(t){var e=-1,i=t.length;return function(){return++e<i?{value:t[e],key:e}:null}}function o(t){var e=-1;return function(){var i=t.next();return i.done?null:(e++,{value:i.value,key:e})}}function s(t){var e=(0,d["default"])(t),i=-1,r=e.length;return function(){var n=e[++i];return i<r?{value:t[n],key:n}:null}}function a(t){if((0,u["default"])(t))return n(t);var e=(0,c["default"])(t);return e?o(e):s(t)}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=a;var h=i(164),u=r(h),l=i(167),c=r(l),p=i(168),d=r(p);t.exports=e["default"]},function(t,e,i){function r(t){return null!=t&&o(t.length)&&!n(t)}var n=i(165),o=i(166);t.exports=r},function(t,e,i){function r(t){var e=n(t)?h.call(t):"";return e==o||e==s}var n=i(151),o="[object Function]",s="[object GeneratorFunction]",a=Object.prototype,h=a.toString;t.exports=r},function(t,e){function i(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=r}var r=9007199254740991;t.exports=i},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=function(t){return i&&t[i]&&t[i]()};var i="function"==typeof Symbol&&Symbol.iterator;t.exports=e["default"]},function(t,e,i){function r(t){return s(t)?n(t):o(t)}var n=i(169),o=i(174),s=i(164);t.exports=r},function(t,e,i){function r(t,e){var i=s(t)||o(t)?n(t.length,String):[],r=i.length,h=!!r;for(var l in t)!e&&!u.call(t,l)||h&&("length"==l||a(l,r))||i.push(l);return i}var n=i(170),o=i(171),s=i(143),a=i(173),h=Object.prototype,u=h.hasOwnProperty;t.exports=r},function(t,e){function i(t,e){for(var i=-1,r=Array(t);++i<t;)r[i]=e(i);return r}t.exports=i},function(t,e,i){function r(t){return n(t)&&a.call(t,"callee")&&(!u.call(t,"callee")||h.call(t)==o)}var n=i(172),o="[object Arguments]",s=Object.prototype,a=s.hasOwnProperty,h=s.toString,u=s.propertyIsEnumerable;t.exports=r},function(t,e,i){function r(t){return o(t)&&n(t)}var n=i(164),o=i(153);t.exports=r},function(t,e){function i(t,e){return e=null==e?r:e,!!e&&("number"==typeof t||n.test(t))&&t>-1&&t%1==0&&t<e}var r=9007199254740991,n=/^(?:0|[1-9]\d*)$/;t.exports=i},function(t,e,i){function r(t){if(!n(t))return o(t);var e=[];for(var i in Object(t))a.call(t,i)&&"constructor"!=i&&e.push(i);return e}var n=i(175),o=i(176),s=Object.prototype,a=s.hasOwnProperty;t.exports=r},function(t,e){function i(t){var e=t&&t.constructor,i="function"==typeof e&&e.prototype||r;return t===i}var r=Object.prototype;t.exports=i},function(t,e,i){var r=i(177),n=r(Object.keys,Object);t.exports=n},function(t,e){function i(t,e){return function(i){return t(e(i))}}t.exports=i},function(t,e){"use strict";function i(t){return function(e,i,r){return t(e,r)}}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=i,t.exports=e["default"]},function(t,e){"use strict";function i(t,e){return function(i,r,n){return t(i,e,r,n)}}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=i,t.exports=e["default"]},function(t,e,i){"use strict";function r(t,e,i){if(s.call(this),i=i||{},"string"!=typeof t||"string"!=typeof e)throw new Error("Both name and url are required for constructing a resource.");this.name=t,this.url=e,this.isDataUrl=0===this.url.indexOf("data:"),this.data=null,this.crossOrigin=i.crossOrigin===!0?"anonymous":i.crossOrigin,this.loadType=i.loadType||this._determineLoadType(),this.xhrType=i.xhrType,this.metadata=i.metadata||{},this.error=null,this.xhr=null,this.isJson=!1,this.isXml=!1,this.isImage=!1,this.isAudio=!1,this.isVideo=!1,this.isComplete=!1,this.isLoading=!1,this._dequeue=null,this._boundComplete=this.complete.bind(this),this._boundOnError=this._onError.bind(this),this._boundOnProgress=this._onProgress.bind(this),this._boundXhrOnError=this._xhrOnError.bind(this),this._boundXhrOnAbort=this._xhrOnAbort.bind(this),this._boundXhrOnLoad=this._xhrOnLoad.bind(this),this._boundXdrOnTimeout=this._xdrOnTimeout.bind(this)}function n(t){return t.toString().replace("object ","")}function o(t,e,i){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=i)}var s=i(24),a=i(38),h=!(!window.XDomainRequest||"withCredentials"in new XMLHttpRequest),u=null,l=0,c=200,p=204;r.prototype=Object.create(s.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.complete=function(){if(this.data&&this.data.removeEventListener&&(this.data.removeEventListener("error",this._boundOnError,!1),this.data.removeEventListener("load",this._boundComplete,!1),this.data.removeEventListener("progress",this._boundOnProgress,!1),this.data.removeEventListener("canplaythrough",this._boundComplete,!1)),this.xhr&&(this.xhr.removeEventListener?(this.xhr.removeEventListener("error",this._boundXhrOnError,!1),this.xhr.removeEventListener("abort",this._boundXhrOnAbort,!1),this.xhr.removeEventListener("progress",this._boundOnProgress,!1),this.xhr.removeEventListener("load",this._boundXhrOnLoad,!1)):(this.xhr.onerror=null,this.xhr.ontimeout=null,this.xhr.onprogress=null,this.xhr.onload=null)),this.isComplete)throw new Error("Complete called again for an already completed resource.");this.isComplete=!0,this.isLoading=!1,this.emit("complete",this)},r.prototype.abort=function(t){if(!this.error){if(this.error=new Error(t),this.xhr)this.xhr.abort();else if(this.xdr)this.xdr.abort();else if(this.data)if("undefined"!=typeof this.data.src)this.data.src="";else for(;this.data.firstChild;)this.data.removeChild(this.data.firstChild);this.complete()}},r.prototype.load=function(t){if(!this.isLoading)if(this.isComplete){if(t){var e=this;setTimeout(function(){t(e)},1)}}else switch(t&&this.once("complete",t),this.isLoading=!0,this.emit("start",this),this.crossOrigin!==!1&&"string"==typeof this.crossOrigin||(this.crossOrigin=this._determineCrossOrigin(this.url)),this.loadType){case r.LOAD_TYPE.IMAGE:this._loadElement("image");break;case r.LOAD_TYPE.AUDIO:this._loadSourceElement("audio");break;case r.LOAD_TYPE.VIDEO:this._loadSourceElement("video");break;case r.LOAD_TYPE.XHR:default:h&&this.crossOrigin?this._loadXdr():this._loadXhr()}},r.prototype._loadElement=function(t){this.metadata.loadElement?this.data=this.metadata.loadElement:"image"===t&&"undefined"!=typeof window.Image?this.data=new Image:this.data=document.createElement(t),this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),this.metadata.skipSource||(this.data.src=this.url);var e="is"+t[0].toUpperCase()+t.substring(1);this[e]===!1&&(this[e]=!0),this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1)},r.prototype._loadSourceElement=function(t){if(this.metadata.loadElement?this.data=this.metadata.loadElement:"audio"===t&&"undefined"!=typeof window.Audio?this.data=new Audio:this.data=document.createElement(t),null===this.data)return void this.abort("Unsupported element "+t);if(!this.metadata.skipSource)if(navigator.isCocoonJS)this.data.src=Array.isArray(this.url)?this.url[0]:this.url;else if(Array.isArray(this.url))for(var e=0;e<this.url.length;++e)this.data.appendChild(this._createSource(t,this.url[e]));else this.data.appendChild(this._createSource(t,this.url));this["is"+t[0].toUpperCase()+t.substring(1)]=!0,this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.data.addEventListener("canplaythrough",this._boundComplete,!1),this.data.load()},r.prototype._loadXhr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var t=this.xhr=new XMLHttpRequest;t.open("GET",this.url,!0),this.xhrType===r.XHR_RESPONSE_TYPE.JSON||this.xhrType===r.XHR_RESPONSE_TYPE.DOCUMENT?t.responseType=r.XHR_RESPONSE_TYPE.TEXT:t.responseType=this.xhrType,t.addEventListener("error",this._boundXhrOnError,!1),t.addEventListener("abort",this._boundXhrOnAbort,!1),t.addEventListener("progress",this._boundOnProgress,!1),t.addEventListener("load",this._boundXhrOnLoad,!1),t.send()},r.prototype._loadXdr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var t=this.xhr=new XDomainRequest;t.timeout=5e3,t.onerror=this._boundXhrOnError,t.ontimeout=this._boundXdrOnTimeout,t.onprogress=this._boundOnProgress,t.onload=this._boundXhrOnLoad,t.open("GET",this.url,!0),setTimeout(function(){t.send()},0)},r.prototype._createSource=function(t,e,i){i||(i=t+"/"+e.substr(e.lastIndexOf(".")+1));var r=document.createElement("source");return r.src=e,r.type=i,r},r.prototype._onError=function(t){this.abort("Failed to load element using "+t.target.nodeName)},r.prototype._onProgress=function(t){t&&t.lengthComputable&&this.emit("progress",this,t.loaded/t.total)},r.prototype._xhrOnError=function(){var t=this.xhr;this.abort(n(t)+" Request failed. Status: "+t.status+', text: "'+t.statusText+'"')},r.prototype._xhrOnAbort=function(){this.abort(n(this.xhr)+" Request was aborted by the user.")},r.prototype._xdrOnTimeout=function(){this.abort(n(this.xhr)+" Request timed out.")},r.prototype._xhrOnLoad=function(){var t=this.xhr,e="undefined"==typeof t.status?t.status:c;if(!(e===c||e===p||e===l&&t.responseText.length>0))return void this.abort("["+t.status+"]"+t.statusText+":"+t.responseURL);if(this.xhrType===r.XHR_RESPONSE_TYPE.TEXT)this.data=t.responseText;else if(this.xhrType===r.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(t.responseText),this.isJson=!0}catch(i){return void this.abort("Error trying to parse loaded json:",i)}else if(this.xhrType===r.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var n=new DOMParser;this.data=n.parseFromString(t.responseText,"text/xml")}else{var o=document.createElement("div");o.innerHTML=t.responseText,this.data=o}this.isXml=!0}catch(i){return void this.abort("Error trying to parse loaded xml:",i)}else this.data=t.response||t.responseText;this.complete()},r.prototype._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";e=e||window.location,u||(u=document.createElement("a")),u.href=t,t=a.parse(u.href);var i=!t.port&&""===e.port||t.port===e.port;return t.hostname===e.hostname&&i&&t.protocol===e.protocol?"":"anonymous"},r.prototype._determineXhrType=function(){return r._xhrTypeMap[this._getExtension()]||r.XHR_RESPONSE_TYPE.TEXT},r.prototype._determineLoadType=function(){return r._loadTypeMap[this._getExtension()]||r.LOAD_TYPE.XHR},r.prototype._getExtension=function(){var t=this.url,e="";if(this.isDataUrl){var i=t.indexOf("/");e=t.substring(i+1,t.indexOf(";",i))}else{var r=t.indexOf("?");r!==-1&&(t=t.substring(0,r)),e=t.substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},r.prototype._getMimeFromXhrType=function(t){switch(t){case r.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case r.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case r.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case r.XHR_RESPONSE_TYPE.JSON:return"application/json";case r.XHR_RESPONSE_TYPE.DEFAULT:case r.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},r.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},r.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},r._loadTypeMap={gif:r.LOAD_TYPE.IMAGE,png:r.LOAD_TYPE.IMAGE,bmp:r.LOAD_TYPE.IMAGE,jpg:r.LOAD_TYPE.IMAGE,jpeg:r.LOAD_TYPE.IMAGE,tif:r.LOAD_TYPE.IMAGE,tiff:r.LOAD_TYPE.IMAGE,webp:r.LOAD_TYPE.IMAGE,tga:r.LOAD_TYPE.IMAGE,"svg+xml":r.LOAD_TYPE.IMAGE},r._xhrTypeMap={xhtml:r.XHR_RESPONSE_TYPE.DOCUMENT,html:r.XHR_RESPONSE_TYPE.DOCUMENT,htm:r.XHR_RESPONSE_TYPE.DOCUMENT,xml:r.XHR_RESPONSE_TYPE.DOCUMENT,tmx:r.XHR_RESPONSE_TYPE.DOCUMENT,tsx:r.XHR_RESPONSE_TYPE.DOCUMENT,svg:r.XHR_RESPONSE_TYPE.DOCUMENT,gif:r.XHR_RESPONSE_TYPE.BLOB,png:r.XHR_RESPONSE_TYPE.BLOB,bmp:r.XHR_RESPONSE_TYPE.BLOB,jpg:r.XHR_RESPONSE_TYPE.BLOB,jpeg:r.XHR_RESPONSE_TYPE.BLOB,tif:r.XHR_RESPONSE_TYPE.BLOB,tiff:r.XHR_RESPONSE_TYPE.BLOB,webp:r.XHR_RESPONSE_TYPE.BLOB,tga:r.XHR_RESPONSE_TYPE.BLOB,json:r.XHR_RESPONSE_TYPE.JSON,text:r.XHR_RESPONSE_TYPE.TEXT,txt:r.XHR_RESPONSE_TYPE.TEXT},r.setExtensionLoadType=function(t,e){o(r._loadTypeMap,t,e)},r.setExtensionXhrType=function(t,e){o(r._xhrTypeMap,t,e)}},function(t,e){"use strict";var i={};t.exports=function(){return function(t,e){i[t.url]?(t.data=i[t.url],t.complete()):t.once("complete",function(){i[this.url]=this.data}),e()}}},function(t,e,i){"use strict";var r=i(180),n=i(183),o=window.URL||window.webkitURL;t.exports=function(){return function(t,e){if(!t.data)return void e();if(t.xhr&&t.xhrType===r.XHR_RESPONSE_TYPE.BLOB)if(window.Blob&&"string"!=typeof t.data){if(0===t.data.type.indexOf("image")){var i=o.createObjectURL(t.data);return t.blob=t.data,t.data=new Image,t.data.src=i,t.isImage=!0,void(t.data.onload=function(){o.revokeObjectURL(i),t.data.onload=null,e()})}}else{var s=t.xhr.getResponseHeader("content-type");if(s&&0===s.indexOf("image"))return t.data=new Image,t.data.src="data:"+s+";base64,"+n.encodeBinary(t.xhr.responseText),t.isImage=!0,void(t.data.onload=function(){t.data.onload=null,e()})}e()}}},function(t,e){"use strict";t.exports={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encodeBinary:function(t){for(var e,i="",r=new Array(4),n=0,o=0,s=0;n<t.length;){for(e=new Array(3),o=0;o<e.length;o++)n<t.length?e[o]=255&t.charCodeAt(n++):e[o]=0;switch(r[0]=e[0]>>2,r[1]=(3&e[0])<<4|e[1]>>4,r[2]=(15&e[1])<<2|e[2]>>6,r[3]=63&e[2],s=n-(t.length-1)){case 2:r[3]=64,r[2]=64;break;case 1:r[3]=64}for(o=0;o<r.length;o++)i+=this._keyStr.charAt(r[o])}return i}}},function(t,e,i){var r=i(9);t.exports=function(){return function(t,e){if(t.data&&t.isImage){var i=new r.BaseTexture(t.data,null,r.utils.getResolutionOfUrl(t.url));i.imageUrl=t.url,t.texture=new r.Texture(i),r.utils.BaseTextureCache[t.url]=i,r.utils.TextureCache[t.url]=t.texture}e()}}},function(t,e,i){var r=i(138).Resource,n=i(186),o=i(9),s=1e3;t.exports=function(){return function(t,e){var i,a=t.name+"_image";if(!t.data||!t.isJson||!t.data.frames||this.resources[a])return e();var h={crossOrigin:t.crossOrigin,loadType:r.LOAD_TYPE.IMAGE,metadata:t.metadata.imageMetadata};i=t.isDataUrl?t.data.meta.image:n.dirname(t.url.replace(this.baseUrl,""))+"/"+t.data.meta.image,this.add(a,i,h,function(i){function r(e,r){for(var n=e;n-e<r&&n<l.length;){var s=l[n],a=u[s].frame;if(a){var h=null,p=null,d=new o.Rectangle(0,0,u[s].sourceSize.w/c,u[s].sourceSize.h/c);h=u[s].rotated?new o.Rectangle(a.x/c,a.y/c,a.h/c,a.w/c):new o.Rectangle(a.x/c,a.y/c,a.w/c,a.h/c),u[s].trimmed&&(p=new o.Rectangle(u[s].spriteSourceSize.x/c,u[s].spriteSourceSize.y/c,u[s].spriteSourceSize.w/c,u[s].spriteSourceSize.h/c)),t.textures[s]=new o.Texture(i.texture.baseTexture,h,d,p,u[s].rotated?2:0),o.utils.TextureCache[s]=t.textures[s]}n++}}function n(){return p*s<l.length}function a(t){r(p*s,s),p++,setTimeout(t,0)}function h(){a(function(){n()?h():e()})}t.textures={};var u=t.data.frames,l=Object.keys(u),c=o.utils.getResolutionOfUrl(t.url),p=0;l.length<=s?(r(0,s),e()):h()})}}},function(t,e,i){(function(t){function i(t,e){for(var i=0,r=t.length-1;r>=0;r--){var n=t[r];"."===n?t.splice(r,1):".."===n?(t.splice(r,1),i++):i&&(t.splice(r,1),i--)}if(e)for(;i--;i)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var i=[],r=0;r<t.length;r++)e(t[r],r,t)&&i.push(t[r]);return i}var n=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,o=function(t){return n.exec(t).slice(1)};e.resolve=function(){for(var e="",n=!1,o=arguments.length-1;o>=-1&&!n;o--){var s=o>=0?arguments[o]:t.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(e=s+"/"+e,n="/"===s.charAt(0))}return e=i(r(e.split("/"),function(t){return!!t}),!n).join("/"),(n?"/":"")+e||"."},e.normalize=function(t){var n=e.isAbsolute(t),o="/"===s(t,-1);return t=i(r(t.split("/"),function(t){return!!t}),!n).join("/"),t||n||(t="."),t&&o&&(t+="/"),(n?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(r(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},e.relative=function(t,i){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var i=t.length-1;i>=0&&""===t[i];i--);return e>i?[]:t.slice(e,i-e+1)}t=e.resolve(t).substr(1),i=e.resolve(i).substr(1);for(var n=r(t.split("/")),o=r(i.split("/")),s=Math.min(n.length,o.length),a=s,h=0;h<s;h++)if(n[h]!==o[h]){a=h;break}for(var u=[],h=a;h<n.length;h++)u.push("..");return u=u.concat(o.slice(a)),u.join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){var e=o(t),i=e[0],r=e[1];return i||r?(r&&(r=r.substr(0,r.length-1)),i+r):"."},e.basename=function(t,e){var i=o(t)[2];return e&&i.substr(-1*e.length)===e&&(i=i.substr(0,i.length-e.length)),i},e.extname=function(t){return o(t)[3]};var s="b"==="ab".substr(-1)?function(t,e,i){return t.substr(e,i)}:function(t,e,i){return e<0&&(e=t.length+e),t.substr(e,i)}}).call(e,i(157))},function(t,e,i){function r(t,e){var i={},r=t.data.getElementsByTagName("info")[0],n=t.data.getElementsByTagName("common")[0];i.font=r.getAttribute("face"),i.size=parseInt(r.getAttribute("size"),10),i.lineHeight=parseInt(n.getAttribute("lineHeight"),10),i.chars={};for(var a=t.data.getElementsByTagName("char"),h=0;h<a.length;h++){var u=parseInt(a[h].getAttribute("id"),10),l=new o.Rectangle(parseInt(a[h].getAttribute("x"),10)+e.frame.x,parseInt(a[h].getAttribute("y"),10)+e.frame.y,parseInt(a[h].getAttribute("width"),10),parseInt(a[h].getAttribute("height"),10));i.chars[u]={xOffset:parseInt(a[h].getAttribute("xoffset"),10),yOffset:parseInt(a[h].getAttribute("yoffset"),10),xAdvance:parseInt(a[h].getAttribute("xadvance"),10),kerning:{},texture:new o.Texture(e.baseTexture,l)}}var c=t.data.getElementsByTagName("kerning");for(h=0;h<c.length;h++){var p=parseInt(c[h].getAttribute("first"),10),d=parseInt(c[h].getAttribute("second"),10),f=parseInt(c[h].getAttribute("amount"),10);i.chars[d]&&(i.chars[d].kerning[p]=f)}t.bitmapFont=i,s.BitmapText.fonts[i.font]=i}var n=i(138).Resource,o=i(9),s=i(112),a=i(186);t.exports=function(){return function(t,e){if(!t.data||!t.isXml)return e();if(0===t.data.getElementsByTagName("page").length||0===t.data.getElementsByTagName("info").length||null===t.data.getElementsByTagName("info")[0].getAttribute("face"))return e();var i=t.isDataUrl?"":a.dirname(t.url);t.isDataUrl&&("."===i&&(i=""),this.baseUrl&&i&&("/"===this.baseUrl.charAt(this.baseUrl.length-1)&&(i+="/"),i=i.replace(this.baseUrl,""))),i&&"/"!==i.charAt(i.length-1)&&(i+="/");var s=i+t.data.getElementsByTagName("page")[0].getAttribute("file");if(o.utils.TextureCache[s])r(t,o.utils.TextureCache[s]),e();else{var h={crossOrigin:t.crossOrigin,loadType:n.LOAD_TYPE.IMAGE,metadata:t.metadata.imageMetadata};this.add(t.name+"_image",s,h,function(i){r(t,i.texture),e()})}}}},function(t,e,i){t.exports={Mesh:i(189),Plane:i(191),NineSlicePlane:i(192),Rope:i(193),MeshShader:i(190)}},function(t,e,i){function r(t,e,i,o,s){n.Container.call(this),this._texture=null,this.uvs=i||new Float32Array([0,0,1,0,1,1,0,1]),this.vertices=e||new Float32Array([0,0,100,0,100,100,0,100]),this.indices=o||new Uint16Array([0,1,3,2]),this.dirty=0,this.indexDirty=0,this.blendMode=n.BLEND_MODES.NORMAL,this.canvasPadding=0,this.drawMode=s||r.DRAW_MODES.TRIANGLE_MESH,this.texture=t,this.shader=null,this.tintRgb=new Float32Array([1,1,1]),this._glDatas=[]}var n=i(9),o=i(65),s=i(190),a=new n.Point,h=new n.Polygon;r.prototype=Object.create(n.Container.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{texture:{get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture=t,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))}},tint:{get:function(){return n.utils.rgb2hex(this.tintRgb)},set:function(t){this.tintRgb=n.utils.hex2rgb(t,this.tintRgb)}}}),r.prototype._renderWebGL=function(t){t.flush();var e=t.gl,i=this._glDatas[t.CONTEXT_UID];i||(i={shader:new s(e),vertexBuffer:o.GLBuffer.createVertexBuffer(e,this.vertices,e.STREAM_DRAW),uvBuffer:o.GLBuffer.createVertexBuffer(e,this.uvs,e.STREAM_DRAW),indexBuffer:o.GLBuffer.createIndexBuffer(e,this.indices,e.STATIC_DRAW),vao:new o.VertexArrayObject(e),dirty:this.dirty,indexDirty:this.indexDirty},i.vao=new o.VertexArrayObject(e).addIndex(i.indexBuffer).addAttribute(i.vertexBuffer,i.shader.attributes.aVertexPosition,e.FLOAT,!1,8,0).addAttribute(i.uvBuffer,i.shader.attributes.aTextureCoord,e.FLOAT,!1,8,0),this._glDatas[t.CONTEXT_UID]=i),this.dirty!==i.dirty&&(i.dirty=this.dirty,i.uvBuffer.upload()),this.indexDirty!==i.indexDirty&&(i.indexDirty=this.indexDirty,i.indexBuffer.upload()),i.vertexBuffer.upload(),t.bindShader(i.shader),t.bindTexture(this._texture,0),t.state.setBlendMode(this.blendMode),i.shader.uniforms.translationMatrix=this.worldTransform.toArray(!0),i.shader.uniforms.alpha=this.worldAlpha,i.shader.uniforms.tint=this.tintRgb;var n=this.drawMode===r.DRAW_MODES.TRIANGLE_MESH?e.TRIANGLE_STRIP:e.TRIANGLES;i.vao.bind().draw(n,this.indices.length).unbind()},r.prototype._renderCanvas=function(t){var e=t.context,i=this.worldTransform,n=t.resolution;t.roundPixels?e.setTransform(i.a*n,i.b*n,i.c*n,i.d*n,i.tx*n|0,i.ty*n|0):e.setTransform(i.a*n,i.b*n,i.c*n,i.d*n,i.tx*n,i.ty*n),this.drawMode===r.DRAW_MODES.TRIANGLE_MESH?this._renderCanvasTriangleMesh(e):this._renderCanvasTriangles(e)},r.prototype._renderCanvasTriangleMesh=function(t){for(var e=this.vertices,i=this.uvs,r=e.length/2,n=0;n<r-2;n++){var o=2*n;this._renderCanvasDrawTriangle(t,e,i,o,o+2,o+4)}},r.prototype._renderCanvasTriangles=function(t){for(var e=this.vertices,i=this.uvs,r=this.indices,n=r.length,o=0;o<n;o+=3){var s=2*r[o],a=2*r[o+1],h=2*r[o+2];this._renderCanvasDrawTriangle(t,e,i,s,a,h)}},r.prototype._renderCanvasDrawTriangle=function(t,e,i,r,n,o){var s=this._texture.baseTexture,a=s.source,h=s.width,u=s.height,l=e[r],c=e[n],p=e[o],d=e[r+1],f=e[n+1],v=e[o+1],g=i[r]*s.width,y=i[n]*s.width,x=i[o]*s.width,m=i[r+1]*s.height,_=i[n+1]*s.height,T=i[o+1]*s.height;if(this.canvasPadding>0){var b=this.canvasPadding/this.worldTransform.a,E=this.canvasPadding/this.worldTransform.d,w=(l+c+p)/3,S=(d+f+v)/3,C=l-w,A=d-S,M=Math.sqrt(C*C+A*A);l=w+C/M*(M+b),d=S+A/M*(M+E),C=c-w,A=f-S,M=Math.sqrt(C*C+A*A),c=w+C/M*(M+b),f=S+A/M*(M+E),C=p-w,A=v-S,M=Math.sqrt(C*C+A*A),p=w+C/M*(M+b),v=S+A/M*(M+E)}t.save(),t.beginPath(),t.moveTo(l,d),t.lineTo(c,f),t.lineTo(p,v),t.closePath(),t.clip();var R=g*_+m*x+y*T-_*x-m*y-g*T,O=l*_+m*p+c*T-_*p-m*c-l*T,D=g*c+l*x+y*p-c*x-l*y-g*p,P=g*_*p+m*c*x+l*y*T-l*_*x-m*y*p-g*c*T,I=d*_+m*v+f*T-_*v-m*f-d*T,L=g*f+d*x+y*v-f*x-d*y-g*v,N=g*_*v+m*f*x+d*y*T-d*_*x-m*y*v-g*f*T;t.transform(O/R,I/R,D/R,L/R,P/R,N/R),t.drawImage(a,0,0,h*s.resolution,u*s.resolution,0,0,h,u),t.restore()},r.prototype.renderMeshFlat=function(t){var e=this.context,i=t.vertices,r=i.length/2;e.beginPath();for(var n=1;n<r-2;n++){var o=2*n,s=i[o],a=i[o+2],h=i[o+4],u=i[o+1],l=i[o+3],c=i[o+5];e.moveTo(s,u),e.lineTo(a,l),e.lineTo(h,c)}e.fillStyle="#FF0000",e.fill(),e.closePath()},r.prototype._onTextureUpdate=function(){},r.prototype._calculateBounds=function(){this._bounds.addVertices(this.transform,this.vertices,0,this.vertices.length)},r.prototype.containsPoint=function(t){if(!this.getBounds().contains(t.x,t.y))return!1;this.worldTransform.applyInverse(t,a);for(var e=this.vertices,i=h.points,n=this.indices,o=this.indices.length,s=this.drawMode===r.DRAW_MODES.TRIANGLES?3:1,u=0;u+2<o;u+=s){var l=2*n[u],c=2*n[u+1],p=2*n[u+2];if(i[0]=e[l],i[1]=e[l+1],i[2]=e[c],i[3]=e[c+1],i[4]=e[p],i[5]=e[p+1],h.contains(a.x,a.y))return!0}return!1},r.DRAW_MODES={TRIANGLE_MESH:0,TRIANGLES:1}},function(t,e,i){function r(t){n.call(this,t,["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform mat3 translationMatrix;","uniform mat3 projectionMatrix;","varying vec2 vTextureCoord;","void main(void){","   gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);","   vTextureCoord = aTextureCoord;","}"].join("\n"),["varying vec2 vTextureCoord;","uniform float alpha;","uniform vec3 tint;","uniform sampler2D uSampler;","void main(void){","   gl_FragColor = texture2D(uSampler, vTextureCoord) * vec4(tint * alpha, alpha);","}"].join("\n"))}var n=i(86);r.prototype=Object.create(n.prototype),r.prototype.constructor=r,t.exports=r},function(t,e,i){function r(t,e,i){n.call(this,t),this._ready=!0,this.verticesX=e||10,this.verticesY=i||10,this.drawMode=n.DRAW_MODES.TRIANGLES,this.refresh()}var n=i(189);r.prototype=Object.create(n.prototype),r.prototype.constructor=r,
  t.exports=r,r.prototype.refresh=function(){var t=this.verticesX*this.verticesY,e=[],i=[],r=[],n=[],o=this.texture,s=this.verticesX-1,a=this.verticesY-1,h=0,u=o.width/s,l=o.height/a;for(h=0;h<t;h++){var c=h%this.verticesX,p=h/this.verticesX|0;e.push(c*u,p*l),r.push(o._uvs.x0+(o._uvs.x1-o._uvs.x0)*(c/(this.verticesX-1)),o._uvs.y0+(o._uvs.y3-o._uvs.y0)*(p/(this.verticesY-1)))}var d=s*a;for(h=0;h<d;h++){var f=h%s,v=h/s|0,g=v*this.verticesX+f,y=v*this.verticesX+f+1,x=(v+1)*this.verticesX+f,m=(v+1)*this.verticesX+f+1;n.push(g,y,x),n.push(y,m,x)}this.vertices=new Float32Array(e),this.uvs=new Float32Array(r),this.colors=new Float32Array(i),this.indices=new Uint16Array(n),this.indexDirty=!0},r.prototype._onTextureUpdate=function(){n.prototype._onTextureUpdate.call(this),this._ready&&this.refresh()}},function(t,e,i){function r(t,e,i,r,s){o.call(this,t,4,4);var a=this.uvs;a[6]=a[14]=a[22]=a[30]=1,a[25]=a[27]=a[29]=a[31]=1,this._origWidth=t.width,this._origHeight=t.height,this._uvw=1/this._origWidth,this._uvh=1/this._origHeight,this.width=t.width,this.height=t.height,a[2]=a[10]=a[18]=a[26]=this._uvw*e,a[4]=a[12]=a[20]=a[28]=1-this._uvw*r,a[9]=a[11]=a[13]=a[15]=this._uvh*i,a[17]=a[19]=a[21]=a[23]=1-this._uvh*s,this.leftWidth="undefined"!=typeof e?e:n,this.rightWidth="undefined"!=typeof r?r:n,this.topHeight="undefined"!=typeof i?i:n,this.bottomHeight="undefined"!=typeof s?s:n}var n=10,o=i(191);r.prototype=Object.create(o.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{width:{get:function(){return this._width},set:function(t){this._width=t,this.updateVerticalVertices()}},height:{get:function(){return this._height},set:function(t){this._height=t,this.updateHorizontalVertices()}},leftWidth:{get:function(){return this._leftWidth},set:function(t){this._leftWidth=t;var e=this.uvs,i=this.vertices;e[2]=e[10]=e[18]=e[26]=this._uvw*t,i[2]=i[10]=i[18]=i[26]=t,this.dirty=!0}},rightWidth:{get:function(){return this._rightWidth},set:function(t){this._rightWidth=t;var e=this.uvs,i=this.vertices;e[4]=e[12]=e[20]=e[28]=1-this._uvw*t,i[4]=i[12]=i[20]=i[28]=this._width-t,this.dirty=!0}},topHeight:{get:function(){return this._topHeight},set:function(t){this._topHeight=t;var e=this.uvs,i=this.vertices;e[9]=e[11]=e[13]=e[15]=this._uvh*t,i[9]=i[11]=i[13]=i[15]=t,this.dirty=!0}},bottomHeight:{get:function(){return this._bottomHeight},set:function(t){this._bottomHeight=t;var e=this.uvs,i=this.vertices;e[17]=e[19]=e[21]=e[23]=1-this._uvh*t,i[17]=i[19]=i[21]=i[23]=this._height-t,this.dirty=!0}}}),r.prototype.updateHorizontalVertices=function(){var t=this.vertices;t[9]=t[11]=t[13]=t[15]=this._topHeight,t[17]=t[19]=t[21]=t[23]=this._height-this._bottomHeight,t[25]=t[27]=t[29]=t[31]=this._height},r.prototype.updateVerticalVertices=function(){var t=this.vertices;t[2]=t[10]=t[18]=t[26]=this._leftWidth,t[4]=t[12]=t[20]=t[28]=this._width-this._rightWidth,t[6]=t[14]=t[22]=t[30]=this._width},r.prototype._renderCanvas=function(t){var e=t.context;e.globalAlpha=this.worldAlpha;var i=this.worldTransform,r=t.resolution;t.roundPixels?e.setTransform(i.a*r,i.b*r,i.c*r,i.d*r,i.tx*r|0,i.ty*r|0):e.setTransform(i.a*r,i.b*r,i.c*r,i.d*r,i.tx*r,i.ty*r);var n=this._texture.baseTexture,o=n.source,s=n.width,a=n.height;this.drawSegment(e,o,s,a,0,1,10,11),this.drawSegment(e,o,s,a,2,3,12,13),this.drawSegment(e,o,s,a,4,5,14,15),this.drawSegment(e,o,s,a,8,9,18,19),this.drawSegment(e,o,s,a,10,11,20,21),this.drawSegment(e,o,s,a,12,13,22,23),this.drawSegment(e,o,s,a,16,17,26,27),this.drawSegment(e,o,s,a,18,19,28,29),this.drawSegment(e,o,s,a,20,21,30,31)},r.prototype.drawSegment=function(t,e,i,r,n,o,s,a){var h=this.uvs,u=this.vertices,l=(h[s]-h[n])*i,c=(h[a]-h[o])*r,p=u[s]-u[n],d=u[a]-u[o];l<1&&(l=1),c<1&&(c=1),p<1&&(p=1),d<1&&(d=1),t.drawImage(e,h[n]*i,h[o]*r,l,c,u[n],u[o],p,d)}},function(t,e,i){function r(t,e){n.call(this,t),this.points=e,this.vertices=new Float32Array(4*e.length),this.uvs=new Float32Array(4*e.length),this.colors=new Float32Array(2*e.length),this.indices=new Uint16Array(2*e.length),this._ready=!0,this.refresh()}var n=i(189),o=i(9);r.prototype=Object.create(n.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.refresh=function(){var t=this.points;if(!(t.length<1)&&this._texture._uvs){var e=this.uvs,i=this.indices,r=this.colors,n=this._texture._uvs,s=new o.Point(n.x0,n.y0),a=new o.Point(n.x2-n.x0,n.y2-n.y0);e[0]=0+s.x,e[1]=0+s.y,e[2]=0+s.x,e[3]=1*a.y+s.y,r[0]=1,r[1]=1,i[0]=0,i[1]=1;for(var h,u,l,c=t.length,p=1;p<c;p++)h=t[p],u=4*p,l=p/(c-1),e[u]=l*a.x+s.x,e[u+1]=0+s.y,e[u+2]=l*a.x+s.x,e[u+3]=1*a.y+s.y,u=2*p,r[u]=1,r[u+1]=1,u=2*p,i[u]=u,i[u+1]=u+1;this.dirty=!0,this.indexDirty=!0}},r.prototype._onTextureUpdate=function(){n.prototype._onTextureUpdate.call(this),this._ready&&this.refresh()},r.prototype.updateTransform=function(){var t=this.points;if(!(t.length<1)){for(var e,i,r,n,o,s,a=t[0],h=0,u=0,l=this.vertices,c=t.length,p=0;p<c;p++)i=t[p],r=4*p,e=p<t.length-1?t[p+1]:i,u=-(e.x-a.x),h=e.y-a.y,n=10*(1-p/(c-1)),n>1&&(n=1),o=Math.sqrt(h*h+u*u),s=this._texture.height/2,h/=o,u/=o,h*=s,u*=s,l[r]=i.x+h,l[r+1]=i.y+u,l[r+2]=i.x-h,l[r+3]=i.y-u,a=i;this.containerUpdateTransform()}}},function(t,e,i){t.exports={ParticleContainer:i(195),ParticleRenderer:i(196)}},function(t,e,i){function r(t,e,i){n.Container.call(this),i=i||15e3,t=t||15e3;var r=16384;i>r&&(i=r),i>t&&(i=t),this._properties=[!1,!0,!1,!1,!1],this._maxSize=t,this._batchSize=i,this._glBuffers=[],this._bufferToUpdate=0,this.interactiveChildren=!1,this.blendMode=n.BLEND_MODES.NORMAL,this.roundPixels=!0,this.baseTexture=null,this.setProperties(e)}var n=i(9);r.prototype=Object.create(n.Container.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.setProperties=function(t){t&&(this._properties[0]="scale"in t?!!t.scale:this._properties[0],this._properties[1]="position"in t?!!t.position:this._properties[1],this._properties[2]="rotation"in t?!!t.rotation:this._properties[2],this._properties[3]="uvs"in t?!!t.uvs:this._properties[3],this._properties[4]="alpha"in t?!!t.alpha:this._properties[4])},r.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},r.prototype.renderWebGL=function(t){this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.hasLoaded||this.baseTexture.once("update",function(){this.onChildrenChange(0)},this)),t.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},r.prototype.onChildrenChange=function(t){var e=Math.floor(t/this._batchSize);e<this._bufferToUpdate&&(this._bufferToUpdate=e)},r.prototype.renderCanvas=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable){var e=t.context,i=this.worldTransform,r=!0,n=0,o=0,s=0,a=0,h=t.blendModes[this.blendMode];h!==e.globalCompositeOperation&&(e.globalCompositeOperation=h),e.globalAlpha=this.worldAlpha,this.displayObjectUpdateTransform();for(var u=0;u<this.children.length;++u){var l=this.children[u];if(l.visible){var c=l.texture.frame;if(e.globalAlpha=this.worldAlpha*l.alpha,l.rotation%(2*Math.PI)===0)r&&(e.setTransform(i.a,i.b,i.c,i.d,i.tx*t.resolution,i.ty*t.resolution),r=!1),n=l.anchor.x*(-c.width*l.scale.x)+l.position.x+.5,o=l.anchor.y*(-c.height*l.scale.y)+l.position.y+.5,s=c.width*l.scale.x,a=c.height*l.scale.y;else{r||(r=!0),l.displayObjectUpdateTransform();var p=l.worldTransform;t.roundPixels?e.setTransform(p.a,p.b,p.c,p.d,p.tx*t.resolution|0,p.ty*t.resolution|0):e.setTransform(p.a,p.b,p.c,p.d,p.tx*t.resolution,p.ty*t.resolution),n=l.anchor.x*-c.width+.5,o=l.anchor.y*-c.height+.5,s=c.width,a=c.height}var d=l.texture.baseTexture.resolution;e.drawImage(l.texture.baseTexture.source,c.x*d,c.y*d,c.width*d,c.height*d,n*d,o*d,s*d,a*d)}}}},r.prototype.destroy=function(){if(n.Container.prototype.destroy.apply(this,arguments),this._buffers)for(var t=0;t<this._buffers.length;++t)this._buffers[t].destroy();this._properties=null,this._buffers=null}},function(t,e,i){function r(t){n.ObjectRenderer.call(this,t),this.shader=null,this.indexBuffer=null,this.properties=null,this.tempMatrix=new n.Matrix,this.CONTEXT_UID=0}var n=i(9),o=i(197),s=i(198);r.prototype=Object.create(n.ObjectRenderer.prototype),r.prototype.constructor=r,t.exports=r,n.WebGLRenderer.registerPlugin("particle",r),r.prototype.onContextChange=function(){var t=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.shader=new o(t),this.properties=[{attribute:this.shader.attributes.aVertexPosition,size:2,uploadFunction:this.uploadVertices,offset:0},{attribute:this.shader.attributes.aPositionCoord,size:2,uploadFunction:this.uploadPosition,offset:0},{attribute:this.shader.attributes.aRotation,size:1,uploadFunction:this.uploadRotation,offset:0},{attribute:this.shader.attributes.aTextureCoord,size:2,uploadFunction:this.uploadUvs,offset:0},{attribute:this.shader.attributes.aColor,size:1,uploadFunction:this.uploadAlpha,offset:0}]},r.prototype.start=function(){this.renderer.bindShader(this.shader)},r.prototype.render=function(t){var e=t.children,i=e.length,r=t._maxSize,n=t._batchSize;if(0!==i){i>r&&(i=r);var o=t._glBuffers[this.renderer.CONTEXT_UID];o||(o=t._glBuffers[this.renderer.CONTEXT_UID]=this.generateBuffers(t)),this.renderer.setBlendMode(t.blendMode);var s=this.renderer.gl,a=t.worldTransform.copy(this.tempMatrix);a.prepend(this.renderer._activeRenderTarget.projectionMatrix),this.shader.uniforms.projectionMatrix=a.toArray(!0),this.shader.uniforms.uAlpha=t.worldAlpha;var h=e[0]._texture.baseTexture;this.renderer.bindTexture(h);for(var u=0,l=0;u<i;u+=n,l+=1){var c=i-u;c>n&&(c=n);var p=o[l];p.uploadDynamic(e,u,c),t._bufferToUpdate===l&&(p.uploadStatic(e,u,c),t._bufferToUpdate=l+1),p.vao.bind().draw(s.TRIANGLES,6*c).unbind()}}},r.prototype.generateBuffers=function(t){var e,i=this.renderer.gl,r=[],n=t._maxSize,o=t._batchSize,a=t._properties;for(e=0;e<n;e+=o)r.push(new s(i,this.properties,a,o));return r},r.prototype.uploadVertices=function(t,e,i,r,n,o){for(var s,a,h,u,l,c,p,d,f,v,g=0;g<i;g++)s=t[e+g],a=s._texture,l=s.scale.x,c=s.scale.y,h=a.trim,u=a.orig,h?(d=h.x-s.anchor.x*u.width,p=d+h.width,v=h.y-s.anchor.y*u.height,f=v+h.height):(p=u.width*(1-s.anchor.x),d=u.width*-s.anchor.x,f=u.height*(1-s.anchor.y),v=u.height*-s.anchor.y),r[o]=d*l,r[o+1]=v*c,r[o+n]=p*l,r[o+n+1]=v*c,r[o+2*n]=p*l,r[o+2*n+1]=f*c,r[o+3*n]=d*l,r[o+3*n+1]=f*c,o+=4*n},r.prototype.uploadPosition=function(t,e,i,r,n,o){for(var s=0;s<i;s++){var a=t[e+s].position;r[o]=a.x,r[o+1]=a.y,r[o+n]=a.x,r[o+n+1]=a.y,r[o+2*n]=a.x,r[o+2*n+1]=a.y,r[o+3*n]=a.x,r[o+3*n+1]=a.y,o+=4*n}},r.prototype.uploadRotation=function(t,e,i,r,n,o){for(var s=0;s<i;s++){var a=t[e+s].rotation;r[o]=a,r[o+n]=a,r[o+2*n]=a,r[o+3*n]=a,o+=4*n}},r.prototype.uploadUvs=function(t,e,i,r,n,o){for(var s=0;s<i;s++){var a=t[e+s]._texture._uvs;a?(r[o]=a.x0,r[o+1]=a.y0,r[o+n]=a.x1,r[o+n+1]=a.y1,r[o+2*n]=a.x2,r[o+2*n+1]=a.y2,r[o+3*n]=a.x3,r[o+3*n+1]=a.y3,o+=4*n):(r[o]=0,r[o+1]=0,r[o+n]=0,r[o+n+1]=0,r[o+2*n]=0,r[o+2*n+1]=0,r[o+3*n]=0,r[o+3*n+1]=0,o+=4*n)}},r.prototype.uploadAlpha=function(t,e,i,r,n,o){for(var s=0;s<i;s++){var a=t[e+s].alpha;r[o]=a,r[o+n]=a,r[o+2*n]=a,r[o+3*n]=a,o+=4*n}},r.prototype.destroy=function(){this.renderer.gl&&this.renderer.gl.deleteBuffer(this.indexBuffer),n.ObjectRenderer.prototype.destroy.apply(this,arguments),this.shader.destroy(),this.indices=null,this.tempMatrix=null}},function(t,e,i){function r(t){n.call(this,t,["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","attribute float aColor;","attribute vec2 aPositionCoord;","attribute vec2 aScale;","attribute float aRotation;","uniform mat3 projectionMatrix;","varying vec2 vTextureCoord;","varying float vColor;","void main(void){","   vec2 v = aVertexPosition;","   v.x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);","   v.y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);","   v = v + aPositionCoord;","   gl_Position = vec4((projectionMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);","   vTextureCoord = aTextureCoord;","   vColor = aColor;","}"].join("\n"),["varying vec2 vTextureCoord;","varying float vColor;","uniform sampler2D uSampler;","uniform float uAlpha;","void main(void){","  vec4 color = texture2D(uSampler, vTextureCoord) * vColor * uAlpha;","  if (color.a == 0.0) discard;","  gl_FragColor = color;","}"].join("\n"))}var n=i(86);r.prototype=Object.create(n.prototype),r.prototype.constructor=r,t.exports=r},function(t,e,i){function r(t,e,i,r){this.gl=t,this.vertSize=2,this.vertByteSize=4*this.vertSize,this.size=r,this.dynamicProperties=[],this.staticProperties=[];for(var n=0;n<e.length;n++){var o=e[n];o={attribute:o.attribute,size:o.size,uploadFunction:o.uploadFunction,offset:o.offset},i[n]?this.dynamicProperties.push(o):this.staticProperties.push(o)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.initBuffers()}var n=i(65),o=i(85);r.prototype.constructor=r,t.exports=r,r.prototype.initBuffers=function(){var t,e,i=this.gl,r=0;for(this.indices=o(this.size),this.indexBuffer=n.GLBuffer.createIndexBuffer(i,this.indices,i.STATIC_DRAW),this.dynamicStride=0,t=0;t<this.dynamicProperties.length;t++)e=this.dynamicProperties[t],e.offset=r,r+=e.size,this.dynamicStride+=e.size;this.dynamicData=new Float32Array(this.size*this.dynamicStride*4),this.dynamicBuffer=n.GLBuffer.createVertexBuffer(i,this.dynamicData,i.STREAM_DRAW);var s=0;for(this.staticStride=0,t=0;t<this.staticProperties.length;t++)e=this.staticProperties[t],e.offset=s,s+=e.size,this.staticStride+=e.size;for(this.staticData=new Float32Array(this.size*this.staticStride*4),this.staticBuffer=n.GLBuffer.createVertexBuffer(i,this.staticData,i.STATIC_DRAW),this.vao=new n.VertexArrayObject(i).addIndex(this.indexBuffer),t=0;t<this.dynamicProperties.length;t++)e=this.dynamicProperties[t],this.vao.addAttribute(this.dynamicBuffer,e.attribute,i.FLOAT,!1,4*this.dynamicStride,4*e.offset);for(t=0;t<this.staticProperties.length;t++)e=this.staticProperties[t],this.vao.addAttribute(this.staticBuffer,e.attribute,i.FLOAT,!1,4*this.staticStride,4*e.offset)},r.prototype.uploadDynamic=function(t,e,i){for(var r=0;r<this.dynamicProperties.length;r++){var n=this.dynamicProperties[r];n.uploadFunction(t,e,i,this.dynamicData,this.dynamicStride,n.offset)}this.dynamicBuffer.upload()},r.prototype.uploadStatic=function(t,e,i){for(var r=0;r<this.staticProperties.length;r++){var n=this.staticProperties[r];n.uploadFunction(t,e,i,this.staticData,this.staticStride,n.offset)}this.staticBuffer.upload()},r.prototype.bind=function(){this.vao.bind()},r.prototype.destroy=function(){this.dynamicProperties=null,this.dynamicData=null,this.dynamicBuffer.destroy(),this.staticProperties=null,this.staticData=null,this.staticBuffer.destroy()}},function(t,e,i){t.exports={accessibleTarget:i(200),AccessibilityManager:i(201)}},function(t,e){var i={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:!1};t.exports=i},function(t,e,i){function r(t){(o.tablet||o.phone)&&this.createTouchHook();var e=document.createElement("div");e.style.width="100px",e.style.height="100px",e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.zIndex=2,this.div=e,this.pool=[],this.renderId=0,this.debug=!1,this.renderer=t,this.children=[],this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this.isActive=!1,this.isMobileAccessabillity=!1,window.addEventListener("keydown",this._onKeyDown,!1)}var n=i(9),o=i(12);Object.assign(n.DisplayObject.prototype,i(200)),r.prototype.constructor=r,t.exports=r,r.prototype.createTouchHook=function(){var t=document.createElement("button");t.style.width="1px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.left="-1000px",t.style.zIndex=2,t.style.backgroundColor="#FF0000",t.title="HOOK DIV",t.addEventListener("focus",function(){this.isMobileAccessabillity=!0,this.activate(),document.body.removeChild(t)}.bind(this)),document.body.appendChild(t)},r.prototype.activate=function(){this.isActive||(this.isActive=!0,window.document.addEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),this.renderer.view.parentNode&&this.renderer.view.parentNode.appendChild(this.div))},r.prototype.deactivate=function(){this.isActive&&!this.isMobileAccessabillity&&(this.isActive=!1,window.document.removeEventListener("mousemove",this._onMouseMove),window.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),this.div.parentNode&&this.div.parentNode.removeChild(this.div))},r.prototype.updateAccessibleObjects=function(t){if(t.visible){t.accessible&&t.interactive&&(t._accessibleActive||this.addChild(t),t.renderId=this.renderId);for(var e=t.children,i=e.length-1;i>=0;i--)this.updateAccessibleObjects(e[i])}},r.prototype.update=function(){if(this.renderer.renderingToScreen){this.updateAccessibleObjects(this.renderer._lastObjectRendered);var t=this.renderer.view.getBoundingClientRect(),e=t.width/this.renderer.width,i=t.height/this.renderer.height,r=this.div;r.style.left=t.left+"px",r.style.top=t.top+"px",r.style.width=this.renderer.width+"px",r.style.height=this.renderer.height+"px";for(var o=0;o<this.children.length;o++){var s=this.children[o];if(s.renderId!==this.renderId)s._accessibleActive=!1,n.utils.removeItems(this.children,o,1),this.div.removeChild(s._accessibleDiv),this.pool.push(s._accessibleDiv),s._accessibleDiv=null,o--,0===this.children.length&&this.deactivate();else{r=s._accessibleDiv;var a=s.hitArea,h=s.worldTransform;s.hitArea?(r.style.left=(h.tx+a.x*h.a)*e+"px",r.style.top=(h.ty+a.y*h.d)*i+"px",r.style.width=a.width*h.a*e+"px",r.style.height=a.height*h.d*i+"px"):(a=s.getBounds(),this.capHitArea(a),r.style.left=a.x*e+"px",r.style.top=a.y*i+"px",r.style.width=a.width*e+"px",r.style.height=a.height*i+"px")}}this.renderId++}},r.prototype.capHitArea=function(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0),t.x+t.width>this.renderer.width&&(t.width=this.renderer.width-t.x),t.y+t.height>this.renderer.height&&(t.height=this.renderer.height-t.y)},r.prototype.addChild=function(t){var e=this.pool.pop();e||(e=document.createElement("button"),e.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,e.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex},r.prototype._onClick=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"click",e.eventData)},r.prototype._onFocus=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseover",e.eventData)},r.prototype._onFocusOut=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseout",e.eventData)},r.prototype._onKeyDown=function(t){9===t.keyCode&&this.activate()},r.prototype._onMouseMove=function(){this.deactivate()},r.prototype.destroy=function(){this.div=null;for(var t=0;t<this.children.length;t++)this.children[t].div=null;window.document.removeEventListener("mousemove",this._onMouseMove),window.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},n.WebGLRenderer.registerPlugin("accessibility",r),n.CanvasRenderer.registerPlugin("accessibility",r)},function(t,e,i){t.exports={webGL:i(203),canvas:i(204)}},function(t,e,i){function r(t){this.renderer=t,t.extract=this}var n=i(9),o=new n.Rectangle;r.prototype.constructor=r,t.exports=r,r.prototype.image=function(t){var e=new Image;return e.src=this.base64(t),e},r.prototype.base64=function(t){return this.canvas(t).toDataURL()},r.prototype.canvas=function(t){var e,i,r,s,a=this.renderer,h=!1;t&&(s=t instanceof n.RenderTexture?t:this.renderer.generateTexture(t)),s?(e=s.baseTexture._glRenderTargets[this.renderer.CONTEXT_UID],i=e.resolution,r=s.frame,h=!1):(e=this.renderer.rootRenderTarget,i=e.resolution,h=!0,r=o,r.width=e.size.width,r.height=e.size.height);var u=r.width*i,l=r.height*i,c=new n.CanvasRenderTarget(u,l);if(e){a.bindRenderTarget(e);var p=new Uint8Array(4*u*l),d=a.gl;d.readPixels(r.x*i,r.y*i,u,l,d.RGBA,d.UNSIGNED_BYTE,p);var f=c.context.getImageData(0,0,u,l);f.data.set(p),c.context.putImageData(f,0,0),h&&(c.context.scale(1,-1),c.context.drawImage(c.canvas,0,-l))}return c.canvas},r.prototype.pixels=function(t){var e,i,r,s,a=this.renderer;t&&(s=t instanceof n.RenderTexture?t:this.renderer.generateTexture(t)),s?(e=s.baseTexture._glRenderTargets[this.renderer.CONTEXT_UID],i=e.resolution,r=s.frame):(e=this.renderer.rootRenderTarget,i=e.resolution,r=o,r.width=e.size.width,r.height=e.size.height);var h=r.width*i,u=r.height*i,l=new Uint8Array(4*h*u);if(e){a.bindRenderTarget(e);var c=a.gl;c.readPixels(r.x*i,r.y*i,h,u,c.RGBA,c.UNSIGNED_BYTE,l)}return l},r.prototype.destroy=function(){this.renderer.extract=null,this.renderer=null},n.WebGLRenderer.registerPlugin("extract",r)},function(t,e,i){function r(t){this.renderer=t,t.extract=this}var n=i(9),o=new n.Rectangle;r.prototype.constructor=r,t.exports=r,r.prototype.image=function(t){var e=new Image;return e.src=this.base64(t),e},r.prototype.base64=function(t){return this.canvas(t).toDataURL()},r.prototype.canvas=function(t){var e,i,r,s,a=this.renderer;t&&(s=t instanceof n.RenderTexture?t:a.generateTexture(t)),s?(e=s.baseTexture._canvasRenderTarget.context,i=s.baseTexture._canvasRenderTarget.resolution,r=s.frame):(e=a.rootContext,i=a.rootResolution,r=o,r.width=this.renderer.width,r.height=this.renderer.height);var h=r.width*i,u=r.height*i,l=new n.CanvasRenderTarget(h,u),c=e.getImageData(r.x*i,r.y*i,h,u);return l.context.putImageData(c,0,0),l.canvas},r.prototype.pixels=function(t){var e,i,r,s,a=this.renderer;return t&&(s=t instanceof n.RenderTexture?t:a.generateTexture(t)),s?(e=s.baseTexture._canvasRenderTarget.context,i=s.baseTexture._canvasRenderTarget.resolution,r=s.frame):(e=a.rootContext,i=a.rootResolution,r=o,r.width=a.width,r.height=a.height),e.getImageData(0,0,r.width*i,r.height*i).data},r.prototype.destroy=function(){this.renderer.extract=null,this.renderer=null},n.CanvasRenderer.registerPlugin("extract",r)},function(t,e,i){t.exports={webGL:i(206),canvas:i(207)}},function(t,e,i){function r(t){this.renderer=t,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.register(s,n).register(a,o)}function n(t,e){return e instanceof h.BaseTexture&&(t.textureManager.updateTexture(e),!0)}function o(t,e){return e instanceof h.Graphics&&(t.plugins.graphics.updateGraphics(e),!0)}function s(t,e){if(t instanceof h.BaseTexture)return e.indexOf(t)===-1&&e.push(t),!0;if(t._texture&&t._texture instanceof h.Texture){var i=t._texture.baseTexture;return e.indexOf(i)===-1&&e.push(i),!0}return!1}function a(t,e){return t instanceof h.Graphics&&(e.push(t),!0)}var h=i(9),u=h.ticker.shared;r.UPLOADS_PER_FRAME=4,r.prototype.constructor=r,t.exports=r,r.prototype.upload=function(t,e){"function"==typeof t&&(e=t,t=null),t&&this.add(t),this.queue.length?(this.numLeft=r.UPLOADS_PER_FRAME,this.completes.push(e),this.ticking||(this.ticking=!0,u.add(this.tick,this))):e()},r.prototype.tick=function(){for(var t,e;this.queue.length&&this.numLeft>0;){var i=this.queue[0],n=!1;for(t=0,e=this.uploadHooks.length;t<e;t++)if(this.uploadHooks[t](this.renderer,i)){this.numLeft--,this.queue.shift(),n=!0;break}n||this.queue.shift()}if(this.queue.length)this.numLeft=r.UPLOADS_PER_FRAME;else{this.ticking=!1,u.remove(this.tick,this);var o=this.completes.slice(0);for(this.completes.length=0,t=0,e=o.length;t<e;t++)o[t]()}},r.prototype.register=function(t,e){return t&&this.addHooks.push(t),e&&this.uploadHooks.push(e),this},r.prototype.add=function(t){var e,i;for(e=0,i=this.addHooks.length;e<i&&!this.addHooks[e](t,this.queue);e++);if(t instanceof h.Container)for(e=t.children.length-1;e>=0;e--)this.add(t.children[e]);return this},r.prototype.destroy=function(){this.ticking&&u.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null},h.WebGLRenderer.registerPlugin("prepare",r)},function(t,e,i){function r(){}var n=i(9);r.prototype.constructor=r,t.exports=r,r.prototype.upload=function(t,e){"function"==typeof t&&(e=t,t=null),e()},r.prototype.register=function(){return this},r.prototype.add=function(){return this},r.prototype.destroy=function(){},n.CanvasRenderer.registerPlugin("prepare",r)},function(t,e,i){function r(t){var e=(new Error).stack;"undefined"==typeof e?console.warn("Deprecation Warning: ",t):(e=e.split("\n").splice(3).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cDeprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",t),console.warn(e),console.groupEnd()):(console.warn("Deprecation Warning: ",t),console.warn(e)))}var n=i(9),o=i(188),s=i(194),a=i(112),h=i(120);n.SpriteBatch=function(){throw new ReferenceError("SpriteBatch does not exist any more, please use the new ParticleContainer instead.")},n.AssetLoader=function(){throw new ReferenceError("The loader system was overhauled in pixi v3, please see the new PIXI.loaders.Loader class.")},Object.defineProperties(n,{Stage:{get:function(){return r("You do not need to use a PIXI Stage any more, you can simply render any container."),n.Container}},DisplayObjectContainer:{get:function(){return r("DisplayObjectContainer has been shortened to Container, please use Container from now on."),n.Container}},Strip:{get:function(){return r("The Strip class has been renamed to Mesh and moved to mesh.Mesh, please use mesh.Mesh from now on."),o.Mesh}},Rope:{get:function(){return r("The Rope class has been moved to mesh.Rope, please use mesh.Rope from now on."),o.Rope}},ParticleContainer:{get:function(){return r("The ParticleContainer class has been moved to particles.ParticleContainer, please use particles.ParticleContainer from now on."),s.ParticleContainer}},MovieClip:{get:function(){return r("The MovieClip class has been moved to extras.MovieClip, please use extras.MovieClip from now on."),a.MovieClip}},TilingSprite:{get:function(){return r("The TilingSprite class has been moved to extras.TilingSprite, please use extras.TilingSprite from now on."),a.TilingSprite}},BitmapText:{get:function(){return r("The BitmapText class has been moved to extras.BitmapText, please use extras.BitmapText from now on."),a.BitmapText}},blendModes:{get:function(){return r("The blendModes has been moved to BLEND_MODES, please use BLEND_MODES from now on."),n.BLEND_MODES}},scaleModes:{get:function(){return r("The scaleModes has been moved to SCALE_MODES, please use SCALE_MODES from now on."),n.SCALE_MODES}},BaseTextureCache:{get:function(){return r("The BaseTextureCache class has been moved to utils.BaseTextureCache, please use utils.BaseTextureCache from now on."),n.utils.BaseTextureCache}},TextureCache:{get:function(){return r("The TextureCache class has been moved to utils.TextureCache, please use utils.TextureCache from now on."),n.utils.TextureCache}},math:{get:function(){return r("The math namespace is deprecated, please access members already accessible on PIXI."),n}},AbstractFilter:{get:function(){return r("AstractFilter has been renamed to Filter, please use PIXI.Filter"),n.Filter}},TransformManual:{get:function(){return r("TransformManual has been renamed to TransformBase, please update your pixi-spine"),n.TransformBase}}}),n.DisplayObject.prototype.generateTexture=function(t,e,i){return r("generateTexture has moved to the renderer, please use renderer.generateTexture(displayObject)"),t.generateTexture(this,e,i)},n.Graphics.prototype.generateTexture=function(t,e){return r("graphics generate texture has moved to the renderer. Or to render a graphics to a texture using canvas please use generateCanvasTexture"),this.generateCanvasTexture(t,e)},n.RenderTexture.prototype.render=function(t,e,i,n){this.legacyRenderer.render(t,this,i,e,!n),r("RenderTexture.render is now deprecated, please use renderer.render(displayObject, renderTexture)")},n.RenderTexture.prototype.getImage=function(t){return r("RenderTexture.getImage is now deprecated, please use renderer.extract.image(target)"),this.legacyRenderer.extract.image(t)},n.RenderTexture.prototype.getBase64=function(t){return r("RenderTexture.getBase64 is now deprecated, please use renderer.extract.base64(target)"),this.legacyRenderer.extract.base64(t)},n.RenderTexture.prototype.getCanvas=function(t){return r("RenderTexture.getCanvas is now deprecated, please use renderer.extract.canvas(target)"),this.legacyRenderer.extract.canvas(t)},n.RenderTexture.prototype.getPixels=function(t){return r("RenderTexture.getPixels is now deprecated, please use renderer.extract.pixels(target)"),this.legacyRenderer.pixels(t)},n.Sprite.prototype.setTexture=function(t){this.texture=t,r("setTexture is now deprecated, please use the texture property, e.g : sprite.texture = texture;")},a.BitmapText.prototype.setText=function(t){this.text=t,r("setText is now deprecated, please use the text property, e.g : myBitmapText.text = 'my text';")},n.Text.prototype.setText=function(t){this.text=t,r("setText is now deprecated, please use the text property, e.g : myText.text = 'my text';")},n.Text.prototype.setStyle=function(t){this.style=t,r("setStyle is now deprecated, please use the style property, e.g : myText.style = style;")},Object.defineProperties(n.TextStyle.prototype,{font:{get:function(){r("text style property 'font' is now deprecated, please use the 'fontFamily','fontSize',fontStyle','fontVariant' and 'fontWeight' properties from now on");var t="number"==typeof this._fontSize?this._fontSize+"px":this._fontSize;return this._fontStyle+" "+this._fontVariant+" "+this._fontWeight+" "+t+" "+this._fontFamily},set:function(t){r("text style property 'font' is now deprecated, please use the 'fontFamily','fontSize',fontStyle','fontVariant' and 'fontWeight' properties from now on"),t.indexOf("italic")>1?this._fontStyle="italic":t.indexOf("oblique")>-1?this._fontStyle="oblique":this._fontStyle="normal",t.indexOf("small-caps")>-1?this._fontVariant="small-caps":this._fontVariant="normal";var e,i=t.split(" "),n=-1;for(this._fontSize=26,e=0;e<i.length;++e)if(i[e].match(/(px|pt|em|%)/)){n=e,this._fontSize=i[e];break}for(this._fontWeight="normal",e=0;e<n;++e)if(i[e].match(/(bold|bolder|lighter|100|200|300|400|500|600|700|800|900)/)){this._fontWeight=i[e];break}if(n>-1&&n<i.length-1){for(this._fontFamily="",e=n+1;e<i.length;++e)this._fontFamily+=i[e]+" ";this._fontFamily=this._fontFamily.slice(0,-1)}else this._fontFamily="Arial";this.styleID++}}}),n.Texture.prototype.setFrame=function(t){this.frame=t,r("setFrame is now deprecated, please use the frame property, e.g : myTexture.frame = frame;")},Object.defineProperties(h,{AbstractFilter:{get:function(){return r("AstractFilter has been renamed to Filter, please use PIXI.Filter"),n.AbstractFilter}},SpriteMaskFilter:{get:function(){return r("filters.SpriteMaskFilter is an undocumented alias, please use SpriteMaskFilter from now on."),n.SpriteMaskFilter}}}),n.utils.uuid=function(){return r("utils.uuid() is deprecated, please use utils.uid() from now on."),n.utils.uid()},n.utils.canUseNewCanvasBlendModes=function(){return r("utils.canUseNewCanvasBlendModes() is deprecated, please use CanvasTinter.canUseMultiply from now on"),n.CanvasTinter.canUseMultiply}},function(t,e,i){var r=i(210);"string"==typeof r&&(r=[[t.id,r,""]]);
  i(212)(r,{});r.locals&&(t.exports=r.locals)},function(t,e,i){e=t.exports=i(211)(),e.push([t.id,"body,canvas{margin:0}",""])},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e<this.length;e++){var i=this[e];i[2]?t.push("@media "+i[2]+"{"+i[1]+"}"):t.push(i[1])}return t.join("")},t.i=function(e,i){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},n=0;n<this.length;n++){var o=this[n][0];"number"==typeof o&&(r[o]=!0)}for(n=0;n<e.length;n++){var s=e[n];"number"==typeof s[0]&&r[s[0]]||(i&&!s[2]?s[2]=i:i&&(s[2]="("+s[2]+") and ("+i+")"),t.push(s))}},t}},function(t,e,i){function r(t,e){for(var i=0;i<t.length;i++){var r=t[i],n=d[r.id];if(n){n.refs++;for(var o=0;o<n.parts.length;o++)n.parts[o](r.parts[o]);for(;o<r.parts.length;o++)n.parts.push(u(r.parts[o],e))}else{for(var s=[],o=0;o<r.parts.length;o++)s.push(u(r.parts[o],e));d[r.id]={id:r.id,refs:1,parts:s}}}}function n(t){for(var e=[],i={},r=0;r<t.length;r++){var n=t[r],o=n[0],s=n[1],a=n[2],h=n[3],u={css:s,media:a,sourceMap:h};i[o]?i[o].parts.push(u):e.push(i[o]={id:o,parts:[u]})}return e}function o(t,e){var i=g(),r=m[m.length-1];if("top"===t.insertAt)r?r.nextSibling?i.insertBefore(e,r.nextSibling):i.appendChild(e):i.insertBefore(e,i.firstChild),m.push(e);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");i.appendChild(e)}}function s(t){t.parentNode.removeChild(t);var e=m.indexOf(t);e>=0&&m.splice(e,1)}function a(t){var e=document.createElement("style");return e.type="text/css",o(t,e),e}function h(t){var e=document.createElement("link");return e.rel="stylesheet",o(t,e),e}function u(t,e){var i,r,n;if(e.singleton){var o=x++;i=y||(y=a(e)),r=l.bind(null,i,o,!1),n=l.bind(null,i,o,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(i=h(e),r=p.bind(null,i),n=function(){s(i),i.href&&URL.revokeObjectURL(i.href)}):(i=a(e),r=c.bind(null,i),n=function(){s(i)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else n()}}function l(t,e,i,r){var n=i?"":r.css;if(t.styleSheet)t.styleSheet.cssText=_(e,n);else{var o=document.createTextNode(n),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(o,s[e]):t.appendChild(o)}}function c(t,e){var i=e.css,r=e.media;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}function p(t,e){var i=e.css,r=e.sourceMap;r&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var n=new Blob([i],{type:"text/css"}),o=t.href;t.href=URL.createObjectURL(n),o&&URL.revokeObjectURL(o)}var d={},f=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},v=f(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),g=f(function(){return document.head||document.getElementsByTagName("head")[0]}),y=null,x=0,m=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=v()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var i=n(t);return r(i,e),function(t){for(var o=[],s=0;s<i.length;s++){var a=i[s],h=d[a.id];h.refs--,o.push(h)}if(t){var u=n(t);r(u,e)}for(var s=0;s<o.length;s++){var h=o[s];if(0===h.refs){for(var l=0;l<h.parts.length;l++)h.parts[l]();delete d[h.id]}}}};var _=function(){var t=[];return function(e,i){return t[e]=i,t.filter(Boolean).join("\n")}}()}]);