"use strict";var _typeof2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t){if("object"===("undefined"==typeof exports?"undefined":_typeof2(exports))&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.PIXI=t()}}(function(){var t;return function t(e,i,r){function n(a,o){if(!i[a]){if(!e[a]){var l="function"==typeof require&&require;if(!o&&l)return l(a,!0);if(s)return s(a,!0);var h=new Error("Cannot find module '"+a+"'");throw h.code="MODULE_NOT_FOUND",h}var u=i[a]={exports:{}};e[a][0].call(u.exports,function(t){var i=e[a][1][t];return n(i?i:t)},u,u.exports,t,e,i,r)}return i[a].exports}for(var s="function"==typeof require&&require,a=0;a<r.length;a++)n(r[a]);return n}({1:[function(t,e,i){"use restrict";function r(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 n=32;i.INT_BITS=n,i.INT_MAX=2147483647,i.INT_MIN=-1<<n-1,i.sign=function(t){return(t>0)-(t<0)},i.abs=function(t){var e=t>>n-1;return(t^e)-e},i.min=function(t,e){return e^(t^e)&-(t<e)},i.max=function(t,e){return t^(t^e)&-(t<e)},i.isPow2=function(t){return!(t&t-1||!t)},i.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},i.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},i.popCount=function(t){return t-=t>>>1&1431655765,t=(858993459&t)+(t>>>2&858993459),16843009*(t+(t>>>4)&252645135)>>>24},i.countTrailingZeros=r,i.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},i.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t-(t>>>1)},i.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,t&=15,27030>>>t&1};var s=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}}(s),i.reverse=function(t){return s[255&t]<<24|s[t>>>8&255]<<16|s[t>>>16&255]<<8|s[t>>>24&255]},i.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},i.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},i.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},i.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},i.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},{}],2:[function(t,e,i){function r(t,e,i){i=i||2;var r=e&&e.length,s=r?e[0]*i:t.length,o=n(t,0,s,i,!0),l=[];if(!o)return l;var h,u,d,f,p,_,m;if(r&&(o=c(t,e,o,i)),t.length>80*i){h=d=t[0],u=f=t[1];for(var g=i;g<s;g+=i)p=t[g],_=t[g+1],p<h&&(h=p),_<u&&(u=_),p>d&&(d=p),_>f&&(f=_);m=Math.max(d-h,f-u)}return a(o,l,i,h,u,m),l}function n(t,e,i,r,n){var s,a;if(n===M(t,e,i,r)>0)for(s=e;s<i;s+=r)a=P(s,t[s],t[s+1],a);else for(s=i-r;s>=e;s-=r)a=P(s,t[s],t[s+1],a);return a&&x(a,a.next)&&(O(a),a=a.next),a}function s(t,e){if(!t)return t;e||(e=t);var i,r=t;do if(i=!1,r.steiner||!x(r,r.next)&&0!==b(r.prev,r,r.next))r=r.next;else{if(O(r),r=e=r.prev,r===r.next)return null;i=!0}while(i||r!==e);return e}function a(t,e,i,r,n,c,d){if(t){!d&&c&&_(t,r,n,c);for(var f,p,m=t;t.prev!==t.next;)if(f=t.prev,p=t.next,c?l(t,r,n,c):o(t))e.push(f.i/i),e.push(t.i/i),e.push(p.i/i),O(t),t=p.next,m=p.next;else if(t=p,t===m){d?1===d?(t=h(t,e,i),a(t,e,i,r,n,c,2)):2===d&&u(t,e,i,r,n,c):a(s(t),e,i,r,n,c,1);break}}}function o(t){var e=t.prev,i=t,r=t.next;if(b(e,i,r)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(y(e.x,e.y,i.x,i.y,r.x,r.y,n.x,n.y)&&b(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function l(t,e,i,r){var n=t.prev,s=t,a=t.next;if(b(n,s,a)>=0)return!1;for(var o=n.x<s.x?n.x<a.x?n.x:a.x:s.x<a.x?s.x:a.x,l=n.y<s.y?n.y<a.y?n.y:a.y:s.y<a.y?s.y:a.y,h=n.x>s.x?n.x>a.x?n.x:a.x:s.x>a.x?s.x:a.x,u=n.y>s.y?n.y>a.y?n.y:a.y:s.y>a.y?s.y:a.y,c=g(o,l,e,i,r),d=g(h,u,e,i,r),f=t.nextZ;f&&f.z<=d;){if(f!==t.prev&&f!==t.next&&y(n.x,n.y,s.x,s.y,a.x,a.y,f.x,f.y)&&b(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(f=t.prevZ;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&y(n.x,n.y,s.x,s.y,a.x,a.y,f.x,f.y)&&b(f.prev,f,f.next)>=0)return!1;f=f.prevZ}return!0}function h(t,e,i){var r=t;do{var n=r.prev,s=r.next.next;!x(n,s)&&w(n,r,r.next,s)&&S(n,s)&&S(s,n)&&(e.push(n.i/i),e.push(r.i/i),e.push(s.i/i),O(r),O(r.next),r=t=s),r=r.next}while(r!==t);return r}function u(t,e,i,r,n,o){var l=t;do{for(var h=l.next.next;h!==l.prev;){if(l.i!==h.i&&T(l,h)){var u=A(l,h);return l=s(l,l.next),u=s(u,u.next),a(l,e,i,r,n,o),void a(u,e,i,r,n,o)}h=h.next}l=l.next}while(l!==t)}function c(t,e,i,r){var a,o,l,h,u,c=[];for(a=0,o=e.length;a<o;a++)l=e[a]*r,h=a<o-1?e[a+1]*r:t.length,u=n(t,l,h,r,!1),u===u.next&&(u.steiner=!0),c.push(v(u));for(c.sort(d),a=0;a<c.length;a++)f(c[a],i),i=s(i,i.next);return i}function d(t,e){return t.x-e.x}function f(t,e){if(e=p(t,e)){var i=A(e,t);s(i,i.next)}}function p(t,e){var i,r=e,n=t.x,s=t.y,a=-(1/0);do{if(s<=r.y&&s>=r.next.y){var o=r.x+(s-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(o<=n&&o>a){if(a=o,o===n){if(s===r.y)return r;if(s===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===a)return i.prev;var l,h=i,u=i.x,c=i.y,d=1/0;for(r=i.next;r!==h;)n>=r.x&&r.x>=u&&y(s<c?n:a,s,u,c,s<c?a:n,s,r.x,r.y)&&(l=Math.abs(s-r.y)/(n-r.x),(l<d||l===d&&r.x>i.x)&&S(r,t)&&(i=r,d=l)),r=r.next;return i}function _(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,m(n)}function m(t){var e,i,r,n,s,a,o,l,h=1;do{for(i=t,t=null,s=null,a=0;i;){for(a++,r=i,o=0,e=0;e<h&&(o++,r=r.nextZ,r);e++);for(l=h;o>0||l>0&&r;)0===o?(n=r,r=r.nextZ,l--):0!==l&&r?i.z<=r.z?(n=i,i=i.nextZ,o--):(n=r,r=r.nextZ,l--):(n=i,i=i.nextZ,o--),s?s.nextZ=n:t=n,n.prevZ=s,s=n;i=r}s.nextZ=null,h*=2}while(a>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 v(t){var e=t,i=t;do e.x<i.x&&(i=e),e=e.next;while(e!==t);return i}function y(t,e,i,r,n,s,a,o){return(n-a)*(e-o)-(t-a)*(s-o)>=0&&(t-a)*(r-o)-(i-a)*(e-o)>=0&&(i-a)*(s-o)-(n-a)*(r-o)>=0}function T(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!E(t,e)&&S(t,e)&&S(e,t)&&D(t,e)}function b(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function x(t,e){return t.x===e.x&&t.y===e.y}function w(t,e,i,r){return!!(x(t,e)&&x(i,r)||x(t,r)&&x(i,e))||b(t,e,i)>0!=b(t,e,r)>0&&b(i,r,t)>0!=b(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&&w(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}function S(t,e){return b(t.prev,t,t.next)<0?b(t,e,t.next)>=0&&b(t,t.prev,e)>=0:b(t,e,t.prev)<0||b(t,t.next,e)<0}function D(t,e){var i=t,r=!1,n=(t.x+e.x)/2,s=(t.y+e.y)/2;do i.y>s!=i.next.y>s&&n<(i.next.x-i.x)*(s-i.y)/(i.next.y-i.y)+i.x&&(r=!r),i=i.next;while(i!==t);return r}function A(t,e){var i=new C(t.i,t.x,t.y),r=new C(e.i,e.x,e.y),n=t.next,s=e.prev;return t.next=e,e.prev=t,i.next=n,n.prev=i,r.next=i,i.prev=r,s.next=r,r.prev=s,r}function P(t,e,i,r){var n=new C(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 O(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 C(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 M(t,e,i,r){for(var n=0,s=e,a=i-r;s<i;s+=r)n+=(t[a]-t[s])*(t[s+1]+t[a+1]),a=s;return n}e.exports=r,r.deviation=function(t,e,i,r){var n=e&&e.length,s=n?e[0]*i:t.length,a=Math.abs(M(t,0,s,i));if(n)for(var o=0,l=e.length;o<l;o++){var h=e[o]*i,u=o<l-1?e[o+1]*i:t.length;a-=Math.abs(M(t,h,u,i))}var c=0;for(o=0;o<r.length;o+=3){var d=r[o]*i,f=r[o+1]*i,p=r[o+2]*i;c+=Math.abs((t[d]-t[p])*(t[f+1]-t[d+1])-(t[d]-t[f])*(t[p+1]-t[d+1]))}return 0===a&&0===c?0:Math.abs((c-a)/a)},r.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 s=0;s<t[n].length;s++)for(var a=0;a<e;a++)i.vertices.push(t[n][s][a]);n>0&&(r+=t[n-1].length,i.holes.push(r))}return i}},{}],3:[function(t,e,i){function r(){}function n(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function s(){this._events=new r,this._eventsCount=0}var a=Object.prototype.hasOwnProperty,o="~";Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(o=!1)),s.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)a.call(t,e)&&i.push(o?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},s.prototype.listeners=function(t,e){var i=o?o+t:t,r=this._events[i];if(e)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var n=0,s=r.length,a=new Array(s);n<s;n++)a[n]=r[n].fn;return a},s.prototype.emit=function(t,e,i,r,n,s){var a=o?o+t:t;if(!this._events[a])return!1;var l,h,u=this._events[a],c=arguments.length;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),c){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,e),!0;case 3:return u.fn.call(u.context,e,i),!0;case 4:return u.fn.call(u.context,e,i,r),!0;case 5:return u.fn.call(u.context,e,i,r,n),!0;case 6:return u.fn.call(u.context,e,i,r,n,s),!0}for(h=1,l=new Array(c-1);h<c;h++)l[h-1]=arguments[h];u.fn.apply(u.context,l)}else{var d,f=u.length;for(h=0;h<f;h++)switch(u[h].once&&this.removeListener(t,u[h].fn,void 0,!0),c){case 1:u[h].fn.call(u[h].context);break;case 2:u[h].fn.call(u[h].context,e);break;case 3:u[h].fn.call(u[h].context,e,i);break;case 4:u[h].fn.call(u[h].context,e,i,r);break;default:if(!l)for(d=1,l=new Array(c-1);d<c;d++)l[d-1]=arguments[d];u[h].fn.apply(u[h].context,l)}}return!0},s.prototype.on=function(t,e,i){var r=new n(e,i||this),s=o?o+t:t;return this._events[s]?this._events[s].fn?this._events[s]=[this._events[s],r]:this._events[s].push(r):(this._events[s]=r,this._eventsCount++),this},s.prototype.once=function(t,e,i){var r=new n(e,i||this,!0),s=o?o+t:t;return this._events[s]?this._events[s].fn?this._events[s]=[this._events[s],r]:this._events[s].push(r):(this._events[s]=r,this._eventsCount++),this},s.prototype.removeListener=function(t,e,i,n){var s=o?o+t:t;if(!this._events[s])return this;if(!e)return 0===--this._eventsCount?this._events=new r:delete this._events[s],this;var a=this._events[s];if(a.fn)a.fn!==e||n&&!a.once||i&&a.context!==i||(0===--this._eventsCount?this._events=new r:delete this._events[s]);else{for(var l=0,h=[],u=a.length;l<u;l++)(a[l].fn!==e||n&&!a[l].once||i&&a[l].context!==i)&&h.push(a[l]);h.length?this._events[s]=1===h.length?h[0]:h:0===--this._eventsCount?this._events=new r:delete this._events[s]}return this},s.prototype.removeAllListeners=function(t){var e;return t?(e=o?o+t:t,this._events[e]&&(0===--this._eventsCount?this._events=new r:delete this._events[e])):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prototype.setMaxListeners=function(){return this},s.prefixed=o,s.EventEmitter=s,"undefined"!=typeof e&&(e.exports=s)},{}],4:[function(e,i,r){!function(e){var r=/iPhone/i,n=/iPod/i,s=/iPad/i,a=/(?=.*\bAndroid\b)(?=.*\bMobile\b)/i,o=/Android/i,l=/(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i,h=/(?=.*\bAndroid\b)(?=.*\b(?:KFOT|KFTT|KFJWI|KFJWA|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|KFARWI|KFASWI|KFSAWI|KFSAWA)\b)/i,u=/IEMobile/i,c=/(?=.*\bWindows\b)(?=.*\bARM\b)/i,d=/BlackBerry/i,f=/BB10/i,p=/Opera Mini/i,_=/(CriOS|Chrome)(?=.*\bMobile\b)/i,m=/(?=.*\bFirefox\b)(?=.*\bMobile\b)/i,g=new RegExp("(?:Nexus 7|BNTV250|Kindle Fire|Silk|GT-P1000)","i"),v=function(t,e){return t.test(e)},y=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:v(r,e),ipod:v(n,e),tablet:!v(r,e)&&v(s,e),device:v(r,e)||v(n,e)||v(s,e)},this.amazon={phone:v(l,e),tablet:!v(l,e)&&v(h,e),device:v(l,e)||v(h,e)},this.android={phone:v(l,e)||v(a,e),tablet:!v(l,e)&&!v(a,e)&&(v(h,e)||v(o,e)),device:v(l,e)||v(h,e)||v(a,e)||v(o,e)},this.windows={phone:v(u,e),tablet:v(c,e),device:v(u,e)||v(c,e)},this.other={blackberry:v(d,e),blackberry10:v(f,e),opera:v(p,e),firefox:v(m,e),chrome:v(_,e),device:v(d,e)||v(f,e)||v(p,e)||v(m,e)||v(_,e)},this.seven_inch=v(g,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},T=function(){var t=new y;return t.Class=y,t};"undefined"!=typeof i&&i.exports&&"undefined"==typeof window?i.exports=y:"undefined"!=typeof i&&i.exports&&"undefined"!=typeof window?i.exports=T():"function"==typeof t&&t.amd?t("isMobile",[],e.isMobile=T()):e.isMobile=T()}(this)},{}],5:[function(t,e,i){function r(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function n(){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(t){return!1}}var s=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=n()?Object.assign:function(t,e){for(var i,n,o=r(t),l=1;l<arguments.length;l++){i=Object(arguments[l]);for(var h in i)s.call(i,h)&&(o[h]=i[h]);if(Object.getOwnPropertySymbols){n=Object.getOwnPropertySymbols(i);for(var u=0;u<n.length;u++)a.call(i,n[u])&&(o[n[u]]=i[n[u]])}}return o}},{}],6:[function(t,e,i){var r=new ArrayBuffer(0),n=function(t,e,i,n){this.gl=t,this.buffer=t.createBuffer(),this.type=e||t.ARRAY_BUFFER,this.drawType=n||t.STATIC_DRAW,this.data=r,i&&this.upload(i)};n.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},n.prototype.bind=function(){var t=this.gl;t.bindBuffer(this.type,this.buffer)},n.createVertexBuffer=function(t,e,i){return new n(t,t.ARRAY_BUFFER,e,i)},n.createIndexBuffer=function(t,e,i){return new n(t,t.ELEMENT_ARRAY_BUFFER,e,i)},n.create=function(t,e,i,r){return new n(t,e,i,r)},n.prototype.destroy=function(){this.gl.deleteBuffer(this.buffer)},e.exports=n},{}],7:[function(t,e,i){var r=t("./GLTexture"),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;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,s){var a=r.fromData(t,null,e,i);a.enableNearestScaling(),a.enableWrapClamp();var o=new n(t,e,i);return o.enableTexture(a),o.unbind(),o},n.createFloat32=function(t,e,i,s){var a=new r.fromData(t,s,e,i);a.enableNearestScaling(),a.enableWrapClamp();var o=new n(t,e,i);return o.enableTexture(a),o.unbind(),o},e.exports=n},{"./GLTexture":9}],8:[function(t,e,i){var r=t("./shader/compileProgram"),n=t("./shader/extractAttributes"),s=t("./shader/extractUniforms"),a=t("./shader/generateUniformAccessObject"),o=function(t,e,i){this.gl=t,this.program=r(t,e,i),this.attributes=n(t,this.program);var o=s(t,this.program);this.uniforms=a(t,o)};o.prototype.bind=function(){this.gl.useProgram(this.program)},o.prototype.destroy=function(){},e.exports=o},{"./shader/compileProgram":14,"./shader/extractAttributes":16,"./shader/extractUniforms":17,"./shader/generateUniformAccessObject":18}],9:[function(t,e,i){var r=function(t,e,i,r,n){this.gl=t,this.texture=t.createTexture(),this.mipmap=!1,this.premultiplyAlpha=!1,this.width=e||-1,this.height=i||-1,this.format=r||t.RGBA,this.type=n||t.UNSIGNED_BYTE};r.prototype.upload=function(t){this.bind();var e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha);var i=t.videoWidth||t.width,r=t.videoHeight||t.height;r!==this.height||i!==this.width?e.texImage2D(e.TEXTURE_2D,0,this.format,this.format,this.type,t):e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.format,this.type,t),this.width=i,this.height=r};var n=!1;r.prototype.uploadData=function(t,e,i){this.bind();var r=this.gl;if(t instanceof Float32Array){if(!n){var s=r.getExtension("OES_texture_float");if(!s)throw new Error("floating point textures not available");n=!0}this.type=r.FLOAT}else this.type=r.UNSIGNED_BYTE;r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),e!==this.width||i!==this.height?r.texImage2D(r.TEXTURE_2D,0,this.format,e,i,0,this.format,this.type,t||null):r.texSubImage2D(r.TEXTURE_2D,0,0,0,e,i,this.format,this.type,t||null),this.width=e,this.height=i},r.prototype.bind=function(t){var e=this.gl;void 0!==t&&e.activeTexture(e.TEXTURE0+t),e.bindTexture(e.TEXTURE_2D,this.texture)},r.prototype.unbind=function(){var t=this.gl;t.bindTexture(t.TEXTURE_2D,null)},r.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)},r.prototype.magFilter=function(t){var e=this.gl;this.bind(),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t?e.LINEAR:e.NEAREST)},r.prototype.enableMipmap=function(){var t=this.gl;this.bind(),this.mipmap=!0,t.generateMipmap(t.TEXTURE_2D)},r.prototype.enableLinearScaling=function(){this.minFilter(!0),this.magFilter(!0)},r.prototype.enableNearestScaling=function(){this.minFilter(!1),this.magFilter(!1)},r.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)},r.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)},r.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)},r.prototype.destroy=function(){var t=this.gl;t.deleteTexture(this.texture)},r.fromSource=function(t,e,i){var n=new r(t);return n.premultiplyAlpha=i||!1,n.upload(e),n},r.fromData=function(t,e,i,n){var s=new r(t);return s.uploadData(e,i,n),s},e.exports=r},{}],10:[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=t("./setVertexAttribArrays");r.prototype.constructor=r,e.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,s){return this.attributes.push({buffer:t,attribute:e,location:e.location,type:i||this.gl.FLOAT,normalized:r||!1,stride:n||0,start:s||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}},{"./setVertexAttribArrays":13}],11:[function(t,e,i){var r=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};e.exports=r},{}],12:[function(t,e,i){var r={createContext:t("./createContext"),setVertexAttribArrays:t("./setVertexAttribArrays"),GLBuffer:t("./GLBuffer"),GLFramebuffer:t("./GLFramebuffer"),GLShader:t("./GLShader"),GLTexture:t("./GLTexture"),VertexArrayObject:t("./VertexArrayObject"),shader:t("./shader")};"undefined"!=typeof e&&e.exports&&(e.exports=r),"undefined"!=typeof window&&(window.PIXI=window.PIXI||{},window.PIXI.glCore=r)},{"./GLBuffer":6,"./GLFramebuffer":7,"./GLShader":8,"./GLTexture":9,"./VertexArrayObject":10,"./createContext":11,"./setVertexAttribArrays":13,"./shader":19}],13:[function(t,e,i){var r=function(t,e,i){var r;if(i){var n=i.tempAttribState,s=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<s.length;r++)s[r]!==n[r]&&(s[r]=n[r],i.attribState[r]?t.enableVertexAttribArray(r):t.disableVertexAttribArray(r))}else for(r=0;r<e.length;r++){var a=e[r];t.enableVertexAttribArray(a.attribute.location)}};e.exports=r},{}],14:[function(t,e,i){var r=function(t,e,i){var r=n(t,t.VERTEX_SHADER,e),s=n(t,t.FRAGMENT_SHADER,i),a=t.createProgram();return t.attachShader(a,r),t.attachShader(a,s),t.linkProgram(a),t.getProgramParameter(a,t.LINK_STATUS)||(console.error("Pixi.js Error: Could not initialize shader."),console.error("gl.VALIDATE_STATUS",t.getProgramParameter(a,t.VALIDATE_STATUS)),console.error("gl.getError()",t.getError()),""!==t.getProgramInfoLog(a)&&console.warn("Pixi.js Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(a)),t.deleteProgram(a),a=null),t.deleteShader(r),t.deleteShader(s),a},n=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)};e.exports=r},{}],15:[function(t,e,i){var r=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 n(2*e);case"bvec3":return n(3*e);case"bvec4":return n(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])}},n=function(t){for(var e=new Array(t),i=0;i<e.length;i++)e[i]=!1;return e};e.exports=r},{}],16:[function(t,e,i){var r=t("./mapType"),n=t("./mapSize"),s=function(t,e){for(var i={},s=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),o=0;o<s;o++){var l=t.getActiveAttrib(e,o),h=r(t,l.type);i[l.name]={type:h,size:n(h),location:t.getAttribLocation(e,l.name),pointer:a}}return i},a=function(t,e,i,r){gl.vertexAttribPointer(this.location,this.size,t||gl.FLOAT,e||!1,i||0,r||0)};e.exports=s},{"./mapSize":20,"./mapType":21}],17:[function(t,e,i){var r=t("./mapType"),n=t("./defaultValue"),s=function(t,e){for(var i={},s=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),a=0;a<s;a++){var o=t.getActiveUniform(e,a),l=o.name.replace(/\[.*?\]/,""),h=r(t,o.type);i[l]={type:h,size:o.size,location:t.getUniformLocation(e,l),value:n(h,o.size)}}return i};e.exports=s},{"./defaultValue":15,"./mapType":21}],18:[function(t,e,i){var r=function(t,e){var i={data:{}};i.gl=t;for(var r=Object.keys(e),o=0;o<r.length;o++){var l=r[o],h=l.split("."),u=h[h.length-1],c=a(h,i),d=e[l];c.data[u]=d,c.gl=t,Object.defineProperty(c,u,{get:n(u),set:s(u,d)})}return i},n=function(t){var e=o.replace("%%",t);return new Function(e)},s=function(t,e){var i,r=l.replace(/%%/g,t);return i=1===e.size?h[e.type]:u[e.type],i&&(r+="\nthis.gl."+i+";"),new Function("value",r)},a=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},o=["return this.data.%%.value;"].join("\n"),l=["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)"};e.exports=r},{}],19:[function(t,e,i){e.exports={compileProgram:t("./compileProgram"),defaultValue:t("./defaultValue"),extractAttributes:t("./extractAttributes"),extractUniforms:t("./extractUniforms"),generateUniformAccessObject:t("./generateUniformAccessObject"),mapSize:t("./mapSize"),mapType:t("./mapType")}},{"./compileProgram":14,"./defaultValue":15,"./extractAttributes":16,"./extractUniforms":17,"./generateUniformAccessObject":18,"./mapSize":20,"./mapType":21}],20:[function(t,e,i){var r=function(t){return n[t]},n={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};e.exports=r},{}],21:[function(t,e,i){var r=function(t,e){if(!n){var i=Object.keys(s);n={};for(var r=0;r<i.length;++r){var a=i[r];n[t[a]]=s[a]}}return n[e]},n=null,s={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"};e.exports=r},{}],22:[function(t,e,i){(function(t){function e(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}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,s=function(t){return n.exec(t).slice(1)};i.resolve=function(){for(var i="",n=!1,s=arguments.length-1;s>=-1&&!n;s--){var a=s>=0?arguments[s]:t.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(i=a+"/"+i,n="/"===a.charAt(0))}return i=e(r(i.split("/"),function(t){return!!t}),!n).join("/"),(n?"/":"")+i||"."},i.normalize=function(t){var n=i.isAbsolute(t),s="/"===a(t,-1);return t=e(r(t.split("/"),function(t){return!!t}),!n).join("/"),t||n||(t="."),t&&s&&(t+="/"),(n?"/":"")+t},i.isAbsolute=function(t){return"/"===t.charAt(0)},i.join=function(){var t=Array.prototype.slice.call(arguments,0);return i.normalize(r(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},i.relative=function(t,e){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=i.resolve(t).substr(1),e=i.resolve(e).substr(1);for(var n=r(t.split("/")),s=r(e.split("/")),a=Math.min(n.length,s.length),o=a,l=0;l<a;l++)if(n[l]!==s[l]){o=l;break}for(var h=[],l=o;l<n.length;l++)h.push("..");return h=h.concat(s.slice(o)),h.join("/")},i.sep="/",i.delimiter=":",i.dirname=function(t){var e=s(t),i=e[0],r=e[1];return i||r?(r&&(r=r.substr(0,r.length-1)),i+r):"."},i.basename=function(t,e){var i=s(t)[2];return e&&i.substr(-1*e.length)===e&&(i=i.substr(0,i.length-e.length)),i},i.extname=function(t){return s(t)[3]};var a="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(this,t("_process"))},{_process:23}],23:[function(t,e,i){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function s(t){if(c===setTimeout)return setTimeout(t,0);if((c===r||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function a(t){if(d===clearTimeout)return clearTimeout(t);if((d===n||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(t);try{return d(t)}catch(e){try{return d.call(null,t)}catch(e){return d.call(this,t)}}}function o(){m&&p&&(m=!1,p.length?_=p.concat(_):g=-1,_.length&&l())}function l(){if(!m){var t=s(o);m=!0;for(var e=_.length;e;){for(p=_,_=[];++g<e;)p&&p[g].run(); g=-1,e=_.length}p=null,m=!1,a(t)}}function h(t,e){this.fun=t,this.array=e}function u(){}var c,d,f=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:r}catch(t){c=r}try{d="function"==typeof clearTimeout?clearTimeout:n}catch(t){d=n}}();var p,_=[],m=!1,g=-1;f.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];_.push(new h(t,e)),1!==_.length||m||s(l)},h.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,f.emit=u,f.binding=function(t){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(t){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],24:[function(e,i,r){(function(e){!function(n){function s(t){throw new RangeError(I[t])}function a(t,e){for(var i=t.length,r=[];i--;)r[i]=e(t[i]);return r}function o(t,e){var i=t.split("@"),r="";i.length>1&&(r=i[0]+"@",t=i[1]),t=t.replace(R,".");var n=t.split("."),s=a(n,e).join(".");return r+s}function l(t){for(var e,i,r=[],n=0,s=t.length;n<s;)e=t.charCodeAt(n++),e>=55296&&e<=56319&&n<s?(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 h(t){return a(t,function(t){var e="";return t>65535&&(t-=65536,e+=F(t>>>10&1023|55296),t=56320|1023&t),e+=F(t)}).join("")}function u(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:w}function c(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function d(t,e,i){var r=0;for(t=i?j(t/A):t>>1,t+=j(t/e);t>N*S>>1;r+=w)t=j(t/N);return j(r+(N+1)*t/(t+D))}function f(t){var e,i,r,n,a,o,l,c,f,p,_=[],m=t.length,g=0,v=O,y=P;for(i=t.lastIndexOf(C),i<0&&(i=0),r=0;r<i;++r)t.charCodeAt(r)>=128&&s("not-basic"),_.push(t.charCodeAt(r));for(n=i>0?i+1:0;n<m;){for(a=g,o=1,l=w;n>=m&&s("invalid-input"),c=u(t.charCodeAt(n++)),(c>=w||c>j((x-g)/o))&&s("overflow"),g+=c*o,f=l<=y?E:l>=y+S?S:l-y,!(c<f);l+=w)p=w-f,o>j(x/p)&&s("overflow"),o*=p;e=_.length+1,y=d(g-a,e,0==a),j(g/e)>x-v&&s("overflow"),v+=j(g/e),g%=e,_.splice(g++,0,v)}return h(_)}function p(t){var e,i,r,n,a,o,h,u,f,p,_,m,g,v,y,T=[];for(t=l(t),m=t.length,e=O,i=0,a=P,o=0;o<m;++o)_=t[o],_<128&&T.push(F(_));for(r=n=T.length,n&&T.push(C);r<m;){for(h=x,o=0;o<m;++o)_=t[o],_>=e&&_<h&&(h=_);for(g=r+1,h-e>j((x-i)/g)&&s("overflow"),i+=(h-e)*g,e=h,o=0;o<m;++o)if(_=t[o],_<e&&++i>x&&s("overflow"),_==e){for(u=i,f=w;p=f<=a?E:f>=a+S?S:f-a,!(u<p);f+=w)y=u-p,v=w-p,T.push(F(c(p+y%v,0))),u=j(y/v);T.push(F(c(u,0))),a=d(i,g,r==n),i=0,++r}++i,++e}return T.join("")}function _(t){return o(t,function(t){return M.test(t)?f(t.slice(4).toLowerCase()):t})}function m(t){return o(t,function(t){return L.test(t)?"xn--"+p(t):t})}var g="object"==("undefined"==typeof r?"undefined":_typeof2(r))&&r&&!r.nodeType&&r,v="object"==("undefined"==typeof i?"undefined":_typeof2(i))&&i&&!i.nodeType&&i,y="object"==("undefined"==typeof e?"undefined":_typeof2(e))&&e;y.global!==y&&y.window!==y&&y.self!==y||(n=y);var T,b,x=2147483647,w=36,E=1,S=26,D=38,A=700,P=72,O=128,C="-",M=/^xn--/,L=/[^\x20-\x7E]/,R=/[\x2E\u3002\uFF0E\uFF61]/g,I={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},N=w-E,j=Math.floor,F=String.fromCharCode;if(T={version:"1.4.1",ucs2:{decode:l,encode:h},decode:f,encode:p,toASCII:m,toUnicode:_},"function"==typeof t&&"object"==_typeof2(t.amd)&&t.amd)t("punycode",function(){return T});else if(g&&v)if(i.exports==g)v.exports=T;else for(b in T)T.hasOwnProperty(b)&&(g[b]=T[b]);else n.punycode=T}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],25:[function(t,e,i){function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,i,s){e=e||"&",i=i||"=";var a={};if("string"!=typeof t||0===t.length)return a;var o=/\+/g;t=t.split(e);var l=1e3;s&&"number"==typeof s.maxKeys&&(l=s.maxKeys);var h=t.length;l>0&&h>l&&(h=l);for(var u=0;u<h;++u){var c,d,f,p,_=t[u].replace(o,"%20"),m=_.indexOf(i);m>=0?(c=_.substr(0,m),d=_.substr(m+1)):(c=_,d=""),f=decodeURIComponent(c),p=decodeURIComponent(d),r(a,f)?n(a[f])?a[f].push(p):a[f]=[a[f],p]:a[f]=p}return a};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],26:[function(t,e,i){function r(t,e){if(t.map)return t.map(e);for(var i=[],r=0;r<t.length;r++)i.push(e(t[r],r));return i}var n=function(t){switch("undefined"==typeof t?"undefined":_typeof2(t)){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};e.exports=function(t,e,i,o){return e=e||"&",i=i||"=",null===t&&(t=void 0),"object"===("undefined"==typeof t?"undefined":_typeof2(t))?r(a(t),function(a){var o=encodeURIComponent(n(a))+i;return s(t[a])?r(t[a],function(t){return o+encodeURIComponent(n(t))}).join(e):o+encodeURIComponent(n(t[a]))}).join(e):o?encodeURIComponent(n(o))+i+encodeURIComponent(n(t)):""};var s=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},a=Object.keys||function(t){var e=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.push(i);return e}},{}],27:[function(t,e,i){i.decode=i.parse=t("./decode"),i.encode=i.stringify=t("./encode")},{"./decode":25,"./encode":26}],28:[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&&h.isObject(t)&&t instanceof r)return t;var n=new r;return n.parse(t,e,i),n}function s(t){return h.isString(t)&&(t=n(t)),t instanceof r?t.format():r.prototype.format.call(t)}function a(t,e){return n(t,!1,!0).resolve(e)}function o(t,e){return t?n(t,!1,!0).resolveObject(e):e}var l=t("punycode"),h=t("./util");i.parse=n,i.resolve=a,i.resolveObject=o,i.format=s,i.Url=r;var u=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,d=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,f=["<",">",'"',"`"," ","\r","\n","\t"],p=["{","}","|","\\","^","`"].concat(f),_=["'"].concat(p),m=["%","/","?",";","#"].concat(_),g=["/","?","#"],v=255,y=/^[+a-z0-9A-Z_-]{0,63}$/,T=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},x={javascript:!0,"javascript:":!0},w={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},E=t("querystring");r.prototype.parse=function(t,e,i){if(!h.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+("undefined"==typeof t?"undefined":_typeof2(t)));var r=t.indexOf("?"),n=r!==-1&&r<t.indexOf("#")?"?":"#",s=t.split(n),a=/\\/g;s[0]=s[0].replace(a,"/"),t=s.join(n);var o=t;if(o=o.trim(),!i&&1===t.split("#").length){var c=d.exec(o);if(c)return this.path=o,this.href=o,this.pathname=c[1],c[2]?(this.search=c[2],e?this.query=E.parse(this.search.substr(1)):this.query=this.search.substr(1)):e&&(this.search="",this.query={}),this}var f=u.exec(o);if(f){f=f[0];var p=f.toLowerCase();this.protocol=p,o=o.substr(f.length)}if(i||f||o.match(/^\/\/[^@\/]+@[^@\/]+/)){var S="//"===o.substr(0,2);!S||f&&x[f]||(o=o.substr(2),this.slashes=!0)}if(!x[f]&&(S||f&&!w[f])){for(var D=-1,A=0;A<g.length;A++){var P=o.indexOf(g[A]);P!==-1&&(D===-1||P<D)&&(D=P)}var O,C;C=D===-1?o.lastIndexOf("@"):o.lastIndexOf("@",D),C!==-1&&(O=o.slice(0,C),o=o.slice(C+1),this.auth=decodeURIComponent(O)),D=-1;for(var A=0;A<m.length;A++){var P=o.indexOf(m[A]);P!==-1&&(D===-1||P<D)&&(D=P)}D===-1&&(D=o.length),this.host=o.slice(0,D),o=o.slice(D),this.parseHost(),this.hostname=this.hostname||"";var M="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!M)for(var L=this.hostname.split(/\./),A=0,R=L.length;A<R;A++){var I=L[A];if(I&&!I.match(y)){for(var N="",j=0,F=I.length;j<F;j++)N+=I.charCodeAt(j)>127?"x":I[j];if(!N.match(y)){var B=L.slice(0,A),k=L.slice(A+1),U=I.match(T);U&&(B.push(U[1]),k.unshift(U[2])),k.length&&(o="/"+k.join(".")+o),this.hostname=B.join(".");break}}}this.hostname.length>v?this.hostname="":this.hostname=this.hostname.toLowerCase(),M||(this.hostname=l.toASCII(this.hostname));var X=this.port?":"+this.port:"",H=this.hostname||"";this.host=H+X,this.href+=this.host,M&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==o[0]&&(o="/"+o))}if(!b[p])for(var A=0,R=_.length;A<R;A++){var V=_[A];if(o.indexOf(V)!==-1){var Y=encodeURIComponent(V);Y===V&&(Y=escape(V)),o=o.split(V).join(Y)}}var G=o.indexOf("#");G!==-1&&(this.hash=o.substr(G),o=o.slice(0,G));var W=o.indexOf("?");if(W!==-1?(this.search=o.substr(W),this.query=o.substr(W+1),e&&(this.query=E.parse(this.query)),o=o.slice(0,W)):e&&(this.search="",this.query={}),o&&(this.pathname=o),w[p]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var X=this.pathname||"",q=this.search||"";this.path=X+q}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,s="";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&&h.isObject(this.query)&&Object.keys(this.query).length&&(s=E.stringify(this.query));var a=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||w[e])&&n!==!1?(n="//"+(n||""),i&&"/"!==i.charAt(0)&&(i="/"+i)):n||(n=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),i=i.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),a=a.replace("#","%23"),e+n+i+a+r},r.prototype.resolve=function(t){return this.resolveObject(n(t,!1,!0)).format()},r.prototype.resolveObject=function(t){if(h.isString(t)){var e=new r;e.parse(t,!1,!0),t=e}for(var i=new r,n=Object.keys(this),s=0;s<n.length;s++){var a=n[s];i[a]=this[a]}if(i.hash=t.hash,""===t.href)return i.href=i.format(),i;if(t.slashes&&!t.protocol){for(var o=Object.keys(t),l=0;l<o.length;l++){var u=o[l];"protocol"!==u&&(i[u]=t[u])}return w[i.protocol]&&i.hostname&&!i.pathname&&(i.path=i.pathname="/"),i.href=i.format(),i}if(t.protocol&&t.protocol!==i.protocol){if(!w[t.protocol]){for(var c=Object.keys(t),d=0;d<c.length;d++){var f=c[d];i[f]=t[f]}return i.href=i.format(),i}if(i.protocol=t.protocol,t.host||x[t.protocol])i.pathname=t.pathname;else{for(var p=(t.pathname||"").split("/");p.length&&!(t.host=p.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),i.pathname=p.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 _=i.pathname||"",m=i.search||"";i.path=_+m}return i.slashes=i.slashes||t.slashes,i.href=i.format(),i}var g=i.pathname&&"/"===i.pathname.charAt(0),v=t.host||t.pathname&&"/"===t.pathname.charAt(0),y=v||g||i.host&&t.pathname,T=y,b=i.pathname&&i.pathname.split("/")||[],p=t.pathname&&t.pathname.split("/")||[],E=i.protocol&&!w[i.protocol];if(E&&(i.hostname="",i.port=null,i.host&&(""===b[0]?b[0]=i.host:b.unshift(i.host)),i.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===p[0]?p[0]=t.host:p.unshift(t.host)),t.host=null),y=y&&(""===p[0]||""===b[0])),v)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,b=p;else if(p.length)b||(b=[]),b.pop(),b=b.concat(p),i.search=t.search,i.query=t.query;else if(!h.isNullOrUndefined(t.search)){if(E){i.hostname=i.host=b.shift();var S=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@");S&&(i.auth=S.shift(),i.host=i.hostname=S.shift())}return i.search=t.search,i.query=t.query,h.isNull(i.pathname)&&h.isNull(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.href=i.format(),i}if(!b.length)return i.pathname=null,i.search?i.path="/"+i.search:i.path=null,i.href=i.format(),i;for(var D=b.slice(-1)[0],A=(i.host||t.host||b.length>1)&&("."===D||".."===D)||""===D,P=0,O=b.length;O>=0;O--)D=b[O],"."===D?b.splice(O,1):".."===D?(b.splice(O,1),P++):P&&(b.splice(O,1),P--);if(!y&&!T)for(;P--;P)b.unshift("..");!y||""===b[0]||b[0]&&"/"===b[0].charAt(0)||b.unshift(""),A&&"/"!==b.join("/").substr(-1)&&b.push("");var C=""===b[0]||b[0]&&"/"===b[0].charAt(0);if(E){i.hostname=i.host=C?"":b.length?b.shift():"";var S=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@");S&&(i.auth=S.shift(),i.host=i.hostname=S.shift())}return y=y||i.host&&b.length,y&&!C&&b.unshift(""),b.length?i.pathname=b.join("/"):(i.pathname=null,i.path=null),h.isNull(i.pathname)&&h.isNull(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=c.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":29,punycode:24,querystring:27}],29:[function(t,e,i){e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"===("undefined"==typeof t?"undefined":_typeof2(t))&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],30:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function n(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var a="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(t){return"undefined"==typeof t?"undefined":_typeof2(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":"undefined"==typeof t?"undefined":_typeof2(t)},o=t("mini-signals"),l=n(o),h=t("parse-uri"),u=n(h),c=t("./async"),d=r(c),f=t("./Resource"),p=n(f),_=100,m=/(#[\w\-]+)?$/,g=function(){function t(){var e=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;s(this,t),this.baseUrl=i,this.progress=0,this.loading=!1,this.defaultQueryString="",this._beforeMiddleware=[],this._afterMiddleware=[],this._boundLoadResource=function(t,i){return e._loadResource(t,i)},this._queue=d.queue(this._boundLoadResource,r),this._queue.pause(),this.resources={},this.onProgress=new l.default,this.onError=new l.default,this.onLoad=new l.default,this.onStart=new l.default,this.onComplete=new l.default}return t.prototype.add=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"===("undefined"==typeof t?"undefined":a(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.loading&&(!i||!i.parentResource))throw new Error("Cannot add resources while the loader is running.");if(this.resources[t])throw new Error('Resource named "'+t+'" already exists.');if(e=this._prepareUrl(e),this.resources[t]=new p.default(t,e,i),"function"==typeof r&&this.resources[t].onAfterMiddleware.once(r),this.loading){var s=i.parentResource,o=s.progressChunk*(s.children.length+1),l=o/(s.children.length+2);s.children.push(this.resources[t]),s.progressChunk=l;for(var h=0;h<s.children.length;++h)s.children[h].progressChunk=l}return this._queue.push(this.resources[t]),this},t.prototype.pre=function(t){return this._beforeMiddleware.push(t),this},t.prototype.use=function(t){return this._afterMiddleware.push(t),this},t.prototype.reset=function(){this.progress=0,this.loading=!1,this._queue.kill(),this._queue.pause();for(var t in this.resources){var e=this.resources[t];e._onLoadBinding&&e._onLoadBinding.detach(),e.isLoading&&e.abort()}return this.resources={},this},t.prototype.load=function(t){if("function"==typeof t&&this.onComplete.once(t),this.loading)return this;for(var e=100/this._queue._tasks.length,i=0;i<this._queue._tasks.length;++i)this._queue._tasks[i].data.progressChunk=e;return this.loading=!0,this.onStart.dispatch(this),this._queue.resume(),this},t.prototype._prepareUrl=function(t){var e=(0,u.default)(t,{strictMode:!0}),i=void 0;if(i=e.protocol||!e.path||0===t.indexOf("//")?t:this.baseUrl.length&&this.baseUrl.lastIndexOf("/")!==this.baseUrl.length-1&&"/"!==t.charAt(0)?this.baseUrl+"/"+t:this.baseUrl+t,this.defaultQueryString){var r=m.exec(i)[0];i=i.substr(0,i.length-r.length),i+=i.indexOf("?")!==-1?"&"+this.defaultQueryString:"?"+this.defaultQueryString,i+=r}return i},t.prototype._loadResource=function(t,e){var i=this;t._dequeue=e,d.eachSeries(this._beforeMiddleware,function(e,r){e.call(i,t,function(){r(t.isComplete?{}:null)})},function(){t.isComplete?i._onLoad(t):(t._onLoadBinding=t.onComplete.once(i._onLoad,i),t.load())})},t.prototype._onComplete=function(){this.loading=!1,this.onComplete.dispatch(this,this.resources)},t.prototype._onLoad=function(t){var e=this;t._onLoadBinding=null,d.eachSeries(this._afterMiddleware,function(i,r){i.call(e,t,r)},function(){t.onAfterMiddleware.dispatch(t),e.progress+=t.progressChunk,e.onProgress.dispatch(e,t),t.error?e.onError.dispatch(t.error,e,t):e.onLoad.dispatch(e,t),t._dequeue(),e._queue.idle()&&(e.progress=_,e._onComplete())})},t}();i.default=g},{"./Resource":31,"./async":32,"mini-signals":36,"parse-uri":37}],31:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(){}function a(t,e,i){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=i)}function o(t){return t.toString().replace("object ","")}i.__esModule=!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}}(),h=t("parse-uri"),u=r(h),c=t("mini-signals"),d=r(c),f=!(!window.XDomainRequest||"withCredentials"in new XMLHttpRequest),p=null,_=0,m=200,g=204,v=function(){function t(e,i,r){if(n(this,t),"string"!=typeof e||"string"!=typeof i)throw new Error("Both name and url are required for constructing a resource.");r=r||{},this._flags=0,this._setFlag(t.STATUS_FLAGS.DATA_URL,0===i.indexOf("data:")),this.name=e,this.url=i,this.data=null,this.crossOrigin=r.crossOrigin===!0?"anonymous":r.crossOrigin,this.loadType=r.loadType||this._determineLoadType(),this.xhrType=r.xhrType,this.metadata=r.metadata||{},this.error=null,this.xhr=null,this.children=[],this.type=t.TYPE.UNKNOWN,this.progressChunk=0,this._dequeue=s,this._onLoadBinding=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),this.onStart=new d.default,this.onProgress=new d.default,this.onComplete=new d.default,this.onAfterMiddleware=new d.default}return t.setExtensionLoadType=function(e,i){a(t._loadTypeMap,e,i)},t.setExtensionXhrType=function(e,i){a(t._xhrTypeMap,e,i)},t.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._setFlag(t.STATUS_FLAGS.COMPLETE,!0),this._setFlag(t.STATUS_FLAGS.LOADING,!1),this.onComplete.dispatch(this)},t.prototype.abort=function(e){if(!this.error){if(this.error=new Error(e),this.xhr)this.xhr.abort();else if(this.xdr)this.xdr.abort();else if(this.data)if(this.data.src)this.data.src=t.EMPTY_GIF;else for(;this.data.firstChild;)this.data.removeChild(this.data.firstChild);this.complete()}},t.prototype.load=function(e){var i=this;if(!this.isLoading){if(this.isComplete)return void(e&&setTimeout(function(){return e(i)},1));switch(e&&this.onComplete.once(e),this._setFlag(t.STATUS_FLAGS.LOADING,!0),this.onStart.dispatch(this),this.crossOrigin!==!1&&"string"==typeof this.crossOrigin||(this.crossOrigin=this._determineCrossOrigin(this.url)),this.loadType){case t.LOAD_TYPE.IMAGE:this.type=t.TYPE.IMAGE,this._loadElement("image");break;case t.LOAD_TYPE.AUDIO:this.type=t.TYPE.AUDIO,this._loadSourceElement("audio");break;case t.LOAD_TYPE.VIDEO:this.type=t.TYPE.VIDEO,this._loadSourceElement("video");break;case t.LOAD_TYPE.XHR:default:f&&this.crossOrigin?this._loadXdr():this._loadXhr()}}},t.prototype._hasFlag=function(t){return!!(this._flags&t)},t.prototype._setFlag=function(t,e){this._flags=e?this._flags|t:this._flags&~t},t.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),this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1)},t.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.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()},t.prototype._loadXhr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var e=this.xhr=new XMLHttpRequest;e.open("GET",this.url,!0),this.xhrType===t.XHR_RESPONSE_TYPE.JSON||this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT?e.responseType=t.XHR_RESPONSE_TYPE.TEXT:e.responseType=this.xhrType,e.addEventListener("error",this._boundXhrOnError,!1),e.addEventListener("abort",this._boundXhrOnAbort,!1),e.addEventListener("progress",this._boundOnProgress,!1),e.addEventListener("load",this._boundXhrOnLoad,!1),e.send()},t.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(){return t.send()},1)},t.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},t.prototype._onError=function(t){this.abort("Failed to load element using: "+t.target.nodeName)},t.prototype._onProgress=function(t){t&&t.lengthComputable&&this.onProgress.dispatch(this,t.loaded/t.total)},t.prototype._xhrOnError=function(){var t=this.xhr;this.abort(o(t)+" Request failed. Status: "+t.status+', text: "'+t.statusText+'"')},t.prototype._xhrOnAbort=function(){this.abort(o(this.xhr)+" Request was aborted by the user.")},t.prototype._xdrOnTimeout=function(){this.abort(o(this.xhr)+" Request timed out.")},t.prototype._xhrOnLoad=function(){var e=this.xhr,i="undefined"==typeof e.status?e.status:m;if(!(i===m||i===g||i===_&&e.responseText.length>0))return void this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL);if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=e.responseText,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(e.responseText),this.type=t.TYPE.JSON}catch(t){return void this.abort("Error trying to parse loaded json: "+t)}else if(this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var r=new DOMParser;this.data=r.parseFromString(e.responseText,"text/xml")}else{var n=document.createElement("div");n.innerHTML=e.responseText,this.data=n}this.type=t.TYPE.XML}catch(t){return void this.abort("Error trying to parse loaded xml: "+t)}else this.data=e.response||e.responseText;this.complete()},t.prototype._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";e=e||window.location,p||(p=document.createElement("a")),p.href=t,t=(0,u.default)(p.href,{strictMode:!0});var i=!t.port&&""===e.port||t.port===e.port,r=t.protocol?t.protocol+":":"";return t.host===e.hostname&&i&&r===e.protocol?"":"anonymous"},t.prototype._determineXhrType=function(){return t._xhrTypeMap[this._getExtension()]||t.XHR_RESPONSE_TYPE.TEXT},t.prototype._determineLoadType=function(){return t._loadTypeMap[this._getExtension()]||t.LOAD_TYPE.XHR},t.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()},t.prototype._getMimeFromXhrType=function(e){switch(e){case t.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case t.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case t.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case t.XHR_RESPONSE_TYPE.JSON:return"application/json";case t.XHR_RESPONSE_TYPE.DEFAULT:case t.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},l(t,[{key:"isDataUrl",get:function(){return this._hasFlag(t.STATUS_FLAGS.DATA_URL)}},{key:"isComplete",get:function(){return this._hasFlag(t.STATUS_FLAGS.COMPLETE)}},{key:"isLoading",get:function(){return this._hasFlag(t.STATUS_FLAGS.LOADING)}}]),t}();i.default=v,v.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},v.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},v.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},v.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},v._loadTypeMap={gif:v.LOAD_TYPE.IMAGE,png:v.LOAD_TYPE.IMAGE,bmp:v.LOAD_TYPE.IMAGE,jpg:v.LOAD_TYPE.IMAGE,jpeg:v.LOAD_TYPE.IMAGE,tif:v.LOAD_TYPE.IMAGE,tiff:v.LOAD_TYPE.IMAGE,webp:v.LOAD_TYPE.IMAGE,tga:v.LOAD_TYPE.IMAGE,svg:v.LOAD_TYPE.IMAGE,"svg+xml":v.LOAD_TYPE.IMAGE,mp3:v.LOAD_TYPE.AUDIO,ogg:v.LOAD_TYPE.AUDIO,wav:v.LOAD_TYPE.AUDIO,mp4:v.LOAD_TYPE.VIDEO,webm:v.LOAD_TYPE.VIDEO},v._xhrTypeMap={xhtml:v.XHR_RESPONSE_TYPE.DOCUMENT,html:v.XHR_RESPONSE_TYPE.DOCUMENT,htm:v.XHR_RESPONSE_TYPE.DOCUMENT,xml:v.XHR_RESPONSE_TYPE.DOCUMENT,tmx:v.XHR_RESPONSE_TYPE.DOCUMENT,svg:v.XHR_RESPONSE_TYPE.DOCUMENT,tsx:v.XHR_RESPONSE_TYPE.DOCUMENT,gif:v.XHR_RESPONSE_TYPE.BLOB,png:v.XHR_RESPONSE_TYPE.BLOB,bmp:v.XHR_RESPONSE_TYPE.BLOB,jpg:v.XHR_RESPONSE_TYPE.BLOB,jpeg:v.XHR_RESPONSE_TYPE.BLOB,tif:v.XHR_RESPONSE_TYPE.BLOB,tiff:v.XHR_RESPONSE_TYPE.BLOB,webp:v.XHR_RESPONSE_TYPE.BLOB,tga:v.XHR_RESPONSE_TYPE.BLOB,json:v.XHR_RESPONSE_TYPE.JSON,text:v.XHR_RESPONSE_TYPE.TEXT,txt:v.XHR_RESPONSE_TYPE.TEXT,ttf:v.XHR_RESPONSE_TYPE.BUFFER,otf:v.XHR_RESPONSE_TYPE.BUFFER},v.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="},{"mini-signals":36,"parse-uri":37}],32:[function(t,e,i){function r(){}function n(t,e,i){var r=0,n=t.length;!function s(a){return a||r===n?void(i&&i(a)):void e(t[r++],s)}()}function s(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}}function a(t,e){function i(t,e,i){if(null!=i&&"function"!=typeof i)throw new Error("task callback must be a function");if(o.started=!0,null==t&&o.idle())return void setTimeout(function(){return o.drain()},1);var n={data:t,callback:"function"==typeof i?i:r};e?o._tasks.unshift(n):o._tasks.push(n),setTimeout(function(){return o.process()},1)}function n(t){return function(){a-=1,t.callback.apply(t,arguments),null!=arguments[0]&&o.error(arguments[0],t.data),a<=o.concurrency-o.buffer&&o.unsaturated(),o.idle()&&o.drain(),o.process()}}if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var a=0,o={_tasks:[],concurrency:e,saturated:r,unsaturated:r,buffer:e/4,empty:r,drain:r,error:r,started:!1,paused:!1,push:function(t,e){i(t,!1,e)},kill:function(){a=0,o.drain=r,o.started=!1,o._tasks=[]},unshift:function(t,e){i(t,!0,e)},process:function(){for(;!o.paused&&a<o.concurrency&&o._tasks.length;){var e=o._tasks.shift();0===o._tasks.length&&o.empty(),a+=1,a===o.concurrency&&o.saturated(),t(e.data,s(n(e)))}},length:function(){return o._tasks.length},running:function(){return a},idle:function(){return o._tasks.length+a===0},pause:function(){o.paused!==!0&&(o.paused=!0)},resume:function(){if(o.paused!==!1){o.paused=!1;for(var t=1;t<=o.concurrency;t++)o.process()}}};return o}i.__esModule=!0,i.eachSeries=n,i.queue=a},{}],33:[function(t,e,i){function r(t){for(var e="",i=0;i<t.length;){for(var r=[0,0,0],s=[0,0,0,0],a=0;a<r.length;++a)i<t.length?r[a]=255&t.charCodeAt(i++):r[a]=0;s[0]=r[0]>>2,s[1]=(3&r[0])<<4|r[1]>>4,s[2]=(15&r[1])<<2|r[2]>>6,s[3]=63&r[2];var o=i-(t.length-1);switch(o){case 2:s[3]=64,s[2]=64;break;case 1:s[3]=64}for(var l=0;l<s.length;++l)e+=n.charAt(s[l])}return e}i.__esModule=!0,i.encodeBinary=r;var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},{}],34:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function n(t){return t&&t.__esModule?t:{default:t}}i.__esModule=!0;var s=t("./Loader"),a=n(s),o=t("./Resource"),l=n(o),h=t("./async"),u=r(h),c=t("./b64"),d=r(c);a.default.Resource=l.default,a.default.async=u,a.default.base64=d,e.exports=a.default,i.default=a.default},{"./Loader":30,"./Resource":31,"./async":32,"./b64":33}],35:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(){return function(t,e){if(!t.data)return void e();if(t.xhr&&t.xhrType===o.default.XHR_RESPONSE_TYPE.BLOB)if(window.Blob&&"string"!=typeof t.data){if(0===t.data.type.indexOf("image")){var i=function(){var i=u.createObjectURL(t.data);return t.blob=t.data,t.data=new Image,t.data.src=i,t.type=o.default.TYPE.IMAGE,t.data.onload=function(){u.revokeObjectURL(i),t.data.onload=null,e()},{v:void 0}}();if("object"===("undefined"==typeof i?"undefined":s(i)))return i.v}}else{var r=t.xhr.getResponseHeader("content-type");if(r&&0===r.indexOf("image"))return t.data=new Image,t.data.src="data:"+r+";base64,"+h.default.encodeBinary(t.xhr.responseText),t.type=o.default.TYPE.IMAGE,void(t.data.onload=function(){t.data.onload=null,e()})}e()}}i.__esModule=!0;var s="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(t){return"undefined"==typeof t?"undefined":_typeof2(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":"undefined"==typeof t?"undefined":_typeof2(t)};i.blobMiddlewareFactory=n;var a=t("../../Resource"),o=r(a),l=t("../../b64"),h=r(l),u=window.URL||window.webkitURL},{"../../Resource":31,"../../b64":33 }],36:[function(t,e,i){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){return t._head?(t._tail._next=e,e._prev=t._tail,t._tail=e):(t._head=e,t._tail=e),e._owner=t,e}Object.defineProperty(i,"__esModule",{value:!0});var s=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}}(),a=function(){function t(e,i,n){void 0===i&&(i=!1),r(this,t),this._fn=e,this._once=i,this._thisArg=n,this._next=this._prev=this._owner=null}return s(t,[{key:"detach",value:function(){return null!==this._owner&&(this._owner.detach(this),!0)}}]),t}(),o=function(){function t(){r(this,t),this._head=this._tail=void 0}return s(t,[{key:"handlers",value:function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],e=this._head;if(t)return!!e;for(var i=[];e;)i.push(e),e=e._next;return i}},{key:"has",value:function(t){if(!(t instanceof a))throw new Error("MiniSignal#has(): First arg must be a MiniSignalBinding object.");return t._owner===this}},{key:"dispatch",value:function(){var t=this._head;if(!t)return!1;for(;t;)t._once&&this.detach(t),t._fn.apply(t._thisArg,arguments),t=t._next;return!0}},{key:"add",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if("function"!=typeof t)throw new Error("MiniSignal#add(): First arg must be a Function.");return n(this,new a(t,!1,e))}},{key:"once",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if("function"!=typeof t)throw new Error("MiniSignal#once(): First arg must be a Function.");return n(this,new a(t,!0,e))}},{key:"detach",value:function(t){if(!(t instanceof a))throw new Error("MiniSignal#detach(): First arg must be a MiniSignalBinding object.");return t._owner!==this?this:(t._prev&&(t._prev._next=t._next),t._next&&(t._next._prev=t._prev),t===this._head?(this._head=t._next,null===t._next&&(this._tail=null)):t===this._tail&&(this._tail=t._prev,this._tail._next=null),t._owner=null,this)}},{key:"detachAll",value:function(){var t=this._head;if(!t)return this;for(this._head=this._tail=null;t;)t._owner=null,t=t._next;return this}}]),t}();o.MiniSignalBinding=a,i.default=o,e.exports=i.default},{}],37:[function(t,e,i){e.exports=function(t,e){e=e||{};for(var i={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},r=i.parser[e.strictMode?"strict":"loose"].exec(t),n={},s=14;s--;)n[i.key[s]]=r[s]||"";return n[i.q.name]={},n[i.key[12]].replace(i.q.parser,function(t,e,r){e&&(n[i.q.name][e]=r)}),n}},{}],38:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var a=t("../core"),o=n(a),l=t("ismobilejs"),h=r(l),u=t("./accessibleTarget"),c=r(u);Object.assign(o.DisplayObject.prototype,c.default);var d=9,f=100,p=0,_=0,m=2,g=1,v=-1e3,y=-1e3,T=2,b=function(){function t(e){s(this,t),!h.default.tablet&&!h.default.phone||navigator.isCocoonJS||this.createTouchHook();var i=document.createElement("div");i.style.width=f+"px",i.style.height=f+"px",i.style.position="absolute",i.style.top=p+"px",i.style.left=_+"px",i.style.zIndex=m,this.div=i,this.pool=[],this.renderId=0,this.debug=!1,this.renderer=e,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)}return t.prototype.createTouchHook=function(){var t=this,e=document.createElement("button");e.style.width=g+"px",e.style.height=g+"px",e.style.position="absolute",e.style.top=v+"px",e.style.left=y+"px",e.style.zIndex=T,e.style.backgroundColor="#FF0000",e.title="HOOK DIV",e.addEventListener("focus",function(){t.isMobileAccessabillity=!0,t.activate(),document.body.removeChild(e)}),document.body.appendChild(e)},t.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))},t.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))},t.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])}},t.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 n=0;n<this.children.length;n++){var s=this.children[n];if(s.renderId!==this.renderId)s._accessibleActive=!1,o.utils.removeItems(this.children,n,1),this.div.removeChild(s._accessibleDiv),this.pool.push(s._accessibleDiv),s._accessibleDiv=null,n--,0===this.children.length&&this.deactivate();else{r=s._accessibleDiv;var a=s.hitArea,l=s.worldTransform;s.hitArea?(r.style.left=(l.tx+a.x*l.a)*e+"px",r.style.top=(l.ty+a.y*l.d)*i+"px",r.style.width=a.width*l.a*e+"px",r.style.height=a.height*l.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++}},t.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)},t.prototype.addChild=function(t){var e=this.pool.pop();e||(e=document.createElement("button"),e.style.width=f+"px",e.style.height=f+"px",e.style.backgroundColor=this.debug?"rgba(255,0,0,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=m,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},t.prototype._onClick=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"click",e.eventData)},t.prototype._onFocus=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseover",e.eventData)},t.prototype._onFocusOut=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseout",e.eventData)},t.prototype._onKeyDown=function(t){t.keyCode===d&&this.activate()},t.prototype._onMouseMove=function(){this.deactivate()},t.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},t}();i.default=b,o.WebGLRenderer.registerPlugin("accessibility",b),o.CanvasRenderer.registerPlugin("accessibility",b)},{"../core":61,"./accessibleTarget":39,ismobilejs:4}],39:[function(t,e,i){i.__esModule=!0,i.default={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:!1}},{}],40:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}i.__esModule=!0;var n=t("./accessibleTarget");Object.defineProperty(i,"accessibleTarget",{enumerable:!0,get:function(){return r(n).default}});var s=t("./AccessibilityManager");Object.defineProperty(i,"AccessibilityManager",{enumerable:!0,get:function(){return r(s).default}})},{"./AccessibilityManager":38,"./accessibleTarget":39}],41:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function o(t){if(t instanceof Array){if("precision"!==t[0].substring(0,9)){var e=t.slice(0);return e.unshift("precision "+c+" float;"),e}}else if("precision"!==t.substring(0,9))return"precision "+c+" float;\n"+t;return t}i.__esModule=!0;var l=t("pixi-gl-core"),h=t("./settings"),u=r(h),c=u.default.PRECISION,d=function(t){function e(i,r,a){return n(this,e),s(this,t.call(this,i,o(r),o(a)))}return a(e,t),e}(l.GLShader);i.default=d},{"./settings":97,"pixi-gl-core":12}],42:[function(t,e,i){i.__esModule=!0;i.VERSION="4.3.2",i.PI_2=2*Math.PI,i.RAD_TO_DEG=180/Math.PI,i.DEG_TO_RAD=Math.PI/180,i.RENDERER_TYPE={UNKNOWN:0,WEBGL:1,CANVAS:2},i.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},i.DRAW_MODES={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},i.SCALE_MODES={LINEAR:0,NEAREST:1},i.WRAP_MODES={CLAMP:0,REPEAT:1,MIRRORED_REPEAT:2},i.GC_MODES={AUTO:0,MANUAL:1},i.URL_FILE_EXTENSION=/\.(\w{3,4})(?:$|\?|#)/i,i.DATA_URI=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;(charset=[\w-]+|base64))?,(.*)/i,i.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,i.SHAPES={POLY:0,RECT:1,CIRC:2,ELIP:3,RREC:4},i.PRECISION={LOW:"lowp",MEDIUM:"mediump",HIGH:"highp"},i.TRANSFORM_MODE={STATIC:0,DYNAMIC:1},i.TEXT_GRADIENT={LINEAR_VERTICAL:0,LINEAR_HORIZONTAL:1}},{}],43:[function(t,e,i){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=t("../math"),s=function(){function t(){r(this,t),this.minX=1/0,this.minY=1/0,this.maxX=-(1/0),this.maxY=-(1/0),this.rect=null}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){this.updateID++,this.minX=1/0,this.minY=1/0,this.maxX=-(1/0),this.maxY=-(1/0)},t.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?n.Rectangle.EMPTY:(t=t||new n.Rectangle(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)},t.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)},t.prototype.addQuad=function(t){var e=this.minX,i=this.minY,r=this.maxX,n=this.maxY,s=t[0],a=t[1];e=s<e?s:e,i=a<i?a:i,r=s>r?s:r,n=a>n?a:n,s=t[2],a=t[3],e=s<e?s:e,i=a<i?a:i,r=s>r?s:r,n=a>n?a:n,s=t[4],a=t[5],e=s<e?s:e,i=a<i?a:i,r=s>r?s:r,n=a>n?a:n,s=t[6],a=t[7],e=s<e?s:e,i=a<i?a:i,r=s>r?s:r,n=a>n?a:n,this.minX=e,this.minY=i,this.maxX=r,this.maxY=n},t.prototype.addFrame=function(t,e,i,r,n){var s=t.worldTransform,a=s.a,o=s.b,l=s.c,h=s.d,u=s.tx,c=s.ty,d=this.minX,f=this.minY,p=this.maxX,_=this.maxY,m=a*e+l*i+u,g=o*e+h*i+c;d=m<d?m:d,f=g<f?g:f,p=m>p?m:p,_=g>_?g:_,m=a*r+l*i+u,g=o*r+h*i+c,d=m<d?m:d,f=g<f?g:f,p=m>p?m:p,_=g>_?g:_,m=a*e+l*n+u,g=o*e+h*n+c,d=m<d?m:d,f=g<f?g:f,p=m>p?m:p,_=g>_?g:_,m=a*r+l*n+u,g=o*r+h*n+c,d=m<d?m:d,f=g<f?g:f,p=m>p?m:p,_=g>_?g:_,this.minX=d,this.minY=f,this.maxX=p,this.maxY=_},t.prototype.addVertices=function(t,e,i,r){for(var n=t.worldTransform,s=n.a,a=n.b,o=n.c,l=n.d,h=n.tx,u=n.ty,c=this.minX,d=this.minY,f=this.maxX,p=this.maxY,_=i;_<r;_+=2){var m=e[_],g=e[_+1],v=s*m+o*g+h,y=l*g+a*m+u;c=v<c?v:c,d=y<d?y:d,f=v>f?v:f,p=y>p?y:p}this.minX=c,this.minY=d,this.maxX=f,this.maxY=p},t.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},t.prototype.addBoundsMask=function(t,e){var i=t.minX>e.minX?t.minX:e.minX,r=t.minY>e.minY?t.minY:e.minY,n=t.maxX<e.maxX?t.maxX:e.maxX,s=t.maxY<e.maxY?t.maxY:e.maxY;if(i<=n&&r<=s){var a=this.minX,o=this.minY,l=this.maxX,h=this.maxY;this.minX=i<a?i:a,this.minY=r<o?r:o,this.maxX=n>l?n:l,this.maxY=s>h?s:h}},t.prototype.addBoundsArea=function(t,e){var i=t.minX>e.x?t.minX:e.x,r=t.minY>e.y?t.minY:e.y,n=t.maxX<e.x+e.width?t.maxX:e.x+e.width,s=t.maxY<e.y+e.height?t.maxY:e.y+e.height;if(i<=n&&r<=s){var a=this.minX,o=this.minY,l=this.maxX,h=this.maxY;this.minX=i<a?i:a,this.minY=r<o?r:o,this.maxX=n>l?n:l,this.maxY=s>h?s:h}},t}();i.default=s},{"../math":66}],44:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=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}}(),l=t("../utils"),h=t("./DisplayObject"),u=r(h),c=function(t){function e(){n(this,e);var i=s(this,t.call(this));return i.children=[],i}return a(e,t),e.prototype.onChildrenChange=function(){},e.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._boundsID++,this.children.push(t),this.onChildrenChange(this.children.length-1),t.emit("added",this);return t},e.prototype.addChildAt=function(t,e){if(e<0||e>this.children.length)throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,this.children.splice(e,0,t),this.onChildrenChange(e),t.emit("added",this),t},e.prototype.swapChildren=function(t,e){if(t!==e){var i=this.getChildIndex(t),r=this.getChildIndex(e);this.children[i]=e,this.children[r]=t,this.onChildrenChange(i<r?i:r)}},e.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},e.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);(0,l.removeItems)(this.children,i,1),this.children.splice(e,0,t),this.onChildrenChange(e)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},e.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 null;t.parent=null,(0,l.removeItems)(this.children,r,1),this.transform._parentID=-1,this._boundsID++,this.onChildrenChange(r),t.emit("removed",this)}return t},e.prototype.removeChildAt=function(t){var e=this.getChildAt(t);return e.parent=null,(0,l.removeItems)(this.children,t,1),this.onChildrenChange(t),e.emit("removed",this),e},e.prototype.removeChildren=function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],e=arguments[1],i=t,r="number"==typeof e?e:this.children.length,n=r-i,s=void 0;if(n>0&&n<=r){s=this.children.splice(i,n);for(var a=0;a<s.length;++a)s[a].parent=null;this.onChildrenChange(t);for(var o=0;o<s.length;++o)s[o].emit("removed",this);return s}if(0===n&&0===this.children.length)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},e.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,e=this.children.length;t<e;++t){var i=this.children[t];i.visible&&i.updateTransform()}},e.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var t=0;t<this.children.length;t++){var e=this.children[t];e.visible&&e.renderable&&(e.calculateBounds(),e._mask?(e._mask.calculateBounds(),this._bounds.addBoundsMask(e._bounds,e._mask._bounds)):e.filterArea?this._bounds.addBoundsArea(e._bounds,e.filterArea):this._bounds.addBounds(e._bounds))}this._lastBoundsID=this._boundsID},e.prototype._calculateBounds=function(){},e.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)}},e.prototype.renderAdvancedWebGL=function(t){t.flush();var e=this._filters,i=this._mask;if(e){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var r=0;r<e.length;r++)e[r].enabled&&this._enabledFilters.push(e[r]);this._enabledFilters.length&&t.filterManager.pushFilter(this,this._enabledFilters)}i&&t.maskManager.pushMask(this,this._mask),this._renderWebGL(t);for(var n=0,s=this.children.length;n<s;n++)this.children[n].renderWebGL(t);t.flush(),i&&t.maskManager.popMask(this,this._mask),e&&this._enabledFilters&&this._enabledFilters.length&&t.filterManager.popFilter()},e.prototype._renderWebGL=function(t){},e.prototype._renderCanvas=function(t){},e.prototype.renderCanvas=function(t){if(this.visible&&!(this.worldAlpha<=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)}},e.prototype.destroy=function(e){t.prototype.destroy.call(this);var i="boolean"==typeof e?e:e&&e.children,r=this.removeChildren(0,this.children.length);if(i)for(var n=0;n<r.length;++n)r[n].destroy(e)},o(e,[{key:"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}},{key:"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}}]),e}(u.default);i.default=c,c.prototype.containerUpdateTransform=c.prototype.updateTransform},{"../utils":117,"./DisplayObject":45}],45:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=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}}(),l=t("eventemitter3"),h=r(l),u=t("../const"),c=t("../settings"),d=r(c),f=t("./TransformStatic"),p=r(f),_=t("./Transform"),m=r(_),g=t("./Bounds"),v=r(g),y=t("../math"),T=function(t){function e(){n(this,e);var i=s(this,t.call(this)),r=d.default.TRANSFORM_MODE===u.TRANSFORM_MODE.STATIC?p.default:m.default;return i.tempDisplayObjectParent=null,i.transform=new r,i.alpha=1,i.visible=!0,i.renderable=!0,i.parent=null,i.worldAlpha=1,i.filterArea=null,i._filters=null,i._enabledFilters=null,i._bounds=new v.default,i._boundsID=0,i._lastBoundsID=-1,i._boundsRect=null,i._localBoundsRect=null,i._mask=null,i}return a(e,t),e.prototype.updateTransform=function(){this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha,this._bounds.updateID++},e.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},e.prototype.getBounds=function(t,e){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._boundsID!==this._lastBoundsID&&this.calculateBounds(),e||(this._boundsRect||(this._boundsRect=new y.Rectangle),e=this._boundsRect),this._bounds.getRectangle(e)},e.prototype.getLocalBounds=function(t){var e=this.transform,i=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform,t||(this._localBoundsRect||(this._localBoundsRect=new y.Rectangle),t=this._localBoundsRect);var r=this.getBounds(!1,t);return this.parent=i,this.transform=e,r},e.prototype.toGlobal=function(t,e){var i=!(arguments.length<=2||void 0===arguments[2])&&arguments[2];return i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,e)},e.prototype.toLocal=function(t,e,i,r){return e&&(t=e.toGlobal(t,i,r)),r||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,i)},e.prototype.renderWebGL=function(t){},e.prototype.renderCanvas=function(t){},e.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},e.prototype.setTransform=function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],e=arguments.length<=1||void 0===arguments[1]?0:arguments[1],i=arguments.length<=2||void 0===arguments[2]?1:arguments[2],r=arguments.length<=3||void 0===arguments[3]?1:arguments[3],n=arguments.length<=4||void 0===arguments[4]?0:arguments[4],s=arguments.length<=5||void 0===arguments[5]?0:arguments[5],a=arguments.length<=6||void 0===arguments[6]?0:arguments[6],o=arguments.length<=7||void 0===arguments[7]?0:arguments[7],l=arguments.length<=8||void 0===arguments[8]?0:arguments[8];return this.position.x=t,this.position.y=e,this.scale.x=i?i:1,this.scale.y=r?r:1,this.rotation=n,this.skew.x=s,this.skew.y=a,this.pivot.x=o,this.pivot.y=l,this},e.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},o(e,[{key:"_tempDisplayObjectParent",get:function(){return null===this.tempDisplayObjectParent&&(this.tempDisplayObjectParent=new e),this.tempDisplayObjectParent}},{key:"x",get:function(){return this.position.x},set:function(t){this.transform.position.x=t}},{key:"y",get:function(){return this.position.y},set:function(t){this.transform.position.y=t}},{key:"worldTransform",get:function(){return this.transform.worldTransform}},{key:"localTransform",get:function(){return this.transform.localTransform}},{key:"position",get:function(){return this.transform.position},set:function(t){this.transform.position.copy(t)}},{key:"scale",get:function(){return this.transform.scale},set:function(t){this.transform.scale.copy(t)}},{key:"pivot",get:function(){return this.transform.pivot},set:function(t){this.transform.pivot.copy(t)}},{key:"skew",get:function(){return this.transform.skew},set:function(t){this.transform.skew.copy(t)}},{key:"rotation",get:function(){return this.transform.rotation},set:function(t){this.transform.rotation=t}},{key:"worldVisible",get:function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}},{key:"mask",get:function(){return this._mask},set:function(t){this._mask&&(this._mask.renderable=!0),this._mask=t,this._mask&&(this._mask.renderable=!1)}},{key:"filters",get:function(){return this._filters&&this._filters.slice()},set:function(t){this._filters=t&&t.slice()}}]),e}(h.default);i.default=T,T.prototype.displayObjectUpdateTransform=T.prototype.updateTransform},{"../const":42,"../math":66,"../settings":97,"./Bounds":43,"./Transform":46,"./TransformStatic":48,eventemitter3:3}],46:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=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}}(),l=t("../math"),h=t("./TransformBase"),u=r(h),c=function(t){function e(){n(this,e);var i=s(this,t.call(this));return i.position=new l.Point(0,0),i.scale=new l.Point(1,1),i.skew=new l.ObservablePoint(i.updateSkew,i,0,0),i.pivot=new l.Point(0,0),i._rotation=0,i._cx=1,i._sx=0,i._cy=0,i._sy=1,i}return a(e,t),e.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew._y),this._sx=Math.sin(this._rotation+this.skew._y),this._cy=-Math.sin(this._rotation-this.skew._x),this._sy=Math.cos(this._rotation-this.skew._x)},e.prototype.updateLocalTransform=function(){var t=this.localTransform;t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,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)},e.prototype.updateTransform=function(t){var e=this.localTransform;e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d);var i=t.worldTransform,r=this.worldTransform;r.a=e.a*i.a+e.b*i.c,r.b=e.a*i.b+e.b*i.d,r.c=e.c*i.a+e.d*i.c,r.d=e.c*i.b+e.d*i.d,r.tx=e.tx*i.a+e.ty*i.c+i.tx,r.ty=e.tx*i.b+e.ty*i.d+i.ty,this._worldID++},e.prototype.setFromMatrix=function(t){t.decompose(this)},o(e,[{key:"rotation",get:function(){return this._rotation},set:function(t){this._rotation=t,this.updateSkew()}}]),e}(u.default);i.default=c},{"../math":66,"./TransformBase":47}],47:[function(t,e,i){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=t("../math"),s=function(){function t(){r(this,t),this.worldTransform=new n.Matrix,this.localTransform=new n.Matrix,this._worldID=0,this._parentID=0}return t.prototype.updateLocalTransform=function(){},t.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++},t}();i.default=s,s.prototype.updateWorldTransform=s.prototype.updateTransform,s.IDENTITY=new s},{"../math":66}],48:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=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}}(),l=t("../math"),h=t("./TransformBase"),u=r(h),c=function(t){function e(){n(this,e);var i=s(this,t.call(this));return i.position=new l.ObservablePoint(i.onChange,i,0,0),i.scale=new l.ObservablePoint(i.onChange,i,1,1),i.pivot=new l.ObservablePoint(i.onChange,i,0,0),i.skew=new l.ObservablePoint(i.updateSkew,i,0,0),i._rotation=0,i._cx=1,i._sx=0,i._cy=0,i._sy=1,i._localID=0,i._currentLocalID=0,i}return a(e,t),e.prototype.onChange=function(){this._localID++},e.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew._y),this._sx=Math.sin(this._rotation+this.skew._y),this._cy=-Math.sin(this._rotation-this.skew._x),this._sy=Math.cos(this._rotation-this.skew._x),this._localID++},e.prototype.updateLocalTransform=function(){var t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale._x,t.b=this._sx*this.scale._x,t.c=this._cy*this.scale._y,t.d=this._sy*this.scale._y,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)},e.prototype.updateTransform=function(t){var e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale._x,e.b=this._sx*this.scale._x,e.c=this._cy*this.scale._y, e.d=this._sy*this.scale._y,e.tx=this.position._x-(this.pivot._x*e.a+this.pivot._y*e.c),e.ty=this.position._y-(this.pivot._x*e.b+this.pivot._y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){var i=t.worldTransform,r=this.worldTransform;r.a=e.a*i.a+e.b*i.c,r.b=e.a*i.b+e.b*i.d,r.c=e.c*i.a+e.d*i.c,r.d=e.c*i.b+e.d*i.d,r.tx=e.tx*i.a+e.ty*i.c+i.tx,r.ty=e.tx*i.b+e.ty*i.d+i.ty,this._parentID=t._worldID,this._worldID++}},e.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},o(e,[{key:"rotation",get:function(){return this._rotation},set:function(t){this._rotation=t,this.updateSkew()}}]),e}(u.default);i.default=c},{"../math":66,"./TransformBase":47}],49:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=t("../display/Container"),l=r(o),h=t("../textures/RenderTexture"),u=r(h),c=t("../textures/Texture"),d=r(c),f=t("./GraphicsData"),p=r(f),_=t("../sprites/Sprite"),m=r(_),g=t("../math"),v=t("../utils"),y=t("../const"),T=t("../display/Bounds"),b=r(T),x=t("./utils/bezierCurveTo"),w=r(x),E=t("../renderers/canvas/CanvasRenderer"),S=r(E),D=void 0,A=new g.Matrix,P=new g.Point,O=new Float32Array(4),C=new Float32Array(4),M=function(t){function e(){n(this,e);var i=s(this,t.call(this));return i.fillAlpha=1,i.lineWidth=0,i.lineColor=0,i.graphicsData=[],i.tint=16777215,i._prevTint=16777215,i.blendMode=y.BLEND_MODES.NORMAL,i.currentPath=null,i._webGL={},i.isMask=!1,i.boundsPadding=0,i._localBounds=new b.default,i.dirty=0,i.fastRectDirty=-1,i.clearDirty=0,i.boundsDirty=-1,i.cachedSpriteDirty=!1,i._spriteRect=null,i._fastRect=!1,i}return a(e,t),e.prototype.clone=function t(){var t=new e;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 i=0;i<this.graphicsData.length;++i)t.graphicsData.push(this.graphicsData[i].clone());return t.currentPath=t.graphicsData[t.graphicsData.length-1],t.updateLocalBounds(),t},e.prototype.lineStyle=function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],e=arguments.length<=1||void 0===arguments[1]?0:arguments[1],i=arguments.length<=2||void 0===arguments[2]?1:arguments[2];if(this.lineWidth=t,this.lineColor=e,this.lineAlpha=i,this.currentPath)if(this.currentPath.shape.points.length){var r=new g.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},e.prototype.moveTo=function(t,e){var i=new g.Polygon([t,e]);return i.closed=!1,this.drawShape(i),this},e.prototype.lineTo=function(t,e){return this.currentPath.shape.points.push(t,e),this.dirty++,this},e.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=20,s=this.currentPath.shape.points,a=0,o=0;0===s.length&&this.moveTo(0,0);for(var l=s[s.length-2],h=s[s.length-1],u=1;u<=n;++u){var c=u/n;a=l+(t-l)*c,o=h+(e-h)*c,s.push(a+(t+(i-t)*c-a)*c,o+(e+(r-e)*c-o)*c)}return this.dirty++,this},e.prototype.bezierCurveTo=function(t,e,i,r,n,s){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var a=this.currentPath.shape.points,o=a[a.length-2],l=a[a.length-1];return a.length-=2,(0,w.default)(o,l,t,e,i,r,n,s,a),this.dirty++,this},e.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 s=this.currentPath.shape.points,a=s[s.length-2],o=s[s.length-1],l=o-e,h=a-t,u=r-e,c=i-t,d=Math.abs(l*c-h*u);if(d<1e-8||0===n)s[s.length-2]===t&&s[s.length-1]===e||s.push(t,e);else{var f=l*l+h*h,p=u*u+c*c,_=l*u+h*c,m=n*Math.sqrt(f)/d,g=n*Math.sqrt(p)/d,v=m*_/f,y=g*_/p,T=m*c+g*h,b=m*u+g*l,x=h*(g+v),w=l*(g+v),E=c*(m+y),S=u*(m+y),D=Math.atan2(w-b,x-T),A=Math.atan2(S-b,E-T);this.arc(T+t,b+e,n,D,A,h*u>c*l)}return this.dirty++,this},e.prototype.arc=function(t,e,i,r,n){var s=!(arguments.length<=5||void 0===arguments[5])&&arguments[5];if(r===n)return this;!s&&n<=r?n+=2*Math.PI:s&&r<=n&&(r+=2*Math.PI);var a=n-r,o=40*Math.ceil(Math.abs(a)/(2*Math.PI));if(0===a)return this;var l=t+Math.cos(r)*i,h=e+Math.sin(r)*i,u=this.currentPath?this.currentPath.shape.points:null;u?u[u.length-2]===l&&u[u.length-1]===h||u.push(l,h):(this.moveTo(l,h),u=this.currentPath.shape.points);for(var c=a/(2*o),d=2*c,f=Math.cos(c),p=Math.sin(c),_=o-1,m=_%1/_,g=0;g<=_;++g){var v=g+m*g,y=c+r+d*v,T=Math.cos(y),b=-Math.sin(y);u.push((f*T+p*b)*i+t,(f*-b+p*T)*i+e)}return this.dirty++,this},e.prototype.beginFill=function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],e=arguments.length<=1||void 0===arguments[1]?1:arguments[1];return this.filling=!0,this.fillColor=t,this.fillAlpha=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},e.prototype.endFill=function(){return this.filling=!1,this.fillColor=null,this.fillAlpha=1,this},e.prototype.drawRect=function(t,e,i,r){return this.drawShape(new g.Rectangle(t,e,i,r)),this},e.prototype.drawRoundedRect=function(t,e,i,r,n){return this.drawShape(new g.RoundedRectangle(t,e,i,r,n)),this},e.prototype.drawCircle=function(t,e,i){return this.drawShape(new g.Circle(t,e,i)),this},e.prototype.drawEllipse=function(t,e,i,r){return this.drawShape(new g.Ellipse(t,e,i,r)),this},e.prototype.drawPolygon=function(t){var e=t,i=!0;if(e instanceof g.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 g.Polygon(e);return n.closed=i,this.drawShape(n),this},e.prototype.clear=function(){return(this.lineWidth||this.filling||this.graphicsData.length>0)&&(this.lineWidth=0,this.filling=!1,this.boundsDirty=-1,this.dirty++,this.clearDirty++,this.graphicsData.length=0),this.currentPath=null,this._spriteRect=null,this},e.prototype.isFastRect=function(){return 1===this.graphicsData.length&&this.graphicsData[0].shape.type===y.SHAPES.RECT&&!this.graphicsData[0].lineWidth},e.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))},e.prototype._renderSpriteRect=function(t){var i=this.graphicsData[0].shape;if(!this._spriteRect){if(!e._SPRITE_TEXTURE){e._SPRITE_TEXTURE=u.default.create(10,10);var r=document.createElement("canvas");r.width=10,r.height=10;var n=r.getContext("2d");n.fillStyle="white",n.fillRect(0,0,10,10),e._SPRITE_TEXTURE=d.default.fromCanvas(r)}this._spriteRect=new m.default(e._SPRITE_TEXTURE)}if(16777215===this.tint)this._spriteRect.tint=this.graphicsData[0].fillColor;else{var s=O,a=C;(0,v.hex2rgb)(this.graphicsData[0].fillColor,s),(0,v.hex2rgb)(this.tint,a),s[0]*=a[0],s[1]*=a[1],s[2]*=a[2],this._spriteRect.tint=(0,v.rgb2hex)(s)}this._spriteRect.alpha=this.graphicsData[0].fillAlpha,this._spriteRect.worldAlpha=this.worldAlpha*this._spriteRect.alpha,e._SPRITE_TEXTURE._frame.width=i.width,e._SPRITE_TEXTURE._frame.height=i.height,this._spriteRect.transform.worldTransform=this.transform.worldTransform,this._spriteRect.anchor.set(-i.x/i.width,-i.y/i.height),this._spriteRect._onAnchorUpdate(),this._spriteRect._renderWebGL(t)},e.prototype._renderCanvas=function(t){this.isMask!==!0&&t.plugins.graphics.render(this)},e.prototype._calculateBounds=function(){this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.updateLocalBounds(),this.cachedSpriteDirty=!0);var t=this._localBounds;this._bounds.addFrame(this.transform,t.minX,t.minY,t.maxX,t.maxY)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,P);for(var e=this.graphicsData,i=0;i<e.length;++i){var r=e[i];if(r.fill&&r.shape&&r.shape.contains(P.x,P.y))return!0}return!1},e.prototype.updateLocalBounds=function(){var t=1/0,e=-(1/0),i=1/0,r=-(1/0);if(this.graphicsData.length)for(var n=0,s=0,a=0,o=0,l=0,h=0;h<this.graphicsData.length;h++){var u=this.graphicsData[h],c=u.type,d=u.lineWidth;if(n=u.shape,c===y.SHAPES.RECT||c===y.SHAPES.RREC)s=n.x-d/2,a=n.y-d/2,o=n.width+d,l=n.height+d,t=s<t?s:t,e=s+o>e?s+o:e,i=a<i?a:i,r=a+l>r?a+l:r;else if(c===y.SHAPES.CIRC)s=n.x,a=n.y,o=n.radius+d/2,l=n.radius+d/2,t=s-o<t?s-o:t,e=s+o>e?s+o:e,i=a-l<i?a-l:i,r=a+l>r?a+l:r;else if(c===y.SHAPES.ELIP)s=n.x,a=n.y,o=n.width+d/2,l=n.height+d/2,t=s-o<t?s-o:t,e=s+o>e?s+o:e,i=a-l<i?a-l:i,r=a+l>r?a+l:r;else for(var f=n.points,p=0,_=0,m=0,g=0,v=0,T=0,b=0,x=0,w=0;w+2<f.length;w+=2)s=f[w],a=f[w+1],p=f[w+2],_=f[w+3],m=Math.abs(p-s),g=Math.abs(_-a),l=d,o=Math.sqrt(m*m+g*g),o<1e-9||(v=(l/o*g+m)/2,T=(l/o*m+g)/2,b=(p+s)/2,x=(_+a)/2,t=b-v<t?b-v:t,e=b+v>e?b+v:e,i=x-T<i?x-T:i,r=x+T>r?x+T:r)}else t=0,e=0,i=0,r=0;var E=this.boundsPadding;this._localBounds.minX=t-E,this._localBounds.maxX=e+2*E,this._localBounds.minY=i-E,this._localBounds.maxY=r+2*E},e.prototype.drawShape=function(t){this.currentPath&&this.currentPath.shape.points.length<=2&&this.graphicsData.pop(),this.currentPath=null;var e=new p.default(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.filling,t);return this.graphicsData.push(e),e.type===y.SHAPES.POLY&&(e.shape.closed=e.shape.closed||this.filling,this.currentPath=e),this.dirty++,e},e.prototype.generateCanvasTexture=function(t){var e=arguments.length<=1||void 0===arguments[1]?1:arguments[1],i=this.getLocalBounds(),r=u.default.create(i.width,i.height,t,e);D||(D=new S.default),A.tx=-i.x,A.ty=-i.y,D.render(this,r,!1,A);var n=d.default.fromCanvas(r.baseTexture._canvasRenderTarget.canvas,t);return n.baseTexture.resolution=e,n.baseTexture.update(),n},e.prototype.closePath=function(){var t=this.currentPath;return t&&t.shape&&t.shape.close(),this},e.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},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e);for(var i=0;i<this.graphicsData.length;++i)this.graphicsData[i].destroy();for(var r in this._webgl)for(var n=0;n<this._webgl[r].data.length;++n)this._webgl[r].data[n].destroy();this._spriteRect&&this._spriteRect.destroy(),this.graphicsData=null,this.currentPath=null,this._webgl=null,this._localBounds=null},e}(l.default);i.default=M,M._SPRITE_TEXTURE=null},{"../const":42,"../display/Bounds":43,"../display/Container":44,"../math":66,"../renderers/canvas/CanvasRenderer":73,"../sprites/Sprite":98,"../textures/RenderTexture":108,"../textures/Texture":109,"../utils":117,"./GraphicsData":50,"./utils/bezierCurveTo":52}],50:[function(t,e,i){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=function(){function t(e,i,n,s,a,o,l){r(this,t),this.lineWidth=e,this.lineColor=i,this.lineAlpha=n,this._lineTint=i,this.fillColor=s,this.fillAlpha=a,this._fillTint=s,this.fill=o,this.holes=[],this.shape=l,this.type=l.type}return t.prototype.clone=function(){return new t(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.fill,this.shape)},t.prototype.addHole=function(t){this.holes.push(t)},t.prototype.destroy=function(){this.shape=null,this.holes=null},t}();i.default=n},{}],51:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s=t("../../renderers/canvas/CanvasRenderer"),a=r(s),o=t("../../const"),l=function(){function t(e){n(this,t),this.renderer=e}return t.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 l=t.graphicsData[a],h=l.shape,u=l._fillTint,c=l._lineTint;if(i.lineWidth=l.lineWidth,l.type===o.SHAPES.POLY){i.beginPath(),this.renderPolygon(h.points,h.closed,i);for(var d=0;d<l.holes.length;d++)this.renderPolygon(l.holes[d].points,!0,i);l.fill&&(i.globalAlpha=l.fillAlpha*r,i.fillStyle="#"+("00000"+(0|u).toString(16)).substr(-6),i.fill()),l.lineWidth&&(i.globalAlpha=l.lineAlpha*r,i.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),i.stroke())}else if(l.type===o.SHAPES.RECT)(l.fillColor||0===l.fillColor)&&(i.globalAlpha=l.fillAlpha*r,i.fillStyle="#"+("00000"+(0|u).toString(16)).substr(-6),i.fillRect(h.x,h.y,h.width,h.height)),l.lineWidth&&(i.globalAlpha=l.lineAlpha*r,i.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),i.strokeRect(h.x,h.y,h.width,h.height));else if(l.type===o.SHAPES.CIRC)i.beginPath(),i.arc(h.x,h.y,h.radius,0,2*Math.PI),i.closePath(),l.fill&&(i.globalAlpha=l.fillAlpha*r,i.fillStyle="#"+("00000"+(0|u).toString(16)).substr(-6),i.fill()),l.lineWidth&&(i.globalAlpha=l.lineAlpha*r,i.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),i.stroke());else if(l.type===o.SHAPES.ELIP){var f=2*h.width,p=2*h.height,_=h.x-f/2,m=h.y-p/2;i.beginPath();var g=.5522848,v=f/2*g,y=p/2*g,T=_+f,b=m+p,x=_+f/2,w=m+p/2;i.moveTo(_,w),i.bezierCurveTo(_,w-y,x-v,m,x,m),i.bezierCurveTo(x+v,m,T,w-y,T,w),i.bezierCurveTo(T,w+y,x+v,b,x,b),i.bezierCurveTo(x-v,b,_,w+y,_,w),i.closePath(),l.fill&&(i.globalAlpha=l.fillAlpha*r,i.fillStyle="#"+("00000"+(0|u).toString(16)).substr(-6),i.fill()),l.lineWidth&&(i.globalAlpha=l.lineAlpha*r,i.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),i.stroke())}else if(l.type===o.SHAPES.RREC){var E=h.x,S=h.y,D=h.width,A=h.height,P=h.radius,O=Math.min(D,A)/2|0;P=P>O?O:P,i.beginPath(),i.moveTo(E,S+P),i.lineTo(E,S+A-P),i.quadraticCurveTo(E,S+A,E+P,S+A),i.lineTo(E+D-P,S+A),i.quadraticCurveTo(E+D,S+A,E+D,S+A-P),i.lineTo(E+D,S+P),i.quadraticCurveTo(E+D,S,E+D-P,S),i.lineTo(E+P,S),i.quadraticCurveTo(E,S,E,S+P),i.closePath(),(l.fillColor||0===l.fillColor)&&(i.globalAlpha=l.fillAlpha*r,i.fillStyle="#"+("00000"+(0|u).toString(16)).substr(-6),i.fill()),l.lineWidth&&(i.globalAlpha=l.lineAlpha*r,i.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),i.stroke())}}},t.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 s=t.graphicsData[n],a=0|s.fillColor,o=0|s.lineColor;s._fillTint=((a>>16&255)/255*e*255<<16)+((a>>8&255)/255*i*255<<8)+(255&a)/255*r*255,s._lineTint=((o>>16&255)/255*e*255<<16)+((o>>8&255)/255*i*255<<8)+(255&o)/255*r*255}},t.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()},t.prototype.destroy=function(){this.renderer=null},t}();i.default=l,a.default.registerPlugin("graphics",l)},{"../../const":42,"../../renderers/canvas/CanvasRenderer":73}],52:[function(t,e,i){function r(t,e,i,r,n,s,a,o){var l=arguments.length<=8||void 0===arguments[8]?[]:arguments[8],h=20,u=0,c=0,d=0,f=0,p=0;l.push(t,e);for(var _=1,m=0;_<=h;++_)m=_/h,u=1-m,c=u*u,d=c*u,f=m*m,p=f*m,l.push(d*t+3*c*m*i+3*u*f*n+p*a,d*e+3*c*m*r+3*u*f*s+p*o);return l}i.__esModule=!0,i.default=r},{}],53:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=t("../../utils"),l=t("../../const"),h=t("../../renderers/webgl/utils/ObjectRenderer"),u=r(h),c=t("../../renderers/webgl/WebGLRenderer"),d=r(c),f=t("./WebGLGraphicsData"),p=r(f),_=t("./shaders/PrimitiveShader"),m=r(_),g=t("./utils/buildPoly"),v=r(g),y=t("./utils/buildRectangle"),T=r(y),b=t("./utils/buildRoundedRectangle"),x=r(b),w=t("./utils/buildCircle"),E=r(w),S=function(t){function e(i){n(this,e);var r=s(this,t.call(this,i));return r.graphicsDataPool=[],r.primitiveShader=null,r.gl=i.gl,r.CONTEXT_UID=0,r}return a(e,t),e.prototype.onContextChange=function(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.primitiveShader=new m.default(this.gl)},e.prototype.destroy=function(){u.default.prototype.destroy.call(this);for(var t=0;t<this.graphicsDataPool.length;++t)this.graphicsDataPool[t].destroy();this.graphicsDataPool=null},e.prototype.render=function(t){var e=this.renderer,i=e.gl,r=void 0,n=t._webGL[this.CONTEXT_UID];n&&t.dirty===n.dirty||(this.updateGraphics(t),n=t._webGL[this.CONTEXT_UID]);var s=this.primitiveShader;e.bindShader(s),e.state.setBlendMode(t.blendMode);for(var a=0,l=n.data.length;a<l;a++){r=n.data[a];var h=r.shader;e.bindShader(h),h.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),h.uniforms.tint=(0,o.hex2rgb)(t.tint),h.uniforms.alpha=t.worldAlpha,e.bindVao(r.vao),r.vao.draw(i.TRIANGLE_STRIP,r.indices.length)}},e.prototype.updateGraphics=function(t){var e=this.renderer.gl,i=t._webGL[this.CONTEXT_UID];if(i||(i=t._webGL[this.CONTEXT_UID]={lastIndex:0,data:[],gl:e,clearDirty:-1,dirty:-1}),i.dirty=t.dirty,t.clearDirty!==i.clearDirty){i.clearDirty=t.clearDirty;for(var r=0;r<i.data.length;r++)this.graphicsDataPool.push(i.data[r]);i.data.length=0,i.lastIndex=0}for(var n=void 0,s=i.lastIndex;s<t.graphicsData.length;s++){var a=t.graphicsData[s];n=this.getWebGLData(i,0),a.type===l.SHAPES.POLY&&(0,v.default)(a,n),a.type===l.SHAPES.RECT?(0,T.default)(a,n):a.type===l.SHAPES.CIRC||a.type===l.SHAPES.ELIP?(0,E.default)(a,n):a.type===l.SHAPES.RREC&&(0,x.default)(a,n),i.lastIndex++}this.renderer.bindVao(null);for(var o=0;o<i.data.length;o++)n=i.data[o],n.dirty&&n.upload()},e.prototype.getWebGLData=function(t,e){var i=t.data[t.data.length-1];return(!i||i.points.length>32e4)&&(i=this.graphicsDataPool.pop()||new p.default(this.renderer.gl,this.primitiveShader,this.renderer.state.attribsState),i.reset(e),t.data.push(i)),i.dirty=!0,i},e}(u.default);i.default=S,d.default.registerPlugin("graphics",S)},{"../../const":42,"../../renderers/webgl/WebGLRenderer":80,"../../renderers/webgl/utils/ObjectRenderer":90,"../../utils":117,"./WebGLGraphicsData":54,"./shaders/PrimitiveShader":55,"./utils/buildCircle":56,"./utils/buildPoly":58,"./utils/buildRectangle":59,"./utils/buildRoundedRectangle":60}],54:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s=t("pixi-gl-core"),a=r(s),o=function(){function t(e,i,r){n(this,t),this.gl=e,this.color=[0,0,0],this.points=[],this.indices=[],this.buffer=a.default.GLBuffer.createVertexBuffer(e),this.indexBuffer=a.default.GLBuffer.createIndexBuffer(e),this.dirty=!0,this.glPoints=null,this.glIndices=null,this.shader=i,this.vao=new a.default.VertexArrayObject(e,r).addIndex(this.indexBuffer).addAttribute(this.buffer,i.attributes.aVertexPosition,e.FLOAT,!1,24,0).addAttribute(this.buffer,i.attributes.aColor,e.FLOAT,!1,24,8)}return t.prototype.reset=function(){this.points.length=0,this.indices.length=0},t.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},t.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},t}();i.default=o},{"pixi-gl-core":12}],55:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=t("../../../Shader"),l=r(o),h=function(t){function e(i){return n(this,e),s(this,t.call(this,i,["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")))}return a(e,t),e}(l.default);i.default=h},{"../../../Shader":41}],56:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){var i=t.shape,r=i.x,n=i.y,s=void 0,h=void 0;t.type===o.SHAPES.CIRC?(s=i.radius,h=i.radius):(s=i.width,h=i.height);var u=Math.floor(30*Math.sqrt(i.radius))||Math.floor(15*Math.sqrt(i.width+i.height)),c=2*Math.PI/u;if(t.fill){var d=(0,l.hex2rgb)(t.fillColor),f=t.fillAlpha,p=d[0]*f,_=d[1]*f,m=d[2]*f,g=e.points,v=e.indices,y=g.length/6;v.push(y);for(var T=0;T<u+1;T++)g.push(r,n,p,_,m,f),g.push(r+Math.sin(c*T)*s,n+Math.cos(c*T)*h,p,_,m,f),v.push(y++,y++);v.push(y-1)}if(t.lineWidth){var b=t.points;t.points=[];for(var x=0;x<u+1;x++)t.points.push(r+Math.sin(c*x)*s,n+Math.cos(c*x)*h);(0,a.default)(t,e),t.points=b}}i.__esModule=!0,i.default=n;var s=t("./buildLine"),a=r(s),o=t("../../../const"),l=t("../../../utils")},{"../../../const":42,"../../../utils":117,"./buildLine":57}],57:[function(t,e,i){function r(t,e){var i=t.points;if(0!==i.length){var r=new n.Point(i[0],i[1]),a=new n.Point(i[i.length-2],i[i.length-1]);if(r.x===a.x&&r.y===a.y){i=i.slice(),i.pop(),i.pop(),a=new n.Point(i[i.length-2],i[i.length-1]);var o=a.x+.5*(r.x-a.x),l=a.y+.5*(r.y-a.y);i.unshift(o,l),i.push(o,l)}var h=e.points,u=e.indices,c=i.length/2,d=i.length,f=h.length/6,p=t.lineWidth/2,_=(0,s.hex2rgb)(t.lineColor),m=t.lineAlpha,g=_[0]*m,v=_[1]*m,y=_[2]*m,T=i[0],b=i[1],x=i[2],w=i[3],E=0,S=0,D=-(b-w),A=T-x,P=0,O=0,C=0,M=0,L=Math.sqrt(D*D+A*A);D/=L,A/=L,D*=p,A*=p,h.push(T-D,b-A,g,v,y,m),h.push(T+D,b+A,g,v,y,m);for(var R=1;R<c-1;++R){T=i[2*(R-1)],b=i[2*(R-1)+1],x=i[2*R],w=i[2*R+1],E=i[2*(R+1)],S=i[2*(R+1)+1],D=-(b-w),A=T-x,L=Math.sqrt(D*D+A*A),D/=L,A/=L,D*=p,A*=p,P=-(w-S),O=x-E,L=Math.sqrt(P*P+O*O),P/=L,O/=L,P*=p,O*=p;var I=-A+b-(-A+w),N=-D+x-(-D+T),j=(-D+T)*(-A+w)-(-D+x)*(-A+b),F=-O+S-(-O+w),B=-P+x-(-P+E),k=(-P+E)*(-O+w)-(-P+x)*(-O+S),U=I*B-F*N;if(Math.abs(U)<.1)U+=10.1,h.push(x-D,w-A,g,v,y,m),h.push(x+D,w+A,g,v,y,m);else{var X=(N*k-B*j)/U,H=(F*j-I*k)/U,V=(X-x)*(X-x)+(H-w)*(H-w);V>196*p*p?(C=D-P,M=A-O,L=Math.sqrt(C*C+M*M),C/=L,M/=L,C*=p,M*=p,h.push(x-C,w-M),h.push(g,v,y,m),h.push(x+C,w+M),h.push(g,v,y,m),h.push(x-C,w-M),h.push(g,v,y,m),d++):(h.push(X,H),h.push(g,v,y,m),h.push(x-(X-x),w-(H-w)),h.push(g,v,y,m))}}T=i[2*(c-2)],b=i[2*(c-2)+1],x=i[2*(c-1)],w=i[2*(c-1)+1],D=-(b-w),A=T-x,L=Math.sqrt(D*D+A*A),D/=L,A/=L,D*=p,A*=p,h.push(x-D,w-A),h.push(g,v,y,m),h.push(x+D,w+A),h.push(g,v,y,m),u.push(f);for(var Y=0;Y<d;++Y)u.push(f++);u.push(f-1)}}i.__esModule=!0,i.default=r;var n=t("../../../math"),s=t("../../../utils")},{"../../../math":66,"../../../utils":117}],58:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){t.points=t.shape.points.slice();var i=t.points;if(t.fill&&i.length>=6){for(var r=[],n=t.holes,s=0;s<n.length;s++){var l=n[s];r.push(i.length/2),i=i.concat(l.points)}var u=e.points,c=e.indices,d=i.length/2,f=(0,o.hex2rgb)(t.fillColor),p=t.fillAlpha,_=f[0]*p,m=f[1]*p,g=f[2]*p,v=(0,h.default)(i,r,2);if(!v)return;for(var y=u.length/6,T=0;T<v.length;T+=3)c.push(v[T]+y),c.push(v[T]+y),c.push(v[T+1]+y),c.push(v[T+2]+y),c.push(v[T+2]+y);for(var b=0;b<d;b++)u.push(i[2*b],i[2*b+1],_,m,g,p)}t.lineWidth>0&&(0,a.default)(t,e)}i.__esModule=!0,i.default=n;var s=t("./buildLine"),a=r(s),o=t("../../../utils"),l=t("earcut"),h=r(l)},{"../../../utils":117,"./buildLine":57,earcut:2}],59:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){var i=t.shape,r=i.x,n=i.y,s=i.width,l=i.height;if(t.fill){var h=(0,o.hex2rgb)(t.fillColor),u=t.fillAlpha,c=h[0]*u,d=h[1]*u,f=h[2]*u,p=e.points,_=e.indices,m=p.length/6;p.push(r,n),p.push(c,d,f,u),p.push(r+s,n),p.push(c,d,f,u),p.push(r,n+l),p.push(c,d,f,u),p.push(r+s,n+l),p.push(c,d,f,u),_.push(m,m,m+1,m+2,m+3,m+3)}if(t.lineWidth){var g=t.points;t.points=[r,n,r+s,n,r+s,n+l,r,n+l,r,n],(0,a.default)(t,e),t.points=g}}i.__esModule=!0,i.default=n;var s=t("./buildLine"),a=r(s),o=t("../../../utils")},{"../../../utils":117,"./buildLine":57}],60:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){var i=t.shape,r=i.x,n=i.y,a=i.width,l=i.height,c=i.radius,d=[];if(d.push(r,n+c),s(r,n+l-c,r,n+l,r+c,n+l,d),s(r+a-c,n+l,r+a,n+l,r+a,n+l-c,d),s(r+a,n+c,r+a,n,r+a-c,n,d),s(r+c,n,r,n,r,n+c+1e-10,d),t.fill){for(var f=(0,u.hex2rgb)(t.fillColor),p=t.fillAlpha,_=f[0]*p,m=f[1]*p,g=f[2]*p,v=e.points,y=e.indices,T=v.length/6,b=(0,o.default)(d,null,2),x=0,w=b.length;x<w;x+=3)y.push(b[x]+T),y.push(b[x]+T),y.push(b[x+1]+T),y.push(b[x+2]+T),y.push(b[x+2]+T);for(var E=0,S=d.length;E<S;E++)v.push(d[E],d[++E],_,m,g,p)}if(t.lineWidth){var D=t.points;t.points=d,(0,h.default)(t,e),t.points=D}}function s(t,e,i,r,n,s){function a(t,e,i){var r=e-t;return t+r*i}for(var o=arguments.length<=6||void 0===arguments[6]?[]:arguments[6],l=20,h=o,u=0,c=0,d=0,f=0,p=0,_=0,m=0,g=0;m<=l;++m)g=m/l,u=a(t,i,g),c=a(e,r,g),d=a(i,n,g),f=a(r,s,g),p=a(u,d,g),_=a(c,f,g),h.push(p,_);return h}i.__esModule=!0,i.default=n;var a=t("earcut"),o=r(a),l=t("./buildLine"),h=r(l),u=t("../../../utils")},{"../../../utils":117,"./buildLine":57,earcut:2}],61:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function n(t){return t&&t.__esModule?t:{default:t}}function s(){var t=arguments.length<=0||void 0===arguments[0]?800:arguments[0],e=arguments.length<=1||void 0===arguments[1]?600:arguments[1],i=arguments[2],r=arguments[3];return!r&&U.isWebGLSupported()?new z.default(t,e,i):new W.default(t,e,i)}i.__esModule=!0,i.Filter=i.SpriteMaskFilter=i.Quad=i.RenderTarget=i.ObjectRenderer=i.WebGLManager=i.Shader=i.CanvasRenderTarget=i.TextureUvs=i.VideoBaseTexture=i.BaseRenderTexture=i.RenderTexture=i.BaseTexture=i.Texture=i.CanvasGraphicsRenderer=i.GraphicsRenderer=i.GraphicsData=i.Graphics=i.TextStyle=i.Text=i.SpriteRenderer=i.CanvasTinter=i.CanvasSpriteRenderer=i.Sprite=i.TransformBase=i.TransformStatic=i.Transform=i.Container=i.DisplayObject=i.Bounds=i.glCore=i.WebGLRenderer=i.CanvasRenderer=i.ticker=i.utils=i.settings=void 0;var a=t("./const");Object.keys(a).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(i,t,{enumerable:!0,get:function(){return a[t]}})});var o=t("./math");Object.keys(o).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(i,t,{enumerable:!0,get:function(){return o[t]}})});var l=t("pixi-gl-core");Object.defineProperty(i,"glCore",{enumerable:!0,get:function(){return n(l).default}});var h=t("./display/Bounds");Object.defineProperty(i,"Bounds",{enumerable:!0,get:function(){return n(h).default}});var u=t("./display/DisplayObject");Object.defineProperty(i,"DisplayObject",{enumerable:!0,get:function(){return n(u).default}});var c=t("./display/Container");Object.defineProperty(i,"Container",{enumerable:!0,get:function(){return n(c).default}});var d=t("./display/Transform");Object.defineProperty(i,"Transform",{enumerable:!0,get:function(){return n(d).default}});var f=t("./display/TransformStatic");Object.defineProperty(i,"TransformStatic",{enumerable:!0,get:function(){return n(f).default}});var p=t("./display/TransformBase");Object.defineProperty(i,"TransformBase",{enumerable:!0,get:function(){return n(p).default}});var _=t("./sprites/Sprite");Object.defineProperty(i,"Sprite",{enumerable:!0,get:function(){return n(_).default}});var m=t("./sprites/canvas/CanvasSpriteRenderer");Object.defineProperty(i,"CanvasSpriteRenderer",{enumerable:!0,get:function(){return n(m).default}});var g=t("./sprites/canvas/CanvasTinter");Object.defineProperty(i,"CanvasTinter",{enumerable:!0,get:function(){return n(g).default}});var v=t("./sprites/webgl/SpriteRenderer");Object.defineProperty(i,"SpriteRenderer",{enumerable:!0,get:function(){return n(v).default}});var y=t("./text/Text");Object.defineProperty(i,"Text",{enumerable:!0,get:function(){return n(y).default}});var T=t("./text/TextStyle");Object.defineProperty(i,"TextStyle",{enumerable:!0,get:function(){return n(T).default}});var b=t("./graphics/Graphics");Object.defineProperty(i,"Graphics",{enumerable:!0,get:function(){return n(b).default}});var x=t("./graphics/GraphicsData");Object.defineProperty(i,"GraphicsData",{enumerable:!0,get:function(){return n(x).default}});var w=t("./graphics/webgl/GraphicsRenderer");Object.defineProperty(i,"GraphicsRenderer",{enumerable:!0,get:function(){return n(w).default}});var E=t("./graphics/canvas/CanvasGraphicsRenderer");Object.defineProperty(i,"CanvasGraphicsRenderer",{enumerable:!0,get:function(){return n(E).default}});var S=t("./textures/Texture");Object.defineProperty(i,"Texture",{enumerable:!0,get:function(){return n(S).default}});var D=t("./textures/BaseTexture");Object.defineProperty(i,"BaseTexture",{enumerable:!0,get:function(){return n(D).default}});var A=t("./textures/RenderTexture");Object.defineProperty(i,"RenderTexture",{enumerable:!0,get:function(){return n(A).default}});var P=t("./textures/BaseRenderTexture");Object.defineProperty(i,"BaseRenderTexture",{enumerable:!0,get:function(){return n(P).default}});var O=t("./textures/VideoBaseTexture");Object.defineProperty(i,"VideoBaseTexture",{enumerable:!0,get:function(){return n(O).default}});var C=t("./textures/TextureUvs");Object.defineProperty(i,"TextureUvs",{enumerable:!0,get:function(){return n(C).default}});var M=t("./renderers/canvas/utils/CanvasRenderTarget");Object.defineProperty(i,"CanvasRenderTarget",{enumerable:!0,get:function(){return n(M).default}});var L=t("./Shader");Object.defineProperty(i,"Shader",{enumerable:!0,get:function(){return n(L).default}});var R=t("./renderers/webgl/managers/WebGLManager");Object.defineProperty(i,"WebGLManager",{enumerable:!0,get:function(){return n(R).default}});var I=t("./renderers/webgl/utils/ObjectRenderer");Object.defineProperty(i,"ObjectRenderer",{ enumerable:!0,get:function(){return n(I).default}});var N=t("./renderers/webgl/utils/RenderTarget");Object.defineProperty(i,"RenderTarget",{enumerable:!0,get:function(){return n(N).default}});var j=t("./renderers/webgl/utils/Quad");Object.defineProperty(i,"Quad",{enumerable:!0,get:function(){return n(j).default}});var F=t("./renderers/webgl/filters/spriteMask/SpriteMaskFilter");Object.defineProperty(i,"SpriteMaskFilter",{enumerable:!0,get:function(){return n(F).default}});var B=t("./renderers/webgl/filters/Filter");Object.defineProperty(i,"Filter",{enumerable:!0,get:function(){return n(B).default}}),i.autoDetectRenderer=s;var k=t("./utils"),U=r(k),X=t("./ticker"),H=r(X),V=t("./settings"),Y=n(V),G=t("./renderers/canvas/CanvasRenderer"),W=n(G),q=t("./renderers/webgl/WebGLRenderer"),z=n(q);i.settings=Y.default,i.utils=U,i.ticker=H,i.CanvasRenderer=W.default,i.WebGLRenderer=z.default},{"./Shader":41,"./const":42,"./display/Bounds":43,"./display/Container":44,"./display/DisplayObject":45,"./display/Transform":46,"./display/TransformBase":47,"./display/TransformStatic":48,"./graphics/Graphics":49,"./graphics/GraphicsData":50,"./graphics/canvas/CanvasGraphicsRenderer":51,"./graphics/webgl/GraphicsRenderer":53,"./math":66,"./renderers/canvas/CanvasRenderer":73,"./renderers/canvas/utils/CanvasRenderTarget":75,"./renderers/webgl/WebGLRenderer":80,"./renderers/webgl/filters/Filter":82,"./renderers/webgl/filters/spriteMask/SpriteMaskFilter":85,"./renderers/webgl/managers/WebGLManager":89,"./renderers/webgl/utils/ObjectRenderer":90,"./renderers/webgl/utils/Quad":91,"./renderers/webgl/utils/RenderTarget":92,"./settings":97,"./sprites/Sprite":98,"./sprites/canvas/CanvasSpriteRenderer":99,"./sprites/canvas/CanvasTinter":100,"./sprites/webgl/SpriteRenderer":102,"./text/Text":104,"./text/TextStyle":105,"./textures/BaseRenderTexture":106,"./textures/BaseTexture":107,"./textures/RenderTexture":108,"./textures/Texture":109,"./textures/TextureUvs":110,"./textures/VideoBaseTexture":111,"./ticker":113,"./utils":117,"pixi-gl-core":12}],62:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t){return t<0?-1:t>0?1:0}function s(){for(var t=0;t<16;t++){var e=[];f.push(e);for(var i=0;i<16;i++)for(var r=n(l[t]*l[i]+u[t]*h[i]),s=n(h[t]*l[i]+c[t]*h[i]),a=n(l[t]*u[i]+u[t]*c[i]),p=n(h[t]*u[i]+c[t]*c[i]),_=0;_<16;_++)if(l[_]===r&&h[_]===s&&u[_]===a&&c[_]===p){e.push(_);break}}for(var m=0;m<16;m++){var g=new o.default;g.set(l[m],h[m],u[m],c[m],0,0),d.push(g)}}i.__esModule=!0;var a=t("./Matrix"),o=r(a),l=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],h=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],u=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],c=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],d=[],f=[];s();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 l[t]},uY:function(t){return h[t]},vX:function(t){return u[t]},vY:function(t){return c[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return f[t][e]},sub:function(t,e){return f[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){var i=arguments.length<=2||void 0===arguments[2]?0:arguments[2],r=arguments.length<=3||void 0===arguments[3]?0:arguments[3],n=d[p.inv(e)];n.tx=i,n.ty=r,t.append(n)}};i.default=p},{"./Matrix":63}],63:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s=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}}(),a=t("./Point"),o=r(a),l=function(){function t(){n(this,t),this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this.array=null}return t.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]},t.prototype.set=function(t,e,i,r,n,s){return this.a=t,this.b=e,this.c=i,this.d=r,this.tx=n,this.ty=s,this},t.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},t.prototype.apply=function(t,e){e=e||new o.default;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},t.prototype.applyInverse=function(t,e){e=e||new o.default;var i=1/(this.a*this.d+this.c*-this.b),r=t.x,n=t.y;return e.x=this.d*i*r+-this.c*i*n+(this.ty*this.c-this.tx*this.d)*i,e.y=this.a*i*n+-this.b*i*r+(-this.ty*this.a+this.tx*this.b)*i,e},t.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},t.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},t.prototype.rotate=function(t){var e=Math.cos(t),i=Math.sin(t),r=this.a,n=this.c,s=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=s*e-this.ty*i,this.ty=s*i+this.ty*e,this},t.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},t.prototype.setTransform=function(t,e,i,r,n,s,a,o,l){var h=Math.sin(a),u=Math.cos(a),c=Math.cos(l),d=Math.sin(l),f=-Math.sin(o),p=Math.cos(o),_=u*n,m=h*n,g=-h*s,v=u*s;return this.a=c*_+d*g,this.b=c*m+d*v,this.c=f*_+p*g,this.d=f*m+p*v,this.tx=t+(i*_+r*g),this.ty=e+(i*m+r*v),this},t.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},t.prototype.decompose=function(t){var e=this.a,i=this.b,r=this.c,n=this.d,s=-Math.atan2(-r,n),a=Math.atan2(i,e),o=Math.abs(s+a);return o<1e-5?(t.rotation=a,e<0&&n>=0&&(t.rotation+=t.rotation<=0?Math.PI:-Math.PI),t.skew.x=t.skew.y=0):(t.skew.x=s,t.skew.y=a),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},t.prototype.invert=function(){var t=this.a,e=this.b,i=this.c,r=this.d,n=this.tx,s=t*r-e*i;return this.a=r/s,this.b=-e/s,this.c=-i/s,this.d=t/s,this.tx=(i*this.ty-r*n)/s,this.ty=-(t*this.ty-e*n)/s,this},t.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},t.prototype.clone=function(){var e=new t;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},t.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},s(t,null,[{key:"IDENTITY",get:function(){return new t}},{key:"TEMP_MATRIX",get:function(){return new t}}]),t}();i.default=l},{"./Point":65}],64:[function(t,e,i){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=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}}(),s=function(){function t(e,i){var n=arguments.length<=2||void 0===arguments[2]?0:arguments[2],s=arguments.length<=3||void 0===arguments[3]?0:arguments[3];r(this,t),this._x=n,this._y=s,this.cb=e,this.scope=i}return t.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))},t.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))},n(t,[{key:"x",get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}},{key:"y",get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}]),t}();i.default=s},{}],65:[function(t,e,i){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],i=arguments.length<=1||void 0===arguments[1]?0:arguments[1];r(this,t),this.x=e,this.y=i}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copy=function(t){this.set(t.x,t.y)},t.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},t.prototype.set=function(t,e){this.x=t||0,this.y=e||(0!==e?this.x:0)},t}();i.default=n},{}],66:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}i.__esModule=!0;var n=t("./Point");Object.defineProperty(i,"Point",{enumerable:!0,get:function(){return r(n).default}});var s=t("./ObservablePoint");Object.defineProperty(i,"ObservablePoint",{enumerable:!0,get:function(){return r(s).default}});var a=t("./Matrix");Object.defineProperty(i,"Matrix",{enumerable:!0,get:function(){return r(a).default}});var o=t("./GroupD8");Object.defineProperty(i,"GroupD8",{enumerable:!0,get:function(){return r(o).default}});var l=t("./shapes/Circle");Object.defineProperty(i,"Circle",{enumerable:!0,get:function(){return r(l).default}});var h=t("./shapes/Ellipse");Object.defineProperty(i,"Ellipse",{enumerable:!0,get:function(){return r(h).default}});var u=t("./shapes/Polygon");Object.defineProperty(i,"Polygon",{enumerable:!0,get:function(){return r(u).default}});var c=t("./shapes/Rectangle");Object.defineProperty(i,"Rectangle",{enumerable:!0,get:function(){return r(c).default}});var d=t("./shapes/RoundedRectangle");Object.defineProperty(i,"RoundedRectangle",{enumerable:!0,get:function(){return r(d).default}})},{"./GroupD8":62,"./Matrix":63,"./ObservablePoint":64,"./Point":65,"./shapes/Circle":67,"./shapes/Ellipse":68,"./shapes/Polygon":69,"./shapes/Rectangle":70,"./shapes/RoundedRectangle":71}],67:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s=t("./Rectangle"),a=r(s),o=t("../../const"),l=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],i=arguments.length<=1||void 0===arguments[1]?0:arguments[1],r=arguments.length<=2||void 0===arguments[2]?0:arguments[2];n(this,t),this.x=e,this.y=i,this.radius=r,this.type=o.SHAPES.CIRC}return t.prototype.clone=function(){return new t(this.x,this.y,this.radius)},t.prototype.contains=function(t,e){if(this.radius<=0)return!1;var i=this.radius*this.radius,r=this.x-t,n=this.y-e;return r*=r,n*=n,r+n<=i},t.prototype.getBounds=function(){return new a.default(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)},t}();i.default=l},{"../../const":42,"./Rectangle":70}],68:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s=t("./Rectangle"),a=r(s),o=t("../../const"),l=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],i=arguments.length<=1||void 0===arguments[1]?0:arguments[1],r=arguments.length<=2||void 0===arguments[2]?0:arguments[2],s=arguments.length<=3||void 0===arguments[3]?0:arguments[3];n(this,t),this.x=e,this.y=i,this.width=r,this.height=s,this.type=o.SHAPES.ELIP}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.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},t.prototype.getBounds=function(){return new a.default(this.x-this.width,this.y-this.height,this.width,this.height)},t}();i.default=l},{"../../const":42,"./Rectangle":70}],69:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s=t("../Point"),a=r(s),o=t("../../const"),l=function(){function t(){for(var e=arguments.length,i=Array(e),r=0;r<e;r++)i[r]=arguments[r];if(n(this,t),Array.isArray(i[0])&&(i=i[0]),i[0]instanceof a.default){for(var s=[],l=0,h=i.length;l<h;l++)s.push(i[l].x,i[l].y);i=s}this.closed=!0,this.points=i,this.type=o.SHAPES.POLY}return t.prototype.clone=function(){return new t(this.points.slice())},t.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])},t.prototype.contains=function(t,e){for(var i=!1,r=this.points.length/2,n=0,s=r-1;n<r;s=n++){var a=this.points[2*n],o=this.points[2*n+1],l=this.points[2*s],h=this.points[2*s+1],u=o>e!=h>e&&t<(l-a)*((e-o)/(h-o))+a;u&&(i=!i)}return i},t}();i.default=l},{"../../const":42,"../Point":65}],70:[function(t,e,i){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=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}}(),s=t("../../const"),a=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],i=arguments.length<=1||void 0===arguments[1]?0:arguments[1],n=arguments.length<=2||void 0===arguments[2]?0:arguments[2],a=arguments.length<=3||void 0===arguments[3]?0:arguments[3];r(this,t),this.x=e,this.y=i,this.width=n,this.height=a,this.type=s.SHAPES.RECT}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},t.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)},t.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},t.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))},t.prototype.enlarge=function(e){if(e!==t.EMPTY){var i=Math.min(this.x,e.x),r=Math.max(this.x+this.width,e.x+e.width),n=Math.min(this.y,e.y),s=Math.max(this.y+this.height,e.y+e.height);this.x=i,this.width=r-i,this.y=n,this.height=s-n}},n(t,[{key:"left",get:function(){return this.x}},{key:"right",get:function(){return this.x+this.width}},{key:"top",get:function(){return this.y}},{key:"bottom",get:function(){return this.y+this.height}}],[{key:"EMPTY",get:function(){return new t(0,0,0,0)}}]),t}();i.default=a},{"../../const":42}],71:[function(t,e,i){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=t("../../const"),s=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],i=arguments.length<=1||void 0===arguments[1]?0:arguments[1],s=arguments.length<=2||void 0===arguments[2]?0:arguments[2],a=arguments.length<=3||void 0===arguments[3]?0:arguments[3],o=arguments.length<=4||void 0===arguments[4]?20:arguments[4];r(this,t),this.x=e,this.y=i,this.width=s,this.height=a,this.radius=o,this.type=n.SHAPES.RREC}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height,this.radius)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height){if(e>=this.y+this.radius&&e<=this.y+this.height-this.radius||t>=this.x+this.radius&&t<=this.x+this.width-this.radius)return!0;var i=t-(this.x+this.radius),r=e-(this.y+this.radius),n=this.radius*this.radius;if(i*i+r*r<=n)return!0;if(i=t-(this.x+this.width-this.radius),i*i+r*r<=n)return!0;if(r=e-(this.y+this.height-this.radius),i*i+r*r<=n)return!0;if(i=t-(this.x+this.radius),i*i+r*r<=n)return!0}return!1},t}();i.default=s},{"../../const":42}],72:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=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}}(),l=t("../utils"),h=t("../math"),u=t("../const"),c=t("../settings"),d=r(c),f=t("../display/Container"),p=r(f),_=t("../textures/RenderTexture"),m=r(_),g=t("eventemitter3"),v=r(g),y=new h.Matrix,T=function(t){function e(i,r,a,o){n(this,e);var h=s(this,t.call(this));if((0,l.sayHello)(i),o)for(var c in d.default.RENDER_OPTIONS)"undefined"==typeof o[c]&&(o[c]=d.default.RENDER_OPTIONS[c]);else o=d.default.RENDER_OPTIONS;return h.type=u.RENDERER_TYPE.UNKNOWN,h.width=r||800,h.height=a||600,h.view=o.view||document.createElement("canvas"),h.resolution=o.resolution||d.default.RESOLUTION,h.transparent=o.transparent,h.autoResize=o.autoResize||!1,h.blendModes=null,h.preserveDrawingBuffer=o.preserveDrawingBuffer,h.clearBeforeRender=o.clearBeforeRender,h.roundPixels=o.roundPixels,h._backgroundColor=0,h._backgroundColorRgba=[0,0,0,0],h._backgroundColorString="#000000",h.backgroundColor=o.backgroundColor||h._backgroundColor,h._tempDisplayObjectParent=new p.default,h._lastObjectRendered=h._tempDisplayObjectParent,h}return a(e,t),e.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")},e.prototype.generateTexture=function(t,e,i){var r=t.getLocalBounds(),n=m.default.create(0|r.width,0|r.height,e,i);return y.tx=-r.x,y.ty=-r.y,this.render(t,n,!1,y,!0),n},e.prototype.destroy=function(t){t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view),this.type=u.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},o(e,[{key:"backgroundColor",get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._backgroundColorString=(0,l.hex2string)(t),(0,l.hex2rgb)(t,this._backgroundColorRgba)}}]),e}(v.default);i.default=T},{"../const":42,"../display/Container":44,"../math":66,"../settings":97,"../textures/RenderTexture":108,"../utils":117,eventemitter3:3}],73:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=t("../SystemRenderer"),l=r(o),h=t("./utils/CanvasMaskManager"),u=r(h),c=t("./utils/CanvasRenderTarget"),d=r(c),f=t("./utils/mapCanvasBlendModesToPixi"),p=r(f),_=t("../../utils"),m=t("../../const"),g=t("../../settings"),v=r(g),y=function(t){function e(i,r){var a=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];n(this,e);var o=s(this,t.call(this,"Canvas",i,r,a));return o.type=m.RENDERER_TYPE.CANVAS,o.rootContext=o.view.getContext("2d",{alpha:o.transparent}),o.refresh=!0,o.maskManager=new u.default(o),o.smoothProperty="imageSmoothingEnabled",o.rootContext.imageSmoothingEnabled||(o.rootContext.webkitImageSmoothingEnabled?o.smoothProperty="webkitImageSmoothingEnabled":o.rootContext.mozImageSmoothingEnabled?o.smoothProperty="mozImageSmoothingEnabled":o.rootContext.oImageSmoothingEnabled?o.smoothProperty="oImageSmoothingEnabled":o.rootContext.msImageSmoothingEnabled&&(o.smoothProperty="msImageSmoothingEnabled")),o.initPlugins(),o.blendModes=(0,p.default)(),o._activeBlendMode=null,o.context=null,o.renderingToScreen=!1,o.resize(i,r),o}return a(e,t),e.prototype.render=function(t,e,i,r,n){if(this.view){this.renderingToScreen=!e,this.emit("prerender");var s=this.resolution;e?(e=e.baseTexture||e,e._canvasRenderTarget||(e._canvasRenderTarget=new d.default(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;var a=this.context;if(e||(this._lastObjectRendered=t),!n){var o=t.parent,l=this._tempDisplayObjectParent.transform.worldTransform;r?r.copy(l):l.identity(),t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=o}a.setTransform(1,0,0,1,0,0),a.globalAlpha=1,a.globalCompositeOperation=this.blendModes[m.BLEND_MODES.NORMAL],navigator.isCocoonJS&&this.view.screencanvas&&(a.fillStyle="black",a.clear()),(void 0!==i?i:this.clearBeforeRender)&&this.renderingToScreen&&(this.transparent?a.clearRect(0,0,this.width,this.height):(a.fillStyle=this._backgroundColorString,a.fillRect(0,0,this.width,this.height)));var h=this.context;this.context=a,t.renderCanvas(this),this.context=h,this.resolution=s,this.emit("postrender")}},e.prototype.clear=function(t){var e=this.context;t=t||this._backgroundColorString,!this.transparent&&t?(e.fillStyle=t,e.fillRect(0,0,this.width,this.height)):e.clearRect(0,0,this.width,this.height)},e.prototype.setBlendMode=function(t){this._activeBlendMode!==t&&(this._activeBlendMode=t,this.context.globalCompositeOperation=this.blendModes[t])},e.prototype.destroy=function(e){this.destroyPlugins(),t.prototype.destroy.call(this,e),this.context=null,this.refresh=!0,this.maskManager.destroy(),this.maskManager=null,this.smoothProperty=null},e.prototype.resize=function(e,i){t.prototype.resize.call(this,e,i),this.smoothProperty&&(this.rootContext[this.smoothProperty]=v.default.SCALE_MODE===m.SCALE_MODES.LINEAR)},e}(l.default);i.default=y,_.pluginTarget.mixin(y)},{"../../const":42,"../../settings":97,"../../utils":117,"../SystemRenderer":72,"./utils/CanvasMaskManager":74,"./utils/CanvasRenderTarget":75,"./utils/mapCanvasBlendModesToPixi":77}],74:[function(t,e,i){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=t("../../../const"),s=function(){function t(e){r(this,t),this.renderer=e}return t.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},t.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 s=t.graphicsData[r],a=s.shape;if(s.type===n.SHAPES.POLY){var o=a.points;e.moveTo(o[0],o[1]);for(var l=1;l<o.length/2;l++)e.lineTo(o[2*l],o[2*l+1]);o[0]===o[o.length-2]&&o[1]===o[o.length-1]&&e.closePath()}else if(s.type===n.SHAPES.RECT)e.rect(a.x,a.y,a.width,a.height),e.closePath();else if(s.type===n.SHAPES.CIRC)e.arc(a.x,a.y,a.radius,0,2*Math.PI),e.closePath();else if(s.type===n.SHAPES.ELIP){var h=2*a.width,u=2*a.height,c=a.x-h/2,d=a.y-u/2,f=.5522848,p=h/2*f,_=u/2*f,m=c+h,g=d+u,v=c+h/2,y=d+u/2;e.moveTo(c,y),e.bezierCurveTo(c,y-_,v-p,d,v,d),e.bezierCurveTo(v+p,d,m,y-_,m,y),e.bezierCurveTo(m,y+_,v+p,g,v,g),e.bezierCurveTo(v-p,g,c,y+_,c,y),e.closePath()}else if(s.type===n.SHAPES.RREC){var T=a.x,b=a.y,x=a.width,w=a.height,E=a.radius,S=Math.min(x,w)/2|0;E=E>S?S:E,e.moveTo(T,b+E),e.lineTo(T,b+w-E),e.quadraticCurveTo(T,b+w,T+E,b+w),e.lineTo(T+x-E,b+w),e.quadraticCurveTo(T+x,b+w,T+x,b+w-E),e.lineTo(T+x,b+E),e.quadraticCurveTo(T+x,b,T+x-E,b),e.lineTo(T+E,b),e.quadraticCurveTo(T,b,T,b+E),e.closePath()}}}},t.prototype.popMask=function(t){t.context.restore()},t.prototype.destroy=function(){},t}();i.default=s},{"../../../const":42}],75:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s=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}}(),a=t("../../../settings"),o=r(a),l=o.default.RESOLUTION,h=function(){function t(e,i,r){n(this,t),this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=r||l,this.resize(e,i)}return t.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},t.prototype.resize=function(t,e){this.canvas.width=t*this.resolution,this.canvas.height=e*this.resolution},t.prototype.destroy=function(){this.context=null,this.canvas=null},s(t,[{key:"width",get:function(){return this.canvas.width},set:function(t){this.canvas.width=t}},{key:"height",get:function(){return this.canvas.height},set:function(t){this.canvas.height=t}}]),t}();i.default=h},{"../../../settings":97}],76:[function(t,e,i){function r(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}function n(){if("undefined"==typeof document)return!1;var t=r("#ff00ff"),e=r("#ffff00"),i=document.createElement("canvas");i.width=6,i.height=1;var n=i.getContext("2d");n.globalCompositeOperation="multiply",n.drawImage(t,0,0),n.drawImage(e,2,0);var s=n.getImageData(2,0,1,1);if(!s)return!1;var a=s.data;return 255===a[0]&&0===a[1]&&0===a[2]}i.__esModule=!0,i.default=n},{}],77:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(){var t=arguments.length<=0||void 0===arguments[0]?[]:arguments[0];return(0,o.default)()?(t[s.BLEND_MODES.NORMAL]="source-over",t[s.BLEND_MODES.ADD]="lighter",t[s.BLEND_MODES.MULTIPLY]="multiply",t[s.BLEND_MODES.SCREEN]="screen",t[s.BLEND_MODES.OVERLAY]="overlay",t[s.BLEND_MODES.DARKEN]="darken",t[s.BLEND_MODES.LIGHTEN]="lighten",t[s.BLEND_MODES.COLOR_DODGE]="color-dodge",t[s.BLEND_MODES.COLOR_BURN]="color-burn",t[s.BLEND_MODES.HARD_LIGHT]="hard-light",t[s.BLEND_MODES.SOFT_LIGHT]="soft-light",t[s.BLEND_MODES.DIFFERENCE]="difference",t[s.BLEND_MODES.EXCLUSION]="exclusion",t[s.BLEND_MODES.HUE]="hue",t[s.BLEND_MODES.SATURATION]="saturate",t[s.BLEND_MODES.COLOR]="color",t[s.BLEND_MODES.LUMINOSITY]="luminosity"):(t[s.BLEND_MODES.NORMAL]="source-over",t[s.BLEND_MODES.ADD]="lighter",t[s.BLEND_MODES.MULTIPLY]="source-over",t[s.BLEND_MODES.SCREEN]="source-over",t[s.BLEND_MODES.OVERLAY]="source-over",t[s.BLEND_MODES.DARKEN]="source-over",t[s.BLEND_MODES.LIGHTEN]="source-over",t[s.BLEND_MODES.COLOR_DODGE]="source-over",t[s.BLEND_MODES.COLOR_BURN]="source-over",t[s.BLEND_MODES.HARD_LIGHT]="source-over",t[s.BLEND_MODES.SOFT_LIGHT]="source-over",t[s.BLEND_MODES.DIFFERENCE]="source-over",t[s.BLEND_MODES.EXCLUSION]="source-over",t[s.BLEND_MODES.HUE]="source-over",t[s.BLEND_MODES.SATURATION]="source-over",t[s.BLEND_MODES.COLOR]="source-over",t[s.BLEND_MODES.LUMINOSITY]="source-over"),t}i.__esModule=!0,i.default=n;var s=t("../../../const"),a=t("./canUseNewCanvasBlendModes"),o=r(a)},{"../../../const":42,"./canUseNewCanvasBlendModes":76}],78:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s=t("../../const"),a=t("../../settings"),o=r(a),l=function(){function t(e){n(this,t),this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=o.default.GC_MAX_IDLE,this.checkCountMax=o.default.GC_MAX_CHECK_COUNT,this.mode=o.default.GC_MODE}return t.prototype.update=function(){this.count++,this.mode!==s.GC_MODES.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run()))},t.prototype.run=function(){for(var t=this.renderer.textureManager,e=t._managedTextures,i=!1,r=0;r<e.length;r++){var n=e[r];!n._glRenderTargets&&this.count-n.touched>this.maxIdle&&(t.destroyTexture(n,!0),e[r]=null,i=!0)}if(i){for(var s=0,a=0;a<e.length;a++)null!==e[a]&&(e[s++]=e[a]);e.length=s}},t.prototype.unload=function(t){var e=this.renderer.textureManager;t._texture&&t._texture._glRenderTargets&&e.destroyTexture(t._texture,!0);for(var i=t.children.length-1;i>=0;i--)this.unload(t.children[i])},t}();i.default=l},{"../../const":42,"../../settings":97}],79:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s=t("pixi-gl-core"),a=t("../../const"),o=t("./utils/RenderTarget"),l=r(o),h=t("../../utils"),u=function(){function t(e){n(this,t),this.renderer=e,this.gl=e.gl,this._managedTextures=[]}return t.prototype.bindTexture=function(){},t.prototype.getTexture=function(){},t.prototype.updateTexture=function(t,e){var i=this.gl,r=!!t._glRenderTargets;if(!t.hasLoaded)return null;var n=this.renderer.boundTextures;if(void 0===e){e=0;for(var o=0;o<n.length;++o)if(n[o]===t){e=o;break}}n[e]=t,i.activeTexture(i.TEXTURE0+e);var h=t._glTextures[this.renderer.CONTEXT_UID];if(h)r?t._glRenderTargets[this.renderer.CONTEXT_UID].resize(t.width,t.height):h.upload(t.source);else{if(r){var u=new l.default(this.gl,t.width,t.height,t.scaleMode,t.resolution);u.resize(t.width,t.height),t._glRenderTargets[this.renderer.CONTEXT_UID]=u,h=u.texture}else h=new s.GLTexture(this.gl,null,null,null,null),h.bind(e),h.premultiplyAlpha=!0,h.upload(t.source);t._glTextures[this.renderer.CONTEXT_UID]=h,t.on("update",this.updateTexture,this),t.on("dispose",this.destroyTexture,this),this._managedTextures.push(t),t.isPowerOfTwo?(t.mipmap&&h.enableMipmap(),t.wrapMode===a.WRAP_MODES.CLAMP?h.enableWrapClamp():t.wrapMode===a.WRAP_MODES.REPEAT?h.enableWrapRepeat():h.enableWrapMirrorRepeat()):h.enableWrapClamp(),t.scaleMode===a.SCALE_MODES.NEAREST?h.enableNearestScaling():h.enableLinearScaling()}return h},t.prototype.destroyTexture=function(t,e){if(t=t.baseTexture||t,t.hasLoaded&&t._glTextures[this.renderer.CONTEXT_UID]&&(this.renderer.unbindTexture(t),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&&(0,h.removeItems)(this._managedTextures,i,1)}},t.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]; }},t.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}();i.default=u},{"../../const":42,"../../utils":117,"./utils/RenderTarget":92,"pixi-gl-core":12}],80:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=t("../SystemRenderer"),l=r(o),h=t("./managers/MaskManager"),u=r(h),c=t("./managers/StencilManager"),d=r(c),f=t("./managers/FilterManager"),p=r(f),_=t("./utils/RenderTarget"),m=r(_),g=t("./utils/ObjectRenderer"),v=r(g),y=t("./TextureManager"),T=r(y),b=t("../../textures/BaseTexture"),x=r(b),w=t("./TextureGarbageCollector"),E=r(w),S=t("./WebGLState"),D=r(S),A=t("./utils/mapWebGLDrawModesToPixi"),P=r(A),O=t("./utils/validateContext"),C=r(O),M=t("../../utils"),L=t("pixi-gl-core"),R=r(L),I=t("../../const"),N=0,j=function(t){function e(i,r){var a=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];n(this,e);var o=s(this,t.call(this,"WebGL",i,r,a));return o.type=I.RENDERER_TYPE.WEBGL,o.handleContextLost=o.handleContextLost.bind(o),o.handleContextRestored=o.handleContextRestored.bind(o),o.view.addEventListener("webglcontextlost",o.handleContextLost,!1),o.view.addEventListener("webglcontextrestored",o.handleContextRestored,!1),o._contextOptions={alpha:o.transparent,antialias:a.antialias,premultipliedAlpha:o.transparent&&"notMultiplied"!==o.transparent,stencil:!0,preserveDrawingBuffer:a.preserveDrawingBuffer},o._backgroundColorRgba[3]=o.transparent?0:1,o.maskManager=new u.default(o),o.stencilManager=new d.default(o),o.emptyRenderer=new v.default(o),o.currentRenderer=o.emptyRenderer,o.initPlugins(),a.context&&(0,C.default)(a.context),o.gl=a.context||R.default.createContext(o.view,o._contextOptions),o.CONTEXT_UID=N++,o.state=new D.default(o.gl),o.renderingToScreen=!0,o.boundTextures=null,o._activeShader=null,o._activeVao=null,o._activeRenderTarget=null,o._initContext(),o.filterManager=new p.default(o),o.drawModes=(0,P.default)(o.gl),o._nextTextureLocation=0,o.setBlendMode(0),o}return a(e,t),e.prototype._initContext=function(){var t=this.gl;t.isContextLost()&&t.getExtension("WEBGL_lose_context")&&t.getExtension("WEBGL_lose_context").restoreContext();var e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures=new Array(e),this.emptyTextures=new Array(e),this.textureManager=new T.default(this),this.textureGC=new E.default(this),this.state.resetToDefault(),this.rootRenderTarget=new m.default(t,this.width,this.height,null,this.resolution,!0),this.rootRenderTarget.clearColor=this._backgroundColorRgba,this.bindRenderTarget(this.rootRenderTarget);var i=new R.default.GLTexture.fromData(t,null,1,1),r={_glTextures:{}};r._glTextures[this.CONTEXT_UID]={};for(var n=0;n<e;n++){var s=new x.default;s._glTextures[this.CONTEXT_UID]=i,this.boundTextures[n]=r,this.emptyTextures[n]=s,this.bindTexture(null,n)}this.emit("context",t),this.resize(this.width,this.height)},e.prototype.render=function(t,e,i,r,n){if(this.renderingToScreen=!e,this.emit("prerender"),this.gl&&!this.gl.isContextLost()){if(this._nextTextureLocation=0,e||(this._lastObjectRendered=t),!n){var s=t.parent;t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=s}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")}},e.prototype.setObjectRenderer=function(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())},e.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.resize=function(t,e){l.default.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)))},e.prototype.setBlendMode=function(t){this.state.setBlendMode(t)},e.prototype.clear=function(t){this._activeRenderTarget.clear(t)},e.prototype.setTransform=function(t){this._activeRenderTarget.transform=t},e.prototype.bindRenderTexture=function(t,e){var i=void 0;if(t){var r=t.baseTexture;r._glRenderTargets[this.CONTEXT_UID]||this.textureManager.updateTexture(r,0),this.unbindTexture(r),i=r._glRenderTargets[this.CONTEXT_UID],i.setFrame(t.frame)}else i=this.rootRenderTarget;return i.transform=e,this.bindRenderTarget(i),this},e.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},e.prototype.bindShader=function(t){return this._activeShader!==t&&(this._activeShader=t,t.bind(),t.uniforms.projectionMatrix=this._activeRenderTarget.projectionMatrix.toArray(!0)),this},e.prototype.bindTexture=function(t,e,i){if(t=t||this.emptyTextures[e],t=t.baseTexture||t,t.touched=this.textureGC.count,i)e=e||0;else{for(var r=0;r<this.boundTextures.length;r++)if(this.boundTextures[r]===t)return r;void 0===e&&(this._nextTextureLocation++,this._nextTextureLocation%=this.boundTextures.length,e=this.boundTextures.length-this._nextTextureLocation-1)}var n=this.gl,s=t._glTextures[this.CONTEXT_UID];return s?(this.boundTextures[e]=t,n.activeTexture(n.TEXTURE0+e),n.bindTexture(n.TEXTURE_2D,s.texture)):this.textureManager.updateTexture(t,e),e},e.prototype.unbindTexture=function(t){var e=this.gl;t=t.baseTexture||t;for(var i=0;i<this.boundTextures.length;i++)this.boundTextures[i]===t&&(this.boundTextures[i]=this.emptyTextures[i],e.activeTexture(e.TEXTURE0+i),e.bindTexture(e.TEXTURE_2D,this.emptyTextures[i]._glTextures[this.CONTEXT_UID].texture));return this},e.prototype.createVao=function(){return new R.default.VertexArrayObject(this.gl,this.state.attribState)},e.prototype.bindVao=function(t){return this._activeVao===t?this:(t?t.bind():this._activeVao&&this._activeVao.unbind(),this._activeVao=t,this)},e.prototype.reset=function(){return this.setObjectRenderer(this.emptyRenderer),this._activeShader=null,this._activeRenderTarget=this.rootRenderTarget,this.rootRenderTarget.activate(),this.state.resetToDefault(),this},e.prototype.handleContextLost=function(t){t.preventDefault()},e.prototype.handleContextRestored=function(){this._initContext(),this.textureManager.removeAll()},e.prototype.destroy=function(e){this.destroyPlugins(),this.view.removeEventListener("webglcontextlost",this.handleContextLost),this.view.removeEventListener("webglcontextrestored",this.handleContextRestored),this.textureManager.destroy(),t.prototype.destroy.call(this,e),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},e}(l.default);i.default=j,M.pluginTarget.mixin(j)},{"../../const":42,"../../textures/BaseTexture":107,"../../utils":117,"../SystemRenderer":72,"./TextureGarbageCollector":78,"./TextureManager":79,"./WebGLState":81,"./managers/FilterManager":86,"./managers/MaskManager":87,"./managers/StencilManager":88,"./utils/ObjectRenderer":90,"./utils/RenderTarget":92,"./utils/mapWebGLDrawModesToPixi":95,"./utils/validateContext":96,"pixi-gl-core":12}],81:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s=t("./utils/mapWebGLBlendModesToPixi"),a=r(s),o=0,l=1,h=2,u=3,c=4,d=function(){function t(e){n(this,t),this.activeState=new Uint8Array(16),this.defaultState=new Uint8Array(16),this.defaultState[0]=1,this.stackIndex=0,this.stack=[],this.gl=e,this.maxAttribs=e.getParameter(e.MAX_VERTEX_ATTRIBS),this.attribState={tempAttribState:new Array(this.maxAttribs),attribState:new Array(this.maxAttribs)},this.blendModes=(0,a.default)(e),this.nativeVaoExtension=e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object")}return t.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]},t.prototype.pop=function(){var t=this.stack[--this.stackIndex];this.setState(t)},t.prototype.setState=function(t){this.setBlend(t[o]),this.setDepthTest(t[l]),this.setFrontFace(t[h]),this.setCullFace(t[u]),this.setBlendMode(t[c])},t.prototype.setBlend=function(t){t=t?1:0,this.activeState[o]!==t&&(this.activeState[o]=t,this.gl[t?"enable":"disable"](this.gl.BLEND))},t.prototype.setBlendMode=function(t){t!==this.activeState[c]&&(this.activeState[c]=t,this.gl.blendFunc(this.blendModes[t][0],this.blendModes[t][1]))},t.prototype.setDepthTest=function(t){t=t?1:0,this.activeState[l]!==t&&(this.activeState[l]=t,this.gl[t?"enable":"disable"](this.gl.DEPTH_TEST))},t.prototype.setCullFace=function(t){t=t?1:0,this.activeState[u]!==t&&(this.activeState[u]=t,this.gl[t?"enable":"disable"](this.gl.CULL_FACE))},t.prototype.setFrontFace=function(t){t=t?1:0,this.activeState[h]!==t&&(this.activeState[h]=t,this.gl.frontFace(this.gl[t?"CW":"CCW"]))},t.prototype.resetAttributes=function(){for(var t=0;t<this.attribState.tempAttribState.length;t++)this.attribState.tempAttribState[t]=0;for(var e=0;e<this.attribState.attribState.length;e++)this.attribState.attribState[e]=0;for(var i=1;i<this.maxAttribs;i++)this.gl.disableVertexAttribArray(i)},t.prototype.resetToDefault=function(){this.nativeVaoExtension&&this.nativeVaoExtension.bindVertexArrayOES(null),this.resetAttributes();for(var t=0;t<this.activeState.length;++t)this.activeState[t]=32;this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.setState(this.defaultState)},t}();i.default=d},{"./utils/mapWebGLBlendModesToPixi":94}],82:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s=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}}(),a=t("./extractUniformsFromSrc"),o=r(a),l=t("../../../utils"),h=t("../../../const"),u={},c=function(){function t(e,i,r){n(this,t),this.vertexSrc=e||t.defaultVertexSrc,this.fragmentSrc=i||t.defaultFragmentSrc,this.blendMode=h.BLEND_MODES.NORMAL,this.uniformData=r||(0,o.default)(this.vertexSrc,this.fragmentSrc,"projectionMatrix|uSampler"),this.uniforms={};for(var s in this.uniformData)this.uniforms[s]=this.uniformData[s].value;this.glShaders={},u[this.vertexSrc+this.fragmentSrc]||(u[this.vertexSrc+this.fragmentSrc]=(0,l.uid)()),this.glShaderKey=u[this.vertexSrc+this.fragmentSrc],this.padding=4,this.resolution=1,this.enabled=!0}return t.prototype.apply=function(t,e,i,r){t.applyFilter(this,e,i,r)},s(t,null,[{key:"defaultVertexSrc",get:function(){return["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")}},{key:"defaultFragmentSrc",get:function(){return["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")}}]),t}();i.default=c},{"../../../const":42,"../../../utils":117,"./extractUniformsFromSrc":83}],83:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e,i){var r=s(t,i),n=s(e,i);return Object.assign(r,n)}function s(t){for(var e=new RegExp("^(projectionMatrix|uSampler|filterArea)$"),i={},r=void 0,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 o=a.split(" "),h=o[1],u=o[2],c=1;u.indexOf("[")>-1&&(r=u.split(/\[|]/),u=r[0],c*=Number(r[1])),u.match(e)||(i[u]={value:l(h,c),name:u,type:h})}}return i}i.__esModule=!0,i.default=n;var a=t("pixi-gl-core"),o=r(a),l=o.default.shader.defaultValue},{"pixi-gl-core":12}],84:[function(t,e,i){function r(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}function n(t,e,i){var r=t.identity();r.translate(e.x/i.width,e.y/i.height);var n=i.width/e.width,s=i.height/e.height;return r.scale(n,s),r}function s(t,e,i,r){var n=r.worldTransform.copy(a.Matrix.TEMP_MATRIX),s=r._texture.baseTexture,o=t.identity(),l=i.height/i.width;o.translate(e.x/i.width,e.y/i.height),o.scale(1,l);var h=i.width/s.width,u=i.height/s.height;return n.tx/=s.width*h,n.ty/=s.width*h,n.invert(),o.prepend(n),o.scale(1,1/l),o.scale(h,u),o.translate(r.anchor.x,r.anchor.y),o}i.__esModule=!0,i.calculateScreenSpaceMatrix=r,i.calculateNormalizedScreenSpaceMatrix=n,i.calculateSpriteMatrix=s;var a=t("../../../math")},{"../../../math":66}],85:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=t("../Filter"),l=r(o),h=t("../../../../math"),u=(t("path"),function(t){function e(i){n(this,e);var r=new h.Matrix,a=s(this,t.call(this,"attribute 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\n vTextureCoord = aTextureCoord;\n vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;\n}\n","varying 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\n float clip = 1.0 - max(text.y, text.x);\n vec4 original = texture2D(uSampler, vTextureCoord);\n vec4 masky = texture2D(mask, vMaskCoord);\n\n original *= (masky.r * masky.a * alpha * clip);\n\n gl_FragColor = original;\n}\n"));return i.renderable=!1,a.maskSprite=i,a.maskMatrix=r,a}return a(e,t),e.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)},e}(l.default));i.default=u},{"../../../../math":66,"../Filter":82,path:22}],86:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function n(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var l=t("./WebGLManager"),h=n(l),u=t("../utils/RenderTarget"),c=n(u),d=t("../utils/Quad"),f=n(d),p=t("../../../math"),_=t("../../../Shader"),m=n(_),g=t("../filters/filterTransforms"),v=r(g),y=t("bit-twiddle"),T=n(y),b=function t(){o(this,t),this.renderTarget=null,this.sourceFrame=new p.Rectangle,this.destinationFrame=new p.Rectangle,this.filters=[],this.target=null,this.resolution=1},x=function(t){function e(i){o(this,e);var r=s(this,t.call(this,i));return r.gl=r.renderer.gl,r.quad=new f.default(r.gl,i.state.attribState),r.shaderCache={},r.pool={},r.filterData=null,r}return a(e,t),e.prototype.pushFilter=function(t,e){var i=this.renderer,r=this.filterData;if(!r){r=this.renderer._activeRenderTarget.filterStack;var n=new b;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 s=r.stack[++r.index];s||(s=r.stack[r.index]=new b);var a=e[0].resolution,o=0|e[0].padding,l=t.filterArea||t.getBounds(!0),h=s.sourceFrame,u=s.destinationFrame;h.x=(l.x*a|0)/a,h.y=(l.y*a|0)/a,h.width=(l.width*a|0)/a,h.height=(l.height*a|0)/a,r.stack[0].renderTarget.transform||h.fit(r.stack[0].destinationFrame),h.pad(o),u.width=h.width,u.height=h.height;var c=this.getPotRenderTarget(i.gl,h.width,h.height,a);s.target=t,s.filters=e,s.resolution=a,s.renderTarget=c,c.setFrame(u,h),i.bindRenderTarget(c),c.clear()},e.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,s=this.getPotRenderTarget(this.renderer.gl,i.sourceFrame.width,i.sourceFrame.height,i.resolution);s.setFrame(i.destinationFrame,i.sourceFrame),s.clear();var a=0;for(a=0;a<r.length-1;++a){r[a].apply(this,n,s,!0);var o=n;n=s,s=o}r[a].apply(this,n,e.renderTarget,!0),this.freePotRenderTarget(n),this.freePotRenderTarget(s)}t.index--,0===t.index&&(this.filterData=null)},e.prototype.applyFilter=function(t,e,i,r){var n=this.renderer,s=n.gl,a=t.glShaders[n.CONTEXT_UID];a||(t.glShaderKey?(a=this.shaderCache[t.glShaderKey],a||(a=new m.default(this.gl,t.vertexSrc,t.fragmentSrc),t.glShaders[n.CONTEXT_UID]=this.shaderCache[t.glShaderKey]=a)):a=t.glShaders[n.CONTEXT_UID]=new m.default(this.gl,t.vertexSrc,t.fragmentSrc),n.bindVao(null),this.quad.initVao(a)),n.bindVao(this.quad.vao),n.bindRenderTarget(i),r&&(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(a),this.syncUniforms(a,t),n.state.setBlendMode(t.blendMode);var o=this.renderer.boundTextures[0];s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,e.texture.texture),this.quad.vao.draw(this.renderer.gl.TRIANGLES,6,0),s.bindTexture(s.TEXTURE_2D,o._glTextures[this.renderer.CONTEXT_UID].texture)},e.prototype.syncUniforms=function(t,e){var i=e.uniformData,r=e.uniforms,n=1,s=void 0;if(t.uniforms.data.filterArea){s=this.filterData.stack[this.filterData.index];var a=t.uniforms.filterArea;a[0]=s.renderTarget.size.width,a[1]=s.renderTarget.size.height,a[2]=s.sourceFrame.x,a[3]=s.sourceFrame.y,t.uniforms.filterArea=a}if(t.uniforms.data.filterClamp){s=this.filterData.stack[this.filterData.index];var o=t.uniforms.filterClamp;o[0]=0,o[1]=0,o[2]=(s.sourceFrame.width-1)/s.renderTarget.size.width,o[3]=(s.sourceFrame.height-1)/s.renderTarget.size.height,t.uniforms.filterClamp=o}for(var l in i)if("sampler2D"===i[l].type&&0!==r[l]){if(r[l].baseTexture)t.uniforms[l]=this.renderer.bindTexture(r[l].baseTexture,n);else{t.uniforms[l]=n;var h=this.renderer.gl;this.renderer.boundTextures[n]=this.renderer.emptyTextures[n],h.activeTexture(h.TEXTURE0+n),r[l].texture.bind()}n++}else if("mat3"===i[l].type)void 0!==r[l].a?t.uniforms[l]=r[l].toArray(!0):t.uniforms[l]=r[l];else if("vec2"===i[l].type)if(void 0!==r[l].x){var u=t.uniforms[l]||new Float32Array(2);u[0]=r[l].x,u[1]=r[l].y,t.uniforms[l]=u}else t.uniforms[l]=r[l];else"float"===i[l].type?t.uniforms.data[l].value!==i[l]&&(t.uniforms[l]=r[l]):t.uniforms[l]=r[l]},e.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},e.prototype.returnRenderTarget=function(t){this.freePotRenderTarget(t)},e.prototype.calculateScreenSpaceMatrix=function(t){var e=this.filterData.stack[this.filterData.index];return v.calculateScreenSpaceMatrix(t,e.sourceFrame,e.renderTarget.size)},e.prototype.calculateNormalizedScreenSpaceMatrix=function(t){var e=this.filterData.stack[this.filterData.index];return v.calculateNormalizedScreenSpaceMatrix(t,e.sourceFrame,e.renderTarget.size,e.destinationFrame)},e.prototype.calculateSpriteMatrix=function(t,e){var i=this.filterData.stack[this.filterData.index];return v.calculateSpriteMatrix(t,i.sourceFrame,i.renderTarget.size,e)},e.prototype.destroy=function(){this.shaderCache=[],this.emptyPool()},e.prototype.getPotRenderTarget=function(t,e,i,r){e=T.default.nextPow2(e*r),i=T.default.nextPow2(i*r);var n=(65535&e)<<16|65535&i;this.pool[n]||(this.pool[n]=[]);var s=this.pool[n].pop();if(!s){var a=this.renderer.boundTextures[0];t.activeTexture(t.TEXTURE0),s=new c.default(t,e,i,null,1),t.bindTexture(t.TEXTURE_2D,a._glTextures[this.renderer.CONTEXT_UID].texture)}return s.resolution=r,s.defaultFrame.width=s.size.width=e/r,s.defaultFrame.height=s.size.height=i/r,s},e.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={}},e.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)},e}(h.default);i.default=x},{"../../../Shader":41,"../../../math":66,"../filters/filterTransforms":84,"../utils/Quad":91,"../utils/RenderTarget":92,"./WebGLManager":89,"bit-twiddle":1}],87:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=t("./WebGLManager"),l=r(o),h=t("../filters/spriteMask/SpriteMaskFilter"),u=r(h),c=function(t){function e(i){n(this,e);var r=s(this,t.call(this,i));return r.scissor=!1,r.scissorData=null,r.scissorRenderTarget=null,r.enableScissor=!0,r.alphaMaskPool=[],r.alphaMaskIndex=0,r}return a(e,t),e.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)},e.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)},e.prototype.pushSpriteMask=function(t,e){var i=this.alphaMaskPool[this.alphaMaskIndex];i||(i=this.alphaMaskPool[this.alphaMaskIndex]=[new u.default(e)]),i[0].resolution=this.renderer.resolution,i[0].maskSprite=e,t.filterArea=e.getBounds(!0),this.renderer.filterManager.pushFilter(t,i),this.alphaMaskIndex++},e.prototype.popSpriteMask=function(){this.renderer.filterManager.popFilter(),this.alphaMaskIndex--},e.prototype.pushStencilMask=function(t){this.renderer.currentRenderer.stop(),this.renderer.stencilManager.pushStencil(t)},e.prototype.popStencilMask=function(){this.renderer.currentRenderer.stop(),this.renderer.stencilManager.popStencil()},e.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},e.prototype.popScissorMask=function(){this.scissorRenderTarget=null,this.scissorData=null,this.scissor=!1;var t=this.renderer.gl;t.disable(t.SCISSOR_TEST)},e}(l.default);i.default=c},{"../filters/spriteMask/SpriteMaskFilter":85,"./WebGLManager":89}],88:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=t("./WebGLManager"),l=r(o),h=function(t){function e(i){n(this,e);var r=s(this,t.call(this,i));return r.stencilMaskStack=null,r}return a(e,t),e.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)},e.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)},e.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))},e.prototype.destroy=function(){l.default.prototype.destroy.call(this),this.stencilMaskStack.stencilStack=null},e}(l.default);i.default=h},{"./WebGLManager":89}],89:[function(t,e,i){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=function(){function t(e){r(this,t),this.renderer=e,this.renderer.on("context",this.onContextChange,this)}return t.prototype.onContextChange=function(){},t.prototype.destroy=function(){this.renderer.off("context",this.onContextChange,this),this.renderer=null},t}();i.default=n},{}],90:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=t("../managers/WebGLManager"),l=r(o),h=function(t){function e(){return n(this,e),s(this,t.apply(this,arguments))}return a(e,t),e.prototype.start=function(){},e.prototype.stop=function(){this.flush()},e.prototype.flush=function(){},e.prototype.render=function(t){},e}(l.default);i.default=h},{"../managers/WebGLManager":89}],91:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s=t("pixi-gl-core"),a=r(s),o=t("../../../utils/createIndicesForQuads"),l=r(o),h=function(){function t(e,i){n(this,t),this.gl=e,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 r=0;r<4;r++)this.interleaved[4*r]=this.vertices[2*r],this.interleaved[4*r+1]=this.vertices[2*r+1],this.interleaved[4*r+2]=this.uvs[2*r],this.interleaved[4*r+3]=this.uvs[2*r+1];this.indices=(0,l.default)(1),this.vertexBuffer=a.default.GLBuffer.createVertexBuffer(e,this.interleaved,e.STATIC_DRAW),this.indexBuffer=a.default.GLBuffer.createIndexBuffer(e,this.indices,e.STATIC_DRAW),this.vao=new a.default.VertexArrayObject(e,i)}return t.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)},t.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},t.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},t.prototype.destroy=function(){var t=this.gl;t.deleteBuffer(this.vertexBuffer),t.deleteBuffer(this.indexBuffer)},t}();i.default=h},{"../../../utils/createIndicesForQuads":115,"pixi-gl-core":12}],92:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s=t("../../../math"),a=t("../../../const"),o=t("../../../settings"),l=r(o),h=t("pixi-gl-core"),u=function(){function t(e,i,r,o,u,c){n(this,t),this.gl=e,this.frameBuffer=null,this.texture=null,this.clearColor=[0,0,0,0],this.size=new s.Rectangle(0,0,1,1),this.resolution=u||l.default.RESOLUTION,this.projectionMatrix=new s.Matrix,this.transform=null,this.frame=null,this.defaultFrame=new s.Rectangle,this.destinationFrame=null,this.sourceFrame=null,this.stencilBuffer=null,this.stencilMaskStack=[],this.filterData=null,this.scaleMode=o||l.default.SCALE_MODE,this.root=c,this.root?(this.frameBuffer=new h.GLFramebuffer(e,100,100),this.frameBuffer.framebuffer=null):(this.frameBuffer=h.GLFramebuffer.createRGBA(e,100,100),this.scaleMode===a.SCALE_MODES.NEAREST?this.frameBuffer.texture.enableNearestScaling():this.frameBuffer.texture.enableLinearScaling(),this.texture=this.frameBuffer.texture),this.setFrame(),this.resize(i,r)}return t.prototype.clear=function(t){var e=t||this.clearColor;this.frameBuffer.clear(e[0],e[1],e[2],e[3])},t.prototype.attachStencilBuffer=function(){this.root||this.frameBuffer.enableStencil()},t.prototype.setFrame=function(t,e){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=e||this.sourceFrame||t},t.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)},t.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)},t.prototype.resize=function(t,e){if(t|=0,e|=0,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)}},t.prototype.destroy=function(){this.frameBuffer.destroy(),this.frameBuffer=null,this.texture=null},t}();i.default=u},{"../../../const":42,"../../../math":66,"../../../settings":97,"pixi-gl-core":12}],93:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){var i=!e;if(0===t)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");if(i){var r=document.createElement("canvas");r.width=1,r.height=1,e=o.default.createContext(r)}for(var n=e.createShader(e.FRAGMENT_SHADER);;){var a=l.replace(/%forloop%/gi,s(t));if(e.shaderSource(n,a),e.compileShader(n),e.getShaderParameter(n,e.COMPILE_STATUS))break;t=t/2|0}return i&&e.getExtension("WEBGL_lose_context")&&e.getExtension("WEBGL_lose_context").loseContext(),t}function s(t){for(var e="",i=0;i<t;++i)i>0&&(e+="\nelse "),i<t-1&&(e+="if(test == "+i+".0){}");return e}i.__esModule=!0,i.default=n;var a=t("pixi-gl-core"),o=r(a),l=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n")},{"pixi-gl-core":12}],94:[function(t,e,i){function r(t){var e=arguments.length<=1||void 0===arguments[1]?[]:arguments[1];return 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}i.__esModule=!0,i.default=r;var n=t("../../../const")},{"../../../const":42}],95:[function(t,e,i){function r(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return 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,e}i.__esModule=!0,i.default=r;var n=t("../../../const")},{"../../../const":42}],96:[function(t,e,i){function r(t){var e=t.getContextAttributes();e.stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly")}i.__esModule=!0,i.default=r},{}],97:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}i.__esModule=!0;var n=t("./utils/maxRecommendedTextures"),s=r(n),a=t("./utils/canUploadSameBuffer"),o=r(a);i.default={TARGET_FPMS:.06,MIPMAP_TEXTURES:!0,RESOLUTION:1,FILTER_RESOLUTION:1,SPRITE_MAX_TEXTURES:(0,s.default)(32),SPRITE_BATCH_SIZE:4096,RETINA_PREFIX:/@(.+)x/,RENDER_OPTIONS:{view:null,antialias:!1,forceFXAA:!1,autoResize:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,roundPixels:!1},TRANSFORM_MODE:0,GC_MODE:0,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:0,SCALE_MODE:0,PRECISION:"mediump",CAN_UPLOAD_SAME_BUFFER:(0,o.default)()}},{"./utils/canUploadSameBuffer":114,"./utils/maxRecommendedTextures":118}],98:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=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}}(),l=t("../math"),h=t("../utils"),u=t("../const"),c=t("../textures/Texture"),d=r(c),f=t("../display/Container"),p=r(f),_=new l.Point,m=function(t){function e(i){n(this,e);var r=s(this,t.call(this));return r._anchor=new l.ObservablePoint(r._onAnchorUpdate,r),r._texture=null,r._width=0,r._height=0,r._tint=null,r._tintRGB=null,r.tint=16777215,r.blendMode=u.BLEND_MODES.NORMAL,r.shader=null,r.cachedTint=16777215,r.texture=i||d.default.EMPTY,r.vertexData=new Float32Array(8),r.vertexTrimmedData=null,r._transformID=-1,r._textureID=-1,r.pluginName="sprite",r}return a(e,t),e.prototype._onTextureUpdate=function(){this._textureID=-1,this._width&&(this.scale.x=(0,h.sign)(this.scale.x)*this._width/this.texture.orig.width),this._height&&(this.scale.y=(0,h.sign)(this.scale.y)*this._height/this.texture.orig.height)},e.prototype._onAnchorUpdate=function(){this._transformID=-1},e.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=this._texture,e=this.transform.worldTransform,i=e.a,r=e.b,n=e.c,s=e.d,a=e.tx,o=e.ty,l=this.vertexData,h=t.trim,u=t.orig,c=this._anchor,d=0,f=0,p=0,_=0;h?(f=h.x-c._x*u.width,d=f+h.width,_=h.y-c._y*u.height,p=_+h.height):(d=u.width*(1-c._x),f=u.width*-c._x,p=u.height*(1-c._y),_=u.height*-c._y),l[0]=i*f+n*_+a,l[1]=s*_+r*f+o,l[2]=i*d+n*_+a,l[3]=s*_+r*d+o,l[4]=i*d+n*p+a,l[5]=s*p+r*d+o,l[6]=i*f+n*p+a,l[7]=s*p+r*f+o}},e.prototype.calculateTrimmedVertices=function(){this.vertexTrimmedData||(this.vertexTrimmedData=new Float32Array(8));var t=this._texture,e=this.vertexTrimmedData,i=t.orig,r=this._anchor,n=this.transform.worldTransform,s=n.a,a=n.b,o=n.c,l=n.d,h=n.tx,u=n.ty,c=i.width*(1-r._x),d=i.width*-r._x,f=i.height*(1-r._y),p=i.height*-r._y;e[0]=s*d+o*p+h,e[1]=l*p+a*d+u,e[2]=s*c+o*p+h,e[3]=l*p+a*c+u,e[4]=s*c+o*f+h,e[5]=l*f+a*c+u,e[6]=s*d+o*f+h,e[7]=l*f+a*d+u},e.prototype._renderWebGL=function(t){this.calculateVertices(),t.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this)},e.prototype._renderCanvas=function(t){t.plugins[this.pluginName].render(this)},e.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))},e.prototype.getLocalBounds=function(e){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*(1-this._anchor._x),this._bounds.maxY=this._texture.orig.height*(1-this._anchor._x),e||(this._localBoundsRect||(this._localBoundsRect=new l.Rectangle),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,_);var e=this._texture.orig.width,i=this._texture.orig.height,r=-e*this.anchor.x,n=0;return _.x>r&&_.x<r+e&&(n=-i*this.anchor.y,_.y>n&&_.y<n+i)},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this._anchor=null;var i="boolean"==typeof e?e:e&&e.texture;if(i){var r="boolean"==typeof e?e:e&&e.baseTexture;this._texture.destroy(!!r)}this._texture=null,this.shader=null},e.from=function(t){return new e(d.default.from(t))},e.fromFrame=function(t){var i=h.TextureCache[t];if(!i)throw new Error('The frameId "'+t+'" does not exist in the texture cache');return new e(i)},e.fromImage=function(t,i,r){return new e(d.default.fromImage(t,i,r))},o(e,[{key:"width",get:function(){return Math.abs(this.scale.x)*this._texture.orig.width},set:function(t){var e=(0,h.sign)(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t}},{key:"height",get:function(){return Math.abs(this.scale.y)*this._texture.orig.height},set:function(t){var e=(0,h.sign)(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t}},{key:"anchor",get:function(){return this._anchor},set:function(t){this._anchor.copy(t)}},{key:"tint",get:function(){return this._tint},set:function(t){this._tint=t,this._tintRGB=(t>>16)+(65280&t)+((255&t)<<16)}},{key:"texture",get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture=t,this.cachedTint=16777215,this._textureID=-1,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))}}]),e}(p.default);i.default=m},{"../const":42,"../display/Container":44,"../math":66,"../textures/Texture":109,"../utils":117}],99:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s=t("../../renderers/canvas/CanvasRenderer"),a=r(s),o=t("../../const"),l=t("../../math"),h=t("./CanvasTinter"),u=r(h),c=new l.Matrix,d=function(){function t(e){n(this,t),this.renderer=e}return t.prototype.render=function(t){var e=t._texture,i=this.renderer,r=e._frame.width,n=e._frame.height,s=t.transform.worldTransform,a=0,h=0;if(!(e.orig.width<=0||e.orig.height<=0)&&e.baseTexture.source&&(i.setBlendMode(t.blendMode),e.valid)){i.context.globalAlpha=t.worldAlpha;var d=e.baseTexture.scaleMode===o.SCALE_MODES.LINEAR;i.smoothProperty&&i.context[i.smoothProperty]!==d&&(i.context[i.smoothProperty]=d),e.trim?(a=e.trim.width/2+e.trim.x-t.anchor.x*e.orig.width,h=e.trim.height/2+e.trim.y-t.anchor.y*e.orig.height):(a=(.5-t.anchor.x)*e.orig.width,h=(.5-t.anchor.y)*e.orig.height),e.rotate&&(s.copy(c),s=c,l.GroupD8.matrixAppendRotationInv(s,e.rotate,a,h),a=0,h=0),a-=r/2,h-=n/2,i.roundPixels?(i.context.setTransform(s.a,s.b,s.c,s.d,s.tx*i.resolution|0,s.ty*i.resolution|0),a|=0,h|=0):i.context.setTransform(s.a,s.b,s.c,s.d,s.tx*i.resolution,s.ty*i.resolution);var f=e.baseTexture.resolution;16777215!==t.tint?(t.cachedTint!==t.tint&&(t.cachedTint=t.tint,t.tintedTexture=u.default.getTintedTexture(t,t.tint)),i.context.drawImage(t.tintedTexture,0,0,r*f,n*f,a*i.resolution,h*i.resolution,r*i.resolution,n*i.resolution)):i.context.drawImage(e.baseTexture.source,e._frame.x*f,e._frame.y*f,r*f,n*f,a*i.resolution,h*i.resolution,r*i.resolution,n*i.resolution)}},t.prototype.destroy=function(){this.renderer=null},t}();i.default=d,a.default.registerPlugin("sprite",d)},{"../../const":42,"../../math":66,"../../renderers/canvas/CanvasRenderer":73,"./CanvasTinter":100}],100:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}i.__esModule=!0;var n=t("../../utils"),s=t("../../renderers/canvas/utils/canUseNewCanvasBlendModes"),a=r(s),o={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(),s=t.baseTexture.resolution;n.x*=s,n.y*=s,n.width*=s,n.height*=s,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(),s=t.baseTexture.resolution;n.x*=s,n.y*=s,n.width*=s,n.height*=s,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 r=i.getContext("2d"),s=t._frame.clone(),a=t.baseTexture.resolution;s.x*=a,s.y*=a,s.width*=a,s.height*=a,i.width=s.width,i.height=s.height,r.globalCompositeOperation="copy",r.drawImage(t.baseTexture.source,s.x,s.y,s.width,s.height,0,0,s.width,s.height);for(var o=(0,n.hex2rgb)(e),l=o[0],h=o[1],u=o[2],c=r.getImageData(0,0,s.width,s.height),d=c.data,f=0;f<d.length;f+=4)d[f+0]*=l,d[f+1]*=h,d[f+2]*=u;r.putImageData(c,0,0)},roundColor:function(t){var e=o.cacheStepsPerColorChannel,i=(0,n.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),(0,n.rgb2hex)(i)},cacheStepsPerColorChannel:8,convertTintToImage:!1,canUseMultiply:(0,a.default)(),tintMethod:0};o.tintMethod=o.canUseMultiply?o.tintWithMultiply:o.tintWithPerPixel,i.default=o},{"../../renderers/canvas/utils/canUseNewCanvasBlendModes":76,"../../utils":117}],101:[function(t,e,i){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=function(){function t(e){r(this,t),this.vertices=new ArrayBuffer(e),this.float32View=new Float32Array(this.vertices),this.uint32View=new Uint32Array(this.vertices)}return t.prototype.destroy=function(){this.vertices=null,this.positions=null,this.uvs=null,this.colors=null},t}();i.default=n},{}],102:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=t("../../renderers/webgl/utils/ObjectRenderer"),l=r(o),h=t("../../renderers/webgl/WebGLRenderer"),u=r(h),c=t("../../utils/createIndicesForQuads"),d=r(c),f=t("./generateMultiTextureShader"),p=r(f),_=t("../../renderers/webgl/utils/checkMaxIfStatmentsInShader"),m=r(_),g=t("./BatchBuffer"),v=r(g),y=t("../../settings"),T=r(y),b=t("pixi-gl-core"),x=r(b),w=t("bit-twiddle"),E=r(w),S=0,D=0,A=function(t){function e(i){n(this,e);var r=s(this,t.call(this,i));r.vertSize=5,r.vertByteSize=4*r.vertSize,r.size=T.default.SPRITE_BATCH_SIZE,r.buffers=[];for(var a=1;a<=E.default.nextPow2(r.size);a*=2)r.buffers.push(new v.default(4*a*r.vertByteSize));r.indices=(0,d.default)(r.size),r.shader=null,r.currentIndex=0,S=0,r.groups=[];for(var o=0;o<r.size;o++)r.groups[o]={textures:[],textureCount:0,ids:[],size:0,start:0,blend:0};return r.sprites=[],r.vertexBuffers=[],r.vaos=[],r.vaoMax=2,r.vertexCount=0,r.renderer.on("prerender",r.onPrerender,r),r}return a(e,t),e.prototype.onContextChange=function(){var t=this.renderer.gl;this.MAX_TEXTURES=Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),T.default.SPRITE_MAX_TEXTURES),this.MAX_TEXTURES=(0,m.default)(this.MAX_TEXTURES,t);var e=this.shader=(0,p.default)(t,this.MAX_TEXTURES);this.indexBuffer=x.default.GLBuffer.createIndexBuffer(t,this.indices,t.STATIC_DRAW),this.renderer.bindVao(null);for(var i=0;i<this.vaoMax;i++)this.vertexBuffers[i]=x.default.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,this.boundTextures=new Array(this.MAX_TEXTURES)},e.prototype.onPrerender=function(){this.vertexCount=0},e.prototype.render=function(t){this.currentIndex>=this.size&&this.flush(),t._texture._uvs&&(this.sprites[this.currentIndex++]=t)},e.prototype.flush=function(){if(0!==this.currentIndex){var t=this.renderer.gl,e=this.MAX_TEXTURES,i=E.default.nextPow2(this.currentIndex),r=E.default.log2(i),n=this.buffers[r],s=this.sprites,a=this.groups,o=n.float32View,l=n.uint32View,h=this.boundTextures,u=this.renderer.boundTextures,c=this.renderer.textureGC.count,d=0,f=void 0,p=void 0,_=1,m=0,g=a[0],v=void 0,y=void 0,b=s[0].blendMode;g.textureCount=0,g.start=0,g.blend=b,S++;var w=void 0;for(w=0;w<e;++w)h[w]=u[w],h[w]._virtalBoundId=w;for(w=0;w<this.currentIndex;++w){var A=s[w];if(f=A._texture.baseTexture,b!==A.blendMode&&(b=A.blendMode,p=null,m=e,S++),p!==f&&(p=f,f._enabled!==S)){if(m===e&&(S++,g.size=w-g.start,m=0,g=a[_++],g.blend=b,g.textureCount=0,g.start=w),f.touched=c,f._virtalBoundId===-1)for(var P=0;P<e;++P){var O=(P+D)%e,C=h[O];if(C._enabled!==S){D++,C._virtalBoundId=-1,f._virtalBoundId=O,h[O]=f;break}}f._enabled=S,g.textureCount++,g.ids[m]=f._virtalBoundId,g.textures[m++]=f}if(v=A.vertexData,y=A._texture._uvs.uvsUint32,this.renderer.roundPixels){var M=this.renderer.resolution;o[d]=(v[0]*M|0)/M,o[d+1]=(v[1]*M|0)/M,o[d+5]=(v[2]*M|0)/M,o[d+6]=(v[3]*M|0)/M,o[d+10]=(v[4]*M|0)/M,o[d+11]=(v[5]*M|0)/M,o[d+15]=(v[6]*M|0)/M,o[d+16]=(v[7]*M|0)/M}else o[d]=v[0],o[d+1]=v[1],o[d+5]=v[2],o[d+6]=v[3],o[d+10]=v[4],o[d+11]=v[5],o[d+15]=v[6],o[d+16]=v[7];l[d+2]=y[0],l[d+7]=y[1],l[d+12]=y[2],l[d+17]=y[3],l[d+3]=l[d+8]=l[d+13]=l[d+18]=A._tintRGB+(255*Math.min(A.worldAlpha,1)<<24),o[d+4]=o[d+9]=o[d+14]=o[d+19]=f._virtalBoundId,d+=20}for(g.size=w-g.start,T.default.CAN_UPLOAD_SAME_BUFFER?this.vertexBuffers[this.vertexCount].upload(n.vertices,0,!0):(this.vaoMax<=this.vertexCount&&(this.vaoMax++,this.vertexBuffers[this.vertexCount]=x.default.GLBuffer.createVertexBuffer(t,null,t.STREAM_DRAW),this.vaos[this.vertexCount]=this.renderer.createVao().addIndex(this.indexBuffer).addAttribute(this.vertexBuffers[this.vertexCount],this.shader.attributes.aVertexPosition,t.FLOAT,!1,this.vertByteSize,0).addAttribute(this.vertexBuffers[this.vertexCount],this.shader.attributes.aTextureCoord,t.UNSIGNED_SHORT,!0,this.vertByteSize,8).addAttribute(this.vertexBuffers[this.vertexCount],this.shader.attributes.aColor,t.UNSIGNED_BYTE,!0,this.vertByteSize,12).addAttribute(this.vertexBuffers[this.vertexCount],this.shader.attributes.aTextureId,t.FLOAT,!1,this.vertByteSize,16)),this.renderer.bindVao(this.vaos[this.vertexCount]),this.vertexBuffers[this.vertexCount].upload(n.vertices,0,!1),this.vertexCount++),w=0;w<e;++w)u[w]._virtalBoundId=-1;for(w=0;w<_;++w){for(var L=a[w],R=L.textureCount,I=0;I<R;I++)p=L.textures[I],u[L.ids[I]]!==p&&this.renderer.bindTexture(p,L.ids[I],!0),p._virtalBoundId=-1;this.renderer.state.setBlendMode(L.blend),t.drawElements(t.TRIANGLES,6*L.size,t.UNSIGNED_SHORT,6*L.start*2)}this.currentIndex=0}},e.prototype.start=function(){this.renderer.bindShader(this.shader),T.default.CAN_UPLOAD_SAME_BUFFER&&(this.renderer.bindVao(this.vaos[this.vertexCount]),this.vertexBuffers[this.vertexCount].bind())},e.prototype.stop=function(){this.flush()},e.prototype.destroy=function(){for(var e=0;e<this.vaoMax;e++)this.vertexBuffers[e]&&this.vertexBuffers[e].destroy(),this.vaos[e]&&this.vaos[e].destroy();this.indexBuffer&&this.indexBuffer.destroy(),this.renderer.off("prerender",this.onPrerender,this),t.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.vertexBuffers=null,this.vaos=null,this.indexBuffer=null,this.indices=null,this.sprites=null;for(var i=0;i<this.buffers.length;++i)this.buffers[i].destroy()},e}(l.default);i.default=A,u.default.registerPlugin("sprite",A)},{"../../renderers/webgl/WebGLRenderer":80,"../../renderers/webgl/utils/ObjectRenderer":90,"../../renderers/webgl/utils/checkMaxIfStatmentsInShader":93,"../../settings":97,"../../utils/createIndicesForQuads":115,"./BatchBuffer":101,"./generateMultiTextureShader":103,"bit-twiddle":1,"pixi-gl-core":12}],103:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){var i="attribute 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\n vTextureCoord = aTextureCoord;\n vTextureId = aTextureId;\n vColor = vec4(aColor.rgb * aColor.a, aColor.a);\n}\n",r=l;r=r.replace(/%count%/gi,e),r=r.replace(/%forloop%/gi,s(e));for(var n=new o.default(t,i,r),a=[],h=0;h<e;h++)a[h]=h;return n.bind(),n.uniforms.uSamplers=a,n}function s(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"}i.__esModule=!0,i.default=n;var a=t("../../Shader"),o=r(a),l=(t("path"),["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"))},{"../../Shader":41,path:22}],104:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=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}}(),l=t("../sprites/Sprite"),h=r(l),u=t("../textures/Texture"),c=r(u),d=t("../math"),f=t("../utils"),p=t("../const"),_=t("../settings"),m=r(_),g=t("./TextStyle"),v=r(g),y={texture:!0,children:!1,baseTexture:!0},T=function(t){function e(i,r,a){n(this,e),a=a||document.createElement("canvas"),a.width=3,a.height=3;var o=c.default.fromCanvas(a);o.orig=new d.Rectangle,o.trim=new d.Rectangle;var l=s(this,t.call(this,o));return l.canvas=a,l.context=l.canvas.getContext("2d"),l.resolution=m.default.RESOLUTION,l._text=null,l._style=null,l._styleListener=null,l._font="",l.text=i,l.style=r,l.localStyleID=-1,l}return a(e,t),e.prototype.updateText=function(t){var i=this._style;if(this.localStyleID!==i.styleID&&(this.dirty=!0,this.localStyleID=i.styleID),this.dirty||!t){this._font=e.getFontStyle(i),this.context.font=this._font;for(var r=i.wordWrap?this.wordWrap(this._text):this._text,n=r.split(/(?:\r\n|\r|\n)/),s=new Array(n.length),a=0,o=e.calculateFontProperties(this._font),l=0;l<n.length;l++){var h=this.context.measureText(n[l]).width+(n[l].length-1)*i.letterSpacing;s[l]=h,a=Math.max(a,h)}var u=a+i.strokeThickness;i.dropShadow&&(u+=i.dropShadowDistance),u+=2*i.padding,this.canvas.width=Math.ceil((u+this.context.lineWidth)*this.resolution);var c=this.style.lineHeight||o.fontSize+i.strokeThickness,d=Math.max(c,o.fontSize+i.strokeThickness)+(n.length-1)*c;i.dropShadow&&(d+=i.dropShadowDistance),this.canvas.height=Math.ceil((d+2*this._style.padding)*this.resolution),this.context.scale(this.resolution,this.resolution),this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this.context.font=this._font,this.context.strokeStyle=i.stroke,this.context.lineWidth=i.strokeThickness,this.context.textBaseline=i.textBaseline,this.context.lineJoin=i.lineJoin,this.context.miterLimit=i.miterLimit;var f=void 0,p=void 0;if(i.dropShadow){i.dropShadowBlur>0?(this.context.shadowColor=i.dropShadowColor,this.context.shadowBlur=i.dropShadowBlur):this.context.fillStyle=i.dropShadowColor;for(var _=Math.cos(i.dropShadowAngle)*i.dropShadowDistance,m=Math.sin(i.dropShadowAngle)*i.dropShadowDistance,g=0;g<n.length;g++)f=i.strokeThickness/2,p=i.strokeThickness/2+g*c+o.ascent,"right"===i.align?f+=a-s[g]:"center"===i.align&&(f+=(a-s[g])/2),i.fill&&(this.drawLetterSpacing(n[g],f+_+i.padding,p+m+i.padding),i.stroke&&i.strokeThickness&&(this.context.strokeStyle=i.dropShadowColor,this.drawLetterSpacing(n[g],f+_+i.padding,p+m+i.padding,!0),this.context.strokeStyle=i.stroke))}this.context.fillStyle=this._generateFillStyle(i,n);for(var v=0;v<n.length;v++)f=i.strokeThickness/2,p=i.strokeThickness/2+v*c+o.ascent,"right"===i.align?f+=a-s[v]:"center"===i.align&&(f+=(a-s[v])/2),i.stroke&&i.strokeThickness&&this.drawLetterSpacing(n[v],f+i.padding,p+i.padding,!0),i.fill&&this.drawLetterSpacing(n[v],f+i.padding,p+i.padding);this.updateTexture()}},e.prototype.drawLetterSpacing=function(t,e,i){var r=!(arguments.length<=3||void 0===arguments[3])&&arguments[3],n=this._style,s=n.letterSpacing;if(0===s)return void(r?this.context.strokeText(t,e,i):this.context.fillText(t,e,i));for(var a=String.prototype.split.call(t,""),o=e,l=0,h="";l<t.length;)h=a[l++],r?this.context.strokeText(h,o,i):this.context.fillText(h,o,i),o+=this.context.measureText(h).width+s},e.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},e.prototype.renderWebGL=function(e){this.resolution!==e.resolution&&(this.resolution=e.resolution,this.dirty=!0),this.updateText(!0),t.prototype.renderWebGL.call(this,e)},e.prototype._renderCanvas=function(e){this.resolution!==e.resolution&&(this.resolution=e.resolution,this.dirty=!0),this.updateText(!0),t.prototype._renderCanvas.call(this,e)},e.prototype.wordWrap=function(t){for(var e="",i=t.split("\n"),r=this._style.wordWrapWidth,n=0;n<i.length;n++){for(var s=r,a=i[n].split(" "),o=0;o<a.length;o++){var l=this.context.measureText(a[o]).width;if(this._style.breakWords&&l>r)for(var h=a[o].split(""),u=0;u<h.length;u++){var c=this.context.measureText(h[u]).width;c>s?(e+="\n"+h[u],s=r-c):(0===u&&(e+=" "),e+=h[u],s-=c)}else{var d=l+this.context.measureText(" ").width;0===o||d>s?(o>0&&(e+="\n"),e+=a[o],s=r-l):(s-=d,e+=" "+a[o])}}n<i.length-1&&(e+="\n")}return e},e.prototype._calculateBounds=function(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)},e.prototype._onStyleChange=function(){this.dirty=!0},e.prototype._generateFillStyle=function(t,e){if(!Array.isArray(t.fill))return t.fill;if(navigator.isCocoonJS)return t.fill[0];var i=void 0,r=void 0,n=void 0,s=void 0,a=this.canvas.width/this.resolution,o=this.canvas.height/this.resolution;if(t.fillGradientType===p.TEXT_GRADIENT.LINEAR_VERTICAL){i=this.context.createLinearGradient(a/2,0,a/2,o),r=(t.fill.length+1)*e.length,n=0;for(var l=0;l<e.length;l++){n+=1;for(var h=0;h<t.fill.length;h++)s=n/r,i.addColorStop(s,t.fill[h]),n++}}else{i=this.context.createLinearGradient(0,o/2,a,o/2),r=t.fill.length+1,n=1;for(var u=0;u<t.fill.length;u++)s=n/r,i.addColorStop(s,t.fill[u]),n++}return i},e.prototype.destroy=function(e){"boolean"==typeof e&&(e={children:e}),e=Object.assign({},y,e),t.prototype.destroy.call(this,e),this.context=null,this.canvas=null,this._style=null},e.getFontStyle=function(t){t=t||{},t instanceof v.default||(t=new v.default(t));var e="number"==typeof t.fontSize?t.fontSize+"px":t.fontSize,i=t.fontFamily;Array.isArray(t.fontFamily)||(i=t.fontFamily.split(","));for(var r=i.length-1;r>=0;r--){var n=i[r].trim();/([\"\'])[^\'\"]+\1/.test(n)||(n='"'+n+'"'),i[r]=n}return t.fontStyle+" "+t.fontVariant+" "+t.fontWeight+" "+e+" "+i.join(",")},e.calculateFontProperties=function(t){if(e.fontPropertiesCache[t])return e.fontPropertiesCache[t]; var i={},r=e.fontPropertiesCanvas,n=e.fontPropertiesContext;n.font=t;var s=Math.ceil(n.measureText("|MÉq").width),a=Math.ceil(n.measureText("M").width),o=2*a;a=1.4*a|0,r.width=s,r.height=o,n.fillStyle="#f00",n.fillRect(0,0,s,o),n.font=t,n.textBaseline="alphabetic",n.fillStyle="#000",n.fillText("|MÉq",0,a);var l=n.getImageData(0,0,s,o).data,h=l.length,u=4*s,c=0,d=0,f=!1;for(c=0;c<a;++c){for(var p=0;p<u;p+=4)if(255!==l[d+p]){f=!0;break}if(f)break;d+=u}for(i.ascent=a-c,d=h-u,f=!1,c=o;c>a;--c){for(var _=0;_<u;_+=4)if(255!==l[d+_]){f=!0;break}if(f)break;d-=u}return i.descent=c-a,i.fontSize=i.ascent+i.descent,e.fontPropertiesCache[t]=i,i},o(e,[{key:"width",get:function(){return this.updateText(!0),Math.abs(this.scale.x)*this._texture.orig.width},set:function(t){this.updateText(!0);var e=(0,f.sign)(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t}},{key:"height",get:function(){return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height},set:function(t){this.updateText(!0);var e=(0,f.sign)(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t}},{key:"style",get:function(){return this._style},set:function(t){t=t||{},t instanceof v.default?this._style=t:this._style=new v.default(t),this.localStyleID=-1,this.dirty=!0}},{key:"text",get:function(){return this._text},set:function(t){t=String(t||" "),this._text!==t&&(this._text=t,this.dirty=!0)}}]),e}(h.default);i.default=T,T.fontPropertiesCache={},T.fontPropertiesCanvas=document.createElement("canvas"),T.fontPropertiesContext=T.fontPropertiesCanvas.getContext("2d")},{"../const":42,"../math":66,"../settings":97,"../sprites/Sprite":98,"../textures/Texture":109,"../utils":117,"./TextStyle":105}],105:[function(t,e,i){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t){return"number"==typeof t?(0,l.hex2string)(t):("string"==typeof t&&0===t.indexOf("0x")&&(t=t.replace("0x","#")),t)}function s(t){if(Array.isArray(t)){for(var e=0;e<t.length;++e)t[e]=n(t[e]);return t}return n(t)}i.__esModule=!0;var a=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}}(),o=t("../const"),l=t("../utils"),h={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},u=function(){function t(e){r(this,t),this.styleID=0,Object.assign(this,h,e)}return t.prototype.clone=function(){var e={};for(var i in h)e[i]=this[i];return new t(e)},t.prototype.reset=function(){Object.assign(this,h)},a(t,[{key:"align",get:function(){return this._align},set:function(t){this._align!==t&&(this._align=t,this.styleID++)}},{key:"breakWords",get:function(){return this._breakWords},set:function(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)}},{key:"dropShadow",get:function(){return this._dropShadow},set:function(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)}},{key:"dropShadowAngle",get:function(){return this._dropShadowAngle},set:function(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)}},{key:"dropShadowBlur",get:function(){return this._dropShadowBlur},set:function(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)}},{key:"dropShadowColor",get:function(){return this._dropShadowColor},set:function(t){var e=s(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)}},{key:"dropShadowDistance",get:function(){return this._dropShadowDistance},set:function(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)}},{key:"fill",get:function(){return this._fill},set:function(t){var e=s(t);this._fill!==e&&(this._fill=e,this.styleID++)}},{key:"fillGradientType",get:function(){return this._fillGradientType},set:function(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)}},{key:"fontFamily",get:function(){return this._fontFamily},set:function(t){this.fontFamily!==t&&(this._fontFamily=t,this.styleID++)}},{key:"fontSize",get:function(){return this._fontSize},set:function(t){this._fontSize!==t&&(this._fontSize=t,this.styleID++)}},{key:"fontStyle",get:function(){return this._fontStyle},set:function(t){this._fontStyle!==t&&(this._fontStyle=t,this.styleID++)}},{key:"fontVariant",get:function(){return this._fontVariant},set:function(t){this._fontVariant!==t&&(this._fontVariant=t,this.styleID++)}},{key:"fontWeight",get:function(){return this._fontWeight},set:function(t){this._fontWeight!==t&&(this._fontWeight=t,this.styleID++)}},{key:"letterSpacing",get:function(){return this._letterSpacing},set:function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.styleID++)}},{key:"lineHeight",get:function(){return this._lineHeight},set:function(t){this._lineHeight!==t&&(this._lineHeight=t,this.styleID++)}},{key:"lineJoin",get:function(){return this._lineJoin},set:function(t){this._lineJoin!==t&&(this._lineJoin=t,this.styleID++)}},{key:"miterLimit",get:function(){return this._miterLimit},set:function(t){this._miterLimit!==t&&(this._miterLimit=t,this.styleID++)}},{key:"padding",get:function(){return this._padding},set:function(t){this._padding!==t&&(this._padding=t,this.styleID++)}},{key:"stroke",get:function(){return this._stroke},set:function(t){var e=s(t);this._stroke!==e&&(this._stroke=e,this.styleID++)}},{key:"strokeThickness",get:function(){return this._strokeThickness},set:function(t){this._strokeThickness!==t&&(this._strokeThickness=t,this.styleID++)}},{key:"textBaseline",get:function(){return this._textBaseline},set:function(t){this._textBaseline!==t&&(this._textBaseline=t,this.styleID++)}},{key:"wordWrap",get:function(){return this._wordWrap},set:function(t){this._wordWrap!==t&&(this._wordWrap=t,this.styleID++)}},{key:"wordWrapWidth",get:function(){return this._wordWrapWidth},set:function(t){this._wordWrapWidth!==t&&(this._wordWrapWidth=t,this.styleID++)}}]),t}();i.default=u},{"../const":42,"../utils":117}],106:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=t("./BaseTexture"),l=r(o),h=t("../settings"),u=r(h),c=u.default.RESOLUTION,d=u.default.SCALE_MODE,f=function(t){function e(){var i=arguments.length<=0||void 0===arguments[0]?100:arguments[0],r=arguments.length<=1||void 0===arguments[1]?100:arguments[1],a=arguments[2],o=arguments[3];n(this,e);var l=s(this,t.call(this,null,a));return l.resolution=o||c,l.width=i,l.height=r,l.realWidth=l.width*l.resolution,l.realHeight=l.height*l.resolution,l.scaleMode=a||d,l.hasLoaded=!0,l._glRenderTargets={},l._canvasRenderTarget=null,l.valid=!1,l}return a(e,t),e.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))},e.prototype.destroy=function(){t.prototype.destroy.call(this,!0),this.renderer=null},e}(l.default);i.default=f},{"../settings":97,"./BaseTexture":107}],107:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(t){return"undefined"==typeof t?"undefined":_typeof2(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":"undefined"==typeof t?"undefined":_typeof2(t)},l=t("../utils"),h=t("../settings"),u=r(h),c=t("eventemitter3"),d=r(c),f=t("../utils/determineCrossOrigin"),p=r(f),_=t("bit-twiddle"),m=r(_),g=function(t){function e(i,r,a){n(this,e);var o=s(this,t.call(this));return o.uid=(0,l.uid)(),o.touched=0,o.resolution=a||u.default.RESOLUTION,o.width=100,o.height=100,o.realWidth=100,o.realHeight=100,o.scaleMode=r||u.default.SCALE_MODE,o.hasLoaded=!1,o.isLoading=!1,o.source=null,o.origSource=null,o.imageType=null,o.sourceScale=1,o.premultipliedAlpha=!0,o.imageUrl=null,o.isPowerOfTwo=!1,o.mipmap=u.default.MIPMAP_TEXTURES,o.wrapMode=u.default.WRAP_MODE,o._glTextures={},o._enabled=0,o._virtalBoundId=-1,i&&o.loadSource(i),o}return a(e,t),e.prototype.update=function(){"svg"!==this.imageType&&(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=m.default.isPow2(this.realWidth)&&m.default.isPow2(this.realHeight)),this.emit("update",this)},e.prototype.loadSource=function(t){var e=this,i=this.isLoading;this.hasLoaded=!1,this.isLoading=!1,i&&this.source&&(this.source.onload=null,this.source.onerror=null);var r=!this.source;if(this.source=t,(t.src&&t.complete||t.getContext)&&t.width&&t.height)this._updateImageType(),"svg"===this.imageType?this._loadSvgSource():this._sourceLoaded(),r&&this.emit("loaded",this);else if(!t.getContext){var n=function(){e.isLoading=!0;var r=e;if(t.onload=function(){if(r._updateImageType(),t.onload=null,t.onerror=null,r.isLoading)return r.isLoading=!1,r._sourceLoaded(),"svg"===r.imageType?void r._loadSvgSource():void r.emit("loaded",r)},t.onerror=function(){t.onload=null,t.onerror=null,r.isLoading&&(r.isLoading=!1,r.emit("error",r))},t.complete&&t.src){if(t.onload=null,t.onerror=null,"svg"===r.imageType)return r._loadSvgSource(),{v:void 0};e.isLoading=!1,t.width&&t.height?(e._sourceLoaded(),i&&e.emit("loaded",e)):i&&e.emit("error",e)}}();if("object"===("undefined"==typeof n?"undefined":o(n)))return n.v}},e.prototype._updateImageType=function(){if(this.imageUrl){var t=(0,l.decomposeDataUri)(this.imageUrl),e=void 0;if(t&&"image"===t.mediaType){var i=t.subType.split("+")[0];if(e=(0,l.getUrlFileExtension)("."+i),!e)throw new Error("Invalid image type in data URI.")}else e=(0,l.getUrlFileExtension)(this.imageUrl),e||(e="png");this.imageType=e}},e.prototype._loadSvgSource=function(){if("svg"===this.imageType){var t=(0,l.decomposeDataUri)(this.imageUrl);t?this._loadSvgSourceUsingDataUri(t):this._loadSvgSourceUsingXhr()}},e.prototype._loadSvgSourceUsingDataUri=function(t){var e=void 0;if("base64"===t.encoding){if(!atob)throw new Error("Your browser doesn't support base64 conversions.");e=atob(t.data)}else e=t.data;this._loadSvgSourceUsingString(e)},e.prototype._loadSvgSourceUsingXhr=function(){var t=this,e=new XMLHttpRequest;e.onload=function(){if(e.readyState!==e.DONE||200!==e.status)throw new Error("Failed to load SVG using XHR.");t._loadSvgSourceUsingString(e.response)},e.onerror=function(){return t.emit("error",t)},e.open("GET",this.imageUrl,!0),e.send()},e.prototype._loadSvgSourceUsingString=function(t){var e=(0,l.getSvgSize)(t),i=e.width,r=e.height;if(!i||!r)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");this.realWidth=Math.round(i*this.sourceScale),this.realHeight=Math.round(r*this.sourceScale),this.width=this.realWidth/this.resolution,this.height=this.realHeight/this.resolution,this.isPowerOfTwo=m.default.isPow2(this.realWidth)&&m.default.isPow2(this.realHeight);var n=document.createElement("canvas");n.width=this.realWidth,n.height=this.realHeight,n._pixiId="canvas_"+(0,l.uid)(),n.getContext("2d").drawImage(this.source,0,0,i,r,0,0,this.realWidth,this.realHeight),this.origSource=this.source,this.source=n,l.BaseTextureCache[n._pixiId]=this,this.isLoading=!1,this._sourceLoaded(),this.emit("loaded",this)},e.prototype._sourceLoaded=function(){this.hasLoaded=!0,this.update()},e.prototype.destroy=function(){this.imageUrl&&(delete l.BaseTextureCache[this.imageUrl],delete l.TextureCache[this.imageUrl],this.imageUrl=null,navigator.isCocoonJS||(this.source.src="")),this.source&&this.source._pixiId&&delete l.BaseTextureCache[this.source._pixiId],this.source=null,this.dispose()},e.prototype.dispose=function(){this.emit("dispose",this)},e.prototype.updateSourceImage=function(t){this.source.src=t,this.loadSource(this.source)},e.fromImage=function(t,i,r,n){var s=l.BaseTextureCache[t];if(!s){var a=new Image;void 0===i&&0!==t.indexOf("data:")&&(a.crossOrigin=(0,p.default)(t)),s=new e(a,r),s.imageUrl=t,n&&(s.sourceScale=n),s.resolution=(0,l.getResolutionOfUrl)(t),a.src=t,l.BaseTextureCache[t]=s}return s},e.fromCanvas=function(t,i){t._pixiId||(t._pixiId="canvas_"+(0,l.uid)());var r=l.BaseTextureCache[t._pixiId];return r||(r=new e(t,i),l.BaseTextureCache[t._pixiId]=r),r},e}(d.default);i.default=g},{"../settings":97,"../utils":117,"../utils/determineCrossOrigin":116,"bit-twiddle":1,eventemitter3:3}],108:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=t("./BaseRenderTexture"),l=r(o),h=t("./Texture"),u=r(h),c=function(t){function e(i,r){n(this,e);var a=null;if(!(i instanceof l.default)){var o=arguments[1],h=arguments[2],u=arguments[3]||0,c=arguments[4]||1;console.warn("Please use RenderTexture.create("+o+", "+h+") instead of the ctor directly."),a=arguments[0],r=null,i=new l.default(o,h,u,c)}var d=s(this,t.call(this,i,r));return d.legacyRenderer=a,d.valid=!0,d._updateUvs(),d}return a(e,t),e.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()},e.create=function(t,i,r,n){return new e(new l.default(t,i,r,n))},e}(u.default);i.default=c},{"./BaseRenderTexture":106,"./Texture":109}],109:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=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}}(),l=t("./BaseTexture"),h=r(l),u=t("./VideoBaseTexture"),c=r(u),d=t("./TextureUvs"),f=r(d),p=t("eventemitter3"),_=r(p),m=t("../math"),g=t("../utils"),v=function(t){function e(i,r,a,o,l){n(this,e);var h=s(this,t.call(this));if(h.noFrame=!1,r||(h.noFrame=!0,r=new m.Rectangle(0,0,1,1)),i instanceof e&&(i=i.baseTexture),h.baseTexture=i,h._frame=r,h.trim=o,h.valid=!1,h.requiresUpdate=!1,h._uvs=null,h.orig=a||r,h._rotate=Number(l||0),l===!0)h._rotate=2;else if(h._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");return i.hasLoaded?(h.noFrame&&(r=new m.Rectangle(0,0,i.width,i.height),i.on("update",h.onBaseTextureUpdated,h)),h.frame=r):i.once("loaded",h.onBaseTextureLoaded,h),h._updateID=0,h.transform=null,h}return a(e,t),e.prototype.update=function(){this.baseTexture.update()},e.prototype.onBaseTextureLoaded=function(t){this._updateID++,this.noFrame?this.frame=new m.Rectangle(0,0,t.width,t.height):this.frame=this._frame,this.baseTexture.on("update",this.onBaseTextureUpdated,this),this.emit("update",this)},e.prototype.onBaseTextureUpdated=function(t){this._updateID++,this._frame.width=t.width,this._frame.height=t.height,this.emit("update",this)},e.prototype.destroy=function(t){this.baseTexture&&(t&&(g.TextureCache[this.baseTexture.imageUrl]&&delete g.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)},e.prototype.clone=function(){return new e(this.baseTexture,this.frame,this.orig,this.trim,this.rotate)},e.prototype._updateUvs=function(){this._uvs||(this._uvs=new f.default),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++},e.fromImage=function(t,i,r,n){var s=g.TextureCache[t];return s||(s=new e(h.default.fromImage(t,i,r,n)),g.TextureCache[t]=s),s},e.fromFrame=function(t){var e=g.TextureCache[t];if(!e)throw new Error('The frameId "'+t+'" does not exist in the texture cache');return e},e.fromCanvas=function(t,i){return new e(h.default.fromCanvas(t,i))},e.fromVideo=function(t,i){return"string"==typeof t?e.fromVideoUrl(t,i):new e(c.default.fromVideo(t,i))},e.fromVideoUrl=function(t,i){return new e(c.default.fromUrl(t,i))},e.from=function(t){if("string"==typeof t){var i=g.TextureCache[t];if(!i){var r=null!==t.match(/\.(mp4|webm|ogg|h264|avi|mov)$/);return r?e.fromVideoUrl(t):e.fromImage(t)}return i}return t instanceof HTMLImageElement?new e(new h.default(t)):t instanceof HTMLCanvasElement?e.fromCanvas(t):t instanceof HTMLVideoElement?e.fromVideo(t):t instanceof h.default?new e(t):t},e.addTextureToCache=function(t,e){g.TextureCache[e]=t},e.removeTextureFromCache=function(t){var e=g.TextureCache[t];return delete g.TextureCache[t],delete g.BaseTextureCache[t],e},o(e,[{key:"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()}},{key:"rotate",get:function(){return this._rotate},set:function(t){this._rotate=t,this.valid&&this._updateUvs()}},{key:"width",get:function(){return this.orig.width}},{key:"height",get:function(){return this.orig.height}}]),e}(_.default);i.default=v,v.EMPTY=new v(new h.default),v.EMPTY.destroy=function(){},v.EMPTY.on=function(){},v.EMPTY.once=function(){},v.EMPTY.emit=function(){}},{"../math":66,"../utils":117,"./BaseTexture":107,"./TextureUvs":110,"./VideoBaseTexture":111,eventemitter3:3}],110:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s=t("../math/GroupD8"),a=r(s),o=function(){function t(){n(this,t),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)}return t.prototype.set=function(t,e,i){var r=e.width,n=e.height;if(i){var s=t.width/2/r,o=t.height/2/n,l=t.x/r+s,h=t.y/n+o;i=a.default.add(i,a.default.NW),this.x0=l+s*a.default.uX(i),this.y0=h+o*a.default.uY(i),i=a.default.add(i,2),this.x1=l+s*a.default.uX(i),this.y1=h+o*a.default.uY(i),i=a.default.add(i,2),this.x2=l+s*a.default.uX(i),this.y2=h+o*a.default.uY(i),i=a.default.add(i,2),this.x3=l+s*a.default.uX(i),this.y3=h+o*a.default.uY(i)}else this.x0=t.x/r,this.y0=t.y/n,this.x1=(t.x+t.width)/r,this.y1=t.y/n,this.x2=(t.x+t.width)/r,this.y2=(t.y+t.height)/n,this.x3=t.x/r,this.y3=(t.y+t.height)/n;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},t}();i.default=o},{"../math/GroupD8":62}],111:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function n(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function l(t,e){e||(e="video/"+t.substr(t.lastIndexOf(".")+1));var i=document.createElement("source");return i.src=t,i.type=e,i}i.__esModule=!0;var h=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}}(),u=t("./BaseTexture"),c=n(u),d=t("../utils"),f=t("../ticker"),p=r(f),_=function(t){function e(i,r){if(s(this,e),!i)throw new Error("No video source element specified.");(i.readyState===i.HAVE_ENOUGH_DATA||i.readyState===i.HAVE_FUTURE_DATA)&&i.width&&i.height&&(i.complete=!0);var n=a(this,t.call(this,i,r));return n.width=i.videoWidth,n.height=i.videoHeight,n._autoUpdate=!0,n._isAutoUpdating=!1,n.autoPlay=!0,n.update=n.update.bind(n),n._onCanPlay=n._onCanPlay.bind(n),i.addEventListener("play",n._onPlayStart.bind(n)),i.addEventListener("pause",n._onPlayStop.bind(n)),n.hasLoaded=!1,n.__loaded=!1,n._isSourceReady()?n._onCanPlay():(i.addEventListener("canplay",n._onCanPlay),i.addEventListener("canplaythrough",n._onCanPlay)),n}return o(e,t),e.prototype._isSourcePlaying=function(){var t=this.source;return t.currentTime>0&&t.paused===!1&&t.ended===!1&&t.readyState>2},e.prototype._isSourceReady=function(){return 3===this.source.readyState||4===this.source.readyState},e.prototype._onPlayStart=function(){this.hasLoaded||this._onCanPlay(),!this._isAutoUpdating&&this.autoUpdate&&(p.shared.add(this.update,this),this._isAutoUpdating=!0)},e.prototype._onPlayStop=function(){this._isAutoUpdating&&(p.shared.remove(this.update,this),this._isAutoUpdating=!1)},e.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.__loaded||(this.__loaded=!0,this.emit("loaded",this)),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.source.play())},e.prototype.destroy=function(){this._isAutoUpdating&&p.shared.remove(this.update,this),this.source&&this.source._pixiId&&(delete d.BaseTextureCache[this.source._pixiId],delete this.source._pixiId),t.prototype.destroy.call(this)},e.fromVideo=function(t,i){t._pixiId||(t._pixiId="video_"+(0,d.uid)());var r=d.BaseTextureCache[t._pixiId];return r||(r=new e(t,i),d.BaseTextureCache[t._pixiId]=r),r},e.fromUrl=function(t,i){var r=document.createElement("video");if(r.setAttribute("webkit-playsinline",""),r.setAttribute("playsinline",""),Array.isArray(t))for(var n=0;n<t.length;++n)r.appendChild(l(t[n].src||t[n],t[n].mime));else r.appendChild(l(t.src||t,t.mime));return r.load(),e.fromVideo(r,i)},h(e,[{key:"autoUpdate",get:function(){return this._autoUpdate},set:function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isAutoUpdating?(p.shared.remove(this.update,this),this._isAutoUpdating=!1):this._autoUpdate&&!this._isAutoUpdating&&(p.shared.add(this.update,this),this._isAutoUpdating=!0))}}]),e}(c.default);i.default=_,_.fromUrls=_.fromUrl},{"../ticker":113,"../utils":117,"./BaseTexture":107}],112:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s=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}}(),a=t("../settings"),o=r(a),l=t("eventemitter3"),h=r(l),u="tick",c=function(){function t(){var e=this;n(this,t),this._emitter=new h.default,this._requestId=null,this._maxElapsedMS=100,this.autoStart=!1,this.deltaTime=1,this.elapsedMS=1/o.default.TARGET_FPMS,this.lastTime=0,this.speed=1,this.started=!1,this._tick=function(t){e._requestId=null,e.started&&(e.update(t),e.started&&null===e._requestId&&e._emitter.listeners(u,!0)&&(e._requestId=requestAnimationFrame(e._tick)))}}return t.prototype._requestIfNeeded=function(){null===this._requestId&&this._emitter.listeners(u,!0)&&(this.lastTime=performance.now(),this._requestId=requestAnimationFrame(this._tick))},t.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},t.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},t.prototype.add=function(t,e){return this._emitter.on(u,t,e),this._startIfPossible(),this},t.prototype.addOnce=function(t,e){return this._emitter.once(u,t,e),this._startIfPossible(),this},t.prototype.remove=function(t,e){return this._emitter.off(u,t,e),this._emitter.listeners(u,!0)||this._cancelIfNeeded(),this},t.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},t.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},t.prototype.update=function(){var t=arguments.length<=0||void 0===arguments[0]?performance.now():arguments[0],e=void 0;t>this.lastTime?(e=this.elapsedMS=t-this.lastTime,e>this._maxElapsedMS&&(e=this._maxElapsedMS),this.deltaTime=e*o.default.TARGET_FPMS*this.speed,this._emitter.emit(u,this.deltaTime)):this.deltaTime=this.elapsedMS=0,this.lastTime=t},s(t,[{key:"FPS",get:function(){return 1e3/this.elapsedMS}},{key:"minFPS",get:function(){return 1e3/this._maxElapsedMS},set:function(t){var e=Math.min(Math.max(0,t)/1e3,o.default.TARGET_FPMS);this._maxElapsedMS=1/e}}]),t}();i.default=c},{"../settings":97,eventemitter3:3}],113:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}i.__esModule=!0,i.Ticker=i.shared=void 0;var n=t("./Ticker"),s=r(n),a=new s.default;a.autoStart=!0,i.shared=a,i.Ticker=s.default},{"./Ticker":112}],114:[function(t,e,i){function r(){var t=!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform);return!t}i.__esModule=!0,i.default=r},{}],115:[function(t,e,i){function r(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}i.__esModule=!0,i.default=r},{}],116:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t){var e=arguments.length<=1||void 0===arguments[1]?window.location:arguments[1];if(0===t.indexOf("data:"))return"";e=e||window.location,o||(o=document.createElement("a")),o.href=t,t=a.default.parse(o.href);var i=!t.port&&""===e.port||t.port===e.port;return t.hostname===e.hostname&&i&&t.protocol===e.protocol?"":"anonymous"}i.__esModule=!0,i.default=n;var s=t("url"),a=r(s),o=void 0},{url:28}],117:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function n(t){return t&&t.__esModule?t:{default:t}}function s(){return++A}function a(t,e){return e=e||[],e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e}function o(t){return t=t.toString(16),t="000000".substr(0,6-t.length)+t,"#"+t}function l(t){return(255*t[0]<<16)+(255*t[1]<<8)+255*t[2]}function h(t,e){var i=T.default.RETINA_PREFIX.exec(t);return i?parseFloat(i[1]):void 0!==e?e:1}function u(t){var e=v.DATA_URI.exec(t);if(e)return{mediaType:e[1]?e[1].toLowerCase():void 0,subType:e[2]?e[2].toLowerCase():void 0,encoding:e[3]?e[3].toLowerCase():void 0,data:e[4]}}function c(t){var e=v.URL_FILE_EXTENSION.exec(t);if(e)return e[1].toLowerCase()}function d(t){var e=v.SVG_SIZE.exec(t),i={};return e&&(i[e[1]]=Math.round(parseFloat(e[3])),i[e[5]]=Math.round(parseFloat(e[7]))),i}function f(){P=!0}function p(t){if(!P){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var e=["\n %c %c %c Pixi.js "+v.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 "+v.VERSION+" - "+t+" - http://www.pixijs.com/");P=!0}}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(t){return!1}}function m(t){return 0===t?0:t<0?-1:1}function g(t,e,i){var r=t.length;if(!(e>=r||0===i)){i=e+i>r?r-e:i;for(var n=r-i,s=e;s<n;++s)t[s]=t[s+i];t.length=n}}i.__esModule=!0,i.BaseTextureCache=i.TextureCache=i.pluginTarget=i.EventEmitter=i.isMobile=void 0,i.uid=s,i.hex2rgb=a,i.hex2string=o,i.rgb2hex=l,i.getResolutionOfUrl=h,i.decomposeDataUri=u,i.getUrlFileExtension=c,i.getSvgSize=d,i.skipHello=f,i.sayHello=p,i.isWebGLSupported=_,i.sign=m,i.removeItems=g;var v=t("../const"),y=t("../settings"),T=n(y),b=t("eventemitter3"),x=n(b),w=t("./pluginTarget"),E=n(w),S=t("ismobilejs"),D=r(S),A=0,P=!1; i.isMobile=D,i.EventEmitter=x.default,i.pluginTarget=E.default;i.TextureCache={},i.BaseTextureCache={}},{"../const":42,"../settings":97,"./pluginTarget":119,eventemitter3:3,ismobilejs:4}],118:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t){return a.default.tablet||a.default.phone?4:t}i.__esModule=!0,i.default=n;var s=t("ismobilejs"),a=r(s)},{ismobilejs:4}],119:[function(t,e,i){function r(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}}i.__esModule=!0,i.default={mixin:function(t){r(t)}}},{}],120:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function n(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 s=t("./core"),a=r(s),o=t("./mesh"),l=r(o),h=t("./particles"),u=r(h),c=t("./extras"),d=r(c),f=t("./filters"),p=r(f),_=t("./prepare"),m=r(_),g=t("./loaders"),v=r(g);a.SpriteBatch=function(){throw new ReferenceError("SpriteBatch does not exist any more, please use the new ParticleContainer instead.")},a.AssetLoader=function(){throw new ReferenceError("The loader system was overhauled in pixi v3, please see the new PIXI.loaders.Loader class.")},Object.defineProperties(a,{Stage:{enumerable:!0,get:function(){return n("You do not need to use a PIXI Stage any more, you can simply render any container."),a.Container}},DisplayObjectContainer:{enumerable:!0,get:function(){return n("DisplayObjectContainer has been shortened to Container, please use Container from now on."),a.Container}},Strip:{enumerable:!0,get:function(){return n("The Strip class has been renamed to Mesh and moved to mesh.Mesh, please use mesh.Mesh from now on."),l.Mesh}},Rope:{enumerable:!0,get:function(){return n("The Rope class has been moved to mesh.Rope, please use mesh.Rope from now on."),l.Rope}},ParticleContainer:{enumerable:!0,get:function(){return n("The ParticleContainer class has been moved to particles.ParticleContainer, please use particles.ParticleContainer from now on."),u.ParticleContainer}},MovieClip:{enumerable:!0,get:function(){return n("The MovieClip class has been moved to extras.AnimatedSprite, please use extras.AnimatedSprite."),d.AnimatedSprite}},TilingSprite:{enumerable:!0,get:function(){return n("The TilingSprite class has been moved to extras.TilingSprite, please use extras.TilingSprite from now on."),d.TilingSprite}},BitmapText:{enumerable:!0,get:function(){return n("The BitmapText class has been moved to extras.BitmapText, please use extras.BitmapText from now on."),d.BitmapText}},blendModes:{enumerable:!0,get:function(){return n("The blendModes has been moved to BLEND_MODES, please use BLEND_MODES from now on."),a.BLEND_MODES}},scaleModes:{enumerable:!0,get:function(){return n("The scaleModes has been moved to SCALE_MODES, please use SCALE_MODES from now on."),a.SCALE_MODES}},BaseTextureCache:{enumerable:!0,get:function(){return n("The BaseTextureCache class has been moved to utils.BaseTextureCache, please use utils.BaseTextureCache from now on."),a.utils.BaseTextureCache}},TextureCache:{enumerable:!0,get:function(){return n("The TextureCache class has been moved to utils.TextureCache, please use utils.TextureCache from now on."),a.utils.TextureCache}},math:{enumerable:!0,get:function(){return n("The math namespace is deprecated, please access members already accessible on PIXI."),a}},AbstractFilter:{enumerable:!0,get:function(){return n("AstractFilter has been renamed to Filter, please use PIXI.Filter"),a.Filter}},TransformManual:{enumerable:!0,get:function(){return n("TransformManual has been renamed to TransformBase, please update your pixi-spine"),a.TransformBase}},TARGET_FPMS:{enumerable:!0,get:function(){return n("PIXI.TARGET_FPMS has been deprecated, please use PIXI.settings.TARGET_FPMS"),a.settings.TARGET_FPMS},set:function(t){n("PIXI.TARGET_FPMS has been deprecated, please use PIXI.settings.TARGET_FPMS"),a.settings.TARGET_FPMS=t}},FILTER_RESOLUTION:{enumerable:!0,get:function(){return n("PIXI.FILTER_RESOLUTION has been deprecated, please use PIXI.settings.FILTER_RESOLUTION"),a.settings.FILTER_RESOLUTION},set:function(t){n("PIXI.FILTER_RESOLUTION has been deprecated, please use PIXI.settings.FILTER_RESOLUTION"),a.settings.FILTER_RESOLUTION=t}},RESOLUTION:{enumerable:!0,get:function(){return n("PIXI.RESOLUTION has been deprecated, please use PIXI.settings.RESOLUTION"),a.settings.RESOLUTION},set:function(t){n("PIXI.RESOLUTION has been deprecated, please use PIXI.settings.RESOLUTION"),a.settings.RESOLUTION=t}},MIPMAP_TEXTURES:{enumerable:!0,get:function(){return n("PIXI.MIPMAP_TEXTURES has been deprecated, please use PIXI.settings.MIPMAP_TEXTURES"),a.settings.MIPMAP_TEXTURES},set:function(t){n("PIXI.MIPMAP_TEXTURES has been deprecated, please use PIXI.settings.MIPMAP_TEXTURES"),a.settings.MIPMAP_TEXTURES=t}},SPRITE_BATCH_SIZE:{enumerable:!0,get:function(){return n("PIXI.SPRITE_BATCH_SIZE has been deprecated, please use PIXI.settings.SPRITE_BATCH_SIZE"),a.settings.SPRITE_BATCH_SIZE},set:function(t){n("PIXI.SPRITE_BATCH_SIZE has been deprecated, please use PIXI.settings.SPRITE_BATCH_SIZE"),a.settings.SPRITE_BATCH_SIZE=t}},SPRITE_MAX_TEXTURES:{enumerable:!0,get:function(){return n("PIXI.SPRITE_MAX_TEXTURES has been deprecated, please use PIXI.settings.SPRITE_MAX_TEXTURES"),a.settings.SPRITE_MAX_TEXTURES},set:function(t){n("PIXI.SPRITE_MAX_TEXTURES has been deprecated, please use PIXI.settings.SPRITE_MAX_TEXTURES"),a.settings.SPRITE_MAX_TEXTURES=t}},RETINA_PREFIX:{enumerable:!0,get:function(){return n("PIXI.RETINA_PREFIX has been deprecated, please use PIXI.settings.RETINA_PREFIX"),a.settings.RETINA_PREFIX},set:function(t){n("PIXI.RETINA_PREFIX has been deprecated, please use PIXI.settings.RETINA_PREFIX"),a.settings.RETINA_PREFIX=t}},DEFAULT_RENDER_OPTIONS:{enumerable:!0,get:function(){return n("PIXI.DEFAULT_RENDER_OPTIONS has been deprecated, please use PIXI.settings.DEFAULT_RENDER_OPTIONS"),a.settings.RENDER_OPTIONS}}});for(var y=[{parent:"TRANSFORM_MODE",target:"TRANSFORM_MODE"},{parent:"GC_MODES",target:"GC_MODE"},{parent:"WRAP_MODES",target:"WRAP_MODE"},{parent:"SCALE_MODES",target:"SCALE_MODE"},{parent:"PRECISION",target:"PRECISION"}],T=function(t){var e=y[t];Object.defineProperty(a[e.parent],"DEFAULT",{enumerable:!0,get:function(){return n("PIXI."+e.parent+".DEFAULT has been deprecated, please use PIXI.settings."+e.target),a.settings[e.target]},set:function(t){n("PIXI."+e.parent+".DEFAULT has been deprecated, please use PIXI.settings."+e.target),a.settings[e.target]=t}})},b=0;b<y.length;b++)T(b);Object.defineProperties(d,{MovieClip:{enumerable:!0,get:function(){return n("The MovieClip class has been renamed to AnimatedSprite, please use AnimatedSprite from now on."),d.AnimatedSprite}}}),a.DisplayObject.prototype.generateTexture=function(t,e,i){return n("generateTexture has moved to the renderer, please use renderer.generateTexture(displayObject)"),t.generateTexture(this,e,i)},a.Graphics.prototype.generateTexture=function(t,e){return n("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)},a.RenderTexture.prototype.render=function(t,e,i,r){this.legacyRenderer.render(t,this,i,e,!r),n("RenderTexture.render is now deprecated, please use renderer.render(displayObject, renderTexture)")},a.RenderTexture.prototype.getImage=function(t){return n("RenderTexture.getImage is now deprecated, please use renderer.extract.image(target)"),this.legacyRenderer.extract.image(t)},a.RenderTexture.prototype.getBase64=function(t){return n("RenderTexture.getBase64 is now deprecated, please use renderer.extract.base64(target)"),this.legacyRenderer.extract.base64(t)},a.RenderTexture.prototype.getCanvas=function(t){return n("RenderTexture.getCanvas is now deprecated, please use renderer.extract.canvas(target)"),this.legacyRenderer.extract.canvas(t)},a.RenderTexture.prototype.getPixels=function(t){return n("RenderTexture.getPixels is now deprecated, please use renderer.extract.pixels(target)"),this.legacyRenderer.pixels(t)},a.Sprite.prototype.setTexture=function(t){this.texture=t,n("setTexture is now deprecated, please use the texture property, e.g : sprite.texture = texture;")},d.BitmapText.prototype.setText=function(t){this.text=t,n("setText is now deprecated, please use the text property, e.g : myBitmapText.text = 'my text';")},a.Text.prototype.setText=function(t){this.text=t,n("setText is now deprecated, please use the text property, e.g : myText.text = 'my text';")},a.Text.prototype.setStyle=function(t){this.style=t,n("setStyle is now deprecated, please use the style property, e.g : myText.style = style;")},a.Text.prototype.determineFontProperties=function(t){return n("determineFontProperties is now deprecated, please use the static calculateFontProperties method, e.g : Text.calculateFontProperties(fontStyle);"),Text.calculateFontProperties(t)},Object.defineProperties(a.TextStyle.prototype,{font:{get:function(){n("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){n("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=t.split(" "),i=-1;this._fontSize=26;for(var r=0;r<e.length;++r)if(e[r].match(/(px|pt|em|%)/)){i=r,this._fontSize=e[r];break}this._fontWeight="normal";for(var s=0;s<i;++s)if(e[s].match(/(bold|bolder|lighter|100|200|300|400|500|600|700|800|900)/)){this._fontWeight=e[s];break}if(i>-1&&i<e.length-1){this._fontFamily="";for(var a=i+1;a<e.length;++a)this._fontFamily+=e[a]+" ";this._fontFamily=this._fontFamily.slice(0,-1)}else this._fontFamily="Arial";this.styleID++}}}),a.Texture.prototype.setFrame=function(t){this.frame=t,n("setFrame is now deprecated, please use the frame property, e.g: myTexture.frame = frame;")},Object.defineProperties(p,{AbstractFilter:{get:function(){return n("AstractFilter has been renamed to Filter, please use PIXI.Filter"),a.AbstractFilter}},SpriteMaskFilter:{get:function(){return n("filters.SpriteMaskFilter is an undocumented alias, please use SpriteMaskFilter from now on."),a.SpriteMaskFilter}}}),a.utils.uuid=function(){return n("utils.uuid() is deprecated, please use utils.uid() from now on."),a.utils.uid()},a.utils.canUseNewCanvasBlendModes=function(){return n("utils.canUseNewCanvasBlendModes() is deprecated, please use CanvasTinter.canUseMultiply from now on"),a.CanvasTinter.canUseMultiply};var x=!0;Object.defineProperty(a.utils,"_saidHello",{set:function(t){t&&(n("PIXI.utils._saidHello is deprecated, please use PIXI.utils.skipHello()"),this.skipHello()),x=t},get:function(){return x}}),Object.defineProperty(m.canvas,"UPLOADS_PER_FRAME",{set:function(){n("PIXI.CanvasPrepare.UPLOADS_PER_FRAME has been removed. Please set renderer.plugins.prepare.limiter.maxItemsPerFrame on your renderer")},get:function(){return n("PIXI.CanvasPrepare.UPLOADS_PER_FRAME has been removed. Please use renderer.plugins.prepare.limiter"),NaN}}),Object.defineProperty(m.webgl,"UPLOADS_PER_FRAME",{set:function(){n("PIXI.WebGLPrepare.UPLOADS_PER_FRAME has been removed. Please set renderer.plugins.prepare.limiter.maxItemsPerFrame on your renderer")},get:function(){return n("PIXI.WebGLPrepare.UPLOADS_PER_FRAME has been removed. Please use renderer.plugins.prepare.limiter"),NaN}}),Object.defineProperties(v.Resource.prototype,{isJson:{get:function(){return n("The isJson property is deprecated, please use `resource.type === Resource.TYPE.JSON`."),this.type===v.Loader.Resource.TYPE.JSON}},isXml:{get:function(){return n("The isXml property is deprecated, please use `resource.type === Resource.TYPE.XML`."),this.type===v.Loader.Resource.TYPE.XML}},isImage:{get:function(){return n("The isImage property is deprecated, please use `resource.type === Resource.TYPE.IMAGE`."),this.type===v.Loader.Resource.TYPE.IMAGE}},isAudio:{get:function(){return n("The isAudio property is deprecated, please use `resource.type === Resource.TYPE.AUDIO`."),this.type===v.Loader.Resource.TYPE.AUDIO}},isVideo:{get:function(){return n("The isVideo property is deprecated, please use `resource.type === Resource.TYPE.VIDEO`."),this.type===v.Loader.Resource.TYPE.VIDEO}}}),Object.defineProperties(v.Loader.prototype,{before:{get:function(){return n("The before() method is deprecated, please use pre()."),this.pre}},after:{get:function(){return n("The after() method is deprecated, please use use()."),this.use}}})},{"./core":61,"./extras":131,"./filters":142,"./loaders":151,"./mesh":160,"./particles":163,"./prepare":173}],121:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s=t("../../core"),a=r(s),o=new a.Rectangle,l=function(){function t(e){n(this,t),this.renderer=e,e.extract=this}return t.prototype.image=function t(e){var t=new Image;return t.src=this.base64(e),t},t.prototype.base64=function(t){return this.canvas(t).toDataURL()},t.prototype.canvas=function(t){var e=this.renderer,i=void 0,r=void 0,n=void 0,s=void 0;t&&(s=t instanceof a.RenderTexture?t:e.generateTexture(t)),s?(i=s.baseTexture._canvasRenderTarget.context,r=s.baseTexture._canvasRenderTarget.resolution,n=s.frame):(i=e.rootContext,n=o,n.width=this.renderer.width,n.height=this.renderer.height);var l=n.width*r,h=n.height*r,u=new a.CanvasRenderTarget(l,h),c=i.getImageData(n.x*r,n.y*r,l,h);return u.context.putImageData(c,0,0),u.canvas},t.prototype.pixels=function(t){var e=this.renderer,i=void 0,r=void 0,n=void 0,s=void 0;return t&&(s=t instanceof a.RenderTexture?t:e.generateTexture(t)),s?(i=s.baseTexture._canvasRenderTarget.context,r=s.baseTexture._canvasRenderTarget.resolution,n=s.frame):(i=e.rootContext,n=o,n.width=e.width,n.height=e.height),i.getImageData(0,0,n.width*r,n.height*r).data},t.prototype.destroy=function(){this.renderer.extract=null,this.renderer=null},t}();i.default=l,a.CanvasRenderer.registerPlugin("extract",l)},{"../../core":61}],122:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}i.__esModule=!0;var n=t("./webgl/WebGLExtract");Object.defineProperty(i,"webgl",{enumerable:!0,get:function(){return r(n).default}});var s=t("./canvas/CanvasExtract");Object.defineProperty(i,"canvas",{enumerable:!0,get:function(){return r(s).default}})},{"./canvas/CanvasExtract":121,"./webgl/WebGLExtract":123}],123:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s=t("../../core"),a=r(s),o=new a.Rectangle,l=4,h=function(){function t(e){n(this,t),this.renderer=e,e.extract=this}return t.prototype.image=function t(e){var t=new Image;return t.src=this.base64(e),t},t.prototype.base64=function(t){return this.canvas(t).toDataURL()},t.prototype.canvas=function(t){var e=this.renderer,i=void 0,r=void 0,n=void 0,s=!1,h=void 0;t&&(h=t instanceof a.RenderTexture?t:this.renderer.generateTexture(t)),h?(i=h.baseTexture._glRenderTargets[this.renderer.CONTEXT_UID],r=i.resolution,n=h.frame,s=!1):(i=this.renderer.rootRenderTarget,r=i.resolution,s=!0,n=o,n.width=i.size.width,n.height=i.size.height);var u=n.width*r,c=n.height*r,d=new a.CanvasRenderTarget(u,c);if(i){e.bindRenderTarget(i);var f=new Uint8Array(l*u*c),p=e.gl;p.readPixels(n.x*r,n.y*r,u,c,p.RGBA,p.UNSIGNED_BYTE,f);var _=d.context.getImageData(0,0,u,c);_.data.set(f),d.context.putImageData(_,0,0),s&&(d.context.scale(1,-1),d.context.drawImage(d.canvas,0,-c))}return d.canvas},t.prototype.pixels=function(t){var e=this.renderer,i=void 0,r=void 0,n=void 0,s=void 0;t&&(s=t instanceof a.RenderTexture?t:this.renderer.generateTexture(t)),s?(i=s.baseTexture._glRenderTargets[this.renderer.CONTEXT_UID],r=i.resolution,n=s.frame):(i=this.renderer.rootRenderTarget,r=i.resolution,n=o,n.width=i.size.width,n.height=i.size.height);var h=n.width*r,u=n.height*r,c=new Uint8Array(l*h*u);if(i){e.bindRenderTarget(i);var d=e.gl;d.readPixels(n.x*r,n.y*r,h,u,d.RGBA,d.UNSIGNED_BYTE,c)}return c},t.prototype.destroy=function(){this.renderer.extract=null,this.renderer=null},t}();i.default=h,a.WebGLRenderer.registerPlugin("extract",h)},{"../../core":61}],124:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=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}}(),l=t("../core"),h=r(l),u=function(t){function e(i){n(this,e);var r=s(this,t.call(this,i[0]instanceof h.Texture?i[0]:i[0].texture));return r._textures=null,r._durations=null,r.textures=i,r.animationSpeed=1,r.loop=!0,r.onComplete=null,r.onFrameChange=null,r._currentTime=0,r.playing=!1,r}return a(e,t),e.prototype.stop=function(){this.playing&&(this.playing=!1,h.ticker.shared.remove(this.update,this))},e.prototype.play=function(){this.playing||(this.playing=!0,h.ticker.shared.add(this.update,this))},e.prototype.gotoAndStop=function(t){this.stop();var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()},e.prototype.gotoAndPlay=function(t){var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture(),this.play()},e.prototype.update=function(t){var e=this.animationSpeed*t,i=this.currentFrame;if(null!==this._durations){var r=this._currentTime%1*this._durations[this.currentFrame];for(r+=e/60*1e3;r<0;)this._currentTime--,r+=this._durations[this.currentFrame];var n=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);r>=this._durations[this.currentFrame];)r-=this._durations[this.currentFrame]*n,this._currentTime+=n;this._currentTime+=r/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()):i!==this.currentFrame&&this.updateTexture()},e.prototype.updateTexture=function(){this._texture=this._textures[this.currentFrame],this._textureID=-1,this.onFrameChange&&this.onFrameChange(this.currentFrame)},e.prototype.destroy=function(){this.stop(),t.prototype.destroy.call(this)},e.fromFrames=function(t){for(var i=[],r=0;r<t.length;++r)i.push(h.Texture.fromFrame(t[r]));return new e(i)},e.fromImages=function(t){for(var i=[],r=0;r<t.length;++r)i.push(h.Texture.fromImage(t[r]));return new e(i)},o(e,[{key:"totalFrames",get:function(){return this._textures.length}},{key:"textures",get:function(){return this._textures},set:function(t){if(t[0]instanceof h.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)}}},{key:"currentFrame",get:function(){var t=Math.floor(this._currentTime)%this._textures.length;return t<0&&(t+=this._textures.length),t}}]),e}(h.Sprite);i.default=u},{"../core":61}],125:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!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}}(),h=t("../core"),u=n(h),c=t("../core/math/ObservablePoint"),d=r(c),f=function(t){function e(i){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];s(this,e);var n=a(this,t.call(this));return n._textWidth=0,n._textHeight=0,n._glyphs=[],n._font={tint:void 0!==r.tint?r.tint:16777215,align:r.align||"left",name:null,size:0},n.font=r.font,n._text=i,n.maxWidth=0,n.maxLineHeight=0,n._anchor=new d.default(function(){n.dirty=!0},n,0,0),n.dirty=!1,n.updateText(),n}return o(e,t),e.prototype.updateText=function(){for(var t=e.fonts[this._font.name],i=this._font.size/t.size,r=new u.Point,n=[],s=[],a=null,o=0,l=0,h=0,c=-1,d=0,f=0,p=0;p<this.text.length;p++){var _=this.text.charCodeAt(p);if(/(\s)/.test(this.text.charAt(p))&&(c=p,d=o),/(?:\r\n|\r|\n)/.test(this.text.charAt(p)))s.push(o),l=Math.max(l,o),h++,r.x=0,r.y+=t.lineHeight,a=null;else if(c!==-1&&this.maxWidth>0&&r.x*i>this.maxWidth)u.utils.removeItems(n,c,p-c),p=c,c=-1,s.push(d),l=Math.max(l,d),h++,r.x=0,r.y+=t.lineHeight,a=null;else{var m=t.chars[_];m&&(a&&m.kerning[a]&&(r.x+=m.kerning[a]),n.push({texture:m.texture,line:h,charCode:_,position:new u.Point(r.x+m.xOffset,r.y+m.yOffset)}),o=r.x+(m.texture.width+m.xOffset),r.x+=m.xAdvance,f=Math.max(f,m.yOffset+m.texture.height),a=_)}}s.push(o),l=Math.max(l,o);for(var g=[],v=0;v<=h;v++){var y=0;"right"===this._font.align?y=l-s[v]:"center"===this._font.align&&(y=(l-s[v])/2),g.push(y)}for(var T=n.length,b=this.tint,x=0;x<T;x++){var w=this._glyphs[x];w?w.texture=n[x].texture:(w=new u.Sprite(n[x].texture),this._glyphs.push(w)),w.position.x=(n[x].position.x+g[n[x].line])*i,w.position.y=n[x].position.y*i,w.scale.x=w.scale.y=i,w.tint=b,w.parent||this.addChild(w)}for(var E=T;E<this._glyphs.length;++E)this.removeChild(this._glyphs[E]);if(this._textWidth=l*i,this._textHeight=(r.y+t.lineHeight)*i,0!==this.anchor.x||0!==this.anchor.y)for(var S=0;S<T;S++)this._glyphs[S].x-=this._textWidth*this.anchor.x,this._glyphs[S].y-=this._textHeight*this.anchor.y;this.maxLineHeight=f*i},e.prototype.updateTransform=function(){this.validate(),this.containerUpdateTransform()},e.prototype.getLocalBounds=function(){return this.validate(),t.prototype.getLocalBounds.call(this)},e.prototype.validate=function(){this.dirty&&(this.updateText(),this.dirty=!1)},l(e,[{key:"tint",get:function(){return this._font.tint},set:function(t){this._font.tint="number"==typeof t&&t>=0?t:16777215,this.dirty=!0}},{key:"align",get:function(){return this._font.align},set:function(t){this._font.align=t||"left",this.dirty=!0}},{key:"anchor",get:function(){return this._anchor},set:function(t){"number"==typeof t?this._anchor.set(t):this._anchor.copy(t)}},{key:"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):e.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)}},{key:"text",get:function(){return this._text},set:function(t){t=t.toString()||" ",this._text!==t&&(this._text=t,this.dirty=!0)}},{key:"textWidth",get:function(){return this.validate(),this._textWidth}},{key:"textHeight",get:function(){return this.validate(),this._textHeight}}]),e}(u.Container);i.default=f,f.fonts={}},{"../core":61,"../core/math/ObservablePoint":64}],126:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s=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}}(),a=t("../core/math/Matrix"),o=r(a),l=new o.default,h=function(){function t(e,i){n(this,t),this._texture=e,this.mapCoord=new o.default,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._lastTextureID=-1,this.clampOffset=0,this.clampMargin="undefined"==typeof i?.5:i}return t.prototype.update=function(t){var e=this._texture;if(e&&e.valid&&(t||this._lastTextureID!==e._updateID)){this._lastTextureID=e._updateID;var i=e._uvs;this.mapCoord.set(i.x1-i.x0,i.y1-i.y0,i.x3-i.x0,i.y3-i.y0,i.x0,i.y0);var r=e.orig,n=e.trim;n&&(l.set(r.width/n.width,0,0,r.height/n.height,-n.x/n.width,-n.y/n.height),this.mapCoord.append(l));var s=e.baseTexture,a=this.uClampFrame,o=this.clampMargin/s.resolution,h=this.clampOffset;a[0]=(e._frame.x+o+h)/s.width,a[1]=(e._frame.y+o+h)/s.height,a[2]=(e._frame.x+e._frame.width-o+h)/s.width,a[3]=(e._frame.y+e._frame.height-o+h)/s.height,this.uClampOffset[0]=h/s.realWidth,this.uClampOffset[1]=h/s.realHeight}},s(t,[{key:"texture",get:function(){return this._texture},set:function(t){this._texture=t,this._lastTextureID=-1}}]),t}();i.default=h},{"../core/math/Matrix":63}],127:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!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}}(),h=t("../core"),u=n(h),c=t("../core/sprites/canvas/CanvasTinter"),d=r(c),f=t("./TextureTransform"),p=r(f),_=new u.Point,m=function(t){function e(i){var r=arguments.length<=1||void 0===arguments[1]?100:arguments[1],n=arguments.length<=2||void 0===arguments[2]?100:arguments[2];s(this,e);var o=a(this,t.call(this,i));return o.tileTransform=new u.TransformStatic,o._width=r,o._height=n,o._canvasPattern=null,o.uvTransform=i.transform||new p.default(i),o.pluginName="tilingSprite",o}return o(e,t),e.prototype._onTextureUpdate=function(){this.uvTransform&&(this.uvTransform.texture=this._texture)},e.prototype._renderWebGL=function(t){var e=this._texture;e&&e.valid&&(this.tileTransform.updateLocalTransform(),this.uvTransform.update(),t.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this))},e.prototype._renderCanvas=function(t){var e=this._texture;if(e.baseTexture.hasLoaded){var i=t.context,r=this.worldTransform,n=t.resolution,s=e.baseTexture,a=e.baseTexture.resolution,o=this.tilePosition.x/this.tileScale.x%e._frame.width,l=this.tilePosition.y/this.tileScale.y%e._frame.height;if(!this._canvasPattern){var h=new u.CanvasRenderTarget(e._frame.width,e._frame.height,a);16777215!==this.tint?(this.cachedTint!==this.tint&&(this.cachedTint=this.tint,this.tintedTexture=d.default.getTintedTexture(this,this.tint)),h.context.drawImage(this.tintedTexture,0,0)):h.context.drawImage(s.source,-e._frame.x,-e._frame.y),this._canvasPattern=h.context.createPattern(h.canvas,"repeat")}i.globalAlpha=this.worldAlpha,i.setTransform(r.a*n,r.b*n,r.c*n,r.d*n,r.tx*n,r.ty*n),i.scale(this.tileScale.x/a,this.tileScale.y/a),i.translate(o+this.anchor.x*-this._width,l+this.anchor.y*-this._height),t.setBlendMode(this.blendMode),i.fillStyle=this._canvasPattern,i.fillRect(-o,-l,this._width/this.tileScale.x*a,this._height/this.tileScale.y*a)}},e.prototype._calculateBounds=function(){var t=this._width*-this._anchor._x,e=this._height*-this._anchor._y,i=this._width*(1-this._anchor._x),r=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,t,e,i,r)},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._x),e||(this._localBoundsRect||(this._localBoundsRect=new u.Rectangle),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,_);var e=this._width,i=this._height,r=-e*this.anchor._x;if(_.x>r&&_.x<r+e){var n=-i*this.anchor._y;if(_.y>n&&_.y<n+i)return!0}return!1},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.tileTransform=null,this.uvTransform=null},e.from=function(t,i,r){return new e(u.Texture.from(t),i,r)},e.fromFrame=function(t,i,r){var n=u.utils.TextureCache[t];if(!n)throw new Error('The frameId "'+t+'" does not exist in the texture cache '+this);return new e(n,i,r)},e.fromImage=function(t,i,r,n,s){return new e(u.Texture.fromImage(t,n,s),i,r)},l(e,[{key:"clampMargin",get:function(){return this.uvTransform.clampMargin},set:function(t){this.uvTransform.clampMargin=t,this.uvTransform.update(!0)}},{key:"tileScale",get:function(){return this.tileTransform.scale},set:function(t){this.tileTransform.scale.copy(t)}},{key:"tilePosition",get:function(){return this.tileTransform.position},set:function(t){this.tileTransform.position.copy(t)}},{key:"width",get:function(){return this._width},set:function(t){this._width=t}},{key:"height",get:function(){return this._height},set:function(t){ this._height=t}}]),e}(u.Sprite);i.default=m},{"../core":61,"../core/sprites/canvas/CanvasTinter":100,"./TextureTransform":126}],128:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var s=t("../core"),a=r(s),o=a.DisplayObject,l=new a.Matrix;o.prototype._cacheAsBitmap=!1,o.prototype._cacheData=!1;var h=function t(){n(this,t),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(o.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){if(this._cacheAsBitmap!==t){this._cacheAsBitmap=t;var e=void 0;t?(this._cacheData||(this._cacheData=new h),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)}}}}),o.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))},o.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 r=this._filters[0].padding;i.pad(r)}var n=t._activeRenderTarget,s=t.filterManager.filterStack,o=a.RenderTexture.create(0|i.width,0|i.height),h=l;h.tx=-i.x,h.ty=-i.y,this.transform.worldTransform.identity(),this.renderWebGL=this._cacheData.originalRenderWebGL,t.render(this,o,!0,h,!0),t.bindRenderTarget(n),t.filterManager.filterStack=s,this.renderWebGL=this._renderCachedWebGL,this.updateTransform=this.displayObjectUpdateTransform,this._mask=null,this.filterArea=null;var u=new a.Sprite(o);u.transform.worldTransform=this.transform.worldTransform,u.anchor.x=-(i.x/i.width),u.anchor.y=-(i.y/i.height),u.alpha=e,u._bounds=this._bounds,this._calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._cacheData.sprite=u,this.transform._parentID=-1,this.updateTransform(),this.containsPoint=u.containsPoint.bind(u)}},o.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))},o.prototype._initCachedDisplayObjectCanvas=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.getLocalBounds(),i=this.alpha;this.alpha=1;var r=t.context,n=a.RenderTexture.create(0|e.width,0|e.height),s=l;this.transform.worldTransform.copy(s),s.invert(),s.tx-=e.x,s.ty-=e.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,n,!0,s,!1),t.context=r,this.renderCanvas=this._renderCachedCanvas,this._calculateBounds=this._calculateCachedBounds,this._mask=null,this.filterArea=null;var o=new a.Sprite(n);o.transform.worldTransform=this.transform.worldTransform,o.anchor.x=-(e.x/e.width),o.anchor.y=-(e.y/e.height),o._bounds=this._bounds,o.alpha=i,this.updateTransform(),this.updateTransform=this.displayObjectUpdateTransform,this._cacheData.sprite=o,this.containsPoint=o.containsPoint.bind(o)}},o.prototype._calculateCachedBounds=function(){this._cacheData.sprite._calculateBounds()},o.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds()},o.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null},o.prototype._cacheAsBitmapDestroy=function(){this.cacheAsBitmap=!1,this.destroy()}},{"../core":61}],129:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}var n=t("../core"),s=r(n);s.DisplayObject.prototype.name=null,s.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}},{"../core":61}],130:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}var n=t("../core"),s=r(n);s.DisplayObject.prototype.getGlobalPosition=function(){var t=arguments.length<=0||void 0===arguments[0]?new s.Point:arguments[0],e=!(arguments.length<=1||void 0===arguments[1])&&arguments[1];return this.parent?this.parent.toGlobal(this.position,t,e):(t.x=this.position.x,t.y=this.position.y),t}},{"../core":61}],131:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}i.__esModule=!0,i.BitmapText=i.TilingSpriteRenderer=i.TilingSprite=i.AnimatedSprite=i.TextureTransform=void 0;var n=t("./TextureTransform");Object.defineProperty(i,"TextureTransform",{enumerable:!0,get:function(){return r(n).default}});var s=t("./AnimatedSprite");Object.defineProperty(i,"AnimatedSprite",{enumerable:!0,get:function(){return r(s).default}});var a=t("./TilingSprite");Object.defineProperty(i,"TilingSprite",{enumerable:!0,get:function(){return r(a).default}});var o=t("./webgl/TilingSpriteRenderer");Object.defineProperty(i,"TilingSpriteRenderer",{enumerable:!0,get:function(){return r(o).default}});var l=t("./BitmapText");Object.defineProperty(i,"BitmapText",{enumerable:!0,get:function(){return r(l).default}}),t("./cacheAsBitmap"),t("./getChildByName"),t("./getGlobalPosition")},{"./AnimatedSprite":124,"./BitmapText":125,"./TextureTransform":126,"./TilingSprite":127,"./cacheAsBitmap":128,"./getChildByName":129,"./getGlobalPosition":130,"./webgl/TilingSpriteRenderer":132}],132:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=t("../../core"),l=r(o),h=t("../../core/const"),u=(t("path"),new l.Matrix),c=new Float32Array(4),d=function(t){function e(i){n(this,e);var r=s(this,t.call(this,i));return r.shader=null,r.simpleShader=null,r.quad=null,r}return a(e,t),e.prototype.onContextChange=function(){var t=this.renderer.gl;this.shader=new l.Shader(t,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 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 vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n vec2 coord = mod(vTextureCoord - uClampOffset, vec2(1.0, 1.0)) + uClampOffset;\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n vec4 sample = texture2D(uSampler, coord);\n vec4 color = vec4(uColor.rgb * uColor.a, uColor.a);\n\n gl_FragColor = sample * color ;\n}\n"),this.simpleShader=new l.Shader(t,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 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 vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\n\nvoid main(void)\n{\n vec4 sample = texture2D(uSampler, vTextureCoord);\n vec4 color = vec4(uColor.rgb * uColor.a, uColor.a);\n gl_FragColor = sample * color;\n}\n"),this.renderer.bindVao(null),this.quad=new l.Quad(t,this.renderer.state.attribState),this.quad.initVao(this.shader)},e.prototype.render=function(t){var e=this.renderer,i=this.quad;e.bindVao(i.vao);var r=i.vertices;r[0]=r[6]=t._width*-t.anchor.x,r[1]=r[3]=t._height*-t.anchor.y,r[2]=r[4]=t._width*(1-t.anchor.x),r[5]=r[7]=t._height*(1-t.anchor.y),r=i.uvs,r[0]=r[6]=-t.anchor.x,r[1]=r[3]=-t.anchor.y,r[2]=r[4]=1-t.anchor.x,r[5]=r[7]=1-t.anchor.y,i.upload();var n=t._texture,s=n.baseTexture,a=t.tileTransform.localTransform,o=t.uvTransform,d=s.isPowerOfTwo&&n.frame.width===s.width&&n.frame.height===s.height;d&&(s._glTextures[e.CONTEXT_UID]?d=s.wrapMode!==h.WRAP_MODES.CLAMP:s.wrapMode===h.WRAP_MODES.CLAMP&&(s.wrapMode=h.WRAP_MODES.REPEAT));var f=d?this.simpleShader:this.shader;e.bindShader(f);var p=n.width,_=n.height,m=t._width,g=t._height;u.set(a.a*p/m,a.b*p/g,a.c*_/m,a.d*_/g,a.tx/m,a.ty/g),u.invert(),d?u.append(o.mapCoord):(f.uniforms.uMapCoord=o.mapCoord.toArray(!0),f.uniforms.uClampFrame=o.uClampFrame,f.uniforms.uClampOffset=o.uClampOffset),f.uniforms.uTransform=u.toArray(!0);var v=c;l.utils.hex2rgb(t.tint,v),v[3]=t.worldAlpha,f.uniforms.uColor=v,f.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),f.uniforms.uSampler=e.bindTexture(n),e.setBlendMode(t.blendMode),i.vao.draw(this.renderer.gl.TRIANGLES,6,0)},e}(l.ObjectRenderer);i.default=d,l.WebGLRenderer.registerPlugin("tilingSprite",d)},{"../../core":61,"../../core/const":42,path:22}],133:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!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}}(),h=t("../../core"),u=n(h),c=t("./BlurXFilter"),d=r(c),f=t("./BlurYFilter"),p=r(f),_=function(t){function e(i,r,n,o){s(this,e);var l=a(this,t.call(this));return l.blurXFilter=new d.default(i,r,n,o),l.blurYFilter=new p.default(i,r,n,o),l.resolution=1,l.padding=0,l.resolution=n||1,l.quality=r||4,l.blur=i||8,l}return o(e,t),e.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)},l(e,[{key:"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.blurXFilter.strength),Math.abs(this.blurYFilter.strength))}},{key:"quality",get:function(){return this.blurXFilter.quality},set:function(t){this.blurXFilter.quality=this.blurYFilter.quality=t}},{key:"blurX",get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=t,this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))}},{key:"blurY",get:function(){return this.blurYFilter.blur},set:function(t){this.blurYFilter.blur=t,this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))}}]),e}(u.Filter);i.default=_},{"../../core":61,"./BlurXFilter":134,"./BlurYFilter":135}],134:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!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}}(),h=t("../../core"),u=n(h),c=t("./generateBlurVertSource"),d=r(c),f=t("./generateBlurFragSource"),p=r(f),_=t("./getMaxBlurKernelSize"),m=r(_),g=function(t){function e(i,r,n,o){s(this,e),o=o||5;var l=(0,d.default)(o,!0),h=(0,p.default)(o),u=a(this,t.call(this,l,h));return u.resolution=n||1,u._quality=0,u.quality=r||4,u.strength=i||8,u.firstRun=!0,u}return o(e,t),e.prototype.apply=function(t,e,i,r){if(this.firstRun){var n=t.renderer.gl,s=(0,m.default)(n);this.vertexSrc=(0,d.default)(s,!0),this.fragmentSrc=(0,p.default)(s),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 a=t.getRenderTarget(!0),o=e,l=a,h=0;h<this.passes-1;h++){t.applyFilter(this,o,l,!0);var u=l;l=o,o=u}t.applyFilter(this,o,i,r),t.returnRenderTarget(a)}},l(e,[{key:"blur",get:function(){return this.strength},set:function(t){this.padding=2*Math.abs(t),this.strength=t}},{key:"quality",get:function(){return this._quality},set:function(t){this._quality=t,this.passes=t}}]),e}(u.Filter);i.default=g},{"../../core":61,"./generateBlurFragSource":136,"./generateBlurVertSource":137,"./getMaxBlurKernelSize":138}],135:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!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}}(),h=t("../../core"),u=n(h),c=t("./generateBlurVertSource"),d=r(c),f=t("./generateBlurFragSource"),p=r(f),_=t("./getMaxBlurKernelSize"),m=r(_),g=function(t){function e(i,r,n,o){s(this,e),o=o||5;var l=(0,d.default)(o,!1),h=(0,p.default)(o),u=a(this,t.call(this,l,h));return u.resolution=n||1,u._quality=0,u.quality=r||4,u.strength=i||8,u.firstRun=!0,u}return o(e,t),e.prototype.apply=function(t,e,i,r){if(this.firstRun){var n=t.renderer.gl,s=(0,m.default)(n);this.vertexSrc=(0,d.default)(s,!1),this.fragmentSrc=(0,p.default)(s),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 a=t.getRenderTarget(!0),o=e,l=a,h=0;h<this.passes-1;h++){t.applyFilter(this,o,l,!0);var u=l;l=o,o=u}t.applyFilter(this,o,i,r),t.returnRenderTarget(a)}},l(e,[{key:"blur",get:function(){return this.strength},set:function(t){this.padding=2*Math.abs(t),this.strength=t}},{key:"quality",get:function(){return this._quality},set:function(t){this._quality=t,this.passes=t}}]),e}(u.Filter);i.default=g},{"../../core":61,"./generateBlurFragSource":136,"./generateBlurVertSource":137,"./getMaxBlurKernelSize":138}],136:[function(t,e,i){function r(t){for(var e=n[t],i=e.length,r=s,a="",o="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;",l=void 0,h=0;h<t;h++){var u=o.replace("%index%",h);l=h,h>=i&&(l=t-h-1),u=u.replace("%value%",e[l]),a+=u,a+="\n"}return r=r.replace("%blur%",a),r=r.replace("%size%",t)}i.__esModule=!0,i.default=r;var n={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]},s=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join("\n")},{}],137:[function(t,e,i){function r(t,e){var i=Math.ceil(t/2),r=n,s="",a=void 0;a=e?"vBlurTexCoords[%index%] = aTextureCoord + vec2(%sampleIndex% * strength, 0.0);":"vBlurTexCoords[%index%] = aTextureCoord + vec2(0.0, %sampleIndex% * strength);";for(var o=0;o<t;o++){var l=a.replace("%index%",o);l=l.replace("%sampleIndex%",o-(i-1)+".0"),s+=l,s+="\n"}return r=r.replace("%blur%",s),r=r.replace("%size%",t)}i.__esModule=!0,i.default=r;var n=["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")},{}],138:[function(t,e,i){function r(t){for(var e=t.getParameter(t.MAX_VARYING_VECTORS),i=15;i>e;)i-=2;return i}i.__esModule=!0,i.default=r},{}],139:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=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}}(),l=t("../../core"),h=r(l),u=(t("path"),function(t){function e(){n(this,e);var i=s(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\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"));return i.uniforms.m=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],i}return a(e,t),e.prototype._loadMatrix=function(t){var e=!(arguments.length<=1||void 0===arguments[1])&&arguments[1],i=t;e&&(this._multiply(i,this.uniforms.m,t),i=this._colorMatrix(i)),this.uniforms.m=i},e.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},e.prototype._colorMatrix=function(t){var e=new Float32Array(t);return e[4]/=255,e[9]/=255,e[14]/=255,e[19]/=255,e},e.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)},e.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)},e.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)},e.prototype.hue=function(t,e){t=(t||0)/180*Math.PI;var i=Math.cos(t),r=Math.sin(t),n=Math.sqrt,s=1/3,a=n(s),o=i+(1-i)*s,l=s*(1-i)-a*r,h=s*(1-i)+a*r,u=s*(1-i)+a*r,c=i+s*(1-i),d=s*(1-i)-a*r,f=s*(1-i)-a*r,p=s*(1-i)+a*r,_=i+s*(1-i),m=[o,l,h,0,0,u,c,d,0,0,f,p,_,0,0,0,0,0,1,0];this._loadMatrix(m,e)},e.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)},e.prototype.saturate=function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],e=arguments[1],i=2*t/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)},e.prototype.desaturate=function(){this.saturate(-1)},e.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)},e.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)},e.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)},e.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)},e.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)},e.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)},e.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)},e.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)},e.prototype.colorTone=function(t,e,i,r,n){t=t||.2,e=e||.15,i=i||16770432,r=r||3375104;var s=(i>>16&255)/255,a=(i>>8&255)/255,o=(255&i)/255,l=(r>>16&255)/255,h=(r>>8&255)/255,u=(255&r)/255,c=[.3,.59,.11,0,0,s,a,o,t,0,l,h,u,e,0,s-l,a-h,o-u,0,0];this._loadMatrix(c,n)},e.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)},e.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)},e.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)},e.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)},o(e,[{key:"matrix",get:function(){return this.uniforms.m},set:function(t){this.uniforms.m=t}}]),e}(h.Filter));i.default=u,u.prototype.grayscale=u.prototype.greyscale},{"../../core":61,path:22}],140:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=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}}(),l=t("../../core"),h=r(l),u=(t("path"),function(t){function e(i,r){n(this,e);var a=new h.Matrix;i.renderable=!1;var o=s(this,t.call(this,"attribute 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}","varying 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"));return o.maskSprite=i,o.maskMatrix=a,o.uniforms.mapSampler=i.texture,o.uniforms.filterMatrix=a.toArray(!0),o.uniforms.scale={x:1,y:1},null!==r&&void 0!==r||(r=20),o.scale=new h.Point(r,r),o}return a(e,t),e.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)},o(e,[{key:"map",get:function(){return this.uniforms.mapSampler},set:function(t){this.uniforms.mapSampler=t}}]),e}(h.Filter));i.default=u},{"../../core":61,path:22}],141:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=t("../../core"),l=r(o),h=(t("path"),function(t){function e(){return n(this,e),s(this,t.call(this,"\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}",'varying 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 vec2 fragCoord = vTextureCoord * filterArea.xy;\n\n vec4 color;\n\n color = fxaa(uSampler, fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n gl_FragColor = color;\n}\n')); }return a(e,t),e}(l.Filter));i.default=h},{"../../core":61,path:22}],142:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}i.__esModule=!0;var n=t("./fxaa/FXAAFilter");Object.defineProperty(i,"FXAAFilter",{enumerable:!0,get:function(){return r(n).default}});var s=t("./noise/NoiseFilter");Object.defineProperty(i,"NoiseFilter",{enumerable:!0,get:function(){return r(s).default}});var a=t("./displacement/DisplacementFilter");Object.defineProperty(i,"DisplacementFilter",{enumerable:!0,get:function(){return r(a).default}});var o=t("./blur/BlurFilter");Object.defineProperty(i,"BlurFilter",{enumerable:!0,get:function(){return r(o).default}});var l=t("./blur/BlurXFilter");Object.defineProperty(i,"BlurXFilter",{enumerable:!0,get:function(){return r(l).default}});var h=t("./blur/BlurYFilter");Object.defineProperty(i,"BlurYFilter",{enumerable:!0,get:function(){return r(h).default}});var u=t("./colormatrix/ColorMatrixFilter");Object.defineProperty(i,"ColorMatrixFilter",{enumerable:!0,get:function(){return r(u).default}});var c=t("./void/VoidFilter");Object.defineProperty(i,"VoidFilter",{enumerable:!0,get:function(){return r(c).default}})},{"./blur/BlurFilter":133,"./blur/BlurXFilter":134,"./blur/BlurYFilter":135,"./colormatrix/ColorMatrixFilter":139,"./displacement/DisplacementFilter":140,"./fxaa/FXAAFilter":141,"./noise/NoiseFilter":143,"./void/VoidFilter":144}],143:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=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}}(),l=t("../../core"),h=r(l),u=(t("path"),function(t){function e(){n(this,e);var i=s(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","precision highp float;\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"));return i.noise=.5,i}return a(e,t),o(e,[{key:"noise",get:function(){return this.uniforms.noise},set:function(t){this.uniforms.noise=t}}]),e}(h.Filter));i.default=u},{"../../core":61,path:22}],144:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=t("../../core"),l=r(o),h=(t("path"),function(t){function e(){n(this,e);var i=s(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n}\n"));return i.glShaderKey="void",i}return a(e,t),e}(l.Filter));i.default=h},{"../../core":61,path:22}],145:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s=t("../core"),a=r(s),o=function(){function t(){n(this,t),this.global=new a.Point,this.target=null,this.originalEvent=null}return t.prototype.getLocalPosition=function(t,e,i){return t.worldTransform.applyInverse(i||this.global,e)},t}();i.default=o},{"../core":61}],146:[function(t,e,i){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=function(){function t(){r(this,t),this.stopped=!1,this.target=null,this.currentTarget=null,this.type=null,this.data=null}return t.prototype.stopPropagation=function(){this.stopped=!0},t.prototype._reset=function(){this.stopped=!1,this.currentTarget=null,this.target=null},t}();i.default=n},{}],147:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var l=t("../core"),h=n(l),u=t("./InteractionData"),c=r(u),d=t("./InteractionEvent"),f=r(d),p=t("eventemitter3"),_=r(p),m=t("./interactiveTarget"),g=r(m),v=t("ismobilejs"),y=r(v);Object.assign(h.DisplayObject.prototype,g.default);var T=function(t){function e(i,r){s(this,e);var n=a(this,t.call(this));return r=r||{},n.renderer=i,n.autoPreventDefault=void 0===r.autoPreventDefault||r.autoPreventDefault,n.interactionFrequency=r.interactionFrequency||10,n.mouse=new c.default,n.mouse.global.set(-999999),n.pointer=new c.default,n.pointer.global.set(-999999),n.eventData=new f.default,n.interactiveDataPool=[],n.interactionDOMElement=null,n.moveWhenInside=!1,n.eventsAdded=!1,n.mouseOverRenderer=!1,n.supportsTouchEvents="ontouchstart"in window,n.supportsPointerEvents=!!window.PointerEvent,n.normalizeTouchEvents=!n.supportsPointerEvents&&n.supportsTouchEvents,n.normalizeMouseEvents=!n.supportsPointerEvents&&!y.default.any,n.onMouseUp=n.onMouseUp.bind(n),n.processMouseUp=n.processMouseUp.bind(n),n.onMouseDown=n.onMouseDown.bind(n),n.processMouseDown=n.processMouseDown.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.processMouseMove=n.processMouseMove.bind(n),n.onMouseOut=n.onMouseOut.bind(n),n.processMouseOverOut=n.processMouseOverOut.bind(n),n.onMouseOver=n.onMouseOver.bind(n),n.onPointerUp=n.onPointerUp.bind(n),n.processPointerUp=n.processPointerUp.bind(n),n.onPointerDown=n.onPointerDown.bind(n),n.processPointerDown=n.processPointerDown.bind(n),n.onPointerMove=n.onPointerMove.bind(n),n.processPointerMove=n.processPointerMove.bind(n),n.onPointerOut=n.onPointerOut.bind(n),n.processPointerOverOut=n.processPointerOverOut.bind(n),n.onPointerOver=n.onPointerOver.bind(n),n.onTouchStart=n.onTouchStart.bind(n),n.processTouchStart=n.processTouchStart.bind(n),n.onTouchEnd=n.onTouchEnd.bind(n),n.processTouchEnd=n.processTouchEnd.bind(n),n.onTouchMove=n.onTouchMove.bind(n),n.processTouchMove=n.processTouchMove.bind(n),n.defaultCursorStyle="inherit",n.currentCursorStyle="inherit",n._tempPoint=new h.Point,n.resolution=1,n.setTargetElement(n.renderer.view,n.renderer.resolution),n}return o(e,t),e.prototype.setTargetElement=function(t){var e=arguments.length<=1||void 0===arguments[1]?1:arguments[1];this.removeEvents(),this.interactionDOMElement=t,this.resolution=e,this.addEvents()},e.prototype.addEvents=function(){this.interactionDOMElement&&(h.ticker.shared.add(this.update,this),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="none",this.interactionDOMElement.style["-ms-touch-action"]="none"):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]="none"),this.supportsPointerEvents?(window.document.addEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("pointerout",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,!0),window.addEventListener("pointerup",this.onPointerUp,!0)):(this.normalizeTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,!0)),this.normalizeMouseEvents&&(window.document.addEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,!0),window.addEventListener("mouseup",this.onPointerUp,!0))),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),window.addEventListener("mouseup",this.onMouseUp,!0),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onTouchStart,!0),this.interactionDOMElement.addEventListener("touchend",this.onTouchEnd,!0),this.interactionDOMElement.addEventListener("touchmove",this.onTouchMove,!0)),this.eventsAdded=!0)},e.prototype.removeEvents=function(){this.interactionDOMElement&&(h.ticker.shared.remove(this.update,this),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="",this.interactionDOMElement.style["-ms-touch-action"]=""):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]=""),this.supportsPointerEvents?(window.document.removeEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("pointerout",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,!0),window.removeEventListener("pointerup",this.onPointerUp,!0)):(this.normalizeTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,!0)),this.normalizeMouseEvents&&(window.document.removeEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,!0),window.removeEventListener("mouseup",this.onPointerUp,!0))),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),window.removeEventListener("mouseup",this.onMouseUp,!0),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onTouchStart,!0),this.interactionDOMElement.removeEventListener("touchend",this.onTouchEnd,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onTouchMove,!0)),this.interactionDOMElement=null,this.eventsAdded=!1)},e.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.eventData._reset(),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)}},e.prototype.dispatchEvent=function(t,e,i){i.stopped||(i.currentTarget=t,i.type=e,t.emit(e,i),t[e]&&t[e](i))},e.prototype.mapPositionToPoint=function(t,e,i){var r=void 0;r=this.interactionDOMElement.parentElement?this.interactionDOMElement.getBoundingClientRect():{x:0,y:0,width:0,height:0};var n=navigator.isCocoonJS?1:1/this.resolution;t.x=(e-r.left)*(this.interactionDOMElement.width/r.width)*n,t.y=(i-r.top)*(this.interactionDOMElement.height/r.height)*n},e.prototype.processInteractive=function(t,e,i,r,n){if(!e||!e.visible)return!1;n=e.interactive||n;var s=!1,a=n;if(e.hitArea&&(a=!1),r&&e._mask&&(e._mask.containsPoint(t)||(r=!1)),r&&e.filterArea&&(e.filterArea.contains(t.x,t.y)||(r=!1)),e.interactiveChildren&&e.children)for(var o=e.children,l=o.length-1;l>=0;l--){var h=o[l];if(this.processInteractive(t,h,i,r,a)){if(!h.parent)continue;s=!0,a=!1,r=!1}}return n&&(r&&!s&&(e.hitArea?(e.worldTransform.applyInverse(t,this._tempPoint),s=e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)):e.containsPoint&&(s=e.containsPoint(t))),e.interactive&&(s&&!this.eventData.target&&(this.eventData.target=e,this.mouse.target=e,this.pointer.target=e),i(e,s))),s},e.prototype.onMouseDown=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData._reset(),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)},e.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))},e.prototype.onMouseUp=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData._reset(),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)},e.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))},e.prototype.onMouseMove=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData._reset(),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)},e.prototype.processMouseMove=function(t,e){this.processMouseOverOut(t,e),this.moveWhenInside&&!e||this.dispatchEvent(t,"mousemove",this.eventData)},e.prototype.onMouseOut=function(t){this.mouseOverRenderer=!1,this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData._reset(),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)},e.prototype.processMouseOverOut=function(t,e){e&&this.mouseOverRenderer?(t._mouseOver||(t._mouseOver=!0,this.dispatchEvent(t,"mouseover",this.eventData)),t.buttonMode&&(this.cursor=t.defaultCursor)):t._mouseOver&&(t._mouseOver=!1,this.dispatchEvent(t,"mouseout",this.eventData))},e.prototype.onMouseOver=function(t){this.mouseOverRenderer=!0,this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData._reset(),this.emit("mouseover",this.eventData)},e.prototype.onPointerDown=function(t){this.normalizeToPointerData(t),this.pointer.originalEvent=t,this.eventData.data=this.pointer,this.eventData._reset(),this.mapPositionToPoint(this.pointer.global,t.clientX,t.clientY),this.autoPreventDefault&&(this.normalizeMouseEvents||this.normalizeTouchEvents)&&this.pointer.originalEvent.preventDefault(),this.processInteractive(this.pointer.global,this.renderer._lastObjectRendered,this.processPointerDown,!0),this.emit("pointerdown",this.eventData)},e.prototype.processPointerDown=function(t,e){e&&(t._pointerDown=!0,this.dispatchEvent(t,"pointerdown",this.eventData))},e.prototype.onPointerUp=function(t){this.normalizeToPointerData(t),this.pointer.originalEvent=t,this.eventData.data=this.pointer,this.eventData._reset(),this.mapPositionToPoint(this.pointer.global,t.clientX,t.clientY),this.processInteractive(this.pointer.global,this.renderer._lastObjectRendered,this.processPointerUp,!0),this.emit("pointerup",this.eventData)},e.prototype.processPointerUp=function(t,e){e?(this.dispatchEvent(t,"pointerup",this.eventData),t._pointerDown&&(t._pointerDown=!1,this.dispatchEvent(t,"pointertap",this.eventData))):t._pointerDown&&(t._pointerDown=!1,this.dispatchEvent(t,"pointerupoutside",this.eventData))},e.prototype.onPointerMove=function(t){this.normalizeToPointerData(t),this.pointer.originalEvent=t,this.eventData.data=this.pointer,this.eventData._reset(),this.mapPositionToPoint(this.pointer.global,t.clientX,t.clientY),this.processInteractive(this.pointer.global,this.renderer._lastObjectRendered,this.processPointerMove,!0),this.emit("pointermove",this.eventData)},e.prototype.processPointerMove=function(t,e){this.pointer.originalEvent.changedTouches||this.processPointerOverOut(t,e),this.moveWhenInside&&!e||this.dispatchEvent(t,"pointermove",this.eventData)},e.prototype.onPointerOut=function(t){this.normalizeToPointerData(t),this.pointer.originalEvent=t,this.eventData.data=this.pointer,this.eventData._reset(),this.mapPositionToPoint(this.pointer.global,t.clientX,t.clientY),this.processInteractive(this.pointer.global,this.renderer._lastObjectRendered,this.processPointerOverOut,!1),this.emit("pointerout",this.eventData)},e.prototype.processPointerOverOut=function(t,e){e&&this.mouseOverRenderer?t._pointerOver||(t._pointerOver=!0,this.dispatchEvent(t,"pointerover",this.eventData)):t._pointerOver&&(t._pointerOver=!1,this.dispatchEvent(t,"pointerout",this.eventData))},e.prototype.onPointerOver=function(t){this.pointer.originalEvent=t,this.eventData.data=this.pointer,this.eventData._reset(),this.emit("pointerover",this.eventData)},e.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],s=this.getTouchData(n);s.originalEvent=t,this.eventData.data=s,this.eventData._reset(),this.processInteractive(s.global,this.renderer._lastObjectRendered,this.processTouchStart,!0),this.emit("touchstart",this.eventData),this.returnTouchData(s)}},e.prototype.processTouchStart=function(t,e){e&&(t._touchDown=!0,this.dispatchEvent(t,"touchstart",this.eventData))},e.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],s=this.getTouchData(n);s.originalEvent=t,this.eventData.data=s,this.eventData._reset(),this.processInteractive(s.global,this.renderer._lastObjectRendered,this.processTouchEnd,!0),this.emit("touchend",this.eventData),this.returnTouchData(s)}},e.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&&(this.eventData.data.originalEvent.targetTouches.length<=0&&(t._touchDown=!1),this.dispatchEvent(t,"touchendoutside",this.eventData))},e.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],s=this.getTouchData(n);s.originalEvent=t,this.eventData.data=s,this.eventData._reset(),this.processInteractive(s.global,this.renderer._lastObjectRendered,this.processTouchMove,this.moveWhenInside),this.emit("touchmove",this.eventData),this.returnTouchData(s)}},e.prototype.processTouchMove=function(t,e){this.moveWhenInside&&!e||this.dispatchEvent(t,"touchmove",this.eventData)},e.prototype.getTouchData=function(t){var e=this.interactiveDataPool.pop()||new c.default;return 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},e.prototype.returnTouchData=function(t){this.interactiveDataPool.push(t)},e.prototype.normalizeToPointerData=function(t){this.normalizeTouchEvents&&t.changedTouches?("undefined"==typeof t.button&&(t.button=t.touches.length?1:0),"undefined"==typeof t.buttons&&(t.buttons=t.touches.length?1:0),"undefined"==typeof t.isPrimary&&(t.isPrimary=1===t.touches.length),"undefined"==typeof t.width&&(t.width=t.changedTouches[0].radiusX||1),"undefined"==typeof t.height&&(t.height=t.changedTouches[0].radiusY||1),"undefined"==typeof t.tiltX&&(t.tiltX=0),"undefined"==typeof t.tiltY&&(t.tiltY=0),"undefined"==typeof t.pointerType&&(t.pointerType="touch"),"undefined"==typeof t.pointerId&&(t.pointerId=t.changedTouches[0].identifier||0),"undefined"==typeof t.pressure&&(t.pressure=t.changedTouches[0].force||.5),"undefined"==typeof t.rotation&&(t.rotation=t.changedTouches[0].rotationAngle||0),"undefined"==typeof t.clientX&&(t.clientX=t.changedTouches[0].clientX),"undefined"==typeof t.clientY&&(t.clientY=t.changedTouches[0].clientY),"undefined"==typeof t.pageX&&(t.pageX=t.changedTouches[0].pageX),"undefined"==typeof t.pageY&&(t.pageY=t.changedTouches[0].pageY),"undefined"==typeof t.screenX&&(t.screenX=t.changedTouches[0].screenX),"undefined"==typeof t.screenY&&(t.screenY=t.changedTouches[0].screenY),"undefined"==typeof t.layerX&&(t.layerX=t.offsetX=t.clientX),"undefined"==typeof t.layerY&&(t.layerY=t.offsetY=t.clientY)):this.normalizeMouseEvents&&("undefined"==typeof t.isPrimary&&(t.isPrimary=!0),"undefined"==typeof t.width&&(t.width=1),"undefined"==typeof t.height&&(t.height=1),"undefined"==typeof t.tiltX&&(t.tiltX=0),"undefined"==typeof t.tiltY&&(t.tiltY=0),"undefined"==typeof t.pointerType&&(t.pointerType="mouse"),"undefined"==typeof t.pointerId&&(t.pointerId=1),"undefined"==typeof t.pressure&&(t.pressure=.5),"undefined"==typeof t.rotation&&(t.rotation=0))},e.prototype.destroy=function(){this.removeEvents(),this.removeAllListeners(),this.renderer=null,this.mouse=null,this.eventData=null,this.interactiveDataPool=null,this.interactionDOMElement=null,this.onMouseDown=null,this.processMouseDown=null,this.onMouseUp=null,this.processMouseUp=null,this.onMouseMove=null,this.processMouseMove=null,this.onMouseOut=null,this.processMouseOverOut=null,this.onMouseOver=null,this.onPointerDown=null,this.processPointerDown=null,this.onPointerUp=null,this.processPointerUp=null,this.onPointerMove=null,this.processPointerMove=null,this.onPointerOut=null,this.processPointerOverOut=null,this.onPointerOver=null,this.onTouchStart=null,this.processTouchStart=null,this.onTouchEnd=null,this.processTouchEnd=null,this.onTouchMove=null,this.processTouchMove=null,this._tempPoint=null},e}(_.default);i.default=T,h.WebGLRenderer.registerPlugin("interaction",T),h.CanvasRenderer.registerPlugin("interaction",T)},{"../core":61,"./InteractionData":145,"./InteractionEvent":146,"./interactiveTarget":149,eventemitter3:3,ismobilejs:4}],148:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}i.__esModule=!0;var n=t("./InteractionData");Object.defineProperty(i,"InteractionData",{enumerable:!0,get:function(){return r(n).default}});var s=t("./InteractionManager");Object.defineProperty(i,"InteractionManager",{enumerable:!0,get:function(){return r(s).default}});var a=t("./interactiveTarget");Object.defineProperty(i,"interactiveTarget",{enumerable:!0,get:function(){return r(a).default}})},{"./InteractionData":145,"./InteractionManager":147,"./interactiveTarget":149}],149:[function(t,e,i){i.__esModule=!0,i.default={interactive:!1,interactiveChildren:!0,hitArea:null,buttonMode:!1,defaultCursor:"pointer",_over:!1,_isLeftDown:!1,_isRightDown:!1,_pointerOver:!1,_pointerDown:!1,_touchDown:!1}},{}],150:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function n(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 s=t.data.getElementsByTagName("char"),a=0;a<s.length;a++){var l=parseInt(s[a].getAttribute("id"),10),u=new o.Rectangle(parseInt(s[a].getAttribute("x"),10)+e.frame.x,parseInt(s[a].getAttribute("y"),10)+e.frame.y,parseInt(s[a].getAttribute("width"),10),parseInt(s[a].getAttribute("height"),10));i.chars[l]={xOffset:parseInt(s[a].getAttribute("xoffset"),10),yOffset:parseInt(s[a].getAttribute("yoffset"),10),xAdvance:parseInt(s[a].getAttribute("xadvance"),10),kerning:{},texture:new o.Texture(e.baseTexture,u)}}for(var c=t.data.getElementsByTagName("kerning"),d=0;d<c.length;d++){var f=parseInt(c[d].getAttribute("first"),10),p=parseInt(c[d].getAttribute("second"),10),_=parseInt(c[d].getAttribute("amount"),10);i.chars[p]&&(i.chars[p].kerning[f]=_)}t.bitmapFont=i,h.BitmapText.fonts[i.font]=i}i.__esModule=!0,i.parse=n,i.default=function(){return function(t,e){if(!t.data||t.type!==l.Resource.TYPE.XML)return void e();if(0===t.data.getElementsByTagName("page").length||0===t.data.getElementsByTagName("info").length||null===t.data.getElementsByTagName("info")[0].getAttribute("face"))return void 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 r=i+t.data.getElementsByTagName("page")[0].getAttribute("file");if(o.utils.TextureCache[r])n(t,o.utils.TextureCache[r]),e();else{var s={crossOrigin:t.crossOrigin,loadType:l.Resource.LOAD_TYPE.IMAGE,metadata:t.metadata.imageMetadata,parentResource:t};this.add(t.name+"_image",r,s,function(i){n(t,i.texture),e()})}}};var s=t("path"),a=r(s),o=t("../core"),l=t("resource-loader"),h=t("../extras")},{"../core":61,"../extras":131,path:22,"resource-loader":34}],151:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}i.__esModule=!0;var n=t("./loader");Object.defineProperty(i,"Loader",{enumerable:!0,get:function(){return r(n).default}});var s=t("./bitmapFontParser");Object.defineProperty(i,"bitmapFontParser",{enumerable:!0,get:function(){return r(s).default}}),Object.defineProperty(i,"parseBitmapFontData",{enumerable:!0,get:function(){return s.parse}});var a=t("./spritesheetParser");Object.defineProperty(i,"spritesheetParser",{enumerable:!0,get:function(){return r(a).default}});var o=t("./textureParser");Object.defineProperty(i,"textureParser",{enumerable:!0,get:function(){return r(o).default}});var l=t("resource-loader");Object.defineProperty(i,"Resource",{enumerable:!0,get:function(){return l.Resource}})},{"./bitmapFontParser":150,"./loader":152,"./spritesheetParser":153,"./textureParser":154,"resource-loader":34}],152:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=t("resource-loader"),l=r(o),h=t("resource-loader/lib/middlewares/parsing/blob"),u=t("eventemitter3"),c=r(u),d=t("./textureParser"),f=r(d),p=t("./spritesheetParser"),_=r(p),m=t("./bitmapFontParser"),g=r(m),v=function(t){function e(i,r){n(this,e);var a=s(this,t.call(this,i,r));c.default.call(a);for(var o=0;o<e._pixiMiddleware.length;++o)a.use(e._pixiMiddleware[o]());return a.onStart.add(function(t){return a.emit("start",t)}),a.onProgress.add(function(t,e){return a.emit("progress",t,e)}),a.onError.add(function(t,e,i){return a.emit("error",t,e,i)}),a.onLoad.add(function(t,e){return a.emit("load",t,e)}),a.onComplete.add(function(t,e){return a.emit("complete",t,e)}),a}return a(e,t),e.addPixiMiddleware=function(t){e._pixiMiddleware.push(t)},e}(l.default);i.default=v;for(var y in c.default.prototype)v.prototype[y]=c.default.prototype[y];v._pixiMiddleware=[h.blobMiddlewareFactory,f.default,_.default,g.default];var T=l.default.Resource;T.setExtensionXhrType("fnt",T.XHR_RESPONSE_TYPE.DOCUMENT)},{"./bitmapFontParser":150,"./spritesheetParser":153,"./textureParser":154,eventemitter3:3,"resource-loader":34,"resource-loader/lib/middlewares/parsing/blob":35}],153:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function n(t){return t&&t.__esModule?t:{default:t}}i.__esModule=!0,i.default=function(){return function(t,e){var i=void 0,r=t.name+"_image";if(!t.data||t.type!==s.Resource.TYPE.JSON||!t.data.frames||this.resources[r])return void e();var n={crossOrigin:t.crossOrigin,loadType:s.Resource.LOAD_TYPE.IMAGE,metadata:t.metadata.imageMetadata,parentResource:t};i=t.isDataUrl?t.data.meta.image:o.default.dirname(t.url.replace(this.baseUrl,""))+"/"+t.data.meta.image,this.add(r,i,n,function(i){function r(e,i){for(var r=e;r-e<i&&r<l.length;){var n=l[r],s=o[n].frame;if(s){var a=null,u=null,d=new h.Rectangle(0,0,o[n].sourceSize.w/f,o[n].sourceSize.h/f); a=o[n].rotated?new h.Rectangle(s.x/f,s.y/f,s.h/f,s.w/f):new h.Rectangle(s.x/f,s.y/f,s.w/f,s.h/f),o[n].trimmed&&(u=new h.Rectangle(o[n].spriteSourceSize.x/f,o[n].spriteSourceSize.y/f,s.w/f,s.h/f)),t.textures[n]=new h.Texture(c,a,d,u,o[n].rotated?2:0),h.utils.TextureCache[n]=t.textures[n]}r++}}function n(){return p*u<l.length}function s(t){r(p*u,u),p++,setTimeout(t,0)}function a(){s(function(){n()?a():e()})}t.textures={};var o=t.data.frames,l=Object.keys(o),c=i.texture.baseTexture,d=t.data.meta.scale,f=h.utils.getResolutionOfUrl(t.url,null);null===f&&(f=void 0!==d?d:1),1!==f&&(c.resolution=f,c.update());var p=0;l.length<=u?(r(0,u),e()):a()})}};var s=t("resource-loader"),a=t("path"),o=n(a),l=t("../core"),h=r(l),u=1e3},{"../core":61,path:22,"resource-loader":34}],154:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}i.__esModule=!0,i.default=function(){return function(t,e){if(t.data&&t.type===a.Resource.TYPE.IMAGE){var i=new s.BaseTexture(t.data,null,s.utils.getResolutionOfUrl(t.url));i.imageUrl=t.url,t.texture=new s.Texture(i),s.utils.BaseTextureCache[t.name]=i,s.utils.TextureCache[t.name]=t.texture,t.name!==t.url&&(s.utils.BaseTextureCache[t.url]=i,s.utils.TextureCache[t.url]=t.texture)}e()}};var n=t("../core"),s=r(n),a=t("resource-loader")},{"../core":61,"resource-loader":34}],155:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=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}}(),l=t("../core"),h=r(l),u=new h.Point,c=new h.Polygon,d=function(t){function e(i,r,a,o,l){n(this,e);var u=s(this,t.call(this));return u._texture=null,u.uvs=a||new Float32Array([0,0,1,0,1,1,0,1]),u.vertices=r||new Float32Array([0,0,100,0,100,100,0,100]),u.indices=o||new Uint16Array([0,1,3,2]),u.dirty=0,u.indexDirty=0,u.blendMode=h.BLEND_MODES.NORMAL,u.canvasPadding=0,u.drawMode=l||e.DRAW_MODES.TRIANGLE_MESH,u.texture=i,u.shader=null,u.tintRgb=new Float32Array([1,1,1]),u._glDatas={},u.pluginName="mesh",u}return a(e,t),e.prototype._renderWebGL=function(t){t.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this)},e.prototype._renderCanvas=function(t){t.plugins[this.pluginName].render(this)},e.prototype._onTextureUpdate=function(){},e.prototype._calculateBounds=function(){this._bounds.addVertices(this.transform,this.vertices,0,this.vertices.length)},e.prototype.containsPoint=function(t){if(!this.getBounds().contains(t.x,t.y))return!1;this.worldTransform.applyInverse(t,u);for(var i=this.vertices,r=c.points,n=this.indices,s=this.indices.length,a=this.drawMode===e.DRAW_MODES.TRIANGLES?3:1,o=0;o+2<s;o+=a){var l=2*n[o],h=2*n[o+1],d=2*n[o+2];if(r[0]=i[l],r[1]=i[l+1],r[2]=i[h],r[3]=i[h+1],r[4]=i[d],r[5]=i[d+1],c.contains(u.x,u.y))return!0}return!1},o(e,[{key:"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)))}},{key:"tint",get:function(){return h.utils.rgb2hex(this.tintRgb)},set:function(t){this.tintRgb=h.utils.hex2rgb(t,this.tintRgb)}}]),e}(h.Container);i.default=d,d.DRAW_MODES={TRIANGLE_MESH:0,TRIANGLES:1}},{"../core":61}],156:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=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}}(),l=t("./Plane"),h=r(l),u=10,c=function(t){function e(i,r,a,o,l){n(this,e);var h=s(this,t.call(this,i,4,4)),c=h.uvs;return c[6]=c[14]=c[22]=c[30]=1,c[25]=c[27]=c[29]=c[31]=1,h._origWidth=i.width,h._origHeight=i.height,h._uvw=1/h._origWidth,h._uvh=1/h._origHeight,h.width=i.width,h.height=i.height,c[2]=c[10]=c[18]=c[26]=h._uvw*r,c[4]=c[12]=c[20]=c[28]=1-h._uvw*o,c[9]=c[11]=c[13]=c[15]=h._uvh*a,c[17]=c[19]=c[21]=c[23]=1-h._uvh*l,h.leftWidth="undefined"!=typeof r?r:u,h.rightWidth="undefined"!=typeof o?o:u,h.topHeight="undefined"!=typeof a?a:u,h.bottomHeight="undefined"!=typeof l?l:u,h}return a(e,t),e.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},e.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},e.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,s=n.source,a=n.width,o=n.height;this.drawSegment(e,s,a,o,0,1,10,11),this.drawSegment(e,s,a,o,2,3,12,13),this.drawSegment(e,s,a,o,4,5,14,15),this.drawSegment(e,s,a,o,8,9,18,19),this.drawSegment(e,s,a,o,10,11,20,21),this.drawSegment(e,s,a,o,12,13,22,23),this.drawSegment(e,s,a,o,16,17,26,27),this.drawSegment(e,s,a,o,18,19,28,29),this.drawSegment(e,s,a,o,20,21,30,31)},e.prototype.drawSegment=function(t,e,i,r,n,s,a,o){var l=this.uvs,h=this.vertices,u=(l[a]-l[n])*i,c=(l[o]-l[s])*r,d=h[a]-h[n],f=h[o]-h[s];u<1&&(u=1),c<1&&(c=1),d<1&&(d=1),f<1&&(f=1),t.drawImage(e,l[n]*i,l[s]*r,u,c,h[n],h[s],d,f)},o(e,[{key:"width",get:function(){return this._width},set:function(t){this._width=t,this.updateVerticalVertices()}},{key:"height",get:function(){return this._height},set:function(t){this._height=t,this.updateHorizontalVertices()}},{key:"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}},{key:"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}},{key:"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}},{key:"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}}]),e}(h.default);i.default=c},{"./Plane":157}],157:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=t("./Mesh"),l=r(o),h=function(t){function e(i,r,a){n(this,e);var o=s(this,t.call(this,i));return o._ready=!0,o.verticesX=r||10,o.verticesY=a||10,o.drawMode=l.default.DRAW_MODES.TRIANGLES,o.refresh(),o}return a(e,t),e.prototype.refresh=function(){for(var t=this.verticesX*this.verticesY,e=[],i=[],r=[],n=[],s=this.texture,a=this.verticesX-1,o=this.verticesY-1,l=s.width/a,h=s.height/o,u=0;u<t;u++)if(s._uvs){var c=u%this.verticesX,d=u/this.verticesX|0;e.push(c*l,d*h),r.push(s._uvs.x0+(s._uvs.x1-s._uvs.x0)*(c/(this.verticesX-1)),s._uvs.y0+(s._uvs.y3-s._uvs.y0)*(d/(this.verticesY-1)))}else r.push(0);for(var f=a*o,p=0;p<f;p++){var _=p%a,m=p/a|0,g=m*this.verticesX+_,v=m*this.verticesX+_+1,y=(m+1)*this.verticesX+_,T=(m+1)*this.verticesX+_+1;n.push(g,v,y),n.push(v,T,y)}this.vertices=new Float32Array(e),this.uvs=new Float32Array(r),this.colors=new Float32Array(i),this.indices=new Uint16Array(n),this.indexDirty=!0},e.prototype._onTextureUpdate=function(){l.default.prototype._onTextureUpdate.call(this),this._ready&&this.refresh()},e}(l.default);i.default=h},{"./Mesh":155}],158:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function n(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var l=t("./Mesh"),h=n(l),u=t("../core"),c=r(u),d=function(t){function e(i,r){s(this,e);var n=a(this,t.call(this,i));return n.points=r,n.vertices=new Float32Array(4*r.length),n.uvs=new Float32Array(4*r.length),n.colors=new Float32Array(2*r.length),n.indices=new Uint16Array(2*r.length),n._ready=!0,n.refresh(),n}return o(e,t),e.prototype.refresh=function(){var t=this.points;if(!(t.length<1)&&this._texture._uvs){this.vertices.length/4!==t.length&&(this.vertices=new Float32Array(4*t.length),this.uvs=new Float32Array(4*t.length),this.colors=new Float32Array(2*t.length),this.indices=new Uint16Array(2*t.length));var e=this.uvs,i=this.indices,r=this.colors,n=this._texture._uvs,s=new c.Point(n.x0,n.y0),a=new c.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]=Number(a.y)+s.y,r[0]=1,r[1]=1,i[0]=0,i[1]=1;for(var o=t.length,l=1;l<o;l++){var h=4*l,u=l/(o-1);e[h]=u*a.x+s.x,e[h+1]=0+s.y,e[h+2]=u*a.x+s.x,e[h+3]=Number(a.y)+s.y,h=2*l,r[h]=1,r[h+1]=1,h=2*l,i[h]=h,i[h+1]=h+1}this.dirty++,this.indexDirty++}},e.prototype._onTextureUpdate=function(){t.prototype._onTextureUpdate.call(this),this._ready&&this.refresh()},e.prototype.updateTransform=function(){var t=this.points;if(!(t.length<1)){for(var e=t[0],i=void 0,r=0,n=0,s=this.vertices,a=t.length,o=0;o<a;o++){var l=t[o],h=4*o;i=o<t.length-1?t[o+1]:l,n=-(i.x-e.x),r=i.y-e.y;var u=10*(1-o/(a-1));u>1&&(u=1);var c=Math.sqrt(r*r+n*n),d=this._texture.height/2;r/=c,n/=c,r*=d,n*=d,s[h]=l.x+r,s[h+1]=l.y+n,s[h+2]=l.x-r,s[h+3]=l.y-n,e=l}this.containerUpdateTransform()}},e}(h.default);i.default=d},{"../core":61,"./Mesh":155}],159:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var a=t("../../core"),o=n(a),l=t("../Mesh"),h=r(l),u=function(){function t(e){s(this,t),this.renderer=e}return t.prototype.render=function(t){var e=this.renderer,i=e.context,r=t.worldTransform,n=e.resolution;e.roundPixels?i.setTransform(r.a*n,r.b*n,r.c*n,r.d*n,r.tx*n|0,r.ty*n|0):i.setTransform(r.a*n,r.b*n,r.c*n,r.d*n,r.tx*n,r.ty*n),e.setBlendMode(t.blendMode),t.drawMode===h.default.DRAW_MODES.TRIANGLE_MESH?this._renderTriangleMesh(t):this._renderTriangles(t)},t.prototype._renderTriangleMesh=function(t){for(var e=t.vertices.length/2,i=0;i<e-2;i++){var r=2*i;this._renderDrawTriangle(t,r,r+2,r+4)}},t.prototype._renderTriangles=function(t){for(var e=t.indices,i=e.length,r=0;r<i;r+=3){var n=2*e[r],s=2*e[r+1],a=2*e[r+2];this._renderDrawTriangle(t,n,s,a)}},t.prototype._renderDrawTriangle=function(t,e,i,r){var n=this.renderer.context,s=t.uvs,a=t.vertices,o=t._texture;if(o.valid){var l=o.baseTexture,h=l.source,u=l.width,c=l.height,d=s[e]*l.width,f=s[i]*l.width,p=s[r]*l.width,_=s[e+1]*l.height,m=s[i+1]*l.height,g=s[r+1]*l.height,v=a[e],y=a[i],T=a[r],b=a[e+1],x=a[i+1],w=a[r+1];if(t.canvasPadding>0){var E=t.canvasPadding/t.worldTransform.a,S=t.canvasPadding/t.worldTransform.d,D=(v+y+T)/3,A=(b+x+w)/3,P=v-D,O=b-A,C=Math.sqrt(P*P+O*O);v=D+P/C*(C+E),b=A+O/C*(C+S),P=y-D,O=x-A,C=Math.sqrt(P*P+O*O),y=D+P/C*(C+E),x=A+O/C*(C+S),P=T-D,O=w-A,C=Math.sqrt(P*P+O*O),T=D+P/C*(C+E),w=A+O/C*(C+S)}n.save(),n.beginPath(),n.moveTo(v,b),n.lineTo(y,x),n.lineTo(T,w),n.closePath(),n.clip();var M=d*m+_*p+f*g-m*p-_*f-d*g,L=v*m+_*T+y*g-m*T-_*y-v*g,R=d*y+v*p+f*T-y*p-v*f-d*T,I=d*m*T+_*y*p+v*f*g-v*m*p-_*f*T-d*y*g,N=b*m+_*w+x*g-m*w-_*x-b*g,j=d*x+b*p+f*w-x*p-b*f-d*w,F=d*m*w+_*x*p+b*f*g-b*m*p-_*f*w-d*x*g;n.transform(L/M,N/M,R/M,j/M,I/M,F/M),n.drawImage(h,0,0,u*l.resolution,c*l.resolution,0,0,u,c),n.restore()}},t.prototype.renderMeshFlat=function(t){var e=this.renderer.context,i=t.vertices,r=i.length/2;e.beginPath();for(var n=1;n<r-2;++n){var s=2*n,a=i[s],o=i[s+1],l=i[s+2],h=i[s+3],u=i[s+4],c=i[s+5];e.moveTo(a,o),e.lineTo(l,h),e.lineTo(u,c)}e.fillStyle="#FF0000",e.fill(),e.closePath()},t.prototype.destroy=function(){this.renderer=null},t}();i.default=u,o.CanvasRenderer.registerPlugin("mesh",u)},{"../../core":61,"../Mesh":155}],160:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}i.__esModule=!0;var n=t("./Mesh");Object.defineProperty(i,"Mesh",{enumerable:!0,get:function(){return r(n).default}});var s=t("./webgl/MeshRenderer");Object.defineProperty(i,"MeshRenderer",{enumerable:!0,get:function(){return r(s).default}});var a=t("./canvas/CanvasMeshRenderer");Object.defineProperty(i,"CanvasMeshRenderer",{enumerable:!0,get:function(){return r(a).default}});var o=t("./Plane");Object.defineProperty(i,"Plane",{enumerable:!0,get:function(){return r(o).default}});var l=t("./NineSlicePlane");Object.defineProperty(i,"NineSlicePlane",{enumerable:!0,get:function(){return r(l).default}});var h=t("./Rope");Object.defineProperty(i,"Rope",{enumerable:!0,get:function(){return r(h).default}})},{"./Mesh":155,"./NineSlicePlane":156,"./Plane":157,"./Rope":158,"./canvas/CanvasMeshRenderer":159,"./webgl/MeshRenderer":161}],161:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var l=t("../../core"),h=n(l),u=t("pixi-gl-core"),c=r(u),d=t("../Mesh"),f=r(d),p=(t("path"),function(t){function e(i){s(this,e);var r=a(this,t.call(this,i));return r.shader=null,r}return o(e,t),e.prototype.onContextChange=function(){var t=this.renderer.gl;this.shader=new h.Shader(t,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 translationMatrix;\nuniform mat3 projectionMatrix;\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 vTextureCoord = aTextureCoord;\n}\n","varying vec2 vTextureCoord;\nuniform float alpha;\nuniform vec3 tint;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * vec4(tint * alpha, alpha);\n}\n")},e.prototype.render=function(t){var e=this.renderer,i=e.gl,r=t._texture;if(r.valid){var n=t._glDatas[e.CONTEXT_UID];n||(e.bindVao(null),n={shader:this.shader,vertexBuffer:c.default.GLBuffer.createVertexBuffer(i,t.vertices,i.STREAM_DRAW),uvBuffer:c.default.GLBuffer.createVertexBuffer(i,t.uvs,i.STREAM_DRAW),indexBuffer:c.default.GLBuffer.createIndexBuffer(i,t.indices,i.STATIC_DRAW),vao:null,dirty:t.dirty,indexDirty:t.indexDirty},n.vao=new c.default.VertexArrayObject(i).addIndex(n.indexBuffer).addAttribute(n.vertexBuffer,n.shader.attributes.aVertexPosition,i.FLOAT,!1,8,0).addAttribute(n.uvBuffer,n.shader.attributes.aTextureCoord,i.FLOAT,!1,8,0),t._glDatas[e.CONTEXT_UID]=n),t.dirty!==n.dirty&&(n.dirty=t.dirty,n.uvBuffer.upload(t.uvs)),t.indexDirty!==n.indexDirty&&(n.indexDirty=t.indexDirty,n.indexBuffer.upload(t.indices)),n.vertexBuffer.upload(t.vertices),e.bindShader(n.shader),n.shader.uniforms.uSampler=e.bindTexture(r),e.state.setBlendMode(t.blendMode),n.shader.uniforms.translationMatrix=t.worldTransform.toArray(!0),n.shader.uniforms.alpha=t.worldAlpha,n.shader.uniforms.tint=t.tintRgb;var s=t.drawMode===f.default.DRAW_MODES.TRIANGLE_MESH?i.TRIANGLE_STRIP:i.TRIANGLES;e.bindVao(n.vao),n.vao.draw(s,t.indices.length,0)}},e}(h.ObjectRenderer));i.default=p,h.WebGLRenderer.registerPlugin("mesh",p)},{"../../core":61,"../Mesh":155,path:22,"pixi-gl-core":12}],162:[function(t,e,i){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=t("../core"),l=r(o),h=function(t){function e(){var i=arguments.length<=0||void 0===arguments[0]?1500:arguments[0],r=arguments[1],a=arguments.length<=2||void 0===arguments[2]?16384:arguments[2];n(this,e);var o=s(this,t.call(this)),h=16384;return a>h&&(a=h),a>i&&(a=i),o._properties=[!1,!0,!1,!1,!1],o._maxSize=i,o._batchSize=a,o._glBuffers={},o._bufferToUpdate=0,o.interactiveChildren=!1,o.blendMode=l.BLEND_MODES.NORMAL,o.roundPixels=!0,o.baseTexture=null,o.setProperties(r),o}return a(e,t),e.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])},e.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},e.prototype.renderWebGL=function(t){var e=this;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(){return e.onChildrenChange(0)})),t.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},e.prototype.onChildrenChange=function(t){var e=Math.floor(t/this._batchSize);e<this._bufferToUpdate&&(this._bufferToUpdate=e)},e.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,s=0,a=0,o=0,l=t.blendModes[this.blendMode];l!==e.globalCompositeOperation&&(e.globalCompositeOperation=l),e.globalAlpha=this.worldAlpha,this.displayObjectUpdateTransform();for(var h=0;h<this.children.length;++h){var u=this.children[h];if(u.visible){var c=u._texture.frame;if(e.globalAlpha=this.worldAlpha*u.alpha,u.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=u.anchor.x*(-c.width*u.scale.x)+u.position.x+.5,s=u.anchor.y*(-c.height*u.scale.y)+u.position.y+.5,a=c.width*u.scale.x,o=c.height*u.scale.y;else{r||(r=!0),u.displayObjectUpdateTransform();var d=u.worldTransform;t.roundPixels?e.setTransform(d.a,d.b,d.c,d.d,d.tx*t.resolution|0,d.ty*t.resolution|0):e.setTransform(d.a,d.b,d.c,d.d,d.tx*t.resolution,d.ty*t.resolution),n=u.anchor.x*-c.width+.5,s=u.anchor.y*-c.height+.5,a=c.width,o=c.height}var f=u._texture.baseTexture.resolution;e.drawImage(u._texture.baseTexture.source,c.x*f,c.y*f,c.width*f,c.height*f,n*f,s*f,a*f,o*f)}}}},e.prototype.destroy=function(e){if(t.prototype.destroy.call(this,e),this._buffers)for(var i=0;i<this._buffers.length;++i)this._buffers[i].destroy();this._properties=null,this._buffers=null},e}(l.Container);i.default=h},{"../core":61}],163:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}i.__esModule=!0;var n=t("./ParticleContainer");Object.defineProperty(i,"ParticleContainer",{enumerable:!0,get:function(){return r(n).default}});var s=t("./webgl/ParticleRenderer");Object.defineProperty(i,"ParticleRenderer",{enumerable:!0,get:function(){return r(s).default}})},{"./ParticleContainer":162,"./webgl/ParticleRenderer":165}],164:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var s=t("pixi-gl-core"),a=r(s),o=t("../../core/utils/createIndicesForQuads"),l=r(o),h=function(){function t(e,i,r,s){n(this,t),this.gl=e,this.vertSize=2,this.vertByteSize=4*this.vertSize,this.size=s,this.dynamicProperties=[],this.staticProperties=[];for(var a=0;a<i.length;++a){var o=i[a];o={attribute:o.attribute,size:o.size,uploadFunction:o.uploadFunction,offset:o.offset},r[a]?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()}return t.prototype.initBuffers=function(){var t=this.gl,e=0;this.indices=(0,l.default)(this.size),this.indexBuffer=a.default.GLBuffer.createIndexBuffer(t,this.indices,t.STATIC_DRAW),this.dynamicStride=0;for(var i=0;i<this.dynamicProperties.length;++i){var r=this.dynamicProperties[i];r.offset=e,e+=r.size,this.dynamicStride+=r.size}this.dynamicData=new Float32Array(this.size*this.dynamicStride*4),this.dynamicBuffer=a.default.GLBuffer.createVertexBuffer(t,this.dynamicData,t.STREAM_DRAW);var n=0;this.staticStride=0;for(var s=0;s<this.staticProperties.length;++s){var o=this.staticProperties[s];o.offset=n,n+=o.size,this.staticStride+=o.size}this.staticData=new Float32Array(this.size*this.staticStride*4),this.staticBuffer=a.default.GLBuffer.createVertexBuffer(t,this.staticData,t.STATIC_DRAW),this.vao=new a.default.VertexArrayObject(t).addIndex(this.indexBuffer);for(var h=0;h<this.dynamicProperties.length;++h){var u=this.dynamicProperties[h];this.vao.addAttribute(this.dynamicBuffer,u.attribute,t.FLOAT,!1,4*this.dynamicStride,4*u.offset)}for(var c=0;c<this.staticProperties.length;++c){var d=this.staticProperties[c];this.vao.addAttribute(this.staticBuffer,d.attribute,t.FLOAT,!1,4*this.staticStride,4*d.offset)}},t.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()},t.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()},t.prototype.destroy=function(){this.dynamicProperties=null,this.dynamicData=null,this.dynamicBuffer.destroy(),this.staticProperties=null,this.staticData=null,this.staticBuffer.destroy()},t}();i.default=h},{"../../core/utils/createIndicesForQuads":115,"pixi-gl-core":12}],165:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var l=t("../../core"),h=n(l),u=t("./ParticleShader"),c=r(u),d=t("./ParticleBuffer"),f=r(d),p=function(t){function e(i){s(this,e);var r=a(this,t.call(this,i));return r.shader=null,r.indexBuffer=null,r.properties=null,r.tempMatrix=new h.Matrix,r.CONTEXT_UID=0,r}return o(e,t),e.prototype.onContextChange=function(){var t=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.shader=new c.default(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}]},e.prototype.start=function(){this.renderer.bindShader(this.shader)},e.prototype.render=function(t){var e=t.children,i=t._maxSize,r=t._batchSize,n=this.renderer,s=e.length;if(0!==s){s>i&&(s=i);var a=t._glBuffers[n.CONTEXT_UID];a||(a=t._glBuffers[n.CONTEXT_UID]=this.generateBuffers(t)),this.renderer.setBlendMode(t.blendMode);var o=n.gl,l=t.worldTransform.copy(this.tempMatrix);l.prepend(n._activeRenderTarget.projectionMatrix),this.shader.uniforms.projectionMatrix=l.toArray(!0),this.shader.uniforms.uAlpha=t.worldAlpha;var h=e[0]._texture.baseTexture;this.shader.uniforms.uSampler=n.bindTexture(h);for(var u=0,c=0;u<s;u+=r,c+=1){var d=s-u;d>r&&(d=r);var f=a[c];f.uploadDynamic(e,u,d),t._bufferToUpdate===c&&(f.uploadStatic(e,u,d),t._bufferToUpdate=c+1),n.bindVao(f.vao),f.vao.draw(o.TRIANGLES,6*d)}}},e.prototype.generateBuffers=function(t){for(var e=this.renderer.gl,i=[],r=t._maxSize,n=t._batchSize,s=t._properties,a=0;a<r;a+=n)i.push(new f.default(e,this.properties,s,n));return i},e.prototype.uploadVertices=function(t,e,i,r,n,s){for(var a=0,o=0,l=0,h=0,u=0;u<i;++u){var c=t[e+u],d=c._texture,f=c.scale.x,p=c.scale.y,_=d.trim,m=d.orig;_?(o=_.x-c.anchor.x*m.width,a=o+_.width,h=_.y-c.anchor.y*m.height,l=h+_.height):(a=m.width*(1-c.anchor.x),o=m.width*-c.anchor.x,l=m.height*(1-c.anchor.y),h=m.height*-c.anchor.y),r[s]=o*f,r[s+1]=h*p,r[s+n]=a*f,r[s+n+1]=h*p,r[s+2*n]=a*f,r[s+2*n+1]=l*p,r[s+3*n]=o*f,r[s+3*n+1]=l*p,s+=4*n}},e.prototype.uploadPosition=function(t,e,i,r,n,s){for(var a=0;a<i;a++){var o=t[e+a].position;r[s]=o.x,r[s+1]=o.y,r[s+n]=o.x,r[s+n+1]=o.y,r[s+2*n]=o.x,r[s+2*n+1]=o.y,r[s+3*n]=o.x,r[s+3*n+1]=o.y,s+=4*n}},e.prototype.uploadRotation=function(t,e,i,r,n,s){for(var a=0;a<i;a++){var o=t[e+a].rotation;r[s]=o,r[s+n]=o,r[s+2*n]=o,r[s+3*n]=o,s+=4*n}},e.prototype.uploadUvs=function(t,e,i,r,n,s){for(var a=0;a<i;++a){var o=t[e+a]._texture._uvs;o?(r[s]=o.x0,r[s+1]=o.y0,r[s+n]=o.x1,r[s+n+1]=o.y1,r[s+2*n]=o.x2,r[s+2*n+1]=o.y2,r[s+3*n]=o.x3,r[s+3*n+1]=o.y3,s+=4*n):(r[s]=0,r[s+1]=0,r[s+n]=0,r[s+n+1]=0,r[s+2*n]=0,r[s+2*n+1]=0,r[s+3*n]=0,r[s+3*n+1]=0,s+=4*n)}},e.prototype.uploadAlpha=function(t,e,i,r,n,s){for(var a=0;a<i;a++){var o=t[e+a].alpha;r[s]=o,r[s+n]=o,r[s+2*n]=o,r[s+3*n]=o,s+=4*n}},e.prototype.destroy=function(){this.renderer.gl&&this.renderer.gl.deleteBuffer(this.indexBuffer),t.prototype.destroy.call(this),this.shader.destroy(),this.indices=null,this.tempMatrix=null},e}(h.ObjectRenderer);i.default=p,h.WebGLRenderer.registerPlugin("particle",p)},{"../../core":61,"./ParticleBuffer":164,"./ParticleShader":166}],166:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}i.__esModule=!0;var o=t("../../core/Shader"),l=r(o),h=function(t){function e(i){return n(this,e),s(this,t.call(this,i,["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")))}return a(e,t),e}(l.default);i.default=h},{"../../core/Shader":41 }],167:[function(t,e,i){Math.sign||(Math.sign=function(t){return t=Number(t),0===t||isNaN(t)?t:t>0?1:-1})},{}],168:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}var n=t("object-assign"),s=r(n);Object.assign||(Object.assign=s.default)},{"object-assign":5}],169:[function(t,e,i){t("./Object.assign"),t("./requestAnimationFrame"),t("./Math.sign"),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array)},{"./Math.sign":167,"./Object.assign":168,"./requestAnimationFrame":170}],170:[function(t,e,i){(function(t){var e=16;Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),t.performance&&t.performance.now||!function(){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){var s=r[n];t.requestAnimationFrame=t[s+"RequestAnimationFrame"],t.cancelAnimationFrame=t[s+"CancelAnimationFrame"]||t[s+"CancelRequestAnimationFrame"]}t.requestAnimationFrame||(t.requestAnimationFrame=function(t){if("function"!=typeof t)throw new TypeError(t+"is not a function");var r=Date.now(),n=e+i-r;return n<0&&(n=0),i=r,setTimeout(function(){i=Date.now(),t(performance.now())},n)}),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(t){return clearTimeout(t)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],171:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){return e instanceof c.Text&&(e.updateText(!0),!0)}function o(t,e){if(e instanceof c.TextStyle){var i=c.Text.getFontStyle(e);return c.Text.fontPropertiesCache[i]||c.Text.calculateFontProperties(i),!0}return!1}function l(t,e){if(t instanceof c.Text){e.indexOf(t.style)===-1&&e.push(t.style),e.indexOf(t)===-1&&e.push(t);var i=t._texture.baseTexture;return e.indexOf(i)===-1&&e.push(i),!0}return!1}function h(t,e){return t instanceof c.TextStyle&&(e.indexOf(t)===-1&&e.push(t),!0)}i.__esModule=!0;var u=t("../core"),c=n(u),d=t("./limiters/CountLimiter"),f=r(d),p=c.ticker.shared;c.settings.UPLOADS_PER_FRAME=4;var _=function(){function t(e){var i=this;s(this,t),this.limiter=new f.default(c.settings.UPLOADS_PER_FRAME),this.renderer=e,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=function(){i.queue&&i.prepareItems()},this.register(l,a),this.register(h,o)}return t.prototype.upload=function(t,e){"function"==typeof t&&(e=t,t=null),t&&this.add(t),this.queue.length?(e&&this.completes.push(e),this.ticking||(this.ticking=!0,p.addOnce(this.tick,this))):e&&e()},t.prototype.tick=function(){setTimeout(this.delayedTick,0)},t.prototype.prepareItems=function(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){for(var t=this.queue[0],e=!1,i=0,r=this.uploadHooks.length;i<r;i++)if(this.uploadHooks[i](this.uploadHookHelper,t)){this.queue.shift(),e=!0;break}e||this.queue.shift()}if(this.queue.length)p.addOnce(this.tick,this);else{this.ticking=!1;var n=this.completes.slice(0);this.completes.length=0;for(var s=0,a=n.length;s<a;s++)n[s]()}},t.prototype.register=function(t,e){return t&&this.addHooks.push(t),e&&this.uploadHooks.push(e),this},t.prototype.add=function(t){for(var e=0,i=this.addHooks.length;e<i&&!this.addHooks[e](t,this.queue);e++);if(t instanceof c.Container)for(var r=t.children.length-1;r>=0;r--)this.add(t.children[r]);return this},t.prototype.destroy=function(){this.ticking&&p.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null},t}();i.default=_},{"../core":61,"./limiters/CountLimiter":174}],172:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function l(t,e){if(e instanceof c.BaseTexture){var i=e.source,r=0===i.width?t.canvas.width:Math.min(t.canvas.width,i.width),n=0===i.height?t.canvas.height:Math.min(t.canvas.height,i.height);return t.ctx.drawImage(i,0,0,r,n,0,0,t.canvas.width,t.canvas.height),!0}return!1}function h(t,e){if(t instanceof c.BaseTexture)return e.indexOf(t)===-1&&e.push(t),!0;if(t._texture&&t._texture instanceof c.Texture){var i=t._texture.baseTexture;return e.indexOf(i)===-1&&e.push(i),!0}return!1}i.__esModule=!0;var u=t("../../core"),c=n(u),d=t("../BasePrepare"),f=r(d),p=16,_=function(t){function e(i){s(this,e);var r=a(this,t.call(this,i));return r.uploadHookHelper=r,r.canvas=document.createElement("canvas"),r.canvas.width=p,r.canvas.height=p,r.ctx=r.canvas.getContext("2d"),r.register(h,l),r}return o(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.ctx=null,this.canvas=null},e}(f.default);i.default=_,c.CanvasRenderer.registerPlugin("prepare",_)},{"../../core":61,"../BasePrepare":171}],173:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}i.__esModule=!0;var n=t("./webgl/WebGLPrepare");Object.defineProperty(i,"webgl",{enumerable:!0,get:function(){return r(n).default}});var s=t("./canvas/CanvasPrepare");Object.defineProperty(i,"canvas",{enumerable:!0,get:function(){return r(s).default}});var a=t("./BasePrepare");Object.defineProperty(i,"BasePrepare",{enumerable:!0,get:function(){return r(a).default}});var o=t("./limiters/CountLimiter");Object.defineProperty(i,"CountLimiter",{enumerable:!0,get:function(){return r(o).default}});var l=t("./limiters/TimeLimiter");Object.defineProperty(i,"TimeLimiter",{enumerable:!0,get:function(){return r(l).default}})},{"./BasePrepare":171,"./canvas/CanvasPrepare":172,"./limiters/CountLimiter":174,"./limiters/TimeLimiter":175,"./webgl/WebGLPrepare":176}],174:[function(t,e,i){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=function(){function t(e){r(this,t),this.maxItemsPerFrame=e,this.itemsLeft=0}return t.prototype.beginFrame=function(){this.itemsLeft=this.maxItemsPerFrame},t.prototype.allowedToUpload=function(){return this.itemsLeft-- >0},t}();i.default=n},{}],175:[function(t,e,i){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.__esModule=!0;var n=function(){function t(e){r(this,t),this.maxMilliseconds=e,this.frameStart=0}return t.prototype.beginFrame=function(){this.frameStart=Date.now()},t.prototype.allowedToUpload=function(){return Date.now()-this.frameStart<this.maxMilliseconds},t}();i.default=n},{}],176:[function(t,e,i){function r(t){return t&&t.__esModule?t:{default:t}}function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":_typeof2(e))&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":_typeof2(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function l(t,e){return e instanceof f.BaseTexture&&(e._glTextures[t.CONTEXT_UID]||t.textureManager.updateTexture(e),!0)}function h(t,e){return e instanceof f.Graphics&&((e.dirty||e.clearDirty||!e._webGL[t.plugins.graphics.CONTEXT_UID])&&t.plugins.graphics.updateGraphics(e),!0)}function u(t,e){if(t instanceof f.BaseTexture)return e.indexOf(t)===-1&&e.push(t),!0;if(t._texture&&t._texture instanceof f.Texture){var i=t._texture.baseTexture;return e.indexOf(i)===-1&&e.push(i),!0}return!1}function c(t,e){return t instanceof f.Graphics&&(e.push(t),!0)}i.__esModule=!0;var d=t("../../core"),f=n(d),p=t("../BasePrepare"),_=r(p),m=function(t){function e(i){s(this,e);var r=a(this,t.call(this,i));return r.uploadHookHelper=r.renderer,r.register(u,l).register(c,h),r}return o(e,t),e}(_.default);i.default=m,f.WebGLRenderer.registerPlugin("prepare",m)},{"../../core":61,"../BasePrepare":171}],177:[function(t,e,i){(function(e){function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}i.__esModule=!0,i.loader=i.prepare=i.particles=i.mesh=i.loaders=i.interaction=i.filters=i.extras=i.extract=i.accessibility=void 0;var n=t("./deprecation");Object.keys(n).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(i,t,{enumerable:!0,get:function(){return n[t]}})});var s=t("./core");Object.keys(s).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(i,t,{enumerable:!0,get:function(){return s[t]}})}),t("./polyfill");var a=t("./accessibility"),o=r(a),l=t("./extract"),h=r(l),u=t("./extras"),c=r(u),d=t("./filters"),f=r(d),p=t("./interaction"),_=r(p),m=t("./loaders"),g=r(m),v=t("./mesh"),y=r(v),T=t("./particles"),b=r(T),x=t("./prepare"),w=r(x);i.accessibility=o,i.extract=h,i.extras=c,i.filters=f,i.interaction=_,i.loaders=g,i.mesh=y,i.particles=b,i.prepare=w;var E=g&&g.Loader?new g.Loader:null;i.loader=E,e.PIXI=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./accessibility":40,"./core":61,"./deprecation":120,"./extract":122,"./extras":131,"./filters":142,"./interaction":148,"./loaders":151,"./mesh":160,"./particles":163,"./polyfill":169,"./prepare":173}]},{},[177])(177)});var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;if((_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){_gsScope._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(t,e,i){var r=function(t){var e,i=[],r=t.length;for(e=0;e!==r;i.push(t[e++]));return i},n=function(t,e,i){var r,n,s=t.cycle;for(r in s)n=s[r],t[r]="function"==typeof n?n(i,e[i]):n[i%n.length];delete t.cycle},s=function(t,e,r){i.call(this,t,e,r),this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._dirty=!0,this.render=s.prototype.render},a=1e-10,o=i._internals,l=o.isSelector,h=o.isArray,u=s.prototype=i.to({},.1,{}),c=[];s.version="1.19.1",u.constructor=s,u.kill()._gc=!1,s.killTweensOf=s.killDelayedCallsTo=i.killTweensOf,s.getTweensOf=i.getTweensOf,s.lagSmoothing=i.lagSmoothing,s.ticker=i.ticker,s.render=i.render,u.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),i.prototype.invalidate.call(this)},u.updateTo=function(t,e){var r,n=this.ratio,s=this.vars.immediateRender||t.immediateRender;e&&this._startTime<this._timeline._time&&(this._startTime=this._timeline._time,this._uncache(!1),this._gc?this._enabled(!0,!1):this._timeline.insert(this,this._startTime-this._delay));for(r in t)this.vars[r]=t[r];if(this._initted||s)if(e)this._initted=!1,s&&this.render(0,!0,!0);else if(this._gc&&this._enabled(!0,!1),this._notifyPluginsOfEnabled&&this._firstPT&&i._onPluginEvent("_onDisable",this),this._time/this._duration>.998){var a=this._totalTime;this.render(0,!0,!1),this._initted=!1,this.render(a,!0,!1)}else if(this._initted=!1,this._init(),this._time>0||s)for(var o,l=1/(1-n),h=this._firstPT;h;)o=h.s+h.c,h.c*=l,h.s=o-h.c,h=h._next;return this},u.render=function(t,e,i){this._initted||0===this._duration&&this.vars.repeat&&this.invalidate();var r,n,s,l,h,u,c,d,f=this._dirty?this.totalDuration():this._totalDuration,p=this._time,_=this._totalTime,m=this._cycle,g=this._duration,v=this._rawPrevTime;if(t>=f-1e-7&&t>=0?(this._totalTime=f,this._cycle=this._repeat,this._yoyo&&0!==(1&this._cycle)?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=g,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(r=!0,n="onComplete",i=i||this._timeline.autoRemoveChildren),0===g&&(this._initted||!this.vars.lazy||i)&&(this._startTime===this._timeline._duration&&(t=0),(v<0||t<=0&&t>=-1e-7||v===a&&"isPause"!==this.data)&&v!==t&&(i=!0,v>a&&(n="onReverseComplete")),this._rawPrevTime=d=!e||t||v===t?t:a)):t<1e-7?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==_||0===g&&v>0)&&(n="onReverseComplete",r=this._reversed),t<0&&(this._active=!1,0===g&&(this._initted||!this.vars.lazy||i)&&(v>=0&&(i=!0),this._rawPrevTime=d=!e||t||v===t?t:a)),this._initted||(i=!0)):(this._totalTime=this._time=t,0!==this._repeat&&(l=g+this._repeatDelay,this._cycle=this._totalTime/l>>0,0!==this._cycle&&this._cycle===this._totalTime/l&&_<=t&&this._cycle--,this._time=this._totalTime-this._cycle*l,this._yoyo&&0!==(1&this._cycle)&&(this._time=g-this._time),this._time>g?this._time=g:this._time<0&&(this._time=0)),this._easeType?(h=this._time/g,u=this._easeType,c=this._easePower,(1===u||3===u&&h>=.5)&&(h=1-h),3===u&&(h*=2),1===c?h*=h:2===c?h*=h*h:3===c?h*=h*h*h:4===c&&(h*=h*h*h*h),1===u?this.ratio=1-h:2===u?this.ratio=h:this._time/g<.5?this.ratio=h/2:this.ratio=1-h/2):this.ratio=this._ease.getRatio(this._time/g)),p===this._time&&!i&&m===this._cycle)return void(_!==this._totalTime&&this._onUpdate&&(e||this._callback("onUpdate")));if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!i&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=p,this._totalTime=_,this._rawPrevTime=v,this._cycle=m,o.lazyTweens.push(this),void(this._lazy=[t,e]);this._time&&!r?this.ratio=this._ease.getRatio(this._time/g):r&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==p&&t>=0&&(this._active=!0),0===_&&(2===this._initted&&t>0&&this._init(),this._startAt&&(t>=0?this._startAt.render(t,e,i):n||(n="_dummyGS")),this.vars.onStart&&(0===this._totalTime&&0!==g||e||this._callback("onStart"))),s=this._firstPT;s;)s.f?s.t[s.p](s.c*this.ratio+s.s):s.t[s.p]=s.c*this.ratio+s.s,s=s._next;this._onUpdate&&(t<0&&this._startAt&&this._startTime&&this._startAt.render(t,e,i),e||(this._totalTime!==_||n)&&this._callback("onUpdate")),this._cycle!==m&&(e||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),n&&(this._gc&&!i||(t<0&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(t,e,i),r&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[n]&&this._callback(n),0===g&&this._rawPrevTime===a&&d!==a&&(this._rawPrevTime=0)))},s.to=function(t,e,i){return new s(t,e,i)},s.from=function(t,e,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new s(t,e,i)},s.fromTo=function(t,e,i,r){return r.startAt=i,r.immediateRender=0!=r.immediateRender&&0!=i.immediateRender,new s(t,e,r)},s.staggerTo=s.allTo=function(t,e,a,o,u,d,f){o=o||0;var p,_,m,g,v=0,y=[],T=function(){a.onComplete&&a.onComplete.apply(a.onCompleteScope||this,arguments),u.apply(f||a.callbackScope||this,d||c)},b=a.cycle,x=a.startAt&&a.startAt.cycle;for(h(t)||("string"==typeof t&&(t=i.selector(t)||t),l(t)&&(t=r(t))),t=t||[],o<0&&(t=r(t),t.reverse(),o*=-1),p=t.length-1,m=0;m<=p;m++){_={};for(g in a)_[g]=a[g];if(b&&(n(_,t,m),null!=_.duration&&(e=_.duration,delete _.duration)),x){x=_.startAt={};for(g in a.startAt)x[g]=a.startAt[g];n(_.startAt,t,m)}_.delay=v+(_.delay||0),m===p&&u&&(_.onComplete=T),y[m]=new s(t[m],e,_),v+=o}return y},s.staggerFrom=s.allFrom=function(t,e,i,r,n,a,o){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,s.staggerTo(t,e,i,r,n,a,o)},s.staggerFromTo=s.allFromTo=function(t,e,i,r,n,a,o,l){return r.startAt=i,r.immediateRender=0!=r.immediateRender&&0!=i.immediateRender,s.staggerTo(t,e,r,n,a,o,l)},s.delayedCall=function(t,e,i,r,n){return new s(e,0,{delay:t,onComplete:e,onCompleteParams:i,callbackScope:r,onReverseComplete:e,onReverseCompleteParams:i,immediateRender:!1,useFrames:n,overwrite:0})},s.set=function(t,e){return new s(t,0,e)},s.isTweening=function(t){return i.getTweensOf(t,!0).length>0};var d=function(t,e){for(var r=[],n=0,s=t._first;s;)s instanceof i?r[n++]=s:(e&&(r[n++]=s),r=r.concat(d(s,e)),n=r.length),s=s._next;return r},f=s.getAllTweens=function(e){return d(t._rootTimeline,e).concat(d(t._rootFramesTimeline,e))};s.killAll=function(t,i,r,n){null==i&&(i=!0),null==r&&(r=!0);var s,a,o,l=f(0!=n),h=l.length,u=i&&r&&n;for(o=0;o<h;o++)a=l[o],(u||a instanceof e||(s=a.target===a.vars.onComplete)&&r||i&&!s)&&(t?a.totalTime(a._reversed?0:a.totalDuration()):a._enabled(!1,!1))},s.killChildTweensOf=function(t,e){if(null!=t){var n,a,u,c,d,f=o.tweenLookup;if("string"==typeof t&&(t=i.selector(t)||t),l(t)&&(t=r(t)),h(t))for(c=t.length;--c>-1;)s.killChildTweensOf(t[c],e);else{n=[];for(u in f)for(a=f[u].target.parentNode;a;)a===t&&(n=n.concat(f[u].tweens)),a=a.parentNode;for(d=n.length,c=0;c<d;c++)e&&n[c].totalTime(n[c].totalDuration()),n[c]._enabled(!1,!1)}}};var p=function(t,i,r,n){i=i!==!1,r=r!==!1,n=n!==!1;for(var s,a,o=f(n),l=i&&r&&n,h=o.length;--h>-1;)a=o[h],(l||a instanceof e||(s=a.target===a.vars.onComplete)&&r||i&&!s)&&a.paused(t)};return s.pauseAll=function(t,e,i){p(!0,t,e,i)},s.resumeAll=function(t,e,i){p(!1,t,e,i)},s.globalTimeScale=function(e){var r=t._rootTimeline,n=i.ticker.time;return arguments.length?(e=e||a,r._startTime=n-(n-r._startTime)*r._timeScale/e,r=t._rootFramesTimeline,n=i.ticker.frame,r._startTime=n-(n-r._startTime)*r._timeScale/e,r._timeScale=t._rootTimeline._timeScale=e,e):r._timeScale},u.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!==(1&this._cycle)?1-t:t)+this._cycle*(this._duration+this._repeatDelay),e):this._time/this.duration()},u.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this._totalTime/this.totalDuration()},u.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),t>this._duration&&(t=this._duration),this._yoyo&&0!==(1&this._cycle)?t=this._duration-t+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(t+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(t,e)):this._time},u.duration=function(e){return arguments.length?t.prototype.duration.call(this,e):this._duration},u.totalDuration=function(t){return arguments.length?this._repeat===-1?this:this.duration((t-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(this._totalDuration=this._repeat===-1?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat,this._dirty=!1),this._totalDuration)},u.repeat=function(t){return arguments.length?(this._repeat=t,this._uncache(!0)):this._repeat},u.repeatDelay=function(t){return arguments.length?(this._repeatDelay=t,this._uncache(!0)):this._repeatDelay},u.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},s},!0),_gsScope._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(t,e,i){var r=function(t){e.call(this,t),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var i,r,n=this.vars;for(r in n)i=n[r],l(i)&&i.join("").indexOf("{self}")!==-1&&(n[r]=this._swapSelfInParams(i));l(n.tweens)&&this.add(n.tweens,0,n.align,n.stagger)},n=1e-10,s=i._internals,a=r._internals={},o=s.isSelector,l=s.isArray,h=s.lazyTweens,u=s.lazyRender,c=_gsScope._gsDefine.globals,d=function(t){var e,i={};for(e in t)i[e]=t[e];return i},f=function(t,e,i){var r,n,s=t.cycle;for(r in s)n=s[r],t[r]="function"==typeof n?n(i,e[i]):n[i%n.length];delete t.cycle},p=a.pauseCallback=function(){},_=function(t){var e,i=[],r=t.length;for(e=0;e!==r;i.push(t[e++]));return i},m=r.prototype=new e;return r.version="1.19.1",m.constructor=r,m.kill()._gc=m._forcingPlayhead=m._hasPause=!1,m.to=function(t,e,r,n){var s=r.repeat&&c.TweenMax||i;return e?this.add(new s(t,e,r),n):this.set(t,r,n)},m.from=function(t,e,r,n){return this.add((r.repeat&&c.TweenMax||i).from(t,e,r),n)},m.fromTo=function(t,e,r,n,s){var a=n.repeat&&c.TweenMax||i;return e?this.add(a.fromTo(t,e,r,n),s):this.set(t,n,s)},m.staggerTo=function(t,e,n,s,a,l,h,u){var c,p,m=new r({onComplete:l,onCompleteParams:h,callbackScope:u,smoothChildTiming:this.smoothChildTiming}),g=n.cycle;for("string"==typeof t&&(t=i.selector(t)||t),t=t||[],o(t)&&(t=_(t)),s=s||0,s<0&&(t=_(t),t.reverse(),s*=-1),p=0;p<t.length;p++)c=d(n),c.startAt&&(c.startAt=d(c.startAt),c.startAt.cycle&&f(c.startAt,t,p)),g&&(f(c,t,p),null!=c.duration&&(e=c.duration,delete c.duration)),m.to(t[p],e,c,p*s);return this.add(m,a)},m.staggerFrom=function(t,e,i,r,n,s,a,o){return i.immediateRender=0!=i.immediateRender,i.runBackwards=!0,this.staggerTo(t,e,i,r,n,s,a,o)},m.staggerFromTo=function(t,e,i,r,n,s,a,o,l){return r.startAt=i,r.immediateRender=0!=r.immediateRender&&0!=i.immediateRender,this.staggerTo(t,e,r,n,s,a,o,l)},m.call=function(t,e,r,n){return this.add(i.delayedCall(0,t,e,r),n)},m.set=function(t,e,r){return r=this._parseTimeOrLabel(r,0,!0),null==e.immediateRender&&(e.immediateRender=r===this._time&&!this._paused),this.add(new i(t,0,e),r)},r.exportRoot=function(t,e){t=t||{},null==t.smoothChildTiming&&(t.smoothChildTiming=!0);var n,s,a=new r(t),o=a._timeline;for(null==e&&(e=!0),o._remove(a,!0),a._startTime=0,a._rawPrevTime=a._time=a._totalTime=o._time,n=o._first;n;)s=n._next,e&&n instanceof i&&n.target===n.vars.onComplete||a.add(n,n._startTime-n._delay),n=s;return o.add(a,0),a},m.add=function(n,s,a,o){var h,u,c,d,f,p;if("number"!=typeof s&&(s=this._parseTimeOrLabel(s,0,!0,n)),!(n instanceof t)){if(n instanceof Array||n&&n.push&&l(n)){for(a=a||"normal",o=o||0,h=s,u=n.length,c=0;c<u;c++)l(d=n[c])&&(d=new r({tweens:d})),this.add(d,h),"string"!=typeof d&&"function"!=typeof d&&("sequence"===a?h=d._startTime+d.totalDuration()/d._timeScale:"start"===a&&(d._startTime-=d.delay())),h+=o;return this._uncache(!0)}if("string"==typeof n)return this.addLabel(n,s);if("function"!=typeof n)throw"Cannot add "+n+" into the timeline; it is not a tween, timeline, function, or string.";n=i.delayedCall(0,n)}if(e.prototype.add.call(this,n,s),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(f=this,p=f.rawTime()>n._startTime;f._timeline;)p&&f._timeline.smoothChildTiming?f.totalTime(f._totalTime,!0):f._gc&&f._enabled(!0,!1),f=f._timeline;return this},m.remove=function(e){if(e instanceof t){this._remove(e,!1);var i=e._timeline=e.vars.useFrames?t._rootFramesTimeline:t._rootTimeline;return e._startTime=(e._paused?e._pauseTime:i._time)-(e._reversed?e.totalDuration()-e._totalTime:e._totalTime)/e._timeScale,this}if(e instanceof Array||e&&e.push&&l(e)){for(var r=e.length;--r>-1;)this.remove(e[r]);return this}return"string"==typeof e?this.removeLabel(e):this.kill(null,e)},m._remove=function(t,i){e.prototype._remove.call(this,t,i);var r=this._last;return r?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},m.append=function(t,e){return this.add(t,this._parseTimeOrLabel(null,e,!0,t))},m.insert=m.insertMultiple=function(t,e,i,r){return this.add(t,e||0,i,r)},m.appendMultiple=function(t,e,i,r){return this.add(t,this._parseTimeOrLabel(null,e,!0,t),i,r)},m.addLabel=function(t,e){return this._labels[t]=this._parseTimeOrLabel(e),this},m.addPause=function(t,e,r,n){var s=i.delayedCall(0,p,r,n||this);return s.vars.onComplete=s.vars.onReverseComplete=e,s.data="isPause",this._hasPause=!0,this.add(s,t)},m.removeLabel=function(t){return delete this._labels[t],this},m.getLabelTime=function(t){return null!=this._labels[t]?this._labels[t]:-1},m._parseTimeOrLabel=function(e,i,r,n){var s;if(n instanceof t&&n.timeline===this)this.remove(n);else if(n&&(n instanceof Array||n.push&&l(n)))for(s=n.length;--s>-1;)n[s]instanceof t&&n[s].timeline===this&&this.remove(n[s]);if("string"==typeof i)return this._parseTimeOrLabel(i,r&&"number"==typeof e&&null==this._labels[i]?e-this.duration():0,r);if(i=i||0,"string"!=typeof e||!isNaN(e)&&null==this._labels[e])null==e&&(e=this.duration());else{if(s=e.indexOf("="),s===-1)return null==this._labels[e]?r?this._labels[e]=this.duration()+i:i:this._labels[e]+i;i=parseInt(e.charAt(s-1)+"1",10)*Number(e.substr(s+1)),e=s>1?this._parseTimeOrLabel(e.substr(0,s-1),0,r):this.duration()}return Number(e)+i},m.seek=function(t,e){return this.totalTime("number"==typeof t?t:this._parseTimeOrLabel(t),e!==!1)},m.stop=function(){return this.paused(!0)},m.gotoAndPlay=function(t,e){return this.play(t,e)},m.gotoAndStop=function(t,e){return this.pause(t,e)},m.render=function(t,e,i){this._gc&&this._enabled(!0,!1);var r,s,a,o,l,c,d,f=this._dirty?this.totalDuration():this._totalDuration,p=this._time,_=this._startTime,m=this._timeScale,g=this._paused;if(t>=f-1e-7&&t>=0)this._totalTime=this._time=f,this._reversed||this._hasPausedChild()||(s=!0,o="onComplete",l=!!this._timeline.autoRemoveChildren,0===this._duration&&(t<=0&&t>=-1e-7||this._rawPrevTime<0||this._rawPrevTime===n)&&this._rawPrevTime!==t&&this._first&&(l=!0,this._rawPrevTime>n&&(o="onReverseComplete"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:n,t=f+1e-4;else if(t<1e-7)if(this._totalTime=this._time=0,(0!==p||0===this._duration&&this._rawPrevTime!==n&&(this._rawPrevTime>0||t<0&&this._rawPrevTime>=0))&&(o="onReverseComplete",s=this._reversed),t<0)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(l=s=!0,o="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(l=!0),this._rawPrevTime=t;else{if(this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:n,0===t&&s)for(r=this._first;r&&0===r._startTime;)r._duration||(s=!1),r=r._next;t=0,this._initted||(l=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!e){if(t>=p)for(r=this._first;r&&r._startTime<=t&&!c;)r._duration||"isPause"!==r.data||r.ratio||0===r._startTime&&0===this._rawPrevTime||(c=r),r=r._next;else for(r=this._last;r&&r._startTime>=t&&!c;)r._duration||"isPause"===r.data&&r._rawPrevTime>0&&(c=r),r=r._prev;c&&(this._time=t=c._startTime,this._totalTime=t+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=t}if(this._time!==p&&this._first||i||l||c){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==p&&t>0&&(this._active=!0),0===p&&this.vars.onStart&&(0===this._time&&this._duration||e||this._callback("onStart")),d=this._time,d>=p)for(r=this._first;r&&(a=r._next,d===this._time&&(!this._paused||g));)(r._active||r._startTime<=d&&!r._paused&&!r._gc)&&(c===r&&this.pause(),r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(t-r._startTime)*r._timeScale,e,i):r.render((t-r._startTime)*r._timeScale,e,i)),r=a;else for(r=this._last;r&&(a=r._prev,d===this._time&&(!this._paused||g));){if(r._active||r._startTime<=p&&!r._paused&&!r._gc){if(c===r){for(c=r._prev;c&&c.endTime()>this._time;)c.render(c._reversed?c.totalDuration()-(t-c._startTime)*c._timeScale:(t-c._startTime)*c._timeScale,e,i),c=c._prev;c=null,this.pause()}r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(t-r._startTime)*r._timeScale,e,i):r.render((t-r._startTime)*r._timeScale,e,i)}r=a}this._onUpdate&&(e||(h.length&&u(),this._callback("onUpdate"))),o&&(this._gc||_!==this._startTime&&m===this._timeScale||(0===this._time||f>=this.totalDuration())&&(s&&(h.length&&u(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[o]&&this._callback(o)))}},m._hasPausedChild=function(){for(var t=this._first;t;){if(t._paused||t instanceof r&&t._hasPausedChild())return!0;t=t._next}return!1},m.getChildren=function(t,e,r,n){n=n||-9999999999;for(var s=[],a=this._first,o=0;a;)a._startTime<n||(a instanceof i?e!==!1&&(s[o++]=a):(r!==!1&&(s[o++]=a),t!==!1&&(s=s.concat(a.getChildren(!0,e,r)),o=s.length))),a=a._next;return s},m.getTweensOf=function(t,e){var r,n,s=this._gc,a=[],o=0;for(s&&this._enabled(!0,!0),r=i.getTweensOf(t),n=r.length;--n>-1;)(r[n].timeline===this||e&&this._contains(r[n]))&&(a[o++]=r[n]);return s&&this._enabled(!1,!0),a},m.recent=function(){return this._recent},m._contains=function(t){for(var e=t.timeline;e;){if(e===this)return!0;e=e.timeline}return!1},m.shiftChildren=function(t,e,i){i=i||0;for(var r,n=this._first,s=this._labels;n;)n._startTime>=i&&(n._startTime+=t),n=n._next;if(e)for(r in s)s[r]>=i&&(s[r]+=t);return this._uncache(!0)},m._kill=function(t,e){if(!t&&!e)return this._enabled(!1,!1);for(var i=e?this.getTweensOf(e):this.getChildren(!0,!0,!1),r=i.length,n=!1;--r>-1;)i[r]._kill(t,e)&&(n=!0);return n},m.clear=function(t){var e=this.getChildren(!1,!0,!0),i=e.length;for(this._time=this._totalTime=0;--i>-1;)e[i]._enabled(!1,!1);return t!==!1&&(this._labels={}),this._uncache(!0)},m.invalidate=function(){for(var e=this._first;e;)e.invalidate(),e=e._next;return t.prototype.invalidate.call(this)},m._enabled=function(t,i){if(t===this._gc)for(var r=this._first;r;)r._enabled(t,!0),r=r._next;return e.prototype._enabled.call(this,t,i)},m.totalTime=function(e,i,r){this._forcingPlayhead=!0;var n=t.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,n},m.duration=function(t){return arguments.length?(0!==this.duration()&&0!==t&&this.timeScale(this._duration/t),this):(this._dirty&&this.totalDuration(),this._duration)},m.totalDuration=function(t){if(!arguments.length){if(this._dirty){for(var e,i,r=0,n=this._last,s=999999999999;n;)e=n._prev,n._dirty&&n.totalDuration(),n._startTime>s&&this._sortChildren&&!n._paused?this.add(n,n._startTime-n._delay):s=n._startTime,n._startTime<0&&!n._paused&&(r-=n._startTime,this._timeline.smoothChildTiming&&(this._startTime+=n._startTime/this._timeScale),this.shiftChildren(-n._startTime,!1,-9999999999),s=0),i=n._startTime+n._totalDuration/n._timeScale,i>r&&(r=i),n=e;this._duration=this._totalDuration=r,this._dirty=!1}return this._totalDuration}return t&&this.totalDuration()?this.timeScale(this._totalDuration/t):this},m.paused=function(e){if(!e)for(var i=this._first,r=this._time;i;)i._startTime===r&&"isPause"===i.data&&(i._rawPrevTime=0),i=i._next;return t.prototype.paused.apply(this,arguments)},m.usesFrames=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===t._rootFramesTimeline},m.rawTime=function(t){return t&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(t)-this._startTime)*this._timeScale},r},!0),_gsScope._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(t,e,i){var r=function(e){t.call(this,e),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0, this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._dirty=!0},n=1e-10,s=e._internals,a=s.lazyTweens,o=s.lazyRender,l=_gsScope._gsDefine.globals,h=new i(null,null,1,0),u=r.prototype=new t;return u.constructor=r,u.kill()._gc=!1,r.version="1.19.1",u.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),t.prototype.invalidate.call(this)},u.addCallback=function(t,i,r,n){return this.add(e.delayedCall(0,t,r,n),i)},u.removeCallback=function(t,e){if(t)if(null==e)this._kill(null,t);else for(var i=this.getTweensOf(t,!1),r=i.length,n=this._parseTimeOrLabel(e);--r>-1;)i[r]._startTime===n&&i[r]._enabled(!1,!1);return this},u.removePause=function(e){return this.removeCallback(t._internals.pauseCallback,e)},u.tweenTo=function(t,i){i=i||{};var r,n,s,a={ease:h,useFrames:this.usesFrames(),immediateRender:!1},o=i.repeat&&l.TweenMax||e;for(n in i)a[n]=i[n];return a.time=this._parseTimeOrLabel(t),r=Math.abs(Number(a.time)-this._time)/this._timeScale||.001,s=new o(this,r,a),a.onStart=function(){s.target.paused(!0),s.vars.time!==s.target.time()&&r===s.duration()&&s.duration(Math.abs(s.vars.time-s.target.time())/s.target._timeScale),i.onStart&&i.onStart.apply(i.onStartScope||i.callbackScope||s,i.onStartParams||[])},s},u.tweenFromTo=function(t,e,i){i=i||{},t=this._parseTimeOrLabel(t),i.startAt={onComplete:this.seek,onCompleteParams:[t],callbackScope:this},i.immediateRender=i.immediateRender!==!1;var r=this.tweenTo(e,i);return r.duration(Math.abs(r.vars.time-t)/this._timeScale||.001)},u.render=function(t,e,i){this._gc&&this._enabled(!0,!1);var r,s,l,h,u,c,d,f,p=this._dirty?this.totalDuration():this._totalDuration,_=this._duration,m=this._time,g=this._totalTime,v=this._startTime,y=this._timeScale,T=this._rawPrevTime,b=this._paused,x=this._cycle;if(t>=p-1e-7&&t>=0)this._locked||(this._totalTime=p,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(s=!0,h="onComplete",u=!!this._timeline.autoRemoveChildren,0===this._duration&&(t<=0&&t>=-1e-7||T<0||T===n)&&T!==t&&this._first&&(u=!0,T>n&&(h="onReverseComplete"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:n,this._yoyo&&0!==(1&this._cycle)?this._time=t=0:(this._time=_,t=_+1e-4);else if(t<1e-7)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(0!==m||0===_&&T!==n&&(T>0||t<0&&T>=0)&&!this._locked)&&(h="onReverseComplete",s=this._reversed),t<0)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(u=s=!0,h="onReverseComplete"):T>=0&&this._first&&(u=!0),this._rawPrevTime=t;else{if(this._rawPrevTime=_||!e||t||this._rawPrevTime===t?t:n,0===t&&s)for(r=this._first;r&&0===r._startTime;)r._duration||(s=!1),r=r._next;t=0,this._initted||(u=!0)}else if(0===_&&T<0&&(u=!0),this._time=this._rawPrevTime=t,this._locked||(this._totalTime=t,0!==this._repeat&&(c=_+this._repeatDelay,this._cycle=this._totalTime/c>>0,0!==this._cycle&&this._cycle===this._totalTime/c&&g<=t&&this._cycle--,this._time=this._totalTime-this._cycle*c,this._yoyo&&0!==(1&this._cycle)&&(this._time=_-this._time),this._time>_?(this._time=_,t=_+1e-4):this._time<0?this._time=t=0:t=this._time)),this._hasPause&&!this._forcingPlayhead&&!e&&t<_){if(t=this._time,t>=m||this._repeat&&x!==this._cycle)for(r=this._first;r&&r._startTime<=t&&!d;)r._duration||"isPause"!==r.data||r.ratio||0===r._startTime&&0===this._rawPrevTime||(d=r),r=r._next;else for(r=this._last;r&&r._startTime>=t&&!d;)r._duration||"isPause"===r.data&&r._rawPrevTime>0&&(d=r),r=r._prev;d&&(this._time=t=d._startTime,this._totalTime=t+this._cycle*(this._totalDuration+this._repeatDelay))}if(this._cycle!==x&&!this._locked){var w=this._yoyo&&0!==(1&x),E=w===(this._yoyo&&0!==(1&this._cycle)),S=this._totalTime,D=this._cycle,A=this._rawPrevTime,P=this._time;if(this._totalTime=x*_,this._cycle<x?w=!w:this._totalTime+=_,this._time=m,this._rawPrevTime=0===_?T-1e-4:T,this._cycle=x,this._locked=!0,m=w?0:_,this.render(m,e,0===_),e||this._gc||this.vars.onRepeat&&(this._cycle=D,this._locked=!1,this._callback("onRepeat")),m!==this._time)return;if(E&&(this._cycle=x,this._locked=!0,m=w?_+1e-4:-1e-4,this.render(m,!0,!1)),this._locked=!1,this._paused&&!b)return;this._time=P,this._totalTime=S,this._cycle=D,this._rawPrevTime=A}if(!(this._time!==m&&this._first||i||u||d))return void(g!==this._totalTime&&this._onUpdate&&(e||this._callback("onUpdate")));if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==g&&t>0&&(this._active=!0),0===g&&this.vars.onStart&&(0===this._totalTime&&this._totalDuration||e||this._callback("onStart")),f=this._time,f>=m)for(r=this._first;r&&(l=r._next,f===this._time&&(!this._paused||b));)(r._active||r._startTime<=this._time&&!r._paused&&!r._gc)&&(d===r&&this.pause(),r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(t-r._startTime)*r._timeScale,e,i):r.render((t-r._startTime)*r._timeScale,e,i)),r=l;else for(r=this._last;r&&(l=r._prev,f===this._time&&(!this._paused||b));){if(r._active||r._startTime<=m&&!r._paused&&!r._gc){if(d===r){for(d=r._prev;d&&d.endTime()>this._time;)d.render(d._reversed?d.totalDuration()-(t-d._startTime)*d._timeScale:(t-d._startTime)*d._timeScale,e,i),d=d._prev;d=null,this.pause()}r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(t-r._startTime)*r._timeScale,e,i):r.render((t-r._startTime)*r._timeScale,e,i)}r=l}this._onUpdate&&(e||(a.length&&o(),this._callback("onUpdate"))),h&&(this._locked||this._gc||v!==this._startTime&&y===this._timeScale||(0===this._time||p>=this.totalDuration())&&(s&&(a.length&&o(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[h]&&this._callback(h)))},u.getActive=function(t,e,i){null==t&&(t=!0),null==e&&(e=!0),null==i&&(i=!1);var r,n,s=[],a=this.getChildren(t,e,i),o=0,l=a.length;for(r=0;r<l;r++)n=a[r],n.isActive()&&(s[o++]=n);return s},u.getLabelAfter=function(t){t||0!==t&&(t=this._time);var e,i=this.getLabelsArray(),r=i.length;for(e=0;e<r;e++)if(i[e].time>t)return i[e].name;return null},u.getLabelBefore=function(t){null==t&&(t=this._time);for(var e=this.getLabelsArray(),i=e.length;--i>-1;)if(e[i].time<t)return e[i].name;return null},u.getLabelsArray=function(){var t,e=[],i=0;for(t in this._labels)e[i++]={time:this._labels[t],name:t};return e.sort(function(t,e){return t.time-e.time}),e},u.invalidate=function(){return this._locked=!1,t.prototype.invalidate.call(this)},u.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!==(1&this._cycle)?1-t:t)+this._cycle*(this._duration+this._repeatDelay),e):this._time/this.duration()},u.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this._totalTime/this.totalDuration()},u.totalDuration=function(e){return arguments.length?this._repeat!==-1&&e?this.timeScale(this.totalDuration()/e):this:(this._dirty&&(t.prototype.totalDuration.call(this),this._totalDuration=this._repeat===-1?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},u.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),t>this._duration&&(t=this._duration),this._yoyo&&0!==(1&this._cycle)?t=this._duration-t+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(t+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(t,e)):this._time},u.repeat=function(t){return arguments.length?(this._repeat=t,this._uncache(!0)):this._repeat},u.repeatDelay=function(t){return arguments.length?(this._repeatDelay=t,this._uncache(!0)):this._repeatDelay},u.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},u.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.getLabelBefore(this._time+1e-8)},r},!0),function(){var t=180/Math.PI,e=[],i=[],r=[],n={},s=_gsScope._gsDefine.globals,a=function(t,e,i,r){i===r&&(i=r-(r-e)/1e6),t===e&&(e=t+(i-t)/1e6),this.a=t,this.b=e,this.c=i,this.d=r,this.da=r-t,this.ca=i-t,this.ba=e-t},o=",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",l=function(t,e,i,r){var n={a:t},s={},a={},o={c:r},l=(t+e)/2,h=(e+i)/2,u=(i+r)/2,c=(l+h)/2,d=(h+u)/2,f=(d-c)/8;return n.b=l+(t-l)/4,s.b=c+f,n.c=s.a=(n.b+s.b)/2,s.c=a.a=(c+d)/2,a.b=d-f,o.b=u+(r-u)/4,a.c=o.a=(a.b+o.b)/2,[n,s,a,o]},h=function(t,n,s,a,o){var h,u,c,d,f,p,_,m,g,v,y,T,b,x=t.length-1,w=0,E=t[0].a;for(h=0;h<x;h++)f=t[w],u=f.a,c=f.d,d=t[w+1].d,o?(y=e[h],T=i[h],b=(T+y)*n*.25/(a?.5:r[h]||.5),p=c-(c-u)*(a?.5*n:0!==y?b/y:0),_=c+(d-c)*(a?.5*n:0!==T?b/T:0),m=c-(p+((_-p)*(3*y/(y+T)+.5)/4||0))):(p=c-(c-u)*n*.5,_=c+(d-c)*n*.5,m=c-(p+_)/2),p+=m,_+=m,f.c=g=p,0!==h?f.b=E:f.b=E=f.a+.6*(f.c-f.a),f.da=c-u,f.ca=g-u,f.ba=E-u,s?(v=l(u,E,g,c),t.splice(w,1,v[0],v[1],v[2],v[3]),w+=4):w++,E=_;f=t[w],f.b=E,f.c=E+.4*(f.d-E),f.da=f.d-f.a,f.ca=f.c-f.a,f.ba=E-f.a,s&&(v=l(f.a,E,f.c,f.d),t.splice(w,1,v[0],v[1],v[2],v[3]))},u=function(t,r,n,s){var o,l,h,u,c,d,f=[];if(s)for(t=[s].concat(t),l=t.length;--l>-1;)"string"==typeof(d=t[l][r])&&"="===d.charAt(1)&&(t[l][r]=s[r]+Number(d.charAt(0)+d.substr(2)));if(o=t.length-2,o<0)return f[0]=new a(t[0][r],0,0,t[o<-1?0:1][r]),f;for(l=0;l<o;l++)h=t[l][r],u=t[l+1][r],f[l]=new a(h,0,0,u),n&&(c=t[l+2][r],e[l]=(e[l]||0)+(u-h)*(u-h),i[l]=(i[l]||0)+(c-u)*(c-u));return f[l]=new a(t[l][r],0,0,t[l+1][r]),f},c=function(t,s,a,l,c,d){var f,p,_,m,g,v,y,T,b={},x=[],w=d||t[0];c="string"==typeof c?","+c+",":o,null==s&&(s=1);for(p in t[0])x.push(p);if(t.length>1){for(T=t[t.length-1],y=!0,f=x.length;--f>-1;)if(p=x[f],Math.abs(w[p]-T[p])>.05){y=!1;break}y&&(t=t.concat(),d&&t.unshift(d),t.push(t[1]),d=t[t.length-3])}for(e.length=i.length=r.length=0,f=x.length;--f>-1;)p=x[f],n[p]=c.indexOf(","+p+",")!==-1,b[p]=u(t,p,n[p],d);for(f=e.length;--f>-1;)e[f]=Math.sqrt(e[f]),i[f]=Math.sqrt(i[f]);if(!l){for(f=x.length;--f>-1;)if(n[p])for(_=b[x[f]],v=_.length-1,m=0;m<v;m++)g=_[m+1].da/i[m]+_[m].da/e[m]||0,r[m]=(r[m]||0)+g*g;for(f=r.length;--f>-1;)r[f]=Math.sqrt(r[f])}for(f=x.length,m=a?4:1;--f>-1;)p=x[f],_=b[p],h(_,s,a,l,n[p]),y&&(_.splice(0,m),_.splice(_.length-m,m));return b},d=function(t,e,i){e=e||"soft";var r,n,s,o,l,h,u,c,d,f,p,_={},m="cubic"===e?3:2,g="soft"===e,v=[];if(g&&i&&(t=[i].concat(t)),null==t||t.length<m+1)throw"invalid Bezier data";for(d in t[0])v.push(d);for(h=v.length;--h>-1;){for(d=v[h],_[d]=l=[],f=0,c=t.length,u=0;u<c;u++)r=null==i?t[u][d]:"string"==typeof(p=t[u][d])&&"="===p.charAt(1)?i[d]+Number(p.charAt(0)+p.substr(2)):Number(p),g&&u>1&&u<c-1&&(l[f++]=(r+l[f-2])/2),l[f++]=r;for(c=f-m+1,f=0,u=0;u<c;u+=m)r=l[u],n=l[u+1],s=l[u+2],o=2===m?0:l[u+3],l[f++]=p=3===m?new a(r,n,s,o):new a(r,(2*n+r)/3,(2*n+s)/3,s);l.length=f}return _},f=function(t,e,i){for(var r,n,s,a,o,l,h,u,c,d,f,p=1/i,_=t.length;--_>-1;)for(d=t[_],s=d.a,a=d.d-s,o=d.c-s,l=d.b-s,r=n=0,u=1;u<=i;u++)h=p*u,c=1-h,r=n-(n=(h*h*a+3*c*(h*o+c*l))*h),f=_*i+u-1,e[f]=(e[f]||0)+r*r},p=function(t,e){e=e>>0||6;var i,r,n,s,a=[],o=[],l=0,h=0,u=e-1,c=[],d=[];for(i in t)f(t[i],a,e);for(n=a.length,r=0;r<n;r++)l+=Math.sqrt(a[r]),s=r%e,d[s]=l,s===u&&(h+=l,s=r/e>>0,c[s]=d,o[s]=h,l=0,d=[]);return{length:h,lengths:o,segments:c}},_=_gsScope._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.7",API:2,global:!0,init:function(t,e,i){this._target=t,e instanceof Array&&(e={values:e}),this._func={},this._mod={},this._props=[],this._timeRes=null==e.timeResolution?6:parseInt(e.timeResolution,10);var r,n,s,a,o,l=e.values||[],h={},u=l[0],f=e.autoRotate||i.vars.orientToBezier;this._autoRotate=f?f instanceof Array?f:[["x","y","rotation",f===!0?0:Number(f)||0]]:null;for(r in u)this._props.push(r);for(s=this._props.length;--s>-1;)r=this._props[s],this._overwriteProps.push(r),n=this._func[r]="function"==typeof t[r],h[r]=n?t[r.indexOf("set")||"function"!=typeof t["get"+r.substr(3)]?r:"get"+r.substr(3)]():parseFloat(t[r]),o||h[r]!==l[0][r]&&(o=h);if(this._beziers="cubic"!==e.type&&"quadratic"!==e.type&&"soft"!==e.type?c(l,isNaN(e.curviness)?1:e.curviness,!1,"thruBasic"===e.type,e.correlate,o):d(l,e.type,h),this._segCount=this._beziers[r].length,this._timeRes){var _=p(this._beziers,this._timeRes);this._length=_.length,this._lengths=_.lengths,this._segments=_.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length}if(f=this._autoRotate)for(this._initialRotations=[],f[0]instanceof Array||(this._autoRotate=f=[f]),s=f.length;--s>-1;){for(a=0;a<3;a++)r=f[s][a],this._func[r]="function"==typeof t[r]&&t[r.indexOf("set")||"function"!=typeof t["get"+r.substr(3)]?r:"get"+r.substr(3)];r=f[s][2],this._initialRotations[s]=(this._func[r]?this._func[r].call(this._target):this._target[r])||0,this._overwriteProps.push(r)}return this._startRatio=i.vars.runBackwards?1:0,!0},set:function(e){var i,r,n,s,a,o,l,h,u,c,d=this._segCount,f=this._func,p=this._target,_=e!==this._startRatio;if(this._timeRes){if(u=this._lengths,c=this._curSeg,e*=this._length,n=this._li,e>this._l2&&n<d-1){for(h=d-1;n<h&&(this._l2=u[++n])<=e;);this._l1=u[n-1],this._li=n,this._curSeg=c=this._segments[n],this._s2=c[this._s1=this._si=0]}else if(e<this._l1&&n>0){for(;n>0&&(this._l1=u[--n])>=e;);0===n&&e<this._l1?this._l1=0:n++,this._l2=u[n],this._li=n,this._curSeg=c=this._segments[n],this._s1=c[(this._si=c.length-1)-1]||0,this._s2=c[this._si]}if(i=n,e-=this._l1,n=this._si,e>this._s2&&n<c.length-1){for(h=c.length-1;n<h&&(this._s2=c[++n])<=e;);this._s1=c[n-1],this._si=n}else if(e<this._s1&&n>0){for(;n>0&&(this._s1=c[--n])>=e;);0===n&&e<this._s1?this._s1=0:n++,this._s2=c[n],this._si=n}o=(n+(e-this._s1)/(this._s2-this._s1))*this._prec||0}else i=e<0?0:e>=1?d-1:d*e>>0,o=(e-i*(1/d))*d;for(r=1-o,n=this._props.length;--n>-1;)s=this._props[n],a=this._beziers[s][i],l=(o*o*a.da+3*r*(o*a.ca+r*a.ba))*o+a.a,this._mod[s]&&(l=this._mod[s](l,p)),f[s]?p[s](l):p[s]=l;if(this._autoRotate){var m,g,v,y,T,b,x,w=this._autoRotate;for(n=w.length;--n>-1;)s=w[n][2],b=w[n][3]||0,x=w[n][4]===!0?1:t,a=this._beziers[w[n][0]],m=this._beziers[w[n][1]],a&&m&&(a=a[i],m=m[i],g=a.a+(a.b-a.a)*o,y=a.b+(a.c-a.b)*o,g+=(y-g)*o,y+=(a.c+(a.d-a.c)*o-y)*o,v=m.a+(m.b-m.a)*o,T=m.b+(m.c-m.b)*o,v+=(T-v)*o,T+=(m.c+(m.d-m.c)*o-T)*o,l=_?Math.atan2(T-v,y-g)*x+b:this._initialRotations[n],this._mod[s]&&(l=this._mod[s](l,p)),f[s]?p[s](l):p[s]=l)}}}),m=_.prototype;_.bezierThrough=c,_.cubicToQuadratic=l,_._autoCSS=!0,_.quadraticToCubic=function(t,e,i){return new a(t,(2*e+t)/3,(2*e+i)/3,i)},_._cssRegister=function(){var t=s.CSSPlugin;if(t){var e=t._internals,i=e._parseToProxy,r=e._setPluginRatio,n=e.CSSPropTween;e._registerComplexSpecialProp("bezier",{parser:function(t,e,s,a,o,l){e instanceof Array&&(e={values:e}),l=new _;var h,u,c,d=e.values,f=d.length-1,p=[],m={};if(f<0)return o;for(h=0;h<=f;h++)c=i(t,d[h],a,o,l,f!==h),p[h]=c.end;for(u in e)m[u]=e[u];return m.values=p,o=new n(t,"bezier",0,0,c.pt,2),o.data=c,o.plugin=l,o.setRatio=r,0===m.autoRotate&&(m.autoRotate=!0),!m.autoRotate||m.autoRotate instanceof Array||(h=m.autoRotate===!0?0:Number(m.autoRotate),m.autoRotate=null!=c.end.left?[["left","top","rotation",h,!1]]:null!=c.end.x&&[["x","y","rotation",h,!1]]),m.autoRotate&&(a._transform||a._enableTransforms(!1),c.autoRotate=a._target._gsTransform,c.proxy.rotation=c.autoRotate.rotation||0,a._overwriteProps.push("rotation")),l._onInitTween(c.proxy,m,a._tween),o}})}},m._mod=function(t){for(var e,i=this._overwriteProps,r=i.length;--r>-1;)e=t[i[r]],e&&"function"==typeof e&&(this._mod[i[r]]=e)},m._kill=function(t){var e,i,r=this._props;for(e in this._beziers)if(e in t)for(delete this._beziers[e],delete this._func[e],i=r.length;--i>-1;)r[i]===e&&r.splice(i,1);if(r=this._autoRotate)for(i=r.length;--i>-1;)t[r[i][2]]&&r.splice(i,1);return this._super._kill.call(this,t)}}(),_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(t,e){var i,r,n,s,a=function(){t.call(this,"css"),this._overwriteProps.length=0,this.setRatio=a.prototype.setRatio},o=_gsScope._gsDefine.globals,l={},h=a.prototype=new t("css");h.constructor=a,a.version="1.19.1",a.API=2,a.defaultTransformPerspective=0,a.defaultSkewType="compensated",a.defaultSmoothOrigin=!0,h="px",a.suffixMap={top:h,right:h,bottom:h,left:h,width:h,height:h,fontSize:h,padding:h,margin:h,perspective:h,lineHeight:""};var u,c,d,f,p,_,m,g,v=/(?:\-|\.|\b)(\d|\.|e\-)+/g,y=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,T=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,b=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,x=/(?:\d|\-|\+|=|#|\.)*/g,w=/opacity *= *([^)]*)/i,E=/opacity:([^;]*)/i,S=/alpha\(opacity *=.+?\)/i,D=/^(rgb|hsl)/,A=/([A-Z])/g,P=/-([a-z])/gi,O=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,C=function(t,e){return e.toUpperCase()},M=/(?:Left|Right|Width)/i,L=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,R=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,I=/,(?=[^\)]*(?:\(|$))/gi,N=/[\s,\(]/i,j=Math.PI/180,F=180/Math.PI,B={},k={style:{}},U=_gsScope.document||{createElement:function(){return k}},X=function(t,e){return U.createElementNS?U.createElementNS(e||"http://www.w3.org/1999/xhtml",t):U.createElement(t)},H=X("div"),V=X("img"),Y=a._internals={_specialProps:l},G=(_gsScope.navigator||{}).userAgent||"",W=function(){var t=G.indexOf("Android"),e=X("a");return d=G.indexOf("Safari")!==-1&&G.indexOf("Chrome")===-1&&(t===-1||parseFloat(G.substr(t+8,2))>3),p=d&&parseFloat(G.substr(G.indexOf("Version/")+8,2))<6,f=G.indexOf("Firefox")!==-1,(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(G)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(G))&&(_=parseFloat(RegExp.$1)),!!e&&(e.style.cssText="top:1px;opacity:.55;",/^0.55/.test(e.style.opacity))}(),q=function(t){return w.test("string"==typeof t?t:(t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?parseFloat(RegExp.$1)/100:1},z=function(t){_gsScope.console&&console.log(t)},Z="",J="",K=function(t,e){e=e||H;var i,r,n=e.style;if(void 0!==n[t])return t;for(t=t.charAt(0).toUpperCase()+t.substr(1),i=["O","Moz","ms","Ms","Webkit"],r=5;--r>-1&&void 0===n[i[r]+t];);return r>=0?(J=3===r?"ms":i[r],Z="-"+J.toLowerCase()+"-",J+t):null},Q=U.defaultView?U.defaultView.getComputedStyle:function(){},$=a.getStyle=function(t,e,i,r,n){var s;return W||"opacity"!==e?(!r&&t.style[e]?s=t.style[e]:(i=i||Q(t))?s=i[e]||i.getPropertyValue(e)||i.getPropertyValue(e.replace(A,"-$1").toLowerCase()):t.currentStyle&&(s=t.currentStyle[e]),null==n||s&&"none"!==s&&"auto"!==s&&"auto auto"!==s?s:n):q(t)},tt=Y.convertToPixels=function(t,i,r,n,s){if("px"===n||!n)return r;if("auto"===n||!r)return 0;var o,l,h,u=M.test(i),c=t,d=H.style,f=r<0,p=1===r;if(f&&(r=-r),p&&(r*=100),"%"===n&&i.indexOf("border")!==-1)o=r/100*(u?t.clientWidth:t.clientHeight);else{if(d.cssText="border:0 solid red;position:"+$(t,"position")+";line-height:0;","%"!==n&&c.appendChild&&"v"!==n.charAt(0)&&"rem"!==n)d[u?"borderLeftWidth":"borderTopWidth"]=r+n;else{if(c=t.parentNode||U.body,l=c._gsCache,h=e.ticker.frame,l&&u&&l.time===h)return l.width*r/100;d[u?"width":"height"]=r+n}c.appendChild(H),o=parseFloat(H[u?"offsetWidth":"offsetHeight"]),c.removeChild(H),u&&"%"===n&&a.cacheWidths!==!1&&(l=c._gsCache=c._gsCache||{},l.time=h,l.width=o/r*100),0!==o||s||(o=tt(t,i,r,n,!0))}return p&&(o/=100),f?-o:o},et=Y.calculateOffset=function(t,e,i){if("absolute"!==$(t,"position",i))return 0;var r="left"===e?"Left":"Top",n=$(t,"margin"+r,i);return t["offset"+r]-(tt(t,e,parseFloat(n),n.replace(x,""))||0)},it=function(t,e){var i,r,n,s={};if(e=e||Q(t,null))if(i=e.length)for(;--i>-1;)n=e[i],n.indexOf("-transform")!==-1&&Ot!==n||(s[n.replace(P,C)]=e.getPropertyValue(n));else for(i in e)i.indexOf("Transform")!==-1&&Pt!==i||(s[i]=e[i]);else if(e=t.currentStyle||t.style)for(i in e)"string"==typeof i&&void 0===s[i]&&(s[i.replace(P,C)]=e[i]);return W||(s.opacity=q(t)),r=Vt(t,e,!1),s.rotation=r.rotation,s.skewX=r.skewX,s.scaleX=r.scaleX,s.scaleY=r.scaleY,s.x=r.x,s.y=r.y,Mt&&(s.z=r.z,s.rotationX=r.rotationX,s.rotationY=r.rotationY,s.scaleZ=r.scaleZ),s.filters&&delete s.filters,s},rt=function(t,e,i,r,n){var s,a,o,l={},h=t.style;for(a in i)"cssText"!==a&&"length"!==a&&isNaN(a)&&(e[a]!==(s=i[a])||n&&n[a])&&a.indexOf("Origin")===-1&&("number"!=typeof s&&"string"!=typeof s||(l[a]="auto"!==s||"left"!==a&&"top"!==a?""!==s&&"auto"!==s&&"none"!==s||"string"!=typeof e[a]||""===e[a].replace(b,"")?s:0:et(t,a),void 0!==h[a]&&(o=new vt(h,a,h[a],o))));if(r)for(a in r)"className"!==a&&(l[a]=r[a]);return{difs:l,firstMPT:o}},nt={width:["Left","Right"],height:["Top","Bottom"]},st=["marginLeft","marginRight","marginTop","marginBottom"],at=function(t,e,i){if("svg"===(t.nodeName+"").toLowerCase())return(i||Q(t))[e]||0;if(t.getCTM&&Ut(t))return t.getBBox()[e]||0;var r=parseFloat("width"===e?t.offsetWidth:t.offsetHeight),n=nt[e],s=n.length;for(i=i||Q(t,null);--s>-1;)r-=parseFloat($(t,"padding"+n[s],i,!0))||0,r-=parseFloat($(t,"border"+n[s]+"Width",i,!0))||0;return r},ot=function(t,e){if("contain"===t||"auto"===t||"auto auto"===t)return t+" ";null!=t&&""!==t||(t="0 0");var i,r=t.split(" "),n=t.indexOf("left")!==-1?"0%":t.indexOf("right")!==-1?"100%":r[0],s=t.indexOf("top")!==-1?"0%":t.indexOf("bottom")!==-1?"100%":r[1];if(r.length>3&&!e){for(r=t.split(", ").join(",").split(","),t=[],i=0;i<r.length;i++)t.push(ot(r[i]));return t.join(",")}return null==s?s="center"===n?"50%":"0":"center"===s&&(s="50%"),("center"===n||isNaN(parseFloat(n))&&(n+"").indexOf("=")===-1)&&(n="50%"),t=n+" "+s+(r.length>2?" "+r[2]:""),e&&(e.oxp=n.indexOf("%")!==-1,e.oyp=s.indexOf("%")!==-1,e.oxr="="===n.charAt(1),e.oyr="="===s.charAt(1),e.ox=parseFloat(n.replace(b,"")),e.oy=parseFloat(s.replace(b,"")),e.v=t),e||t},lt=function(t,e){return"function"==typeof t&&(t=t(g,m)),"string"==typeof t&&"="===t.charAt(1)?parseInt(t.charAt(0)+"1",10)*parseFloat(t.substr(2)):parseFloat(t)-parseFloat(e)||0},ht=function(t,e){return"function"==typeof t&&(t=t(g,m)),null==t?e:"string"==typeof t&&"="===t.charAt(1)?parseInt(t.charAt(0)+"1",10)*parseFloat(t.substr(2))+e:parseFloat(t)||0},ut=function(t,e,i,r){var n,s,a,o,l,h=1e-6;return"function"==typeof t&&(t=t(g,m)),null==t?o=e:"number"==typeof t?o=t:(n=360,s=t.split("_"),l="="===t.charAt(1),a=(l?parseInt(t.charAt(0)+"1",10)*parseFloat(s[0].substr(2)):parseFloat(s[0]))*(t.indexOf("rad")===-1?1:F)-(l?0:e),s.length&&(r&&(r[i]=e+a),t.indexOf("short")!==-1&&(a%=n,a!==a%(n/2)&&(a=a<0?a+n:a-n)),t.indexOf("_cw")!==-1&&a<0?a=(a+9999999999*n)%n-(a/n|0)*n:t.indexOf("ccw")!==-1&&a>0&&(a=(a-9999999999*n)%n-(a/n|0)*n)),o=e+a),o<h&&o>-h&&(o=0),o},ct={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},dt=function(t,e,i){return t=t<0?t+1:t>1?t-1:t,255*(6*t<1?e+(i-e)*t*6:t<.5?i:3*t<2?e+(i-e)*(2/3-t)*6:e)+.5|0},ft=a.parseColor=function(t,e){var i,r,n,s,a,o,l,h,u,c,d;if(t)if("number"==typeof t)i=[t>>16,t>>8&255,255&t];else{if(","===t.charAt(t.length-1)&&(t=t.substr(0,t.length-1)),ct[t])i=ct[t];else if("#"===t.charAt(0))4===t.length&&(r=t.charAt(1),n=t.charAt(2),s=t.charAt(3),t="#"+r+r+n+n+s+s),t=parseInt(t.substr(1),16),i=[t>>16,t>>8&255,255&t];else if("hsl"===t.substr(0,3))if(i=d=t.match(v),e){if(t.indexOf("=")!==-1)return t.match(y)}else a=Number(i[0])%360/360,o=Number(i[1])/100,l=Number(i[2])/100,n=l<=.5?l*(o+1):l+o-l*o,r=2*l-n,i.length>3&&(i[3]=Number(t[3])),i[0]=dt(a+1/3,r,n),i[1]=dt(a,r,n),i[2]=dt(a-1/3,r,n);else i=t.match(v)||ct.transparent;i[0]=Number(i[0]),i[1]=Number(i[1]),i[2]=Number(i[2]),i.length>3&&(i[3]=Number(i[3]))}else i=ct.black;return e&&!d&&(r=i[0]/255,n=i[1]/255,s=i[2]/255,h=Math.max(r,n,s),u=Math.min(r,n,s),l=(h+u)/2,h===u?a=o=0:(c=h-u,o=l>.5?c/(2-h-u):c/(h+u),a=h===r?(n-s)/c+(n<s?6:0):h===n?(s-r)/c+2:(r-n)/c+4,a*=60),i[0]=a+.5|0,i[1]=100*o+.5|0,i[2]=100*l+.5|0),i},pt=function(t,e){var i,r,n,s=t.match(_t)||[],a=0,o=s.length?"":t;for(i=0;i<s.length;i++)r=s[i],n=t.substr(a,t.indexOf(r,a)-a),a+=n.length+r.length,r=ft(r,e),3===r.length&&r.push(1),o+=n+(e?"hsla("+r[0]+","+r[1]+"%,"+r[2]+"%,"+r[3]:"rgba("+r.join(","))+")";return o+t.substr(a)},_t="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(h in ct)_t+="|"+h+"\\b";_t=new RegExp(_t+")","gi"),a.colorStringFilter=function(t){var e,i=t[0]+t[1];_t.test(i)&&(e=i.indexOf("hsl(")!==-1||i.indexOf("hsla(")!==-1,t[0]=pt(t[0],e),t[1]=pt(t[1],e)),_t.lastIndex=0},e.defaultStringFilter||(e.defaultStringFilter=a.colorStringFilter);var mt=function(t,e,i,r){if(null==t)return function(t){return t};var n,s=e?(t.match(_t)||[""])[0]:"",a=t.split(s).join("").match(T)||[],o=t.substr(0,t.indexOf(a[0])),l=")"===t.charAt(t.length-1)?")":"",h=t.indexOf(" ")!==-1?" ":",",u=a.length,c=u>0?a[0].replace(v,""):"";return u?n=e?function(t){var e,d,f,p;if("number"==typeof t)t+=c;else if(r&&I.test(t)){for(p=t.replace(I,"|").split("|"),f=0;f<p.length;f++)p[f]=n(p[f]);return p.join(",")}if(e=(t.match(_t)||[s])[0],d=t.split(e).join("").match(T)||[],f=d.length,u>f--)for(;++f<u;)d[f]=i?d[(f-1)/2|0]:a[f];return o+d.join(h)+h+e+l+(t.indexOf("inset")!==-1?" inset":"")}:function(t){var e,s,d;if("number"==typeof t)t+=c;else if(r&&I.test(t)){for(s=t.replace(I,"|").split("|"),d=0;d<s.length;d++)s[d]=n(s[d]);return s.join(",")}if(e=t.match(T)||[],d=e.length,u>d--)for(;++d<u;)e[d]=i?e[(d-1)/2|0]:a[d];return o+e.join(h)+l}:function(t){return t}},gt=function(t){return t=t.split(","),function(e,i,r,n,s,a,o){var l,h=(i+"").split(" ");for(o={},l=0;l<4;l++)o[t[l]]=h[l]=h[l]||h[(l-1)/2>>0];return n.parse(e,o,s,a)}},vt=(Y._setPluginRatio=function(t){this.plugin.setRatio(t);for(var e,i,r,n,s,a=this.data,o=a.proxy,l=a.firstMPT,h=1e-6;l;)e=o[l.v],l.r?e=Math.round(e):e<h&&e>-h&&(e=0),l.t[l.p]=e,l=l._next;if(a.autoRotate&&(a.autoRotate.rotation=a.mod?a.mod(o.rotation,this.t):o.rotation),1===t||0===t)for(l=a.firstMPT,s=1===t?"e":"b";l;){if(i=l.t,i.type){if(1===i.type){for(n=i.xs0+i.s+i.xs1,r=1;r<i.l;r++)n+=i["xn"+r]+i["xs"+(r+1)];i[s]=n}}else i[s]=i.s+i.xs0;l=l._next}},function(t,e,i,r,n){this.t=t,this.p=e,this.v=i,this.r=n,r&&(r._prev=this,this._next=r)}),yt=(Y._parseToProxy=function(t,e,i,r,n,s){var a,o,l,h,u,c=r,d={},f={},p=i._transform,_=B;for(i._transform=null,B=e,r=u=i.parse(t,e,r,n),B=_,s&&(i._transform=p,c&&(c._prev=null,c._prev&&(c._prev._next=null)));r&&r!==c;){if(r.type<=1&&(o=r.p,f[o]=r.s+r.c,d[o]=r.s,s||(h=new vt(r,"s",o,h,r.r),r.c=0),1===r.type))for(a=r.l;--a>0;)l="xn"+a,o=r.p+"_"+l,f[o]=r.data[l],d[o]=r[l],s||(h=new vt(r,l,o,h,r.rxp[l]));r=r._next}return{proxy:d,end:f,firstMPT:h,pt:u}},Y.CSSPropTween=function(t,e,r,n,a,o,l,h,u,c,d){this.t=t,this.p=e,this.s=r,this.c=n,this.n=l||e,t instanceof yt||s.push(this.n),this.r=h,this.type=o||0,u&&(this.pr=u,i=!0),this.b=void 0===c?r:c,this.e=void 0===d?r+n:d,a&&(this._next=a,a._prev=this)}),Tt=function(t,e,i,r,n,s){var a=new yt(t,e,i,r-i,n,-1,s);return a.b=i,a.e=a.xs0=r,a},bt=a.parseComplex=function(t,e,i,r,n,s,o,l,h,c){i=i||s||"","function"==typeof r&&(r=r(g,m)),o=new yt(t,e,0,0,o,c?2:1,null,!1,l,i,r),r+="",n&&_t.test(r+i)&&(r=[i,r],a.colorStringFilter(r),i=r[0],r=r[1]);var d,f,p,_,T,b,x,w,E,S,D,A,P,O=i.split(", ").join(",").split(" "),C=r.split(", ").join(",").split(" "),M=O.length,L=u!==!1;for(r.indexOf(",")===-1&&i.indexOf(",")===-1||(O=O.join(" ").replace(I,", ").split(" "),C=C.join(" ").replace(I,", ").split(" "),M=O.length),M!==C.length&&(O=(s||"").split(" "),M=O.length),o.plugin=h,o.setRatio=c,_t.lastIndex=0,d=0;d<M;d++)if(_=O[d],T=C[d],w=parseFloat(_),w||0===w)o.appendXtra("",w,lt(T,w),T.replace(y,""),L&&T.indexOf("px")!==-1,!0);else if(n&&_t.test(_))A=T.indexOf(")")+1,A=")"+(A?T.substr(A):""),P=T.indexOf("hsl")!==-1&&W,_=ft(_,P),T=ft(T,P),E=_.length+T.length>6,E&&!W&&0===T[3]?(o["xs"+o.l]+=o.l?" transparent":"transparent",o.e=o.e.split(C[d]).join("transparent")):(W||(E=!1),P?o.appendXtra(E?"hsla(":"hsl(",_[0],lt(T[0],_[0]),",",!1,!0).appendXtra("",_[1],lt(T[1],_[1]),"%,",!1).appendXtra("",_[2],lt(T[2],_[2]),E?"%,":"%"+A,!1):o.appendXtra(E?"rgba(":"rgb(",_[0],T[0]-_[0],",",!0,!0).appendXtra("",_[1],T[1]-_[1],",",!0).appendXtra("",_[2],T[2]-_[2],E?",":A,!0),E&&(_=_.length<4?1:_[3],o.appendXtra("",_,(T.length<4?1:T[3])-_,A,!1))),_t.lastIndex=0;else if(b=_.match(v)){if(x=T.match(y),!x||x.length!==b.length)return o;for(p=0,f=0;f<b.length;f++)D=b[f],S=_.indexOf(D,p),o.appendXtra(_.substr(p,S-p),Number(D),lt(x[f],D),"",L&&"px"===_.substr(S+D.length,2),0===f),p=S+D.length;o["xs"+o.l]+=_.substr(p)}else o["xs"+o.l]+=o.l||o["xs"+o.l]?" "+T:T;if(r.indexOf("=")!==-1&&o.data){for(A=o.xs0+o.data.s,d=1;d<o.l;d++)A+=o["xs"+d]+o.data["xn"+d];o.e=A+o["xs"+d]}return o.l||(o.type=-1,o.xs0=o.e),o.xfirst||o},xt=9;for(h=yt.prototype,h.l=h.pr=0;--xt>0;)h["xn"+xt]=0,h["xs"+xt]="";h.xs0="",h._next=h._prev=h.xfirst=h.data=h.plugin=h.setRatio=h.rxp=null,h.appendXtra=function(t,e,i,r,n,s){var a=this,o=a.l;return a["xs"+o]+=s&&(o||a["xs"+o])?" "+t:t||"",i||0===o||a.plugin?(a.l++,a.type=a.setRatio?2:1,a["xs"+a.l]=r||"",o>0?(a.data["xn"+o]=e+i,a.rxp["xn"+o]=n,a["xn"+o]=e,a.plugin||(a.xfirst=new yt(a,"xn"+o,e,i,a.xfirst||a,0,a.n,n,a.pr),a.xfirst.xs0=0),a):(a.data={s:e+i},a.rxp={},a.s=e,a.c=i,a.r=n,a)):(a["xs"+o]+=e+(r||""),a)};var wt=function(t,e){e=e||{},this.p=e.prefix?K(t)||t:t,l[t]=l[this.p]=this,this.format=e.formatter||mt(e.defaultValue,e.color,e.collapsible,e.multi),e.parser&&(this.parse=e.parser),this.clrs=e.color,this.multi=e.multi,this.keyword=e.keyword,this.dflt=e.defaultValue,this.pr=e.priority||0},Et=Y._registerComplexSpecialProp=function(t,e,i){"object"!=typeof e&&(e={parser:i});var r,n,s=t.split(","),a=e.defaultValue;for(i=i||[a],r=0;r<s.length;r++)e.prefix=0===r&&e.prefix,e.defaultValue=i[r]||a,n=new wt(s[r],e)},St=Y._registerPluginProp=function(t){if(!l[t]){var e=t.charAt(0).toUpperCase()+t.substr(1)+"Plugin";Et(t,{parser:function(t,i,r,n,s,a,h){var u=o.com.greensock.plugins[e];return u?(u._cssRegister(),l[r].parse(t,i,r,n,s,a,h)):(z("Error: "+e+" js file not loaded."),s)}})}};h=wt.prototype,h.parseComplex=function(t,e,i,r,n,s){var a,o,l,h,u,c,d=this.keyword;if(this.multi&&(I.test(i)||I.test(e)?(o=e.replace(I,"|").split("|"),l=i.replace(I,"|").split("|")):d&&(o=[e],l=[i])),l){for(h=l.length>o.length?l.length:o.length,a=0;a<h;a++)e=o[a]=o[a]||this.dflt,i=l[a]=l[a]||this.dflt,d&&(u=e.indexOf(d),c=i.indexOf(d),u!==c&&(c===-1?o[a]=o[a].split(d).join(""):u===-1&&(o[a]+=" "+d)));e=o.join(", "),i=l.join(", ")}return bt(t,this.p,e,i,this.clrs,this.dflt,r,this.pr,n,s)},h.parse=function(t,e,i,r,s,a,o){return this.parseComplex(t.style,this.format($(t,this.p,n,!1,this.dflt)),this.format(e),s,a)},a.registerSpecialProp=function(t,e,i){Et(t,{parser:function(t,r,n,s,a,o,l){var h=new yt(t,n,0,0,a,2,n,!1,i);return h.plugin=o,h.setRatio=e(t,r,s._tween,n),h},priority:i})},a.useSVGTransformAttr=!0;var Dt,At="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),Pt=K("transform"),Ot=Z+"transform",Ct=K("transformOrigin"),Mt=null!==K("perspective"),Lt=Y.Transform=function(){this.perspective=parseFloat(a.defaultTransformPerspective)||0,this.force3D=!(a.defaultForce3D===!1||!Mt)&&(a.defaultForce3D||"auto")},Rt=_gsScope.SVGElement,It=function(t,e,i){var r,n=U.createElementNS("http://www.w3.org/2000/svg",t),s=/([a-z])([A-Z])/g;for(r in i)n.setAttributeNS(null,r.replace(s,"$1-$2").toLowerCase(),i[r]);return e.appendChild(n),n},Nt=U.documentElement||{},jt=function(){var t,e,i,r=_||/Android/i.test(G)&&!_gsScope.chrome;return U.createElementNS&&!r&&(t=It("svg",Nt),e=It("rect",t,{width:100,height:50,x:100}),i=e.getBoundingClientRect().width,e.style[Ct]="50% 50%",e.style[Pt]="scaleX(0.5)",r=i===e.getBoundingClientRect().width&&!(f&&Mt),Nt.removeChild(t)),r}(),Ft=function(t,e,i,r,n,s){var o,l,h,u,c,d,f,p,_,m,g,v,y,T,b=t._gsTransform,x=Ht(t,!0);b&&(y=b.xOrigin,T=b.yOrigin),(!r||(o=r.split(" ")).length<2)&&(f=t.getBBox(),0===f.x&&0===f.y&&f.width+f.height===0&&(f={x:parseFloat(t.hasAttribute("x")?t.getAttribute("x"):t.hasAttribute("cx")?t.getAttribute("cx"):0)||0, y:parseFloat(t.hasAttribute("y")?t.getAttribute("y"):t.hasAttribute("cy")?t.getAttribute("cy"):0)||0,width:0,height:0}),e=ot(e).split(" "),o=[(e[0].indexOf("%")!==-1?parseFloat(e[0])/100*f.width:parseFloat(e[0]))+f.x,(e[1].indexOf("%")!==-1?parseFloat(e[1])/100*f.height:parseFloat(e[1]))+f.y]),i.xOrigin=u=parseFloat(o[0]),i.yOrigin=c=parseFloat(o[1]),r&&x!==Xt&&(d=x[0],f=x[1],p=x[2],_=x[3],m=x[4],g=x[5],v=d*_-f*p,v&&(l=u*(_/v)+c*(-p/v)+(p*g-_*m)/v,h=u*(-f/v)+c*(d/v)-(d*g-f*m)/v,u=i.xOrigin=o[0]=l,c=i.yOrigin=o[1]=h)),b&&(s&&(i.xOffset=b.xOffset,i.yOffset=b.yOffset,b=i),n||n!==!1&&a.defaultSmoothOrigin!==!1?(l=u-y,h=c-T,b.xOffset+=l*x[0]+h*x[2]-l,b.yOffset+=l*x[1]+h*x[3]-h):b.xOffset=b.yOffset=0),s||t.setAttribute("data-svg-origin",o.join(" "))},Bt=function(t){var e,i=X("svg",this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=this.parentNode,n=this.nextSibling,s=this.style.cssText;if(Nt.appendChild(i),i.appendChild(this),this.style.display="block",t)try{e=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=Bt}catch(t){}else this._originalGetBBox&&(e=this._originalGetBBox());return n?r.insertBefore(this,n):r.appendChild(this),Nt.removeChild(i),this.style.cssText=s,e},kt=function(t){try{return t.getBBox()}catch(e){return Bt.call(t,!0)}},Ut=function(t){return!(!(Rt&&t.getCTM&&kt(t))||t.parentNode&&!t.ownerSVGElement)},Xt=[1,0,0,1,0,0],Ht=function(t,e){var i,r,n,s,a,o,l=t._gsTransform||new Lt,h=1e5,u=t.style;if(Pt?r=$(t,Ot,null,!0):t.currentStyle&&(r=t.currentStyle.filter.match(L),r=r&&4===r.length?[r[0].substr(4),Number(r[2].substr(4)),Number(r[1].substr(4)),r[3].substr(4),l.x||0,l.y||0].join(","):""),i=!r||"none"===r||"matrix(1, 0, 0, 1, 0, 0)"===r,i&&Pt&&((o="none"===Q(t).display)||!t.parentNode)&&(o&&(s=u.display,u.display="block"),t.parentNode||(a=1,Nt.appendChild(t)),r=$(t,Ot,null,!0),i=!r||"none"===r||"matrix(1, 0, 0, 1, 0, 0)"===r,s?u.display=s:o&&qt(u,"display"),a&&Nt.removeChild(t)),(l.svg||t.getCTM&&Ut(t))&&(i&&(u[Pt]+"").indexOf("matrix")!==-1&&(r=u[Pt],i=0),n=t.getAttribute("transform"),i&&n&&(n.indexOf("matrix")!==-1?(r=n,i=0):n.indexOf("translate")!==-1&&(r="matrix(1,0,0,1,"+n.match(/(?:\-|\b)[\d\-\.e]+\b/gi).join(",")+")",i=0))),i)return Xt;for(n=(r||"").match(v)||[],xt=n.length;--xt>-1;)s=Number(n[xt]),n[xt]=(a=s-(s|=0))?(a*h+(a<0?-.5:.5)|0)/h+s:s;return e&&n.length>6?[n[0],n[1],n[4],n[5],n[12],n[13]]:n},Vt=Y.getTransform=function(t,i,r,n){if(t._gsTransform&&r&&!n)return t._gsTransform;var s,o,l,h,u,c,d=r?t._gsTransform||new Lt:new Lt,f=d.scaleX<0,p=2e-5,_=1e5,m=Mt?parseFloat($(t,Ct,i,!1,"0 0 0").split(" ")[2])||d.zOrigin||0:0,g=parseFloat(a.defaultTransformPerspective)||0;if(d.svg=!(!t.getCTM||!Ut(t)),d.svg&&(Ft(t,$(t,Ct,i,!1,"50% 50%")+"",d,t.getAttribute("data-svg-origin")),Dt=a.useSVGTransformAttr||jt),s=Ht(t),s!==Xt){if(16===s.length){var v,y,T,b,x,w=s[0],E=s[1],S=s[2],D=s[3],A=s[4],P=s[5],O=s[6],C=s[7],M=s[8],L=s[9],R=s[10],I=s[12],N=s[13],j=s[14],B=s[11],k=Math.atan2(O,R);d.zOrigin&&(j=-d.zOrigin,I=M*j-s[12],N=L*j-s[13],j=R*j+d.zOrigin-s[14]),d.rotationX=k*F,k&&(b=Math.cos(-k),x=Math.sin(-k),v=A*b+M*x,y=P*b+L*x,T=O*b+R*x,M=A*-x+M*b,L=P*-x+L*b,R=O*-x+R*b,B=C*-x+B*b,A=v,P=y,O=T),k=Math.atan2(-S,R),d.rotationY=k*F,k&&(b=Math.cos(-k),x=Math.sin(-k),v=w*b-M*x,y=E*b-L*x,T=S*b-R*x,L=E*x+L*b,R=S*x+R*b,B=D*x+B*b,w=v,E=y,S=T),k=Math.atan2(E,w),d.rotation=k*F,k&&(b=Math.cos(-k),x=Math.sin(-k),w=w*b+A*x,y=E*b+P*x,P=E*-x+P*b,O=S*-x+O*b,E=y),d.rotationX&&Math.abs(d.rotationX)+Math.abs(d.rotation)>359.9&&(d.rotationX=d.rotation=0,d.rotationY=180-d.rotationY),d.scaleX=(Math.sqrt(w*w+E*E)*_+.5|0)/_,d.scaleY=(Math.sqrt(P*P+L*L)*_+.5|0)/_,d.scaleZ=(Math.sqrt(O*O+R*R)*_+.5|0)/_,d.rotationX||d.rotationY?d.skewX=0:(d.skewX=A||P?Math.atan2(A,P)*F+d.rotation:d.skewX||0,Math.abs(d.skewX)>90&&Math.abs(d.skewX)<270&&(f?(d.scaleX*=-1,d.skewX+=d.rotation<=0?180:-180,d.rotation+=d.rotation<=0?180:-180):(d.scaleY*=-1,d.skewX+=d.skewX<=0?180:-180))),d.perspective=B?1/(B<0?-B:B):0,d.x=I,d.y=N,d.z=j,d.svg&&(d.x-=d.xOrigin-(d.xOrigin*w-d.yOrigin*A),d.y-=d.yOrigin-(d.yOrigin*E-d.xOrigin*P))}else if(!Mt||n||!s.length||d.x!==s[4]||d.y!==s[5]||!d.rotationX&&!d.rotationY){var U=s.length>=6,X=U?s[0]:1,H=s[1]||0,V=s[2]||0,Y=U?s[3]:1;d.x=s[4]||0,d.y=s[5]||0,l=Math.sqrt(X*X+H*H),h=Math.sqrt(Y*Y+V*V),u=X||H?Math.atan2(H,X)*F:d.rotation||0,c=V||Y?Math.atan2(V,Y)*F+u:d.skewX||0,Math.abs(c)>90&&Math.abs(c)<270&&(f?(l*=-1,c+=u<=0?180:-180,u+=u<=0?180:-180):(h*=-1,c+=c<=0?180:-180)),d.scaleX=l,d.scaleY=h,d.rotation=u,d.skewX=c,Mt&&(d.rotationX=d.rotationY=d.z=0,d.perspective=g,d.scaleZ=1),d.svg&&(d.x-=d.xOrigin-(d.xOrigin*X+d.yOrigin*V),d.y-=d.yOrigin-(d.xOrigin*H+d.yOrigin*Y))}d.zOrigin=m;for(o in d)d[o]<p&&d[o]>-p&&(d[o]=0)}return r&&(t._gsTransform=d,d.svg&&(Dt&&t.style[Pt]?e.delayedCall(.001,function(){qt(t.style,Pt)}):!Dt&&t.getAttribute("transform")&&e.delayedCall(.001,function(){t.removeAttribute("transform")}))),d},Yt=function(t){var e,i,r=this.data,n=-r.rotation*j,s=n+r.skewX*j,a=1e5,o=(Math.cos(n)*r.scaleX*a|0)/a,l=(Math.sin(n)*r.scaleX*a|0)/a,h=(Math.sin(s)*-r.scaleY*a|0)/a,u=(Math.cos(s)*r.scaleY*a|0)/a,c=this.t.style,d=this.t.currentStyle;if(d){i=l,l=-h,h=-i,e=d.filter,c.filter="";var f,p,m=this.t.offsetWidth,g=this.t.offsetHeight,v="absolute"!==d.position,y="progid:DXImageTransform.Microsoft.Matrix(M11="+o+", M12="+l+", M21="+h+", M22="+u,T=r.x+m*r.xPercent/100,b=r.y+g*r.yPercent/100;if(null!=r.ox&&(f=(r.oxp?m*r.ox*.01:r.ox)-m/2,p=(r.oyp?g*r.oy*.01:r.oy)-g/2,T+=f-(f*o+p*l),b+=p-(f*h+p*u)),v?(f=m/2,p=g/2,y+=", Dx="+(f-(f*o+p*l)+T)+", Dy="+(p-(f*h+p*u)+b)+")"):y+=", sizingMethod='auto expand')",e.indexOf("DXImageTransform.Microsoft.Matrix(")!==-1?c.filter=e.replace(R,y):c.filter=y+" "+e,0!==t&&1!==t||1===o&&0===l&&0===h&&1===u&&(v&&y.indexOf("Dx=0, Dy=0")===-1||w.test(e)&&100!==parseFloat(RegExp.$1)||e.indexOf(e.indexOf("Alpha"))===-1&&c.removeAttribute("filter")),!v){var E,S,D,A=_<8?1:-1;for(f=r.ieOffsetX||0,p=r.ieOffsetY||0,r.ieOffsetX=Math.round((m-((o<0?-o:o)*m+(l<0?-l:l)*g))/2+T),r.ieOffsetY=Math.round((g-((u<0?-u:u)*g+(h<0?-h:h)*m))/2+b),xt=0;xt<4;xt++)S=st[xt],E=d[S],i=E.indexOf("px")!==-1?parseFloat(E):tt(this.t,S,parseFloat(E),E.replace(x,""))||0,D=i!==r[S]?xt<2?-r.ieOffsetX:-r.ieOffsetY:xt<2?f-r.ieOffsetX:p-r.ieOffsetY,c[S]=(r[S]=Math.round(i-D*(0===xt||2===xt?1:A)))+"px"}}},Gt=Y.set3DTransformRatio=Y.setTransformRatio=function(t){var e,i,r,n,s,a,o,l,h,u,c,d,p,_,m,g,v,y,T,b,x,w,E,S=this.data,D=this.t.style,A=S.rotation,P=S.rotationX,O=S.rotationY,C=S.scaleX,M=S.scaleY,L=S.scaleZ,R=S.x,I=S.y,N=S.z,F=S.svg,B=S.perspective,k=S.force3D,U=S.skewY,X=S.skewX;if(U&&(X+=U,A+=U),((1===t||0===t)&&"auto"===k&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!k)&&!N&&!B&&!O&&!P&&1===L||Dt&&F||!Mt)return void(A||X||F?(A*=j,w=X*j,E=1e5,i=Math.cos(A)*C,s=Math.sin(A)*C,r=Math.sin(A-w)*-M,a=Math.cos(A-w)*M,w&&"simple"===S.skewType&&(e=Math.tan(w-U*j),e=Math.sqrt(1+e*e),r*=e,a*=e,U&&(e=Math.tan(U*j),e=Math.sqrt(1+e*e),i*=e,s*=e)),F&&(R+=S.xOrigin-(S.xOrigin*i+S.yOrigin*r)+S.xOffset,I+=S.yOrigin-(S.xOrigin*s+S.yOrigin*a)+S.yOffset,Dt&&(S.xPercent||S.yPercent)&&(m=this.t.getBBox(),R+=.01*S.xPercent*m.width,I+=.01*S.yPercent*m.height),m=1e-6,R<m&&R>-m&&(R=0),I<m&&I>-m&&(I=0)),T=(i*E|0)/E+","+(s*E|0)/E+","+(r*E|0)/E+","+(a*E|0)/E+","+R+","+I+")",F&&Dt?this.t.setAttribute("transform","matrix("+T):D[Pt]=(S.xPercent||S.yPercent?"translate("+S.xPercent+"%,"+S.yPercent+"%) matrix(":"matrix(")+T):D[Pt]=(S.xPercent||S.yPercent?"translate("+S.xPercent+"%,"+S.yPercent+"%) matrix(":"matrix(")+C+",0,0,"+M+","+R+","+I+")");if(f&&(m=1e-4,C<m&&C>-m&&(C=L=2e-5),M<m&&M>-m&&(M=L=2e-5),!B||S.z||S.rotationX||S.rotationY||(B=0)),A||X)A*=j,g=i=Math.cos(A),v=s=Math.sin(A),X&&(A-=X*j,g=Math.cos(A),v=Math.sin(A),"simple"===S.skewType&&(e=Math.tan((X-U)*j),e=Math.sqrt(1+e*e),g*=e,v*=e,S.skewY&&(e=Math.tan(U*j),e=Math.sqrt(1+e*e),i*=e,s*=e))),r=-v,a=g;else{if(!(O||P||1!==L||B||F))return void(D[Pt]=(S.xPercent||S.yPercent?"translate("+S.xPercent+"%,"+S.yPercent+"%) translate3d(":"translate3d(")+R+"px,"+I+"px,"+N+"px)"+(1!==C||1!==M?" scale("+C+","+M+")":""));i=a=1,r=s=0}u=1,n=o=l=h=c=d=0,p=B?-1/B:0,_=S.zOrigin,m=1e-6,b=",",x="0",A=O*j,A&&(g=Math.cos(A),v=Math.sin(A),l=-v,c=p*-v,n=i*v,o=s*v,u=g,p*=g,i*=g,s*=g),A=P*j,A&&(g=Math.cos(A),v=Math.sin(A),e=r*g+n*v,y=a*g+o*v,h=u*v,d=p*v,n=r*-v+n*g,o=a*-v+o*g,u*=g,p*=g,r=e,a=y),1!==L&&(n*=L,o*=L,u*=L,p*=L),1!==M&&(r*=M,a*=M,h*=M,d*=M),1!==C&&(i*=C,s*=C,l*=C,c*=C),(_||F)&&(_&&(R+=n*-_,I+=o*-_,N+=u*-_+_),F&&(R+=S.xOrigin-(S.xOrigin*i+S.yOrigin*r)+S.xOffset,I+=S.yOrigin-(S.xOrigin*s+S.yOrigin*a)+S.yOffset),R<m&&R>-m&&(R=x),I<m&&I>-m&&(I=x),N<m&&N>-m&&(N=0)),T=S.xPercent||S.yPercent?"translate("+S.xPercent+"%,"+S.yPercent+"%) matrix3d(":"matrix3d(",T+=(i<m&&i>-m?x:i)+b+(s<m&&s>-m?x:s)+b+(l<m&&l>-m?x:l),T+=b+(c<m&&c>-m?x:c)+b+(r<m&&r>-m?x:r)+b+(a<m&&a>-m?x:a),P||O||1!==L?(T+=b+(h<m&&h>-m?x:h)+b+(d<m&&d>-m?x:d)+b+(n<m&&n>-m?x:n),T+=b+(o<m&&o>-m?x:o)+b+(u<m&&u>-m?x:u)+b+(p<m&&p>-m?x:p)+b):T+=",0,0,0,0,1,0,",T+=R+b+I+b+N+b+(B?1+-N/B:1)+")",D[Pt]=T};h=Lt.prototype,h.x=h.y=h.z=h.skewX=h.skewY=h.rotation=h.rotationX=h.rotationY=h.zOrigin=h.xPercent=h.yPercent=h.xOffset=h.yOffset=0,h.scaleX=h.scaleY=h.scaleZ=1,Et("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(t,e,i,r,s,o,l){if(r._lastParsedTransform===l)return s;r._lastParsedTransform=l;var h,u=l.scale&&"function"==typeof l.scale?l.scale:0;"function"==typeof l[i]&&(h=l[i],l[i]=e),u&&(l.scale=u(g,t));var c,d,f,p,_,v,y,T,b,x=t._gsTransform,w=t.style,E=1e-6,S=At.length,D=l,A={},P="transformOrigin",O=Vt(t,n,!0,D.parseTransform),C=D.transform&&("function"==typeof D.transform?D.transform(g,m):D.transform);if(r._transform=O,C&&"string"==typeof C&&Pt)d=H.style,d[Pt]=C,d.display="block",d.position="absolute",U.body.appendChild(H),c=Vt(H,null,!1),O.svg&&(v=O.xOrigin,y=O.yOrigin,c.x-=O.xOffset,c.y-=O.yOffset,(D.transformOrigin||D.svgOrigin)&&(C={},Ft(t,ot(D.transformOrigin),C,D.svgOrigin,D.smoothOrigin,!0),v=C.xOrigin,y=C.yOrigin,c.x-=C.xOffset-O.xOffset,c.y-=C.yOffset-O.yOffset),(v||y)&&(T=Ht(H,!0),c.x-=v-(v*T[0]+y*T[2]),c.y-=y-(v*T[1]+y*T[3]))),U.body.removeChild(H),c.perspective||(c.perspective=O.perspective),null!=D.xPercent&&(c.xPercent=ht(D.xPercent,O.xPercent)),null!=D.yPercent&&(c.yPercent=ht(D.yPercent,O.yPercent));else if("object"==typeof D){if(c={scaleX:ht(null!=D.scaleX?D.scaleX:D.scale,O.scaleX),scaleY:ht(null!=D.scaleY?D.scaleY:D.scale,O.scaleY),scaleZ:ht(D.scaleZ,O.scaleZ),x:ht(D.x,O.x),y:ht(D.y,O.y),z:ht(D.z,O.z),xPercent:ht(D.xPercent,O.xPercent),yPercent:ht(D.yPercent,O.yPercent),perspective:ht(D.transformPerspective,O.perspective)},_=D.directionalRotation,null!=_)if("object"==typeof _)for(d in _)D[d]=_[d];else D.rotation=_;"string"==typeof D.x&&D.x.indexOf("%")!==-1&&(c.x=0,c.xPercent=ht(D.x,O.xPercent)),"string"==typeof D.y&&D.y.indexOf("%")!==-1&&(c.y=0,c.yPercent=ht(D.y,O.yPercent)),c.rotation=ut("rotation"in D?D.rotation:"shortRotation"in D?D.shortRotation+"_short":"rotationZ"in D?D.rotationZ:O.rotation,O.rotation,"rotation",A),Mt&&(c.rotationX=ut("rotationX"in D?D.rotationX:"shortRotationX"in D?D.shortRotationX+"_short":O.rotationX||0,O.rotationX,"rotationX",A),c.rotationY=ut("rotationY"in D?D.rotationY:"shortRotationY"in D?D.shortRotationY+"_short":O.rotationY||0,O.rotationY,"rotationY",A)),c.skewX=ut(D.skewX,O.skewX),c.skewY=ut(D.skewY,O.skewY)}for(Mt&&null!=D.force3D&&(O.force3D=D.force3D,p=!0),O.skewType=D.skewType||O.skewType||a.defaultSkewType,f=O.force3D||O.z||O.rotationX||O.rotationY||c.z||c.rotationX||c.rotationY||c.perspective,f||null==D.scale||(c.scaleZ=1);--S>-1;)b=At[S],C=c[b]-O[b],(C>E||C<-E||null!=D[b]||null!=B[b])&&(p=!0,s=new yt(O,b,O[b],C,s),b in A&&(s.e=A[b]),s.xs0=0,s.plugin=o,r._overwriteProps.push(s.n));return C=D.transformOrigin,O.svg&&(C||D.svgOrigin)&&(v=O.xOffset,y=O.yOffset,Ft(t,ot(C),c,D.svgOrigin,D.smoothOrigin),s=Tt(O,"xOrigin",(x?O:c).xOrigin,c.xOrigin,s,P),s=Tt(O,"yOrigin",(x?O:c).yOrigin,c.yOrigin,s,P),v===O.xOffset&&y===O.yOffset||(s=Tt(O,"xOffset",x?v:O.xOffset,O.xOffset,s,P),s=Tt(O,"yOffset",x?y:O.yOffset,O.yOffset,s,P)),C="0px 0px"),(C||Mt&&f&&O.zOrigin)&&(Pt?(p=!0,b=Ct,C=(C||$(t,b,n,!1,"50% 50%"))+"",s=new yt(w,b,0,0,s,-1,P),s.b=w[b],s.plugin=o,Mt?(d=O.zOrigin,C=C.split(" "),O.zOrigin=(C.length>2&&(0===d||"0px"!==C[2])?parseFloat(C[2]):d)||0,s.xs0=s.e=C[0]+" "+(C[1]||"50%")+" 0px",s=new yt(O,"zOrigin",0,0,s,-1,s.n),s.b=d,s.xs0=s.e=O.zOrigin):s.xs0=s.e=C):ot(C+"",O)),p&&(r._transformType=O.svg&&Dt||!f&&3!==this._transformType?2:3),h&&(l[i]=h),u&&(l.scale=u),s},prefix:!0}),Et("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),Et("borderRadius",{defaultValue:"0px",parser:function(t,e,i,s,a,o){e=this.format(e);var l,h,u,c,d,f,p,_,m,g,v,y,T,b,x,w,E=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],S=t.style;for(m=parseFloat(t.offsetWidth),g=parseFloat(t.offsetHeight),l=e.split(" "),h=0;h<E.length;h++)this.p.indexOf("border")&&(E[h]=K(E[h])),d=c=$(t,E[h],n,!1,"0px"),d.indexOf(" ")!==-1&&(c=d.split(" "),d=c[0],c=c[1]),f=u=l[h],p=parseFloat(d),y=d.substr((p+"").length),T="="===f.charAt(1),T?(_=parseInt(f.charAt(0)+"1",10),f=f.substr(2),_*=parseFloat(f),v=f.substr((_+"").length-(_<0?1:0))||""):(_=parseFloat(f),v=f.substr((_+"").length)),""===v&&(v=r[i]||y),v!==y&&(b=tt(t,"borderLeft",p,y),x=tt(t,"borderTop",p,y),"%"===v?(d=b/m*100+"%",c=x/g*100+"%"):"em"===v?(w=tt(t,"borderLeft",1,"em"),d=b/w+"em",c=x/w+"em"):(d=b+"px",c=x+"px"),T&&(f=parseFloat(d)+_+v,u=parseFloat(c)+_+v)),a=bt(S,E[h],d+" "+c,f+" "+u,!1,"0px",a);return a},prefix:!0,formatter:mt("0px 0px 0px 0px",!1,!0)}),Et("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(t,e,i,r,s,a){return bt(t.style,i,this.format($(t,i,n,!1,"0px 0px")),this.format(e),!1,"0px",s)},prefix:!0,formatter:mt("0px 0px",!1,!0)}),Et("backgroundPosition",{defaultValue:"0 0",parser:function(t,e,i,r,s,a){var o,l,h,u,c,d,f="background-position",p=n||Q(t,null),m=this.format((p?_?p.getPropertyValue(f+"-x")+" "+p.getPropertyValue(f+"-y"):p.getPropertyValue(f):t.currentStyle.backgroundPositionX+" "+t.currentStyle.backgroundPositionY)||"0 0"),g=this.format(e);if(m.indexOf("%")!==-1!=(g.indexOf("%")!==-1)&&g.split(",").length<2&&(d=$(t,"backgroundImage").replace(O,""),d&&"none"!==d)){for(o=m.split(" "),l=g.split(" "),V.setAttribute("src",d),h=2;--h>-1;)m=o[h],u=m.indexOf("%")!==-1,u!==(l[h].indexOf("%")!==-1)&&(c=0===h?t.offsetWidth-V.width:t.offsetHeight-V.height,o[h]=u?parseFloat(m)/100*c+"px":parseFloat(m)/c*100+"%");m=o.join(" ")}return this.parseComplex(t.style,m,g,s,a)},formatter:ot}),Et("backgroundSize",{defaultValue:"0 0",formatter:function(t){return t+="",ot(t.indexOf(" ")===-1?t+" "+t:t)}}),Et("perspective",{defaultValue:"0px",prefix:!0}),Et("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),Et("transformStyle",{prefix:!0}),Et("backfaceVisibility",{prefix:!0}),Et("userSelect",{prefix:!0}),Et("margin",{parser:gt("marginTop,marginRight,marginBottom,marginLeft")}),Et("padding",{parser:gt("paddingTop,paddingRight,paddingBottom,paddingLeft")}),Et("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(t,e,i,r,s,a){var o,l,h;return _<9?(l=t.currentStyle,h=_<8?" ":",",o="rect("+l.clipTop+h+l.clipRight+h+l.clipBottom+h+l.clipLeft+")",e=this.format(e).split(",").join(h)):(o=this.format($(t,this.p,n,!1,this.dflt)),e=this.format(e)),this.parseComplex(t.style,o,e,s,a)}}),Et("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),Et("autoRound,strictUnits",{parser:function(t,e,i,r,n){return n}}),Et("border",{defaultValue:"0px solid #000",parser:function(t,e,i,r,s,a){var o=$(t,"borderTopWidth",n,!1,"0px"),l=this.format(e).split(" "),h=l[0].replace(x,"");return"px"!==h&&(o=parseFloat(o)/tt(t,"borderTopWidth",1,h)+h),this.parseComplex(t.style,this.format(o+" "+$(t,"borderTopStyle",n,!1,"solid")+" "+$(t,"borderTopColor",n,!1,"#000")),l.join(" "),s,a)},color:!0,formatter:function(t){var e=t.split(" ");return e[0]+" "+(e[1]||"solid")+" "+(t.match(_t)||["#000"])[0]}}),Et("borderWidth",{parser:gt("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),Et("float,cssFloat,styleFloat",{parser:function(t,e,i,r,n,s){var a=t.style,o="cssFloat"in a?"cssFloat":"styleFloat";return new yt(a,o,0,0,n,-1,i,!1,0,a[o],e)}});var Wt=function(t){var e,i=this.t,r=i.filter||$(this.data,"filter")||"",n=this.s+this.c*t|0;100===n&&(r.indexOf("atrix(")===-1&&r.indexOf("radient(")===-1&&r.indexOf("oader(")===-1?(i.removeAttribute("filter"),e=!$(this.data,"filter")):(i.filter=r.replace(S,""),e=!0)),e||(this.xn1&&(i.filter=r=r||"alpha(opacity="+n+")"),r.indexOf("pacity")===-1?0===n&&this.xn1||(i.filter=r+" alpha(opacity="+n+")"):i.filter=r.replace(w,"opacity="+n))};Et("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(t,e,i,r,s,a){var o=parseFloat($(t,"opacity",n,!1,"1")),l=t.style,h="autoAlpha"===i;return"string"==typeof e&&"="===e.charAt(1)&&(e=("-"===e.charAt(0)?-1:1)*parseFloat(e.substr(2))+o),h&&1===o&&"hidden"===$(t,"visibility",n)&&0!==e&&(o=0),W?s=new yt(l,"opacity",o,e-o,s):(s=new yt(l,"opacity",100*o,100*(e-o),s),s.xn1=h?1:0,l.zoom=1,s.type=2,s.b="alpha(opacity="+s.s+")",s.e="alpha(opacity="+(s.s+s.c)+")",s.data=t,s.plugin=a,s.setRatio=Wt),h&&(s=new yt(l,"visibility",0,0,s,-1,null,!1,0,0!==o?"inherit":"hidden",0===e?"hidden":"inherit"),s.xs0="inherit",r._overwriteProps.push(s.n),r._overwriteProps.push(i)),s}});var qt=function(t,e){e&&(t.removeProperty?("ms"!==e.substr(0,2)&&"webkit"!==e.substr(0,6)||(e="-"+e),t.removeProperty(e.replace(A,"-$1").toLowerCase())):t.removeAttribute(e))},zt=function(t){if(this.t._gsClassPT=this,1===t||0===t){this.t.setAttribute("class",0===t?this.b:this.e);for(var e=this.data,i=this.t.style;e;)e.v?i[e.p]=e.v:qt(i,e.p),e=e._next;1===t&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};Et("className",{parser:function(t,e,r,s,a,o,l){var h,u,c,d,f,p=t.getAttribute("class")||"",_=t.style.cssText;if(a=s._classNamePT=new yt(t,r,0,0,a,2),a.setRatio=zt,a.pr=-11,i=!0,a.b=p,u=it(t,n),c=t._gsClassPT){for(d={},f=c.data;f;)d[f.p]=1,f=f._next;c.setRatio(1)}return t._gsClassPT=a,a.e="="!==e.charAt(1)?e:p.replace(new RegExp("(?:\\s|^)"+e.substr(2)+"(?![\\w-])"),"")+("+"===e.charAt(0)?" "+e.substr(2):""),t.setAttribute("class",a.e),h=rt(t,u,it(t),l,d),t.setAttribute("class",p),a.data=h.firstMPT,t.style.cssText=_,a=a.xfirst=s.parse(t,h.difs,a,o)}});var Zt=function(t){if((1===t||0===t)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var e,i,r,n,s,a=this.t.style,o=l.transform.parse;if("all"===this.e)a.cssText="",n=!0;else for(e=this.e.split(" ").join("").split(","),r=e.length;--r>-1;)i=e[r],l[i]&&(l[i].parse===o?n=!0:i="transformOrigin"===i?Ct:l[i].p),qt(a,i);n&&(qt(a,Pt),s=this.t._gsTransform,s&&(s.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(Et("clearProps",{parser:function(t,e,r,n,s){return s=new yt(t,r,0,0,s,2),s.setRatio=Zt,s.e=e,s.pr=-10,s.data=n._tween,i=!0,s}}),h="bezier,throwProps,physicsProps,physics2D".split(","),xt=h.length;xt--;)St(h[xt]);h=a.prototype,h._firstPT=h._lastParsedTransform=h._transform=null,h._onInitTween=function(t,e,o,h){if(!t.nodeType)return!1;this._target=m=t,this._tween=o,this._vars=e,g=h,u=e.autoRound,i=!1,r=e.suffixMap||a.suffixMap,n=Q(t,""),s=this._overwriteProps;var f,_,v,y,T,b,x,w,S,D=t.style;if(c&&""===D.zIndex&&(f=$(t,"zIndex",n),"auto"!==f&&""!==f||this._addLazySet(D,"zIndex",0)),"string"==typeof e&&(y=D.cssText,f=it(t,n),D.cssText=y+";"+e,f=rt(t,f,it(t)).difs,!W&&E.test(e)&&(f.opacity=parseFloat(RegExp.$1)),e=f,D.cssText=y),e.className?this._firstPT=_=l.className.parse(t,e.className,"className",this,null,null,e):this._firstPT=_=this.parse(t,e,null),this._transformType){for(S=3===this._transformType,Pt?d&&(c=!0,""===D.zIndex&&(x=$(t,"zIndex",n),"auto"!==x&&""!==x||this._addLazySet(D,"zIndex",0)),p&&this._addLazySet(D,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(S?"visible":"hidden"))):D.zoom=1,v=_;v&&v._next;)v=v._next;w=new yt(t,"transform",0,0,null,2),this._linkCSSP(w,null,v),w.setRatio=Pt?Gt:Yt,w.data=this._transform||Vt(t,n,!0),w.tween=o,w.pr=-1,s.pop()}if(i){for(;_;){for(b=_._next,v=y;v&&v.pr>_.pr;)v=v._next;(_._prev=v?v._prev:T)?_._prev._next=_:y=_,(_._next=v)?v._prev=_:T=_,_=b}this._firstPT=y}return!0},h.parse=function(t,e,i,s){var a,o,h,c,d,f,p,_,v,y,T=t.style;for(a in e)f=e[a],"function"==typeof f&&(f=f(g,m)),o=l[a],o?i=o.parse(t,f,a,this,i,s,e):(d=$(t,a,n)+"",v="string"==typeof f,"color"===a||"fill"===a||"stroke"===a||a.indexOf("Color")!==-1||v&&D.test(f)?(v||(f=ft(f),f=(f.length>3?"rgba(":"rgb(")+f.join(",")+")"),i=bt(T,a,d,f,!0,"transparent",i,0,s)):v&&N.test(f)?i=bt(T,a,d,f,!0,null,i,0,s):(h=parseFloat(d),p=h||0===h?d.substr((h+"").length):"",""!==d&&"auto"!==d||("width"===a||"height"===a?(h=at(t,a,n),p="px"):"left"===a||"top"===a?(h=et(t,a,n),p="px"):(h="opacity"!==a?0:1,p="")),y=v&&"="===f.charAt(1),y?(c=parseInt(f.charAt(0)+"1",10),f=f.substr(2),c*=parseFloat(f),_=f.replace(x,"")):(c=parseFloat(f),_=v?f.replace(x,""):""),""===_&&(_=a in r?r[a]:p),f=c||0===c?(y?c+h:c)+_:e[a],p!==_&&""!==_&&(c||0===c)&&h&&(h=tt(t,a,h,p),"%"===_?(h/=tt(t,a,100,"%")/100,e.strictUnits!==!0&&(d=h+"%")):"em"===_||"rem"===_||"vw"===_||"vh"===_?h/=tt(t,a,1,_):"px"!==_&&(c=tt(t,a,c,_),_="px"),y&&(c||0===c)&&(f=c+h+_)),y&&(c+=h),!h&&0!==h||!c&&0!==c?void 0!==T[a]&&(f||f+""!="NaN"&&null!=f)?(i=new yt(T,a,c||h||0,0,i,-1,a,!1,0,d,f),i.xs0="none"!==f||"display"!==a&&a.indexOf("Style")===-1?f:d):z("invalid "+a+" tween value: "+e[a]):(i=new yt(T,a,h,c-h,i,0,a,u!==!1&&("px"===_||"zIndex"===a),0,d,f),i.xs0=_))),s&&i&&!i.plugin&&(i.plugin=s);return i},h.setRatio=function(t){var e,i,r,n=this._firstPT,s=1e-6;if(1!==t||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(t||this._tween._time!==this._tween._duration&&0!==this._tween._time||this._tween._rawPrevTime===-1e-6)for(;n;){if(e=n.c*t+n.s,n.r?e=Math.round(e):e<s&&e>-s&&(e=0),n.type)if(1===n.type)if(r=n.l,2===r)n.t[n.p]=n.xs0+e+n.xs1+n.xn1+n.xs2;else if(3===r)n.t[n.p]=n.xs0+e+n.xs1+n.xn1+n.xs2+n.xn2+n.xs3;else if(4===r)n.t[n.p]=n.xs0+e+n.xs1+n.xn1+n.xs2+n.xn2+n.xs3+n.xn3+n.xs4;else if(5===r)n.t[n.p]=n.xs0+e+n.xs1+n.xn1+n.xs2+n.xn2+n.xs3+n.xn3+n.xs4+n.xn4+n.xs5;else{for(i=n.xs0+e+n.xs1,r=1;r<n.l;r++)i+=n["xn"+r]+n["xs"+(r+1)];n.t[n.p]=i}else n.type===-1?n.t[n.p]=n.xs0:n.setRatio&&n.setRatio(t);else n.t[n.p]=e+n.xs0;n=n._next}else for(;n;)2!==n.type?n.t[n.p]=n.b:n.setRatio(t),n=n._next;else for(;n;){if(2!==n.type)if(n.r&&n.type!==-1)if(e=Math.round(n.s+n.c),n.type){if(1===n.type){for(r=n.l,i=n.xs0+e+n.xs1,r=1;r<n.l;r++)i+=n["xn"+r]+n["xs"+(r+1)];n.t[n.p]=i}}else n.t[n.p]=e+n.xs0;else n.t[n.p]=n.e;else n.setRatio(t);n=n._next}},h._enableTransforms=function(t){this._transform=this._transform||Vt(this._target,n,!0),this._transformType=this._transform.svg&&Dt||!t&&3!==this._transformType?2:3};var Jt=function(t){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};h._addLazySet=function(t,e,i){var r=this._firstPT=new yt(t,e,0,0,this._firstPT,2);r.e=i,r.setRatio=Jt,r.data=this},h._linkCSSP=function(t,e,i,r){return t&&(e&&(e._prev=t),t._next&&(t._next._prev=t._prev),t._prev?t._prev._next=t._next:this._firstPT===t&&(this._firstPT=t._next,r=!0),i?i._next=t:r||null!==this._firstPT||(this._firstPT=t),t._next=e,t._prev=i),t},h._mod=function(t){for(var e=this._firstPT;e;)"function"==typeof t[e.p]&&t[e.p]===Math.round&&(e.r=1),e=e._next},h._kill=function(e){var i,r,n,s=e;if(e.autoAlpha||e.alpha){s={};for(r in e)s[r]=e[r];s.opacity=1,s.autoAlpha&&(s.visibility=1)}for(e.className&&(i=this._classNamePT)&&(n=i.xfirst,n&&n._prev?this._linkCSSP(n._prev,i._next,n._prev._prev):n===this._firstPT&&(this._firstPT=i._next),i._next&&this._linkCSSP(i._next,i._next._next,n._prev),this._classNamePT=null),i=this._firstPT;i;)i.plugin&&i.plugin!==r&&i.plugin._kill&&(i.plugin._kill(e),r=i.plugin),i=i._next;return t.prototype._kill.call(this,s)};var Kt=function(t,e,i){var r,n,s,a;if(t.slice)for(n=t.length;--n>-1;)Kt(t[n],e,i);else for(r=t.childNodes,n=r.length;--n>-1;)s=r[n],a=s.type,s.style&&(e.push(it(s)),i&&i.push(s)),1!==a&&9!==a&&11!==a||!s.childNodes.length||Kt(s,e,i)};return a.cascadeTo=function(t,i,r){var n,s,a,o,l=e.to(t,i,r),h=[l],u=[],c=[],d=[],f=e._internals.reservedProps;for(t=l._targets||l.target,Kt(t,u,d),l.render(i,!0,!0),Kt(t,c),l.render(0,!0,!0),l._enabled(!0),n=d.length;--n>-1;)if(s=rt(d[n],u[n],c[n]),s.firstMPT){s=s.difs;for(a in r)f[a]&&(s[a]=r[a]);o={};for(a in s)o[a]=u[n][a];h.push(e.fromTo(d[n],i,o,s))}return h},t.activate([a]),a},!0),function(){var t=_gsScope._gsDefine.plugin({propName:"roundProps",version:"1.6.0",priority:-1,API:2,init:function(t,e,i){return this._tween=i,!0}}),e=function(t){for(;t;)t.f||t.blob||(t.m=Math.round),t=t._next},i=t.prototype;i._onInitAllProps=function(){for(var t,i,r,n=this._tween,s=n.vars.roundProps.join?n.vars.roundProps:n.vars.roundProps.split(","),a=s.length,o={},l=n._propLookup.roundProps;--a>-1;)o[s[a]]=Math.round;for(a=s.length;--a>-1;)for(t=s[a],i=n._firstPT;i;)r=i._next,i.pg?i.t._mod(o):i.n===t&&(2===i.f&&i.t?e(i.t._firstPT):(this._add(i.t,t,i.s,i.c),r&&(r._prev=i._prev),i._prev?i._prev._next=r:n._firstPT===i&&(n._firstPT=r),i._next=i._prev=null,n._propLookup[t]=l)),i=r;return!1},i._add=function(t,e,i,r){this._addTween(t,e,i,i+r,e,Math.round),this._overwriteProps.push(e)}}(),function(){_gsScope._gsDefine.plugin({propName:"attr",API:2,version:"0.6.0",init:function(t,e,i,r){var n,s;if("function"!=typeof t.setAttribute)return!1;for(n in e)s=e[n],"function"==typeof s&&(s=s(r,t)),this._addTween(t,"setAttribute",t.getAttribute(n)+"",s+"",n,!1,n),this._overwriteProps.push(n);return!0}})}(),_gsScope._gsDefine.plugin({propName:"directionalRotation",version:"0.3.0",API:2,init:function(t,e,i,r){"object"!=typeof e&&(e={rotation:e}),this.finals={};var n,s,a,o,l,h,u=e.useRadians===!0?2*Math.PI:360,c=1e-6;for(n in e)"useRadians"!==n&&(o=e[n],"function"==typeof o&&(o=o(r,t)),h=(o+"").split("_"),s=h[0],a=parseFloat("function"!=typeof t[n]?t[n]:t[n.indexOf("set")||"function"!=typeof t["get"+n.substr(3)]?n:"get"+n.substr(3)]()),o=this.finals[n]="string"==typeof s&&"="===s.charAt(1)?a+parseInt(s.charAt(0)+"1",10)*Number(s.substr(2)):Number(s)||0,l=o-a,h.length&&(s=h.join("_"),s.indexOf("short")!==-1&&(l%=u,l!==l%(u/2)&&(l=l<0?l+u:l-u)),s.indexOf("_cw")!==-1&&l<0?l=(l+9999999999*u)%u-(l/u|0)*u:s.indexOf("ccw")!==-1&&l>0&&(l=(l-9999999999*u)%u-(l/u|0)*u)),(l>c||l<-c)&&(this._addTween(t,n,a,a+l,n),this._overwriteProps.push(n)));return!0},set:function(t){var e;if(1!==t)this._super.setRatio.call(this,t);else for(e=this._firstPT;e;)e.f?e.t[e.p](this.finals[e.p]):e.t[e.p]=this.finals[e.p],e=e._next}})._autoCSS=!0,_gsScope._gsDefine("easing.Back",["easing.Ease"],function(t){var e,i,r,n=_gsScope.GreenSockGlobals||_gsScope,s=n.com.greensock,a=2*Math.PI,o=Math.PI/2,l=s._class,h=function(e,i){var r=l("easing."+e,function(){},!0),n=r.prototype=new t;return n.constructor=r,n.getRatio=i,r},u=t.register||function(){},c=function(t,e,i,r,n){var s=l("easing."+t,{easeOut:new e,easeIn:new i,easeInOut:new r},!0);return u(s,t),s},d=function(t,e,i){this.t=t,this.v=e,i&&(this.next=i,i.prev=this,this.c=i.v-e,this.gap=i.t-t)},f=function(e,i){var r=l("easing."+e,function(t){this._p1=t||0===t?t:1.70158,this._p2=1.525*this._p1},!0),n=r.prototype=new t;return n.constructor=r,n.getRatio=i,n.config=function(t){return new r(t)},r},p=c("Back",f("BackOut",function(t){return(t-=1)*t*((this._p1+1)*t+this._p1)+1}),f("BackIn",function(t){return t*t*((this._p1+1)*t-this._p1)}),f("BackInOut",function(t){return(t*=2)<1?.5*t*t*((this._p2+1)*t-this._p2):.5*((t-=2)*t*((this._p2+1)*t+this._p2)+2)})),_=l("easing.SlowMo",function(t,e,i){e=e||0===e?e:.7,null==t?t=.7:t>1&&(t=1),this._p=1!==t?e:0,this._p1=(1-t)/2,this._p2=t,this._p3=this._p1+this._p2,this._calcEnd=i===!0},!0),m=_.prototype=new t;return m.constructor=_,m.getRatio=function(t){var e=t+(.5-t)*this._p;return t<this._p1?this._calcEnd?1-(t=1-t/this._p1)*t:e-(t=1-t/this._p1)*t*t*t*e:t>this._p3?this._calcEnd?1-(t=(t-this._p3)/this._p1)*t:e+(t-e)*(t=(t-this._p3)/this._p1)*t*t*t:this._calcEnd?1:e},_.ease=new _(.7,.7),m.config=_.config=function(t,e,i){return new _(t,e,i)},e=l("easing.SteppedEase",function(t){t=t||1,this._p1=1/t,this._p2=t+1},!0),m=e.prototype=new t,m.constructor=e,m.getRatio=function(t){return t<0?t=0:t>=1&&(t=.999999999),(this._p2*t>>0)*this._p1},m.config=e.config=function(t){return new e(t)},i=l("easing.RoughEase",function(e){e=e||{};for(var i,r,n,s,a,o,l=e.taper||"none",h=[],u=0,c=0|(e.points||20),f=c,p=e.randomize!==!1,_=e.clamp===!0,m=e.template instanceof t?e.template:null,g="number"==typeof e.strength?.4*e.strength:.4;--f>-1;)i=p?Math.random():1/c*f,r=m?m.getRatio(i):i,"none"===l?n=g:"out"===l?(s=1-i,n=s*s*g):"in"===l?n=i*i*g:i<.5?(s=2*i,n=s*s*.5*g):(s=2*(1-i),n=s*s*.5*g),p?r+=Math.random()*n-.5*n:f%2?r+=.5*n:r-=.5*n,_&&(r>1?r=1:r<0&&(r=0)),h[u++]={x:i,y:r};for(h.sort(function(t,e){return t.x-e.x}),o=new d(1,1,null),f=c;--f>-1;)a=h[f],o=new d(a.x,a.y,o);this._prev=new d(0,0,0!==o.t?o:o.next)},!0),m=i.prototype=new t,m.constructor=i,m.getRatio=function(t){var e=this._prev;if(t>e.t){for(;e.next&&t>=e.t;)e=e.next;e=e.prev}else for(;e.prev&&t<=e.t;)e=e.prev;return this._prev=e,e.v+(t-e.t)/e.gap*e.c},m.config=function(t){return new i(t)},i.ease=new i,c("Bounce",h("BounceOut",function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}),h("BounceIn",function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}),h("BounceInOut",function(t){var e=t<.5;return t=e?1-2*t:2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5})),c("Circ",h("CircOut",function(t){return Math.sqrt(1-(t-=1)*t)}),h("CircIn",function(t){return-(Math.sqrt(1-t*t)-1)}),h("CircInOut",function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)})),r=function(e,i,r){var n=l("easing."+e,function(t,e){this._p1=t>=1?t:1,this._p2=(e||r)/(t<1?t:1),this._p3=this._p2/a*(Math.asin(1/this._p1)||0),this._p2=a/this._p2},!0),s=n.prototype=new t;return s.constructor=n,s.getRatio=i,s.config=function(t,e){return new n(t,e)},n},c("Elastic",r("ElasticOut",function(t){return this._p1*Math.pow(2,-10*t)*Math.sin((t-this._p3)*this._p2)+1},.3),r("ElasticIn",function(t){return-(this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*this._p2))},.3),r("ElasticInOut",function(t){return(t*=2)<1?-.5*(this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(t-=1))*Math.sin((t-this._p3)*this._p2)*.5+1},.45)),c("Expo",h("ExpoOut",function(t){return 1-Math.pow(2,-10*t)}),h("ExpoIn",function(t){return Math.pow(2,10*(t-1))-.001}),h("ExpoInOut",function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))})),c("Sine",h("SineOut",function(t){return Math.sin(t*o)}),h("SineIn",function(t){return-Math.cos(t*o)+1}),h("SineInOut",function(t){return-.5*(Math.cos(Math.PI*t)-1)})),l("easing.EaseLookup",{find:function(e){return t.map[e]}},!0),u(n.SlowMo,"SlowMo","ease,"),u(i,"RoughEase","ease,"),u(e,"SteppedEase","ease,"),p},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(t,e){var i={},r=t.document,n=t.GreenSockGlobals=t.GreenSockGlobals||t;if(!n.TweenLite){var s,a,o,l,h,u=function(t){var e,i=t.split("."),r=n;for(e=0;e<i.length;e++)r[i[e]]=r=r[i[e]]||{};return r},c=u("com.greensock"),d=1e-10,f=function(t){ var e,i=[],r=t.length;for(e=0;e!==r;i.push(t[e++]));return i},p=function(){},_=function(){var t=Object.prototype.toString,e=t.call([]);return function(i){return null!=i&&(i instanceof Array||"object"==typeof i&&!!i.push&&t.call(i)===e)}}(),m={},g=function(r,s,a,o){this.sc=m[r]?m[r].sc:[],m[r]=this,this.gsClass=null,this.func=a;var l=[];this.check=function(h){for(var c,d,f,p,_,v=s.length,y=v;--v>-1;)(c=m[s[v]]||new g(s[v],[])).gsClass?(l[v]=c.gsClass,y--):h&&c.sc.push(this);if(0===y&&a){if(d=("com.greensock."+r).split("."),f=d.pop(),p=u(d.join("."))[f]=this.gsClass=a.apply(a,l),o)if(n[f]=i[f]=p,_="undefined"!=typeof module&&module.exports,!_&&"function"==typeof define&&define.amd)define((t.GreenSockAMDPath?t.GreenSockAMDPath+"/":"")+r.split(".").pop(),[],function(){return p});else if(_)if(r===e){module.exports=i[e]=p;for(v in i)p[v]=i[v]}else i[e]&&(i[e][f]=p);for(v=0;v<this.sc.length;v++)this.sc[v].check()}},this.check(!0)},v=t._gsDefine=function(t,e,i,r){return new g(t,e,i,r)},y=c._class=function(t,e,i){return e=e||function(){},v(t,[],function(){return e},i),e};v.globals=n;var T=[0,0,1,1],b=y("easing.Ease",function(t,e,i,r){this._func=t,this._type=i||0,this._power=r||0,this._params=e?T.concat(e):T},!0),x=b.map={},w=b.register=function(t,e,i,r){for(var n,s,a,o,l=e.split(","),h=l.length,u=(i||"easeIn,easeOut,easeInOut").split(",");--h>-1;)for(s=l[h],n=r?y("easing."+s,null,!0):c.easing[s]||{},a=u.length;--a>-1;)o=u[a],x[s+"."+o]=x[o+s]=n[o]=t.getRatio?t:t[o]||new t};for(o=b.prototype,o._calcEnd=!1,o.getRatio=function(t){if(this._func)return this._params[0]=t,this._func.apply(null,this._params);var e=this._type,i=this._power,r=1===e?1-t:2===e?t:t<.5?2*t:2*(1-t);return 1===i?r*=r:2===i?r*=r*r:3===i?r*=r*r*r:4===i&&(r*=r*r*r*r),1===e?1-r:2===e?r:t<.5?r/2:1-r/2},s=["Linear","Quad","Cubic","Quart","Quint,Strong"],a=s.length;--a>-1;)o=s[a]+",Power"+a,w(new b(null,null,1,a),o,"easeOut",!0),w(new b(null,null,2,a),o,"easeIn"+(0===a?",easeNone":"")),w(new b(null,null,3,a),o,"easeInOut");x.linear=c.easing.Linear.easeIn,x.swing=c.easing.Quad.easeInOut;var E=y("events.EventDispatcher",function(t){this._listeners={},this._eventTarget=t||this});o=E.prototype,o.addEventListener=function(t,e,i,r,n){n=n||0;var s,a,o=this._listeners[t],u=0;for(this!==l||h||l.wake(),null==o&&(this._listeners[t]=o=[]),a=o.length;--a>-1;)s=o[a],s.c===e&&s.s===i?o.splice(a,1):0===u&&s.pr<n&&(u=a+1);o.splice(u,0,{c:e,s:i,up:r,pr:n})},o.removeEventListener=function(t,e){var i,r=this._listeners[t];if(r)for(i=r.length;--i>-1;)if(r[i].c===e)return void r.splice(i,1)},o.dispatchEvent=function(t){var e,i,r,n=this._listeners[t];if(n)for(e=n.length,e>1&&(n=n.slice(0)),i=this._eventTarget;--e>-1;)r=n[e],r&&(r.up?r.c.call(r.s||i,{type:t,target:i}):r.c.call(r.s||i))};var S=t.requestAnimationFrame,D=t.cancelAnimationFrame,A=Date.now||function(){return(new Date).getTime()},P=A();for(s=["ms","moz","webkit","o"],a=s.length;--a>-1&&!S;)S=t[s[a]+"RequestAnimationFrame"],D=t[s[a]+"CancelAnimationFrame"]||t[s[a]+"CancelRequestAnimationFrame"];y("Ticker",function(t,e){var i,n,s,a,o,u=this,c=A(),f=!(e===!1||!S)&&"auto",_=500,m=33,g="tick",v=function(t){var e,r,l=A()-P;l>_&&(c+=l-m),P+=l,u.time=(P-c)/1e3,e=u.time-o,(!i||e>0||t===!0)&&(u.frame++,o+=e+(e>=a?.004:a-e),r=!0),t!==!0&&(s=n(v)),r&&u.dispatchEvent(g)};E.call(u),u.time=u.frame=0,u.tick=function(){v(!0)},u.lagSmoothing=function(t,e){_=t||1/d,m=Math.min(e,_,0)},u.sleep=function(){null!=s&&(f&&D?D(s):clearTimeout(s),n=p,s=null,u===l&&(h=!1))},u.wake=function(t){null!==s?u.sleep():t?c+=-P+(P=A()):u.frame>10&&(P=A()-_+5),n=0===i?p:f&&S?S:function(t){return setTimeout(t,1e3*(o-u.time)+1|0)},u===l&&(h=!0),v(2)},u.fps=function(t){return arguments.length?(i=t,a=1/(i||60),o=this.time+a,void u.wake()):i},u.useRAF=function(t){return arguments.length?(u.sleep(),f=t,void u.fps(i)):f},u.fps(t),setTimeout(function(){"auto"===f&&u.frame<5&&"hidden"!==r.visibilityState&&u.useRAF(!1)},1500)}),o=c.Ticker.prototype=new c.events.EventDispatcher,o.constructor=c.Ticker;var O=y("core.Animation",function(t,e){if(this.vars=e=e||{},this._duration=this._totalDuration=t||0,this._delay=Number(e.delay)||0,this._timeScale=1,this._active=e.immediateRender===!0,this.data=e.data,this._reversed=e.reversed===!0,z){h||l.wake();var i=this.vars.useFrames?q:z;i.add(this,i._time),this.vars.paused&&this.paused(!0)}});l=O.ticker=new c.Ticker,o=O.prototype,o._dirty=o._gc=o._initted=o._paused=!1,o._totalTime=o._time=0,o._rawPrevTime=-1,o._next=o._last=o._onUpdate=o._timeline=o.timeline=null,o._paused=!1;var C=function(){h&&A()-P>2e3&&l.wake(),setTimeout(C,2e3)};C(),o.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},o.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},o.resume=function(t,e){return null!=t&&this.seek(t,e),this.paused(!1)},o.seek=function(t,e){return this.totalTime(Number(t),e!==!1)},o.restart=function(t,e){return this.reversed(!1).paused(!1).totalTime(t?-this._delay:0,e!==!1,!0)},o.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},o.render=function(t,e,i){},o.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,!this._gc&&this.timeline||this._enabled(!0),this},o.isActive=function(){var t,e=this._timeline,i=this._startTime;return!e||!this._gc&&!this._paused&&e.isActive()&&(t=e.rawTime(!0))>=i&&t<i+this.totalDuration()/this._timeScale},o._enabled=function(t,e){return h||l.wake(),this._gc=!t,this._active=this.isActive(),e!==!0&&(t&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!t&&this.timeline&&this._timeline._remove(this,!0)),!1},o._kill=function(t,e){return this._enabled(!1,!1)},o.kill=function(t,e){return this._kill(t,e),this},o._uncache=function(t){for(var e=t?this:this.timeline;e;)e._dirty=!0,e=e.timeline;return this},o._swapSelfInParams=function(t){for(var e=t.length,i=t.concat();--e>-1;)"{self}"===t[e]&&(i[e]=this);return i},o._callback=function(t){var e=this.vars,i=e[t],r=e[t+"Params"],n=e[t+"Scope"]||e.callbackScope||this,s=r?r.length:0;switch(s){case 0:i.call(n);break;case 1:i.call(n,r[0]);break;case 2:i.call(n,r[0],r[1]);break;default:i.apply(n,r)}},o.eventCallback=function(t,e,i,r){if("on"===(t||"").substr(0,2)){var n=this.vars;if(1===arguments.length)return n[t];null==e?delete n[t]:(n[t]=e,n[t+"Params"]=_(i)&&i.join("").indexOf("{self}")!==-1?this._swapSelfInParams(i):i,n[t+"Scope"]=r),"onUpdate"===t&&(this._onUpdate=e)}return this},o.delay=function(t){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+t-this._delay),this._delay=t,this):this._delay},o.duration=function(t){return arguments.length?(this._duration=this._totalDuration=t,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&0!==t&&this.totalTime(this._totalTime*(t/this._duration),!0),this):(this._dirty=!1,this._duration)},o.totalDuration=function(t){return this._dirty=!1,arguments.length?this.duration(t):this._totalDuration},o.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(t>this._duration?this._duration:t,e)):this._time},o.totalTime=function(t,e,i){if(h||l.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(t<0&&!i&&(t+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var r=this._totalDuration,n=this._timeline;if(t>r&&!i&&(t=r),this._startTime=(this._paused?this._pauseTime:n._time)-(this._reversed?r-t:t)/this._timeScale,n._dirty||this._uncache(!1),n._timeline)for(;n._timeline;)n._timeline._time!==(n._startTime+n._totalTime)/n._timeScale&&n.totalTime(n._totalTime,!0),n=n._timeline}this._gc&&this._enabled(!0,!1),this._totalTime===t&&0!==this._duration||(N.length&&J(),this.render(t,e,!1),N.length&&J())}return this},o.progress=o.totalProgress=function(t,e){var i=this.duration();return arguments.length?this.totalTime(i*t,e):i?this._time/i:this.ratio},o.startTime=function(t){return arguments.length?(t!==this._startTime&&(this._startTime=t,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,t-this._delay)),this):this._startTime},o.endTime=function(t){return this._startTime+(0!=t?this.totalDuration():this.duration())/this._timeScale},o.timeScale=function(t){if(!arguments.length)return this._timeScale;if(t=t||d,this._timeline&&this._timeline.smoothChildTiming){var e=this._pauseTime,i=e||0===e?e:this._timeline.totalTime();this._startTime=i-(i-this._startTime)*this._timeScale/t}return this._timeScale=t,this._uncache(!1)},o.reversed=function(t){return arguments.length?(t!=this._reversed&&(this._reversed=t,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},o.paused=function(t){if(!arguments.length)return this._paused;var e,i,r=this._timeline;return t!=this._paused&&r&&(h||t||l.wake(),e=r.rawTime(),i=e-this._pauseTime,!t&&r.smoothChildTiming&&(this._startTime+=i,this._uncache(!1)),this._pauseTime=t?e:null,this._paused=t,this._active=this.isActive(),!t&&0!==i&&this._initted&&this.duration()&&(e=r.smoothChildTiming?this._totalTime:(e-this._startTime)/this._timeScale,this.render(e,e===this._totalTime,!0))),this._gc&&!t&&this._enabled(!0,!1),this};var M=y("core.SimpleTimeline",function(t){O.call(this,0,t),this.autoRemoveChildren=this.smoothChildTiming=!0});o=M.prototype=new O,o.constructor=M,o.kill()._gc=!1,o._first=o._last=o._recent=null,o._sortChildren=!1,o.add=o.insert=function(t,e,i,r){var n,s;if(t._startTime=Number(e||0)+t._delay,t._paused&&this!==t._timeline&&(t._pauseTime=t._startTime+(this.rawTime()-t._startTime)/t._timeScale),t.timeline&&t.timeline._remove(t,!0),t.timeline=t._timeline=this,t._gc&&t._enabled(!0,!0),n=this._last,this._sortChildren)for(s=t._startTime;n&&n._startTime>s;)n=n._prev;return n?(t._next=n._next,n._next=t):(t._next=this._first,this._first=t),t._next?t._next._prev=t:this._last=t,t._prev=n,this._recent=t,this._timeline&&this._uncache(!0),this},o._remove=function(t,e){return t.timeline===this&&(e||t._enabled(!1,!0),t._prev?t._prev._next=t._next:this._first===t&&(this._first=t._next),t._next?t._next._prev=t._prev:this._last===t&&(this._last=t._prev),t._next=t._prev=t.timeline=null,t===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},o.render=function(t,e,i){var r,n=this._first;for(this._totalTime=this._time=this._rawPrevTime=t;n;)r=n._next,(n._active||t>=n._startTime&&!n._paused)&&(n._reversed?n.render((n._dirty?n.totalDuration():n._totalDuration)-(t-n._startTime)*n._timeScale,e,i):n.render((t-n._startTime)*n._timeScale,e,i)),n=r},o.rawTime=function(){return h||l.wake(),this._totalTime};var L=y("TweenLite",function(e,i,r){if(O.call(this,i,r),this.render=L.prototype.render,null==e)throw"Cannot tween a null target.";this.target=e="string"!=typeof e?e:L.selector(e)||e;var n,s,a,o=e.jquery||e.length&&e!==t&&e[0]&&(e[0]===t||e[0].nodeType&&e[0].style&&!e.nodeType),l=this.vars.overwrite;if(this._overwrite=l=null==l?W[L.defaultOverwrite]:"number"==typeof l?l>>0:W[l],(o||e instanceof Array||e.push&&_(e))&&"number"!=typeof e[0])for(this._targets=a=f(e),this._propLookup=[],this._siblings=[],n=0;n<a.length;n++)s=a[n],s?"string"!=typeof s?s.length&&s!==t&&s[0]&&(s[0]===t||s[0].nodeType&&s[0].style&&!s.nodeType)?(a.splice(n--,1),this._targets=a=a.concat(f(s))):(this._siblings[n]=K(s,this,!1),1===l&&this._siblings[n].length>1&&$(s,this,null,1,this._siblings[n])):(s=a[n--]=L.selector(s),"string"==typeof s&&a.splice(n+1,1)):a.splice(n--,1);else this._propLookup={},this._siblings=K(e,this,!1),1===l&&this._siblings.length>1&&$(e,this,null,1,this._siblings);(this.vars.immediateRender||0===i&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-d,this.render(Math.min(0,-this._delay)))},!0),R=function(e){return e&&e.length&&e!==t&&e[0]&&(e[0]===t||e[0].nodeType&&e[0].style&&!e.nodeType)},I=function(t,e){var i,r={};for(i in t)G[i]||i in e&&"transform"!==i&&"x"!==i&&"y"!==i&&"width"!==i&&"height"!==i&&"className"!==i&&"border"!==i||!(!H[i]||H[i]&&H[i]._autoCSS)||(r[i]=t[i],delete t[i]);t.css=r};o=L.prototype=new O,o.constructor=L,o.kill()._gc=!1,o.ratio=0,o._firstPT=o._targets=o._overwrittenProps=o._startAt=null,o._notifyPluginsOfEnabled=o._lazy=!1,L.version="1.19.1",L.defaultEase=o._ease=new b(null,null,1,1),L.defaultOverwrite="auto",L.ticker=l,L.autoSleep=120,L.lagSmoothing=function(t,e){l.lagSmoothing(t,e)},L.selector=t.$||t.jQuery||function(e){var i=t.$||t.jQuery;return i?(L.selector=i,i(e)):"undefined"==typeof r?e:r.querySelectorAll?r.querySelectorAll(e):r.getElementById("#"===e.charAt(0)?e.substr(1):e)};var N=[],j={},F=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,B=function(t){for(var e,i=this._firstPT,r=1e-6;i;)e=i.blob?1===t?this.end:t?this.join(""):this.start:i.c*t+i.s,i.m?e=i.m(e,this._target||i.t):e<r&&e>-r&&!i.blob&&(e=0),i.f?i.fp?i.t[i.p](i.fp,e):i.t[i.p](e):i.t[i.p]=e,i=i._next},k=function(t,e,i,r){var n,s,a,o,l,h,u,c=[],d=0,f="",p=0;for(c.start=t,c.end=e,t=c[0]=t+"",e=c[1]=e+"",i&&(i(c),t=c[0],e=c[1]),c.length=0,n=t.match(F)||[],s=e.match(F)||[],r&&(r._next=null,r.blob=1,c._firstPT=c._applyPT=r),l=s.length,o=0;o<l;o++)u=s[o],h=e.substr(d,e.indexOf(u,d)-d),f+=h||!o?h:",",d+=h.length,p?p=(p+1)%5:"rgba("===h.substr(-5)&&(p=1),u===n[o]||n.length<=o?f+=u:(f&&(c.push(f),f=""),a=parseFloat(n[o]),c.push(a),c._firstPT={_next:c._firstPT,t:c,p:c.length-1,s:a,c:("="===u.charAt(1)?parseInt(u.charAt(0)+"1",10)*parseFloat(u.substr(2)):parseFloat(u)-a)||0,f:0,m:p&&p<4?Math.round:0}),d+=u.length;return f+=e.substr(d),f&&c.push(f),c.setRatio=B,c},U=function(t,e,i,r,n,s,a,o,l){"function"==typeof r&&(r=r(l||0,t));var h,u=typeof t[e],c="function"!==u?"":e.indexOf("set")||"function"!=typeof t["get"+e.substr(3)]?e:"get"+e.substr(3),d="get"!==i?i:c?a?t[c](a):t[c]():t[e],f="string"==typeof r&&"="===r.charAt(1),p={t:t,p:e,s:d,f:"function"===u,pg:0,n:n||e,m:s?"function"==typeof s?s:Math.round:0,pr:0,c:f?parseInt(r.charAt(0)+"1",10)*parseFloat(r.substr(2)):parseFloat(r)-d||0};if(("number"!=typeof d||"number"!=typeof r&&!f)&&(a||isNaN(d)||!f&&isNaN(r)||"boolean"==typeof d||"boolean"==typeof r?(p.fp=a,h=k(d,f?p.s+p.c:r,o||L.defaultStringFilter,p),p={t:h,p:"setRatio",s:0,c:1,f:2,pg:0,n:n||e,pr:0,m:0}):(p.s=parseFloat(d),f||(p.c=parseFloat(r)-p.s||0))),p.c)return(p._next=this._firstPT)&&(p._next._prev=p),this._firstPT=p,p},X=L._internals={isArray:_,isSelector:R,lazyTweens:N,blobDif:k},H=L._plugins={},V=X.tweenLookup={},Y=0,G=X.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1},W={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},q=O._rootFramesTimeline=new M,z=O._rootTimeline=new M,Z=30,J=X.lazyRender=function(){var t,e=N.length;for(j={};--e>-1;)t=N[e],t&&t._lazy!==!1&&(t.render(t._lazy[0],t._lazy[1],!0),t._lazy=!1);N.length=0};z._startTime=l.time,q._startTime=l.frame,z._active=q._active=!0,setTimeout(J,1),O._updateRoot=L.render=function(){var t,e,i;if(N.length&&J(),z.render((l.time-z._startTime)*z._timeScale,!1,!1),q.render((l.frame-q._startTime)*q._timeScale,!1,!1),N.length&&J(),l.frame>=Z){Z=l.frame+(parseInt(L.autoSleep,10)||120);for(i in V){for(e=V[i].tweens,t=e.length;--t>-1;)e[t]._gc&&e.splice(t,1);0===e.length&&delete V[i]}if(i=z._first,(!i||i._paused)&&L.autoSleep&&!q._first&&1===l._listeners.tick.length){for(;i&&i._paused;)i=i._next;i||l.sleep()}}},l.addEventListener("tick",O._updateRoot);var K=function(t,e,i){var r,n,s=t._gsTweenID;if(V[s||(t._gsTweenID=s="t"+Y++)]||(V[s]={target:t,tweens:[]}),e&&(r=V[s].tweens,r[n=r.length]=e,i))for(;--n>-1;)r[n]===e&&r.splice(n,1);return V[s].tweens},Q=function(t,e,i,r){var n,s,a=t.vars.onOverwrite;return a&&(n=a(t,e,i,r)),a=L.onOverwrite,a&&(s=a(t,e,i,r)),n!==!1&&s!==!1},$=function(t,e,i,r,n){var s,a,o,l;if(1===r||r>=4){for(l=n.length,s=0;s<l;s++)if((o=n[s])!==e)o._gc||o._kill(null,t,e)&&(a=!0);else if(5===r)break;return a}var h,u=e._startTime+d,c=[],f=0,p=0===e._duration;for(s=n.length;--s>-1;)(o=n[s])===e||o._gc||o._paused||(o._timeline!==e._timeline?(h=h||tt(e,0,p),0===tt(o,h,p)&&(c[f++]=o)):o._startTime<=u&&o._startTime+o.totalDuration()/o._timeScale>u&&((p||!o._initted)&&u-o._startTime<=2e-10||(c[f++]=o)));for(s=f;--s>-1;)if(o=c[s],2===r&&o._kill(i,t,e)&&(a=!0),2!==r||!o._firstPT&&o._initted){if(2!==r&&!Q(o,e))continue;o._enabled(!1,!1)&&(a=!0)}return a},tt=function(t,e,i){for(var r=t._timeline,n=r._timeScale,s=t._startTime;r._timeline;){if(s+=r._startTime,n*=r._timeScale,r._paused)return-100;r=r._timeline}return s/=n,s>e?s-e:i&&s===e||!t._initted&&s-e<2*d?d:(s+=t.totalDuration()/t._timeScale/n)>e+d?0:s-e-d};o._init=function(){var t,e,i,r,n,s,a=this.vars,o=this._overwrittenProps,l=this._duration,h=!!a.immediateRender,u=a.ease;if(a.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),n={};for(r in a.startAt)n[r]=a.startAt[r];if(n.overwrite=!1,n.immediateRender=!0,n.lazy=h&&a.lazy!==!1,n.startAt=n.delay=null,this._startAt=L.to(this.target,0,n),h)if(this._time>0)this._startAt=null;else if(0!==l)return}else if(a.runBackwards&&0!==l)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(h=!1),i={};for(r in a)G[r]&&"autoCSS"!==r||(i[r]=a[r]);if(i.overwrite=0,i.data="isFromStart",i.lazy=h&&a.lazy!==!1,i.immediateRender=h,this._startAt=L.to(this.target,0,i),h){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=u=u?u instanceof b?u:"function"==typeof u?new b(u,a.easeParams):x[u]||L.defaultEase:L.defaultEase,a.easeParams instanceof Array&&u.config&&(this._ease=u.config.apply(u,a.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(s=this._targets.length,t=0;t<s;t++)this._initProps(this._targets[t],this._propLookup[t]={},this._siblings[t],o?o[t]:null,t)&&(e=!0);else e=this._initProps(this.target,this._propLookup,this._siblings,o,0);if(e&&L._onPluginEvent("_onInitAllProps",this),o&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),a.runBackwards)for(i=this._firstPT;i;)i.s+=i.c,i.c=-i.c,i=i._next;this._onUpdate=a.onUpdate,this._initted=!0},o._initProps=function(e,i,r,n,s){var a,o,l,h,u,c;if(null==e)return!1;j[e._gsTweenID]&&J(),this.vars.css||e.style&&e!==t&&e.nodeType&&H.css&&this.vars.autoCSS!==!1&&I(this.vars,e);for(a in this.vars)if(c=this.vars[a],G[a])c&&(c instanceof Array||c.push&&_(c))&&c.join("").indexOf("{self}")!==-1&&(this.vars[a]=c=this._swapSelfInParams(c,this));else if(H[a]&&(h=new H[a])._onInitTween(e,this.vars[a],this,s)){for(this._firstPT=u={_next:this._firstPT,t:h,p:"setRatio",s:0,c:1,f:1,n:a,pg:1,pr:h._priority,m:0},o=h._overwriteProps.length;--o>-1;)i[h._overwriteProps[o]]=this._firstPT;(h._priority||h._onInitAllProps)&&(l=!0),(h._onDisable||h._onEnable)&&(this._notifyPluginsOfEnabled=!0),u._next&&(u._next._prev=u)}else i[a]=U.call(this,e,a,"get",c,a,0,null,this.vars.stringFilter,s);return n&&this._kill(n,e)?this._initProps(e,i,r,n,s):this._overwrite>1&&this._firstPT&&r.length>1&&$(e,this,i,this._overwrite,r)?(this._kill(i,e),this._initProps(e,i,r,n,s)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(j[e._gsTweenID]=!0),l)},o.render=function(t,e,i){var r,n,s,a,o=this._time,l=this._duration,h=this._rawPrevTime;if(t>=l-1e-7&&t>=0)this._totalTime=this._time=l,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(r=!0,n="onComplete",i=i||this._timeline.autoRemoveChildren),0===l&&(this._initted||!this.vars.lazy||i)&&(this._startTime===this._timeline._duration&&(t=0),(h<0||t<=0&&t>=-1e-7||h===d&&"isPause"!==this.data)&&h!==t&&(i=!0,h>d&&(n="onReverseComplete")),this._rawPrevTime=a=!e||t||h===t?t:d);else if(t<1e-7)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==o||0===l&&h>0)&&(n="onReverseComplete",r=this._reversed),t<0&&(this._active=!1,0===l&&(this._initted||!this.vars.lazy||i)&&(h>=0&&(h!==d||"isPause"!==this.data)&&(i=!0),this._rawPrevTime=a=!e||t||h===t?t:d)),this._initted||(i=!0);else if(this._totalTime=this._time=t,this._easeType){var u=t/l,c=this._easeType,f=this._easePower;(1===c||3===c&&u>=.5)&&(u=1-u),3===c&&(u*=2),1===f?u*=u:2===f?u*=u*u:3===f?u*=u*u*u:4===f&&(u*=u*u*u*u),1===c?this.ratio=1-u:2===c?this.ratio=u:t/l<.5?this.ratio=u/2:this.ratio=1-u/2}else this.ratio=this._ease.getRatio(t/l);if(this._time!==o||i){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!i&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=o,this._rawPrevTime=h,N.push(this),void(this._lazy=[t,e]);this._time&&!r?this.ratio=this._ease.getRatio(this._time/l):r&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==o&&t>=0&&(this._active=!0),0===o&&(this._startAt&&(t>=0?this._startAt.render(t,e,i):n||(n="_dummyGS")),this.vars.onStart&&(0===this._time&&0!==l||e||this._callback("onStart"))),s=this._firstPT;s;)s.f?s.t[s.p](s.c*this.ratio+s.s):s.t[s.p]=s.c*this.ratio+s.s,s=s._next;this._onUpdate&&(t<0&&this._startAt&&t!==-1e-4&&this._startAt.render(t,e,i),e||(this._time!==o||r||i)&&this._callback("onUpdate")),n&&(this._gc&&!i||(t<0&&this._startAt&&!this._onUpdate&&t!==-1e-4&&this._startAt.render(t,e,i),r&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[n]&&this._callback(n),0===l&&this._rawPrevTime===d&&a!==d&&(this._rawPrevTime=0)))}},o._kill=function(t,e,i){if("all"===t&&(t=null),null==t&&(null==e||e===this.target))return this._lazy=!1,this._enabled(!1,!1);e="string"!=typeof e?e||this._targets||this.target:L.selector(e)||e;var r,n,s,a,o,l,h,u,c,d=i&&this._time&&i._startTime===this._startTime&&this._timeline===i._timeline;if((_(e)||R(e))&&"number"!=typeof e[0])for(r=e.length;--r>-1;)this._kill(t,e[r],i)&&(l=!0);else{if(this._targets){for(r=this._targets.length;--r>-1;)if(e===this._targets[r]){o=this._propLookup[r]||{},this._overwrittenProps=this._overwrittenProps||[],n=this._overwrittenProps[r]=t?this._overwrittenProps[r]||{}:"all";break}}else{if(e!==this.target)return!1;o=this._propLookup,n=this._overwrittenProps=t?this._overwrittenProps||{}:"all"}if(o){if(h=t||o,u=t!==n&&"all"!==n&&t!==o&&("object"!=typeof t||!t._tempKill),i&&(L.onOverwrite||this.vars.onOverwrite)){for(s in h)o[s]&&(c||(c=[]),c.push(s));if((c||!t)&&!Q(this,i,e,c))return!1}for(s in h)(a=o[s])&&(d&&(a.f?a.t[a.p](a.s):a.t[a.p]=a.s,l=!0),a.pg&&a.t._kill(h)&&(l=!0),a.pg&&0!==a.t._overwriteProps.length||(a._prev?a._prev._next=a._next:a===this._firstPT&&(this._firstPT=a._next),a._next&&(a._next._prev=a._prev),a._next=a._prev=null),delete o[s]),u&&(n[s]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return l},o.invalidate=function(){return this._notifyPluginsOfEnabled&&L._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],O.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-d,this.render(Math.min(0,-this._delay))),this},o._enabled=function(t,e){if(h||l.wake(),t&&this._gc){var i,r=this._targets;if(r)for(i=r.length;--i>-1;)this._siblings[i]=K(r[i],this,!0);else this._siblings=K(this.target,this,!0)}return O.prototype._enabled.call(this,t,e),!(!this._notifyPluginsOfEnabled||!this._firstPT)&&L._onPluginEvent(t?"_onEnable":"_onDisable",this)},L.to=function(t,e,i){return new L(t,e,i)},L.from=function(t,e,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new L(t,e,i)},L.fromTo=function(t,e,i,r){return r.startAt=i,r.immediateRender=0!=r.immediateRender&&0!=i.immediateRender,new L(t,e,r)},L.delayedCall=function(t,e,i,r,n){return new L(e,0,{delay:t,onComplete:e,onCompleteParams:i,callbackScope:r,onReverseComplete:e,onReverseCompleteParams:i,immediateRender:!1,lazy:!1,useFrames:n,overwrite:0})},L.set=function(t,e){return new L(t,0,e)},L.getTweensOf=function(t,e){if(null==t)return[];t="string"!=typeof t?t:L.selector(t)||t;var i,r,n,s;if((_(t)||R(t))&&"number"!=typeof t[0]){for(i=t.length,r=[];--i>-1;)r=r.concat(L.getTweensOf(t[i],e));for(i=r.length;--i>-1;)for(s=r[i],n=i;--n>-1;)s===r[n]&&r.splice(i,1)}else for(r=K(t).concat(),i=r.length;--i>-1;)(r[i]._gc||e&&!r[i].isActive())&&r.splice(i,1);return r},L.killTweensOf=L.killDelayedCallsTo=function(t,e,i){"object"==typeof e&&(i=e,e=!1);for(var r=L.getTweensOf(t,e),n=r.length;--n>-1;)r[n]._kill(i,t)};var et=y("plugins.TweenPlugin",function(t,e){this._overwriteProps=(t||"").split(","),this._propName=this._overwriteProps[0],this._priority=e||0,this._super=et.prototype},!0);if(o=et.prototype,et.version="1.19.0",et.API=2,o._firstPT=null,o._addTween=U,o.setRatio=B,o._kill=function(t){var e,i=this._overwriteProps,r=this._firstPT;if(null!=t[this._propName])this._overwriteProps=[];else for(e=i.length;--e>-1;)null!=t[i[e]]&&i.splice(e,1);for(;r;)null!=t[r.n]&&(r._next&&(r._next._prev=r._prev),r._prev?(r._prev._next=r._next,r._prev=null):this._firstPT===r&&(this._firstPT=r._next)),r=r._next;return!1},o._mod=o._roundProps=function(t){for(var e,i=this._firstPT;i;)e=t[this._propName]||null!=i.n&&t[i.n.split(this._propName+"_").join("")],e&&"function"==typeof e&&(2===i.f?i.t._applyPT.m=e:i.m=e),i=i._next},L._onPluginEvent=function(t,e){var i,r,n,s,a,o=e._firstPT;if("_onInitAllProps"===t){for(;o;){for(a=o._next,r=n;r&&r.pr>o.pr;)r=r._next;(o._prev=r?r._prev:s)?o._prev._next=o:n=o,(o._next=r)?r._prev=o:s=o,o=a}o=e._firstPT=n}for(;o;)o.pg&&"function"==typeof o.t[t]&&o.t[t]()&&(i=!0),o=o._next;return i},et.activate=function(t){for(var e=t.length;--e>-1;)t[e].API===et.API&&(H[(new t[e])._propName]=t[e]);return!0},v.plugin=function(t){if(!(t&&t.propName&&t.init&&t.API))throw"illegal plugin definition.";var e,i=t.propName,r=t.priority||0,n=t.overwriteProps,s={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},a=y("plugins."+i.charAt(0).toUpperCase()+i.substr(1)+"Plugin",function(){et.call(this,i,r),this._overwriteProps=n||[]},t.global===!0),o=a.prototype=new et(i);o.constructor=a,a.API=t.API;for(e in s)"function"==typeof t[e]&&(o[s[e]]=t[e]);return a.version=t.version,et.activate([a]),a},s=t._gsQueue){for(a=0;a<s.length;a++)s[a]();for(o in m)m[o].func||t.console.log("GSAP encountered missing dependency: "+o)}h=!1}}("undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window,"TweenMax"),this.createjs=this.createjs||{},function(){var t=createjs.PreloadJS=createjs.PreloadJS||{};t.version="0.6.2",t.buildDate="Thu, 26 Nov 2015 20:44:31 GMT"}(),this.createjs=this.createjs||{},createjs.extend=function(t,e){function i(){this.constructor=t}return i.prototype=e.prototype,t.prototype=new i},this.createjs=this.createjs||{},createjs.promote=function(t,e){var i=t.prototype,r=Object.getPrototypeOf&&Object.getPrototypeOf(i)||i.__proto__;if(r){i[(e+="_")+"constructor"]=r.constructor;for(var n in r)i.hasOwnProperty(n)&&"function"==typeof r[n]&&(i[e+n]=r[n])}return t},this.createjs=this.createjs||{},function(){createjs.proxy=function(t,e){var i=Array.prototype.slice.call(arguments,2);return function(){return t.apply(e,Array.prototype.slice.call(arguments,0).concat(i))}}}(),this.createjs=this.createjs||{},createjs.indexOf=function(t,e){for(var i=0,r=t.length;i<r;i++)if(e===t[i])return i;return-1},this.createjs=this.createjs||{},function(){function t(t,e,i){this.type=t,this.target=null,this.currentTarget=null,this.eventPhase=0,this.bubbles=!!e,this.cancelable=!!i,this.timeStamp=(new Date).getTime(),this.defaultPrevented=!1,this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.removed=!1}var e=t.prototype;e.preventDefault=function(){this.defaultPrevented=this.cancelable&&!0},e.stopPropagation=function(){this.propagationStopped=!0},e.stopImmediatePropagation=function(){this.immediatePropagationStopped=this.propagationStopped=!0},e.remove=function(){this.removed=!0},e.clone=function(){return new t(this.type,this.bubbles,this.cancelable)},e.set=function(t){for(var e in t)this[e]=t[e];return this},e.toString=function(){return"[Event (type="+this.type+")]"},createjs.Event=t}(),this.createjs=this.createjs||{},function(){function t(t,e,i){this.Event_constructor("error"),this.title=t,this.message=e,this.data=i}var e=createjs.extend(t,createjs.Event);e.clone=function(){return new createjs.ErrorEvent(this.title,this.message,this.data)},createjs.ErrorEvent=createjs.promote(t,"Event")}(),this.createjs=this.createjs||{},function(){function t(){this._listeners=null,this._captureListeners=null}var e=t.prototype;t.initialize=function(t){t.addEventListener=e.addEventListener,t.on=e.on,t.removeEventListener=t.off=e.removeEventListener,t.removeAllEventListeners=e.removeAllEventListeners,t.hasEventListener=e.hasEventListener,t.dispatchEvent=e.dispatchEvent,t._dispatchEvent=e._dispatchEvent,t.willTrigger=e.willTrigger},e.addEventListener=function(t,e,i){var r;r=i?this._captureListeners=this._captureListeners||{}:this._listeners=this._listeners||{};var n=r[t];return n&&this.removeEventListener(t,e,i),n=r[t],n?n.push(e):r[t]=[e],e},e.on=function(t,e,i,r,n,s){return e.handleEvent&&(i=i||e,e=e.handleEvent),i=i||this,this.addEventListener(t,function(t){e.call(i,t,n),r&&t.remove()},s)},e.removeEventListener=function(t,e,i){var r=i?this._captureListeners:this._listeners;if(r){var n=r[t];if(n)for(var s=0,a=n.length;s<a;s++)if(n[s]==e){1==a?delete r[t]:n.splice(s,1);break}}},e.off=e.removeEventListener,e.removeAllEventListeners=function(t){t?(this._listeners&&delete this._listeners[t],this._captureListeners&&delete this._captureListeners[t]):this._listeners=this._captureListeners=null},e.dispatchEvent=function(t,e,i){if("string"==typeof t){var r=this._listeners;if(!(e||r&&r[t]))return!0;t=new createjs.Event(t,e,i)}else t.target&&t.clone&&(t=t.clone());try{t.target=this}catch(t){}if(t.bubbles&&this.parent){for(var n=this,s=[n];n.parent;)s.push(n=n.parent);var a,o=s.length;for(a=o-1;a>=0&&!t.propagationStopped;a--)s[a]._dispatchEvent(t,1+(0==a));for(a=1;a<o&&!t.propagationStopped;a++)s[a]._dispatchEvent(t,3)}else this._dispatchEvent(t,2);return!t.defaultPrevented},e.hasEventListener=function(t){var e=this._listeners,i=this._captureListeners;return!!(e&&e[t]||i&&i[t])},e.willTrigger=function(t){for(var e=this;e;){if(e.hasEventListener(t))return!0;e=e.parent}return!1},e.toString=function(){return"[EventDispatcher]"},e._dispatchEvent=function(t,e){var i,r=1==e?this._captureListeners:this._listeners;if(t&&r){var n=r[t.type];if(!n||!(i=n.length))return;try{t.currentTarget=this}catch(t){}try{t.eventPhase=e}catch(t){}t.removed=!1,n=n.slice();for(var s=0;s<i&&!t.immediatePropagationStopped;s++){var a=n[s];a.handleEvent?a.handleEvent(t):a(t),t.removed&&(this.off(t.type,a,1==e),t.removed=!1)}}},createjs.EventDispatcher=t}(),this.createjs=this.createjs||{},function(t){function e(t,e){this.Event_constructor("progress"),this.loaded=t,this.total=null==e?1:e,this.progress=0==e?0:this.loaded/this.total}var i=createjs.extend(e,createjs.Event);i.clone=function(){return new createjs.ProgressEvent(this.loaded,this.total)},createjs.ProgressEvent=createjs.promote(e,"Event")}(window),function(){function t(e,r){function s(t){if(s[t]!==m)return s[t];var e;if("bug-string-char-index"==t)e="a"!="a"[0];else if("json"==t)e=s("json-stringify")&&s("json-parse");else{var i,n='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==t){ var l=r.stringify,u="function"==typeof l&&y;if(u){(i=function(){return 1}).toJSON=i;try{u="0"===l(0)&&"0"===l(new a)&&'""'==l(new o)&&l(v)===m&&l(m)===m&&l()===m&&"1"===l(i)&&"[1]"==l([i])&&"[null]"==l([m])&&"null"==l(null)&&"[null,null,null]"==l([m,v,null])&&l({a:[i,!0,!1,null,"\0\b\n\f\r\t"]})==n&&"1"===l(null,i)&&"[\n 1,\n 2\n]"==l([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==l(new h(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==l(new h(864e13))&&'"-000001-01-01T00:00:00.000Z"'==l(new h(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==l(new h(-1))}catch(t){u=!1}}e=u}if("json-parse"==t){var c=r.parse;if("function"==typeof c)try{if(0===c("0")&&!c(!1)){i=c(n);var d=5==i.a.length&&1===i.a[0];if(d){try{d=!c('"\t"')}catch(t){}if(d)try{d=1!==c("01")}catch(t){}if(d)try{d=1!==c("1.")}catch(t){}}}}catch(t){d=!1}e=d}}return s[t]=!!e}e||(e=n.Object()),r||(r=n.Object());var a=e.Number||n.Number,o=e.String||n.String,l=e.Object||n.Object,h=e.Date||n.Date,u=e.SyntaxError||n.SyntaxError,c=e.TypeError||n.TypeError,d=e.Math||n.Math,f=e.JSON||n.JSON;"object"==typeof f&&f&&(r.stringify=f.stringify,r.parse=f.parse);var p,_,m,g=l.prototype,v=g.toString,y=new h(-0xc782b5b800cec);try{y=y.getUTCFullYear()==-109252&&0===y.getUTCMonth()&&1===y.getUTCDate()&&10==y.getUTCHours()&&37==y.getUTCMinutes()&&6==y.getUTCSeconds()&&708==y.getUTCMilliseconds()}catch(t){}if(!s("json")){var T="[object Function]",b="[object Date]",x="[object Number]",w="[object String]",E="[object Array]",S="[object Boolean]",D=s("bug-string-char-index");if(!y)var A=d.floor,P=[0,31,59,90,120,151,181,212,243,273,304,334],O=function(t,e){return P[e]+365*(t-1970)+A((t-1969+(e=+(e>1)))/4)-A((t-1901+e)/100)+A((t-1601+e)/400)};if((p=g.hasOwnProperty)||(p=function(t){var e,i={};return(i.__proto__=null,i.__proto__={toString:1},i).toString!=v?p=function(t){var e=this.__proto__,i=t in(this.__proto__=null,this);return this.__proto__=e,i}:(e=i.constructor,p=function(t){var i=(this.constructor||e).prototype;return t in this&&!(t in i&&this[t]===i[t])}),i=null,p.call(this,t)}),_=function(t,e){var r,n,s,a=0;(r=function(){this.valueOf=0}).prototype.valueOf=0,n=new r;for(s in n)p.call(n,s)&&a++;return r=n=null,a?_=2==a?function(t,e){var i,r={},n=v.call(t)==T;for(i in t)n&&"prototype"==i||p.call(r,i)||!(r[i]=1)||!p.call(t,i)||e(i)}:function(t,e){var i,r,n=v.call(t)==T;for(i in t)n&&"prototype"==i||!p.call(t,i)||(r="constructor"===i)||e(i);(r||p.call(t,i="constructor"))&&e(i)}:(n=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],_=function(t,e){var r,s,a=v.call(t)==T,o=!a&&"function"!=typeof t.constructor&&i[typeof t.hasOwnProperty]&&t.hasOwnProperty||p;for(r in t)a&&"prototype"==r||!o.call(t,r)||e(r);for(s=n.length;r=n[--s];o.call(t,r)&&e(r));}),_(t,e)},!s("json-stringify")){var C={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},M="000000",L=function(t,e){return(M+(e||0)).slice(-t)},R="\\u00",I=function(t){for(var e='"',i=0,r=t.length,n=!D||r>10,s=n&&(D?t.split(""):t);i<r;i++){var a=t.charCodeAt(i);switch(a){case 8:case 9:case 10:case 12:case 13:case 34:case 92:e+=C[a];break;default:if(a<32){e+=R+L(2,a.toString(16));break}e+=n?s[i]:t.charAt(i)}}return e+'"'},N=function(t,e,i,r,n,s,a){var o,l,h,u,d,f,g,y,T,D,P,C,M,R,j,F;try{o=e[t]}catch(t){}if("object"==typeof o&&o)if(l=v.call(o),l!=b||p.call(o,"toJSON"))"function"==typeof o.toJSON&&(l!=x&&l!=w&&l!=E||p.call(o,"toJSON"))&&(o=o.toJSON(t));else if(o>-1/0&&o<1/0){if(O){for(d=A(o/864e5),h=A(d/365.2425)+1970-1;O(h+1,0)<=d;h++);for(u=A((d-O(h,0))/30.42);O(h,u+1)<=d;u++);d=1+d-O(h,u),f=(o%864e5+864e5)%864e5,g=A(f/36e5)%24,y=A(f/6e4)%60,T=A(f/1e3)%60,D=f%1e3}else h=o.getUTCFullYear(),u=o.getUTCMonth(),d=o.getUTCDate(),g=o.getUTCHours(),y=o.getUTCMinutes(),T=o.getUTCSeconds(),D=o.getUTCMilliseconds();o=(h<=0||h>=1e4?(h<0?"-":"+")+L(6,h<0?-h:h):L(4,h))+"-"+L(2,u+1)+"-"+L(2,d)+"T"+L(2,g)+":"+L(2,y)+":"+L(2,T)+"."+L(3,D)+"Z"}else o=null;if(i&&(o=i.call(e,t,o)),null===o)return"null";if(l=v.call(o),l==S)return""+o;if(l==x)return o>-1/0&&o<1/0?""+o:"null";if(l==w)return I(""+o);if("object"==typeof o){for(R=a.length;R--;)if(a[R]===o)throw c();if(a.push(o),P=[],j=s,s+=n,l==E){for(M=0,R=o.length;M<R;M++)C=N(M,o,i,r,n,s,a),P.push(C===m?"null":C);F=P.length?n?"[\n"+s+P.join(",\n"+s)+"\n"+j+"]":"["+P.join(",")+"]":"[]"}else _(r||o,function(t){var e=N(t,o,i,r,n,s,a);e!==m&&P.push(I(t)+":"+(n?" ":"")+e)}),F=P.length?n?"{\n"+s+P.join(",\n"+s)+"\n"+j+"}":"{"+P.join(",")+"}":"{}";return a.pop(),F}};r.stringify=function(t,e,r){var n,s,a,o;if(i[typeof e]&&e)if((o=v.call(e))==T)s=e;else if(o==E){a={};for(var l,h=0,u=e.length;h<u;l=e[h++],o=v.call(l),(o==w||o==x)&&(a[l]=1));}if(r)if((o=v.call(r))==x){if((r-=r%1)>0)for(n="",r>10&&(r=10);n.length<r;n+=" ");}else o==w&&(n=r.length<=10?r:r.slice(0,10));return N("",(l={},l[""]=t,l),s,a,n,"",[])}}if(!s("json-parse")){var j,F,B=o.fromCharCode,k={92:"\\",34:'"',47:"/",98:"\b",116:"\t",110:"\n",102:"\f",114:"\r"},U=function(){throw j=F=null,u()},X=function(){for(var t,e,i,r,n,s=F,a=s.length;j<a;)switch(n=s.charCodeAt(j)){case 9:case 10:case 13:case 32:j++;break;case 123:case 125:case 91:case 93:case 58:case 44:return t=D?s.charAt(j):s[j],j++,t;case 34:for(t="@",j++;j<a;)if(n=s.charCodeAt(j),n<32)U();else if(92==n)switch(n=s.charCodeAt(++j)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:t+=k[n],j++;break;case 117:for(e=++j,i=j+4;j<i;j++)n=s.charCodeAt(j),n>=48&&n<=57||n>=97&&n<=102||n>=65&&n<=70||U();t+=B("0x"+s.slice(e,j));break;default:U()}else{if(34==n)break;for(n=s.charCodeAt(j),e=j;n>=32&&92!=n&&34!=n;)n=s.charCodeAt(++j);t+=s.slice(e,j)}if(34==s.charCodeAt(j))return j++,t;U();default:if(e=j,45==n&&(r=!0,n=s.charCodeAt(++j)),n>=48&&n<=57){for(48==n&&(n=s.charCodeAt(j+1),n>=48&&n<=57)&&U(),r=!1;j<a&&(n=s.charCodeAt(j),n>=48&&n<=57);j++);if(46==s.charCodeAt(j)){for(i=++j;i<a&&(n=s.charCodeAt(i),n>=48&&n<=57);i++);i==j&&U(),j=i}if(n=s.charCodeAt(j),101==n||69==n){for(n=s.charCodeAt(++j),43!=n&&45!=n||j++,i=j;i<a&&(n=s.charCodeAt(i),n>=48&&n<=57);i++);i==j&&U(),j=i}return+s.slice(e,j)}if(r&&U(),"true"==s.slice(j,j+4))return j+=4,!0;if("false"==s.slice(j,j+5))return j+=5,!1;if("null"==s.slice(j,j+4))return j+=4,null;U()}return"$"},H=function(t){var e,i;if("$"==t&&U(),"string"==typeof t){if("@"==(D?t.charAt(0):t[0]))return t.slice(1);if("["==t){for(e=[];t=X(),"]"!=t;i||(i=!0))i&&(","==t?(t=X(),"]"==t&&U()):U()),","==t&&U(),e.push(H(t));return e}if("{"==t){for(e={};t=X(),"}"!=t;i||(i=!0))i&&(","==t?(t=X(),"}"==t&&U()):U()),","!=t&&"string"==typeof t&&"@"==(D?t.charAt(0):t[0])&&":"==X()||U(),e[t.slice(1)]=H(X());return e}U()}return t},V=function(t,e,i){var r=Y(t,e,i);r===m?delete t[e]:t[e]=r},Y=function(t,e,i){var r,n=t[e];if("object"==typeof n&&n)if(v.call(n)==E)for(r=n.length;r--;)V(n,r,i);else _(n,function(t){V(n,t,i)});return i.call(t,e,n)};r.parse=function(t,e){var i,r;return j=0,F=""+t,i=H(X()),"$"!=X()&&U(),j=F=null,e&&v.call(e)==T?Y((r={},r[""]=i,r),"",e):i}}}return r.runInContext=t,r}var e="function"==typeof define&&define.amd,i={function:!0,object:!0},r=i[typeof exports]&&exports&&!exports.nodeType&&exports,n=i[typeof window]&&window||this,s=r&&i[typeof module]&&module&&!module.nodeType&&"object"==typeof global&&global;if(!s||s.global!==s&&s.window!==s&&s.self!==s||(n=s),r&&!e)t(n,r);else{var a=n.JSON,o=n.JSON3,l=!1,h=t(n,n.JSON3={noConflict:function(){return l||(l=!0,n.JSON=a,n.JSON3=o,a=o=null),h}});n.JSON={parse:h.parse,stringify:h.stringify}}e&&define(function(){return h})}.call(this),function(){var t={};t.appendToHead=function(e){t.getHead().appendChild(e)},t.getHead=function(){return document.head||document.getElementsByTagName("head")[0]},t.getBody=function(){return document.body||document.getElementsByTagName("body")[0]},createjs.DomUtils=t}(),function(){var t={};t.parseXML=function(t,e){var i=null;try{if(window.DOMParser){var r=new DOMParser;i=r.parseFromString(t,e)}}catch(t){}if(!i)try{i=new ActiveXObject("Microsoft.XMLDOM"),i.async=!1,i.loadXML(t)}catch(t){i=null}return i},t.parseJSON=function(t){if(null==t)return null;try{return JSON.parse(t)}catch(t){throw t}},createjs.DataUtils=t}(),this.createjs=this.createjs||{},function(){function t(){this.src=null,this.type=null,this.id=null,this.maintainOrder=!1,this.callback=null,this.data=null,this.method=createjs.LoadItem.GET,this.values=null,this.headers=null,this.withCredentials=!1,this.mimeType=null,this.crossOrigin=null,this.loadTimeout=i.LOAD_TIMEOUT_DEFAULT}var e=t.prototype={},i=t;i.LOAD_TIMEOUT_DEFAULT=8e3,i.create=function(e){if("string"==typeof e){var r=new t;return r.src=e,r}if(e instanceof i)return e;if(e instanceof Object&&e.src)return null==e.loadTimeout&&(e.loadTimeout=i.LOAD_TIMEOUT_DEFAULT),e;throw new Error("Type not recognized.")},e.set=function(t){for(var e in t)this[e]=t[e];return this},createjs.LoadItem=i}(),function(){var t={};t.ABSOLUTE_PATT=/^(?:\w+:)?\/{2}/i,t.RELATIVE_PATT=/^[.\/]*?\//i,t.EXTENSION_PATT=/\/?[^\/]+\.(\w{1,5})$/i,t.parseURI=function(e){var i={absolute:!1,relative:!1};if(null==e)return i;var r=e.indexOf("?");r>-1&&(e=e.substr(0,r));var n;return t.ABSOLUTE_PATT.test(e)?i.absolute=!0:t.RELATIVE_PATT.test(e)&&(i.relative=!0),(n=e.match(t.EXTENSION_PATT))&&(i.extension=n[1].toLowerCase()),i},t.formatQueryString=function(t,e){if(null==t)throw new Error("You must specify data.");var i=[];for(var r in t)i.push(r+"="+escape(t[r]));return e&&(i=i.concat(e)),i.join("&")},t.buildPath=function(t,e){if(null==e)return t;var i=[],r=t.indexOf("?");if(r!=-1){var n=t.slice(r+1);i=i.concat(n.split("&"))}return r!=-1?t.slice(0,r)+"?"+this.formatQueryString(e,i):t+"?"+this.formatQueryString(e,i)},t.isCrossDomain=function(t){var e=document.createElement("a");e.href=t.src;var i=document.createElement("a");i.href=location.href;var r=""!=e.hostname&&(e.port!=i.port||e.protocol!=i.protocol||e.hostname!=i.hostname);return r},t.isLocal=function(t){var e=document.createElement("a");return e.href=t.src,""==e.hostname&&"file:"==e.protocol},t.isBinary=function(t){switch(t){case createjs.AbstractLoader.IMAGE:case createjs.AbstractLoader.BINARY:return!0;default:return!1}},t.isImageTag=function(t){return t instanceof HTMLImageElement},t.isAudioTag=function(t){return!!window.HTMLAudioElement&&t instanceof HTMLAudioElement},t.isVideoTag=function(t){return!!window.HTMLVideoElement&&t instanceof HTMLVideoElement},t.isText=function(t){switch(t){case createjs.AbstractLoader.TEXT:case createjs.AbstractLoader.JSON:case createjs.AbstractLoader.MANIFEST:case createjs.AbstractLoader.XML:case createjs.AbstractLoader.CSS:case createjs.AbstractLoader.SVG:case createjs.AbstractLoader.JAVASCRIPT:case createjs.AbstractLoader.SPRITESHEET:return!0;default:return!1}},t.getTypeByExtension=function(t){if(null==t)return createjs.AbstractLoader.TEXT;switch(t.toLowerCase()){case"jpeg":case"jpg":case"gif":case"png":case"webp":case"bmp":return createjs.AbstractLoader.IMAGE;case"ogg":case"mp3":case"webm":return createjs.AbstractLoader.SOUND;case"mp4":case"webm":case"ts":return createjs.AbstractLoader.VIDEO;case"json":return createjs.AbstractLoader.JSON;case"xml":return createjs.AbstractLoader.XML;case"css":return createjs.AbstractLoader.CSS;case"js":return createjs.AbstractLoader.JAVASCRIPT;case"svg":return createjs.AbstractLoader.SVG;default:return createjs.AbstractLoader.TEXT}},createjs.RequestUtils=t}(),this.createjs=this.createjs||{},function(){function t(t,e,i){this.EventDispatcher_constructor(),this.loaded=!1,this.canceled=!1,this.progress=0,this.type=i,this.resultFormatter=null,t?this._item=createjs.LoadItem.create(t):this._item=null,this._preferXHR=e,this._result=null,this._rawResult=null,this._loadedItems=null,this._tagSrcAttribute=null,this._tag=null}var e=createjs.extend(t,createjs.EventDispatcher),i=t;i.POST="POST",i.GET="GET",i.BINARY="binary",i.CSS="css",i.IMAGE="image",i.JAVASCRIPT="javascript",i.JSON="json",i.JSONP="jsonp",i.MANIFEST="manifest",i.SOUND="sound",i.VIDEO="video",i.SPRITESHEET="spritesheet",i.SVG="svg",i.TEXT="text",i.XML="xml",e.getItem=function(){return this._item},e.getResult=function(t){return t?this._rawResult:this._result},e.getTag=function(){return this._tag},e.setTag=function(t){this._tag=t},e.load=function(){this._createRequest(),this._request.on("complete",this,this),this._request.on("progress",this,this),this._request.on("loadStart",this,this),this._request.on("abort",this,this),this._request.on("timeout",this,this),this._request.on("error",this,this);var t=new createjs.Event("initialize");t.loader=this._request,this.dispatchEvent(t),this._request.load()},e.cancel=function(){this.canceled=!0,this.destroy()},e.destroy=function(){this._request&&(this._request.removeAllEventListeners(),this._request.destroy()),this._request=null,this._item=null,this._rawResult=null,this._result=null,this._loadItems=null,this.removeAllEventListeners()},e.getLoadedItems=function(){return this._loadedItems},e._createRequest=function(){this._preferXHR?this._request=new createjs.XHRRequest(this._item):this._request=new createjs.TagRequest(this._item,this._tag||this._createTag(),this._tagSrcAttribute)},e._createTag=function(t){return null},e._sendLoadStart=function(){this._isCanceled()||this.dispatchEvent("loadstart")},e._sendProgress=function(t){if(!this._isCanceled()){var e=null;"number"==typeof t?(this.progress=t,e=new createjs.ProgressEvent(this.progress)):(e=t,this.progress=t.loaded/t.total,e.progress=this.progress,(isNaN(this.progress)||this.progress==1/0)&&(this.progress=0)),this.hasEventListener("progress")&&this.dispatchEvent(e)}},e._sendComplete=function(){if(!this._isCanceled()){this.loaded=!0;var t=new createjs.Event("complete");t.rawResult=this._rawResult,null!=this._result&&(t.result=this._result),this.dispatchEvent(t)}},e._sendError=function(t){!this._isCanceled()&&this.hasEventListener("error")&&(null==t&&(t=new createjs.ErrorEvent("PRELOAD_ERROR_EMPTY")),this.dispatchEvent(t))},e._isCanceled=function(){return!(null!=window.createjs&&!this.canceled)},e.resultFormatter=null,e.handleEvent=function(t){switch(t.type){case"complete":this._rawResult=t.target._response;var e=this.resultFormatter&&this.resultFormatter(this);e instanceof Function?e.call(this,createjs.proxy(this._resultFormatSuccess,this),createjs.proxy(this._resultFormatFailed,this)):(this._result=e||this._rawResult,this._sendComplete());break;case"progress":this._sendProgress(t);break;case"error":this._sendError(t);break;case"loadstart":this._sendLoadStart();break;case"abort":case"timeout":this._isCanceled()||this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_"+t.type.toUpperCase()+"_ERROR"))}},e._resultFormatSuccess=function(t){this._result=t,this._sendComplete()},e._resultFormatFailed=function(t){this._sendError(t)},e.buildPath=function(t,e){return createjs.RequestUtils.buildPath(t,e)},e.toString=function(){return"[PreloadJS AbstractLoader]"},createjs.AbstractLoader=createjs.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){function t(t,e,i){this.AbstractLoader_constructor(t,e,i),this.resultFormatter=this._formatResult,this._tagSrcAttribute="src",this.on("initialize",this._updateXHR,this)}var e=createjs.extend(t,createjs.AbstractLoader);e.load=function(){this._tag||(this._tag=this._createTag(this._item.src)),this._tag.preload="auto",this._tag.load(),this.AbstractLoader_load()},e._createTag=function(){},e._createRequest=function(){this._preferXHR?this._request=new createjs.XHRRequest(this._item):this._request=new createjs.MediaTagRequest(this._item,this._tag||this._createTag(),this._tagSrcAttribute)},e._updateXHR=function(t){t.loader.setResponseType&&t.loader.setResponseType("blob")},e._formatResult=function(t){if(this._tag.removeEventListener&&this._tag.removeEventListener("canplaythrough",this._loadedHandler),this._tag.onstalled=null,this._preferXHR){var e=window.URL||window.webkitURL,i=t.getResult(!0);t.getTag().src=e.createObjectURL(i)}return t.getTag()},createjs.AbstractMediaLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){var t=function(t){this._item=t},e=createjs.extend(t,createjs.EventDispatcher);e.load=function(){},e.destroy=function(){},e.cancel=function(){},createjs.AbstractRequest=createjs.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){function t(t,e,i){this.AbstractRequest_constructor(t),this._tag=e,this._tagSrcAttribute=i,this._loadedHandler=createjs.proxy(this._handleTagComplete,this),this._addedToDOM=!1,this._startTagVisibility=null}var e=createjs.extend(t,createjs.AbstractRequest);e.load=function(){this._tag.onload=createjs.proxy(this._handleTagComplete,this),this._tag.onreadystatechange=createjs.proxy(this._handleReadyStateChange,this),this._tag.onerror=createjs.proxy(this._handleError,this);var t=new createjs.Event("initialize");t.loader=this._tag,this.dispatchEvent(t),this._hideTag(),this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout),this._tag[this._tagSrcAttribute]=this._item.src,null==this._tag.parentNode&&(window.document.body.appendChild(this._tag),this._addedToDOM=!0)},e.destroy=function(){this._clean(),this._tag=null,this.AbstractRequest_destroy()},e._handleReadyStateChange=function(){clearTimeout(this._loadTimeout);var t=this._tag;"loaded"!=t.readyState&&"complete"!=t.readyState||this._handleTagComplete()},e._handleError=function(){this._clean(),this.dispatchEvent("error")},e._handleTagComplete=function(){this._rawResult=this._tag,this._result=this.resultFormatter&&this.resultFormatter(this)||this._rawResult,this._clean(),this._showTag(),this.dispatchEvent("complete")},e._handleTimeout=function(){this._clean(),this.dispatchEvent(new createjs.Event("timeout"))},e._clean=function(){this._tag.onload=null,this._tag.onreadystatechange=null,this._tag.onerror=null,this._addedToDOM&&null!=this._tag.parentNode&&this._tag.parentNode.removeChild(this._tag),clearTimeout(this._loadTimeout)},e._hideTag=function(){this._startTagVisibility=this._tag.style.visibility,this._tag.style.visibility="hidden"},e._showTag=function(){this._tag.style.visibility=this._startTagVisibility},e._handleStalled=function(){},createjs.TagRequest=createjs.promote(t,"AbstractRequest")}(),this.createjs=this.createjs||{},function(){function t(t,e,i){this.AbstractRequest_constructor(t),this._tag=e,this._tagSrcAttribute=i,this._loadedHandler=createjs.proxy(this._handleTagComplete,this)}var e=createjs.extend(t,createjs.TagRequest);e.load=function(){var t=createjs.proxy(this._handleStalled,this);this._stalledCallback=t;var e=createjs.proxy(this._handleProgress,this);this._handleProgress=e,this._tag.addEventListener("stalled",t),this._tag.addEventListener("progress",e),this._tag.addEventListener&&this._tag.addEventListener("canplaythrough",this._loadedHandler,!1),this.TagRequest_load()},e._handleReadyStateChange=function(){clearTimeout(this._loadTimeout);var t=this._tag;"loaded"!=t.readyState&&"complete"!=t.readyState||this._handleTagComplete()},e._handleStalled=function(){},e._handleProgress=function(t){if(t&&!(t.loaded>0&&0==t.total)){var e=new createjs.ProgressEvent(t.loaded,t.total);this.dispatchEvent(e)}},e._clean=function(){this._tag.removeEventListener&&this._tag.removeEventListener("canplaythrough",this._loadedHandler),this._tag.removeEventListener("stalled",this._stalledCallback),this._tag.removeEventListener("progress",this._progressCallback),this.TagRequest__clean()},createjs.MediaTagRequest=createjs.promote(t,"TagRequest")}(),this.createjs=this.createjs||{},function(){function t(t){this.AbstractRequest_constructor(t),this._request=null,this._loadTimeout=null,this._xhrLevel=1,this._response=null,this._rawResponse=null,this._canceled=!1,this._handleLoadStartProxy=createjs.proxy(this._handleLoadStart,this),this._handleProgressProxy=createjs.proxy(this._handleProgress,this),this._handleAbortProxy=createjs.proxy(this._handleAbort,this),this._handleErrorProxy=createjs.proxy(this._handleError,this),this._handleTimeoutProxy=createjs.proxy(this._handleTimeout,this),this._handleLoadProxy=createjs.proxy(this._handleLoad,this),this._handleReadyStateChangeProxy=createjs.proxy(this._handleReadyStateChange,this),!this._createXHR(t)}var e=createjs.extend(t,createjs.AbstractRequest);t.ACTIVEX_VERSIONS=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],e.getResult=function(t){return t&&this._rawResponse?this._rawResponse:this._response},e.cancel=function(){this.canceled=!0,this._clean(),this._request.abort()},e.load=function(){if(null==this._request)return void this._handleError();null!=this._request.addEventListener?(this._request.addEventListener("loadstart",this._handleLoadStartProxy,!1),this._request.addEventListener("progress",this._handleProgressProxy,!1),this._request.addEventListener("abort",this._handleAbortProxy,!1),this._request.addEventListener("error",this._handleErrorProxy,!1),this._request.addEventListener("timeout",this._handleTimeoutProxy,!1),this._request.addEventListener("load",this._handleLoadProxy,!1),this._request.addEventListener("readystatechange",this._handleReadyStateChangeProxy,!1)):(this._request.onloadstart=this._handleLoadStartProxy,this._request.onprogress=this._handleProgressProxy,this._request.onabort=this._handleAbortProxy,this._request.onerror=this._handleErrorProxy,this._request.ontimeout=this._handleTimeoutProxy,this._request.onload=this._handleLoadProxy,this._request.onreadystatechange=this._handleReadyStateChangeProxy),1==this._xhrLevel&&(this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout));try{this._item.values&&this._item.method!=createjs.AbstractLoader.GET?this._item.method==createjs.AbstractLoader.POST&&this._request.send(createjs.RequestUtils.formatQueryString(this._item.values)):this._request.send()}catch(t){this.dispatchEvent(new createjs.ErrorEvent("XHR_SEND",null,t))}},e.setResponseType=function(t){"blob"===t&&(t=window.URL?"blob":"arraybuffer",this._responseType=t),this._request.responseType=t},e.getAllResponseHeaders=function(){return this._request.getAllResponseHeaders instanceof Function?this._request.getAllResponseHeaders():null},e.getResponseHeader=function(t){return this._request.getResponseHeader instanceof Function?this._request.getResponseHeader(t):null},e._handleProgress=function(t){if(t&&!(t.loaded>0&&0==t.total)){var e=new createjs.ProgressEvent(t.loaded,t.total);this.dispatchEvent(e)}},e._handleLoadStart=function(t){clearTimeout(this._loadTimeout),this.dispatchEvent("loadstart")},e._handleAbort=function(t){this._clean(),this.dispatchEvent(new createjs.ErrorEvent("XHR_ABORTED",null,t))},e._handleError=function(t){this._clean(),this.dispatchEvent(new createjs.ErrorEvent(t.message))},e._handleReadyStateChange=function(t){4==this._request.readyState&&this._handleLoad()},e._handleLoad=function(t){if(!this.loaded){this.loaded=!0;var e=this._checkError();if(e)return void this._handleError(e);if(this._response=this._getResponse(),"arraybuffer"===this._responseType)try{this._response=new Blob([this._response])}catch(t){if(window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,"TypeError"===t.name&&window.BlobBuilder){var i=new BlobBuilder;i.append(this._response),this._response=i.getBlob()}}this._clean(),this.dispatchEvent(new createjs.Event("complete"))}},e._handleTimeout=function(t){this._clean(),this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_TIMEOUT",null,t))},e._checkError=function(){var t=parseInt(this._request.status);switch(t){case 404:case 0:return new Error(t)}return null},e._getResponse=function(){if(null!=this._response)return this._response;if(null!=this._request.response)return this._request.response;try{if(null!=this._request.responseText)return this._request.responseText}catch(t){}try{if(null!=this._request.responseXML)return this._request.responseXML}catch(t){}return null},e._createXHR=function(t){var e=createjs.RequestUtils.isCrossDomain(t),i={},r=null;if(window.XMLHttpRequest)r=new XMLHttpRequest,e&&void 0===r.withCredentials&&window.XDomainRequest&&(r=new XDomainRequest);else{for(var n=0,a=s.ACTIVEX_VERSIONS.length;n<a;n++){var o=s.ACTIVEX_VERSIONS[n];try{r=new ActiveXObject(o);break}catch(t){}}if(null==r)return!1}null==t.mimeType&&createjs.RequestUtils.isText(t.type)&&(t.mimeType="text/plain; charset=utf-8"),t.mimeType&&r.overrideMimeType&&r.overrideMimeType(t.mimeType),this._xhrLevel="string"==typeof r.responseType?2:1;var l=null;if(l=t.method==createjs.AbstractLoader.GET?createjs.RequestUtils.buildPath(t.src,t.values):t.src,r.open(t.method||createjs.AbstractLoader.GET,l,!0),e&&r instanceof XMLHttpRequest&&1==this._xhrLevel&&(i.Origin=location.origin),t.values&&t.method==createjs.AbstractLoader.POST&&(i["Content-Type"]="application/x-www-form-urlencoded"),e||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),t.headers)for(var h in t.headers)i[h]=t.headers[h];for(h in i)r.setRequestHeader(h,i[h]);return r instanceof XMLHttpRequest&&void 0!==t.withCredentials&&(r.withCredentials=t.withCredentials),this._request=r,!0},e._clean=function(){clearTimeout(this._loadTimeout),null!=this._request.removeEventListener?(this._request.removeEventListener("loadstart",this._handleLoadStartProxy),this._request.removeEventListener("progress",this._handleProgressProxy),this._request.removeEventListener("abort",this._handleAbortProxy),this._request.removeEventListener("error",this._handleErrorProxy),this._request.removeEventListener("timeout",this._handleTimeoutProxy),this._request.removeEventListener("load",this._handleLoadProxy),this._request.removeEventListener("readystatechange",this._handleReadyStateChangeProxy)):(this._request.onloadstart=null,this._request.onprogress=null,this._request.onabort=null,this._request.onerror=null,this._request.ontimeout=null,this._request.onload=null,this._request.onreadystatechange=null)},e.toString=function(){return"[PreloadJS XHRRequest]"},createjs.XHRRequest=createjs.promote(t,"AbstractRequest")}(),this.createjs=this.createjs||{},function(){function t(t,e,i){this.AbstractLoader_constructor(),this._plugins=[],this._typeCallbacks={},this._extensionCallbacks={},this.next=null,this.maintainScriptOrder=!0,this.stopOnError=!1,this._maxConnections=1,this._availableLoaders=[createjs.ImageLoader,createjs.JavaScriptLoader,createjs.CSSLoader,createjs.JSONLoader,createjs.JSONPLoader,createjs.SoundLoader,createjs.ManifestLoader,createjs.SpriteSheetLoader,createjs.XMLLoader,createjs.SVGLoader,createjs.BinaryLoader,createjs.VideoLoader,createjs.TextLoader],this._defaultLoaderLength=this._availableLoaders.length,this.init(t,e,i)}var e=createjs.extend(t,createjs.AbstractLoader),i=t;e.init=function(t,e,i){this.useXHR=!0,this.preferXHR=!0,this._preferXHR=!0,this.setPreferXHR(t),this._paused=!1,this._basePath=e,this._crossOrigin=i,this._loadStartWasDispatched=!1,this._currentlyLoadingScript=null,this._currentLoads=[],this._loadQueue=[],this._loadQueueBackup=[],this._loadItemsById={},this._loadItemsBySrc={},this._loadedResults={},this._loadedRawResults={},this._numItems=0,this._numItemsLoaded=0,this._scriptOrder=[],this._loadedScripts=[],this._lastProgress=NaN},i.loadTimeout=8e3,i.LOAD_TIMEOUT=0,i.BINARY=createjs.AbstractLoader.BINARY,i.CSS=createjs.AbstractLoader.CSS,i.IMAGE=createjs.AbstractLoader.IMAGE,i.JAVASCRIPT=createjs.AbstractLoader.JAVASCRIPT,i.JSON=createjs.AbstractLoader.JSON,i.JSONP=createjs.AbstractLoader.JSONP,i.MANIFEST=createjs.AbstractLoader.MANIFEST,i.SOUND=createjs.AbstractLoader.SOUND,i.VIDEO=createjs.AbstractLoader.VIDEO,i.SVG=createjs.AbstractLoader.SVG,i.TEXT=createjs.AbstractLoader.TEXT,i.XML=createjs.AbstractLoader.XML,i.POST=createjs.AbstractLoader.POST,i.GET=createjs.AbstractLoader.GET,e.registerLoader=function(t){if(!t||!t.canLoadItem)throw new Error("loader is of an incorrect type.");if(this._availableLoaders.indexOf(t)!=-1)throw new Error("loader already exists.");this._availableLoaders.unshift(t)},e.unregisterLoader=function(t){var e=this._availableLoaders.indexOf(t);e!=-1&&e<this._defaultLoaderLength-1&&this._availableLoaders.splice(e,1)},e.setUseXHR=function(t){return this.setPreferXHR(t)},e.setPreferXHR=function(t){return this.preferXHR=0!=t&&null!=window.XMLHttpRequest,this.preferXHR},e.removeAll=function(){this.remove()},e.remove=function(t){var e=null;if(t&&!Array.isArray(t))e=[t];else if(t)e=t;else if(arguments.length>0)return;var i=!1;if(e){for(;e.length;){var r=e.pop(),n=this.getResult(r);for(s=this._loadQueue.length-1;s>=0;s--)if(a=this._loadQueue[s].getItem(),a.id==r||a.src==r){this._loadQueue.splice(s,1)[0].cancel();break}for(s=this._loadQueueBackup.length-1;s>=0;s--)if(a=this._loadQueueBackup[s].getItem(),a.id==r||a.src==r){this._loadQueueBackup.splice(s,1)[0].cancel();break}if(n)this._disposeItem(this.getItem(r));else for(var s=this._currentLoads.length-1;s>=0;s--){var a=this._currentLoads[s].getItem();if(a.id==r||a.src==r){this._currentLoads.splice(s,1)[0].cancel(),i=!0;break}}}i&&this._loadNext()}else{this.close();for(var o in this._loadItemsById)this._disposeItem(this._loadItemsById[o]);this.init(this.preferXHR,this._basePath)}},e.reset=function(){this.close();for(var t in this._loadItemsById)this._disposeItem(this._loadItemsById[t]);for(var e=[],i=0,r=this._loadQueueBackup.length;i<r;i++)e.push(this._loadQueueBackup[i].getItem());this.loadManifest(e,!1)},e.installPlugin=function(t){if(null!=t&&null!=t.getPreloadHandlers){this._plugins.push(t);var e=t.getPreloadHandlers();if(e.scope=t,null!=e.types)for(var i=0,r=e.types.length;i<r;i++)this._typeCallbacks[e.types[i]]=e;if(null!=e.extensions)for(i=0,r=e.extensions.length;i<r;i++)this._extensionCallbacks[e.extensions[i]]=e}},e.setMaxConnections=function(t){this._maxConnections=t,!this._paused&&this._loadQueue.length>0&&this._loadNext()},e.loadFile=function(t,e,i){if(null==t){var r=new createjs.ErrorEvent("PRELOAD_NO_FILE");return void this._sendError(r)}this._addItem(t,null,i),e!==!1?this.setPaused(!1):this.setPaused(!0)},e.loadManifest=function(t,e,r){var n=null,s=null;if(Array.isArray(t)){if(0==t.length){var a=new createjs.ErrorEvent("PRELOAD_MANIFEST_EMPTY");return void this._sendError(a)}n=t}else if("string"==typeof t)n=[{src:t,type:i.MANIFEST}];else{if("object"!=typeof t){var a=new createjs.ErrorEvent("PRELOAD_MANIFEST_NULL");return void this._sendError(a)}if(void 0!==t.src){if(null==t.type)t.type=i.MANIFEST;else if(t.type!=i.MANIFEST){var a=new createjs.ErrorEvent("PRELOAD_MANIFEST_TYPE");this._sendError(a)}n=[t]}else void 0!==t.manifest&&(n=t.manifest,s=t.path)}for(var o=0,l=n.length;o<l;o++)this._addItem(n[o],s,r);e!==!1?this.setPaused(!1):this.setPaused(!0)},e.load=function(){this.setPaused(!1)},e.getItem=function(t){return this._loadItemsById[t]||this._loadItemsBySrc[t]},e.getResult=function(t,e){var i=this._loadItemsById[t]||this._loadItemsBySrc[t];if(null==i)return null;var r=i.id;return e&&this._loadedRawResults[r]?this._loadedRawResults[r]:this._loadedResults[r]},e.getItems=function(t){var e=[];for(var i in this._loadItemsById){var r=this._loadItemsById[i],n=this.getResult(i);t===!0&&null==n||e.push({item:r,result:n,rawResult:this.getResult(i,!0)})}return e},e.setPaused=function(t){this._paused=t,this._paused||this._loadNext()},e.close=function(){for(;this._currentLoads.length;)this._currentLoads.pop().cancel();this._scriptOrder.length=0,this._loadedScripts.length=0,this.loadStartWasDispatched=!1,this._itemCount=0,this._lastProgress=NaN},e._addItem=function(t,e,i){var r=this._createLoadItem(t,e,i);if(null!=r){var n=this._createLoader(r);null!=n&&("plugins"in n&&(n.plugins=this._plugins),r._loader=n,this._loadQueue.push(n),this._loadQueueBackup.push(n),this._numItems++,this._updateProgress(),(this.maintainScriptOrder&&r.type==createjs.LoadQueue.JAVASCRIPT||r.maintainOrder===!0)&&(this._scriptOrder.push(r),this._loadedScripts.push(null)))}},e._createLoadItem=function(t,e,i){var r=createjs.LoadItem.create(t);if(null==r)return null;var n="",s=i||this._basePath;if(r.src instanceof Object){if(!r.type)return null; if(e){n=e;var a=createjs.RequestUtils.parseURI(e);null==s||a.absolute||a.relative||(n=s+n)}else null!=s&&(n=s)}else{var o=createjs.RequestUtils.parseURI(r.src);o.extension&&(r.ext=o.extension),null==r.type&&(r.type=createjs.RequestUtils.getTypeByExtension(r.ext));var l=r.src;if(!o.absolute&&!o.relative)if(e){n=e;var a=createjs.RequestUtils.parseURI(e);l=e+l,null==s||a.absolute||a.relative||(n=s+n)}else null!=s&&(n=s);r.src=n+r.src}r.path=n,void 0!==r.id&&null!==r.id&&""!==r.id||(r.id=l);var h=this._typeCallbacks[r.type]||this._extensionCallbacks[r.ext];if(h){var u=h.callback.call(h.scope,r,this);if(u===!1)return null;u===!0||null!=u&&(r._loader=u),o=createjs.RequestUtils.parseURI(r.src),null!=o.extension&&(r.ext=o.extension)}return this._loadItemsById[r.id]=r,this._loadItemsBySrc[r.src]=r,null==r.crossOrigin&&(r.crossOrigin=this._crossOrigin),r},e._createLoader=function(t){if(null!=t._loader)return t._loader;for(var e=this.preferXHR,i=0;i<this._availableLoaders.length;i++){var r=this._availableLoaders[i];if(r&&r.canLoadItem(t))return new r(t,e)}return null},e._loadNext=function(){if(!this._paused){this._loadStartWasDispatched||(this._sendLoadStart(),this._loadStartWasDispatched=!0),this._numItems==this._numItemsLoaded?(this.loaded=!0,this._sendComplete(),this.next&&this.next.load&&this.next.load()):this.loaded=!1;for(var t=0;t<this._loadQueue.length&&!(this._currentLoads.length>=this._maxConnections);t++){var e=this._loadQueue[t];this._canStartLoad(e)&&(this._loadQueue.splice(t,1),t--,this._loadItem(e))}}},e._loadItem=function(t){t.on("fileload",this._handleFileLoad,this),t.on("progress",this._handleProgress,this),t.on("complete",this._handleFileComplete,this),t.on("error",this._handleError,this),t.on("fileerror",this._handleFileError,this),this._currentLoads.push(t),this._sendFileStart(t.getItem()),t.load()},e._handleFileLoad=function(t){t.target=null,this.dispatchEvent(t)},e._handleFileError=function(t){var e=new createjs.ErrorEvent("FILE_LOAD_ERROR",null,t.item);this._sendError(e)},e._handleError=function(t){var e=t.target;this._numItemsLoaded++,this._finishOrderedItem(e,!0),this._updateProgress();var i=new createjs.ErrorEvent("FILE_LOAD_ERROR",null,e.getItem());this._sendError(i),this.stopOnError?this.setPaused(!0):(this._removeLoadItem(e),this._cleanLoadItem(e),this._loadNext())},e._handleFileComplete=function(t){var e=t.target,i=e.getItem(),r=e.getResult();this._loadedResults[i.id]=r;var n=e.getResult(!0);null!=n&&n!==r&&(this._loadedRawResults[i.id]=n),this._saveLoadedItems(e),this._removeLoadItem(e),this._finishOrderedItem(e)||this._processFinishedLoad(i,e),this._cleanLoadItem(e)},e._saveLoadedItems=function(t){var e=t.getLoadedItems();if(null!==e)for(var i=0;i<e.length;i++){var r=e[i].item;this._loadItemsBySrc[r.src]=r,this._loadItemsById[r.id]=r,this._loadedResults[r.id]=e[i].result,this._loadedRawResults[r.id]=e[i].rawResult}},e._finishOrderedItem=function(t,e){var i=t.getItem();if(this.maintainScriptOrder&&i.type==createjs.LoadQueue.JAVASCRIPT||i.maintainOrder){t instanceof createjs.JavaScriptLoader&&(this._currentlyLoadingScript=!1);var r=createjs.indexOf(this._scriptOrder,i);return r!=-1&&(this._loadedScripts[r]=e===!0||i,this._checkScriptLoadOrder(),!0)}return!1},e._checkScriptLoadOrder=function(){for(var t=this._loadedScripts.length,e=0;e<t;e++){var i=this._loadedScripts[e];if(null===i)break;if(i!==!0){var r=this._loadedResults[i.id];i.type==createjs.LoadQueue.JAVASCRIPT&&createjs.DomUtils.appendToHead(r);var n=i._loader;this._processFinishedLoad(i,n),this._loadedScripts[e]=!0}}},e._processFinishedLoad=function(t,e){if(this._numItemsLoaded++,!this.maintainScriptOrder&&t.type==createjs.LoadQueue.JAVASCRIPT){var i=e.getTag();createjs.DomUtils.appendToHead(i)}this._updateProgress(),this._sendFileComplete(t,e),this._loadNext()},e._canStartLoad=function(t){if(!this.maintainScriptOrder||t.preferXHR)return!0;var e=t.getItem();if(e.type!=createjs.LoadQueue.JAVASCRIPT)return!0;if(this._currentlyLoadingScript)return!1;for(var i=this._scriptOrder.indexOf(e),r=0;r<i;){var n=this._loadedScripts[r];if(null==n)return!1;r++}return this._currentlyLoadingScript=!0,!0},e._removeLoadItem=function(t){for(var e=this._currentLoads.length,i=0;i<e;i++)if(this._currentLoads[i]==t){this._currentLoads.splice(i,1);break}},e._cleanLoadItem=function(t){var e=t.getItem();e&&delete e._loader},e._handleProgress=function(t){var e=t.target;this._sendFileProgress(e.getItem(),e.progress),this._updateProgress()},e._updateProgress=function(){var t=this._numItemsLoaded/this._numItems,e=this._numItems-this._numItemsLoaded;if(e>0){for(var i=0,r=0,n=this._currentLoads.length;r<n;r++)i+=this._currentLoads[r].progress;t+=i/e*(e/this._numItems)}this._lastProgress!=t&&(this._sendProgress(t),this._lastProgress=t)},e._disposeItem=function(t){delete this._loadedResults[t.id],delete this._loadedRawResults[t.id],delete this._loadItemsById[t.id],delete this._loadItemsBySrc[t.src]},e._sendFileProgress=function(t,e){if(!this._isCanceled()&&!this._paused&&this.hasEventListener("fileprogress")){var i=new createjs.Event("fileprogress");i.progress=e,i.loaded=e,i.total=1,i.item=t,this.dispatchEvent(i)}},e._sendFileComplete=function(t,e){if(!this._isCanceled()&&!this._paused){var i=new createjs.Event("fileload");i.loader=e,i.item=t,i.result=this._loadedResults[t.id],i.rawResult=this._loadedRawResults[t.id],t.completeHandler&&t.completeHandler(i),this.hasEventListener("fileload")&&this.dispatchEvent(i)}},e._sendFileStart=function(t){var e=new createjs.Event("filestart");e.item=t,this.hasEventListener("filestart")&&this.dispatchEvent(e)},e.toString=function(){return"[PreloadJS LoadQueue]"},createjs.LoadQueue=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t){this.AbstractLoader_constructor(t,!0,createjs.AbstractLoader.TEXT)}var e=(createjs.extend(t,createjs.AbstractLoader),t);e.canLoadItem=function(t){return t.type==createjs.AbstractLoader.TEXT},createjs.TextLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t){this.AbstractLoader_constructor(t,!0,createjs.AbstractLoader.BINARY),this.on("initialize",this._updateXHR,this)}var e=createjs.extend(t,createjs.AbstractLoader),i=t;i.canLoadItem=function(t){return t.type==createjs.AbstractLoader.BINARY},e._updateXHR=function(t){t.loader.setResponseType("arraybuffer")},createjs.BinaryLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractLoader_constructor(t,e,createjs.AbstractLoader.CSS),this.resultFormatter=this._formatResult,this._tagSrcAttribute="href",e?this._tag=document.createElement("style"):this._tag=document.createElement("link"),this._tag.rel="stylesheet",this._tag.type="text/css"}var e=createjs.extend(t,createjs.AbstractLoader),i=t;i.canLoadItem=function(t){return t.type==createjs.AbstractLoader.CSS},e._formatResult=function(t){if(this._preferXHR){var e=t.getTag();if(e.styleSheet)e.styleSheet.cssText=t.getResult(!0);else{var i=document.createTextNode(t.getResult(!0));e.appendChild(i)}}else e=this._tag;return createjs.DomUtils.appendToHead(e),e},createjs.CSSLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractLoader_constructor(t,e,createjs.AbstractLoader.IMAGE),this.resultFormatter=this._formatResult,this._tagSrcAttribute="src",createjs.RequestUtils.isImageTag(t)?this._tag=t:createjs.RequestUtils.isImageTag(t.src)?this._tag=t.src:createjs.RequestUtils.isImageTag(t.tag)&&(this._tag=t.tag),null!=this._tag?this._preferXHR=!1:this._tag=document.createElement("img"),this.on("initialize",this._updateXHR,this)}var e=createjs.extend(t,createjs.AbstractLoader),i=t;i.canLoadItem=function(t){return t.type==createjs.AbstractLoader.IMAGE},e.load=function(){if(""!=this._tag.src&&this._tag.complete)return void this._sendComplete();var t=this._item.crossOrigin;1==t&&(t="Anonymous"),null==t||createjs.RequestUtils.isLocal(this._item.src)||(this._tag.crossOrigin=t),this.AbstractLoader_load()},e._updateXHR=function(t){t.loader.mimeType="text/plain; charset=x-user-defined-binary",t.loader.setResponseType&&t.loader.setResponseType("blob")},e._formatResult=function(t){return this._formatImage},e._formatImage=function(t,e){var i=this._tag,r=window.URL||window.webkitURL;if(this._preferXHR)if(r){var n=r.createObjectURL(this.getResult(!0));i.src=n,i.addEventListener("load",this._cleanUpURL,!1),i.addEventListener("error",this._cleanUpURL,!1)}else i.src=this._item.src;else;i.complete?t(i):(i.onload=createjs.proxy(function(){t(this._tag)},this),i.onerror=createjs.proxy(function(){e(_this._tag)},this))},e._cleanUpURL=function(t){var e=window.URL||window.webkitURL;e.revokeObjectURL(t.target.src)},createjs.ImageLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractLoader_constructor(t,e,createjs.AbstractLoader.JAVASCRIPT),this.resultFormatter=this._formatResult,this._tagSrcAttribute="src",this.setTag(document.createElement("script"))}var e=createjs.extend(t,createjs.AbstractLoader),i=t;i.canLoadItem=function(t){return t.type==createjs.AbstractLoader.JAVASCRIPT},e._formatResult=function(t){var e=t.getTag();return this._preferXHR&&(e.text=t.getResult(!0)),e},createjs.JavaScriptLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t){this.AbstractLoader_constructor(t,!0,createjs.AbstractLoader.JSON),this.resultFormatter=this._formatResult}var e=createjs.extend(t,createjs.AbstractLoader),i=t;i.canLoadItem=function(t){return t.type==createjs.AbstractLoader.JSON},e._formatResult=function(t){var e=null;try{e=createjs.DataUtils.parseJSON(t.getResult(!0))}catch(t){var i=new createjs.ErrorEvent("JSON_FORMAT",null,t);return this._sendError(i),t}return e},createjs.JSONLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t){this.AbstractLoader_constructor(t,!1,createjs.AbstractLoader.JSONP),this.setTag(document.createElement("script")),this.getTag().type="text/javascript"}var e=createjs.extend(t,createjs.AbstractLoader),i=t;i.canLoadItem=function(t){return t.type==createjs.AbstractLoader.JSONP},e.cancel=function(){this.AbstractLoader_cancel(),this._dispose()},e.load=function(){if(null==this._item.callback)throw new Error("callback is required for loading JSONP requests.");if(null!=window[this._item.callback])throw new Error("JSONP callback '"+this._item.callback+"' already exists on window. You need to specify a different callback or re-name the current one.");window[this._item.callback]=createjs.proxy(this._handleLoad,this),window.document.body.appendChild(this._tag),this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout),this._tag.src=this._item.src},e._handleLoad=function(t){this._result=this._rawResult=t,this._sendComplete(),this._dispose()},e._handleTimeout=function(){this._dispose(),this.dispatchEvent(new createjs.ErrorEvent("timeout"))},e._dispose=function(){window.document.body.removeChild(this._tag),delete window[this._item.callback],clearTimeout(this._loadTimeout)},createjs.JSONPLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t){this.AbstractLoader_constructor(t,null,createjs.AbstractLoader.MANIFEST),this.plugins=null,this._manifestQueue=null}var e=createjs.extend(t,createjs.AbstractLoader),i=t;i.MANIFEST_PROGRESS=.25,i.canLoadItem=function(t){return t.type==createjs.AbstractLoader.MANIFEST},e.load=function(){this.AbstractLoader_load()},e._createRequest=function(){var t=this._item.callback;null!=t?this._request=new createjs.JSONPLoader(this._item):this._request=new createjs.JSONLoader(this._item)},e.handleEvent=function(t){switch(t.type){case"complete":return this._rawResult=t.target.getResult(!0),this._result=t.target.getResult(),this._sendProgress(i.MANIFEST_PROGRESS),void this._loadManifest(this._result);case"progress":return t.loaded*=i.MANIFEST_PROGRESS,this.progress=t.loaded/t.total,(isNaN(this.progress)||this.progress==1/0)&&(this.progress=0),void this._sendProgress(t)}this.AbstractLoader_handleEvent(t)},e.destroy=function(){this.AbstractLoader_destroy(),this._manifestQueue.close()},e._loadManifest=function(t){if(t&&t.manifest){var e=this._manifestQueue=new createjs.LoadQueue;e.on("fileload",this._handleManifestFileLoad,this),e.on("progress",this._handleManifestProgress,this),e.on("complete",this._handleManifestComplete,this,!0),e.on("error",this._handleManifestError,this,!0);for(var i=0,r=this.plugins.length;i<r;i++)e.installPlugin(this.plugins[i]);e.loadManifest(t)}else this._sendComplete()},e._handleManifestFileLoad=function(t){t.target=null,this.dispatchEvent(t)},e._handleManifestComplete=function(t){this._loadedItems=this._manifestQueue.getItems(!0),this._sendComplete()},e._handleManifestProgress=function(t){this.progress=t.progress*(1-i.MANIFEST_PROGRESS)+i.MANIFEST_PROGRESS,this._sendProgress(this.progress)},e._handleManifestError=function(t){var e=new createjs.Event("fileerror");e.item=t.data,this.dispatchEvent(e)},createjs.ManifestLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractMediaLoader_constructor(t,e,createjs.AbstractLoader.SOUND),createjs.RequestUtils.isAudioTag(t)?this._tag=t:createjs.RequestUtils.isAudioTag(t.src)?this._tag=t:createjs.RequestUtils.isAudioTag(t.tag)&&(this._tag=createjs.RequestUtils.isAudioTag(t)?t:t.src),null!=this._tag&&(this._preferXHR=!1)}var e=createjs.extend(t,createjs.AbstractMediaLoader),i=t;i.canLoadItem=function(t){return t.type==createjs.AbstractLoader.SOUND},e._createTag=function(t){var e=document.createElement("audio");return e.autoplay=!1,e.preload="none",e.src=t,e},createjs.SoundLoader=createjs.promote(t,"AbstractMediaLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractMediaLoader_constructor(t,e,createjs.AbstractLoader.VIDEO),createjs.RequestUtils.isVideoTag(t)||createjs.RequestUtils.isVideoTag(t.src)?(this.setTag(createjs.RequestUtils.isVideoTag(t)?t:t.src),this._preferXHR=!1):this.setTag(this._createTag())}var e=createjs.extend(t,createjs.AbstractMediaLoader),i=t;e._createTag=function(){return document.createElement("video")},i.canLoadItem=function(t){return t.type==createjs.AbstractLoader.VIDEO},createjs.VideoLoader=createjs.promote(t,"AbstractMediaLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractLoader_constructor(t,e,createjs.AbstractLoader.SPRITESHEET),this._manifestQueue=null}var e=createjs.extend(t,createjs.AbstractLoader),i=t;i.SPRITESHEET_PROGRESS=.25,i.canLoadItem=function(t){return t.type==createjs.AbstractLoader.SPRITESHEET},e.destroy=function(){this.AbstractLoader_destroy,this._manifestQueue.close()},e._createRequest=function(){var t=this._item.callback;null!=t?this._request=new createjs.JSONPLoader(this._item):this._request=new createjs.JSONLoader(this._item)},e.handleEvent=function(t){switch(t.type){case"complete":return this._rawResult=t.target.getResult(!0),this._result=t.target.getResult(),this._sendProgress(i.SPRITESHEET_PROGRESS),void this._loadManifest(this._result);case"progress":return t.loaded*=i.SPRITESHEET_PROGRESS,this.progress=t.loaded/t.total,(isNaN(this.progress)||this.progress==1/0)&&(this.progress=0),void this._sendProgress(t)}this.AbstractLoader_handleEvent(t)},e._loadManifest=function(t){if(t&&t.images){var e=this._manifestQueue=new createjs.LoadQueue(this._preferXHR,this._item.path,this._item.crossOrigin);e.on("complete",this._handleManifestComplete,this,!0),e.on("fileload",this._handleManifestFileLoad,this),e.on("progress",this._handleManifestProgress,this),e.on("error",this._handleManifestError,this,!0),e.loadManifest(t.images)}},e._handleManifestFileLoad=function(t){var e=t.result;if(null!=e){var i=this.getResult().images,r=i.indexOf(t.item.src);i[r]=e}},e._handleManifestComplete=function(t){this._result=new createjs.SpriteSheet(this._result),this._loadedItems=this._manifestQueue.getItems(!0),this._sendComplete()},e._handleManifestProgress=function(t){this.progress=t.progress*(1-i.SPRITESHEET_PROGRESS)+i.SPRITESHEET_PROGRESS,this._sendProgress(this.progress)},e._handleManifestError=function(t){var e=new createjs.Event("fileerror");e.item=t.data,this.dispatchEvent(e)},createjs.SpriteSheetLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractLoader_constructor(t,e,createjs.AbstractLoader.SVG),this.resultFormatter=this._formatResult,this._tagSrcAttribute="data",e?this.setTag(document.createElement("svg")):(this.setTag(document.createElement("object")),this.getTag().type="image/svg+xml")}var e=createjs.extend(t,createjs.AbstractLoader),i=t;i.canLoadItem=function(t){return t.type==createjs.AbstractLoader.SVG},e._formatResult=function(t){var e=createjs.DataUtils.parseXML(t.getResult(!0),"text/xml"),i=t.getTag();return!this._preferXHR&&document.body.contains(i)&&document.body.removeChild(i),null!=e.documentElement?(i.appendChild(e.documentElement),i.style.visibility="visible",i):e},createjs.SVGLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t){this.AbstractLoader_constructor(t,!0,createjs.AbstractLoader.XML),this.resultFormatter=this._formatResult}var e=createjs.extend(t,createjs.AbstractLoader),i=t;i.canLoadItem=function(t){return t.type==createjs.AbstractLoader.XML},e._formatResult=function(t){return createjs.DataUtils.parseXML(t.getResult(!0),"text/xml")},createjs.XMLLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){var t=createjs.SoundJS=createjs.SoundJS||{};t.version="0.6.2",t.buildDate="Thu, 26 Nov 2015 20:44:31 GMT"}(),this.createjs=this.createjs||{},createjs.extend=function(t,e){function i(){this.constructor=t}return i.prototype=e.prototype,t.prototype=new i},this.createjs=this.createjs||{},createjs.promote=function(t,e){var i=t.prototype,r=Object.getPrototypeOf&&Object.getPrototypeOf(i)||i.__proto__;if(r){i[(e+="_")+"constructor"]=r.constructor;for(var n in r)i.hasOwnProperty(n)&&"function"==typeof r[n]&&(i[e+n]=r[n])}return t},this.createjs=this.createjs||{},createjs.indexOf=function(t,e){for(var i=0,r=t.length;i<r;i++)if(e===t[i])return i;return-1},this.createjs=this.createjs||{},function(){createjs.proxy=function(t,e){var i=Array.prototype.slice.call(arguments,2);return function(){return t.apply(e,Array.prototype.slice.call(arguments,0).concat(i))}}}(),this.createjs=this.createjs||{},function(){function t(){throw"BrowserDetect cannot be instantiated"}var e=t.agent=window.navigator.userAgent;t.isWindowPhone=e.indexOf("IEMobile")>-1||e.indexOf("Windows Phone")>-1,t.isFirefox=e.indexOf("Firefox")>-1,t.isOpera=null!=window.opera,t.isChrome=e.indexOf("Chrome")>-1,t.isIOS=(e.indexOf("iPod")>-1||e.indexOf("iPhone")>-1||e.indexOf("iPad")>-1)&&!t.isWindowPhone,t.isAndroid=e.indexOf("Android")>-1&&!t.isWindowPhone,t.isBlackberry=e.indexOf("Blackberry")>-1,createjs.BrowserDetect=t}(),this.createjs=this.createjs||{},function(){function t(){this._listeners=null,this._captureListeners=null}var e=t.prototype;t.initialize=function(t){t.addEventListener=e.addEventListener,t.on=e.on,t.removeEventListener=t.off=e.removeEventListener,t.removeAllEventListeners=e.removeAllEventListeners,t.hasEventListener=e.hasEventListener,t.dispatchEvent=e.dispatchEvent,t._dispatchEvent=e._dispatchEvent,t.willTrigger=e.willTrigger},e.addEventListener=function(t,e,i){var r;r=i?this._captureListeners=this._captureListeners||{}:this._listeners=this._listeners||{};var n=r[t];return n&&this.removeEventListener(t,e,i),n=r[t],n?n.push(e):r[t]=[e],e},e.on=function(t,e,i,r,n,s){return e.handleEvent&&(i=i||e,e=e.handleEvent),i=i||this,this.addEventListener(t,function(t){e.call(i,t,n),r&&t.remove()},s)},e.removeEventListener=function(t,e,i){var r=i?this._captureListeners:this._listeners;if(r){var n=r[t];if(n)for(var s=0,a=n.length;s<a;s++)if(n[s]==e){1==a?delete r[t]:n.splice(s,1);break}}},e.off=e.removeEventListener,e.removeAllEventListeners=function(t){t?(this._listeners&&delete this._listeners[t],this._captureListeners&&delete this._captureListeners[t]):this._listeners=this._captureListeners=null},e.dispatchEvent=function(t,e,i){if("string"==typeof t){var r=this._listeners;if(!(e||r&&r[t]))return!0;t=new createjs.Event(t,e,i)}else t.target&&t.clone&&(t=t.clone());try{t.target=this}catch(t){}if(t.bubbles&&this.parent){for(var n=this,s=[n];n.parent;)s.push(n=n.parent);var a,o=s.length;for(a=o-1;a>=0&&!t.propagationStopped;a--)s[a]._dispatchEvent(t,1+(0==a));for(a=1;a<o&&!t.propagationStopped;a++)s[a]._dispatchEvent(t,3)}else this._dispatchEvent(t,2);return!t.defaultPrevented},e.hasEventListener=function(t){var e=this._listeners,i=this._captureListeners;return!!(e&&e[t]||i&&i[t])},e.willTrigger=function(t){for(var e=this;e;){if(e.hasEventListener(t))return!0;e=e.parent}return!1},e.toString=function(){return"[EventDispatcher]"},e._dispatchEvent=function(t,e){var i,r=1==e?this._captureListeners:this._listeners;if(t&&r){var n=r[t.type];if(!n||!(i=n.length))return;try{t.currentTarget=this}catch(t){}try{t.eventPhase=e}catch(t){}t.removed=!1,n=n.slice();for(var s=0;s<i&&!t.immediatePropagationStopped;s++){var a=n[s];a.handleEvent?a.handleEvent(t):a(t),t.removed&&(this.off(t.type,a,1==e),t.removed=!1)}}},createjs.EventDispatcher=t}(),this.createjs=this.createjs||{},function(){function t(t,e,i){this.type=t,this.target=null,this.currentTarget=null,this.eventPhase=0,this.bubbles=!!e,this.cancelable=!!i,this.timeStamp=(new Date).getTime(),this.defaultPrevented=!1,this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.removed=!1}var e=t.prototype;e.preventDefault=function(){this.defaultPrevented=this.cancelable&&!0},e.stopPropagation=function(){this.propagationStopped=!0},e.stopImmediatePropagation=function(){this.immediatePropagationStopped=this.propagationStopped=!0},e.remove=function(){this.removed=!0},e.clone=function(){return new t(this.type,this.bubbles,this.cancelable)},e.set=function(t){for(var e in t)this[e]=t[e];return this},e.toString=function(){return"[Event (type="+this.type+")]"},createjs.Event=t}(),this.createjs=this.createjs||{},function(){function t(t,e,i){this.Event_constructor("error"),this.title=t,this.message=e,this.data=i}var e=createjs.extend(t,createjs.Event);e.clone=function(){return new createjs.ErrorEvent(this.title,this.message,this.data)},createjs.ErrorEvent=createjs.promote(t,"Event")}(),this.createjs=this.createjs||{},function(t){function e(t,e){this.Event_constructor("progress"),this.loaded=t,this.total=null==e?1:e,this.progress=0==e?0:this.loaded/this.total}var i=createjs.extend(e,createjs.Event);i.clone=function(){return new createjs.ProgressEvent(this.loaded,this.total)},createjs.ProgressEvent=createjs.promote(e,"Event")}(window),this.createjs=this.createjs||{},function(){function t(){this.src=null,this.type=null,this.id=null,this.maintainOrder=!1,this.callback=null,this.data=null,this.method=createjs.LoadItem.GET,this.values=null,this.headers=null,this.withCredentials=!1,this.mimeType=null,this.crossOrigin=null,this.loadTimeout=i.LOAD_TIMEOUT_DEFAULT}var e=t.prototype={},i=t;i.LOAD_TIMEOUT_DEFAULT=8e3,i.create=function(e){if("string"==typeof e){var r=new t;return r.src=e,r}if(e instanceof i)return e;if(e instanceof Object&&e.src)return null==e.loadTimeout&&(e.loadTimeout=i.LOAD_TIMEOUT_DEFAULT),e;throw new Error("Type not recognized.")},e.set=function(t){for(var e in t)this[e]=t[e];return this},createjs.LoadItem=i}(),function(){var t={};t.ABSOLUTE_PATT=/^(?:\w+:)?\/{2}/i,t.RELATIVE_PATT=/^[.\/]*?\//i,t.EXTENSION_PATT=/\/?[^\/]+\.(\w{1,5})$/i,t.parseURI=function(e){var i={absolute:!1,relative:!1};if(null==e)return i;var r=e.indexOf("?");r>-1&&(e=e.substr(0,r));var n;return t.ABSOLUTE_PATT.test(e)?i.absolute=!0:t.RELATIVE_PATT.test(e)&&(i.relative=!0),(n=e.match(t.EXTENSION_PATT))&&(i.extension=n[1].toLowerCase()),i},t.formatQueryString=function(t,e){if(null==t)throw new Error("You must specify data.");var i=[];for(var r in t)i.push(r+"="+escape(t[r]));return e&&(i=i.concat(e)),i.join("&")},t.buildPath=function(t,e){if(null==e)return t;var i=[],r=t.indexOf("?");if(r!=-1){var n=t.slice(r+1);i=i.concat(n.split("&"))}return r!=-1?t.slice(0,r)+"?"+this.formatQueryString(e,i):t+"?"+this.formatQueryString(e,i)},t.isCrossDomain=function(t){var e=document.createElement("a");e.href=t.src;var i=document.createElement("a");i.href=location.href;var r=""!=e.hostname&&(e.port!=i.port||e.protocol!=i.protocol||e.hostname!=i.hostname);return r},t.isLocal=function(t){var e=document.createElement("a");return e.href=t.src,""==e.hostname&&"file:"==e.protocol},t.isBinary=function(t){switch(t){case createjs.AbstractLoader.IMAGE:case createjs.AbstractLoader.BINARY:return!0;default:return!1}},t.isImageTag=function(t){return t instanceof HTMLImageElement},t.isAudioTag=function(t){return!!window.HTMLAudioElement&&t instanceof HTMLAudioElement},t.isVideoTag=function(t){return!!window.HTMLVideoElement&&t instanceof HTMLVideoElement},t.isText=function(t){switch(t){case createjs.AbstractLoader.TEXT:case createjs.AbstractLoader.JSON:case createjs.AbstractLoader.MANIFEST:case createjs.AbstractLoader.XML:case createjs.AbstractLoader.CSS:case createjs.AbstractLoader.SVG:case createjs.AbstractLoader.JAVASCRIPT:case createjs.AbstractLoader.SPRITESHEET:return!0;default:return!1}},t.getTypeByExtension=function(t){if(null==t)return createjs.AbstractLoader.TEXT;switch(t.toLowerCase()){case"jpeg":case"jpg":case"gif":case"png":case"webp":case"bmp":return createjs.AbstractLoader.IMAGE;case"ogg":case"mp3":case"webm":return createjs.AbstractLoader.SOUND;case"mp4":case"webm":case"ts":return createjs.AbstractLoader.VIDEO;case"json":return createjs.AbstractLoader.JSON;case"xml":return createjs.AbstractLoader.XML;case"css":return createjs.AbstractLoader.CSS;case"js":return createjs.AbstractLoader.JAVASCRIPT;case"svg":return createjs.AbstractLoader.SVG;default:return createjs.AbstractLoader.TEXT}},createjs.RequestUtils=t}(),this.createjs=this.createjs||{},function(){function t(t,e,i){this.EventDispatcher_constructor(),this.loaded=!1,this.canceled=!1,this.progress=0,this.type=i,this.resultFormatter=null,t?this._item=createjs.LoadItem.create(t):this._item=null,this._preferXHR=e,this._result=null,this._rawResult=null,this._loadedItems=null,this._tagSrcAttribute=null,this._tag=null}var e=createjs.extend(t,createjs.EventDispatcher),i=t;i.POST="POST",i.GET="GET",i.BINARY="binary",i.CSS="css",i.IMAGE="image",i.JAVASCRIPT="javascript",i.JSON="json",i.JSONP="jsonp",i.MANIFEST="manifest",i.SOUND="sound",i.VIDEO="video",i.SPRITESHEET="spritesheet",i.SVG="svg",i.TEXT="text",i.XML="xml",e.getItem=function(){return this._item},e.getResult=function(t){return t?this._rawResult:this._result},e.getTag=function(){return this._tag},e.setTag=function(t){this._tag=t},e.load=function(){this._createRequest(),this._request.on("complete",this,this),this._request.on("progress",this,this),this._request.on("loadStart",this,this),this._request.on("abort",this,this),this._request.on("timeout",this,this),this._request.on("error",this,this);var t=new createjs.Event("initialize");t.loader=this._request,this.dispatchEvent(t),this._request.load()},e.cancel=function(){this.canceled=!0,this.destroy()},e.destroy=function(){this._request&&(this._request.removeAllEventListeners(),this._request.destroy()),this._request=null,this._item=null,this._rawResult=null,this._result=null,this._loadItems=null,this.removeAllEventListeners()},e.getLoadedItems=function(){return this._loadedItems},e._createRequest=function(){this._preferXHR?this._request=new createjs.XHRRequest(this._item):this._request=new createjs.TagRequest(this._item,this._tag||this._createTag(),this._tagSrcAttribute)},e._createTag=function(t){return null},e._sendLoadStart=function(){this._isCanceled()||this.dispatchEvent("loadstart")},e._sendProgress=function(t){if(!this._isCanceled()){var e=null;"number"==typeof t?(this.progress=t,e=new createjs.ProgressEvent(this.progress)):(e=t,this.progress=t.loaded/t.total,e.progress=this.progress,(isNaN(this.progress)||this.progress==1/0)&&(this.progress=0)),this.hasEventListener("progress")&&this.dispatchEvent(e)}},e._sendComplete=function(){if(!this._isCanceled()){this.loaded=!0;var t=new createjs.Event("complete");t.rawResult=this._rawResult,null!=this._result&&(t.result=this._result),this.dispatchEvent(t)}},e._sendError=function(t){!this._isCanceled()&&this.hasEventListener("error")&&(null==t&&(t=new createjs.ErrorEvent("PRELOAD_ERROR_EMPTY")),this.dispatchEvent(t))},e._isCanceled=function(){return!(null!=window.createjs&&!this.canceled)},e.resultFormatter=null,e.handleEvent=function(t){switch(t.type){case"complete":this._rawResult=t.target._response;var e=this.resultFormatter&&this.resultFormatter(this);e instanceof Function?e.call(this,createjs.proxy(this._resultFormatSuccess,this),createjs.proxy(this._resultFormatFailed,this)):(this._result=e||this._rawResult,this._sendComplete());break;case"progress":this._sendProgress(t);break;case"error":this._sendError(t);break;case"loadstart":this._sendLoadStart();break;case"abort":case"timeout":this._isCanceled()||this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_"+t.type.toUpperCase()+"_ERROR"))}},e._resultFormatSuccess=function(t){this._result=t,this._sendComplete()},e._resultFormatFailed=function(t){this._sendError(t)},e.buildPath=function(t,e){return createjs.RequestUtils.buildPath(t,e)},e.toString=function(){return"[PreloadJS AbstractLoader]"},createjs.AbstractLoader=createjs.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){function t(t,e,i){this.AbstractLoader_constructor(t,e,i),this.resultFormatter=this._formatResult,this._tagSrcAttribute="src",this.on("initialize",this._updateXHR,this)}var e=createjs.extend(t,createjs.AbstractLoader);e.load=function(){this._tag||(this._tag=this._createTag(this._item.src)),this._tag.preload="auto",this._tag.load(),this.AbstractLoader_load()},e._createTag=function(){},e._createRequest=function(){this._preferXHR?this._request=new createjs.XHRRequest(this._item):this._request=new createjs.MediaTagRequest(this._item,this._tag||this._createTag(),this._tagSrcAttribute)},e._updateXHR=function(t){t.loader.setResponseType&&t.loader.setResponseType("blob")},e._formatResult=function(t){if(this._tag.removeEventListener&&this._tag.removeEventListener("canplaythrough",this._loadedHandler),this._tag.onstalled=null,this._preferXHR){var e=window.URL||window.webkitURL,i=t.getResult(!0);t.getTag().src=e.createObjectURL(i)}return t.getTag()},createjs.AbstractMediaLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){var t=function(t){this._item=t},e=createjs.extend(t,createjs.EventDispatcher);e.load=function(){},e.destroy=function(){},e.cancel=function(){},createjs.AbstractRequest=createjs.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){function t(t,e,i){this.AbstractRequest_constructor(t),this._tag=e,this._tagSrcAttribute=i,this._loadedHandler=createjs.proxy(this._handleTagComplete,this),this._addedToDOM=!1,this._startTagVisibility=null}var e=createjs.extend(t,createjs.AbstractRequest);e.load=function(){this._tag.onload=createjs.proxy(this._handleTagComplete,this),this._tag.onreadystatechange=createjs.proxy(this._handleReadyStateChange,this),this._tag.onerror=createjs.proxy(this._handleError,this);var t=new createjs.Event("initialize");t.loader=this._tag,this.dispatchEvent(t),this._hideTag(),this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout),this._tag[this._tagSrcAttribute]=this._item.src,null==this._tag.parentNode&&(window.document.body.appendChild(this._tag),this._addedToDOM=!0)},e.destroy=function(){this._clean(),this._tag=null,this.AbstractRequest_destroy()},e._handleReadyStateChange=function(){clearTimeout(this._loadTimeout);var t=this._tag;"loaded"!=t.readyState&&"complete"!=t.readyState||this._handleTagComplete(); },e._handleError=function(){this._clean(),this.dispatchEvent("error")},e._handleTagComplete=function(){this._rawResult=this._tag,this._result=this.resultFormatter&&this.resultFormatter(this)||this._rawResult,this._clean(),this._showTag(),this.dispatchEvent("complete")},e._handleTimeout=function(){this._clean(),this.dispatchEvent(new createjs.Event("timeout"))},e._clean=function(){this._tag.onload=null,this._tag.onreadystatechange=null,this._tag.onerror=null,this._addedToDOM&&null!=this._tag.parentNode&&this._tag.parentNode.removeChild(this._tag),clearTimeout(this._loadTimeout)},e._hideTag=function(){this._startTagVisibility=this._tag.style.visibility,this._tag.style.visibility="hidden"},e._showTag=function(){this._tag.style.visibility=this._startTagVisibility},e._handleStalled=function(){},createjs.TagRequest=createjs.promote(t,"AbstractRequest")}(),this.createjs=this.createjs||{},function(){function t(t,e,i){this.AbstractRequest_constructor(t),this._tag=e,this._tagSrcAttribute=i,this._loadedHandler=createjs.proxy(this._handleTagComplete,this)}var e=createjs.extend(t,createjs.TagRequest);e.load=function(){var t=createjs.proxy(this._handleStalled,this);this._stalledCallback=t;var e=createjs.proxy(this._handleProgress,this);this._handleProgress=e,this._tag.addEventListener("stalled",t),this._tag.addEventListener("progress",e),this._tag.addEventListener&&this._tag.addEventListener("canplaythrough",this._loadedHandler,!1),this.TagRequest_load()},e._handleReadyStateChange=function(){clearTimeout(this._loadTimeout);var t=this._tag;"loaded"!=t.readyState&&"complete"!=t.readyState||this._handleTagComplete()},e._handleStalled=function(){},e._handleProgress=function(t){if(t&&!(t.loaded>0&&0==t.total)){var e=new createjs.ProgressEvent(t.loaded,t.total);this.dispatchEvent(e)}},e._clean=function(){this._tag.removeEventListener&&this._tag.removeEventListener("canplaythrough",this._loadedHandler),this._tag.removeEventListener("stalled",this._stalledCallback),this._tag.removeEventListener("progress",this._progressCallback),this.TagRequest__clean()},createjs.MediaTagRequest=createjs.promote(t,"TagRequest")}(),this.createjs=this.createjs||{},function(){function t(t){this.AbstractRequest_constructor(t),this._request=null,this._loadTimeout=null,this._xhrLevel=1,this._response=null,this._rawResponse=null,this._canceled=!1,this._handleLoadStartProxy=createjs.proxy(this._handleLoadStart,this),this._handleProgressProxy=createjs.proxy(this._handleProgress,this),this._handleAbortProxy=createjs.proxy(this._handleAbort,this),this._handleErrorProxy=createjs.proxy(this._handleError,this),this._handleTimeoutProxy=createjs.proxy(this._handleTimeout,this),this._handleLoadProxy=createjs.proxy(this._handleLoad,this),this._handleReadyStateChangeProxy=createjs.proxy(this._handleReadyStateChange,this),!this._createXHR(t)}var e=createjs.extend(t,createjs.AbstractRequest);t.ACTIVEX_VERSIONS=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],e.getResult=function(t){return t&&this._rawResponse?this._rawResponse:this._response},e.cancel=function(){this.canceled=!0,this._clean(),this._request.abort()},e.load=function(){if(null==this._request)return void this._handleError();null!=this._request.addEventListener?(this._request.addEventListener("loadstart",this._handleLoadStartProxy,!1),this._request.addEventListener("progress",this._handleProgressProxy,!1),this._request.addEventListener("abort",this._handleAbortProxy,!1),this._request.addEventListener("error",this._handleErrorProxy,!1),this._request.addEventListener("timeout",this._handleTimeoutProxy,!1),this._request.addEventListener("load",this._handleLoadProxy,!1),this._request.addEventListener("readystatechange",this._handleReadyStateChangeProxy,!1)):(this._request.onloadstart=this._handleLoadStartProxy,this._request.onprogress=this._handleProgressProxy,this._request.onabort=this._handleAbortProxy,this._request.onerror=this._handleErrorProxy,this._request.ontimeout=this._handleTimeoutProxy,this._request.onload=this._handleLoadProxy,this._request.onreadystatechange=this._handleReadyStateChangeProxy),1==this._xhrLevel&&(this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout));try{this._item.values&&this._item.method!=createjs.AbstractLoader.GET?this._item.method==createjs.AbstractLoader.POST&&this._request.send(createjs.RequestUtils.formatQueryString(this._item.values)):this._request.send()}catch(t){this.dispatchEvent(new createjs.ErrorEvent("XHR_SEND",null,t))}},e.setResponseType=function(t){"blob"===t&&(t=window.URL?"blob":"arraybuffer",this._responseType=t),this._request.responseType=t},e.getAllResponseHeaders=function(){return this._request.getAllResponseHeaders instanceof Function?this._request.getAllResponseHeaders():null},e.getResponseHeader=function(t){return this._request.getResponseHeader instanceof Function?this._request.getResponseHeader(t):null},e._handleProgress=function(t){if(t&&!(t.loaded>0&&0==t.total)){var e=new createjs.ProgressEvent(t.loaded,t.total);this.dispatchEvent(e)}},e._handleLoadStart=function(t){clearTimeout(this._loadTimeout),this.dispatchEvent("loadstart")},e._handleAbort=function(t){this._clean(),this.dispatchEvent(new createjs.ErrorEvent("XHR_ABORTED",null,t))},e._handleError=function(t){this._clean(),this.dispatchEvent(new createjs.ErrorEvent(t.message))},e._handleReadyStateChange=function(t){4==this._request.readyState&&this._handleLoad()},e._handleLoad=function(t){if(!this.loaded){this.loaded=!0;var e=this._checkError();if(e)return void this._handleError(e);if(this._response=this._getResponse(),"arraybuffer"===this._responseType)try{this._response=new Blob([this._response])}catch(t){if(window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,"TypeError"===t.name&&window.BlobBuilder){var i=new BlobBuilder;i.append(this._response),this._response=i.getBlob()}}this._clean(),this.dispatchEvent(new createjs.Event("complete"))}},e._handleTimeout=function(t){this._clean(),this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_TIMEOUT",null,t))},e._checkError=function(){var t=parseInt(this._request.status);switch(t){case 404:case 0:return new Error(t)}return null},e._getResponse=function(){if(null!=this._response)return this._response;if(null!=this._request.response)return this._request.response;try{if(null!=this._request.responseText)return this._request.responseText}catch(t){}try{if(null!=this._request.responseXML)return this._request.responseXML}catch(t){}return null},e._createXHR=function(t){var e=createjs.RequestUtils.isCrossDomain(t),i={},r=null;if(window.XMLHttpRequest)r=new XMLHttpRequest,e&&void 0===r.withCredentials&&window.XDomainRequest&&(r=new XDomainRequest);else{for(var n=0,a=s.ACTIVEX_VERSIONS.length;n<a;n++){var o=s.ACTIVEX_VERSIONS[n];try{r=new ActiveXObject(o);break}catch(t){}}if(null==r)return!1}null==t.mimeType&&createjs.RequestUtils.isText(t.type)&&(t.mimeType="text/plain; charset=utf-8"),t.mimeType&&r.overrideMimeType&&r.overrideMimeType(t.mimeType),this._xhrLevel="string"==typeof r.responseType?2:1;var l=null;if(l=t.method==createjs.AbstractLoader.GET?createjs.RequestUtils.buildPath(t.src,t.values):t.src,r.open(t.method||createjs.AbstractLoader.GET,l,!0),e&&r instanceof XMLHttpRequest&&1==this._xhrLevel&&(i.Origin=location.origin),t.values&&t.method==createjs.AbstractLoader.POST&&(i["Content-Type"]="application/x-www-form-urlencoded"),e||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),t.headers)for(var h in t.headers)i[h]=t.headers[h];for(h in i)r.setRequestHeader(h,i[h]);return r instanceof XMLHttpRequest&&void 0!==t.withCredentials&&(r.withCredentials=t.withCredentials),this._request=r,!0},e._clean=function(){clearTimeout(this._loadTimeout),null!=this._request.removeEventListener?(this._request.removeEventListener("loadstart",this._handleLoadStartProxy),this._request.removeEventListener("progress",this._handleProgressProxy),this._request.removeEventListener("abort",this._handleAbortProxy),this._request.removeEventListener("error",this._handleErrorProxy),this._request.removeEventListener("timeout",this._handleTimeoutProxy),this._request.removeEventListener("load",this._handleLoadProxy),this._request.removeEventListener("readystatechange",this._handleReadyStateChangeProxy)):(this._request.onloadstart=null,this._request.onprogress=null,this._request.onabort=null,this._request.onerror=null,this._request.ontimeout=null,this._request.onload=null,this._request.onreadystatechange=null)},e.toString=function(){return"[PreloadJS XHRRequest]"},createjs.XHRRequest=createjs.promote(t,"AbstractRequest")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractMediaLoader_constructor(t,e,createjs.AbstractLoader.SOUND),createjs.RequestUtils.isAudioTag(t)?this._tag=t:createjs.RequestUtils.isAudioTag(t.src)?this._tag=t:createjs.RequestUtils.isAudioTag(t.tag)&&(this._tag=createjs.RequestUtils.isAudioTag(t)?t:t.src),null!=this._tag&&(this._preferXHR=!1)}var e=createjs.extend(t,createjs.AbstractMediaLoader),i=t;i.canLoadItem=function(t){return t.type==createjs.AbstractLoader.SOUND},e._createTag=function(t){var e=document.createElement("audio");return e.autoplay=!1,e.preload="none",e.src=t,e},createjs.SoundLoader=createjs.promote(t,"AbstractMediaLoader")}(),this.createjs=this.createjs||{},function(){var t=function(){this.interrupt=null,this.delay=null,this.offset=null,this.loop=null,this.volume=null,this.pan=null,this.startTime=null,this.duration=null},e=t.prototype={},i=t;i.create=function(t){if(t instanceof i||t instanceof Object){var e=new createjs.PlayPropsConfig;return e.set(t),e}throw new Error("Type not recognized.")},e.set=function(t){for(var e in t)this[e]=t[e];return this},e.toString=function(){return"[PlayPropsConfig]"},createjs.PlayPropsConfig=i}(),this.createjs=this.createjs||{},function(){function t(){throw"Sound cannot be instantiated"}function e(t,e){this.init(t,e)}var i=t;i.INTERRUPT_ANY="any",i.INTERRUPT_EARLY="early",i.INTERRUPT_LATE="late",i.INTERRUPT_NONE="none",i.PLAY_INITED="playInited",i.PLAY_SUCCEEDED="playSucceeded",i.PLAY_INTERRUPTED="playInterrupted",i.PLAY_FINISHED="playFinished",i.PLAY_FAILED="playFailed",i.SUPPORTED_EXTENSIONS=["mp3","ogg","opus","mpeg","wav","m4a","mp4","aiff","wma","mid"],i.EXTENSION_MAP={m4a:"mp4"},i.FILE_PATTERN=/^(?:(\w+:)\/{2}(\w+(?:\.\w+)*\/?))?([\/.]*?(?:[^?]+)?\/)?((?:[^\/?]+)\.(\w+))(?:\?(\S+)?)?$/,i.defaultInterruptBehavior=i.INTERRUPT_NONE,i.alternateExtensions=[],i.activePlugin=null,i._masterVolume=1,Object.defineProperty(i,"volume",{get:function(){return this._masterVolume},set:function(t){if(null==Number(t))return!1;if(t=Math.max(0,Math.min(1,t)),i._masterVolume=t,!this.activePlugin||!this.activePlugin.setVolume||!this.activePlugin.setVolume(t))for(var e=this._instances,r=0,n=e.length;r<n;r++)e[r].setMasterVolume(t)}}),i._masterMute=!1,Object.defineProperty(i,"muted",{get:function(){return this._masterMute},set:function(t){if(null==t)return!1;if(this._masterMute=t,!this.activePlugin||!this.activePlugin.setMute||!this.activePlugin.setMute(t))for(var e=this._instances,i=0,r=e.length;i<r;i++)e[i].setMasterMute(t);return!0}}),Object.defineProperty(i,"capabilities",{get:function(){return null==i.activePlugin?null:i.activePlugin._capabilities},set:function(t){return!1}}),i._pluginsRegistered=!1,i._lastID=0,i._instances=[],i._idHash={},i._preloadHash={},i._defaultPlayPropsHash={},i.addEventListener=null,i.removeEventListener=null,i.removeAllEventListeners=null,i.dispatchEvent=null,i.hasEventListener=null,i._listeners=null,createjs.EventDispatcher.initialize(i),i.getPreloadHandlers=function(){return{callback:createjs.proxy(i.initLoad,i),types:["sound"],extensions:i.SUPPORTED_EXTENSIONS}},i._handleLoadComplete=function(t){var e=t.target.getItem().src;if(i._preloadHash[e])for(var r=0,n=i._preloadHash[e].length;r<n;r++){var s=i._preloadHash[e][r];if(i._preloadHash[e][r]=!0,i.hasEventListener("fileload")){var t=new createjs.Event("fileload");t.src=s.src,t.id=s.id,t.data=s.data,t.sprite=s.sprite,i.dispatchEvent(t)}}},i._handleLoadError=function(t){var e=t.target.getItem().src;if(i._preloadHash[e])for(var r=0,n=i._preloadHash[e].length;r<n;r++){var s=i._preloadHash[e][r];if(i._preloadHash[e][r]=!1,i.hasEventListener("fileerror")){var t=new createjs.Event("fileerror");t.src=s.src,t.id=s.id,t.data=s.data,t.sprite=s.sprite,i.dispatchEvent(t)}}},i._registerPlugin=function(t){return!!t.isSupported()&&(i.activePlugin=new t,!0)},i.registerPlugins=function(t){i._pluginsRegistered=!0;for(var e=0,r=t.length;e<r;e++)if(i._registerPlugin(t[e]))return!0;return!1},i.initializeDefaultPlugins=function(){return null!=i.activePlugin||!i._pluginsRegistered&&!!i.registerPlugins([createjs.WebAudioPlugin,createjs.HTMLAudioPlugin])},i.isReady=function(){return null!=i.activePlugin},i.getCapabilities=function(){return null==i.activePlugin?null:i.activePlugin._capabilities},i.getCapability=function(t){return null==i.activePlugin?null:i.activePlugin._capabilities[t]},i.initLoad=function(t){return i._registerSound(t)},i._registerSound=function(t){if(!i.initializeDefaultPlugins())return!1;var r;if(t.src instanceof Object?(r=i._parseSrc(t.src),r.src=t.path+r.src):r=i._parsePath(t.src),null==r)return!1;t.src=r.src,t.type="sound";var n=t.data,s=null;if(null!=n&&(isNaN(n.channels)?isNaN(n)||(s=parseInt(n)):s=parseInt(n.channels),n.audioSprite))for(var a,o=n.audioSprite.length;o--;)a=n.audioSprite[o],i._idHash[a.id]={src:t.src,startTime:parseInt(a.startTime),duration:parseInt(a.duration)},a.defaultPlayProps&&(i._defaultPlayPropsHash[a.id]=createjs.PlayPropsConfig.create(a.defaultPlayProps));null!=t.id&&(i._idHash[t.id]={src:t.src});var l=i.activePlugin.register(t);return e.create(t.src,s),null!=n&&isNaN(n)?t.data.channels=s||e.maxPerChannel():t.data=s||e.maxPerChannel(),l.type&&(t.type=l.type),t.defaultPlayProps&&(i._defaultPlayPropsHash[t.src]=createjs.PlayPropsConfig.create(t.defaultPlayProps)),l},i.registerSound=function(t,e,r,n,s){var a={src:t,id:e,data:r,defaultPlayProps:s};t instanceof Object&&t.src&&(n=e,a=t),a=createjs.LoadItem.create(a),a.path=n,null==n||a.src instanceof Object||(a.src=n+t);var o=i._registerSound(a);if(!o)return!1;if(i._preloadHash[a.src]||(i._preloadHash[a.src]=[]),i._preloadHash[a.src].push(a),1==i._preloadHash[a.src].length)o.on("complete",createjs.proxy(this._handleLoadComplete,this)),o.on("error",createjs.proxy(this._handleLoadError,this)),i.activePlugin.preload(o);else if(1==i._preloadHash[a.src][0])return!0;return a},i.registerSounds=function(t,e){var i=[];t.path&&(e?e+=t.path:e=t.path,t=t.manifest);for(var r=0,n=t.length;r<n;r++)i[r]=createjs.Sound.registerSound(t[r].src,t[r].id,t[r].data,e,t[r].defaultPlayProps);return i},i.removeSound=function(t,r){if(null==i.activePlugin)return!1;t instanceof Object&&t.src&&(t=t.src);var n;if(t instanceof Object?n=i._parseSrc(t):(t=i._getSrcById(t).src,n=i._parsePath(t)),null==n)return!1;t=n.src,null!=r&&(t=r+t);for(var s in i._idHash)i._idHash[s].src==t&&delete i._idHash[s];return e.removeSrc(t),delete i._preloadHash[t],i.activePlugin.removeSound(t),!0},i.removeSounds=function(t,e){var i=[];t.path&&(e?e+=t.path:e=t.path,t=t.manifest);for(var r=0,n=t.length;r<n;r++)i[r]=createjs.Sound.removeSound(t[r].src,e);return i},i.removeAllSounds=function(){i._idHash={},i._preloadHash={},e.removeAll(),i.activePlugin&&i.activePlugin.removeAllSounds()},i.loadComplete=function(t){if(!i.isReady())return!1;var e=i._parsePath(t);return t=e?i._getSrcById(e.src).src:i._getSrcById(t).src,void 0!=i._preloadHash[t]&&1==i._preloadHash[t][0]},i._parsePath=function(t){"string"!=typeof t&&(t=t.toString());var e=t.match(i.FILE_PATTERN);if(null==e)return!1;for(var r=e[4],n=e[5],s=i.capabilities,a=0;!s[n];)if(n=i.alternateExtensions[a++],a>i.alternateExtensions.length)return null;t=t.replace("."+e[5],"."+n);var o={name:r,src:t,extension:n};return o},i._parseSrc=function(t){var e={name:void 0,src:void 0,extension:void 0},r=i.capabilities;for(var n in t)if(t.hasOwnProperty(n)&&r[n]){e.src=t[n],e.extension=n;break}if(!e.src)return!1;var s=e.src.lastIndexOf("/");return s!=-1?e.name=e.src.slice(s+1):e.name=e.src,e},i.play=function(t,e,r,n,s,a,o,l,h){var u;u=e instanceof Object||e instanceof createjs.PlayPropsConfig?createjs.PlayPropsConfig.create(e):createjs.PlayPropsConfig.create({interrupt:e,delay:r,offset:n,loop:s,volume:a,pan:o,startTime:l,duration:h});var c=i.createInstance(t,u.startTime,u.duration),d=i._playInstance(c,u);return d||c._playFailed(),c},i.createInstance=function(t,r,n){if(!i.initializeDefaultPlugins())return new createjs.DefaultSoundInstance(t,r,n);var s=i._defaultPlayPropsHash[t];t=i._getSrcById(t);var a=i._parsePath(t.src),o=null;return null!=a&&null!=a.src?(e.create(a.src),null==r&&(r=t.startTime),o=i.activePlugin.create(a.src,r,n||t.duration),s=s||i._defaultPlayPropsHash[a.src],s&&o.applyPlayProps(s)):o=new createjs.DefaultSoundInstance(t,r,n),o.uniqueId=i._lastID++,o},i.stop=function(){for(var t=this._instances,e=t.length;e--;)t[e].stop()},i.setVolume=function(t){if(null==Number(t))return!1;if(t=Math.max(0,Math.min(1,t)),i._masterVolume=t,!this.activePlugin||!this.activePlugin.setVolume||!this.activePlugin.setVolume(t))for(var e=this._instances,r=0,n=e.length;r<n;r++)e[r].setMasterVolume(t)},i.getVolume=function(){return this._masterVolume},i.setMute=function(t){if(null==t)return!1;if(this._masterMute=t,!this.activePlugin||!this.activePlugin.setMute||!this.activePlugin.setMute(t))for(var e=this._instances,i=0,r=e.length;i<r;i++)e[i].setMasterMute(t);return!0},i.getMute=function(){return this._masterMute},i.setDefaultPlayProps=function(t,e){t=i._getSrcById(t),i._defaultPlayPropsHash[i._parsePath(t.src).src]=createjs.PlayPropsConfig.create(e)},i.getDefaultPlayProps=function(t){return t=i._getSrcById(t),i._defaultPlayPropsHash[i._parsePath(t.src).src]},i._playInstance=function(t,e){var r=i._defaultPlayPropsHash[t.src]||{};if(null==e.interrupt&&(e.interrupt=r.interrupt||i.defaultInterruptBehavior),null==e.delay&&(e.delay=r.delay||0),null==e.offset&&(e.offset=t.getPosition()),null==e.loop&&(e.loop=t.loop),null==e.volume&&(e.volume=t.volume),null==e.pan&&(e.pan=t.pan),0==e.delay){var n=i._beginPlaying(t,e);if(!n)return!1}else{var s=setTimeout(function(){i._beginPlaying(t,e)},e.delay);t.delayTimeoutId=s}return this._instances.push(t),!0},i._beginPlaying=function(t,i){if(!e.add(t,i.interrupt))return!1;var r=t._beginPlaying(i);if(!r){var n=createjs.indexOf(this._instances,t);return n>-1&&this._instances.splice(n,1),!1}return!0},i._getSrcById=function(t){return i._idHash[t]||{src:t}},i._playFinished=function(t){e.remove(t);var i=createjs.indexOf(this._instances,t);i>-1&&this._instances.splice(i,1)},createjs.Sound=t,e.channels={},e.create=function(t,i){var r=e.get(t);return null==r&&(e.channels[t]=new e(t,i),!0)},e.removeSrc=function(t){var i=e.get(t);return null!=i&&(i._removeAll(),delete e.channels[t],!0)},e.removeAll=function(){for(var t in e.channels)e.channels[t]._removeAll();e.channels={}},e.add=function(t,i){var r=e.get(t.src);return null!=r&&r._add(t,i)},e.remove=function(t){var i=e.get(t.src);return null!=i&&(i._remove(t),!0)},e.maxPerChannel=function(){return r.maxDefault},e.get=function(t){return e.channels[t]};var r=e.prototype;r.constructor=e,r.src=null,r.max=null,r.maxDefault=100,r.length=0,r.init=function(t,e){this.src=t,this.max=e||this.maxDefault,this.max==-1&&(this.max=this.maxDefault),this._instances=[]},r._get=function(t){return this._instances[t]},r._add=function(t,e){return!!this._getSlot(e,t)&&(this._instances.push(t),this.length++,!0)},r._remove=function(t){var e=createjs.indexOf(this._instances,t);return e!=-1&&(this._instances.splice(e,1),this.length--,!0)},r._removeAll=function(){for(var t=this.length-1;t>=0;t--)this._instances[t].stop()},r._getSlot=function(e,i){var r,n;if(e!=t.INTERRUPT_NONE&&(n=this._get(0),null==n))return!0;for(var s=0,a=this.max;s<a;s++){if(r=this._get(s),null==r)return!0;if(r.playState==t.PLAY_FINISHED||r.playState==t.PLAY_INTERRUPTED||r.playState==t.PLAY_FAILED){n=r;break}e!=t.INTERRUPT_NONE&&(e==t.INTERRUPT_EARLY&&r.getPosition()<n.getPosition()||e==t.INTERRUPT_LATE&&r.getPosition()>n.getPosition())&&(n=r)}return null!=n&&(n._interrupt(),this._remove(n),!0)},r.toString=function(){return"[Sound SoundChannel]"}}(),this.createjs=this.createjs||{},function(){var t=function(t,e,i,r){this.EventDispatcher_constructor(),this.src=t,this.uniqueId=-1,this.playState=null,this.delayTimeoutId=null,this._volume=1,Object.defineProperty(this,"volume",{get:this.getVolume,set:this.setVolume}),this._pan=0,Object.defineProperty(this,"pan",{get:this.getPan,set:this.setPan}),this._startTime=Math.max(0,e||0),Object.defineProperty(this,"startTime",{get:this.getStartTime,set:this.setStartTime}),this._duration=Math.max(0,i||0),Object.defineProperty(this,"duration",{get:this.getDuration,set:this.setDuration}),this._playbackResource=null,Object.defineProperty(this,"playbackResource",{get:this.getPlaybackResource,set:this.setPlaybackResource}),r!==!1&&r!==!0&&this.setPlaybackResource(r),this._position=0,Object.defineProperty(this,"position",{get:this.getPosition,set:this.setPosition}),this._loop=0,Object.defineProperty(this,"loop",{get:this.getLoop,set:this.setLoop}),this._muted=!1,Object.defineProperty(this,"muted",{get:this.getMuted,set:this.setMuted}),this._paused=!1,Object.defineProperty(this,"paused",{get:this.getPaused,set:this.setPaused})},e=createjs.extend(t,createjs.EventDispatcher);e.play=function(t,e,i,r,n,s){var a;return a=t instanceof Object||t instanceof createjs.PlayPropsConfig?createjs.PlayPropsConfig.create(t):createjs.PlayPropsConfig.create({interrupt:t,delay:e,offset:i,loop:r,volume:n,pan:s}),this.playState==createjs.Sound.PLAY_SUCCEEDED?(this.applyPlayProps(a),void(this._paused&&this.setPaused(!1))):(this._cleanUp(),createjs.Sound._playInstance(this,a),this)},e.stop=function(){return this._position=0,this._paused=!1,this._handleStop(),this._cleanUp(),this.playState=createjs.Sound.PLAY_FINISHED,this},e.destroy=function(){this._cleanUp(),this.src=null,this.playbackResource=null,this.removeAllEventListeners()},e.applyPlayProps=function(t){return null!=t.offset&&this.setPosition(t.offset),null!=t.loop&&this.setLoop(t.loop),null!=t.volume&&this.setVolume(t.volume),null!=t.pan&&this.setPan(t.pan),null!=t.startTime&&(this.setStartTime(t.startTime),this.setDuration(t.duration)),this},e.toString=function(){return"[AbstractSoundInstance]"},e.getPaused=function(){return this._paused},e.setPaused=function(t){if(!(t!==!0&&t!==!1||this._paused==t||1==t&&this.playState!=createjs.Sound.PLAY_SUCCEEDED))return this._paused=t,t?this._pause():this._resume(),clearTimeout(this.delayTimeoutId),this},e.setVolume=function(t){return t==this._volume?this:(this._volume=Math.max(0,Math.min(1,t)),this._muted||this._updateVolume(),this)},e.getVolume=function(){return this._volume},e.setMuted=function(t){if(t===!0||t===!1)return this._muted=t,this._updateVolume(),this},e.getMuted=function(){return this._muted},e.setPan=function(t){return t==this._pan?this:(this._pan=Math.max(-1,Math.min(1,t)),this._updatePan(),this)},e.getPan=function(){return this._pan},e.getPosition=function(){return this._paused||this.playState!=createjs.Sound.PLAY_SUCCEEDED||(this._position=this._calculateCurrentPosition()),this._position},e.setPosition=function(t){return this._position=Math.max(0,t),this.playState==createjs.Sound.PLAY_SUCCEEDED&&this._updatePosition(),this},e.getStartTime=function(){return this._startTime},e.setStartTime=function(t){return t==this._startTime?this:(this._startTime=Math.max(0,t||0),this._updateStartTime(),this)},e.getDuration=function(){return this._duration},e.setDuration=function(t){return t==this._duration?this:(this._duration=Math.max(0,t||0),this._updateDuration(),this)},e.setPlaybackResource=function(t){return this._playbackResource=t,0==this._duration&&this._setDurationFromSource(),this},e.getPlaybackResource=function(){return this._playbackResource},e.getLoop=function(){return this._loop},e.setLoop=function(t){null!=this._playbackResource&&(0!=this._loop&&0==t?this._removeLooping(t):0==this._loop&&0!=t&&this._addLooping(t)),this._loop=t},e._sendEvent=function(t){var e=new createjs.Event(t);this.dispatchEvent(e)},e._cleanUp=function(){clearTimeout(this.delayTimeoutId),this._handleCleanUp(),this._paused=!1,createjs.Sound._playFinished(this)},e._interrupt=function(){this._cleanUp(),this.playState=createjs.Sound.PLAY_INTERRUPTED,this._sendEvent("interrupted")},e._beginPlaying=function(t){return this.setPosition(t.offset),this.setLoop(t.loop),this.setVolume(t.volume),this.setPan(t.pan),null!=t.startTime&&(this.setStartTime(t.startTime),this.setDuration(t.duration)),null!=this._playbackResource&&this._position<this._duration?(this._paused=!1,this._handleSoundReady(),this.playState=createjs.Sound.PLAY_SUCCEEDED,this._sendEvent("succeeded"),!0):(this._playFailed(),!1)},e._playFailed=function(){this._cleanUp(),this.playState=createjs.Sound.PLAY_FAILED,this._sendEvent("failed")},e._handleSoundComplete=function(t){return this._position=0,0!=this._loop?(this._loop--,this._handleLoop(),void this._sendEvent("loop")):(this._cleanUp(),this.playState=createjs.Sound.PLAY_FINISHED,void this._sendEvent("complete"))},e._handleSoundReady=function(){},e._updateVolume=function(){},e._updatePan=function(){},e._updateStartTime=function(){},e._updateDuration=function(){},e._setDurationFromSource=function(){},e._calculateCurrentPosition=function(){},e._updatePosition=function(){},e._removeLooping=function(t){},e._addLooping=function(t){},e._pause=function(){},e._resume=function(){},e._handleStop=function(){},e._handleCleanUp=function(){},e._handleLoop=function(){},createjs.AbstractSoundInstance=createjs.promote(t,"EventDispatcher"),createjs.DefaultSoundInstance=createjs.AbstractSoundInstance}(),this.createjs=this.createjs||{},function(){var t=function(){this._capabilities=null,this._loaders={},this._audioSources={},this._soundInstances={},this._volume=1,this._loaderClass,this._soundInstanceClass},e=t.prototype;t._capabilities=null,t.isSupported=function(){return!0},e.register=function(t){var e=this._loaders[t.src];return e&&!e.canceled?this._loaders[t.src]:(this._audioSources[t.src]=!0,this._soundInstances[t.src]=[],e=new this._loaderClass(t),e.on("complete",this._handlePreloadComplete,this),this._loaders[t.src]=e,e)},e.preload=function(t){t.on("error",this._handlePreloadError,this),t.load()},e.isPreloadStarted=function(t){return null!=this._audioSources[t]},e.isPreloadComplete=function(t){return!(null==this._audioSources[t]||1==this._audioSources[t])},e.removeSound=function(t){if(this._soundInstances[t]){for(var e=this._soundInstances[t].length;e--;){var i=this._soundInstances[t][e];i.destroy()}delete this._soundInstances[t],delete this._audioSources[t],this._loaders[t]&&this._loaders[t].destroy(),delete this._loaders[t]}},e.removeAllSounds=function(){for(var t in this._audioSources)this.removeSound(t)},e.create=function(t,e,i){this.isPreloadStarted(t)||this.preload(this.register(t));var r=new this._soundInstanceClass(t,e,i,this._audioSources[t]);return this._soundInstances[t].push(r),r},e.setVolume=function(t){return this._volume=t,this._updateVolume(),!0},e.getVolume=function(){return this._volume},e.setMute=function(t){return this._updateVolume(),!0},e.toString=function(){return"[AbstractPlugin]"},e._handlePreloadComplete=function(t){var e=t.target.getItem().src;this._audioSources[e]=t.result;for(var i=0,r=this._soundInstances[e].length;i<r;i++){var n=this._soundInstances[e][i];n.setPlaybackResource(this._audioSources[e])}},e._handlePreloadError=function(t){},e._updateVolume=function(){},createjs.AbstractPlugin=t}(),this.createjs=this.createjs||{},function(){function t(t){this.AbstractLoader_constructor(t,!0,createjs.AbstractLoader.SOUND)}var e=createjs.extend(t,createjs.AbstractLoader);t.context=null,e.toString=function(){return"[WebAudioLoader]"},e._createRequest=function(){this._request=new createjs.XHRRequest(this._item,!1),this._request.setResponseType("arraybuffer")},e._sendComplete=function(e){t.context.decodeAudioData(this._rawResult,createjs.proxy(this._handleAudioDecoded,this),createjs.proxy(this._sendError,this))},e._handleAudioDecoded=function(t){this._result=t,this.AbstractLoader__sendComplete()},createjs.WebAudioLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e,r,n){this.AbstractSoundInstance_constructor(t,e,r,n),this.gainNode=i.context.createGain(),this.panNode=i.context.createPanner(),this.panNode.panningModel=i._panningModel,this.panNode.connect(this.gainNode),this._updatePan(),this.sourceNode=null,this._soundCompleteTimeout=null,this._sourceNodeNext=null,this._playbackStartTime=0,this._endedHandler=createjs.proxy(this._handleSoundComplete,this)}var e=createjs.extend(t,createjs.AbstractSoundInstance),i=t;i.context=null,i._scratchBuffer=null,i.destinationNode=null,i._panningModel="equalpower",e.destroy=function(){this.AbstractSoundInstance_destroy(),this.panNode.disconnect(0),this.panNode=null,this.gainNode.disconnect(0),this.gainNode=null},e.toString=function(){return"[WebAudioSoundInstance]"},e._updatePan=function(){this.panNode.setPosition(this._pan,0,-.5)},e._removeLooping=function(t){this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext)},e._addLooping=function(t){this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._sourceNodeNext=this._createAndPlayAudioNode(this._playbackStartTime,0))},e._setDurationFromSource=function(){this._duration=1e3*this.playbackResource.duration},e._handleCleanUp=function(){this.sourceNode&&this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this.sourceNode=this._cleanUpAudioNode(this.sourceNode),this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext)),0!=this.gainNode.numberOfOutputs&&this.gainNode.disconnect(0),clearTimeout(this._soundCompleteTimeout),this._playbackStartTime=0},e._cleanUpAudioNode=function(t){if(t){t.stop(0),t.disconnect(0);try{t.buffer=i._scratchBuffer}catch(t){}t=null}return t},e._handleSoundReady=function(t){this.gainNode.connect(i.destinationNode);var e=.001*this._duration,r=.001*this._position;r>e&&(r=e),this.sourceNode=this._createAndPlayAudioNode(i.context.currentTime-e,r),this._playbackStartTime=this.sourceNode.startTime-r,this._soundCompleteTimeout=setTimeout(this._endedHandler,1e3*(e-r)),0!=this._loop&&(this._sourceNodeNext=this._createAndPlayAudioNode(this._playbackStartTime,0))},e._createAndPlayAudioNode=function(t,e){var r=i.context.createBufferSource();r.buffer=this.playbackResource,r.connect(this.panNode);var n=.001*this._duration;return r.startTime=t+n,r.start(r.startTime,e+.001*this._startTime,n-e),r},e._pause=function(){this._position=1e3*(i.context.currentTime-this._playbackStartTime),this.sourceNode=this._cleanUpAudioNode(this.sourceNode),this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext),0!=this.gainNode.numberOfOutputs&&this.gainNode.disconnect(0),clearTimeout(this._soundCompleteTimeout)},e._resume=function(){this._handleSoundReady()},e._updateVolume=function(){var t=this._muted?0:this._volume;t!=this.gainNode.gain.value&&(this.gainNode.gain.value=t)},e._calculateCurrentPosition=function(){return 1e3*(i.context.currentTime-this._playbackStartTime)},e._updatePosition=function(){this.sourceNode=this._cleanUpAudioNode(this.sourceNode),this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext),clearTimeout(this._soundCompleteTimeout),this._paused||this._handleSoundReady()},e._handleLoop=function(){this._cleanUpAudioNode(this.sourceNode),this.sourceNode=this._sourceNodeNext,this._playbackStartTime=this.sourceNode.startTime,this._sourceNodeNext=this._createAndPlayAudioNode(this._playbackStartTime,0),this._soundCompleteTimeout=setTimeout(this._endedHandler,this._duration)},e._updateDuration=function(){this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._pause(),this._resume())},createjs.WebAudioSoundInstance=createjs.promote(t,"AbstractSoundInstance"); }(),this.createjs=this.createjs||{},function(){function t(){this.AbstractPlugin_constructor(),this._panningModel=i._panningModel,this.context=i.context,this.dynamicsCompressorNode=this.context.createDynamicsCompressor(),this.dynamicsCompressorNode.connect(this.context.destination),this.gainNode=this.context.createGain(),this.gainNode.connect(this.dynamicsCompressorNode),createjs.WebAudioSoundInstance.destinationNode=this.gainNode,this._capabilities=i._capabilities,this._loaderClass=createjs.WebAudioLoader,this._soundInstanceClass=createjs.WebAudioSoundInstance,this._addPropsToClasses()}var e=createjs.extend(t,createjs.AbstractPlugin),i=t;i._capabilities=null,i._panningModel="equalpower",i.context=null,i._scratchBuffer=null,i._unlocked=!1,i.isSupported=function(){var t=createjs.BrowserDetect.isIOS||createjs.BrowserDetect.isAndroid||createjs.BrowserDetect.isBlackberry;return!("file:"==location.protocol&&!t&&!this._isFileXHRSupported())&&(i._generateCapabilities(),null!=i.context)},i.playEmptySound=function(){if(null!=i.context){var t=i.context.createBufferSource();t.buffer=i._scratchBuffer,t.connect(i.context.destination),t.start(0,0,0)}},i._isFileXHRSupported=function(){var t=!0,e=new XMLHttpRequest;try{e.open("GET","WebAudioPluginTest.fail",!1)}catch(e){return t=!1}e.onerror=function(){t=!1},e.onload=function(){t=404==this.status||200==this.status||0==this.status&&""!=this.response};try{e.send()}catch(e){t=!1}return t},i._generateCapabilities=function(){if(null==i._capabilities){var t=document.createElement("audio");if(null==t.canPlayType)return null;if(null==i.context)if(window.AudioContext)i.context=new AudioContext;else{if(!window.webkitAudioContext)return null;i.context=new webkitAudioContext}null==i._scratchBuffer&&(i._scratchBuffer=i.context.createBuffer(1,1,22050)),i._compatibilitySetUp(),"ontouchstart"in window&&"running"!=i.context.state&&(i._unlock(),document.addEventListener("mousedown",i._unlock,!0),document.addEventListener("touchend",i._unlock,!0)),i._capabilities={panning:!0,volume:!0,tracks:-1};for(var e=createjs.Sound.SUPPORTED_EXTENSIONS,r=createjs.Sound.EXTENSION_MAP,n=0,s=e.length;n<s;n++){var a=e[n],o=r[a]||a;i._capabilities[a]="no"!=t.canPlayType("audio/"+a)&&""!=t.canPlayType("audio/"+a)||"no"!=t.canPlayType("audio/"+o)&&""!=t.canPlayType("audio/"+o)}i.context.destination.numberOfChannels<2&&(i._capabilities.panning=!1)}},i._compatibilitySetUp=function(){if(i._panningModel="equalpower",!i.context.createGain){i.context.createGain=i.context.createGainNode;var t=i.context.createBufferSource();t.__proto__.start=t.__proto__.noteGrainOn,t.__proto__.stop=t.__proto__.noteOff,i._panningModel=0}},i._unlock=function(){i._unlocked||(i.playEmptySound(),"running"==i.context.state&&(document.removeEventListener("mousedown",i._unlock,!0),document.removeEventListener("touchend",i._unlock,!0),i._unlocked=!0))},e.toString=function(){return"[WebAudioPlugin]"},e._addPropsToClasses=function(){var t=this._soundInstanceClass;t.context=this.context,t._scratchBuffer=i._scratchBuffer,t.destinationNode=this.gainNode,t._panningModel=this._panningModel,this._loaderClass.context=this.context},e._updateVolume=function(){var t=createjs.Sound._masterMute?0:this._volume;t!=this.gainNode.gain.value&&(this.gainNode.gain.value=t)},createjs.WebAudioPlugin=createjs.promote(t,"AbstractPlugin")}(),this.createjs=this.createjs||{},function(){function t(){throw"HTMLAudioTagPool cannot be instantiated"}function e(t){this._tags=[]}var i=t;i._tags={},i._tagPool=new e,i._tagUsed={},i.get=function(t){var e=i._tags[t];return null==e?(e=i._tags[t]=i._tagPool.get(),e.src=t):i._tagUsed[t]?(e=i._tagPool.get(),e.src=t):i._tagUsed[t]=!0,e},i.set=function(t,e){e==i._tags[t]?i._tagUsed[t]=!1:i._tagPool.set(e)},i.remove=function(t){var e=i._tags[t];return null!=e&&(i._tagPool.set(e),delete i._tags[t],delete i._tagUsed[t],!0)},i.getDuration=function(t){var e=i._tags[t];return null!=e&&e.duration?1e3*e.duration:0},createjs.HTMLAudioTagPool=t;var r=e.prototype;r.constructor=e,r.get=function(){var t;return t=0==this._tags.length?this._createTag():this._tags.pop(),null==t.parentNode&&document.body.appendChild(t),t},r.set=function(t){var e=createjs.indexOf(this._tags,t);e==-1&&(this._tags.src=null,this._tags.push(t))},r.toString=function(){return"[TagPool]"},r._createTag=function(){var t=document.createElement("audio");return t.autoplay=!1,t.preload="none",t}}(),this.createjs=this.createjs||{},function(){function t(t,e,i,r){this.AbstractSoundInstance_constructor(t,e,i,r),this._audioSpriteStopTime=null,this._delayTimeoutId=null,this._endedHandler=createjs.proxy(this._handleSoundComplete,this),this._readyHandler=createjs.proxy(this._handleTagReady,this),this._stalledHandler=createjs.proxy(this._playFailed,this),this._audioSpriteEndHandler=createjs.proxy(this._handleAudioSpriteLoop,this),this._loopHandler=createjs.proxy(this._handleSoundComplete,this),i?this._audioSpriteStopTime=.001*(e+i):this._duration=createjs.HTMLAudioTagPool.getDuration(this.src)}var e=createjs.extend(t,createjs.AbstractSoundInstance);e.setMasterVolume=function(t){this._updateVolume()},e.setMasterMute=function(t){this._updateVolume()},e.toString=function(){return"[HTMLAudioSoundInstance]"},e._removeLooping=function(){null!=this._playbackResource&&(this._playbackResource.loop=!1,this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1))},e._addLooping=function(){null==this._playbackResource||this._audioSpriteStopTime||(this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1),this._playbackResource.loop=!0)},e._handleCleanUp=function(){var t=this._playbackResource;if(null!=t){t.pause(),t.loop=!1,t.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),t.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY,this._readyHandler,!1),t.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED,this._stalledHandler,!1),t.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1),t.removeEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE,this._audioSpriteEndHandler,!1);try{t.currentTime=this._startTime}catch(t){}createjs.HTMLAudioTagPool.set(this.src,t),this._playbackResource=null}},e._beginPlaying=function(t){return this._playbackResource=createjs.HTMLAudioTagPool.get(this.src),this.AbstractSoundInstance__beginPlaying(t)},e._handleSoundReady=function(t){if(4!==this._playbackResource.readyState){var e=this._playbackResource;return e.addEventListener(createjs.HTMLAudioPlugin._AUDIO_READY,this._readyHandler,!1),e.addEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED,this._stalledHandler,!1),e.preload="auto",void e.load()}this._updateVolume(),this._playbackResource.currentTime=.001*(this._startTime+this._position),this._audioSpriteStopTime?this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE,this._audioSpriteEndHandler,!1):(this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),0!=this._loop&&(this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1),this._playbackResource.loop=!0)),this._playbackResource.play()},e._handleTagReady=function(t){this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY,this._readyHandler,!1),this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED,this._stalledHandler,!1),this._handleSoundReady()},e._pause=function(){this._playbackResource.pause()},e._resume=function(){this._playbackResource.play()},e._updateVolume=function(){if(null!=this._playbackResource){var t=this._muted||createjs.Sound._masterMute?0:this._volume*createjs.Sound._masterVolume;t!=this._playbackResource.volume&&(this._playbackResource.volume=t)}},e._calculateCurrentPosition=function(){return 1e3*this._playbackResource.currentTime-this._startTime},e._updatePosition=function(){this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1),this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._handleSetPositionSeek,!1);try{this._playbackResource.currentTime=.001*(this._position+this._startTime)}catch(t){this._handleSetPositionSeek(null)}},e._handleSetPositionSeek=function(t){null!=this._playbackResource&&(this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._handleSetPositionSeek,!1),this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1))},e._handleAudioSpriteLoop=function(t){this._playbackResource.currentTime<=this._audioSpriteStopTime||(this._playbackResource.pause(),0==this._loop?this._handleSoundComplete(null):(this._position=0,this._loop--,this._playbackResource.currentTime=.001*this._startTime,this._paused||this._playbackResource.play(),this._sendEvent("loop")))},e._handleLoop=function(t){0==this._loop&&(this._playbackResource.loop=!1,this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1))},e._updateStartTime=function(){this._audioSpriteStopTime=.001*(this._startTime+this._duration),this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE,this._audioSpriteEndHandler,!1))},e._updateDuration=function(){this._audioSpriteStopTime=.001*(this._startTime+this._duration),this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE,this._audioSpriteEndHandler,!1))},e._setDurationFromSource=function(){this._duration=createjs.HTMLAudioTagPool.getDuration(this.src),this._playbackResource=null},createjs.HTMLAudioSoundInstance=createjs.promote(t,"AbstractSoundInstance")}(),this.createjs=this.createjs||{},function(){function t(){this.AbstractPlugin_constructor(),this.defaultNumChannels=2,this._capabilities=i._capabilities,this._loaderClass=createjs.SoundLoader,this._soundInstanceClass=createjs.HTMLAudioSoundInstance}var e=createjs.extend(t,createjs.AbstractPlugin),i=t;i.MAX_INSTANCES=30,i._AUDIO_READY="canplaythrough",i._AUDIO_ENDED="ended",i._AUDIO_SEEKED="seeked",i._AUDIO_STALLED="stalled",i._TIME_UPDATE="timeupdate",i._capabilities=null,i.isSupported=function(){return i._generateCapabilities(),null!=i._capabilities},i._generateCapabilities=function(){if(null==i._capabilities){var t=document.createElement("audio");if(null==t.canPlayType)return null;i._capabilities={panning:!1,volume:!0,tracks:-1};for(var e=createjs.Sound.SUPPORTED_EXTENSIONS,r=createjs.Sound.EXTENSION_MAP,n=0,s=e.length;n<s;n++){var a=e[n],o=r[a]||a;i._capabilities[a]="no"!=t.canPlayType("audio/"+a)&&""!=t.canPlayType("audio/"+a)||"no"!=t.canPlayType("audio/"+o)&&""!=t.canPlayType("audio/"+o)}}},e.register=function(t){var e=createjs.HTMLAudioTagPool.get(t.src),i=this.AbstractPlugin_register(t);return i.setTag(e),i},e.removeSound=function(t){this.AbstractPlugin_removeSound(t),createjs.HTMLAudioTagPool.remove(t)},e.create=function(t,e,i){var r=this.AbstractPlugin_create(t,e,i);return r.setPlaybackResource(null),r},e.toString=function(){return"[HTMLAudioPlugin]"},e.setVolume=e.getVolume=e.setMute=null,createjs.HTMLAudioPlugin=createjs.promote(t,"AbstractPlugin")}(),function(){function t(t){return!!t.exifdata}function e(t,e){e=e||t.match(/^data\:([^\;]+)\;base64,/im)[1]||"",t=t.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var i=atob(t),r=i.length,n=new ArrayBuffer(r),s=new Uint8Array(n),a=0;a<r;a++)s[a]=i.charCodeAt(a);return n}function i(t,e){var i=new XMLHttpRequest;i.open("GET",t,!0),i.responseType="blob",i.onload=function(t){200!=this.status&&0!==this.status||e(this.response)},i.send()}function r(t,r){function a(e){var i=n(e),a=s(e);t.exifdata=i||{},t.iptcdata=a||{},r&&r.call(t)}if(t.src)if(/^data\:/i.test(t.src)){var o=e(t.src);a(o)}else if(/^blob\:/i.test(t.src)){var l=new FileReader;l.onload=function(t){a(t.target.result)},i(t.src,function(t){l.readAsArrayBuffer(t)})}else{var h=new XMLHttpRequest;h.onload=function(){if(200!=this.status&&0!==this.status)throw"Could not load image";a(h.response),h=null},h.open("GET",t.src,!0),h.responseType="arraybuffer",h.send(null)}else if(window.FileReader&&(t instanceof window.Blob||t instanceof window.File)){var l=new FileReader;l.onload=function(t){c&&console.log("Got file of length "+t.target.result.byteLength),a(t.target.result)},l.readAsArrayBuffer(t)}}function n(t){var e=new DataView(t);if(c&&console.log("Got file of length "+t.byteLength),255!=e.getUint8(0)||216!=e.getUint8(1))return c&&console.log("Not a valid JPEG"),!1;for(var i,r=2,n=t.byteLength;r<n;){if(255!=e.getUint8(r))return c&&console.log("Not a valid marker at offset "+r+", found: "+e.getUint8(r)),!1;if(i=e.getUint8(r+1),c&&console.log(i),225==i)return c&&console.log("Found 0xFFE1 marker"),u(e,r+4,e.getUint16(r+2)-2);r+=2+e.getUint16(r+2)}}function s(t){var e=new DataView(t);if(c&&console.log("Got file of length "+t.byteLength),255!=e.getUint8(0)||216!=e.getUint8(1))return c&&console.log("Not a valid JPEG"),!1;for(var i=2,r=t.byteLength,n=function(t,e){return 56===t.getUint8(e)&&66===t.getUint8(e+1)&&73===t.getUint8(e+2)&&77===t.getUint8(e+3)&&4===t.getUint8(e+4)&&4===t.getUint8(e+5)};i<r;){if(n(e,i)){var s=e.getUint8(i+7);s%2!==0&&(s+=1),0===s&&(s=4);var o=i+8+s,l=e.getUint16(i+6+s);return a(t,o,l)}i++}}function a(t,e,i){for(var r,n,s,a,o,l=new DataView(t),u={},c=e;c<e+i;)28===l.getUint8(c)&&2===l.getUint8(c+1)&&(a=l.getUint8(c+2),a in v&&(s=l.getInt16(c+3),o=s+5,n=v[a],r=h(l,c+5,s),u.hasOwnProperty(n)?u[n]instanceof Array?u[n].push(r):u[n]=[u[n],r]:u[n]=r)),c++;return u}function o(t,e,i,r,n){var s,a,o,h=t.getUint16(i,!n),u={};for(o=0;o<h;o++)s=i+12*o+2,a=r[t.getUint16(s,!n)],!a&&c&&console.log("Unknown tag: "+t.getUint16(s,!n)),u[a]=l(t,s,e,i,n);return u}function l(t,e,i,r,n){var s,a,o,l,u,c,d=t.getUint16(e+2,!n),f=t.getUint32(e+4,!n),p=t.getUint32(e+8,!n)+i;switch(d){case 1:case 7:if(1==f)return t.getUint8(e+8,!n);for(s=f>4?p:e+8,a=[],l=0;l<f;l++)a[l]=t.getUint8(s+l);return a;case 2:return s=f>4?p:e+8,h(t,s,f-1);case 3:if(1==f)return t.getUint16(e+8,!n);for(s=f>2?p:e+8,a=[],l=0;l<f;l++)a[l]=t.getUint16(s+2*l,!n);return a;case 4:if(1==f)return t.getUint32(e+8,!n);for(a=[],l=0;l<f;l++)a[l]=t.getUint32(p+4*l,!n);return a;case 5:if(1==f)return u=t.getUint32(p,!n),c=t.getUint32(p+4,!n),o=new Number(u/c),o.numerator=u,o.denominator=c,o;for(a=[],l=0;l<f;l++)u=t.getUint32(p+8*l,!n),c=t.getUint32(p+4+8*l,!n),a[l]=new Number(u/c),a[l].numerator=u,a[l].denominator=c;return a;case 9:if(1==f)return t.getInt32(e+8,!n);for(a=[],l=0;l<f;l++)a[l]=t.getInt32(p+4*l,!n);return a;case 10:if(1==f)return t.getInt32(p,!n)/t.getInt32(p+4,!n);for(a=[],l=0;l<f;l++)a[l]=t.getInt32(p+8*l,!n)/t.getInt32(p+4+8*l,!n);return a}}function h(t,e,i){for(var r="",n=e;n<e+i;n++)r+=String.fromCharCode(t.getUint8(n));return r}function u(t,e){if("Exif"!=h(t,e,4))return c&&console.log("Not valid EXIF data! "+h(t,e,4)),!1;var i,r,n,s,a,l=e+6;if(18761==t.getUint16(l))i=!1;else{if(19789!=t.getUint16(l))return c&&console.log("Not valid TIFF data! (no 0x4949 or 0x4D4D)"),!1;i=!0}if(42!=t.getUint16(l+2,!i))return c&&console.log("Not valid TIFF data! (no 0x002A)"),!1;var u=t.getUint32(l+4,!i);if(u<8)return c&&console.log("Not valid TIFF data! (First offset less than 8)",t.getUint32(l+4,!i)),!1;if(r=o(t,l,l+u,_,i),r.ExifIFDPointer){s=o(t,l,l+r.ExifIFDPointer,p,i);for(n in s){switch(n){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":s[n]=g[n][s[n]];break;case"ExifVersion":case"FlashpixVersion":s[n]=String.fromCharCode(s[n][0],s[n][1],s[n][2],s[n][3]);break;case"ComponentsConfiguration":s[n]=g.Components[s[n][0]]+g.Components[s[n][1]]+g.Components[s[n][2]]+g.Components[s[n][3]]}r[n]=s[n]}}if(r.GPSInfoIFDPointer){a=o(t,l,l+r.GPSInfoIFDPointer,m,i);for(n in a){switch(n){case"GPSVersionID":a[n]=a[n][0]+"."+a[n][1]+"."+a[n][2]+"."+a[n][3]}r[n]=a[n]}}return r}var c=!1,d=this,f=function(t){return t instanceof f?t:this instanceof f?void(this.EXIFwrapped=t):new f(t)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=f),exports.EXIF=f):d.EXIF=f;var p=f.Tags={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID"},_=f.TiffTags={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},m=f.GPSTags={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential"},g=f.StringValues={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}},v={120:"caption",110:"credit",25:"keywords",55:"dateCreated",80:"byline",85:"bylineTitle",122:"captionWriter",105:"headline",116:"copyright",15:"category"};f.getData=function(e,i){return!((e instanceof Image||e instanceof HTMLImageElement)&&!e.complete)&&(t(e)?i&&i.call(e):r(e,i),!0)},f.getTag=function(e,i){if(t(e))return e.exifdata[i]},f.getAllTags=function(e){if(!t(e))return{};var i,r=e.exifdata,n={};for(i in r)r.hasOwnProperty(i)&&(n[i]=r[i]);return n},f.pretty=function(e){if(!t(e))return"";var i,r=e.exifdata,n="";for(i in r)r.hasOwnProperty(i)&&(n+="object"==typeof r[i]?r[i]instanceof Number?i+" : "+r[i]+" ["+r[i].numerator+"/"+r[i].denominator+"]\r\n":i+" : ["+r[i].length+" values]\r\n":i+" : "+r[i]+"\r\n");return n},f.readFromBinaryFile=function(t){return n(t)},"function"==typeof define&&define.amd&&define("exif-js",[],function(){return f})}.call(this),!window.egret){var egret_strings={4001:"Abstract class can not be instantiated!",4002:"Unnamed data!",4003:"Nonsupport version!"},Event=function(t,e,i,r){this.type=t,this.bubbles=e||!1,this.cancelable=i||!1,this.data=r},EventDispatcher=function(t){this._listenerDict={}};EventDispatcher.prototype={constructor:EventDispatcher,addEventListener:function(t,e,i,r,n,s){this._listenerDict[t]||(this._listenerDict[t]=[]),this._listenerDict[t].push({listener:e,thisObject:i,useCapture:r,priority:n,once:s})},once:function(t,e,i,r,n){this.addEventListener(t,e,i,r,n,!0)},removeEventListener:function(t,e,i,r){if(t)if(e){var n=this._listenerDict[t],s=n.indexOf(e);s>-1&&n.splice(s,1)}else this._listenerDict[t]&&(this._listenerDict[t].length=0);else this._listenerDict={}},hasEventListener:function(t){return this._listenerDict[t]},dispatchEvent:function(t){if(t&&t.type&&this._listenerDict[t.type])for(var e=this._listenerDict[t.type],i=e.slice(),r=0;r<i.length;r++){var n=i[r];if(n.dispatchOnce){var s=e.indexOf(n);s>-1&&e.splice(s,1)}n.listener&&n.listener.call(n.thisObject||this,t)}},willTrigger:function(t){return this.hasEventListener(t)}},window.egret={getString:function(t){return egret_strings[t]||"no string code"},Event:Event,EventDispatcher:EventDispatcher,registerClass:function(t,e,i){var r=t.prototype;r.__class__=e;var n=[e];i&&(n=n.concat(i));var s=r.__types__;if(r.__types__)for(var a=s.length,o=0;o<a;o++){var l=s[o];n.indexOf(l)==-1&&n.push(l)}r.__types__=n}}}window.__extends=window.__extends||function(t,e,i){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(r.prototype=e.prototype,t.prototype=new r,i)for(var s in i)t.prototype[s]=i[s]},window.__define=window.__define||function(t,e,i,r){Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:i,set:r})};var dragonBones;!function(t){var e=function(){function t(){}var e=(__define,t);e.prototype;return t.DATA_VERSION="4.0",t.PARENT_COORDINATE_DATA_VERSION="3.0",t.VERSION="4.3.5",t}();t.DragonBones=e,egret.registerClass(e,"dragonBones.DragonBones")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(t){this._animationStateCount=0,this._armature=t,this._animationList=[],this._animationStateList=[],this._timeScale=1,this._isPlaying=!1,this.tweenEnabled=!0}var i=__define,r=e,n=r.prototype;return n.dispose=function(){this._armature&&(this._resetAnimationStateList(),this._animationList.length=0,this._armature=null,this._animationDataList=null,this._animationList=null,this._animationStateList=null)},n._resetAnimationStateList=function(){for(var e,i=this._animationStateList.length;i--;)e=this._animationStateList[i],e._resetTimelineStateList(),t.AnimationState._returnObject(e);this._animationStateList.length=0},n.gotoAndPlay=function(i,r,n,s,a,o,l,h,u){if(void 0===r&&(r=-1),void 0===n&&(n=-1),void 0===s&&(s=NaN),void 0===a&&(a=0),void 0===o&&(o=null),void 0===l&&(l=e.SAME_LAYER_AND_GROUP),void 0===h&&(h=!0),void 0===u&&(u=!0),!this._animationDataList)return null;for(var c,d=this._animationDataList.length;d--;)if(this._animationDataList[d].name==i){c=this._animationDataList[d];break}if(!c)return null;var f=0==this._isPlaying;this._isPlaying=!0,this._isFading=!0,r=r<0?c.fadeTime<0?.3:c.fadeTime:r;var p;p=n<0?c.scale<0?1:c.scale:1e3*n/c.duration,s=isNaN(s)?c.playTimes:s;var _;switch(l){case e.NONE:break;case e.SAME_LAYER:for(d=this._animationStateList.length;d--;)_=this._animationStateList[d],_.layer==a&&_.fadeOut(r,h);break;case e.SAME_GROUP:for(d=this._animationStateList.length;d--;)_=this._animationStateList[d],_.group==o&&_.fadeOut(r,h);break;case e.ALL:for(d=this._animationStateList.length;d--;)_=this._animationStateList[d],_.fadeOut(r,h);break;case e.SAME_LAYER_AND_GROUP:default:for(d=this._animationStateList.length;d--;)_=this._animationStateList[d],_.layer==a&&_.group==o&&_.fadeOut(r,h)}this._lastAnimationState=t.AnimationState._borrowObject(),this._lastAnimationState._layer=a,this._lastAnimationState._group=o,this._lastAnimationState.autoTween=this.tweenEnabled,this._lastAnimationState._fadeIn(this._armature,c,r,1/p,s,u),this.addState(this._lastAnimationState);var m=this._armature.getSlots(!1);for(d=m.length;d--;){var g=m[d];g.childArmature&&g.childArmature.animation.gotoAndPlay(i,r)}return f&&this._armature.advanceTime(0),this._lastAnimationState},n.gotoAndStop=function(t,i,r,n,s,a,o,l){void 0===r&&(r=-1),void 0===n&&(n=0),void 0===s&&(s=-1),void 0===a&&(a=0),void 0===o&&(o=null),void 0===l&&(l=e.ALL);var h=this.getState(t,a);return h||(h=this.gotoAndPlay(t,n,s,NaN,a,o,l)),r>=0?h.setCurrentTime(h.totalTime*r):h.setCurrentTime(i),h.stop(),h},n.play=function(){this._animationDataList&&0!=this._animationDataList.length&&(this._lastAnimationState?this._isPlaying?this.gotoAndPlay(this._lastAnimationState.name):this._isPlaying=!0:this.gotoAndPlay(this._animationDataList[0].name))},n.stop=function(){this._isPlaying=!1},n.getState=function(t,e){void 0===e&&(e=0);for(var i=this._animationStateList.length;i--;){var r=this._animationStateList[i];if(r.name==t&&r.layer==e)return r}return null},n.hasAnimation=function(t){for(var e=this._animationDataList.length;e--;)if(this._animationDataList[e].name==t)return!0;return!1},n._advanceTime=function(t){if(this._isPlaying){var e=!1;t*=this._timeScale;for(var i=this._animationStateList.length;i--;){var r=this._animationStateList[i];r._advanceTime(t)?this.removeState(r):1!=r.fadeState&&(e=!0)}this._isFading=e}},n._updateAnimationStates=function(){for(var t=this._animationStateList.length;t--;)this._animationStateList[t]._updateTimelineStates()},n.addState=function(t){this._animationStateList.indexOf(t)<0&&(this._animationStateList.unshift(t),this._animationStateCount=this._animationStateList.length)},n.removeState=function(e){var i=this._animationStateList.indexOf(e);i>=0&&(this._animationStateList.splice(i,1),t.AnimationState._returnObject(e),this._lastAnimationState==e&&(this._animationStateList.length>0?this._lastAnimationState=this._animationStateList[0]:this._lastAnimationState=null),this._animationStateCount=this._animationStateList.length)},i(n,"movementList",function(){return this._animationList}),i(n,"movementID",function(){return this.lastAnimationName}),i(n,"lastAnimationState",function(){return this._lastAnimationState}),i(n,"lastAnimationName",function(){return this._lastAnimationState?this._lastAnimationState.name:null}),i(n,"animationList",function(){return this._animationList}),i(n,"isPlaying",function(){return this._isPlaying&&!this.isComplete}),i(n,"isComplete",function(){if(this._lastAnimationState){if(!this._lastAnimationState.isComplete)return!1;for(var t=this._animationStateList.length;t--;)if(!this._animationStateList[t].isComplete)return!1;return!0}return!0}),i(n,"timeScale",function(){return this._timeScale},function(t){(isNaN(t)||t<0)&&(t=1),this._timeScale=t}),i(n,"animationDataList",function(){return this._animationDataList},function(t){this._animationDataList=t,this._animationList.length=0;for(var e=0,i=this._animationDataList.length;e<i;e++){var r=this._animationDataList[e];this._animationList[this._animationList.length]=r.name}}),e.NONE="none",e.SAME_LAYER="sameLayer",e.SAME_GROUP="sameGroup",e.SAME_LAYER_AND_GROUP="sameLayerAndGroup",e.ALL="all",e}();t.Animation=e,egret.registerClass(e,"dragonBones.Animation")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){this._layer=0,this._currentFrameIndex=0,this._currentFramePosition=0,this._currentFrameDuration=0,this._currentPlayTimes=0,this._totalTime=0,this._currentTime=0,this._lastTime=0,this._fadeState=0,this._playTimes=0,this._timelineStateList=[],this._slotTimelineStateList=[],this._boneMasks=[]}var i=__define,r=e,n=r.prototype;return e._borrowObject=function(){return 0==e._pool.length?new e:e._pool.pop()},e._returnObject=function(t){t.clear(),e._pool.indexOf(t)<0&&(e._pool[e._pool.length]=t)},e._clear=function(){for(var i=e._pool.length;i--;)e._pool[i].clear();e._pool.length=0,t.TimelineState._clear()},n.clear=function(){this._resetTimelineStateList(),this._boneMasks.length=0,this._armature=null,this._clip=null},n._resetTimelineStateList=function(){for(var e=this._timelineStateList.length;e--;)t.TimelineState._returnObject(this._timelineStateList[e]);for(this._timelineStateList.length=0,e=this._slotTimelineStateList.length;e--;)t.SlotTimelineState._returnObject(this._slotTimelineStateList[e]);this._slotTimelineStateList.length=0},n.containsBoneMask=function(t){return 0==this._boneMasks.length||this._boneMasks.indexOf(t)>=0},n.addBoneMask=function(t,e){if(void 0===e&&(e=!0),this.addBoneToBoneMask(t),e){var i=this._armature.getBone(t);if(i)for(var r=this._armature.getBones(!1),n=r.length;n--;){var s=r[n];i.contains(s)&&this.addBoneToBoneMask(s.name)}}return this._updateTimelineStates(),this},n.removeBoneMask=function(t,e){if(void 0===e&&(e=!0),this.removeBoneFromBoneMask(t),e){var i=this._armature.getBone(t);if(i)for(var r=this._armature.getBones(!1),n=r.length;n--;){var s=r[n];i.contains(s)&&this.removeBoneFromBoneMask(s.name)}}return this._updateTimelineStates(), this},n.removeAllMixingTransform=function(){return this._boneMasks.length=0,this._updateTimelineStates(),this},n.addBoneToBoneMask=function(t){this._clip.getTimeline(t)&&this._boneMasks.indexOf(t)<0&&this._boneMasks.push(t)},n.removeBoneFromBoneMask=function(t){var e=this._boneMasks.indexOf(t);e>=0&&this._boneMasks.splice(e,1)},n._updateTimelineStates=function(){for(var t,e,i,r=this._timelineStateList.length;r--;)t=this._timelineStateList[r],this._armature.getBone(t.name)||this.removeTimelineState(t);for(r=this._slotTimelineStateList.length;r--;)e=this._slotTimelineStateList[r],this._armature.getSlot(e.name)||this.removeSlotTimelineState(e);if(this._boneMasks.length>0){for(r=this._timelineStateList.length;r--;)t=this._timelineStateList[r],this._boneMasks.indexOf(t.name)<0&&this.removeTimelineState(t);for(r=0,i=this._boneMasks.length;r<i;r++){var n=this._boneMasks[r];this.addTimelineState(n)}}else for(r=0,i=this._clip.timelineList.length;r<i;r++){var s=this._clip.timelineList[r];this.addTimelineState(s.name)}for(r=0,i=this._clip.slotTimelineList.length;r<i;r++){var a=this._clip.slotTimelineList[r];this.addSlotTimelineState(a.name)}},n.addTimelineState=function(e){var i=this._armature.getBone(e);if(i){for(var r=0,n=this._timelineStateList.length;r<n;r++){var s=this._timelineStateList[r];if(s.name==e)return}var a=t.TimelineState._borrowObject();a._fadeIn(i,this,this._clip.getTimeline(e)),this._timelineStateList.push(a)}},n.removeTimelineState=function(e){var i=this._timelineStateList.indexOf(e);this._timelineStateList.splice(i,1),t.TimelineState._returnObject(e)},n.addSlotTimelineState=function(e){var i=this._armature.getSlot(e);if(i){for(var r=0,n=this._slotTimelineStateList.length;r<n;r++){var s=this._slotTimelineStateList[r];if(s.name==e)return}var a=t.SlotTimelineState._borrowObject();a._fadeIn(i,this,this._clip.getSlotTimeline(e)),this._slotTimelineStateList.push(a)}},n.removeSlotTimelineState=function(e){var i=this._slotTimelineStateList.indexOf(e);this._slotTimelineStateList.splice(i,1),t.SlotTimelineState._returnObject(e)},n.play=function(){return this._isPlaying=!0,this},n.stop=function(){return this._isPlaying=!1,this},n._fadeIn=function(t,e,i,r,n,s){return this._armature=t,this._clip=e,this._pausePlayheadInFade=s,this._name=this._clip.name,this._totalTime=this._clip.duration,this.autoTween=this._clip.autoTween,this.setTimeScale(r),this.setPlayTimes(n),this._isComplete=!1,this._currentFrameIndex=-1,this._currentPlayTimes=-1,Math.round(this._totalTime*this._clip.frameRate*.001)<2||r==1/0?this._currentTime=this._totalTime:this._currentTime=-1,this._time=0,this._boneMasks.length=0,this._isFadeOut=!1,this._fadeWeight=0,this._fadeTotalWeight=1,this._fadeState=-1,this._fadeCurrentTime=0,this._fadeBeginTime=this._fadeCurrentTime,this._fadeTotalTime=i*this._timeScale,this._isPlaying=!0,this.displayControl=!0,this.lastFrameAutoTween=!0,this.additiveBlending=!1,this.weight=1,this.fadeOutTime=i,this._updateTimelineStates(),this},n.fadeOut=function(t,e){if(!this._armature)return null;if((isNaN(t)||t<0)&&(t=0),this._pausePlayheadInFade=e,this._isFadeOut){if(t>this._fadeTotalTime/this._timeScale-(this._fadeCurrentTime-this._fadeBeginTime))return this}else for(var i=0,r=this._timelineStateList.length;i<r;i++){var n=this._timelineStateList[i];n._fadeOut()}return this._isFadeOut=!0,this._fadeTotalWeight=this._fadeWeight,this._fadeState=-1,this._fadeBeginTime=this._fadeCurrentTime,this._fadeTotalTime=this._fadeTotalWeight>=0?t*this._timeScale:0,this.displayControl=!1,this},n._advanceTime=function(t){return t*=this._timeScale,this.advanceFadeTime(t),this._fadeWeight&&this.advanceTimelinesTime(t),this._isFadeOut&&1==this._fadeState},n.advanceFadeTime=function(e){var i=!1,r=!1;if(this._fadeBeginTime>=0){var n=this._fadeState;this._fadeCurrentTime+=e<0?-e:e,this._fadeCurrentTime>=this._fadeBeginTime+this._fadeTotalTime?(1!=this._fadeWeight&&0!=this._fadeWeight||(n=1,this._pausePlayheadInFade&&(this._pausePlayheadInFade=!1,this._currentTime=-1)),this._fadeWeight=this._isFadeOut?0:1):this._fadeCurrentTime>=this._fadeBeginTime?(n=0,this._fadeWeight=(this._fadeCurrentTime-this._fadeBeginTime)/this._fadeTotalTime*this._fadeTotalWeight,this._isFadeOut&&(this._fadeWeight=this._fadeTotalWeight-this._fadeWeight)):(n=-1,this._fadeWeight=this._isFadeOut?1:0),this._fadeState!=n&&(this._fadeState==-1&&(i=!0),1==n&&(r=!0),this._fadeState=n)}var s;i&&(this._isFadeOut?this._armature.hasEventListener(t.AnimationEvent.FADE_OUT)&&(s=new t.AnimationEvent(t.AnimationEvent.FADE_OUT),s.animationState=this,this._armature._eventList.push(s)):(this.hideBones(),this._armature.hasEventListener(t.AnimationEvent.FADE_IN)&&(s=new t.AnimationEvent(t.AnimationEvent.FADE_IN),s.animationState=this,this._armature._eventList.push(s)))),r&&(this._isFadeOut?this._armature.hasEventListener(t.AnimationEvent.FADE_OUT_COMPLETE)&&(s=new t.AnimationEvent(t.AnimationEvent.FADE_OUT_COMPLETE),s.animationState=this,this._armature._eventList.push(s)):this._armature.hasEventListener(t.AnimationEvent.FADE_IN_COMPLETE)&&(s=new t.AnimationEvent(t.AnimationEvent.FADE_IN_COMPLETE),s.animationState=this,this._armature._eventList.push(s)))},n.advanceTimelinesTime=function(e){this._isPlaying&&!this._pausePlayheadInFade&&(this._time+=e);var i=!1,r=!1,n=!1,s=!1,a=0,o=1e3*this._time;if(0==this._playTimes)s=!1,a=Math.ceil(Math.abs(o)/this._totalTime)||1,o-=o>=0?Math.floor(o/this._totalTime)*this._totalTime:Math.ceil(o/this._totalTime)*this._totalTime,o<0&&(o+=this._totalTime);else{var l=this._playTimes*this._totalTime;o>=l?(o=l,s=!0):o<=-l?(o=-l,s=!0):s=!1,o<0&&(o+=l),a=Math.ceil(o/this._totalTime)||1,o-=o>=0?Math.floor(o/this._totalTime)*this._totalTime:Math.ceil(o/this._totalTime)*this._totalTime,s&&(o=this._totalTime)}this._isComplete=s;var h=1e3*this._time/this._totalTime,u=0,c=0;for(u=0,c=this._timelineStateList.length;u<c;u++){var d=this._timelineStateList[u];d._update(h),this._isComplete=d._isComplete&&this._isComplete}for(u=0,c=this._slotTimelineStateList.length;u<c;u++){var f=this._slotTimelineStateList[u];f._update(h),this._isComplete=d._isComplete&&this._isComplete}this._currentTime!=o&&(this._currentPlayTimes!=a&&(this._currentPlayTimes>0&&a>1&&(n=!0),this._currentPlayTimes=a),this._currentTime<0&&(i=!0),this._isComplete&&(r=!0),this._lastTime=this._currentTime,this._currentTime=o,this.updateMainTimeline(s));var p;i&&this._armature.hasEventListener(t.AnimationEvent.START)&&(p=new t.AnimationEvent(t.AnimationEvent.START),p.animationState=this,this._armature._eventList.push(p)),r?(this._armature.hasEventListener(t.AnimationEvent.COMPLETE)&&(p=new t.AnimationEvent(t.AnimationEvent.COMPLETE),p.animationState=this,this._armature._eventList.push(p)),this.autoFadeOut&&this.fadeOut(this.fadeOutTime,!0)):n&&this._armature.hasEventListener(t.AnimationEvent.LOOP_COMPLETE)&&(p=new t.AnimationEvent(t.AnimationEvent.LOOP_COMPLETE),p.animationState=this,this._armature._eventList.push(p))},n.updateMainTimeline=function(t){var e=this._clip.frameList;if(e.length>0){for(var i,r,n=0,s=this._clip.frameList.length;n<s;++n){if(this._currentFrameIndex<0)this._currentFrameIndex=0;else{if(!(this._currentTime<this._currentFramePosition||this._currentTime>=this._currentFramePosition+this._currentFrameDuration||this._currentTime<this._lastTime))break;if(this._currentFrameIndex++,this._lastTime=this._currentTime,this._currentFrameIndex>=e.length){if(t){this._currentFrameIndex--;break}this._currentFrameIndex=0}}r=e[this._currentFrameIndex],i&&this._armature._arriveAtFrame(i,null,this,!0),this._currentFrameDuration=r.duration,this._currentFramePosition=r.position,i=r}r&&this._armature._arriveAtFrame(r,null,this,!1)}},n.hideBones=function(){for(var t=0,e=this._clip.hideTimelineNameMap.length;t<e;t++){var i=this._clip.hideTimelineNameMap[t],r=this._armature.getBone(i);r&&r._hideSlots()}var n;for(t=0,e=this._clip.hideSlotTimelineNameMap.length;t<e;t++){n=this._clip.hideSlotTimelineNameMap[t];var s=this._armature.getSlot(n);s&&s._resetToOrigin()}},n.setAdditiveBlending=function(t){return this.additiveBlending=t,this},n.setAutoFadeOut=function(t,e){return void 0===e&&(e=-1),this.autoFadeOut=t,e>=0&&(this.fadeOutTime=e*this._timeScale),this},n.setWeight=function(t){return(isNaN(t)||t<0)&&(t=1),this.weight=t,this},n.setFrameTween=function(t,e){return this.autoTween=t,this.lastFrameAutoTween=e,this},n.setCurrentTime=function(t){return(t<0||isNaN(t))&&(t=0),this._time=t,this._currentTime=1e3*this._time,this},n.setTimeScale=function(t){return(isNaN(t)||t==1/0)&&(t=1),this._timeScale=t,this},n.setPlayTimes=function(t){return void 0===t&&(t=0),Math.round(.001*this._totalTime*this._clip.frameRate)<2?this._playTimes=t<0?-1:1:this._playTimes=t<0?-t:t,this.autoFadeOut=t<0,this},i(n,"name",function(){return this._name}),i(n,"layer",function(){return this._layer}),i(n,"group",function(){return this._group}),i(n,"clip",function(){return this._clip}),i(n,"isComplete",function(){return this._isComplete}),i(n,"isPlaying",function(){return this._isPlaying&&!this._isComplete}),i(n,"currentPlayTimes",function(){return this._currentPlayTimes<0?0:this._currentPlayTimes}),i(n,"totalTime",function(){return.001*this._totalTime}),i(n,"currentTime",function(){return this._currentTime<0?0:.001*this._currentTime}),i(n,"fadeWeight",function(){return this._fadeWeight}),i(n,"fadeState",function(){return this._fadeState}),i(n,"fadeTotalTime",function(){return this._fadeTotalTime}),i(n,"timeScale",function(){return this._timeScale}),i(n,"playTimes",function(){return this._playTimes}),e._pool=[],e}();t.AnimationState=e,egret.registerClass(e,"dragonBones.AnimationState")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){this._totalTime=0,this._currentTime=0,this._currentFrameIndex=0,this._currentFramePosition=0,this._currentFrameDuration=0,this._updateMode=0,this._durationColor=new t.ColorTransform}var i=(__define,e),r=i.prototype;return e._borrowObject=function(){return 0==e._pool.length?new e:e._pool.pop()},e._returnObject=function(t){e._pool.indexOf(t)<0&&(e._pool[e._pool.length]=t),t.clear()},e._clear=function(){for(var t=e._pool.length;t--;)e._pool[t].clear();e._pool.length=0},r.clear=function(){this._slot&&(this._slot._removeState(this),this._slot=null),this._armature=null,this._animation=null,this._animationState=null,this._timelineData=null},r._fadeIn=function(t,e,i){switch(this._slot=t,this._armature=this._slot.armature,this._animation=this._armature.animation,this._animationState=e,this._timelineData=i,this.name=i.name,this._totalTime=this._timelineData.duration,this._rawAnimationScale=this._animationState.clip.scale,this._isComplete=!1,this._blendEnabled=!1,this._tweenColor=!1,this._currentFrameIndex=-1,this._currentTime=-1,this._tweenEasing=NaN,this._weight=1,this._timelineData.frameList.length){case 0:this._updateMode=0;break;case 1:this._updateMode=1;break;default:this._updateMode=-1}this._slot._addState(this)},r._fadeOut=function(){},r._update=function(t){this._updateMode==-1?this.updateMultipleFrame(t):1==this._updateMode&&(this._updateMode=0,this.updateSingleFrame())},r.updateMultipleFrame=function(t){var e=0;t/=this._timelineData.scale,t+=this._timelineData.offset;var i=this._totalTime*t,r=this._animationState.playTimes;if(0==r)this._isComplete=!1,e=Math.ceil(Math.abs(i)/this._totalTime)||1,i-=i>=0?Math.floor(i/this._totalTime)*this._totalTime:Math.ceil(i/this._totalTime)*this._totalTime,i<0&&(i+=this._totalTime);else{var n=r*this._totalTime;i>=n?(i=n,this._isComplete=!0):i<=-n?(i=-n,this._isComplete=!0):this._isComplete=!1,i<0&&(i+=n),e=Math.ceil(i/this._totalTime)||1,this._isComplete?i=this._totalTime:i-=i>=0?Math.floor(i/this._totalTime)*this._totalTime:Math.ceil(i/this._totalTime)*this._totalTime}if(this._currentTime!=i){this._currentTime=i;for(var s,a,o=this._timelineData.frameList,l=0,h=this._timelineData.frameList.length;l<h;++l){if(this._currentFrameIndex<0)this._currentFrameIndex=0;else{if(!(this._currentTime<this._currentFramePosition||this._currentTime>=this._currentFramePosition+this._currentFrameDuration))break;if(this._currentFrameIndex++,this._currentFrameIndex>=o.length){if(this._isComplete){this._currentFrameIndex--;break}this._currentFrameIndex=0}}a=o[this._currentFrameIndex],s&&this._slot._arriveAtFrame(s,this,this._animationState,!0),this._currentFrameDuration=a.duration,this._currentFramePosition=a.position,s=a}a&&(this._slot._arriveAtFrame(a,this,this._animationState,!1),this._blendEnabled=a.displayIndex>=0,this._blendEnabled?this.updateToNextFrame(e):(this._tweenEasing=NaN,this._tweenColor=!1)),this._blendEnabled&&this.updateTween()}},r.updateToNextFrame=function(t){void 0===t&&(t=0);var e=this._currentFrameIndex+1;e>=this._timelineData.frameList.length&&(e=0);var i=this._timelineData.frameList[this._currentFrameIndex],r=this._timelineData.frameList[e],n=!1;0==e&&(!this._animationState.lastFrameAutoTween||this._animationState.playTimes&&this._animationState.currentPlayTimes>=this._animationState.playTimes&&((this._currentFramePosition+this._currentFrameDuration)/this._totalTime+t-this._timelineData.offset)*this._timelineData.scale>.999999)?(this._tweenEasing=NaN,n=!1):i.displayIndex<0||r.displayIndex<0?(this._tweenEasing=NaN,n=!1):this._animationState.autoTween?(this._tweenEasing=this._animationState.clip.tweenEasing,isNaN(this._tweenEasing)?(this._tweenEasing=i.tweenEasing,this._tweenCurve=i.curve,isNaN(this._tweenEasing)&&null==this._tweenCurve?n=!1:(10==this._tweenEasing&&(this._tweenEasing=0),n=!0)):n=!0):(this._tweenEasing=i.tweenEasing,this._tweenCurve=i.curve,!isNaN(this._tweenEasing)&&10!=this._tweenEasing||null!=this._tweenCurve?n=!0:(this._tweenEasing=NaN,n=!1)),n?i.color&&r.color?(this._durationColor.alphaOffset=r.color.alphaOffset-i.color.alphaOffset,this._durationColor.redOffset=r.color.redOffset-i.color.redOffset,this._durationColor.greenOffset=r.color.greenOffset-i.color.greenOffset,this._durationColor.blueOffset=r.color.blueOffset-i.color.blueOffset,this._durationColor.alphaMultiplier=r.color.alphaMultiplier-i.color.alphaMultiplier,this._durationColor.redMultiplier=r.color.redMultiplier-i.color.redMultiplier,this._durationColor.greenMultiplier=r.color.greenMultiplier-i.color.greenMultiplier,this._durationColor.blueMultiplier=r.color.blueMultiplier-i.color.blueMultiplier,this._durationColor.alphaOffset||this._durationColor.redOffset||this._durationColor.greenOffset||this._durationColor.blueOffset||this._durationColor.alphaMultiplier||this._durationColor.redMultiplier||this._durationColor.greenMultiplier||this._durationColor.blueMultiplier?this._tweenColor=!0:this._tweenColor=!1):i.color?(this._tweenColor=!0,this._durationColor.alphaOffset=-i.color.alphaOffset,this._durationColor.redOffset=-i.color.redOffset,this._durationColor.greenOffset=-i.color.greenOffset,this._durationColor.blueOffset=-i.color.blueOffset,this._durationColor.alphaMultiplier=1-i.color.alphaMultiplier,this._durationColor.redMultiplier=1-i.color.redMultiplier,this._durationColor.greenMultiplier=1-i.color.greenMultiplier,this._durationColor.blueMultiplier=1-i.color.blueMultiplier):r.color?(this._tweenColor=!0,this._durationColor.alphaOffset=r.color.alphaOffset,this._durationColor.redOffset=r.color.redOffset,this._durationColor.greenOffset=r.color.greenOffset,this._durationColor.blueOffset=r.color.blueOffset,this._durationColor.alphaMultiplier=r.color.alphaMultiplier-1,this._durationColor.redMultiplier=r.color.redMultiplier-1,this._durationColor.greenMultiplier=r.color.greenMultiplier-1,this._durationColor.blueMultiplier=r.color.blueMultiplier-1):this._tweenColor=!1:this._tweenColor=!1,!this._tweenColor&&this._animationState.displayControl&&(i.color?this._slot._updateDisplayColor(i.color.alphaOffset,i.color.redOffset,i.color.greenOffset,i.color.blueOffset,i.color.alphaMultiplier,i.color.redMultiplier,i.color.greenMultiplier,i.color.blueMultiplier,!0):this._slot._isColorChanged&&this._slot._updateDisplayColor(0,0,0,0,1,1,1,1,!1))},r.updateTween=function(){var e=this._timelineData.frameList[this._currentFrameIndex];if(this._tweenColor&&this._animationState.displayControl){var i=(this._currentTime-this._currentFramePosition)/this._currentFrameDuration;null!=this._tweenCurve?i=this._tweenCurve.getValueByProgress(i):this._tweenEasing&&(i=t.MathUtil.getEaseValue(i,this._tweenEasing)),e.color?this._slot._updateDisplayColor(e.color.alphaOffset+this._durationColor.alphaOffset*i,e.color.redOffset+this._durationColor.redOffset*i,e.color.greenOffset+this._durationColor.greenOffset*i,e.color.blueOffset+this._durationColor.blueOffset*i,e.color.alphaMultiplier+this._durationColor.alphaMultiplier*i,e.color.redMultiplier+this._durationColor.redMultiplier*i,e.color.greenMultiplier+this._durationColor.greenMultiplier*i,e.color.blueMultiplier+this._durationColor.blueMultiplier*i,!0):this._slot._updateDisplayColor(this._durationColor.alphaOffset*i,this._durationColor.redOffset*i,this._durationColor.greenOffset*i,this._durationColor.blueOffset*i,1+this._durationColor.alphaMultiplier*i,1+this._durationColor.redMultiplier*i,1+this._durationColor.greenMultiplier*i,1+this._durationColor.blueMultiplier*i,!0)}},r.updateSingleFrame=function(){var t=this._timelineData.frameList[0];this._slot._arriveAtFrame(t,this,this._animationState,!1),this._isComplete=!0,this._tweenEasing=NaN,this._tweenColor=!1,this._blendEnabled=t.displayIndex>=0,this._blendEnabled&&this._animationState.displayControl&&(t.color?this._slot._updateDisplayColor(t.color.alphaOffset,t.color.redOffset,t.color.greenOffset,t.color.blueOffset,t.color.alphaMultiplier,t.color.redMultiplier,t.color.greenMultiplier,t.color.blueMultiplier,!0):this._slot._isColorChanged&&this._slot._updateDisplayColor(0,0,0,0,1,1,1,1,!1))},e.HALF_PI=.5*Math.PI,e.DOUBLE_PI=2*Math.PI,e._pool=[],e}();t.SlotTimelineState=e,egret.registerClass(e,"dragonBones.SlotTimelineState")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){this._totalTime=0,this._currentTime=0,this._lastTime=0,this._currentFrameIndex=0,this._currentFramePosition=0,this._currentFrameDuration=0,this._updateMode=0,this._transform=new t.DBTransform,this._pivot=new t.Point,this._durationTransform=new t.DBTransform,this._durationPivot=new t.Point,this._durationColor=new t.ColorTransform}var i=(__define,e),r=i.prototype;return e._borrowObject=function(){return 0==e._pool.length?new e:e._pool.pop()},e._returnObject=function(t){e._pool.indexOf(t)<0&&(e._pool[e._pool.length]=t),t.clear()},e._clear=function(){for(var t=e._pool.length;t--;)e._pool[t].clear();e._pool.length=0},r.clear=function(){this._bone&&(this._bone._removeState(this),this._bone=null),this._armature=null,this._animation=null,this._animationState=null,this._timelineData=null,this._originTransform=null,this._originPivot=null},r._fadeIn=function(t,e,i){switch(this._bone=t,this._armature=this._bone.armature,this._animation=this._armature.animation,this._animationState=e,this._timelineData=i,this._originTransform=this._timelineData.originTransform,this._originPivot=this._timelineData.originPivot,this.name=i.name,this._totalTime=this._timelineData.duration,this._rawAnimationScale=this._animationState.clip.scale,this._isComplete=!1,this._tweenTransform=!1,this._tweenScale=!1,this._currentFrameIndex=-1,this._currentTime=-1,this._tweenEasing=NaN,this._weight=1,this._transform.x=0,this._transform.y=0,this._transform.scaleX=1,this._transform.scaleY=1,this._transform.skewX=0,this._transform.skewY=0,this._pivot.x=0,this._pivot.y=0,this._durationTransform.x=0,this._durationTransform.y=0,this._durationTransform.scaleX=1,this._durationTransform.scaleY=1,this._durationTransform.skewX=0,this._durationTransform.skewY=0,this._durationPivot.x=0,this._durationPivot.y=0,this._timelineData.frameList.length){case 0:this._updateMode=0;break;case 1:this._updateMode=1;break;default:this._updateMode=-1}this._bone._addState(this)},r._fadeOut=function(){this._transform.skewX=t.TransformUtil.formatRadian(this._transform.skewX),this._transform.skewY=t.TransformUtil.formatRadian(this._transform.skewY)},r._update=function(t){this._updateMode==-1?this.updateMultipleFrame(t):1==this._updateMode&&(this._updateMode=0,this.updateSingleFrame())},r.updateMultipleFrame=function(t){var e=0;t/=this._timelineData.scale,t+=this._timelineData.offset;var i=this._totalTime*t,r=this._animationState.playTimes;if(0==r)this._isComplete=!1,e=Math.ceil(Math.abs(i)/this._totalTime)||1,i-=i>=0?Math.floor(i/this._totalTime)*this._totalTime:Math.ceil(i/this._totalTime)*this._totalTime,i<0&&(i+=this._totalTime);else{var n=r*this._totalTime;i>=n?(i=n,this._isComplete=!0):i<=-n?(i=-n,this._isComplete=!0):this._isComplete=!1,i<0&&(i+=n),e=Math.ceil(i/this._totalTime)||1,this._isComplete?i=this._totalTime:i-=i>=0?Math.floor(i/this._totalTime)*this._totalTime:Math.ceil(i/this._totalTime)*this._totalTime}if(this._currentTime!=i){this._lastTime=this._currentTime,this._currentTime=i;for(var s,a,o=this._timelineData.frameList,l=0,h=this._timelineData.frameList.length;l<h;++l){if(this._currentFrameIndex<0)this._currentFrameIndex=0;else{if(!(this._currentTime<this._currentFramePosition||this._currentTime>=this._currentFramePosition+this._currentFrameDuration||this._currentTime<this._lastTime))break;if(this._currentFrameIndex++,this._lastTime=this._currentTime,this._currentFrameIndex>=o.length){if(this._isComplete){this._currentFrameIndex--;break}this._currentFrameIndex=0}}a=o[this._currentFrameIndex],s&&this._bone._arriveAtFrame(s,this,this._animationState,!0),this._currentFrameDuration=a.duration,this._currentFramePosition=a.position,s=a}a&&(this._bone._arriveAtFrame(a,this,this._animationState,!1),this.updateToNextFrame(e)),this.updateTween()}},r.updateToNextFrame=function(e){void 0===e&&(e=0);var i=this._currentFrameIndex+1;i>=this._timelineData.frameList.length&&(i=0);var r=this._timelineData.frameList[this._currentFrameIndex],n=this._timelineData.frameList[i],s=!1;0==i&&(!this._animationState.lastFrameAutoTween||this._animationState.playTimes&&this._animationState.currentPlayTimes>=this._animationState.playTimes&&((this._currentFramePosition+this._currentFrameDuration)/this._totalTime+e-this._timelineData.offset)*this._timelineData.scale>.999999)?(this._tweenEasing=NaN,s=!1):r.displayIndex<0||n.displayIndex<0?(this._tweenEasing=NaN,s=!1):this._animationState.autoTween?(this._tweenEasing=this._animationState.clip.tweenEasing,isNaN(this._tweenEasing)?(this._tweenEasing=r.tweenEasing,this._tweenCurve=r.curve,isNaN(this._tweenEasing)&&null==this._tweenCurve?s=!1:(10==this._tweenEasing&&(this._tweenEasing=0),s=!0)):s=!0):(this._tweenEasing=r.tweenEasing,this._tweenCurve=r.curve,!isNaN(this._tweenEasing)&&10!=this._tweenEasing||null!=this._tweenCurve?s=!0:(this._tweenEasing=NaN,s=!1)),s?(this._durationTransform.x=n.transform.x-r.transform.x,this._durationTransform.y=n.transform.y-r.transform.y,this._durationTransform.skewX=n.transform.skewX-r.transform.skewX,this._durationTransform.skewY=n.transform.skewY-r.transform.skewY,this._durationTransform.scaleX=n.transform.scaleX-r.transform.scaleX+n.scaleOffset.x,this._durationTransform.scaleY=n.transform.scaleY-r.transform.scaleY+n.scaleOffset.y,this._durationTransform.normalizeRotation(),0==i&&(this._durationTransform.skewX=t.TransformUtil.formatRadian(this._durationTransform.skewX),this._durationTransform.skewY=t.TransformUtil.formatRadian(this._durationTransform.skewY)),this._durationPivot.x=n.pivot.x-r.pivot.x,this._durationPivot.y=n.pivot.y-r.pivot.y,this._durationTransform.x||this._durationTransform.y||this._durationTransform.skewX||this._durationTransform.skewY||this._durationTransform.scaleX||this._durationTransform.scaleY||this._durationPivot.x||this._durationPivot.y?(this._tweenTransform=!0,this._tweenScale=r.tweenScale):(this._tweenTransform=!1,this._tweenScale=!1)):(this._tweenTransform=!1,this._tweenScale=!1),this._tweenTransform?this._tweenScale||(this._animationState.additiveBlending?(this._transform.scaleX=r.transform.scaleX,this._transform.scaleY=r.transform.scaleY):(this._transform.scaleX=this._originTransform.scaleX*r.transform.scaleX,this._transform.scaleY=this._originTransform.scaleY*r.transform.scaleY)):(this._animationState.additiveBlending?(this._transform.x=r.transform.x,this._transform.y=r.transform.y,this._transform.skewX=r.transform.skewX,this._transform.skewY=r.transform.skewY,this._transform.scaleX=r.transform.scaleX,this._transform.scaleY=r.transform.scaleY,this._pivot.x=r.pivot.x,this._pivot.y=r.pivot.y):(this._transform.x=this._originTransform.x+r.transform.x,this._transform.y=this._originTransform.y+r.transform.y,this._transform.skewX=this._originTransform.skewX+r.transform.skewX,this._transform.skewY=this._originTransform.skewY+r.transform.skewY,this._transform.scaleX=this._originTransform.scaleX*r.transform.scaleX,this._transform.scaleY=this._originTransform.scaleY*r.transform.scaleY,this._pivot.x=this._originPivot.x+r.pivot.x,this._pivot.y=this._originPivot.y+r.pivot.y),this._bone.invalidUpdate())},r.updateTween=function(){var e=this._timelineData.frameList[this._currentFrameIndex];if(this._tweenTransform){var i=(this._currentTime-this._currentFramePosition)/this._currentFrameDuration;null!=this._tweenCurve?i=this._tweenCurve.getValueByProgress(i):this._tweenEasing&&(i=t.MathUtil.getEaseValue(i,this._tweenEasing));var r=e.transform,n=e.pivot;this._animationState.additiveBlending?(this._transform.x=r.x+this._durationTransform.x*i,this._transform.y=r.y+this._durationTransform.y*i,this._transform.skewX=r.skewX+this._durationTransform.skewX*i,this._transform.skewY=r.skewY+this._durationTransform.skewY*i,this._tweenScale&&(this._transform.scaleX=r.scaleX+this._durationTransform.scaleX*i,this._transform.scaleY=r.scaleY+this._durationTransform.scaleY*i),this._pivot.x=n.x+this._durationPivot.x*i,this._pivot.y=n.y+this._durationPivot.y*i):(this._transform.x=this._originTransform.x+r.x+this._durationTransform.x*i,this._transform.y=this._originTransform.y+r.y+this._durationTransform.y*i,this._transform.skewX=this._originTransform.skewX+r.skewX+this._durationTransform.skewX*i,this._transform.skewY=this._originTransform.skewY+r.skewY+this._durationTransform.skewY*i,this._tweenScale&&(this._transform.scaleX=this._originTransform.scaleX*r.scaleX+this._durationTransform.scaleX*i,this._transform.scaleY=this._originTransform.scaleY*r.scaleY+this._durationTransform.scaleY*i),this._pivot.x=this._originPivot.x+n.x+this._durationPivot.x*i,this._pivot.y=this._originPivot.y+n.y+this._durationPivot.y*i),this._bone.invalidUpdate()}},r.updateSingleFrame=function(){var t=this._timelineData.frameList[0];this._bone._arriveAtFrame(t,this,this._animationState,!1),this._isComplete=!0,this._tweenEasing=NaN,this._tweenTransform=!1,this._tweenScale=!1,this._tweenColor=!1,this._animationState.additiveBlending?(this._transform.x=t.transform.x,this._transform.y=t.transform.y,this._transform.skewX=t.transform.skewX,this._transform.skewY=t.transform.skewY,this._transform.scaleX=t.transform.scaleX,this._transform.scaleY=t.transform.scaleY,this._pivot.x=t.pivot.x,this._pivot.y=t.pivot.y):(this._transform.x=this._originTransform.x+t.transform.x,this._transform.y=this._originTransform.y+t.transform.y,this._transform.skewX=this._originTransform.skewX+t.transform.skewX,this._transform.skewY=this._originTransform.skewY+t.transform.skewY,this._transform.scaleX=this._originTransform.scaleX*t.transform.scaleX,this._transform.scaleY=this._originTransform.scaleY*t.transform.scaleY,this._pivot.x=this._originPivot.x+t.pivot.x,this._pivot.y=this._originPivot.y+t.pivot.y),this._bone.invalidUpdate()},e.HALF_PI=.5*Math.PI,e.DOUBLE_PI=2*Math.PI,e._pool=[],e}();t.TimelineState=e,egret.registerClass(e,"dragonBones.TimelineState")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(t,e){void 0===t&&(t=-1),void 0===e&&(e=1),this._time=t>=0?t:.001*(new Date).getTime(),this._timeScale=isNaN(e)?1:e,this._animatableList=[]}var e=__define,i=t,r=i.prototype;return e(r,"time",function(){return this._time}),e(r,"timeScale",function(){return this._timeScale},function(t){(isNaN(t)||t<0)&&(t=1),this._timeScale=t}),r.contains=function(t){return this._animatableList.indexOf(t)>=0},r.add=function(t){t&&this._animatableList.indexOf(t)==-1&&this._animatableList.push(t)},r.remove=function(t){var e=this._animatableList.indexOf(t);e>=0&&(this._animatableList[e]=null)},r.clear=function(){this._animatableList.length=0},r.advanceTime=function(t){void 0===t&&(t=-1),t<0&&(t=.001*(new Date).getTime()-this._time),t*=this._timeScale,this._time+=t;var e=this._animatableList.length;if(0!=e){for(var i=0,r=0;r<e;r++){var n=this._animatableList[r];n&&(i!=r&&(this._animatableList[i]=n,this._animatableList[r]=null),n.advanceTime(t),i++)}if(i!=r){for(e=this._animatableList.length;r<e;)this._animatableList[i++]=this._animatableList[r++];this._animatableList.length=i}}},t.clock=new t,t}();t.WorldClock=e,egret.registerClass(e,"dragonBones.WorldClock",["dragonBones.IAnimatable"])}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(t){function e(e){void 0===e&&(e=null),t.call(this,e)}__extends(e,t);var i=(__define,e);i.prototype;return e}(egret.EventDispatcher);t.EventDispatcher=e,egret.registerClass(e,"dragonBones.EventDispatcher")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(t){function e(){if(t.call(this),e._instance)throw new Error("Singleton already constructed!")}__extends(e,t);var i=(__define,e);i.prototype;return e.getInstance=function(){return e._instance||(e._instance=new e),e._instance},e}(t.EventDispatcher);t.SoundEventManager=e,egret.registerClass(e,"dragonBones.SoundEventManager")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(e){function i(i){e.call(this),this._display=i,this._animation=new t.Animation(this),this._slotsZOrderChanged=!1,this._slotList=[],this._boneList=[],this._eventList=[],this._delayDispose=!1,this._lockDispose=!1,this._armatureData=null}__extends(i,e);var r=__define,n=i,s=n.prototype;return r(s,"armatureData",function(){return this._armatureData}),r(s,"display",function(){return this._display}),s.getDisplay=function(){return this._display},r(s,"animation",function(){return this._animation}),s.dispose=function(){if(this._delayDispose=!0,this._animation&&!this._lockDispose){this.userData=null,this._animation.dispose();for(var t=this._slotList.length;t--;)this._slotList[t].dispose();for(t=this._boneList.length;t--;)this._boneList[t].dispose();this._armatureData=null,this._animation=null,this._slotList=null,this._boneList=null,this._eventList=null}},s.invalidUpdate=function(t){if(void 0===t&&(t=null),t){var e=this.getBone(t);e&&e.invalidUpdate()}else for(var i=this._boneList.length;i--;)this._boneList[i].invalidUpdate()},s.advanceTime=function(e){this._lockDispose=!0,this._animation._advanceTime(e),e*=this._animation.timeScale;for(var i=this._animation._isFading,r=this._boneList.length;r--;){var n=this._boneList[r];n._update(i)}for(r=this._slotList.length;r--;){var s=this._slotList[r];if(s._update(),s._isShowDisplay){var a=s.childArmature;a&&a.advanceTime(e)}}if(this._slotsZOrderChanged&&(this.updateSlotsZOrder(),this.hasEventListener(t.ArmatureEvent.Z_ORDER_UPDATED)&&this.dispatchEvent(new t.ArmatureEvent(t.ArmatureEvent.Z_ORDER_UPDATED))),this._eventList.length>0){for(var r=0,o=this._eventList.length;r<o;r++){var l=this._eventList[r];this.dispatchEvent(l)}this._eventList.length=0}this._lockDispose=!1,this._delayDispose&&this.dispose()},s.resetAnimation=function(){this.animation.stop(),this.animation._resetAnimationStateList();for(var t=0,e=this._boneList.length;t<e;t++)this._boneList[t]._removeAllStates()},s.getSlots=function(t){return void 0===t&&(t=!0),t?this._slotList.concat():this._slotList},s.getSlot=function(t){for(var e=this._slotList.length,i=0;i<e;i++){var r=this._slotList[i];if(r.name==t)return r}return null},s.getSlotByDisplay=function(t){if(t)for(var e=this._slotList.length,i=0;i<e;i++){var r=this._slotList[i];if(r.display==t)return r; }return null},s.addSlot=function(t,e){var i=this.getBone(e);if(!i)throw new Error;i.addSlot(t)},s.removeSlot=function(t){if(!t||t.armature!=this)throw new Error;t.parent.removeSlot(t)},s.removeSlotByName=function(t){var e=this.getSlot(t);return e&&this.removeSlot(e),e},s.getBones=function(t){return void 0===t&&(t=!0),t?this._boneList.concat():this._boneList},s.getBone=function(t){for(var e=this._boneList.length,i=0;i<e;i++){var r=this._boneList[i];if(r.name==t)return r}return null},s.getBoneByDisplay=function(t){var e=this.getSlotByDisplay(t);return e?e.parent:null},s.addBone=function(t,e,i){void 0===e&&(e=null),void 0===i&&(i=!1);var r;if(e&&(r=this.getBone(e),!r))throw new Error;r?r.addChildBone(t,i):(t.parent&&t.parent.removeChildBone(t,i),t._setArmature(this),i||this._updateAnimationAfterBoneListChanged())},s.removeBone=function(t,e){if(void 0===e&&(e=!1),!t||t.armature!=this)throw new Error;t.parent?t.parent.removeChildBone(t,e):(t._setArmature(null),e||this._updateAnimationAfterBoneListChanged(!1))},s.removeBoneByName=function(t){var e=this.getBone(t);return e&&this.removeBone(e),e},s._addBoneToBoneList=function(t){this._boneList.indexOf(t)<0&&(this._boneList[this._boneList.length]=t)},s._removeBoneFromBoneList=function(t){var e=this._boneList.indexOf(t);e>=0&&this._boneList.splice(e,1)},s._addSlotToSlotList=function(t){this._slotList.indexOf(t)<0&&(this._slotList[this._slotList.length]=t)},s._removeSlotFromSlotList=function(t){var e=this._slotList.indexOf(t);e>=0&&this._slotList.splice(e,1)},s.updateSlotsZOrder=function(){this._slotList.sort(this.sortSlot);for(var t=this._slotList.length;t--;){var e=this._slotList[t];e._isShowDisplay&&e._addDisplayToContainer(this._display)}this._slotsZOrderChanged=!1},s._updateAnimationAfterBoneListChanged=function(t){void 0===t&&(t=!0),t&&this.sortBoneList(),this._animation._updateAnimationStates()},s.sortBoneList=function(){var e=this._boneList.length;if(0!=e){for(var i=[];e--;){for(var r=0,n=this._boneList[e],s=n;s;)r++,s=s.parent;i[e]=[r,n]}for(i.sort(t.ArmatureData.sortBoneDataHelpArrayDescending),e=i.length;e--;)this._boneList[e]=i[e][1];i.length=0}},s._arriveAtFrame=function(e,r,n,s){if(e.event&&this.hasEventListener(t.FrameEvent.ANIMATION_FRAME_EVENT)){var a=new t.FrameEvent(t.FrameEvent.ANIMATION_FRAME_EVENT);a.animationState=n,a.frameLabel=e.event,this._eventList.push(a)}if(e.sound&&i._soundManager.hasEventListener(t.SoundEvent.SOUND)){var o=new t.SoundEvent(t.SoundEvent.SOUND);o.armature=this,o.animationState=n,o.sound=e.sound,i._soundManager.dispatchEvent(o)}e.action&&n.displayControl&&this.animation.gotoAndPlay(e.action)},s.sortSlot=function(t,e){return t.zOrder<e.zOrder?1:-1},s.getAnimation=function(){return this._animation},i._soundManager=t.SoundEventManager.getInstance(),i}(t.EventDispatcher);t.Armature=e,egret.registerClass(e,"dragonBones.Armature",["dragonBones.IAnimatable"])}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(){this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0}var e=(__define,t),i=e.prototype;return i.invert=function(){var t=this.a,e=this.b,i=this.c,r=this.d,n=this.tx,s=t*r-e*i;this.a=r/s,this.b=-e/s,this.c=-i/s,this.d=t/s,this.tx=(i*this.ty-r*n)/s,this.ty=-(t*this.ty-e*n)/s},i.concat=function(t){var e=t.a,i=t.b,r=t.c,n=t.d,s=this.tx,a=this.ty;if(1!=e||0!=i||0!=r||1!=n){var o=this.a,l=this.b,h=this.c,u=this.d;this.a=o*e+l*r,this.b=o*i+l*n,this.c=h*e+u*r,this.d=h*i+u*n}this.tx=s*e+a*r+t.tx,this.ty=s*i+a*n+t.ty},i.copyFrom=function(t){this.tx=t.tx,this.ty=t.ty,this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d},t}();t.Matrix=e,egret.registerClass(e,"dragonBones.Matrix")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){this.x=0,this.y=0,this.skewX=0,this.skewY=0,this.scaleX=1,this.scaleY=1}var i=__define,r=e,n=r.prototype;return i(n,"rotation",function(){return this.skewX},function(t){this.skewX=this.skewY=t}),n.copy=function(t){this.x=t.x,this.y=t.y,this.skewX=t.skewX,this.skewY=t.skewY,this.scaleX=t.scaleX,this.scaleY=t.scaleY},n.add=function(t){this.x+=t.x,this.y+=t.y,this.skewX+=t.skewX,this.skewY+=t.skewY,this.scaleX*=t.scaleX,this.scaleY*=t.scaleY},n.minus=function(t){this.x-=t.x,this.y-=t.y,this.skewX-=t.skewX,this.skewY-=t.skewY,this.scaleX/=t.scaleX,this.scaleY/=t.scaleY},n.normalizeRotation=function(){this.skewX=t.TransformUtil.normalizeRotation(this.skewX),this.skewY=t.TransformUtil.normalizeRotation(this.skewY)},n.toString=function(){var t="x:"+this.x+" y:"+this.y+" skewX:"+this.skewX+" skewY:"+this.skewY+" scaleX:"+this.scaleX+" scaleY:"+this.scaleY;return t},e}();t.DBTransform=e,egret.registerClass(e,"dragonBones.DBTransform")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){this._globalTransformMatrix=new t.Matrix,this._global=new t.DBTransform,this._origin=new t.DBTransform,this._offset=new t.DBTransform,this._offset.scaleX=this._offset.scaleY=1,this._visible=!0,this._armature=null,this._parent=null,this.userData=null,this.inheritRotation=!0,this.inheritScale=!0,this.inheritTranslation=!0}var i=__define,r=e,n=r.prototype;return i(n,"global",function(){return this._global}),i(n,"origin",function(){return this._origin}),i(n,"offset",function(){return this._offset}),i(n,"armature",function(){return this._armature}),n._setArmature=function(t){this._armature=t},i(n,"parent",function(){return this._parent}),n._setParent=function(t){this._parent=t},n.dispose=function(){this.userData=null,this._globalTransformMatrix=null,this._global=null,this._origin=null,this._offset=null,this._armature=null,this._parent=null},n._calculateRelativeParentTransform=function(){},n._calculateParentTransform=function(){if(this.parent&&(this.inheritTranslation||this.inheritRotation||this.inheritScale)){var i=this._parent._globalTransformForChild,r=this._parent._globalTransformMatrixForChild;return this.inheritTranslation&&this.inheritRotation&&this.inheritScale||(i=e._tempParentGlobalTransform,i.copy(this._parent._globalTransformForChild),this.inheritTranslation||(i.x=0,i.y=0),this.inheritScale||(i.scaleX=1,i.scaleY=1),this.inheritRotation||(i.skewX=0,i.skewY=0),r=e._tempParentGlobalTransformMatrix,t.TransformUtil.transformToMatrix(i,r,!0)),{parentGlobalTransform:i,parentGlobalTransformMatrix:r}}return null},n._updateGlobal=function(){this._calculateRelativeParentTransform();var e=this._calculateParentTransform();if(null!=e){var i=e.parentGlobalTransformMatrix,r=e.parentGlobalTransform,n=this._global.x,s=this._global.y;this._global.x=i.a*n+i.c*s+i.tx,this._global.y=i.d*s+i.b*n+i.ty,this.inheritRotation&&(this._global.skewX+=r.skewX,this._global.skewY+=r.skewY),this.inheritScale&&(this._global.scaleX*=r.scaleX,this._global.scaleY*=r.scaleY)}return t.TransformUtil.transformToMatrix(this._global,this._globalTransformMatrix,!0),e},e._tempParentGlobalTransformMatrix=new t.Matrix,e._tempParentGlobalTransform=new t.DBTransform,e}();t.DBObject=e,egret.registerClass(e,"dragonBones.DBObject")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(e){function i(){e.call(this),this.applyOffsetTranslationToChild=!0,this.applyOffsetRotationToChild=!0,this.applyOffsetScaleToChild=!1,this._needUpdate=0,this._tween=new t.DBTransform,this._tweenPivot=new t.Point,this._tween.scaleX=this._tween.scaleY=1,this._boneList=[],this._slotList=[],this._timelineStateList=[],this._needUpdate=2,this._isColorChanged=!1}__extends(i,e);var r=__define,n=i,s=n.prototype;return i.initWithBoneData=function(t){var e=new i;return e.name=t.name,e.inheritRotation=t.inheritRotation,e.inheritScale=t.inheritScale,e.origin.copy(t.transform),e},s.dispose=function(){if(this._boneList){e.prototype.dispose.call(this);for(var t=this._boneList.length;t--;)this._boneList[t].dispose();for(t=this._slotList.length;t--;)this._slotList[t].dispose();this._tween=null,this._tweenPivot=null,this._boneList=null,this._slotList=null,this._timelineStateList=null}},s.contains=function(t){if(!t)throw new Error;if(t==this)return!1;for(var e=t;e!=this&&null!=e;)e=e.parent;return e==this},s.addChildBone=function(t,e){if(void 0===e&&(e=!1),!t)throw new Error;if(t==this||t.contains(this))throw new Error;t.parent!=this&&(t.parent&&t.parent.removeChildBone(t,e),this._boneList[this._boneList.length]=t,t._setParent(this),t._setArmature(this._armature),this._armature&&!e&&this._armature._updateAnimationAfterBoneListChanged())},s.removeChildBone=function(t,e){if(void 0===e&&(e=!1),!t)throw new Error;var i=this._boneList.indexOf(t);if(i<0)throw new Error;this._boneList.splice(i,1),t._setParent(null),t._setArmature(null),this._armature&&!e&&this._armature._updateAnimationAfterBoneListChanged(!1)},s.addSlot=function(t){if(!t)throw new Error;t.parent&&t.parent.removeSlot(t),this._slotList[this._slotList.length]=t,t._setParent(this),t.setArmature(this._armature)},s.removeSlot=function(t){if(!t)throw new Error;var e=this._slotList.indexOf(t);if(e<0)throw new Error;this._slotList.splice(e,1),t._setParent(null),t.setArmature(null)},s._setArmature=function(t){if(this._armature!=t){this._armature&&(this._armature._removeBoneFromBoneList(this),this._armature._updateAnimationAfterBoneListChanged(!1)),this._armature=t,this._armature&&this._armature._addBoneToBoneList(this);for(var e=this._boneList.length;e--;)this._boneList[e]._setArmature(this._armature);for(e=this._slotList.length;e--;)this._slotList[e].setArmature(this._armature)}},s.getBones=function(t){return void 0===t&&(t=!0),t?this._boneList.concat():this._boneList},s.getSlots=function(t){return void 0===t&&(t=!0),t?this._slotList.concat():this._slotList},s.invalidUpdate=function(){this._needUpdate=2},s._calculateRelativeParentTransform=function(){this._global.scaleX=this._origin.scaleX*this._tween.scaleX*this._offset.scaleX,this._global.scaleY=this._origin.scaleY*this._tween.scaleY*this._offset.scaleY,this._global.skewX=this._origin.skewX+this._tween.skewX+this._offset.skewX,this._global.skewY=this._origin.skewY+this._tween.skewY+this._offset.skewY,this._global.x=this._origin.x+this._tween.x+this._offset.x,this._global.y=this._origin.y+this._tween.y+this._offset.y},s._update=function(e){if(void 0===e&&(e=!1),this._needUpdate--,e||this._needUpdate>0||this._parent&&this._parent._needUpdate>0){this._needUpdate=1,this.blendingTimeline();var i=this._updateGlobal(),r=i?i.parentGlobalTransform:null,n=i?i.parentGlobalTransformMatrix:null,s=0!=this._offset.x||0!=this._offset.y,a=0!=this._offset.scaleX||0!=this._offset.scaleY,o=0!=this._offset.skewX||0!=this._offset.skewY;s&&!this.applyOffsetTranslationToChild||a&&!this.applyOffsetScaleToChild||o&&!this.applyOffsetRotationToChild?(this._tempGlobalTransformForChild||(this._tempGlobalTransformForChild=new t.DBTransform),this._globalTransformForChild=this._tempGlobalTransformForChild,this._tempGlobalTransformMatrixForChild||(this._tempGlobalTransformMatrixForChild=new t.Matrix),this._globalTransformMatrixForChild=this._tempGlobalTransformMatrixForChild,this._globalTransformForChild.x=this._origin.x+this._tween.x,this._globalTransformForChild.y=this._origin.y+this._tween.y,this._globalTransformForChild.scaleX=this._origin.scaleX*this._tween.scaleX,this._globalTransformForChild.scaleY=this._origin.scaleY*this._tween.scaleY,this._globalTransformForChild.skewX=this._origin.skewX+this._tween.skewX,this._globalTransformForChild.skewY=this._origin.skewY+this._tween.skewY,this.applyOffsetTranslationToChild&&(this._globalTransformForChild.x+=this._offset.x,this._globalTransformForChild.y+=this._offset.y),this.applyOffsetScaleToChild&&(this._globalTransformForChild.scaleX*=this._offset.scaleX,this._globalTransformForChild.scaleY*=this._offset.scaleY),this.applyOffsetRotationToChild&&(this._globalTransformForChild.skewX+=this._offset.skewX,this._globalTransformForChild.skewY+=this._offset.skewY),t.TransformUtil.transformToMatrix(this._globalTransformForChild,this._globalTransformMatrixForChild,!0),n&&(this._globalTransformMatrixForChild.concat(n),t.TransformUtil.matrixToTransform(this._globalTransformMatrixForChild,this._globalTransformForChild,this._globalTransformForChild.scaleX*r.scaleX>=0,this._globalTransformForChild.scaleY*r.scaleY>=0))):(this._globalTransformForChild=this._global,this._globalTransformMatrixForChild=this._globalTransformMatrix)}},s._updateColor=function(t,e,i,r,n,s,a,o,l){for(var h=this._slotList.length,u=0;u<h;u++){var c=this._slotList[u];c._updateDisplayColor(t,e,i,r,n,s,a,o)}this._isColorChanged=l},s._hideSlots=function(){for(var t=this._slotList.length,e=0;e<t;e++){var i=this._slotList[e];i._changeDisplay(-1)}},s._arriveAtFrame=function(e,r,n,s){var a=n.displayControl&&(!this.displayController||this.displayController==n.name)&&n.containsBoneMask(this.name);if(a){var o,l=e;l.displayIndex;if(e.event&&this._armature.hasEventListener(t.FrameEvent.BONE_FRAME_EVENT)){var h=new t.FrameEvent(t.FrameEvent.BONE_FRAME_EVENT);h.bone=this,h.animationState=n,h.frameLabel=e.event,this._armature._eventList.push(h)}if(e.sound&&i._soundManager.hasEventListener(t.SoundEvent.SOUND)){var u=new t.SoundEvent(t.SoundEvent.SOUND);u.armature=this._armature,u.animationState=n,u.sound=e.sound,i._soundManager.dispatchEvent(u)}if(e.action)for(var c=this._slotList.length,d=0;d<c;d++){o=this._slotList[d];var f=o.childArmature;f&&f.animation.gotoAndPlay(e.action)}}},s._addState=function(t){this._timelineStateList.indexOf(t)<0&&(this._timelineStateList.push(t),this._timelineStateList.sort(this.sortState))},s._removeState=function(t){var e=this._timelineStateList.indexOf(t);e>=0&&this._timelineStateList.splice(e,1)},s._removeAllStates=function(){this._timelineStateList.length=0},s.blendingTimeline=function(){var t,e,i,r,n=this._timelineStateList.length;if(1==n)t=this._timelineStateList[0],r=t._animationState.weight*t._animationState.fadeWeight,t._weight=r,e=t._transform,i=t._pivot,this._tween.x=e.x*r,this._tween.y=e.y*r,this._tween.skewX=e.skewX*r,this._tween.skewY=e.skewY*r,this._tween.scaleX=1+(e.scaleX-1)*r,this._tween.scaleY=1+(e.scaleY-1)*r,this._tweenPivot.x=i.x*r,this._tweenPivot.y=i.y*r;else if(n>1){for(var s=0,a=0,o=0,l=0,h=1,u=1,c=0,d=0,f=1,p=0,_=this._timelineStateList[n-1]._animationState.layer,m=0;n--;){if(t=this._timelineStateList[n],m=t._animationState.layer,_!=m){if(p>=f){t._weight=0;break}f-=p}_=m,r=t._animationState.weight*t._animationState.fadeWeight*f,t._weight=r,r&&(e=t._transform,i=t._pivot,s+=e.x*r,a+=e.y*r,o+=e.skewX*r,l+=e.skewY*r,h+=(e.scaleX-1)*r,u+=(e.scaleY-1)*r,c+=i.x*r,d+=i.y*r,p+=r)}this._tween.x=s,this._tween.y=a,this._tween.skewX=o,this._tween.skewY=l,this._tween.scaleX=h,this._tween.scaleY=u,this._tweenPivot.x=c,this._tweenPivot.y=d}},s.sortState=function(t,e){return t._animationState.layer<e._animationState.layer?-1:1},r(s,"childArmature",function(){return this.slot?this.slot.childArmature:null}),r(s,"display",function(){return this.slot?this.slot.display:null},function(t){this.slot&&(this.slot.display=t)}),r(s,"node",function(){return this._offset}),r(s,"visible",void 0,function(t){if(this._visible!=t){this._visible=t;for(var e=this._slotList.length,i=0;i<e;i++){var r=this._slotList[i];r._updateDisplayVisible(this._visible)}}}),r(s,"slot",function(){return this._slotList.length>0?this._slotList[0]:null}),i._soundManager=t.SoundEventManager.getInstance(),i}(t.DBObject);t.Bone=e,egret.registerClass(e,"dragonBones.Bone")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(e){function i(i){if(e.call(this),this._currentDisplayIndex=0,i!=this)throw new Error(egret.getString(4001));this._displayList=[],this._timelineStateList=[],this._currentDisplayIndex=-1,this._originZOrder=0,this._tweenZOrder=0,this._offsetZOrder=0,this._isShowDisplay=!1,this._colorTransform=new t.ColorTransform,this._displayDataList=null,this._currentDisplay=null,this.inheritRotation=!0,this.inheritScale=!0}__extends(i,e);var r=__define,n=i,s=n.prototype;return s.initWithSlotData=function(t){this.name=t.name,this.blendMode=t.blendMode,this._originZOrder=t.zOrder,this._displayDataList=t.displayDataList,this._originDisplayIndex=t.displayIndex},s.dispose=function(){this._displayList&&(e.prototype.dispose.call(this),this._displayList.length=0,this._displayDataList=null,this._displayList=null,this._currentDisplay=null)},s.sortState=function(t,e){return t._animationState.layer<e._animationState.layer?-1:1},s._addState=function(t){this._timelineStateList.indexOf(t)<0&&(this._timelineStateList.push(t),this._timelineStateList.sort(this.sortState))},s._removeState=function(t){var e=this._timelineStateList.indexOf(t);e>=0&&this._timelineStateList.splice(e,1)},s.setArmature=function(t){this._armature!=t&&(this._armature&&this._armature._removeSlotFromSlotList(this),this._armature=t,this._armature?(this._armature._addSlotToSlotList(this),this._armature._slotsZOrderChanged=!0,this._addDisplayToContainer(this._armature.display)):this._removeDisplayFromContainer())},s._update=function(){this._parent._needUpdate<=0&&!this._needUpdate||(this._updateGlobal(),this._updateTransform(),this._needUpdate=!1)},s._calculateRelativeParentTransform=function(){this._global.scaleX=this._origin.scaleX*this._offset.scaleX,this._global.scaleY=this._origin.scaleY*this._offset.scaleY,this._global.skewX=this._origin.skewX+this._offset.skewX,this._global.skewY=this._origin.skewY+this._offset.skewY,this._global.x=this._origin.x+this._offset.x+this._parent._tweenPivot.x,this._global.y=this._origin.y+this._offset.y+this._parent._tweenPivot.y},s.updateChildArmatureAnimation=function(){this.childArmature&&(this._isShowDisplay?this._armature&&this._armature.animation.lastAnimationState&&this.childArmature.animation.hasAnimation(this._armature.animation.lastAnimationState.name)?this.childArmature.animation.gotoAndPlay(this._armature.animation.lastAnimationState.name):this.childArmature.animation.play():(this.childArmature.animation.stop(),this.childArmature.animation._lastAnimationState=null))},s._changeDisplay=function(t){if(void 0===t&&(t=0),t<0)this._isShowDisplay&&(this._isShowDisplay=!1,this._removeDisplayFromContainer(),this.updateChildArmatureAnimation());else if(this._displayList.length>0){var e=this._displayList.length;t>=e&&(t=e-1),this._currentDisplayIndex!=t?(this._isShowDisplay=!0,this._currentDisplayIndex=t,this._updateSlotDisplay(),this.updateChildArmatureAnimation(),this._displayDataList&&this._displayDataList.length>0&&this._currentDisplayIndex<this._displayDataList.length&&this._origin.copy(this._displayDataList[this._currentDisplayIndex].transform),this._needUpdate=!0):this._isShowDisplay||(this._isShowDisplay=!0,this._armature&&(this._armature._slotsZOrderChanged=!0,this._addDisplayToContainer(this._armature.display)),this.updateChildArmatureAnimation())}},s._updateSlotDisplay=function(){var e=-1;this._currentDisplay&&(e=this._getDisplayIndex(),this._removeDisplayFromContainer());var i=this._displayList[this._currentDisplayIndex];i?i instanceof t.Armature?this._currentDisplay=i.display:this._currentDisplay=i:this._currentDisplay=null,this._updateDisplay(this._currentDisplay),this._currentDisplay&&(this._armature&&this._isShowDisplay&&(e<0?(this._armature._slotsZOrderChanged=!0,this._addDisplayToContainer(this._armature.display)):this._addDisplayToContainer(this._armature.display,e)),this._updateDisplayBlendMode(this._blendMode),this._updateDisplayColor(this._colorTransform.alphaOffset,this._colorTransform.redOffset,this._colorTransform.greenOffset,this._colorTransform.blueOffset,this._colorTransform.alphaMultiplier,this._colorTransform.redMultiplier,this._colorTransform.greenMultiplier,this._colorTransform.blueMultiplier,!0),this._updateDisplayVisible(this._visible),this._updateTransform())},r(s,"visible",void 0,function(t){this._visible!=t&&(this._visible=t,this._updateDisplayVisible(this._visible))}),r(s,"displayList",function(){return this._displayList},function(t){if(!t)throw new Error;this._currentDisplayIndex<0&&(this._currentDisplayIndex=0);for(var e=this._displayList.length=t.length;e--;)this._displayList[e]=t[e];var i=this._currentDisplayIndex;this._currentDisplayIndex=-1,this._changeDisplay(i)}),r(s,"display",function(){return this._currentDisplay},function(t){this._currentDisplayIndex<0&&(this._currentDisplayIndex=0),this._displayList[this._currentDisplayIndex]!=t&&(this._displayList[this._currentDisplayIndex]=t,this._updateSlotDisplay(),this.updateChildArmatureAnimation(),this._updateTransform())}),s.getDisplay=function(){return this.display},s.setDisplay=function(t){this.display=t},r(s,"childArmature",function(){return this._displayList[this._currentDisplayIndex]instanceof t.Armature?this._displayList[this._currentDisplayIndex]:null},function(t){this.display=t}),r(s,"zOrder",function(){return this._originZOrder+this._tweenZOrder+this._offsetZOrder},function(t){this.zOrder!=t&&(this._offsetZOrder=t-this._originZOrder-this._tweenZOrder,this._armature&&(this._armature._slotsZOrderChanged=!0))}),r(s,"blendMode",function(){return this._blendMode},function(t){this._blendMode!=t&&(this._blendMode=t,this._updateDisplayBlendMode(this._blendMode))}),s._updateDisplay=function(t){throw new Error("")},s._getDisplayIndex=function(){throw new Error(egret.getString(4001))},s._addDisplayToContainer=function(t,e){throw void 0===e&&(e=-1),new Error(egret.getString(4001))},s._removeDisplayFromContainer=function(){throw new Error(egret.getString(4001))},s._updateTransform=function(){throw new Error(egret.getString(4001))},s._updateDisplayVisible=function(t){throw new Error(egret.getString(4001))},s._updateDisplayColor=function(t,e,i,r,n,s,a,o,l){void 0===l&&(l=!1),this._colorTransform.alphaOffset=t,this._colorTransform.redOffset=e,this._colorTransform.greenOffset=i,this._colorTransform.blueOffset=r,this._colorTransform.alphaMultiplier=n,this._colorTransform.redMultiplier=s,this._colorTransform.greenMultiplier=a,this._colorTransform.blueMultiplier=o,this._isColorChanged=l},s._updateDisplayBlendMode=function(t){throw new Error("Abstract method needs to be implemented in subclass!")},s._arriveAtFrame=function(t,e,i,r){var n=i.displayControl&&i.containsBoneMask(this.parent.name);if(n){var s=t,a=s.displayIndex;this._changeDisplay(a),this._updateDisplayVisible(s.visible),a>=0&&(isNaN(s.zOrder)||s.zOrder==this._tweenZOrder||(this._tweenZOrder=s.zOrder,this._armature._slotsZOrderChanged=!0)),t.action&&this.childArmature&&this.childArmature.animation.gotoAndPlay(t.action)}},s._updateGlobal=function(){this._calculateRelativeParentTransform(),t.TransformUtil.transformToMatrix(this._global,this._globalTransformMatrix,!0);var e=this._calculateParentTransform();return e&&(this._globalTransformMatrix.concat(e.parentGlobalTransformMatrix),t.TransformUtil.matrixToTransform(this._globalTransformMatrix,this._global,this._global.scaleX*e.parentGlobalTransform.scaleX>=0,this._global.scaleY*e.parentGlobalTransform.scaleY>=0)),e},s._resetToOrigin=function(){this._changeDisplay(this._originDisplayIndex),this._updateDisplayColor(0,0,0,0,1,1,1,1,!0)},i}(t.DBObject);t.Slot=e,egret.registerClass(e,"dragonBones.Slot")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){this.slotTimelineCacheList=[],this.slotTimelineCacheDic={},this.frameNum=0}var i=(__define,e),r=i.prototype;return e.initWithAnimationData=function(i,r){var n=new e;n.name=i.name;for(var s,a,o,l,h=i.timelineList,u=0,c=h.length;u<c;u++){s=h[u].name;for(var d=0,f=r.slotDataList.length;d<f;d++)a=r.slotDataList[d],l=a.name,a.parent==s&&null==n.slotTimelineCacheDic[l]&&(o=new t.SlotTimelineCache,o.name=l,n.slotTimelineCacheList.push(o),n.slotTimelineCacheDic[l]=o)}return n},r.initSlotTimelineCacheDic=function(t,e){var i;for(var r in this.slotTimelineCacheDic){var n=this.slotTimelineCacheDic[r];i=n.name,n.cacheGenerator=t[i],n.currentFrameCache=e[i]}},r.bindCacheUserSlotDic=function(t){for(var e in t)this.slotTimelineCacheDic[e].bindCacheUser(t[e])},r.addFrame=function(){this.frameNum++;for(var t,e=0,i=this.slotTimelineCacheList.length;e<i;e++)t=this.slotTimelineCacheList[e],t.addFrame()},r.update=function(t){for(var e,i=Math.floor(t*(this.frameNum-1)),r=0,n=this.slotTimelineCacheList.length;r<n;r++)e=this.slotTimelineCacheList[r],e.update(i)},e}();t.AnimationCache=e,egret.registerClass(e,"dragonBones.AnimationCache")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){this.animationCacheDic={},this.slotFrameCacheDic={}}var i=(__define,e),r=i.prototype;return e.initWithArmatureData=function(t,i){void 0===i&&(i=0);var r=new e;if(r.armatureData=t,i<=0){var n=t.animationDataList[0];n&&(r.frameRate=n.frameRate)}else r.frameRate=i;return r},r.initAllAnimationCache=function(){for(var e=this.armatureData.animationDataList.length,i=0;i<e;i++){var r=this.armatureData.animationDataList[i];this.animationCacheDic[r.name]=t.AnimationCache.initWithAnimationData(r,this.armatureData)}},r.initAnimationCache=function(e){this.animationCacheDic[e]=t.AnimationCache.initWithAnimationData(this.armatureData.getAnimationData(e),this.armatureData)},r.bindCacheUserArmatures=function(t){for(var e=t.length,i=0;i<e;i++){var r=t[i];this.bindCacheUserArmature(r)}},r.bindCacheUserArmature=function(t){t.animation.animationCacheManager=this;var e;for(var i in t._slotDic)e=t._slotDic[i],e.frameCache=this.slotFrameCacheDic[e.name]},r.setCacheGeneratorArmature=function(e){this.cacheGeneratorArmature=e;var i;for(var r in e._slotDic)i=e._slotDic[r],this.slotFrameCacheDic[i.name]=new t.SlotFrameCache;for(var n in this.animationCacheDic){var s=this.animationCacheDic[n];s.initSlotTimelineCacheDic(e._slotDic,this.slotFrameCacheDic)}},r.generateAllAnimationCache=function(t){for(var e in this.animationCacheDic){var i=this.animationCacheDic[e];this.generateAnimationCache(i.name,t)}},r.generateAnimationCache=function(t,e){var i=this.cacheGeneratorArmature.enableCache;this.cacheGeneratorArmature.enableCache=!1;var r=this.animationCacheDic[t];if(r){var n=this.cacheGeneratorArmature.getAnimation().animationState,s=1/this.frameRate;e?this.cacheGeneratorArmature.getAnimation().gotoAndPlay(t,0,-1,0):this.cacheGeneratorArmature.getAnimation().gotoAndPlay(t,0,-1,1);var a=this.cacheGeneratorArmature.enableEventDispatch;this.cacheGeneratorArmature.enableEventDispatch=!1;var o;do o=n.progress,this.cacheGeneratorArmature.advanceTime(s),r.addFrame();while(n.progress>=o&&n.progress<1);this.cacheGeneratorArmature.enableEventDispatch=a,this.resetCacheGeneratorArmature(),this.cacheGeneratorArmature.enableCache=i}},r.resetCacheGeneratorArmature=function(){this.cacheGeneratorArmature.resetAnimation()},r.getAnimationCache=function(t){return this.animationCacheDic[t]},e}();t.AnimationCacheManager=e,egret.registerClass(e,"dragonBones.AnimationCacheManager")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){this.globalTransform=new t.DBTransform,this.globalTransformMatrix=new t.Matrix}var i=(__define,e),r=i.prototype;return r.copy=function(t){this.globalTransform=t.globalTransform,this.globalTransformMatrix=t.globalTransformMatrix},r.clear=function(){this.globalTransform=e.ORIGIN_TRAMSFORM,this.globalTransformMatrix=e.ORIGIN_MATRIX},e.ORIGIN_TRAMSFORM=new t.DBTransform,e.ORIGIN_MATRIX=new t.Matrix,e}();t.FrameCache=e,egret.registerClass(e,"dragonBones.FrameCache")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(t){function e(){t.call(this),this.displayIndex=-1}__extends(e,t);var i=(__define,e),r=i.prototype;return r.copy=function(e){t.prototype.copy.call(this,e),this.colorTransform=e.colorTransform,this.displayIndex=e.displayIndex},r.clear=function(){t.prototype.clear.call(this),this.colorTransform=null,this.displayIndex=-1},e}(t.FrameCache);t.SlotFrameCache=e,egret.registerClass(e,"dragonBones.SlotFrameCache")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(){this.frameCacheList=new Array}var e=(__define,t),i=e.prototype;return i.addFrame=function(){},i.update=function(t){void 0===t&&(t=0),this.currentFrameCache.copy(this.frameCacheList[t])},i.bindCacheUser=function(t){t.frameCache=this.currentFrameCache},t}();t.TimelineCache=e,egret.registerClass(e,"dragonBones.TimelineCache")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(e){function i(){e.call(this)}__extends(i,e);var r=(__define,i),n=r.prototype;return n.addFrame=function(){var e=new t.SlotFrameCache;e.globalTransform.copy(this.cacheGenerator.global),e.globalTransformMatrix.copyFrom(this.cacheGenerator.globalTransformMatrix),this.cacheGenerator.colorChanged&&(e.colorTransform=t.ColorTransformUtil.cloneColor(this.cacheGenerator.colorTransform)),e.displayIndex=this.cacheGenerator.displayIndex,this.frameCacheList.push(e)},i}(t.TimelineCache);t.SlotTimelineCache=e,egret.registerClass(e,"dragonBones.SlotTimelineCache")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(t){function e(e,i,r){void 0===i&&(i=!1),void 0===r&&(r=!1),t.call(this,e,i,r)}__extends(e,t);var i=(__define,e);i.prototype;return e}(egret.Event);t.Event=e,egret.registerClass(e,"dragonBones.Event")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(t){function e(e,i){void 0===i&&(i=!1),t.call(this,e)}__extends(e,t);var i=__define,r=e,n=r.prototype;return i(e,"MOVEMENT_CHANGE",function(){return e.FADE_IN}),i(n,"movementID",function(){return this.animationName}),i(n,"armature",function(){return this.target}),i(n,"animationName",function(){return this.animationState.name}),e.FADE_IN="fadeIn",e.FADE_OUT="fadeOut",e.START="start",e.COMPLETE="complete",e.LOOP_COMPLETE="loopComplete",e.FADE_IN_COMPLETE="fadeInComplete",e.FADE_OUT_COMPLETE="fadeOutComplete",e}(t.Event);t.AnimationEvent=e,egret.registerClass(e,"dragonBones.AnimationEvent")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(t){function e(e){t.call(this,e)}__extends(e,t);var i=(__define,e);i.prototype;return e.Z_ORDER_UPDATED="zOrderUpdated",e}(t.Event);t.ArmatureEvent=e,egret.registerClass(e,"dragonBones.ArmatureEvent")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(t){function e(e,i){void 0===i&&(i=!1),t.call(this,e)}__extends(e,t);var i=__define,r=e,n=r.prototype;return i(e,"MOVEMENT_FRAME_EVENT",function(){return e.ANIMATION_FRAME_EVENT}),i(n,"armature",function(){return this.target}),e.ANIMATION_FRAME_EVENT="animationFrameEvent",e.BONE_FRAME_EVENT="boneFrameEvent",e}(t.Event);t.FrameEvent=e,egret.registerClass(e,"dragonBones.FrameEvent")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(t){function e(e,i){void 0===i&&(i=!1),t.call(this,e)}__extends(e,t);var i=(__define,e);i.prototype;return e.SOUND="sound",e}(t.Event);t.SoundEvent=e,egret.registerClass(e,"dragonBones.SoundEvent")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(e){function r(t){if(e.call(this),this.dragonBonesDataDic={},this.textureAtlasDic={},t!=this)throw new Error(egret.getString(4001))}__extends(r,e);var n=(__define,r),s=n.prototype;return s.dispose=function(t){if(void 0===t&&(t=!0),t){for(var e in this.dragonBonesDataDic)this.dragonBonesDataDic[e].dispose(),delete this.dragonBonesDataDic[e];for(var i in this.textureAtlasDic){var r=this.textureAtlasDic[i];if(r)for(var n=0,s=r.length;n<s;n++)r[n].dispose();delete this.textureAtlasDic[i]}}this.dragonBonesDataDic=null,this.textureAtlasDic=null},s.getDragonBonesData=function(t){return this.dragonBonesDataDic[t]},s.getSkeletonData=function(t){return this.getDragonBonesData(t)},s.addDragonBonesData=function(t,e){if(void 0===e&&(e=null),!t)throw new Error;if(e=e||t.name,!e)throw new Error(egret.getString(4002));this.dragonBonesDataDic[e]=t},s.addSkeletonData=function(t,e){void 0===e&&(e=null),this.addDragonBonesData(t,e)},s.removeDragonBonesData=function(t){delete this.dragonBonesDataDic[t]},s.removeSkeletonData=function(t){delete this.dragonBonesDataDic[t]},s.getTextureAtlas=function(t){return this.textureAtlasDic[t]},s.addTextureAtlas=function(t,e){if(void 0===e&&(e=null),!t)throw new Error; if(!e&&t.hasOwnProperty("name")&&(e=t.name),!e)throw new Error(egret.getString(4002));var i=this.textureAtlasDic[e];null==i&&(i=[],this.textureAtlasDic[e]=i),i.indexOf(t)==-1&&i.push(t)},s.removeTextureAtlas=function(t){delete this.textureAtlasDic[t]},s.getTextureDisplay=function(t,e,i,r){void 0===e&&(e=null),void 0===i&&(i=NaN),void 0===r&&(r=NaN);var n,s,a,o;if(e){if(s=this.textureAtlasDic[e])for(a=0,o=s.length;a<o&&(n=s[a],!n.getRegion(t));a++)n=null}else for(e in this.textureAtlasDic)if(s=this.textureAtlasDic[e]){for(a=0,o=s.length;a<o&&(n=s[a],!n.getRegion(t));a++)n=null;if(null!=n)break}if(!n)return null;if(isNaN(i)||isNaN(r)){var l=this.dragonBonesDataDic[e];if(l=l?l:this.findFirstDragonBonesData()){var h=l.getDisplayDataByName(t);h&&(i=h.pivot.x,r=h.pivot.y)}}return this._generateDisplay(n,t,i,r)},s.buildArmature=function(t,e,i,r){void 0===e&&(e=null),void 0===i&&(i=null),void 0===r&&(r=null);var n={};this.fillBuildArmatureDataPackageArmatureInfo(t,e,n),null==i&&(i=n.dragonBonesDataName);var s=n.dragonBonesData,a=n.armatureData;return a?this.buildArmatureUsingArmatureDataFromTextureAtlas(s,a,i,r):null},s.buildFastArmature=function(t,e,r,n){void 0===e&&(e=null),void 0===r&&(r=null),void 0===n&&(n=null);var s=new i;this.fillBuildArmatureDataPackageArmatureInfo(t,e,s),null==r&&(r=s.dragonBonesDataName);var a=s.dragonBonesData,o=s.armatureData;return o?this.buildFastArmatureUsingArmatureDataFromTextureAtlas(a,o,r,n):null},s.buildArmatureUsingArmatureDataFromTextureAtlas=function(t,e,i,r){void 0===r&&(r=null);var n=this._generateArmature();return n.name=e.name,n.__dragonBonesData=t,n._armatureData=e,n.animation.animationDataList=e.animationDataList,this._buildBones(n),this._buildSlots(n,r,i),n.advanceTime(0),n},s.buildFastArmatureUsingArmatureDataFromTextureAtlas=function(t,e,i,r){void 0===r&&(r=null);var n=this._generateFastArmature();return n.name=e.name,n.__dragonBonesData=t,n._armatureData=e,n.animation.animationDataList=e.animationDataList,this._buildFastBones(n),this._buildFastSlots(n,r,i),n.advanceTime(0),n},s.copyAnimationsToArmature=function(e,i,r,n){void 0===r&&(r=null),void 0===n&&(n=!0);var s={};if(!this.fillBuildArmatureDataPackageArmatureInfo(i,r,s))return!1;var a=s.armatureData;e.animation.animationDataList=a.animationDataList;for(var o,l,h,u,c,d,f=a.getSkinData(""),p=e.getSlots(!1),_=0,m=p.length,g=0;g<m;g++){h=p[g],u=h.displayList,_=u.length;for(var v=0;v<_;v++)c=u[v],c instanceof t.Armature&&(d=c,o=f.getSlotData(h.name),l=o.displayDataList[v],l.type==t.DisplayData.ARMATURE&&this.copyAnimationsToArmature(d,l.name,s.dragonBonesDataName,n))}return!0},s.fillBuildArmatureDataPackageArmatureInfo=function(t,e,i){if(e)return i.dragonBonesDataName=e,i.dragonBonesData=this.dragonBonesDataDic[e],i.armatureData=i.dragonBonesData.getArmatureDataByName(t),!0;for(e in this.dragonBonesDataDic)if(i.dragonBonesData=this.dragonBonesDataDic[e],i.armatureData=i.dragonBonesData.getArmatureDataByName(t),i.armatureData)return i.dragonBonesDataName=e,!0;return!1},s.fillBuildArmatureDataPackageTextureInfo=function(t,e){e.textureAtlas=this.textureAtlasDic[t?t:e.dragonBonesDataName]},s.findFirstDragonBonesData=function(){for(var t in this.dragonBonesDataDic){var e=this.dragonBonesDataDic[t];if(e)return e}return null},s.findFirstTextureAtlas=function(){for(var t in this.textureAtlasDic){var e=this.textureAtlasDic[t];if(e)return e}return null},s._buildBones=function(e){for(var i,r,n,s=e.armatureData.boneDataList,a=0;a<s.length;a++)i=s[a],r=t.Bone.initWithBoneData(i),n=i.parent,n&&null==e.armatureData.getBoneData(n)&&(n=null),e.addBone(r,n,!0);e._updateAnimationAfterBoneListChanged()},s._buildSlots=function(e,i,r){var n=e.armatureData.getSkinData(i);if(n){e.armatureData.setSkinData(i);for(var s,a,o,l=[],h=e.armatureData.slotDataList,u=0;u<h.length;u++)if(s=h[u],o=e.getBone(s.parent)){a=this._generateSlot(),a.initWithSlotData(s),o.addSlot(a),l.length=0;for(var c=s.displayDataList.length;c--;){var d=s.displayDataList[c];switch(d.type){case t.DisplayData.ARMATURE:var f=this.buildArmatureUsingArmatureDataFromTextureAtlas(e.__dragonBonesData,e.__dragonBonesData.getArmatureDataByName(d.name),r,i);l[c]=f;break;case t.DisplayData.IMAGE:default:l[c]=this.getTextureDisplay(d.name,r,d.pivot.x,d.pivot.y)}}for(var p=0,_=l.length;p<_;p++){var m=l[p];if(m&&(m instanceof t.Armature&&(m=m.display),m.hasOwnProperty("name")))try{m.name=a.name}catch(t){}}a.displayList=l,a._changeDisplay(s.displayIndex)}}},s._buildFastBones=function(e){for(var i,r,n=e.armatureData.boneDataList,s=0;s<n.length;s++)i=n[s],r=t.FastBone.initWithBoneData(i),e.addBone(r,i.parent)},s._buildFastSlots=function(e,i,r){var n=e.armatureData.getSkinData(i);if(n){e.armatureData.setSkinData(i);for(var s,a,o=[],l=e.armatureData.slotDataList,h=0;h<l.length;h++){o.length=0,s=l[h],a=this._generateFastSlot(),a.initWithSlotData(s);for(var u=s.displayDataList.length;u--;){var c=s.displayDataList[u];switch(c.type){case t.DisplayData.ARMATURE:var d=this.buildFastArmatureUsingArmatureDataFromTextureAtlas(e.__dragonBonesData,e.__dragonBonesData.getArmatureDataByName(c.name),r,i);o[u]=d,a.hasChildArmature=!0;break;case t.DisplayData.IMAGE:default:o[u]=this.getTextureDisplay(c.name,r,c.pivot.x,c.pivot.y)}}for(var f=o.length,p=0;p<f;p++){var _=o[p];if(_&&(_ instanceof t.FastArmature&&(_=_.display),_.hasOwnProperty("name")))try{_.name=a.name}catch(t){}}a.initDisplayList(o.concat()),e.addSlot(a,s.parent),a._changeDisplayIndex(s.displayIndex)}}},s._generateArmature=function(){return null},s._generateSlot=function(){return null},s._generateFastArmature=function(){return null},s._generateFastSlot=function(){return null},s._generateDisplay=function(t,e,i,r){return null},r._helpMatrix=new t.Matrix,r}(t.EventDispatcher);t.BaseFactory=e,egret.registerClass(e,"dragonBones.BaseFactory");var i=function(){function t(){}var e=(__define,t);e.prototype;return t}();t.BuildArmatureDataPackage=i,egret.registerClass(i,"dragonBones.BuildArmatureDataPackage")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(e){function i(i){e.call(this),this.isCacheManagerExclusive=!1,this._enableEventDispatch=!0,this.useCache=!0,this._display=i,this._animation=new t.FastAnimation(this),this._slotsZOrderChanged=!1,this._armatureData=null,this.boneList=[],this._boneDic={},this.slotList=[],this._slotDic={},this.slotHasChildArmatureList=[],this._eventList=[],this._delayDispose=!1,this._lockDispose=!1}__extends(i,e);var r=__define,n=i,s=n.prototype;return s.dispose=function(){if(this._delayDispose=!0,this._animation&&!this._lockDispose){this.userData=null,this._animation.dispose();for(var t=this.slotList.length;t--;)this.slotList[t].dispose();for(t=this.boneList.length;t--;)this.boneList[t].dispose();this.slotList.length=0,this.boneList.length=0,this._armatureData=null,this._animation=null,this.slotList=null,this.boneList=null,this._eventList=null}},s.advanceTime=function(t){this._lockDispose=!0,this._animation.advanceTime(t);var e,i,r=0;if(this._animation.animationState.isUseCache())for(this.useCache||(this.useCache=!0),r=this.slotList.length;r--;)i=this.slotList[r],i.updateByCache();else{if(this.useCache)for(this.useCache=!1,r=this.slotList.length;r--;)i=this.slotList[r],i.switchTransformToBackup();for(r=this.boneList.length;r--;)e=this.boneList[r],e.update();for(r=this.slotList.length;r--;)i=this.slotList[r],i._update()}for(r=this.slotHasChildArmatureList.length;r--;){i=this.slotHasChildArmatureList[r];var n=i.childArmature;n&&n.advanceTime(t)}for(this._slotsZOrderChanged&&this.updateSlotsZOrder();this._eventList.length>0;)this.dispatchEvent(this._eventList.shift());this._lockDispose=!1,this._delayDispose&&this.dispose()},s.enableAnimationCache=function(e,i,r){void 0===i&&(i=null),void 0===r&&(r=!0);var n=t.AnimationCacheManager.initWithArmatureData(this.armatureData,e);if(i)for(var s=i.length,a=0;a<s;a++){var o=i[a];n.initAnimationCache(o)}else n.initAllAnimationCache();return n.setCacheGeneratorArmature(this),n.generateAllAnimationCache(r),n.bindCacheUserArmature(this),this.enableCache=!0,n},s.getBone=function(t){return this._boneDic[t]},s.getSlot=function(t){return this._slotDic[t]},s.getBoneByDisplay=function(t){var e=this.getSlotByDisplay(t);return e?e.parent:null},s.getSlotByDisplay=function(t){if(t)for(var e=0,i=this.slotList.length;e<i;e++)if(this.slotList[e].display==t)return this.slotList[e];return null},s.getSlots=function(t){return void 0===t&&(t=!0),t?this.slotList.concat():this.slotList},s._updateBonesByCache=function(){for(var t,e=this.boneList.length;e--;)t=this.boneList[e],t.update()},s.addBone=function(t,e){void 0===e&&(e=null);var i;e&&(i=this.getBone(e),i.boneList.push(t)),t.armature=this,t.setParent(i),this.boneList.unshift(t),this._boneDic[t.name]=t},s.addSlot=function(t,e){var i=this.getBone(e);if(!i)throw new Error;t.armature=this,t.setParent(i),i.slotList.push(t),t._addDisplayToContainer(this.display),this.slotList.push(t),this._slotDic[t.name]=t,t.hasChildArmature&&this.slotHasChildArmatureList.push(t)},s.updateSlotsZOrder=function(){this.slotList.sort(this.sortSlot);for(var t=this.slotList.length;t--;){var e=this.slotList[t];(e._frameCache&&e._frameCache.displayIndex>=0||!e._frameCache&&e.displayIndex>=0)&&e._addDisplayToContainer(this._display)}this._slotsZOrderChanged=!1},s.sortBoneList=function(){var e=this.boneList.length;if(0!=e){for(var i=[];e--;){for(var r=0,n=this.boneList[e],s=n;s;)r++,s=s.parent;i[e]=[r,n]}for(i.sort(t.ArmatureData.sortBoneDataHelpArrayDescending),e=i.length;e--;)this.boneList[e]=i[e][1];i.length=0}},s.arriveAtFrame=function(e,i){if(e.event&&this.hasEventListener(t.FrameEvent.ANIMATION_FRAME_EVENT)){var r=new t.FrameEvent(t.FrameEvent.ANIMATION_FRAME_EVENT);r.animationState=i,r.frameLabel=e.event,this._addEvent(r)}e.action&&this.animation.gotoAndPlay(e.action)},s.invalidUpdate=function(t){if(void 0===t&&(t=null),t){var e=this.getBone(t);e&&e.invalidUpdate()}else for(var i=this.boneList.length;i--;)this.boneList[i].invalidUpdate()},s.resetAnimation=function(){this.animation.animationState._resetTimelineStateList();for(var t=this.boneList.length,e=0;e<t;e++){var i=this.boneList[e];i._timelineState=null}this.animation.stop()},s.sortSlot=function(t,e){return t.zOrder<e.zOrder?1:-1},s.getAnimation=function(){return this._animation},r(s,"armatureData",function(){return this._armatureData}),r(s,"animation",function(){return this._animation}),r(s,"display",function(){return this._display}),r(s,"enableCache",function(){return this._enableCache},function(t){this._enableCache=t}),r(s,"enableEventDispatch",function(){return this._enableEventDispatch},function(t){this._enableEventDispatch=t}),s._addEvent=function(t){this._enableEventDispatch&&this._eventList.push(t)},i}(t.EventDispatcher);t.FastArmature=e,egret.registerClass(e,"dragonBones.FastArmature",["dragonBones.ICacheableArmature","dragonBones.IArmature","dragonBones.IAnimatable"])}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){this._globalTransformMatrix=new t.Matrix,this._global=new t.DBTransform,this._origin=new t.DBTransform,this._visible=!0,this.armature=null,this._parent=null,this.userData=null,this.inheritRotation=!0,this.inheritScale=!0,this.inheritTranslation=!0}var i=__define,r=e,n=r.prototype;return n.updateByCache=function(){this._global=this._frameCache.globalTransform,this._globalTransformMatrix=this._frameCache.globalTransformMatrix},n.switchTransformToBackup=function(){this._globalBackup||(this._globalBackup=new t.DBTransform,this._globalTransformMatrixBackup=new t.Matrix),this._global=this._globalBackup,this._globalTransformMatrix=this._globalTransformMatrixBackup},n.setParent=function(t){this._parent=t},n.dispose=function(){this.userData=null,this._globalTransformMatrix=null,this._global=null,this._origin=null,this.armature=null,this._parent=null},n._calculateParentTransform=function(){if(this.parent&&(this.inheritTranslation||this.inheritRotation||this.inheritScale)){var i=this._parent._global,r=this._parent._globalTransformMatrix;return(this.inheritTranslation||0==i.x&&0==i.y)&&(this.inheritRotation||0==i.skewX&&0==i.skewY)&&(this.inheritScale||1==i.scaleX&&1==i.scaleY)||(i=e._tempParentGlobalTransform,i.copy(this._parent._global),this.inheritTranslation||(i.x=0,i.y=0),this.inheritScale||(i.scaleX=1,i.scaleY=1),this.inheritRotation||(i.skewX=0,i.skewY=0),r=t.DBObject._tempParentGlobalTransformMatrix,t.TransformUtil.transformToMatrix(i,r)),e.tempOutputObj.parentGlobalTransform=i,e.tempOutputObj.parentGlobalTransformMatrix=r,e.tempOutputObj}return null},n._updateGlobal=function(){this._calculateRelativeParentTransform();var e=this._calculateParentTransform();if(null!=e){var i=e.parentGlobalTransformMatrix,r=e.parentGlobalTransform,n=this._global.x,s=this._global.y;this._global.x=i.a*n+i.c*s+i.tx,this._global.y=i.d*s+i.b*n+i.ty,this.inheritRotation&&(this._global.skewX+=r.skewX,this._global.skewY+=r.skewY),this.inheritScale&&(this._global.scaleX*=r.scaleX,this._global.scaleY*=r.scaleY)}return t.TransformUtil.transformToMatrix(this._global,this._globalTransformMatrix,!0),e},n._calculateRelativeParentTransform=function(){},i(n,"name",function(){return this._name},function(t){this._name=t}),i(n,"global",function(){return this._global}),i(n,"globalTransformMatrix",function(){return this._globalTransformMatrix}),i(n,"origin",function(){return this._origin}),i(n,"parent",function(){return this._parent}),i(n,"visible",function(){return this._visible},function(t){this._visible=t}),i(n,"frameCache",void 0,function(t){this._frameCache=t}),e._tempParentGlobalTransform=new t.DBTransform,e.tempOutputObj={},e}();t.FastDBObject=e,egret.registerClass(e,"dragonBones.FastDBObject")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(e){function i(){e.call(this),this.slotList=[],this.boneList=[],this._needUpdate=0,this._needUpdate=2,this._tweenPivot=new t.Point}__extends(i,e);var r=__define,n=i,s=n.prototype;return i.initWithBoneData=function(t){var e=new i;return e.name=t.name,e.inheritRotation=t.inheritRotation,e.inheritScale=t.inheritScale,e.origin.copy(t.transform),e},s.getBones=function(t){return void 0===t&&(t=!0),t?this.boneList.concat():this.boneList},s.getSlots=function(t){return void 0===t&&(t=!0),t?this.slotList.concat():this.slotList},s.dispose=function(){e.prototype.dispose.call(this),this._timelineState=null,this._tweenPivot=null},s.invalidUpdate=function(){this._needUpdate=2},s._calculateRelativeParentTransform=function(){this._global.copy(this._origin),this._timelineState&&this._global.add(this._timelineState._transform)},s.updateByCache=function(){e.prototype.updateByCache.call(this),this._global=this._frameCache.globalTransform,this._globalTransformMatrix=this._frameCache.globalTransformMatrix},s.update=function(t){void 0===t&&(t=!1),this._needUpdate--,(t||this._needUpdate>0||this._parent&&this._parent._needUpdate>0)&&(this._needUpdate=1,this.blendingTimeline(),this._updateGlobal())},s._hideSlots=function(){for(var t=this.slotList.length,e=0;e<t;e++){var i=this.slotList[e];i.hideSlots()}},s.blendingTimeline=function(){this._timelineState&&(this._tweenPivot.x=this._timelineState._pivot.x,this._tweenPivot.y=this._timelineState._pivot.y)},s.arriveAtFrame=function(e,i){if(e.event&&this.armature.hasEventListener(t.FrameEvent.BONE_FRAME_EVENT)){var r=new t.FrameEvent(t.FrameEvent.BONE_FRAME_EVENT);r.bone=this,r.animationState=i,r.frameLabel=e.event,this.armature._addEvent(r)}},r(s,"childArmature",function(){var t=this.slot;return t?t.childArmature:null}),r(s,"display",function(){var t=this.slot;return t?t.display:null},function(t){var e=this.slot;e&&(e.display=t)}),r(s,"visible",void 0,function(t){if(this._visible!=t){this._visible=t;for(var e=0,i=this.armature.slotList.length;e<i;e++)this.armature.slotList[e].parent==this&&this.armature.slotList[e]._updateDisplayVisible(this._visible)}}),r(s,"slot",function(){return this.slotList.length>0?this.slotList[0]:null}),i}(t.FastDBObject);t.FastBone=e,egret.registerClass(e,"dragonBones.FastBone")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(e){function i(i){if(e.call(this),this._currentDisplayIndex=0,i!=this)throw new Error("Abstract class can not be instantiated!");this.hasChildArmature=!1,this._currentDisplayIndex=-1,this._originZOrder=0,this._tweenZOrder=0,this._offsetZOrder=0,this._colorTransform=new t.ColorTransform,this._isColorChanged=!1,this._displayDataList=null,this._currentDisplay=null,this.inheritRotation=!0,this.inheritScale=!0}__extends(i,e);var r=__define,n=i,s=n.prototype;return s.initWithSlotData=function(t){this.name=t.name,this.blendMode=t.blendMode,this._originZOrder=t.zOrder,this._displayDataList=t.displayDataList,this._originDisplayIndex=t.displayIndex},s.dispose=function(){this._displayList&&(e.prototype.dispose.call(this),this._displayDataList=null,this._displayList=null,this._currentDisplay=null)},s.updateByCache=function(){e.prototype.updateByCache.call(this),this._updateTransform();var i=this._frameCache.colorTransform,r=null!=i;(this.colorChanged!=r||this.colorChanged&&r&&!t.ColorTransformUtil.isEqual(this._colorTransform,i))&&(i=i||t.ColorTransformUtil.originalColor,this._updateDisplayColor(i.alphaOffset,i.redOffset,i.greenOffset,i.blueOffset,i.alphaMultiplier,i.redMultiplier,i.greenMultiplier,i.blueMultiplier,r)),this._changeDisplayIndex(this._frameCache.displayIndex)},s._update=function(){this._parent._needUpdate<=0||(this._updateGlobal(),this._updateTransform())},s._calculateRelativeParentTransform=function(){this._global.copy(this._origin),this._global.x+=this._parent._tweenPivot.x,this._global.y+=this._parent._tweenPivot.y},s.initDisplayList=function(t){this._displayList=t},s.clearCurrentDisplay=function(){if(this.hasChildArmature){var t=this.childArmature;t&&t.resetAnimation()}var e=this._getDisplayIndex();return this._removeDisplayFromContainer(),e},s._changeDisplayIndex=function(t){if(void 0===t&&(t=0),this._currentDisplayIndex!=t){var e=-1;this._currentDisplayIndex>=0&&(e=this.clearCurrentDisplay()),this._currentDisplayIndex=t,this._currentDisplayIndex>=0&&(this._origin.copy(this._displayDataList[this._currentDisplayIndex].transform),this.initCurrentDisplay(e))}},s.changeSlotDisplay=function(t){var e=this.clearCurrentDisplay();this._displayList[this._currentDisplayIndex]=t,this.initCurrentDisplay(e)},s.initCurrentDisplay=function(e){void 0===e&&(e=0);var i=this._displayList[this._currentDisplayIndex];if(i?i instanceof t.FastArmature?this._currentDisplay=i.display:this._currentDisplay=i:this._currentDisplay=null,this._updateDisplay(this._currentDisplay),this._currentDisplay&&(e!=-1?this._addDisplayToContainer(this.armature.display,e):(this.armature._slotsZOrderChanged=!0,this._addDisplayToContainer(this.armature.display)),this._blendMode&&this._updateDisplayBlendMode(this._blendMode),this._isColorChanged&&this._updateDisplayColor(this._colorTransform.alphaOffset,this._colorTransform.redOffset,this._colorTransform.greenOffset,this._colorTransform.blueOffset,this._colorTransform.alphaMultiplier,this._colorTransform.redMultiplier,this._colorTransform.greenMultiplier,this._colorTransform.blueMultiplier,!0),this._updateTransform(),i instanceof t.FastArmature)){var r=i;this.armature&&this.armature.animation.animationState&&r.animation.hasAnimation(this.armature.animation.animationState.name)?r.animation.gotoAndPlay(this.armature.animation.animationState.name):r.animation.play()}},r(s,"visible",void 0,function(t){this._visible!=t&&(this._visible=t,this._updateDisplayVisible(this._visible))}),r(s,"displayList",function(){return this._displayList},function(t){if(!t)throw new Error;var e=t[this._currentDisplayIndex],i=this._currentDisplayIndex>=0&&this._displayList[this._currentDisplayIndex]!=e;this._displayList=t,i&&this.changeSlotDisplay(e)}),r(s,"display",function(){return this._currentDisplay},function(t){this._currentDisplayIndex<0||this._displayList[this._currentDisplayIndex]!=t&&this.changeSlotDisplay(t)}),r(s,"childArmature",function(){return this._displayList[this._currentDisplayIndex]instanceof t.Armature||this._displayList[this._currentDisplayIndex]instanceof t.FastArmature?this._displayList[this._currentDisplayIndex]:null},function(t){this.display=t}),r(s,"zOrder",function(){return this._originZOrder+this._tweenZOrder+this._offsetZOrder},function(t){this.zOrder!=t&&(this._offsetZOrder=t-this._originZOrder-this._tweenZOrder,this.armature&&(this.armature._slotsZOrderChanged=!0))}),r(s,"blendMode",function(){return this._blendMode},function(t){this._blendMode!=t&&(this._blendMode=t,this._updateDisplayBlendMode(this._blendMode))}),r(s,"colorTransform",function(){return this._colorTransform}),r(s,"displayIndex",function(){return this._currentDisplayIndex}),r(s,"colorChanged",function(){return this._isColorChanged}),s._updateDisplay=function(t){throw new Error("Abstract method needs to be implemented in subclass!")},s._getDisplayIndex=function(){throw new Error("Abstract method needs to be implemented in subclass!")},s._addDisplayToContainer=function(t,e){throw void 0===e&&(e=-1),new Error("Abstract method needs to be implemented in subclass!")},s._removeDisplayFromContainer=function(){throw new Error("Abstract method needs to be implemented in subclass!")},s._updateTransform=function(){throw new Error("Abstract method needs to be implemented in subclass!")},s._updateDisplayVisible=function(t){throw new Error("Abstract method needs to be implemented in subclass!")},s._updateDisplayColor=function(t,e,i,r,n,s,a,o,l){void 0===l&&(l=!1),this._colorTransform.alphaOffset=t,this._colorTransform.redOffset=e,this._colorTransform.greenOffset=i,this._colorTransform.blueOffset=r,this._colorTransform.alphaMultiplier=n,this._colorTransform.redMultiplier=s,this._colorTransform.greenMultiplier=a,this._colorTransform.blueMultiplier=o,this._isColorChanged=l},s._updateDisplayBlendMode=function(t){throw new Error("Abstract method needs to be implemented in subclass!")},s._arriveAtFrame=function(t,e){var i=t,r=i.displayIndex;if(this._changeDisplayIndex(r),this._updateDisplayVisible(i.visible),r>=0&&(isNaN(i.zOrder)||i.zOrder==this._tweenZOrder||(this._tweenZOrder=i.zOrder,this.armature._slotsZOrderChanged=!0)),t.action){var n=this.childArmature;n&&n.getAnimation().gotoAndPlay(t.action)}},s.hideSlots=function(){this._changeDisplayIndex(-1),this._removeDisplayFromContainer(),this._frameCache&&this._frameCache.clear()},s._updateGlobal=function(){this._calculateRelativeParentTransform(),t.TransformUtil.transformToMatrix(this._global,this._globalTransformMatrix,!0);var e=this._calculateParentTransform();return e&&(this._globalTransformMatrix.concat(e.parentGlobalTransformMatrix),t.TransformUtil.matrixToTransform(this._globalTransformMatrix,this._global,this._global.scaleX*e.parentGlobalTransform.scaleX>=0,this._global.scaleY*e.parentGlobalTransform.scaleY>=0)),e},s._resetToOrigin=function(){this._changeDisplayIndex(this._originDisplayIndex),this._updateDisplayColor(0,0,0,0,1,1,1,1,!0)},i}(t.FastDBObject);t.FastSlot=e,egret.registerClass(e,"dragonBones.FastSlot",["dragonBones.ISlotCacheGenerator","dragonBones.ICacheUser"])}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e}var e=(__define,t),i=e.prototype;return i.toString=function(){return"[Point (x="+this.x+" y="+this.y+")]"},t}();t.Point=e,egret.registerClass(e,"dragonBones.Point")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(t,e,i,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===r&&(r=0),this.x=t,this.y=e,this.width=i,this.height=r}var e=(__define,t);e.prototype;return t}();t.Rectangle=e,egret.registerClass(e,"dragonBones.Rectangle")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){}var i=(__define,e);i.prototype;return e.parseDragonBonesData=function(i){if(!i)throw new Error;var r=i[t.ConstValues.A_VERSION];if(r=r.toString(),r.toString()!=t.DragonBones.DATA_VERSION&&r.toString()!=t.DragonBones.PARENT_COORDINATE_DATA_VERSION&&"2.3"!=r.toString())throw new Error("Nonsupport version!");var n=e.getNumber(i,t.ConstValues.A_FRAME_RATE,0)||0,s=new t.DragonBonesData;s.name=i[t.ConstValues.A_NAME],s.isGlobal="0"!=i[t.ConstValues.A_IS_GLOBAL],e.tempDragonBonesData=s;for(var a=i[t.ConstValues.ARMATURE],o=0,l=a.length;o<l;o++){var h=a[o];s.addArmatureData(e.parseArmatureData(h,n))}return e.tempDragonBonesData=null,s},e.parseArmatureData=function(i,r){var n=new t.ArmatureData;n.name=i[t.ConstValues.A_NAME];var s,a,o=i[t.ConstValues.BONE];for(s=0,a=o.length;s<a;s++){var l=o[s];n.addBoneData(e.parseBoneData(l))}var h=i[t.ConstValues.SKIN];for(s=0,a=h.length;s<a;s++)for(var u=h[s],c=u[t.ConstValues.SLOT],d=0,f=c.length;d<f;d++){var p=c[d];n.addSlotData(e.parseSlotData(p))}for(s=0,a=h.length;s<a;s++){var _=h[s];n.addSkinData(e.parseSkinData(_))}e.tempDragonBonesData.isGlobal&&t.DBDataUtil.transformArmatureData(n),n.sortBoneDataList();var m=i[t.ConstValues.ANIMATION];for(s=0,a=m.length;s<a;s++){var g=m[s],v=e.parseAnimationData(g,r);t.DBDataUtil.addHideTimeline(v,n),t.DBDataUtil.transformAnimationData(v,n,e.tempDragonBonesData.isGlobal),n.addAnimationData(v)}return n},e.parseBoneData=function(i){var r=new t.BoneData;return r.name=i[t.ConstValues.A_NAME],r.parent=i[t.ConstValues.A_PARENT],r.length=Number(i[t.ConstValues.A_LENGTH])||0,r.inheritRotation=e.getBoolean(i,t.ConstValues.A_INHERIT_ROTATION,!0),r.inheritScale=e.getBoolean(i,t.ConstValues.A_INHERIT_SCALE,!0),e.parseTransform(i[t.ConstValues.TRANSFORM],r.transform),e.tempDragonBonesData.isGlobal&&r.global.copy(r.transform),r},e.parseSkinData=function(i){var r=new t.SkinData;r.name=i[t.ConstValues.A_NAME];for(var n=i[t.ConstValues.SLOT],s=0,a=n.length;s<a;s++){var o=n[s];r.addSlotData(e.parseSkinSlotData(o))}return r},e.parseSkinSlotData=function(i){var r=new t.SlotData;r.name=i[t.ConstValues.A_NAME],r.parent=i[t.ConstValues.A_PARENT],r.zOrder=i[t.ConstValues.A_Z_ORDER],r.zOrder=e.getNumber(i,t.ConstValues.A_Z_ORDER,0)||0,r.blendMode=i[t.ConstValues.A_BLENDMODE];var n=i[t.ConstValues.DISPLAY];if(n)for(var s=0,a=n.length;s<a;s++){var o=n[s];r.addDisplayData(e.parseDisplayData(o))}return r},e.parseSlotData=function(i){var r=new t.SlotData;return r.name=i[t.ConstValues.A_NAME],r.parent=i[t.ConstValues.A_PARENT],r.zOrder=i[t.ConstValues.A_Z_ORDER],r.zOrder=e.getNumber(i,t.ConstValues.A_Z_ORDER,0)||0,r.blendMode=i[t.ConstValues.A_BLENDMODE],r.displayIndex=0,r},e.parseDisplayData=function(i){var r=new t.DisplayData;return r.name=i[t.ConstValues.A_NAME],r.type=i[t.ConstValues.A_TYPE],e.parseTransform(i[t.ConstValues.TRANSFORM],r.transform,r.pivot),null!=e.tempDragonBonesData&&e.tempDragonBonesData.addDisplayData(r),r},e.parseAnimationData=function(i,r){var n=new t.AnimationData;n.name=i[t.ConstValues.A_NAME],n.frameRate=r,n.duration=Math.round(1e3*(e.getNumber(i,t.ConstValues.A_DURATION,1)||1)/r),n.playTimes=e.getNumber(i,t.ConstValues.A_LOOP,1),n.playTimes=NaN!=n.playTimes?n.playTimes:1,n.fadeTime=e.getNumber(i,t.ConstValues.A_FADE_IN_TIME,0)||0,n.scale=e.getNumber(i,t.ConstValues.A_SCALE,1)||0,n.tweenEasing=e.getNumber(i,t.ConstValues.A_TWEEN_EASING,NaN),n.autoTween=e.getBoolean(i,t.ConstValues.A_AUTO_TWEEN,!0);var s=i[t.ConstValues.FRAME],a=0,o=0;if(s)for(a=0,o=s.length;a<o;a++){var l=s[a],h=e.parseTransformFrame(l,null,r);n.addFrame(h)}e.parseTimeline(i,n);var u,c=n.duration,d=i[t.ConstValues.TIMELINE];if(d){for(a=0,o=d.length;a<o;a++){var f=d[a],p=e.parseTransformTimeline(f,n.duration,r);p=e.parseTransformTimeline(f,n.duration,r),c=Math.min(c,p.frameList[p.frameList.length-1].duration),n.addTimeline(p);var _=e.parseSlotTimeline(f,n.duration,r);if(n.addSlotTimeline(_),n.autoTween&&!u)for(var m,g=0,v=_.frameList.length;g<v;g++)if(m=_.frameList[g],m&&m.displayIndex<0){u=!0;break}}var y=n.tweenEasing;if(u){for(o=n.slotTimelineList.length,a=0;a<o;a++){_=n.slotTimelineList[a],p=n.timelineList[a];var T,b,x;for(g=0,v=_.frameList.length;g<v;g++)b=_.frameList[g],T=p.frameList[g],x=g==v-1?_.frameList[0]:_.frameList[g+1],b.displayIndex<0||x.displayIndex<0?T.tweenEasing=b.tweenEasing=NaN:10==y?T.tweenEasing=b.tweenEasing=0:isNaN(y)?10==T.tweenEasing&&(T.tweenEasing=0):T.tweenEasing=b.tweenEasing=y}n.autoTween=!1}}return n.frameList.length>0&&(c=Math.min(c,n.frameList[n.frameList.length-1].duration)),n.lastFrameDuration=c,n},e.parseSlotTimeline=function(i,r,n){var s=new t.SlotTimeline;s.name=i[t.ConstValues.A_NAME],s.scale=e.getNumber(i,t.ConstValues.A_SCALE,1)||0,s.offset=e.getNumber(i,t.ConstValues.A_OFFSET,0)||0,s.duration=r;for(var a=i[t.ConstValues.FRAME],o=0,l=a.length;o<l;o++){var h=a[o],u=e.parseSlotFrame(h,n);s.addFrame(u)}return e.parseTimeline(i,s),s},e.parseSlotFrame=function(i,r){var n=new t.SlotFrame;e.parseFrame(i,n,r),n.visible=!e.getBoolean(i,t.ConstValues.A_HIDE,!1),n.tweenEasing=e.getNumber(i,t.ConstValues.A_TWEEN_EASING,10),n.displayIndex=Math.floor(e.getNumber(i,t.ConstValues.A_DISPLAY_INDEX,0)||0),n.zOrder=e.getNumber(i,t.ConstValues.A_Z_ORDER,e.tempDragonBonesData.isGlobal?NaN:0);var s=i[t.ConstValues.COLOR_TRANSFORM];return s&&(n.color=new t.ColorTransform,e.parseColorTransform(s,n.color)),n},e.parseTransformTimeline=function(i,r,n){var s=new t.TransformTimeline;s.name=i[t.ConstValues.A_NAME],s.scale=e.getNumber(i,t.ConstValues.A_SCALE,1)||0,s.offset=e.getNumber(i,t.ConstValues.A_OFFSET,0)||0,s.originPivot.x=e.getNumber(i,t.ConstValues.A_PIVOT_X,0)||0,s.originPivot.y=e.getNumber(i,t.ConstValues.A_PIVOT_Y,0)||0,s.duration=r;for(var a,o=i[t.ConstValues.FRAME],l=0,h=o.length;l<h;l++){var u=o[l];a=l<h-1?o[l+1]:0!=l?o[0]:null;var c=e.parseTransformFrame(u,a,n);s.addFrame(c)}return e.parseTimeline(i,s),s},e.parseTransformFrame=function(i,r,n){var s=new t.TransformFrame;return e.parseFrame(i,s,n),s.visible=!e.getBoolean(i,t.ConstValues.A_HIDE,!1),s.tweenEasing=e.getNumber(i,t.ConstValues.A_TWEEN_EASING,10),s.tweenRotate=Math.floor(e.getNumber(i,t.ConstValues.A_TWEEN_ROTATE,0)||0),s.tweenScale=e.getBoolean(i,t.ConstValues.A_TWEEN_SCALE,!0),r&&Math.floor(e.getNumber(r,t.ConstValues.A_DISPLAY_INDEX,0)||0)==-1&&(s.tweenEasing=NaN),e.parseTransform(i[t.ConstValues.TRANSFORM],s.transform,s.pivot),e.tempDragonBonesData.isGlobal&&s.global.copy(s.transform),s.scaleOffset.x=e.getNumber(i,t.ConstValues.A_SCALE_X_OFFSET,0)||0,s.scaleOffset.y=e.getNumber(i,t.ConstValues.A_SCALE_Y_OFFSET,0)||0,s},e.parseTimeline=function(t,e){for(var i,r=0,n=e.frameList,s=0,a=n.length;s<a;s++)i=n[s],i.position=r,r+=i.duration;i&&(i.duration=e.duration-i.position)},e.parseFrame=function(e,i,r){void 0===r&&(r=0),i.duration=Math.round(1e3*(e[t.ConstValues.A_DURATION]||1)/r),i.action=e[t.ConstValues.A_ACTION],i.event=e[t.ConstValues.A_EVENT],i.sound=e[t.ConstValues.A_SOUND]},e.parseTransform=function(i,r,n){void 0===n&&(n=null),i&&(r&&(r.x=e.getNumber(i,t.ConstValues.A_X,0)||0,r.y=e.getNumber(i,t.ConstValues.A_Y,0)||0,r.skewX=e.getNumber(i,t.ConstValues.A_SKEW_X,0)*t.ConstValues.ANGLE_TO_RADIAN||0,r.skewY=e.getNumber(i,t.ConstValues.A_SKEW_Y,0)*t.ConstValues.ANGLE_TO_RADIAN||0,r.scaleX=e.getNumber(i,t.ConstValues.A_SCALE_X,1)||0,r.scaleY=e.getNumber(i,t.ConstValues.A_SCALE_Y,1)||0),n&&(n.x=e.getNumber(i,t.ConstValues.A_PIVOT_X,0)||0,n.y=e.getNumber(i,t.ConstValues.A_PIVOT_Y,0)||0))},e.parseColorTransform=function(i,r){i&&r&&(r.alphaOffset=e.getNumber(i,t.ConstValues.A_ALPHA_OFFSET,0),r.redOffset=e.getNumber(i,t.ConstValues.A_RED_OFFSET,0),r.greenOffset=e.getNumber(i,t.ConstValues.A_GREEN_OFFSET,0),r.blueOffset=e.getNumber(i,t.ConstValues.A_BLUE_OFFSET,0),r.alphaMultiplier=.01*e.getNumber(i,t.ConstValues.A_ALPHA_MULTIPLIER,100),r.redMultiplier=.01*e.getNumber(i,t.ConstValues.A_RED_MULTIPLIER,100),r.greenMultiplier=.01*e.getNumber(i,t.ConstValues.A_GREEN_MULTIPLIER,100),r.blueMultiplier=.01*e.getNumber(i,t.ConstValues.A_BLUE_MULTIPLIER,100))},e.getBoolean=function(t,e,i){if(t&&e in t)switch(String(t[e])){case"0":case"NaN":case"":case"false":case"null":case"undefined": return!1;case"1":case"true":default:return!0}return i},e.getNumber=function(t,e,i){if(t&&e in t)switch(String(t[e])){case"NaN":case"":case"false":case"null":case"undefined":return NaN;default:return Number(t[e])}return i},e}();t.Data3Parser=e,egret.registerClass(e,"dragonBones.Data3Parser")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){}var i=(__define,e);i.prototype;return e.parseTextureAtlasData=function(i,r){void 0===r&&(r=1);for(var n,s={},a=i[t.ConstValues.SUB_TEXTURE],o=0,l=a.length;o<l;o++){var h=a[o],u=h[t.ConstValues.A_NAME],c=new t.Rectangle;c.x=e.getNumber(h,t.ConstValues.A_X,0)/r,c.y=e.getNumber(h,t.ConstValues.A_Y,0)/r,c.width=e.getNumber(h,t.ConstValues.A_WIDTH,0)/r,c.height=e.getNumber(h,t.ConstValues.A_HEIGHT,0)/r;var d="true"==h[t.ConstValues.A_ROTATED],f=e.getNumber(h,t.ConstValues.A_FRAME_WIDTH,0)/r,p=e.getNumber(h,t.ConstValues.A_FRAME_HEIGHT,0)/r;f>0&&p>0?(n=new t.Rectangle,n.x=e.getNumber(h,t.ConstValues.A_FRAME_X,0)/r,n.y=e.getNumber(h,t.ConstValues.A_FRAME_Y,0)/r,n.width=f,n.height=p):n=null,s[u]=new t.TextureData(c,n,d)}return s},e.parseDragonBonesData=function(i){if(!i)throw new Error;var r=i[t.ConstValues.A_VERSION];if(r=r.toString(),r.toString()==t.DragonBones.PARENT_COORDINATE_DATA_VERSION||"2.3"==r.toString())return t.Data3Parser.parseDragonBonesData(i);var n=e.getNumber(i,t.ConstValues.A_FRAME_RATE,0)||0,s=new t.DragonBonesData;s.name=i[t.ConstValues.A_NAME],s.isGlobal="0"!=i[t.ConstValues.A_IS_GLOBAL],e.tempDragonBonesData=s;for(var a=i[t.ConstValues.ARMATURE],o=0,l=a.length;o<l;o++){var h=a[o];s.addArmatureData(e.parseArmatureData(h,n))}return e.tempDragonBonesData=null,s},e.parseArmatureData=function(i,r){var n=new t.ArmatureData;n.name=i[t.ConstValues.A_NAME];var s,a,o=i[t.ConstValues.BONE];for(s=0,a=o.length;s<a;s++){var l=o[s];n.addBoneData(e.parseBoneData(l))}var h=i[t.ConstValues.SLOT];for(s=0,a=h.length;s<a;s++){var u=h[s];n.addSlotData(e.parseSlotData(u))}var c=i[t.ConstValues.SKIN];for(s=0,a=c.length;s<a;s++){var d=c[s];n.addSkinData(e.parseSkinData(d))}e.tempDragonBonesData.isGlobal&&t.DBDataUtil.transformArmatureData(n),n.sortBoneDataList();var f=i[t.ConstValues.ANIMATION];for(s=0,a=f.length;s<a;s++){var p=f[s],_=e.parseAnimationData(p,r);t.DBDataUtil.addHideTimeline(_,n,!0),t.DBDataUtil.transformAnimationData(_,n,e.tempDragonBonesData.isGlobal),n.addAnimationData(_)}return n},e.parseBoneData=function(i){var r=new t.BoneData;return r.name=i[t.ConstValues.A_NAME],r.parent=i[t.ConstValues.A_PARENT],r.length=Number(i[t.ConstValues.A_LENGTH])||0,r.inheritRotation=e.getBoolean(i,t.ConstValues.A_INHERIT_ROTATION,!0),r.inheritScale=e.getBoolean(i,t.ConstValues.A_INHERIT_SCALE,!0),e.parseTransform(i[t.ConstValues.TRANSFORM],r.transform),e.tempDragonBonesData.isGlobal&&r.global.copy(r.transform),r},e.parseSkinData=function(i){var r=new t.SkinData;r.name=i[t.ConstValues.A_NAME];for(var n=i[t.ConstValues.SLOT],s=0,a=n.length;s<a;s++){var o=n[s];r.addSlotData(e.parseSlotDisplayData(o))}return r},e.parseSlotData=function(i){var r=new t.SlotData;return r.name=i[t.ConstValues.A_NAME],r.parent=i[t.ConstValues.A_PARENT],r.zOrder=e.getNumber(i,t.ConstValues.A_Z_ORDER,0)||0,r.displayIndex=e.getNumber(i,t.ConstValues.A_DISPLAY_INDEX,0),r.blendMode=i[t.ConstValues.A_BLENDMODE],r},e.parseSlotDisplayData=function(i){var r=new t.SlotData;r.name=i[t.ConstValues.A_NAME],r.parent=i[t.ConstValues.A_PARENT],r.zOrder=e.getNumber(i,t.ConstValues.A_Z_ORDER,0)||0;var n=i[t.ConstValues.DISPLAY];if(n)for(var s=0,a=n.length;s<a;s++){var o=n[s];r.addDisplayData(e.parseDisplayData(o))}return r},e.parseDisplayData=function(i){var r=new t.DisplayData;return r.name=i[t.ConstValues.A_NAME],r.type=i[t.ConstValues.A_TYPE],e.parseTransform(i[t.ConstValues.TRANSFORM],r.transform,r.pivot),r.pivot.x=NaN,r.pivot.y=NaN,null!=e.tempDragonBonesData&&e.tempDragonBonesData.addDisplayData(r),r},e.parseAnimationData=function(i,r){var n=new t.AnimationData;n.name=i[t.ConstValues.A_NAME],n.frameRate=r,n.duration=Math.ceil(1e3*(e.getNumber(i,t.ConstValues.A_DURATION,1)||1)/r),n.playTimes=e.getNumber(i,t.ConstValues.A_PLAY_TIMES,1),n.playTimes=NaN!=n.playTimes?n.playTimes:1,n.fadeTime=e.getNumber(i,t.ConstValues.A_FADE_IN_TIME,0)||0,n.scale=e.getNumber(i,t.ConstValues.A_SCALE,1)||0,n.tweenEasing=e.getNumber(i,t.ConstValues.A_TWEEN_EASING,NaN),n.autoTween=e.getBoolean(i,t.ConstValues.A_AUTO_TWEEN,!0);var s=i[t.ConstValues.FRAME],a=0,o=0;if(s)for(a=0,o=s.length;a<o;a++){var l=s[a],h=e.parseTransformFrame(l,r);n.addFrame(h)}e.parseTimeline(i,n);var u=n.duration,c=i[t.ConstValues.BONE];if(c)for(a=0,o=c.length;a<o;a++){var d=c[a];if(d){var f=e.parseTransformTimeline(d,n.duration,r);f.frameList.length>0&&(u=Math.min(u,f.frameList[f.frameList.length-1].duration)),n.addTimeline(f)}}var p=i[t.ConstValues.SLOT];if(p)for(a=0,o=p.length;a<o;a++){var _=p[a];if(_){var m=e.parseSlotTimeline(_,n.duration,r);m.frameList.length>0&&(u=Math.min(u,m.frameList[m.frameList.length-1].duration),n.addSlotTimeline(m))}}return n.frameList.length>0&&(u=Math.min(u,n.frameList[n.frameList.length-1].duration)),n.lastFrameDuration=u,n},e.parseTransformTimeline=function(i,r,n){var s=new t.TransformTimeline;s.name=i[t.ConstValues.A_NAME],s.scale=e.getNumber(i,t.ConstValues.A_SCALE,1)||0,s.offset=e.getNumber(i,t.ConstValues.A_OFFSET,0)||0,s.originPivot.x=e.getNumber(i,t.ConstValues.A_PIVOT_X,0)||0,s.originPivot.y=e.getNumber(i,t.ConstValues.A_PIVOT_Y,0)||0,s.duration=r;for(var a=i[t.ConstValues.FRAME],o=0,l=a.length;o<l;o++){var h=a[o],u=e.parseTransformFrame(h,n);s.addFrame(u)}return e.parseTimeline(i,s),s},e.parseSlotTimeline=function(i,r,n){var s=new t.SlotTimeline;s.name=i[t.ConstValues.A_NAME],s.scale=e.getNumber(i,t.ConstValues.A_SCALE,1)||0,s.offset=e.getNumber(i,t.ConstValues.A_OFFSET,0)||0,s.duration=r;for(var a=i[t.ConstValues.FRAME],o=0,l=a.length;o<l;o++){var h=a[o],u=e.parseSlotFrame(h,n);s.addFrame(u)}return e.parseTimeline(i,s),s},e.parseTransformFrame=function(i,r){var n=new t.TransformFrame;return e.parseFrame(i,n,r),n.visible=!e.getBoolean(i,t.ConstValues.A_HIDE,!1),n.tweenEasing=e.getNumber(i,t.ConstValues.A_TWEEN_EASING,10),n.tweenRotate=Math.floor(e.getNumber(i,t.ConstValues.A_TWEEN_ROTATE,0)||0),n.tweenScale=e.getBoolean(i,t.ConstValues.A_TWEEN_SCALE,!0),n.displayIndex=Math.floor(e.getNumber(i,t.ConstValues.A_DISPLAY_INDEX,0)||0),e.parseTransform(i[t.ConstValues.TRANSFORM],n.transform,n.pivot),e.tempDragonBonesData.isGlobal&&n.global.copy(n.transform),n.scaleOffset.x=e.getNumber(i,t.ConstValues.A_SCALE_X_OFFSET,0)||0,n.scaleOffset.y=e.getNumber(i,t.ConstValues.A_SCALE_Y_OFFSET,0)||0,n},e.parseSlotFrame=function(i,r){var n=new t.SlotFrame;e.parseFrame(i,n,r),n.visible=!e.getBoolean(i,t.ConstValues.A_HIDE,!1),n.tweenEasing=e.getNumber(i,t.ConstValues.A_TWEEN_EASING,10),n.displayIndex=Math.floor(e.getNumber(i,t.ConstValues.A_DISPLAY_INDEX,0)||0),n.zOrder=e.getNumber(i,t.ConstValues.A_Z_ORDER,e.tempDragonBonesData.isGlobal?NaN:0);var s=i[t.ConstValues.COLOR];return s&&(n.color=new t.ColorTransform,e.parseColorTransform(s,n.color)),n},e.parseTimeline=function(t,e){for(var i,r=0,n=e.frameList,s=0,a=n.length;s<a;s++)i=n[s],i.position=r,r+=i.duration;i&&(i.duration=e.duration-i.position)},e.parseFrame=function(e,i,r){void 0===r&&(r=0),i.duration=Math.round(1e3*(e[t.ConstValues.A_DURATION]||1)/r),i.action=e[t.ConstValues.A_ACTION],i.event=e[t.ConstValues.A_EVENT],i.sound=e[t.ConstValues.A_SOUND];var n=e[t.ConstValues.A_CURVE];null!=n&&4==n.length&&(i.curve=new t.CurveData,i.curve.pointList=[new t.Point(n[0],n[1]),new t.Point(n[2],n[3])])},e.parseTransform=function(i,r,n){void 0===n&&(n=null),i&&(r&&(r.x=e.getNumber(i,t.ConstValues.A_X,0)||0,r.y=e.getNumber(i,t.ConstValues.A_Y,0)||0,r.skewX=e.getNumber(i,t.ConstValues.A_SKEW_X,0)*t.ConstValues.ANGLE_TO_RADIAN||0,r.skewY=e.getNumber(i,t.ConstValues.A_SKEW_Y,0)*t.ConstValues.ANGLE_TO_RADIAN||0,r.scaleX=e.getNumber(i,t.ConstValues.A_SCALE_X,1)||0,r.scaleY=e.getNumber(i,t.ConstValues.A_SCALE_Y,1)||0),n&&(n.x=e.getNumber(i,t.ConstValues.A_PIVOT_X,0)||0,n.y=e.getNumber(i,t.ConstValues.A_PIVOT_Y,0)||0))},e.parseColorTransform=function(i,r){r&&(r.alphaOffset=e.getNumber(i,t.ConstValues.A_ALPHA_OFFSET,0),r.redOffset=e.getNumber(i,t.ConstValues.A_RED_OFFSET,0),r.greenOffset=e.getNumber(i,t.ConstValues.A_GREEN_OFFSET,0),r.blueOffset=e.getNumber(i,t.ConstValues.A_BLUE_OFFSET,0),r.alphaMultiplier=.01*e.getNumber(i,t.ConstValues.A_ALPHA_MULTIPLIER,100),r.redMultiplier=.01*e.getNumber(i,t.ConstValues.A_RED_MULTIPLIER,100),r.greenMultiplier=.01*e.getNumber(i,t.ConstValues.A_GREEN_MULTIPLIER,100),r.blueMultiplier=.01*e.getNumber(i,t.ConstValues.A_BLUE_MULTIPLIER,100))},e.getBoolean=function(t,e,i){if(t&&e in t)switch(String(t[e])){case"0":case"NaN":case"":case"false":case"null":case"undefined":return!1;case"1":case"true":default:return!0}return i},e.getNumber=function(t,e,i){if(t&&e in t)switch(String(t[e])){case"NaN":case"":case"false":case"null":case"undefined":return NaN;default:return Number(t[e])}return i},e}();t.DataParser=e,egret.registerClass(e,"dragonBones.DataParser")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(){this.duration=0,this._frameList=[],this.duration=0,this.scale=1}var e=__define,i=t,r=i.prototype;return r.dispose=function(){for(var t=this._frameList.length;t--;)this._frameList[t].dispose();this._frameList=null},r.addFrame=function(t){if(!t)throw new Error;if(!(this._frameList.indexOf(t)<0))throw new Error;this._frameList[this._frameList.length]=t},e(r,"frameList",function(){return this._frameList}),t}();t.Timeline=e,egret.registerClass(e,"dragonBones.Timeline")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(t){function e(){t.call(this),this.frameRate=0,this.playTimes=0,this.lastFrameDuration=0,this.fadeTime=0,this.playTimes=0,this.autoTween=!0,this.tweenEasing=NaN,this.hideTimelineNameMap=[],this.hideSlotTimelineNameMap=[],this._timelineList=[],this._slotTimelineList=[]}__extends(e,t);var i=__define,r=e,n=r.prototype;return i(n,"timelineList",function(){return this._timelineList}),i(n,"slotTimelineList",function(){return this._slotTimelineList}),n.dispose=function(){t.prototype.dispose.call(this),this.hideTimelineNameMap=null;var e=0,i=0;for(e=0,i=this._timelineList.length;e<i;e++){var r=this._timelineList[e];r.dispose()}for(this._timelineList=null,e=0,i=this._slotTimelineList.length;e<i;e++){var n=this._slotTimelineList[e];n.dispose()}this._slotTimelineList=null},n.getTimeline=function(t){for(var e=this._timelineList.length;e--;)if(this._timelineList[e].name==t)return this._timelineList[e];return null},n.addTimeline=function(t){if(!t)throw new Error;this._timelineList.indexOf(t)<0&&(this._timelineList[this._timelineList.length]=t)},n.getSlotTimeline=function(t){for(var e=this._slotTimelineList.length;e--;)if(this._slotTimelineList[e].name==t)return this._slotTimelineList[e];return null},n.addSlotTimeline=function(t){if(!t)throw new Error;this._slotTimelineList.indexOf(t)<0&&(this._slotTimelineList[this._slotTimelineList.length]=t)},e}(t.Timeline);t.AnimationData=e,egret.registerClass(e,"dragonBones.AnimationData")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(){this._boneDataList=[],this._skinDataList=[],this._slotDataList=[],this._animationDataList=[]}var e=__define,i=t,r=i.prototype;return t.sortBoneDataHelpArray=function(t,e){return t[0]>e[0]?1:-1},t.sortBoneDataHelpArrayDescending=function(t,e){return t[0]>e[0]?-1:1},r.setSkinData=function(t){var e=0,i=this._slotDataList.length;for(e=0;e<i;e++)this._slotDataList[e].dispose();var r;if(!t&&this._skinDataList.length>0)r=this._skinDataList[0];else for(e=0,i=this._skinDataList.length;e<i;e++)if(this._skinDataList[e].name==t){r=this._skinDataList[e];break}if(r){var n;for(e=0,i=r.slotDataList.length,e=0;e<i;e++)if(n=this.getSlotData(r.slotDataList[e].name)){var s=0,a=r.slotDataList[e].displayDataList.length;for(s=0;s<a;s++)n.addDisplayData(r.slotDataList[e].displayDataList[s])}}},r.dispose=function(){for(var t=this._boneDataList.length;t--;)this._boneDataList[t].dispose();for(t=this._skinDataList.length;t--;)this._skinDataList[t].dispose();for(t=this._slotDataList.length;t--;)this._slotDataList[t].dispose();for(t=this._animationDataList.length;t--;)this._animationDataList[t].dispose();this._boneDataList=null,this._slotDataList=null,this._skinDataList=null,this._animationDataList=null},r.getBoneData=function(t){for(var e=this._boneDataList.length;e--;)if(this._boneDataList[e].name==t)return this._boneDataList[e];return null},r.getSlotData=function(t){for(var e=this._slotDataList.length;e--;)if(this._slotDataList[e].name==t)return this._slotDataList[e];return null},r.getSkinData=function(t){if(!t&&this._skinDataList.length>0)return this._skinDataList[0];for(var e=this._skinDataList.length;e--;)if(this._skinDataList[e].name==t)return this._skinDataList[e];return null},r.getAnimationData=function(t){for(var e=this._animationDataList.length;e--;)if(this._animationDataList[e].name==t)return this._animationDataList[e];return null},r.addBoneData=function(t){if(!t)throw new Error;if(!(this._boneDataList.indexOf(t)<0))throw new Error;this._boneDataList[this._boneDataList.length]=t},r.addSlotData=function(t){if(!t)throw new Error;if(!(this._slotDataList.indexOf(t)<0))throw new Error;this._slotDataList[this._slotDataList.length]=t},r.addSkinData=function(t){if(!t)throw new Error;if(!(this._skinDataList.indexOf(t)<0))throw new Error;this._skinDataList[this._skinDataList.length]=t},r.addAnimationData=function(t){if(!t)throw new Error;this._animationDataList.indexOf(t)<0&&(this._animationDataList[this._animationDataList.length]=t)},r.sortBoneDataList=function(){var e=this._boneDataList.length;if(0!=e){for(var i=[];e--;){for(var r=this._boneDataList[e],n=0,s=r;s;)n++,s=this.getBoneData(s.parent);i[e]=[n,r]}for(i.sort(t.sortBoneDataHelpArray),e=i.length;e--;)this._boneDataList[e]=i[e][1]}},e(r,"boneDataList",function(){return this._boneDataList}),e(r,"slotDataList",function(){return this._slotDataList}),e(r,"skinDataList",function(){return this._skinDataList}),e(r,"animationDataList",function(){return this._animationDataList}),t}();t.ArmatureData=e,egret.registerClass(e,"dragonBones.ArmatureData")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){this.length=0,this.global=new t.DBTransform,this.transform=new t.DBTransform,this.inheritRotation=!0,this.inheritScale=!1}var i=(__define,e),r=i.prototype;return r.dispose=function(){this.global=null,this.transform=null},e}();t.BoneData=e,egret.registerClass(e,"dragonBones.BoneData")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(){this.alphaMultiplier=1,this.alphaOffset=0,this.blueMultiplier=1,this.blueOffset=0,this.greenMultiplier=1,this.greenOffset=0,this.redMultiplier=1,this.redOffset=0}var e=(__define,t);e.prototype;return t}();t.ColorTransform=e,egret.registerClass(e,"dragonBones.ColorTransform")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){this._dataChanged=!1,this._pointList=[],this.sampling=new Array(e.SamplingTimes);for(var i=0;i<e.SamplingTimes-1;i++)this.sampling[i]=new t.Point}var i=__define,r=e,n=r.prototype;return n.getValueByProgress=function(t){this._dataChanged&&this.refreshSampling();for(var i=0;i<e.SamplingTimes-1;i++){var r=this.sampling[i];if(r.x>=t){if(0==i)return r.y*t/r.x;var n=this.sampling[i-1];return n.y+(r.y-n.y)*(t-n.x)/(r.x-n.x)}}return r.y+(1-r.y)*(t-r.x)/(1-r.x)},n.refreshSampling=function(){for(var t=0;t<e.SamplingTimes-1;t++)this.bezierCurve(e.SamplingStep*(t+1),this.sampling[t]);this._dataChanged=!1},n.bezierCurve=function(t,e){var i=1-t;e.x=3*this.point1.x*t*i*i+3*this.point2.x*t*t*i+Math.pow(t,3),e.y=3*this.point1.y*t*i*i+3*this.point2.y*t*t*i+Math.pow(t,3)},i(n,"pointList",function(){return this._pointList},function(t){this._pointList=t,this._dataChanged=!0}),n.isCurve=function(){return 0!=this.point1.x||0!=this.point1.y||1!=this.point2.x||1!=this.point2.y},i(n,"point1",function(){return this.pointList[0]}),i(n,"point2",function(){return this.pointList[1]}),e.SamplingTimes=20,e.SamplingStep=.05,e}();t.CurveData=e,egret.registerClass(e,"dragonBones.CurveData")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){this.transform=new t.DBTransform,this.pivot=new t.Point}var i=(__define,e),r=i.prototype;return r.dispose=function(){this.transform=null,this.pivot=null},e.ARMATURE="armature",e.IMAGE="image",e}();t.DisplayData=e,egret.registerClass(e,"dragonBones.DisplayData")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(){this._armatureDataList=[],this._displayDataDictionary={}}var e=__define,i=t,r=i.prototype;return r.dispose=function(){for(var t=0,e=this._armatureDataList.length;t<e;t++){var i=this._armatureDataList[t];i.dispose()}this._armatureDataList=null,this.removeAllDisplayData(),this._displayDataDictionary=null},e(r,"armatureDataList",function(){return this._armatureDataList}),r.getArmatureDataByName=function(t){for(var e=this._armatureDataList.length;e--;)if(this._armatureDataList[e].name==t)return this._armatureDataList[e];return null},r.addArmatureData=function(t){if(!t)throw new Error;if(!(this._armatureDataList.indexOf(t)<0))throw new Error;this._armatureDataList[this._armatureDataList.length]=t},r.removeArmatureData=function(t){var e=this._armatureDataList.indexOf(t);e>=0&&this._armatureDataList.splice(e,1)},r.removeArmatureDataByName=function(t){for(var e=this._armatureDataList.length;e--;)this._armatureDataList[e].name==t&&this._armatureDataList.splice(e,1)},r.getDisplayDataByName=function(t){return this._displayDataDictionary[t]},r.addDisplayData=function(t){this._displayDataDictionary[t.name]=t},r.removeDisplayDataByName=function(t){delete this._displayDataDictionary[t]},r.removeAllDisplayData=function(){for(var t in this._displayDataDictionary)delete this._displayDataDictionary[t]},t}();t.DragonBonesData=e,egret.registerClass(e,"dragonBones.DragonBonesData")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(){this.position=0,this.duration=0,this.position=0,this.duration=0}var e=(__define,t),i=e.prototype;return i.dispose=function(){},t}();t.Frame=e,egret.registerClass(e,"dragonBones.Frame")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(){this._slotDataList=[]}var e=__define,i=t,r=i.prototype;return r.dispose=function(){for(var t=this._slotDataList.length;t--;)this._slotDataList[t].dispose();this._slotDataList=null},r.getSlotData=function(t){for(var e=this._slotDataList.length;e--;)if(this._slotDataList[e].name==t)return this._slotDataList[e];return null},r.addSlotData=function(t){if(!t)throw new Error;if(!(this._slotDataList.indexOf(t)<0))throw new Error;this._slotDataList[this._slotDataList.length]=t},e(r,"slotDataList",function(){return this._slotDataList}),t}();t.SkinData=e,egret.registerClass(e,"dragonBones.SkinData")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(){this._displayDataList=[],this.zOrder=0}var e=__define,i=t,r=i.prototype;return r.dispose=function(){this._displayDataList.length=0},r.addDisplayData=function(t){if(!t)throw new Error;if(!(this._displayDataList.indexOf(t)<0))throw new Error;this._displayDataList[this._displayDataList.length]=t},r.getDisplayData=function(t){for(var e=this._displayDataList.length;e--;)if(this._displayDataList[e].name==t)return this._displayDataList[e];return null},e(r,"displayDataList",function(){return this._displayDataList}),t}();t.SlotData=e,egret.registerClass(e,"dragonBones.SlotData")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(t){function e(){t.call(this),this.displayIndex=0,this.tweenEasing=10,this.displayIndex=0,this.visible=!0,this.zOrder=NaN}__extends(e,t);var i=(__define,e),r=i.prototype;return r.dispose=function(){t.prototype.dispose.call(this),this.color=null},e}(t.Frame);t.SlotFrame=e,egret.registerClass(e,"dragonBones.SlotFrame")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(t){function e(){t.call(this),this.offset=0}__extends(e,t);var i=(__define,e),r=i.prototype;return r.dispose=function(){t.prototype.dispose.call(this)},e}(t.Timeline);t.SlotTimeline=e,egret.registerClass(e,"dragonBones.SlotTimeline")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(e){function i(){e.call(this),this.tweenRotate=0,this.displayIndex=0,this.tweenEasing=10,this.tweenRotate=0,this.tweenScale=!0,this.displayIndex=0,this.visible=!0,this.zOrder=NaN,this.global=new t.DBTransform,this.transform=new t.DBTransform,this.pivot=new t.Point,this.scaleOffset=new t.Point}__extends(i,e);var r=(__define,i),n=r.prototype;return n.dispose=function(){e.prototype.dispose.call(this),this.global=null,this.transform=null,this.pivot=null,this.scaleOffset=null,this.color=null},i}(t.Frame);t.TransformFrame=e,egret.registerClass(e,"dragonBones.TransformFrame")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(e){function i(){e.call(this),this.originTransform=new t.DBTransform,this.originTransform.scaleX=1,this.originTransform.scaleY=1,this.originPivot=new t.Point,this.offset=0}__extends(i,e);var r=(__define,i),n=r.prototype;return n.dispose=function(){e.prototype.dispose.call(this),this.originTransform=null,this.originPivot=null},i}(t.Timeline);t.TransformTimeline=e,egret.registerClass(e,"dragonBones.TransformTimeline")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(t,e,i){this.region=t,this.frame=e,this.rotated=i}var e=(__define,t);e.prototype;return t}();t.TextureData=e,egret.registerClass(e,"dragonBones.TextureData")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){}var i=(__define,e);i.prototype;return e.cloneColor=function(e){var i=new t.ColorTransform;return i.redMultiplier=e.redMultiplier,i.greenMultiplier=e.greenMultiplier,i.blueMultiplier=e.blueMultiplier,i.alphaMultiplier=e.alphaMultiplier,i.redOffset=e.redOffset,i.greenOffset=e.greenOffset,i.blueOffset=e.blueOffset,i.alphaOffset=e.alphaOffset,i},e.isEqual=function(t,e){return t.alphaOffset==e.alphaOffset&&t.redOffset==e.redOffset&&t.greenOffset==e.greenOffset&&t.blueOffset==e.blueOffset&&t.alphaMultiplier==e.alphaMultiplier&&t.redMultiplier==e.redMultiplier&&t.greenMultiplier==e.greenMultiplier&&t.blueMultiplier==e.blueMultiplier},e.minus=function(t,e,i){i.alphaOffset=t.alphaOffset-e.alphaOffset,i.redOffset=t.redOffset-e.redOffset,i.greenOffset=t.greenOffset-e.greenOffset,i.blueOffset=t.blueOffset-e.blueOffset,i.alphaMultiplier=t.alphaMultiplier-e.alphaMultiplier,i.redMultiplier=t.redMultiplier-e.redMultiplier,i.greenMultiplier=t.greenMultiplier-e.greenMultiplier,i.blueMultiplier=t.blueMultiplier-e.blueMultiplier},e.originalColor=new t.ColorTransform,e}();t.ColorTransformUtil=e,egret.registerClass(e,"dragonBones.ColorTransformUtil")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(){}var e=(__define,t);e.prototype;return t.ANGLE_TO_RADIAN=Math.PI/180,t.RADIAN_TO_ANGLE=180/Math.PI,t.DRAGON_BONES="dragonBones",t.ARMATURE="armature",t.SKIN="skin",t.BONE="bone",t.SLOT="slot",t.DISPLAY="display",t.ANIMATION="animation",t.TIMELINE="timeline",t.FRAME="frame",t.TRANSFORM="transform",t.COLOR_TRANSFORM="colorTransform",t.COLOR="color",t.RECTANGLE="rectangle",t.ELLIPSE="ellipse",t.TEXTURE_ATLAS="TextureAtlas",t.SUB_TEXTURE="SubTexture",t.A_ROTATED="rotated",t.A_FRAME_X="frameX",t.A_FRAME_Y="frameY",t.A_FRAME_WIDTH="frameWidth",t.A_FRAME_HEIGHT="frameHeight",t.A_VERSION="version",t.A_IMAGE_PATH="imagePath",t.A_FRAME_RATE="frameRate",t.A_NAME="name",t.A_IS_GLOBAL="isGlobal",t.A_PARENT="parent",t.A_LENGTH="length",t.A_TYPE="type",t.A_FADE_IN_TIME="fadeInTime",t.A_DURATION="duration",t.A_SCALE="scale",t.A_OFFSET="offset",t.A_LOOP="loop",t.A_PLAY_TIMES="playTimes",t.A_EVENT="event",t.A_EVENT_PARAMETERS="eventParameters",t.A_SOUND="sound",t.A_ACTION="action",t.A_HIDE="hide",t.A_AUTO_TWEEN="autoTween",t.A_TWEEN_EASING="tweenEasing",t.A_TWEEN_ROTATE="tweenRotate",t.A_TWEEN_SCALE="tweenScale",t.A_DISPLAY_INDEX="displayIndex",t.A_Z_ORDER="z",t.A_BLENDMODE="blendMode",t.A_WIDTH="width",t.A_HEIGHT="height",t.A_INHERIT_SCALE="inheritScale",t.A_INHERIT_ROTATION="inheritRotation",t.A_X="x",t.A_Y="y",t.A_SKEW_X="skX",t.A_SKEW_Y="skY",t.A_SCALE_X="scX",t.A_SCALE_Y="scY",t.A_PIVOT_X="pX",t.A_PIVOT_Y="pY",t.A_ALPHA_OFFSET="aO",t.A_RED_OFFSET="rO",t.A_GREEN_OFFSET="gO",t.A_BLUE_OFFSET="bO",t.A_ALPHA_MULTIPLIER="aM",t.A_RED_MULTIPLIER="rM",t.A_GREEN_MULTIPLIER="gM",t.A_BLUE_MULTIPLIER="bM",t.A_CURVE="curve",t.A_SCALE_X_OFFSET="scXOffset",t.A_SCALE_Y_OFFSET="scYOffset",t.A_SCALE_MODE="scaleMode",t.A_FIXED_ROTATION="fixedRotation",t}();t.ConstValues=e,egret.registerClass(e,"dragonBones.ConstValues")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){}var i=(__define,e);i.prototype;return e.transformArmatureData=function(e){for(var i=e.boneDataList,r=i.length;r--;){var n=i[r];if(n.parent){var s=e.getBoneData(n.parent);s&&(n.transform.copy(n.global),t.TransformUtil.globalToLocal(n.transform,s.global))}}},e.transformArmatureDataAnimations=function(t){for(var i=t.animationDataList,r=i.length;r--;)e.transformAnimationData(i[r],t,!1)},e.transformRelativeAnimationData=function(t,e){},e.transformAnimationData=function(i,r,n){if(!n)return void e.transformRelativeAnimationData(i,r);var s,a=r.getSkinData(null),o=r.boneDataList;a&&(s=a.slotDataList);for(var l=0;l<o.length;l++){var h=o[l],u=i.getTimeline(h.name),c=i.getSlotTimeline(h.name);if(u||c){var d=null;if(s)for(var f=0,p=s.length;f<p&&(d=s[f],d.parent!=h.name);f++);var _=u.frameList;if(c)var m=c.frameList;for(var g=null,v=_.length,f=0;f<v;f++){var y=_[f];if(e.setFrameTransform(i,r,h,y),y.transform.x-=h.transform.x,y.transform.y-=h.transform.y,y.transform.skewX-=h.transform.skewX,y.transform.skewY-=h.transform.skewY,y.transform.scaleX/=h.transform.scaleX,y.transform.scaleY/=h.transform.scaleY,g){var T=y.transform.skewX-g.transform.skewX;g.tweenRotate?g.tweenRotate>0?(T<0&&(y.transform.skewX+=2*Math.PI,y.transform.skewY+=2*Math.PI),g.tweenRotate>1&&(y.transform.skewX+=2*Math.PI*(g.tweenRotate-1),y.transform.skewY+=2*Math.PI*(g.tweenRotate-1))):(T>0&&(y.transform.skewX-=2*Math.PI,y.transform.skewY-=2*Math.PI),g.tweenRotate<1&&(y.transform.skewX+=2*Math.PI*(g.tweenRotate+1),y.transform.skewY+=2*Math.PI*(g.tweenRotate+1))):(y.transform.skewX=g.transform.skewX+t.TransformUtil.formatRadian(y.transform.skewX-g.transform.skewX),y.transform.skewY=g.transform.skewY+t.TransformUtil.formatRadian(y.transform.skewY-g.transform.skewY))}g=y}if(c&&m){v=m.length;for(var f=0;f<v;f++){var b=m[f];c.transformed||d&&(b.zOrder-=d.zOrder)}c.transformed=!0}u.transformed=!0}}},e.setFrameTransform=function(i,r,n,s){s.transform.copy(s.global);var a=r.getBoneData(n.parent);if(a){var o=i.getTimeline(a.name);if(o){for(var l=[],h=[];o;)l.push(o),h.push(a),a=r.getBoneData(a.parent),o=a?i.getTimeline(a.name):null;for(var u,c=l.length,d=new t.Matrix,f=new t.DBTransform,p=new t.Matrix;c--;)o=l[c],a=h[c],e.getTimelineTransform(o,s.position,f,!u),u?(f.x+=o.originTransform.x+a.transform.x,f.y+=o.originTransform.y+a.transform.y,f.skewX+=o.originTransform.skewX+a.transform.skewX,f.skewY+=o.originTransform.skewY+a.transform.skewY,f.scaleX*=o.originTransform.scaleX*a.transform.scaleX,f.scaleY*=o.originTransform.scaleY*a.transform.scaleY,t.TransformUtil.transformToMatrix(f,p,!0),p.concat(d),t.TransformUtil.matrixToTransform(p,u,f.scaleX*u.scaleX>=0,f.scaleY*u.scaleY>=0)):(u=new t.DBTransform,u.copy(f)),t.TransformUtil.transformToMatrix(u,d,!0);t.TransformUtil.globalToLocal(s.transform,u)}}},e.getTimelineTransform=function(e,i,r,n){for(var s=e.frameList,a=s.length;a--;){var o=s[a];if(o.position<=i&&o.position+o.duration>i){if(a==s.length-1||i==o.position)r.copy(n?o.global:o.transform);else{var l=o.tweenEasing,h=(i-o.position)/o.duration;l&&10!=l&&(h=t.MathUtil.getEaseValue(h,l));var u=s[a+1],c=n?o.global:o.transform,d=n?u.global:u.transform;r.x=c.x+(d.x-c.x)*h,r.y=c.y+(d.y-c.y)*h,r.skewX=t.TransformUtil.formatRadian(c.skewX+(d.skewX-c.skewX)*h),r.skewY=t.TransformUtil.formatRadian(c.skewY+(d.skewY-c.skewY)*h),r.scaleX=c.scaleX+(d.scaleX-c.scaleX)*h,r.scaleY=c.scaleY+(d.scaleY-c.scaleY)*h}break}}},e.addHideTimeline=function(t,e,i){void 0===i&&(i=!1);for(var r=e.boneDataList,n=e.slotDataList,s=r.length;s--;){var a=r[s],o=a.name;t.getTimeline(o)||t.hideTimelineNameMap.indexOf(o)<0&&t.hideTimelineNameMap.push(o)}if(i){s=n.length;for(var l,h;s--;)l=n[s],h=l.name,t.getSlotTimeline(h)||t.hideSlotTimelineNameMap.indexOf(h)<0&&t.hideSlotTimelineNameMap.push(h)}},e}();t.DBDataUtil=e,egret.registerClass(e,"dragonBones.DBDataUtil")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function t(){}var e=(__define,t);e.prototype;return t.getEaseValue=function(e,i){var r=1;return i>1?(r=.5*(1-t.cos(e*Math.PI)),i-=1):i>0?r=1-Math.pow(1-e,2):i<0&&(i*=-1,r=Math.pow(e,2)),(r-e)*i+e},t.isNumber=function(t){return"number"==typeof t&&!isNaN(t)},t.sin=function(e){e*=t.RADIAN_TO_ANGLE;var i=Math.floor(e),r=i+1,n=t.sinInt(i),s=t.sinInt(r);return(e-i)*s+(r-e)*n},t.sinInt=function(t){return t%=360,t<0&&(t+=360),t<90?db_sin_map[t]:t<180?db_sin_map[180-t]:t<270?-db_sin_map[t-180]:-db_sin_map[360-t]},t.cos=function(e){return t.sin(Math.PI/2-e)},t.ANGLE_TO_RADIAN=Math.PI/180,t.RADIAN_TO_ANGLE=180/Math.PI,t}();t.MathUtil=e,egret.registerClass(e,"dragonBones.MathUtil")}(dragonBones||(dragonBones={}));for(var db_sin_map={},dbMathIndex=0;dbMathIndex<=90;dbMathIndex++)db_sin_map[dbMathIndex]=Math.sin(dbMathIndex*dragonBones.MathUtil.ANGLE_TO_RADIAN);var dragonBones;!function(t){var e=function(){function e(){}var i=(__define,e);i.prototype;return e.globalToLocal=function(t,i){e.transformToMatrix(t,e._helpTransformMatrix,!0),e.transformToMatrix(i,e._helpParentTransformMatrix,!0),e._helpParentTransformMatrix.invert(),e._helpTransformMatrix.concat(e._helpParentTransformMatrix),e.matrixToTransform(e._helpTransformMatrix,t,t.scaleX*i.scaleX>=0,t.scaleY*i.scaleY>=0)},e.transformToMatrix=function(e,i,r){void 0===r&&(r=!1),r?(i.a=e.scaleX*t.MathUtil.cos(e.skewY),i.b=e.scaleX*t.MathUtil.sin(e.skewY),i.c=-e.scaleY*t.MathUtil.sin(e.skewX),i.d=e.scaleY*t.MathUtil.cos(e.skewX),i.tx=e.x,i.ty=e.y):(i.a=t.MathUtil.cos(e.skewY),i.b=t.MathUtil.sin(e.skewY),i.c=-t.MathUtil.sin(e.skewX),i.d=t.MathUtil.cos(e.skewX),i.tx=e.x,i.ty=e.y)},e.matrixToTransform=function(t,e,i,r){e.x=t.tx,e.y=t.ty,e.scaleX=Math.sqrt(t.a*t.a+t.b*t.b)*(i?1:-1),e.scaleY=Math.sqrt(t.d*t.d+t.c*t.c)*(r?1:-1);var n=[];n[0]=Math.acos(t.d/e.scaleY),n[1]=-n[0],n[2]=Math.asin(-t.c/e.scaleY),n[3]=n[2]>=0?Math.PI-n[2]:n[2]-Math.PI,Number(n[0]).toFixed(4)==Number(n[2]).toFixed(4)||Number(n[0]).toFixed(4)==Number(n[3]).toFixed(4)?e.skewX=n[0]:e.skewX=n[1];var s=[];s[0]=Math.acos(t.a/e.scaleX),s[1]=-s[0],s[2]=Math.asin(t.b/e.scaleX),s[3]=s[2]>=0?Math.PI-s[2]:s[2]-Math.PI,Number(s[0]).toFixed(4)==Number(s[2]).toFixed(4)||Number(s[0]).toFixed(4)==Number(s[3]).toFixed(4)?e.skewY=s[0]:e.skewY=s[1]},e.formatRadian=function(t){return t>Math.PI&&(t-=e.DOUBLE_PI),t<-Math.PI&&(t+=e.DOUBLE_PI),t},e.normalizeRotation=function(t){return t=(t+Math.PI)%(2*Math.PI),t=t>0?t:2*Math.PI+t,t-Math.PI},e.HALF_PI=.5*Math.PI,e.DOUBLE_PI=2*Math.PI,e._helpTransformMatrix=new t.Matrix,e._helpParentTransformMatrix=new t.Matrix,e}();t.TransformUtil=e,egret.registerClass(e,"dragonBones.TransformUtil")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(e){this.animationState=new t.FastAnimationState,this._armature=e,this.animationState._armature=e,this.animationList=[],this._animationDataObj={},this._isPlaying=!1,this._timeScale=1}var i=__define,r=e,n=r.prototype;return n.dispose=function(){this._armature&&(this._armature=null, this._animationDataList=null,this.animationList=null,this.animationState=null)},n.gotoAndPlay=function(t,e,i,r){if(void 0===e&&(e=-1),void 0===i&&(i=-1),void 0===r&&(r=NaN),!this._animationDataList)return null;var n=this._animationDataObj[t];if(!n)return null;this._isPlaying=!0,e=e<0?n.fadeTime<0?.3:n.fadeTime:e;var s;s=i<0?n.scale<0?1:n.scale:1e3*i/n.duration,r=isNaN(r)?n.playTimes:r,this.animationState._fadeIn(n,r,1/s,e),this._armature.enableCache&&this.animationCacheManager&&(this.animationState.animationCache=this.animationCacheManager.getAnimationCache(t));for(var a=this._armature.slotHasChildArmatureList.length;a--;){var o=this._armature.slotHasChildArmatureList[a],l=o.childArmature;l&&l.getAnimation().gotoAndPlay(t)}return this.animationState},n.gotoAndStop=function(t,e,i,r,n){return void 0===i&&(i=-1),void 0===r&&(r=0),void 0===n&&(n=-1),this.animationState.name!=t&&this.gotoAndPlay(t,r,n),i>=0?this.animationState.setCurrentTime(this.animationState.totalTime*i):this.animationState.setCurrentTime(e),this.animationState.stop(),this.animationState},n.play=function(){this._animationDataList&&(this.animationState.name?this._isPlaying?this.gotoAndPlay(this.animationState.name):this._isPlaying=!0:this.gotoAndPlay(this._animationDataList[0].name))},n.stop=function(){this._isPlaying=!1},n.advanceTime=function(t){this._isPlaying&&this.animationState._advanceTime(t*this._timeScale)},n.hasAnimation=function(t){return null!=this._animationDataObj[t]},i(n,"timeScale",function(){return this._timeScale},function(t){(isNaN(t)||t<0)&&(t=1),this._timeScale=t}),i(n,"animationDataList",function(){return this._animationDataList},function(t){this._animationDataList=t,this.animationList.length=0;for(var e=this._animationDataList.length,i=0;i<e;i++){var r=this._animationDataList[i];this.animationList.push(r.name),this._animationDataObj[r.name]=r}}),i(n,"movementList",function(){return this.animationList}),i(n,"movementID",function(){return this.lastAnimationName}),n.isPlaying=function(){return this._isPlaying&&!this.isComplete},i(n,"isComplete",function(){return this.animationState.isComplete}),i(n,"lastAnimationState",function(){return this.animationState}),i(n,"lastAnimationName",function(){return this.animationState?this.animationState.name:null}),e}();t.FastAnimation=e,egret.registerClass(e,"dragonBones.FastAnimation")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){this._boneTimelineStateList=[],this._slotTimelineStateList=[],this._currentFrameIndex=0,this._currentFramePosition=0,this._currentFrameDuration=0,this._currentPlayTimes=0,this._totalTime=0,this._currentTime=0,this._lastTime=0,this._playTimes=0,this._fading=!1}var i=__define,r=e,n=r.prototype;return n.dispose=function(){this._resetTimelineStateList(),this._armature=null},n.play=function(){return this._isPlaying=!0,this},n.stop=function(){return this._isPlaying=!1,this},n.setCurrentTime=function(t){return(t<0||isNaN(t))&&(t=0),this._time=t,this._currentTime=1e3*this._time,this},n._resetTimelineStateList=function(){for(var e=this._boneTimelineStateList.length;e--;)t.FastBoneTimelineState.returnObject(this._boneTimelineStateList[e]);for(this._boneTimelineStateList.length=0,e=this._slotTimelineStateList.length;e--;)t.FastSlotTimelineState.returnObject(this._slotTimelineStateList[e]);this._slotTimelineStateList.length=0,this.name=null},n._fadeIn=function(t,e,i,r){this.animationData=t,this.name=this.animationData.name,this._totalTime=this.animationData.duration,this.autoTween=t.autoTween,this.setTimeScale(i),this.setPlayTimes(e),this._isComplete=!1,this._currentFrameIndex=-1,this._currentPlayTimes=-1,Math.round(this._totalTime*this.animationData.frameRate*.001)<2?this._currentTime=this._totalTime:this._currentTime=-1,this._fadeTotalTime=r*this._timeScale,this._fading=this._fadeTotalTime>0,this._isPlaying=!0,this._armature.enableCache&&this.animationCache&&this._fading&&this._boneTimelineStateList&&this.updateTransformTimeline(this.progress),this._time=0,this._progress=0,this._updateTimelineStateList(),this.hideBones()},n._updateTimelineStateList=function(){this._resetTimelineStateList();for(var e,i=this.animationData.timelineList.length,r=0;r<i;r++){var n=this.animationData.timelineList[r];e=n.name;var s=this._armature.getBone(e);if(s){var a=t.FastBoneTimelineState.borrowObject();a.fadeIn(s,this,n),this._boneTimelineStateList.push(a)}}for(var o=this.animationData.slotTimelineList.length,l=0;l<o;l++){var h=this.animationData.slotTimelineList[l];e=h.name;var u=this._armature.getSlot(e);if(u&&u.displayList.length>0){var c=t.FastSlotTimelineState.borrowObject();c.fadeIn(u,this,h),this._slotTimelineStateList.push(c)}}},n._advanceTime=function(t){if(t*=this._timeScale,this._fading&&(this._time+=t,this._progress=this._time/this._fadeTotalTime,this._progress>=1&&(this._progress=0,this._time=0,this._fading=!1)),this._fading){for(var e=this._boneTimelineStateList.length,i=0;i<e;i++){var r=this._boneTimelineStateList[i];r.updateFade(this.progress)}for(var n=this._slotTimelineStateList.length,s=0;s<n;s++){var a=this._slotTimelineStateList[s];a.updateFade(this.progress)}}else this.advanceTimelinesTime(t)},n.advanceTimelinesTime=function(e){this._isPlaying&&(this._time+=e);var i=!1,r=!1,n=!1,s=!1,a=0,o=1e3*this._time;0==this._playTimes||o<this._playTimes*this._totalTime?(s=!1,this._progress=o/this._totalTime,a=Math.ceil(this.progress)||1,this._progress-=Math.floor(this.progress),o%=this._totalTime):(a=this._playTimes,o=this._totalTime,s=!0,this._progress=1),this._isComplete=s,this.isUseCache()?this.animationCache.update(this.progress):this.updateTransformTimeline(this.progress),this._currentTime!=o&&(this._currentPlayTimes!=a&&(this._currentPlayTimes>0&&a>1&&(r=!0),this._currentPlayTimes=a),this._currentTime<0&&(i=!0),this._isComplete&&(n=!0),this._lastTime=this._currentTime,this._currentTime=o,this.updateMainTimeline(s));var l;i&&this._armature.hasEventListener(t.AnimationEvent.START)&&(l=new t.AnimationEvent(t.AnimationEvent.START),l.animationState=this,this._armature._addEvent(l)),n?this._armature.hasEventListener(t.AnimationEvent.COMPLETE)&&(l=new t.AnimationEvent(t.AnimationEvent.COMPLETE),l.animationState=this,this._armature._addEvent(l)):r&&this._armature.hasEventListener(t.AnimationEvent.LOOP_COMPLETE)&&(l=new t.AnimationEvent(t.AnimationEvent.LOOP_COMPLETE),l.animationState=this,this._armature._addEvent(l))},n.updateTransformTimeline=function(t){var e,i,r=this._boneTimelineStateList.length;if(this._isComplete){for(;r--;)e=this._boneTimelineStateList[r],e.update(t),this._isComplete=e._isComplete&&this._isComplete;for(r=this._slotTimelineStateList.length;r--;)i=this._slotTimelineStateList[r],i.update(t),this._isComplete=i._isComplete&&this._isComplete}else{for(;r--;)e=this._boneTimelineStateList[r],e.update(t);for(r=this._slotTimelineStateList.length;r--;)i=this._slotTimelineStateList[r],i.update(t)}},n.updateMainTimeline=function(t){var e=this.animationData.frameList;if(e.length>0){for(var i,r,n=0,s=this.animationData.frameList.length;n<s;++n){if(this._currentFrameIndex<0)this._currentFrameIndex=0;else{if(!(this._currentTime<this._currentFramePosition||this._currentTime>=this._currentFramePosition+this._currentFrameDuration||this._currentTime<this._lastTime))break;if(this._lastTime=this._currentTime,this._currentFrameIndex++,this._currentFrameIndex>=e.length){if(t){this._currentFrameIndex--;break}this._currentFrameIndex=0}}r=e[this._currentFrameIndex],i&&this._armature.arriveAtFrame(i,this),this._currentFrameDuration=r.duration,this._currentFramePosition=r.position,i=r}r&&this._armature.arriveAtFrame(r,this)}},n.setTimeScale=function(t){return(isNaN(t)||t==1/0)&&(t=1),this._timeScale=t,this},n.setPlayTimes=function(t){return void 0===t&&(t=0),Math.round(.001*this._totalTime*this.animationData.frameRate)<2?this._playTimes=1:this._playTimes=t,this},i(n,"playTimes",function(){return this._playTimes}),i(n,"currentPlayTimes",function(){return this._currentPlayTimes<0?0:this._currentPlayTimes}),i(n,"isComplete",function(){return this._isComplete}),i(n,"isPlaying",function(){return this._isPlaying&&!this._isComplete}),i(n,"totalTime",function(){return.001*this._totalTime}),i(n,"currentTime",function(){return this._currentTime<0?0:.001*this._currentTime}),n.isUseCache=function(){return this._armature.enableCache&&this.animationCache&&!this._fading},n.hideBones=function(){for(var t=this.animationData.hideTimelineNameMap.length,e=0;e<t;e++){var i=this.animationData.hideTimelineNameMap[e],r=this._armature.getBone(i);r&&r._hideSlots()}var n;for(e=0,t=this.animationData.hideSlotTimelineNameMap.length;e<t;e++){n=this.animationData.hideSlotTimelineNameMap[e];var s=this._armature.getSlot(n);s&&s._resetToOrigin()}},i(n,"progress",function(){return this._progress}),e}();t.FastAnimationState=e,egret.registerClass(e,"dragonBones.FastAnimationState",["dragonBones.IAnimationState"])}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){this._totalTime=0,this._currentTime=0,this._lastTime=0,this._currentFrameIndex=0,this._currentFramePosition=0,this._currentFrameDuration=0,this._updateMode=0,this._transform=new t.DBTransform,this._durationTransform=new t.DBTransform,this._transformToFadein=new t.DBTransform,this._pivot=new t.Point,this._durationPivot=new t.Point}var i=(__define,e),r=i.prototype;return e.borrowObject=function(){return 0==e._pool.length?new e:e._pool.pop()},e.returnObject=function(t){e._pool.indexOf(t)<0&&(e._pool[e._pool.length]=t),t.clear()},e.clear=function(){for(var t=e._pool.length;t--;)e._pool[t].clear();e._pool.length=0},r.clear=function(){this._bone&&(this._bone._timelineState=null,this._bone=null),this._animationState=null,this._timelineData=null,this._originPivot=null},r.fadeIn=function(e,i,r){switch(this._bone=e,this._animationState=i,this._timelineData=r,this.name=r.name,this._totalTime=this._timelineData.duration,this._isComplete=!1,this._tweenTransform=!1,this._currentFrameIndex=-1,this._currentTime=-1,this._tweenEasing=NaN,this._durationPivot.x=0,this._durationPivot.y=0,this._pivot.x=0,this._pivot.y=0,this._originPivot=this._timelineData.originPivot,this._timelineData.frameList.length){case 0:this._updateMode=0;break;case 1:this._updateMode=1;break;default:this._updateMode=-1}if(i._fadeTotalTime>0){this._bone._timelineState?this._transformToFadein.copy(this._bone._timelineState._transform):this._transformToFadein=new t.DBTransform;var n=this._timelineData.frameList[0];this._durationTransform.copy(n.transform),this._durationTransform.minus(this._transformToFadein)}this._bone._timelineState=this},r.updateFade=function(t){this._transform.x=this._transformToFadein.x+this._durationTransform.x*t,this._transform.y=this._transformToFadein.y+this._durationTransform.y*t,this._transform.scaleX=this._transformToFadein.scaleX*(1+(this._durationTransform.scaleX-1)*t),this._transform.scaleY=this._transformToFadein.scaleX*(1+(this._durationTransform.scaleY-1)*t),this._transform.rotation=this._transformToFadein.rotation+this._durationTransform.rotation*t,this._bone.invalidUpdate()},r.update=function(t){1==this._updateMode?(this._updateMode=0,this.updateSingleFrame()):this._updateMode==-1&&this.updateMultipleFrame(t)},r.updateSingleFrame=function(){var t=this._timelineData.frameList[0];this._bone.arriveAtFrame(t,this._animationState),this._isComplete=!0,this._tweenEasing=NaN,this._tweenTransform=!1,this._pivot.x=this._originPivot.x+t.pivot.x,this._pivot.y=this._originPivot.y+t.pivot.y,this._transform.copy(t.transform),this._bone.invalidUpdate()},r.updateMultipleFrame=function(t){var e=0;t/=this._timelineData.scale,t+=this._timelineData.offset;var i=this._totalTime*t,r=this._animationState.playTimes;if(0==r)this._isComplete=!1,e=Math.ceil(Math.abs(i)/this._totalTime)||1,i-=Math.floor(i/this._totalTime)*this._totalTime,i<0&&(i+=this._totalTime);else{var n=r*this._totalTime;i>=n?(i=n,this._isComplete=!0):i<=-n?(i=-n,this._isComplete=!0):this._isComplete=!1,i<0&&(i+=n),e=Math.ceil(i/this._totalTime)||1,this._isComplete?i=this._totalTime:i-=Math.floor(i/this._totalTime)*this._totalTime}if(this._currentTime!=i){this._lastTime=this._currentTime,this._currentTime=i;for(var s,a,o=this._timelineData.frameList,l=0,h=this._timelineData.frameList.length;l<h;++l){if(this._currentFrameIndex<0)this._currentFrameIndex=0;else{if(!(this._currentTime<this._currentFramePosition||this._currentTime>=this._currentFramePosition+this._currentFrameDuration||this._currentTime<this._lastTime))break;if(this._currentFrameIndex++,this._lastTime=this._currentTime,this._currentFrameIndex>=o.length){if(this._isComplete){this._currentFrameIndex--;break}this._currentFrameIndex=0}}a=o[this._currentFrameIndex],s&&this._bone.arriveAtFrame(s,this._animationState),this._currentFrameDuration=a.duration,this._currentFramePosition=a.position,s=a}a&&(this._bone.arriveAtFrame(a,this._animationState),this.updateToNextFrame(e)),this._tweenTransform&&this.updateTween()}},r.updateToNextFrame=function(e){void 0===e&&(e=0);var i=this._currentFrameIndex+1;i>=this._timelineData.frameList.length&&(i=0);var r=this._timelineData.frameList[this._currentFrameIndex],n=this._timelineData.frameList[i],s=!1;0==i&&this._animationState.playTimes&&this._animationState.currentPlayTimes>=this._animationState.playTimes&&((this._currentFramePosition+this._currentFrameDuration)/this._totalTime+e-this._timelineData.offset)*this._timelineData.scale>.999999?(this._tweenEasing=NaN,s=!1):this._animationState.autoTween?(this._tweenEasing=this._animationState.animationData.tweenEasing,isNaN(this._tweenEasing)?(this._tweenEasing=r.tweenEasing,this._tweenCurve=r.curve,isNaN(this._tweenEasing)&&null==this._tweenCurve?s=!1:(10==this._tweenEasing&&(this._tweenEasing=0),s=!0)):s=!0):(this._tweenEasing=r.tweenEasing,this._tweenCurve=r.curve,!isNaN(this._tweenEasing)&&10!=this._tweenEasing||null!=this._tweenCurve?s=!0:(this._tweenEasing=NaN,s=!1)),s?(this._durationTransform.x=n.transform.x-r.transform.x,this._durationTransform.y=n.transform.y-r.transform.y,this._durationTransform.skewX=n.transform.skewX-r.transform.skewX,this._durationTransform.skewY=n.transform.skewY-r.transform.skewY,this._durationTransform.scaleX=n.transform.scaleX-r.transform.scaleX+n.scaleOffset.x,this._durationTransform.scaleY=n.transform.scaleY-r.transform.scaleY+n.scaleOffset.y,this._durationPivot.x=n.pivot.x-r.pivot.x,this._durationPivot.y=n.pivot.y-r.pivot.y,this._durationTransform.normalizeRotation(),0==i&&(this._durationTransform.skewX=t.TransformUtil.formatRadian(this._durationTransform.skewX),this._durationTransform.skewY=t.TransformUtil.formatRadian(this._durationTransform.skewY)),this._durationTransform.x||this._durationTransform.y||this._durationTransform.skewX||this._durationTransform.skewY||1!=this._durationTransform.scaleX||1!=this._durationTransform.scaleY||this._durationPivot.x||this._durationPivot.y?this._tweenTransform=!0:this._tweenTransform=!1):this._tweenTransform=!1,this._tweenTransform||(this._transform.copy(r.transform),this._pivot.x=this._originPivot.x+r.pivot.x,this._pivot.y=this._originPivot.y+r.pivot.y,this._bone.invalidUpdate())},r.updateTween=function(){var e=(this._currentTime-this._currentFramePosition)/this._currentFrameDuration;this._tweenCurve?e=this._tweenCurve.getValueByProgress(e):this._tweenEasing&&(e=t.MathUtil.getEaseValue(e,this._tweenEasing));var i=this._timelineData.frameList[this._currentFrameIndex],r=i.transform,n=i.pivot;this._transform.x=r.x+this._durationTransform.x*e,this._transform.y=r.y+this._durationTransform.y*e,this._transform.skewX=r.skewX+this._durationTransform.skewX*e,this._transform.skewY=r.skewY+this._durationTransform.skewY*e,this._transform.scaleX=r.scaleX+this._durationTransform.scaleX*e,this._transform.scaleY=r.scaleY+this._durationTransform.scaleY*e,this._pivot.x=n.x+this._durationPivot.x*e,this._pivot.y=n.y+this._durationPivot.y*e,this._bone.invalidUpdate()},e._pool=[],e}();t.FastBoneTimelineState=e,egret.registerClass(e,"dragonBones.FastBoneTimelineState")}(dragonBones||(dragonBones={}));var dragonBones;!function(t){var e=function(){function e(){this._totalTime=0,this._currentTime=0,this._currentFrameIndex=0,this._currentFramePosition=0,this._currentFrameDuration=0,this._updateMode=0,this._durationColor=new t.ColorTransform}var i=(__define,e),r=i.prototype;return e.borrowObject=function(){return 0==e._pool.length?new e:e._pool.pop()},e.returnObject=function(t){e._pool.indexOf(t)<0&&(e._pool[e._pool.length]=t),t.clear()},e.clear=function(){for(var t=e._pool.length;t--;)e._pool[t].clear();e._pool.length=0},r.clear=function(){this._slot=null,this._armature=null,this._animation=null,this._animationState=null,this._timelineData=null},r.fadeIn=function(t,e,i){switch(this._slot=t,this._armature=this._slot.armature,this._animation=this._armature.animation,this._animationState=e,this._timelineData=i,this.name=i.name,this._totalTime=this._timelineData.duration,this._isComplete=!1,this._blendEnabled=!1,this._tweenColor=!1,this._currentFrameIndex=-1,this._currentTime=-1,this._tweenEasing=NaN,this._weight=1,this._timelineData.frameList.length){case 0:this._updateMode=0;break;case 1:this._updateMode=1;break;default:this._updateMode=-1}},r.updateFade=function(t){},r.update=function(t){this._updateMode==-1?this.updateMultipleFrame(t):1==this._updateMode&&(this._updateMode=0,this.updateSingleFrame())},r.updateMultipleFrame=function(t){var e=0;t/=this._timelineData.scale,t+=this._timelineData.offset;var i=this._totalTime*t,r=this._animationState.playTimes;if(0==r)this._isComplete=!1,e=Math.ceil(Math.abs(i)/this._totalTime)||1,i-=Math.floor(i/this._totalTime)*this._totalTime,i<0&&(i+=this._totalTime);else{var n=r*this._totalTime;i>=n?(i=n,this._isComplete=!0):i<=-n?(i=-n,this._isComplete=!0):this._isComplete=!1,i<0&&(i+=n),e=Math.ceil(i/this._totalTime)||1,this._isComplete?i=this._totalTime:i-=Math.floor(i/this._totalTime)*this._totalTime}if(this._currentTime!=i){this._currentTime=i;for(var s,a,o=this._timelineData.frameList,l=0,h=this._timelineData.frameList.length;l<h;++l){if(this._currentFrameIndex<0)this._currentFrameIndex=0;else{if(!(this._currentTime<this._currentFramePosition||this._currentTime>=this._currentFramePosition+this._currentFrameDuration))break;if(this._currentFrameIndex++,this._currentFrameIndex>=o.length){if(this._isComplete){this._currentFrameIndex--;break}this._currentFrameIndex=0}}a=o[this._currentFrameIndex],s&&this._slot._arriveAtFrame(s,this._animationState),this._currentFrameDuration=a.duration,this._currentFramePosition=a.position,s=a}a&&(this._slot._arriveAtFrame(a,this._animationState),this._blendEnabled=a.displayIndex>=0,this._blendEnabled?this.updateToNextFrame(e):(this._tweenEasing=NaN,this._tweenColor=!1)),this._blendEnabled&&this.updateTween()}},r.updateToNextFrame=function(e){void 0===e&&(e=0);var i=this._currentFrameIndex+1;i>=this._timelineData.frameList.length&&(i=0);var r=this._timelineData.frameList[this._currentFrameIndex],n=this._timelineData.frameList[i],s=!1;if(0==i&&this._animationState.playTimes&&this._animationState.currentPlayTimes>=this._animationState.playTimes&&((this._currentFramePosition+this._currentFrameDuration)/this._totalTime+e-this._timelineData.offset)*this._timelineData.scale>.999999?(this._tweenEasing=NaN,s=!1):r.displayIndex<0||n.displayIndex<0?(this._tweenEasing=NaN,s=!1):this._animationState.autoTween?(this._tweenEasing=this._animationState.animationData.tweenEasing,isNaN(this._tweenEasing)?(this._tweenEasing=r.tweenEasing,this._tweenCurve=r.curve,isNaN(this._tweenEasing)&&null==this._tweenCurve?s=!1:(10==this._tweenEasing&&(this._tweenEasing=0),s=!0)):s=!0):(this._tweenEasing=r.tweenEasing,this._tweenCurve=r.curve,!isNaN(this._tweenEasing)&&10!=this._tweenEasing||null!=this._tweenCurve?s=!0:(this._tweenEasing=NaN,s=!1)),s&&(r.color||n.color)?(t.ColorTransformUtil.minus(n.color||t.ColorTransformUtil.originalColor,r.color||t.ColorTransformUtil.originalColor,this._durationColor),this._tweenColor=0!=this._durationColor.alphaOffset||0!=this._durationColor.redOffset||0!=this._durationColor.greenOffset||0!=this._durationColor.blueOffset||0!=this._durationColor.alphaMultiplier||0!=this._durationColor.redMultiplier||0!=this._durationColor.greenMultiplier||0!=this._durationColor.blueMultiplier):this._tweenColor=!1,!this._tweenColor){var a,o;r.color?(a=r.color,o=!0):(a=t.ColorTransformUtil.originalColor,o=!1),(this._slot._isColorChanged||o)&&(t.ColorTransformUtil.isEqual(this._slot._colorTransform,a)||this._slot._updateDisplayColor(a.alphaOffset,a.redOffset,a.greenOffset,a.blueOffset,a.alphaMultiplier,a.redMultiplier,a.greenMultiplier,a.blueMultiplier,o))}},r.updateTween=function(){var e=this._timelineData.frameList[this._currentFrameIndex];if(this._tweenColor){var i=(this._currentTime-this._currentFramePosition)/this._currentFrameDuration;null!=this._tweenCurve?i=this._tweenCurve.getValueByProgress(i):this._tweenEasing&&(i=t.MathUtil.getEaseValue(i,this._tweenEasing)),e.color?this._slot._updateDisplayColor(e.color.alphaOffset+this._durationColor.alphaOffset*i,e.color.redOffset+this._durationColor.redOffset*i,e.color.greenOffset+this._durationColor.greenOffset*i,e.color.blueOffset+this._durationColor.blueOffset*i,e.color.alphaMultiplier+this._durationColor.alphaMultiplier*i,e.color.redMultiplier+this._durationColor.redMultiplier*i,e.color.greenMultiplier+this._durationColor.greenMultiplier*i,e.color.blueMultiplier+this._durationColor.blueMultiplier*i,!0):this._slot._updateDisplayColor(this._durationColor.alphaOffset*i,this._durationColor.redOffset*i,this._durationColor.greenOffset*i,this._durationColor.blueOffset*i,this._durationColor.alphaMultiplier*i+1,this._durationColor.redMultiplier*i+1,this._durationColor.greenMultiplier*i+1,this._durationColor.blueMultiplier*i+1,!0)}},r.updateSingleFrame=function(){var e=this._timelineData.frameList[0];if(this._slot._arriveAtFrame(e,this._animationState),this._isComplete=!0,this._tweenEasing=NaN,this._tweenColor=!1,this._blendEnabled=e.displayIndex>=0,this._blendEnabled){var i,r;e.color?(i=e.color,r=!0):(i=t.ColorTransformUtil.originalColor,r=!1),(this._slot._isColorChanged||r)&&(t.ColorTransformUtil.isEqual(this._slot._colorTransform,i)||this._slot._updateDisplayColor(i.alphaOffset,i.redOffset,i.greenOffset,i.blueOffset,i.alphaMultiplier,i.redMultiplier,i.greenMultiplier,i.blueMultiplier,r))}},e.HALF_PI=.5*Math.PI,e.DOUBLE_PI=2*Math.PI,e._pool=[],e}();t.FastSlotTimelineState=e,egret.registerClass(e,"dragonBones.FastSlotTimelineState")}(dragonBones||(dragonBones={})),function(){var t=dragonBones.DataParser,e=dragonBones.TextureData,i=function(t,e,i){this._textureDatas={},this.scale=i||1,this.texture=t,this.name=e.name,this.parseData(e)};i.rotatedDic={},i.prototype={constructor:i,getTexture:function(t){var e=this._textureDatas[t];return e&&(e.texture=this.texture,e.rotated&&(i.rotatedDic[t]=1)),e},dispose:function(){this.texture=null,this._textureDatas={}},getRegion:function(t){var i=this._textureDatas[t];return i&&i instanceof e?i.region:null},getFrame:function(t){var i=this._textureDatas[t];return i&&i instanceof e?i.frame:null},parseData:function(e){this._textureDatas=t.parseTextureAtlasData(e,this.scale)}},dragonBones.TextureAtlas=i}(),function(t){var e=(180/Math.PI,dragonBones.TextureAtlas),i=function(){t.call(this,this),this._display=null};__extends(i,t,{dispose:function(){if(this._displayList)for(var e=this._displayList.length,i=0;i<e;i++){var r=this._displayList[i];"function"==typeof r.dispose&&r.dispose()}t.prototype.dispose(),this._display=null},_updateDisplay:function(t){this._display=t},_getDisplayIndex:function(){return this._display&&this._display.parent?this._display.parent.getChildIndex(this._display):-1},_addDisplayToContainer:function(t,e){this._display&&t&&(e?t.addChildAt(this._display,e):t.addChild(this._display))},_removeDisplayFromContainer:function(){this._display&&this._display.parent&&this._display.parent.removeChild(this._display)},_updateTransform:function(){this._display&&(this._display.position.x=this._global.x,this._display.position.y=this._global.y,this._display.scale.x=this._global.scaleX,this._display.scale.y=this._global.scaleY,this._display.rotation=this._global.skewX)},_updateDisplayVisible:function(t){this._display&&this._parent&&(this._display.visible=this._parent._visible&&this._visible&&t)},_updateDisplayColor:function(e,i,r,n,s,a,o,l,h){t.prototype._updateDisplayColor.call(this,e,i,r,n,s,a,o,l,h),this._display&&(this._display.alpha=s)},_updateDisplayBlendMode:function(t){},_calculateRelativeParentTransform:function(){this._global.scaleX=this._origin.scaleX*this._offset.scaleX,this._global.scaleY=this._origin.scaleY*this._offset.scaleY,this._global.skewX=this._origin.skewX+this._offset.skewX,this._global.skewY=this._origin.skewY+this._offset.skewY,this._global.x=this._origin.x+this._offset.x+this._parent._tweenPivot.x,this._global.y=this._origin.y+this._offset.y+this._parent._tweenPivot.y,this._displayDataList&&this._currentDisplayIndex>=0&&this._displayDataList[this._currentDisplayIndex]&&1==e.rotatedDic[this._displayDataList[this._currentDisplayIndex].name]&&(this._global.skewX-=1.57,this._global.skewY-=1.57)}}),dragonBones.PixiSlot=i}(dragonBones.Slot),function(t){var e=dragonBones.Armature,i=dragonBones.PixiSlot,r=function(){t.call(this,this)};__extends(r,t,{_generateArmature:function(){var t=new e(new PIXI.Container);return t},_generateSlot:function(){var t=new i;return t},_generateDisplay:function(t,e,i,r){var n=t.getTexture(e),s=n.region;this._textureCache=this._textureCache||{},this._textureCache[t.texture.src]||(this._textureCache[t.texture.src]=new PIXI.BaseTexture(t.texture));var a=new PIXI.Texture(this._textureCache[t.texture.src],new PIXI.Rectangle(s.x,s.y,s.width,s.height)),o=new PIXI.Sprite(a);if(isNaN(i)||isNaN(r)){var l=t.getFrame(e);null!=l?(i=l.width/2,r=l.height/2):(i=n.region.width/2,r=n.region.height/2)}return o.pivot.x=i,o.pivot.y=r,o}}),dragonBones.PixiFactory=r}(dragonBones.BaseFactory);var EHDI=EHDI||Object.create(null);EHDI.aka={AutoDetectRenderer:PIXI.autoDetectRenderer,CanvasRenderer:PIXI.CanvasRenderer,AbstractFilter:PIXI.Filter,Container:PIXI.Container,Sprite:PIXI.Sprite,AnimatedSprite:PIXI.extras.AnimatedSprite,PixiText:PIXI.Text,PixiFilters:PIXI.filters,TextureCache:PIXI.utils.TextureCache,Loader:PIXI.loader,Graphics:PIXI.Graphics,Ticker:PIXI.ticker,Rectangle:PIXI.Rectangle,TilingSprite:PIXI.extras.TilingSprite},EHDI.config={isTransition:!1};var EHDI=EHDI||Object.create(null);EHDI.displays=EHDI.displays||Object.create(null),EHDI.displays.Button=function(t){this.pointerUp=t,this.pointerDown=arguments.length<=1||void 0===arguments[1]?void 0:arguments[1],this.mouseOver=arguments.length<=2||void 0===arguments[2]?void 0:arguments[2],this.disabledTexture=arguments.length<=3||void 0===arguments[3]?void 0:arguments[3],this.scaleOnPointerDown=arguments.length<=4||void 0===arguments[4]?void 0:arguments[4];var e=!1;this.onClickFunction=null,this.baseScale={x:1,y:1},PIXI.Sprite.call(this,t),this.sfx=null,this.isDisabled=function(){return e},this.setDisabled=function(t){e=t},this.interactive=!0,this.anchor.x=.5,this.anchor.y=.5},EHDI.displays.Button.prototype=Object.create(EHDI.aka.Sprite.prototype),EHDI.displays.Button.prototype.touchstart=function(t){this.isDisabled()!==!0&&(this.pointerDown&&(this.texture=this.pointerDown),this.scaleOnPointerDown&&(this.baseScale.x=this.scale.x,this.baseScale.y=this.scale.y,this.scale.x=this.scaleOnPointerDown,this.scale.y=this.scaleOnPointerDown))},EHDI.displays.Button.prototype.touchend=function(t){this.isDisabled()!==!0&&(this.pointerUp&&(this.texture=this.pointerUp),this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y))},EHDI.displays.Button.prototype.touchendoutside=function(t){this.isDisabled()!==!0&&(this.pointerUp&&(this.texture=this.pointerUp),this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y))},EHDI.displays.Button.prototype.tap=function(t){this.isDisabled()!==!0&&EHDI.config.isTransition!==!0&&this.onClickFunction&&this.onClickFunction.apply(null,this.onClickArgs)},EHDI.displays.Button.prototype.mouseover=function(t){this.isDisabled()!==!0&&this.mouseOver&&(this.texture=this.mouseOver)},EHDI.displays.Button.prototype.mouseout=function(t){this.isDisabled()!==!0&&(this.pointerUp&&(this.texture=this.pointerUp),this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y))},EHDI.displays.Button.prototype.mousedown=function(t){this.isDisabled()!==!0&&(this.pointerDown&&(this.texture=this.pointerDown),this.scaleOnPointerDown&&(this.baseScale.x=this.scale.x,this.baseScale.y=this.scale.y,this.scale.x=this.scaleOnPointerDown,this.scale.y=this.scaleOnPointerDown))},EHDI.displays.Button.prototype.mouseup=function(t){this.isDisabled()!==!0&&(this.pointerUp&&(this.texture=this.pointerUp),this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y))},EHDI.displays.Button.prototype.click=function(t){this.isDisabled()!==!0&&EHDI.config.isTransition!==!0&&this.onClickFunction&&this.onClickFunction.apply(null,this.onClickArgs)},EHDI.displays.Button.prototype.mouseupoutside=function(t){this.isDisabled()!==!0&&(this.pointerUp&&(this.texture=this.pointerUp),this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y))},EHDI.displays.Button.prototype.disable=function(t){this.setDisabled(t),this.disabledTexture&&t?(this.texture=this.disabledTexture,this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y)):this.pointerUp&&!t&&(this.texture=this.pointerUp,this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y))},EHDI.displays.Button.defaultSFX=null,EHDI.displays.Button.prototype.setSFX=function(t){this.sfx=t},EHDI.displays.Button.prototype.setOnClickFunction=function(t){this.onClickFunction=t,this.onClickArgs=arguments.length<=1||void 0===arguments[1]?[]:arguments[1]},EHDI.displays.Button.prototype.destroy=function(){EHDI.aka.Sprite.prototype.destroy.apply(this,arguments)},EHDI.displays.Button.prototype.dispose=function(){delete this.pointerUp,delete this.pointerDown,delete this.mouseOver,delete this.disabledTexture,delete this.onClickFunction,delete this.baseScale,this.destroy({children:!0})};var EHDI=EHDI||Object.create(null);EHDI.displays=EHDI.displays||Object.create(null),EHDI.displays.TextSprite=function(t){EHDI.aka.PixiText.call(this,t.TEXT,t.STYLE)},EHDI.displays.TextSprite.prototype=Object.create(EHDI.aka.PixiText.prototype);var EHDI=EHDI||Object.create(null);EHDI.displays=EHDI.displays||Object.create(null),EHDI.displays.ToggleButton=function(t,e,i,r){this.active=!(arguments.length<=4||void 0===arguments[4])&&arguments[4],this.scaleOnPointerDown=arguments.length<=5||void 0===arguments[5]?1:arguments[5],this.baseScale={x:1,y:1},this.inactivePointerUp=t,this.inactivePointerDown=e,this.activePointerUp=i,this.activePointerDown=r,this.onClickFunction=null,this.active===!1?PIXI.Sprite.call(this,t):PIXI.Sprite.call(this,i),this.interactive=!0,this.anchor.x=.5,this.anchor.y=.5},EHDI.displays.ToggleButton.prototype=Object.create(PIXI.Sprite.prototype),EHDI.displays.ToggleButton.prototype.touchstart=function(t){this.active===!1?this.texture=this.inactivePointerDown:this.texture=this.activePointerDown,this.scaleOnPointerDown&&(this.baseScale.x=this.scale.x,this.baseScale.y=this.scale.y,this.scale.x=this.scaleOnPointerDown,this.scale.y=this.scaleOnPointerDown)},EHDI.displays.ToggleButton.prototype.touchend=function(t){this.active===!1?this.texture=this.inactivePointerUp:this.texture=this.activePointerUp,this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y)},EHDI.displays.ToggleButton.prototype.touchendoutside=function(t){this.active===!1?this.texture=this.inactivePointerUp:this.texture=this.activePointerUp,this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y)},EHDI.displays.ToggleButton.prototype.tap=function(t){ this.active=!this.active,this.active===!1?this.texture=this.inactivePointerUp:this.texture=this.activePointerUp,this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y),this.onClickFunction&&this.onClickFunction(this.active)},EHDI.displays.ToggleButton.prototype.mouseout=function(t){this.active===!1?this.texture=this.inactivePointerUp:this.texture=this.activePointerUp,this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y)},EHDI.displays.ToggleButton.prototype.mousedown=function(t){this.active===!1?this.texture=this.inactivePointerDown:this.texture=this.activePointerDown,this.scaleOnPointerDown&&(this.baseScale.x=this.scale.x,this.baseScale.y=this.scale.y,this.scale.x=this.scaleOnPointerDown,this.scale.y=this.scaleOnPointerDown)},EHDI.displays.ToggleButton.prototype.mouseup=function(t){this.active===!1?this.texture=this.inactivePointerUp:this.texture=this.activePointerUp,this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y)},EHDI.displays.ToggleButton.prototype.click=function(t){this.active=!this.active,this.active===!1?this.texture=this.inactivePointerUp:this.texture=this.activePointerUp,this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y),this.onClickFunction&&this.onClickFunction(this.active)},EHDI.displays.ToggleButton.prototype.mouseupoutside=function(t){this.active===!1?this.texture=this.inactivePointerUp:this.texture=this.activePointerUp,this.scaleOnPointerDown&&(this.scale.x=this.baseScale.x,this.scale.y=this.baseScale.y)},EHDI.displays.ToggleButton.prototype.dispose=function(){delete this.inactivePointerUp,delete this.inactivePointerDown,delete this.activePointerUp,delete this.activePointerDown,delete this.onClickFunction,delete this.baseScale,this.destroy({children:!0})},EHDI.displays.ToggleButton.prototype.setOnClickFunction=function(t){this.onClickFunction=t};var EHDI=EHDI||Object.create(null);EHDI.CameraManager=function(t){var e=!1,i=t,r=function(t,e){switch(t){case 3:e.rotation=Math.PI,e.position.set(e.width,e.height);break;case 6:e.rotation=.5*Math.PI,e.position.set(e.height,0);break;case 8:e.rotation=-.5*Math.PI,e.position.set(0,e.width)}},n=function(t){var e=document.getElementById("photo");e.click(),e.onchange=function(i){var r,n=i.target.files;if(n&&n.length>0){r=n[0];var s=function(t){t=t.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var e=atob(t),i=e.length,r=new Uint8Array(i),n=0;n<i;n++)r[n]=e.charCodeAt(n);return r.buffer},a=new FileReader;a.onload=function(e){var i=new Image,r=EXIF.readFromBinaryFile(s(this.result)),n=r.Orientation;i.src=e.target.result,i.onload=function(){var e=new PIXI.BaseTexture(i),r=new PIXI.Texture(e);t.apply(null,[r,n])}},a.readAsDataURL(r)}e.value=""}},s=function(t){var e=document.createElement("canvas"),i=document.body.querySelector("video");e.width=i.videoWidth,e.height=i.videoHeight,e.getContext("2d").drawImage(i,0,0,i.videoWidth,i.videoHeight),i.pause(),i.src="",window.stream.getTracks()[0].stop(),document.getElementById("vidiv").removeChild(i);var r=new Image;r.src=e.toDataURL(),r.onload=function(){var e=new PIXI.BaseTexture(r),i=new PIXI.Texture(e);t.apply(null,[i])}};return{getVideoSetup:function(){return e},setupVideo:function(t){if(e!==!0){var r={audio:!1,video:!0};void 0===navigator.mediaDevices&&(navigator.mediaDevices={}),void 0===navigator.mediaDevices.getUserMedia&&(navigator.mediaDevices.getUserMedia=function(t){var e=navigator.webkitGetUserMedia||navigator.mozGetUserMedia;return e?new Promise(function(i,r){e.call(navigator,t,i,r)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}),navigator.mediaDevices.getUserMedia(r).then(function(r){var n=document.createElement("video");n.autoplay=!0,i.style.position="absolute",n.style.position="absolute",n.width=i.width,n.height=i.height,n.style.display="block",n.style.marginTop=i.style.marginTop,n.style.marginBottom=i.style.marginBottom,n.style.marginLeft=i.style.marginLeft,n.style.marginRight=i.style.marginRight,document.getElementById("vidiv").appendChild(n);var s=document.querySelector("video");window.stream=r,s.src=URL.createObjectURL(r),s.play(),s.onloadeddata=function(){e=!0,t()}}).catch(function(e){alert(e.name+": "+e.message),t()})}},takePhoto:function(t,i){if(i){var a=function(e,i){var n=new EHDI.aka.Container,s=new EHDI.aka.Sprite(e);r(i,s),n.addChild(s),t.apply(null,[n])};n(a)}else{var o=document.body.querySelector("video");if("undefined"!=typeof o&&null!==o){var a=function(i){e=!1;var r=new EHDI.aka.Container,n=new EHDI.aka.Sprite(i);r.addChild(n),t.apply(null,[r])};s(a)}}}}};var EHDI=EHDI||Object.create(null);EHDI.Event=function(t,e){this.name=t,this.data=e,this.callbacks=[]},EHDI.Event.prototype.registerCallback=function(t){this.callbacks.push(t)},EHDI.Event.prototype.unregisterCallback=function(t){var e=this.callbacks.indexOf(t);e>-1&&this.callbacks.splice(e,1)},EHDI.Event.prototype.clearCallbacks=function(){this.callbacks.length=0},EHDI.EventManager=function(){"use restrict";var t=Object.create(null),e=Object.create(null);return t.register=function(t,i){var r=new EHDI.Event(t,i);e[t]=r},t.unregister=function(t){if(!(t in e))throw new Error("event not found");e[t].clearCallbacks(),delete e[t]},t.dispatch=function(t){if(!(t in e))throw new Error("event is unregistered");for(var i=e[t].callbacks,r=0,n=i.length;r<n;r++)"undefined"!=typeof e[t].data?i[r](e[t].data):i[r]()},t.addListener=function(t,i){if(!(t in e))throw new Error("event is unregistered");e[t].registerCallback(i)},t.removeListener=function(t,i){if(!(t in e))throw new Error("event is unregistered");e[t].callbacks.indexOf(i)<=-1&&console.log("callback listener not found"),e[t].unregisterCallback(i)},t};var EHDI=EHDI||Object.create(null);EHDI.JSONManager=function(t,e){"use restrict";var i=(EHDI.aka.PixiText,t),r=e;return{setConfigData:function(t){"undefined"==typeof i&&(i=t)},setLocaleData:function(t){"undefined"==typeof r&&(r=t)},getLocale:function(t){return arguments.length<1?r.data:r.data[t]},getConfig:function(){return i}}},function(){"use restrict";EHDI=EHDI||Object.create(null),EHDI.Assets={images:EHDI.aka.TextureCache},EHDI.LoadManager=function(){var t,e,i=["ogg","mp3","wav"],r=["ttf","woff","woff2","otf"],n=Object.create(null),s=[],a=[],o=[],l=null,h=[],u=!1,c=0,d=0,f=0,p=[],_=[],m=0,g=function(){e=EHDI.aka.Loader,t=new createjs.LoadQueue,createjs.Sound.alternateExtensions=i,Object.defineProperty(EHDI.Assets,"cjAssets",{value:t,enumerable:!1}),t.installPlugin(createjs.Sound),t.addEventListener("progress",E),t.addEventListener("complete",S),t.addEventListener("error",D),e.on("progress",b),e.on("error",x)};EHDI.Assets.fetch=function(e){var i=t.getResult(e);return i||(i=EHDI.aka.Loader.resources[e]||null),i};var v=function(){a.length=0,s.length=0,p.length=0,_.length=0},y=function(t,e){var i=t.filter(function(t){"string"!=typeof t&&(t=t.url);var i=t.split(".").pop();return e.indexOf(i)!==-1});return i},T=function(t){var e=t.split("/").pop().split(".")[0],i=document.createElement("style"),r="@font-face {font-family: '"+e+"'; src: url('"+t+"');}";i.appendChild(document.createTextNode(r)),document.head.appendChild(i)},b=function(t,e){c=d+t.progress*a.length/f},x=function(t,e,i){console.log("PixiJS Loading Error!"),console.log(t)},w=function(t,e){v(),u=!1,o.length>0&&(o.length=0),"function"==typeof l&&l.apply(null,h)},E=function(t){var e=t.progress>1?1:t.progress;c=e*s.length/f*100,d=c},S=function(t){return a.length<=0?void w():void e.add(a).load(w)},D=function(t){console.log("CreateJS Loading Error"),console.log(t)},A=function(e,i,r){var s,a,o,l,h,u,c,d,f=".json";s=t.getResult(i),a=s.locale,l=a.url,h="undefined"!=typeof a.lang?a.lang:"en",o=a.id+h,c="undefined"==typeof a.font[h]?a.font.default:a.font[h],d=[l+o+f],u=function(){e.setConfigData(s),e.setLocaleData(t.getResult(o)),"function"==typeof r&&r()},n.queueStrings(d),n.queueFonts(c),n.start(u)},P=function(){for(var e,i;p.length>0;)i=p.pop(),e=t.getItem(i),t.remove(e.id),"sound"===e.type&&createjs.Sound.removeSound(e.id);for(;_.length>0;)i=_.pop(),e=EHDI.Assets.images[i],e.destroy(!0);s.length>0?t.loadManifest(s):S()};return g(),n.queueStrings=function(t){for(var e,i,r=[];t.length>0;)e=t.pop(),i=e.split("/").pop().split(".")[0],r.push({id:i,src:e});s=s.concat(r)},n.queueFonts=function(t){for(var e,i,r=[];t.length>0;)e=t.pop(),i=e.split("/").pop().split(".")[0],o.push(T(e)),r.push({name:i,url:e})},n.queueAudios=function(t){for(var e,i,r=[];t.length>0;)e=t.pop(),"string"!=typeof e?(i=e.id,e=e.url):i=e.split("/").pop().split(".")[0],r.push({id:i,src:e});s=s.concat(r)},n.queueImages=function(t){for(var e,i,r=[];t.length>0;)e=t.pop(),"string"!=typeof e?(i=e.id,e=e.url):i=e.split("/").pop().split(".")[0],r.push({name:i,url:e});a=a.concat(r)},n.queueAssets=function(t){var e=function(t,e){return t=t.filter(function(t){return e.indexOf(t)<0})},s=y(t,r),a=y(t,i),o=e(t,s);o=e(o,a),n.queueFonts(s),n.queueAudios(a),n.queueImages(o)},n.loadConfig=function(t,e,i){if("string"!=typeof t)throw new Error("Invalid URL");if("undefined"==typeof e)throw new Error("needs JSONManager component");if(u)throw new Error("Load manager is currently running");var r=t.split("/").pop().split(".")[0];v(),n.queueStrings([t]),n.start(A,[e,r,i])},n.getProgress=function(){return c},n.start=function(t,i){if(u)throw new Error("Load manager is currently running");l=t,h=i,u=!0,c=0,d=0,f=s.length+a.length,m=p.length+_.length,e.reset(),P()},n.unloadAssets=function(t){var e=function(t,e){return t=t.filter(function(t){return e.indexOf(t)<0})},n=y(t,r),s=y(t,i),a=e(t,s);a=e(a,n),p=p.concat(s),_=_.concat(a)},n.unloadStrings=function(t){p=p.concat(t)},n}()}();var EHDI=EHDI||Object.create(null);EHDI.ScaleManager=function(t,e,i,r,n){function s(){c=window.innerWidth/r,d=window.innerHeight/n,i===EHDI.ScaleManager.DOCKING.WIDTH?v=c:i===EHDI.ScaleManager.DOCKING.HEIGHT?v=d:i===EHDI.ScaleManager.DOCKING.AUTO?v=Math.min(c,d):i===EHDI.ScaleManager.DOCKING.FULLSCREEN&&(v=Math.max(c,d));var s=t.view;s.style.paddingLeft=0,s.style.paddingRight=0,s.style.paddingTop=0,s.style.paddingBottom=0,s.style.display="block",y=Math.ceil(r*v),T=Math.ceil(n*v),e.scale.x=e.scale.y=v,t.resize(y,T),o(),window.scrollTo(0,0),a()}function a(){return f=window.innerHeight>window.innerWidth?EHDI.ScaleManager.SCREEN_ORIENTATION.PORTRAIT:EHDI.ScaleManager.SCREEN_ORIENTATION.LANDSCAPE}function o(){var e=t.view;e.style.marginTop=0,e.style.marginBottom=0,e.style.marginLeft=0,e.style.marginRight=0,(i==EHDI.ScaleManager.DOCKING.HEIGHT||i==EHDI.ScaleManager.DOCKING.FULLSCREEN||i==EHDI.ScaleManager.DOCKING.AUTO&&y<window.innerWidth)&&(_=(window.innerWidth-y)/2,e.style.marginLeft=_+"px",e.style.marginRight=_+"px"),(i==EHDI.ScaleManager.DOCKING.WIDTH||i==EHDI.ScaleManager.DOCKING.FULLSCREEN||i==EHDI.ScaleManager.DOCKING.AUTO&&T<window.innerHeight)&&(_=(window.innerHeight-T)/2,e.style.marginTop=_+"px",e.style.marginBottom=_+"px")}function l(){p||window.addEventListener("resize",function(){s(),p=!0})}function h(){return v}function u(){return f}var c,d,f,p,_,m=document.createElement("style"),g="html, body {padding : 0; margin : 0; overflow : hidden; width: 100%; height: 100%}";m.appendChild(document.createTextNode(g)),document.head.appendChild(m);var v=1,y=r,T=n;return a(),s(),{getScale:h,getOrientation:u,scaleToWindow:s,addAutomaticScaling:l}},EHDI.ScaleManager.SCREEN_ORIENTATION={LANDSCAPE:0,PORTRAIT:1},EHDI.ScaleManager.DOCKING={WIDTH:0,HEIGHT:1,AUTO:2,FULLSCREEN:3};var EHDI=EHDI||Object.create(null);EHDI.scene=EHDI.scene||Object.create(null),EHDI.SceneManager=function(t,e,i){var r,n=arguments.length<=2||"undefined"==typeof arguments[3]?document.getElementById("game-canvas"):arguments[3],s=new EHDI.aka.Container,a={view:n,antialiasing:!1,transparent:!0,resolution:window.devicePixelRatio,autoResize:!0};r=i?new EHDI.aka.CanvasRenderer(t,e,a):new EHDI.aka.AutoDetectRenderer(t,e,a);var o=t,l=e,h=[],u=null,c=new EHDI.aka.Container,d=new EHDI.aka.Container,f=new EHDI.aka.Container;return s.addChild(c),s.addChild(d),s.addChild(f),{getStage:function(){return s},getRenderer:function(){return r},getStageWidth:function(){return o},getStageHeight:function(){return l},defaultWidth:t,defaultHeight:e,renderScreen:function(){r.render(s)},changeScene:function(t){var e=arguments.length<=1||"undefined"==typeof arguments[1]?null:arguments[1];if("function"==typeof t.screenWillAppear&&t.screenWillAppear(),u&&"function"==typeof u.screenWillDisappear&&u.screenWillDisappear(),e){var i={};EHDI.config.isTransition=!0,e.x&&(t.x=e.x.from,i.x=e.x.to),e.y&&(t.y=e.y.from,i.y=e.y.to),e.alpha&&(t.alpha=e.alpha.from,i.alpha=e.alpha.to),c.addChild(t),i.onComplete=function(){EHDI.config.isTransition=!1,u&&("function"==typeof u.screenDidDisappear&&u.screenDidDisappear(),c.removeChild(u)),"function"==typeof t.screenDidAppear&&t.screenDidAppear(),u=t},TweenLite.to(t,e.duration,i)}else c.addChild(t),u&&(c.removeChild(u),"function"==typeof u.screenDidDisappear&&u.screenDidDisappear()),"function"==typeof t.screenDidAppear&&t.screenDidAppear(),u=t},pushPopUp:function(t){var e=arguments.length<=1||"undefined"==typeof arguments[1]?null:arguments[1];if("function"==typeof t.popUpWillAppear&&t.popUpWillAppear(),"function"==typeof u.popUpWillAppear&&0===h.length&&u.popUpWillAppear(),e){var i={};EHDI.config.isTransition=!0,e.x&&(t.x=e.x.from,i.x=e.x.to),e.y&&(t.y=e.y.from,i.y=e.y.to),e.alpha&&(t.alpha=e.alpha.from,i.alpha=e.alpha.to),d.addChild(t),i.onComplete=function(){EHDI.config.isTransition=!1,"function"==typeof t.popUpDidAppear&&t.popUpDidAppear(),"function"==typeof u.popUpDidAppear&&0===h.length&&u.popUpDidAppear(),h.push(t)},TweenLite.to(t,e.duration,i)}else h.push(t),d.addChild(t),"function"==typeof t.popUpDidAppear&&t.popUpDidAppear(),"function"==typeof u.popUpDidAppear&&0===h.length&&u.popUpDidAppear()},popPopUp:function(){var t=arguments.length<=0||"undefined"==typeof arguments[0]?null:arguments[0];if(h.length<=0)throw"Pop Up list is empty!";var e=h.pop();if("function"==typeof e.popUpWillDisappear&&e.popUpWillDisappear(),"function"==typeof u.popUpWillDisappear&&0===h.length&&u.popUpWillDisappear(),t){var i={};EHDI.config.isTransition=!0,t.x&&(e.x=t.x.from,i.x=t.x.to),t.y&&(e.y=t.y.from,i.y=t.y.to),t.alpha&&(e.alpha=t.alpha.from,i.alpha=t.alpha.to),i.onComplete=function(){EHDI.config.isTransition=!1,"function"==typeof e.popUpDidDisappear&&e.popUpDidDisappear(),"function"==typeof u.popUpDidDisappear&&0===h.length&&u.popUpDidDisappear(),d.removeChild(e)},TweenLite.to(e,t.duration,i)}else d.removeChild(e),"function"==typeof e.popUpDidDisappear&&e.popUpDidDisappear(),"function"==typeof u.popUpDidDisappear&&0===h.length&&u.popUpDidDisappear()},popAllPopUps:function(){for(;h.length>0;){var t=h.pop();"function"==typeof t.popUpWillDisappear&&t.popUpWillDisappear(),"function"==typeof u.popUpWillDisappear&&0===h.length&&u.popUpWillDisappear(),d.removeChild(t),"function"==typeof t.popUpDidDisappear&&t.popUpDidDisappear(),"function"==typeof u.popUpDidDisappear&&0===h.length&&u.popUpDidDisappear()}},addNotification:function(t){f.addChild(t)},removeNotification:function(t){var e=f.children.indexOf(t);e>-1&&f.removeChild(t)}}},EHDI.scene.TransitionParameter=function(t,e){this.from=t,this.to=e},EHDI.scene.TransitionParameter.constructor=EHDI.scene.TransitionParameter;var EHDI=EHDI||Object.create(null);EHDI.SoundManager=function(t){var e=null,i=[],r=null,n=!1,s=!0,a=!0,o={bgm:1,sfx:1,vo:1},l=t||!0,h=function(){e&&(e.paused=!0),i.forEach(function(t){t.paused=!0}),r&&(r.paused=!0)},u=function(){a&&(e&&(e.paused=!1),i.forEach(function(t){t.paused=!1}),r&&(r.paused=!1))},c=function(){window.document.webkitHidden||window.document.hidden?h():u()},d=function(){window.addEventListener("blur",h),window.addEventListener("focus",u),window.addEventListener("pagehide",h),window.addEventListener("pageshow",u),window.addEventListener("webkitvisibilitychange",c),window.addEventListener("webkitvisibilitychange",c)},f=function(){window.removeEventListener("blur",h),window.removeEventListener("focus",u),window.removeEventListener("pagehide",h),window.removeEventListener("pageshow",u),window.removeEventListener("webkitvisibilitychange",c),window.removeEventListener("webkitvisibilitychange",c)};return l&&d(),{set enableInterrupt(t){"boolean"==typeof t&&l!==t&&(l=t,l?d():f())},get enableInterrupt(){return l},set sfxVolume(t){"number"==typeof t&&(o.sfx=t,i&&i.forEach(function(t){t.volume=t.volume*o.sfx}))},get sfxVolume(){return o.sfx},set bgmVolume(t){"number"==typeof t&&(o.bgm=t,e&&(e.volume=e.volume*o.bgm))},get bgmVolume(){return o.bgm},set voVolume(t){"number"==typeof t&&(o.vo=t,r&&(r.volume=r.volume*o.vo))},get voVolume(){return o.vo},playBGM:function(t,i){if(i=i*o.bgm||o.bgm,"string"==typeof t)return e instanceof createjs.AbstractSoundInstance&&(e.stop(),e.destroy()),e=createjs.Sound.play(t,{loop:-1}),e.volume=i,e.muted=n,e;throw"pass string id of BGM to be played"},stopBGM:function(){e&&(e.stop(),e.destroy(),e=null)},pauseBGM:function(){e&&(e.paused=!0)},resumeBGM:function(){e&&(e.paused=!1)},playSFX:function(t,e){if(e=e*o.sfx||o.sfx,"string"==typeof t){var r=createjs.Sound.play(t);r.volume=e,r.muted=n,i.push(r);var s=r.on("complete",function(t){var e=i.indexOf(t.currentTarget);if(e>-1){var n=i.splice(e,1)[0];r.off("complete",s),n.destroy()}});return r}throw"pass string id of SFX to be played"},stopSFX:function(t){var e=i.indexOf(t);if(e>-1){var r=i.splice(e,1)[0];r.stop(),r.destroy()}},stopAllSFX:function(){i.forEach(function(t){t.stop(),t.destroy()}),i=[]},pauseAllSFX:function(){i.forEach(function(t){t.paused=!0})},resumeAllSFX:function(){i.forEach(function(t){t.paused=!1})},playVO:function(t,e){if(e=e*o.vo||o.vo,"string"==typeof t)return r=createjs.Sound.play(t),r.volume=e,r.muted=n,r;throw"pass string ID of VO to be played"},stopVO:function(){r&&(r.stop(),r.destroy())},pauseVO:function(){r&&(r.paused=!0)},resumeVO:function(){r&&(r.paused=!1)},setMute:function(){var t=arguments.length<=0||"undefined"==typeof arguments[0]?!n:arguments[0];n=t,e&&(e.muted=n),i.forEach(function(t){t.muted=n}),r&&(r.muted=n)},getMuted:function(){return n},setDeactivate:function(){var t=arguments.length<=0||"undefined"==typeof arguments[0]?!s:arguments[0];s=t,e&&(e.paused=!s),i.forEach(function(t){t.paused=!s}),r&&(r.muted=!s)},autoResumeToggle:function(t){a=t}}};var EHDI=EHDI||Object.create(null);EHDI.StorageManager=function(){"use restrict";var t="game_data",e=!0,i=JSON.parse(localStorage.getItem(t)),r=function(){try{return localStorage.setItem("t3st","1"),localStorage.removeItem("t3st"),!0}catch(t){return!1}},n=function(){if(!e)return!1;var r;return null===i&&null!==t?(i=Object.create(null),r=JSON.stringify(i),localStorage.setItem(t,r),!0):null!==i};return e=r(),e?n():(i=Object.create(null),console.log("Local storage is not supported. Current session will not be saved offline")),{checkLocalData:n,setDataID:function(e){(arguments.length<0||"string"!=typeof e)&&(e="game_data"),t=e,n()},getDataID:function(){return t},getLocalInfo:function(t){if("string"!=typeof t)throw"invalid key";return"undefined"==typeof i[t]?null:i[t]},setLocalInfo:function(e,r){if(arguments.length<2)throw"invalid parameters";if("string"!=typeof e)throw"invalid key";i[e]=r,n()&&localStorage.setItem(t,JSON.stringify(i))},deleteLocalInfo:function(e){if("string"!=typeof e)throw"invalid key";delete i[e],localStorage.setItem(t,JSON.stringify(i))},clearLocalData:function(){var r;i=Object.create(null),e&&(r=JSON.stringify(i),localStorage.setItem(t,r))}}};var EHDI=EHDI||Object.create(null);EHDI.UpdateManager=function(t,e){var i,r,n,s,a,o=!1,l=[],h=0,u=function(){window.requestAnimationFrame(u);var t=new Date;r||(r=(new Date).getTime());var e=t-i,c=(t.getTime()-r)/1e3;if(h++,n=Math.floor(h/c),c>1&&(r=(new Date).getTime(),h=0),l.length>0)for(var d=0;d<l.length;d++)l[d](e);i=t,o&&s.render(a)};return"undefined"!=typeof t&&"undefined"!=typeof e&&(o=!0,s=t,a=e),u(),{getFPS:function(){return n},setAutoRender:function(t){o=t},isAutoRendering:function(){return o},addFrameListener:function(t){if("function"!=typeof t)throw new Error("Callback must be a function");l.push(t)},hasFrameListener:function(t){if("function"!=typeof t)throw new Error("Callback must be a function");var e=l.indexOf(t);return e>-1},removeFrameListener:function(t){if("function"!=typeof t)throw"Callback must be a function";var e=l.indexOf(t);e>-1&&l.splice(e,1)},removeAllFrameListeners:function(){l.length=0}}},function(t){t.BrowserInfo=Object.create(null);var e,i,r=window.navigator,n=t.BrowserInfo,s=r.userAgent,a=function(){var t=window.screen.height,e=window.screen.width;return 320===e&&480===t?"4":375===e&&667===t?"6":414===e&&736===t?"6+":320===e&&568===t?"5":t<=480?"1-3":" "};return n.platformType=r.platform,n.platformVersion="",n.browserName=r.appName,n.browserVersion=r.appVersion,n.isMobileDevice=!1,n.isIOS=!1,n.deviceType="desktop",r.platform.indexOf("iPhone")!==-1?(n.isMobileDevice=!0,n.platformType="iPhone "+a(),n.deviceType="phone",n.isIOS=!0,e=/OS (\d+_\d+)/g,s.search(e)!==-1&&(i=String(s.match(e)),n.platformVersion=i.replace("_","."))):r.platform.indexOf("iPod")!=-1?(n.isMobileDevice=!0,n.platformType="iPod",n.deviceType="tablet",n.isIOS=!0,e=/OS (\d+_\d+)/g,s.search(e)!==-1&&(i=String(s.match(e)),n.platformVersion=i.replace("_","."))):r.platform.indexOf("iPad")!=-1?(n.isMobileDevice=!0,n.platformType="iPad",n.deviceType="tablet",n.isIOS=!0,e=/OS (\d+_\d+)/g,s.search(e)!==-1&&(i=String(s.match(e)),n.platformVersion=i.replace("_","."))):s.indexOf("Android")!=-1?(n.isMobileDevice=!0,n.platformType="Android",n.deviceType="tablet",e=/OS (\d+_\d+)/g,s.search(e)!==-1&&(i=String(s.match(e)),n.platformVersion=i.replace("_","."))):s.indexOf("Kindle")!=-1||s.indexOf("Silk")!=-1?(n.isMobileDevice=!0,n.platformType="Android",n.deviceType="tablet"):s.indexOf("IEMobile")!=-1?(n.isMobileDevice=!0,n.platformType="IEMobile",n.deviceType="phone",e=/IEMobile\/(\d+\.\d+)/g,s.search(e)!==-1&&(n.platformVersion=String(s.match(e)))):r.platform.indexOf("Win")!=-1?(n.platformType="Windows",n.deviceType="desktop"):r.platform.indexOf("Mac")!=-1?(n.platformType="MAC",n.deviceType="desktop",e=/OS (\d+_\d+)/g,s.search(e)!==-1&&(i=String(s.match(e)),n.platformVersion=i.replace("_","."))):r.platform.indexOf("Linux")!=-1&&(n.platformType="Linux",n.deviceType="desktop"),s.indexOf("Firefox")!=-1?(n.browserName="Firefox",e=/Firefox[\/\s](\d+\.\d+)/g,s.search(e)!==-1&&(n.browserVersion=String(s.match(e)))):s.indexOf("MSIE")!=-1?(n.browserName="MSIE",e=/MSIE (\d+\.\d+);/g,s.search(e)!==-1&&(n.browserVersion=String(s.match(e)))):s.indexOf("Edge")!=-1?n.browserName="MS Edge":s.indexOf("Opera")!=-1?(n.browserName="Opera",e=/Opera[\/\s](\d+\.\d+)/g,s.search(e)!==-1&&(n.browserVersion=String(s.match(e)))):s.indexOf("Chrome")!=-1?(n.browserName="Chrome",e=/Chrome[\/\s](\d+\.\d+)/g,s.search(e)!==-1&&(n.browserVersion=String(s.match(e)))):s.indexOf("Safari")!=-1?(n.browserName="Safari",e=/Version[\/\s](\d+\.\d+)/g,s.search(e)!==-1&&(n.browserVersion=String(s.match(e)))):s.indexOf("Netscape")!=-1&&(n.browserName="Netscape",e=/Netscape[\/\s](\d+\.\d+)/g,s.search(e)!==-1&&(n.browserVersion=String(s.match(e)))),t}(EHDI||Object.create(null));var EHDI=EHDI||Object.create(null);EHDI.CollisionUtil=function(){},EHDI.CollisionUtil.rectToRect=function(t,e){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.height+t.y>e.y},EHDI.CollisionUtil.circleToRect=function(t,e){var i=Math.abs(t.x-e.x-.5*e.width),r=Math.abs(t.y-e.y-.5*e.height);if(i>.5*e.width+t.r)return!1;if(r>.5*e.height+t.r)return!1;if(i<=.5*e.width)return!0;if(r<=.5*e.height)return!0;var n=i-.5*e.width,s=r-.5*e.height;return n*n+s*s<=t.r*t.r},EHDI.CollisionUtil.circleToCircle=function(t,e){var i=t.x-e.x,r=t.y-e.y,n=Math.sqrt(i*i+r*r);return n<t.r+e.r};var EHDI=EHDI||Object.create(null);EHDI.NumberUtil=function(){},EHDI.NumberUtil.GOLDEN_RATIO=1.61803398875,EHDI.NumberUtil.degreeToRadian=function(t){return t*(Math.PI/180)},EHDI.NumberUtil.radianToDegree=function(t){return t*(180/Math.PI)},EHDI.NumberUtil.lerp=function(t,e,i){return e+(i-e)*t},EHDI.NumberUtil.normalize=function(t,e,i){return(t-e)/(i-e)},EHDI.NumberUtil.map=function(t,e,i,r,n,s){var s="undefined"!=typeof s&&s;if(s){if(t>e)return r;if(t<i)return n}return NumberUtil.lerp(NumberUtil.normalize(t,e,i),r,n)},EHDI.NumberUtil.clamp=function(t,e,i){return Math.max(e,Math.min(i,t))},EHDI.NumberUtil.randomRange=function(t,e){return t>e?Math.random()*(t-e)+e:Math.random()*(e-t)+t},EHDI.NumberUtil.getDigit=function(t){return t.toString().length},EHDI.NumberUtil.shuffleArray=function(t){for(var e=function(t,e,i){var r=t[e];t[e]=t[i],t[i]=r},i=function(t){return Math.floor(Math.random()*t)},r=t.length-1;r>0;r--){var n=i(r+1);e(t,n,r)}};