/*! For license information please see 2.ec28d3dc.chunk.js.LICENSE.txt */ (this.webpackJsonpkronos=this.webpackJsonpkronos||[]).push([[2],[function(t,e,n){"use strict";n.r(e),n.d(e,"utils",(function(){return r})),n.d(e,"AccessibilityManager",(function(){return de})),n.d(e,"accessibleTarget",(function(){return fe})),n.d(e,"InteractionData",(function(){return ge})),n.d(e,"InteractionEvent",(function(){return be})),n.d(e,"InteractionManager",(function(){return Se})),n.d(e,"InteractionTrackingData",(function(){return xe})),n.d(e,"interactiveTarget",(function(){return Te})),n.d(e,"Application",(function(){return jr})),n.d(e,"AbstractBatchRenderer",(function(){return Mr})),n.d(e,"AbstractRenderer",(function(){return Er})),n.d(e,"Attribute",(function(){return en})),n.d(e,"BaseRenderTexture",(function(){return qe})),n.d(e,"BaseTexture",(function(){return De})),n.d(e,"BatchDrawCall",(function(){return Ir})),n.d(e,"BatchGeometry",(function(){return Dr})),n.d(e,"BatchPluginFactory",(function(){return Fr})),n.d(e,"BatchRenderer",(function(){return Ur})),n.d(e,"BatchShaderGenerator",(function(){return Rr})),n.d(e,"BatchTextureArray",(function(){return Ar})),n.d(e,"Buffer",(function(){return rn})),n.d(e,"Filter",(function(){return tr})),n.d(e,"FilterState",(function(){return mn})),n.d(e,"Framebuffer",(function(){return Ye})),n.d(e,"GLFramebuffer",(function(){return xn})),n.d(e,"GLProgram",(function(){return dr})),n.d(e,"GLTexture",(function(){return br})),n.d(e,"Geometry",(function(){return cn})),n.d(e,"IGLUniformData",(function(){return pr})),n.d(e,"MaskData",(function(){return On})),n.d(e,"ObjectRenderer",(function(){return yn})),n.d(e,"Program",(function(){return $n})),n.d(e,"Quad",(function(){return hn})),n.d(e,"QuadUv",(function(){return fn})),n.d(e,"RenderTexture",(function(){return Je})),n.d(e,"RenderTexturePool",(function(){return tn})),n.d(e,"Renderer",(function(){return Sr})),n.d(e,"Shader",(function(){return Zn})),n.d(e,"SpriteMaskFilter",(function(){return rr})),n.d(e,"State",(function(){return Jn})),n.d(e,"System",(function(){return Ge})),n.d(e,"Texture",(function(){return $e})),n.d(e,"TextureMatrix",(function(){return nr})),n.d(e,"TextureUvs",(function(){return Ke})),n.d(e,"UniformGroup",(function(){return dn})),n.d(e,"ViewableBuffer",(function(){return kr})),n.d(e,"autoDetectRenderer",(function(){return Pr})),n.d(e,"checkMaxIfStatementsInShader",(function(){return qn})),n.d(e,"defaultFilterVertex",(function(){return Cr})),n.d(e,"defaultVertex",(function(){return Or})),n.d(e,"resources",(function(){return We})),n.d(e,"systems",(function(){return wr})),n.d(e,"uniformParsers",(function(){return Hn})),n.d(e,"Extract",(function(){return Hr})),n.d(e,"AppLoaderPlugin",(function(){return di})),n.d(e,"Loader",(function(){return pi})),n.d(e,"LoaderResource",(function(){return ci})),n.d(e,"TextureLoader",(function(){return fi})),n.d(e,"ParticleContainer",(function(){return _i})),n.d(e,"ParticleRenderer",(function(){return xi})),n.d(e,"BasePrepare",(function(){return So})),n.d(e,"CountLimiter",(function(){return yo})),n.d(e,"Prepare",(function(){return Io})),n.d(e,"TimeLimiter",(function(){return Ao})),n.d(e,"Spritesheet",(function(){return ko})),n.d(e,"SpritesheetLoader",(function(){return Mo})),n.d(e,"TilingSprite",(function(){return Lo})),n.d(e,"TilingSpriteRenderer",(function(){return jo})),n.d(e,"BitmapFont",(function(){return ta})),n.d(e,"BitmapFontData",(function(){return Ko})),n.d(e,"BitmapFontLoader",(function(){return ia})),n.d(e,"BitmapText",(function(){return ra})),n.d(e,"Ticker",(function(){return ve})),n.d(e,"TickerPlugin",(function(){return ye})),n.d(e,"UPDATE_PRIORITY",(function(){return pe})),n.d(e,"ALPHA_MODES",(function(){return B})),n.d(e,"BLEND_MODES",(function(){return M})),n.d(e,"BUFFER_BITS",(function(){return k})),n.d(e,"CLEAR_MODES",(function(){return z})),n.d(e,"DRAW_MODES",(function(){return R})),n.d(e,"ENV",(function(){return I})),n.d(e,"FORMATS",(function(){return D})),n.d(e,"GC_MODES",(function(){return H})),n.d(e,"MASK_TYPES",(function(){return W})),n.d(e,"MIPMAP_MODES",(function(){return j})),n.d(e,"MSAA_QUALITY",(function(){return G})),n.d(e,"PRECISION",(function(){return X})),n.d(e,"RENDERER_TYPE",(function(){return A})),n.d(e,"SCALE_MODES",(function(){return F})),n.d(e,"TARGETS",(function(){return N})),n.d(e,"TYPES",(function(){return L})),n.d(e,"WRAP_MODES",(function(){return U})),n.d(e,"Bounds",(function(){return oe})),n.d(e,"Container",(function(){return he})),n.d(e,"DisplayObject",(function(){return ue})),n.d(e,"TemporaryDisplayObject",(function(){return le})),n.d(e,"FillStyle",(function(){return Ti})),n.d(e,"GRAPHICS_CURVES",(function(){return wi})),n.d(e,"Graphics",(function(){return Zi})),n.d(e,"GraphicsData",(function(){return Gi})),n.d(e,"GraphicsGeometry",(function(){return qi})),n.d(e,"LINE_CAP",(function(){return gi})),n.d(e,"LINE_JOIN",(function(){return yi})),n.d(e,"LineStyle",(function(){return Ki})),n.d(e,"graphicsUtils",(function(){return Wi})),n.d(e,"Circle",(function(){return Xt})),n.d(e,"DEG_TO_RAD",(function(){return zt})),n.d(e,"Ellipse",(function(){return Wt})),n.d(e,"Matrix",(function(){return Kt})),n.d(e,"ObservablePoint",(function(){return qt})),n.d(e,"PI_2",(function(){return jt})),n.d(e,"Point",(function(){return Yt})),n.d(e,"Polygon",(function(){return Gt})),n.d(e,"RAD_TO_DEG",(function(){return Bt})),n.d(e,"Rectangle",(function(){return Ht})),n.d(e,"RoundedRectangle",(function(){return Vt})),n.d(e,"SHAPES",(function(){return Ut})),n.d(e,"Transform",(function(){return ie})),n.d(e,"groupD8",(function(){return re})),n.d(e,"Mesh",(function(){return Go})),n.d(e,"MeshBatchUvs",(function(){return Ho})),n.d(e,"MeshGeometry",(function(){return Yo})),n.d(e,"MeshMaterial",(function(){return Vo})),n.d(e,"NineSlicePlane",(function(){return Ya})),n.d(e,"PlaneGeometry",(function(){return Ha})),n.d(e,"RopeGeometry",(function(){return Xa})),n.d(e,"SimpleMesh",(function(){return Va})),n.d(e,"SimplePlane",(function(){return Ga})),n.d(e,"SimpleRope",(function(){return Wa})),n.d(e,"Runner",(function(){return Pe})),n.d(e,"Sprite",(function(){return ro})),n.d(e,"AnimatedSprite",(function(){return Ka})),n.d(e,"TEXT_GRADIENT",(function(){return to})),n.d(e,"Text",(function(){return mo})),n.d(e,"TextMetrics",(function(){return ho})),n.d(e,"TextStyle",(function(){return so})),n.d(e,"isMobile",(function(){return C})),n.d(e,"settings",(function(){return V})),n.d(e,"VERSION",(function(){return ts})),n.d(e,"filters",(function(){return es})),n.d(e,"useDeprecated",(function(){return Ja}));var r={};n.r(r),n.d(r,"isMobile",(function(){return C})),n.d(r,"EventEmitter",(function(){return q.a})),n.d(r,"earcut",(function(){return Q.a})),n.d(r,"url",(function(){return Z.a})),n.d(r,"BaseTextureCache",(function(){return Ct})),n.d(r,"CanvasRenderTarget",(function(){return kt})),n.d(r,"DATA_URI",(function(){return Dt})),n.d(r,"ProgramCache",(function(){return Pt})),n.d(r,"TextureCache",(function(){return Ot})),n.d(r,"clearTextureCache",(function(){return At})),n.d(r,"correctBlendMode",(function(){return lt})),n.d(r,"createIndicesForQuads",(function(){return pt})),n.d(r,"decomposeDataUri",(function(){return Nt})),n.d(r,"deprecation",(function(){return St})),n.d(r,"destroyTextureCache",(function(){return It})),n.d(r,"determineCrossOrigin",(function(){return Lt})),n.d(r,"getBufferType",(function(){return dt})),n.d(r,"getResolutionOfUrl",(function(){return Ft})),n.d(r,"hex2rgb",(function(){return it})),n.d(r,"hex2string",(function(){return ot})),n.d(r,"interleaveTypedArrays",(function(){return vt})),n.d(r,"isPow2",(function(){return gt})),n.d(r,"isWebGLSupported",(function(){return rt})),n.d(r,"log2",(function(){return _t})),n.d(r,"nextPow2",(function(){return yt})),n.d(r,"premultiplyBlendMode",(function(){return ut})),n.d(r,"premultiplyRgba",(function(){return ct})),n.d(r,"premultiplyTint",(function(){return ht})),n.d(r,"premultiplyTintToRgba",(function(){return ft})),n.d(r,"removeItems",(function(){return bt})),n.d(r,"rgb2hex",(function(){return st})),n.d(r,"sayHello",(function(){return nt})),n.d(r,"sign",(function(){return xt})),n.d(r,"skipHello",(function(){return et})),n.d(r,"string2hex",(function(){return at})),n.d(r,"trimCanvas",(function(){return Mt})),n.d(r,"uid",(function(){return Tt}));var i=n(45),o=n(21),a=n.n(o);window.Promise||(window.Promise=i.Polyfill),Object.assign||(Object.assign=a.a);if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!window.performance||!window.performance.now){var s=Date.now();window.performance||(window.performance={}),window.performance.now=function(){return Date.now()-s}}for(var u=Date.now(),l=["ms","moz","webkit","o"],c=0;c0?1:-1}),Number.isInteger||(Number.isInteger=function(t){return"number"===typeof t&&isFinite(t)&&Math.floor(t)===t}),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array),window.Uint8Array||(window.Uint8Array=Array),window.Int32Array||(window.Int32Array=Array);var f=/iPhone/i,p=/iPod/i,d=/iPad/i,m=/\biOS-universal(?:.+)Mac\b/i,v=/\bAndroid(?:.+)Mobile\b/i,y=/Android/i,g=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,_=/Silk/i,b=/Windows Phone/i,x=/\bWindows(?:.+)ARM\b/i,w=/BlackBerry/i,T=/BB10/i,E=/Opera Mini/i,S=/\b(CriOS|Chrome)(?:.+)Mobile/i,P=/Mobile(?:.+)Firefox\b/i,O=function(t){return"undefined"!==typeof t&&"MacIntel"===t.platform&&"number"===typeof t.maxTouchPoints&&t.maxTouchPoints>1&&"undefined"===typeof MSStream};var C=function(t){var e={userAgent:"",platform:"",maxTouchPoints:0};t||"undefined"===typeof navigator?"string"===typeof t?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0}):e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var n=e.userAgent,r=n.split("[FBAN");"undefined"!==typeof r[1]&&(n=r[0]),"undefined"!==typeof(r=n.split("Twitter"))[1]&&(n=r[0]);var i=function(t){return function(e){return e.test(t)}}(n),o={apple:{phone:i(f)&&!i(b),ipod:i(p),tablet:!i(f)&&(i(d)||O(e))&&!i(b),universal:i(m),device:(i(f)||i(p)||i(d)||i(m)||O(e))&&!i(b)},amazon:{phone:i(g),tablet:!i(g)&&i(_),device:i(g)||i(_)},android:{phone:!i(b)&&i(g)||!i(b)&&i(v),tablet:!i(b)&&!i(g)&&!i(v)&&(i(_)||i(y)),device:!i(b)&&(i(g)||i(_)||i(v)||i(y))||i(/\bokhttp\b/i)},windows:{phone:i(b),tablet:i(x),device:i(b)||i(x)},other:{blackberry:i(w),blackberry10:i(T),opera:i(E),firefox:i(P),chrome:i(S),device:i(w)||i(T)||i(E)||i(P)||i(S)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}(window.navigator);var I,A,k,M,R,D,N,L,F,U,j,B,z,H,X,W,G,V={MIPMAP_TEXTURES:1,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,SPRITE_MAX_TEXTURES:function(t){var e=!0;if(C.tablet||C.phone){var n;if(C.apple.device)if(n=navigator.userAgent.match(/OS (\d+)_(\d+)?/))parseInt(n[1],10)<11&&(e=!1);if(C.android.device)if(n=navigator.userAgent.match(/Android\s([0-9.]*)/))parseInt(n[1],10)<7&&(e=!1)}return e?t:4}(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,autoDensity:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:0,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:33071,SCALE_MODE:1,PRECISION_VERTEX:"highp",PRECISION_FRAGMENT:C.apple.device?"highp":"mediump",CAN_UPLOAD_SAME_BUFFER:!C.apple.device,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},Y=n(37),q=n.n(Y),K=n(38),Q=n.n(K),$=n(22),Z=n.n($);!function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"}(I||(I={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"}(A||(A={})),function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"}(k||(k={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"}(M||(M={})),function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(R||(R={})),function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(D||(D={})),function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(N||(N={})),function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.FLOAT=5126]="FLOAT",t[t.HALF_FLOAT=36193]="HALF_FLOAT"}(L||(L={})),function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"}(F||(F={})),function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(U||(U={})),function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON"}(j||(j={})),function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA"}(B||(B={})),function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"}(z||(z={})),function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"}(H||(H={})),function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"}(X||(X={})),function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"}(W||(W={})),function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"}(G||(G={})),V.RETINA_PREFIX=/@([0-9\.]+)x/,V.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!0;var J,tt=!1;function et(){tt=!0}function nt(t){var e;if(!tt){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var n=["\n %c %c %c PixiJS 5.3.3 - \u2730 "+t+" \u2730 %c %c http://www.pixijs.com/ %c %c \u2665%c\u2665%c\u2665 \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;"];(e=window.console).log.apply(e,n)}else window.console&&window.console.log("PixiJS 5.3.3 - "+t+" - http://www.pixijs.com/");tt=!0}}function rt(){return"undefined"===typeof J&&(J=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:V.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),n=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),r=!(!n||!n.getContextAttributes().stencil);if(n){var i=n.getExtension("WEBGL_lose_context");i&&i.loseContext()}return n=null,r}catch(o){return!1}}()),J}function it(t,e){return void 0===e&&(e=[]),e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e}function ot(t){var e=t.toString(16);return"#"+(e="000000".substr(0,6-e.length)+e)}function at(t){return"string"===typeof t&&"#"===t[0]&&(t=t.substr(1)),parseInt(t,16)}function st(t){return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)}var ut=function(){for(var t=[],e=[],n=0;n<32;n++)t[n]=n,e[n]=n;t[M.NORMAL_NPM]=M.NORMAL,t[M.ADD_NPM]=M.ADD,t[M.SCREEN_NPM]=M.SCREEN,e[M.NORMAL]=M.NORMAL_NPM,e[M.ADD]=M.ADD_NPM,e[M.SCREEN]=M.SCREEN_NPM;var r=[];return r.push(e),r.push(t),r}();function lt(t,e){return ut[e?1:0][t]}function ct(t,e,n,r){return n=n||new Float32Array(4),r||void 0===r?(n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e):(n[0]=t[0],n[1]=t[1],n[2]=t[2]),n[3]=e,n}function ht(t,e){if(1===e)return(255*e<<24)+t;if(0===e)return 0;var n=t>>16&255,r=t>>8&255,i=255&t;return(255*e<<24)+((n=n*e+.5|0)<<16)+((r=r*e+.5|0)<<8)+(i=i*e+.5|0)}function ft(t,e,n,r){return(n=n||new Float32Array(4))[0]=(t>>16&255)/255,n[1]=(t>>8&255)/255,n[2]=(255&t)/255,(r||void 0===r)&&(n[0]*=e,n[1]*=e,n[2]*=e),n[3]=e,n}function pt(t,e){void 0===e&&(e=null);var n=6*t;if((e=e||new Uint16Array(n)).length!==n)throw new Error("Out buffer length is incorrect, got "+e.length+" and expected "+n);for(var r=0,i=0;r>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1}function gt(t){return!(t&t-1)&&!!t}function _t(t){var e=(t>65535?1:0)<<4,n=((t>>>=e)>255?1:0)<<3;return e|=n,e|=n=((t>>>=n)>15?1:0)<<2,(e|=n=((t>>>=n)>3?1:0)<<1)|(t>>>=n)>>1}function bt(t,e,n){var r,i=t.length;if(!(e>=i||0===n)){var o=i-(n=e+n>i?i-e:n);for(r=e;r=this.x&&t=this.y&&ee!==l>e&&t<(e-s)/(l-s)*(u-a)+a&&(n=!n)}return n},t}(),Vt=function(){function t(t,e,n,r,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=20),this.x=t,this.y=e,this.width=n,this.height=r,this.radius=i,this.type=Ut.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 n=t-(this.x+this.radius),r=e-(this.y+this.radius),i=this.radius*this.radius;if(n*n+r*r<=i)return!0;if((n=t-(this.x+this.width-this.radius))*n+r*r<=i)return!0;if(n*n+(r=e-(this.y+this.height-this.radius))*r<=i)return!0;if((n=t-(this.x+this.radius))*n+r*r<=i)return!0}return!1},t}(),Yt=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(t){return this.set(t.x,t.y),this},t.prototype.copyTo=function(t){return t.set(this.x,this.y),t},t.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},t.prototype.set=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this},t}(),qt=function(){function t(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),this._x=n,this._y=r,this.cb=t,this.scope=e}return t.prototype.clone=function(e,n){return void 0===e&&(e=this.cb),void 0===n&&(n=this.scope),new t(e,n,this._x,this._y)},t.prototype.set=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this._x===t&&this._y===e||(this._x=t,this._y=e,this.cb.call(this.scope)),this},t.prototype.copyFrom=function(t){return this._x===t.x&&this._y===t.y||(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this},t.prototype.copyTo=function(t){return t.set(this._x,this._y),t},t.prototype.equals=function(t){return t.x===this._x&&t.y===this._y},Object.defineProperty(t.prototype,"x",{get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),t}(),Kt=function(){function t(t,e,n,r,i,o){void 0===t&&(t=1),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=1),void 0===i&&(i=0),void 0===o&&(o=0),this.array=null,this.a=t,this.b=e,this.c=n,this.d=r,this.tx=i,this.ty=o}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,n,r,i,o){return this.a=t,this.b=e,this.c=n,this.d=r,this.tx=i,this.ty=o,this},t.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var n=e||this.array;return t?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n},t.prototype.apply=function(t,e){e=e||new Yt;var n=t.x,r=t.y;return e.x=this.a*n+this.c*r+this.tx,e.y=this.b*n+this.d*r+this.ty,e},t.prototype.applyInverse=function(t,e){e=e||new Yt;var n=1/(this.a*this.d+this.c*-this.b),r=t.x,i=t.y;return e.x=this.d*n*r+-this.c*n*i+(this.ty*this.c-this.tx*this.d)*n,e.y=this.a*n*i+-this.b*n*r+(-this.ty*this.a+this.tx*this.b)*n,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),n=Math.sin(t),r=this.a,i=this.c,o=this.tx;return this.a=r*e-this.b*n,this.b=r*n+this.b*e,this.c=i*e-this.d*n,this.d=i*n+this.d*e,this.tx=o*e-this.ty*n,this.ty=o*n+this.ty*e,this},t.prototype.append=function(t){var e=this.a,n=this.b,r=this.c,i=this.d;return this.a=t.a*e+t.b*r,this.b=t.a*n+t.b*i,this.c=t.c*e+t.d*r,this.d=t.c*n+t.d*i,this.tx=t.tx*e+t.ty*r+this.tx,this.ty=t.tx*n+t.ty*i+this.ty,this},t.prototype.setTransform=function(t,e,n,r,i,o,a,s,u){return this.a=Math.cos(a+u)*i,this.b=Math.sin(a+u)*i,this.c=-Math.sin(a-s)*o,this.d=Math.cos(a-s)*o,this.tx=t-(n*this.a+r*this.c),this.ty=e-(n*this.b+r*this.d),this},t.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var n=this.a,r=this.c;this.a=n*t.a+this.b*t.c,this.b=n*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,n=this.b,r=this.c,i=this.d,o=-Math.atan2(-r,i),a=Math.atan2(n,e),s=Math.abs(o+a);return s<1e-5||Math.abs(jt-s)<1e-5?(t.rotation=a,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=o,t.skew.y=a),t.scale.x=Math.sqrt(e*e+n*n),t.scale.y=Math.sqrt(r*r+i*i),t.position.x=this.tx,t.position.y=this.ty,t},t.prototype.invert=function(){var t=this.a,e=this.b,n=this.c,r=this.d,i=this.tx,o=t*r-e*n;return this.a=r/o,this.b=-e/o,this.c=-n/o,this.d=t/o,this.tx=(n*this.ty-r*i)/o,this.ty=-(t*this.ty-e*i)/o,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.copyTo=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},t.prototype.copyFrom=function(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this},Object.defineProperty(t,"IDENTITY",{get:function(){return new t},enumerable:!1,configurable:!0}),Object.defineProperty(t,"TEMP_MATRIX",{get:function(){return new t},enumerable:!1,configurable:!0}),t}(),Qt=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],$t=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Zt=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Jt=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],te=[],ee=[],ne=Math.sign;!function(){for(var t=0;t<16;t++){var e=[];te.push(e);for(var n=0;n<16;n++)for(var r=ne(Qt[t]*Qt[n]+Zt[t]*$t[n]),i=ne($t[t]*Qt[n]+Jt[t]*$t[n]),o=ne(Qt[t]*Zt[n]+Zt[t]*Jt[n]),a=ne($t[t]*Zt[n]+Jt[t]*Jt[n]),s=0;s<16;s++)if(Qt[s]===r&&$t[s]===i&&Zt[s]===o&&Jt[s]===a){e.push(s);break}}for(t=0;t<16;t++){var u=new Kt;u.set(Qt[t],$t[t],Zt[t],Jt[t],0,0),ee.push(u)}}();var re={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(t){return Qt[t]},uY:function(t){return $t[t]},vX:function(t){return Zt[t]},vY:function(t){return Jt[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return te[t][e]},sub:function(t,e){return te[t][re.inv(e)]},rotate180:function(t){return 4^t},isVertical:function(t){return 2===(3&t)},byDirection:function(t,e){return 2*Math.abs(t)<=Math.abs(e)?e>=0?re.S:re.N:2*Math.abs(e)<=Math.abs(t)?t>0?re.E:re.W:e>0?t>0?re.SE:re.SW:t>0?re.NE:re.NW},matrixAppendRotationInv:function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var i=ee[re.inv(e)];i.tx=n,i.ty=r,t.append(i)}},ie=function(){function t(){this.worldTransform=new Kt,this.localTransform=new Kt,this.position=new qt(this.onChange,this,0,0),this.scale=new qt(this.onChange,this,1,1),this.pivot=new qt(this.onChange,this,0,0),this.skew=new qt(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return t.prototype.onChange=function(){this._localID++},t.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++},t.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)},t.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 n=t.worldTransform,r=this.worldTransform;r.a=e.a*n.a+e.b*n.c,r.b=e.a*n.b+e.b*n.d,r.c=e.c*n.a+e.d*n.c,r.d=e.c*n.b+e.d*n.d,r.tx=e.tx*n.a+e.ty*n.c+n.tx,r.ty=e.tx*n.b+e.ty*n.d+n.ty,this._parentID=t._worldID,this._worldID++}},t.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},Object.defineProperty(t.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())},enumerable:!1,configurable:!0}),t.IDENTITY=new t,t}();V.SORTABLE_CHILDREN=!1;var oe=function(){function t(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){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?Ht.EMPTY:((t=t||new Ht(0,0,1,1)).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,n=this.minY,r=this.maxX,i=this.maxY,o=t[0],a=t[1];e=or?o:r,i=a>i?a:i,e=(o=t[2])r?o:r,i=a>i?a:i,e=(o=t[4])r?o:r,i=a>i?a:i,e=(o=t[6])r?o:r,i=a>i?a:i,this.minX=e,this.minY=n,this.maxX=r,this.maxY=i},t.prototype.addFrame=function(t,e,n,r,i){this.addFrameMatrix(t.worldTransform,e,n,r,i)},t.prototype.addFrameMatrix=function(t,e,n,r,i){var o=t.a,a=t.b,s=t.c,u=t.d,l=t.tx,c=t.ty,h=this.minX,f=this.minY,p=this.maxX,d=this.maxY,m=o*e+s*n+l,v=a*e+u*n+c;h=mp?m:p,d=v>d?v:d,h=(m=o*r+s*n+l)p?m:p,d=v>d?v:d,h=(m=o*e+s*i+l)p?m:p,d=v>d?v:d,h=(m=o*r+s*i+l)p?m:p,d=v>d?v:d,this.minX=h,this.minY=f,this.maxX=p,this.maxY=d},t.prototype.addVertexData=function(t,e,n){for(var r=this.minX,i=this.minY,o=this.maxX,a=this.maxY,s=e;so?u:o,a=l>a?l:a}this.minX=r,this.minY=i,this.maxX=o,this.maxY=a},t.prototype.addVertices=function(t,e,n,r){this.addVerticesMatrix(t.worldTransform,e,n,r)},t.prototype.addVerticesMatrix=function(t,e,n,r,i,o){void 0===i&&(i=0),void 0===o&&(o=i);for(var a=t.a,s=t.b,u=t.c,l=t.d,c=t.tx,h=t.ty,f=this.minX,p=this.minY,d=this.maxX,m=this.maxY,v=n;vr?t.maxX:r,this.maxY=t.maxY>i?t.maxY:i},t.prototype.addBoundsMask=function(t,e){var n=t.minX>e.minX?t.minX:e.minX,r=t.minY>e.minY?t.minY:e.minY,i=t.maxXu?i:u,this.maxY=o>l?o:l}},t.prototype.addBoundsMatrix=function(t,e){this.addFrameMatrix(e,t.minX,t.minY,t.maxX,t.maxY)},t.prototype.addBoundsArea=function(t,e){var n=t.minX>e.x?t.minX:e.x,r=t.minY>e.y?t.minY:e.y,i=t.maxXu?i:u,this.maxY=o>l?o:l}},t.prototype.pad=function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=e,this.maxY+=e)},t.prototype.addFramePad=function(t,e,n,r,i,o){t-=i,e-=o,n+=i,r+=o,this.minX=this.minXn?this.maxX:n,this.minY=this.minYr?this.maxY:r},t}(),ae=function(t,e){return(ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function se(t,e){function n(){this.constructor=t}ae(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ue=function(t){function e(){var e=t.call(this)||this;return e.tempDisplayObjectParent=null,e.transform=new ie,e.alpha=1,e.visible=!0,e.renderable=!0,e.parent=null,e.worldAlpha=1,e._lastSortedIndex=0,e._zIndex=0,e.filterArea=null,e.filters=null,e._enabledFilters=null,e._bounds=new oe,e._localBounds=null,e._boundsID=0,e._boundsRect=null,e._localBoundsRect=null,e._mask=null,e._destroyed=!1,e.isSprite=!1,e.isMask=!1,e}return se(e,t),e.mixin=function(t){for(var n=Object.keys(t),r=0;r1)for(var r=0;rthis.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.sortDirty=!0,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),this.emit("childAdded",t,this,e),t},e.prototype.swapChildren=function(t,e){if(t!==e){var n=this.getChildIndex(t),r=this.getChildIndex(e);this.children[n]=e,this.children[r]=t,this.onChildrenChange(n=this.children.length)throw new Error("The index "+e+" supplied is out of bounds "+this.children.length);var n=this.getChildIndex(t);bt(this.children,n,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(){for(var t=arguments,e=[],n=0;n1)for(var r=0;r0&&i<=e){n=this.children.splice(r,i);for(var o=0;o1&&this.children.sort(ce),this.sortDirty=!1},e.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,e=this.children.length;t title : "+t.title+"
tabIndex: "+t.tabIndex},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")).style.width="100px",e.style.height="100px",e.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=2..toString(),e.style.borderStyle="none",navigator.userAgent.toLowerCase().indexOf("chrome")>-1?e.setAttribute("aria-live","off"):e.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?e.setAttribute("aria-relevant","additions"):e.setAttribute("aria-relevant","text"),e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),e.style.pointerEvents=t.accessiblePointerEvents,e.type=t.accessibleType,t.accessibleTitle&&null!==t.accessibleTitle?e.title=t.accessibleTitle:t.accessibleHint&&null!==t.accessibleHint||(e.title="displayObject "+t.tabIndex),t.accessibleHint&&null!==t.accessibleHint&&e.setAttribute("aria-label",t.accessibleHint),this.debug&&this.updateDebugHTML(e),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),e.dispatchEvent(t.target.displayObject,"pointertap",e.eventData),e.dispatchEvent(t.target.displayObject,"tap",e.eventData)},t.prototype._onFocus=function(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","assertive");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseover",e.eventData)},t.prototype._onFocusOut=function(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","polite");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseout",e.eventData)},t.prototype._onKeyDown=function(t){9===t.keyCode&&this.activate()},t.prototype._onMouseMove=function(t){0===t.movementX&&0===t.movementY||this.deactivate()},t.prototype.destroy=function(){this.destroyTouchHook(),this.div=null,window.document.removeEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},t}();V.TARGET_FPMS=.06,function(t){t[t.INTERACTION=50]="INTERACTION",t[t.HIGH=25]="HIGH",t[t.NORMAL=0]="NORMAL",t[t.LOW=-25]="LOW",t[t.UTILITY=-50]="UTILITY"}(pe||(pe={}));var me=function(){function t(t,e,n,r){void 0===e&&(e=null),void 0===n&&(n=0),void 0===r&&(r=!1),this.fn=t,this.context=e,this.priority=n,this.once=r,this.next=null,this.previous=null,this._destroyed=!1}return t.prototype.match=function(t,e){return void 0===e&&(e=null),this.fn===t&&this.context===e},t.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var e=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),e},t.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},t.prototype.destroy=function(t){void 0===t&&(t=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var e=this.next;return this.next=t?null:e,this.previous=null,e},t}(),ve=function(){function t(){var t=this;this._head=new me(null,null,1/0),this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this.autoStart=!1,this.deltaTime=1,this.deltaMS=1/V.TARGET_FPMS,this.elapsedMS=1/V.TARGET_FPMS,this.lastTime=-1,this.speed=1,this.started=!1,this._protected=!1,this._lastFrame=-1,this._tick=function(e){t._requestId=null,t.started&&(t.update(e),t.started&&null===t._requestId&&t._head.next&&(t._requestId=requestAnimationFrame(t._tick)))}}return t.prototype._requestIfNeeded=function(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,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,n){return void 0===n&&(n=pe.NORMAL),this._addListener(new me(t,e,n))},t.prototype.addOnce=function(t,e,n){return void 0===n&&(n=pe.NORMAL),this._addListener(new me(t,e,n,!0))},t.prototype._addListener=function(t){var e=this._head.next,n=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(n);break}n=e,e=e.next}t.previous||t.connect(n)}else t.connect(n);return this._startIfPossible(),this},t.prototype.remove=function(t,e){for(var n=this._head.next;n;)n=n.match(t,e)?n.destroy():n.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(t.prototype,"count",{get:function(){if(!this._head)return 0;for(var t=0,e=this._head;e=e.next;)t++;return t},enumerable:!1,configurable:!0}),t.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},t.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},t.prototype.destroy=function(){if(!this._protected){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}},t.prototype.update=function(t){var e;if(void 0===t&&(t=performance.now()),t>this.lastTime){if((e=this.elapsedMS=t-this.lastTime)>this._maxElapsedMS&&(e=this._maxElapsedMS),e*=this.speed,this._minElapsedMS){var n=t-this._lastFrame|0;if(n=0;c--){var h=l[c],f=this.recursiveFindHit(t,h,n,r,s);if(f){if(!h.parent)continue;s=!1,f&&(t.target&&(r=!1),a=!0)}}return i&&(r&&!t.target&&!e.hitArea&&e.containsPoint&&e.containsPoint(o)&&(a=!0),e.interactive&&(a&&!t.target&&(t.target=e),n&&n(t,e,!!a))),a},t.prototype.findHit=function(t,e,n,r){this.recursiveFindHit(t,e,n,r,!1)},t}(),Te={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return"pointer"===this.cursor},set buttonMode(t){t?this.cursor="pointer":"pointer"===this.cursor&&(this.cursor=null)},cursor:null,get trackedPointers(){return void 0===this._trackedPointers&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};ue.mixin(Te);var Ee={target:null,data:{global:null}},Se=function(t){function e(e,n){var r=t.call(this)||this;return n=n||{},r.renderer=e,r.autoPreventDefault=void 0===n.autoPreventDefault||n.autoPreventDefault,r.interactionFrequency=n.interactionFrequency||10,r.mouse=new ge,r.mouse.identifier=1,r.mouse.global.set(-999999),r.activeInteractionData={},r.activeInteractionData[1]=r.mouse,r.interactionDataPool=[],r.eventData=new be,r.interactionDOMElement=null,r.moveWhenInside=!1,r.eventsAdded=!1,r.tickerAdded=!1,r.mouseOverRenderer=!1,r.supportsTouchEvents="ontouchstart"in window,r.supportsPointerEvents=!!window.PointerEvent,r.onPointerUp=r.onPointerUp.bind(r),r.processPointerUp=r.processPointerUp.bind(r),r.onPointerCancel=r.onPointerCancel.bind(r),r.processPointerCancel=r.processPointerCancel.bind(r),r.onPointerDown=r.onPointerDown.bind(r),r.processPointerDown=r.processPointerDown.bind(r),r.onPointerMove=r.onPointerMove.bind(r),r.processPointerMove=r.processPointerMove.bind(r),r.onPointerOut=r.onPointerOut.bind(r),r.processPointerOverOut=r.processPointerOverOut.bind(r),r.onPointerOver=r.onPointerOver.bind(r),r.cursorStyles={default:"inherit",pointer:"pointer"},r.currentCursorMode=null,r.cursor=null,r.resolution=1,r.delayedEvents=[],r.search=new we,r._tempDisplayObject=new le,r._useSystemTicker=void 0===n.useSystemTicker||n.useSystemTicker,r.setTargetElement(r.renderer.view,r.renderer.resolution),r}return function(t,e){function n(){this.constructor=t}_e(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),Object.defineProperty(e.prototype,"useSystemTicker",{get:function(){return this._useSystemTicker},set:function(t){this._useSystemTicker=t,t?this.addTickerListener():this.removeTickerListener()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastObjectRendered",{get:function(){return this.renderer._lastObjectRendered||this._tempDisplayObject},enumerable:!1,configurable:!0}),e.prototype.hitTest=function(t,e){return Ee.target=null,Ee.data.global=t,e||(e=this.lastObjectRendered),this.processInteractive(Ee,e,null,!0),Ee.target},e.prototype.setTargetElement=function(t,e){void 0===e&&(e=1),this.removeTickerListener(),this.removeEvents(),this.interactionDOMElement=t,this.resolution=e,this.addEvents(),this.addTickerListener()},e.prototype.addTickerListener=function(){!this.tickerAdded&&this.interactionDOMElement&&this._useSystemTicker&&(ve.system.add(this.tickerUpdate,this,pe.INTERACTION),this.tickerAdded=!0)},e.prototype.removeTickerListener=function(){this.tickerAdded&&(ve.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},e.prototype.addEvents=function(){if(!this.eventsAdded&&this.interactionDOMElement){var t=this.interactionDOMElement.style;window.navigator.msPointerEnabled?(t.msContentZooming="none",t.msTouchAction="none"):this.supportsPointerEvents&&(t.touchAction="none"),this.supportsPointerEvents?(window.document.addEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,!0),window.addEventListener("pointercancel",this.onPointerCancel,!0),window.addEventListener("pointerup",this.onPointerUp,!0)):(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)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,!0)),this.eventsAdded=!0}},e.prototype.removeEvents=function(){if(this.eventsAdded&&this.interactionDOMElement){var t=this.interactionDOMElement.style;window.navigator.msPointerEnabled?(t.msContentZooming="",t.msTouchAction=""):this.supportsPointerEvents&&(t.touchAction=""),this.supportsPointerEvents?(window.document.removeEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,!0),window.removeEventListener("pointercancel",this.onPointerCancel,!0),window.removeEventListener("pointerup",this.onPointerUp,!0)):(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)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,!0)),this.interactionDOMElement=null,this.eventsAdded=!1}},e.prototype.tickerUpdate=function(t){this._deltaTime+=t,this._deltaTime8)throw new Error("max arguments reached");var u=this,l=u.name,c=u.items;this._aliasCount++;for(var h=0,f=c.length;h0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},t.prototype.add=function(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this},t.prototype.remove=function(t){var e=this.items.indexOf(t);return-1!==e&&(this.ensureNonAliasedItems(),this.items.splice(e,1)),this},t.prototype.contains=function(t){return-1!==this.items.indexOf(t)},t.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},t.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(t.prototype,"empty",{get:function(){return 0===this.items.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),t}();Object.defineProperties(Pe.prototype,{dispatch:{value:Pe.prototype.emit},run:{value:Pe.prototype.emit}}),V.PREFER_ENV=C.any?I.WEBGL:I.WEBGL2,V.STRICT_TEXTURE_CACHE=!1;var Oe=[];function Ce(t,e){if(!t)return null;var n="";if("string"===typeof t){var r=/\.(\w{3,4})(?:$|\?|#)/i.exec(t);r&&(n=r[1].toLowerCase())}for(var i=Oe.length-1;i>=0;--i){var o=Oe[i];if(o.test&&o.test(t,n))return new o(t,e)}throw new Error("Unrecognized source type to auto-detect Resource")}var Ie=function(t,e){return(Ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function Ae(t,e){function n(){this.constructor=t}Ie(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ke=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this._width=t,this._height=e,this.destroyed=!1,this.internal=!1,this.onResize=new Pe("setRealSize"),this.onUpdate=new Pe("update"),this.onError=new Pe("onError")}return t.prototype.bind=function(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)},t.prototype.unbind=function(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)},t.prototype.resize=function(t,e){t===this._width&&e===this._height||(this._width=t,this._height=e,this.onResize.emit(t,e))},Object.defineProperty(t.prototype,"valid",{get:function(){return!!this._width&&!!this._height},enumerable:!1,configurable:!0}),t.prototype.update=function(){this.destroyed||this.onUpdate.emit()},t.prototype.load=function(){return Promise.resolve(this)},Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),t.prototype.style=function(t,e,n){return!1},t.prototype.dispose=function(){},t.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)},t.test=function(t,e){return!1},t}(),Me=function(t){function e(e,n){var r=this,i=n||{},o=i.width,a=i.height;if(!o||!a)throw new Error("BufferResource width or height invalid");return(r=t.call(this,o,a)||this).data=e,r}return Ae(e,t),e.prototype.upload=function(t,e,n){var r=t.gl;return r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===B.UNPACK),n.width===e.width&&n.height===e.height?r.texSubImage2D(e.target,0,0,0,e.width,e.height,e.format,e.type,this.data):(n.width=e.width,n.height=e.height,r.texImage2D(e.target,0,n.internalFormat,e.width,e.height,0,e.format,n.type,this.data)),!0},e.prototype.dispose=function(){this.data=null},e.test=function(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array},e}(ke),Re={scaleMode:F.NEAREST,format:D.RGBA,alphaMode:B.NPM},De=function(t){function e(e,n){void 0===e&&(e=null),void 0===n&&(n=null);var r=t.call(this)||this,i=(n=n||{}).alphaMode,o=n.mipmap,a=n.anisotropicLevel,s=n.scaleMode,u=n.width,l=n.height,c=n.wrapMode,h=n.format,f=n.type,p=n.target,d=n.resolution,m=n.resourceOptions;return!e||e instanceof ke||((e=Ce(e,m)).internal=!0),r.width=u||0,r.height=l||0,r.resolution=d||V.RESOLUTION,r.mipmap=void 0!==o?o:V.MIPMAP_TEXTURES,r.anisotropicLevel=void 0!==a?a:V.ANISOTROPIC_LEVEL,r.wrapMode=c||V.WRAP_MODE,r.scaleMode=void 0!==s?s:V.SCALE_MODE,r.format=h||D.RGBA,r.type=f||L.UNSIGNED_BYTE,r.target=p||N.TEXTURE_2D,r.alphaMode=void 0!==i?i:B.UNPACK,void 0!==n.premultiplyAlpha&&(r.premultiplyAlpha=n.premultiplyAlpha),r.uid=Tt(),r.touched=0,r.isPowerOfTwo=!1,r._refreshPOT(),r._glTextures={},r.dirtyId=0,r.dirtyStyleId=0,r.cacheId=null,r.valid=u>0&&l>0,r.textureCacheIds=[],r.destroyed=!1,r.resource=null,r._batchEnabled=0,r._batchLocation=0,r.parentTextureArray=null,r.setResource(e),r}return Ae(e,t),Object.defineProperty(e.prototype,"realWidth",{get:function(){return Math.ceil(this.width*this.resolution-1e-4)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"realHeight",{get:function(){return Math.ceil(this.height*this.resolution-1e-4)},enumerable:!1,configurable:!0}),e.prototype.setStyle=function(t,e){var n;return void 0!==t&&t!==this.scaleMode&&(this.scaleMode=t,n=!0),void 0!==e&&e!==this.mipmap&&(this.mipmap=e,n=!0),n&&this.dirtyStyleId++,this},e.prototype.setSize=function(t,e,n){return this.resolution=n||this.resolution,this.width=t,this.height=e,this._refreshPOT(),this.update(),this},e.prototype.setRealSize=function(t,e,n){return this.resolution=n||this.resolution,this.width=t/this.resolution,this.height=e/this.resolution,this._refreshPOT(),this.update(),this},e.prototype._refreshPOT=function(){this.isPowerOfTwo=gt(this.realWidth)&>(this.realHeight)},e.prototype.setResolution=function(t){var e=this.resolution;return e===t||(this.resolution=t,this.valid&&(this.width=this.width*e/t,this.height=this.height*e/t,this.emit("update",this)),this._refreshPOT()),this},e.prototype.setResource=function(t){if(this.resource===t)return this;if(this.resource)throw new Error("Resource can be set only once");return t.bind(this),this.resource=t,this},e.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))},e.prototype.onError=function(t){this.emit("error",this,t)},e.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Ct[this.cacheId],delete Ot[this.cacheId],this.cacheId=null),this.dispose(),e.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},e.prototype.dispose=function(){this.emit("dispose",this)},e.prototype.castToBaseTexture=function(){return this},e.from=function(t,n,r){void 0===r&&(r=V.STRICT_TEXTURE_CACHE);var i="string"===typeof t,o=null;i?o=t:(t._pixiId||(t._pixiId="pixiid_"+Tt()),o=t._pixiId);var a=Ct[o];if(i&&r&&!a)throw new Error('The cacheId "'+o+'" does not exist in BaseTextureCache.');return a||((a=new e(t,n)).cacheId=o,e.addToCache(a,o)),a},e.fromBuffer=function(t,n,r,i){t=t||new Float32Array(n*r*4);var o=new Me(t,{width:n,height:r}),a=t instanceof Float32Array?L.FLOAT:L.UNSIGNED_BYTE;return new e(o,Object.assign(Re,i||{width:n,height:r,type:a}))},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),Ct[e]&&console.warn("BaseTexture added to the cache with an id ["+e+"] that already had an entry"),Ct[e]=t)},e.removeFromCache=function(t){if("string"===typeof t){var e=Ct[t];if(e){var n=e.textureCacheIds.indexOf(t);return n>-1&&e.textureCacheIds.splice(n,1),delete Ct[t],e}}else if(t&&t.textureCacheIds){for(var r=0;r0){if(!t.resource)throw new Error("CubeResource does not support copying of renderTexture.");this.addResourceAt(t.resource,e)}else t.target=N.TEXTURE_CUBE_MAP_POSITIVE_X+e,t.parentTextureArray=this.baseTexture,this.items[e]=t;return t.valid&&!this.valid&&this.resize(t.realWidth,t.realHeight),this.items[e]=t,this},e.prototype.upload=function(t,n,r){for(var i=this.itemDirtyIds,o=0;o]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,e}(Fe),He=function(t){function e(n,r){var i=this;if(r=r||{},!(n instanceof HTMLVideoElement)){var o=document.createElement("video");o.setAttribute("preload","auto"),o.setAttribute("webkit-playsinline",""),o.setAttribute("playsinline",""),"string"===typeof n&&(n=[n]);var a=n[0].src||n[0];Fe.crossOrigin(o,a,r.crossorigin);for(var s=0;s0&&!1===t.paused&&!1===t.ended&&t.readyState>2},e.prototype._isSourceReady=function(){var t=this.source;return 3===t.readyState||4===t.readyState},e.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(ve.shared.add(this.update,this),this._isConnectedToTicker=!0)},e.prototype._onPlayStop=function(){this._isConnectedToTicker&&(ve.shared.remove(this.update,this),this._isConnectedToTicker=!1)},e.prototype._onCanPlay=function(){var t=this.source;t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlay);var e=this.valid;this.resize(t.videoWidth,t.videoHeight),!e&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&t.play()},e.prototype.dispose=function(){this._isConnectedToTicker&&ve.shared.remove(this.update,this);var e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(ve.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(ve.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"updateFPS",{get:function(){return this._updateFPS},set:function(t){t!==this._updateFPS&&(this._updateFPS=t)},enumerable:!1,configurable:!0}),e.test=function(t,n){return t instanceof HTMLVideoElement||e.TYPES.indexOf(n)>-1},e.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],e.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},e}(Fe),Xe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ae(e,t),e.test=function(t){return!!window.createImageBitmap&&t instanceof ImageBitmap},e}(Fe);Oe.push(Be,Xe,Ue,He,ze,Me,je,Le);var We={Resource:ke,BaseImageResource:Fe,INSTALLED:Oe,autoDetectResource:Ce,AbstractMultiResource:Ne,ArrayResource:Le,BufferResource:Me,CanvasResource:Ue,CubeResource:je,ImageResource:Be,SVGResource:ze,VideoResource:He,ImageBitmapResource:Xe},Ge=function(){function t(t){this.renderer=t}return t.prototype.destroy=function(){this.renderer=null},t}(),Ve=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ae(e,t),e.prototype.upload=function(t,e,n){var r=t.gl;return r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===B.UNPACK),n.width===e.width&&n.height===e.height?r.texSubImage2D(e.target,0,0,0,e.width,e.height,e.format,e.type,this.data):(n.width=e.width,n.height=e.height,r.texImage2D(e.target,0,1===t.context.webGLVersion?r.DEPTH_COMPONENT:r.DEPTH_COMPONENT16,e.width,e.height,0,e.format,e.type,this.data)),!0},e}(Me),Ye=function(){function t(t,e){this.width=Math.ceil(t||100),this.height=Math.ceil(e||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new Pe("disposeFramebuffer"),this.multisample=G.NONE}return Object.defineProperty(t.prototype,"colorTexture",{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),t.prototype.addColorTexture=function(t,e){return void 0===t&&(t=0),this.colorTextures[t]=e||new De(null,{scaleMode:F.NEAREST,resolution:1,mipmap:j.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},t.prototype.addDepthTexture=function(t){return this.depthTexture=t||new De(new Ve(null,{width:this.width,height:this.height}),{scaleMode:F.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:j.OFF,format:D.DEPTH_COMPONENT,type:L.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},t.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},t.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},t.prototype.resize=function(t,e){if(t=Math.ceil(t),e=Math.ceil(e),t!==this.width||e!==this.height){this.width=t,this.height=e,this.dirtyId++,this.dirtySize++;for(var n=0;n-1&&e.textureCacheIds.splice(n,1),delete Ot[t],e}}else if(t&&t.textureCacheIds){for(var r=0;rthis.baseTexture.width,a=n+i>this.baseTexture.height;if(o||a){var s=o&&a?"and":"or",u="X: "+e+" + "+r+" = "+(e+r)+" > "+this.baseTexture.width,l="Y: "+n+" + "+i+" = "+(n+i)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+u+" "+s+" "+l)}this.valid=r&&i&&this.baseTexture.valid,this.trim||this.rotate||(this.orig=t),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotate",{get:function(){return this._rotate},set:function(t){this._rotate=t,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),e.prototype.castToBaseTexture=function(){return this.baseTexture},e}(q.a);function Ze(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}$e.EMPTY=new $e(new De),Ze($e.EMPTY),Ze($e.EMPTY.baseTexture),$e.WHITE=function(){var t=document.createElement("canvas");t.width=16,t.height=16;var e=t.getContext("2d");return e.fillStyle="white",e.fillRect(0,0,16,16),new $e(new De(new Ue(t)))}(),Ze($e.WHITE),Ze($e.WHITE.baseTexture);var Je=function(t){function e(e,n){var r=this,i=null;if(!(e instanceof qe)){var o=arguments[1],a=arguments[2],s=arguments[3],u=arguments[4];console.warn("Please use RenderTexture.create("+o+", "+a+") instead of the ctor directly."),i=arguments[0],n=null,e=new qe({width:o,height:a,scaleMode:s,resolution:u})}return(r=t.call(this,e,n)||this).legacyRenderer=i,r.valid=!0,r.filterFrame=null,r.filterPoolKey=null,r.updateUvs(),r}return Ae(e,t),Object.defineProperty(e.prototype,"framebuffer",{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),e.prototype.resize=function(t,e,n){void 0===n&&(n=!0),t=Math.ceil(t),e=Math.ceil(e),this.valid=t>0&&e>0,this._frame.width=this.orig.width=t,this._frame.height=this.orig.height=e,n&&this.baseTexture.resize(t,e),this.updateUvs()},e.prototype.setResolution=function(t){var e=this.baseTexture;e.resolution!==t&&(e.setResolution(t),this.resize(e.width,e.height,!1))},e.create=function(t){return"number"===typeof t&&(t={width:t,height:arguments[1],scaleMode:arguments[2],resolution:arguments[3]}),new e(new qe(t))},e}($e),tn=function(){function t(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}return t.prototype.createTexture=function(t,e){var n=new qe(Object.assign({width:t,height:e,resolution:1},this.textureOptions));return new Je(n)},t.prototype.getOptimalTexture=function(e,n,r){void 0===r&&(r=1);var i=t.SCREEN_KEY;e*=r,n*=r,this.enableFullScreen&&e===this._pixelsWidth&&n===this._pixelsHeight||(i=(65535&(e=yt(e)))<<16|65535&(n=yt(n))),this.texturePool[i]||(this.texturePool[i]=[]);var o=this.texturePool[i].pop();return o||(o=this.createTexture(e,n)),o.filterPoolKey=i,o.setResolution(r),o},t.prototype.getFilterTexture=function(t,e){var n=this.getOptimalTexture(t.width,t.height,e||t.resolution);return n.filterFrame=t.filterFrame,n},t.prototype.returnTexture=function(t){var e=t.filterPoolKey;t.filterFrame=null,this.texturePool[e].push(t)},t.prototype.returnFilterTexture=function(t){this.returnTexture(t)},t.prototype.clear=function(t){if(t=!1!==t)for(var e in this.texturePool){var n=this.texturePool[e];if(n)for(var r=0;r0&&e.height>0,r)for(var i=0;i1){for(var l=0;l1&&this.renderer.framebuffer.blit(),1===n.length)n[0].apply(this,e.renderTexture,u.renderTexture,z.BLEND,e),this.returnFilterTexture(e.renderTexture);else{var l=e.renderTexture,c=this.getOptimalFilterTexture(l.width,l.height,e.resolution);c.filterFrame=l.filterFrame;var h=0;for(h=0;h=0;--r)t[r]=n[r]||null,t[r]&&(t[r]._batchLocation=r)},e.prototype.boundArray=function(t,e,n,r){for(var i=t.elements,o=t.ids,a=t.count,s=0,u=0;u=0&&c=I.WEBGL2&&(n=t.getContext("webgl2",e)),n)this.webGLVersion=2;else if(this.webGLVersion=1,!(n=t.getContext("webgl",e)||t.getContext("experimental-webgl",e)))throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),this.gl},e.prototype.getExtensions=function(){var t=this.gl;1===this.webGLVersion?Object.assign(this.extensions,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),loseContext:t.getExtension("WEBGL_lose_context"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):2===this.webGLVersion&&Object.assign(this.extensions,{anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),colorBufferFloat:t.getExtension("EXT_color_buffer_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear")})},e.prototype.handleContextLost=function(t){t.preventDefault()},e.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},e.prototype.destroy=function(){var t=this.renderer.view;t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},e.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},e.prototype.validateContext=function(t){t.getContextAttributes().stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");var e="WebGL2RenderingContext"in window&&t instanceof window.WebGL2RenderingContext||!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=e,e||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")},e}(Ge),xn=function(t){this.framebuffer=t,this.stencil=null,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.multisample=G.NONE,this.msaaBuffer=null,this.blitFramebuffer=null},wn=new Ht,Tn=function(t){function e(e){var n=t.call(this,e)||this;return n.managedFramebuffers=[],n.unknownFramebuffer=new Ye(10,10),n.msaaSamples=null,n}return Ae(e,t),e.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Ht,this.hasMRT=!0,this.writeDepthTexture=!0,this.disposeAll(!0),1===this.renderer.context.webGLVersion){var e=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;V.PREFER_ENV===I.WEBGL_LEGACY&&(e=null,n=null),e?t.drawBuffers=function(t){return e.drawBuffersWEBGL(t)}:(this.hasMRT=!1,t.drawBuffers=function(){}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)},e.prototype.bind=function(t,e){var n=this.gl;if(t){var r=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,n.bindFramebuffer(n.FRAMEBUFFER,r.framebuffer)),r.dirtyId!==t.dirtyId&&(r.dirtyId=t.dirtyId,r.dirtyFormat!==t.dirtyFormat?(r.dirtyFormat=t.dirtyFormat,this.updateFramebuffer(t)):r.dirtySize!==t.dirtySize&&(r.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(var i=0;i1&&(n.msaaBuffer=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,n.msaaBuffer),e.renderbufferStorageMultisample(e.RENDERBUFFER,n.multisample,e.RGBA8,t.width,t.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.RENDERBUFFER,n.msaaBuffer));for(var i=[],o=0;o1)){var a=t.colorTextures[o],s=a.parentTextureArray||a;this.renderer.texture.bind(s,0),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+o,a.target,s._glTextures[this.CONTEXT_UID].texture,0),i.push(e.COLOR_ATTACHMENT0+o)}if((i.length>1&&e.drawBuffers(i),t.depthTexture)&&this.writeDepthTexture){var u=t.depthTexture;this.renderer.texture.bind(u,0),e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,u._glTextures[this.CONTEXT_UID].texture,0)}n.stencil||!t.stencil&&!t.depth||(n.stencil=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,n.stencil),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.width,t.height),t.depthTexture||e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,n.stencil))},e.prototype.detectSamples=function(t){var e=this.msaaSamples,n=G.NONE;if(t<=1||null===e)return n;for(var r=0;r=0&&this.managedFramebuffers.splice(i,1),t.disposeRunner.remove(this),e||(r.deleteFramebuffer(n.framebuffer),n.stencil&&r.deleteRenderbuffer(n.stencil))}},e.prototype.disposeAll=function(t){var e=this.managedFramebuffers;this.managedFramebuffers=[];for(var n=0;n=r.data.byteLength)e.bufferSubData(o,0,r.data);else{var a=r.static?e.STATIC_DRAW:e.DYNAMIC_DRAW;i.byteLength=r.data.byteLength,e.bufferData(o,r.data,a)}}}},e.prototype.checkCompatibility=function(t,e){var n=t.attributes,r=e.attributeData;for(var i in r)if(!n[i])throw new Error('shader and geometry incompatible, geometry missing the "'+i+'" attribute')},e.prototype.getSignature=function(t,e){var n=t.attributes,r=e.attributeData,i=["g",t.id];for(var o in n)r[o]&&i.push(o);return i.join("-")},e.prototype.initGeometryVao=function(t,e){this.checkCompatibility(t,e);var n=this.gl,r=this.CONTEXT_UID,i=this.getSignature(t,e),o=t.glVertexArrayObjects[this.CONTEXT_UID],a=o[i];if(a)return o[e.id]=a,a;var s=t.buffers,u=t.attributes,l={},c={};for(var h in s)l[h]=0,c[h]=0;for(var h in u)!u[h].size&&e.attributeData[h]?u[h].size=e.attributeData[h].size:u[h].size||console.warn("PIXI Geometry attribute '"+h+"' size cannot be determined (likely the bound shader does not have the attribute)"),l[u[h].buffer]+=u[h].size*Sn[u[h].type];for(var h in u){var f=u[h],p=f.size;void 0===f.stride&&(l[f.buffer]===p*Sn[f.type]?f.stride=0:f.stride=l[f.buffer]),void 0===f.start&&(f.start=c[f.buffer],c[f.buffer]+=p*Sn[f.type])}a=n.createVertexArray(),n.bindVertexArray(a);for(var d=0;d=I.WEBGL2&&(e=t.getContext("webgl2",{})),e||((e=t.getContext("webgl",{})||t.getContext("experimental-webgl",{}))?e.getExtension("WEBGL_draw_buffers"):e=null),Dn=e}return Dn}function Ln(t,e,n){if("precision"!==t.substring(0,9)){var r=e;return e===X.HIGH&&n!==X.HIGH&&(r=X.MEDIUM),"precision "+r+" float;\n"+t}return n!==X.HIGH&&"precision highp"===t.substring(0,15)?t.replace("precision highp","precision mediump"):t}var Fn={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};function Un(t){return Fn[t]}var jn=null,Bn={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",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function zn(t,e){if(!jn){var n=Object.keys(Bn);jn={};for(var r=0;r0&&(e+="\nelse "),ne.name?1:-1}));for(o=0;o0?this._useCurrent():t.disable(t.SCISSOR_TEST)},e.prototype._useCurrent=function(){var t=this.maskStack[this.maskStack.length-1]._scissorRect,e=this.renderer.renderTexture.current,n=this.renderer.projection,r=n.transform,i=n.sourceFrame,o=n.destinationFrame,a=e?e.resolution:this.renderer.resolution,s=(t.x-i.x)*a+o.x,u=(t.y-i.y)*a+o.y,l=t.width*a,c=t.height*a;r&&(s+=r.tx*a,u+=r.ty*a),e||(u=this.renderer.height-c-u),this.renderer.gl.scissor(s,u,l,c)},e}(or),sr=function(t){function e(e){var n=t.call(this,e)||this;return n.glConst=WebGLRenderingContext.STENCIL_TEST,n}return Ae(e,t),e.prototype.getStackLength=function(){var t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0},e.prototype.push=function(t){var e=t.maskObject,n=this.renderer.gl,r=t._stencilCounter;0===r&&(this.renderer.framebuffer.forceStencil(),n.enable(n.STENCIL_TEST)),t._stencilCounter++,n.colorMask(!1,!1,!1,!1),n.stencilFunc(n.EQUAL,r,this._getBitwiseMask()),n.stencilOp(n.KEEP,n.KEEP,n.INCR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,this._useCurrent()},e.prototype.pop=function(t){var e=this.renderer.gl;0===this.getStackLength()?(e.disable(e.STENCIL_TEST),e.clear(e.STENCIL_BUFFER_BIT),e.clearStencil(0)):(e.colorMask(!1,!1,!1,!1),e.stencilOp(e.KEEP,e.KEEP,e.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,this._useCurrent())},e.prototype._useCurrent=function(){var t=this.renderer.gl;t.colorMask(!0,!0,!0,!0),t.stencilFunc(t.EQUAL,this.getStackLength(),this._getBitwiseMask()),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)},e.prototype._getBitwiseMask=function(){return(1<>=1,n++;this.stateId=t.data}for(n=0;nthis.checkCountMax&&(this.checkCount=0,this.run())))},e.prototype.run=function(){for(var t=this.renderer.texture,e=t.managedTextures,n=!1,r=0;rthis.maxIdle&&(t.destroyTexture(i,!0),e[r]=null,n=!0)}if(n){var o=0;for(r=0;r=0;r--)this.unload(t.children[r])},e}(Ge),br=function(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=6408,this.internalFormat=5121},xr=function(t){function e(e){var n=t.call(this,e)||this;return n.boundTextures=[],n.currentLocation=-1,n.managedTextures=[],n._unknownBoundTextures=!1,n.unknownTexture=new De,n}return Ae(e,t),e.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion;var e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=e;for(var n=0;n=1:e.mipmap=!1,2===this.webGLVersion||t.isPowerOfTwo?e.wrapMode=t.wrapMode:e.wrapMode=U.CLAMP,t.resource&&t.resource.style(this.renderer,t,e)||this.setStyle(t,e),e.dirtyStyleId=t.dirtyStyleId)},e.prototype.setStyle=function(t,e){var n=this.gl;if(e.mipmap&&n.generateMipmap(t.target),n.texParameteri(t.target,n.TEXTURE_WRAP_S,e.wrapMode),n.texParameteri(t.target,n.TEXTURE_WRAP_T,e.wrapMode),e.mipmap){n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===F.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);var r=this.renderer.context.extensions.anisotropicFiltering;if(r&&t.anisotropicLevel>0&&t.scaleMode===F.LINEAR){var i=Math.min(t.anisotropicLevel,n.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(t.target,r.TEXTURE_MAX_ANISOTROPY_EXT,i)}}else n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===F.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(t.target,n.TEXTURE_MAG_FILTER,t.scaleMode===F.LINEAR?n.LINEAR:n.NEAREST)},e}(Ge),wr={FilterSystem:vn,BatchSystem:gn,ContextSystem:bn,FramebufferSystem:Tn,GeometrySystem:Pn,MaskSystem:ir,ScissorSystem:ar,StencilSystem:sr,ProjectionSystem:ur,RenderTextureSystem:fr,ShaderSystem:yr,StateSystem:gr,TextureGCSystem:_r,TextureSystem:xr},Tr=new Kt,Er=function(t){function e(e,n){void 0===e&&(e=A.UNKNOWN);var r=t.call(this)||this;return(n=Object.assign({},V.RENDER_OPTIONS,n)).roundPixels&&(V.ROUND_PIXELS=n.roundPixels,St("5.0.0","Renderer roundPixels option is deprecated, please use PIXI.settings.ROUND_PIXELS",2)),r.options=n,r.type=e,r.screen=new Ht(0,0,n.width,n.height),r.view=n.view||document.createElement("canvas"),r.resolution=n.resolution||V.RESOLUTION,r.transparent=n.transparent,r.autoDensity=n.autoDensity||n.autoResize||!1,r.preserveDrawingBuffer=n.preserveDrawingBuffer,r.clearBeforeRender=n.clearBeforeRender,r._backgroundColor=0,r._backgroundColorRgba=[0,0,0,0],r._backgroundColorString="#000000",r.backgroundColor=n.backgroundColor||r._backgroundColor,r._lastObjectRendered=null,r.plugins={},r}return Ae(e,t),e.prototype.initPlugins=function(t){for(var e in t)this.plugins[e]=new t[e](this)},Object.defineProperty(e.prototype,"width",{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.view.height},enumerable:!1,configurable:!0}),e.prototype.resize=function(t,e){this.screen.width=t,this.screen.height=e,this.view.width=t*this.resolution,this.view.height=e*this.resolution,this.autoDensity&&(this.view.style.width=t+"px",this.view.style.height=e+"px"),this.emit("resize",t,e)},e.prototype.generateTexture=function(t,e,n,r){0===(r=r||t.getLocalBounds(null,!0)).width&&(r.width=1),0===r.height&&(r.height=1);var i=Je.create({width:0|r.width,height:0|r.height,scaleMode:e,resolution:n});return Tr.tx=-r.x,Tr.ty=-r.y,this.render(t,i,!1,Tr,!!t.parent),i},e.prototype.destroy=function(t){for(var e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null;t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);var n=this;n.plugins=null,n.type=A.UNKNOWN,n.view=null,n.screen=null,n._tempDisplayObjectParent=null,n.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._backgroundColorString=ot(t),it(t,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),e}(q.a),Sr=function(t){function e(n){var r=t.call(this,A.WEBGL,n)||this;return n=r.options,r.gl=null,r.CONTEXT_UID=0,r.runners={destroy:new Pe("destroy"),contextChange:new Pe("contextChange"),reset:new Pe("reset"),update:new Pe("update"),postrender:new Pe("postrender"),prerender:new Pe("prerender"),resize:new Pe("resize")},r.globalUniforms=new dn({projectionMatrix:new Kt},!0),r.addSystem(ir,"mask").addSystem(bn,"context").addSystem(gr,"state").addSystem(yr,"shader").addSystem(xr,"texture").addSystem(Pn,"geometry").addSystem(Tn,"framebuffer").addSystem(ar,"scissor").addSystem(sr,"stencil").addSystem(ur,"projection").addSystem(_r,"textureGC").addSystem(vn,"filter").addSystem(fr,"renderTexture").addSystem(gn,"batch"),r.initPlugins(e.__plugins),n.context?r.context.initFromContext(n.context):r.context.initFromOptions({alpha:!!r.transparent,antialias:n.antialias,premultipliedAlpha:r.transparent&&"notMultiplied"!==r.transparent,stencil:!0,preserveDrawingBuffer:n.preserveDrawingBuffer,powerPreference:r.options.powerPreference}),r.renderingToScreen=!0,nt(2===r.context.webGLVersion?"WebGL 2":"WebGL 1"),r.resize(r.options.width,r.options.height),r}return Ae(e,t),e.create=function(t){if(rt())return new e(t);throw new Error('WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.')},e.prototype.addSystem=function(t,e){e||(e=t.name);var n=new t(this);if(this[e])throw new Error('Whoops! The name "'+e+'" is already in use');for(var r in this[e]=n,this.runners)this.runners[r].add(n);return this},e.prototype.render=function(t,e,n,r,i){if(this.renderingToScreen=!e,this.runners.prerender.emit(),this.emit("prerender"),this.projection.transform=r,!this.context.isLost){if(e||(this._lastObjectRendered=t),!i){var o=t.enableTempParent();t.updateTransform(),t.disableTempParent(o)}this.renderTexture.bind(e),this.batch.currentRenderer.start(),(void 0!==n?n:this.clearBeforeRender)&&this.renderTexture.clear(),t.render(this),this.batch.currentRenderer.flush(),e&&e.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit("postrender")}},e.prototype.resize=function(e,n){t.prototype.resize.call(this,e,n),this.runners.resize.emit(e,n)},e.prototype.reset=function(){return this.runners.reset.emit(),this},e.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},e.prototype.destroy=function(e){for(var n in this.runners.destroy.emit(),this.runners)this.runners[n].destroy();t.prototype.destroy.call(this,e),this.gl=null},e.registerPlugin=function(t,n){e.__plugins=e.__plugins||{},e.__plugins[t]=n},e}(Er);function Pr(t){return Sr.create(t)}var Or="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}",Cr="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n",Ir=function(){this.texArray=null,this.blend=0,this.type=R.TRIANGLES,this.start=0,this.size=0,this.data=null},Ar=function(){function t(){this.elements=[],this.ids=[],this.count=0}return t.prototype.clear=function(){for(var t=0;tthis.size&&this.flush(),this._vertexCount+=t.vertexData.length/2,this._indexCount+=t.indices.length,this._bufferedTextures[this._bufferSize]=t._texture.baseTexture,this._bufferedElements[this._bufferSize++]=t)},e.prototype.buildTexturesAndDrawCalls=function(){var t=this._bufferedTextures,n=this.MAX_TEXTURES,r=e._textureArrayPool,i=this.renderer.batch,o=this._tempBoundTextures,a=this.renderer.textureGC.count,s=++De._globalBatch,u=0,l=r[0],c=0;i.copyBoundTextures(o,n);for(var h=0;h=n&&(i.boundArray(l,o,s,n),this.buildDrawCalls(l,c,h),c=h,l=r[++u],++s),f._batchEnabled=s,f.touched=a,l.elements[l.count++]=f)}l.count>0&&(i.boundArray(l,o,s,n),this.buildDrawCalls(l,c,this._bufferSize),++u,++s);for(h=0;h0&&(e+="\nelse "),n0||e.responseType===t.XHR_RESPONSE_TYPE.BUFFER)?r=200:1223===r&&(r=204),2===(r/100|0)){if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=n,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(n),this.type=t.TYPE.JSON}catch(a){return void this.abort("Error trying to parse loaded json: "+a)}else if(this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var i=new DOMParser;this.data=i.parseFromString(n,"text/xml")}else{var o=document.createElement("div");o.innerHTML=n,this.data=o}this.type=t.TYPE.XML}catch(a){return void this.abort("Error trying to parse loaded xml: "+a)}else this.data=e.response||n;this.complete()}else this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL)},e._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";if(window.origin!==window.location.origin)return"anonymous";e=e||window.location,ei||(ei=document.createElement("a")),ei.href=t;var n=!(t=Wr()(ei.href,{strictMode:!0})).port&&""===e.port||t.port===e.port,r=t.protocol?t.protocol+":":"";return t.host===e.hostname&&n&&r===e.protocol?"":"anonymous"},e._determineXhrType=function(){return t._xhrTypeMap[this.extension]||t.XHR_RESPONSE_TYPE.TEXT},e._determineLoadType=function(){return t._loadTypeMap[this.extension]||t.LOAD_TYPE.XHR},e._getExtension=function(){var t=this.url,e="";if(this.isDataUrl){var n=t.indexOf("/");e=t.substring(n+1,t.indexOf(";",n))}else{var r=t.indexOf("?"),i=t.indexOf("#"),o=Math.min(r>-1?r:t.length,i>-1?i:t.length);e=(t=t.substring(0,o)).substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},e._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"}},Jr(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}();function ii(t,e,n){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=n)}function oi(t){return t.toString().replace("object ","")}ri.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},ri.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},ri.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},ri.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},ri._loadTypeMap={gif:ri.LOAD_TYPE.IMAGE,png:ri.LOAD_TYPE.IMAGE,bmp:ri.LOAD_TYPE.IMAGE,jpg:ri.LOAD_TYPE.IMAGE,jpeg:ri.LOAD_TYPE.IMAGE,tif:ri.LOAD_TYPE.IMAGE,tiff:ri.LOAD_TYPE.IMAGE,webp:ri.LOAD_TYPE.IMAGE,tga:ri.LOAD_TYPE.IMAGE,svg:ri.LOAD_TYPE.IMAGE,"svg+xml":ri.LOAD_TYPE.IMAGE,mp3:ri.LOAD_TYPE.AUDIO,ogg:ri.LOAD_TYPE.AUDIO,wav:ri.LOAD_TYPE.AUDIO,mp4:ri.LOAD_TYPE.VIDEO,webm:ri.LOAD_TYPE.VIDEO},ri._xhrTypeMap={xhtml:ri.XHR_RESPONSE_TYPE.DOCUMENT,html:ri.XHR_RESPONSE_TYPE.DOCUMENT,htm:ri.XHR_RESPONSE_TYPE.DOCUMENT,xml:ri.XHR_RESPONSE_TYPE.DOCUMENT,tmx:ri.XHR_RESPONSE_TYPE.DOCUMENT,svg:ri.XHR_RESPONSE_TYPE.DOCUMENT,tsx:ri.XHR_RESPONSE_TYPE.DOCUMENT,gif:ri.XHR_RESPONSE_TYPE.BLOB,png:ri.XHR_RESPONSE_TYPE.BLOB,bmp:ri.XHR_RESPONSE_TYPE.BLOB,jpg:ri.XHR_RESPONSE_TYPE.BLOB,jpeg:ri.XHR_RESPONSE_TYPE.BLOB,tif:ri.XHR_RESPONSE_TYPE.BLOB,tiff:ri.XHR_RESPONSE_TYPE.BLOB,webp:ri.XHR_RESPONSE_TYPE.BLOB,tga:ri.XHR_RESPONSE_TYPE.BLOB,json:ri.XHR_RESPONSE_TYPE.JSON,text:ri.XHR_RESPONSE_TYPE.TEXT,txt:ri.XHR_RESPONSE_TYPE.TEXT,ttf:ri.XHR_RESPONSE_TYPE.BUFFER,otf:ri.XHR_RESPONSE_TYPE.BUFFER},ri.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";var ai=window.URL||window.webkitURL;var si={caching:function(t,e){var n=this;$r[t.url]?(t.data=$r[t.url],t.complete()):t.onComplete.once((function(){return $r[n.url]=n.data})),e()},parsing:function(t,e){if(t.data){if(t.xhr&&t.xhrType===ri.XHR_RESPONSE_TYPE.BLOB)if(window.Blob&&"string"!==typeof t.data){if(0===t.data.type.indexOf("image")){var n=ai.createObjectURL(t.data);return t.blob=t.data,t.data=new Image,t.data.src=n,t.type=ri.TYPE.IMAGE,void(t.data.onload=function(){ai.revokeObjectURL(n),t.data.onload=null,e()})}}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,"+function(t){for(var e="",n=0;n>2,i[1]=(3&r[0])<<4|r[1]>>4,i[2]=(15&r[1])<<2|r[2]>>6,i[3]=63&r[2],n-(t.length-1)){case 2:i[3]=64,i[2]=64;break;case 1:i[3]=64}for(var a=0;a16384&&(r=16384),o._properties=[!1,!0,!1,!1,!1],o._maxSize=e,o._batchSize=r,o._buffers=null,o._bufferUpdateIDs=[],o._updateID=0,o.interactiveChildren=!1,o.blendMode=M.NORMAL,o.autoResize=i,o.roundPixels=!0,o.baseTexture=null,o.setProperties(n),o._tint=0,o.tintRgb=new Float32Array(4),o.tint=16777215,o}return vi(e,t),e.prototype.setProperties=function(t){t&&(this._properties[0]="vertices"in t||"scale"in t?!!t.vertices||!!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]="tint"in t||"alpha"in t?!!t.tint||!!t.alpha:this._properties[4])},e.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(t){this._tint=t,it(t,this.tintRgb)},enumerable:!1,configurable:!0}),e.prototype.render=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.valid||this.baseTexture.once("update",(function(){return e.onChildrenChange(0)}))),t.batch.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},e.prototype.onChildrenChange=function(t){for(var e=Math.floor(t/this._batchSize);this._bufferUpdateIDs.lengthn&&!t.autoResize&&(o=n);var a=t._buffers;a||(a=t._buffers=this.generateBuffers(t));var s=e[0]._texture.baseTexture;this.state.blendMode=lt(t.blendMode,s.alphaMode),i.state.set(this.state);var u=i.gl,l=t.worldTransform.copyTo(this.tempMatrix);l.prepend(i.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=l.toArray(!0),this.shader.uniforms.uColor=ct(t.tintRgb,t.worldAlpha,this.shader.uniforms.uColor,s.alphaMode),this.shader.uniforms.uSampler=s,this.renderer.shader.bind(this.shader);for(var c=!1,h=0,f=0;hr&&(p=r),f>=a.length&&a.push(this._generateOneMoreBuffer(t));var d=a[f];d.uploadDynamic(e,h,p);var m=t._bufferUpdateIDs[f]||0;(c=c||d._updateID0,l=s.alpha,c=l<1&&u?ht(s._tintRGB,l):s._tintRGB+(255*l<<24);r[o]=c,r[o+i]=c,r[o+2*i]=c,r[o+3*i]=c,o+=4*i}},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null},e}(yn);!function(t){t.MITER="miter",t.BEVEL="bevel",t.ROUND="round"}(yi||(yi={})),function(t){t.BUTT="butt",t.ROUND="round",t.SQUARE="square"}(gi||(gi={}));var wi={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount:function(t,e){if(void 0===e&&(e=20),!this.adaptive||!t||isNaN(t))return e;var n=Math.ceil(t/this.maxLength);return nthis.maxSegments&&(n=this.maxSegments),n}},Ti=function(){function t(){this.color=16777215,this.alpha=1,this.texture=$e.WHITE,this.matrix=null,this.visible=!1,this.reset()}return t.prototype.clone=function(){var e=new t;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e},t.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=$e.WHITE,this.matrix=null,this.visible=!1},t.prototype.destroy=function(){this.texture=null,this.matrix=null},t}(),Ei=function(t,e){return(Ei=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function Si(t,e){function n(){this.constructor=t}Ei(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var Pi={build:function(t){t.points=t.shape.points.slice()},triangulate:function(t,e){var n=t.points,r=t.holes,i=e.points,o=e.indices;if(n.length>=6){for(var a=[],s=0;sh&&(h+=2*Math.PI);var f=c,p=h-c,d=Math.abs(p),m=Math.sqrt(u*u+l*l),v=1+(15*d*Math.sqrt(m)/Math.PI>>0),y=p/v;if(f+=y,s){a.push(t,e),a.push(n,r);for(var g=1,_=f;gg?(j?(f.push(G,V),f.push(x+S*M,w+P*M),f.push(G,V),f.push(x+O*M,w+C*M)):(f.push(x-S*k,w-P*k),f.push(Y,q),f.push(x-O*k,w-C*k),f.push(Y,q)),d+=2):o.join===yi.ROUND?j?(f.push(G,V),f.push(x+S*M,w+P*M),d+=Ri(x,w,x+S*M,w+P*M,x+O*M,w+C*M,f,!0)+4,f.push(G,V),f.push(x+O*M,w+C*M)):(f.push(x-S*k,w-P*k),f.push(Y,q),d+=Ri(x,w,x-S*k,w-P*k,x-O*k,w-C*k,f,!1)+4,f.push(x-O*k,w-C*k),f.push(Y,q)):(f.push(G,V),f.push(Y,q))}}_=r[2*(p-2)],b=r[2*(p-2)+1],x=r[2*(p-1)],S=-(b-(w=r[2*(p-1)+1])),P=_-x,S/=I=Math.sqrt(S*S+P*P),P/=I,S*=v,P*=v,f.push(x-S*k,w-P*k),f.push(x+S*M,w+P*M),u||(o.cap===gi.ROUND?d+=Ri(x-S*(k-M)*.5,w-P*(k-M)*.5,x-S*k,w-P*k,x+S*M,w+P*M,f,!1)+2:o.cap===gi.SQUARE&&(d+=Mi(x,w,S,P,k,M,!1,f)));var K=e.indices,Q=wi.epsilon*wi.epsilon;for(R=m;Rc*s}},t.arc=function(t,e,n,r,i,o,a,s,u){for(var l=a-o,c=wi._segmentsCount(Math.abs(l)*i,40*Math.ceil(Math.abs(l)/jt)),h=l/(2*c),f=2*h,p=Math.cos(h),d=Math.sin(h),m=c-1,v=m%1/m,y=0;y<=m;++y){var g=h+o+f*(y+v*y),_=Math.cos(g),b=-Math.sin(g);u.push((p*_+d*b)*i+n,(p*-b+d*_)*i+r)}},t}(),Ui=function(){function t(){}return t.curveLength=function(t,e,n,r,i,o,a,s){for(var u=0,l=0,c=0,h=0,f=0,p=0,d=0,m=0,v=0,y=0,g=0,_=t,b=e,x=1;x<=10;++x)y=_-(m=(d=(p=(f=1-(l=x/10))*f)*f)*t+3*p*l*n+3*f*(c=l*l)*i+(h=c*l)*a),g=b-(v=d*e+3*p*l*r+3*f*c*o+h*s),_=m,b=v,u+=Math.sqrt(y*y+g*g);return u},t.curveTo=function(e,n,r,i,o,a,s){var u=s[s.length-2],l=s[s.length-1];s.length-=2;var c=wi._segmentsCount(t.curveLength(u,l,e,n,r,i,o,a)),h=0,f=0,p=0,d=0,m=0;s.push(u,l);for(var v=1,y=0;v<=c;++v)p=(f=(h=1-(y=v/c))*h)*h,m=(d=y*y)*y,s.push(p*u+3*f*y*e+3*h*d*r+m*o,p*l+3*f*y*n+3*h*d*i+m*a)},t}(),ji=function(){function t(){}return t.curveLength=function(t,e,n,r,i,o){var a=t-2*n+i,s=e-2*r+o,u=2*n-2*t,l=2*r-2*e,c=4*(a*a+s*s),h=4*(a*u+s*l),f=u*u+l*l,p=2*Math.sqrt(c+h+f),d=Math.sqrt(c),m=2*c*d,v=2*Math.sqrt(f),y=h/d;return(m*p+d*h*(p-v)+(4*f*c-h*h)*Math.log((2*d+y+p)/(y+v)))/(4*m)},t.curveTo=function(e,n,r,i,o){for(var a=o[o.length-2],s=o[o.length-1],u=wi._segmentsCount(t.curveLength(a,s,e,n,r,i)),l=0,c=0,h=1;h<=u;++h){var f=h/u;l=a+(e-a)*f,c=s+(n-s)*f,o.push(l+(e+(r-e)*f-l)*f,c+(n+(i-n)*f-c)*f)}},t}(),Bi=function(){function t(){this.reset()}return t.prototype.begin=function(t,e,n){this.reset(),this.style=t,this.start=e,this.attribStart=n},t.prototype.end=function(t,e){this.attribSize=e-this.attribStart,this.size=t-this.start},t.prototype.reset=function(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0},t}(),zi=((Ni={})[Ut.POLY]=Pi,Ni[Ut.CIRC]=Oi,Ni[Ut.ELIP]=Oi,Ni[Ut.RECT]=Ci,Ni[Ut.RREC]=ki,Ni),Hi=[],Xi=[],Wi={buildPoly:Pi,buildCircle:Oi,buildRectangle:Ci,buildRoundedRectangle:ki,FILL_COMMANDS:zi,BATCH_POOL:Hi,DRAW_CALL_POOL:Xi,buildLine:Di,Star:Li,ArcUtils:Fi,BezierUtils:Ui,QuadraticUtils:ji,BatchPart:Bi},Gi=function(){function t(t,e,n,r){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),this.shape=t,this.lineStyle=n,this.fillStyle=e,this.matrix=r,this.type=t.type,this.points=[],this.holes=[]}return t.prototype.clone=function(){return new t(this.shape,this.fillStyle,this.lineStyle,this.matrix)},t.prototype.destroy=function(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null},t}(),Vi=new Yt,Yi=new oe,qi=function(t){function e(){var e=t.call(this)||this;return e.uvsFloat32=null,e.indicesUint16=null,e.points=[],e.colors=[],e.uvs=[],e.indices=[],e.textureIds=[],e.graphicsData=[],e.dirty=0,e.batchDirty=-1,e.cacheDirty=-1,e.clearDirty=0,e.drawCalls=[],e.batches=[],e.shapeIndex=0,e._bounds=new oe,e.boundsDirty=-1,e.boundsPadding=0,e.batchable=!1,e.indicesUint16=null,e.uvsFloat32=null,e.closePointEps=1e-4,e}return Si(e,t),Object.defineProperty(e.prototype,"bounds",{get:function(){return this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds},enumerable:!1,configurable:!0}),e.prototype.invalidate=function(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(var t=0;t0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this},e.prototype.drawShape=function(t,e,n,r){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null);var i=new Gi(t,e,n,r);return this.graphicsData.push(i),this.dirty++,this},e.prototype.drawHole=function(t,e){if(void 0===e&&(e=null),!this.graphicsData.length)return null;var n=new Gi(t,null,null,e),r=this.graphicsData[this.graphicsData.length-1];return n.lineStyle=r.lineStyle,r.holes.push(n),this.dirty++,this},e.prototype.destroy=function(){t.prototype.destroy.call(this);for(var e=0;e0&&(i=(r=this.batches[this.batches.length-1]).style);for(var o=this.shapeIndex;o65535&&t;this.indicesUint16=y?new Uint32Array(this.indices):new Uint16Array(this.indices)}this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}else this.batchable=!0}}else this.batchable=!0},e.prototype._compareStyles=function(t,e){return!(!t||!e)&&(t.texture.baseTexture===e.texture.baseTexture&&(t.color+t.alpha===e.color+e.alpha&&!!t.native===!!e.native))},e.prototype.validateBatching=function(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(var t=0,e=this.graphicsData.length;t131070)return!1;for(var t=this.batches,n=0;n0&&((i=Xi.pop())||((i=new Ir).texArray=new Ar),this.drawCalls.push(i)),i.start=c,i.size=0,i.texArray.count=0,i.type=l),p.touched=1,p._batchEnabled=t,p._batchLocation=o,p.wrapMode=10497,i.texArray.elements[i.texArray.count++]=p,o++)),i.size+=h.size,c+=h.size,s=p._batchLocation,this.addColors(n,f.color,f.alpha,h.attribSize),this.addTextureIds(r,s,h.attribSize)}De._globalBatch=t,this.packAttributes()},e.prototype.packAttributes=function(){for(var t=this.points,e=this.uvs,n=this.colors,r=this.textureIds,i=new ArrayBuffer(3*t.length*4),o=new Float32Array(i),a=new Uint32Array(i),s=0,u=0;u>16)+(65280&e)+((255&e)<<16),n);r-- >0;)t.push(i)},e.prototype.addTextureIds=function(t,e,n){for(;n-- >0;)t.push(e)},e.prototype.addUvs=function(t,e,n,r,i,o){void 0===o&&(o=null);for(var a=0,s=e.length,u=n.frame;a0&&t.alpha>0;return l?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._lineStyle,{visible:l},t)):this._lineStyle.reset(),this},e.prototype.startPoly=function(){if(this.currentPath){var t=this.currentPath.points,e=this.currentPath.points.length;e>2&&(this.drawShape(this.currentPath),this.currentPath=new Gt,this.currentPath.closeStroke=!1,this.currentPath.points.push(t[e-2],t[e-1]))}else this.currentPath=new Gt,this.currentPath.closeStroke=!1},e.prototype.finishPoly=function(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)},e.prototype.moveTo=function(t,e){return this.startPoly(),this.currentPath.points[0]=t,this.currentPath.points[1]=e,this},e.prototype.lineTo=function(t,e){this.currentPath||this.moveTo(0,0);var n=this.currentPath.points,r=n[n.length-2],i=n[n.length-1];return r===t&&i===e||n.push(t,e),this},e.prototype._initCurve=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.currentPath?0===this.currentPath.points.length&&(this.currentPath.points=[t,e]):this.moveTo(t,e)},e.prototype.quadraticCurveTo=function(t,e,n,r){this._initCurve();var i=this.currentPath.points;return 0===i.length&&this.moveTo(0,0),ji.curveTo(t,e,n,r,i),this},e.prototype.bezierCurveTo=function(t,e,n,r,i,o){return this._initCurve(),Ui.curveTo(t,e,n,r,i,o,this.currentPath.points),this},e.prototype.arcTo=function(t,e,n,r,i){this._initCurve(t,e);var o=this.currentPath.points,a=Fi.curveTo(t,e,n,r,i,o);if(a){var s=a.cx,u=a.cy,l=a.radius,c=a.startAngle,h=a.endAngle,f=a.anticlockwise;this.arc(s,u,l,c,h,f)}return this},e.prototype.arc=function(t,e,n,r,i,o){if(void 0===o&&(o=!1),r===i)return this;if(!o&&i<=r?i+=jt:o&&r<=i&&(r+=jt),0===i-r)return this;var a=t+Math.cos(r)*n,s=e+Math.sin(r)*n,u=this._geometry.closePointEps,l=this.currentPath?this.currentPath.points:null;if(l){var c=Math.abs(l[l.length-2]-a),h=Math.abs(l[l.length-1]-s);c0;return a?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._fillStyle,{visible:a},t)):this._fillStyle.reset(),this},e.prototype.endFill=function(){return this.finishPoly(),this._fillStyle.reset(),this},e.prototype.drawRect=function(t,e,n,r){return this.drawShape(new Ht(t,e,n,r))},e.prototype.drawRoundedRect=function(t,e,n,r,i){return this.drawShape(new Vt(t,e,n,r,i))},e.prototype.drawCircle=function(t,e,n){return this.drawShape(new Xt(t,e,n))},e.prototype.drawEllipse=function(t,e,n,r){return this.drawShape(new Wt(t,e,n,r))},e.prototype.drawPolygon=function(){for(var t,e=arguments,n=[],r=0;r>16&255)/255*i,o.tint[1]=(r>>8&255)/255*i,o.tint[2]=(255&r)/255*i,o.tint[3]=i,t.shader.bind(e),t.geometry.bind(n,e),t.state.set(this.state);for(var s=0,u=a.length;s>16)+(65280&i)+((255&i)<<16)}}},e.prototype.calculateVertices=function(){var t=this.transform._worldID;if(this._transformID!==t){this._transformID=t;for(var e=this.transform.worldTransform,n=e.a,r=e.b,i=e.c,o=e.d,a=e.tx,s=e.ty,u=this._geometry.points,l=this.vertexData,c=0,h=0;h=r&&eo.x=i&&eo.y>16)+(65280&t)+((255&t)<<16)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=t||$e.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.valid?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))},enumerable:!1,configurable:!0}),e}(he),io=function(t,e){return(io=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};!function(t){t[t.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",t[t.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL"}(to||(to={}));var oo={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:to.LINEAR_VERTICAL,fillGradientStops:[],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",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},ao=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],so=function(){function t(t){this.styleID=0,this.reset(),co(this,t,t)}return t.prototype.clone=function(){var e={};return co(e,this,oo),new t(e)},t.prototype.reset=function(){co(this,oo,oo)},Object.defineProperty(t.prototype,"align",{get:function(){return this._align},set:function(t){this._align!==t&&(this._align=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"breakWords",{get:function(){return this._breakWords},set:function(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadow",{get:function(){return this._dropShadow},set:function(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowAlpha",{get:function(){return this._dropShadowAlpha},set:function(t){this._dropShadowAlpha!==t&&(this._dropShadowAlpha=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowAngle",{get:function(){return this._dropShadowAngle},set:function(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowBlur",{get:function(){return this._dropShadowBlur},set:function(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowColor",{get:function(){return this._dropShadowColor},set:function(t){var e=lo(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowDistance",{get:function(){return this._dropShadowDistance},set:function(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fill",{get:function(){return this._fill},set:function(t){var e=lo(t);this._fill!==e&&(this._fill=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillGradientType",{get:function(){return this._fillGradientType},set:function(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillGradientStops",{get:function(){return this._fillGradientStops},set:function(t){(function(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(var n=0;n=0;n--){var r=e[n].trim();!/([\"\'])[^\'\"]+\1/.test(r)&&ao.indexOf(r)<0&&(r='"'+r+'"'),e[n]=r}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+t+" "+e.join(",")},t}();function uo(t){return"number"===typeof t?ot(t):("string"===typeof t&&0===t.indexOf("0x")&&(t=t.replace("0x","#")),t)}function lo(t){if(Array.isArray(t)){for(var e=0;ed)if(""!==a&&(s+=t.addLine(a),a="",o=0),t.canBreakWords(y,n.breakWords))for(var x=t.wordWrapSplit(y),w=0;wd&&(s+=t.addLine(a),p=!1,a="",o=0),a+=T,o+=O}else{a.length>0&&(s+=t.addLine(a),a="",o=0);var C=v===m.length-1;s+=t.addLine(y,!C),p=!1,a="",o=0}else b+o>d&&(p=!1,s+=t.addLine(a),a="",o=0),(a.length>0||!t.isBreakingSpace(y)||p)&&(a+=y,o+=b)}return s+=t.addLine(a,!1)},t.addLine=function(e,n){return void 0===n&&(n=!0),e=t.trimRight(e),e=n?e+"\n":e},t.getFromCache=function(t,e,n,r){var i=n[t];if(void 0===i){var o=t.length*e;i=r.measureText(t).width+o,n[t]=i}return i},t.collapseSpaces=function(t){return"normal"===t||"pre-line"===t},t.collapseNewlines=function(t){return"normal"===t},t.trimRight=function(e){if("string"!==typeof e)return"";for(var n=e.length-1;n>=0;n--){var r=e[n];if(!t.isBreakingSpace(r))break;e=e.slice(0,-1)}return e},t.isNewline=function(e){return"string"===typeof e&&t._newlines.indexOf(e.charCodeAt(0))>=0},t.isBreakingSpace=function(e){return"string"===typeof e&&t._breakingSpaces.indexOf(e.charCodeAt(0))>=0},t.tokenize=function(e){var n=[],r="";if("string"!==typeof e)return n;for(var i=0;is;--f){for(m=0;m0},t}();function go(t,e){var n=!1;if(t&&t._textures&&t._textures.length)for(var r=0;r=0;e--)this.add(t.children[e]);return this},t.prototype.destroy=function(){this.ticking&&ve.system.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}();function Po(t,e){return e instanceof De&&(e._glTextures[t.CONTEXT_UID]||t.texture.bind(e),!0)}function Oo(t,e){if(!(e instanceof Zi))return!1;var n=e.geometry;e.finishPoly(),n.updateBatches();for(var r=n.batches,i=0;i=r&&No.x=i&&No.y>16)+(65280&t)+((255&t)<<16),this._colorDirty=!0)},enumerable:!1,configurable:!0}),e.prototype.update=function(){if(this._colorDirty){this._colorDirty=!1;var t=this.texture.baseTexture;ft(this._tint,this._alpha,this.uniforms.uColor,t.alphaMode)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)},e}(Zn),Yo=function(t){function e(e,n,r){var i=t.call(this)||this,o=new rn(e),a=new rn(n,!0),s=new rn(r,!0,!0);return i.addAttribute("aVertexPosition",o,2,!1,L.FLOAT).addAttribute("aTextureCoord",a,2,!1,L.FLOAT).addIndex(s),i._updateId=-1,i}return zo(e,t),Object.defineProperty(e.prototype,"vertexDirtyId",{get:function(){return this.buffers[0]._updateID},enumerable:!1,configurable:!0}),e}(cn),qo=function(t,e){return(qo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var Ko=function(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[]},Qo=[function(){function t(){}return t.test=function(t){return"string"===typeof t&&0===t.indexOf("info face=")},t.parse=function(t){var e=t.match(/^[a-z]+\s+.+$/gm),n={info:[],common:[],page:[],char:[],chars:[],kerning:[]};for(var r in e){var i=e[r].match(/^[a-z]+/gm)[0],o=e[r].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),a={};for(var s in o){var u=o[s].split("="),l=u[0],c=u[1].replace(/"/gm,""),h=parseFloat(c),f=isNaN(h)?c:h;a[l]=f}n[i].push(a)}var p=new Ko;return n.info.forEach((function(t){return p.info.push({face:t.face,size:parseInt(t.size,10)})})),n.common.forEach((function(t){return p.common.push({lineHeight:parseInt(t.lineHeight,10)})})),n.page.forEach((function(t){return p.page.push({id:parseInt(t.id,10),file:t.file})})),n.char.forEach((function(t){return p.char.push({id:parseInt(t.id,10),page:parseInt(t.page,10),x:parseInt(t.x,10),y:parseInt(t.y,10),width:parseInt(t.width,10),height:parseInt(t.height,10),xoffset:parseInt(t.xoffset,10),yoffset:parseInt(t.yoffset,10),xadvance:parseInt(t.xadvance,10)})})),n.kerning.forEach((function(t){return p.kerning.push({first:parseInt(t.first,10),second:parseInt(t.second,10),amount:parseInt(t.amount,10)})})),p},t}(),function(){function t(){}return t.test=function(t){return t instanceof XMLDocument&&t.getElementsByTagName("page").length&&null!==t.getElementsByTagName("info")[0].getAttribute("face")},t.parse=function(t){for(var e=new Ko,n=t.getElementsByTagName("info"),r=t.getElementsByTagName("common"),i=t.getElementsByTagName("page"),o=t.getElementsByTagName("char"),a=t.getElementsByTagName("kerning"),s=0;s=l-E*s){if(0===g)throw new Error("[BitmapFont] textureHeight "+l+"px is too small for "+h.fontSize+"px fonts");--x,d=null,m=null,v=null,g=0,y=0,_=0}else if(_=Math.max(E+w.fontProperties.descent,_),S*s+y>=f)--x,g+=_*s,g=Math.ceil(g),y=0,_=0;else{Jo(d,m,w,y,g,s,h);var P=w.text.charCodeAt(0);p.char.push({id:P,page:b.length-1,x:y/s,y:g/s,width:S,height:E,xoffset:0,yoffset:0,xadvance:Math.ceil(T-(h.dropShadow?h.dropShadowDistance:0)-(h.stroke?h.strokeThickness:0))}),y+=(S+2*a)*s,y=Math.ceil(y)}}var O=new t(p,b);return void 0!==t.available[e]&&t.uninstall(e),t.available[e]=O,O},t.ALPHA=[["a","z"],["A","Z"]," "],t.NUMERIC=[["0","9"]],t.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],t.ASCII=[[" ","~"]],t.defaultOptions={resolution:1,textureWidth:512,textureHeight:512,padding:4,chars:t.ALPHANUMERIC},t.available={},t}(),ea=[],na=[],ra=function(t){function e(n,r){void 0===r&&(r={});var i=t.call(this)||this;i._tint=16777215,r.font&&(St("5.3.0","PIXI.BitmapText constructor style.font property is deprecated."),i._upgradeStyle(r));var o=Object.assign({},e.styleDefaults,r),a=o.align,s=o.tint,u=o.maxWidth,l=o.letterSpacing,c=o.fontName,h=o.fontSize;if(!ta.available[c])throw new Error('Missing BitmapFont "'+c+'"');return i._activePagesMeshData=[],i._textWidth=0,i._textHeight=0,i._align=a,i._tint=s,i._fontName=c,i._fontSize=h||ta.available[c].size,i._text=n,i._maxWidth=u,i._maxLineHeight=0,i._letterSpacing=l,i._anchor=new qt((function(){i.dirty=!0}),i,0,0),i.roundPixels=V.ROUND_PIXELS,i.dirty=!0,i}return function(t,e){function n(){this.constructor=t}qo(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.updateText=function(){for(var t,e=ta.available[this._fontName],n=this._fontSize/e.size,r=new Yt,i=[],o=[],a=this._text.replace(/(?:\r\n|\r)/g,"\n")||" ",s=a.length,u=this._maxWidth*e.size/this._fontSize,l=null,c=0,h=0,f=0,p=-1,d=0,m=0,v=0,y=0;y0&&r.x>u&&(bt(i,1+p-++m,1+y-p),y=p,p=-1,o.push(d),h=Math.max(h,d),f++,r.x=0,r.y+=e.lineHeight,l=null)}}else o.push(c),h=Math.max(h,c),++f,++m,r.x=0,r.y+=e.lineHeight,l=null}var w=a.charAt(a.length-1);"\r"!==w&&"\n"!==w&&(/(?:\s)/.test(w)&&(c=d),o.push(c),h=Math.max(h,c));var T=[];for(y=0;y<=f;y++){var E=0;"right"===this._align?E=h-o[y]:"center"===this._align&&(E=(h-o[y])/2),T.push(E)}var S=i.length,P={},O=[],C=this._activePagesMeshData;for(y=0;y6*M&&!(B.vertices.length<2*Go.BATCHABLE_SIZE)||(B.vertices=new Float32Array(8*M),B.uvs=new Float32Array(8*M),B.indices=new Uint16Array(6*M)),B.mesh.size=6*M}for(y=0;y=2&&(t.fontSize=parseInt(e[0],10))}else t.fontName=t.font.name,t.fontSize="number"===typeof t.font.size?t.font.size:parseInt(t.font.size,10)},e.registerFont=function(t,e){return St("5.3.0","PIXI.BitmapText.registerFont is deprecated, use PIXI.BitmapFont.install"),ta.install(t,e)},Object.defineProperty(e,"fonts",{get:function(){return St("5.3.0","PIXI.BitmapText.fonts is deprecated, use PIXI.BitmapFont.available"),ta.available},enumerable:!1,configurable:!0}),e.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0},e}(he),ia=function(){function t(){}return t.add=function(){ci.setExtensionXhrType("fnt",ci.XHR_RESPONSE_TYPE.DOCUMENT)},t.use=function(e,n){var r=$o(e.data);if(r)for(var i=t.getBaseUrl(this,e),o=r.parse(e.data),a={},s=function(t){a[t.metadata.pageFile]=t.texture,Object.keys(a).length===o.page.length&&(e.bitmapFont=ta.install(o,a),n())},u=0;u=r&&(e=t-a-1),o+=s=s.replace("%value%",n[e].toString()),o+="\n"}return(i=i.replace("%blur%",o)).replace("%size%",t.toString())}(o);return(a=t.call(this,s,u)||this).horizontal=e,a.resolution=i,a._quality=0,a.quality=r,a.blur=n,a}return ua(e,t),e.prototype.apply=function(t,e,n,r){if(n?this.horizontal?this.uniforms.strength=1/n.width*(n.width/e.width):this.uniforms.strength=1/n.height*(n.height/e.height):this.horizontal?this.uniforms.strength=1/t.renderer.width*(t.renderer.width/e.width):this.uniforms.strength=1/t.renderer.height*(t.renderer.height/e.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,n,r);else{var i=t.getFilterTexture(),o=t.renderer,a=e,s=i;this.state.blend=!1,t.applyFilter(this,a,s,xa.CLEAR);for(var u=1;u 0.0) {\n c.rgb /= c.a;\n }\n\n vec4 result;\n\n result.r = (m[0] * c.r);\n result.r += (m[1] * c.g);\n result.r += (m[2] * c.b);\n result.r += (m[3] * c.a);\n result.r += m[4];\n\n result.g = (m[5] * c.r);\n result.g += (m[6] * c.g);\n result.g += (m[7] * c.b);\n result.g += (m[8] * c.a);\n result.g += m[9];\n\n result.b = (m[10] * c.r);\n result.b += (m[11] * c.g);\n result.b += (m[12] * c.b);\n result.b += (m[13] * c.a);\n result.b += m[14];\n\n result.a = (m[15] * c.r);\n result.a += (m[16] * c.g);\n result.a += (m[17] * c.b);\n result.a += (m[18] * c.a);\n result.a += m[19];\n\n vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n // Premultiply alpha again.\n rgb *= result.a;\n\n gl_FragColor = vec4(rgb, result.a);\n}\n",n)||this).alpha=1,e}return function(t,e){function n(){this.constructor=t}Aa(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype._loadMatrix=function(t,e){void 0===e&&(e=!1);var n=t;e&&(this._multiply(n,this.uniforms.m,t),n=this._colorMatrix(n)),this.uniforms.m=n},e.prototype._multiply=function(t,e,n){return t[0]=e[0]*n[0]+e[1]*n[5]+e[2]*n[10]+e[3]*n[15],t[1]=e[0]*n[1]+e[1]*n[6]+e[2]*n[11]+e[3]*n[16],t[2]=e[0]*n[2]+e[1]*n[7]+e[2]*n[12]+e[3]*n[17],t[3]=e[0]*n[3]+e[1]*n[8]+e[2]*n[13]+e[3]*n[18],t[4]=e[0]*n[4]+e[1]*n[9]+e[2]*n[14]+e[3]*n[19]+e[4],t[5]=e[5]*n[0]+e[6]*n[5]+e[7]*n[10]+e[8]*n[15],t[6]=e[5]*n[1]+e[6]*n[6]+e[7]*n[11]+e[8]*n[16],t[7]=e[5]*n[2]+e[6]*n[7]+e[7]*n[12]+e[8]*n[17],t[8]=e[5]*n[3]+e[6]*n[8]+e[7]*n[13]+e[8]*n[18],t[9]=e[5]*n[4]+e[6]*n[9]+e[7]*n[14]+e[8]*n[19]+e[9],t[10]=e[10]*n[0]+e[11]*n[5]+e[12]*n[10]+e[13]*n[15],t[11]=e[10]*n[1]+e[11]*n[6]+e[12]*n[11]+e[13]*n[16],t[12]=e[10]*n[2]+e[11]*n[7]+e[12]*n[12]+e[13]*n[17],t[13]=e[10]*n[3]+e[11]*n[8]+e[12]*n[13]+e[13]*n[18],t[14]=e[10]*n[4]+e[11]*n[9]+e[12]*n[14]+e[13]*n[19]+e[14],t[15]=e[15]*n[0]+e[16]*n[5]+e[17]*n[10]+e[18]*n[15],t[16]=e[15]*n[1]+e[16]*n[6]+e[17]*n[11]+e[18]*n[16],t[17]=e[15]*n[2]+e[16]*n[7]+e[17]*n[12]+e[18]*n[17],t[18]=e[15]*n[3]+e[16]*n[8]+e[17]*n[13]+e[18]*n[18],t[19]=e[15]*n[4]+e[16]*n[9]+e[17]*n[14]+e[18]*n[19]+e[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 n=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.greyscale=function(t,e){var n=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.blackAndWhite=function(t){this._loadMatrix([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],t)},e.prototype.hue=function(t,e){t=(t||0)/180*Math.PI;var n=Math.cos(t),r=Math.sin(t),i=1/3,o=(0,Math.sqrt)(i),a=[n+(1-n)*i,i*(1-n)-o*r,i*(1-n)+o*r,0,0,i*(1-n)+o*r,n+i*(1-n),i*(1-n)-o*r,0,0,i*(1-n)-o*r,i*(1-n)+o*r,n+i*(1-n),0,0,0,0,0,1,0];this._loadMatrix(a,e)},e.prototype.contrast=function(t,e){var n=(t||0)+1,r=-.5*(n-1),i=[n,0,0,0,r,0,n,0,0,r,0,0,n,0,r,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.saturate=function(t,e){void 0===t&&(t=0);var n=2*t/3+1,r=-.5*(n-1),i=[n,r,r,0,0,r,n,r,0,0,r,r,n,0,0,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.desaturate=function(){this.saturate(-1)},e.prototype.negative=function(t){this._loadMatrix([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],t)},e.prototype.sepia=function(t){this._loadMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],t)},e.prototype.technicolor=function(t){this._loadMatrix([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],t)},e.prototype.polaroid=function(t){this._loadMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],t)},e.prototype.toBGR=function(t){this._loadMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t)},e.prototype.kodachrome=function(t){this._loadMatrix([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],t)},e.prototype.browni=function(t){this._loadMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],t)},e.prototype.vintage=function(t){this._loadMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],t)},e.prototype.colorTone=function(t,e,n,r,i){var o=((n=n||16770432)>>16&255)/255,a=(n>>8&255)/255,s=(255&n)/255,u=((r=r||3375104)>>16&255)/255,l=(r>>8&255)/255,c=(255&r)/255,h=[.3,.59,.11,0,0,o,a,s,t=t||.2,0,u,l,c,e=e||.15,0,o-u,a-l,s-c,0,0];this._loadMatrix(h,i)},e.prototype.night=function(t,e){var n=[-2*(t=t||.1),-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.predator=function(t,e){var n=[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(n,e)},e.prototype.lsd=function(t){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},e.prototype.reset=function(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)},Object.defineProperty(e.prototype,"matrix",{get:function(){return this.uniforms.m},set:function(t){this.uniforms.m=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t},enumerable:!1,configurable:!0}),e}(tr);ka.prototype.grayscale=ka.prototype.greyscale;var Ma=function(t,e){return(Ma=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var Ra=function(t){function e(e,n){var r=this,i=new Kt;return e.renderable=!1,(r=t.call(this,"attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n\tgl_Position = filterVertexPosition();\n\tvTextureCoord = filterTextureCoord();\n\tvFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy;\n}\n","varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\nuniform mat2 rotation;\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform highp vec4 inputSize;\nuniform vec4 inputClamp;\n\nvoid main(void)\n{\n vec4 map = texture2D(mapSampler, vFilterCoord);\n\n map -= 0.5;\n map.xy = scale * inputSize.zw * (rotation * map.xy);\n\n gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));\n}\n",{mapSampler:e._texture,filterMatrix:i,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])})||this).maskSprite=e,r.maskMatrix=i,null!==n&&void 0!==n||(n=20),r.scale=new Yt(n,n),r}return function(t,e){function n(){this.constructor=t}Ma(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.apply=function(t,e,n,r){this.uniforms.filterMatrix=t.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;var i=this.maskSprite.worldTransform,o=Math.sqrt(i.a*i.a+i.b*i.b),a=Math.sqrt(i.c*i.c+i.d*i.d);0!==o&&0!==a&&(this.uniforms.rotation[0]=i.a/o,this.uniforms.rotation[1]=i.b/o,this.uniforms.rotation[2]=i.c/a,this.uniforms.rotation[3]=i.d/a),t.applyFilter(this,e,n,r)},Object.defineProperty(e.prototype,"map",{get:function(){return this.uniforms.mapSampler},set:function(t){this.uniforms.mapSampler=t},enumerable:!1,configurable:!0}),e}(tr),Da=function(t,e){return(Da=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var Na=function(t){function e(){return t.call(this,"\nattribute vec2 aVertexPosition;\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\nvarying vec2 vFragCoord;\n\nuniform vec4 inputPixel;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvoid texcoords(vec2 fragCoord, vec2 inverseVP,\n out vec2 v_rgbNW, out vec2 v_rgbNE,\n out vec2 v_rgbSW, out vec2 v_rgbSE,\n out vec2 v_rgbM) {\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 = filterVertexPosition();\n\n vFragCoord = aVertexPosition * outputFrame.zw;\n\n texcoords(vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}\n",'varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\nuniform sampler2D uSampler;\nuniform highp vec4 inputPixel;\n\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 inverseVP,\n vec2 v_rgbNW, vec2 v_rgbNE,\n vec2 v_rgbSW, vec2 v_rgbSE,\n vec2 v_rgbM) {\n vec4 color;\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 vec4 color;\n\n color = fxaa(uSampler, vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n gl_FragColor = color;\n}\n')||this}return function(t,e){function n(){this.constructor=t}Da(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e}(tr),La=function(t,e){return(La=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var Fa=function(t){function e(e,n){void 0===e&&(e=.5),void 0===n&&(n=Math.random());var r=t.call(this,Cr,"precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\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 float randomValue = rand(gl_FragCoord.xy * uSeed);\n float diff = (randomValue - 0.5) * uNoise;\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (color.a > 0.0) {\n color.rgb /= color.a;\n }\n\n color.r += diff;\n color.g += diff;\n color.b += diff;\n\n // Premultiply alpha again.\n color.rgb *= color.a;\n\n gl_FragColor = color;\n}\n",{uNoise:0,uSeed:0})||this;return r.noise=e,r.seed=n,r}return function(t,e){function n(){this.constructor=t}La(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),Object.defineProperty(e.prototype,"noise",{get:function(){return this.uniforms.uNoise},set:function(t){this.uniforms.uNoise=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"seed",{get:function(){return this.uniforms.uSeed},set:function(t){this.uniforms.uSeed=t},enumerable:!1,configurable:!0}),e}(tr),Ua=new Kt;ue.prototype._cacheAsBitmap=!1,ue.prototype._cacheData=null;var ja=function(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null};Object.defineProperties(ue.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){var e;this._cacheAsBitmap!==t&&(this._cacheAsBitmap=t,t?(this._cacheData||(this._cacheData=new ja),(e=this._cacheData).originalRender=this.render,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.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):((e=this._cacheData).sprite&&this._destroyCachedDisplayObject(),this.render=e.originalRender,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))}}}),ue.prototype._renderCached=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(t))},ue.prototype._initCachedDisplayObject=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.alpha;this.alpha=1,t.batch.flush();var n=this.getLocalBounds(null,!0).clone();if(this.filters){var r=this.filters[0].padding;n.pad(r)}n.ceil(V.RESOLUTION);var i=t.renderTexture.current,o=t.renderTexture.sourceFrame.clone(),a=t.projection.transform,s=Je.create({width:n.width,height:n.height}),u="cacheAsBitmap_"+Tt();this._cacheData.textureCacheId=u,De.addToCache(s.baseTexture,u),$e.addToCache(s,u);var l=this.transform.localTransform.copyTo(Ua).invert().translate(-n.x,-n.y);this.render=this._cacheData.originalRender,t.render(this,s,!0,l,!1),t.projection.transform=a,t.renderTexture.bind(i,o),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var c=new ro(s);c.transform.worldTransform=this.transform.worldTransform,c.anchor.x=-n.x/n.width,c.anchor.y=-n.y/n.height,c.alpha=e,c._bounds=this._bounds,this._cacheData.sprite=c,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=c.containsPoint.bind(c)}},ue.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))},ue.prototype._initCachedDisplayObjectCanvas=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.getLocalBounds(null,!0),n=this.alpha;this.alpha=1;var r=t.context,i=t._projTransform;e.ceil(V.RESOLUTION);var o=Je.create({width:e.width,height:e.height}),a="cacheAsBitmap_"+Tt();this._cacheData.textureCacheId=a,De.addToCache(o.baseTexture,a),$e.addToCache(o,a);var s=Ua;this.transform.localTransform.copyTo(s),s.invert(),s.tx-=e.x,s.ty-=e.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,o,!0,s,!1),t.context=r,t._projTransform=i,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var u=new ro(o);u.transform.worldTransform=this.transform.worldTransform,u.anchor.x=-e.x/e.width,u.anchor.y=-e.y/e.height,u.alpha=n,u._bounds=this._bounds,this._cacheData.sprite=u,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=u.containsPoint.bind(u)}},ue.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID},ue.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)},ue.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,De.removeFromCache(this._cacheData.textureCacheId),$e.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},ue.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)},ue.prototype.name=null,he.prototype.getChildByName=function(t,e){for(var n=0,r=this.children.length;n0){var f=s.x-t[c].x,p=s.y-t[c].y,d=Math.sqrt(f*f+p*p);s=t[c],a+=d/u}else a=c/(l-1);i[h]=a,i[h+1]=0,i[h+2]=a,i[h+3]=1}var m=0;for(c=0;c0?this.textureScale*this._width/2:this._width/2;r/=c,i/=c,r*=h,i*=h,o[l]=u.x+r,o[l+1]=u.y+i,o[l+2]=u.x-r,o[l+3]=u.y-i,n=u}this.buffers[0].update()}},e.prototype.update=function(){this.textureScale>0?this.build():this.updateVertices()},e}(Yo),Wa=function(t){function e(e,n,r){void 0===r&&(r=0);var i=this,o=new Xa(e.height,n,r),a=new Vo(e);return r>0&&(e.baseTexture.wrapMode=U.REPEAT),(i=t.call(this,o,a)||this).autoUpdate=!0,i}return za(e,t),e.prototype._render=function(e){var n=this.geometry;(this.autoUpdate||n._width!==this.shader.texture.height)&&(n._width=this.shader.texture.height,n.update()),t.prototype._render.call(this,e)},e}(Go),Ga=function(t){function e(e,n,r){var i=this,o=new Ha(e.width,e.height,n,r),a=new Vo($e.WHITE);return(i=t.call(this,o,a)||this).texture=e,i}return za(e,t),e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID;var t=this.geometry;t.width=this.shader.texture.width,t.height=this.shader.texture.height,t.build()},Object.defineProperty(e.prototype,"texture",{get:function(){return this.shader.texture},set:function(t){this.shader.texture!==t&&(this.shader.texture=t,this._textureID=-1,t.baseTexture.valid?this.textureUpdated():t.once("update",this.textureUpdated,this))},enumerable:!1,configurable:!0}),e.prototype._render=function(e){this._textureID!==this.shader.texture._updateID&&this.textureUpdated(),t.prototype._render.call(this,e)},e}(Go),Va=function(t){function e(e,n,r,i,o){void 0===e&&(e=$e.EMPTY);var a=this,s=new Yo(n,r,i);s.getBuffer("aVertexPosition").static=!1;var u=new Vo(e);return(a=t.call(this,s,u,null,o)||this).autoUpdate=!0,a}return za(e,t),Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(t){this.geometry.getBuffer("aVertexPosition").data=t},enumerable:!1,configurable:!0}),e.prototype._render=function(e){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),t.prototype._render.call(this,e)},e}(Go),Ya=function(t){function e(e,n,r,i,o){void 0===n&&(n=10),void 0===r&&(r=10),void 0===i&&(i=10),void 0===o&&(o=10);var a=t.call(this,$e.WHITE,4,4)||this;return a._origWidth=e.orig.width,a._origHeight=e.orig.height,a._width=a._origWidth,a._height=a._origHeight,a._leftWidth=n,a._rightWidth=i,a._topHeight=r,a._bottomHeight=o,a.texture=e,a}return za(e,t),e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID,this._refresh()},Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(t){this.geometry.getBuffer("aVertexPosition").data=t},enumerable:!1,configurable:!0}),e.prototype.updateHorizontalVertices=function(){var t=this.vertices,e=this._getMinScale();t[9]=t[11]=t[13]=t[15]=this._topHeight*e,t[17]=t[19]=t[21]=t[23]=this._height-this._bottomHeight*e,t[25]=t[27]=t[29]=t[31]=this._height},e.prototype.updateVerticalVertices=function(){var t=this.vertices,e=this._getMinScale();t[2]=t[10]=t[18]=t[26]=this._leftWidth*e,t[4]=t[12]=t[20]=t[28]=this._width-this._rightWidth*e,t[6]=t[14]=t[22]=t[30]=this._width},e.prototype._getMinScale=function(){var t=this._leftWidth+this._rightWidth,e=this._width>t?1:this._width/t,n=this._topHeight+this._bottomHeight,r=this._height>n?1:this._height/n;return Math.min(e,r)},Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leftWidth",{get:function(){return this._leftWidth},set:function(t){this._leftWidth=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rightWidth",{get:function(){return this._rightWidth},set:function(t){this._rightWidth=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"topHeight",{get:function(){return this._topHeight},set:function(t){this._topHeight=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottomHeight",{get:function(){return this._bottomHeight},set:function(t){this._bottomHeight=t,this._refresh()},enumerable:!1,configurable:!0}),e.prototype._refresh=function(){var t=this.texture,e=this.geometry.buffers[1].data;this._origWidth=t.orig.width,this._origHeight=t.orig.height;var n=1/this._origWidth,r=1/this._origHeight;e[0]=e[8]=e[16]=e[24]=0,e[1]=e[3]=e[5]=e[7]=0,e[6]=e[14]=e[22]=e[30]=1,e[25]=e[27]=e[29]=e[31]=1,e[2]=e[10]=e[18]=e[26]=n*this._leftWidth,e[4]=e[12]=e[20]=e[28]=1-n*this._rightWidth,e[9]=e[11]=e[13]=e[15]=r*this._topHeight,e[17]=e[19]=e[21]=e[23]=1-r*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()},e}(Ga),qa=function(t,e){return(qa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var Ka=function(t){function e(e,n){void 0===n&&(n=!0);var r=t.call(this,e[0]instanceof $e?e[0]:e[0].texture)||this;return r._textures=null,r._durations=null,r._autoUpdate=n,r._isConnectedToTicker=!1,r.animationSpeed=1,r.loop=!0,r.updateAnchor=!1,r.onComplete=null,r.onFrameChange=null,r.onLoop=null,r._currentTime=0,r._playing=!1,r._previousFrame=null,r.textures=e,r}return function(t,e){function n(){this.constructor=t}qa(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.stop=function(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(ve.shared.remove(this.update,this),this._isConnectedToTicker=!1))},e.prototype.play=function(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(ve.shared.add(this.update,this,pe.HIGH),this._isConnectedToTicker=!0))},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,n=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 i=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);r>=this._durations[this.currentFrame];)r-=this._durations[this.currentFrame]*i,this._currentTime+=i;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()):n!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFramen)&&this.onLoop(),this.updateTexture())},e.prototype.updateTexture=function(){var t=this.currentFrame;this._previousFrame!==t&&(this._previousFrame=t,this._texture=this._textures[t],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame))},e.prototype.destroy=function(e){this.stop(),t.prototype.destroy.call(this,e),this.onComplete=null,this.onFrameChange=null,this.onLoop=null},e.fromFrames=function(t){for(var n=[],r=0;r=0||(i[n]=t[n]);return i}var p=n(31),d=n.n(p),m=n(29),v="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?r.useLayoutEffect:r.useEffect,y=[],g=[null,null];function _(t,e){var n=t[1];return[e.payload,n+1]}function b(t,e,n){v((function(){return t.apply(void 0,e)}),n)}function x(t,e,n,r,i,o,a){t.current=r,e.current=i,n.current=!1,o.current&&(o.current=null,a())}function w(t,e,n,r,i,o,a,s,u,l){if(t){var c=!1,h=null,f=function(){if(!c){var t,n,f=e.getState();try{t=r(f,i.current)}catch(p){n=p,h=p}n||(h=null),t===o.current?a.current||u():(o.current=t,s.current=t,a.current=!0,l({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=f,n.trySubscribe(),f();return function(){if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,h)throw h}}}var T=function(){return[null,0]};function E(t,e){void 0===e&&(e={});var n=e,a=n.getDisplayName,s=void 0===a?function(t){return"ConnectAdvanced("+t+")"}:a,u=n.methodName,c=void 0===u?"connectAdvanced":u,p=n.renderCountProp,v=void 0===p?void 0:p,E=n.shouldHandleStateChanges,S=void 0===E||E,P=n.storeKey,O=void 0===P?"store":P,C=(n.withRef,n.forwardRef),I=void 0!==C&&C,A=n.context,k=void 0===A?o:A,M=f(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),R=k;return function(e){var n=e.displayName||e.name||"Component",o=s(n),a=h({},M,{getDisplayName:s,methodName:c,renderCountProp:v,shouldHandleStateChanges:S,storeKey:O,displayName:o,wrappedComponentName:n,WrappedComponent:e}),u=M.pure;var p=u?r.useMemo:function(t){return t()};function E(n){var o=Object(r.useMemo)((function(){var t=n.reactReduxForwardedRef,e=f(n,["reactReduxForwardedRef"]);return[n.context,t,e]}),[n]),s=o[0],u=o[1],c=o[2],d=Object(r.useMemo)((function(){return s&&s.Consumer&&Object(m.isContextConsumer)(i.a.createElement(s.Consumer,null))?s:R}),[s,R]),v=Object(r.useContext)(d),E=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(v)&&Boolean(v.store);var P=E?n.store:v.store,O=Object(r.useMemo)((function(){return function(e){return t(e.dispatch,a)}(P)}),[P]),C=Object(r.useMemo)((function(){if(!S)return g;var t=new l(P,E?null:v.subscription),e=t.notifyNestedSubs.bind(t);return[t,e]}),[P,E,v]),I=C[0],A=C[1],k=Object(r.useMemo)((function(){return E?v:h({},v,{subscription:I})}),[E,v,I]),M=Object(r.useReducer)(_,y,T),D=M[0][0],N=M[1];if(D&&D.error)throw D.error;var L=Object(r.useRef)(),F=Object(r.useRef)(c),U=Object(r.useRef)(),j=Object(r.useRef)(!1),B=p((function(){return U.current&&c===F.current?U.current:O(P.getState(),c)}),[P,D,c]);b(x,[F,L,j,c,B,U,A]),b(w,[S,P,I,O,F,L,j,U,A,N],[P,I,O]);var z=Object(r.useMemo)((function(){return i.a.createElement(e,h({},B,{ref:u}))}),[u,e,B]);return Object(r.useMemo)((function(){return S?i.a.createElement(d.Provider,{value:k},z):z}),[d,z,k])}var P=u?i.a.memo(E):E;if(P.WrappedComponent=e,P.displayName=o,I){var C=i.a.forwardRef((function(t,e){return i.a.createElement(P,h({},t,{reactReduxForwardedRef:e}))}));return C.displayName=o,C.WrappedComponent=e,d()(C,e)}return d()(P,e)}}function S(t,e){return t===e?0!==t||0!==e||1/t===1/e:t!==t&&e!==e}function P(t,e){if(S(t,e))return!0;if("object"!==typeof t||null===t||"object"!==typeof e||null===e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var i=0;i=0;r--){var i=e[r](t);if(i)return i}return function(e,r){throw new Error("Invalid value of type "+typeof t+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function j(t,e){return t===e}function B(t){var e=void 0===t?{}:t,n=e.connectHOC,r=void 0===n?E:n,i=e.mapStateToPropsFactories,o=void 0===i?M:i,a=e.mapDispatchToPropsFactories,s=void 0===a?k:a,u=e.mergePropsFactories,l=void 0===u?D:u,c=e.selectorFactory,p=void 0===c?F:c;return function(t,e,n,i){void 0===i&&(i={});var a=i,u=a.pure,c=void 0===u||u,d=a.areStatesEqual,m=void 0===d?j:d,v=a.areOwnPropsEqual,y=void 0===v?P:v,g=a.areStatePropsEqual,_=void 0===g?P:g,b=a.areMergedPropsEqual,x=void 0===b?P:b,w=f(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),T=U(t,o,"mapStateToProps"),E=U(e,s,"mapDispatchToProps"),S=U(n,l,"mergeProps");return r(p,h({methodName:"connect",getDisplayName:function(t){return"Connect("+t+")"},shouldHandleStateChanges:Boolean(t),initMapStateToProps:T,initMapDispatchToProps:E,initMergeProps:S,pure:c,areStatesEqual:m,areOwnPropsEqual:y,areStatePropsEqual:_,areMergedPropsEqual:x},w))}}var z=B();var H,X=n(13);H=X.unstable_batchedUpdates,a=H},function(t,e,n){"use strict";n.r(e),n.d(e,"version",(function(){return yr})),n.d(e,"Collection",(function(){return T})),n.d(e,"Iterable",(function(){return _r})),n.d(e,"Seq",(function(){return V})),n.d(e,"Map",(function(){return Ae})),n.d(e,"OrderedMap",(function(){return mn})),n.d(e,"List",(function(){return tn})),n.d(e,"Stack",(function(){return xn})),n.d(e,"Set",(function(){return Mn})),n.d(e,"OrderedSet",(function(){return er})),n.d(e,"Record",(function(){return ar})),n.d(e,"Range",(function(){return jn})),n.d(e,"Repeat",(function(){return pr})),n.d(e,"is",(function(){return ut})),n.d(e,"fromJS",(function(){return dr})),n.d(e,"hash",(function(){return ft})),n.d(e,"isImmutable",(function(){return k})),n.d(e,"isCollection",(function(){return y})),n.d(e,"isKeyed",(function(){return _})),n.d(e,"isIndexed",(function(){return x})),n.d(e,"isAssociative",(function(){return w})),n.d(e,"isOrdered",(function(){return R})),n.d(e,"isValueObject",(function(){return st})),n.d(e,"get",(function(){return te})),n.d(e,"getIn",(function(){return Bn})),n.d(e,"has",(function(){return Jt})),n.d(e,"hasIn",(function(){return Hn})),n.d(e,"merge",(function(){return ve})),n.d(e,"mergeDeep",(function(){return ge})),n.d(e,"mergeWith",(function(){return ye})),n.d(e,"mergeDeepWith",(function(){return _e})),n.d(e,"remove",(function(){return ne})),n.d(e,"removeIn",(function(){return ue})),n.d(e,"set",(function(){return re})),n.d(e,"setIn",(function(){return ae})),n.d(e,"update",(function(){return ce})),n.d(e,"updateIn",(function(){return ie}));var r=32,i=31,o={};function a(t){t&&(t.value=!0)}function s(){}function u(t){return void 0===t.size&&(t.size=t.__iterate(c)),t.size}function l(t,e){if("number"!==typeof e){var n=e>>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return e<0?u(t)+e:e}function c(){return!0}function h(t,e,n){return(0===t&&!m(t)||void 0!==n&&t<=-n)&&(void 0===e||void 0!==n&&e>=n)}function f(t,e){return d(t,e,0)}function p(t,e){return d(t,e,e)}function d(t,e,n){return void 0===t?n:m(t)?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function m(t){return t<0||0===t&&1/t===-1/0}var v="@@__IMMUTABLE_ITERABLE__@@";function y(t){return Boolean(t&&t[v])}var g="@@__IMMUTABLE_KEYED__@@";function _(t){return Boolean(t&&t[g])}var b="@@__IMMUTABLE_INDEXED__@@";function x(t){return Boolean(t&&t[b])}function w(t){return _(t)||x(t)}var T=function(t){return y(t)?t:V(t)},E=function(t){function e(t){return _(t)?t:Y(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(T),S=function(t){function e(t){return x(t)?t:q(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(T),P=function(t){function e(t){return y(t)&&!w(t)?t:K(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(T);T.Keyed=E,T.Indexed=S,T.Set=P;var O="@@__IMMUTABLE_SEQ__@@";function C(t){return Boolean(t&&t[O])}var I="@@__IMMUTABLE_RECORD__@@";function A(t){return Boolean(t&&t[I])}function k(t){return y(t)||A(t)}var M="@@__IMMUTABLE_ORDERED__@@";function R(t){return Boolean(t&&t[M])}var D="function"===typeof Symbol&&Symbol.iterator,N="@@iterator",L=D||N,F=function(t){this.next=t};function U(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function j(){return{value:void 0,done:!0}}function B(t){return!!X(t)}function z(t){return t&&"function"===typeof t.next}function H(t){var e=X(t);return e&&e.call(t)}function X(t){var e=t&&(D&&t[D]||t["@@iterator"]);if("function"===typeof e)return e}F.prototype.toString=function(){return"[Iterator]"},F.KEYS=0,F.VALUES=1,F.ENTRIES=2,F.prototype.inspect=F.prototype.toSource=function(){return this.toString()},F.prototype[L]=function(){return this};var W=Object.prototype.hasOwnProperty;function G(t){return!(!Array.isArray(t)&&"string"!==typeof t)||t&&"object"===typeof t&&Number.isInteger(t.length)&&t.length>=0&&(0===t.length?1===Object.keys(t).length:t.hasOwnProperty(t.length-1))}var V=function(t){function e(t){return null===t||void 0===t?tt():k(t)?t.toSeq():function(t){var e=rt(t);if(e)return e;if("object"===typeof t)return new $(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(t,e){var n=this._cache;if(n){for(var r=n.length,i=0;i!==r;){var o=n[e?r-++i:i++];if(!1===t(o[1],o[0],this))break}return i}return this.__iterateUncached(t,e)},e.prototype.__iterator=function(t,e){var n=this._cache;if(n){var r=n.length,i=0;return new F((function(){if(i===r)return{value:void 0,done:!0};var o=n[e?r-++i:i++];return U(t,o[0],o[1])}))}return this.__iteratorUncached(t,e)},e}(T),Y=function(t){function e(t){return null===t||void 0===t?tt().toKeyedSeq():y(t)?_(t)?t.toSeq():t.fromEntrySeq():A(t)?t.toSeq():et(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toKeyedSeq=function(){return this},e}(V),q=function(t){function e(t){return null===t||void 0===t?tt():y(t)?_(t)?t.entrySeq():t.toIndexedSeq():A(t)?t.toSeq().entrySeq():nt(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toIndexedSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq [","]")},e}(V),K=function(t){function e(t){return(y(t)&&!w(t)?t:q(t)).toSetSeq()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toSetSeq=function(){return this},e}(V);V.isSeq=C,V.Keyed=Y,V.Set=K,V.Indexed=q,V.prototype[O]=!0;var Q=function(t){function e(t){this._array=t,this.size=t.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this.has(t)?this._array[l(this,t)]:e},e.prototype.__iterate=function(t,e){for(var n=this._array,r=n.length,i=0;i!==r;){var o=e?r-++i:i++;if(!1===t(n[o],o,this))break}return i},e.prototype.__iterator=function(t,e){var n=this._array,r=n.length,i=0;return new F((function(){if(i===r)return{value:void 0,done:!0};var o=e?r-++i:i++;return U(t,o,n[o])}))},e}(q),$=function(t){function e(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},e.prototype.has=function(t){return W.call(this._object,t)},e.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,i=r.length,o=0;o!==i;){var a=r[e?i-++o:o++];if(!1===t(n[a],a,this))break}return o},e.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length,o=0;return new F((function(){if(o===i)return{value:void 0,done:!0};var a=r[e?i-++o:o++];return U(t,a,n[a])}))},e}(Y);$.prototype[M]=!0;var Z,J=function(t){function e(t){this._collection=t,this.size=t.length||t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=H(this._collection),r=0;if(z(n))for(var i;!(i=n.next()).done&&!1!==t(i.value,r++,this););return r},e.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=H(this._collection);if(!z(n))return new F(j);var r=0;return new F((function(){var e=n.next();return e.done?e:U(t,r++,e.value)}))},e}(q);function tt(){return Z||(Z=new Q([]))}function et(t){var e=Array.isArray(t)?new Q(t):B(t)?new J(t):void 0;if(e)return e.fromEntrySeq();if("object"===typeof t)return new $(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function nt(t){var e=rt(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function rt(t){return G(t)?new Q(t):B(t)?new J(t):void 0}var it="@@__IMMUTABLE_MAP__@@";function ot(t){return Boolean(t&&t[it])}function at(t){return ot(t)&&R(t)}function st(t){return Boolean(t&&"function"===typeof t.equals&&"function"===typeof t.hashCode)}function ut(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"===typeof t.valueOf&&"function"===typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!==t&&e!==e)return!0;if(!t||!e)return!1}return!!(st(t)&&st(e)&&t.equals(e))}var lt="function"===typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var n=65535&(t|=0),r=65535&(e|=0);return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0};function ct(t){return t>>>1&1073741824|3221225471&t}var ht=Object.prototype.valueOf;function ft(t){switch(typeof t){case"boolean":return t?1108378657:1108378656;case"number":return function(t){if(t!==t||t===1/0)return 0;var e=0|t;e!==t&&(e^=4294967295*t);for(;t>4294967295;)e^=t/=4294967295;return ct(e)}(t);case"string":return t.length>bt?function(t){var e=Tt[t];void 0===e&&(e=pt(t),wt===xt&&(wt=0,Tt={}),wt++,Tt[t]=e);return e}(t):pt(t);case"object":case"function":return null===t?1108378658:"function"===typeof t.hashCode?ct(t.hashCode(t)):(t.valueOf!==ht&&"function"===typeof t.valueOf&&(t=t.valueOf(t)),function(t){var e;if(yt&&void 0!==(e=vt.get(t)))return e;if(void 0!==(e=t[_t]))return e;if(!mt){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[_t]))return e;if(void 0!==(e=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return e}e=++gt,1073741824>&&(gt=0);if(yt)vt.set(t,e);else{if(void 0!==dt&&!1===dt(t))throw new Error("Non-extensible objects are not allowed as keys.");if(mt)Object.defineProperty(t,_t,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[_t]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[_t]=e}}return e}(t));case"undefined":return 1108378659;default:if("function"===typeof t.toString)return pt(t.toString());throw new Error("Value type "+typeof t+" cannot be hashed.")}}function pt(t){for(var e=0,n=0;n=0&&(c.get=function(e,n){return(e=l(this,e))>=0&&es)return{value:void 0,done:!0};var t=i.next();return r||1===e||t.done?t:U(e,u-1,0===e?void 0:t.value[1],t)}))},c}function Rt(t,e,n,r){var i=Xt(t);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return t.__iterate((function(t,o,l){if(!s||!(s=e.call(n,t,o,l)))return u++,i(t,r?o:u-1,a)})),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=t.__iterator(2,o),u=!0,l=0;return new F((function(){var t,o,c;do{if((t=s.next()).done)return r||1===i?t:U(i,l++,0===i?void 0:t.value[1],t);var h=t.value;o=h[0],c=h[1],u&&(u=e.call(n,c,o,a))}while(u);return 2===i?t:U(i,o,c,t)}))},i}function Dt(t,e){var n=_(t),r=[t].concat(e).map((function(t){return y(t)?n&&(t=E(t)):t=n?et(t):nt(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===r.length)return t;if(1===r.length){var i=r[0];if(i===t||n&&_(i)||x(t)&&x(i))return i}var o=new Q(r);return n?o=o.toKeyedSeq():x(t)||(o=o.toSetSeq()),(o=o.flatten(!0)).size=r.reduce((function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}}),0),o}function Nt(t,e,n){var r=Xt(t);return r.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var a=0,s=!1;return function t(u,l){u.__iterate((function(o,u){return(!e||l0}function jt(t,e,n,r){var i=Xt(t),o=new Q(n).map((function(t){return t.size}));return i.size=r?o.max():o.min(),i.__iterate=function(t,e){for(var n,r=this.__iterator(1,e),i=0;!(n=r.next()).done&&!1!==t(n.value,i++,this););return i},i.__iteratorUncached=function(t,i){var o=n.map((function(t){return t=T(t),H(i?t.reverse():t)})),a=0,s=!1;return new F((function(){var n;return s||(n=o.map((function(t){return t.next()})),s=r?n.every((function(t){return t.done})):n.some((function(t){return t.done}))),s?{value:void 0,done:!0}:U(t,a++,e.apply(null,n.map((function(t){return t.value}))))}))},i}function Bt(t,e){return t===e?t:C(t)?e:t.constructor(e)}function zt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Ht(t){return _(t)?E:x(t)?S:P}function Xt(t){return Object.create((_(t)?Y:x(t)?q:K).prototype)}function Wt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):V.prototype.cacheResult.call(this)}function Gt(t,e){return void 0===t&&void 0===e?0:void 0===t?1:void 0===e?-1:t>e?1:t0;)e[n]=arguments[n+1];if("function"!==typeof t)throw new TypeError("Invalid merger function: "+t);return me(this,e,t)}function me(t,e,n){for(var r=[],i=0;i0;)e[n]=arguments[n+1];return xe(t,e)}function ye(t,e){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return xe(e,n,t)}function ge(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return be(t,e)}function _e(t,e){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return be(e,n,t)}function be(t,e,n){return xe(t,e,function(t){function e(n,r,i){return $t(n)&&$t(r)?xe(n,[r],e):t?t(n,r,i):r}return e}(n))}function xe(t,e,n){if(!$t(t))throw new TypeError("Cannot merge into non-data-structure value: "+t);if(k(t))return"function"===typeof n&&t.mergeWith?t.mergeWith.apply(t,[n].concat(e)):t.merge?t.merge.apply(t,e):t.concat.apply(t,e);for(var r=Array.isArray(t),i=t,o=r?S:E,a=r?function(e){i===t&&(i=ee(i)),i.push(e)}:function(e,r){var o=W.call(i,r),a=o&&n?n(i[r],e,r):e;o&&a===i[r]||(i===t&&(i=ee(i)),i[r]=a)},s=0;s0;)e[n]=arguments[n+1];return be(this,e,t)}function Ee(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return ie(this,t,He(),(function(t){return xe(t,e)}))}function Se(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return ie(this,t,He(),(function(t){return be(t,e)}))}function Pe(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this}function Oe(){return this.__ownerID?this:this.__ensureOwner(new s)}function Ce(){return this.__ensureOwner()}function Ie(){return this.__altered}St.prototype.cacheResult=Et.prototype.cacheResult=Pt.prototype.cacheResult=Ot.prototype.cacheResult=Wt;var Ae=function(t){function e(e){return null===e||void 0===e?He():ot(e)&&!R(e)?e:He().withMutations((function(n){var r=t(e);qt(r.size),r.forEach((function(t,e){return n.set(e,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return He().withMutations((function(e){for(var n=0;n=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}}))},e.prototype.toString=function(){return this.__toString("Map {","}")},e.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},e.prototype.set=function(t,e){return Xe(this,t,e)},e.prototype.remove=function(t){return Xe(this,t,o)},e.prototype.deleteAll=function(t){var e=T(t);return 0===e.size?this:this.withMutations((function(t){e.forEach((function(e){return t.remove(e)}))}))},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):He()},e.prototype.sort=function(t){return mn(Lt(this,t))},e.prototype.sortBy=function(t,e){return mn(Lt(this,e,t))},e.prototype.map=function(t,e){return this.withMutations((function(n){n.forEach((function(r,i){n.set(i,t.call(e,r,i,n))}))}))},e.prototype.__iterator=function(t,e){return new Ue(this,t,e)},e.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate((function(e){return r++,t(e[1],e[0],n)}),e),r},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?ze(this.size,this._root,t,this.__hash):0===this.size?He():(this.__ownerID=t,this.__altered=!1,this)},e}(E);Ae.isMap=ot;var ke=Ae.prototype;ke[it]=!0,ke.delete=ke.remove,ke.removeAll=ke.deleteAll,ke.setIn=se,ke.removeIn=ke.deleteIn=le,ke.update=he,ke.updateIn=fe,ke.merge=ke.concat=pe,ke.mergeWith=de,ke.mergeDeep=we,ke.mergeDeepWith=Te,ke.mergeIn=Ee,ke.mergeDeepIn=Se,ke.withMutations=Pe,ke.wasAltered=Ie,ke.asImmutable=Ce,ke["@@transducer/init"]=ke.asMutable=Oe,ke["@@transducer/step"]=function(t,e){return t.set(e[0],e[1])},ke["@@transducer/result"]=function(t){return t.asImmutable()};var Me=function(t,e){this.ownerID=t,this.entries=e};Me.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,a=i.length;o=Ke)return function(t,e,n,r){t||(t=new s);for(var i=new Le(t,ft(n),[n,r]),o=0;o>>t)&i),a=this.bitmap;return 0===(a&o)?r:this.nodes[Ye(a&o-1)].get(t+5,e,n,r)},Re.prototype.update=function(t,e,n,a,s,u,l){void 0===n&&(n=ft(a));var c=(0===e?n:n>>>e)&i,h=1<=Qe)return function(t,e,n,i,o){for(var a=0,s=new Array(r),u=0;0!==n;u++,n>>>=1)s[u]=1&n?e[a++]:void 0;return s[i]=o,new De(t,a+1,s)}(t,m,f,c,y);if(p&&!y&&2===m.length&&Ge(m[1^d]))return m[1^d];if(p&&y&&1===m.length&&Ge(y))return y;var g=t&&t===this.ownerID,_=p?y?f:f^h:f|h,b=p?y?qe(m,d,y,g):function(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var i=new Array(r),o=0,a=0;a>>t)&i,a=this.nodes[o];return a?a.get(t+5,e,n,r):r},De.prototype.update=function(t,e,n,r,a,s,u){void 0===n&&(n=ft(r));var l=(0===e?n:n>>>e)&i,c=a===o,h=this.nodes,f=h[l];if(c&&!f)return this;var p=We(f,t,e+5,n,r,a,s,u);if(p===f)return this;var d=this.count;if(f){if(!p&&--d<$e)return function(t,e,n,r){for(var i=0,o=0,a=new Array(n),s=0,u=1,l=e.length;s>>n)&i,u=(0===n?r:r>>>n)&i,l=s===u?[Ve(t,e,n+5,r,o)]:(a=new Le(e,r,o),s>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function qe(t,e,n,r){var i=r?t:Vt(t);return i[e]=n,i}var Ke=8,Qe=16,$e=8,Ze="@@__IMMUTABLE_LIST__@@";function Je(t){return Boolean(t&&t[Ze])}var tn=function(t){function e(e){var n=un();if(null===e||void 0===e)return n;if(Je(e))return e;var i=t(e),o=i.size;return 0===o?n:(qt(o),o>0&&o=0&&t=t.size||e<0)return t.withMutations((function(t){e<0?fn(t,e).set(0,n):fn(t,0,e+1).set(e,n)}));e+=t._origin;var r=t._tail,i=t._root,o={value:!1};e>=pn(t._capacity)?r=ln(r,t.__ownerID,0,e,n,o):i=ln(i,t.__ownerID,t._level,e,n,o);if(!o.value)return t;if(t.__ownerID)return t._root=i,t._tail=r,t.__hash=void 0,t.__altered=!0,t;return sn(t._origin,t._capacity,t._level,i,r)}(this,t,e)},e.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},e.prototype.insert=function(t,e){return this.splice(t,0,e)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):un()},e.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(n){fn(n,0,e+t.length);for(var r=0;r>>e&i;if(r>=this.array.length)return new nn([],t);var o,a=0===r;if(e>0){var s=this.array[r];if((o=s&&s.removeBefore(t,e-5,n))===s&&a)return this}if(a&&!o)return this;var u=cn(this,t);if(!a)for(var l=0;l>>e&i;if(o>=this.array.length)return this;if(e>0){var a=this.array[o];if((r=a&&a.removeAfter(t,e-5,n))===a&&o===this.array.length-1)return this}var s=cn(this,t);return s.array.splice(o+1),r&&(s.array[o]=r),s};var rn,on={};function an(t,e){var n=t._origin,i=t._capacity,o=pn(i),a=t._tail;return s(t._root,t._level,0);function s(t,u,l){return 0===u?function(t,s){var u=s===o?a&&a.array:t&&t.array,l=s>n?0:n-s,c=i-s;c>r&&(c=r);return function(){if(l===c)return on;var t=e?--c:l++;return u&&u[t]}}(t,l):function(t,o,a){var u,l=t&&t.array,c=a>n?0:n-a>>o,h=1+(i-a>>o);h>r&&(h=r);return function(){for(;;){if(u){var t=u();if(t!==on)return t;u=null}if(c===h)return on;var n=e?--h:c++;u=s(l&&l[n],o-5,a+(n<>>n&i,c=t&&l0){var h=t&&t.array[l],f=ln(h,e,n-5,r,o,s);return f===h?t:((u=cn(t,e)).array[l]=f,u)}return c&&t.array[l]===o?t:(s&&a(s),u=cn(t,e),void 0===o&&l===u.array.length-1?u.array.pop():u.array[l]=o,u)}function cn(t,e){return e&&t&&e===t.ownerID?t:new nn(t?t.array.slice():[],e)}function hn(t,e){if(e>=pn(t._capacity))return t._tail;if(e<1<0;)n=n.array[e>>>r&i],r-=5;return n}}function fn(t,e,n){void 0!==e&&(e|=0),void 0!==n&&(n|=0);var r=t.__ownerID||new s,o=t._origin,a=t._capacity,u=o+e,l=void 0===n?a:n<0?a+n:o+n;if(u===o&&l===a)return t;if(u>=l)return t.clear();for(var c=t._level,h=t._root,f=0;u+f<0;)h=new nn(h&&h.array.length?[void 0,h]:[],r),f+=1<<(c+=5);f&&(u+=f,o+=f,l+=f,a+=f);for(var p=pn(a),d=pn(l);d>=1<p?new nn([],r):m;if(m&&d>p&&u5;g-=5){var _=p>>>g&i;y=y.array[_]=cn(y.array[_],r)}y.array[p>>>5&i]=m}if(l=d)u-=d,l-=d,c=5,h=null,v=v&&v.removeBefore(r,0,u);else if(u>o||d>>c&i;if(b!==d>>>c&i)break;b&&(f+=(1<o&&(h=h.removeBefore(r,c,u-f)),h&&d>>5<<5}var dn,mn=function(t){function e(t){return null===t||void 0===t?yn():at(t)?t:yn().withMutations((function(e){var n=E(t);qt(n.size),n.forEach((function(t,n){return e.set(n,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("OrderedMap {","}")},e.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):yn()},e.prototype.set=function(t,e){return gn(this,t,e)},e.prototype.remove=function(t){return gn(this,t,o)},e.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},e.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate((function(e){return e&&t(e[1],e[0],n)}),e)},e.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?vn(e,n,t,this.__hash):0===this.size?yn():(this.__ownerID=t,this._map=e,this._list=n,this)},e}(Ae);function vn(t,e,n,r){var i=Object.create(mn.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=n,i.__hash=r,i}function yn(){return dn||(dn=vn(He(),un()))}function gn(t,e,n){var i,a,s=t._map,u=t._list,l=s.get(e),c=void 0!==l;if(n===o){if(!c)return t;u.size>=r&&u.size>=2*s.size?(i=(a=u.filter((function(t,e){return void 0!==t&&l!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(i.__ownerID=a.__ownerID=t.__ownerID)):(i=s.remove(e),a=l===u.size-1?u.pop():u.set(l,void 0))}else if(c){if(n===u.get(l)[1])return t;i=s,a=u.set(l,[e,n])}else i=s.set(e,u.size),a=u.set(u.size,[e,n]);return t.__ownerID?(t.size=i.size,t._map=i,t._list=a,t.__hash=void 0,t):vn(i,a)}mn.isOrderedMap=at,mn.prototype[M]=!0,mn.prototype.delete=mn.prototype.remove;var _n="@@__IMMUTABLE_STACK__@@";function bn(t){return Boolean(t&&t[_n])}var xn=function(t){function e(t){return null===t||void 0===t?Sn():bn(t)?t:Sn().pushAll(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("Stack [","]")},e.prototype.get=function(t,e){var n=this._head;for(t=l(this,t);n&&t--;)n=n.next;return n?n.value:e},e.prototype.peek=function(){return this._head&&this._head.value},e.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var e=this.size+arguments.length,n=this._head,r=arguments.length-1;r>=0;r--)n={value:t[r],next:n};return this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):En(e,n)},e.prototype.pushAll=function(e){if(0===(e=t(e)).size)return this;if(0===this.size&&bn(e))return e;qt(e.size);var n=this.size,r=this._head;return e.__iterate((function(t){n++,r={value:t,next:r}}),!0),this.__ownerID?(this.size=n,this._head=r,this.__hash=void 0,this.__altered=!0,this):En(n,r)},e.prototype.pop=function(){return this.slice(1)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Sn()},e.prototype.slice=function(e,n){if(h(e,n,this.size))return this;var r=f(e,this.size);if(p(n,this.size)!==this.size)return t.prototype.slice.call(this,e,n);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):En(i,o)},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?En(this.size,this._head,t,this.__hash):0===this.size?Sn():(this.__ownerID=t,this.__altered=!1,this)},e.prototype.__iterate=function(t,e){var n=this;if(e)return new Q(this.toArray()).__iterate((function(e,r){return t(e,r,n)}),e);for(var r=0,i=this._head;i&&!1!==t(i.value,r++,this);)i=i.next;return r},e.prototype.__iterator=function(t,e){if(e)return new Q(this.toArray()).__iterator(t,e);var n=0,r=this._head;return new F((function(){if(r){var e=r.value;return r=r.next,U(t,n++,e)}return{value:void 0,done:!0}}))},e}(S);xn.isStack=bn;var wn,Tn=xn.prototype;function En(t,e,n,r){var i=Object.create(Tn);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Sn(){return wn||(wn=En(0))}Tn[_n]=!0,Tn.shift=Tn.pop,Tn.unshift=Tn.push,Tn.unshiftAll=Tn.pushAll,Tn.withMutations=Pe,Tn.wasAltered=Ie,Tn.asImmutable=Ce,Tn["@@transducer/init"]=Tn.asMutable=Oe,Tn["@@transducer/step"]=function(t,e){return t.unshift(e)},Tn["@@transducer/result"]=function(t){return t.asImmutable()};var Pn="@@__IMMUTABLE_SET__@@";function On(t){return Boolean(t&&t[Pn])}function Cn(t){return On(t)&&R(t)}function In(t,e){if(t===e)return!0;if(!y(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||_(t)!==_(e)||x(t)!==x(e)||R(t)!==R(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!w(t);if(R(t)){var r=t.entries();return e.every((function(t,e){var i=r.next().value;return i&&ut(i[1],t)&&(n||ut(i[0],e))}))&&r.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"===typeof t.cacheResult&&t.cacheResult();else{i=!0;var a=t;t=e,e=a}var s=!0,u=e.__iterate((function(e,r){if(n?!t.has(e):i?!ut(e,t.get(r,o)):!ut(t.get(r,o),e))return s=!1,!1}));return s&&t.size===u}function An(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}function kn(t){if(!t||"object"!==typeof t)return t;if(!y(t)){if(!$t(t))return t;t=V(t)}if(_(t)){var e={};return t.__iterate((function(t,n){e[n]=kn(t)})),e}var n=[];return t.__iterate((function(t){n.push(kn(t))})),n}var Mn=function(t){function e(e){return null===e||void 0===e?Fn():On(e)&&!R(e)?e:Fn().withMutations((function(n){var r=t(e);qt(r.size),r.forEach((function(t){return n.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(E(t).keySeq())},e.intersect=function(t){return(t=T(t).toArray()).length?Dn.intersect.apply(e(t.pop()),t):Fn()},e.union=function(t){return(t=T(t).toArray()).length?Dn.union.apply(e(t.pop()),t):Fn()},e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(t){return this._map.has(t)},e.prototype.add=function(t){return Nn(this,this._map.set(t,t))},e.prototype.remove=function(t){return Nn(this,this._map.remove(t))},e.prototype.clear=function(){return Nn(this,this._map.clear())},e.prototype.map=function(t,e){var n=this,r=[],i=[];return this.forEach((function(o){var a=t.call(e,o,o,n);a!==o&&(r.push(o),i.push(a))})),this.withMutations((function(t){r.forEach((function(e){return t.remove(e)})),i.forEach((function(e){return t.add(e)}))}))},e.prototype.union=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return 0===(e=e.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations((function(n){for(var r=0;r=0&&e=0&&n>>-15,461845907),e=lt(e<<13|e>>>-13,5),e=lt((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=ct((e=lt(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(n?e?function(t,e){r=31*r+tr(ft(t),ft(e))|0}:function(t,e){r=r+tr(ft(t),ft(e))|0}:e?function(t){r=31*r+ft(t)|0}:function(t){r=r+ft(t)|0}),r)}(this))}});var Wn=T.prototype;Wn[v]=!0,Wn[L]=Wn.values,Wn.toJSON=Wn.toArray,Wn.__toStringMapper=Zt,Wn.inspect=Wn.toSource=function(){return this.toString()},Wn.chain=Wn.flatMap,Wn.contains=Wn.includes,An(E,{flip:function(){return Bt(this,Ct(this))},mapEntries:function(t,e){var n=this,r=0;return Bt(this,this.toSeq().map((function(i,o){return t.call(e,[o,i],r++,n)})).fromEntrySeq())},mapKeys:function(t,e){var n=this;return Bt(this,this.toSeq().flip().map((function(r,i){return t.call(e,r,i,n)})).flip())}});var Gn=E.prototype;Gn[g]=!0,Gn[L]=Wn.entries,Gn.toJSON=Xn,Gn.__toStringMapper=function(t,e){return Zt(e)+": "+Zt(t)},An(S,{toKeyedSeq:function(){return new Et(this,!1)},filter:function(t,e){return Bt(this,kt(this,t,e,!1))},findIndex:function(t,e){var n=this.findEntry(t,e);return n?n[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return Bt(this,At(this,!1))},slice:function(t,e){return Bt(this,Mt(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(e||0,0),0===n||2===n&&!e)return this;t=f(t,t<0?this.count():this.size);var r=this.slice(0,t);return Bt(this,1===n?r:r.concat(Vt(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.findLastEntry(t,e);return n?n[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return Bt(this,Nt(this,t,!1))},get:function(t,e){return(t=l(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find((function(e,n){return n===t}),void 0,e)},has:function(t){return(t=l(this,t))>=0&&(void 0!==this.size?this.size===1/0||te?-1:0}function tr(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}Vn[b]=!0,Vn[M]=!0,An(P,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),P.prototype.has=Wn.includes,P.prototype.contains=P.prototype.includes,An(Y,E.prototype),An(q,S.prototype),An(K,P.prototype);var er=function(t){function e(t){return null===t||void 0===t?or():Cn(t)?t:or().withMutations((function(e){var n=P(t);qt(n.size),n.forEach((function(t){return e.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(E(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(Mn);er.isOrderedSet=Cn;var nr,rr=er.prototype;function ir(t,e){var n=Object.create(rr);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function or(){return nr||(nr=ir(yn()))}rr[M]=!0,rr.zip=Vn.zip,rr.zipWith=Vn.zipWith,rr.__empty=or,rr.__make=ir;var ar=function(t,e){var n,r=function(o){var a=this;if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var s=Object.keys(t),u=i._indices={};i._name=e,i._keys=s,i._defaultValues=t;for(var l=0;l2?[]:void 0,{"":t})}function mr(t,e,n,r,i,o){var a=Array.isArray(n)?q:Qt(n)?Y:null;if(a){if(~t.indexOf(n))throw new TypeError("Cannot convert circular structure to Immutable");t.push(n),i&&""!==r&&i.push(r);var s=e.call(o,r,a(n).map((function(r,o){return mr(t,e,r,o,i,n)})),i&&i.slice());return t.pop(),i&&i.pop(),s}return n}function vr(t,e){return _(e)?e.toMap():e.toList()}var yr="4.0.0-rc.11",gr={version:yr,Collection:T,Iterable:T,Seq:V,Map:Ae,OrderedMap:mn,List:tn,Stack:xn,Set:Mn,OrderedSet:er,Record:ar,Range:jn,Repeat:pr,is:ut,fromJS:dr,hash:ft,isImmutable:k,isCollection:y,isKeyed:_,isIndexed:x,isAssociative:w,isOrdered:R,isValueObject:st,isSeq:C,isList:Je,isMap:ot,isOrderedMap:at,isStack:bn,isSet:On,isOrderedSet:Cn,isRecord:A,get:te,getIn:Bn,has:Jt,hasIn:Hn,merge:ve,mergeDeep:ge,mergeWith:ye,mergeDeepWith:_e,remove:ne,removeIn:ue,set:re,setIn:ae,update:ce,updateIn:ie},_r=T;e.default=gr},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(23);function i(t,e){var n;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=Object(r.a)(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(l),h=["%","/","?",";","#"].concat(c),f=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=n(68);function _(t,e,n){if(t&&i.isObject(t)&&t instanceof o)return t;var r=new o;return r.parse(t,e,n),r}o.prototype.parse=function(t,e,n){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),s=-1!==o&&o127?R+="x":R+=M[D];if(!R.match(p)){var L=A.slice(0,O),F=A.slice(O+1),U=M.match(d);U&&(L.push(U[1]),F.unshift(U[2])),F.length&&(_="/"+F.join(".")+_),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),I||(this.hostname=r.toASCII(this.hostname));var j=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+j,this.href+=this.host,I&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==_[0]&&(_="/"+_))}if(!m[w])for(O=0,k=c.length;O0)&&n.host.split("@"))&&(n.auth=I.shift(),n.host=n.hostname=I.shift());return n.search=t.search,n.query=t.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!T.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var S=T.slice(-1)[0],P=(n.host||t.host||T.length>1)&&("."===S||".."===S)||""===S,O=0,C=T.length;C>=0;C--)"."===(S=T[C])?T.splice(C,1):".."===S?(T.splice(C,1),O++):O&&(T.splice(C,1),O--);if(!x&&!w)for(;O--;O)T.unshift("..");!x||""===T[0]||T[0]&&"/"===T[0].charAt(0)||T.unshift(""),P&&"/"!==T.join("/").substr(-1)&&T.push("");var I,A=""===T[0]||T[0]&&"/"===T[0].charAt(0);E&&(n.hostname=n.host=A?"":T.length?T.shift():"",(I=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=I.shift(),n.host=n.hostname=I.shift()));return(x=x||n.host&&T.length)&&!A&&T.unshift(""),T.length?n.pathname=T.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(19);function i(t,e){if(t){if("string"===typeof t)return Object(r.a)(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(t,e):void 0}}},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.combineReducers=void 0;var r,i=n(75),o=(r=i)&&r.__esModule?r:{default:r};e.combineReducers=o.default},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(14);function i(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Object(r.a)(t)););return t}},function(t,e,n){"use strict";function r(t,e){if(t.length!==e.length)return!1;for(var n=0;n=e||n<0||v&&t-d>=c}function x(){var t=i();if(b(t))return w(t);f=setTimeout(x,function(t){var n=e-(t-p);return v?s(n,c-(t-d)):n}(t))}function w(t){return f=void 0,y&&u?g(t):(u=l=void 0,h)}function T(){var t=i(),n=b(t);if(u=arguments,l=this,p=t,n){if(void 0===f)return _(p);if(v)return clearTimeout(f),f=setTimeout(x,e),g(p)}return void 0===f&&(f=setTimeout(x,e)),h}return e=o(e)||0,r(n)&&(m=!!n.leading,c=(v="maxWait"in n)?a(o(n.maxWait)||0,e):c,y="trailing"in n?!!n.trailing:y),T.cancel=function(){void 0!==f&&clearTimeout(f),d=0,u=p=l=f=void 0},T.flush=function(){return void 0===f?h:w(i())},T}},function(t,e,n){"use strict";var r=n(29),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(t){return r.isMemo(t)?a:s[t.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var l=Object.defineProperty,c=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,n,r){if("string"!==typeof n){if(d){var i=p(n);i&&i!==d&&t(e,i,r)}var a=c(n);h&&(a=a.concat(h(n)));for(var s=u(e),m=u(n),v=0;v2||2===n.length&&n[1].value!==a)for(var l=1;l=0;)t=t.replace(" ","_");return o.BLEND_MODES[t]||o.BLEND_MODES.NORMAL},t.createSteppedGradient=function(e,n){void 0===n&&(n=10),("number"!==typeof n||n<=0)&&(n=10);var r=new a(t.hexToRGB(e[0].value),e[0].time);r.isStepped=!0;for(var i=r,o=e[0],s=1,u=e[s],l=1;lu.time;)o=u,u=e[++s];c=(c-o.time)/(u.time-o.time);var h=t.hexToRGB(o.value),f=t.hexToRGB(u.value),p={r:(f.r-h.r)*c+h.r,g:(f.g-h.g)*c+h.g,b:(f.b-h.b)*c+h.b};i.next=new a(p,l/n),i=i.next}return r}}(i||(i={}));var l=function(t,e){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function c(t,e){function n(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function h(t){return this.ease&&(t=this.ease(t)),(this.next.value-this.current.value)*t+this.current.value}function f(t){this.ease&&(t=this.ease(t));var e=this.current.value,n=this.next.value,r=(n.r-e.r)*t+e.r,o=(n.g-e.g)*t+e.g,a=(n.b-e.b)*t+e.b;return i.combineRGBComponents(r,o,a)}function p(t){for(this.ease&&(t=this.ease(t));t>this.next.time;)this.current=this.next,this.next=this.next.next;return t=(t-this.current.time)/(this.next.time-this.current.time),(this.next.value-this.current.value)*t+this.current.value}function d(t){for(this.ease&&(t=this.ease(t));t>this.next.time;)this.current=this.next,this.next=this.next.next;t=(t-this.current.time)/(this.next.time-this.current.time);var e=this.current.value,n=this.next.value,r=(n.r-e.r)*t+e.r,o=(n.g-e.g)*t+e.g,a=(n.b-e.b)*t+e.b;return i.combineRGBComponents(r,o,a)}function m(t){for(this.ease&&(t=this.ease(t));this.next&&t>this.next.time;)this.current=this.next,this.next=this.next.next;return this.current.value}function v(t){for(this.ease&&(t=this.ease(t));this.next&&t>this.next.time;)this.current=this.next,this.next=this.next.next;var e=this.current.value;return i.combineRGBComponents(e.r,e.g,e.b)}var y,g=function(){function t(t){void 0===t&&(t=!1),this.current=null,this.next=null,this.isColor=!!t,this.interpolate=null,this.ease=null}return t.prototype.reset=function(t){this.current=t,this.next=t.next,this.next&&this.next.time>=1?this.interpolate=this.isColor?f:h:t.isStepped?this.interpolate=this.isColor?v:m:this.interpolate=this.isColor?d:p,this.ease=this.current.ease},t}(),_=function(t){function e(n){var r=t.call(this)||this;return r.prevChild=r.nextChild=null,r.emitter=n,r.anchor.x=r.anchor.y=.5,r.velocity=new o.Point,r.rotationSpeed=0,r.rotationAcceleration=0,r.maxLife=0,r.age=0,r.ease=null,r.extraData=null,r.alphaList=new g,r.speedList=new g,r.speedMultiplier=1,r.acceleration=new o.Point,r.maxSpeed=NaN,r.scaleList=new g,r.scaleMultiplier=1,r.colorList=new g(!0),r._doAlpha=!1,r._doScale=!1,r._doSpeed=!1,r._doAcceleration=!1,r._doColor=!1,r._doNormalMovement=!1,r._oneOverLife=0,r.next=null,r.prev=null,r.init=r.init,r.Particle_init=e.prototype.init,r.update=r.update,r.Particle_update=e.prototype.update,r.Sprite_destroy=t.prototype.destroy,r.Particle_destroy=e.prototype.destroy,r.applyArt=r.applyArt,r.kill=r.kill,r}return c(e,t),e.prototype.init=function(){this.age=0,this.velocity.x=this.speedList.current.value*this.speedMultiplier,this.velocity.y=0,i.rotatePoint(this.rotation,this.velocity),this.noRotation?this.rotation=0:this.rotation*=i.DEG_TO_RADS,this.rotationSpeed*=i.DEG_TO_RADS,this.rotationAcceleration*=i.DEG_TO_RADS,this.alpha=this.alphaList.current.value,this.scale.x=this.scale.y=this.scaleList.current.value,this._doAlpha=!!this.alphaList.current.next,this._doSpeed=!!this.speedList.current.next,this._doScale=!!this.scaleList.current.next,this._doColor=!!this.colorList.current.next,this._doAcceleration=0!==this.acceleration.x||0!==this.acceleration.y,this._doNormalMovement=this._doSpeed||0!==this.speedList.current.value||this._doAcceleration,this._oneOverLife=1/this.maxLife;var t=this.colorList.current.value;this.tint=i.combineRGBComponents(t.r,t.g,t.b),this.visible=!0},e.prototype.applyArt=function(t){this.texture=t||o.Texture.EMPTY},e.prototype.update=function(t){if(this.age+=t,this.age>=this.maxLife||this.age<0)return this.kill(),-1;var e=this.age*this._oneOverLife;if(this.ease&&(e=4===this.ease.length?this.ease(e,0,1,1):this.ease(e)),this._doAlpha&&(this.alpha=this.alphaList.interpolate(e)),this._doScale){var n=this.scaleList.interpolate(e)*this.scaleMultiplier;this.scale.x=this.scale.y=n}if(this._doNormalMovement){var r=void 0,o=void 0;if(this._doSpeed){var a=this.speedList.interpolate(e)*this.speedMultiplier;i.normalize(this.velocity),i.scaleBy(this.velocity,a),r=this.velocity.x*t,o=this.velocity.y*t}else if(this._doAcceleration){var s=this.velocity.x,u=this.velocity.y;if(this.velocity.x+=this.acceleration.x*t,this.velocity.y+=this.acceleration.y*t,this.maxSpeed){var l=i.length(this.velocity);l>this.maxSpeed&&i.scaleBy(this.velocity,this.maxSpeed/l)}r=(s+this.velocity.x)/2*t,o=(u+this.velocity.y)/2*t}else r=this.velocity.x*t,o=this.velocity.y*t;this.position.x+=r,this.position.y+=o}if(this._doColor&&(this.tint=this.colorList.interpolate(e)),0!==this.rotationAcceleration){var c=this.rotationSpeed+this.rotationAcceleration*t;this.rotation+=(this.rotationSpeed+c)/2*t,this.rotationSpeed=c}else 0!==this.rotationSpeed?this.rotation+=this.rotationSpeed*t:this.acceleration&&!this.noRotation&&(this.rotation=Math.atan2(this.velocity.y,this.velocity.x));return e},e.prototype.kill=function(){this.emitter.recycle(this)},e.prototype.destroy=function(){this.parent&&this.parent.removeChild(this),this.Sprite_destroy(),this.emitter=this.velocity=this.colorList=this.scaleList=this.alphaList=this.speedList=this.ease=this.next=this.prev=null},e.parseArt=function(t){var e;for(e=t.length;e>=0;--e)"string"===typeof t[e]&&(t[e]=u(t[e]));if(i.verbose)for(e=t.length-1;e>0;--e)if(t[e].baseTexture!==t[e-1].baseTexture){window.console&&console.warn("PixiParticles: using particle textures from different images may hinder performance in WebGL");break}return t},e.parseData=function(t){return t},e}(o.Sprite),b=function(){function t(t){this.segments=[],this.countingLengths=[],this.totalLength=0,this.init(t)}return t.prototype.init=function(t){if(t&&t.length)if(Array.isArray(t[0]))for(var e=0;e0?t:1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"particleConstructor",{get:function(){return this._particleConstructor},set:function(t){if(t!==this._particleConstructor){this._particleConstructor=t,this.cleanup();for(var e=this._poolFirst;e;e=e.next)e.destroy();this._poolFirst=null,this._origConfig&&this._origArt&&this.init(this._origArt,this._origConfig)}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},set:function(t){this.cleanup(),this._parent=t},enumerable:!0,configurable:!0}),t.prototype.init=function(t,e){if(t&&e){this.cleanup(),this._origConfig=e,this._origArt=t,t=Array.isArray(t)?t.slice():[t];var n=this._particleConstructor;this.particleImages=n.parseArt?n.parseArt(t):t,e.alpha?this.startAlpha=a.createList(e.alpha):this.startAlpha=new a(1,0),e.speed?(this.startSpeed=a.createList(e.speed),this.minimumSpeedMultiplier=("minimumSpeedMultiplier"in e?e.minimumSpeedMultiplier:e.speed.minimumSpeedMultiplier)||1):(this.minimumSpeedMultiplier=1,this.startSpeed=new a(0,0));var r=e.acceleration;r&&(r.x||r.y)?(this.startSpeed.next=null,this.acceleration=new o.Point(r.x,r.y),this.maxSpeed=e.maxSpeed||NaN):this.acceleration=new o.Point,e.scale?(this.startScale=a.createList(e.scale),this.minimumScaleMultiplier=("minimumScaleMultiplier"in e?e.minimumScaleMultiplier:e.scale.minimumScaleMultiplier)||1):(this.startScale=new a(1,0),this.minimumScaleMultiplier=1),e.color?this.startColor=a.createList(e.color):this.startColor=new a({r:255,g:255,b:255},0),e.startRotation?(this.minStartRotation=e.startRotation.min,this.maxStartRotation=e.startRotation.max):this.minStartRotation=this.maxStartRotation=0,e.noRotation&&(this.minStartRotation||this.maxStartRotation)?this.noRotation=!!e.noRotation:this.noRotation=!1,e.rotationSpeed?(this.minRotationSpeed=e.rotationSpeed.min,this.maxRotationSpeed=e.rotationSpeed.max):this.minRotationSpeed=this.maxRotationSpeed=0,this.rotationAcceleration=e.rotationAcceleration||0,this.minLifetime=e.lifetime.min,this.maxLifetime=e.lifetime.max,this.particleBlendMode=i.getBlendMode(e.blendMode),e.ease?this.customEase="function"===typeof e.ease?e.ease:i.generateEase(e.ease):this.customEase=null,n.parseData?this.extraData=n.parseData(e.extraData):this.extraData=e.extraData||null,this.spawnRect=this.spawnCircle=null,this.particlesPerWave=1,e.particlesPerWave&&e.particlesPerWave>1&&(this.particlesPerWave=e.particlesPerWave),this.particleSpacing=0,this.angleStart=0,this.parseSpawnType(e),this.frequency=e.frequency,this.spawnChance="number"===typeof e.spawnChance&&e.spawnChance>0?e.spawnChance:1,this.emitterLifetime=e.emitterLifetime||-1,this.maxParticles=e.maxParticles>0?e.maxParticles:1e3,this.addAtBack=!!e.addAtBack,this.rotation=0,this.ownerPos=new o.Point,this.spawnPos=new o.Point(e.pos.x,e.pos.y),this.initAdditional(t,e),this._prevEmitterPos=this.spawnPos.clone(),this._prevPosIsValid=!1,this._spawnTimer=0,this.emit=void 0===e.emit||!!e.emit,this.autoUpdate=!!e.autoUpdate,this.orderedArt=!!e.orderedArt}},t.prototype.initAdditional=function(t,e){},t.prototype.parseSpawnType=function(t){var e;switch(t.spawnType){case"rect":this.spawnType="rect",this._spawnFunc=this._spawnRect;var n=t.spawnRect;this.spawnRect=new o.Rectangle(n.x,n.y,n.w,n.h);break;case"circle":this.spawnType="circle",this._spawnFunc=this._spawnCircle,e=t.spawnCircle,this.spawnCircle=new o.Circle(e.x,e.y,e.r);break;case"ring":this.spawnType="ring",this._spawnFunc=this._spawnRing,e=t.spawnCircle,this.spawnCircle=new o.Circle(e.x,e.y,e.r),this.spawnCircle.minRadius=e.minR;break;case"burst":this.spawnType="burst",this._spawnFunc=this._spawnBurst,this.particleSpacing=t.particleSpacing,this.angleStart=t.angleStart?t.angleStart:0;break;case"point":this.spawnType="point",this._spawnFunc=this._spawnPoint;break;case"polygonalChain":this.spawnType="polygonalChain",this._spawnFunc=this._spawnPolygonalChain,this.spawnPolygonalChain=new b(t.spawnPolygon);break;default:this.spawnType="point",this._spawnFunc=this._spawnPoint}},t.prototype.recycle=function(t){t.next&&(t.next.prev=t.prev),t.prev&&(t.prev.next=t.next),t===this._activeParticlesLast&&(this._activeParticlesLast=t.prev),t===this._activeParticlesFirst&&(this._activeParticlesFirst=t.next),t.prev=null,t.next=this._poolFirst,this._poolFirst=t,t.parent&&t.parent.removeChild(t),--this.particleCount},t.prototype.rotate=function(t){if(this.rotation!==t){var e=t-this.rotation;this.rotation=t,i.rotatePoint(e,this.spawnPos),this._posChanged=!0}},t.prototype.updateSpawnPos=function(t,e){this._posChanged=!0,this.spawnPos.x=t,this.spawnPos.y=e},t.prototype.updateOwnerPos=function(t,e){this._posChanged=!0,this.ownerPos.x=t,this.ownerPos.y=e},t.prototype.resetPositionTracking=function(){this._prevPosIsValid=!1},Object.defineProperty(t.prototype,"emit",{get:function(){return this._emit},set:function(t){this._emit=!!t,this._emitterLife=this.emitterLifetime},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(t){this._autoUpdate&&!t?y.remove(this.update,this):!this._autoUpdate&&t&&y.add(this.update,this),this._autoUpdate=!!t},enumerable:!0,configurable:!0}),t.prototype.playOnceAndDestroy=function(t){this.autoUpdate=!0,this.emit=!0,this._destroyWhenComplete=!0,this._completeCallback=t},t.prototype.playOnce=function(t){this.emit=!0,this._completeCallback=t},t.prototype.update=function(t){if(this._autoUpdate&&(t=t/o.settings.TARGET_FPMS/1e3),this._parent){var e,n,r,i,a;for(n=this._activeParticlesFirst;n;n=r)r=n.next,n.update(t);this._prevPosIsValid&&(i=this._prevEmitterPos.x,a=this._prevEmitterPos.y);var s=this.ownerPos.x+this.spawnPos.x,u=this.ownerPos.y+this.spawnPos.y;if(this._emit)for(this._spawnTimer-=t<0?0:t;this._spawnTimer<=0;){if(this._emitterLife>=0&&(this._emitterLife-=this._frequency,this._emitterLife<=0)){this._spawnTimer=0,this._emitterLife=0,this.emit=!1;break}if(this.particleCount>=this.maxParticles)this._spawnTimer+=this._frequency;else{var l=void 0;if(l=this.minLifetime===this.maxLifetime?this.minLifetime:Math.random()*(this.maxLifetime-this.minLifetime)+this.minLifetime,-this._spawnTimer=this.spawnChance)){var d=void 0;this._poolFirst?(d=this._poolFirst,this._poolFirst=this._poolFirst.next,d.next=null):d=new this.particleConstructor(this),this.particleImages.length>1?-1!==this._currentImageIndex?(d.applyArt(this.particleImages[this._currentImageIndex++]),(this._currentImageIndex<0||this._currentImageIndex>=this.particleImages.length)&&(this._currentImageIndex=0)):d.applyArt(this.particleImages[Math.floor(Math.random()*this.particleImages.length)]):d.applyArt(this.particleImages[0]),d.alphaList.reset(this.startAlpha),1!==this.minimumSpeedMultiplier&&(d.speedMultiplier=Math.random()*(1-this.minimumSpeedMultiplier)+this.minimumSpeedMultiplier),d.speedList.reset(this.startSpeed),d.acceleration.x=this.acceleration.x,d.acceleration.y=this.acceleration.y,d.maxSpeed=this.maxSpeed,1!==this.minimumScaleMultiplier&&(d.scaleMultiplier=Math.random()*(1-this.minimumScaleMultiplier)+this.minimumScaleMultiplier),d.scaleList.reset(this.startScale),d.colorList.reset(this.startColor),this.minRotationSpeed===this.maxRotationSpeed?d.rotationSpeed=this.minRotationSpeed:d.rotationSpeed=Math.random()*(this.maxRotationSpeed-this.minRotationSpeed)+this.minRotationSpeed,d.rotationAcceleration=this.rotationAcceleration,d.noRotation=this.noRotation,d.maxLife=l,d.blendMode=this.particleBlendMode,d.ease=this.customEase,d.extraData=this.extraData,this.applyAdditionalProperties(d),this._spawnFunc(d,c,h,e),d.init(),this.addAtBack?this._parent.addChildAt(d,0):this._parent.addChild(d),this._activeParticlesLast?(this._activeParticlesLast.next=d,d.prev=this._activeParticlesLast,this._activeParticlesLast=d):this._activeParticlesLast=this._activeParticlesFirst=d,++this.particleCount,d.update(-this._spawnTimer)}}this._spawnTimer+=this._frequency}}if(this._posChanged&&(this._prevEmitterPos.x=s,this._prevEmitterPos.y=u,this._prevPosIsValid=!0,this._posChanged=!1),!this._emit&&!this._activeParticlesFirst){if(this._completeCallback){var m=this._completeCallback;this._completeCallback=null,m()}this._destroyWhenComplete&&this.destroy()}}},t.prototype.applyAdditionalProperties=function(t){},t.prototype._spawnPoint=function(t,e,n){this.minStartRotation===this.maxStartRotation?t.rotation=this.minStartRotation+this.rotation:t.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,t.position.x=e,t.position.y=n},t.prototype._spawnRect=function(t,e,n){this.minStartRotation===this.maxStartRotation?t.rotation=this.minStartRotation+this.rotation:t.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,w.x=Math.random()*this.spawnRect.width+this.spawnRect.x,w.y=Math.random()*this.spawnRect.height+this.spawnRect.y,0!==this.rotation&&i.rotatePoint(this.rotation,w),t.position.x=e+w.x,t.position.y=n+w.y},t.prototype._spawnCircle=function(t,e,n){this.minStartRotation===this.maxStartRotation?t.rotation=this.minStartRotation+this.rotation:t.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,w.x=Math.random()*this.spawnCircle.radius,w.y=0,i.rotatePoint(360*Math.random(),w),w.x+=this.spawnCircle.x,w.y+=this.spawnCircle.y,0!==this.rotation&&i.rotatePoint(this.rotation,w),t.position.x=e+w.x,t.position.y=n+w.y},t.prototype._spawnRing=function(t,e,n){var r=this.spawnCircle;this.minStartRotation===this.maxStartRotation?t.rotation=this.minStartRotation+this.rotation:t.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,r.minRadius!==r.radius?w.x=Math.random()*(r.radius-r.minRadius)+r.minRadius:w.x=r.radius,w.y=0;var o=360*Math.random();t.rotation+=o,i.rotatePoint(o,w),w.x+=this.spawnCircle.x,w.y+=this.spawnCircle.y,0!==this.rotation&&i.rotatePoint(this.rotation,w),t.position.x=e+w.x,t.position.y=n+w.y},t.prototype._spawnPolygonalChain=function(t,e,n){this.minStartRotation===this.maxStartRotation?t.rotation=this.minStartRotation+this.rotation:t.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,this.spawnPolygonalChain.getRandomPoint(w),0!==this.rotation&&i.rotatePoint(this.rotation,w),t.position.x=e+w.x,t.position.y=n+w.y},t.prototype._spawnBurst=function(t,e,n,r){0===this.particleSpacing?t.rotation=360*Math.random():t.rotation=this.angleStart+this.particleSpacing*r+this.rotation,t.position.x=e,t.position.y=n},t.prototype.cleanup=function(){var t,e;for(t=this._activeParticlesFirst;t;t=e)e=t.next,this.recycle(t),t.parent&&t.parent.removeChild(t);this._activeParticlesFirst=this._activeParticlesLast=null,this.particleCount=0},t.prototype.destroy=function(){var t;this.autoUpdate=!1,this.cleanup();for(var e=this._poolFirst;e;e=t)t=e.next,e.destroy();this._poolFirst=this._parent=this.particleImages=this.spawnPos=this.ownerPos=this.startColor=this.startScale=this.startAlpha=this.startSpeed=this.customEase=this._completeCallback=null},t}(),E=new o.Point,S=["pow","sqrt","abs","floor","round","ceil","E","PI","sin","cos","tan","asin","acos","atan","atan2","log"],P=new RegExp(["[01234567890\\.\\*\\-\\+\\/\\(\\)x ,]"].concat(S).join("|"),"g");(function(t){function e(e){var n=t.call(this,e)||this;return n.path=null,n.initialRotation=0,n.initialPosition=new o.Point,n.movement=0,n}c(e,t),e.prototype.init=function(){this.initialRotation=this.rotation,this.Particle_init(),this.path=this.extraData.path,this._doNormalMovement=!this.path,this.movement=0,this.initialPosition.x=this.position.x,this.initialPosition.y=this.position.y},e.prototype.update=function(t){var e=this.Particle_update(t);if(e>=0&&this.path){if(this._doSpeed){var n=this.speedList.interpolate(e)*this.speedMultiplier;this.movement+=n*t}else{n=this.speedList.current.value*this.speedMultiplier;this.movement+=n*t}E.x=this.movement,E.y=this.path(this.movement),i.rotatePoint(this.initialRotation,E),this.position.x=this.initialPosition.x+E.x,this.position.y=this.initialPosition.y+E.y}return e},e.prototype.destroy=function(){this.Particle_destroy(),this.path=this.initialPosition=null},e.parseArt=function(t){return _.parseArt(t)},e.parseData=function(t){var e={};if(t&&t.path)try{e.path=function(t){for(var e=t.match(P),n=e.length-1;n>=0;--n)S.indexOf(e[n])>=0&&(e[n]="Math."+e[n]);return t=e.join(""),new Function("x","return "+t+";")}(t.path)}catch(n){i.verbose&&console.error("PathParticle: error in parsing path expression"),e.path=null}else i.verbose&&console.error("PathParticle requires a path string in extraData!"),e.path=null;return e}})(_),function(t){function e(e){var n=t.call(this,e)||this;return n.textures=null,n.duration=0,n.framerate=0,n.elapsed=0,n.loop=!1,n}c(e,t),e.prototype.init=function(){this.Particle_init(),this.elapsed=0,this.framerate<0&&(this.duration=this.maxLife,this.framerate=this.textures.length/this.duration)},e.prototype.applyArt=function(t){this.textures=t.textures,this.framerate=t.framerate,this.duration=t.duration,this.loop=t.loop},e.prototype.update=function(t){var e=this.Particle_update(t);if(e>=0){this.elapsed+=t,this.elapsed>this.duration&&(this.loop?this.elapsed=this.elapsed%this.duration:this.elapsed=this.duration-1e-6);var n=this.elapsed*this.framerate+1e-7|0;this.texture=this.textures[n]||o.Texture.EMPTY}return e},e.prototype.destroy=function(){this.Particle_destroy(),this.textures=null},e.parseArt=function(t){for(var e=[],n=0;n0;--h)a.push(c)}}"matchLife"===r.framerate?(i.framerate=-1,i.duration=0,i.loop=!1):(i.loop=!!r.loop,i.framerate=r.framerate>0?r.framerate:60,i.duration=a.length/i.framerate)}return e}}(_);var O=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._firstChild=null,e._lastChild=null,e._childCount=0,e}return c(e,t),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this._firstChild},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this._lastChild},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"childCount",{get:function(){return this._childCount},enumerable:!0,configurable:!0}),e.prototype.addChild=function(){for(var t=[],e=0;e1)for(var n=0;nthis._childCount)throw new Error("addChildAt: The index "+e+" supplied is out of bounds "+this._childCount);t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1;var n=t;if(this._firstChild)if(0===e)this._firstChild.prevChild=n,n.nextChild=this._firstChild,this._firstChild=n;else if(e===this._childCount)this._lastChild.nextChild=n,n.prevChild=this._lastChild,this._lastChild=n;else{for(var r=0,i=this._firstChild;r=this._childCount)throw new Error("The index "+e+" supplied is out of bounds "+this._childCount);if(t.parent!==this)throw new Error("The supplied DisplayObject must be a child of the caller");if(t.nextChild&&(t.nextChild.prevChild=t.prevChild),t.prevChild&&(t.prevChild.nextChild=t.nextChild),this._firstChild===t&&(this._firstChild=t.nextChild),this._lastChild===t&&(this._lastChild=t.prevChild),t.nextChild=null,t.prevChild=null,this._firstChild)if(0===e)this._firstChild.prevChild=t,t.nextChild=this._firstChild,this._firstChild=t;else if(e===this._childCount)this._lastChild.nextChild=t,t.prevChild=this._lastChild,this._lastChild=t;else{for(var n=0,r=this._firstChild;n1)for(var n=0;n=this._childCount)throw new Error("getChildAt: Index ("+t+") does not exist.");if(0===t)return this._firstChild;if(t===this._childCount)return this._lastChild;for(var e=0,n=this._firstChild;e0&&i<=r){for(var o=[],a=this._firstChild,s=0;s<=r&&a;++s,a=a.nextChild)s>=n&&o.push(a);var u=o[0].prevChild,l=o[o.length-1].nextChild;l?l.prevChild=u:this._lastChild=u,u?u.nextChild=l:this._firstChild=l;for(s=0;s80*n){r=u=t[0],s=l=t[1];for(var b=n;bu&&(u=c),p>l&&(l=p);d=0!==(d=Math.max(u-r,l-s))?1/d:0}return a(g,_,n,r,s,d),_}function i(t,e,n,r,i){var o,a;if(i===C(t,e,n,r)>0)for(o=e;o=e;o-=r)a=S(o,t[o],t[o+1],a);return a&&_(a,a.next)&&(P(a),a=a.next),a}function o(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!_(r,r.next)&&0!==g(r.prev,r,r.next))r=r.next;else{if(P(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function a(t,e,n,r,i,h,f){if(t){!f&&h&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=d(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,u,l=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,l*=2}while(a>1)}(i)}(t,r,i,h);for(var p,m,v=t;t.prev!==t.next;)if(p=t.prev,m=t.next,h?u(t,r,i,h):s(t))e.push(p.i/n),e.push(t.i/n),e.push(m.i/n),P(t),t=m.next,v=m.next;else if((t=m)===v){f?1===f?a(t=l(o(t),e,n),e,n,r,i,h,2):2===f&&c(t,e,n,r,i,h):a(o(t),e,n,r,i,h,1);break}}}function s(t){var e=t.prev,n=t,r=t.next;if(g(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(v(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&g(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function u(t,e,n,r){var i=t.prev,o=t,a=t.next;if(g(i,o,a)>=0)return!1;for(var s=i.xo.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,c=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=d(s,u,e,n,r),f=d(l,c,e,n,r),p=t.prevZ,m=t.nextZ;p&&p.z>=h&&m&&m.z<=f;){if(p!==t.prev&&p!==t.next&&v(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&g(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,m!==t.prev&&m!==t.next&&v(i.x,i.y,o.x,o.y,a.x,a.y,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;p&&p.z>=h;){if(p!==t.prev&&p!==t.next&&v(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&g(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;m&&m.z<=f;){if(m!==t.prev&&m!==t.next&&v(i.x,i.y,o.x,o.y,a.x,a.y,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function l(t,e,n){var r=t;do{var i=r.prev,a=r.next.next;!_(i,a)&&b(i,r,r.next,a)&&T(i,a)&&T(a,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(a.i/n),P(r),P(r.next),r=t=a),r=r.next}while(r!==t);return o(r)}function c(t,e,n,r,i,s){var u=t;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&y(u,l)){var c=E(u,l);return u=o(u,u.next),c=o(c,c.next),a(u,e,n,r,i,s),void a(c,e,n,r,i,s)}l=l.next}u=u.next}while(u!==t)}function h(t,e){return t.x-e.x}function f(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x=r.x&&r.x>=c&&i!==r.x&&v(on.x||r.x===n.x&&p(n,r)))&&(n=r,f=u)),r=r.next}while(r!==l);return n}(t,e)){var n=E(e,t);o(e,e.next),o(n,n.next)}}function p(t,e){return g(t.prev,t,e.prev)<0&&g(e.next,t,t.next)<0}function d(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function m(t){var e=t,n=t;do{(e.x=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function y(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&b(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(T(t,e)&&T(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!==n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(g(t.prev,t,e.prev)||g(t,e.prev,e))||_(t,e)&&g(t.prev,t,t.next)>0&&g(e.prev,e,e.next)>0)}function g(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function _(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,n,r){var i=w(g(t,e,n)),o=w(g(t,e,r)),a=w(g(n,r,t)),s=w(g(n,r,e));return i!==o&&a!==s||(!(0!==i||!x(t,n,e))||(!(0!==o||!x(t,r,e))||(!(0!==a||!x(n,t,r))||!(0!==s||!x(n,e,r)))))}function x(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function w(t){return t>0?1:t<0?-1:0}function T(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function E(t,e){var n=new O(t.i,t.x,t.y),r=new O(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function S(t,e,n,r){var i=new O(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function P(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 O(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function C(t,e,n,r){for(var i=0,o=e,a=n-r;o0&&(r+=t[i-1].length,n.holes.push(r))}return n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return t&&"@@redux/INIT"===t.type?"initialState argument passed to createStore":"previous state received by the reducer"},t.exports=e.default},function(t,e,n){var r=n(80),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e,n){var r=n(40).Symbol;t.exports=r},function(t,e,n){"use strict";function r(t){var e,n=t.Symbol;return"function"===typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(t){return function(e){var n=e.dispatch,r=e.getState;return function(e){return function(i){return"function"===typeof i?i(n,r,t):e(i)}}}}var i=r();i.withExtraArgument=r,e.a=i},function(t,e,n){"use strict";e.__esModule=!0;var r=Object.assign||function(t){for(var e=1;e=this.viewport.threshold}},{key:"move",value:function(t){if(!this.viewport.pause&&this.viewport.worldVisible){var e=this.viewport.plugins.move(t);if(this.clickedAvailable){var n=t.data.global.x-this.last.x,r=t.data.global.y-this.last.y;(this.checkThreshold(n)||this.checkThreshold(r))&&(this.clickedAvailable=!1)}e&&this.viewport.options.stopPropagation&&t.stopPropagation()}}},{key:"up",value:function(t){if(!this.viewport.pause&&this.viewport.worldVisible){"mouse"===t.data.pointerType&&(this.isMouseDown=!1),"mouse"!==t.data.pointerType&&this.remove(t.data.pointerId);var e=this.viewport.plugins.up(t);this.clickedAvailable&&0===this.count()&&(this.viewport.emit("clicked",{event:t,screen:this.last,world:this.viewport.toWorld(this.last),viewport:this}),this.clickedAvailable=!1),e&&this.viewport.options.stopPropagation&&t.stopPropagation()}}},{key:"getPointerPosition",value:function(t){var e=new f.Point;return this.viewport.options.interaction?this.viewport.options.interaction.mapPositionToPoint(e,t.clientX,t.clientY):(e.x=t.clientX,e.y=t.clientY),e}},{key:"handleWheel",value:function(t){if(!this.viewport.pause&&this.viewport.worldVisible){var e=this.viewport.toLocal(this.getPointerPosition(t));if(this.viewport.left<=e.x&&e.x<=this.viewport.right&&this.viewport.top<=e.y&&e.y<=this.viewport.bottom)this.viewport.plugins.wheel(t)&&!this.viewport.options.passiveWheel&&t.preventDefault()}}},{key:"pause",value:function(){this.touches=[],this.isMouseDown=!1}},{key:"get",value:function(t){var e,n=Object(l.a)(this.touches);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.id===t)return r}}catch(i){n.e(i)}finally{n.f()}return null}},{key:"remove",value:function(t){for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:d.length;this.plugins[t]=e;var r=d.indexOf(t);-1!==r&&d.splice(r,1),d.splice(n,0,t),this.sort()}},{key:"get",value:function(t,e){return e&&"undefined"!==typeof this.plugins[t]&&this.plugins[t].paused?null:this.plugins[t]}},{key:"update",value:function(t){var e,n=Object(l.a)(this.list);try{for(n.s();!(e=n.n()).done;){e.value.update(t)}}catch(r){n.e(r)}finally{n.f()}}},{key:"resize",value:function(){var t,e=Object(l.a)(this.list);try{for(e.s();!(t=e.n()).done;){t.value.resize()}}catch(n){e.e(n)}finally{e.f()}}},{key:"reset",value:function(){var t,e=Object(l.a)(this.list);try{for(e.s();!(t=e.n()).done;){t.value.reset()}}catch(n){e.e(n)}finally{e.f()}}},{key:"remove",value:function(t){this.plugins[t]&&(this.plugins[t]=null,this.viewport.emit(t+"-remove"),this.sort())}},{key:"pause",value:function(t){this.plugins[t]&&this.plugins[t].pause()}},{key:"resume",value:function(t){this.plugins[t]&&this.plugins[t].resume()}},{key:"sort",value:function(){this.list=[];var t,e=Object(l.a)(d);try{for(e.s();!(t=e.n()).done;){var n=t.value;this.plugins[n]&&this.list.push(this.plugins[n])}}catch(r){e.e(r)}finally{e.f()}}},{key:"down",value:function(t){var e,n=!1,r=Object(l.a)(this.list);try{for(r.s();!(e=r.n()).done;){e.value.down(t)&&(n=!0)}}catch(i){r.e(i)}finally{r.f()}return n}},{key:"move",value:function(t){var e,n=!1,r=Object(l.a)(this.viewport.plugins.list);try{for(r.s();!(e=r.n()).done;){e.value.move(t)&&(n=!0)}}catch(i){r.e(i)}finally{r.f()}return n}},{key:"up",value:function(t){var e,n=!1,r=Object(l.a)(this.list);try{for(r.s();!(e=r.n()).done;){e.value.up(t)&&(n=!0)}}catch(i){r.e(i)}finally{r.f()}return n}},{key:"wheel",value:function(t){var e,n=!1,r=Object(l.a)(this.list);try{for(r.s();!(e=r.n()).done;){e.value.wheel(t)&&(n=!0)}}catch(i){r.e(i)}finally{r.f()}return n}}]),t}(),v=function(){function t(e){Object(c.a)(this,t),this.parent=e,this.paused=!1}return Object(h.a)(t,[{key:"destroy",value:function(){}},{key:"down",value:function(){return!1}},{key:"move",value:function(){return!1}},{key:"up",value:function(){return!1}},{key:"wheel",value:function(){return!1}},{key:"update",value:function(){}},{key:"resize",value:function(){}},{key:"reset",value:function(){}},{key:"pause",value:function(){this.paused=!0}},{key:"resume",value:function(){this.paused=!1}}]),t}(),y={direction:"all",pressDrag:!0,wheel:!0,wheelScroll:1,reverse:!1,clampWheel:!1,underflow:"center",factor:1,mouseButtons:"all",keyToPress:null,ignoreKeyToPressOnTouch:!1},g=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},y,i),r.moved=!1,r.reverse=r.options.reverse?1:-1,r.xDirection=!r.options.direction||"all"===r.options.direction||"x"===r.options.direction,r.yDirection=!r.options.direction||"all"===r.options.direction||"y"===r.options.direction,r.keyIsPressed=!1,r.parseUnderflow(),r.mouseButtons(r.options.mouseButtons),r.options.keyToPress&&r.handleKeyPresses(r.options.keyToPress),r}return Object(h.a)(n,[{key:"handleKeyPresses",value:function(t){var e=this;parent.addEventListener("keydown",(function(n){t.includes(n.code)&&(e.keyIsPressed=!0)})),parent.addEventListener("keyup",(function(n){t.includes(n.code)&&(e.keyIsPressed=!1)}))}},{key:"mouseButtons",value:function(t){this.mouse=t&&"all"!==t?[-1!==t.indexOf("left"),-1!==t.indexOf("middle"),-1!==t.indexOf("right")]:[!0,!0,!0]}},{key:"parseUnderflow",value:function(){var t=this.options.underflow.toLowerCase();"center"===t?(this.underflowX=0,this.underflowY=0):(this.underflowX=-1!==t.indexOf("left")?-1:-1!==t.indexOf("right")?1:0,this.underflowY=-1!==t.indexOf("top")?-1:-1!==t.indexOf("bottom")?1:0)}},{key:"checkButtons",value:function(t){var e="mouse"===t.data.pointerType,n=this.parent.input.count();return!(!(1===n||n>1&&!this.parent.plugins.get("pinch",!0))||e&&!this.mouse[t.data.button])}},{key:"checkKeyPress",value:function(t){return!!(!this.options.keyToPress||this.keyIsPressed||this.options.ignoreKeyToPressOnTouch&&"touch"===t.data.pointerType)}},{key:"down",value:function(t){if(!this.paused&&this.options.pressDrag)return this.checkButtons(t)&&this.checkKeyPress(t)?(this.last={x:t.data.global.x,y:t.data.global.y},this.current=t.data.pointerId,!0):void(this.last=null)}},{key:"move",value:function(t){if(!this.paused&&this.options.pressDrag&&this.last&&this.current===t.data.pointerId){var e=t.data.global.x,n=t.data.global.y,r=this.parent.input.count();if(1===r||r>1&&!this.parent.plugins.get("pinch",!0)){var i=e-this.last.x,o=n-this.last.y;if(this.moved||this.xDirection&&this.parent.input.checkThreshold(i)||this.yDirection&&this.parent.input.checkThreshold(o)){var a={x:e,y:n};return this.xDirection&&(this.parent.x+=(a.x-this.last.x)*this.options.factor),this.yDirection&&(this.parent.y+=(a.y-this.last.y)*this.options.factor),this.last=a,this.moved||this.parent.emit("drag-start",{event:t,screen:new f.Point(this.last.x,this.last.y),world:this.parent.toWorld(new f.Point(this.last.x,this.last.y)),viewport:this.parent}),this.moved=!0,this.parent.emit("moved",{viewport:this.parent,type:"drag"}),!0}}else this.moved=!1}}},{key:"up",value:function(t){if(!this.paused){var e=this.parent.input.touches;if(1===e.length){var n=e[0];return n.last&&(this.last={x:n.last.x,y:n.last.y},this.current=n.id),this.moved=!1,!0}if(this.last&&this.moved){var r=new f.Point(this.last.x,this.last.y);return this.parent.emit("drag-end",{event:t,screen:r,world:this.parent.toWorld(r),viewport:this.parent}),this.last=null,this.moved=!1,!0}}}},{key:"wheel",value:function(t){if(!this.paused&&this.options.wheel){var e=this.parent.plugins.get("wheel",!0);if(!e)return this.xDirection&&(this.parent.x+=t.deltaX*this.options.wheelScroll*this.reverse),this.yDirection&&(this.parent.y+=t.deltaY*this.options.wheelScroll*this.reverse),this.options.clampWheel&&this.clamp(),this.parent.emit("wheel-scroll",this.parent),this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.options.passiveWheel||t.preventDefault(),!0}}},{key:"resume",value:function(){this.last=null,this.paused=!1}},{key:"clamp",value:function(){var t=this.parent.plugins.get("decelerate",!0)||{};if("y"!==this.options.clampWheel)if(this.parent.screenWorldWidththis.parent.worldWidth&&(this.parent.x=-this.parent.worldWidth*this.parent.scale.x+this.parent.screenWidth,t.x=0);if("x"!==this.options.clampWheel)if(this.parent.screenWorldHeightthis.parent.worldHeight&&(this.parent.y=-this.parent.worldHeight*this.parent.scale.y+this.parent.screenHeight,t.y=0)}},{key:"active",get:function(){return this.moved}}]),n}(v),_={noDrag:!1,percent:1,center:null,factor:1},b=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},_,i),r}return Object(h.a)(n,[{key:"down",value:function(){if(this.parent.input.count()>=2)return this.active=!0,!0}},{key:"move",value:function(t){if(!this.paused&&this.active){var e=t.data.global.x,n=t.data.global.y,r=this.parent.input.touches;if(r.length>=2){var i=r[0],o=r[1],a=i.last&&o.last?Math.sqrt(Math.pow(o.last.x-i.last.x,2)+Math.pow(o.last.y-i.last.y,2)):null;if(i.id===t.data.pointerId?i.last={x:e,y:n,data:t.data}:o.id===t.data.pointerId&&(o.last={x:e,y:n,data:t.data}),a){var s,u={x:i.last.x+(o.last.x-i.last.x)/2,y:i.last.y+(o.last.y-i.last.y)/2};this.options.center||(s=this.parent.toLocal(u));var l=Math.sqrt(Math.pow(o.last.x-i.last.x,2)+Math.pow(o.last.y-i.last.y,2)),c=(1-a/(l=0===l?l=1e-10:l))*this.options.percent*this.parent.scale.x;this.parent.scale.x+=c,this.parent.scale.y+=c,this.parent.emit("zoomed",{viewport:this.parent,type:"pinch",center:u});var h=this.parent.plugins.get("clamp-zoom",!0);if(h&&h.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{var f=this.parent.toGlobal(s);this.parent.x+=(u.x-f.x)*this.options.factor,this.parent.y+=(u.y-f.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})}!this.options.noDrag&&this.lastCenter&&(this.parent.x+=(u.x-this.lastCenter.x)*this.options.factor,this.parent.y+=(u.y-this.lastCenter.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})),this.lastCenter=u,this.moved=!0}else this.pinching||(this.parent.emit("pinch-start",this.parent),this.pinching=!0);return!0}}}},{key:"up",value:function(){if(this.pinching&&this.parent.input.touches.length<=1)return this.active=!1,this.lastCenter=null,this.pinching=!1,this.moved=!1,this.parent.emit("pinch-end",this.parent),!0}}]),n}(v),x={left:!1,right:!1,top:!1,bottom:!1,direction:null,underflow:"center"},w=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},x,i),r.options.direction&&(r.options.left="x"===r.options.direction||"all"===r.options.direction||null,r.options.right="x"===r.options.direction||"all"===r.options.direction||null,r.options.top="y"===r.options.direction||"all"===r.options.direction||null,r.options.bottom="y"===r.options.direction||"all"===r.options.direction||null),r.parseUnderflow(),r.last={x:null,y:null,scaleX:null,scaleY:null},r.update(),r}return Object(h.a)(n,[{key:"parseUnderflow",value:function(){var t=this.options.underflow.toLowerCase();"none"===t?this.noUnderflow=!0:"center"===t?(this.underflowX=this.underflowY=0,this.noUnderflow=!1):(this.underflowX=-1!==t.indexOf("left")?-1:-1!==t.indexOf("right")?1:0,this.underflowY=-1!==t.indexOf("top")?-1:-1!==t.indexOf("bottom")?1:0,this.noUnderflow=!1)}},{key:"move",value:function(){return this.update(),!1}},{key:"update",value:function(){if(!this.paused&&(this.parent.x!==this.last.x||this.parent.y!==this.last.y||this.parent.scale.x!==this.last.scaleX||this.parent.scale.y!==this.last.scaleY)){var t={x:this.parent.x,y:this.parent.y},e=this.parent.plugins.decelerate||{};if(null!==this.options.left||null!==this.options.right){var n=!1;if(this.parent.screenWorldWidth(!0===this.options.right?this.parent.worldWidth:this.options.right)&&(this.parent.x=-(!0===this.options.right?this.parent.worldWidth:this.options.right)*this.parent.scale.x+this.parent.screenWidth,e.x=0,n=!0);n&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-x"})}if(null!==this.options.top||null!==this.options.bottom){var r=!1;if(this.parent.screenWorldHeight(!0===this.options.bottom?this.parent.worldHeight:this.options.bottom)&&(this.parent.y=-(!0===this.options.bottom?this.parent.worldHeight:this.options.bottom)*this.parent.scale.y+this.parent.screenHeight,e.y=0,r=!0);r&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-y"})}this.last.x=this.parent.x,this.last.y=this.parent.y,this.last.scaleX=this.parent.scale.x,this.last.scaleY=this.parent.scale.y}}},{key:"reset",value:function(){this.update()}}]),n}(v),T={minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,minScale:null,maxScale:null},E=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},T,i),r.clamp(),r}return Object(h.a)(n,[{key:"resize",value:function(){this.clamp()}},{key:"clamp",value:function(){if(!this.paused)if(this.options.minWidth||this.options.minHeight||this.options.maxWidth||this.options.maxHeight){var t=this.parent.worldScreenWidth,e=this.parent.worldScreenHeight;if(null!==this.options.minWidth&&tthis.options.maxWidth){var r=this.parent.scale.x;this.parent.fitWidth(this.options.maxWidth,!1,!1,!0),this.parent.scale.y*=this.parent.scale.x/r,t=this.parent.worldScreenWidth,e=this.parent.worldScreenHeight,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})}if(null!==this.options.minHeight&&ethis.options.maxHeight){var o=this.parent.scale.y;this.parent.fitHeight(this.options.maxHeight,!1,!1,!0),this.parent.scale.x*=this.parent.scale.y/o,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})}}else{var a=this.parent.scale.x;null!==this.options.minScale&&athis.options.maxScale&&(a=this.options.maxScale),a!==this.parent.scale.x&&(this.parent.scale.set(a),this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"}))}}},{key:"reset",value:function(){this.clamp()}}]),n}(v),S={friction:.95,bounce:.8,minSpeed:.01},P=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},S,i),r.saved=[],r.reset(),r.parent.on("moved",(function(t){return r.moved(t)})),r}return Object(h.a)(n,[{key:"destroy",value:function(){this.parent}},{key:"down",value:function(){this.saved=[],this.x=this.y=!1}},{key:"isActive",value:function(){return this.x||this.y}},{key:"move",value:function(){if(!this.paused){var t=this.parent.input.count();(1===t||t>1&&!this.parent.plugins.get("pinch",!0))&&(this.saved.push({x:this.parent.x,y:this.parent.y,time:performance.now()}),this.saved.length>60&&this.saved.splice(0,30))}}},{key:"moved",value:function(t){if(this.saved.length){var e=this.saved[this.saved.length-1];"clamp-x"===t.type?e.x===t.original.x&&(e.x=this.parent.x):"clamp-y"===t.type&&e.y===t.original.y&&(e.y=this.parent.y)}}},{key:"up",value:function(){if(0===this.parent.input.count()&&this.saved.length){var t,e=performance.now(),n=Object(l.a)(this.saved);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.time>=e-100){var i=e-r.time;this.x=(this.parent.x-r.x)/i,this.y=(this.parent.y-r.y)/i,this.percentChangeX=this.percentChangeY=this.options.friction;break}}}catch(o){n.e(o)}finally{n.f()}}}},{key:"activate",value:function(t){"undefined"!==typeof(t=t||{}).x&&(this.x=t.x,this.percentChangeX=this.options.friction),"undefined"!==typeof t.y&&(this.y=t.y,this.percentChangeY=this.options.friction)}},{key:"update",value:function(t){var e;this.paused||(this.x&&(this.parent.x+=this.x*t,this.x*=this.percentChangeX,Math.abs(this.x)1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},A,i),r.ease=I(r.options.ease,"easeInOutSine"),r.options.sides&&("all"===r.options.sides?r.top=r.bottom=r.left=r.right=!0:"horizontal"===r.options.sides?r.right=r.left=!0:"vertical"===r.options.sides?r.top=r.bottom=!0:(r.top=-1!==r.options.sides.indexOf("top"),r.bottom=-1!==r.options.sides.indexOf("bottom"),r.left=-1!==r.options.sides.indexOf("left"),r.right=-1!==r.options.sides.indexOf("right"))),r.parseUnderflow(),r.last={},r.reset(),r}return Object(h.a)(n,[{key:"parseUnderflow",value:function(){var t=this.options.underflow.toLowerCase();"center"===t?(this.underflowX=0,this.underflowY=0):(this.underflowX=-1!==t.indexOf("left")?-1:-1!==t.indexOf("right")?1:0,this.underflowY=-1!==t.indexOf("top")?-1:-1!==t.indexOf("bottom")?1:0)}},{key:"isActive",value:function(){return null!==this.toX||null!==this.toY}},{key:"down",value:function(){this.toX=this.toY=null}},{key:"up",value:function(){this.bounce()}},{key:"update",value:function(t){if(!this.paused){if(this.bounce(),this.toX){var e=this.toX;e.time+=t,this.parent.emit("moved",{viewport:this.parent,type:"bounce-x"}),e.time>=this.options.time?(this.parent.x=e.end,this.toX=null,this.parent.emit("bounce-x-end",this.parent)):this.parent.x=this.ease(e.time,e.start,e.delta,this.options.time)}if(this.toY){var n=this.toY;n.time+=t,this.parent.emit("moved",{viewport:this.parent,type:"bounce-y"}),n.time>=this.options.time?(this.parent.y=n.end,this.toY=null,this.parent.emit("bounce-y-end",this.parent)):this.parent.y=this.ease(n.time,n.start,n.delta,this.options.time)}}}},{key:"calcUnderflowX",value:function(){var t;switch(this.underflowX){case-1:t=0;break;case 1:t=this.parent.screenWidth-this.parent.screenWorldWidth;break;default:t=(this.parent.screenWidth-this.parent.screenWorldWidth)/2}return t}},{key:"calcUnderflowY",value:function(){var t;switch(this.underflowY){case-1:t=0;break;case 1:t=this.parent.screenHeight-this.parent.screenWorldHeight;break;default:t=(this.parent.screenHeight-this.parent.screenWorldHeight)/2}return t}},{key:"oob",value:function(){var t=this.options.bounceBox;if(t){var e="undefined"===typeof t.x?0:t.x,n="undefined"===typeof t.y?0:t.y,r="undefined"===typeof t.width?this.parent.worldWidth:t.width,i="undefined"===typeof t.height?this.parent.worldHeight:t.height;return{left:this.parent.leftr,top:this.parent.topi,topLeft:new f.Point(e*this.parent.scale.x,n*this.parent.scale.y),bottomRight:new f.Point(r*this.parent.scale.x-this.parent.screenWidth,i*this.parent.scale.y-this.parent.screenHeight)}}return{left:this.parent.left<0,right:this.parent.right>this.parent.worldWidth,top:this.parent.top<0,bottom:this.parent.bottom>this.parent.worldHeight,topLeft:new f.Point(0,0),bottomRight:new f.Point(this.parent.worldWidth*this.parent.scale.x-this.parent.screenWidth,this.parent.worldHeight*this.parent.scale.y-this.parent.screenHeight)}}},{key:"bounce",value:function(){if(!this.paused){var t,e=this.parent.plugins.get("decelerate",!0);e&&(e.x||e.y)&&(e.x&&e.percentChangeX===e.options.friction||e.y&&e.percentChangeY===e.options.friction)&&(((t=this.oob()).left&&this.left||t.right&&this.right)&&(e.percentChangeX=this.options.friction),(t.top&&this.top||t.bottom&&this.bottom)&&(e.percentChangeY=this.options.friction));var n=this.parent.plugins.get("drag",!0)||{},r=this.parent.plugins.get("pinch",!0)||{};if(e=e||{},!n.active&&!r.active&&(!this.toX||!this.toY)&&(!e.x||!e.y)){var i=(t=t||this.oob()).topLeft,o=t.bottomRight;if(!this.toX&&!e.x){var a=null;t.left&&this.left?a=this.parent.screenWorldWidth3&&void 0!==arguments[3]?arguments[3]:{};return Object(c.a)(this,n),(o=e.call(this,t)).options=Object.assign({},M,a),o.ease=I(a.ease,"easeInOutSine"),o.x=r,o.y=i,o.options.forceStart&&o.snapStart(),o}return Object(h.a)(n,[{key:"snapStart",value:function(){this.percent=0,this.snapping={time:0};var t=this.options.topLeft?this.parent.corner:this.parent.center;this.deltaX=this.x-t.x,this.deltaY=this.y-t.y,this.startX=t.x,this.startY=t.y,this.parent.emit("snap-start",this.parent)}},{key:"wheel",value:function(){this.options.removeOnInterrupt&&this.parent.plugins.remove("snap")}},{key:"down",value:function(){this.options.removeOnInterrupt?this.parent.plugins.remove("snap"):this.options.interrupt&&(this.snapping=null)}},{key:"up",value:function(){if(0===this.parent.input.count()){var t=this.parent.plugins.get("decelerate",!0);t&&(t.x||t.y)&&(t.percentChangeX=t.percentChangeY=this.options.friction)}}},{key:"update",value:function(t){if(!this.paused&&(!this.options.interrupt||0===this.parent.input.count()))if(this.snapping){var e,n,r,i=this.snapping;if(i.time+=t,i.time>this.options.time)e=!0,n=this.startX+this.deltaX,r=this.startY+this.deltaY;else{var o=this.ease(i.time,0,1,this.options.time);n=this.startX+this.deltaX*o,r=this.startY+this.deltaY*o}this.options.topLeft?this.parent.moveCorner(n,r):this.parent.moveCenter(n,r),this.parent.emit("moved",{viewport:this.parent,type:"snap"}),e&&(this.options.removeOnComplete&&this.parent.plugins.remove("snap"),this.parent.emit("snap-end",this.parent),this.snapping=null)}else{var a=this.options.topLeft?this.parent.corner:this.parent.center;a.x===this.x&&a.y===this.y||this.snapStart()}}}]),n}(v),D={width:0,height:0,time:1e3,ease:"easeInOutSine",center:null,interrupt:!0,removeOnComplete:!1,removeOnInterrupts:!1,forceStart:!1,noMove:!1},N=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},D,i),r.ease=I(r.options.ease),r.options.width>0&&(r.xScale=t.screenWidth/r.options.width),r.options.height>0&&(r.yScale=t.screenHeight/r.options.height),r.xIndependent=!!r.xScale,r.yIndependent=!!r.yScale,r.xScale=r.xIndependent?r.xScale:r.yScale,r.yScale=r.yIndependent?r.yScale:r.xScale,0===r.options.time?(t.container.scale.x=r.xScale,t.container.scale.y=r.yScale,r.options.removeOnComplete&&r.parent.plugins.remove("snap-zoom")):i.forceStart&&r.createSnapping(),r}return Object(h.a)(n,[{key:"createSnapping",value:function(){this.parent.scale;var t=this.parent.worldScreenWidth,e=this.parent.worldScreenHeight,n=this.parent.screenWidth/this.xScale,r=this.parent.screenHeight/this.yScale;this.snapping={time:0,startX:t,startY:e,deltaX:n-t,deltaY:r-e},this.parent.emit("snap-zoom-start",this.parent)}},{key:"resize",value:function(){this.snapping=null,this.options.width>0&&(this.xScale=this.parent.screenWidth/this.options.width),this.options.height>0&&(this.yScale=this.parent.screenHeight/this.options.height),this.xScale=this.xIndependent?this.xScale:this.yScale,this.yScale=this.yIndependent?this.yScale:this.xScale}},{key:"wheel",value:function(){this.options.removeOnInterrupt&&this.parent.plugins.remove("snap-zoom")}},{key:"down",value:function(){this.options.removeOnInterrupt?this.parent.plugins.remove("snap-zoom"):this.options.interrupt&&(this.snapping=null)}},{key:"update",value:function(t){var e;if(!this.paused&&(!this.options.interrupt||0===this.parent.input.count()))if(this.options.center||this.options.noMove||(e=this.parent.center),this.snapping){if(this.snapping){var n=this.snapping;if(n.time+=t,n.time>=this.options.time)this.parent.scale.set(this.xScale,this.yScale),this.options.removeOnComplete&&this.parent.plugins.remove("snap-zoom"),this.parent.emit("snap-zoom-end",this.parent),this.snapping=null;else{var r=this.snapping,i=this.ease(r.time,r.startX,r.deltaX,this.options.time),o=this.ease(r.time,r.startY,r.deltaY,this.options.time);this.parent.scale.x=this.parent.screenWidth/i,this.parent.scale.y=this.parent.screenHeight/o}var a=this.parent.plugins.get("clamp-zoom",!0);a&&a.clamp(),this.options.noMove||(this.options.center?this.parent.moveCenter(this.options.center):this.parent.moveCenter(e))}}else this.parent.scale.x===this.xScale&&this.parent.scale.y===this.yScale||this.createSnapping()}},{key:"resume",value:function(){this.snapping=null,Object(o.a)(Object(a.a)(n.prototype),"resume",this).call(this)}}]),n}(v),L={speed:0,acceleration:null,radius:null},F=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(c.a)(this,n),(i=e.call(this,t)).target=r,i.options=Object.assign({},L,o),i.velocity={x:0,y:0},i}return Object(h.a)(n,[{key:"update",value:function(t){if(!this.paused){var e=this.parent.center,n=this.target.x,r=this.target.y;if(this.options.radius){if(!(Math.sqrt(Math.pow(this.target.y-e.y,2)+Math.pow(this.target.x-e.x,2))>this.options.radius))return;var i=Math.atan2(this.target.y-e.y,this.target.x-e.x);n=this.target.x-Math.cos(i)*this.options.radius,r=this.target.y-Math.sin(i)*this.options.radius}var o=n-e.x,a=r-e.y;if(o||a)if(this.options.speed)if(this.options.acceleration){var s=Math.atan2(r-e.y,n-e.x),u=Math.sqrt(Math.pow(o,2)+Math.pow(a,2));if(u){var l=(Math.pow(this.velocity.x,2)+Math.pow(this.velocity.y,2))/(2*this.options.acceleration);this.velocity=u>l?{x:Math.min(this.velocity.x+this.options.acceleration*t,this.options.speed),y:Math.min(this.velocity.y+this.options.acceleration*t,this.options.speed)}:{x:Math.max(this.velocity.x-this.options.acceleration*this.options.speed,0),y:Math.max(this.velocity.y-this.options.acceleration*this.options.speed,0)};var c=Math.cos(s)*this.velocity.x,h=Math.sin(s)*this.velocity.y,f=Math.abs(c)>Math.abs(o)?n:e.x+c,p=Math.abs(h)>Math.abs(a)?r:e.y+h;this.parent.moveCenter(f,p),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}}else{var d=Math.atan2(r-e.y,n-e.x),m=Math.cos(d)*this.options.speed,v=Math.sin(d)*this.options.speed,y=Math.abs(m)>Math.abs(o)?n:e.x+m,g=Math.abs(v)>Math.abs(a)?r:e.y+v;this.parent.moveCenter(y,g),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}else this.parent.moveCenter(n,r),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}}}]),n}(v),U={percent:.1,smooth:!1,interrupt:!0,reverse:!1,center:null,lineHeight:20},j=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},U,i),r}return Object(h.a)(n,[{key:"down",value:function(){this.options.interrupt&&(this.smoothing=null)}},{key:"update",value:function(){if(this.smoothing){var t,e=this.smoothingCenter,n=this.smoothing;this.options.center||(t=this.parent.toLocal(e)),this.parent.scale.x+=n.x,this.parent.scale.y+=n.y,this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});var r=this.parent.plugins.get("clamp-zoom",!0);if(r&&r.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{var i=this.parent.toGlobal(t);this.parent.x+=e.x-i.x,this.parent.y+=e.y-i.y}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.smoothingCount++,this.smoothingCount>=this.options.smooth&&(this.smoothing=null)}}},{key:"wheel",value:function(t){if(!this.paused){var e=this.parent.input.getPointerPosition(t),n=(this.options.reverse?-1:1)*-t.deltaY*(t.deltaMode?this.options.lineHeight:1)/500,r=Math.pow(2,(1+this.options.percent)*n);if(this.options.smooth){var i={x:this.smoothing?this.smoothing.x*(this.options.smooth-this.smoothingCount):0,y:this.smoothing?this.smoothing.y*(this.options.smooth-this.smoothingCount):0};this.smoothing={x:((this.parent.scale.x+i.x)*r-this.parent.scale.x)/this.options.smooth,y:((this.parent.scale.y+i.y)*r-this.parent.scale.y)/this.options.smooth},this.smoothingCount=0,this.smoothingCenter=e}else{var o;this.options.center||(o=this.parent.toLocal(e)),this.parent.scale.x*=r,this.parent.scale.y*=r,this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});var a=this.parent.plugins.get("clamp-zoom",!0);if(a&&a.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{var s=this.parent.toGlobal(o);this.parent.x+=e.x-s.x,this.parent.y+=e.y-s.y}}return this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel",{wheel:{dx:t.deltaX,dy:t.deltaY,dz:t.deltaZ},event:t,viewport:this.parent}),!this.parent.options.passiveWheel||void 0}}}]),n}(v),B={radius:null,distance:null,top:null,bottom:null,left:null,right:null,speed:8,reverse:!1,noDecelerate:!1,linear:!1,allowButtons:!1},z=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},B,i),r.reverse=r.options.reverse?1:-1,r.radiusSquared=Math.pow(r.options.radius,2),r.resize(),r}return Object(h.a)(n,[{key:"resize",value:function(){var t=this.options.distance;null!==t?(this.left=t,this.top=t,this.right=this.parent.worldScreenWidth-t,this.bottom=this.parent.worldScreenHeight-t):this.radius||(this.left=this.options.left,this.top=this.options.top,this.right=null===this.options.right?null:this.parent.worldScreenWidth-this.options.right,this.bottom=null===this.options.bottom?null:this.parent.worldScreenHeight-this.options.bottom)}},{key:"down",value:function(){this.paused||this.options.allowButtons||(this.horizontal=this.vertical=null)}},{key:"move",value:function(t){if(!this.paused&&!("mouse"!==t.data.pointerType&&1!==t.data.identifier||!this.options.allowButtons&&0!==t.data.buttons)){var e=t.data.global.x,n=t.data.global.y;if(this.radiusSquared){var r=this.parent.toScreen(this.parent.center);if(Math.pow(r.x-e,2)+Math.pow(r.y-n,2)>=this.radiusSquared){var i=Math.atan2(r.y-n,r.x-e);this.options.linear?(this.horizontal=Math.round(Math.cos(i))*this.options.speed*this.reverse*.06,this.vertical=Math.round(Math.sin(i))*this.options.speed*this.reverse*.06):(this.horizontal=Math.cos(i)*this.options.speed*this.reverse*.06,this.vertical=Math.sin(i)*this.options.speed*this.reverse*.06)}else this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=0}else null!==this.left&&ethis.right?this.horizontal=-1*this.reverse*this.options.speed*.06:(this.decelerateHorizontal(),this.horizontal=0),null!==this.top&&nthis.bottom?this.vertical=-1*this.reverse*this.options.speed*.06:(this.decelerateVertical(),this.vertical=0)}}},{key:"decelerateHorizontal",value:function(){var t=this.parent.plugins.get("decelerate",!0);this.horizontal&&t&&!this.options.noDecelerate&&t.activate({x:this.horizontal*this.options.speed*this.reverse/(1e3/60)})}},{key:"decelerateVertical",value:function(){var t=this.parent.plugins.get("decelerate",!0);this.vertical&&t&&!this.options.noDecelerate&&t.activate({y:this.vertical*this.options.speed*this.reverse/(1e3/60)})}},{key:"up",value:function(){this.paused||(this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=null)}},{key:"update",value:function(){if(!this.paused&&(this.horizontal||this.vertical)){var t=this.parent.center;this.horizontal&&(t.x+=this.horizontal*this.options.speed),this.vertical&&(t.y+=this.vertical*this.options.speed),this.parent.moveCenter(t),this.parent.emit("moved",{viewport:this.parent,type:"mouse-edges"})}}}]),n}(v),H={removeOnInterrupt:!1,ease:"linear",time:1e3},X=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},H,i),r.options.ease=I(r.options.ease),r.setupPosition(),r.setupZoom(),r}return Object(h.a)(n,[{key:"setupPosition",value:function(){"undefined"!==typeof this.options.position?(this.startX=this.parent.center.x,this.startY=this.parent.center.y,this.deltaX=this.options.position.x-this.parent.center.x,this.deltaY=this.options.position.y-this.parent.center.y,this.keepCenter=!1):this.keepCenter=!0}},{key:"setupZoom",value:function(){this.width=null,this.height=null,"undefined"!==typeof this.options.scale?this.width=this.parent.screenWidth/this.options.scale:"undefined"!==typeof this.options.scaleX||"undefined"!==typeof this.options.scaleY?("undefined"!==typeof this.options.scaleX&&(this.width=this.parent.screenWidth/this.options.scaleX),"undefined"!==typeof this.options.scaleY&&(this.height=this.parent.screenHeight/this.options.scaleY)):("undefined"!==typeof this.options.width&&(this.width=this.options.width),"undefined"!==typeof this.options.height&&(this.height=this.options.height)),null!==typeof this.width&&(this.startWidth=this.parent.screenWidthInWorldPixels,this.deltaWidth=this.width-this.startWidth),null!==typeof this.height&&(this.startHeight=this.parent.screenHeightInWorldPixels,this.deltaHeight=this.height-this.startHeight),this.time=0}},{key:"down",value:function(){this.options.removeOnInterrupt&&this.parent.plugins.remove("animate")}},{key:"complete",value:function(){this.parent.plugins.remove("animate"),null!==this.width&&this.parent.fitWidth(this.width,this.keepCenter,null===this.height),null!==this.height&&this.parent.fitHeight(this.height,this.keepCenter,null===this.width),this.keepCenter||this.parent.moveCenter(this.options.position.x,this.options.position.y),this.parent.emit("animate-end",this.parent),this.options.callbackOnComplete&&this.options.callbackOnComplete(this.parent)}},{key:"update",value:function(t){if(!this.paused)if(this.time+=t,this.time>=this.options.time)this.complete();else{var e=new f.Point(this.parent.scale.x,this.parent.scale.y),n=this.options.ease(this.time,0,1,this.options.time);if(null!==this.width&&this.parent.fitWidth(this.startWidth+this.deltaWidth*n,this.keepCenter,null===this.height),null!==this.height&&this.parent.fitHeight(this.startHeight+this.deltaHeight*n,this.keepCenter,null===this.width),null===this.width?this.parent.scale.x=this.parent.scale.y:null===this.height&&(this.parent.scale.y=this.parent.scale.x),!this.keepCenter){var r=new f.Point(this.parent.x,this.parent.y);this.parent.moveCenter(this.startX+this.deltaX*n,this.startY+this.deltaY*n),this.parent.emit("moved",{viewport:this.parent,original:r,type:"animate"})}(this.width||this.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:e,type:"animate"}),this.keepCenter}}}]),n}(v),W={screenWidth:window.innerWidth,screenHeight:window.innerHeight,worldWidth:null,worldHeight:null,threshold:5,passiveWheel:!0,stopPropagation:!1,forceHitArea:null,noTicker:!1,interaction:null,disableOnContextMenu:!1},G=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Object(c.a)(this,n),(t=e.call(this)).options=Object.assign({},W,i),i.ticker)t.options.ticker=i.ticker;else{var o,a=f;o=parseInt(/^(\d+)\./.exec(f.VERSION)[1])<5?a.ticker.shared:a.Ticker.shared,t.options.ticker=i.ticker||o}return t.screenWidth=t.options.screenWidth,t.screenHeight=t.options.screenHeight,t._worldWidth=t.options.worldWidth,t._worldHeight=t.options.worldHeight,t.forceHitArea=t.options.forceHitArea,t.threshold=t.options.threshold,t.options.divWheel=t.options.divWheel||document.body,t.options.disableOnContextMenu&&(t.options.divWheel.oncontextmenu=function(t){return t.preventDefault()}),t.options.noTicker||(t.tickerFunction=function(){return t.update(t.options.ticker.elapsedMS)},t.options.ticker.add(t.tickerFunction)),t.input=new p(Object(r.a)(t)),t.plugins=new m(Object(r.a)(t)),t}return Object(h.a)(n,[{key:"destroy",value:function(t){this.options.noTicker||this.options.ticker.remove(this.tickerFunction),this.input.destroy(),Object(o.a)(Object(a.a)(n.prototype),"destroy",this).call(this,t)}},{key:"update",value:function(t){this.pause||(this.plugins.update(t),this.lastViewport&&(this.lastViewport.x!==this.x||this.lastViewport.y!==this.y?this.moving=!0:this.moving&&(this.emit("moved-end",this),this.moving=!1),this.lastViewport.scaleX!==this.scale.x||this.lastViewport.scaleY!==this.scale.y?this.zooming=!0:this.zooming&&(this.emit("zoomed-end",this),this.zooming=!1)),this.forceHitArea||(this._hitAreaDefault=new f.Rectangle(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight),this.hitArea=this._hitAreaDefault),this._dirty=this._dirty||!this.lastViewport||this.lastViewport.x!==this.x||this.lastViewport.y!==this.y||this.lastViewport.scaleX!==this.scale.x||this.lastViewport.scaleY!==this.scale.y,this.lastViewport={x:this.x,y:this.y,scaleX:this.scale.x,scaleY:this.scale.y},this.emit("frame-end",this))}},{key:"resize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.innerWidth,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.innerHeight,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;this.screenWidth=t,this.screenHeight=e,"undefined"!==typeof n&&(this._worldWidth=n),"undefined"!==typeof r&&(this._worldHeight=r),this.plugins.resize(),this.dirty=!0}},{key:"getVisibleBounds",value:function(){return new f.Rectangle(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight)}},{key:"toWorld",value:function(t,e){return 2===arguments.length?this.toLocal(new f.Point(t,e)):this.toLocal(t)}},{key:"toScreen",value:function(t,e){return 2===arguments.length?this.toGlobal(new f.Point(t,e)):this.toGlobal(t)}},{key:"moveCenter",value:function(){var t,e;return isNaN(arguments[0])?(t=arguments[0].x,e=arguments[0].y):(t=arguments[0],e=arguments[1]),this.position.set((this.worldScreenWidth/2-t)*this.scale.x,(this.worldScreenHeight/2-e)*this.scale.y),this.plugins.reset(),this.dirty=!0,this}},{key:"moveCorner",value:function(t,e){return 1===arguments.length?this.position.set(-t.x*this.scale.x,-t.y*this.scale.y):this.position.set(-t*this.scale.x,-e*this.scale.y),this.plugins.reset(),this}},{key:"findFitWidth",value:function(t){return this.screenWidth/t}},{key:"findFitHeight",value:function(t){return this.screenHeight/t}},{key:"findFit",value:function(t,e){var n=this.screenWidth/t,r=this.screenHeight/e;return Math.min(n,r)}},{key:"findCover",value:function(t,e){var n=this.screenWidth/t,r=this.screenHeight/e;return Math.max(n,r)}},{key:"fitWidth",value:function(t,e){var n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;e&&(n=this.center),this.scale.x=this.screenWidth/t,r&&(this.scale.y=this.scale.x);var o=this.plugins.get("clamp-zoom",!0);return!i&&o&&o.clamp(),e&&this.moveCenter(n),this}},{key:"fitHeight",value:function(t,e){var n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;e&&(n=this.center),this.scale.y=this.screenHeight/t,r&&(this.scale.x=this.scale.y);var o=this.plugins.get("clamp-zoom",!0);return!i&&o&&o.clamp(),e&&this.moveCenter(n),this}},{key:"fitWorld",value:function(t){var e;t&&(e=this.center),this.scale.x=this.screenWidth/this.worldWidth,this.scale.y=this.screenHeight/this.worldHeight,this.scale.x1&&void 0!==arguments[1]?arguments[1]:this.worldWidth,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.worldHeight;t&&(e=this.center),this.scale.x=this.screenWidth/n,this.scale.y=this.screenHeight/r,this.scale.xthis.worldWidth,top:this.top<0,bottom:this.bottom>this._worldHeight,cornerPoint:new f.Point(this.worldWidth*this.scale.x-this.screenWidth,this.worldHeight*this.scale.y-this.screenHeight)}}},{key:"drag",value:function(t){return this.plugins.add("drag",new g(this,t)),this}},{key:"clamp",value:function(t){return this.plugins.add("clamp",new w(this,t)),this}},{key:"decelerate",value:function(t){return this.plugins.add("decelerate",new P(this,t)),this}},{key:"bounce",value:function(t){return this.plugins.add("bounce",new k(this,t)),this}},{key:"pinch",value:function(t){return this.plugins.add("pinch",new b(this,t)),this}},{key:"snap",value:function(t,e,n){return this.plugins.add("snap",new R(this,t,e,n)),this}},{key:"follow",value:function(t,e){return this.plugins.add("follow",new F(this,t,e)),this}},{key:"wheel",value:function(t){return this.plugins.add("wheel",new j(this,t)),this}},{key:"animate",value:function(t){return this.plugins.add("animate",new X(this,t)),this}},{key:"clampZoom",value:function(t){return this.plugins.add("clamp-zoom",new E(this,t)),this}},{key:"mouseEdges",value:function(t){return this.plugins.add("mouse-edges",new z(this,t)),this}},{key:"ensureVisible",value:function(t,e,n,r,i){i&&(n>this.worldScreenWidth||r>this.worldScreenHeight)&&(this.fit(!0,n,r),this.emit("zoomed",{viewport:this,type:"ensureVisible"}));var o=!1;tthis.right&&(this.right=t+n,o=!0),ethis.bottom&&(this.bottom=e+r,o=!0),o&&this.emit("moved",{viewport:this,type:"ensureVisible"})}},{key:"worldWidth",get:function(){return this._worldWidth?this._worldWidth:this.width/this.scale.x},set:function(t){this._worldWidth=t,this.plugins.resize()}},{key:"worldHeight",get:function(){return this._worldHeight?this._worldHeight:this.height/this.scale.y},set:function(t){this._worldHeight=t,this.plugins.resize()}},{key:"worldScreenWidth",get:function(){return this.screenWidth/this.scale.x}},{key:"worldScreenHeight",get:function(){return this.screenHeight/this.scale.y}},{key:"screenWorldWidth",get:function(){return this.worldWidth*this.scale.x}},{key:"screenWorldHeight",get:function(){return this.worldHeight*this.scale.y}},{key:"center",get:function(){return new f.Point(this.worldScreenWidth/2-this.x/this.scale.x,this.worldScreenHeight/2-this.y/this.scale.y)},set:function(t){this.moveCenter(t)}},{key:"corner",get:function(){return new f.Point(-this.x/this.scale.x,-this.y/this.scale.y)},set:function(t){this.moveCorner(t)}},{key:"screenWidthInWorldPixels",get:function(){return this.screenWidth/this.scale.x}},{key:"screenHeightInWorldPixels",get:function(){return this.screenHeight/this.scale.y}},{key:"visible",set:function(t){t||this.input.clear(),Object(i.a)(Object(a.a)(n.prototype),"visible",t,this,!0)}},{key:"scaled",set:function(t){this.setZoom(t,!0)},get:function(){return this.scale.x}},{key:"right",get:function(){return-this.x/this.scale.x+this.worldScreenWidth},set:function(t){this.x=-t*this.scale.x+this.screenWidth,this.plugins.reset()}},{key:"left",get:function(){return-this.x/this.scale.x},set:function(t){this.x=-t*this.scale.x,this.plugins.reset()}},{key:"top",get:function(){return-this.y/this.scale.y},set:function(t){this.y=-t*this.scale.y,this.plugins.reset()}},{key:"bottom",get:function(){return-this.y/this.scale.y+this.worldScreenHeight},set:function(t){this.y=-t*this.scale.y+this.screenHeight,this.plugins.reset()}},{key:"dirty",get:function(){return this._dirty},set:function(t){this._dirty=t}},{key:"forceHitArea",get:function(){return this._forceHitArea},set:function(t){t?(this._forceHitArea=t,this.hitArea=t):(this._forceHitArea=null,this.hitArea=new f.Rectangle(0,0,this.worldWidth,this.worldHeight))}},{key:"pause",get:function(){return this._pause},set:function(t){this._pause=t,this.lastViewport=null,this.moving=!1,this.zooming=!1,t&&this.input.pause()}}]),n}(f.Container)}).call(this,n(12))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(26),i=n(24);function o(t,e,n,a){return(o="undefined"!==typeof Reflect&&Reflect.set?Reflect.set:function(t,e,n,o){var a,s=Object(r.a)(t,e);if(s){if((a=Object.getOwnPropertyDescriptor(s,e)).set)return a.set.call(o,n),!0;if(!a.writable)return!1}if(a=Object.getOwnPropertyDescriptor(o,e)){if(!a.writable)return!1;a.value=n,Object.defineProperty(o,e,a)}else Object(i.a)(o,e,n);return!0})(t,e,n,a)}function a(t,e,n,r,i){if(!o(t,e,n,r||t)&&i)throw new Error("failed to set property");return n}},function(t,e,n){"use strict";(function(t){var n=function(){if("undefined"!==typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n0},t.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;a.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),l=function(t,e){for(var n=0,r=Object.keys(e);n0},t}(),x="undefined"!==typeof WeakMap?new WeakMap:new n,w=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),r=new b(e,n,this);x.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){w.prototype[t]=function(){var e;return(e=x.get(this))[t].apply(e,arguments)}}));var T="undefined"!==typeof i.ResizeObserver?i.ResizeObserver:w;e.a=T}).call(this,n(12))},function(t,e,n){var r=n(30),i=n(28);t.exports=function(t,e,n){var o=!0,a=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return i(n)&&(o="leading"in n?!!n.leading:o,a="trailing"in n?!!n.trailing:a),r(t,e,{leading:o,maxWait:e,trailing:a})}},,,function(t,e,n){"use strict";function r(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";var r=n(1),i=60103;if(e.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),e.Fragment=o("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function l(t,e,n){var r,o={},l=null,c=null;for(r in void 0!==n&&(l=""+n),void 0!==e.key&&(l=""+e.key),void 0!==e.ref&&(c=e.ref),e)s.call(e,r)&&!u.hasOwnProperty(r)&&(o[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps)void 0===o[r]&&(o[r]=e[r]);return{$$typeof:i,type:t,key:l,ref:c,props:o,_owner:a.current}}e.jsx=l,e.jsxs=l},function(t,e,n){"use strict";var r=n(21),i="function"===typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,u=i?Symbol.for("react.strict_mode"):60108,l=i?Symbol.for("react.profiler"):60114,c=i?Symbol.for("react.provider"):60109,h=i?Symbol.for("react.context"):60110,f=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,d=i?Symbol.for("react.memo"):60115,m=i?Symbol.for("react.lazy"):60116,v="function"===typeof Symbol&&Symbol.iterator;function y(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;nA.length&&A.push(t)}function R(t,e,n,r){var i=typeof t;"undefined"!==i&&"boolean"!==i||(t=null);var s=!1;if(null===t)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case o:case a:s=!0}}if(s)return n(r,t,""===e?"."+N(t,0):e),1;if(s=0,e=""===e?".":e+":",Array.isArray(t))for(var u=0;u